summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml17
-rw-r--r--.editorconfig4
-rw-r--r--.gitignore22
-rw-r--r--.travis.yml30
-rw-r--r--SConstruct75
-rw-r--r--core/array.cpp4
-rw-r--r--core/bind/core_bind.cpp210
-rw-r--r--core/bind/core_bind.h81
-rw-r--r--core/callable.cpp359
-rw-r--r--core/callable.h161
-rw-r--r--core/callable_method_pointer.cpp (renamed from drivers/windows/semaphore_windows.cpp)96
-rw-r--r--core/callable_method_pointer.h292
-rw-r--r--core/class_db.cpp20
-rw-r--r--core/class_db.h8
-rw-r--r--core/command_queue_mt.cpp15
-rw-r--r--core/command_queue_mt.h12
-rw-r--r--core/compressed_translation.cpp18
-rw-r--r--core/compressed_translation.h6
-rw-r--r--core/core_string_names.cpp6
-rw-r--r--core/core_string_names.h5
-rw-r--r--core/crypto/crypto.cpp6
-rw-r--r--core/crypto/crypto.h4
-rw-r--r--core/crypto/crypto_core.cpp4
-rw-r--r--core/crypto/hashing_context.cpp18
-rw-r--r--core/crypto/hashing_context.h4
-rw-r--r--core/error_macros.h20
-rw-r--r--core/func_ref.cpp6
-rw-r--r--core/func_ref.h2
-rw-r--r--core/global_constants.cpp37
-rw-r--r--core/image.cpp335
-rw-r--r--core/image.h43
-rw-r--r--core/input_map.cpp30
-rw-r--r--core/io/config_file.cpp26
-rw-r--r--core/io/config_file.h6
-rw-r--r--core/io/dtls_server.cpp (renamed from drivers/unix/mutex_posix.h)43
-rw-r--r--core/io/dtls_server.h57
-rw-r--r--core/io/file_access_buffered.cpp4
-rw-r--r--core/io/file_access_buffered.h2
-rw-r--r--core/io/file_access_buffered_fa.h4
-rw-r--r--core/io/file_access_network.cpp98
-rw-r--r--core/io/file_access_network.h12
-rw-r--r--core/io/file_access_pack.cpp2
-rw-r--r--core/io/file_access_pack.h2
-rw-r--r--core/io/http_client.cpp26
-rw-r--r--core/io/http_client.h6
-rw-r--r--core/io/image_loader.cpp2
-rw-r--r--core/io/image_loader.h2
-rw-r--r--core/io/ip.cpp65
-rw-r--r--core/io/json.cpp10
-rw-r--r--core/io/marshalls.cpp281
-rw-r--r--core/io/multiplayer_api.cpp162
-rw-r--r--core/io/multiplayer_api.h2
-rw-r--r--core/io/net_socket.h2
-rw-r--r--core/io/packet_peer.cpp20
-rw-r--r--core/io/packet_peer.h10
-rw-r--r--core/io/packet_peer_dtls.cpp62
-rw-r--r--core/io/packet_peer_dtls.h68
-rw-r--r--core/io/packet_peer_udp.cpp75
-rw-r--r--core/io/packet_peer_udp.h6
-rw-r--r--core/io/resource_format_binary.cpp589
-rw-r--r--core/io/resource_format_binary.h25
-rw-r--r--core/io/resource_importer.cpp4
-rw-r--r--core/io/resource_importer.h2
-rw-r--r--core/io/resource_loader.cpp626
-rw-r--r--core/io/resource_loader.h85
-rw-r--r--core/io/resource_saver.cpp6
-rw-r--r--core/io/stream_peer.cpp35
-rw-r--r--core/io/stream_peer.h10
-rw-r--r--core/io/translation_loader_po.cpp2
-rw-r--r--core/io/translation_loader_po.h2
-rw-r--r--core/io/udp_server.cpp (renamed from platform/osx/semaphore_osx.cpp)110
-rw-r--r--core/io/udp_server.h (renamed from drivers/unix/semaphore_posix.h)40
-rw-r--r--core/make_binders.py24
-rw-r--r--core/math/a_star.cpp52
-rw-r--r--core/math/a_star.h12
-rw-r--r--core/math/bsp_tree.cpp581
-rw-r--r--core/math/bsp_tree.h159
-rw-r--r--core/math/expression.cpp82
-rw-r--r--core/math/expression.h2
-rw-r--r--core/math/geometry.cpp49
-rw-r--r--core/math/geometry.h16
-rw-r--r--core/math/rect2.h47
-rw-r--r--core/math/transform.h21
-rw-r--r--core/math/transform_2d.h21
-rw-r--r--core/math/triangle_mesh.cpp80
-rw-r--r--core/math/triangle_mesh.h16
-rw-r--r--core/math/vector2.h7
-rw-r--r--core/message_queue.cpp110
-rw-r--r--core/message_queue.h6
-rw-r--r--core/method_bind.h21
-rw-r--r--core/method_ptrcall.h336
-rw-r--r--core/node_path.h9
-rw-r--r--core/object.cpp277
-rw-r--r--core/object.h54
-rw-r--r--core/object_id.h30
-rw-r--r--core/os/dir_access.cpp5
-rw-r--r--core/os/dir_access.h3
-rw-r--r--core/os/file_access.cpp8
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/os/input.h2
-rw-r--r--core/os/input_event.cpp92
-rw-r--r--core/os/input_event.h13
-rw-r--r--core/os/main_loop.cpp6
-rw-r--r--core/os/memory.h2
-rw-r--r--core/os/midi_driver.cpp4
-rw-r--r--core/os/midi_driver.h2
-rw-r--r--core/os/mutex.cpp32
-rw-r--r--core/os/mutex.h73
-rw-r--r--core/os/os.cpp8
-rw-r--r--core/os/os.h5
-rw-r--r--core/os/semaphore.cpp14
-rw-r--r--core/os/semaphore.h31
-rw-r--r--core/os/thread_dummy.cpp16
-rw-r--r--core/os/thread_dummy.h25
-rw-r--r--core/os/thread_safe.h49
-rw-r--r--core/packed_data_container.cpp57
-rw-r--r--core/packed_data_container.h6
-rw-r--r--core/pool_vector.h648
-rw-r--r--core/project_settings.cpp37
-rw-r--r--core/reference.h9
-rw-r--r--core/register_core_types.cpp23
-rw-r--r--core/resource.cpp2
-rw-r--r--core/rid_owner.h4
-rw-r--r--core/script_debugger_remote.cpp1143
-rw-r--r--core/script_debugger_remote.h (renamed from scene/debugger/script_debugger_remote.h)209
-rw-r--r--core/script_language.cpp6
-rw-r--r--core/script_language.h10
-rw-r--r--core/string_name.cpp42
-rw-r--r--core/string_name.h2
-rw-r--r--core/translation.cpp18
-rw-r--r--core/translation.h6
-rw-r--r--core/type_info.h43
-rw-r--r--core/typedefs.h30
-rw-r--r--core/undo_redo.cpp48
-rw-r--r--core/undo_redo.h14
-rw-r--r--core/ustring.cpp1
-rw-r--r--core/variant.cpp1493
-rw-r--r--core/variant.h216
-rw-r--r--core/variant_call.cpp945
-rw-r--r--core/variant_op.cpp1675
-rw-r--r--core/variant_parser.cpp300
-rw-r--r--core/variant_parser.h3
-rw-r--r--core/vector.h29
-rw-r--r--doc/classes/@GlobalScope.xml91
-rw-r--r--doc/classes/ARVRController.xml2
-rw-r--r--doc/classes/ARVRInterface.xml2
-rw-r--r--doc/classes/ARVRPositionalTracker.xml9
-rw-r--r--doc/classes/ARVRServer.xml8
-rw-r--r--doc/classes/AStar.xml6
-rw-r--r--doc/classes/AStar2D.xml6
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatedSprite.xml4
-rw-r--r--doc/classes/AnimatedSprite3D.xml4
-rw-r--r--doc/classes/Animation.xml12
-rw-r--r--doc/classes/AnimationNode.xml12
-rw-r--r--doc/classes/AnimationNodeAnimation.xml2
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml22
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml38
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml8
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml48
-rw-r--r--doc/classes/Area.xml4
-rw-r--r--doc/classes/Area2D.xml2
-rw-r--r--doc/classes/Array.xml96
-rw-r--r--doc/classes/ArrayMesh.xml26
-rw-r--r--doc/classes/AudioEffectCompressor.xml2
-rw-r--r--doc/classes/AudioServer.xml6
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/AudioStreamSample.xml2
-rw-r--r--doc/classes/BaseMaterial3D.xml4
-rw-r--r--doc/classes/Basis.xml2
-rw-r--r--doc/classes/BoxContainer.xml6
-rw-r--r--doc/classes/CPUParticles.xml6
-rw-r--r--doc/classes/CPUParticles2D.xml6
-rw-r--r--doc/classes/Callable.xml77
-rw-r--r--doc/classes/CanvasItem.xml62
-rw-r--r--doc/classes/ClassDB.xml60
-rw-r--r--doc/classes/CollisionPolygon.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml4
-rw-r--r--doc/classes/Color.xml4
-rw-r--r--doc/classes/ColorPicker.xml4
-rw-r--r--doc/classes/ConcavePolygonShape.xml5
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConfigFile.xml33
-rw-r--r--doc/classes/Control.xml64
-rw-r--r--doc/classes/ConvexPolygonShape.xml2
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml4
-rw-r--r--doc/classes/Crypto.xml4
-rw-r--r--doc/classes/Curve2D.xml6
-rw-r--r--doc/classes/Curve3D.xml14
-rw-r--r--doc/classes/DTLSServer.xml90
-rw-r--r--doc/classes/Dictionary.xml8
-rw-r--r--doc/classes/Directory.xml3
-rw-r--r--doc/classes/EditorExportPlugin.xml8
-rw-r--r--doc/classes/EditorFeatureProfile.xml16
-rw-r--r--doc/classes/EditorFileDialog.xml2
-rw-r--r--doc/classes/EditorFileSystem.xml4
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorInspectorPlugin.xml2
-rw-r--r--doc/classes/EditorPlugin.xml16
-rw-r--r--doc/classes/EditorProperty.xml18
-rw-r--r--doc/classes/EditorResourcePreview.xml4
-rw-r--r--doc/classes/EditorSettings.xml10
-rw-r--r--doc/classes/EditorSpatialGizmo.xml6
-rw-r--r--doc/classes/Engine.xml4
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml14
-rw-r--r--doc/classes/FileDialog.xml6
-rw-r--r--doc/classes/FuncRef.xml2
-rw-r--r--doc/classes/GIProbeData.xml14
-rw-r--r--doc/classes/Geometry.xml74
-rw-r--r--doc/classes/Gradient.xml8
-rw-r--r--doc/classes/GraphEdit.xml28
-rw-r--r--doc/classes/HTTPClient.xml10
-rw-r--r--doc/classes/HTTPRequest.xml6
-rw-r--r--doc/classes/HashingContext.xml4
-rw-r--r--doc/classes/HeightMapShape.xml2
-rw-r--r--doc/classes/Image.xml44
-rw-r--r--doc/classes/Input.xml16
-rw-r--r--doc/classes/InputEvent.xml8
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventKey.xml26
-rw-r--r--doc/classes/InputMap.xml20
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/KinematicBody.xml3
-rw-r--r--doc/classes/KinematicBody2D.xml3
-rw-r--r--doc/classes/Line2D.xml2
-rw-r--r--doc/classes/MainLoop.xml6
-rw-r--r--doc/classes/Marshalls.xml10
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/MeshDataTool.xml14
-rw-r--r--doc/classes/MeshLibrary.xml5
-rw-r--r--doc/classes/MonoGCHandle.xml13
-rw-r--r--doc/classes/MultiMesh.xml10
-rw-r--r--doc/classes/MultiplayerAPI.xml6
-rw-r--r--doc/classes/Navigation.xml46
-rw-r--r--doc/classes/Navigation2D.xml24
-rw-r--r--doc/classes/Navigation2DServer.xml26
-rw-r--r--doc/classes/NavigationAgent.xml4
-rw-r--r--doc/classes/NavigationAgent2D.xml4
-rw-r--r--doc/classes/NavigationMesh.xml10
-rw-r--r--doc/classes/NavigationPolygon.xml36
-rw-r--r--doc/classes/NavigationRegion.xml (renamed from doc/classes/NavigationMeshInstance.xml)8
-rw-r--r--doc/classes/NavigationRegion2D.xml (renamed from doc/classes/NavigationPolygonInstance.xml)2
-rw-r--r--doc/classes/NavigationServer.xml72
-rw-r--r--doc/classes/Node.xml42
-rw-r--r--doc/classes/OS.xml53
-rw-r--r--doc/classes/Object.xml55
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/PackedByteArray.xml (renamed from doc/classes/PoolByteArray.xml)44
-rw-r--r--doc/classes/PackedColorArray.xml (renamed from doc/classes/PoolColorArray.xml)30
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml (renamed from doc/classes/PoolRealArray.xml)31
-rw-r--r--doc/classes/PackedFloat64Array.xml114
-rw-r--r--doc/classes/PackedInt32Array.xml114
-rw-r--r--doc/classes/PackedInt64Array.xml (renamed from doc/classes/PoolIntArray.xml)36
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/PackedStringArray.xml (renamed from doc/classes/PoolStringArray.xml)39
-rw-r--r--doc/classes/PackedVector2Array.xml (renamed from doc/classes/PoolVector2Array.xml)30
-rw-r--r--doc/classes/PackedVector3Array.xml (renamed from doc/classes/PoolVector3Array.xml)30
-rw-r--r--doc/classes/PacketPeer.xml4
-rw-r--r--doc/classes/PacketPeerDTLS.xml66
-rw-r--r--doc/classes/PacketPeerUDP.xml19
-rw-r--r--doc/classes/PanoramaSky.xml2
-rw-r--r--doc/classes/Performance.xml54
-rw-r--r--doc/classes/Physics2DServer.xml6
-rw-r--r--doc/classes/PhysicsServer.xml8
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/Polygon2D.xml14
-rw-r--r--doc/classes/PolygonPathFinder.xml8
-rw-r--r--doc/classes/ProjectSettings.xml39
-rw-r--r--doc/classes/Quat.xml4
-rw-r--r--doc/classes/Rect2.xml19
-rw-r--r--doc/classes/Rect2i.xml52
-rw-r--r--doc/classes/ReflectionProbe.xml4
-rw-r--r--doc/classes/ResourceFormatLoader.xml4
-rw-r--r--doc/classes/ResourceFormatSaver.xml2
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml55
-rw-r--r--doc/classes/ResourceLoader.xml40
-rw-r--r--doc/classes/ResourcePreloader.xml14
-rw-r--r--doc/classes/ResourceSaver.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/SceneState.xml12
-rw-r--r--doc/classes/SceneTree.xml24
-rw-r--r--doc/classes/Script.xml6
-rw-r--r--doc/classes/ScrollContainer.xml4
-rw-r--r--doc/classes/Semaphore.xml13
-rw-r--r--doc/classes/Shader.xml6
-rw-r--r--doc/classes/ShaderMaterial.xml4
-rw-r--r--doc/classes/Signal.xml87
-rw-r--r--doc/classes/SkeletonIK.xml4
-rw-r--r--doc/classes/Skin.xml18
-rw-r--r--doc/classes/Sky.xml4
-rw-r--r--doc/classes/SpringArm.xml6
-rw-r--r--doc/classes/SpriteFrames.xml32
-rw-r--r--doc/classes/StreamPeer.xml4
-rw-r--r--doc/classes/StreamPeerBuffer.xml2
-rw-r--r--doc/classes/String.xml138
-rw-r--r--doc/classes/StringName.xml21
-rw-r--r--doc/classes/SurfaceTool.xml14
-rw-r--r--doc/classes/TabContainer.xml6
-rw-r--r--doc/classes/Tabs.xml6
-rw-r--r--doc/classes/TextEdit.xml4
-rw-r--r--doc/classes/TextFile.xml13
-rw-r--r--doc/classes/Texture2D.xml2
-rw-r--r--doc/classes/TextureLayered.xml2
-rw-r--r--doc/classes/Theme.xml108
-rw-r--r--doc/classes/Thread.xml2
-rw-r--r--doc/classes/Transform.xml8
-rw-r--r--doc/classes/Transform2D.xml8
-rw-r--r--doc/classes/Translation.xml12
-rw-r--r--doc/classes/TranslationServer.xml4
-rw-r--r--doc/classes/TreeItem.xml4
-rw-r--r--doc/classes/Tween.xml54
-rw-r--r--doc/classes/UDPServer.xml98
-rw-r--r--doc/classes/UndoRedo.xml8
-rw-r--r--doc/classes/Vector2.xml14
-rw-r--r--doc/classes/Vector2i.xml61
-rw-r--r--doc/classes/Vector3.xml14
-rw-r--r--doc/classes/Vector3i.xml72
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml2
-rw-r--r--doc/classes/VisualServer.xml72
-rw-r--r--doc/classes/VisualShader.xml4
-rw-r--r--doc/classes/VisualShaderNode.xml13
-rw-r--r--doc/classes/VisualShaderNodeCompare.xml11
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml16
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml (renamed from doc/classes/VisualShaderNodeScalarConstant.xml)5
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml116
-rw-r--r--doc/classes/VisualShaderNodeFloatOp.xml50
-rw-r--r--doc/classes/VisualShaderNodeFloatUniform.xml (renamed from doc/classes/VisualShaderNodeScalarUniform.xml)6
-rw-r--r--doc/classes/VisualShaderNodeIf.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml4
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml20
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml32
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml41
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml38
-rw-r--r--doc/classes/VisualShaderNodeScalarFunc.xml81
-rw-r--r--doc/classes/VisualShaderNodeScalarOp.xml37
-rw-r--r--doc/classes/WorldMarginShape.xml (renamed from doc/classes/PlaneShape.xml)6
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp15
-rw-r--r--drivers/alsa/audio_driver_alsa.h2
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.cpp17
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.h4
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp18
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.h2
-rw-r--r--drivers/coremidi/midi_driver_coremidi.cpp4
-rw-r--r--drivers/coremidi/midi_driver_coremidi.h2
-rw-r--r--drivers/dummy/rasterizer_dummy.h44
-rw-r--r--drivers/dummy/texture_loader_dummy.cpp4
-rw-r--r--drivers/dummy/texture_loader_dummy.h2
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp6
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp110
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h39
-rw-r--r--drivers/png/image_loader_png.cpp26
-rw-r--r--drivers/png/image_loader_png.h4
-rw-r--r--drivers/png/png_driver_common.cpp20
-rw-r--r--drivers/png/png_driver_common.h3
-rw-r--r--drivers/png/resource_saver_png.cpp12
-rw-r--r--drivers/png/resource_saver_png.h2
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp14
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.h2
-rw-r--r--drivers/unix/dir_access_unix.cpp7
-rw-r--r--drivers/unix/dir_access_unix.h3
-rw-r--r--drivers/unix/net_socket_posix.cpp15
-rw-r--r--drivers/unix/net_socket_posix.h2
-rw-r--r--drivers/unix/os_unix.cpp10
-rw-r--r--drivers/vulkan/SCsub8
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp99
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h24
-rw-r--r--drivers/vulkan/vulkan_context.cpp180
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp13
-rw-r--r--drivers/wasapi/audio_driver_wasapi.h2
-rw-r--r--drivers/windows/dir_access_windows.cpp8
-rw-r--r--drivers/windows/dir_access_windows.h2
-rw-r--r--drivers/windows/mutex_windows.cpp101
-rw-r--r--drivers/winmidi/midi_driver_winmidi.cpp4
-rw-r--r--drivers/winmidi/midi_driver_winmidi.h2
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.cpp12
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.h2
-rw-r--r--editor/SCsub1
-rw-r--r--editor/animation_bezier_editor.cpp29
-rw-r--r--editor/animation_track_editor.cpp236
-rw-r--r--editor/animation_track_editor.h2
-rw-r--r--editor/animation_track_editor_plugins.cpp6
-rw-r--r--editor/array_property_edit.cpp6
-rw-r--r--editor/code_editor.cpp95
-rw-r--r--editor/connections_dialog.cpp105
-rw-r--r--editor/connections_dialog.h38
-rw-r--r--editor/create_dialog.cpp45
-rw-r--r--editor/create_dialog.h1
-rw-r--r--editor/debugger/SCsub5
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp276
-rw-r--r--editor/debugger/editor_debugger_inspector.h (renamed from platform/osx/semaphore_osx.h)73
-rw-r--r--editor/debugger/editor_debugger_node.cpp574
-rw-r--r--editor/debugger/editor_debugger_node.h177
-rw-r--r--editor/debugger/editor_debugger_tree.cpp269
-rw-r--r--editor/debugger/editor_debugger_tree.h74
-rw-r--r--editor/debugger/script_editor_debugger.cpp1838
-rw-r--r--editor/debugger/script_editor_debugger.h (renamed from editor/script_editor_debugger.h)113
-rw-r--r--editor/dependency_editor.cpp27
-rw-r--r--editor/doc/doc_data.cpp22
-rw-r--r--editor/doc/doc_dump.cpp21
-rw-r--r--editor/editor_about.cpp4
-rw-r--r--editor/editor_asset_installer.cpp4
-rw-r--r--editor/editor_audio_buses.cpp86
-rw-r--r--editor/editor_autoload_settings.cpp31
-rw-r--r--editor/editor_data.cpp13
-rw-r--r--editor/editor_dir_dialog.cpp30
-rw-r--r--editor/editor_dir_dialog.h1
-rw-r--r--editor/editor_export.cpp14
-rw-r--r--editor/editor_export.h6
-rw-r--r--editor/editor_feature_profile.cpp50
-rw-r--r--editor/editor_file_dialog.cpp119
-rw-r--r--editor/editor_file_dialog.h2
-rw-r--r--editor/editor_file_system.cpp4
-rw-r--r--editor/editor_folding.cpp24
-rw-r--r--editor/editor_folding.h4
-rw-r--r--editor/editor_fonts.cpp4
-rw-r--r--editor/editor_help.cpp32
-rw-r--r--editor/editor_help_search.cpp23
-rw-r--r--editor/editor_inspector.cpp124
-rw-r--r--editor/editor_inspector.h2
-rw-r--r--editor/editor_layouts_dialog.cpp8
-rw-r--r--editor/editor_log.cpp6
-rw-r--r--editor/editor_network_profiler.cpp9
-rw-r--r--editor/editor_node.cpp323
-rw-r--r--editor/editor_node.h12
-rw-r--r--editor/editor_path.cpp9
-rw-r--r--editor/editor_plugin.cpp10
-rw-r--r--editor/editor_plugin_settings.cpp15
-rw-r--r--editor/editor_profiler.cpp37
-rw-r--r--editor/editor_profiler.h2
-rw-r--r--editor/editor_properties.cpp275
-rw-r--r--editor/editor_properties.h5
-rw-r--r--editor/editor_properties_array_dict.cpp168
-rw-r--r--editor/editor_properties_array_dict.h8
-rw-r--r--editor/editor_resource_preview.cpp139
-rw-r--r--editor/editor_resource_preview.h4
-rw-r--r--editor/editor_run.cpp32
-rw-r--r--editor/editor_run.h8
-rw-r--r--editor/editor_run_native.cpp6
-rw-r--r--editor/editor_run_script.cpp6
-rw-r--r--editor/editor_sectioned_inspector.cpp7
-rw-r--r--editor/editor_settings.cpp44
-rw-r--r--editor/editor_settings.h2
-rw-r--r--editor/editor_spin_slider.cpp18
-rw-r--r--editor/editor_sub_scene.cpp21
-rw-r--r--editor/editor_sub_scene.h1
-rw-r--r--editor/editor_themes.cpp3
-rw-r--r--editor/editor_visual_profiler.cpp43
-rw-r--r--editor/editor_visual_profiler.h2
-rw-r--r--editor/export_template_manager.cpp61
-rw-r--r--editor/export_template_manager.h4
-rw-r--r--editor/fileserver/editor_file_server.cpp17
-rw-r--r--editor/fileserver/editor_file_server.h2
-rw-r--r--editor/filesystem_dock.cpp112
-rw-r--r--editor/filesystem_dock.h4
-rw-r--r--editor/find_in_files.cpp66
-rw-r--r--editor/find_in_files.h6
-rw-r--r--editor/groups_editor.cpp45
-rw-r--r--editor/icons/2D.svg (renamed from editor/icons/icon_2_d.svg)0
-rw-r--r--editor/icons/3D.svg (renamed from editor/icons/icon_3_d.svg)0
-rw-r--r--editor/icons/AABB.svg (renamed from editor/icons/icon_a_a_b_b.svg)0
-rw-r--r--editor/icons/ARVRAnchor.svg (renamed from editor/icons/icon_a_r_v_r_anchor.svg)0
-rw-r--r--editor/icons/ARVRCamera.svg (renamed from editor/icons/icon_a_r_v_r_camera.svg)0
-rw-r--r--editor/icons/ARVRController.svg (renamed from editor/icons/icon_a_r_v_r_controller.svg)0
-rw-r--r--editor/icons/ARVROrigin.svg (renamed from editor/icons/icon_a_r_v_r_origin.svg)0
-rw-r--r--editor/icons/AcceptDialog.svg (renamed from editor/icons/icon_accept_dialog.svg)0
-rw-r--r--editor/icons/ActionCopy.svg (renamed from editor/icons/icon_action_copy.svg)0
-rw-r--r--editor/icons/ActionCut.svg (renamed from editor/icons/icon_action_cut.svg)0
-rw-r--r--editor/icons/ActionPaste.svg (renamed from editor/icons/icon_action_paste.svg)0
-rw-r--r--editor/icons/Add.svg (renamed from editor/icons/icon_add.svg)0
-rw-r--r--editor/icons/AddAtlasTile.svg (renamed from editor/icons/icon_add_atlas_tile.svg)0
-rw-r--r--editor/icons/AddAutotile.svg (renamed from editor/icons/icon_add_autotile.svg)0
-rw-r--r--editor/icons/AddSingleTile.svg (renamed from editor/icons/icon_add_single_tile.svg)0
-rw-r--r--editor/icons/AddSplit.svg (renamed from editor/icons/icon_add_split.svg)0
-rw-r--r--editor/icons/Anchor.svg (renamed from editor/icons/icon_anchor.svg)0
-rw-r--r--editor/icons/AnimatedSprite.svg (renamed from editor/icons/icon_animated_sprite.svg)0
-rw-r--r--editor/icons/AnimatedSprite3D.svg (renamed from editor/icons/icon_animated_sprite_3d.svg)0
-rw-r--r--editor/icons/AnimatedTexture.svg (renamed from editor/icons/icon_animated_texture.svg)0
-rw-r--r--editor/icons/Animation.svg (renamed from editor/icons/icon_animation.svg)0
-rw-r--r--editor/icons/AnimationFilter.svg (renamed from editor/icons/icon_animation_filter.svg)0
-rw-r--r--editor/icons/AnimationPlayer.svg (renamed from editor/icons/icon_animation_player.svg)0
-rw-r--r--editor/icons/AnimationTrackGroup.svg (renamed from editor/icons/icon_animation_track_group.svg)0
-rw-r--r--editor/icons/AnimationTrackList.svg (renamed from editor/icons/icon_animation_track_list.svg)0
-rw-r--r--editor/icons/AnimationTree.svg (renamed from editor/icons/icon_animation_tree.svg)0
-rw-r--r--editor/icons/Area.svg (renamed from editor/icons/icon_area.svg)0
-rw-r--r--editor/icons/Area2D.svg (renamed from editor/icons/icon_area_2d.svg)0
-rw-r--r--editor/icons/Array.svg (renamed from editor/icons/icon_array.svg)0
-rw-r--r--editor/icons/ArrayMesh.svg (renamed from editor/icons/icon_array_mesh.svg)0
-rw-r--r--editor/icons/ArrowDown.svg (renamed from editor/icons/icon_arrow_down.svg)0
-rw-r--r--editor/icons/ArrowLeft.svg (renamed from editor/icons/icon_arrow_left.svg)0
-rw-r--r--editor/icons/ArrowRight.svg (renamed from editor/icons/icon_arrow_right.svg)0
-rw-r--r--editor/icons/ArrowUp.svg (renamed from editor/icons/icon_arrow_up.svg)0
-rw-r--r--editor/icons/AssetLib.svg (renamed from editor/icons/icon_asset_lib.svg)0
-rw-r--r--editor/icons/AtlasTexture.svg (renamed from editor/icons/icon_atlas_texture.svg)0
-rw-r--r--editor/icons/AudioBusBypass.svg (renamed from editor/icons/icon_audio_bus_bypass.svg)0
-rw-r--r--editor/icons/AudioBusLayout.svg (renamed from editor/icons/icon_audio_bus_layout.svg)0
-rw-r--r--editor/icons/AudioBusMute.svg (renamed from editor/icons/icon_audio_bus_mute.svg)0
-rw-r--r--editor/icons/AudioBusSolo.svg (renamed from editor/icons/icon_audio_bus_solo.svg)0
-rw-r--r--editor/icons/AudioStreamOGGVorbis.svg (renamed from editor/icons/icon_audio_stream_o_g_g_vorbis.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer.svg (renamed from editor/icons/icon_audio_stream_player.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer2D.svg (renamed from editor/icons/icon_audio_stream_player_2_d.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer3D.svg (renamed from editor/icons/icon_audio_stream_player_3_d.svg)0
-rw-r--r--editor/icons/AudioStreamSample.svg (renamed from editor/icons/icon_audio_stream_sample.svg)0
-rw-r--r--editor/icons/AutoEnd.svg (renamed from editor/icons/icon_auto_end.svg)0
-rw-r--r--editor/icons/AutoKey.svg (renamed from editor/icons/icon_auto_key.svg)0
-rw-r--r--editor/icons/AutoPlay.svg (renamed from editor/icons/icon_auto_play.svg)0
-rw-r--r--editor/icons/AutoTriangle.svg (renamed from editor/icons/icon_auto_triangle.svg)0
-rw-r--r--editor/icons/Back.svg (renamed from editor/icons/icon_back.svg)0
-rw-r--r--editor/icons/BackBufferCopy.svg (renamed from editor/icons/icon_back_buffer_copy.svg)0
-rw-r--r--editor/icons/Bake.svg (renamed from editor/icons/icon_bake.svg)0
-rw-r--r--editor/icons/BakedLightmap.svg (renamed from editor/icons/icon_baked_lightmap.svg)0
-rw-r--r--editor/icons/BakedLightmapData.svg (renamed from editor/icons/icon_baked_lightmap_data.svg)0
-rw-r--r--editor/icons/Basis.svg (renamed from editor/icons/icon_basis.svg)0
-rw-r--r--editor/icons/BezierHandlesBalanced.svg (renamed from editor/icons/icon_bezier_handles_balanced.svg)0
-rw-r--r--editor/icons/BezierHandlesFree.svg (renamed from editor/icons/icon_bezier_handles_free.svg)0
-rw-r--r--editor/icons/BezierHandlesMirror.svg (renamed from editor/icons/icon_bezier_handles_mirror.svg)0
-rw-r--r--editor/icons/BitMap.svg (renamed from editor/icons/icon_bit_map.svg)0
-rw-r--r--editor/icons/BitmapFont.svg (renamed from editor/icons/icon_bitmap_font.svg)0
-rw-r--r--editor/icons/Blend.svg (renamed from editor/icons/icon_blend.svg)0
-rw-r--r--editor/icons/Bone.svg (renamed from editor/icons/icon_bone.svg)0
-rw-r--r--editor/icons/Bone2D.svg (renamed from editor/icons/icon_bone_2_d.svg)0
-rw-r--r--editor/icons/BoneAttachment.svg (renamed from editor/icons/icon_bone_attachment.svg)0
-rw-r--r--editor/icons/BoneTrack.svg (renamed from editor/icons/icon_bone_track.svg)0
-rw-r--r--editor/icons/BoxShape.svg (renamed from editor/icons/icon_box_shape.svg)0
-rw-r--r--editor/icons/Bucket.svg (renamed from editor/icons/icon_bucket.svg)0
-rw-r--r--editor/icons/BusVuEmpty.svg (renamed from editor/icons/icon_bus_vu_empty.svg)0
-rw-r--r--editor/icons/BusVuFrozen.svg (renamed from editor/icons/icon_bus_vu_frozen.svg)0
-rw-r--r--editor/icons/BusVuFull.svg (renamed from editor/icons/icon_bus_vu_full.svg)0
-rw-r--r--editor/icons/Button.svg (renamed from editor/icons/icon_button.svg)0
-rw-r--r--editor/icons/ButtonGroup.svg (renamed from editor/icons/icon_button_group.svg)0
-rw-r--r--editor/icons/CPUParticles.svg (renamed from editor/icons/icon_c_p_u_particles.svg)0
-rw-r--r--editor/icons/CPUParticles2D.svg (renamed from editor/icons/icon_c_p_u_particles_2_d.svg)0
-rw-r--r--editor/icons/Callable.svg5
-rw-r--r--editor/icons/Camera.svg (renamed from editor/icons/icon_camera.svg)0
-rw-r--r--editor/icons/Camera2D.svg (renamed from editor/icons/icon_camera_2d.svg)0
-rw-r--r--editor/icons/CameraTexture.svg (renamed from editor/icons/icon_camera_texture.svg)0
-rw-r--r--editor/icons/CanvasItem.svg (renamed from editor/icons/icon_canvas_item.svg)0
-rw-r--r--editor/icons/CanvasItemMaterial.svg (renamed from editor/icons/icon_canvas_item_material.svg)0
-rw-r--r--editor/icons/CanvasItemShader.svg (renamed from editor/icons/icon_canvas_item_shader.svg)0
-rw-r--r--editor/icons/CanvasItemShaderGraph.svg (renamed from editor/icons/icon_canvas_item_shader_graph.svg)0
-rw-r--r--editor/icons/CanvasLayer.svg (renamed from editor/icons/icon_canvas_layer.svg)0
-rw-r--r--editor/icons/CanvasModulate.svg (renamed from editor/icons/icon_canvas_modulate.svg)0
-rw-r--r--editor/icons/CapsuleMesh.svg (renamed from editor/icons/icon_capsule_mesh.svg)0
-rw-r--r--editor/icons/CapsuleShape.svg (renamed from editor/icons/icon_capsule_shape.svg)0
-rw-r--r--editor/icons/CapsuleShape2D.svg (renamed from editor/icons/icon_capsule_shape_2d.svg)0
-rw-r--r--editor/icons/CenterContainer.svg (renamed from editor/icons/icon_center_container.svg)0
-rw-r--r--editor/icons/CheckBox.svg (renamed from editor/icons/icon_check_box.svg)0
-rw-r--r--editor/icons/CheckButton.svg (renamed from editor/icons/icon_check_button.svg)0
-rw-r--r--editor/icons/Checkerboard.svg (renamed from editor/icons/icon_checkerboard.svg)0
-rw-r--r--editor/icons/CircleShape2D.svg (renamed from editor/icons/icon_circle_shape_2d.svg)0
-rw-r--r--editor/icons/ClassList.svg (renamed from editor/icons/icon_class_list.svg)0
-rw-r--r--editor/icons/Clear.svg (renamed from editor/icons/icon_clear.svg)0
-rw-r--r--editor/icons/ClippedCamera.svg (renamed from editor/icons/icon_clipped_camera.svg)0
-rw-r--r--editor/icons/Close.svg (renamed from editor/icons/icon_close.svg)0
-rw-r--r--editor/icons/Collapse.svg (renamed from editor/icons/icon_collapse.svg)0
-rw-r--r--editor/icons/CollisionPolygon.svg (renamed from editor/icons/icon_collision_polygon.svg)0
-rw-r--r--editor/icons/CollisionPolygon2D.svg (renamed from editor/icons/icon_collision_polygon_2d.svg)0
-rw-r--r--editor/icons/CollisionShape.svg (renamed from editor/icons/icon_collision_shape.svg)0
-rw-r--r--editor/icons/CollisionShape2D.svg (renamed from editor/icons/icon_collision_shape_2d.svg)0
-rw-r--r--editor/icons/Color.svg (renamed from editor/icons/icon_color.svg)0
-rw-r--r--editor/icons/ColorPick.svg (renamed from editor/icons/icon_color_pick.svg)0
-rw-r--r--editor/icons/ColorPicker.svg (renamed from editor/icons/icon_color_picker.svg)0
-rw-r--r--editor/icons/ColorPickerButton.svg (renamed from editor/icons/icon_color_picker_button.svg)0
-rw-r--r--editor/icons/ColorRamp.svg (renamed from editor/icons/icon_color_ramp.svg)0
-rw-r--r--editor/icons/ColorRect.svg (renamed from editor/icons/icon_color_rect.svg)0
-rw-r--r--editor/icons/ColorTrackVu.svg (renamed from editor/icons/icon_color_track_vu.svg)0
-rw-r--r--editor/icons/ConcavePolygonShape.svg (renamed from editor/icons/icon_concave_polygon_shape.svg)0
-rw-r--r--editor/icons/ConcavePolygonShape2D.svg (renamed from editor/icons/icon_concave_polygon_shape_2d.svg)0
-rw-r--r--editor/icons/ConeTwistJoint.svg (renamed from editor/icons/icon_cone_twist_joint.svg)0
-rw-r--r--editor/icons/ConfirmationDialog.svg (renamed from editor/icons/icon_confirmation_dialog.svg)0
-rw-r--r--editor/icons/Container.svg (renamed from editor/icons/icon_container.svg)0
-rw-r--r--editor/icons/Control.svg (renamed from editor/icons/icon_control.svg)0
-rw-r--r--editor/icons/ControlAlignBottomCenter.svg (renamed from editor/icons/icon_control_align_bottom_center.svg)0
-rw-r--r--editor/icons/ControlAlignBottomLeft.svg (renamed from editor/icons/icon_control_align_bottom_left.svg)0
-rw-r--r--editor/icons/ControlAlignBottomRight.svg (renamed from editor/icons/icon_control_align_bottom_right.svg)0
-rw-r--r--editor/icons/ControlAlignBottomWide.svg (renamed from editor/icons/icon_control_align_bottom_wide.svg)0
-rw-r--r--editor/icons/ControlAlignCenter.svg (renamed from editor/icons/icon_control_align_center.svg)0
-rw-r--r--editor/icons/ControlAlignCenterLeft.svg (renamed from editor/icons/icon_control_align_center_left.svg)0
-rw-r--r--editor/icons/ControlAlignCenterRight.svg (renamed from editor/icons/icon_control_align_center_right.svg)0
-rw-r--r--editor/icons/ControlAlignLeftCenter.svg (renamed from editor/icons/icon_control_align_left_center.svg)0
-rw-r--r--editor/icons/ControlAlignLeftWide.svg (renamed from editor/icons/icon_control_align_left_wide.svg)0
-rw-r--r--editor/icons/ControlAlignRightCenter.svg (renamed from editor/icons/icon_control_align_right_center.svg)0
-rw-r--r--editor/icons/ControlAlignRightWide.svg (renamed from editor/icons/icon_control_align_right_wide.svg)0
-rw-r--r--editor/icons/ControlAlignTopCenter.svg (renamed from editor/icons/icon_control_align_top_center.svg)0
-rw-r--r--editor/icons/ControlAlignTopLeft.svg (renamed from editor/icons/icon_control_align_top_left.svg)0
-rw-r--r--editor/icons/ControlAlignTopRight.svg (renamed from editor/icons/icon_control_align_top_right.svg)0
-rw-r--r--editor/icons/ControlAlignTopWide.svg (renamed from editor/icons/icon_control_align_top_wide.svg)0
-rw-r--r--editor/icons/ControlAlignWide.svg (renamed from editor/icons/icon_control_align_wide.svg)0
-rw-r--r--editor/icons/ControlHcenterWide.svg (renamed from editor/icons/icon_control_hcenter_wide.svg)0
-rw-r--r--editor/icons/ControlLayout.svg (renamed from editor/icons/icon_control_layout.svg)0
-rw-r--r--editor/icons/ControlVcenterWide.svg (renamed from editor/icons/icon_control_vcenter_wide.svg)0
-rw-r--r--editor/icons/ConvexPolygonShape.svg (renamed from editor/icons/icon_convex_polygon_shape.svg)0
-rw-r--r--editor/icons/ConvexPolygonShape2D.svg (renamed from editor/icons/icon_convex_polygon_shape_2d.svg)0
-rw-r--r--editor/icons/CopyNodePath.svg (renamed from editor/icons/icon_copy_node_path.svg)0
-rw-r--r--editor/icons/CreateNewSceneFrom.svg (renamed from editor/icons/icon_create_new_scene_from.svg)0
-rw-r--r--editor/icons/Crosshair.svg (renamed from editor/icons/icon_crosshair.svg)0
-rw-r--r--editor/icons/CryptoKey.svg (renamed from editor/icons/icon_crypto_key.svg)0
-rw-r--r--editor/icons/CubeMap.svg (renamed from editor/icons/icon_cube_map.svg)0
-rw-r--r--editor/icons/CubeMesh.svg (renamed from editor/icons/icon_cube_mesh.svg)0
-rw-r--r--editor/icons/Curve.svg (renamed from editor/icons/icon_curve.svg)0
-rw-r--r--editor/icons/Curve2D.svg (renamed from editor/icons/icon_curve_2d.svg)0
-rw-r--r--editor/icons/Curve3D.svg (renamed from editor/icons/icon_curve_3d.svg)0
-rw-r--r--editor/icons/CurveClose.svg (renamed from editor/icons/icon_curve_close.svg)0
-rw-r--r--editor/icons/CurveConstant.svg (renamed from editor/icons/icon_curve_constant.svg)0
-rw-r--r--editor/icons/CurveCreate.svg (renamed from editor/icons/icon_curve_create.svg)0
-rw-r--r--editor/icons/CurveCurve.svg (renamed from editor/icons/icon_curve_curve.svg)0
-rw-r--r--editor/icons/CurveDelete.svg (renamed from editor/icons/icon_curve_delete.svg)0
-rw-r--r--editor/icons/CurveEdit.svg (renamed from editor/icons/icon_curve_edit.svg)0
-rw-r--r--editor/icons/CurveIn.svg (renamed from editor/icons/icon_curve_in.svg)0
-rw-r--r--editor/icons/CurveInOut.svg (renamed from editor/icons/icon_curve_in_out.svg)0
-rw-r--r--editor/icons/CurveLinear.svg (renamed from editor/icons/icon_curve_linear.svg)0
-rw-r--r--editor/icons/CurveOut.svg (renamed from editor/icons/icon_curve_out.svg)0
-rw-r--r--editor/icons/CurveOutIn.svg (renamed from editor/icons/icon_curve_out_in.svg)0
-rw-r--r--editor/icons/CurveTexture.svg (renamed from editor/icons/icon_curve_texture.svg)0
-rw-r--r--editor/icons/CylinderMesh.svg (renamed from editor/icons/icon_cylinder_mesh.svg)0
-rw-r--r--editor/icons/CylinderShape.svg (renamed from editor/icons/icon_cylinder_shape.svg)0
-rw-r--r--editor/icons/DampedSpringJoint2D.svg (renamed from editor/icons/icon_damped_spring_joint_2d.svg)0
-rw-r--r--editor/icons/Debug.svg (renamed from editor/icons/icon_debug.svg)0
-rw-r--r--editor/icons/DebugContinue.svg (renamed from editor/icons/icon_debug_continue.svg)0
-rw-r--r--editor/icons/DebugNext.svg (renamed from editor/icons/icon_debug_next.svg)0
-rw-r--r--editor/icons/DebugSkipBreakpointsOff.svg (renamed from editor/icons/icon_debug_skip_breakpoints_off.svg)0
-rw-r--r--editor/icons/DebugSkipBreakpointsOn.svg (renamed from editor/icons/icon_debug_skip_breakpoints_on.svg)0
-rw-r--r--editor/icons/DebugStep.svg (renamed from editor/icons/icon_debug_step.svg)0
-rw-r--r--editor/icons/DefaultProjectIcon.svg (renamed from editor/icons/icon_default_project_icon.svg)0
-rw-r--r--editor/icons/DeleteSplit.svg (renamed from editor/icons/icon_delete_split.svg)0
-rw-r--r--editor/icons/Dictionary.svg (renamed from editor/icons/icon_dictionary.svg)0
-rw-r--r--editor/icons/DirectionalLight.svg (renamed from editor/icons/icon_directional_light.svg)0
-rw-r--r--editor/icons/DistractionFree.svg (renamed from editor/icons/icon_distraction_free.svg)0
-rw-r--r--editor/icons/Duplicate.svg (renamed from editor/icons/icon_duplicate.svg)0
-rw-r--r--editor/icons/DynamicFont.svg (renamed from editor/icons/icon_dynamic_font.svg)0
-rw-r--r--editor/icons/DynamicFontData.svg (renamed from editor/icons/icon_dynamic_font_data.svg)0
-rw-r--r--editor/icons/Edit.svg (renamed from editor/icons/icon_edit.svg)0
-rw-r--r--editor/icons/EditBezier.svg (renamed from editor/icons/icon_edit_bezier.svg)0
-rw-r--r--editor/icons/EditInternal.svg (renamed from editor/icons/icon_edit_internal.svg)0
-rw-r--r--editor/icons/EditKey.svg (renamed from editor/icons/icon_edit_key.svg)0
-rw-r--r--editor/icons/EditPivot.svg (renamed from editor/icons/icon_edit_pivot.svg)0
-rw-r--r--editor/icons/EditResource.svg (renamed from editor/icons/icon_edit_resource.svg)0
-rw-r--r--editor/icons/Editor3DHandle.svg (renamed from editor/icons/icon_editor_3d_handle.svg)0
-rw-r--r--editor/icons/EditorControlAnchor.svg (renamed from editor/icons/icon_editor_control_anchor.svg)0
-rw-r--r--editor/icons/EditorCurveHandle.svg (renamed from editor/icons/icon_editor_curve_handle.svg)0
-rw-r--r--editor/icons/EditorHandle.svg (renamed from editor/icons/icon_editor_handle.svg)0
-rw-r--r--editor/icons/EditorHandleAdd.svg (renamed from editor/icons/icon_editor_handle_add.svg)0
-rw-r--r--editor/icons/EditorInternalHandle.svg (renamed from editor/icons/icon_editor_internal_handle.svg)0
-rw-r--r--editor/icons/EditorPathSharpHandle.svg (renamed from editor/icons/icon_editor_path_sharp_handle.svg)0
-rw-r--r--editor/icons/EditorPathSmoothHandle.svg (renamed from editor/icons/icon_editor_path_smooth_handle.svg)0
-rw-r--r--editor/icons/EditorPivot.svg (renamed from editor/icons/icon_editor_pivot.svg)0
-rw-r--r--editor/icons/EditorPlugin.svg (renamed from editor/icons/icon_editor_plugin.svg)0
-rw-r--r--editor/icons/EditorPosition.svg (renamed from editor/icons/icon_editor_position.svg)0
-rw-r--r--editor/icons/EditorPositionPrevious.svg (renamed from editor/icons/icon_editor_position_previous.svg)0
-rw-r--r--editor/icons/EditorPositionUnselected.svg (renamed from editor/icons/icon_editor_position_unselected.svg)0
-rw-r--r--editor/icons/Enum.svg (renamed from editor/icons/icon_enum.svg)0
-rw-r--r--editor/icons/Environment.svg (renamed from editor/icons/icon_environment.svg)0
-rw-r--r--editor/icons/Error.svg (renamed from editor/icons/icon_error.svg)0
-rw-r--r--editor/icons/ErrorSign.svg (renamed from editor/icons/icon_error_sign.svg)0
-rw-r--r--editor/icons/ExpandBottomDock.svg (renamed from editor/icons/icon_expand_bottom_dock.svg)0
-rw-r--r--editor/icons/Favorites.svg (renamed from editor/icons/icon_favorites.svg)0
-rw-r--r--editor/icons/File.svg (renamed from editor/icons/icon_file.svg)0
-rw-r--r--editor/icons/FileBigThumb.svg (renamed from editor/icons/icon_file_big_thumb.svg)0
-rw-r--r--editor/icons/FileBroken.svg (renamed from editor/icons/icon_file_broken.svg)0
-rw-r--r--editor/icons/FileBrokenBigThumb.svg (renamed from editor/icons/icon_file_broken_big_thumb.svg)0
-rw-r--r--editor/icons/FileDead.svg (renamed from editor/icons/icon_file_dead.svg)0
-rw-r--r--editor/icons/FileDeadBigThumb.svg (renamed from editor/icons/icon_file_dead_big_thumb.svg)0
-rw-r--r--editor/icons/FileDeadMediumThumb.svg (renamed from editor/icons/icon_file_dead_medium_thumb.svg)0
-rw-r--r--editor/icons/FileDialog.svg (renamed from editor/icons/icon_file_dialog.svg)0
-rw-r--r--editor/icons/FileList.svg (renamed from editor/icons/icon_file_list.svg)0
-rw-r--r--editor/icons/FileMediumThumb.svg (renamed from editor/icons/icon_file_medium_thumb.svg)0
-rw-r--r--editor/icons/FileThumbnail.svg (renamed from editor/icons/icon_file_thumbnail.svg)0
-rw-r--r--editor/icons/Filesystem.svg (renamed from editor/icons/icon_filesystem.svg)0
-rw-r--r--editor/icons/FixedMaterial.svg (renamed from editor/icons/icon_fixed_material.svg)0
-rw-r--r--editor/icons/FixedSpatialMaterial.svg (renamed from editor/icons/icon_fixed_spatial_material.svg)0
-rw-r--r--editor/icons/Folder.svg (renamed from editor/icons/icon_folder.svg)0
-rw-r--r--editor/icons/FolderBigThumb.svg (renamed from editor/icons/icon_folder_big_thumb.svg)0
-rw-r--r--editor/icons/FolderMediumThumb.svg (renamed from editor/icons/icon_folder_medium_thumb.svg)0
-rw-r--r--editor/icons/Font.svg (renamed from editor/icons/icon_font.svg)0
-rw-r--r--editor/icons/Forward.svg (renamed from editor/icons/icon_forward.svg)0
-rw-r--r--editor/icons/GIProbe.svg (renamed from editor/icons/icon_g_i_probe.svg)0
-rw-r--r--editor/icons/GIProbeData.svg (renamed from editor/icons/icon_g_i_probe_data.svg)0
-rw-r--r--editor/icons/Generic6DOFJoint.svg (renamed from editor/icons/icon_generic_6_d_o_f_joint.svg)0
-rw-r--r--editor/icons/GizmoBakedLightmap.svg (renamed from editor/icons/icon_gizmo_baked_lightmap.svg)0
-rw-r--r--editor/icons/GizmoCPUParticles.svg (renamed from editor/icons/icon_gizmo_c_p_u_particles.svg)0
-rw-r--r--editor/icons/GizmoCamera.svg (renamed from editor/icons/icon_gizmo_camera.svg)0
-rw-r--r--editor/icons/GizmoDirectionalLight.svg (renamed from editor/icons/icon_gizmo_directional_light.svg)0
-rw-r--r--editor/icons/GizmoGIProbe.svg (renamed from editor/icons/icon_gizmo_g_i_probe.svg)0
-rw-r--r--editor/icons/GizmoLight.svg (renamed from editor/icons/icon_gizmo_light.svg)0
-rw-r--r--editor/icons/GizmoListener.svg (renamed from editor/icons/icon_gizmo_listener.svg)0
-rw-r--r--editor/icons/GizmoParticles.svg (renamed from editor/icons/icon_gizmo_particles.svg)0
-rw-r--r--editor/icons/GizmoReflectionProbe.svg (renamed from editor/icons/icon_gizmo_reflection_probe.svg)0
-rw-r--r--editor/icons/GizmoSpatialSamplePlayer.svg (renamed from editor/icons/icon_gizmo_spatial_sample_player.svg)0
-rw-r--r--editor/icons/GizmoSpotLight.svg (renamed from editor/icons/icon_gizmo_spot_light.svg)0
-rw-r--r--editor/icons/Godot.svg (renamed from editor/icons/icon_godot.svg)0
-rw-r--r--editor/icons/Gradient.svg (renamed from editor/icons/icon_gradient.svg)0
-rw-r--r--editor/icons/GradientTexture.svg (renamed from editor/icons/icon_gradient_texture.svg)0
-rw-r--r--editor/icons/GraphEdit.svg (renamed from editor/icons/icon_graph_edit.svg)0
-rw-r--r--editor/icons/GraphNode.svg (renamed from editor/icons/icon_graph_node.svg)0
-rw-r--r--editor/icons/Grid.svg (renamed from editor/icons/icon_grid.svg)0
-rw-r--r--editor/icons/GridContainer.svg (renamed from editor/icons/icon_grid_container.svg)0
-rw-r--r--editor/icons/GrooveJoint2D.svg (renamed from editor/icons/icon_groove_joint_2d.svg)0
-rw-r--r--editor/icons/Group.svg (renamed from editor/icons/icon_group.svg)0
-rw-r--r--editor/icons/GroupViewport.svg (renamed from editor/icons/icon_group_viewport.svg)0
-rw-r--r--editor/icons/Groups.svg (renamed from editor/icons/icon_groups.svg)0
-rw-r--r--editor/icons/GuiChecked.svg (renamed from editor/icons/icon_GUI_checked.svg)0
-rw-r--r--editor/icons/GuiClose.svg (renamed from editor/icons/icon_gui_close.svg)0
-rw-r--r--editor/icons/GuiCloseCustomizable.svg (renamed from editor/icons/icon_gui_close_customizable.svg)0
-rw-r--r--editor/icons/GuiDropdown.svg (renamed from editor/icons/icon_GUI_dropdown.svg)0
-rw-r--r--editor/icons/GuiEllipsis.svg (renamed from editor/icons/icon_GUI_ellipsis.svg)0
-rw-r--r--editor/icons/GuiGraphNodePort.svg (renamed from editor/icons/icon_gui_graph_node_port.svg)0
-rw-r--r--editor/icons/GuiHTick.svg (renamed from editor/icons/icon_GUI_h_tick.svg)0
-rw-r--r--editor/icons/GuiHsplitter.svg (renamed from editor/icons/icon_GUI_hsplitter.svg)0
-rw-r--r--editor/icons/GuiMiniCheckerboard.svg (renamed from editor/icons/icon_GUI_mini_checkerboard.svg)0
-rw-r--r--editor/icons/GuiOptionArrow.svg (renamed from editor/icons/icon_GUI_option_arrow.svg)0
-rw-r--r--editor/icons/GuiProgressBar.svg (renamed from editor/icons/icon_GUI_progress_bar.svg)0
-rw-r--r--editor/icons/GuiProgressFill.svg (renamed from editor/icons/icon_GUI_progress_fill.svg)0
-rw-r--r--editor/icons/GuiRadioChecked.svg (renamed from editor/icons/icon_GUI_radio_checked.svg)0
-rw-r--r--editor/icons/GuiRadioUnchecked.svg (renamed from editor/icons/icon_GUI_radio_unchecked.svg)0
-rw-r--r--editor/icons/GuiResizer.svg (renamed from editor/icons/icon_gui_resizer.svg)0
-rw-r--r--editor/icons/GuiScrollArrowLeft.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left.svg)0
-rw-r--r--editor/icons/GuiScrollArrowLeftHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left_hl.svg)0
-rw-r--r--editor/icons/GuiScrollArrowRight.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right.svg)0
-rw-r--r--editor/icons/GuiScrollArrowRightHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right_hl.svg)0
-rw-r--r--editor/icons/GuiScrollBg.svg (renamed from editor/icons/icon_GUI_scroll_bg.svg)0
-rw-r--r--editor/icons/GuiScrollGrabber.svg (renamed from editor/icons/icon_GUI_scroll_grabber.svg)0
-rw-r--r--editor/icons/GuiScrollGrabberHl.svg (renamed from editor/icons/icon_GUI_scroll_grabber_hl.svg)0
-rw-r--r--editor/icons/GuiScrollGrabberPressed.svg (renamed from editor/icons/icon_GUI_scroll_grabber_pressed.svg)0
-rw-r--r--editor/icons/GuiSliderGrabber.svg (renamed from editor/icons/icon_GUI_slider_grabber.svg)0
-rw-r--r--editor/icons/GuiSliderGrabberHl.svg (renamed from editor/icons/icon_GUI_slider_grabber_hl.svg)0
-rw-r--r--editor/icons/GuiSpace.svg (renamed from editor/icons/icon_GUI_space.svg)0
-rw-r--r--editor/icons/GuiSpinboxUpdown.svg (renamed from editor/icons/icon_GUI_spinbox_updown.svg)0
-rw-r--r--editor/icons/GuiTab.svg (renamed from editor/icons/icon_GUI_tab.svg)0
-rw-r--r--editor/icons/GuiTabMenu.svg (renamed from editor/icons/icon_GUI_tab_menu.svg)0
-rw-r--r--editor/icons/GuiTabMenuHl.svg (renamed from editor/icons/icon_GUI_tab_menu_hl.svg)0
-rw-r--r--editor/icons/GuiToggleOff.svg (renamed from editor/icons/icon_GUI_toggle_off.svg)0
-rw-r--r--editor/icons/GuiToggleOn.svg (renamed from editor/icons/icon_GUI_toggle_on.svg)0
-rw-r--r--editor/icons/GuiTreeArrowDown.svg (renamed from editor/icons/icon_GUI_tree_arrow_down.svg)0
-rw-r--r--editor/icons/GuiTreeArrowRight.svg (renamed from editor/icons/icon_GUI_tree_arrow_right.svg)0
-rw-r--r--editor/icons/GuiTreeArrowUp.svg (renamed from editor/icons/icon_GUI_tree_arrow_up.svg)0
-rw-r--r--editor/icons/GuiTreeUpdown.svg (renamed from editor/icons/icon_GUI_tree_updown.svg)0
-rw-r--r--editor/icons/GuiUnchecked.svg (renamed from editor/icons/icon_GUI_unchecked.svg)0
-rw-r--r--editor/icons/GuiVTick.svg (renamed from editor/icons/icon_GUI_v_tick.svg)0
-rw-r--r--editor/icons/GuiViewportHdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_hdiagsplitter.svg)0
-rw-r--r--editor/icons/GuiViewportVdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vdiagsplitter.svg)0
-rw-r--r--editor/icons/GuiViewportVhsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vhsplitter.svg)0
-rw-r--r--editor/icons/GuiVisibilityHidden.svg (renamed from editor/icons/icon_GUI_visibility_hidden.svg)0
-rw-r--r--editor/icons/GuiVisibilityVisible.svg (renamed from editor/icons/icon_GUI_visibility_visible.svg)0
-rw-r--r--editor/icons/GuiVisibilityXray.svg (renamed from editor/icons/icon_GUI_visibility_xray.svg)0
-rw-r--r--editor/icons/GuiVsplitBg.svg (renamed from editor/icons/icon_GUI_vsplit_bg.svg)0
-rw-r--r--editor/icons/GuiVsplitter.svg (renamed from editor/icons/icon_GUI_vsplitter.svg)0
-rw-r--r--editor/icons/HBoxContainer.svg (renamed from editor/icons/icon_h_box_container.svg)0
-rw-r--r--editor/icons/HScrollBar.svg (renamed from editor/icons/icon_h_scroll_bar.svg)0
-rw-r--r--editor/icons/HSeparator.svg (renamed from editor/icons/icon_h_separator.svg)0
-rw-r--r--editor/icons/HSlider.svg (renamed from editor/icons/icon_h_slider.svg)0
-rw-r--r--editor/icons/HSplitContainer.svg (renamed from editor/icons/icon_h_split_container.svg)0
-rw-r--r--editor/icons/HTTPRequest.svg (renamed from editor/icons/icon_h_t_t_p_request.svg)0
-rw-r--r--editor/icons/Headphones.svg (renamed from editor/icons/icon_headphones.svg)0
-rw-r--r--editor/icons/HeightMapShape.svg (renamed from editor/icons/icon_height_map_shape.svg)0
-rw-r--r--editor/icons/Help.svg (renamed from editor/icons/icon_help.svg)0
-rw-r--r--editor/icons/HelpSearch.svg (renamed from editor/icons/icon_help_search.svg)0
-rw-r--r--editor/icons/HingeJoint.svg (renamed from editor/icons/icon_hinge_joint.svg)0
-rw-r--r--editor/icons/History.svg (renamed from editor/icons/icon_history.svg)0
-rw-r--r--editor/icons/Hsize.svg (renamed from editor/icons/icon_hsize.svg)0
-rw-r--r--editor/icons/Image.svg (renamed from editor/icons/icon_image.svg)0
-rw-r--r--editor/icons/ImageTexture.svg (renamed from editor/icons/icon_image_texture.svg)0
-rw-r--r--editor/icons/ImmediateGeometry.svg (renamed from editor/icons/icon_immediate_geometry.svg)0
-rw-r--r--editor/icons/ImportCheck.svg (renamed from editor/icons/icon_import_check.svg)0
-rw-r--r--editor/icons/ImportFail.svg (renamed from editor/icons/icon_import_fail.svg)0
-rw-r--r--editor/icons/InformationSign.svg (renamed from editor/icons/icon_information_sign.svg)0
-rw-r--r--editor/icons/InsertAfter.svg (renamed from editor/icons/icon_insert_after.svg)0
-rw-r--r--editor/icons/InsertBefore.svg (renamed from editor/icons/icon_insert_before.svg)0
-rw-r--r--editor/icons/Instance.svg (renamed from editor/icons/icon_instance.svg)0
-rw-r--r--editor/icons/InstanceOptions.svg (renamed from editor/icons/icon_instance_options.svg)0
-rw-r--r--editor/icons/InterpCubic.svg (renamed from editor/icons/icon_interp_cubic.svg)0
-rw-r--r--editor/icons/InterpLinear.svg (renamed from editor/icons/icon_interp_linear.svg)0
-rw-r--r--editor/icons/InterpRaw.svg (renamed from editor/icons/icon_interp_raw.svg)0
-rw-r--r--editor/icons/InterpWrapClamp.svg (renamed from editor/icons/icon_interp_wrap_clamp.svg)0
-rw-r--r--editor/icons/InterpWrapLoop.svg (renamed from editor/icons/icon_interp_wrap_loop.svg)0
-rw-r--r--editor/icons/InterpolatedCamera.svg (renamed from editor/icons/icon_interpolated_camera.svg)0
-rw-r--r--editor/icons/InverseKinematics.svg (renamed from editor/icons/icon_inverse_kinematics.svg)0
-rw-r--r--editor/icons/Issue.svg (renamed from editor/icons/icon_issue.svg)0
-rw-r--r--editor/icons/ItemList.svg (renamed from editor/icons/icon_item_list.svg)0
-rw-r--r--editor/icons/JoyAxis.svg (renamed from editor/icons/icon_joy_axis.svg)0
-rw-r--r--editor/icons/JoyButton.svg (renamed from editor/icons/icon_joy_button.svg)0
-rw-r--r--editor/icons/Joypad.svg (renamed from editor/icons/icon_joypad.svg)0
-rw-r--r--editor/icons/Key.svg (renamed from editor/icons/icon_key.svg)0
-rw-r--r--editor/icons/KeyAnimation.svg (renamed from editor/icons/icon_key_animation.svg)0
-rw-r--r--editor/icons/KeyAudio.svg (renamed from editor/icons/icon_key_audio.svg)0
-rw-r--r--editor/icons/KeyBezier.svg (renamed from editor/icons/icon_key_bezier.svg)0
-rw-r--r--editor/icons/KeyBezierHandle.svg (renamed from editor/icons/icon_key_bezier_handle.svg)0
-rw-r--r--editor/icons/KeyBezierPoint.svg (renamed from editor/icons/icon_key_bezier_point.svg)0
-rw-r--r--editor/icons/KeyBezierSelected.svg (renamed from editor/icons/icon_key_bezier_selected.svg)0
-rw-r--r--editor/icons/KeyCall.svg (renamed from editor/icons/icon_key_call.svg)0
-rw-r--r--editor/icons/KeyHover.svg (renamed from editor/icons/icon_key_hover.svg)0
-rw-r--r--editor/icons/KeyInvalid.svg (renamed from editor/icons/icon_key_invalid.svg)0
-rw-r--r--editor/icons/KeyNext.svg (renamed from editor/icons/icon_key_next.svg)0
-rw-r--r--editor/icons/KeyPosition.svg (renamed from editor/icons/icon_key_position.svg)0
-rw-r--r--editor/icons/KeyRotation.svg (renamed from editor/icons/icon_key_rotation.svg)0
-rw-r--r--editor/icons/KeyScale.svg (renamed from editor/icons/icon_key_scale.svg)0
-rw-r--r--editor/icons/KeySelected.svg (renamed from editor/icons/icon_key_selected.svg)0
-rw-r--r--editor/icons/KeyValue.svg (renamed from editor/icons/icon_key_value.svg)0
-rw-r--r--editor/icons/KeyXform.svg (renamed from editor/icons/icon_key_xform.svg)0
-rw-r--r--editor/icons/Keyboard.svg1
-rw-r--r--editor/icons/KeyboardPhysical.svg1
-rw-r--r--editor/icons/KinematicBody.svg (renamed from editor/icons/icon_kinematic_body.svg)0
-rw-r--r--editor/icons/KinematicBody2D.svg (renamed from editor/icons/icon_kinematic_body_2d.svg)0
-rw-r--r--editor/icons/Label.svg (renamed from editor/icons/icon_label.svg)0
-rw-r--r--editor/icons/LargeTexture.svg (renamed from editor/icons/icon_large_texture.svg)0
-rw-r--r--editor/icons/Light2D.svg (renamed from editor/icons/icon_light_2d.svg)0
-rw-r--r--editor/icons/LightOccluder2D.svg (renamed from editor/icons/icon_light_occluder_2d.svg)0
-rw-r--r--editor/icons/Line2D.svg (renamed from editor/icons/icon_line_2d.svg)0
-rw-r--r--editor/icons/LineEdit.svg (renamed from editor/icons/icon_line_edit.svg)0
-rw-r--r--editor/icons/LineShape2D.svg (renamed from editor/icons/icon_line_shape_2d.svg)0
-rw-r--r--editor/icons/LinkButton.svg (renamed from editor/icons/icon_link_button.svg)0
-rw-r--r--editor/icons/ListSelect.svg (renamed from editor/icons/icon_list_select.svg)0
-rw-r--r--editor/icons/Listener.svg (renamed from editor/icons/icon_listener.svg)0
-rw-r--r--editor/icons/Load.svg (renamed from editor/icons/icon_load.svg)0
-rw-r--r--editor/icons/Lock.svg (renamed from editor/icons/icon_lock.svg)0
-rw-r--r--editor/icons/LockViewport.svg (renamed from editor/icons/icon_lock_viewport.svg)0
-rw-r--r--editor/icons/Logo.svg (renamed from editor/icons/icon_logo.svg)0
-rw-r--r--editor/icons/Loop.svg (renamed from editor/icons/icon_loop.svg)0
-rw-r--r--editor/icons/LoopInterpolation.svg (renamed from editor/icons/icon_loop_interpolation.svg)0
-rw-r--r--editor/icons/MainPlay.svg (renamed from editor/icons/icon_main_play.svg)0
-rw-r--r--editor/icons/MarginContainer.svg (renamed from editor/icons/icon_margin_container.svg)0
-rw-r--r--editor/icons/MatchCase.svg (renamed from editor/icons/icon_match_case.svg)0
-rw-r--r--editor/icons/MaterialPreviewCube.svg (renamed from editor/icons/icon_material_preview_cube.svg)0
-rw-r--r--editor/icons/MaterialPreviewCubeOff.svg (renamed from editor/icons/icon_material_preview_cube_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight1.svg (renamed from editor/icons/icon_material_preview_light_1.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight1Off.svg (renamed from editor/icons/icon_material_preview_light_1_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight2.svg (renamed from editor/icons/icon_material_preview_light_2.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight2Off.svg (renamed from editor/icons/icon_material_preview_light_2_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewSphere.svg (renamed from editor/icons/icon_material_preview_sphere.svg)0
-rw-r--r--editor/icons/MaterialPreviewSphereOff.svg (renamed from editor/icons/icon_material_preview_sphere_off.svg)0
-rw-r--r--editor/icons/MemberConstant.svg (renamed from editor/icons/icon_member_constant.svg)0
-rw-r--r--editor/icons/MemberMethod.svg (renamed from editor/icons/icon_member_method.svg)0
-rw-r--r--editor/icons/MemberProperty.svg (renamed from editor/icons/icon_member_property.svg)0
-rw-r--r--editor/icons/MemberSignal.svg (renamed from editor/icons/icon_member_signal.svg)0
-rw-r--r--editor/icons/MemberTheme.svg (renamed from editor/icons/icon_member_theme.svg)0
-rw-r--r--editor/icons/MenuButton.svg (renamed from editor/icons/icon_menu_button.svg)0
-rw-r--r--editor/icons/Mesh.svg (renamed from editor/icons/icon_mesh.svg)0
-rw-r--r--editor/icons/MeshInstance.svg (renamed from editor/icons/icon_mesh_instance.svg)0
-rw-r--r--editor/icons/MeshInstance2D.svg (renamed from editor/icons/icon_mesh_instance_2d.svg)0
-rw-r--r--editor/icons/MeshLibrary.svg (renamed from editor/icons/icon_mesh_library.svg)0
-rw-r--r--editor/icons/MeshTexture.svg (renamed from editor/icons/icon_mesh_texture.svg)0
-rw-r--r--editor/icons/MiniObject.svg (renamed from editor/icons/icon_mini_object.svg)0
-rw-r--r--editor/icons/MirrorX.svg (renamed from editor/icons/icon_mirror_x.svg)0
-rw-r--r--editor/icons/MirrorY.svg (renamed from editor/icons/icon_mirror_y.svg)0
-rw-r--r--editor/icons/Mouse.svg (renamed from editor/icons/icon_mouse.svg)0
-rw-r--r--editor/icons/MoveDown.svg (renamed from editor/icons/icon_move_down.svg)0
-rw-r--r--editor/icons/MoveLeft.svg (renamed from editor/icons/icon_move_left.svg)0
-rw-r--r--editor/icons/MovePoint.svg (renamed from editor/icons/icon_move_point.svg)0
-rw-r--r--editor/icons/MoveRight.svg (renamed from editor/icons/icon_move_right.svg)0
-rw-r--r--editor/icons/MoveUp.svg (renamed from editor/icons/icon_move_up.svg)0
-rw-r--r--editor/icons/MultiEdit.svg (renamed from editor/icons/icon_multi_edit.svg)0
-rw-r--r--editor/icons/MultiLine.svg (renamed from editor/icons/icon_multi_line.svg)0
-rw-r--r--editor/icons/MultiMesh.svg (renamed from editor/icons/icon_multi_mesh.svg)0
-rw-r--r--editor/icons/MultiMeshInstance.svg (renamed from editor/icons/icon_multi_mesh_instance.svg)0
-rw-r--r--editor/icons/MultiMeshInstance2D.svg (renamed from editor/icons/icon_multi_mesh_instance_2d.svg)0
-rw-r--r--editor/icons/Navigation.svg (renamed from editor/icons/icon_navigation.svg)0
-rw-r--r--editor/icons/Navigation2D.svg (renamed from editor/icons/icon_navigation_2d.svg)0
-rw-r--r--editor/icons/NavigationAgent.svg1
-rw-r--r--editor/icons/NavigationAgent2D.svg1
-rw-r--r--editor/icons/NavigationMesh.svg (renamed from editor/icons/icon_navigation_mesh.svg)0
-rw-r--r--editor/icons/NavigationObstacle.svg1
-rw-r--r--editor/icons/NavigationObstacle2D.svg1
-rw-r--r--editor/icons/NavigationPolygon.svg (renamed from editor/icons/icon_navigation_polygon.svg)0
-rw-r--r--editor/icons/NavigationRegion.svg1
-rw-r--r--editor/icons/NavigationRegion2D.svg1
-rw-r--r--editor/icons/New.svg (renamed from editor/icons/icon_new.svg)0
-rw-r--r--editor/icons/NewRoot.svg (renamed from editor/icons/icon_new_root.svg)0
-rw-r--r--editor/icons/Nil.svg (renamed from editor/icons/icon_nil.svg)0
-rw-r--r--editor/icons/NinePatchRect.svg (renamed from editor/icons/icon_nine_patch_rect.svg)0
-rw-r--r--editor/icons/Node.svg (renamed from editor/icons/icon_node.svg)0
-rw-r--r--editor/icons/Node2D.svg (renamed from editor/icons/icon_node_2d.svg)0
-rw-r--r--editor/icons/NodePath.svg (renamed from editor/icons/icon_node_path.svg)0
-rw-r--r--editor/icons/NodeWarning.svg (renamed from editor/icons/icon_node_warning.svg)0
-rw-r--r--editor/icons/NonFavorite.svg (renamed from editor/icons/icon_non_favorite.svg)0
-rw-r--r--editor/icons/ORMMaterial3D.svg (renamed from editor/icons/icon_o_r_m_material_3d.svg)0
-rw-r--r--editor/icons/Object.svg (renamed from editor/icons/icon_object.svg)0
-rw-r--r--editor/icons/OccluderPolygon2D.svg (renamed from editor/icons/icon_occluder_polygon_2d.svg)0
-rw-r--r--editor/icons/OmniLight.svg (renamed from editor/icons/icon_omni_light.svg)0
-rw-r--r--editor/icons/Onion.svg (renamed from editor/icons/icon_onion.svg)0
-rw-r--r--editor/icons/OptionButton.svg (renamed from editor/icons/icon_option_button.svg)0
-rw-r--r--editor/icons/OverbrightIndicator.svg (renamed from editor/icons/icon_overbright_indicator.svg)0
-rw-r--r--editor/icons/Override.svg (renamed from editor/icons/icon_override.svg)0
-rw-r--r--editor/icons/PackedByteArray.svg (renamed from editor/icons/icon_pool_byte_array.svg)0
-rw-r--r--editor/icons/PackedColorArray.svg (renamed from editor/icons/icon_pool_color_array.svg)0
-rw-r--r--editor/icons/PackedDataContainer.svg (renamed from editor/icons/icon_packed_data_container.svg)0
-rw-r--r--editor/icons/PackedFloat32Array.svg (renamed from editor/icons/icon_pool_real_array.svg)0
-rw-r--r--editor/icons/PackedFloat64Array.svg1
-rw-r--r--editor/icons/PackedInt32Array.svg (renamed from editor/icons/icon_pool_int_array.svg)0
-rw-r--r--editor/icons/PackedInt64Array.svg1
-rw-r--r--editor/icons/PackedScene.svg (renamed from editor/icons/icon_packed_scene.svg)0
-rw-r--r--editor/icons/PackedStringArray.svg (renamed from editor/icons/icon_pool_string_array.svg)0
-rw-r--r--editor/icons/PackedVector2Array.svg (renamed from editor/icons/icon_pool_vector2_array.svg)0
-rw-r--r--editor/icons/PackedVector3Array.svg (renamed from editor/icons/icon_pool_vector3_array.svg)0
-rw-r--r--editor/icons/PaintVertex.svg (renamed from editor/icons/icon_paint_vertex.svg)0
-rw-r--r--editor/icons/Panel.svg (renamed from editor/icons/icon_panel.svg)0
-rw-r--r--editor/icons/PanelContainer.svg (renamed from editor/icons/icon_panel_container.svg)0
-rw-r--r--editor/icons/Panels1.svg (renamed from editor/icons/icon_panels_1.svg)0
-rw-r--r--editor/icons/Panels2.svg (renamed from editor/icons/icon_panels_2.svg)0
-rw-r--r--editor/icons/Panels2Alt.svg (renamed from editor/icons/icon_panels_2_alt.svg)0
-rw-r--r--editor/icons/Panels3.svg (renamed from editor/icons/icon_panels_3.svg)0
-rw-r--r--editor/icons/Panels3Alt.svg (renamed from editor/icons/icon_panels_3_alt.svg)0
-rw-r--r--editor/icons/Panels4.svg (renamed from editor/icons/icon_panels_4.svg)0
-rw-r--r--editor/icons/PanoramaSky.svg (renamed from editor/icons/icon_panorama_sky.svg)0
-rw-r--r--editor/icons/ParallaxBackground.svg (renamed from editor/icons/icon_parallax_background.svg)0
-rw-r--r--editor/icons/ParallaxLayer.svg (renamed from editor/icons/icon_parallax_layer.svg)0
-rw-r--r--editor/icons/Particles.svg (renamed from editor/icons/icon_particles.svg)0
-rw-r--r--editor/icons/Particles2D.svg (renamed from editor/icons/icon_particles_2d.svg)0
-rw-r--r--editor/icons/ParticlesMaterial.svg (renamed from editor/icons/icon_particles_material.svg)0
-rw-r--r--editor/icons/Path.svg (renamed from editor/icons/icon_path.svg)0
-rw-r--r--editor/icons/Path2D.svg (renamed from editor/icons/icon_path_2d.svg)0
-rw-r--r--editor/icons/PathFollow.svg (renamed from editor/icons/icon_path_follow.svg)0
-rw-r--r--editor/icons/PathFollow2D.svg (renamed from editor/icons/icon_path_follow_2d.svg)0
-rw-r--r--editor/icons/Pause.svg (renamed from editor/icons/icon_pause.svg)0
-rw-r--r--editor/icons/PhysicalBone.svg (renamed from editor/icons/icon_physical_bone.svg)0
-rw-r--r--editor/icons/Pin.svg (renamed from editor/icons/icon_pin.svg)0
-rw-r--r--editor/icons/PinJoint.svg (renamed from editor/icons/icon_pin_joint.svg)0
-rw-r--r--editor/icons/PinJoint2D.svg (renamed from editor/icons/icon_pin_joint_2d.svg)0
-rw-r--r--editor/icons/PinPressed.svg (renamed from editor/icons/icon_pin_pressed.svg)0
-rw-r--r--editor/icons/Plane.svg (renamed from editor/icons/icon_plane.svg)0
-rw-r--r--editor/icons/PlaneMesh.svg1
-rw-r--r--editor/icons/PlaneShape.svg (renamed from editor/icons/icon_plane_shape.svg)0
-rw-r--r--editor/icons/Play.svg (renamed from editor/icons/icon_play.svg)0
-rw-r--r--editor/icons/PlayBackwards.svg (renamed from editor/icons/icon_play_backwards.svg)0
-rw-r--r--editor/icons/PlayCustom.svg (renamed from editor/icons/icon_play_custom.svg)0
-rw-r--r--editor/icons/PlayOverlay.svg (renamed from editor/icons/icon_play_overlay.svg)0
-rw-r--r--editor/icons/PlayScene.svg (renamed from editor/icons/icon_play_scene.svg)0
-rw-r--r--editor/icons/PlayStart.svg (renamed from editor/icons/icon_play_start.svg)0
-rw-r--r--editor/icons/PlayStartBackwards.svg (renamed from editor/icons/icon_play_start_backwards.svg)0
-rw-r--r--editor/icons/PlayTravel.svg (renamed from editor/icons/icon_play_travel.svg)0
-rw-r--r--editor/icons/PluginScript.svg (renamed from editor/icons/icon_plugin_script.svg)0
-rw-r--r--editor/icons/PointMesh.svg (renamed from editor/icons/icon_point_mesh.svg)0
-rw-r--r--editor/icons/Polygon2D.svg1
-rw-r--r--editor/icons/PolygonPathFinder.svg (renamed from editor/icons/icon_polygon_path_finder.svg)0
-rw-r--r--editor/icons/Popup.svg (renamed from editor/icons/icon_popup.svg)0
-rw-r--r--editor/icons/PopupDialog.svg (renamed from editor/icons/icon_popup_dialog.svg)0
-rw-r--r--editor/icons/PopupMenu.svg (renamed from editor/icons/icon_popup_menu.svg)0
-rw-r--r--editor/icons/PopupPanel.svg (renamed from editor/icons/icon_popup_panel.svg)0
-rw-r--r--editor/icons/Portal.svg (renamed from editor/icons/icon_portal.svg)0
-rw-r--r--editor/icons/Position2D.svg (renamed from editor/icons/icon_position_2d.svg)0
-rw-r--r--editor/icons/Position3D.svg (renamed from editor/icons/icon_position_3d.svg)0
-rw-r--r--editor/icons/PrismMesh.svg (renamed from editor/icons/icon_prism_mesh.svg)0
-rw-r--r--editor/icons/ProceduralSky.svg (renamed from editor/icons/icon_procedural_sky.svg)0
-rw-r--r--editor/icons/Progress1.svg (renamed from editor/icons/icon_progress_1.svg)0
-rw-r--r--editor/icons/Progress2.svg (renamed from editor/icons/icon_progress_2.svg)0
-rw-r--r--editor/icons/Progress3.svg (renamed from editor/icons/icon_progress_3.svg)0
-rw-r--r--editor/icons/Progress4.svg (renamed from editor/icons/icon_progress_4.svg)0
-rw-r--r--editor/icons/Progress5.svg (renamed from editor/icons/icon_progress_5.svg)0
-rw-r--r--editor/icons/Progress6.svg (renamed from editor/icons/icon_progress_6.svg)0
-rw-r--r--editor/icons/Progress7.svg (renamed from editor/icons/icon_progress_7.svg)0
-rw-r--r--editor/icons/Progress8.svg (renamed from editor/icons/icon_progress_8.svg)0
-rw-r--r--editor/icons/ProgressBar.svg (renamed from editor/icons/icon_progress_bar.svg)0
-rw-r--r--editor/icons/ProjectIconLoading.svg (renamed from editor/icons/icon_project_icon_loading.svg)0
-rw-r--r--editor/icons/ProximityGroup.svg (renamed from editor/icons/icon_proximity_group.svg)0
-rw-r--r--editor/icons/ProxyTexture.svg (renamed from editor/icons/icon_proxy_texture.svg)0
-rw-r--r--editor/icons/Quad.svg (renamed from editor/icons/icon_quad.svg)0
-rw-r--r--editor/icons/QuadMesh.svg (renamed from editor/icons/icon_quad_mesh.svg)0
-rw-r--r--editor/icons/Quat.svg (renamed from editor/icons/icon_quat.svg)0
-rw-r--r--editor/icons/RID.svg (renamed from editor/icons/icon_r_i_d.svg)0
-rw-r--r--editor/icons/RayCast.svg (renamed from editor/icons/icon_ray_cast.svg)0
-rw-r--r--editor/icons/RayCast2D.svg (renamed from editor/icons/icon_ray_cast_2d.svg)0
-rw-r--r--editor/icons/RayShape.svg (renamed from editor/icons/icon_ray_shape.svg)0
-rw-r--r--editor/icons/RayShape2D.svg (renamed from editor/icons/icon_ray_shape_2d.svg)0
-rw-r--r--editor/icons/Rayito.svg (renamed from editor/icons/icon_rayito.svg)0
-rw-r--r--editor/icons/Rect2.svg (renamed from editor/icons/icon_rect2.svg)0
-rw-r--r--editor/icons/Rect2i.svg4
-rw-r--r--editor/icons/RectangleShape2D.svg (renamed from editor/icons/icon_rectangle_shape_2d.svg)0
-rw-r--r--editor/icons/ReferenceRect.svg (renamed from editor/icons/icon_reference_rect.svg)0
-rw-r--r--editor/icons/ReflectionProbe.svg (renamed from editor/icons/icon_reflection_probe.svg)0
-rw-r--r--editor/icons/RegionEdit.svg (renamed from editor/icons/icon_region_edit.svg)0
-rw-r--r--editor/icons/Reload.svg (renamed from editor/icons/icon_reload.svg)0
-rw-r--r--editor/icons/ReloadSmall.svg (renamed from editor/icons/icon_reload_small.svg)0
-rw-r--r--editor/icons/RemoteTransform.svg (renamed from editor/icons/icon_remote_transform.svg)0
-rw-r--r--editor/icons/RemoteTransform2D.svg (renamed from editor/icons/icon_remote_transform_2d.svg)0
-rw-r--r--editor/icons/Remove.svg (renamed from editor/icons/icon_remove.svg)0
-rw-r--r--editor/icons/RemoveInternal.svg (renamed from editor/icons/icon_remove_internal.svg)0
-rw-r--r--editor/icons/Rename.svg (renamed from editor/icons/icon_rename.svg)0
-rw-r--r--editor/icons/Reparent.svg (renamed from editor/icons/icon_reparent.svg)0
-rw-r--r--editor/icons/ReparentToNewNode.svg (renamed from editor/icons/icon_reparent_to_new_node.svg)0
-rw-r--r--editor/icons/ResourcePreloader.svg (renamed from editor/icons/icon_resource_preloader.svg)0
-rw-r--r--editor/icons/RichTextEffect.svg (renamed from editor/icons/icon_rich_text_effect.svg)0
-rw-r--r--editor/icons/RichTextLabel.svg (renamed from editor/icons/icon_rich_text_label.svg)0
-rw-r--r--editor/icons/RigidBody.svg (renamed from editor/icons/icon_rigid_body.svg)0
-rw-r--r--editor/icons/RigidBody2D.svg (renamed from editor/icons/icon_rigid_body_2d.svg)0
-rw-r--r--editor/icons/Room.svg (renamed from editor/icons/icon_room.svg)0
-rw-r--r--editor/icons/RoomBounds.svg (renamed from editor/icons/icon_room_bounds.svg)0
-rw-r--r--editor/icons/Rotate0.svg (renamed from editor/icons/icon_rotate_0.svg)0
-rw-r--r--editor/icons/Rotate180.svg (renamed from editor/icons/icon_rotate_180.svg)0
-rw-r--r--editor/icons/Rotate270.svg (renamed from editor/icons/icon_rotate_270.svg)0
-rw-r--r--editor/icons/Rotate90.svg (renamed from editor/icons/icon_rotate_90.svg)0
-rw-r--r--editor/icons/RotateLeft.svg (renamed from editor/icons/icon_rotate_left.svg)0
-rw-r--r--editor/icons/RotateRight.svg (renamed from editor/icons/icon_rotate_right.svg)0
-rw-r--r--editor/icons/Ruler.svg (renamed from editor/icons/icon_ruler.svg)0
-rw-r--r--editor/icons/SampleLibrary.svg (renamed from editor/icons/icon_sample_library.svg)0
-rw-r--r--editor/icons/Save.svg (renamed from editor/icons/icon_save.svg)0
-rw-r--r--editor/icons/Script.svg (renamed from editor/icons/icon_script.svg)0
-rw-r--r--editor/icons/ScriptCreate.svg (renamed from editor/icons/icon_script_create.svg)0
-rw-r--r--editor/icons/ScriptCreateDialog.svg (renamed from editor/icons/icon_script_create_dialog.svg)0
-rw-r--r--editor/icons/ScriptExtend.svg (renamed from editor/icons/icon_script_extend.svg)0
-rw-r--r--editor/icons/ScriptRemove.svg (renamed from editor/icons/icon_script_remove.svg)0
-rw-r--r--editor/icons/ScrollContainer.svg (renamed from editor/icons/icon_scroll_container.svg)0
-rw-r--r--editor/icons/Search.svg (renamed from editor/icons/icon_search.svg)0
-rw-r--r--editor/icons/SegmentShape2D.svg (renamed from editor/icons/icon_segment_shape_2d.svg)0
-rw-r--r--editor/icons/Shader.svg (renamed from editor/icons/icon_shader.svg)0
-rw-r--r--editor/icons/ShaderMaterial.svg (renamed from editor/icons/icon_shader_material.svg)0
-rw-r--r--editor/icons/ShortCut.svg (renamed from editor/icons/icon_short_cut.svg)0
-rw-r--r--editor/icons/Signal.svg (renamed from editor/icons/icon_signal.svg)0
-rw-r--r--editor/icons/Signals.svg (renamed from editor/icons/icon_signals.svg)0
-rw-r--r--editor/icons/SignalsAndGroups.svg (renamed from editor/icons/icon_signals_and_groups.svg)0
-rw-r--r--editor/icons/Skeleton.svg (renamed from editor/icons/icon_skeleton.svg)0
-rw-r--r--editor/icons/Skeleton2D.svg (renamed from editor/icons/icon_skeleton_2d.svg)0
-rw-r--r--editor/icons/SkeletonIK.svg (renamed from editor/icons/icon_skeleton_i_k.svg)0
-rw-r--r--editor/icons/SliderJoint.svg (renamed from editor/icons/icon_slider_joint.svg)0
-rw-r--r--editor/icons/Slot.svg (renamed from editor/icons/icon_slot.svg)0
-rw-r--r--editor/icons/Snap.svg (renamed from editor/icons/icon_snap.svg)0
-rw-r--r--editor/icons/SnapGrid.svg (renamed from editor/icons/icon_snap_grid.svg)0
-rw-r--r--editor/icons/SoftBody.svg (renamed from editor/icons/icon_soft_body.svg)0
-rw-r--r--editor/icons/Sort.svg (renamed from editor/icons/icon_sort.svg)0
-rw-r--r--editor/icons/Spatial.svg (renamed from editor/icons/icon_spatial.svg)0
-rw-r--r--editor/icons/SpatialMaterial.svg (renamed from editor/icons/icon_spatial_material.svg)0
-rw-r--r--editor/icons/SphereMesh.svg (renamed from editor/icons/icon_sphere_mesh.svg)0
-rw-r--r--editor/icons/SphereShape.svg (renamed from editor/icons/icon_sphere_shape.svg)0
-rw-r--r--editor/icons/SpinBox.svg (renamed from editor/icons/icon_spin_box.svg)0
-rw-r--r--editor/icons/SpotLight.svg (renamed from editor/icons/icon_spot_light.svg)0
-rw-r--r--editor/icons/SpringArm.svg (renamed from editor/icons/icon_spring_arm.svg)0
-rw-r--r--editor/icons/Sprite.svg (renamed from editor/icons/icon_sprite.svg)0
-rw-r--r--editor/icons/Sprite3D.svg (renamed from editor/icons/icon_sprite_3d.svg)0
-rw-r--r--editor/icons/SpriteFrames.svg (renamed from editor/icons/icon_sprite_frames.svg)0
-rw-r--r--editor/icons/SpriteSheet.svg (renamed from editor/icons/icon_sprite_sheet.svg)0
-rw-r--r--editor/icons/StandardMaterial3D.svg (renamed from editor/icons/icon_standard_material_3d.svg)0
-rw-r--r--editor/icons/StaticBody.svg (renamed from editor/icons/icon_static_body.svg)0
-rw-r--r--editor/icons/StaticBody2D.svg (renamed from editor/icons/icon_static_body_2d.svg)0
-rw-r--r--editor/icons/StatusError.svg (renamed from editor/icons/icon_status_error.svg)0
-rw-r--r--editor/icons/StatusSuccess.svg (renamed from editor/icons/icon_status_success.svg)0
-rw-r--r--editor/icons/StatusWarning.svg (renamed from editor/icons/icon_status_warning.svg)0
-rw-r--r--editor/icons/Stop.svg (renamed from editor/icons/icon_stop.svg)0
-rw-r--r--editor/icons/StreamTexture.svg (renamed from editor/icons/icon_stream_texture.svg)0
-rw-r--r--editor/icons/String.svg (renamed from editor/icons/icon_string.svg)0
-rw-r--r--editor/icons/StringName.svg4
-rw-r--r--editor/icons/StyleBoxEmpty.svg (renamed from editor/icons/icon_style_box_empty.svg)0
-rw-r--r--editor/icons/StyleBoxFlat.svg (renamed from editor/icons/icon_style_box_flat.svg)0
-rw-r--r--editor/icons/StyleBoxLine.svg (renamed from editor/icons/icon_style_box_line.svg)0
-rw-r--r--editor/icons/StyleBoxTexture.svg (renamed from editor/icons/icon_style_box_texture.svg)0
-rw-r--r--editor/icons/TabContainer.svg (renamed from editor/icons/icon_tab_container.svg)0
-rw-r--r--editor/icons/Tabs.svg (renamed from editor/icons/icon_tabs.svg)0
-rw-r--r--editor/icons/TestCube.svg (renamed from editor/icons/icon_test_cube.svg)0
-rw-r--r--editor/icons/TextEdit.svg (renamed from editor/icons/icon_text_edit.svg)0
-rw-r--r--editor/icons/TextFile.svg (renamed from editor/icons/icon_text_file.svg)0
-rw-r--r--editor/icons/Texture3D.svg (renamed from editor/icons/icon_texture_3_d.svg)0
-rw-r--r--editor/icons/TextureArray.svg (renamed from editor/icons/icon_texture_array.svg)0
-rw-r--r--editor/icons/TextureButton.svg (renamed from editor/icons/icon_texture_button.svg)0
-rw-r--r--editor/icons/TextureProgress.svg (renamed from editor/icons/icon_texture_progress.svg)0
-rw-r--r--editor/icons/TextureRect.svg (renamed from editor/icons/icon_texture_rect.svg)0
-rw-r--r--editor/icons/Theme.svg (renamed from editor/icons/icon_theme.svg)0
-rw-r--r--editor/icons/ThumbnailWait.svg (renamed from editor/icons/icon_thumbnail_wait.svg)0
-rw-r--r--editor/icons/TileMap.svg (renamed from editor/icons/icon_tile_map.svg)0
-rw-r--r--editor/icons/TileSet.svg (renamed from editor/icons/icon_tile_set.svg)0
-rw-r--r--editor/icons/Time.svg (renamed from editor/icons/icon_time.svg)0
-rw-r--r--editor/icons/TimelineIndicator.svg (renamed from editor/icons/icon_timeline_indicator.svg)0
-rw-r--r--editor/icons/Timer.svg (renamed from editor/icons/icon_timer.svg)0
-rw-r--r--editor/icons/ToolAddNode.svg (renamed from editor/icons/icon_tool_add_node.svg)0
-rw-r--r--editor/icons/ToolButton.svg (renamed from editor/icons/icon_tool_button.svg)0
-rw-r--r--editor/icons/ToolConnect.svg (renamed from editor/icons/icon_tool_connect.svg)0
-rw-r--r--editor/icons/ToolMove.svg (renamed from editor/icons/icon_tool_move.svg)0
-rw-r--r--editor/icons/ToolPan.svg (renamed from editor/icons/icon_tool_pan.svg)0
-rw-r--r--editor/icons/ToolRotate.svg (renamed from editor/icons/icon_tool_rotate.svg)0
-rw-r--r--editor/icons/ToolScale.svg (renamed from editor/icons/icon_tool_scale.svg)0
-rw-r--r--editor/icons/ToolSelect.svg (renamed from editor/icons/icon_tool_select.svg)0
-rw-r--r--editor/icons/ToolTriangle.svg (renamed from editor/icons/icon_tool_triangle.svg)0
-rw-r--r--editor/icons/Tools.svg (renamed from editor/icons/icon_tools.svg)0
-rw-r--r--editor/icons/TouchScreenButton.svg (renamed from editor/icons/icon_touch_screen_button.svg)0
-rw-r--r--editor/icons/TrackAddKey.svg (renamed from editor/icons/icon_track_add_key.svg)0
-rw-r--r--editor/icons/TrackAddKeyHl.svg (renamed from editor/icons/icon_track_add_key_hl.svg)0
-rw-r--r--editor/icons/TrackCapture.svg (renamed from editor/icons/icon_track_capture.svg)0
-rw-r--r--editor/icons/TrackColor.svg (renamed from editor/icons/icon_track_color.svg)0
-rw-r--r--editor/icons/TrackContinuous.svg (renamed from editor/icons/icon_track_continuous.svg)0
-rw-r--r--editor/icons/TrackDiscrete.svg (renamed from editor/icons/icon_track_discrete.svg)0
-rw-r--r--editor/icons/TrackTrigger.svg (renamed from editor/icons/icon_track_trigger.svg)0
-rw-r--r--editor/icons/Transform.svg (renamed from editor/icons/icon_transform.svg)0
-rw-r--r--editor/icons/Transform2D.svg (renamed from editor/icons/icon_transform_2_D.svg)0
-rw-r--r--editor/icons/TransitionEnd.svg (renamed from editor/icons/icon_transition_end.svg)0
-rw-r--r--editor/icons/TransitionEndAuto.svg (renamed from editor/icons/icon_transition_end_auto.svg)0
-rw-r--r--editor/icons/TransitionEndAutoBig.svg (renamed from editor/icons/icon_transition_end_auto_big.svg)0
-rw-r--r--editor/icons/TransitionEndBig.svg (renamed from editor/icons/icon_transition_end_big.svg)0
-rw-r--r--editor/icons/TransitionImmediate.svg (renamed from editor/icons/icon_transition_immediate.svg)0
-rw-r--r--editor/icons/TransitionImmediateAuto.svg (renamed from editor/icons/icon_transition_immediate_auto.svg)0
-rw-r--r--editor/icons/TransitionImmediateAutoBig.svg (renamed from editor/icons/icon_transition_immediate_auto_big.svg)0
-rw-r--r--editor/icons/TransitionImmediateBig.svg (renamed from editor/icons/icon_transition_immediate_big.svg)0
-rw-r--r--editor/icons/TransitionSync.svg (renamed from editor/icons/icon_transition_sync.svg)0
-rw-r--r--editor/icons/TransitionSyncAuto.svg (renamed from editor/icons/icon_transition_sync_auto.svg)0
-rw-r--r--editor/icons/TransitionSyncAutoBig.svg (renamed from editor/icons/icon_transition_sync_auto_big.svg)0
-rw-r--r--editor/icons/TransitionSyncBig.svg (renamed from editor/icons/icon_transition_sync_big.svg)0
-rw-r--r--editor/icons/Translation.svg (renamed from editor/icons/icon_translation.svg)0
-rw-r--r--editor/icons/Transpose.svg (renamed from editor/icons/icon_transpose.svg)0
-rw-r--r--editor/icons/Tree.svg (renamed from editor/icons/icon_tree.svg)0
-rw-r--r--editor/icons/Tween.svg (renamed from editor/icons/icon_tween.svg)0
-rw-r--r--editor/icons/Unbone.svg (renamed from editor/icons/icon_unbone.svg)0
-rw-r--r--editor/icons/Ungroup.svg (renamed from editor/icons/icon_ungroup.svg)0
-rw-r--r--editor/icons/Unlock.svg (renamed from editor/icons/icon_unlock.svg)0
-rw-r--r--editor/icons/UnpaintVertex.svg (renamed from editor/icons/icon_unpaint_vertex.svg)0
-rw-r--r--editor/icons/Uv.svg (renamed from editor/icons/icon_uv.svg)0
-rw-r--r--editor/icons/VBoxContainer.svg (renamed from editor/icons/icon_v_box_container.svg)0
-rw-r--r--editor/icons/VScrollBar.svg (renamed from editor/icons/icon_v_scroll_bar.svg)0
-rw-r--r--editor/icons/VSeparator.svg (renamed from editor/icons/icon_v_separator.svg)0
-rw-r--r--editor/icons/VSlider.svg (renamed from editor/icons/icon_v_slider.svg)0
-rw-r--r--editor/icons/VSplitContainer.svg (renamed from editor/icons/icon_v_split_container.svg)0
-rw-r--r--editor/icons/Variant.svg (renamed from editor/icons/icon_variant.svg)0
-rw-r--r--editor/icons/Vector2.svg (renamed from editor/icons/icon_vector2.svg)0
-rw-r--r--editor/icons/Vector2i.svg5
-rw-r--r--editor/icons/Vector3.svg (renamed from editor/icons/icon_vector3.svg)0
-rw-r--r--editor/icons/Vector3i.svg5
-rw-r--r--editor/icons/VehicleBody.svg (renamed from editor/icons/icon_vehicle_body.svg)0
-rw-r--r--editor/icons/VehicleWheel.svg (renamed from editor/icons/icon_vehicle_wheel.svg)0
-rw-r--r--editor/icons/VideoPlayer.svg (renamed from editor/icons/icon_video_player.svg)0
-rw-r--r--editor/icons/Viewport.svg (renamed from editor/icons/icon_viewport.svg)0
-rw-r--r--editor/icons/ViewportContainer.svg (renamed from editor/icons/icon_viewport_container.svg)0
-rw-r--r--editor/icons/ViewportSpeed.svg (renamed from editor/icons/icon_viewport_speed.svg)0
-rw-r--r--editor/icons/ViewportTexture.svg (renamed from editor/icons/icon_viewport_texture.svg)0
-rw-r--r--editor/icons/ViewportZoom.svg (renamed from editor/icons/icon_viewport_zoom.svg)0
-rw-r--r--editor/icons/VisibilityEnabler.svg (renamed from editor/icons/icon_visibility_enabler.svg)0
-rw-r--r--editor/icons/VisibilityEnabler2D.svg (renamed from editor/icons/icon_visibility_enabler_2d.svg)0
-rw-r--r--editor/icons/VisibilityNotifier.svg (renamed from editor/icons/icon_visibility_notifier.svg)0
-rw-r--r--editor/icons/VisibilityNotifier2D.svg (renamed from editor/icons/icon_visibility_notifier_2d.svg)0
-rw-r--r--editor/icons/VisualShader.svg (renamed from editor/icons/icon_visual_shader.svg)0
-rw-r--r--editor/icons/VisualShaderPort.svg (renamed from editor/icons/icon_visual_shader_port.svg)0
-rw-r--r--editor/icons/Warning.svg (renamed from editor/icons/icon_warning.svg)0
-rw-r--r--editor/icons/WindowDialog.svg (renamed from editor/icons/icon_window_dialog.svg)0
-rw-r--r--editor/icons/World.svg (renamed from editor/icons/icon_world.svg)0
-rw-r--r--editor/icons/World2D.svg (renamed from editor/icons/icon_world_2d.svg)0
-rw-r--r--editor/icons/WorldEnvironment.svg (renamed from editor/icons/icon_world_environment.svg)0
-rw-r--r--editor/icons/WorldMarginShape.svg1
-rw-r--r--editor/icons/X509Certificate.svg (renamed from editor/icons/icon_x509_certificate.svg)0
-rw-r--r--editor/icons/YSort.svg (renamed from editor/icons/icon_y_sort.svg)0
-rw-r--r--editor/icons/Zoom.svg (renamed from editor/icons/icon_zoom.svg)0
-rw-r--r--editor/icons/ZoomLess.svg (renamed from editor/icons/icon_zoom_less.svg)0
-rw-r--r--editor/icons/ZoomMore.svg (renamed from editor/icons/icon_zoom_more.svg)0
-rw-r--r--editor/icons/ZoomReset.svg (renamed from editor/icons/icon_zoom_reset.svg)0
-rw-r--r--editor/icons/bool.svg (renamed from editor/icons/icon_bool.svg)0
-rw-r--r--editor/icons/editor_icons_builders.py10
-rw-r--r--editor/icons/float.svg (renamed from editor/icons/icon_float.svg)0
-rw-r--r--editor/icons/icon_gizmo_spatial_stream_player.svg1
-rw-r--r--editor/icons/icon_keyboard.svg1
-rw-r--r--editor/icons/icon_navigation_mesh_instance.svg1
-rw-r--r--editor/icons/icon_navigation_polygon_instance.svg1
-rw-r--r--editor/icons/icon_plane_mesh.svg1
-rw-r--r--editor/icons/icon_polygon_2_d.svg1
-rw-r--r--editor/icons/int.svg (renamed from editor/icons/icon_int.svg)0
-rw-r--r--editor/import/editor_import_plugin.cpp2
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp101
-rw-r--r--editor/import/editor_scene_importer_gltf.h13
-rw-r--r--editor/import/resource_importer_bitmask.cpp3
-rw-r--r--editor/import/resource_importer_layered_texture.cpp12
-rw-r--r--editor/import/resource_importer_scene.cpp26
-rw-r--r--editor/import/resource_importer_scene.h3
-rw-r--r--editor/import/resource_importer_texture.cpp131
-rw-r--r--editor/import/resource_importer_texture.h2
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp26
-rw-r--r--editor/import/resource_importer_wav.cpp16
-rw-r--r--editor/import/resource_importer_wav.h6
-rw-r--r--editor/import_dock.cpp24
-rw-r--r--editor/inspector_dock.cpp49
-rw-r--r--editor/inspector_dock.h6
-rw-r--r--editor/node_dock.cpp7
-rw-r--r--editor/plugin_config_dialog.cpp11
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp32
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp49
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp72
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp63
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp93
-rw-r--r--editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp50
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp5
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp139
-rw-r--r--editor/plugins/asset_library_editor_plugin.h10
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp22
-rw-r--r--editor/plugins/camera_editor_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp180
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp12
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp26
-rw-r--r--editor/plugins/cpu_particles_editor_plugin.cpp15
-rw-r--r--editor/plugins/cpu_particles_editor_plugin.h1
-rw-r--r--editor/plugins/curve_editor_plugin.cpp21
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp (renamed from drivers/unix/mutex_posix.cpp)54
-rw-r--r--editor/plugins/debugger_editor_plugin.h (renamed from drivers/windows/mutex_windows.h)39
-rw-r--r--editor/plugins/editor_preview_plugins.cpp31
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp30
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp7
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp13
-rw-r--r--editor/plugins/material_editor_plugin.cpp10
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp5
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp26
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp16
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp25
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h2
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp33
-rw-r--r--editor/plugins/particles_editor_plugin.cpp75
-rw-r--r--editor/plugins/particles_editor_plugin.h6
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp23
-rw-r--r--editor/plugins/path_editor_plugin.cpp24
-rw-r--r--editor/plugins/physical_bone_plugin.cpp3
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp110
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h10
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp15
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp12
-rw-r--r--editor/plugins/script_editor_plugin.cpp305
-rw-r--r--editor/plugins/script_editor_plugin.h20
-rw-r--r--editor/plugins/script_text_editor.cpp144
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/shader_editor_plugin.cpp41
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/skeleton_editor_plugin.cpp6
-rw-r--r--editor/plugins/skeleton_ik_editor_plugin.cpp4
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp424
-rw-r--r--editor/plugins/spatial_editor_plugin.h48
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp28
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp77
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h2
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp9
-rw-r--r--editor/plugins/text_editor.cpp34
-rw-r--r--editor/plugins/text_editor.h2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp44
-rw-r--r--editor/plugins/theme_editor_plugin.cpp19
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp123
-rw-r--r--editor/plugins/tile_map_editor_plugin.h8
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp116
-rw-r--r--editor/plugins/tile_set_editor_plugin.h6
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp30
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp668
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h33
-rw-r--r--editor/progress_dialog.cpp3
-rw-r--r--editor/project_export.cpp99
-rw-r--r--editor/project_manager.cpp144
-rw-r--r--editor/project_manager.h4
-rw-r--r--editor/project_settings_editor.cpp191
-rw-r--r--editor/project_settings_editor.h4
-rw-r--r--editor/property_editor.cpp104
-rw-r--r--editor/property_selector.cpp43
-rw-r--r--editor/property_selector.h10
-rw-r--r--editor/quick_open.cpp18
-rw-r--r--editor/rename_dialog.cpp64
-rw-r--r--editor/reparent_dialog.cpp7
-rw-r--r--editor/run_settings_dialog.cpp3
-rw-r--r--editor/scene_tree_dock.cpp169
-rw-r--r--editor/scene_tree_editor.cpp87
-rw-r--r--editor/script_create_dialog.cpp39
-rw-r--r--editor/script_editor_debugger.cpp2697
-rw-r--r--editor/settings_config_dialog.cpp49
-rw-r--r--editor/spatial_editor_gizmos.cpp90
-rw-r--r--editor/translations/af.po26
-rw-r--r--editor/translations/ar.po26
-rw-r--r--editor/translations/bg.po415
-rw-r--r--editor/translations/bn.po27
-rw-r--r--editor/translations/ca.po25
-rw-r--r--editor/translations/cs.po217
-rw-r--r--editor/translations/da.po25
-rw-r--r--editor/translations/de.po110
-rw-r--r--editor/translations/de_CH.po41
-rw-r--r--editor/translations/editor.pot23
-rw-r--r--editor/translations/el.po103
-rw-r--r--editor/translations/eo.po26
-rw-r--r--editor/translations/es.po256
-rw-r--r--editor/translations/es_AR.po107
-rw-r--r--editor/translations/et.po23
-rw-r--r--editor/translations/eu.po23
-rw-r--r--editor/translations/fa.po59
-rw-r--r--editor/translations/fi.po103
-rw-r--r--editor/translations/fil.po23
-rw-r--r--editor/translations/fr.po112
-rw-r--r--editor/translations/ga.po26
-rw-r--r--editor/translations/he.po35
-rw-r--r--editor/translations/hi.po23
-rw-r--r--editor/translations/hr.po26
-rw-r--r--editor/translations/hu.po26
-rw-r--r--editor/translations/id.po130
-rw-r--r--editor/translations/is.po23
-rw-r--r--editor/translations/it.po113
-rw-r--r--editor/translations/ja.po317
-rw-r--r--editor/translations/ka.po23
-rw-r--r--editor/translations/ko.po100
-rw-r--r--editor/translations/lt.po26
-rw-r--r--editor/translations/lv.po26
-rw-r--r--editor/translations/mi.po23
-rw-r--r--editor/translations/ml.po23
-rw-r--r--editor/translations/mr.po23
-rw-r--r--editor/translations/ms.po23
-rw-r--r--editor/translations/nb.po25
-rw-r--r--editor/translations/nl.po132
-rw-r--r--editor/translations/or.po23
-rw-r--r--editor/translations/pl.po106
-rw-r--r--editor/translations/pr.po26
-rw-r--r--editor/translations/pt_BR.po146
-rw-r--r--editor/translations/pt_PT.po572
-rw-r--r--editor/translations/ro.po26
-rw-r--r--editor/translations/ru.po84
-rw-r--r--editor/translations/si.po23
-rw-r--r--editor/translations/sk.po27
-rw-r--r--editor/translations/sl.po26
-rw-r--r--editor/translations/sq.po26
-rw-r--r--editor/translations/sr_Cyrl.po26
-rw-r--r--editor/translations/sr_Latn.po23
-rw-r--r--editor/translations/sv.po25
-rw-r--r--editor/translations/ta.po23
-rw-r--r--editor/translations/te.po23
-rw-r--r--editor/translations/th.po26
-rw-r--r--editor/translations/tr.po26
-rw-r--r--editor/translations/uk.po95
-rw-r--r--editor/translations/ur_PK.po26
-rw-r--r--editor/translations/vi.po26
-rw-r--r--editor/translations/zh_CN.po100
-rw-r--r--editor/translations/zh_HK.po29
-rw-r--r--editor/translations/zh_TW.po41
-rw-r--r--main/input_default.cpp10
-rw-r--r--main/input_default.h2
-rw-r--r--main/main.cpp16
-rw-r--r--main/performance.cpp8
-rw-r--r--main/performance.h2
-rw-r--r--main/tests/test_astar.cpp6
-rw-r--r--main/tests/test_gdscript.cpp2
-rw-r--r--main/tests/test_math.cpp18
-rw-r--r--main/tests/test_physics.cpp14
-rw-r--r--main/tests/test_physics_2d.cpp10
-rw-r--r--main/tests/test_render.cpp2
-rw-r--r--main/tests/test_string.cpp2
-rw-r--r--methods.py31
-rwxr-xr-xmisc/dist/osx_template.app/Contents/Info.plist6
-rwxr-xr-xmisc/dist/osx_tools.app/Contents/Info.plist4
-rw-r--r--misc/dist/shell/godot.fish91
-rwxr-xr-xmisc/travis/clang-format.sh14
-rw-r--r--modules/arkit/arkit_interface.h2
-rw-r--r--modules/arkit/arkit_interface.mm4
-rw-r--r--modules/assimp/SCsub170
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp38
-rw-r--r--modules/assimp/import_utils.h14
-rw-r--r--modules/basis_universal/register_types.cpp39
-rw-r--r--modules/basis_universal/texture_basisu.cpp20
-rw-r--r--modules/basis_universal/texture_basisu.h6
-rw-r--r--modules/bmp/image_loader_bmp.cpp38
-rw-r--r--modules/bullet/area_bullet.cpp2
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
-rw-r--r--modules/bullet/shape_bullet.cpp34
-rw-r--r--modules/bullet/shape_bullet.h12
-rw-r--r--modules/bullet/soft_body_bullet.cpp14
-rw-r--r--modules/bullet/soft_body_bullet.h2
-rw-r--r--modules/bullet/space_bullet.cpp3
-rw-r--r--modules/camera/camera_ios.mm6
-rw-r--r--modules/camera/camera_osx.mm10
-rw-r--r--modules/csg/csg.cpp2129
-rw-r--r--modules/csg/csg.h160
-rw-r--r--modules/csg/csg_gizmos.cpp4
-rw-r--r--modules/csg/csg_shape.cpp231
-rw-r--r--modules/csg/csg_shape.h22
-rw-r--r--modules/csg/doc_classes/CSGPolygon.xml2
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp25
-rw-r--r--modules/dds/texture_loader_dds.cpp16
-rw-r--r--modules/dds/texture_loader_dds.h2
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml25
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp50
-rw-r--r--modules/enet/networked_multiplayer_enet.h12
-rw-r--r--modules/etc/image_etc.cpp14
-rw-r--r--modules/etc/texture_loader_pkm.cpp9
-rw-r--r--modules/etc/texture_loader_pkm.h2
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.h4
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml4
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml2
-rw-r--r--modules/gdnative/doc_classes/NativeScript.xml6
-rw-r--r--modules/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative.h2
-rw-r--r--modules/gdnative/gdnative/array.cpp29
-rw-r--r--modules/gdnative/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative/pool_arrays.cpp822
-rw-r--r--modules/gdnative/gdnative/string.cpp30
-rw-r--r--modules/gdnative/gdnative/variant.cpp86
-rw-r--r--modules/gdnative/gdnative_api.json1042
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp24
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.h2
-rw-r--r--modules/gdnative/gdnative_library_singleton_editor.cpp6
-rw-r--r--modules/gdnative/include/gdnative/array.h14
-rw-r--r--modules/gdnative/include/gdnative/pool_arrays.h432
-rw-r--r--modules/gdnative/include/gdnative/string.h6
-rw-r--r--modules/gdnative/include/gdnative/variant.h54
-rw-r--r--modules/gdnative/include/pluginscript/godot_pluginscript.h10
-rw-r--r--modules/gdnative/include/videodecoder/godot_videodecoder.h2
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp95
-rw-r--r--modules/gdnative/nativescript/nativescript.h20
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp45
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.h4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_loader.cpp2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_loader.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp24
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h4
-rw-r--r--modules/gdnative/register_types.cpp2
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.cpp4
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.h2
-rw-r--r--modules/gdnavigation/gd_navigation_server.cpp87
-rw-r--r--modules/gdnavigation/gd_navigation_server.h14
-rw-r--r--modules/gdnavigation/nav_map.cpp146
-rw-r--r--modules/gdnavigation/nav_map.h4
-rw-r--r--modules/gdnavigation/nav_region.cpp4
-rw-r--r--modules/gdnavigation/navigation_mesh_editor_plugin.cpp13
-rw-r--r--modules/gdnavigation/navigation_mesh_editor_plugin.h6
-rw-r--r--modules/gdnavigation/navigation_mesh_generator.cpp20
-rw-r--r--modules/gdnavigation/navigation_mesh_generator.h4
-rw-r--r--modules/gdnavigation/rvo_agent.cpp2
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml24
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/gdscript.cpp236
-rw-r--r--modules/gdscript/gdscript.h15
-rw-r--r--modules/gdscript/gdscript_compiler.cpp4
-rw-r--r--modules/gdscript/gdscript_editor.cpp46
-rw-r--r--modules/gdscript/gdscript_function.cpp106
-rw-r--r--modules/gdscript/gdscript_function.h8
-rw-r--r--modules/gdscript/gdscript_functions.cpp380
-rw-r--r--modules/gdscript/gdscript_functions.h2
-rw-r--r--modules/gdscript/gdscript_parser.cpp128
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp38
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp201
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.h40
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp55
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h5
-rw-r--r--modules/glslang/SCsub6
-rw-r--r--modules/glslang/register_types.cpp8
-rw-r--r--modules/gridmap/grid_map.cpp12
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp56
-rw-r--r--modules/hdr/image_loader_hdr.cpp6
-rw-r--r--modules/jpg/image_loader_jpegd.cpp13
-rw-r--r--modules/mbedtls/crypto_mbedtls.cpp32
-rw-r--r--modules/mbedtls/crypto_mbedtls.h2
-rw-r--r--modules/mbedtls/dtls_server_mbedtls.cpp (renamed from core/pool_vector.cpp)64
-rw-r--r--modules/mbedtls/dtls_server_mbedtls.h58
-rwxr-xr-xmodules/mbedtls/packet_peer_mbed_dtls.cpp297
-rwxr-xr-xmodules/mbedtls/packet_peer_mbed_dtls.h88
-rwxr-xr-xmodules/mbedtls/register_types.cpp6
-rw-r--r--modules/mbedtls/ssl_context_mbedtls.cpp61
-rw-r--r--modules/mbedtls/ssl_context_mbedtls.h30
-rwxr-xr-xmodules/mbedtls/stream_peer_mbedtls.cpp13
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp14
-rw-r--r--modules/mono/build_scripts/make_android_mono_config.py6
-rw-r--r--modules/mono/build_scripts/mono_configure.py2
-rw-r--r--modules/mono/csharp_script.cpp117
-rw-r--r--modules/mono/csharp_script.h22
-rw-r--r--modules/mono/doc_classes/@C#.xml2
-rw-r--r--modules/mono/doc_classes/CSharpScript.xml4
-rw-r--r--modules/mono/doc_classes/GodotSharp.xml2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs7
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/BuildManager.cs23
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/BuildTab.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs109
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs28
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs4
-rw-r--r--modules/mono/editor/bindings_generator.cpp54
-rw-r--r--modules/mono/editor/editor_internal_calls.cpp14
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs4
-rw-r--r--modules/mono/glue/base_object_glue.cpp11
-rw-r--r--modules/mono/glue/gd_glue.cpp20
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp44
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp146
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h42
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp6
-rw-r--r--modules/mono/signal_awaiter_utils.cpp8
-rw-r--r--modules/mono/signal_awaiter_utils.h2
-rw-r--r--modules/mono/utils/mutex_utils.h67
-rw-r--r--modules/mono/utils/string_utils.cpp8
-rw-r--r--modules/opensimplex/noise_texture.cpp7
-rw-r--r--modules/opensimplex/open_simplex_noise.cpp14
-rw-r--r--modules/opus/audio_stream_opus.cpp2
-rw-r--r--modules/opus/audio_stream_opus.h2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp27
-rw-r--r--modules/pvr/texture_loader_pvr.h2
-rw-r--r--modules/regex/doc_classes/RegEx.xml4
-rw-r--r--modules/squish/image_compress_squish.cpp15
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp33
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp8
-rw-r--r--modules/svg/image_loader_svg.cpp27
-rw-r--r--modules/svg/image_loader_svg.h2
-rw-r--r--modules/tga/image_loader_tga.cpp42
-rw-r--r--modules/theora/video_stream_theora.cpp6
-rw-r--r--modules/theora/video_stream_theora.h4
-rw-r--r--modules/tinyexr/image_loader_tinyexr.cpp18
-rw-r--r--modules/tinyexr/image_saver_tinyexr.cpp24
-rw-r--r--modules/upnp/doc_classes/UPNP.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml90
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml6
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml6
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml6
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml4
-rw-r--r--modules/visual_script/visual_script.cpp118
-rw-r--r--modules/visual_script/visual_script.h14
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp168
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp252
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_expression.cpp18
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp26
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp50
-rw-r--r--modules/visual_script/visual_script_nodes.cpp102
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp45
-rw-r--r--modules/visual_script/visual_script_property_selector.h10
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp14
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h2
-rw-r--r--modules/webm/video_stream_webm.cpp12
-rw-r--r--modules/webm/video_stream_webm.h4
-rw-r--r--modules/webp/image_loader_webp.cpp49
-rw-r--r--modules/websocket/doc_classes/WebSocketClient.xml4
-rw-r--r--modules/websocket/doc_classes/WebSocketServer.xml2
-rw-r--r--modules/websocket/emws_peer.cpp2
-rw-r--r--modules/websocket/emws_peer.h2
-rw-r--r--modules/websocket/emws_server.cpp4
-rw-r--r--modules/websocket/emws_server.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp16
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h2
-rw-r--r--modules/websocket/wsl_peer.cpp10
-rw-r--r--modules/websocket/wsl_peer.h2
-rw-r--r--platform/android/SCsub4
-rw-r--r--platform/android/android_keys_utils.cpp (renamed from core/os/thread_safe.cpp)22
-rw-r--r--platform/android/android_keys_utils.h280
-rw-r--r--platform/android/api/api.cpp4
-rw-r--r--platform/android/api/java_class_wrapper.h26
-rw-r--r--platform/android/audio_driver_jandroid.cpp13
-rw-r--r--platform/android/audio_driver_jandroid.h2
-rw-r--r--platform/android/audio_driver_opensl.cpp18
-rw-r--r--platform/android/audio_driver_opensl.h2
-rw-r--r--platform/android/detect.py1
-rw-r--r--platform/android/dir_access_jandroid.cpp2
-rw-r--r--platform/android/dir_access_jandroid.h2
-rw-r--r--platform/android/export/export.cpp306
-rw-r--r--platform/android/java/app/AndroidManifest.xml25
-rw-r--r--platform/android/java/app/build.gradle68
-rw-r--r--platform/android/java/app/config.gradle72
-rw-r--r--platform/android/java/build.gradle97
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--platform/android/java/lib/build.gradle2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java179
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotLib.java18
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java20
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java12
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/payments/GodotPaymentInterface.java (renamed from platform/iphone/semaphore_iphone.cpp)101
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/payments/PaymentsManager.java67
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/payments/ValidateTask.java9
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java256
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java199
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt99
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/vulkan/VkSurfaceView.kt136
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/vulkan/VkThread.kt230
-rw-r--r--platform/android/java/plugins/godotpayment/build.gradle31
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/AndroidManifest.xml11
-rw-r--r--platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java (renamed from platform/android/java/lib/src/org/godotengine/godot/GodotPaymentV3.java)80
-rw-r--r--platform/android/java/settings.gradle1
-rw-r--r--platform/android/java_class_wrapper.cpp22
-rw-r--r--platform/android/java_godot_lib_jni.cpp1033
-rw-r--r--platform/android/java_godot_lib_jni.h58
-rw-r--r--platform/android/java_godot_wrapper.cpp10
-rw-r--r--platform/android/java_godot_wrapper.h2
-rw-r--r--platform/android/jni_utils.cpp434
-rw-r--r--platform/android/jni_utils.h242
-rw-r--r--platform/android/os_android.cpp36
-rw-r--r--platform/android/plugin/godot_plugin_jni.cpp115
-rw-r--r--platform/android/plugin/godot_plugin_jni.h43
-rw-r--r--platform/android/vulkan/vk_renderer_jni.cpp (renamed from drivers/unix/semaphore_posix.cpp)59
-rw-r--r--platform/android/vulkan/vk_renderer_jni.h46
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp11
-rw-r--r--platform/haiku/audio_driver_media_kit.h2
-rw-r--r--platform/haiku/haiku_direct_window.cpp8
-rw-r--r--platform/iphone/SCsub1
-rw-r--r--platform/iphone/app_delegate.h7
-rw-r--r--platform/iphone/app_delegate.mm16
-rw-r--r--platform/iphone/detect.py14
-rw-r--r--platform/iphone/export/export.cpp6
-rw-r--r--platform/iphone/game_center.mm14
-rw-r--r--platform/iphone/icloud.mm16
-rw-r--r--platform/iphone/in_app_store.mm16
-rw-r--r--platform/iphone/os_iphone.cpp27
-rw-r--r--platform/iphone/os_iphone.h9
-rw-r--r--platform/iphone/semaphore_iphone.h59
-rw-r--r--platform/iphone/vulkan_context_iphone.h (renamed from drivers/windows/semaphore_windows.h)32
-rw-r--r--platform/iphone/vulkan_context_iphone.mm (renamed from drivers/dummy/audio_driver_dummy.h)44
-rw-r--r--platform/javascript/dom_keys.inc2
-rw-r--r--platform/javascript/export/export.cpp27
-rw-r--r--platform/javascript/http_client_javascript.cpp32
-rw-r--r--platform/javascript/javascript_eval.cpp18
-rw-r--r--platform/javascript/os_javascript.cpp37
-rw-r--r--platform/osx/SCsub1
-rw-r--r--platform/osx/detect.py10
-rw-r--r--platform/osx/export/export.cpp16
-rw-r--r--platform/osx/joypad_osx.cpp20
-rw-r--r--platform/osx/joypad_osx.h3
-rw-r--r--platform/osx/os_osx.h3
-rw-r--r--platform/osx/os_osx.mm52
-rw-r--r--platform/server/SCsub1
-rw-r--r--platform/server/detect.py8
-rw-r--r--platform/server/os_server.cpp5
-rw-r--r--platform/uwp/app.cpp6
-rw-r--r--platform/uwp/os_uwp.cpp5
-rw-r--r--platform/uwp/os_uwp.h3
-rw-r--r--platform/windows/export/export.cpp4
-rw-r--r--platform/windows/key_mapping_windows.cpp164
-rw-r--r--platform/windows/key_mapping_windows.h1
-rw-r--r--[-rwxr-xr-x]platform/windows/os_windows.cpp24
-rw-r--r--platform/x11/detect.py26
-rw-r--r--platform/x11/joypad_linux.cpp28
-rw-r--r--platform/x11/joypad_linux.h2
-rw-r--r--platform/x11/key_mapping_x11.cpp134
-rw-r--r--platform/x11/key_mapping_x11.h1
-rw-r--r--platform/x11/os_x11.cpp50
-rw-r--r--scene/2d/animated_sprite.cpp12
-rw-r--r--scene/2d/area_2d.cpp48
-rw-r--r--scene/2d/audio_stream_player_2d.cpp14
-rw-r--r--scene/2d/camera_2d.cpp18
-rw-r--r--scene/2d/canvas_item.cpp66
-rw-r--r--scene/2d/canvas_item.h10
-rw-r--r--scene/2d/collision_polygon_2d.cpp9
-rw-r--r--scene/2d/collision_shape_2d.cpp7
-rw-r--r--scene/2d/cpu_particles_2d.cpp263
-rw-r--r--scene/2d/cpu_particles_2d.h26
-rw-r--r--scene/2d/joints_2d.cpp16
-rw-r--r--scene/2d/light_2d.cpp8
-rw-r--r--scene/2d/light_occluder_2d.cpp20
-rw-r--r--scene/2d/light_occluder_2d.h6
-rw-r--r--scene/2d/line_2d.cpp29
-rw-r--r--scene/2d/line_2d.h6
-rw-r--r--scene/2d/navigation_2d.cpp20
-rw-r--r--scene/2d/navigation_2d.h5
-rw-r--r--scene/2d/navigation_agent_2d.cpp12
-rw-r--r--scene/2d/navigation_polygon.cpp128
-rw-r--r--scene/2d/navigation_polygon.h28
-rw-r--r--scene/2d/node_2d.cpp8
-rw-r--r--scene/2d/particles_2d.cpp10
-rw-r--r--scene/2d/path_2d.cpp15
-rw-r--r--scene/2d/physics_body_2d.cpp53
-rw-r--r--scene/2d/polygon_2d.cpp54
-rw-r--r--scene/2d/polygon_2d.h26
-rw-r--r--scene/2d/position_2d.cpp2
-rw-r--r--scene/2d/skeleton_2d.cpp2
-rw-r--r--scene/2d/sprite.cpp9
-rw-r--r--scene/2d/tile_map.cpp27
-rw-r--r--scene/2d/tile_map.h4
-rw-r--r--scene/2d/touch_screen_button.cpp6
-rw-r--r--scene/2d/visibility_notifier_2d.cpp4
-rw-r--r--scene/3d/area.cpp48
-rw-r--r--scene/3d/arvr_nodes.cpp6
-rw-r--r--scene/3d/arvr_nodes.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp56
-rw-r--r--scene/3d/baked_lightmap.cpp34
-rw-r--r--scene/3d/baked_lightmap.h6
-rw-r--r--scene/3d/bone_attachment.cpp2
-rw-r--r--scene/3d/camera.cpp14
-rw-r--r--scene/3d/collision_polygon.cpp8
-rw-r--r--scene/3d/collision_shape.cpp15
-rw-r--r--scene/3d/cpu_particles.cpp293
-rw-r--r--scene/3d/cpu_particles.h28
-rw-r--r--scene/3d/gi_probe.cpp44
-rw-r--r--scene/3d/gi_probe.h12
-rw-r--r--scene/3d/immediate_geometry.cpp4
-rw-r--r--scene/3d/immediate_geometry.h2
-rw-r--r--scene/3d/interpolated_camera.cpp2
-rw-r--r--scene/3d/light.cpp40
-rw-r--r--scene/3d/light.h2
-rw-r--r--scene/3d/mesh_instance.cpp16
-rw-r--r--scene/3d/mesh_instance.h2
-rw-r--r--scene/3d/multimesh_instance.cpp4
-rw-r--r--scene/3d/multimesh_instance.h2
-rw-r--r--scene/3d/navigation.cpp26
-rw-r--r--scene/3d/navigation.h8
-rw-r--r--scene/3d/navigation_agent.cpp14
-rw-r--r--scene/3d/navigation_region.cpp (renamed from scene/3d/navigation_mesh_instance.cpp)44
-rw-r--r--scene/3d/navigation_region.h (renamed from scene/3d/navigation_mesh_instance.h)16
-rw-r--r--scene/3d/particles.cpp14
-rw-r--r--scene/3d/particles.h2
-rw-r--r--scene/3d/path.cpp13
-rw-r--r--scene/3d/physics_body.cpp140
-rw-r--r--scene/3d/physics_joint.cpp210
-rw-r--r--scene/3d/reflection_probe.cpp12
-rw-r--r--scene/3d/reflection_probe.h2
-rw-r--r--scene/3d/skeleton.cpp54
-rw-r--r--scene/3d/skeleton.h5
-rw-r--r--scene/3d/soft_body.cpp61
-rw-r--r--scene/3d/soft_body.h10
-rw-r--r--scene/3d/spring_arm.cpp4
-rw-r--r--scene/3d/sprite_3d.cpp36
-rw-r--r--scene/3d/sprite_3d.h4
-rw-r--r--scene/3d/vehicle_body.cpp30
-rw-r--r--scene/3d/visibility_notifier.cpp5
-rw-r--r--scene/3d/visual_instance.cpp4
-rw-r--r--scene/3d/visual_instance.h2
-rw-r--r--scene/3d/voxelizer.cpp54
-rw-r--r--scene/3d/voxelizer.h9
-rw-r--r--scene/animation/animation_blend_space_1d.cpp20
-rw-r--r--scene/animation/animation_blend_space_2d.cpp13
-rw-r--r--scene/animation/animation_blend_tree.cpp51
-rw-r--r--scene/animation/animation_cache.cpp15
-rw-r--r--scene/animation/animation_cache.h2
-rw-r--r--scene/animation/animation_node_state_machine.cpp22
-rw-r--r--scene/animation/animation_player.cpp36
-rw-r--r--scene/animation/animation_player.h6
-rw-r--r--scene/animation/animation_tree.cpp26
-rw-r--r--scene/animation/root_motion_view.cpp8
-rw-r--r--scene/animation/root_motion_view.h2
-rw-r--r--scene/animation/skeleton_ik.cpp8
-rw-r--r--scene/animation/tween.cpp389
-rw-r--r--scene/animation/tween.h40
-rw-r--r--scene/audio/audio_stream_player.cpp10
-rw-r--r--scene/debugger/scene_debugger.cpp871
-rw-r--r--scene/debugger/scene_debugger.h151
-rw-r--r--scene/debugger/script_debugger_remote.cpp1313
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/color_picker.cpp83
-rw-r--r--scene/gui/color_picker.h2
-rw-r--r--scene/gui/container.cpp13
-rw-r--r--scene/gui/control.cpp77
-rw-r--r--scene/gui/dialogs.cpp29
-rw-r--r--scene/gui/dialogs.h11
-rw-r--r--scene/gui/file_dialog.cpp81
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/gradient_edit.cpp7
-rw-r--r--scene/gui/graph_edit.cpp61
-rw-r--r--scene/gui/item_list.cpp5
-rw-r--r--scene/gui/label.cpp2
-rw-r--r--scene/gui/line_edit.cpp58
-rw-r--r--scene/gui/menu_button.cpp5
-rw-r--r--scene/gui/option_button.cpp10
-rw-r--r--scene/gui/popup_menu.cpp13
-rw-r--r--scene/gui/range.cpp14
-rw-r--r--scene/gui/rich_text_effect.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp37
-rw-r--r--scene/gui/scroll_bar.cpp22
-rw-r--r--scene/gui/scroll_container.cpp8
-rw-r--r--scene/gui/spin_box.cpp12
-rw-r--r--scene/gui/tab_container.cpp10
-rw-r--r--scene/gui/tabs.cpp3
-rw-r--r--scene/gui/text_edit.cpp219
-rw-r--r--scene/gui/text_edit.h12
-rw-r--r--scene/gui/texture_progress.cpp4
-rw-r--r--scene/gui/texture_rect.cpp5
-rw-r--r--scene/gui/tree.cpp40
-rw-r--r--scene/gui/tree.h4
-rw-r--r--scene/gui/video_player.cpp8
-rw-r--r--scene/main/canvas_layer.cpp6
-rw-r--r--scene/main/http_request.cpp52
-rw-r--r--scene/main/http_request.h6
-rw-r--r--scene/main/instance_placeholder.cpp2
-rw-r--r--scene/main/node.cpp97
-rw-r--r--scene/main/node.h8
-rw-r--r--scene/main/resource_preloader.cpp8
-rw-r--r--scene/main/resource_preloader.h2
-rw-r--r--scene/main/scene_tree.cpp451
-rw-r--r--scene/main/scene_tree.h40
-rwxr-xr-xscene/main/timer.cpp4
-rw-r--r--scene/main/viewport.cpp20
-rw-r--r--scene/main/viewport.h2
-rw-r--r--scene/register_scene_types.cpp32
-rw-r--r--scene/resources/animation.cpp103
-rw-r--r--scene/resources/animation.h8
-rw-r--r--scene/resources/audio_stream_sample.cpp20
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/bit_map.cpp12
-rw-r--r--scene/resources/capsule_shape.cpp26
-rw-r--r--scene/resources/capsule_shape_2d.cpp4
-rw-r--r--scene/resources/circle_shape_2d.cpp2
-rw-r--r--scene/resources/concave_polygon_shape.cpp14
-rw-r--r--scene/resources/concave_polygon_shape.h4
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp24
-rw-r--r--scene/resources/concave_polygon_shape_2d.h4
-rw-r--r--scene/resources/convex_polygon_shape.cpp10
-rw-r--r--scene/resources/convex_polygon_shape.h6
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/curve.cpp91
-rw-r--r--scene/resources/curve.h20
-rw-r--r--scene/resources/cylinder_shape.cpp4
-rw-r--r--scene/resources/default_theme/default_theme.cpp6
-rw-r--r--scene/resources/dynamic_font.cpp65
-rw-r--r--scene/resources/dynamic_font.h6
-rw-r--r--scene/resources/environment.cpp86
-rw-r--r--scene/resources/font.cpp28
-rw-r--r--scene/resources/font.h10
-rw-r--r--scene/resources/gradient.cpp4
-rw-r--r--scene/resources/height_map_shape.cpp18
-rw-r--r--scene/resources/height_map_shape.h6
-rw-r--r--scene/resources/line_shape_2d.cpp2
-rw-r--r--scene/resources/material.cpp97
-rw-r--r--scene/resources/material.h6
-rw-r--r--scene/resources/mesh.cpp140
-rw-r--r--scene/resources/mesh.h6
-rw-r--r--scene/resources/mesh_data_tool.cpp116
-rw-r--r--scene/resources/mesh_library.cpp6
-rw-r--r--scene/resources/mesh_library.h2
-rw-r--r--scene/resources/multimesh.cpp70
-rw-r--r--scene/resources/multimesh.h20
-rw-r--r--scene/resources/navigation_mesh.cpp52
-rw-r--r--scene/resources/navigation_mesh.h6
-rw-r--r--scene/resources/packed_scene.cpp36
-rw-r--r--scene/resources/packed_scene.h2
-rw-r--r--scene/resources/particles_material.cpp98
-rw-r--r--scene/resources/particles_material.h2
-rw-r--r--scene/resources/physics_material.cpp4
-rw-r--r--scene/resources/polygon_path_finder.cpp32
-rw-r--r--scene/resources/primitive_meshes.cpp136
-rw-r--r--scene/resources/ray_shape.cpp2
-rw-r--r--scene/resources/resource_format_text.cpp250
-rw-r--r--scene/resources/resource_format_text.h28
-rw-r--r--scene/resources/segment_shape_2d.cpp2
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader.h2
-rw-r--r--scene/resources/shape.cpp10
-rw-r--r--scene/resources/shape.h2
-rw-r--r--scene/resources/shape_2d.cpp2
-rw-r--r--scene/resources/skin.cpp30
-rw-r--r--scene/resources/skin.h12
-rw-r--r--scene/resources/sky.cpp26
-rw-r--r--scene/resources/sphere_shape.cpp2
-rw-r--r--scene/resources/style_box.cpp36
-rw-r--r--scene/resources/surface_tool.cpp120
-rw-r--r--scene/resources/text_file.cpp8
-rw-r--r--scene/resources/text_file.h2
-rw-r--r--scene/resources/texture.cpp76
-rw-r--r--scene/resources/texture.h8
-rw-r--r--scene/resources/theme.cpp72
-rw-r--r--scene/resources/theme.h14
-rw-r--r--scene/resources/tile_set.cpp2
-rw-r--r--scene/resources/visual_shader.cpp119
-rw-r--r--scene/resources/visual_shader.h10
-rw-r--r--scene/resources/visual_shader_nodes.cpp551
-rw-r--r--scene/resources/visual_shader_nodes.h202
-rw-r--r--scene/resources/world.cpp4
-rw-r--r--scene/resources/world_2d.cpp4
-rw-r--r--scene/resources/world_margin_shape.cpp (renamed from scene/resources/plane_shape.cpp)20
-rw-r--r--scene/resources/world_margin_shape.h (renamed from scene/resources/plane_shape.h)14
-rw-r--r--scene/scene_string_names.cpp11
-rw-r--r--scene/scene_string_names.h9
-rw-r--r--servers/arvr/arvr_positional_tracker.cpp3
-rw-r--r--servers/arvr_server.cpp10
-rw-r--r--servers/audio/audio_driver_dummy.cpp12
-rw-r--r--servers/audio/audio_driver_dummy.h2
-rw-r--r--servers/audio/audio_stream.cpp2
-rw-r--r--servers/audio/effects/audio_effect_amplify.cpp2
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp60
-rw-r--r--servers/audio/effects/audio_effect_compressor.cpp14
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp20
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp8
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp2
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp6
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp8
-rw-r--r--servers/audio/effects/audio_effect_panner.cpp2
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp10
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp4
-rw-r--r--servers/audio/effects/audio_effect_record.cpp16
-rw-r--r--servers/audio/effects/audio_effect_reverb.cpp16
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp4
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.cpp6
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp10
-rw-r--r--servers/audio/effects/audio_stream_generator.h2
-rw-r--r--servers/audio_server.cpp27
-rw-r--r--servers/audio_server.h4
-rw-r--r--servers/navigation_2d_server.cpp11
-rw-r--r--servers/navigation_2d_server.h3
-rw-r--r--servers/navigation_server.cpp6
-rw-r--r--servers/navigation_server.h15
-rw-r--r--servers/physics/area_sw.cpp4
-rw-r--r--servers/physics/body_sw.cpp2
-rw-r--r--servers/physics/shape_sw.cpp64
-rw-r--r--servers/physics/shape_sw.h31
-rw-r--r--servers/physics/space_sw.cpp2
-rw-r--r--servers/physics_2d/area_2d_sw.cpp4
-rw-r--r--servers/physics_2d/body_2d_sw.cpp2
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.cpp17
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h4
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp28
-rw-r--r--servers/physics_2d/space_2d_sw.cpp2
-rw-r--r--servers/physics_2d_server.cpp14
-rw-r--r--servers/physics_server.cpp10
-rw-r--r--servers/register_server_types.cpp8
-rw-r--r--servers/server_wrap_mt_common.h18
-rw-r--r--servers/visual/rasterizer.h27
-rw-r--r--servers/visual/rasterizer_rd/cubemap_coeffs.h28
-rw-r--r--servers/visual/rasterizer_rd/light_cluster_builder.cpp11
-rw-r--r--servers/visual/rasterizer_rd/light_cluster_builder.h4
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp65
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_canvas_rd.h2
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp158
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_effects_rd.h50
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_rd.cpp10
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp40
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp240
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.h21
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp237
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_storage_rd.h28
-rw-r--r--servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h1
-rw-r--r--servers/visual/rasterizer_rd/shader_compiler_rd.cpp2
-rw-r--r--servers/visual/rasterizer_rd/shader_rd.cpp12
-rw-r--r--servers/visual/rasterizer_rd/shader_rd.h9
-rw-r--r--servers/visual/rasterizer_rd/shaders/SCsub2
-rw-r--r--servers/visual/rasterizer_rd/shaders/cubemap_downsampler.glsl220
-rw-r--r--servers/visual/rasterizer_rd/shaders/cubemap_filter.glsl289
-rw-r--r--servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl73
-rw-r--r--servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl8
-rw-r--r--servers/visual/rendering_device.cpp6
-rw-r--r--servers/visual/rendering_device.h26
-rw-r--r--servers/visual/shader_language.cpp6
-rw-r--r--servers/visual/visual_server_canvas.cpp14
-rw-r--r--servers/visual/visual_server_canvas.h4
-rw-r--r--servers/visual/visual_server_raster.cpp4
-rw-r--r--servers/visual/visual_server_raster.h24
-rw-r--r--servers/visual/visual_server_scene.cpp6
-rw-r--r--servers/visual/visual_server_wrap_mt.cpp2
-rw-r--r--servers/visual/visual_server_wrap_mt.h26
-rw-r--r--servers/visual_server.cpp255
-rw-r--r--servers/visual_server.h45
-rw-r--r--thirdparty/README.md43
-rw-r--r--thirdparty/assimp/contrib/utf8cpp/doc/ReleaseNotes12
-rw-r--r--thirdparty/assimp/contrib/utf8cpp/doc/utf8cpp.html1789
-rw-r--r--thirdparty/assimp/include/assimp/config.h (renamed from thirdparty/assimp/assimp/config.h)291
-rw-r--r--thirdparty/assimp/revision.h (renamed from thirdparty/assimp/code/revision.h)0
-rw-r--r--thirdparty/enet/enet/enet.h2
-rw-r--r--thirdparty/enet/godot.cpp381
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.EXT.h1
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.KHR.h3
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.NV.h3
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/SPIRV/GlslangToSpv.cpp1681
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/SPIRV/GlslangToSpv.h2
-rw-r--r--thirdparty/glslang/SPIRV/InReadableOrder.cpp44
-rw-r--r--thirdparty/glslang/SPIRV/Logger.cpp4
-rw-r--r--thirdparty/glslang/SPIRV/Logger.h9
-rw-r--r--thirdparty/glslang/SPIRV/SPVRemapper.h2
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.cpp80
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.h40
-rw-r--r--thirdparty/glslang/SPIRV/SpvPostProcess.cpp78
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.cpp8
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.h8
-rw-r--r--thirdparty/glslang/SPIRV/disassemble.cpp43
-rw-r--r--thirdparty/glslang/SPIRV/doc.cpp117
-rw-r--r--thirdparty/glslang/SPIRV/spirv.hpp104
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/SPIRV/spvIR.h53
-rw-r--r--thirdparty/glslang/glslang/Include/BaseTypes.h68
-rw-r--r--thirdparty/glslang/glslang/Include/Common.h2
-rw-r--r--thirdparty/glslang/glslang/Include/ConstantUnion.h228
-rw-r--r--thirdparty/glslang/glslang/Include/PoolAlloc.h1
-rw-r--r--thirdparty/glslang/glslang/Include/Types.h555
-rw-r--r--thirdparty/glslang/glslang/Include/intermediate.h127
-rw-r--r--thirdparty/glslang/glslang/Include/revision.h2
-rw-r--r--thirdparty/glslang/glslang/Include/revision.template13
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Constant.cpp198
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp3415
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Initialize.h2
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp916
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp32
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp1392
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h27
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Scan.cpp608
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp128
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp44
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h13
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.cpp217
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.h24
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/attribute.cpp5
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/attribute.h44
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/gl_types.h4
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang.y1021
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp8031
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h767
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp66
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp1275
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.h242
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/limits.cpp2
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp133
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/localintermediate.h625
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/parseVersions.h119
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp17
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp0
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp23
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp2
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp6
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/reflection.cpp42
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/reflection.h20
-rw-r--r--thirdparty/glslang/glslang/OSDependent/Web/glslang.after.js26
-rw-r--r--thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp269
-rw-r--r--thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js45
-rwxr-xr-x[-rw-r--r--]thirdparty/glslang/glslang/Public/ShaderLang.h180
-rw-r--r--thirdparty/glslang/patches/fix-mingw-snprintf.patch15
-rw-r--r--thirdparty/mbedtls/include/mbedtls/config.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/version.h8
-rw-r--r--thirdparty/mbedtls/library/bignum.c5
-rw-r--r--thirdparty/mbedtls/library/cipher.c14
-rw-r--r--thirdparty/mbedtls/library/ecdsa.c4
-rw-r--r--thirdparty/mbedtls/library/entropy_poll.c29
-rw-r--r--thirdparty/mbedtls/library/pkparse.c120
-rw-r--r--thirdparty/mbedtls/library/rsa.c11
-rw-r--r--thirdparty/mbedtls/library/x509_crt.c32
-rw-r--r--thirdparty/mbedtls/library/x509write_csr.c4
-rw-r--r--thirdparty/mbedtls/patches/padlock.diff13
-rw-r--r--thirdparty/miniupnpc/miniupnpc/minissdpc.c4
-rw-r--r--thirdparty/miniupnpc/miniupnpc/portlistingparse.c7
-rw-r--r--thirdparty/miniupnpc/miniupnpc/upnpc.c4
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan.hpp42851
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_core.h1684
-rw-r--r--thirdparty/vulkan/loader/extension_manual.c19
-rw-r--r--thirdparty/vulkan/loader/extension_manual.h12
-rw-r--r--thirdparty/vulkan/loader/gpa_helper.h21
-rw-r--r--thirdparty/vulkan/loader/loader.c167
-rw-r--r--thirdparty/vulkan/loader/loader.h6
-rw-r--r--thirdparty/vulkan/loader/trampoline.c113
-rw-r--r--thirdparty/vulkan/loader/unknown_ext_chain_gas.S885
-rw-r--r--thirdparty/vulkan/loader/unknown_ext_chain_masm.asm883
-rw-r--r--thirdparty/vulkan/loader/vk_dispatch_table_helper.h45
-rw-r--r--thirdparty/vulkan/loader/vk_layer_dispatch_table.h31
-rw-r--r--thirdparty/vulkan/loader/vk_loader_extensions.c314
-rw-r--r--thirdparty/vulkan/loader/vk_loader_extensions.h13
-rw-r--r--thirdparty/vulkan/loader/vk_loader_platform.h47
-rw-r--r--thirdparty/vulkan/vk_enum_string_helper.h5912
-rw-r--r--thirdparty/vulkan/vk_mem_alloc.h25530
2032 files changed, 87127 insertions, 83404 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 05e7094981..3f6e932050 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -7,10 +7,19 @@ environment:
PYTHON: C:\Python38
SCONS_CACHE_ROOT: "%HOME%\\scons_cache"
SCONS_CACHE_LIMIT: 1024
+ OPTIONS: "debug_symbols=no verbose=yes progress=no"
+ EXTRA_ARGS: "warnings=all werror=yes"
matrix:
- - GD_PLATFORM: windows
- TOOLS: yes
- TARGET: release_debug
+ - GD_PLATFORM: windows
+ TARGET: release_debug
+ TOOLS: yes
+# Disabled for performance reasons until master is more stable.
+# - GD_PLATFORM: windows
+# TARGET: release
+# TOOLS: no
+
+matrix:
+ fast_finish: true
init:
- ps: if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $env:APPVEYOR_CACHE_SKIP_SAVE = "true" }
@@ -29,4 +38,4 @@ before_build:
- set "SCONS_CACHE=%SCONS_CACHE_ROOT%\%APPVEYOR_REPO_BRANCH%"
build_script:
- - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes
+ - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% %OPTIONS% %EXTRA_ARGS%
diff --git a/.editorconfig b/.editorconfig
index 56cc2e9c2d..f335026e1e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,6 +9,10 @@ insert_final_newline = true
[*.{cpp,hpp,c,h,mm}]
trim_trailing_whitespace = true
+[{*.gradle,AndroidManifest.xml}]
+indent_style = space
+indent_size = 4
+
[{*.{py,cs},SConstruct,SCsub}]
indent_style = space
indent_size = 4
diff --git a/.gitignore b/.gitignore
index 25a36c8e5f..cc5c822e69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,7 @@ local.properties
.gradletasknamecache
project.properties
platform/android/java/libs/*
-platform/android/java/assets
+platform/android/java/app/libs/*
# General c++ generated files
*.lib
@@ -346,3 +346,23 @@ compile_commands.json
# Cppcheck
*.cppcheck
+cppcheck-cppcheck-build-dir/
+
+# Gcov and Lcov code coverage
+*.gcno
+*.gcda
+*.gcov.html
+*.func.html
+*.func-sort-c.html
+*index-sort-f.html
+*index-sort-l.html
+*index.html
+MachineIndependent/
+godot.info
+amber.png
+emerald.png
+glass.png
+ruby.png
+snow.png
+updown.png
+gcov.css
diff --git a/.travis.yml b/.travis.yml
index 4d53e3f819..80191423c1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: cpp
# OS config, depends on actual 'os' in build matrix
-dist: xenial
+dist: bionic
stages:
- build
@@ -10,7 +10,7 @@ env:
global:
- SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
- SCONS_CACHE_LIMIT=1024
- - OPTIONS="debug_symbols=no verbose=yes progress=no builtin_libpng=yes"
+ - OPTIONS="debug_symbols=no verbose=yes progress=no"
- secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
cache:
@@ -26,29 +26,28 @@ matrix:
compiler: gcc
addons:
apt:
- sources:
- - llvm-toolchain-xenial-8
packages:
- clang-format-8
- name: Linux editor (debug, GCC 9, with Mono)
stage: build
- env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra"
+ env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
os: linux
compiler: gcc-9
addons:
apt:
sources:
- - mono
- - ubuntu-toolchain-r-test
+ - sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
+ key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc"
+ - sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- &gcc9_deps [gcc-9, g++-9]
- &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
- &linux_mono_deps [mono-devel, msbuild, nuget]
- - name: Linux export template (release, Clang)
+ - name: Linux export template (release, Clang 7)
stage: build
- env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra"
+ env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
addons:
@@ -70,13 +69,15 @@ matrix:
- name: macOS editor (debug, Clang)
stage: build
- env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra" # werror=yes
+ env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes"
os: osx
+ osx_image: xcode11.3
compiler: clang
addons:
homebrew:
packages:
- scons
+ update: true
# TODO: iOS MoltenVK support
@@ -84,6 +85,7 @@ matrix:
# stage: build
# env: PLATFORM=iphone TOOLS=no TARGET=debug CACHE_NAME=${PLATFORM}-clang
# os: osx
+# osx_image: xcode11.3
# compiler: clang
# addons:
# homebrew:
@@ -100,14 +102,14 @@ matrix:
# addons:
# apt:
# sources:
-# - ubuntu-toolchain-r-test
+# - sourceline: "ppa:ubuntu-toolchain-r/test"
# packages:
# - *gcc9_deps
# - *linux_deps
- - name: Linux export template (release_debug, GCC 5, without 3D support)
+ - name: Linux export template (release_debug, GCC 7, without 3D support)
stage: build
- env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes"
+ env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes"
os: linux
compiler: gcc
addons:
@@ -123,7 +125,7 @@ before_install:
install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- pyenv global 3.7.1 system;
+ pyenv global 3.8 system;
pip3 install --user scons;
fi
- scons --version
diff --git a/SConstruct b/SConstruct
index 2b368f7b19..4ebc33f593 100644
--- a/SConstruct
+++ b/SConstruct
@@ -136,6 +136,7 @@ opts.Add(BoolVariable('no_editor_splash', "Don't use the custom splash screen fo
opts.Add('system_certs_path', "Use this path as SSL certificates default for editor (for package maintainers)", '')
# Thirdparty libraries
+#opts.Add(BoolVariable('builtin_assimp', "Use the built-in Assimp library", True))
opts.Add(BoolVariable('builtin_bullet', "Use the built-in Bullet library", True))
opts.Add(BoolVariable('builtin_certs', "Bundle default SSL certificates to be used if you don't specify an override in the project settings", True))
opts.Add(BoolVariable('builtin_enet', "Use the built-in ENet library", True))
@@ -292,6 +293,7 @@ if selected_platform in platform_list:
if env["extra_suffix"] != '':
env.extra_suffix += '.' + env["extra_suffix"]
+ # Environment flags
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''
env.Append(CCFLAGS=str(CCFLAGS).split())
@@ -308,17 +310,66 @@ if selected_platform in platform_list:
env['LINKFLAGS'] = ''
env.Append(LINKFLAGS=str(LINKFLAGS).split())
+ # Platform specific flags
flag_list = platform_flags[selected_platform]
for f in flag_list:
if not (f[0] in ARGUMENTS): # allow command line to override platform flags
env[f[0]] = f[1]
- # must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
+ # Must happen after the flags definition, so that they can be used by platform detect
detect.configure(env)
- # Enable C++11 support
+ # Set our C and C++ standard requirements.
+ # C++17 is required as we need guaranteed copy elision as per GH-36436.
+ # Prepending to make it possible to override.
+ # This needs to come after `configure`, otherwise we don't have env.msvc.
if not env.msvc:
- env.Append(CXXFLAGS=['-std=c++11'])
+ # Specifying GNU extensions support explicitly, which are supported by
+ # both GCC and Clang. Both currently default to gnu11 and gnu++14.
+ env.Prepend(CFLAGS=['-std=gnu11'])
+ env.Prepend(CXXFLAGS=['-std=gnu++17'])
+ else:
+ # MSVC doesn't have clear C standard support, /std only covers C++.
+ # We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
+ env.Prepend(CCFLAGS=['/std:c++17'])
+
+ # Enforce our minimal compiler version requirements
+ cc_version = methods.get_compiler_version(env) or [-1, -1]
+ cc_version_major = cc_version[0]
+ cc_version_minor = cc_version[1]
+
+ if methods.using_gcc(env):
+ # GCC 8 before 8.4 has a regression in the support of guaranteed copy elision
+ # which causes a build failure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
+ if cc_version_major == 8 and cc_version_minor < 4:
+ print("Detected GCC 8 version < 8.4, which is not supported due to a "
+ "regression in its C++17 guaranteed copy elision support. Use a "
+ "newer GCC version, or Clang 6 or later by passing \"use_llvm=yes\" "
+ "to the SCons command line.")
+ sys.exit(255)
+ elif cc_version_major < 7:
+ print("Detected GCC version older than 7, which does not fully support "
+ "C++17. Supported versions are GCC 7, 9 and later. Use a newer GCC "
+ "version, or Clang 6 or later by passing \"use_llvm=yes\" to the "
+ "SCons command line.")
+ sys.exit(255)
+ elif methods.using_clang(env):
+ # Apple LLVM versions differ from upstream LLVM version \o/, compare
+ # in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
+ if env["platform"] == "osx" or env["platform"] == "iphone":
+ vanilla = methods.is_vanilla_clang(env)
+ if vanilla and cc_version_major < 6:
+ print("Detected Clang version older than 6, which does not fully support "
+ "C++17. Supported versions are Clang 6 and later.")
+ sys.exit(255)
+ elif not vanilla and cc_version_major < 10:
+ print("Detected Apple Clang version older than 10, which does not fully "
+ "support C++17. Supported versions are Apple Clang 10 and later.")
+ sys.exit(255)
+ elif cc_version_major < 6:
+ print("Detected Clang version older than 6, which does not fully support "
+ "C++17. Supported versions are Clang 6 and later.")
+ sys.exit(255)
# Configure compiler warnings
if env.msvc:
@@ -343,13 +394,10 @@ if selected_platform in platform_list:
all_plus_warnings = ['-Wwrite-strings']
if methods.using_gcc(env):
- version = methods.get_compiler_version(env)
- if version != None and version[0] >= '7':
+ if cc_version_major >= 7:
shadow_local_warning = ['-Wshadow-local']
if (env["warnings"] == 'extra'):
- # Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
- # once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter']
+ all_plus_warnings + shadow_local_warning)
env.Append(CXXFLAGS=['-Wctor-dtor-privacy', '-Wnon-virtual-dtor'])
@@ -357,10 +405,12 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['-Walloc-zero',
'-Wduplicated-branches', '-Wduplicated-cond',
'-Wstringop-overflow=4', '-Wlogical-op'])
- env.Append(CXXFLAGS=['-Wnoexcept', '-Wplacement-new=1'])
- version = methods.get_compiler_version(env)
- if version != None and version[0] >= '9':
+ # -Wnoexcept was removed temporarily due to GH-36325.
+ env.Append(CXXFLAGS=['-Wplacement-new=1'])
+ if cc_version_major >= 9:
env.Append(CCFLAGS=['-Wattribute-alias=2'])
+ if methods.using_clang(env):
+ env.Append(CCFLAGS=['-Wimplicit-fallthrough'])
elif (env["warnings"] == 'all'):
env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):
@@ -369,6 +419,11 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['-w'])
if (env["werror"]):
env.Append(CCFLAGS=['-Werror'])
+ # FIXME: Temporary workaround after the Vulkan merge, remove once warnings are fixed.
+ if methods.using_gcc(env):
+ env.Append(CXXFLAGS=['-Wno-error=cpp'])
+ else:
+ env.Append(CXXFLAGS=['-Wno-error=#warnings'])
else: # always enable those errors
env.Append(CCFLAGS=['-Werror=return-type'])
diff --git a/core/array.cpp b/core/array.cpp
index 2253d05605..7eb15ea934 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -308,9 +308,9 @@ struct _ArrayVariantSortCustom {
_FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const {
const Variant *args[2] = { &p_l, &p_r };
- Variant::CallError err;
+ Callable::CallError err;
bool res = obj->call(func, args, 2, err);
- if (err.error != Variant::CallError::CALL_OK)
+ if (err.error != Callable::CallError::CALL_OK)
res = false;
return res;
}
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index d7614c5a82..bfe07d61c5 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -64,8 +64,21 @@ static const unsigned int MONTH_DAYS_TABLE[2][12] = {
_ResourceLoader *_ResourceLoader::singleton = NULL;
-Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String &p_path, const String &p_type_hint) {
- return ResourceLoader::load_interactive(p_path, p_type_hint);
+Error _ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) {
+
+ return ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads);
+}
+_ResourceLoader::ThreadLoadStatus _ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) {
+ float progress = 0;
+ ResourceLoader::ThreadLoadStatus tls = ResourceLoader::load_threaded_get_status(p_path, &progress);
+ r_progress.resize(1);
+ r_progress[0] = progress;
+ return (ThreadLoadStatus)tls;
+}
+RES _ResourceLoader::load_threaded_get(const String &p_path) {
+ Error error;
+ RES res = ResourceLoader::load_threaded_get(p_path, &error);
+ return res;
}
RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) {
@@ -77,11 +90,11 @@ RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool
return ret;
}
-PoolVector<String> _ResourceLoader::get_recognized_extensions_for_type(const String &p_type) {
+Vector<String> _ResourceLoader::get_recognized_extensions_for_type(const String &p_type) {
List<String> exts;
ResourceLoader::get_recognized_extensions_for_type(p_type, &exts);
- PoolVector<String> ret;
+ Vector<String> ret;
for (List<String>::Element *E = exts.front(); E; E = E->next()) {
ret.push_back(E->get());
@@ -95,12 +108,12 @@ void _ResourceLoader::set_abort_on_missing_resources(bool p_abort) {
ResourceLoader::set_abort_on_missing_resources(p_abort);
}
-PoolStringArray _ResourceLoader::get_dependencies(const String &p_path) {
+PackedStringArray _ResourceLoader::get_dependencies(const String &p_path) {
List<String> deps;
ResourceLoader::get_dependencies(p_path, &deps);
- PoolStringArray ret;
+ PackedStringArray ret;
for (List<String>::Element *E = deps.front(); E; E = E->next()) {
ret.push_back(E->get());
}
@@ -120,13 +133,21 @@ bool _ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
void _ResourceLoader::_bind_methods() {
- ClassDB::bind_method(D_METHOD("load_interactive", "path", "type_hint"), &_ResourceLoader::load_interactive, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads"), &_ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &_ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &_ResourceLoader::load_threaded_get);
+
ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &_ResourceLoader::get_recognized_extensions_for_type);
ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &_ResourceLoader::set_abort_on_missing_resources);
ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
ClassDB::bind_method(D_METHOD("has_cached", "path"), &_ResourceLoader::has_cached);
ClassDB::bind_method(D_METHOD("exists", "path", "type_hint"), &_ResourceLoader::exists, DEFVAL(""));
+
+ BIND_ENUM_CONSTANT(THREAD_LOAD_INVALID_RESOURCE);
+ BIND_ENUM_CONSTANT(THREAD_LOAD_IN_PROGRESS);
+ BIND_ENUM_CONSTANT(THREAD_LOAD_FAILED);
+ BIND_ENUM_CONSTANT(THREAD_LOAD_LOADED);
}
_ResourceLoader::_ResourceLoader() {
@@ -139,12 +160,12 @@ Error _ResourceSaver::save(const String &p_path, const RES &p_resource, SaverFla
return ResourceSaver::save(p_path, p_resource, p_flags);
}
-PoolVector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource) {
+Vector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource) {
- ERR_FAIL_COND_V_MSG(p_resource.is_null(), PoolVector<String>(), "It's not a reference to a valid Resource object.");
+ ERR_FAIL_COND_V_MSG(p_resource.is_null(), Vector<String>(), "It's not a reference to a valid Resource object.");
List<String> exts;
ResourceSaver::get_recognized_extensions(p_resource, &exts);
- PoolVector<String> ret;
+ Vector<String> ret;
for (List<String>::Element *E = exts.front(); E; E = E->next()) {
ret.push_back(E->get());
@@ -249,7 +270,7 @@ String _OS::get_audio_driver_name(int p_driver) const {
return OS::get_singleton()->get_audio_driver_name(p_driver);
}
-PoolStringArray _OS::get_connected_midi_inputs() {
+PackedStringArray _OS::get_connected_midi_inputs() {
return OS::get_singleton()->get_connected_midi_inputs();
}
@@ -646,11 +667,6 @@ uint64_t _OS::get_static_memory_peak_usage() const {
return OS::get_singleton()->get_static_memory_peak_usage();
}
-uint64_t _OS::get_dynamic_memory_usage() const {
-
- return OS::get_singleton()->get_dynamic_memory_usage();
-}
-
void _OS::set_native_icon(const String &p_filename) {
OS::get_singleton()->set_native_icon(p_filename);
@@ -1118,15 +1134,17 @@ String _OS::get_system_dir(SystemDir p_dir) const {
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
}
-String _OS::get_scancode_string(uint32_t p_code) const {
+String _OS::get_keycode_string(uint32_t p_code) const {
return keycode_get_string(p_code);
}
-bool _OS::is_scancode_unicode(uint32_t p_unicode) const {
+
+bool _OS::is_keycode_unicode(uint32_t p_unicode) const {
return keycode_has_unicode(p_unicode);
}
-int _OS::find_scancode_from_string(const String &p_code) const {
+
+int _OS::find_keycode_from_string(const String &p_code) const {
return find_keycode(p_code);
}
@@ -1301,7 +1319,6 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_static_memory_usage"), &_OS::get_static_memory_usage);
ClassDB::bind_method(D_METHOD("get_static_memory_peak_usage"), &_OS::get_static_memory_peak_usage);
- ClassDB::bind_method(D_METHOD("get_dynamic_memory_usage"), &_OS::get_dynamic_memory_usage);
ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir);
ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir);
@@ -1318,9 +1335,9 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("native_video_pause"), &_OS::native_video_pause);
ClassDB::bind_method(D_METHOD("native_video_unpause"), &_OS::native_video_unpause);
- ClassDB::bind_method(D_METHOD("get_scancode_string", "code"), &_OS::get_scancode_string);
- ClassDB::bind_method(D_METHOD("is_scancode_unicode", "code"), &_OS::is_scancode_unicode);
- ClassDB::bind_method(D_METHOD("find_scancode_from_string", "string"), &_OS::find_scancode_from_string);
+ ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &_OS::get_keycode_string);
+ ClassDB::bind_method(D_METHOD("is_keycode_unicode", "code"), &_OS::is_keycode_unicode);
+ ClassDB::bind_method(D_METHOD("find_keycode_from_string", "string"), &_OS::find_keycode_from_string);
ClassDB::bind_method(D_METHOD("set_use_file_access_save_and_swap", "enabled"), &_OS::set_use_file_access_save_and_swap);
@@ -1439,16 +1456,16 @@ _Geometry *_Geometry::get_singleton() {
return singleton;
}
-PoolVector<Plane> _Geometry::build_box_planes(const Vector3 &p_extents) {
+Vector<Plane> _Geometry::build_box_planes(const Vector3 &p_extents) {
return Geometry::build_box_planes(p_extents);
}
-PoolVector<Plane> _Geometry::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) {
+Vector<Plane> _Geometry::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) {
return Geometry::build_cylinder_planes(p_radius, p_height, p_sides, p_axis);
}
-PoolVector<Plane> _Geometry::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
+Vector<Plane> _Geometry::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
return Geometry::build_capsule_planes(p_radius, p_height, p_sides, p_lats, p_axis);
}
@@ -1484,22 +1501,22 @@ Variant _Geometry::line_intersects_line_2d(const Vector2 &p_from_a, const Vector
}
}
-PoolVector<Vector2> _Geometry::get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) {
+Vector<Vector2> _Geometry::get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) {
Vector2 r1, r2;
Geometry::get_closest_points_between_segments(p1, q1, p2, q2, r1, r2);
- PoolVector<Vector2> r;
+ Vector<Vector2> r;
r.resize(2);
r.set(0, r1);
r.set(1, r2);
return r;
}
-PoolVector<Vector3> _Geometry::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) {
+Vector<Vector3> _Geometry::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) {
Vector3 r1, r2;
Geometry::get_closest_points_between_segments(p1, p2, q1, q2, r1, r2);
- PoolVector<Vector3> r;
+ Vector<Vector3> r;
r.resize(2);
r.set(0, r1);
r.set(1, r2);
@@ -1547,9 +1564,9 @@ bool _Geometry::point_is_inside_triangle(const Vector2 &s, const Vector2 &a, con
return Geometry::is_point_in_triangle(s, a, b, c);
}
-PoolVector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) {
+Vector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) {
- PoolVector<Vector3> r;
+ Vector<Vector3> r;
Vector3 res, norm;
if (!Geometry::segment_intersects_sphere(p_from, p_to, p_sphere_pos, p_sphere_radius, &res, &norm))
return r;
@@ -1559,9 +1576,9 @@ PoolVector<Vector3> _Geometry::segment_intersects_sphere(const Vector3 &p_from,
r.set(1, norm);
return r;
}
-PoolVector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) {
+Vector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) {
- PoolVector<Vector3> r;
+ Vector<Vector3> r;
Vector3 res, norm;
if (!Geometry::segment_intersects_cylinder(p_from, p_to, p_height, p_radius, &res, &norm))
return r;
@@ -1571,9 +1588,9 @@ PoolVector<Vector3> _Geometry::segment_intersects_cylinder(const Vector3 &p_from
r.set(1, norm);
return r;
}
-PoolVector<Vector3> _Geometry::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) {
+Vector<Vector3> _Geometry::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) {
- PoolVector<Vector3> r;
+ Vector<Vector3> r;
Vector3 res, norm;
if (!Geometry::segment_intersects_convex(p_from, p_to, p_planes.ptr(), p_planes.size(), &res, &norm))
return r;
@@ -1962,9 +1979,9 @@ real_t _File::get_real() const {
return f->get_real();
}
-PoolVector<uint8_t> _File::get_buffer(int p_length) const {
+Vector<uint8_t> _File::get_buffer(int p_length) const {
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
ERR_FAIL_COND_V_MSG(!f, data, "File must be opened before use.");
ERR_FAIL_COND_V_MSG(p_length < 0, data, "Length of buffer cannot be smaller than 0.");
@@ -1974,11 +1991,9 @@ PoolVector<uint8_t> _File::get_buffer(int p_length) const {
Error err = data.resize(p_length);
ERR_FAIL_COND_V_MSG(err != OK, data, "Can't resize data to " + itos(p_length) + " elements.");
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
int len = f->get_buffer(&w[0], p_length);
- ERR_FAIL_COND_V(len < 0, PoolVector<uint8_t>());
-
- w.release();
+ ERR_FAIL_COND_V(len < 0, Vector<uint8_t>());
if (len < p_length)
data.resize(p_length);
@@ -2126,7 +2141,7 @@ void _File::store_csv_line(const Vector<String> &p_values, const String &p_delim
f->store_csv_line(p_values, p_delim);
}
-void _File::store_buffer(const PoolVector<uint8_t> &p_buffer) {
+void _File::store_buffer(const Vector<uint8_t> &p_buffer) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
@@ -2134,7 +2149,7 @@ void _File::store_buffer(const PoolVector<uint8_t> &p_buffer) {
if (len == 0)
return;
- PoolVector<uint8_t>::Read r = p_buffer.read();
+ const uint8_t *r = p_buffer.ptr();
f->store_buffer(&r[0], len);
}
@@ -2151,13 +2166,12 @@ void _File::store_var(const Variant &p_var, bool p_full_objects) {
Error err = encode_variant(p_var, NULL, len, p_full_objects);
ERR_FAIL_COND_MSG(err != OK, "Error when trying to encode Variant.");
- PoolVector<uint8_t> buff;
+ Vector<uint8_t> buff;
buff.resize(len);
- PoolVector<uint8_t>::Write w = buff.write();
+ uint8_t *w = buff.ptrw();
err = encode_variant(p_var, &w[0], len, p_full_objects);
ERR_FAIL_COND_MSG(err != OK, "Error when trying to encode Variant.");
- w.release();
store_32(len);
store_buffer(buff);
@@ -2167,10 +2181,10 @@ Variant _File::get_var(bool p_allow_objects) const {
ERR_FAIL_COND_V_MSG(!f, Variant(), "File must be opened before use.");
uint32_t len = get_32();
- PoolVector<uint8_t> buff = get_buffer(len);
+ Vector<uint8_t> buff = get_buffer(len);
ERR_FAIL_COND_V((uint32_t)buff.size() != len, Variant());
- PoolVector<uint8_t>::Read r = buff.read();
+ const uint8_t *r = buff.ptr();
Variant v;
Error err = decode_variant(v, &r[0], len, NULL, p_allow_objects);
@@ -2330,10 +2344,10 @@ Error _Directory::change_dir(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
return d->change_dir(p_dir);
}
-String _Directory::get_current_dir() {
+String _Directory::get_current_dir(bool p_include_drive) {
ERR_FAIL_COND_V_MSG(!d, "", "Directory must be opened before use.");
- return d->get_current_dir();
+ return d->get_current_dir(p_include_drive);
}
Error _Directory::make_dir(String p_dir) {
@@ -2430,7 +2444,7 @@ void _Directory::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_drive", "idx"), &_Directory::get_drive);
ClassDB::bind_method(D_METHOD("get_current_drive"), &_Directory::get_current_drive);
ClassDB::bind_method(D_METHOD("change_dir", "todir"), &_Directory::change_dir);
- ClassDB::bind_method(D_METHOD("get_current_dir"), &_Directory::get_current_dir);
+ ClassDB::bind_method(D_METHOD("get_current_dir", "include_drive"), &_Directory::get_current_dir, DEFVAL(true));
ClassDB::bind_method(D_METHOD("make_dir", "path"), &_Directory::make_dir);
ClassDB::bind_method(D_METHOD("make_dir_recursive", "path"), &_Directory::make_dir_recursive);
ClassDB::bind_method(D_METHOD("file_exists", "path"), &_Directory::file_exists);
@@ -2465,9 +2479,9 @@ String _Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects)
Error err = encode_variant(p_var, NULL, len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, "", "Error when trying to encode Variant.");
- PoolVector<uint8_t> buff;
+ Vector<uint8_t> buff;
buff.resize(len);
- PoolVector<uint8_t>::Write w = buff.write();
+ uint8_t *w = buff.ptrw();
err = encode_variant(p_var, &w[0], len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, "", "Error when trying to encode Variant.");
@@ -2483,9 +2497,9 @@ Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects)
int strlen = p_str.length();
CharString cstr = p_str.ascii();
- PoolVector<uint8_t> buf;
+ Vector<uint8_t> buf;
buf.resize(strlen / 4 * 3 + 1);
- PoolVector<uint8_t>::Write w = buf.write();
+ uint8_t *w = buf.ptrw();
size_t len = 0;
ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &len, (unsigned char *)cstr.get_data(), strlen) != OK, Variant());
@@ -2497,25 +2511,25 @@ Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects)
return v;
};
-String _Marshalls::raw_to_base64(const PoolVector<uint8_t> &p_arr) {
+String _Marshalls::raw_to_base64(const Vector<uint8_t> &p_arr) {
- String ret = CryptoCore::b64_encode_str(p_arr.read().ptr(), p_arr.size());
+ String ret = CryptoCore::b64_encode_str(p_arr.ptr(), p_arr.size());
ERR_FAIL_COND_V(ret == "", ret);
return ret;
};
-PoolVector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) {
+Vector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
size_t arr_len = 0;
- PoolVector<uint8_t> buf;
+ Vector<uint8_t> buf;
{
buf.resize(strlen / 4 * 3 + 1);
- PoolVector<uint8_t>::Write w = buf.write();
+ uint8_t *w = buf.ptrw();
- ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &arr_len, (unsigned char *)cstr.get_data(), strlen) != OK, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &arr_len, (unsigned char *)cstr.get_data(), strlen) != OK, Vector<uint8_t>());
}
buf.resize(arr_len);
@@ -2535,9 +2549,9 @@ String _Marshalls::base64_to_utf8(const String &p_str) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
- PoolVector<uint8_t> buf;
+ Vector<uint8_t> buf;
buf.resize(strlen / 4 * 3 + 1 + 1);
- PoolVector<uint8_t>::Write w = buf.write();
+ uint8_t *w = buf.ptrw();
size_t len = 0;
ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &len, (unsigned char *)cstr.get_data(), strlen) != OK, String());
@@ -2562,47 +2576,43 @@ void _Marshalls::_bind_methods() {
////////////////
-Error _Semaphore::wait() {
-
- return semaphore->wait();
-}
-
-Error _Semaphore::post() {
+void _Semaphore::wait() {
- return semaphore->post();
+ semaphore.wait();
}
-void _Semaphore::_bind_methods() {
+Error _Semaphore::try_wait() {
- ClassDB::bind_method(D_METHOD("wait"), &_Semaphore::wait);
- ClassDB::bind_method(D_METHOD("post"), &_Semaphore::post);
+ return semaphore.try_wait() ? OK : ERR_BUSY;
}
-_Semaphore::_Semaphore() {
+void _Semaphore::post() {
- semaphore = SemaphoreOld::create();
+ semaphore.post();
}
-_Semaphore::~_Semaphore() {
+void _Semaphore::_bind_methods() {
- memdelete(semaphore);
+ ClassDB::bind_method(D_METHOD("wait"), &_Semaphore::wait);
+ ClassDB::bind_method(D_METHOD("try_wait"), &_Semaphore::try_wait);
+ ClassDB::bind_method(D_METHOD("post"), &_Semaphore::post);
}
///////////////
void _Mutex::lock() {
- mutex->lock();
+ mutex.lock();
}
Error _Mutex::try_lock() {
- return mutex->try_lock();
+ return mutex.try_lock();
}
void _Mutex::unlock() {
- mutex->unlock();
+ mutex.unlock();
}
void _Mutex::_bind_methods() {
@@ -2612,16 +2622,6 @@ void _Mutex::_bind_methods() {
ClassDB::bind_method(D_METHOD("unlock"), &_Mutex::unlock);
}
-_Mutex::_Mutex() {
-
- mutex = Mutex::create();
-}
-
-_Mutex::~_Mutex() {
-
- memdelete(mutex);
-}
-
///////////////
void _Thread::_start_func(void *ud) {
@@ -2629,29 +2629,29 @@ void _Thread::_start_func(void *ud) {
Ref<_Thread> *tud = (Ref<_Thread> *)ud;
Ref<_Thread> t = *tud;
memdelete(tud);
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *arg[1] = { &t->userdata };
Thread::set_name(t->target_method);
t->ret = t->target_instance->call(t->target_method, arg, 1, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String reason;
switch (ce.error) {
- case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: {
+ case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: {
reason = "Invalid Argument #" + itos(ce.argument);
} break;
- case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
reason = "Too Many Arguments";
} break;
- case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
reason = "Too Few Arguments";
} break;
- case Variant::CallError::CALL_ERROR_INVALID_METHOD: {
+ case Callable::CallError::CALL_ERROR_INVALID_METHOD: {
reason = "Method Not Found";
} break;
@@ -2746,12 +2746,12 @@ _Thread::~_Thread() {
/////////////////////////////////////
-PoolStringArray _ClassDB::get_class_list() const {
+PackedStringArray _ClassDB::get_class_list() const {
List<StringName> classes;
ClassDB::get_class_list(&classes);
- PoolStringArray ret;
+ PackedStringArray ret;
ret.resize(classes.size());
int idx = 0;
for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
@@ -2760,12 +2760,12 @@ PoolStringArray _ClassDB::get_class_list() const {
return ret;
}
-PoolStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const {
+PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const {
List<StringName> classes;
ClassDB::get_inheriters_from_class(p_class, &classes);
- PoolStringArray ret;
+ PackedStringArray ret;
ret.resize(classes.size());
int idx = 0;
for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
@@ -2883,12 +2883,12 @@ Array _ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const
return ret;
}
-PoolStringArray _ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const {
+PackedStringArray _ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const {
List<String> constants;
ClassDB::get_integer_constant_list(p_class, &constants, p_no_inheritance);
- PoolStringArray ret;
+ PackedStringArray ret;
ret.resize(constants.size());
int idx = 0;
for (List<String>::Element *E = constants.front(); E; E = E->next()) {
@@ -3110,8 +3110,8 @@ void _Engine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_hint"), "set_editor_hint", "is_editor_hint");
ADD_PROPERTY(PropertyInfo(Variant::INT, "iterations_per_second"), "set_iterations_per_second", "get_iterations_per_second");
ADD_PROPERTY(PropertyInfo(Variant::INT, "target_fps"), "set_target_fps", "get_target_fps");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_scale"), "set_time_scale", "get_time_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_scale"), "set_time_scale", "get_time_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
}
_Engine *_Engine::singleton = NULL;
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 39bed791d0..fc6419b7d8 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -49,18 +49,31 @@ protected:
static _ResourceLoader *singleton;
public:
+ enum ThreadLoadStatus {
+ THREAD_LOAD_INVALID_RESOURCE,
+ THREAD_LOAD_IN_PROGRESS,
+ THREAD_LOAD_FAILED,
+ THREAD_LOAD_LOADED
+ };
+
static _ResourceLoader *get_singleton() { return singleton; }
- Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_type_hint = "");
+
+ Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false);
+ ThreadLoadStatus load_threaded_get_status(const String &p_path, Array r_progress = Array());
+ RES load_threaded_get(const String &p_path);
+
RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false);
- PoolVector<String> get_recognized_extensions_for_type(const String &p_type);
+ Vector<String> get_recognized_extensions_for_type(const String &p_type);
void set_abort_on_missing_resources(bool p_abort);
- PoolStringArray get_dependencies(const String &p_path);
+ PackedStringArray get_dependencies(const String &p_path);
bool has_cached(const String &p_path);
bool exists(const String &p_path, const String &p_type_hint = "");
_ResourceLoader();
};
+VARIANT_ENUM_CAST(_ResourceLoader::ThreadLoadStatus);
+
class _ResourceSaver : public Object {
GDCLASS(_ResourceSaver, Object);
@@ -83,7 +96,7 @@ public:
static _ResourceSaver *get_singleton() { return singleton; }
Error save(const String &p_path, const RES &p_resource, SaverFlags p_flags);
- PoolVector<String> get_recognized_extensions(const RES &p_resource);
+ Vector<String> get_recognized_extensions(const RES &p_resource);
_ResourceSaver();
};
@@ -157,7 +170,7 @@ public:
virtual int get_audio_driver_count() const;
virtual String get_audio_driver_name(int p_driver) const;
- virtual PoolStringArray get_connected_midi_inputs();
+ virtual PackedStringArray get_connected_midi_inputs();
virtual void open_midi_inputs();
virtual void close_midi_inputs();
@@ -253,9 +266,9 @@ public:
String get_unique_id() const;
- String get_scancode_string(uint32_t p_code) const;
- bool is_scancode_unicode(uint32_t p_unicode) const;
- int find_scancode_from_string(const String &p_code) const;
+ String get_keycode_string(uint32_t p_code) const;
+ bool is_keycode_unicode(uint32_t p_unicode) const;
+ int find_keycode_from_string(const String &p_code) const;
void set_use_file_access_save_and_swap(bool p_enable);
@@ -276,7 +289,6 @@ public:
uint64_t get_static_memory_usage() const;
uint64_t get_static_memory_peak_usage() const;
- uint64_t get_dynamic_memory_usage() const;
void delay_usec(uint32_t p_usec) const;
void delay_msec(uint32_t p_msec) const;
@@ -366,13 +378,13 @@ protected:
public:
static _Geometry *get_singleton();
- PoolVector<Plane> build_box_planes(const Vector3 &p_extents);
- PoolVector<Plane> build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z);
- PoolVector<Plane> build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z);
+ Vector<Plane> build_box_planes(const Vector3 &p_extents);
+ Vector<Plane> build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z);
+ Vector<Plane> build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z);
Variant segment_intersects_segment_2d(const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b);
Variant line_intersects_line_2d(const Vector2 &p_from_a, const Vector2 &p_dir_a, const Vector2 &p_from_b, const Vector2 &p_dir_b);
- PoolVector<Vector2> get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2);
- PoolVector<Vector3> get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2);
+ Vector<Vector2> get_closest_points_between_segments_2d(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2);
+ Vector<Vector3> get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2);
Vector2 get_closest_point_to_segment_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b);
Vector3 get_closest_point_to_segment(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b);
Vector2 get_closest_point_to_segment_uncapped_2d(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b);
@@ -381,9 +393,9 @@ public:
Variant segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2);
bool point_is_inside_triangle(const Vector2 &s, const Vector2 &a, const Vector2 &b, const Vector2 &c) const;
- PoolVector<Vector3> segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius);
- PoolVector<Vector3> segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius);
- PoolVector<Vector3> segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes);
+ Vector<Vector3> segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius);
+ Vector<Vector3> segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius);
+ Vector<Vector3> segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes);
bool is_point_in_circle(const Vector2 &p_point, const Vector2 &p_circle_pos, real_t p_circle_radius);
real_t segment_intersects_circle(const Vector2 &p_from, const Vector2 &p_to, const Vector2 &p_circle_pos, real_t p_circle_radius);
int get_uv84_normal_bit(const Vector3 &p_vector);
@@ -490,7 +502,7 @@ public:
Variant get_var(bool p_allow_objects = false) const;
- PoolVector<uint8_t> get_buffer(int p_length) const; // Get an array of bytes.
+ Vector<uint8_t> get_buffer(int p_length) const; // Get an array of bytes.
String get_line() const;
Vector<String> get_csv_line(const String &p_delim = ",") const;
String get_as_text() const;
@@ -523,7 +535,7 @@ public:
virtual void store_pascal_string(const String &p_string);
virtual String get_pascal_string();
- void store_buffer(const PoolVector<uint8_t> &p_buffer); // Store an array of bytes.
+ void store_buffer(const Vector<uint8_t> &p_buffer); // Store an array of bytes.
void store_var(const Variant &p_var, bool p_full_objects = false);
@@ -560,7 +572,7 @@ public:
int get_current_drive();
Error change_dir(String p_dir); // Can be relative or absolute, return false on success.
- String get_current_dir(); // Return current dir location.
+ String get_current_dir(bool p_include_drive = true); // Return current dir location.
Error make_dir(String p_dir);
Error make_dir_recursive(String p_dir);
@@ -582,9 +594,9 @@ private:
bool _list_skip_hidden;
};
-class _Marshalls : public Reference {
+class _Marshalls : public Object {
- GDCLASS(_Marshalls, Reference);
+ GDCLASS(_Marshalls, Object);
static _Marshalls *singleton;
@@ -597,8 +609,8 @@ public:
String variant_to_base64(const Variant &p_var, bool p_full_objects = false);
Variant base64_to_variant(const String &p_str, bool p_allow_objects = false);
- String raw_to_base64(const PoolVector<uint8_t> &p_arr);
- PoolVector<uint8_t> base64_to_raw(const String &p_str);
+ String raw_to_base64(const Vector<uint8_t> &p_arr);
+ Vector<uint8_t> base64_to_raw(const String &p_str);
String utf8_to_base64(const String &p_str);
String base64_to_utf8(const String &p_str);
@@ -610,7 +622,7 @@ public:
class _Mutex : public Reference {
GDCLASS(_Mutex, Reference);
- Mutex *mutex;
+ Mutex mutex;
static void _bind_methods();
@@ -618,24 +630,19 @@ public:
void lock();
Error try_lock();
void unlock();
-
- _Mutex();
- ~_Mutex();
};
class _Semaphore : public Reference {
GDCLASS(_Semaphore, Reference);
- SemaphoreOld *semaphore;
+ Semaphore semaphore;
static void _bind_methods();
public:
- Error wait();
- Error post();
-
- _Semaphore();
- ~_Semaphore();
+ void wait();
+ Error try_wait();
+ void post();
};
class _Thread : public Reference {
@@ -680,8 +687,8 @@ protected:
static void _bind_methods();
public:
- PoolStringArray get_class_list() const;
- PoolStringArray get_inheriters_from_class(const StringName &p_class) const;
+ PackedStringArray get_class_list() const;
+ PackedStringArray get_inheriters_from_class(const StringName &p_class) const;
StringName get_parent_class(const StringName &p_class) const;
bool class_exists(const StringName &p_class) const;
bool is_parent_class(const StringName &p_class, const StringName &p_inherits) const;
@@ -700,7 +707,7 @@ public:
Array get_method_list(StringName p_class, bool p_no_inheritance = false) const;
- PoolStringArray get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const;
+ PackedStringArray get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const;
bool has_integer_constant(const StringName &p_class, const StringName &p_name) const;
int get_integer_constant(const StringName &p_class, const StringName &p_name) const;
StringName get_category(const StringName &p_node) const;
diff --git a/core/callable.cpp b/core/callable.cpp
new file mode 100644
index 0000000000..4a5ae3a248
--- /dev/null
+++ b/core/callable.cpp
@@ -0,0 +1,359 @@
+/*************************************************************************/
+/* callable.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "callable.h"
+#include "core/script_language.h"
+#include "message_queue.h"
+#include "object.h"
+#include "reference.h"
+
+void Callable::call_deferred(const Variant **p_arguments, int p_argcount) const {
+ MessageQueue::get_singleton()->push_callable(*this, p_arguments, p_argcount);
+}
+
+void Callable::call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const {
+
+ if (is_null()) {
+ r_call_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_call_error.argument = 0;
+ r_call_error.expected = 0;
+ r_return_value = Variant();
+ } else if (is_custom()) {
+ custom->call(p_arguments, p_argcount, r_return_value, r_call_error);
+ } else {
+ Object *obj = ObjectDB::get_instance(ObjectID(object));
+ r_return_value = obj->call(method, p_arguments, p_argcount, r_call_error);
+ }
+}
+
+Object *Callable::get_object() const {
+ if (is_null()) {
+ return nullptr;
+ } else if (is_custom()) {
+ return ObjectDB::get_instance(custom->get_object());
+ } else {
+ return ObjectDB::get_instance(ObjectID(object));
+ }
+}
+
+ObjectID Callable::get_object_id() const {
+ if (is_null()) {
+ return ObjectID();
+ } else if (is_custom()) {
+ return custom->get_object();
+ } else {
+ return ObjectID(object);
+ }
+}
+StringName Callable::get_method() const {
+ ERR_FAIL_COND_V_MSG(is_custom(), StringName(),
+ vformat("Can't get method on CallableCustom \"%s\".", operator String()));
+ return method;
+}
+
+uint32_t Callable::hash() const {
+ if (is_custom()) {
+ return custom->hash();
+ } else {
+ uint32_t hash = method.hash();
+ return hash_djb2_one_64(object, hash);
+ }
+}
+
+bool Callable::operator==(const Callable &p_callable) const {
+ bool custom_a = is_custom();
+ bool custom_b = p_callable.is_custom();
+
+ if (custom_a == custom_b) {
+ if (custom_a) {
+ if (custom == p_callable.custom) {
+ return true; //same pointer, dont even compare
+ }
+
+ CallableCustom::CompareEqualFunc eq_a = custom->get_compare_equal_func();
+ CallableCustom::CompareEqualFunc eq_b = p_callable.custom->get_compare_equal_func();
+ if (eq_a == eq_b) {
+ return eq_a(custom, p_callable.custom);
+ } else {
+ return false;
+ }
+ } else {
+ return object == p_callable.object && method == p_callable.method;
+ }
+ } else {
+ return false;
+ }
+}
+bool Callable::operator!=(const Callable &p_callable) const {
+ return !(*this == p_callable);
+}
+bool Callable::operator<(const Callable &p_callable) const {
+ bool custom_a = is_custom();
+ bool custom_b = p_callable.is_custom();
+
+ if (custom_a == custom_b) {
+ if (custom_a) {
+ if (custom == p_callable.custom) {
+ return false; //same pointer, dont even compare
+ }
+
+ CallableCustom::CompareLessFunc less_a = custom->get_compare_less_func();
+ CallableCustom::CompareLessFunc less_b = p_callable.custom->get_compare_less_func();
+ if (less_a == less_b) {
+ return less_a(custom, p_callable.custom);
+ } else {
+ return less_a < less_b; //it's something..
+ }
+
+ } else {
+ if (object == p_callable.object) {
+ return method < p_callable.method;
+ } else {
+ return object < p_callable.object;
+ }
+ }
+ } else {
+ return int(custom_a ? 1 : 0) < int(custom_b ? 1 : 0);
+ }
+}
+
+void Callable::operator=(const Callable &p_callable) {
+ if (is_custom()) {
+ if (p_callable.is_custom()) {
+ if (custom == p_callable.custom) {
+ return;
+ }
+ }
+
+ if (custom->ref_count.unref()) {
+ memdelete(custom);
+ }
+ }
+
+ if (p_callable.is_custom()) {
+ method = StringName();
+ if (!p_callable.custom->ref_count.ref()) {
+ object = 0;
+ } else {
+ object = 0;
+ custom = p_callable.custom;
+ }
+ } else {
+ method = p_callable.method;
+ object = p_callable.object;
+ }
+}
+
+Callable::operator String() const {
+
+ if (is_custom()) {
+ return custom->get_as_text();
+ } else {
+ if (is_null()) {
+ return "null::null";
+ }
+
+ Object *base = get_object();
+ if (base) {
+ String class_name = base->get_class();
+ Ref<Script> script = base->get_script();
+ if (script.is_valid() && script->get_path().is_resource_file()) {
+
+ class_name += "(" + script->get_path().get_file() + ")";
+ }
+ return class_name + "::" + String(method);
+ } else {
+ return "null::" + String(method);
+ }
+ }
+}
+
+Callable::Callable(const Object *p_object, const StringName &p_method) {
+ if (p_method == StringName()) {
+ object = 0;
+ ERR_FAIL_MSG("Method argument to Callable constructor must be a non-empty string");
+ }
+ if (p_object == nullptr) {
+ object = 0;
+ ERR_FAIL_MSG("Object argument to Callable constructor must be non-null");
+ }
+
+ object = p_object->get_instance_id();
+ method = p_method;
+}
+
+Callable::Callable(ObjectID p_object, const StringName &p_method) {
+ if (p_method == StringName()) {
+ object = 0;
+ ERR_FAIL_MSG("Method argument to Callable constructor must be a non-empty string");
+ }
+
+ object = p_object;
+ method = p_method;
+}
+Callable::Callable(CallableCustom *p_custom) {
+ if (p_custom->referenced) {
+ object = 0;
+ ERR_FAIL_MSG("Callable custom is already referenced");
+ }
+ p_custom->referenced = true;
+ object = 0; //ensure object is all zero, since pointer may be 32 bits
+ custom = p_custom;
+}
+Callable::Callable(const Callable &p_callable) {
+ if (p_callable.is_custom()) {
+ if (!p_callable.custom->ref_count.ref()) {
+ object = 0;
+ } else {
+ object = 0;
+ custom = p_callable.custom;
+ }
+ } else {
+ method = p_callable.method;
+ object = p_callable.object;
+ }
+}
+
+Callable::~Callable() {
+ if (is_custom()) {
+ if (custom->ref_count.unref()) {
+ memdelete(custom);
+ }
+ }
+}
+
+Callable::Callable() {
+ object = 0;
+}
+
+CallableCustom::CallableCustom() {
+ referenced = false;
+ ref_count.init();
+}
+
+//////////////////////////////////
+
+Object *Signal::get_object() const {
+ return ObjectDB::get_instance(object);
+}
+ObjectID Signal::get_object_id() const {
+ return object;
+}
+StringName Signal::get_name() const {
+ return name;
+}
+
+bool Signal::operator==(const Signal &p_signal) const {
+ return object == p_signal.object && name == p_signal.name;
+}
+
+bool Signal::operator!=(const Signal &p_signal) const {
+ return object != p_signal.object || name != p_signal.name;
+}
+
+bool Signal::operator<(const Signal &p_signal) const {
+ if (object == p_signal.object) {
+ return name < p_signal.name;
+ } else {
+ return object < p_signal.object;
+ }
+}
+
+Signal::operator String() const {
+ Object *base = get_object();
+ if (base) {
+ String class_name = base->get_class();
+ Ref<Script> script = base->get_script();
+ if (script.is_valid() && script->get_path().is_resource_file()) {
+
+ class_name += "(" + script->get_path().get_file() + ")";
+ }
+ return class_name + "::[signal]" + String(name);
+ } else {
+ return "null::[signal]" + String(name);
+ }
+}
+
+Error Signal::emit(const Variant **p_arguments, int p_argcount) const {
+ Object *obj = ObjectDB::get_instance(object);
+ if (!obj) {
+ return ERR_INVALID_DATA;
+ }
+
+ return obj->emit_signal(name, p_arguments, p_argcount);
+}
+Error Signal::connect(const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
+
+ Object *object = get_object();
+ ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED);
+
+ return object->connect(name, p_callable, p_binds, p_flags);
+}
+void Signal::disconnect(const Callable &p_callable) {
+ Object *object = get_object();
+ ERR_FAIL_COND(!object);
+ object->disconnect(name, p_callable);
+}
+bool Signal::is_connected(const Callable &p_callable) const {
+ Object *object = get_object();
+ ERR_FAIL_COND_V(!object, false);
+
+ return object->is_connected(name, p_callable);
+}
+
+Array Signal::get_connections() const {
+ Object *object = get_object();
+ if (!object) {
+ return Array();
+ }
+
+ List<Object::Connection> connections;
+ object->get_signal_connection_list(name, &connections);
+
+ Array arr;
+ for (List<Object::Connection>::Element *E = connections.front(); E; E = E->next()) {
+ arr.push_back(E->get());
+ }
+ return arr;
+}
+Signal::Signal(const Object *p_object, const StringName &p_name) {
+
+ ERR_FAIL_COND_MSG(p_object == nullptr, "Object argument to Signal constructor must be non-null");
+
+ object = p_object->get_instance_id();
+ name = p_name;
+}
+Signal::Signal(ObjectID p_object, const StringName &p_name) {
+
+ object = p_object;
+ name = p_name;
+}
+Signal::Signal() {
+}
diff --git a/core/callable.h b/core/callable.h
new file mode 100644
index 0000000000..cecf2264a3
--- /dev/null
+++ b/core/callable.h
@@ -0,0 +1,161 @@
+/*************************************************************************/
+/* callable.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 CALLABLE_H
+#define CALLABLE_H
+
+#include "core/list.h"
+#include "core/object_id.h"
+#include "core/string_name.h"
+
+class Object;
+class Variant;
+class CallableCustom;
+
+// This is an abstraction of things that can be called.
+// It is used for signals and other cases where efficient calling of functions
+// is required. It is designed for the standard case (object and method)
+// but can be optimized or customized.
+
+class Callable {
+
+ //needs to be max 16 bytes in 64 bits
+ StringName method;
+ union {
+ uint64_t object;
+ CallableCustom *custom;
+ };
+
+public:
+ struct CallError {
+ enum Error {
+ CALL_OK,
+ CALL_ERROR_INVALID_METHOD,
+ CALL_ERROR_INVALID_ARGUMENT, // expected is variant type
+ CALL_ERROR_TOO_MANY_ARGUMENTS, // expected is number of arguments
+ CALL_ERROR_TOO_FEW_ARGUMENTS, // expected is number of arguments
+ CALL_ERROR_INSTANCE_IS_NULL,
+ };
+ Error error;
+ int argument;
+ int expected;
+ };
+
+ void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;
+ void call_deferred(const Variant **p_arguments, int p_argcount) const;
+
+ _FORCE_INLINE_ bool is_null() const {
+ return method == StringName() && object == 0;
+ }
+ _FORCE_INLINE_ bool is_custom() const {
+ return method == StringName() && custom != 0;
+ }
+ _FORCE_INLINE_ bool is_standard() const {
+ return method != StringName();
+ }
+
+ Object *get_object() const;
+ ObjectID get_object_id() const;
+ StringName get_method() const;
+
+ uint32_t hash() const;
+
+ bool operator==(const Callable &p_callable) const;
+ bool operator!=(const Callable &p_callable) const;
+ bool operator<(const Callable &p_callable) const;
+
+ void operator=(const Callable &p_callable);
+
+ operator String() const;
+
+ Callable(const Object *p_object, const StringName &p_method);
+ Callable(ObjectID p_object, const StringName &p_method);
+ Callable(CallableCustom *p_custom);
+ Callable(const Callable &p_callable);
+ Callable();
+ ~Callable();
+};
+
+class CallableCustom {
+ friend class Callable;
+ SafeRefCount ref_count;
+ bool referenced;
+
+public:
+ typedef bool (*CompareEqualFunc)(const CallableCustom *p_a, const CallableCustom *p_b);
+ typedef bool (*CompareLessFunc)(const CallableCustom *p_a, const CallableCustom *p_b);
+
+ //for every type that inherits, these must always be the same for this type
+ virtual uint32_t hash() const = 0;
+ virtual String get_as_text() const = 0;
+ virtual CompareEqualFunc get_compare_equal_func() const = 0;
+ virtual CompareLessFunc get_compare_less_func() const = 0;
+ virtual ObjectID get_object() const = 0; //must always be able to provide an object
+ virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const = 0;
+
+ CallableCustom();
+ virtual ~CallableCustom() {}
+};
+
+// This is just a proxy object to object signals, its only
+// allocated on demand by/for scripting languages so it can
+// be put inside a Variant, but it is not
+// used by the engine itself.
+
+class Signal {
+ StringName name;
+ ObjectID object;
+
+public:
+ _FORCE_INLINE_ bool is_null() const {
+ return object.is_null() && name == StringName();
+ }
+ Object *get_object() const;
+ ObjectID get_object_id() const;
+ StringName get_name() const;
+
+ bool operator==(const Signal &p_signal) const;
+ bool operator!=(const Signal &p_signal) const;
+ bool operator<(const Signal &p_signal) const;
+
+ operator String() const;
+
+ Error emit(const Variant **p_arguments, int p_argcount) const;
+ Error connect(const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
+ void disconnect(const Callable &p_callable);
+ bool is_connected(const Callable &p_callable) const;
+
+ Array get_connections() const;
+ Signal(const Object *p_object, const StringName &p_name);
+ Signal(ObjectID p_object, const StringName &p_name);
+ Signal();
+};
+
+#endif // CALLABLE_H
diff --git a/drivers/windows/semaphore_windows.cpp b/core/callable_method_pointer.cpp
index 1b53e311ff..8774af6add 100644
--- a/drivers/windows/semaphore_windows.cpp
+++ b/core/callable_method_pointer.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_windows.cpp */
+/* callable_method_pointer.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,71 +28,67 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "semaphore_windows.h"
+#include "callable_method_pointer.h"
-#if defined(WINDOWS_ENABLED)
+bool CallableCustomMethodPointerBase::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) {
+ const CallableCustomMethodPointerBase *a = static_cast<const CallableCustomMethodPointerBase *>(p_a);
+ const CallableCustomMethodPointerBase *b = static_cast<const CallableCustomMethodPointerBase *>(p_b);
-#include "core/os/memory.h"
+ if (a->comp_size != b->comp_size) {
+ return false;
+ }
-Error SemaphoreWindows::wait() {
+ for (uint32_t i = 0; i < a->comp_size; i++) {
+ if (a->comp_ptr[i] != b->comp_ptr[i]) {
+ return false;
+ }
+ }
- WaitForSingleObjectEx(semaphore, INFINITE, false);
- return OK;
+ return true;
}
-Error SemaphoreWindows::post() {
- ReleaseSemaphore(semaphore, 1, NULL);
- return OK;
-}
-int SemaphoreWindows::get() const {
- long previous;
- switch (WaitForSingleObjectEx(semaphore, 0, false)) {
- case WAIT_OBJECT_0: {
- ERR_FAIL_COND_V(!ReleaseSemaphore(semaphore, 1, &previous), -1);
- return previous + 1;
- } break;
- case WAIT_TIMEOUT: {
- return 0;
- } break;
- default: {
- }
+bool CallableCustomMethodPointerBase::compare_less(const CallableCustom *p_a, const CallableCustom *p_b) {
+
+ const CallableCustomMethodPointerBase *a = static_cast<const CallableCustomMethodPointerBase *>(p_a);
+ const CallableCustomMethodPointerBase *b = static_cast<const CallableCustomMethodPointerBase *>(p_b);
+
+ if (a->comp_size != b->comp_size) {
+ return a->comp_size < b->comp_size;
}
- ERR_FAIL_V(-1);
-}
+ for (uint32_t i = 0; i < a->comp_size; i++) {
+ if (a->comp_ptr[i] == b->comp_ptr[i]) {
+ continue;
+ }
-SemaphoreOld *SemaphoreWindows::create_semaphore_windows() {
+ return a->comp_ptr[i] < b->comp_ptr[i];
+ }
- return memnew(SemaphoreWindows);
+ return false;
}
-void SemaphoreWindows::make_default() {
+CallableCustom::CompareEqualFunc CallableCustomMethodPointerBase::get_compare_equal_func() const {
+ return compare_equal;
+}
- create_func = create_semaphore_windows;
+CallableCustom::CompareLessFunc CallableCustomMethodPointerBase::get_compare_less_func() const {
+ return compare_less;
}
-SemaphoreWindows::SemaphoreWindows() {
-
-#ifdef UWP_ENABLED
- semaphore = CreateSemaphoreEx(
- NULL,
- 0,
- 0xFFFFFFF, //wathever
- NULL,
- 0,
- SEMAPHORE_ALL_ACCESS);
-#else
- semaphore = CreateSemaphore(
- NULL,
- 0,
- 0xFFFFFFF, //wathever
- NULL);
-#endif
+uint32_t CallableCustomMethodPointerBase::hash() const {
+ return h;
}
-SemaphoreWindows::~SemaphoreWindows() {
+void CallableCustomMethodPointerBase::_setup(uint32_t *p_base_ptr, uint32_t p_ptr_size) {
+ comp_ptr = p_base_ptr;
+ comp_size = p_ptr_size / 4;
- CloseHandle(semaphore);
+ // Precompute hash.
+ for (uint32_t i = 0; i < comp_size; i++) {
+ if (i == 0) {
+ h = hash_djb2_one_32(comp_ptr[i]);
+ } else {
+ h = hash_djb2_one_32(comp_ptr[i], h);
+ }
+ }
}
-
-#endif
diff --git a/core/callable_method_pointer.h b/core/callable_method_pointer.h
new file mode 100644
index 0000000000..a931a344e6
--- /dev/null
+++ b/core/callable_method_pointer.h
@@ -0,0 +1,292 @@
+/*************************************************************************/
+/* callable_method_pointer.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 CALLABLE_METHOD_POINTER_H
+#define CALLABLE_METHOD_POINTER_H
+
+#include "core/callable.h"
+#include "core/hashfuncs.h"
+#include "core/object.h"
+#include "core/simple_type.h"
+
+class CallableCustomMethodPointerBase : public CallableCustom {
+
+ uint32_t *comp_ptr;
+ uint32_t comp_size;
+ uint32_t h;
+#ifdef DEBUG_METHODS_ENABLED
+ const char *text = "";
+#endif
+ static bool compare_equal(const CallableCustom *p_a, const CallableCustom *p_b);
+ static bool compare_less(const CallableCustom *p_a, const CallableCustom *p_b);
+
+protected:
+ void _setup(uint32_t *p_base_ptr, uint32_t p_ptr_size);
+
+public:
+#ifdef DEBUG_METHODS_ENABLED
+ void set_text(const char *p_text) {
+ text = p_text;
+ }
+ virtual String get_as_text() const {
+ return text;
+ }
+#else
+ virtual String get_as_text() const {
+ return String();
+ }
+#endif
+ virtual CompareEqualFunc get_compare_equal_func() const;
+ virtual CompareLessFunc get_compare_less_func() const;
+
+ virtual uint32_t hash() const;
+};
+
+#ifdef DEBUG_METHODS_ENABLED
+
+template <class T>
+struct VariantCasterAndValidate {
+
+ static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) {
+ Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE;
+ if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.argument = p_arg_idx;
+ r_error.expected = argtype;
+ }
+
+ return VariantCaster<T>::cast(*p_args[p_arg_idx]);
+ }
+};
+
+template <class T>
+struct VariantCasterAndValidate<T &> {
+
+ static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) {
+ Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE;
+ if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.argument = p_arg_idx;
+ r_error.expected = argtype;
+ }
+
+ return VariantCaster<T>::cast(*p_args[p_arg_idx]);
+ }
+};
+
+template <class T>
+struct VariantCasterAndValidate<const T &> {
+
+ static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, Callable::CallError &r_error) {
+ Variant::Type argtype = GetTypeInfo<T>::VARIANT_TYPE;
+ if (!Variant::can_convert_strict(p_args[p_arg_idx]->get_type(), argtype)) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.argument = p_arg_idx;
+ r_error.expected = argtype;
+ }
+
+ return VariantCaster<T>::cast(*p_args[p_arg_idx]);
+ }
+};
+
+#endif // DEBUG_METHODS_ENABLED
+
+// GCC 8 raises "parameter 'p_args' set but not used" here, probably using a
+// template version that does not have arguments and thus sees it unused, but
+// obviously the template can be used for functions with and without them, and
+// the optimizer will get rid of it anyway.
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+#endif
+
+template <class T, class... P, size_t... Is>
+void call_with_variant_args_helper(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, Callable::CallError &r_error, IndexSequence<Is...>) {
+ r_error.error = Callable::CallError::CALL_OK;
+
+#ifdef DEBUG_METHODS_ENABLED
+ (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
+#else
+ (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
+#endif
+}
+
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
+template <class T, class... P>
+void call_with_variant_args(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+#ifdef DEBUG_METHODS_ENABLED
+ if ((size_t)p_argcount > sizeof...(P)) {
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.argument = sizeof...(P);
+ return;
+ }
+
+ if ((size_t)p_argcount < sizeof...(P)) {
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.argument = sizeof...(P);
+ return;
+ }
+#endif
+ call_with_variant_args_helper<T, P...>(p_instance, p_method, p_args, r_error, BuildIndexSequence<sizeof...(P)>{});
+}
+
+template <class T, class... P>
+class CallableCustomMethodPointer : public CallableCustomMethodPointerBase {
+
+ struct Data {
+ T *instance;
+ void (T::*method)(P...);
+ } data;
+
+public:
+ virtual ObjectID get_object() const { return data.instance->get_instance_id(); }
+
+ virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const {
+
+ call_with_variant_args(data.instance, data.method, p_arguments, p_argcount, r_call_error);
+ }
+
+ CallableCustomMethodPointer(T *p_instance, void (T::*p_method)(P...)) {
+ zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes.
+ data.instance = p_instance;
+ data.method = p_method;
+ _setup((uint32_t *)&data, sizeof(Data));
+ }
+};
+
+template <class T, class... P>
+Callable create_custom_callable_function_pointer(T *p_instance,
+#ifdef DEBUG_METHODS_ENABLED
+ const char *p_func_text,
+#endif
+ void (T::*p_method)(P...)) {
+
+ typedef CallableCustomMethodPointer<T, P...> CCMP; // Messes with memnew otherwise.
+ CCMP *ccmp = memnew(CCMP(p_instance, p_method));
+#ifdef DEBUG_METHODS_ENABLED
+ ccmp->set_text(p_func_text + 1); // Try to get rid of the ampersand.
+#endif
+ return Callable(ccmp);
+}
+
+// VERSION WITH RETURN
+
+// GCC 8 raises "parameter 'p_args' set but not used" here, probably using a
+// template version that does not have arguments and thus sees it unused, but
+// obviously the template can be used for functions with and without them, and
+// the optimizer will get rid of it anyway.
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+#endif
+
+template <class T, class R, class... P, size_t... Is>
+void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, Variant &r_ret, Callable::CallError &r_error, IndexSequence<Is...>) {
+ r_error.error = Callable::CallError::CALL_OK;
+
+#ifdef DEBUG_METHODS_ENABLED
+ r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
+#else
+ (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
+#endif
+}
+
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
+template <class T, class R, class... P>
+void call_with_variant_args_ret(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
+#ifdef DEBUG_METHODS_ENABLED
+ if ((size_t)p_argcount > sizeof...(P)) {
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.argument = sizeof...(P);
+ return;
+ }
+
+ if ((size_t)p_argcount < sizeof...(P)) {
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.argument = sizeof...(P);
+ return;
+ }
+#endif
+ call_with_variant_args_ret_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, r_error, BuildIndexSequence<sizeof...(P)>{});
+}
+
+template <class T, class R, class... P>
+class CallableCustomMethodPointerRet : public CallableCustomMethodPointerBase {
+
+ struct Data {
+ T *instance;
+ R(T::*method)
+ (P...);
+ } data;
+
+public:
+ virtual ObjectID get_object() const { return data.instance->get_instance_id(); }
+
+ virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const {
+
+ call_with_variant_args_ret(data.instance, data.method, p_arguments, p_argcount, r_return_value, r_call_error);
+ }
+
+ CallableCustomMethodPointerRet(T *p_instance, R (T::*p_method)(P...)) {
+ zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes.
+ data.instance = p_instance;
+ data.method = p_method;
+ _setup((uint32_t *)&data, sizeof(Data));
+ }
+};
+
+template <class T, class R, class... P>
+Callable create_custom_callable_function_pointer(T *p_instance,
+#ifdef DEBUG_METHODS_ENABLED
+ const char *p_func_text,
+#endif
+ R (T::*p_method)(P...)) {
+
+ typedef CallableCustomMethodPointerRet<T, R, P...> CCMP; // Messes with memnew otherwise.
+ CCMP *ccmp = memnew(CCMP(p_instance, p_method));
+#ifdef DEBUG_METHODS_ENABLED
+ ccmp->set_text(p_func_text + 1); // Try to get rid of the ampersand.
+#endif
+ return Callable(ccmp);
+}
+
+#ifdef DEBUG_METHODS_ENABLED
+#define callable_mp(I, M) create_custom_callable_function_pointer(I, #M, M)
+#else
+#define callable_mp(I, M) create_custom_callable_function_pointer(I, M)
+#endif
+
+#endif // CALLABLE_METHOD_POINTER_H
diff --git a/core/class_db.cpp b/core/class_db.cpp
index a2941d70f6..35e216a58f 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -1033,7 +1033,7 @@ bool ClassDB::set_property(Object *p_object, const StringName &p_property, const
return true; //return true but do nothing
}
- Variant::CallError ce;
+ Callable::CallError ce;
if (psg->index >= 0) {
Variant index = psg->index;
@@ -1055,7 +1055,7 @@ bool ClassDB::set_property(Object *p_object, const StringName &p_property, const
}
if (r_valid)
- *r_valid = ce.error == Variant::CallError::CALL_OK;
+ *r_valid = ce.error == Callable::CallError::CALL_OK;
return true;
}
@@ -1078,12 +1078,12 @@ bool ClassDB::get_property(Object *p_object, const StringName &p_property, Varia
if (psg->index >= 0) {
Variant index = psg->index;
const Variant *arg[1] = { &index };
- Variant::CallError ce;
+ Callable::CallError ce;
r_value = p_object->call(psg->getter, arg, 1, ce);
} else {
- Variant::CallError ce;
+ Callable::CallError ce;
if (psg->_getptr) {
r_value = psg->_getptr->call(p_object, NULL, 0, ce);
@@ -1094,13 +1094,23 @@ bool ClassDB::get_property(Object *p_object, const StringName &p_property, Varia
return true;
}
- const int *c = check->constant_map.getptr(p_property);
+ const int *c = check->constant_map.getptr(p_property); //constants count
if (c) {
r_value = *c;
return true;
}
+ if (check->method_map.has(p_property)) { //methods count
+ r_value = Callable(p_object, p_property);
+ return true;
+ }
+
+ if (check->signal_map.has(p_property)) { //signals count
+ r_value = Signal(p_object, p_property);
+ return true;
+ }
+
check = check->inherits_ptr;
}
diff --git a/core/class_db.h b/core/class_db.h
index 404b04f2d0..398eca9132 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -35,13 +35,15 @@
#include "core/object.h"
#include "core/print_string.h"
-/** To bind more then 6 parameters include this:
+/** To bind more then 6 parameters include this:
* #include "core/method_bind_ext.gen.inc"
*/
-#define DEFVAL(m_defval) (m_defval)
+// Makes callable_mp readily available in all classes connecting signals.
+// Needs to come after method_bind and object have been included.
+#include "core/callable_method_pointer.h"
-//#define SIMPLE_METHODDEF
+#define DEFVAL(m_defval) (m_defval)
#ifdef DEBUG_METHODS_ENABLED
diff --git a/core/command_queue_mt.cpp b/core/command_queue_mt.cpp
index 861ca8d1d3..85e8a847a0 100644
--- a/core/command_queue_mt.cpp
+++ b/core/command_queue_mt.cpp
@@ -34,14 +34,12 @@
void CommandQueueMT::lock() {
- if (mutex)
- mutex->lock();
+ mutex.lock();
}
void CommandQueueMT::unlock() {
- if (mutex)
- mutex->unlock();
+ mutex.unlock();
}
void CommandQueueMT::wait_for_flush() {
@@ -106,16 +104,14 @@ CommandQueueMT::CommandQueueMT(bool p_sync) {
read_ptr = 0;
write_ptr = 0;
dealloc_ptr = 0;
- mutex = Mutex::create();
command_mem = (uint8_t *)memalloc(COMMAND_MEM_SIZE);
for (int i = 0; i < SYNC_SEMAPHORES; i++) {
- sync_sems[i].sem = SemaphoreOld::create();
sync_sems[i].in_use = false;
}
if (p_sync)
- sync = SemaphoreOld::create();
+ sync = memnew(Semaphore);
else
sync = NULL;
}
@@ -124,10 +120,5 @@ CommandQueueMT::~CommandQueueMT() {
if (sync)
memdelete(sync);
- memdelete(mutex);
- for (int i = 0; i < SYNC_SEMAPHORES; i++) {
-
- memdelete(sync_sems[i].sem);
- }
memfree(command_mem);
}
diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h
index 2b6e0201f0..90231546ef 100644
--- a/core/command_queue_mt.h
+++ b/core/command_queue_mt.h
@@ -270,7 +270,7 @@
cmd->sync_sem = ss; \
unlock(); \
if (sync) sync->post(); \
- ss->sem->wait(); \
+ ss->sem.wait(); \
ss->in_use = false; \
}
@@ -287,7 +287,7 @@
cmd->sync_sem = ss; \
unlock(); \
if (sync) sync->post(); \
- ss->sem->wait(); \
+ ss->sem.wait(); \
ss->in_use = false; \
}
@@ -297,7 +297,7 @@ class CommandQueueMT {
struct SyncSemaphore {
- SemaphoreOld *sem;
+ Semaphore sem;
bool in_use;
};
@@ -313,7 +313,7 @@ class CommandQueueMT {
SyncSemaphore *sync_sem;
virtual void post() {
- sync_sem->sem->post();
+ sync_sem->sem.post();
}
};
@@ -341,8 +341,8 @@ class CommandQueueMT {
uint32_t write_ptr;
uint32_t dealloc_ptr;
SyncSemaphore sync_sems[SYNC_SEMAPHORES];
- Mutex *mutex;
- SemaphoreOld *sync;
+ Mutex mutex;
+ Semaphore *sync;
template <class T>
T *allocate() {
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index 69b4ec292f..ed307fd3ac 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -141,8 +141,8 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
hash_table.resize(size);
bucket_table.resize(bucket_table_size);
- PoolVector<int>::Write htwb = hash_table.write();
- PoolVector<int>::Write btwb = bucket_table.write();
+ int *htwb = hash_table.ptrw();
+ int *btwb = bucket_table.ptrw();
uint32_t *htw = (uint32_t *)&htwb[0];
uint32_t *btw = (uint32_t *)&btwb[0];
@@ -174,7 +174,7 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
}
strings.resize(total_compression_size);
- PoolVector<uint8_t>::Write cw = strings.write();
+ uint8_t *cw = strings.ptrw();
for (int i = 0; i < compressed.size(); i++) {
memcpy(&cw[compressed[i].offset], compressed[i].compressed.get_data(), compressed[i].compressed.size());
@@ -228,11 +228,11 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
CharString str = p_src_text.operator String().utf8();
uint32_t h = hash(0, str.get_data());
- PoolVector<int>::Read htr = hash_table.read();
+ const int *htr = hash_table.ptr();
const uint32_t *htptr = (const uint32_t *)&htr[0];
- PoolVector<int>::Read btr = bucket_table.read();
+ const int *btr = bucket_table.ptr();
const uint32_t *btptr = (const uint32_t *)&btr[0];
- PoolVector<uint8_t>::Read sr = strings.read();
+ const uint8_t *sr = strings.ptr();
const char *sptr = (const char *)&sr[0];
uint32_t p = htptr[h % htsize];
@@ -279,9 +279,9 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
void PHashTranslation::_get_property_list(List<PropertyInfo> *p_list) const {
- p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "hash_table"));
- p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "bucket_table"));
- p_list->push_back(PropertyInfo(Variant::POOL_BYTE_ARRAY, "strings"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "hash_table"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "bucket_table"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "strings"));
p_list->push_back(PropertyInfo(Variant::OBJECT, "load_from", PROPERTY_HINT_RESOURCE_TYPE, "Translation", PROPERTY_USAGE_EDITOR));
}
void PHashTranslation::_bind_methods() {
diff --git a/core/compressed_translation.h b/core/compressed_translation.h
index a72be739a1..d599240dfe 100644
--- a/core/compressed_translation.h
+++ b/core/compressed_translation.h
@@ -43,9 +43,9 @@ class PHashTranslation : public Translation {
//of catching untranslated strings
//load/store friendly types
- PoolVector<int> hash_table;
- PoolVector<int> bucket_table;
- PoolVector<uint8_t> strings;
+ Vector<int> hash_table;
+ Vector<int> bucket_table;
+ Vector<uint8_t> strings;
struct Bucket {
diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp
index bafb800e41..253d5f1acb 100644
--- a/core/core_string_names.cpp
+++ b/core/core_string_names.cpp
@@ -70,5 +70,9 @@ CoreStringNames::CoreStringNames() :
r8(StaticCString::create("r8")),
g8(StaticCString::create("g8")),
b8(StaticCString::create("b8")),
- a8(StaticCString::create("a8")) {
+ a8(StaticCString::create("a8")),
+ call(StaticCString::create("call")),
+ call_deferred(StaticCString::create("call_deferred")),
+ emit(StaticCString::create("emit")),
+ notification(StaticCString::create("notification")) {
}
diff --git a/core/core_string_names.h b/core/core_string_names.h
index a507a20935..42416d3f75 100644
--- a/core/core_string_names.h
+++ b/core/core_string_names.h
@@ -90,6 +90,11 @@ public:
StringName g8;
StringName b8;
StringName a8;
+
+ StringName call;
+ StringName call_deferred;
+ StringName emit;
+ StringName notification;
};
#endif // SCENE_STRING_NAMES_H
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp
index 3bee34f8e4..793bf719b7 100644
--- a/core/crypto/crypto.cpp
+++ b/core/crypto/crypto.cpp
@@ -82,8 +82,8 @@ void Crypto::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate_self_signed_certificate", "key", "issuer_name", "not_before", "not_after"), &Crypto::generate_self_signed_certificate, DEFVAL("CN=myserver,O=myorganisation,C=IT"), DEFVAL("20140101000000"), DEFVAL("20340101000000"));
}
-PoolByteArray Crypto::generate_random_bytes(int p_bytes) {
- ERR_FAIL_V_MSG(PoolByteArray(), "generate_random_bytes is not available when mbedtls module is disabled.");
+PackedByteArray Crypto::generate_random_bytes(int p_bytes) {
+ ERR_FAIL_V_MSG(PackedByteArray(), "generate_random_bytes is not available when mbedtls module is disabled.");
}
Ref<CryptoKey> Crypto::generate_rsa(int p_bytes) {
@@ -99,7 +99,7 @@ Crypto::Crypto() {
/// Resource loader/saver
-RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
String el = p_path.get_extension().to_lower();
if (el == "crt") {
diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h
index adc36255b6..3279c0620f 100644
--- a/core/crypto/crypto.h
+++ b/core/crypto/crypto.h
@@ -76,7 +76,7 @@ public:
static Crypto *create();
static void load_default_certificates(String p_path);
- virtual PoolByteArray generate_random_bytes(int p_bytes);
+ virtual PackedByteArray generate_random_bytes(int p_bytes);
virtual Ref<CryptoKey> generate_rsa(int p_bytes);
virtual Ref<X509Certificate> generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after);
@@ -87,7 +87,7 @@ class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
GDCLASS(ResourceFormatLoaderCrypto, ResourceFormatLoader);
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/core/crypto/crypto_core.cpp b/core/crypto/crypto_core.cpp
index dec52d8ca4..ec25ee0d38 100644
--- a/core/crypto/crypto_core.cpp
+++ b/core/crypto/crypto_core.cpp
@@ -148,9 +148,9 @@ Error CryptoCore::AESContext::decrypt_ecb(const uint8_t p_src[16], uint8_t r_dst
// CryptoCore
String CryptoCore::b64_encode_str(const uint8_t *p_src, int p_src_len) {
int b64len = p_src_len / 3 * 4 + 4 + 1;
- PoolVector<uint8_t> b64buff;
+ Vector<uint8_t> b64buff;
b64buff.resize(b64len);
- PoolVector<uint8_t>::Write w64 = b64buff.write();
+ uint8_t *w64 = b64buff.ptrw();
size_t strlen = 0;
int ret = b64_encode(&w64[0], b64len, &strlen, p_src, p_src_len);
w64[strlen] = 0;
diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp
index 7bee8f1200..a4d8a93c8a 100644
--- a/core/crypto/hashing_context.cpp
+++ b/core/crypto/hashing_context.cpp
@@ -47,11 +47,11 @@ Error HashingContext::start(HashType p_type) {
return ERR_UNAVAILABLE;
}
-Error HashingContext::update(PoolByteArray p_chunk) {
+Error HashingContext::update(PackedByteArray p_chunk) {
ERR_FAIL_COND_V(ctx == NULL, ERR_UNCONFIGURED);
size_t len = p_chunk.size();
ERR_FAIL_COND_V(len == 0, FAILED);
- PoolByteArray::Read r = p_chunk.read();
+ const uint8_t *r = p_chunk.ptr();
switch (type) {
case HASH_MD5:
return ((CryptoCore::MD5Context *)ctx)->update(&r[0], len);
@@ -63,26 +63,26 @@ Error HashingContext::update(PoolByteArray p_chunk) {
return ERR_UNAVAILABLE;
}
-PoolByteArray HashingContext::finish() {
- ERR_FAIL_COND_V(ctx == NULL, PoolByteArray());
- PoolByteArray out;
+PackedByteArray HashingContext::finish() {
+ ERR_FAIL_COND_V(ctx == NULL, PackedByteArray());
+ PackedByteArray out;
Error err = FAILED;
switch (type) {
case HASH_MD5:
out.resize(16);
- err = ((CryptoCore::MD5Context *)ctx)->finish(out.write().ptr());
+ err = ((CryptoCore::MD5Context *)ctx)->finish(out.ptrw());
break;
case HASH_SHA1:
out.resize(20);
- err = ((CryptoCore::SHA1Context *)ctx)->finish(out.write().ptr());
+ err = ((CryptoCore::SHA1Context *)ctx)->finish(out.ptrw());
break;
case HASH_SHA256:
out.resize(32);
- err = ((CryptoCore::SHA256Context *)ctx)->finish(out.write().ptr());
+ err = ((CryptoCore::SHA256Context *)ctx)->finish(out.ptrw());
break;
}
_delete_ctx();
- ERR_FAIL_COND_V(err != OK, PoolByteArray());
+ ERR_FAIL_COND_V(err != OK, PackedByteArray());
return out;
}
diff --git a/core/crypto/hashing_context.h b/core/crypto/hashing_context.h
index af6ed3aa0b..230ba7ee85 100644
--- a/core/crypto/hashing_context.h
+++ b/core/crypto/hashing_context.h
@@ -54,8 +54,8 @@ protected:
public:
Error start(HashType p_type);
- Error update(PoolByteArray p_chunk);
- PoolByteArray finish();
+ Error update(PackedByteArray p_chunk);
+ PackedByteArray finish();
HashingContext();
~HashingContext();
diff --git a/core/error_macros.h b/core/error_macros.h
index 4a3ea28957..e4d7609e04 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -502,11 +502,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
*
* The current function returns `m_retval`.
*/
-#define ERR_FAIL_V(m_retval) \
- if (1) { \
- _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_value)); \
- return m_retval; \
- } else \
+#define ERR_FAIL_V(m_retval) \
+ if (1) { \
+ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_retval)); \
+ return m_retval; \
+ } else \
((void)0)
/**
@@ -515,11 +515,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
*
* Prints `m_msg`, and the current function returns `m_retval`.
*/
-#define ERR_FAIL_V_MSG(m_retval, m_msg) \
- if (1) { \
- _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_value), DEBUG_STR(m_msg)); \
- return m_retval; \
- } else \
+#define ERR_FAIL_V_MSG(m_retval, m_msg) \
+ if (1) { \
+ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_retval), DEBUG_STR(m_msg)); \
+ return m_retval; \
+ } else \
((void)0)
/**
diff --git a/core/func_ref.cpp b/core/func_ref.cpp
index e20188c813..338c17946b 100644
--- a/core/func_ref.cpp
+++ b/core/func_ref.cpp
@@ -30,16 +30,16 @@
#include "func_ref.h"
-Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (id.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
Object *obj = ObjectDB::get_instance(id);
if (!obj) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
diff --git a/core/func_ref.h b/core/func_ref.h
index 1d1ca47ad7..8cb3be6e61 100644
--- a/core/func_ref.h
+++ b/core/func_ref.h
@@ -43,7 +43,7 @@ protected:
static void _bind_methods();
public:
- Variant call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Variant call_funcv(const Array &p_args);
void set_instance(Object *p_obj);
void set_function(const StringName &p_func);
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index e48556c064..0945240c1f 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -92,9 +92,6 @@ VARIANT_ENUM_CAST(JoystickList);
VARIANT_ENUM_CAST(MidiMessageList);
void register_global_constants() {
-
- //{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace
-
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
@@ -116,7 +113,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
- // hueg list of keys
+ // huge list of keys
BIND_GLOBAL_CONSTANT(SPKEY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
@@ -594,30 +591,38 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY); // 25
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
//comparison
diff --git a/core/image.cpp b/core/image.cpp
index d9f84621a3..2c39c9b882 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -444,8 +444,6 @@ void Image::convert(Format p_new_format) {
if (p_new_format == format)
return;
- ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot convert image when it is locked.");
-
if (format > FORMAT_RGBE9995 || p_new_format > FORMAT_RGBE9995) {
ERR_FAIL_MSG("Cannot convert to <-> from compressed formats. Use compress() and decompress() instead.");
@@ -454,8 +452,6 @@ void Image::convert(Format p_new_format) {
//use put/set pixel which is slower but works with non byte formats
Image new_img(width, height, 0, p_new_format);
- lock();
- new_img.lock();
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
@@ -464,9 +460,6 @@ void Image::convert(Format p_new_format) {
}
}
- unlock();
- new_img.unlock();
-
if (has_mipmaps()) {
new_img.generate_mipmaps();
}
@@ -478,11 +471,8 @@ void Image::convert(Format p_new_format) {
Image new_img(width, height, 0, p_new_format);
- PoolVector<uint8_t>::Read r = data.read();
- PoolVector<uint8_t>::Write w = new_img.data.write();
-
- const uint8_t *rptr = r.ptr();
- uint8_t *wptr = w.ptr();
+ const uint8_t *rptr = data.ptr();
+ uint8_t *wptr = new_img.data.ptrw();
int conversion_type = format | p_new_format << 8;
@@ -520,9 +510,6 @@ void Image::convert(Format p_new_format) {
case FORMAT_RGBA8 | (FORMAT_RGB8 << 8): _convert<3, true, 3, false, false, false>(width, height, rptr, wptr); break;
}
- r.release();
- w.release();
-
bool gen_mipmaps = mipmaps;
_copy_internals_from(new_img);
@@ -906,7 +893,6 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
ERR_FAIL_COND_MSG(data.size() == 0, "Cannot resize image before creating it, use create() or create_from_data() first.");
ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot resize in compressed or custom image formats.");
- ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot resize image when it is locked.");
bool mipmap_aware = p_interpolation == INTERPOLATE_TRILINEAR /* || p_interpolation == INTERPOLATE_TRICUBIC */;
@@ -948,11 +934,11 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
}
// --
- PoolVector<uint8_t>::Read r = data.read();
- const unsigned char *r_ptr = r.ptr();
+ const uint8_t *r = data.ptr();
+ const unsigned char *r_ptr = r;
- PoolVector<uint8_t>::Write w = dst.data.write();
- unsigned char *w_ptr = w.ptr();
+ uint8_t *w = dst.data.ptrw();
+ unsigned char *w_ptr = w;
switch (p_interpolation) {
@@ -1017,8 +1003,8 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
_get_mipmap_offset_and_size(mip2, offs, src_width, src_height);
src_ptr = r_ptr + offs;
// Switch to write to the second destination image
- w = dst2.data.write();
- w_ptr = w.ptr();
+ w = dst2.data.ptrw();
+ w_ptr = w;
}
}
@@ -1048,8 +1034,8 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
if (interpolate_mipmaps) {
// Switch to read again from the first scaled mipmap to overlay it over the second
- r = dst.data.read();
- _overlay(r.ptr(), w.ptr(), mip1_weight, p_width, p_height, get_format_pixel_size(format));
+ r = dst.data.ptr();
+ _overlay(r, w, mip1_weight, p_width, p_height, get_format_pixel_size(format));
}
} break;
@@ -1105,9 +1091,6 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
} break;
}
- r.release();
- w.release();
-
if (interpolate_mipmaps) {
dst._copy_internals_from(dst2);
}
@@ -1142,8 +1125,8 @@ void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) {
Image dst(p_width, p_height, 0, format);
{
- PoolVector<uint8_t>::Read r = data.read();
- PoolVector<uint8_t>::Write w = dst.data.write();
+ const uint8_t *r = data.ptr();
+ uint8_t *w = dst.data.ptrw();
int m_h = p_y + p_height;
int m_w = p_x + p_width;
@@ -1155,10 +1138,10 @@ void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) {
for (uint32_t i = 0; i < pixel_size; i++)
pdata[i] = 0;
} else {
- _get_pixelb(x, y, pixel_size, r.ptr(), pdata);
+ _get_pixelb(x, y, pixel_size, r, pdata);
}
- dst._put_pixelb(x - p_x, y - p_y, pixel_size, w.ptr(), pdata);
+ dst._put_pixelb(x - p_x, y - p_y, pixel_size, w, pdata);
}
}
}
@@ -1183,7 +1166,7 @@ void Image::flip_y() {
}
{
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
uint8_t up[16];
uint8_t down[16];
uint32_t pixel_size = get_format_pixel_size(format);
@@ -1192,11 +1175,11 @@ void Image::flip_y() {
for (int x = 0; x < width; x++) {
- _get_pixelb(x, y, pixel_size, w.ptr(), up);
- _get_pixelb(x, height - y - 1, pixel_size, w.ptr(), down);
+ _get_pixelb(x, y, pixel_size, w, up);
+ _get_pixelb(x, height - y - 1, pixel_size, w, down);
- _put_pixelb(x, height - y - 1, pixel_size, w.ptr(), up);
- _put_pixelb(x, y, pixel_size, w.ptr(), down);
+ _put_pixelb(x, height - y - 1, pixel_size, w, up);
+ _put_pixelb(x, y, pixel_size, w, down);
}
}
}
@@ -1216,7 +1199,7 @@ void Image::flip_x() {
}
{
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
uint8_t up[16];
uint8_t down[16];
uint32_t pixel_size = get_format_pixel_size(format);
@@ -1225,11 +1208,11 @@ void Image::flip_x() {
for (int x = 0; x < width / 2; x++) {
- _get_pixelb(x, y, pixel_size, w.ptr(), up);
- _get_pixelb(width - x - 1, y, pixel_size, w.ptr(), down);
+ _get_pixelb(x, y, pixel_size, w, up);
+ _get_pixelb(width - x - 1, y, pixel_size, w, down);
- _put_pixelb(width - x - 1, y, pixel_size, w.ptr(), up);
- _put_pixelb(x, y, pixel_size, w.ptr(), down);
+ _put_pixelb(width - x - 1, y, pixel_size, w, up);
+ _put_pixelb(x, y, pixel_size, w, down);
}
}
}
@@ -1348,16 +1331,16 @@ void Image::expand_x2_hq2x() {
if (current != FORMAT_RGBA8)
convert(FORMAT_RGBA8);
- PoolVector<uint8_t> dest;
+ Vector<uint8_t> dest;
dest.resize(width * 2 * height * 2 * 4);
{
- PoolVector<uint8_t>::Read r = data.read();
- PoolVector<uint8_t>::Write w = dest.write();
+ const uint8_t *r = data.ptr();
+ uint8_t *w = dest.ptrw();
- ERR_FAIL_COND(!r.ptr());
+ ERR_FAIL_COND(!r);
- hq2x_resize((const uint32_t *)r.ptr(), width, height, (uint32_t *)w.ptr());
+ hq2x_resize((const uint32_t *)r, width, height, (uint32_t *)w);
}
width *= 2;
@@ -1381,7 +1364,7 @@ void Image::shrink_x2() {
if (mipmaps) {
//just use the lower mipmap as base and copy all
- PoolVector<uint8_t> new_img;
+ Vector<uint8_t> new_img;
int ofs = get_mipmap_offset(1);
@@ -1390,10 +1373,10 @@ void Image::shrink_x2() {
ERR_FAIL_COND(new_img.size() == 0);
{
- PoolVector<uint8_t>::Write w = new_img.write();
- PoolVector<uint8_t>::Read r = data.read();
+ uint8_t *w = new_img.ptrw();
+ const uint8_t *r = data.ptr();
- copymem(w.ptr(), &r[ofs], new_size);
+ copymem(w, &r[ofs], new_size);
}
width = MAX(width / 2, 1);
@@ -1402,7 +1385,7 @@ void Image::shrink_x2() {
} else {
- PoolVector<uint8_t> new_img;
+ Vector<uint8_t> new_img;
ERR_FAIL_COND(!_can_modify(format));
int ps = get_format_pixel_size(format);
@@ -1411,29 +1394,29 @@ void Image::shrink_x2() {
ERR_FAIL_COND(data.size() == 0);
{
- PoolVector<uint8_t>::Write w = new_img.write();
- PoolVector<uint8_t>::Read r = data.read();
+ uint8_t *w = new_img.ptrw();
+ const uint8_t *r = data.ptr();
switch (format) {
case FORMAT_L8:
- case FORMAT_R8: _generate_po2_mipmap<uint8_t, 1, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break;
- case FORMAT_LA8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break;
- case FORMAT_RG8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break;
- case FORMAT_RGB8: _generate_po2_mipmap<uint8_t, 3, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break;
- case FORMAT_RGBA8: _generate_po2_mipmap<uint8_t, 4, false, Image::average_4_uint8, Image::renormalize_uint8>(r.ptr(), w.ptr(), width, height); break;
-
- case FORMAT_RF: _generate_po2_mipmap<float, 1, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break;
- case FORMAT_RGF: _generate_po2_mipmap<float, 2, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break;
- case FORMAT_RGBF: _generate_po2_mipmap<float, 3, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break;
- case FORMAT_RGBAF: _generate_po2_mipmap<float, 4, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r.ptr()), reinterpret_cast<float *>(w.ptr()), width, height); break;
-
- case FORMAT_RH: _generate_po2_mipmap<uint16_t, 1, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break;
- case FORMAT_RGH: _generate_po2_mipmap<uint16_t, 2, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break;
- case FORMAT_RGBH: _generate_po2_mipmap<uint16_t, 3, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break;
- case FORMAT_RGBAH: _generate_po2_mipmap<uint16_t, 4, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break;
-
- case FORMAT_RGBE9995: _generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(r.ptr()), reinterpret_cast<uint32_t *>(w.ptr()), width, height); break;
+ case FORMAT_R8: _generate_po2_mipmap<uint8_t, 1, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break;
+ case FORMAT_LA8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break;
+ case FORMAT_RG8: _generate_po2_mipmap<uint8_t, 2, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break;
+ case FORMAT_RGB8: _generate_po2_mipmap<uint8_t, 3, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break;
+ case FORMAT_RGBA8: _generate_po2_mipmap<uint8_t, 4, false, Image::average_4_uint8, Image::renormalize_uint8>(r, w, width, height); break;
+
+ case FORMAT_RF: _generate_po2_mipmap<float, 1, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break;
+ case FORMAT_RGF: _generate_po2_mipmap<float, 2, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break;
+ case FORMAT_RGBF: _generate_po2_mipmap<float, 3, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break;
+ case FORMAT_RGBAF: _generate_po2_mipmap<float, 4, false, Image::average_4_float, Image::renormalize_float>(reinterpret_cast<const float *>(r), reinterpret_cast<float *>(w), width, height); break;
+
+ case FORMAT_RH: _generate_po2_mipmap<uint16_t, 1, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break;
+ case FORMAT_RGH: _generate_po2_mipmap<uint16_t, 2, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break;
+ case FORMAT_RGBH: _generate_po2_mipmap<uint16_t, 3, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break;
+ case FORMAT_RGBAH: _generate_po2_mipmap<uint16_t, 4, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r), reinterpret_cast<uint16_t *>(w), width, height); break;
+
+ case FORMAT_RGBE9995: _generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(r), reinterpret_cast<uint32_t *>(w), width, height); break;
default: {
}
}
@@ -1452,8 +1435,6 @@ void Image::normalize() {
clear_mipmaps();
}
- lock();
-
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
@@ -1468,8 +1449,6 @@ void Image::normalize() {
}
}
- unlock();
-
if (used_mipmaps) {
generate_mipmaps(true);
}
@@ -1479,6 +1458,8 @@ Error Image::generate_mipmaps(bool p_renormalize) {
ERR_FAIL_COND_V_MSG(!_can_modify(format), ERR_UNAVAILABLE, "Cannot generate mipmaps in compressed or custom image formats.");
+ ERR_FAIL_COND_V_MSG(format == FORMAT_RGBA4444, ERR_UNAVAILABLE, "Cannot generate mipmaps from RGBA4444 format.");
+
ERR_FAIL_COND_V_MSG(width == 0 || height == 0, ERR_UNCONFIGURED, "Cannot generate mipmaps with width or height equal to 0.");
int mmcount;
@@ -1487,7 +1468,7 @@ Error Image::generate_mipmaps(bool p_renormalize) {
data.resize(size);
- PoolVector<uint8_t>::Write wp = data.write();
+ uint8_t *wp = data.ptrw();
int prev_ofs = 0;
int prev_h = height;
@@ -1599,7 +1580,6 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con
normal_sat = normal_sat_vec.ptrw();
//create summed area table
- nm->lock();
for (int y = 0; y < normal_h; y++) {
double line_sum[3] = { 0, 0, 0 };
@@ -1642,9 +1622,7 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con
_get_dst_image_size(width, height, format, mmcount);
- lock();
-
- uint8_t *base_ptr = write_lock.ptr();
+ uint8_t *base_ptr = data.ptrw();
for (int i = 1; i <= mmcount; i++) {
@@ -1759,11 +1737,13 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con
{
int size = get_mipmap_byte_size(i);
print_line("size for mimpap " + itos(i) + ": " + itos(size));
- PoolVector<uint8_t> imgdata;
+ Vector<uint8_t> imgdata;
imgdata.resize(size);
- PoolVector<uint8_t>::Write wr = imgdata.write();
+
+
+ uint8_t* wr = imgdata.ptrw();
copymem(wr.ptr(), ptr, size);
- wr = PoolVector<uint8_t>::Write();
+ wr = uint8_t*();
Ref<Image> im;
im.instance();
im->create(w, h, false, format, imgdata);
@@ -1772,9 +1752,6 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con
#endif
}
- unlock();
- nm->unlock();
-
return OK;
}
@@ -1798,7 +1775,7 @@ bool Image::empty() const {
return (data.size() == 0);
}
-PoolVector<uint8_t> Image::get_data() const {
+Vector<uint8_t> Image::get_data() const {
return data;
}
@@ -1812,9 +1789,10 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
int mm = 0;
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
data.resize(size);
+
{
- PoolVector<uint8_t>::Write w = data.write();
- zeromem(w.ptr(), size);
+ uint8_t *w = data.ptrw();
+ zeromem(w, size);
}
width = p_width;
@@ -1823,7 +1801,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
format = p_format;
}
-void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) {
+void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
ERR_FAIL_INDEX(p_width - 1, MAX_WIDTH);
ERR_FAIL_INDEX(p_height - 1, MAX_HEIGHT);
@@ -1838,6 +1816,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
width = p_width;
format = p_format;
data = p_data;
+
mipmaps = p_use_mipmaps;
}
@@ -1862,7 +1841,7 @@ void Image::create(const char **p_xpm) {
HashMap<String, Color> colormap;
int colormap_size = 0;
uint32_t pixel_size = 0;
- PoolVector<uint8_t>::Write w;
+ uint8_t *w;
while (status != DONE) {
@@ -1953,7 +1932,7 @@ void Image::create(const char **p_xpm) {
status = READING_PIXELS;
create(size_width, size_height, 0, has_alpha ? FORMAT_RGBA8 : FORMAT_RGB8);
- w = data.write();
+ w = data.ptrw();
pixel_size = has_alpha ? 4 : 3;
}
} break;
@@ -1972,7 +1951,7 @@ void Image::create(const char **p_xpm) {
for (uint32_t i = 0; i < pixel_size; i++) {
pixel[i] = CLAMP((*colorptr)[i] * 255, 0, 255);
}
- _put_pixelb(x, y, pixel_size, w.ptr(), pixel);
+ _put_pixelb(x, y, pixel_size, w, pixel);
}
if (y == (size_height - 1))
@@ -2024,8 +2003,8 @@ bool Image::is_invisible() const {
int w, h;
_get_mipmap_offset_and_size(1, len, w, h);
- PoolVector<uint8_t>::Read r = data.read();
- const unsigned char *data_ptr = r.ptr();
+ const uint8_t *r = data.ptr();
+ const unsigned char *data_ptr = r;
bool detected = false;
@@ -2069,8 +2048,8 @@ Image::AlphaMode Image::detect_alpha() const {
int w, h;
_get_mipmap_offset_and_size(1, len, w, h);
- PoolVector<uint8_t>::Read r = data.read();
- const unsigned char *data_ptr = r.ptr();
+ const uint8_t *r = data.ptr();
+ const unsigned char *data_ptr = r;
bool bit = false;
bool detected = false;
@@ -2126,9 +2105,9 @@ Error Image::save_png(const String &p_path) const {
return save_png_func(p_path, Ref<Image>((Image *)this));
}
-PoolVector<uint8_t> Image::save_png_to_buffer() const {
+Vector<uint8_t> Image::save_png_to_buffer() const {
if (save_png_buffer_func == NULL) {
- return PoolVector<uint8_t>();
+ return Vector<uint8_t>();
}
return save_png_buffer_func(Ref<Image>((Image *)this));
@@ -2266,7 +2245,7 @@ Image::Image(int p_width, int p_height, bool p_use_mipmaps, Format p_format) {
create(p_width, p_height, p_use_mipmaps, p_format);
}
-Image::Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) {
+Image::Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
width = 0;
height = 0;
@@ -2286,7 +2265,6 @@ Rect2 Image::get_used_rect() const {
if (len == 0)
return Rect2();
- const_cast<Image *>(this)->lock();
int minx = 0xFFFFFF, miny = 0xFFFFFFF;
int maxx = -1, maxy = -1;
for (int j = 0; j < height; j++) {
@@ -2305,8 +2283,6 @@ Rect2 Image::get_used_rect() const {
}
}
- const_cast<Image *>(this)->unlock();
-
if (maxx == -1)
return Rect2();
else
@@ -2343,11 +2319,11 @@ void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Po
Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y));
Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size));
- PoolVector<uint8_t>::Write wp = data.write();
- uint8_t *dst_data_ptr = wp.ptr();
+ uint8_t *wp = data.ptrw();
+ uint8_t *dst_data_ptr = wp;
- PoolVector<uint8_t>::Read rp = p_src->data.read();
- const uint8_t *src_data_ptr = rp.ptr();
+ const uint8_t *rp = p_src->data.ptr();
+ const uint8_t *src_data_ptr = rp;
int pixel_size = get_format_pixel_size(format);
@@ -2398,16 +2374,15 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co
Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y));
Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size));
- PoolVector<uint8_t>::Write wp = data.write();
- uint8_t *dst_data_ptr = wp.ptr();
+ uint8_t *wp = data.ptrw();
+ uint8_t *dst_data_ptr = wp;
- PoolVector<uint8_t>::Read rp = p_src->data.read();
- const uint8_t *src_data_ptr = rp.ptr();
+ const uint8_t *rp = p_src->data.ptr();
+ const uint8_t *src_data_ptr = rp;
int pixel_size = get_format_pixel_size(format);
Ref<Image> msk = p_mask;
- msk->lock();
for (int i = 0; i < dest_rect.size.y; i++) {
@@ -2430,8 +2405,6 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co
}
}
}
-
- msk->unlock();
}
void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Point2 &p_dest) {
@@ -2456,9 +2429,7 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P
Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y));
Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size));
- lock();
Ref<Image> img = p_src;
- img->lock();
for (int i = 0; i < dest_rect.size.y; i++) {
@@ -2479,9 +2450,6 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P
set_pixel(dst_x, dst_y, dc);
}
}
-
- img->unlock();
- unlock();
}
void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, const Rect2 &p_src_rect, const Point2 &p_dest) {
@@ -2511,11 +2479,8 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c
Point2 src_underscan = Point2(MIN(0, p_src_rect.position.x), MIN(0, p_src_rect.position.y));
Rect2i dest_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest - src_underscan, clipped_src_rect.size));
- lock();
Ref<Image> img = p_src;
Ref<Image> msk = p_mask;
- img->lock();
- msk->lock();
for (int i = 0; i < dest_rect.size.y; i++) {
@@ -2542,19 +2507,13 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c
}
}
}
-
- msk->unlock();
- img->unlock();
- unlock();
}
void Image::fill(const Color &c) {
ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot fill in compressed or custom image formats.");
- lock();
-
- PoolVector<uint8_t>::Write wp = data.write();
- uint8_t *dst_data_ptr = wp.ptr();
+ uint8_t *wp = data.ptrw();
+ uint8_t *dst_data_ptr = wp;
int pixel_size = get_format_pixel_size(format);
@@ -2572,8 +2531,6 @@ void Image::fill(const Color &c) {
}
}
}
-
- unlock();
}
ImageMemLoadFunc Image::_png_mem_loader_func = NULL;
@@ -2592,12 +2549,12 @@ void (*Image::_image_decompress_bptc)(Image *) = NULL;
void (*Image::_image_decompress_etc1)(Image *) = NULL;
void (*Image::_image_decompress_etc2)(Image *) = NULL;
-PoolVector<uint8_t> (*Image::lossy_packer)(const Ref<Image> &, float) = NULL;
-Ref<Image> (*Image::lossy_unpacker)(const PoolVector<uint8_t> &) = NULL;
-PoolVector<uint8_t> (*Image::lossless_packer)(const Ref<Image> &) = NULL;
-Ref<Image> (*Image::lossless_unpacker)(const PoolVector<uint8_t> &) = NULL;
-PoolVector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels) = NULL;
-Ref<Image> (*Image::basis_universal_unpacker)(const PoolVector<uint8_t> &) = NULL;
+Vector<uint8_t> (*Image::lossy_packer)(const Ref<Image> &, float) = NULL;
+Ref<Image> (*Image::lossy_unpacker)(const Vector<uint8_t> &) = NULL;
+Vector<uint8_t> (*Image::lossless_packer)(const Ref<Image> &) = NULL;
+Ref<Image> (*Image::lossless_unpacker)(const Vector<uint8_t> &) = NULL;
+Vector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels) = NULL;
+Ref<Image> (*Image::basis_universal_unpacker)(const Vector<uint8_t> &) = NULL;
void Image::_set_data(const Dictionary &p_data) {
@@ -2611,7 +2568,7 @@ void Image::_set_data(const Dictionary &p_data) {
int dheight = p_data["height"];
String dformat = p_data["format"];
bool dmipmaps = p_data["mipmaps"];
- PoolVector<uint8_t> ddata = p_data["data"];
+ Vector<uint8_t> ddata = p_data["data"];
Format ddformat = FORMAT_MAX;
for (int i = 0; i < FORMAT_MAX; i++) {
if (dformat == get_format_name(Format(i))) {
@@ -2636,22 +2593,11 @@ Dictionary Image::_get_data() const {
return d;
}
-void Image::lock() {
-
- ERR_FAIL_COND(data.size() == 0);
- write_lock = data.write();
-}
-
-void Image::unlock() {
-
- write_lock.release();
-}
-
Color Image::get_pixelv(const Point2 &p_src) const {
return get_pixel(p_src.x, p_src.y);
}
-Color Image::_get_color_at_ofs(uint8_t *ptr, uint32_t ofs) const {
+Color Image::_get_color_at_ofs(const uint8_t *ptr, uint32_t ofs) const {
switch (format) {
case FORMAT_L8: {
@@ -2873,18 +2819,13 @@ void Image::_set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color)
}
Color Image::get_pixel(int p_x, int p_y) const {
-
- uint8_t *ptr = write_lock.ptr();
#ifdef DEBUG_ENABLED
- ERR_FAIL_COND_V_MSG(!ptr, Color(), "Image must be locked with 'lock()' before using get_pixel().");
-
ERR_FAIL_INDEX_V(p_x, width, Color());
ERR_FAIL_INDEX_V(p_y, height, Color());
-
#endif
uint32_t ofs = p_y * width + p_x;
- return _get_color_at_ofs(ptr, ofs);
+ return _get_color_at_ofs(data.ptr(), ofs);
}
void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) {
@@ -2892,18 +2833,13 @@ void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) {
}
void Image::set_pixel(int p_x, int p_y, const Color &p_color) {
-
- uint8_t *ptr = write_lock.ptr();
#ifdef DEBUG_ENABLED
- ERR_FAIL_COND_MSG(!ptr, "Image must be locked with 'lock()' before using set_pixel().");
-
ERR_FAIL_INDEX(p_x, width);
ERR_FAIL_INDEX(p_y, height);
-
#endif
uint32_t ofs = p_y * width + p_x;
- _set_color_at_ofs(ptr, ofs, p_color);
+ _set_color_at_ofs(data.ptrw(), ofs, p_color);
}
Image::UsedChannels Image::detect_used_channels(CompressSource p_source) {
@@ -2911,7 +2847,7 @@ Image::UsedChannels Image::detect_used_channels(CompressSource p_source) {
ERR_FAIL_COND_V(data.size() == 0, USED_CHANNELS_RGBA);
ERR_FAIL_COND_V(is_compressed(), USED_CHANNELS_RGBA);
bool r = false, g = false, b = false, a = false, c = false;
- lock();
+
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
@@ -2932,8 +2868,6 @@ Image::UsedChannels Image::detect_used_channels(CompressSource p_source) {
}
}
- unlock();
-
UsedChannels used_channels;
if (!c && !a)
@@ -3036,8 +2970,6 @@ void Image::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_data", "data"), &Image::_set_data);
ClassDB::bind_method(D_METHOD("_get_data"), &Image::_get_data);
- ClassDB::bind_method(D_METHOD("lock"), &Image::lock);
- ClassDB::bind_method(D_METHOD("unlock"), &Image::unlock);
ClassDB::bind_method(D_METHOD("get_pixelv", "src"), &Image::get_pixelv);
ClassDB::bind_method(D_METHOD("get_pixel", "x", "y"), &Image::get_pixel);
ClassDB::bind_method(D_METHOD("set_pixelv", "dst", "color"), &Image::set_pixelv);
@@ -3137,8 +3069,7 @@ void Image::normalmap_to_xy() {
{
int len = data.size() / 4;
- PoolVector<uint8_t>::Write wp = data.write();
- unsigned char *data_ptr = wp.ptr();
+ uint8_t *data_ptr = data.ptrw();
for (int i = 0; i < len; i++) {
@@ -3162,19 +3093,12 @@ Ref<Image> Image::rgbe_to_srgb() {
new_image.instance();
new_image->create(width, height, 0, Image::FORMAT_RGB8);
- lock();
-
- new_image->lock();
-
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
new_image->set_pixel(col, row, get_pixel(col, row).to_srgb());
}
}
- unlock();
- new_image->unlock();
-
if (has_mipmaps()) {
new_image->generate_mipmaps();
}
@@ -3187,12 +3111,13 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const {
int ofs, size, w, h;
get_mipmap_offset_size_and_dimensions(p_mipamp, ofs, size, w, h);
- PoolVector<uint8_t> new_data;
+ Vector<uint8_t> new_data;
new_data.resize(size);
+
{
- PoolVector<uint8_t>::Write wr = new_data.write();
- PoolVector<uint8_t>::Read rd = data.read();
- copymem(wr.ptr(), rd.ptr() + ofs, size);
+ uint8_t *wr = new_data.ptrw();
+ const uint8_t *rd = data.ptr();
+ copymem(wr, rd + ofs, size);
}
Ref<Image> image;
@@ -3201,6 +3126,7 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const {
image->height = h;
image->format = format;
image->data = new_data;
+
image->mipmaps = false;
return image;
}
@@ -3209,17 +3135,17 @@ void Image::bumpmap_to_normalmap(float bump_scale) {
ERR_FAIL_COND(!_can_modify(format));
convert(Image::FORMAT_RF);
- PoolVector<uint8_t> result_image; //rgba output
+ Vector<uint8_t> result_image; //rgba output
result_image.resize(width * height * 4);
{
- PoolVector<uint8_t>::Read rp = data.read();
- PoolVector<uint8_t>::Write wp = result_image.write();
+ const uint8_t *rp = data.ptr();
+ uint8_t *wp = result_image.ptrw();
- ERR_FAIL_COND(!rp.ptr());
+ ERR_FAIL_COND(!rp);
- unsigned char *write_ptr = wp.ptr();
- float *read_ptr = (float *)rp.ptr();
+ unsigned char *write_ptr = wp;
+ float *read_ptr = (float *)rp;
for (int ty = 0; ty < height; ty++) {
int py = ty + 1;
@@ -3260,8 +3186,7 @@ void Image::srgb_to_linear() {
if (format == FORMAT_RGBA8) {
int len = data.size() / 4;
- PoolVector<uint8_t>::Write wp = data.write();
- unsigned char *data_ptr = wp.ptr();
+ uint8_t *data_ptr = data.ptrw();
for (int i = 0; i < len; i++) {
@@ -3273,8 +3198,7 @@ void Image::srgb_to_linear() {
} else if (format == FORMAT_RGB8) {
int len = data.size() / 3;
- PoolVector<uint8_t>::Write wp = data.write();
- unsigned char *data_ptr = wp.ptr();
+ uint8_t *data_ptr = data.ptrw();
for (int i = 0; i < len; i++) {
@@ -3293,8 +3217,7 @@ void Image::premultiply_alpha() {
if (format != FORMAT_RGBA8)
return; //not needed
- PoolVector<uint8_t>::Write wp = data.write();
- unsigned char *data_ptr = wp.ptr();
+ uint8_t *data_ptr = data.ptrw();
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
@@ -3316,12 +3239,10 @@ void Image::fix_alpha_edges() {
if (format != FORMAT_RGBA8)
return; //not needed
- PoolVector<uint8_t> dcopy = data;
- PoolVector<uint8_t>::Read rp = dcopy.read();
- const uint8_t *srcptr = rp.ptr();
+ Vector<uint8_t> dcopy = data;
+ const uint8_t *srcptr = dcopy.ptr();
- PoolVector<uint8_t>::Write wp = data.write();
- unsigned char *data_ptr = wp.ptr();
+ uint8_t *data_ptr = data.ptrw();
const int max_radius = 4;
const int alpha_threshold = 20;
@@ -3381,15 +3302,15 @@ String Image::get_format_name(Format p_format) {
return format_names[p_format];
}
-Error Image::load_png_from_buffer(const PoolVector<uint8_t> &p_array) {
+Error Image::load_png_from_buffer(const Vector<uint8_t> &p_array) {
return _load_from_buffer(p_array, _png_mem_loader_func);
}
-Error Image::load_jpg_from_buffer(const PoolVector<uint8_t> &p_array) {
+Error Image::load_jpg_from_buffer(const Vector<uint8_t> &p_array) {
return _load_from_buffer(p_array, _jpg_mem_loader_func);
}
-Error Image::load_webp_from_buffer(const PoolVector<uint8_t> &p_array) {
+Error Image::load_webp_from_buffer(const Vector<uint8_t> &p_array) {
return _load_from_buffer(p_array, _webp_mem_loader_func);
}
@@ -3398,7 +3319,7 @@ void Image::convert_rg_to_ra_rgba8() {
ERR_FAIL_COND(!data.size());
int s = data.size();
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
for (int i = 0; i < s; i += 4) {
w[i + 3] = w[i + 1];
w[i + 1] = 0;
@@ -3410,7 +3331,7 @@ void Image::convert_ra_rgba8_to_rg() {
ERR_FAIL_COND(!data.size());
int s = data.size();
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
for (int i = 0; i < s; i += 4) {
w[i + 1] = w[i + 3];
w[i + 2] = 0;
@@ -3418,15 +3339,15 @@ void Image::convert_ra_rgba8_to_rg() {
}
}
-Error Image::_load_from_buffer(const PoolVector<uint8_t> &p_array, ImageMemLoadFunc p_loader) {
+Error Image::_load_from_buffer(const Vector<uint8_t> &p_array, ImageMemLoadFunc p_loader) {
int buffer_size = p_array.size();
ERR_FAIL_COND_V(buffer_size == 0, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(!p_loader, ERR_INVALID_PARAMETER);
- PoolVector<uint8_t>::Read r = p_array.read();
+ const uint8_t *r = p_array.ptr();
- Ref<Image> image = p_loader(r.ptr(), buffer_size);
+ Ref<Image> image = p_loader(r, buffer_size);
ERR_FAIL_COND_V(!image.is_valid(), ERR_PARSE_ERROR);
copy_internals_from(image);
@@ -3516,8 +3437,4 @@ Image::Image() {
}
Image::~Image() {
-
- if (write_lock.ptr()) {
- unlock();
- }
}
diff --git a/core/image.h b/core/image.h
index 1cc22420d5..4dc4bf1328 100644
--- a/core/image.h
+++ b/core/image.h
@@ -33,7 +33,7 @@
#include "core/color.h"
#include "core/math/rect2.h"
-#include "core/pool_vector.h"
+
#include "core/resource.h"
/**
@@ -47,7 +47,7 @@
class Image;
typedef Error (*SavePNGFunc)(const String &p_path, const Ref<Image> &p_img);
-typedef PoolVector<uint8_t> (*SavePNGBufferFunc)(const Ref<Image> &p_img);
+typedef Vector<uint8_t> (*SavePNGBufferFunc)(const Ref<Image> &p_img);
typedef Ref<Image> (*ImageMemLoadFunc)(const uint8_t *p_png, int p_size);
typedef Error (*SaveEXRFunc)(const String &p_path, const Ref<Image> &p_img, bool p_grayscale);
@@ -150,16 +150,14 @@ public:
static void (*_image_decompress_etc1)(Image *);
static void (*_image_decompress_etc2)(Image *);
- static PoolVector<uint8_t> (*lossy_packer)(const Ref<Image> &p_image, float p_quality);
- static Ref<Image> (*lossy_unpacker)(const PoolVector<uint8_t> &p_buffer);
- static PoolVector<uint8_t> (*lossless_packer)(const Ref<Image> &p_image);
- static Ref<Image> (*lossless_unpacker)(const PoolVector<uint8_t> &p_buffer);
- static PoolVector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels);
- static Ref<Image> (*basis_universal_unpacker)(const PoolVector<uint8_t> &p_buffer);
-
- PoolVector<uint8_t>::Write write_lock;
+ static Vector<uint8_t> (*lossy_packer)(const Ref<Image> &p_image, float p_quality);
+ static Ref<Image> (*lossy_unpacker)(const Vector<uint8_t> &p_buffer);
+ static Vector<uint8_t> (*lossless_packer)(const Ref<Image> &p_image);
+ static Ref<Image> (*lossless_unpacker)(const Vector<uint8_t> &p_buffer);
+ static Vector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels);
+ static Ref<Image> (*basis_universal_unpacker)(const Vector<uint8_t> &p_buffer);
- _FORCE_INLINE_ Color _get_color_at_ofs(uint8_t *ptr, uint32_t ofs) const;
+ _FORCE_INLINE_ Color _get_color_at_ofs(const uint8_t *ptr, uint32_t ofs) const;
_FORCE_INLINE_ void _set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color);
protected:
@@ -170,12 +168,12 @@ private:
create(p_width, p_height, p_use_mipmaps, p_format);
}
- void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) {
+ void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
create(p_width, p_height, p_use_mipmaps, p_format, p_data);
}
Format format;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int width, height;
bool mipmaps;
@@ -198,7 +196,7 @@ private:
void _set_data(const Dictionary &p_data);
Dictionary _get_data() const;
- Error _load_from_buffer(const PoolVector<uint8_t> &p_array, ImageMemLoadFunc p_loader);
+ Error _load_from_buffer(const Vector<uint8_t> &p_array, ImageMemLoadFunc p_loader);
static void average_4_uint8(uint8_t &p_out, const uint8_t &p_a, const uint8_t &p_b, const uint8_t &p_c, const uint8_t &p_d);
static void average_4_float(float &p_out, const float &p_a, const float &p_b, const float &p_c, const float &p_d);
@@ -270,7 +268,7 @@ public:
* Create a new image of a given size and format. Current image will be lost
*/
void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format);
- void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data);
+ void create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data);
void create(const char **p_xpm);
/**
@@ -278,11 +276,11 @@ public:
*/
bool empty() const;
- PoolVector<uint8_t> get_data() const;
+ Vector<uint8_t> get_data() const;
Error load(const String &p_path);
Error save_png(const String &p_path) const;
- PoolVector<uint8_t> save_png_to_buffer() const;
+ Vector<uint8_t> save_png_to_buffer() const;
Error save_exr(const String &p_path, bool p_grayscale) const;
/**
@@ -296,7 +294,7 @@ public:
/**
* import an image of a specific size and format from a pointer
*/
- Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data);
+ Image(int p_width, int p_height, bool p_mipmaps, Format p_format, const Vector<uint8_t> &p_data);
enum AlphaMode {
ALPHA_NONE,
@@ -358,9 +356,9 @@ public:
static void set_compress_bptc_func(void (*p_compress_func)(Image *, float, UsedChannels));
static String get_format_name(Format p_format);
- Error load_png_from_buffer(const PoolVector<uint8_t> &p_array);
- Error load_jpg_from_buffer(const PoolVector<uint8_t> &p_array);
- Error load_webp_from_buffer(const PoolVector<uint8_t> &p_array);
+ Error load_png_from_buffer(const Vector<uint8_t> &p_array);
+ Error load_jpg_from_buffer(const Vector<uint8_t> &p_array);
+ Error load_webp_from_buffer(const Vector<uint8_t> &p_array);
void convert_rg_to_ra_rgba8();
void convert_ra_rgba8_to_rg();
@@ -370,9 +368,6 @@ public:
virtual Ref<Resource> duplicate(bool p_subresources = false) const;
- void lock();
- void unlock();
-
UsedChannels detect_used_channels(CompressSource p_source = COMPRESS_SOURCE_GENERIC);
void optimize_channels();
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 36a0e88ae0..b855e14e0d 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -256,76 +256,76 @@ void InputMap::load_default() {
add_action("ui_accept");
key.instance();
- key->set_scancode(KEY_ENTER);
+ key->set_keycode(KEY_ENTER);
action_add_event("ui_accept", key);
key.instance();
- key->set_scancode(KEY_KP_ENTER);
+ key->set_keycode(KEY_KP_ENTER);
action_add_event("ui_accept", key);
key.instance();
- key->set_scancode(KEY_SPACE);
+ key->set_keycode(KEY_SPACE);
action_add_event("ui_accept", key);
add_action("ui_select");
key.instance();
- key->set_scancode(KEY_SPACE);
+ key->set_keycode(KEY_SPACE);
action_add_event("ui_select", key);
add_action("ui_cancel");
key.instance();
- key->set_scancode(KEY_ESCAPE);
+ key->set_keycode(KEY_ESCAPE);
action_add_event("ui_cancel", key);
add_action("ui_focus_next");
key.instance();
- key->set_scancode(KEY_TAB);
+ key->set_keycode(KEY_TAB);
action_add_event("ui_focus_next", key);
add_action("ui_focus_prev");
key.instance();
- key->set_scancode(KEY_TAB);
+ key->set_keycode(KEY_TAB);
key->set_shift(true);
action_add_event("ui_focus_prev", key);
add_action("ui_left");
key.instance();
- key->set_scancode(KEY_LEFT);
+ key->set_keycode(KEY_LEFT);
action_add_event("ui_left", key);
add_action("ui_right");
key.instance();
- key->set_scancode(KEY_RIGHT);
+ key->set_keycode(KEY_RIGHT);
action_add_event("ui_right", key);
add_action("ui_up");
key.instance();
- key->set_scancode(KEY_UP);
+ key->set_keycode(KEY_UP);
action_add_event("ui_up", key);
add_action("ui_down");
key.instance();
- key->set_scancode(KEY_DOWN);
+ key->set_keycode(KEY_DOWN);
action_add_event("ui_down", key);
add_action("ui_page_up");
key.instance();
- key->set_scancode(KEY_PAGEUP);
+ key->set_keycode(KEY_PAGEUP);
action_add_event("ui_page_up", key);
add_action("ui_page_down");
key.instance();
- key->set_scancode(KEY_PAGEDOWN);
+ key->set_keycode(KEY_PAGEDOWN);
action_add_event("ui_page_down", key);
add_action("ui_home");
key.instance();
- key->set_scancode(KEY_HOME);
+ key->set_keycode(KEY_HOME);
action_add_event("ui_home", key);
add_action("ui_end");
key.instance();
- key->set_scancode(KEY_END);
+ key->set_keycode(KEY_END);
action_add_event("ui_end", key);
//set("display/window/handheld/orientation", "landscape");
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 5968972143..531467ecd6 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -34,11 +34,11 @@
#include "core/os/keyboard.h"
#include "core/variant_parser.h"
-PoolStringArray ConfigFile::_get_sections() const {
+PackedStringArray ConfigFile::_get_sections() const {
List<String> s;
get_sections(&s);
- PoolStringArray arr;
+ PackedStringArray arr;
arr.resize(s.size());
int idx = 0;
for (const List<String>::Element *E = s.front(); E; E = E->next()) {
@@ -49,11 +49,11 @@ PoolStringArray ConfigFile::_get_sections() const {
return arr;
}
-PoolStringArray ConfigFile::_get_section_keys(const String &p_section) const {
+PackedStringArray ConfigFile::_get_section_keys(const String &p_section) const {
List<String> s;
get_section_keys(p_section, &s);
- PoolStringArray arr;
+ PackedStringArray arr;
arr.resize(s.size());
int idx = 0;
for (const List<String>::Element *E = s.front(); E; E = E->next()) {
@@ -86,7 +86,8 @@ void ConfigFile::set_value(const String &p_section, const String &p_key, const V
Variant ConfigFile::get_value(const String &p_section, const String &p_key, Variant p_default) const {
if (!values.has(p_section) || !values[p_section].has(p_key)) {
- ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, Variant(), "Couldn't find the given section '" + p_section + "', key '" + p_key + "' and no default was given.");
+ ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, Variant(),
+ vformat("Couldn't find the given section \"%s\" and key \"%s\", and no default was given.", p_section, p_key));
return p_default;
}
@@ -112,7 +113,7 @@ void ConfigFile::get_sections(List<String> *r_sections) const {
}
void ConfigFile::get_section_keys(const String &p_section, List<String> *r_keys) const {
- ERR_FAIL_COND_MSG(!values.has(p_section), "Cannont get keys from nonexistent section '" + p_section + "'.");
+ ERR_FAIL_COND_MSG(!values.has(p_section), vformat("Cannot get keys from nonexistent section \"%s\".", p_section));
for (OrderedHashMap<String, Variant>::ConstElement E = values[p_section].front(); E; E = E.next()) {
r_keys->push_back(E.key());
@@ -121,12 +122,14 @@ void ConfigFile::get_section_keys(const String &p_section, List<String> *r_keys)
void ConfigFile::erase_section(const String &p_section) {
+ ERR_FAIL_COND_MSG(!values.has(p_section), vformat("Cannot erase nonexistent section \"%s\".", p_section));
values.erase(p_section);
}
void ConfigFile::erase_section_key(const String &p_section, const String &p_key) {
- ERR_FAIL_COND_MSG(!values.has(p_section), "Cannot erase key from nonexistent section '" + p_section + "'.");
+ ERR_FAIL_COND_MSG(!values.has(p_section), vformat("Cannot erase key \"%s\" from nonexistent section \"%s\".", p_key, p_section));
+ ERR_FAIL_COND_MSG(!values[p_section].has(p_key), vformat("Cannot erase nonexistent key \"%s\" from section \"%s\".", p_key, p_section));
values[p_section].erase(p_key);
}
@@ -291,7 +294,7 @@ Error ConfigFile::_parse(const String &p_path, VariantParser::Stream *p_stream)
if (err == ERR_FILE_EOF) {
return OK;
} else if (err != OK) {
- ERR_PRINT("ConfgFile - " + p_path + ":" + itos(lines) + " error: " + error_text + ".");
+ ERR_PRINT(vformat("ConfigFile parse error at %s:%d: %s.", p_path, lines, error_text));
return err;
}
@@ -324,11 +327,8 @@ void ConfigFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("save", "path"), &ConfigFile::save);
ClassDB::bind_method(D_METHOD("load_encrypted", "path", "key"), &ConfigFile::load_encrypted);
- ClassDB::bind_method(D_METHOD("load_encrypted_pass", "path", "pass"), &ConfigFile::load_encrypted_pass);
+ ClassDB::bind_method(D_METHOD("load_encrypted_pass", "path", "password"), &ConfigFile::load_encrypted_pass);
ClassDB::bind_method(D_METHOD("save_encrypted", "path", "key"), &ConfigFile::save_encrypted);
- ClassDB::bind_method(D_METHOD("save_encrypted_pass", "path", "pass"), &ConfigFile::save_encrypted_pass);
-}
-
-ConfigFile::ConfigFile() {
+ ClassDB::bind_method(D_METHOD("save_encrypted_pass", "path", "password"), &ConfigFile::save_encrypted_pass);
}
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 2d61ef6afe..7efcb5a04c 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -42,8 +42,8 @@ class ConfigFile : public Reference {
OrderedHashMap<String, OrderedHashMap<String, Variant> > values;
- PoolStringArray _get_sections() const;
- PoolStringArray _get_section_keys(const String &p_section) const;
+ PackedStringArray _get_sections() const;
+ PackedStringArray _get_section_keys(const String &p_section) const;
Error _internal_load(const String &p_path, FileAccess *f);
Error _internal_save(FileAccess *file);
@@ -74,8 +74,6 @@ public:
Error save_encrypted(const String &p_path, const Vector<uint8_t> &p_key);
Error save_encrypted_pass(const String &p_path, const String &p_pass);
-
- ConfigFile();
};
#endif // CONFIG_FILE_H
diff --git a/drivers/unix/mutex_posix.h b/core/io/dtls_server.cpp
index bd67106836..07e6abb1c9 100644
--- a/drivers/unix/mutex_posix.h
+++ b/core/io/dtls_server.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* mutex_posix.h */
+/* dtls_server.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,34 +28,27 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef MUTEX_POSIX_H
-#define MUTEX_POSIX_H
+#include "dtls_server.h"
+#include "core/os/file_access.h"
+#include "core/project_settings.h"
-#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
+DTLSServer *(*DTLSServer::_create)() = NULL;
+bool DTLSServer::available = false;
-#include "core/os/mutex.h"
+DTLSServer *DTLSServer::create() {
-#include <pthread.h>
+ return _create();
+}
-class MutexPosix : public Mutex {
+bool DTLSServer::is_available() {
+ return available;
+}
- pthread_mutexattr_t attr;
- pthread_mutex_t mutex;
+void DTLSServer::_bind_methods() {
- static Mutex *create_func_posix(bool p_recursive);
+ ClassDB::bind_method(D_METHOD("setup", "key", "certificate", "chain"), &DTLSServer::setup, DEFVAL(Ref<X509Certificate>()));
+ ClassDB::bind_method(D_METHOD("take_connection", "udp_peer"), &DTLSServer::take_connection);
+}
-public:
- virtual void lock();
- virtual void unlock();
- virtual Error try_lock();
-
- static void make_default();
-
- MutexPosix(bool p_recursive);
-
- ~MutexPosix();
-};
-
-#endif
-
-#endif
+DTLSServer::DTLSServer() {
+}
diff --git a/core/io/dtls_server.h b/core/io/dtls_server.h
new file mode 100644
index 0000000000..7b08138f7f
--- /dev/null
+++ b/core/io/dtls_server.h
@@ -0,0 +1,57 @@
+/*************************************************************************/
+/* dtls_server.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 DTLS_SERVER_H
+#define DTLS_SERVER_H
+
+#include "core/io/net_socket.h"
+#include "core/io/packet_peer_dtls.h"
+
+class DTLSServer : public Reference {
+ GDCLASS(DTLSServer, Reference);
+
+protected:
+ static DTLSServer *(*_create)();
+ static void _bind_methods();
+
+ static bool available;
+
+public:
+ static bool is_available();
+ static DTLSServer *create();
+
+ virtual Error setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>()) = 0;
+ virtual void stop() = 0;
+ virtual Ref<PacketPeerDTLS> take_connection(Ref<PacketPeerUDP> p_peer) = 0;
+
+ DTLSServer();
+};
+
+#endif // DTLS_SERVER_H
diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp
index 6ac065a19b..ab0fb3943c 100644
--- a/core/io/file_access_buffered.cpp
+++ b/core/io/file_access_buffered.cpp
@@ -113,7 +113,7 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const {
int size = (cache.buffer.size() - (file.offset - cache.offset));
size = size - (size % 4);
- //PoolVector<uint8_t>::Read read = cache.buffer.read();
+ //const uint8_t* read = cache.buffer.ptr();
//memcpy(p_dest, read.ptr() + (file.offset - cache.offset), size);
memcpy(p_dest, cache.buffer.ptr() + (file.offset - cache.offset), size);
p_dest += size;
@@ -145,7 +145,7 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const {
}
int r = MIN(left, to_read);
- //PoolVector<uint8_t>::Read read = cache.buffer.read();
+ //const uint8_t* read = cache.buffer.ptr();
//memcpy(p_dest+total_read, &read.ptr()[file.offset - cache.offset], r);
memcpy(p_dest + total_read, cache.buffer.ptr() + (file.offset - cache.offset), r);
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 5e2939c1a2..a6177c20be 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -32,7 +32,7 @@
#define FILE_ACCESS_BUFFERED_H
#include "core/os/file_access.h"
-#include "core/pool_vector.h"
+
#include "core/ustring.h"
class FileAccessBuffered : public FileAccess {
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index c17652080c..6ec77d503b 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -54,8 +54,8 @@ class FileAccessBufferedFA : public FileAccessBuffered {
cache.offset = p_offset;
cache.buffer.resize(p_size);
- // on PoolVector
- //PoolVector<uint8_t>::Write write = cache.buffer.write();
+ // on Vector
+ //uint8_t* write = cache.buffer.ptrw();
//f.get_buffer(write.ptrw(), p_size);
// on vector
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 202eb89dbd..370dd8f982 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -42,14 +42,14 @@
void FileAccessNetworkClient::lock_mutex() {
- mutex->lock();
+ mutex.lock();
lockcount++;
}
void FileAccessNetworkClient::unlock_mutex() {
lockcount--;
- mutex->unlock();
+ mutex.unlock();
}
void FileAccessNetworkClient::put_32(int p_32) {
@@ -88,24 +88,23 @@ void FileAccessNetworkClient::_thread_func() {
while (!quit) {
DEBUG_PRINT("SEM WAIT - " + itos(sem->get()));
- Error err = sem->wait();
- if (err != OK)
- ERR_PRINT("sem->wait() failed");
+ sem.wait();
DEBUG_TIME("sem_unlock");
//DEBUG_PRINT("semwait returned "+itos(werr));
DEBUG_PRINT("MUTEX LOCK " + itos(lockcount));
lock_mutex();
DEBUG_PRINT("MUTEX PASS");
- blockrequest_mutex->lock();
- while (block_requests.size()) {
- put_32(block_requests.front()->get().id);
- put_32(FileAccessNetwork::COMMAND_READ_BLOCK);
- put_64(block_requests.front()->get().offset);
- put_32(block_requests.front()->get().size);
- block_requests.pop_front();
+ {
+ MutexLock lock(blockrequest_mutex);
+ while (block_requests.size()) {
+ put_32(block_requests.front()->get().id);
+ put_32(FileAccessNetwork::COMMAND_READ_BLOCK);
+ put_64(block_requests.front()->get().offset);
+ put_32(block_requests.front()->get().size);
+ block_requests.pop_front();
+ }
}
- blockrequest_mutex->unlock();
DEBUG_PRINT("THREAD ITER");
@@ -140,7 +139,7 @@ void FileAccessNetworkClient::_thread_func() {
fa->_respond(len, Error(status));
}
- fa->sem->post();
+ fa->sem.post();
} break;
case FileAccessNetwork::RESPONSE_DATA: {
@@ -160,14 +159,14 @@ void FileAccessNetworkClient::_thread_func() {
int status = get_32();
fa->exists_modtime = status != 0;
- fa->sem->post();
+ fa->sem.post();
} break;
case FileAccessNetwork::RESPONSE_GET_MODTIME: {
uint64_t status = get_64();
fa->exists_modtime = status;
- fa->sem->post();
+ fa->sem.post();
} break;
}
@@ -225,13 +224,10 @@ FileAccessNetworkClient *FileAccessNetworkClient::singleton = NULL;
FileAccessNetworkClient::FileAccessNetworkClient() {
thread = NULL;
- mutex = Mutex::create();
- blockrequest_mutex = Mutex::create();
quit = false;
singleton = this;
last_id = 0;
client.instance();
- sem = SemaphoreOld::create();
lockcount = 0;
}
@@ -239,14 +235,10 @@ FileAccessNetworkClient::~FileAccessNetworkClient() {
if (thread) {
quit = true;
- sem->post();
+ sem.post();
Thread::wait_to_finish(thread);
memdelete(thread);
}
-
- memdelete(blockrequest_mutex);
- memdelete(mutex);
- memdelete(sem);
}
void FileAccessNetwork::_set_block(int p_offset, const Vector<uint8_t> &p_block) {
@@ -259,14 +251,15 @@ void FileAccessNetwork::_set_block(int p_offset, const Vector<uint8_t> &p_block)
ERR_FAIL_COND((p_block.size() != (int)(total_size % page_size)));
}
- buffer_mutex->lock();
- pages.write[page].buffer = p_block;
- pages.write[page].queued = false;
- buffer_mutex->unlock();
+ {
+ MutexLock lock(buffer_mutex);
+ pages.write[page].buffer = p_block;
+ pages.write[page].queued = false;
+ }
if (waiting_on_page == page) {
waiting_on_page = -1;
- page_sem->post();
+ page_sem.post();
}
}
@@ -308,9 +301,9 @@ Error FileAccessNetwork::_open(const String &p_path, int p_mode_flags) {
nc->unlock_mutex();
DEBUG_PRINT("OPEN POST");
DEBUG_TIME("open_post");
- nc->sem->post(); //awaiting answer
+ nc->sem.post(); //awaiting answer
DEBUG_PRINT("WAIT...");
- sem->wait();
+ sem.wait();
DEBUG_TIME("open_end");
DEBUG_PRINT("WAIT ENDED...");
@@ -384,17 +377,18 @@ void FileAccessNetwork::_queue_page(int p_page) const {
if (pages[p_page].buffer.empty() && !pages[p_page].queued) {
FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
-
- nc->blockrequest_mutex->lock();
- FileAccessNetworkClient::BlockRequest br;
- br.id = id;
- br.offset = size_t(p_page) * page_size;
- br.size = page_size;
- nc->block_requests.push_back(br);
- pages.write[p_page].queued = true;
- nc->blockrequest_mutex->unlock();
+ {
+ MutexLock lock(nc->blockrequest_mutex);
+
+ FileAccessNetworkClient::BlockRequest br;
+ br.id = id;
+ br.offset = size_t(p_page) * page_size;
+ br.size = page_size;
+ nc->block_requests.push_back(br);
+ pages.write[p_page].queued = true;
+ }
DEBUG_PRINT("QUEUE PAGE POST");
- nc->sem->post();
+ nc->sem.post();
DEBUG_PRINT("queued " + itos(p_page));
}
}
@@ -418,16 +412,16 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const {
int page = pos / page_size;
if (page != last_page) {
- buffer_mutex->lock();
+ buffer_mutex.lock();
if (pages[page].buffer.empty()) {
waiting_on_page = page;
for (int j = 0; j < read_ahead; j++) {
_queue_page(page + j);
}
- buffer_mutex->unlock();
+ buffer_mutex.unlock();
DEBUG_PRINT("wait");
- page_sem->wait();
+ page_sem.wait();
DEBUG_PRINT("done");
} else {
@@ -436,7 +430,7 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const {
_queue_page(page + j);
}
//queue pages
- buffer_mutex->unlock();
+ buffer_mutex.unlock();
}
buff = pages.write[page].buffer.ptrw();
@@ -476,8 +470,8 @@ bool FileAccessNetwork::file_exists(const String &p_path) {
nc->client->put_data((const uint8_t *)cs.ptr(), cs.length());
nc->unlock_mutex();
DEBUG_PRINT("FILE EXISTS POST");
- nc->sem->post();
- sem->wait();
+ nc->sem.post();
+ sem.wait();
return exists_modtime != 0;
}
@@ -493,8 +487,8 @@ uint64_t FileAccessNetwork::_get_modified_time(const String &p_file) {
nc->client->put_data((const uint8_t *)cs.ptr(), cs.length());
nc->unlock_mutex();
DEBUG_PRINT("MODTIME POST");
- nc->sem->post();
- sem->wait();
+ nc->sem.post();
+ sem.wait();
return exists_modtime;
}
@@ -522,9 +516,6 @@ FileAccessNetwork::FileAccessNetwork() {
eof_flag = false;
opened = false;
pos = 0;
- sem = SemaphoreOld::create();
- page_sem = SemaphoreOld::create();
- buffer_mutex = Mutex::create();
FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
nc->lock_mutex();
id = nc->last_id++;
@@ -540,9 +531,6 @@ FileAccessNetwork::FileAccessNetwork() {
FileAccessNetwork::~FileAccessNetwork() {
close();
- memdelete(sem);
- memdelete(page_sem);
- memdelete(buffer_mutex);
FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
nc->lock_mutex();
diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h
index f329abf7c5..7f664b46f7 100644
--- a/core/io/file_access_network.h
+++ b/core/io/file_access_network.h
@@ -49,11 +49,11 @@ class FileAccessNetworkClient {
List<BlockRequest> block_requests;
- SemaphoreOld *sem;
+ Semaphore sem;
Thread *thread;
bool quit;
- Mutex *mutex;
- Mutex *blockrequest_mutex;
+ Mutex mutex;
+ Mutex blockrequest_mutex;
Map<int, FileAccessNetwork *> accesses;
Ref<StreamPeerTCP> client;
int last_id;
@@ -85,9 +85,9 @@ public:
class FileAccessNetwork : public FileAccess {
- SemaphoreOld *sem;
- SemaphoreOld *page_sem;
- Mutex *buffer_mutex;
+ Semaphore sem;
+ Semaphore page_sem;
+ Mutex buffer_mutex;
bool opened;
size_t total_size;
mutable size_t pos;
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index 83ce03418a..055ce816ad 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -454,7 +454,7 @@ Error DirAccessPack::change_dir(String p_dir) {
return OK;
}
-String DirAccessPack::get_current_dir() {
+String DirAccessPack::get_current_dir(bool p_include_drive) {
PackedData::PackedDir *pd = current;
String p = current->name;
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index b6ea9c158f..e1f35aabdd 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -216,7 +216,7 @@ public:
virtual String get_drive(int p_drive);
virtual Error change_dir(String p_dir);
- virtual String get_current_dir();
+ virtual String get_current_dir(bool p_include_drive = true);
virtual bool file_exists(String p_file);
virtual bool dir_exists(String p_dir);
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 541bd3a7c8..ce7025de35 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -110,7 +110,7 @@ Ref<StreamPeer> HTTPClient::get_connection() const {
return connection;
}
-Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body) {
+Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body) {
ERR_FAIL_INDEX_V(p_method, METHOD_MAX, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(!p_url.begins_with("/"), ERR_INVALID_PARAMETER);
@@ -152,10 +152,10 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector
request += "\r\n";
CharString cs = request.utf8();
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(cs.length());
{
- PoolVector<uint8_t>::Write data_write = data.write();
+ uint8_t *data_write = data.ptrw();
for (int i = 0; i < cs.length(); i++) {
data_write[i] = cs[i];
}
@@ -163,7 +163,7 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector
data.append_array(p_body);
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t *r = data.ptr();
Error err = connection->put_data(&r[0], data.size());
if (err) {
@@ -517,11 +517,11 @@ int HTTPClient::get_response_body_length() const {
return body_size;
}
-PoolByteArray HTTPClient::read_response_body_chunk() {
+PackedByteArray HTTPClient::read_response_body_chunk() {
- ERR_FAIL_COND_V(status != STATUS_BODY, PoolByteArray());
+ ERR_FAIL_COND_V(status != STATUS_BODY, PackedByteArray());
- PoolByteArray ret;
+ PackedByteArray ret;
Error err = OK;
if (chunked) {
@@ -622,8 +622,8 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
}
ret.resize(chunk.size() - 2);
- PoolByteArray::Write w = ret.write();
- copymem(w.ptr(), chunk.ptr(), chunk.size() - 2);
+ uint8_t *w = ret.ptrw();
+ copymem(w, chunk.ptr(), chunk.size() - 2);
chunk.clear();
}
@@ -639,8 +639,8 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
while (to_read > 0) {
int rec = 0;
{
- PoolByteArray::Write w = ret.write();
- err = _get_http_data(w.ptr() + _offset, to_read, rec);
+ uint8_t *w = ret.ptrw();
+ err = _get_http_data(w + _offset, to_read, rec);
}
if (rec <= 0) { // Ended up reading less
ret.resize(_offset);
@@ -801,11 +801,11 @@ Dictionary HTTPClient::_get_response_headers_as_dictionary() {
return ret;
}
-PoolStringArray HTTPClient::_get_response_headers() {
+PackedStringArray HTTPClient::_get_response_headers() {
List<String> rh;
get_response_headers(&rh);
- PoolStringArray ret;
+ PackedStringArray ret;
ret.resize(rh.size());
int idx = 0;
for (const List<String>::Element *E = rh.front(); E; E = E->next()) {
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 3796eb992c..03ba20f8dd 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -191,7 +191,7 @@ private:
#include "platform/javascript/http_client.h.inc"
#endif
- PoolStringArray _get_response_headers();
+ PackedStringArray _get_response_headers();
Dictionary _get_response_headers_as_dictionary();
static void _bind_methods();
@@ -202,7 +202,7 @@ public:
void set_connection(const Ref<StreamPeer> &p_connection);
Ref<StreamPeer> get_connection() const;
- Error request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body);
+ Error request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body);
Error request(Method p_method, const String &p_url, const Vector<String> &p_headers, const String &p_body = String());
void close();
@@ -215,7 +215,7 @@ public:
Error get_response_headers(List<String> *r_response);
int get_response_body_length() const;
- PoolByteArray read_response_body_chunk(); // Can't get body as partial text because of most encodings UTF8, gzip, etc.
+ PackedByteArray read_response_body_chunk(); // Can't get body as partial text because of most encodings UTF8, gzip, etc.
void set_blocking_mode(bool p_enable); // Useful mostly if running in a thread
bool is_blocking_mode_enabled() const;
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp
index 720f25f91b..99ac5bcdd9 100644
--- a/core/io/image_loader.cpp
+++ b/core/io/image_loader.cpp
@@ -129,7 +129,7 @@ void ImageLoader::cleanup() {
/////////////////
-RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index d6dfd261ca..3ba028b99c 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -73,7 +73,7 @@ public:
class ResourceFormatLoaderImage : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index 7d18117711..2143b84d15 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -70,8 +70,8 @@ struct _IP_ResolverPrivate {
return IP::RESOLVER_INVALID_ID;
}
- Mutex *mutex;
- SemaphoreOld *sem;
+ Mutex mutex;
+ Semaphore sem;
Thread *thread;
//Semaphore* semaphore;
@@ -98,11 +98,10 @@ struct _IP_ResolverPrivate {
while (!ipr->thread_abort) {
- ipr->sem->wait();
+ ipr->sem.wait();
- ipr->mutex->lock();
+ MutexLock lock(ipr->mutex);
ipr->resolve_queues();
- ipr->mutex->unlock();
}
}
@@ -115,30 +114,27 @@ struct _IP_ResolverPrivate {
IP_Address IP::resolve_hostname(const String &p_hostname, IP::Type p_type) {
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
IP_Address res = resolver->cache[key];
- resolver->mutex->unlock();
return res;
}
IP_Address res = _resolve_hostname(p_hostname, p_type);
resolver->cache[key] = res;
- resolver->mutex->unlock();
return res;
}
IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Type p_type) {
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
ResolverID id = resolver->find_empty_id();
if (id == RESOLVER_INVALID_ID) {
WARN_PRINT("Out of resolver queries");
- resolver->mutex->unlock();
return id;
}
@@ -152,12 +148,11 @@ IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Typ
resolver->queue[id].response = IP_Address();
resolver->queue[id].status = IP::RESOLVER_STATUS_WAITING;
if (resolver->thread)
- resolver->sem->post();
+ resolver->sem.post();
else
resolver->resolve_queues();
}
- resolver->mutex->unlock();
return id;
}
@@ -165,50 +160,43 @@ IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP::RESOLVER_STATUS_NONE);
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
+
if (resolver->queue[p_id].status == IP::RESOLVER_STATUS_NONE) {
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
- resolver->mutex->unlock();
+ resolver->mutex.unlock();
return IP::RESOLVER_STATUS_NONE;
}
- IP::ResolverStatus res = resolver->queue[p_id].status;
-
- resolver->mutex->unlock();
- return res;
+ return resolver->queue[p_id].status;
}
IP_Address IP::get_resolve_item_address(ResolverID p_id) const {
ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP_Address());
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
if (resolver->queue[p_id].status != IP::RESOLVER_STATUS_DONE) {
ERR_PRINT("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
- resolver->mutex->unlock();
+ resolver->mutex.unlock();
return IP_Address();
}
- IP_Address res = resolver->queue[p_id].response;
-
- resolver->mutex->unlock();
- return res;
+ return resolver->queue[p_id].response;
}
void IP::erase_resolve_item(ResolverID p_id) {
ERR_FAIL_INDEX(p_id, IP::RESOLVER_MAX_QUERIES);
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
resolver->queue[p_id].status = IP::RESOLVER_STATUS_NONE;
-
- resolver->mutex->unlock();
}
void IP::clear_cache(const String &p_hostname) {
- resolver->mutex->lock();
+ MutexLock lock(resolver->mutex);
if (p_hostname.empty()) {
resolver->cache.clear();
@@ -218,8 +206,6 @@ void IP::clear_cache(const String &p_hostname) {
resolver->cache.erase(_IP_ResolverPrivate::get_cache_key(p_hostname, IP::TYPE_IPV6));
resolver->cache.erase(_IP_ResolverPrivate::get_cache_key(p_hostname, IP::TYPE_ANY));
}
-
- resolver->mutex->unlock();
}
Array IP::_get_local_addresses() const {
@@ -314,24 +300,13 @@ IP::IP() {
singleton = this;
resolver = memnew(_IP_ResolverPrivate);
- resolver->sem = NULL;
- resolver->mutex = Mutex::create();
#ifndef NO_THREADS
- resolver->sem = SemaphoreOld::create();
- if (resolver->sem) {
- resolver->thread_abort = false;
-
- resolver->thread = Thread::create(_IP_ResolverPrivate::_thread_function, resolver);
+ resolver->thread_abort = false;
- if (!resolver->thread)
- memdelete(resolver->sem); //wtf
- } else {
- resolver->thread = NULL;
- }
+ resolver->thread = Thread::create(_IP_ResolverPrivate::_thread_function, resolver);
#else
- resolver->sem = NULL;
resolver->thread = NULL;
#endif
}
@@ -341,14 +316,12 @@ IP::~IP() {
#ifndef NO_THREADS
if (resolver->thread) {
resolver->thread_abort = true;
- resolver->sem->post();
+ resolver->sem.post();
Thread::wait_to_finish(resolver->thread);
memdelete(resolver->thread);
- memdelete(resolver->sem);
}
#endif
- memdelete(resolver->mutex);
memdelete(resolver);
}
diff --git a/core/io/json.cpp b/core/io/json.cpp
index 144e4bdc3b..3a0edceb81 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -70,10 +70,12 @@ String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_
case Variant::NIL: return "null";
case Variant::BOOL: return p_var.operator bool() ? "true" : "false";
case Variant::INT: return itos(p_var);
- case Variant::REAL: return rtos(p_var);
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
+ case Variant::FLOAT: return rtos(p_var);
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
case Variant::ARRAY: {
String s = "[";
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 17edc4982c..fbcaa582b7 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -147,7 +147,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (type & ENCODE_FLAG_64) {
ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
@@ -186,7 +186,19 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (r_len)
(*r_len) += 4 * 2;
- } break; // 5
+ } break;
+ case Variant::VECTOR2I: {
+
+ ERR_FAIL_COND_V(len < 4 * 2, ERR_INVALID_DATA);
+ Vector2i val;
+ val.x = decode_uint32(&buf[0]);
+ val.y = decode_uint32(&buf[4]);
+ r_variant = val;
+
+ if (r_len)
+ (*r_len) += 4 * 2;
+
+ } break;
case Variant::RECT2: {
ERR_FAIL_COND_V(len < 4 * 4, ERR_INVALID_DATA);
@@ -201,6 +213,20 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
(*r_len) += 4 * 4;
} break;
+ case Variant::RECT2I: {
+
+ ERR_FAIL_COND_V(len < 4 * 4, ERR_INVALID_DATA);
+ Rect2i val;
+ val.position.x = decode_uint32(&buf[0]);
+ val.position.y = decode_uint32(&buf[4]);
+ val.size.x = decode_uint32(&buf[8]);
+ val.size.y = decode_uint32(&buf[12]);
+ r_variant = val;
+
+ if (r_len)
+ (*r_len) += 4 * 4;
+
+ } break;
case Variant::VECTOR3: {
ERR_FAIL_COND_V(len < 4 * 3, ERR_INVALID_DATA);
@@ -214,6 +240,19 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
(*r_len) += 4 * 3;
} break;
+ case Variant::VECTOR3I: {
+
+ ERR_FAIL_COND_V(len < 4 * 3, ERR_INVALID_DATA);
+ Vector3i val;
+ val.x = decode_uint32(&buf[0]);
+ val.y = decode_uint32(&buf[4]);
+ val.z = decode_uint32(&buf[8]);
+ r_variant = val;
+
+ if (r_len)
+ (*r_len) += 4 * 3;
+
+ } break;
case Variant::TRANSFORM2D: {
ERR_FAIL_COND_V(len < 4 * 6, ERR_INVALID_DATA);
@@ -328,6 +367,16 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
(*r_len) += 4 * 4;
} break;
+ case Variant::STRING_NAME: {
+
+ String str;
+ Error err = _decode_string(buf, len, r_len, str);
+ if (err)
+ return err;
+ r_variant = StringName(str);
+
+ } break;
+
case Variant::NODE_PATH: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
@@ -455,6 +504,15 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
+ case Variant::CALLABLE: {
+
+ r_variant = Callable();
+ } break;
+ case Variant::SIGNAL: {
+
+ r_variant = Signal();
+ } break;
+
case Variant::DICTIONARY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
@@ -535,7 +593,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
} break;
// arrays
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -543,11 +601,11 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
len -= 4;
ERR_FAIL_COND_V(count < 0 || count > len, ERR_INVALID_DATA);
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
if (count) {
data.resize(count);
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
for (int32_t i = 0; i < count; i++) {
w[i] = buf[i];
@@ -563,7 +621,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -572,12 +630,12 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 > len, ERR_INVALID_DATA);
- PoolVector<int> data;
+ Vector<int32_t> data;
if (count) {
//const int*rbuf=(const int*)buf;
data.resize(count);
- PoolVector<int>::Write w = data.write();
+ int32_t *w = data.ptrw();
for (int32_t i = 0; i < count; i++) {
w[i] = decode_uint32(&buf[i * 4]);
@@ -585,11 +643,37 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
r_variant = Variant(data);
if (r_len) {
- (*r_len) += 4 + count * sizeof(int);
+ (*r_len) += 4 + count * sizeof(int32_t);
}
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
+
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int64_t count = decode_uint64(buf);
+ buf += 4;
+ len -= 4;
+ ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA);
+
+ Vector<int64_t> data;
+
+ if (count) {
+ //const int*rbuf=(const int*)buf;
+ data.resize(count);
+ int64_t *w = data.ptrw();
+ for (int64_t i = 0; i < count; i++) {
+
+ w[i] = decode_uint64(&buf[i * 8]);
+ }
+ }
+ r_variant = Variant(data);
+ if (r_len) {
+ (*r_len) += 4 + count * sizeof(int64_t);
+ }
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -598,12 +682,12 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 > len, ERR_INVALID_DATA);
- PoolVector<float> data;
+ Vector<float> data;
if (count) {
//const float*rbuf=(const float*)buf;
data.resize(count);
- PoolVector<float>::Write w = data.write();
+ float *w = data.ptrw();
for (int32_t i = 0; i < count; i++) {
w[i] = decode_float(&buf[i * 4]);
@@ -616,12 +700,39 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int64_t count = decode_uint64(buf);
+ buf += 4;
+ len -= 4;
+ ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA);
+
+ Vector<double> data;
+
+ if (count) {
+ //const double*rbuf=(const double*)buf;
+ data.resize(count);
+ double *w = data.ptrw();
+ for (int64_t i = 0; i < count; i++) {
+
+ w[i] = decode_double(&buf[i * 8]);
+ }
+ }
+ r_variant = data;
+
+ if (r_len) {
+ (*r_len) += 4 + count * sizeof(double);
+ }
+
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
- PoolVector<String> strings;
+ Vector<String> strings;
buf += 4;
len -= 4;
@@ -642,7 +753,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = strings;
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -651,7 +762,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4 * 2, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 * 2 > len, ERR_INVALID_DATA);
- PoolVector<Vector2> varray;
+ Vector<Vector2> varray;
if (r_len) {
(*r_len) += 4;
@@ -659,7 +770,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (count) {
varray.resize(count);
- PoolVector<Vector2>::Write w = varray.write();
+ Vector2 *w = varray.ptrw();
for (int32_t i = 0; i < count; i++) {
@@ -676,7 +787,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = varray;
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -686,7 +797,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4 * 3, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 * 3 > len, ERR_INVALID_DATA);
- PoolVector<Vector3> varray;
+ Vector<Vector3> varray;
if (r_len) {
(*r_len) += 4;
@@ -694,7 +805,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (count) {
varray.resize(count);
- PoolVector<Vector3>::Write w = varray.write();
+ Vector3 *w = varray.ptrw();
for (int32_t i = 0; i < count; i++) {
@@ -712,7 +823,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = varray;
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -722,7 +833,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4 * 4, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 * 4 > len, ERR_INVALID_DATA);
- PoolVector<Color> carray;
+ Vector<Color> carray;
if (r_len) {
(*r_len) += 4;
@@ -730,7 +841,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (count) {
carray.resize(count);
- PoolVector<Color>::Write w = carray.write();
+ Color *w = carray.ptrw();
for (int32_t i = 0; i < count; i++) {
@@ -793,7 +904,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
flags |= ENCODE_FLAG_64;
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
double d = p_variant;
float f = d;
@@ -860,7 +971,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4;
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (flags & ENCODE_FLAG_64) {
if (buf) {
@@ -930,6 +1041,11 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
_encode_string(p_variant, buf, r_len);
} break;
+ case Variant::STRING_NAME: {
+
+ _encode_string(p_variant, buf, r_len);
+
+ } break;
// math types
case Variant::VECTOR2: {
@@ -942,7 +1058,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 2 * 4;
- } break; // 5
+ } break;
+ case Variant::VECTOR2I: {
+
+ if (buf) {
+ Vector2i v2 = p_variant;
+ encode_uint32(v2.x, &buf[0]);
+ encode_uint32(v2.y, &buf[4]);
+ }
+
+ r_len += 2 * 4;
+
+ } break;
case Variant::RECT2: {
if (buf) {
@@ -955,6 +1082,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 * 4;
} break;
+ case Variant::RECT2I: {
+
+ if (buf) {
+ Rect2i r2 = p_variant;
+ encode_uint32(r2.position.x, &buf[0]);
+ encode_uint32(r2.position.y, &buf[4]);
+ encode_uint32(r2.size.x, &buf[8]);
+ encode_uint32(r2.size.y, &buf[12]);
+ }
+ r_len += 4 * 4;
+
+ } break;
case Variant::VECTOR3: {
if (buf) {
@@ -967,6 +1106,18 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 3 * 4;
} break;
+ case Variant::VECTOR3I: {
+
+ if (buf) {
+ Vector3i v3 = p_variant;
+ encode_uint32(v3.x, &buf[0]);
+ encode_uint32(v3.y, &buf[4]);
+ encode_uint32(v3.z, &buf[8]);
+ }
+
+ r_len += 3 * 4;
+
+ } break;
case Variant::TRANSFORM2D: {
if (buf) {
@@ -1075,6 +1226,12 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
case Variant::_RID: {
} break;
+ case Variant::CALLABLE: {
+
+ } break;
+ case Variant::SIGNAL: {
+
+ } break;
case Variant::OBJECT: {
if (p_full_objects) {
@@ -1207,16 +1364,16 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
} break;
// arrays
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
- PoolVector<uint8_t> data = p_variant;
+ Vector<uint8_t> data = p_variant;
int datalen = data.size();
int datasize = sizeof(uint8_t);
if (buf) {
encode_uint32(datalen, buf);
buf += 4;
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t *r = data.ptr();
copymem(buf, &r[0], datalen * datasize);
buf += datalen * datasize;
}
@@ -1229,33 +1386,50 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
}
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- PoolVector<int> data = p_variant;
+ Vector<int32_t> data = p_variant;
int datalen = data.size();
int datasize = sizeof(int32_t);
if (buf) {
encode_uint32(datalen, buf);
buf += 4;
- PoolVector<int>::Read r = data.read();
- for (int i = 0; i < datalen; i++)
+ const int32_t *r = data.ptr();
+ for (int32_t i = 0; i < datalen; i++)
encode_uint32(r[i], &buf[i * datasize]);
}
r_len += 4 + datalen * datasize;
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
- PoolVector<real_t> data = p_variant;
+ Vector<int64_t> data = p_variant;
int datalen = data.size();
- int datasize = sizeof(real_t);
+ int datasize = sizeof(int64_t);
+
+ if (buf) {
+ encode_uint64(datalen, buf);
+ buf += 4;
+ const int64_t *r = data.ptr();
+ for (int64_t i = 0; i < datalen; i++)
+ encode_uint64(r[i], &buf[i * datasize]);
+ }
+
+ r_len += 4 + datalen * datasize;
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ Vector<float> data = p_variant;
+ int datalen = data.size();
+ int datasize = sizeof(float);
if (buf) {
encode_uint32(datalen, buf);
buf += 4;
- PoolVector<real_t>::Read r = data.read();
+ const float *r = data.ptr();
for (int i = 0; i < datalen; i++)
encode_float(r[i], &buf[i * datasize]);
}
@@ -1263,9 +1437,26 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 + datalen * datasize;
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ Vector<double> data = p_variant;
+ int datalen = data.size();
+ int datasize = sizeof(double);
+
+ if (buf) {
+ encode_uint32(datalen, buf);
+ buf += 4;
+ const double *r = data.ptr();
+ for (int i = 0; i < datalen; i++)
+ encode_double(r[i], &buf[i * datasize]);
+ }
+
+ r_len += 4 + datalen * datasize;
+
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
- PoolVector<String> data = p_variant;
+ Vector<String> data = p_variant;
int len = data.size();
if (buf) {
@@ -1295,9 +1486,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
}
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
- PoolVector<Vector2> data = p_variant;
+ Vector<Vector2> data = p_variant;
int len = data.size();
if (buf) {
@@ -1322,9 +1513,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 * 2 * len;
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
- PoolVector<Vector3> data = p_variant;
+ Vector<Vector3> data = p_variant;
int len = data.size();
if (buf) {
@@ -1350,9 +1541,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 * 3 * len;
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
- PoolVector<Color> data = p_variant;
+ Vector<Color> data = p_variant;
int len = data.size();
if (buf) {
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp
index 3f66e00021..d7c82fddd9 100644
--- a/core/io/multiplayer_api.cpp
+++ b/core/io/multiplayer_api.cpp
@@ -34,6 +34,10 @@
#include "scene/main/node.h"
#include <stdint.h>
+#define NODE_ID_COMPRESSION_SHIFT 3
+#define NAME_ID_COMPRESSION_SHIFT 5
+#define BYTE_ONLY_OR_NO_ARGS_SHIFT 6
+
#ifdef DEBUG_ENABLED
#include "core/os/os.h"
#endif
@@ -51,7 +55,7 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas
case MultiplayerAPI::RPC_MODE_MASTERSYNC: {
if (is_master)
r_skip_rpc = true; // I am the master, so skip remote call.
- FALLTHROUGH;
+ [[fallthrough]];
}
case MultiplayerAPI::RPC_MODE_REMOTESYNC:
case MultiplayerAPI::RPC_MODE_PUPPETSYNC: {
@@ -145,22 +149,22 @@ void MultiplayerAPI::set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_pee
"Supplied NetworkedMultiplayerPeer must be connecting or connected.");
if (network_peer.is_valid()) {
- network_peer->disconnect("peer_connected", this, "_add_peer");
- network_peer->disconnect("peer_disconnected", this, "_del_peer");
- network_peer->disconnect("connection_succeeded", this, "_connected_to_server");
- network_peer->disconnect("connection_failed", this, "_connection_failed");
- network_peer->disconnect("server_disconnected", this, "_server_disconnected");
+ network_peer->disconnect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
+ network_peer->disconnect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
+ network_peer->disconnect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
+ network_peer->disconnect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
+ network_peer->disconnect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
clear();
}
network_peer = p_peer;
if (network_peer.is_valid()) {
- network_peer->connect("peer_connected", this, "_add_peer");
- network_peer->connect("peer_disconnected", this, "_del_peer");
- network_peer->connect("connection_succeeded", this, "_connected_to_server");
- network_peer->connect("connection_failed", this, "_connection_failed");
- network_peer->connect("server_disconnected", this, "_server_disconnected");
+ network_peer->connect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
+ network_peer->connect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
+ network_peer->connect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
+ network_peer->connect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
+ network_peer->connect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
}
}
@@ -168,6 +172,16 @@ Ref<NetworkedMultiplayerPeer> MultiplayerAPI::get_network_peer() const {
return network_peer;
}
+// Returns the packet size stripping the node path added when the node is not yet cached.
+int get_packet_len(uint32_t p_node_target, int p_packet_len) {
+ if (p_node_target & 0x80000000) {
+ int ofs = p_node_target & 0x7FFFFFFF;
+ return p_packet_len - (p_packet_len - ofs);
+ } else {
+ return p_packet_len;
+ }
+}
+
void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
ERR_FAIL_COND_MSG(root_node == NULL, "Multiplayer root node was not initialized. If you are using custom multiplayer, remember to set the root node via MultiplayerAPI.set_root_node before using it.");
@@ -204,8 +218,8 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
int name_id_offset = 1;
ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
// Compute the meta size, which depends on the compression level.
- int node_id_compression = (p_packet[0] & 24) >> 3;
- int name_id_compression = (p_packet[0] & 32) >> 5;
+ int node_id_compression = (p_packet[0] & 24) >> NODE_ID_COMPRESSION_SHIFT;
+ int name_id_compression = (p_packet[0] & 32) >> NAME_ID_COMPRESSION_SHIFT;
switch (node_id_compression) {
case NETWORK_NODE_ID_COMPRESSION_8:
@@ -250,6 +264,7 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
// Unreachable, checked before.
CRASH_NOW();
}
+
Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len);
ERR_FAIL_COND_MSG(node == NULL, "Invalid packet received. Requested node was not found.");
@@ -266,13 +281,14 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
CRASH_NOW();
}
+ const int packet_len = get_packet_len(node_target, p_packet_len);
if (packet_type == NETWORK_COMMAND_REMOTE_CALL) {
- _process_rpc(node, name_id, p_from, p_packet, p_packet_len, packet_min_size);
+ _process_rpc(node, name_id, p_from, p_packet, packet_len, packet_min_size);
} else {
- _process_rset(node, name_id, p_from, p_packet, p_packet_len, packet_min_size);
+ _process_rset(node, name_id, p_from, p_packet, packet_len, packet_min_size);
}
} break;
@@ -326,7 +342,7 @@ Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, uin
void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) {
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ ERR_FAIL_COND_MSG(p_offset > p_packet_len, "Invalid packet received. Size too small.");
// Check that remote can call the RPC on this node.
StringName name = p_node->get_node_rpc_method(p_rpc_method_id);
@@ -340,14 +356,30 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id,
bool can_call = _can_call_mode(p_node, rpc_mode, p_from);
ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rpc_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
- int argc = p_packet[p_offset];
+ int argc = 0;
+ bool byte_only = false;
+
+ const bool byte_only_or_no_args = ((p_packet[0] & 64) >> BYTE_ONLY_OR_NO_ARGS_SHIFT) == 1;
+ if (byte_only_or_no_args) {
+ if (p_offset < p_packet_len) {
+ // This packet contains only bytes.
+ argc = 1;
+ byte_only = true;
+ } else {
+ // This rpc calls a method without parameters.
+ }
+ } else {
+ // Normal variant, takes the argument count from the packet.
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ argc = p_packet[p_offset];
+ p_offset += 1;
+ }
+
Vector<Variant> args;
Vector<const Variant *> argp;
args.resize(argc);
argp.resize(argc);
- p_offset++;
-
#ifdef DEBUG_ENABLED
if (profiling) {
ObjectID id = p_node->get_instance_id();
@@ -356,22 +388,32 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id,
}
#endif
- for (int i = 0; i < argc; i++) {
+ if (byte_only) {
+ Vector<uint8_t> pure_data;
+ const int len = p_packet_len - p_offset;
+ pure_data.resize(len);
+ memcpy(pure_data.ptrw(), &p_packet[p_offset], len);
+ args.write[0] = pure_data;
+ argp.write[0] = &args[0];
+ p_offset += len;
+ } else {
+ for (int i = 0; i < argc; i++) {
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
- int vlen;
- Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
- ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
+ int vlen;
+ Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
+ ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
- argp.write[i] = &args[i];
- p_offset += vlen;
+ argp.write[i] = &args[i];
+ p_offset += vlen;
+ }
}
- Variant::CallError ce;
+ Callable::CallError ce;
p_node->call(name, (const Variant **)argp.ptr(), argc, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String error = Variant::get_call_error_text(p_node, name, (const Variant **)argp.ptr(), argc, ce);
error = "RPC - " + error;
ERR_PRINT(error);
@@ -742,10 +784,12 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
// - `NetworkCommands` in the first three bits.
// - `NetworkNodeIdCompression` in the next 2 bits.
// - `NetworkNameIdCompression` in the next 1 bit.
- // - So we still have the last two bits free!
+ // - `byte_only_or_no_args` in the next 1 bit.
+ // - So we still have the last bit free!
uint8_t command_type = p_set ? NETWORK_COMMAND_REMOTE_SET : NETWORK_COMMAND_REMOTE_CALL;
uint8_t node_id_compression = UINT8_MAX;
uint8_t name_id_compression = UINT8_MAX;
+ bool byte_only_or_no_args = false;
MAKE_ROOM(1);
// The meta is composed along the way, so just set 0 for now.
@@ -835,17 +879,28 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
ofs += 2;
}
- // Call arguments.
- MAKE_ROOM(ofs + 1);
- packet_cache.write[ofs] = p_argcount;
- ofs += 1;
- for (int i = 0; i < p_argcount; i++) {
- int len(0);
- Error err = _encode_and_compress_variant(*p_arg[i], NULL, len);
- ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
- MAKE_ROOM(ofs + len);
- _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
- ofs += len;
+ if (p_argcount == 0) {
+ byte_only_or_no_args = true;
+ } else if (p_argcount == 1 && p_arg[0]->get_type() == Variant::PACKED_BYTE_ARRAY) {
+ byte_only_or_no_args = true;
+ // Special optimization when only the byte vector is sent.
+ const Vector<uint8_t> data = *p_arg[0];
+ MAKE_ROOM(ofs + data.size());
+ copymem(&(packet_cache.write[ofs]), data.ptr(), sizeof(uint8_t) * data.size());
+ ofs += data.size();
+ } else {
+ // Arguments
+ MAKE_ROOM(ofs + 1);
+ packet_cache.write[ofs] = p_argcount;
+ ofs += 1;
+ for (int i = 0; i < p_argcount; i++) {
+ int len(0);
+ Error err = _encode_and_compress_variant(*p_arg[i], NULL, len);
+ ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
+ MAKE_ROOM(ofs + len);
+ _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
+ ofs += len;
+ }
}
}
@@ -854,7 +909,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
ERR_FAIL_COND(name_id_compression > 1);
// We can now set the meta
- packet_cache.write[0] = command_type + (node_id_compression << 3) + (name_id_compression << 5);
+ packet_cache.write[0] = command_type + (node_id_compression << NODE_ID_COMPRESSION_SHIFT) + (name_id_compression << NAME_ID_COMPRESSION_SHIFT) + ((byte_only_or_no_args ? 1 : 0) << BYTE_ONLY_OR_NO_ARGS_SHIFT);
#ifdef DEBUG_ENABLED
if (profiling) {
@@ -989,10 +1044,10 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const
if (call_local_native) {
int temp_id = rpc_sender_id;
rpc_sender_id = get_network_unique_id();
- Variant::CallError ce;
+ Callable::CallError ce;
p_node->call(p_method, p_arg, p_argcount, ce);
rpc_sender_id = temp_id;
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
error = "rpc() aborted in local call: - " + error + ".";
ERR_PRINT(error);
@@ -1003,11 +1058,11 @@ void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const
if (call_local_script) {
int temp_id = rpc_sender_id;
rpc_sender_id = get_network_unique_id();
- Variant::CallError ce;
- ce.error = Variant::CallError::CALL_OK;
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
p_node->get_script_instance()->call(p_method, p_arg, p_argcount, ce);
rpc_sender_id = temp_id;
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
error = "rpc() aborted in script local call: - " + error + ".";
ERR_PRINT(error);
@@ -1087,14 +1142,14 @@ void MultiplayerAPI::rsetp(Node *p_node, int p_peer_id, bool p_unreliable, const
_send_rpc(p_node, p_peer_id, p_unreliable, true, p_property, &vptr, 1);
}
-Error MultiplayerAPI::send_bytes(PoolVector<uint8_t> p_data, int p_to, NetworkedMultiplayerPeer::TransferMode p_mode) {
+Error MultiplayerAPI::send_bytes(Vector<uint8_t> p_data, int p_to, NetworkedMultiplayerPeer::TransferMode p_mode) {
ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet.");
ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no network peer is active.");
ERR_FAIL_COND_V_MSG(network_peer->get_connection_status() != NetworkedMultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a network peer which is not connected.");
MAKE_ROOM(p_data.size() + 1);
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
packet_cache.write[0] = NETWORK_COMMAND_RAW;
memcpy(&packet_cache.write[1], &r[0], p_data.size());
@@ -1108,11 +1163,11 @@ void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_pac
ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small.");
- PoolVector<uint8_t> out;
+ Vector<uint8_t> out;
int len = p_packet_len - 1;
out.resize(len);
{
- PoolVector<uint8_t>::Write w = out.write();
+ uint8_t *w = out.ptrw();
memcpy(&w[0], &p_packet[1], len);
}
emit_signal("network_peer_packet", p_from, out);
@@ -1262,15 +1317,10 @@ void MultiplayerAPI::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_network_unique_id"), &MultiplayerAPI::get_network_unique_id);
ClassDB::bind_method(D_METHOD("is_network_server"), &MultiplayerAPI::is_network_server);
ClassDB::bind_method(D_METHOD("get_rpc_sender_id"), &MultiplayerAPI::get_rpc_sender_id);
- ClassDB::bind_method(D_METHOD("_add_peer", "id"), &MultiplayerAPI::_add_peer);
- ClassDB::bind_method(D_METHOD("_del_peer", "id"), &MultiplayerAPI::_del_peer);
ClassDB::bind_method(D_METHOD("set_network_peer", "peer"), &MultiplayerAPI::set_network_peer);
ClassDB::bind_method(D_METHOD("poll"), &MultiplayerAPI::poll);
ClassDB::bind_method(D_METHOD("clear"), &MultiplayerAPI::clear);
- ClassDB::bind_method(D_METHOD("_connected_to_server"), &MultiplayerAPI::_connected_to_server);
- ClassDB::bind_method(D_METHOD("_connection_failed"), &MultiplayerAPI::_connection_failed);
- ClassDB::bind_method(D_METHOD("_server_disconnected"), &MultiplayerAPI::_server_disconnected);
ClassDB::bind_method(D_METHOD("get_network_connected_peers"), &MultiplayerAPI::get_network_connected_peers);
ClassDB::bind_method(D_METHOD("set_refuse_new_network_connections", "refuse"), &MultiplayerAPI::set_refuse_new_network_connections);
ClassDB::bind_method(D_METHOD("is_refusing_new_network_connections"), &MultiplayerAPI::is_refusing_new_network_connections);
@@ -1284,7 +1334,7 @@ void MultiplayerAPI::_bind_methods() {
ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("network_peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "packet")));
+ ADD_SIGNAL(MethodInfo("network_peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "packet")));
ADD_SIGNAL(MethodInfo("connected_to_server"));
ADD_SIGNAL(MethodInfo("connection_failed"));
ADD_SIGNAL(MethodInfo("server_disconnected"));
diff --git a/core/io/multiplayer_api.h b/core/io/multiplayer_api.h
index 8748dba03c..a706a0e450 100644
--- a/core/io/multiplayer_api.h
+++ b/core/io/multiplayer_api.h
@@ -145,7 +145,7 @@ public:
void set_root_node(Node *p_node);
void set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_peer);
Ref<NetworkedMultiplayerPeer> get_network_peer() const;
- Error send_bytes(PoolVector<uint8_t> p_data, int p_to = NetworkedMultiplayerPeer::TARGET_PEER_BROADCAST, NetworkedMultiplayerPeer::TransferMode p_mode = NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE);
+ Error send_bytes(Vector<uint8_t> p_data, int p_to = NetworkedMultiplayerPeer::TARGET_PEER_BROADCAST, NetworkedMultiplayerPeer::TransferMode p_mode = NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE);
// Called by Node.rpc
void rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount);
diff --git a/core/io/net_socket.h b/core/io/net_socket.h
index 710df2dd78..376fd87a27 100644
--- a/core/io/net_socket.h
+++ b/core/io/net_socket.h
@@ -61,7 +61,7 @@ public:
virtual Error connect_to_host(IP_Address p_addr, uint16_t p_port) = 0;
virtual Error poll(PollType p_type, int timeout) const = 0;
virtual Error recv(uint8_t *p_buffer, int p_len, int &r_read) = 0;
- virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) = 0;
+ virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek = false) = 0;
virtual Error send(const uint8_t *p_buffer, int p_len, int &r_sent) = 0;
virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) = 0;
virtual Ref<NetSocket> accept(IP_Address &r_ip, uint16_t &r_port) = 0;
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index 81d7b86161..2f5c493c2c 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -53,7 +53,7 @@ int PacketPeer::get_encode_buffer_max_size() const {
return encode_buffer_max_size;
}
-Error PacketPeer::get_packet_buffer(PoolVector<uint8_t> &r_buffer) {
+Error PacketPeer::get_packet_buffer(Vector<uint8_t> &r_buffer) {
const uint8_t *buffer;
int buffer_size;
@@ -65,20 +65,20 @@ Error PacketPeer::get_packet_buffer(PoolVector<uint8_t> &r_buffer) {
if (buffer_size == 0)
return OK;
- PoolVector<uint8_t>::Write w = r_buffer.write();
+ uint8_t *w = r_buffer.ptrw();
for (int i = 0; i < buffer_size; i++)
w[i] = buffer[i];
return OK;
}
-Error PacketPeer::put_packet_buffer(const PoolVector<uint8_t> &p_buffer) {
+Error PacketPeer::put_packet_buffer(const Vector<uint8_t> &p_buffer) {
int len = p_buffer.size();
if (len == 0)
return OK;
- PoolVector<uint8_t>::Read r = p_buffer.read();
+ const uint8_t *r = p_buffer.ptr();
return put_packet(&r[0], len);
}
@@ -110,11 +110,11 @@ Error PacketPeer::put_var(const Variant &p_packet, bool p_full_objects) {
encode_buffer.resize(next_power_of_2(len));
}
- PoolVector<uint8_t>::Write w = encode_buffer.write();
- err = encode_variant(p_packet, w.ptr(), len, p_full_objects);
+ uint8_t *w = encode_buffer.ptrw();
+ err = encode_variant(p_packet, w, len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, err, "Error when trying to encode Variant.");
- return put_packet(w.ptr(), len);
+ return put_packet(w, len);
}
Variant PacketPeer::_bnd_get_var(bool p_allow_objects) {
@@ -125,12 +125,12 @@ Variant PacketPeer::_bnd_get_var(bool p_allow_objects) {
return var;
}
-Error PacketPeer::_put_packet(const PoolVector<uint8_t> &p_buffer) {
+Error PacketPeer::_put_packet(const Vector<uint8_t> &p_buffer) {
return put_packet_buffer(p_buffer);
}
-PoolVector<uint8_t> PacketPeer::_get_packet() {
+Vector<uint8_t> PacketPeer::_get_packet() {
- PoolVector<uint8_t> raw;
+ Vector<uint8_t> raw;
last_get_error = get_packet_buffer(raw);
return raw;
}
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index bee69f5ca9..62144259cc 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -43,14 +43,14 @@ class PacketPeer : public Reference {
static void _bind_methods();
- Error _put_packet(const PoolVector<uint8_t> &p_buffer);
- PoolVector<uint8_t> _get_packet();
+ Error _put_packet(const Vector<uint8_t> &p_buffer);
+ Vector<uint8_t> _get_packet();
Error _get_packet_error() const;
mutable Error last_get_error;
int encode_buffer_max_size;
- PoolVector<uint8_t> encode_buffer;
+ Vector<uint8_t> encode_buffer;
public:
virtual int get_available_packet_count() const = 0;
@@ -61,8 +61,8 @@ public:
/* helpers / binders */
- virtual Error get_packet_buffer(PoolVector<uint8_t> &r_buffer);
- virtual Error put_packet_buffer(const PoolVector<uint8_t> &p_buffer);
+ virtual Error get_packet_buffer(Vector<uint8_t> &r_buffer);
+ virtual Error put_packet_buffer(const Vector<uint8_t> &p_buffer);
virtual Error get_var(Variant &r_variant, bool p_allow_objects = false);
virtual Error put_var(const Variant &p_packet, bool p_full_objects = false);
diff --git a/core/io/packet_peer_dtls.cpp b/core/io/packet_peer_dtls.cpp
new file mode 100644
index 0000000000..01218a6881
--- /dev/null
+++ b/core/io/packet_peer_dtls.cpp
@@ -0,0 +1,62 @@
+/*************************************************************************/
+/* packet_peer_dtls.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "packet_peer_dtls.h"
+#include "core/os/file_access.h"
+#include "core/project_settings.h"
+
+PacketPeerDTLS *(*PacketPeerDTLS::_create)() = NULL;
+bool PacketPeerDTLS::available = false;
+
+PacketPeerDTLS *PacketPeerDTLS::create() {
+
+ return _create();
+}
+
+bool PacketPeerDTLS::is_available() {
+ return available;
+}
+
+void PacketPeerDTLS::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("poll"), &PacketPeerDTLS::poll);
+ ClassDB::bind_method(D_METHOD("connect_to_peer", "packet_peer", "validate_certs", "for_hostname", "valid_certificate"), &PacketPeerDTLS::connect_to_peer, DEFVAL(true), DEFVAL(String()), DEFVAL(Ref<X509Certificate>()));
+ ClassDB::bind_method(D_METHOD("get_status"), &PacketPeerDTLS::get_status);
+ ClassDB::bind_method(D_METHOD("disconnect_from_peer"), &PacketPeerDTLS::disconnect_from_peer);
+
+ BIND_ENUM_CONSTANT(STATUS_DISCONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_HANDSHAKING);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_ERROR);
+ BIND_ENUM_CONSTANT(STATUS_ERROR_HOSTNAME_MISMATCH);
+}
+
+PacketPeerDTLS::PacketPeerDTLS() {
+}
diff --git a/core/io/packet_peer_dtls.h b/core/io/packet_peer_dtls.h
new file mode 100644
index 0000000000..4f9f4535bc
--- /dev/null
+++ b/core/io/packet_peer_dtls.h
@@ -0,0 +1,68 @@
+/*************************************************************************/
+/* packet_peer_dtls.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 PACKET_PEER_DTLS_H
+#define PACKET_PEER_DTLS_H
+
+#include "core/crypto/crypto.h"
+#include "core/io/packet_peer_udp.h"
+
+class PacketPeerDTLS : public PacketPeer {
+ GDCLASS(PacketPeerDTLS, PacketPeer);
+
+protected:
+ static PacketPeerDTLS *(*_create)();
+ static void _bind_methods();
+
+ static bool available;
+
+public:
+ enum Status {
+ STATUS_DISCONNECTED,
+ STATUS_HANDSHAKING,
+ STATUS_CONNECTED,
+ STATUS_ERROR,
+ STATUS_ERROR_HOSTNAME_MISMATCH
+ };
+
+ virtual void poll() = 0;
+ virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = true, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>()) = 0;
+ virtual void disconnect_from_peer() = 0;
+ virtual Status get_status() const = 0;
+
+ static PacketPeerDTLS *create();
+ static bool is_available();
+
+ PacketPeerDTLS();
+};
+
+VARIANT_ENUM_CAST(PacketPeerDTLS::Status);
+
+#endif // PACKET_PEER_DTLS_H
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index a8cfd741bb..f800ffc3db 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -133,7 +133,11 @@ Error PacketPeerUDP::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
}
do {
- err = _sock->sendto(p_buffer, p_buffer_size, sent, peer_addr, peer_port);
+ if (connected) {
+ err = _sock->send(p_buffer, p_buffer_size, sent);
+ } else {
+ err = _sock->sendto(p_buffer, p_buffer_size, sent, peer_addr, peer_port);
+ }
if (err != OK) {
if (err != ERR_BUSY)
return FAILED;
@@ -184,12 +188,69 @@ Error PacketPeerUDP::listen(int p_port, const IP_Address &p_bind_address, int p_
return OK;
}
+Error PacketPeerUDP::connect_socket(Ref<NetSocket> p_sock) {
+ Error err;
+ int read = 0;
+ uint16_t r_port;
+ IP_Address r_ip;
+
+ err = p_sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, r_ip, r_port, true);
+ ERR_FAIL_COND_V(err != OK, err);
+ err = p_sock->connect_to_host(r_ip, r_port);
+ ERR_FAIL_COND_V(err != OK, err);
+ _sock = p_sock;
+ peer_addr = r_ip;
+ peer_port = r_port;
+ packet_ip = peer_addr;
+ packet_port = peer_port;
+ connected = true;
+ return OK;
+}
+
+Error PacketPeerUDP::connect_to_host(const IP_Address &p_host, int p_port) {
+ ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
+ ERR_FAIL_COND_V(!p_host.is_valid(), ERR_INVALID_PARAMETER);
+
+ Error err;
+
+ if (!_sock->is_open()) {
+ IP::Type ip_type = p_host.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6;
+ err = _sock->open(NetSocket::TYPE_UDP, ip_type);
+ ERR_FAIL_COND_V(err != OK, ERR_CANT_OPEN);
+ _sock->set_blocking_enabled(false);
+ }
+
+ err = _sock->connect_to_host(p_host, p_port);
+
+ // I see no reason why we should get ERR_BUSY (wouldblock/eagain) here.
+ // This is UDP, so connect is only used to tell the OS to which socket
+ // it shuold deliver packets when multiple are bound on the same address/port.
+ if (err != OK) {
+ close();
+ ERR_FAIL_V_MSG(FAILED, "Unable to connect");
+ }
+
+ connected = true;
+
+ peer_addr = p_host;
+ peer_port = p_port;
+
+ // Flush any packet we might still have in queue.
+ rb.clear();
+ return OK;
+}
+
+bool PacketPeerUDP::is_connected_to_host() const {
+ return connected;
+}
+
void PacketPeerUDP::close() {
if (_sock.is_valid())
_sock->close();
rb.resize(16);
queue_count = 0;
+ connected = false;
}
Error PacketPeerUDP::wait() {
@@ -212,7 +273,13 @@ Error PacketPeerUDP::_poll() {
uint16_t port;
while (true) {
- err = _sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, ip, port);
+ if (connected) {
+ err = _sock->recv(recv_buffer, sizeof(recv_buffer), read);
+ ip = peer_addr;
+ port = peer_port;
+ } else {
+ err = _sock->recvfrom(recv_buffer, sizeof(recv_buffer), read, ip, port);
+ }
if (err != OK) {
if (err == ERR_BUSY)
@@ -254,6 +321,7 @@ int PacketPeerUDP::get_packet_port() const {
void PacketPeerUDP::set_dest_address(const IP_Address &p_address, int p_port) {
+ ERR_FAIL_COND_MSG(connected, "Destination address cannot be set for connected sockets");
peer_addr = p_address;
peer_port = p_port;
}
@@ -264,6 +332,8 @@ void PacketPeerUDP::_bind_methods() {
ClassDB::bind_method(D_METHOD("close"), &PacketPeerUDP::close);
ClassDB::bind_method(D_METHOD("wait"), &PacketPeerUDP::wait);
ClassDB::bind_method(D_METHOD("is_listening"), &PacketPeerUDP::is_listening);
+ ClassDB::bind_method(D_METHOD("connect_to_host", "host", "port"), &PacketPeerUDP::connect_to_host);
+ ClassDB::bind_method(D_METHOD("is_connected_to_host"), &PacketPeerUDP::is_connected_to_host);
ClassDB::bind_method(D_METHOD("get_packet_ip"), &PacketPeerUDP::_get_packet_ip);
ClassDB::bind_method(D_METHOD("get_packet_port"), &PacketPeerUDP::get_packet_port);
ClassDB::bind_method(D_METHOD("set_dest_address", "host", "port"), &PacketPeerUDP::_set_dest_address);
@@ -276,6 +346,7 @@ PacketPeerUDP::PacketPeerUDP() :
packet_port(0),
queue_count(0),
peer_port(0),
+ connected(false),
blocking(true),
broadcast(false),
_sock(Ref<NetSocket>(NetSocket::create())) {
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 15b4d00c37..b5a9fc9ec3 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -52,6 +52,7 @@ protected:
IP_Address peer_addr;
int peer_port;
+ bool connected;
bool blocking;
bool broadcast;
Ref<NetSocket> _sock;
@@ -70,6 +71,11 @@ public:
void close();
Error wait();
bool is_listening() const;
+
+ Error connect_socket(Ref<NetSocket> p_sock); // Used by UDPServer
+ Error connect_to_host(const IP_Address &p_host, int p_port);
+ bool is_connected_to_host() const;
+
IP_Address get_packet_address() const;
int get_packet_port() const;
void set_dest_address(const IP_Address &p_address, int p_port);
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 02ae5788fc..efd452191a 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -46,7 +46,7 @@ enum {
VARIANT_NIL = 1,
VARIANT_BOOL = 2,
VARIANT_INT = 3,
- VARIANT_REAL = 4,
+ VARIANT_FLOAT = 4,
VARIANT_STRING = 5,
VARIANT_VECTOR2 = 10,
VARIANT_RECT2 = 11,
@@ -65,14 +65,22 @@ enum {
VARIANT_DICTIONARY = 26,
VARIANT_ARRAY = 30,
VARIANT_RAW_ARRAY = 31,
- VARIANT_INT_ARRAY = 32,
- VARIANT_REAL_ARRAY = 33,
+ VARIANT_INT32_ARRAY = 32,
+ VARIANT_FLOAT32_ARRAY = 33,
VARIANT_STRING_ARRAY = 34,
VARIANT_VECTOR3_ARRAY = 35,
VARIANT_COLOR_ARRAY = 36,
VARIANT_VECTOR2_ARRAY = 37,
VARIANT_INT64 = 40,
VARIANT_DOUBLE = 41,
+ VARIANT_CALLABLE = 42,
+ VARIANT_SIGNAL = 43,
+ VARIANT_STRING_NAME = 44,
+ VARIANT_VECTOR2I = 45,
+ VARIANT_RECT2I = 46,
+ VARIANT_VECTOR3I = 47,
+ VARIANT_INT64_ARRAY = 48,
+ VARIANT_FLOAT64_ARRAY = 49,
OBJECT_EMPTY = 0,
OBJECT_EXTERNAL_RESOURCE = 1,
OBJECT_INTERNAL_RESOURCE = 2,
@@ -85,7 +93,7 @@ enum {
};
-void ResourceInteractiveLoaderBinary::_advance_padding(uint32_t p_len) {
+void ResourceLoaderBinary::_advance_padding(uint32_t p_len) {
uint32_t extra = 4 - (p_len % 4);
if (extra < 4) {
@@ -94,7 +102,7 @@ void ResourceInteractiveLoaderBinary::_advance_padding(uint32_t p_len) {
}
}
-StringName ResourceInteractiveLoaderBinary::_get_string() {
+StringName ResourceLoaderBinary::_get_string() {
uint32_t id = f->get_32();
if (id & 0x80000000) {
@@ -113,7 +121,7 @@ StringName ResourceInteractiveLoaderBinary::_get_string() {
return string_map[id];
}
-Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
+Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
uint32_t type = f->get_32();
print_bl("find property of type: " + itos(type));
@@ -136,7 +144,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = int64_t(f->get_64());
} break;
- case VARIANT_REAL: {
+ case VARIANT_FLOAT: {
r_v = f->get_real();
} break;
@@ -156,6 +164,14 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
+ case VARIANT_VECTOR2I: {
+
+ Vector2i v;
+ v.x = f->get_32();
+ v.y = f->get_32();
+ r_v = v;
+
+ } break;
case VARIANT_RECT2: {
Rect2 v;
@@ -166,6 +182,16 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
+ case VARIANT_RECT2I: {
+
+ Rect2i v;
+ v.position.x = f->get_32();
+ v.position.y = f->get_32();
+ v.size.x = f->get_32();
+ v.size.y = f->get_32();
+ r_v = v;
+
+ } break;
case VARIANT_VECTOR3: {
Vector3 v;
@@ -174,6 +200,14 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
v.z = f->get_real();
r_v = v;
} break;
+ case VARIANT_VECTOR3I: {
+
+ Vector3i v;
+ v.x = f->get_32();
+ v.y = f->get_32();
+ v.z = f->get_32();
+ r_v = v;
+ } break;
case VARIANT_PLANE: {
Plane v;
@@ -258,6 +292,10 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
+ case VARIANT_STRING_NAME: {
+
+ r_v = StringName(get_unicode_string());
+ } break;
case VARIANT_NODE_PATH: {
@@ -339,20 +377,26 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = Variant();
} else {
- String exttype = external_resources[erindex].type;
- String path = external_resources[erindex].path;
+ if (external_resources[erindex].cache.is_null()) {
+ //cache not here yet, wait for it?
+ if (use_sub_threads) {
+ Error err;
+ external_resources.write[erindex].cache = ResourceLoader::load_threaded_get(external_resources[erindex].path, &err);
- if (path.find("://") == -1 && path.is_rel_path()) {
- // path is relative to file being loaded, so convert to a resource path
- path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path));
- }
+ if (err != OK || external_resources[erindex].cache.is_null()) {
+ if (!ResourceLoader::get_abort_on_missing_resources()) {
- RES res = ResourceLoader::load(path, exttype);
+ ResourceLoader::notify_dependency_error(local_path, external_resources[erindex].path, external_resources[erindex].type);
+ } else {
- if (res.is_null()) {
- WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
+ error = ERR_FILE_MISSING_DEPENDENCIES;
+ ERR_FAIL_V_MSG(error, "Can't load dependency: " + external_resources[erindex].path + ".");
+ }
+ }
+ }
}
- r_v = res;
+
+ r_v = external_resources[erindex].cache;
}
} break;
@@ -363,6 +407,15 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
}
} break;
+ case VARIANT_CALLABLE: {
+
+ r_v = Callable();
+ } break;
+ case VARIANT_SIGNAL: {
+
+ r_v = Signal();
+ } break;
+
case VARIANT_DICTIONARY: {
uint32_t len = f->get_32();
@@ -398,23 +451,23 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
uint32_t len = f->get_32();
- PoolVector<uint8_t> array;
+ Vector<uint8_t> array;
array.resize(len);
- PoolVector<uint8_t>::Write w = array.write();
- f->get_buffer(w.ptr(), len);
+ uint8_t *w = array.ptrw();
+ f->get_buffer(w, len);
_advance_padding(len);
- w.release();
+
r_v = array;
} break;
- case VARIANT_INT_ARRAY: {
+ case VARIANT_INT32_ARRAY: {
uint32_t len = f->get_32();
- PoolVector<int> array;
+ Vector<int32_t> array;
array.resize(len);
- PoolVector<int>::Write w = array.write();
- f->get_buffer((uint8_t *)w.ptr(), len * 4);
+ int32_t *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(int32_t));
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -425,17 +478,38 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
}
#endif
- w.release();
+
+ r_v = array;
+ } break;
+ case VARIANT_INT64_ARRAY: {
+
+ uint32_t len = f->get_32();
+
+ Vector<int64_t> array;
+ array.resize(len);
+ int64_t *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(int64_t));
+#ifdef BIG_ENDIAN_ENABLED
+ {
+ uint64_t *ptr = (uint64_t *)w.ptr();
+ for (int i = 0; i < len; i++) {
+
+ ptr[i] = BSWAP64(ptr[i]);
+ }
+ }
+
+#endif
+
r_v = array;
} break;
- case VARIANT_REAL_ARRAY: {
+ case VARIANT_FLOAT32_ARRAY: {
uint32_t len = f->get_32();
- PoolVector<real_t> array;
+ Vector<float> array;
array.resize(len);
- PoolVector<real_t>::Write w = array.write();
- f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t));
+ float *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(float));
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -447,18 +521,38 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
#endif
- w.release();
+ r_v = array;
+ } break;
+ case VARIANT_FLOAT64_ARRAY: {
+
+ uint32_t len = f->get_32();
+
+ Vector<double> array;
+ array.resize(len);
+ double *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(double));
+#ifdef BIG_ENDIAN_ENABLED
+ {
+ uint64_t *ptr = (uint64_t *)w.ptr();
+ for (int i = 0; i < len; i++) {
+
+ ptr[i] = BSWAP64(ptr[i]);
+ }
+ }
+
+#endif
+
r_v = array;
} break;
case VARIANT_STRING_ARRAY: {
uint32_t len = f->get_32();
- PoolVector<String> array;
+ Vector<String> array;
array.resize(len);
- PoolVector<String>::Write w = array.write();
+ String *w = array.ptrw();
for (uint32_t i = 0; i < len; i++)
w[i] = get_unicode_string();
- w.release();
+
r_v = array;
} break;
@@ -466,11 +560,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
uint32_t len = f->get_32();
- PoolVector<Vector2> array;
+ Vector<Vector2> array;
array.resize(len);
- PoolVector<Vector2>::Write w = array.write();
+ Vector2 *w = array.ptrw();
if (sizeof(Vector2) == 8) {
- f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 2);
+ f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 2);
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -485,7 +579,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
} else {
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Vector2 size is NOT 8!");
}
- w.release();
+
r_v = array;
} break;
@@ -493,11 +587,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
uint32_t len = f->get_32();
- PoolVector<Vector3> array;
+ Vector<Vector3> array;
array.resize(len);
- PoolVector<Vector3>::Write w = array.write();
+ Vector3 *w = array.ptrw();
if (sizeof(Vector3) == 12) {
- f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 3);
+ f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 3);
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -512,7 +606,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
} else {
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Vector3 size is NOT 12!");
}
- w.release();
+
r_v = array;
} break;
@@ -520,11 +614,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
uint32_t len = f->get_32();
- PoolVector<Color> array;
+ Vector<Color> array;
array.resize(len);
- PoolVector<Color>::Write w = array.write();
+ Color *w = array.ptrw();
if (sizeof(Color) == 16) {
- f->get_buffer((uint8_t *)w.ptr(), len * sizeof(real_t) * 4);
+ f->get_buffer((uint8_t *)w, len * sizeof(real_t) * 4);
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -539,7 +633,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
} else {
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Color size is NOT 16!");
}
- w.release();
+
r_v = array;
} break;
default: {
@@ -550,160 +644,168 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
return OK; //never reach anyway
}
-void ResourceInteractiveLoaderBinary::set_local_path(const String &p_local_path) {
+void ResourceLoaderBinary::set_local_path(const String &p_local_path) {
res_path = p_local_path;
}
-Ref<Resource> ResourceInteractiveLoaderBinary::get_resource() {
+Ref<Resource> ResourceLoaderBinary::get_resource() {
return resource;
}
-Error ResourceInteractiveLoaderBinary::poll() {
+Error ResourceLoaderBinary::load() {
if (error != OK)
return error;
- int s = stage;
+ int stage = 0;
- if (s < external_resources.size()) {
+ for (int i = 0; i < external_resources.size(); i++) {
- String path = external_resources[s].path;
+ String path = external_resources[i].path;
if (remaps.has(path)) {
path = remaps[path];
}
- RES res = ResourceLoader::load(path, external_resources[s].type);
- if (res.is_null()) {
- if (!ResourceLoader::get_abort_on_missing_resources()) {
+ if (path.find("://") == -1 && path.is_rel_path()) {
+ // path is relative to file being loaded, so convert to a resource path
+ path = ProjectSettings::get_singleton()->localize_path(path.get_base_dir().plus_file(external_resources[i].path));
+ }
- ResourceLoader::notify_dependency_error(local_path, path, external_resources[s].type);
- } else {
+ external_resources.write[i].path = path; //remap happens here, not on load because on load it can actually be used for filesystem dock resource remap
+
+ if (!use_sub_threads) {
+ external_resources.write[i].cache = ResourceLoader::load(path, external_resources[i].type);
- error = ERR_FILE_MISSING_DEPENDENCIES;
- ERR_FAIL_V_MSG(error, "Can't load dependency: " + path + ".");
+ if (external_resources[i].cache.is_null()) {
+ if (!ResourceLoader::get_abort_on_missing_resources()) {
+
+ ResourceLoader::notify_dependency_error(local_path, path, external_resources[i].type);
+ } else {
+
+ error = ERR_FILE_MISSING_DEPENDENCIES;
+ ERR_FAIL_V_MSG(error, "Can't load dependency: " + path + ".");
+ }
}
} else {
- resource_cache.push_back(res);
+ Error err = ResourceLoader::load_threaded_request(path, external_resources[i].type, use_sub_threads, local_path);
+ if (err != OK) {
+ if (!ResourceLoader::get_abort_on_missing_resources()) {
+
+ ResourceLoader::notify_dependency_error(local_path, path, external_resources[i].type);
+ } else {
+
+ error = ERR_FILE_MISSING_DEPENDENCIES;
+ ERR_FAIL_V_MSG(error, "Can't load dependency: " + path + ".");
+ }
+ }
}
stage++;
- return error;
}
- s -= external_resources.size();
-
- if (s >= internal_resources.size()) {
+ for (int i = 0; i < internal_resources.size(); i++) {
- error = ERR_BUG;
- ERR_FAIL_COND_V(s >= internal_resources.size(), error);
- }
+ bool main = i == (internal_resources.size() - 1);
- bool main = s == (internal_resources.size() - 1);
+ //maybe it is loaded already
+ String path;
+ int subindex = 0;
- //maybe it is loaded already
- String path;
- int subindex = 0;
+ if (!main) {
- if (!main) {
+ path = internal_resources[i].path;
+ if (path.begins_with("local://")) {
+ path = path.replace_first("local://", "");
+ subindex = path.to_int();
+ path = res_path + "::" + path;
+ }
- path = internal_resources[s].path;
- if (path.begins_with("local://")) {
- path = path.replace_first("local://", "");
- subindex = path.to_int();
- path = res_path + "::" + path;
- }
+ if (ResourceCache::has(path)) {
+ //already loaded, don't do anything
+ stage++;
+ error = OK;
+ continue;
+ }
+ } else {
- if (ResourceCache::has(path)) {
- //already loaded, don't do anything
- stage++;
- error = OK;
- return error;
+ if (!ResourceCache::has(res_path))
+ path = res_path;
}
- } else {
- if (!ResourceCache::has(res_path))
- path = res_path;
- }
-
- uint64_t offset = internal_resources[s].offset;
+ uint64_t offset = internal_resources[i].offset;
- f->seek(offset);
+ f->seek(offset);
- String t = get_unicode_string();
+ String t = get_unicode_string();
- Object *obj = ClassDB::instance(t);
- if (!obj) {
- error = ERR_FILE_CORRUPT;
- ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + ".");
- }
+ Object *obj = ClassDB::instance(t);
+ if (!obj) {
+ error = ERR_FILE_CORRUPT;
+ ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + ".");
+ }
- Resource *r = Object::cast_to<Resource>(obj);
- if (!r) {
- String obj_class = obj->get_class();
- error = ERR_FILE_CORRUPT;
- memdelete(obj); //bye
- ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource type in resource field not a resource, type is: " + obj_class + ".");
- }
+ Resource *r = Object::cast_to<Resource>(obj);
+ if (!r) {
+ String obj_class = obj->get_class();
+ error = ERR_FILE_CORRUPT;
+ memdelete(obj); //bye
+ ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource type in resource field not a resource, type is: " + obj_class + ".");
+ }
- RES res = RES(r);
+ RES res = RES(r);
- r->set_path(path);
- r->set_subindex(subindex);
+ r->set_path(path);
+ r->set_subindex(subindex);
- int pc = f->get_32();
+ int pc = f->get_32();
- //set properties
+ //set properties
- for (int i = 0; i < pc; i++) {
+ for (int j = 0; j < pc; j++) {
- StringName name = _get_string();
+ StringName name = _get_string();
- if (name == StringName()) {
- error = ERR_FILE_CORRUPT;
- ERR_FAIL_V(ERR_FILE_CORRUPT);
- }
+ if (name == StringName()) {
+ error = ERR_FILE_CORRUPT;
+ ERR_FAIL_V(ERR_FILE_CORRUPT);
+ }
- Variant value;
+ Variant value;
- error = parse_variant(value);
- if (error)
- return error;
+ error = parse_variant(value);
+ if (error)
+ return error;
- res->set(name, value);
- }
+ res->set(name, value);
+ }
#ifdef TOOLS_ENABLED
- res->set_edited(false);
+ res->set_edited(false);
#endif
- stage++;
+ stage++;
- resource_cache.push_back(res);
+ if (progress) {
+ *progress = (i + 1) / float(internal_resources.size());
+ }
- if (main) {
+ resource_cache.push_back(res);
- f->close();
- resource = res;
- resource->set_as_translation_remapped(translation_remapped);
- error = ERR_FILE_EOF;
+ if (main) {
- } else {
- error = OK;
+ f->close();
+ resource = res;
+ resource->set_as_translation_remapped(translation_remapped);
+ error = OK;
+ return OK;
+ }
}
- return OK;
+ return ERR_FILE_EOF;
}
-int ResourceInteractiveLoaderBinary::get_stage() const {
- return stage;
-}
-int ResourceInteractiveLoaderBinary::get_stage_count() const {
-
- return external_resources.size() + internal_resources.size();
-}
-
-void ResourceInteractiveLoaderBinary::set_translation_remapped(bool p_remapped) {
+void ResourceLoaderBinary::set_translation_remapped(bool p_remapped) {
translation_remapped = p_remapped;
}
@@ -726,7 +828,7 @@ static String get_ustring(FileAccess *f) {
return s;
}
-String ResourceInteractiveLoaderBinary::get_unicode_string() {
+String ResourceLoaderBinary::get_unicode_string() {
int len = f->get_32();
if (len > str_buf.size()) {
@@ -740,7 +842,7 @@ String ResourceInteractiveLoaderBinary::get_unicode_string() {
return s;
}
-void ResourceInteractiveLoaderBinary::get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types) {
+void ResourceLoaderBinary::get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types) {
open(p_f);
if (error)
@@ -758,7 +860,7 @@ void ResourceInteractiveLoaderBinary::get_dependencies(FileAccess *p_f, List<Str
}
}
-void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) {
+void ResourceLoaderBinary::open(FileAccess *p_f) {
error = OK;
@@ -859,7 +961,7 @@ void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) {
}
}
-String ResourceInteractiveLoaderBinary::recognize(FileAccess *p_f) {
+String ResourceLoaderBinary::recognize(FileAccess *p_f) {
error = OK;
@@ -904,20 +1006,24 @@ String ResourceInteractiveLoaderBinary::recognize(FileAccess *p_f) {
return type;
}
-ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() :
+ResourceLoaderBinary::ResourceLoaderBinary() :
translation_remapped(false),
+ ver_format(0),
f(NULL),
- error(OK),
- stage(0) {
+ importmd_ofs(0),
+ error(OK) {
+
+ progress = nullptr;
+ use_sub_threads = false;
}
-ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() {
+ResourceLoaderBinary::~ResourceLoaderBinary() {
if (f)
memdelete(f);
}
-Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
@@ -925,16 +1031,27 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
- ERR_FAIL_COND_V_MSG(err != OK, Ref<ResourceInteractiveLoader>(), "Cannot open file '" + p_path + "'.");
+ ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot open file '" + p_path + "'.");
- Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary);
+ ResourceLoaderBinary loader;
+ loader.use_sub_threads = p_use_sub_threads;
+ loader.progress = r_progress;
String path = p_original_path != "" ? p_original_path : p_path;
- ria->local_path = ProjectSettings::get_singleton()->localize_path(path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
- ria->open(f);
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ loader.open(f);
+
+ err = loader.load();
+
+ if (r_error) {
+ *r_error = err;
+ }
- return ria;
+ if (err) {
+ return RES();
+ }
+ return loader.resource;
}
void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const {
@@ -976,11 +1093,11 @@ void ResourceFormatLoaderBinary::get_dependencies(const String &p_path, List<Str
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_MSG(!f, "Cannot open file '" + p_path + "'.");
- Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
- ria->get_dependencies(f, p_dependencies, p_add_types);
+ ResourceLoaderBinary loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ loader.get_dependencies(f, p_dependencies, p_add_types);
}
Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, const Map<String, String> &p_map) {
@@ -1065,21 +1182,17 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_OPEN, "Cannot open file '" + p_path + "'.");
- Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- ria->remaps = p_map;
- //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
- ria->open(f);
+ ResourceLoaderBinary loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ loader.remaps = p_map;
+ //loader.set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ loader.open(f);
- err = ria->poll();
-
- while (err == OK) {
- err = ria->poll();
- }
+ err = loader.load();
ERR_FAIL_COND_V(err != ERR_FILE_EOF, ERR_FILE_CORRUPT);
- RES res = ria->get_resource();
+ RES res = loader.get_resource();
ERR_FAIL_COND_V(!res.is_valid(), ERR_FILE_CORRUPT);
return ResourceFormatSaverBinary::singleton->save(p_path, res);
@@ -1195,11 +1308,11 @@ String ResourceFormatLoaderBinary::get_resource_type(const String &p_path) const
return ""; //could not rwead
}
- Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
- String r = ria->recognize(f);
+ ResourceLoaderBinary loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ String r = loader.recognize(f);
return ClassDB::get_compatibility_remapped_class(r);
}
@@ -1249,7 +1362,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
double d = p_property;
float fl = d;
@@ -1258,7 +1371,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_double(d);
} else {
- f->store_32(VARIANT_REAL);
+ f->store_32(VARIANT_FLOAT);
f->store_real(fl);
}
@@ -1278,6 +1391,14 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_real(val.y);
} break;
+ case Variant::VECTOR2I: {
+
+ f->store_32(VARIANT_VECTOR2I);
+ Vector2i val = p_property;
+ f->store_32(val.x);
+ f->store_32(val.y);
+
+ } break;
case Variant::RECT2: {
f->store_32(VARIANT_RECT2);
@@ -1288,6 +1409,16 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_real(val.size.y);
} break;
+ case Variant::RECT2I: {
+
+ f->store_32(VARIANT_RECT2I);
+ Rect2i val = p_property;
+ f->store_32(val.position.x);
+ f->store_32(val.position.y);
+ f->store_32(val.size.x);
+ f->store_32(val.size.y);
+
+ } break;
case Variant::VECTOR3: {
f->store_32(VARIANT_VECTOR3);
@@ -1297,6 +1428,15 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_real(val.z);
} break;
+ case Variant::VECTOR3I: {
+
+ f->store_32(VARIANT_VECTOR3I);
+ Vector3i val = p_property;
+ f->store_32(val.x);
+ f->store_32(val.y);
+ f->store_32(val.z);
+
+ } break;
case Variant::PLANE: {
f->store_32(VARIANT_PLANE);
@@ -1384,6 +1524,13 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_real(val.a);
} break;
+ case Variant::STRING_NAME: {
+
+ f->store_32(VARIANT_STRING_NAME);
+ String val = p_property;
+ save_unicode_string(f, val);
+
+ } break;
case Variant::NODE_PATH: {
f->store_32(VARIANT_NODE_PATH);
@@ -1441,6 +1588,17 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
}
} break;
+ case Variant::CALLABLE: {
+
+ f->store_32(VARIANT_CALLABLE);
+ WARN_PRINT("Can't save Callables.");
+ } break;
+ case Variant::SIGNAL: {
+
+ f->store_32(VARIANT_SIGNAL);
+ WARN_PRINT("Can't save Signals.");
+ } break;
+
case Variant::DICTIONARY: {
f->store_32(VARIANT_DICTIONARY);
@@ -1473,59 +1631,82 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
}
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
f->store_32(VARIANT_RAW_ARRAY);
- PoolVector<uint8_t> arr = p_property;
+ Vector<uint8_t> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<uint8_t>::Read r = arr.read();
- f->store_buffer(r.ptr(), len);
+ const uint8_t *r = arr.ptr();
+ f->store_buffer(r, len);
_pad_buffer(f, len);
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- f->store_32(VARIANT_INT_ARRAY);
- PoolVector<int> arr = p_property;
+ f->store_32(VARIANT_INT32_ARRAY);
+ Vector<int32_t> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<int>::Read r = arr.read();
+ const int32_t *r = arr.ptr();
for (int i = 0; i < len; i++)
f->store_32(r[i]);
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
+
+ f->store_32(VARIANT_INT64_ARRAY);
+ Vector<int64_t> arr = p_property;
+ int len = arr.size();
+ f->store_32(len);
+ const int64_t *r = arr.ptr();
+ for (int i = 0; i < len; i++)
+ f->store_64(r[i]);
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
- f->store_32(VARIANT_REAL_ARRAY);
- PoolVector<real_t> arr = p_property;
+ f->store_32(VARIANT_FLOAT32_ARRAY);
+ Vector<float> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<real_t>::Read r = arr.read();
+ const float *r = arr.ptr();
for (int i = 0; i < len; i++) {
f->store_real(r[i]);
}
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ f->store_32(VARIANT_FLOAT64_ARRAY);
+ Vector<double> arr = p_property;
+ int len = arr.size();
+ f->store_32(len);
+ const double *r = arr.ptr();
+ for (int i = 0; i < len; i++) {
+ f->store_double(r[i]);
+ }
+
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
f->store_32(VARIANT_STRING_ARRAY);
- PoolVector<String> arr = p_property;
+ Vector<String> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<String>::Read r = arr.read();
+ const String *r = arr.ptr();
for (int i = 0; i < len; i++) {
save_unicode_string(f, r[i]);
}
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
f->store_32(VARIANT_VECTOR3_ARRAY);
- PoolVector<Vector3> arr = p_property;
+ Vector<Vector3> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<Vector3>::Read r = arr.read();
+ const Vector3 *r = arr.ptr();
for (int i = 0; i < len; i++) {
f->store_real(r[i].x);
f->store_real(r[i].y);
@@ -1533,26 +1714,26 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
}
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
f->store_32(VARIANT_VECTOR2_ARRAY);
- PoolVector<Vector2> arr = p_property;
+ Vector<Vector2> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<Vector2>::Read r = arr.read();
+ const Vector2 *r = arr.ptr();
for (int i = 0; i < len; i++) {
f->store_real(r[i].x);
f->store_real(r[i].y);
}
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
f->store_32(VARIANT_COLOR_ARRAY);
- PoolVector<Color> arr = p_property;
+ Vector<Color> arr = p_property;
int len = arr.size();
f->store_32(len);
- PoolVector<Color>::Read r = arr.read();
+ const Color *r = arr.ptr();
for (int i = 0; i < len; i++) {
f->store_real(r[i].r);
f->store_real(r[i].g);
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index f02dbaa0c2..0ffa2c3626 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -35,7 +35,7 @@
#include "core/io/resource_saver.h"
#include "core/os/file_access.h"
-class ResourceInteractiveLoaderBinary : public ResourceInteractiveLoader {
+class ResourceLoaderBinary {
bool translation_remapped;
String local_path;
@@ -58,8 +58,11 @@ class ResourceInteractiveLoaderBinary : public ResourceInteractiveLoader {
struct ExtResource {
String path;
String type;
+ RES cache;
};
+ bool use_sub_threads;
+ float *progress;
Vector<ExtResource> external_resources;
struct IntResource {
@@ -75,32 +78,30 @@ class ResourceInteractiveLoaderBinary : public ResourceInteractiveLoader {
Map<String, String> remaps;
Error error;
- int stage;
-
friend class ResourceFormatLoaderBinary;
Error parse_variant(Variant &r_v);
+ Map<String, RES> dependency_cache;
+
public:
- virtual void set_local_path(const String &p_local_path);
- virtual Ref<Resource> get_resource();
- virtual Error poll();
- virtual int get_stage() const;
- virtual int get_stage_count() const;
- virtual void set_translation_remapped(bool p_remapped);
+ void set_local_path(const String &p_local_path);
+ Ref<Resource> get_resource();
+ Error load();
+ void set_translation_remapped(bool p_remapped);
void set_remaps(const Map<String, String> &p_remaps) { remaps = p_remaps; }
void open(FileAccess *p_f);
String recognize(FileAccess *p_f);
void get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types);
- ResourceInteractiveLoaderBinary();
- ~ResourceInteractiveLoaderBinary();
+ ResourceLoaderBinary();
+ ~ResourceLoaderBinary();
};
class ResourceFormatLoaderBinary : public ResourceFormatLoader {
public:
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp
index f147170ff7..efaf958949 100644
--- a/core/io/resource_importer.cpp
+++ b/core/io/resource_importer.cpp
@@ -117,7 +117,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
return OK;
}
-RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
PathAndType pat;
Error err = _get_path_and_type(p_path, pat);
@@ -130,7 +130,7 @@ RES ResourceFormatImporter::load(const String &p_path, const String &p_original_
return RES();
}
- RES res = ResourceLoader::_load(pat.path, p_path, pat.type, false, r_error);
+ RES res = ResourceLoader::_load(pat.path, p_path, pat.type, false, r_error, p_use_sub_threads, r_progress);
#ifdef TOOLS_ENABLED
if (res.is_valid()) {
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index 4eb04586e6..65c148f2ac 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -58,7 +58,7 @@ class ResourceFormatImporter : public ResourceFormatLoader {
public:
static ResourceFormatImporter *get_singleton() { return singleton; }
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const;
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 6877f816e1..5dca8b3b89 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -39,26 +39,16 @@
#include "core/translation.h"
#include "core/variant_parser.h"
+#ifdef DEBUG_LOAD_THREADED
+#define print_lt(m_text) print_line(m_text)
+#else
+#define print_lt(m_text)
+#endif
+
Ref<ResourceFormatLoader> ResourceLoader::loader[ResourceLoader::MAX_LOADERS];
int ResourceLoader::loader_count = 0;
-Error ResourceInteractiveLoader::wait() {
-
- Error err = poll();
- while (err == OK) {
- err = poll();
- }
-
- return err;
-}
-
-ResourceInteractiveLoader::~ResourceInteractiveLoader() {
- if (path_loading != String()) {
- ResourceLoader::_remove_from_loading_map_and_thread(path_loading, path_loading_thread);
- }
-}
-
bool ResourceFormatLoader::recognize_path(const String &p_path, const String &p_for_type) const {
String extension = p_path.get_extension();
@@ -111,45 +101,6 @@ void ResourceLoader::get_recognized_extensions_for_type(const String &p_type, Li
}
}
-void ResourceInteractiveLoader::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("get_resource"), &ResourceInteractiveLoader::get_resource);
- ClassDB::bind_method(D_METHOD("poll"), &ResourceInteractiveLoader::poll);
- ClassDB::bind_method(D_METHOD("wait"), &ResourceInteractiveLoader::wait);
- ClassDB::bind_method(D_METHOD("get_stage"), &ResourceInteractiveLoader::get_stage);
- ClassDB::bind_method(D_METHOD("get_stage_count"), &ResourceInteractiveLoader::get_stage_count);
-}
-
-class ResourceInteractiveLoaderDefault : public ResourceInteractiveLoader {
-
- GDCLASS(ResourceInteractiveLoaderDefault, ResourceInteractiveLoader);
-
-public:
- Ref<Resource> resource;
-
- virtual void set_local_path(const String &p_local_path) { /*scene->set_filename(p_local_path);*/
- }
- virtual Ref<Resource> get_resource() { return resource; }
- virtual Error poll() { return ERR_FILE_EOF; }
- virtual int get_stage() const { return 1; }
- virtual int get_stage_count() const { return 1; }
- virtual void set_translation_remapped(bool p_remapped) { resource->set_as_translation_remapped(p_remapped); }
-
- ResourceInteractiveLoaderDefault() {}
-};
-
-Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
-
- //either this
- Ref<Resource> res = load(p_path, p_original_path, r_error);
- if (res.is_null())
- return Ref<ResourceInteractiveLoader>();
-
- Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
- ril->resource = res;
- return ril;
-}
-
bool ResourceFormatLoader::exists(const String &p_path) const {
return FileAccess::exists(p_path); //by default just check file
}
@@ -157,10 +108,10 @@ bool ResourceFormatLoader::exists(const String &p_path) const {
void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) const {
if (get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")) {
- PoolStringArray exts = get_script_instance()->call("get_recognized_extensions");
+ PackedStringArray exts = get_script_instance()->call("get_recognized_extensions");
{
- PoolStringArray::Read r = exts.read();
+ const String *r = exts.ptr();
for (int i = 0; i < exts.size(); ++i) {
p_extensions->push_back(r[i]);
}
@@ -168,10 +119,10 @@ void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions)
}
}
-RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (get_script_instance() && get_script_instance()->has_method("load")) {
- Variant res = get_script_instance()->call("load", p_path, p_original_path);
+ Variant res = get_script_instance()->call("load", p_path, p_original_path, p_use_sub_threads);
if (res.get_type() == Variant::INT) {
@@ -184,38 +135,20 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa
*r_error = OK;
return res;
}
- }
-
- //or this must be implemented
- Ref<ResourceInteractiveLoader> ril = load_interactive(p_path, p_original_path, r_error);
- if (!ril.is_valid())
- return RES();
- ril->set_local_path(p_original_path);
-
- while (true) {
-
- Error err = ril->poll();
-
- if (err == ERR_FILE_EOF) {
- if (r_error)
- *r_error = OK;
- return ril->get_resource();
- }
- if (r_error)
- *r_error = err;
-
- ERR_FAIL_COND_V_MSG(err != OK, RES(), "Failed to load resource '" + p_path + "'.");
+ return res;
}
+
+ ERR_FAIL_V_MSG(RES(), "Failed to load resource '" + p_path + "', ResourceFormatLoader::load was not implemented for this resource type.");
}
void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
if (get_script_instance() && get_script_instance()->has_method("get_dependencies")) {
- PoolStringArray deps = get_script_instance()->call("get_dependencies", p_path, p_add_types);
+ PackedStringArray deps = get_script_instance()->call("get_dependencies", p_path, p_add_types);
{
- PoolStringArray::Read r = deps.read();
+ const String *r = deps.ptr();
for (int i = 0; i < deps.size(); ++i) {
p_dependencies->push_back(r[i]);
}
@@ -247,8 +180,8 @@ void ResourceFormatLoader::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), info);
}
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_recognized_extensions"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles_type", PropertyInfo(Variant::STRING, "typename")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_recognized_extensions"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles_type", PropertyInfo(Variant::STRING_NAME, "typename")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type", PropertyInfo(Variant::STRING, "path")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "add_types")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "rename_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "renames")));
@@ -256,7 +189,7 @@ void ResourceFormatLoader::_bind_methods() {
///////////////////////////////////
-RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
+RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error, bool p_use_sub_threads, float *r_progress) {
bool found = false;
@@ -267,7 +200,7 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c
continue;
}
found = true;
- RES res = loader[i]->load(p_path, p_original_path != String() ? p_original_path : p_path, r_error);
+ RES res = loader[i]->load(p_path, p_original_path != String() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress);
if (res.is_null()) {
continue;
}
@@ -285,61 +218,302 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c
ERR_FAIL_V_MSG(RES(), "No loader found for resource: " + p_path + ".");
}
-bool ResourceLoader::_add_to_loading_map(const String &p_path) {
+void ResourceLoader::_thread_load_function(void *p_userdata) {
- bool success;
- if (loading_map_mutex) {
- loading_map_mutex->lock();
+ ThreadLoadTask &load_task = *(ThreadLoadTask *)p_userdata;
+ load_task.loader_id = Thread::get_caller_id();
+
+ if (load_task.semaphore) {
+ //this is an actual thread, so wait for Ok fom semaphore
+ thread_load_semaphore->wait(); //wait until its ok to start loading
}
+ load_task.resource = _load(load_task.remapped_path, load_task.remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, false, &load_task.error, load_task.use_sub_threads, &load_task.progress);
- LoadingMapKey key;
- key.path = p_path;
- key.thread = Thread::get_caller_id();
+ load_task.progress = 1.0; //it was fully loaded at this point, so force progress to 1.0
- if (loading_map.has(key)) {
- success = false;
+ thread_load_mutex->lock();
+ if (load_task.error != OK) {
+ load_task.status = THREAD_LOAD_FAILED;
} else {
- loading_map[key] = true;
- success = true;
+ load_task.status = THREAD_LOAD_LOADED;
+ }
+ if (load_task.semaphore) {
+
+ if (load_task.start_next && thread_waiting_count > 0) {
+ thread_waiting_count--;
+ //thread loading count remains constant, this ends but another one begins
+ thread_load_semaphore->post();
+ } else {
+ thread_loading_count--; //no threads waiting, just reduce loading count
+ }
+
+ print_lt("END: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
+
+ for (int i = 0; i < load_task.poll_requests; i++) {
+ load_task.semaphore->post();
+ }
+ memdelete(load_task.semaphore);
+ load_task.semaphore = nullptr;
}
- if (loading_map_mutex) {
- loading_map_mutex->unlock();
+ if (load_task.resource.is_valid()) {
+ load_task.resource->set_path(load_task.local_path);
+
+ if (load_task.xl_remapped)
+ load_task.resource->set_as_translation_remapped(true);
+
+#ifdef TOOLS_ENABLED
+
+ load_task.resource->set_edited(false);
+ if (timestamp_on_load) {
+ uint64_t mt = FileAccess::get_modified_time(load_task.remapped_path);
+ //printf("mt %s: %lli\n",remapped_path.utf8().get_data(),mt);
+ load_task.resource->set_last_modified_time(mt);
+ }
+#endif
+
+ if (_loaded_callback) {
+ _loaded_callback(load_task.resource, load_task.local_path);
+ }
}
- return success;
+ thread_load_mutex->unlock();
}
+Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, const String &p_source_resource) {
-void ResourceLoader::_remove_from_loading_map(const String &p_path) {
- if (loading_map_mutex) {
- loading_map_mutex->lock();
+ String local_path;
+ if (p_path.is_rel_path())
+ local_path = "res://" + p_path;
+ else
+ local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+
+ thread_load_mutex->lock();
+
+ if (p_source_resource != String()) {
+ //must be loading from this resource
+ if (!thread_load_tasks.has(p_source_resource)) {
+ thread_load_mutex->unlock();
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "There is no thread loading source resource '" + p_source_resource + "'.");
+ }
+ //must be loading from this thread
+ if (thread_load_tasks[p_source_resource].loader_id != Thread::get_caller_id()) {
+ thread_load_mutex->unlock();
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Threading loading resource'" + local_path + " failed: Source specified: '" + p_source_resource + "' but was not called by it.");
+ }
+
+ //must not be already added as s sub tasks
+ if (thread_load_tasks[p_source_resource].sub_tasks.has(local_path)) {
+ thread_load_mutex->unlock();
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Thread loading source resource '" + p_source_resource + "' already is loading '" + local_path + "'.");
+ }
+ }
+
+ if (thread_load_tasks.has(local_path)) {
+ thread_load_tasks[local_path].requests++;
+ if (p_source_resource != String()) {
+ thread_load_tasks[p_source_resource].sub_tasks.insert(local_path);
+ }
+ thread_load_mutex->unlock();
+ return OK;
}
- LoadingMapKey key;
- key.path = p_path;
- key.thread = Thread::get_caller_id();
+ {
+ //create load task
+
+ ThreadLoadTask load_task;
+
+ load_task.requests = 1;
+ load_task.remapped_path = _path_remap(local_path, &load_task.xl_remapped);
+ load_task.local_path = local_path;
+ load_task.type_hint = p_type_hint;
+ load_task.use_sub_threads = p_use_sub_threads;
+
+ { //must check if resource is already loaded before attempting to load it in a thread
+
+ if (load_task.loader_id == Thread::get_caller_id()) {
+ thread_load_mutex->unlock();
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Attempted to load a resource already being loaded from this thread, cyclic reference?");
+ }
+ //lock first if possible
+ if (ResourceCache::lock) {
+ ResourceCache::lock->read_lock();
+ }
+
+ //get ptr
+ Resource **rptr = ResourceCache::resources.getptr(local_path);
+
+ if (rptr) {
+ RES res(*rptr);
+ //it is possible this resource was just freed in a thread. If so, this referencing will not work and resource is considered not cached
+ if (res.is_valid()) {
+ //referencing is fine
+ load_task.resource = res;
+ load_task.status = THREAD_LOAD_LOADED;
+ load_task.progress = 1.0;
+ }
+ }
+ if (ResourceCache::lock) {
+ ResourceCache::lock->read_unlock();
+ }
+ }
- loading_map.erase(key);
+ if (p_source_resource != String()) {
+ thread_load_tasks[p_source_resource].sub_tasks.insert(local_path);
+ }
- if (loading_map_mutex) {
- loading_map_mutex->unlock();
+ thread_load_tasks[local_path] = load_task;
}
+
+ ThreadLoadTask &load_task = thread_load_tasks[local_path];
+
+ if (load_task.resource.is_null()) { //needs to be loaded in thread
+
+ load_task.semaphore = memnew(Semaphore);
+ if (thread_loading_count < thread_load_max) {
+ thread_loading_count++;
+ thread_load_semaphore->post(); //we have free threads, so allow one
+ } else {
+ thread_waiting_count++;
+ }
+
+ print_lt("REQUEST: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
+
+ load_task.thread = Thread::create(_thread_load_function, &thread_load_tasks[local_path]);
+ load_task.loader_id = load_task.thread->get_id();
+ }
+
+ thread_load_mutex->unlock();
+
+ return OK;
}
-void ResourceLoader::_remove_from_loading_map_and_thread(const String &p_path, Thread::ID p_thread) {
- if (loading_map_mutex) {
- loading_map_mutex->lock();
+float ResourceLoader::_dependency_get_progress(const String &p_path) {
+
+ if (thread_load_tasks.has(p_path)) {
+ ThreadLoadTask &load_task = thread_load_tasks[p_path];
+ int dep_count = load_task.sub_tasks.size();
+ if (dep_count > 0) {
+ float dep_progress = 0;
+ for (Set<String>::Element *E = load_task.sub_tasks.front(); E; E = E->next()) {
+ dep_progress += _dependency_get_progress(E->get());
+ }
+ dep_progress /= float(dep_count);
+ dep_progress *= 0.5;
+ dep_progress += load_task.progress * 0.5;
+ return dep_progress;
+ } else {
+ return load_task.progress;
+ }
+
+ } else {
+ return 1.0; //assume finished loading it so it no longer exists
}
+}
- LoadingMapKey key;
- key.path = p_path;
- key.thread = p_thread;
+ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, float *r_progress) {
- loading_map.erase(key);
+ String local_path;
+ if (p_path.is_rel_path())
+ local_path = "res://" + p_path;
+ else
+ local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- if (loading_map_mutex) {
- loading_map_mutex->unlock();
+ thread_load_mutex->lock();
+ if (!thread_load_tasks.has(local_path)) {
+ thread_load_mutex->unlock();
+ return THREAD_LOAD_INVALID_RESOURCE;
+ }
+ ThreadLoadTask &load_task = thread_load_tasks[local_path];
+ ThreadLoadStatus status;
+ status = load_task.status;
+ if (r_progress) {
+ *r_progress = _dependency_get_progress(local_path);
}
+
+ thread_load_mutex->unlock();
+
+ return status;
+}
+RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) {
+
+ String local_path;
+ if (p_path.is_rel_path())
+ local_path = "res://" + p_path;
+ else
+ local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+
+ thread_load_mutex->lock();
+ if (!thread_load_tasks.has(local_path)) {
+ thread_load_mutex->unlock();
+ if (r_error) {
+ *r_error = ERR_INVALID_PARAMETER;
+ }
+ return RES();
+ }
+
+ ThreadLoadTask &load_task = thread_load_tasks[local_path];
+
+ //semaphore still exists, meaning its still loading, request poll
+ Semaphore *semaphore = load_task.semaphore;
+ if (semaphore) {
+ load_task.poll_requests++;
+
+ {
+ // As we got a semaphore, this means we are going to have to wait
+ // until the sub-resource is done loading
+ //
+ // As this thread will become 'blocked' we should "echange" its
+ // active status with a waiting one, to ensure load continues.
+ //
+ // This ensures loading is never blocked and that is also within
+ // the maximum number of active threads.
+
+ if (thread_waiting_count > 0) {
+ thread_waiting_count--;
+ thread_loading_count++;
+ thread_load_semaphore->post();
+
+ load_task.start_next = false; //do not start next since we are doing it here
+ }
+
+ thread_suspended_count++;
+
+ print_lt("GET: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
+ }
+
+ thread_load_mutex->unlock();
+ semaphore->wait();
+ thread_load_mutex->lock();
+
+ thread_suspended_count--;
+
+ if (!thread_load_tasks.has(local_path)) { //may have been erased during unlock and this was always an invalid call
+ thread_load_mutex->unlock();
+ if (r_error) {
+ *r_error = ERR_INVALID_PARAMETER;
+ }
+ return RES();
+ }
+ }
+
+ RES resource = load_task.resource;
+ if (r_error) {
+ *r_error = load_task.error;
+ }
+
+ load_task.requests--;
+
+ if (load_task.requests == 0) {
+ if (load_task.thread) { //thread may not have been used
+ Thread::wait_to_finish(load_task.thread);
+ memdelete(load_task.thread);
+ }
+ thread_load_tasks.erase(local_path);
+ }
+
+ thread_load_mutex->unlock();
+
+ return resource;
}
RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
@@ -355,83 +529,102 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
if (!p_no_cache) {
- {
- bool success = _add_to_loading_map(local_path);
- ERR_FAIL_COND_V_MSG(!success, RES(), "Resource: '" + local_path + "' is already being loaded. Cyclic reference?");
+ thread_load_mutex->lock();
+
+ //Is it already being loaded? poll until done
+ if (thread_load_tasks.has(local_path)) {
+ Error err = load_threaded_request(p_path, p_type_hint);
+ if (err != OK) {
+ if (r_error) {
+ *r_error = err;
+ }
+ thread_load_mutex->unlock();
+ return RES();
+ }
+ thread_load_mutex->unlock();
+
+ return load_threaded_get(p_path, r_error);
}
- //lock first if possible
+ //Is it cached?
if (ResourceCache::lock) {
ResourceCache::lock->read_lock();
}
- //get ptr
Resource **rptr = ResourceCache::resources.getptr(local_path);
if (rptr) {
RES res(*rptr);
+
//it is possible this resource was just freed in a thread. If so, this referencing will not work and resource is considered not cached
if (res.is_valid()) {
- //referencing is fine
- if (r_error)
- *r_error = OK;
if (ResourceCache::lock) {
ResourceCache::lock->read_unlock();
}
- _remove_from_loading_map(local_path);
- return res;
+ thread_load_mutex->unlock();
+
+ if (r_error) {
+ *r_error = OK;
+ }
+
+ return res; //use cached
}
}
+
if (ResourceCache::lock) {
ResourceCache::lock->read_unlock();
}
- }
- bool xl_remapped = false;
- String path = _path_remap(local_path, &xl_remapped);
+ //load using task (but this thread)
+ ThreadLoadTask load_task;
+
+ load_task.requests = 1;
+ load_task.local_path = local_path;
+ load_task.remapped_path = _path_remap(local_path, &load_task.xl_remapped);
+ load_task.type_hint = p_type_hint;
+ load_task.loader_id = Thread::get_caller_id();
- if (path == "") {
- if (!p_no_cache) {
- _remove_from_loading_map(local_path);
+ thread_load_tasks[local_path] = load_task;
+
+ thread_load_mutex->unlock();
+
+ _thread_load_function(&thread_load_tasks[local_path]);
+
+ return load_threaded_get(p_path, r_error);
+
+ } else {
+
+ bool xl_remapped = false;
+ String path = _path_remap(local_path, &xl_remapped);
+
+ if (path == "") {
+ ERR_FAIL_V_MSG(RES(), "Remapping '" + local_path + "' failed.");
}
- ERR_FAIL_V_MSG(RES(), "Remapping '" + local_path + "' failed.");
- }
- print_verbose("Loading resource: " + path);
- RES res = _load(path, local_path, p_type_hint, p_no_cache, r_error);
+ print_verbose("Loading resource: " + path);
+ float p;
+ RES res = _load(path, local_path, p_type_hint, p_no_cache, r_error, false, &p);
- if (res.is_null()) {
- if (!p_no_cache) {
- _remove_from_loading_map(local_path);
+ if (res.is_null()) {
+ print_verbose("Failed loading resource: " + path);
+ return RES();
}
- print_verbose("Failed loading resource: " + path);
- return RES();
- }
- if (!p_no_cache)
- res->set_path(local_path);
- if (xl_remapped)
- res->set_as_translation_remapped(true);
+ if (xl_remapped)
+ res->set_as_translation_remapped(true);
#ifdef TOOLS_ENABLED
- res->set_edited(false);
- if (timestamp_on_load) {
- uint64_t mt = FileAccess::get_modified_time(path);
- //printf("mt %s: %lli\n",remapped_path.utf8().get_data(),mt);
- res->set_last_modified_time(mt);
- }
+ res->set_edited(false);
+ if (timestamp_on_load) {
+ uint64_t mt = FileAccess::get_modified_time(path);
+ //printf("mt %s: %lli\n",remapped_path.utf8().get_data(),mt);
+ res->set_last_modified_time(mt);
+ }
#endif
- if (!p_no_cache) {
- _remove_from_loading_map(local_path);
- }
-
- if (_loaded_callback) {
- _loaded_callback(res, p_path);
+ return res;
}
-
- return res;
}
bool ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
@@ -464,76 +657,6 @@ bool ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
return false;
}
-Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
-
- if (r_error)
- *r_error = ERR_CANT_OPEN;
-
- String local_path;
- if (p_path.is_rel_path())
- local_path = "res://" + p_path;
- else
- local_path = ProjectSettings::get_singleton()->localize_path(p_path);
-
- if (!p_no_cache) {
-
- bool success = _add_to_loading_map(local_path);
- ERR_FAIL_COND_V_MSG(!success, RES(), "Resource: '" + local_path + "' is already being loaded. Cyclic reference?");
-
- if (ResourceCache::has(local_path)) {
-
- print_verbose("Loading resource: " + local_path + " (cached)");
- Ref<Resource> res_cached = ResourceCache::get(local_path);
- Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
-
- ril->resource = res_cached;
- ril->path_loading = local_path;
- ril->path_loading_thread = Thread::get_caller_id();
- return ril;
- }
- }
-
- bool xl_remapped = false;
- String path = _path_remap(local_path, &xl_remapped);
- if (path == "") {
- if (!p_no_cache) {
- _remove_from_loading_map(local_path);
- }
- ERR_FAIL_V_MSG(RES(), "Remapping '" + local_path + "' failed.");
- }
-
- print_verbose("Loading resource: " + path);
-
- bool found = false;
- for (int i = 0; i < loader_count; i++) {
-
- if (!loader[i]->recognize_path(path, p_type_hint))
- continue;
- found = true;
- Ref<ResourceInteractiveLoader> ril = loader[i]->load_interactive(path, local_path, r_error);
- if (ril.is_null())
- continue;
- if (!p_no_cache) {
- ril->set_local_path(local_path);
- ril->path_loading = local_path;
- ril->path_loading_thread = Thread::get_caller_id();
- }
-
- if (xl_remapped)
- ril->set_translation_remapped(true);
-
- return ril;
- }
-
- if (!p_no_cache) {
- _remove_from_loading_map(local_path);
- }
-
- ERR_FAIL_COND_V_MSG(found, Ref<ResourceInteractiveLoader>(), "Failed loading resource: " + path + ".");
-
- ERR_FAIL_V_MSG(Ref<ResourceInteractiveLoader>(), "No loader found for resource: " + path + ".");
-}
-
void ResourceLoader::add_resource_format_loader(Ref<ResourceFormatLoader> p_format_loader, bool p_at_front) {
ERR_FAIL_COND(p_format_loader.is_null());
@@ -743,7 +866,7 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
if (translation_remaps.has(p_path)) {
// translation_remaps has the following format:
- // { "res://path.png": PoolStringArray( "res://path-ru.png:ru", "res://path-de.png:de" ) }
+ // { "res://path.png": PackedStringArray( "res://path-ru.png:ru", "res://path-de.png:de" ) }
// To find the path of the remapped resource, we extract the locale name after
// the last ':' to match the project locale.
@@ -905,10 +1028,10 @@ void ResourceLoader::load_path_remaps() {
if (!ProjectSettings::get_singleton()->has_setting("path_remap/remapped_paths"))
return;
- PoolVector<String> remaps = ProjectSettings::get_singleton()->get("path_remap/remapped_paths");
+ Vector<String> remaps = ProjectSettings::get_singleton()->get("path_remap/remapped_paths");
int rc = remaps.size();
ERR_FAIL_COND(rc & 1); //must be even
- PoolVector<String>::Read r = remaps.read();
+ const String *r = remaps.ptr();
for (int i = 0; i < rc; i += 2) {
@@ -1002,25 +1125,19 @@ void ResourceLoader::remove_custom_loaders() {
}
}
-Mutex *ResourceLoader::loading_map_mutex = NULL;
-HashMap<ResourceLoader::LoadingMapKey, int, ResourceLoader::LoadingMapKeyHasher> ResourceLoader::loading_map;
-
void ResourceLoader::initialize() {
-#ifndef NO_THREADS
- loading_map_mutex = Mutex::create();
-#endif
+ thread_load_mutex = memnew(Mutex);
+ thread_load_max = OS::get_singleton()->get_processor_count();
+ thread_loading_count = 0;
+ thread_waiting_count = 0;
+ thread_suspended_count = 0;
+ thread_load_semaphore = memnew(Semaphore);
}
void ResourceLoader::finalize() {
-#ifndef NO_THREADS
- const LoadingMapKey *K = NULL;
- while ((K = loading_map.next(K))) {
- ERR_PRINT("Exited while resource is being loaded: " + K->path);
- }
- loading_map.clear();
- memdelete(loading_map_mutex);
- loading_map_mutex = NULL;
-#endif
+
+ memdelete(thread_load_mutex);
+ memdelete(thread_load_semaphore);
}
ResourceLoadErrorNotify ResourceLoader::err_notify = NULL;
@@ -1032,6 +1149,15 @@ void *ResourceLoader::dep_err_notify_ud = NULL;
bool ResourceLoader::abort_on_missing_resource = true;
bool ResourceLoader::timestamp_on_load = false;
+Mutex *ResourceLoader::thread_load_mutex = nullptr;
+HashMap<String, ResourceLoader::ThreadLoadTask> ResourceLoader::thread_load_tasks;
+Semaphore *ResourceLoader::thread_load_semaphore = nullptr;
+
+int ResourceLoader::thread_loading_count = 0;
+int ResourceLoader::thread_waiting_count = 0;
+int ResourceLoader::thread_suspended_count = 0;
+int ResourceLoader::thread_load_max = 0;
+
SelfList<Resource>::List ResourceLoader::remapped_list;
HashMap<String, Vector<String> > ResourceLoader::translation_remaps;
HashMap<String, String> ResourceLoader::path_remaps;
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index 4e83427fae..ea89917a5f 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -31,32 +31,10 @@
#ifndef RESOURCE_LOADER_H
#define RESOURCE_LOADER_H
+#include "core/os/semaphore.h"
#include "core/os/thread.h"
#include "core/resource.h"
-class ResourceInteractiveLoader : public Reference {
-
- GDCLASS(ResourceInteractiveLoader, Reference);
- friend class ResourceLoader;
- String path_loading;
- Thread::ID path_loading_thread;
-
-protected:
- static void _bind_methods();
-
-public:
- virtual void set_local_path(const String &p_local_path) = 0;
- virtual Ref<Resource> get_resource() = 0;
- virtual Error poll() = 0;
- virtual int get_stage() const = 0;
- virtual int get_stage_count() const = 0;
- virtual void set_translation_remapped(bool p_remapped) = 0;
- virtual Error wait();
-
- ResourceInteractiveLoader() {}
- ~ResourceInteractiveLoader();
-};
-
class ResourceFormatLoader : public Reference {
GDCLASS(ResourceFormatLoader, Reference);
@@ -65,8 +43,7 @@ protected:
static void _bind_methods();
public:
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual bool exists(const String &p_path) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
@@ -95,6 +72,15 @@ class ResourceLoader {
MAX_LOADERS = 64
};
+public:
+ enum ThreadLoadStatus {
+ THREAD_LOAD_INVALID_RESOURCE,
+ THREAD_LOAD_IN_PROGRESS,
+ THREAD_LOAD_FAILED,
+ THREAD_LOAD_LOADED
+ };
+
+private:
static Ref<ResourceFormatLoader> loader[MAX_LOADERS];
static int loader_count;
static bool timestamp_on_load;
@@ -115,34 +101,47 @@ class ResourceLoader {
friend class ResourceFormatImporter;
friend class ResourceInteractiveLoader;
//internal load function
- static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error);
+ static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error, bool p_use_sub_threads, float *r_progress);
static ResourceLoadedCallback _loaded_callback;
static Ref<ResourceFormatLoader> _find_custom_resource_format_loader(String path);
- static Mutex *loading_map_mutex;
-
- //used to track paths being loaded in a thread, avoids cyclic recursion
- struct LoadingMapKey {
- String path;
- Thread::ID thread;
- bool operator==(const LoadingMapKey &p_key) const {
- return (thread == p_key.thread && path == p_key.path);
- }
- };
- struct LoadingMapKeyHasher {
- static _FORCE_INLINE_ uint32_t hash(const LoadingMapKey &p_key) { return p_key.path.hash() + HashMapHasherDefault::hash(p_key.thread); }
+ struct ThreadLoadTask {
+ Thread *thread = nullptr;
+ Thread::ID loader_id = 0;
+ Semaphore *semaphore = nullptr;
+ String local_path;
+ String remapped_path;
+ String type_hint;
+ float progress = 0.0;
+ ThreadLoadStatus status = THREAD_LOAD_IN_PROGRESS;
+ Error error = OK;
+ RES resource;
+ bool xl_remapped = false;
+ bool use_sub_threads = false;
+ bool start_next = true;
+ int requests = 0;
+ int poll_requests = 0;
+ Set<String> sub_tasks;
};
- static HashMap<LoadingMapKey, int, LoadingMapKeyHasher> loading_map;
+ static void _thread_load_function(void *p_userdata);
+ static Mutex *thread_load_mutex;
+ static HashMap<String, ThreadLoadTask> thread_load_tasks;
+ static Semaphore *thread_load_semaphore;
+ static int thread_waiting_count;
+ static int thread_loading_count;
+ static int thread_suspended_count;
+ static int thread_load_max;
- static bool _add_to_loading_map(const String &p_path);
- static void _remove_from_loading_map(const String &p_path);
- static void _remove_from_loading_map_and_thread(const String &p_path, Thread::ID p_thread);
+ static float _dependency_get_progress(const String &p_path);
public:
- static Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = NULL);
+ static Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, const String &p_source_resource = String());
+ static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr);
+ static RES load_threaded_get(const String &p_path, Error *r_error = NULL);
+
static RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = NULL);
static bool exists(const String &p_path, const String &p_type_hint = "");
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 685d21107f..740aaf5cfa 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -61,10 +61,10 @@ bool ResourceFormatSaver::recognize(const RES &p_resource) const {
void ResourceFormatSaver::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
if (get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")) {
- PoolStringArray exts = get_script_instance()->call("get_recognized_extensions", p_resource);
+ PackedStringArray exts = get_script_instance()->call("get_recognized_extensions", p_resource);
{
- PoolStringArray::Read r = exts.read();
+ const String *r = exts.ptr();
for (int i = 0; i < exts.size(); ++i) {
p_extensions->push_back(r[i]);
}
@@ -81,7 +81,7 @@ void ResourceFormatSaver::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "save", arg0, arg1, arg2));
}
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_recognized_extensions", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_recognized_extensions", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "recognize", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
}
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index dee82de691..3c695c18fc 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -32,16 +32,16 @@
#include "core/io/marshalls.h"
-Error StreamPeer::_put_data(const PoolVector<uint8_t> &p_data) {
+Error StreamPeer::_put_data(const Vector<uint8_t> &p_data) {
int len = p_data.size();
if (len == 0)
return OK;
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
return put_data(&r[0], len);
}
-Array StreamPeer::_put_partial_data(const PoolVector<uint8_t> &p_data) {
+Array StreamPeer::_put_partial_data(const Vector<uint8_t> &p_data) {
Array ret;
@@ -52,7 +52,7 @@ Array StreamPeer::_put_partial_data(const PoolVector<uint8_t> &p_data) {
return ret;
}
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
int sent;
Error err = put_partial_data(&r[0], len, sent);
@@ -68,18 +68,18 @@ Array StreamPeer::_get_data(int p_bytes) {
Array ret;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(p_bytes);
if (data.size() != p_bytes) {
ret.push_back(ERR_OUT_OF_MEMORY);
- ret.push_back(PoolVector<uint8_t>());
+ ret.push_back(Vector<uint8_t>());
return ret;
}
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
Error err = get_data(&w[0], p_bytes);
- w.release();
+
ret.push_back(err);
ret.push_back(data);
return ret;
@@ -89,19 +89,18 @@ Array StreamPeer::_get_partial_data(int p_bytes) {
Array ret;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(p_bytes);
if (data.size() != p_bytes) {
ret.push_back(ERR_OUT_OF_MEMORY);
- ret.push_back(PoolVector<uint8_t>());
+ ret.push_back(Vector<uint8_t>());
return ret;
}
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
int received;
Error err = get_partial_data(&w[0], p_bytes, received);
- w.release();
if (err != OK) {
data.resize(0);
@@ -431,7 +430,7 @@ void StreamPeerBuffer::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &StreamPeerBuffer::clear);
ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array");
}
Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) {
@@ -443,7 +442,7 @@ Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) {
data.resize(pointer + p_bytes);
}
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
copymem(&w[pointer], p_data, p_bytes);
pointer += p_bytes;
@@ -478,8 +477,8 @@ Error StreamPeerBuffer::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_
r_received = p_bytes;
}
- PoolVector<uint8_t>::Read r = data.read();
- copymem(p_buffer, r.ptr() + pointer, r_received);
+ const uint8_t *r = data.ptr();
+ copymem(p_buffer, r + pointer, r_received);
pointer += r_received;
// FIXME: return what? OK or ERR_*
@@ -513,13 +512,13 @@ void StreamPeerBuffer::resize(int p_size) {
data.resize(p_size);
}
-void StreamPeerBuffer::set_data_array(const PoolVector<uint8_t> &p_data) {
+void StreamPeerBuffer::set_data_array(const Vector<uint8_t> &p_data) {
data = p_data;
pointer = 0;
}
-PoolVector<uint8_t> StreamPeerBuffer::get_data_array() const {
+Vector<uint8_t> StreamPeerBuffer::get_data_array() const {
return data;
}
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index d6ce7ddc16..9358a2c07c 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -41,8 +41,8 @@ protected:
static void _bind_methods();
//bind helpers
- Error _put_data(const PoolVector<uint8_t> &p_data);
- Array _put_partial_data(const PoolVector<uint8_t> &p_data);
+ Error _put_data(const Vector<uint8_t> &p_data);
+ Array _put_partial_data(const Vector<uint8_t> &p_data);
Array _get_data(int p_bytes);
Array _get_partial_data(int p_bytes);
@@ -96,7 +96,7 @@ class StreamPeerBuffer : public StreamPeer {
GDCLASS(StreamPeerBuffer, StreamPeer);
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int pointer;
protected:
@@ -116,8 +116,8 @@ public:
int get_position() const;
void resize(int p_size);
- void set_data_array(const PoolVector<uint8_t> &p_data);
- PoolVector<uint8_t> get_data_array() const;
+ void set_data_array(const Vector<uint8_t> &p_data);
+ Vector<uint8_t> get_data_array() const;
void clear();
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index 4f7eeddc43..4051bf2947 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -176,7 +176,7 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S
return translation;
}
-RES TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_CANT_OPEN;
diff --git a/core/io/translation_loader_po.h b/core/io/translation_loader_po.h
index 47e64276ca..fe3a75e5eb 100644
--- a/core/io/translation_loader_po.h
+++ b/core/io/translation_loader_po.h
@@ -38,7 +38,7 @@
class TranslationLoaderPO : public ResourceFormatLoader {
public:
static RES load_translation(FileAccess *f, Error *r_error, const String &p_path = String());
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/platform/osx/semaphore_osx.cpp b/core/io/udp_server.cpp
index e4e5991637..16b7863cdd 100644
--- a/platform/osx/semaphore_osx.cpp
+++ b/core/io/udp_server.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_osx.cpp */
+/* udp_server.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,80 +28,92 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "semaphore_osx.h"
+#include "udp_server.h"
-#include <fcntl.h>
-#include <unistd.h>
+void UDPServer::_bind_methods() {
-void cgsem_init(cgsem_t *cgsem) {
- int flags, fd, i;
-
- pipe(cgsem->pipefd);
-
- /* Make the pipes FD_CLOEXEC to allow them to close should we call
- * execv on restart. */
- for (i = 0; i < 2; i++) {
- fd = cgsem->pipefd[i];
- flags = fcntl(fd, F_GETFD, 0);
- flags |= FD_CLOEXEC;
- fcntl(fd, F_SETFD, flags);
- }
+ ClassDB::bind_method(D_METHOD("listen", "port", "bind_address"), &UDPServer::listen, DEFVAL("*"));
+ ClassDB::bind_method(D_METHOD("is_connection_available"), &UDPServer::is_connection_available);
+ ClassDB::bind_method(D_METHOD("is_listening"), &UDPServer::is_listening);
+ ClassDB::bind_method(D_METHOD("take_connection"), &UDPServer::take_connection);
+ ClassDB::bind_method(D_METHOD("stop"), &UDPServer::stop);
}
-void cgsem_post(cgsem_t *cgsem) {
- const char buf = 1;
+Error UDPServer::listen(uint16_t p_port, const IP_Address &p_bind_address) {
- write(cgsem->pipefd[1], &buf, 1);
-}
+ ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
+ ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE);
+ ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);
-void cgsem_wait(cgsem_t *cgsem) {
- char buf;
+ Error err;
+ IP::Type ip_type = IP::TYPE_ANY;
- read(cgsem->pipefd[0], &buf, 1);
-}
+ if (p_bind_address.is_valid())
+ ip_type = p_bind_address.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6;
-void cgsem_destroy(cgsem_t *cgsem) {
- close(cgsem->pipefd[1]);
- close(cgsem->pipefd[0]);
-}
-
-#include "core/os/memory.h"
+ err = _sock->open(NetSocket::TYPE_UDP, ip_type);
-#include <errno.h>
+ if (err != OK)
+ return ERR_CANT_CREATE;
-Error SemaphoreOSX::wait() {
+ _sock->set_blocking_enabled(false);
+ _sock->set_reuse_address_enabled(true);
+ err = _sock->bind(p_bind_address, p_port);
- cgsem_wait(&sem);
+ if (err != OK) {
+ stop();
+ return err;
+ }
+ bind_address = p_bind_address;
+ bind_port = p_port;
return OK;
}
-Error SemaphoreOSX::post() {
-
- cgsem_post(&sem);
+bool UDPServer::is_listening() const {
+ ERR_FAIL_COND_V(!_sock.is_valid(), false);
- return OK;
+ return _sock->is_open();
}
-int SemaphoreOSX::get() const {
- return 0;
-}
+bool UDPServer::is_connection_available() const {
-SemaphoreOld *SemaphoreOSX::create_semaphore_osx() {
+ ERR_FAIL_COND_V(!_sock.is_valid(), false);
- return memnew(SemaphoreOSX);
+ if (!_sock->is_open())
+ return false;
+
+ Error err = _sock->poll(NetSocket::POLL_TYPE_IN, 0);
+ return (err == OK);
}
-void SemaphoreOSX::make_default() {
+Ref<PacketPeerUDP> UDPServer::take_connection() {
+
+ Ref<PacketPeerUDP> conn;
+ if (!is_connection_available()) {
+ return conn;
+ }
- create_func = create_semaphore_osx;
+ conn = Ref<PacketPeerUDP>(memnew(PacketPeerUDP));
+ conn->connect_socket(_sock);
+ _sock = Ref<NetSocket>(NetSocket::create());
+ listen(bind_port, bind_address);
+ return conn;
}
-SemaphoreOSX::SemaphoreOSX() {
+void UDPServer::stop() {
+
+ if (_sock.is_valid()) {
+ _sock->close();
+ }
+ bind_port = 0;
+ bind_address = IP_Address();
+}
- cgsem_init(&sem);
+UDPServer::UDPServer() :
+ _sock(Ref<NetSocket>(NetSocket::create())) {
}
-SemaphoreOSX::~SemaphoreOSX() {
+UDPServer::~UDPServer() {
- cgsem_destroy(&sem);
+ stop();
}
diff --git a/drivers/unix/semaphore_posix.h b/core/io/udp_server.h
index 2bffe6933d..90bb82b62b 100644
--- a/drivers/unix/semaphore_posix.h
+++ b/core/io/udp_server.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_posix.h */
+/* udp_server.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,31 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEMAPHORE_POSIX_H
-#define SEMAPHORE_POSIX_H
+#ifndef UDP_SERVER_H
+#define UDP_SERVER_H
-#include "core/os/semaphore.h"
+#include "core/io/net_socket.h"
+#include "core/io/packet_peer_udp.h"
-#if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(OSX_ENABLED) && !defined(IPHONE_ENABLED)
+class UDPServer : public Reference {
+ GDCLASS(UDPServer, Reference);
-#include <semaphore.h>
-
-class SemaphorePosix : public SemaphoreOld {
-
- mutable sem_t sem;
-
- static SemaphoreOld *create_semaphore_posix();
+protected:
+ static void _bind_methods();
+ int bind_port;
+ IP_Address bind_address;
+ Ref<NetSocket> _sock;
public:
- virtual Error wait();
- virtual Error post();
- virtual int get() const;
+ Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*"));
+ bool is_listening() const;
+ bool is_connection_available() const;
+ Ref<PacketPeerUDP> take_connection();
- static void make_default();
- SemaphorePosix();
+ void stop();
- ~SemaphorePosix();
+ UDPServer();
+ ~UDPServer();
};
-#endif
-#endif
+#endif // UDP_SERVER_H
diff --git a/core/make_binders.py b/core/make_binders.py
index 11cfbf6e79..c42b91fbe5 100644
--- a/core/make_binders.py
+++ b/core/make_binders.py
@@ -32,22 +32,22 @@ public:
return T::get_class_static();
}
- virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
+ virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) {
T *instance=Object::cast_to<T>(p_object);
- r_error.error=Variant::CallError::CALL_OK;
+ r_error.error=Callable::CallError::CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
ERR_FAIL_COND_V(!instance,Variant());
if (p_arg_count>get_argument_count()) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument=get_argument_count();
return Variant();
}
if (p_arg_count<(get_argument_count()-get_default_argument_count())) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument=get_argument_count()-get_default_argument_count();
return Variant();
}
@@ -126,23 +126,23 @@ public:
return type_name;
}
- virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
+ virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) {
__UnexistingClass *instance = (__UnexistingClass*)p_object;
- r_error.error=Variant::CallError::CALL_OK;
+ r_error.error=Callable::CallError::CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
ERR_FAIL_COND_V(!instance,Variant());
if (p_arg_count>get_argument_count()) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument=get_argument_count();
return Variant();
}
if (p_arg_count<(get_argument_count()-get_default_argument_count())) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument=get_argument_count()-get_default_argument_count();
return Variant();
}
@@ -223,22 +223,22 @@ public:
return T::get_class_static();
}
- virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
+ virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Callable::CallError& r_error) {
T *instance=Object::cast_to<T>(p_object);
- r_error.error=Variant::CallError::CALL_OK;
+ r_error.error=Callable::CallError::CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
ERR_FAIL_COND_V(!instance,Variant());
if (p_arg_count>get_argument_count()) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument=get_argument_count();
return Variant();
}
if (p_arg_count<(get_argument_count()-get_default_argument_count())) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error=Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument=get_argument_count()-get_default_argument_count();
return Variant();
}
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 73f190a330..847d4d8681 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -235,13 +235,13 @@ Array AStar::get_points() {
return point_list;
}
-PoolVector<int> AStar::get_point_connections(int p_id) {
+Vector<int> AStar::get_point_connections(int p_id) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND_V(!p_exists, PoolVector<int>());
+ ERR_FAIL_COND_V(!p_exists, Vector<int>());
- PoolVector<int> point_list;
+ Vector<int> point_list;
for (OAHashMap<int, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) {
point_list.push_back((*it.key));
@@ -431,18 +431,18 @@ float AStar::_compute_cost(int p_from_id, int p_to_id) {
return from_point->pos.distance_to(to_point->pos);
}
-PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
+Vector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
Point *a;
bool from_exists = points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, PoolVector<Vector3>());
+ ERR_FAIL_COND_V(!from_exists, Vector<Vector3>());
Point *b;
bool to_exists = points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, PoolVector<Vector3>());
+ ERR_FAIL_COND_V(!to_exists, Vector<Vector3>());
if (a == b) {
- PoolVector<Vector3> ret;
+ Vector<Vector3> ret;
ret.push_back(a->pos);
return ret;
}
@@ -451,7 +451,7 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
- if (!found_route) return PoolVector<Vector3>();
+ if (!found_route) return Vector<Vector3>();
Point *p = end_point;
int pc = 1; // Begin point
@@ -460,11 +460,11 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
p = p->prev_point;
}
- PoolVector<Vector3> path;
+ Vector<Vector3> path;
path.resize(pc);
{
- PoolVector<Vector3>::Write w = path.write();
+ Vector3 *w = path.ptrw();
Point *p2 = end_point;
int idx = pc - 1;
@@ -479,18 +479,18 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
return path;
}
-PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
+Vector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
Point *a;
bool from_exists = points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, PoolVector<int>());
+ ERR_FAIL_COND_V(!from_exists, Vector<int>());
Point *b;
bool to_exists = points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, PoolVector<int>());
+ ERR_FAIL_COND_V(!to_exists, Vector<int>());
if (a == b) {
- PoolVector<int> ret;
+ Vector<int> ret;
ret.push_back(a->id);
return ret;
}
@@ -499,7 +499,7 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
- if (!found_route) return PoolVector<int>();
+ if (!found_route) return Vector<int>();
Point *p = end_point;
int pc = 1; // Begin point
@@ -508,11 +508,11 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
p = p->prev_point;
}
- PoolVector<int> path;
+ Vector<int> path;
path.resize(pc);
{
- PoolVector<int>::Write w = path.write();
+ int *w = path.ptrw();
p = end_point;
int idx = pc - 1;
@@ -576,8 +576,8 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path);
ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path);
- BIND_VMETHOD(MethodInfo(Variant::REAL, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
- BIND_VMETHOD(MethodInfo(Variant::REAL, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
}
AStar::AStar() {
@@ -624,7 +624,7 @@ bool AStar2D::has_point(int p_id) const {
return astar.has_point(p_id);
}
-PoolVector<int> AStar2D::get_point_connections(int p_id) {
+Vector<int> AStar2D::get_point_connections(int p_id) {
return astar.get_point_connections(p_id);
}
@@ -677,15 +677,15 @@ Vector2 AStar2D::get_closest_position_in_segment(const Vector2 &p_point) const {
return Vector2(p.x, p.y);
}
-PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
+Vector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
- PoolVector3Array pv = astar.get_point_path(p_from_id, p_to_id);
+ PackedVector3Array pv = astar.get_point_path(p_from_id, p_to_id);
int size = pv.size();
- PoolVector2Array path;
+ PackedVector2Array path;
path.resize(size);
{
- PoolVector<Vector3>::Read r = pv.read();
- PoolVector<Vector2>::Write w = path.write();
+ const Vector3 *r = pv.ptr();
+ Vector2 *w = path.ptrw();
for (int i = 0; i < size; i++) {
Vector3 p = r[i];
w[i] = Vector2(p.x, p.y);
@@ -694,7 +694,7 @@ PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
return path;
}
-PoolVector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) {
+Vector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) {
return astar.get_id_path(p_from_id, p_to_id);
}
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 0b10976932..bfcf0c09d3 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -137,7 +137,7 @@ public:
void set_point_weight_scale(int p_id, real_t p_weight_scale);
void remove_point(int p_id);
bool has_point(int p_id) const;
- PoolVector<int> get_point_connections(int p_id);
+ Vector<int> get_point_connections(int p_id);
Array get_points();
void set_point_disabled(int p_id, bool p_disabled = true);
@@ -155,8 +155,8 @@ public:
int get_closest_point(const Vector3 &p_point, bool p_include_disabled = false) const;
Vector3 get_closest_position_in_segment(const Vector3 &p_point) const;
- PoolVector<Vector3> get_point_path(int p_from_id, int p_to_id);
- PoolVector<int> get_id_path(int p_from_id, int p_to_id);
+ Vector<Vector3> get_point_path(int p_from_id, int p_to_id);
+ Vector<int> get_id_path(int p_from_id, int p_to_id);
AStar();
~AStar();
@@ -179,7 +179,7 @@ public:
void set_point_weight_scale(int p_id, real_t p_weight_scale);
void remove_point(int p_id);
bool has_point(int p_id) const;
- PoolVector<int> get_point_connections(int p_id);
+ Vector<int> get_point_connections(int p_id);
Array get_points();
void set_point_disabled(int p_id, bool p_disabled = true);
@@ -197,8 +197,8 @@ public:
int get_closest_point(const Vector2 &p_point, bool p_include_disabled = false) const;
Vector2 get_closest_position_in_segment(const Vector2 &p_point) const;
- PoolVector<Vector2> get_point_path(int p_from_id, int p_to_id);
- PoolVector<int> get_id_path(int p_from_id, int p_to_id);
+ Vector<Vector2> get_point_path(int p_from_id, int p_to_id);
+ Vector<int> get_id_path(int p_from_id, int p_to_id);
AStar2D();
~AStar2D();
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
deleted file mode 100644
index 7ad907db97..0000000000
--- a/core/math/bsp_tree.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/*************************************************************************/
-/* bsp_tree.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 "bsp_tree.h"
-
-#include "core/error_macros.h"
-#include "core/print_string.h"
-
-void BSP_Tree::from_aabb(const AABB &p_aabb) {
-
- planes.clear();
-
- for (int i = 0; i < 3; i++) {
-
- Vector3 n;
- n[i] = 1;
- planes.push_back(Plane(n, p_aabb.position[i] + p_aabb.size[i]));
- planes.push_back(Plane(-n, -p_aabb.position[i]));
- }
-
- nodes.clear();
-
- for (int i = 0; i < 6; i++) {
-
- Node n;
- n.plane = i;
- n.under = (i == 0) ? UNDER_LEAF : i - 1;
- n.over = OVER_LEAF;
- nodes.push_back(n);
- }
-
- aabb = p_aabb;
- error_radius = 0;
-}
-
-Vector<BSP_Tree::Node> BSP_Tree::get_nodes() const {
-
- return nodes;
-}
-Vector<Plane> BSP_Tree::get_planes() const {
-
- return planes;
-}
-
-AABB BSP_Tree::get_aabb() const {
-
- return aabb;
-}
-
-int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_indices, const Vector3 &p_center, const Vector3 &p_half_extents, int p_indices_count) const {
-
- const Node *node = &nodes[p_node];
- const Plane &p = planes[node->plane];
-
- Vector3 min(
- (p.normal.x > 0) ? -p_half_extents.x : p_half_extents.x,
- (p.normal.y > 0) ? -p_half_extents.y : p_half_extents.y,
- (p.normal.z > 0) ? -p_half_extents.z : p_half_extents.z);
- Vector3 max = -min;
- max += p_center;
- min += p_center;
-
- real_t dist_min = p.distance_to(min);
- real_t dist_max = p.distance_to(max);
-
- if ((dist_min * dist_max) < CMP_EPSILON) { //intersection, test point by point
-
- int under_count = 0;
-
- //sort points, so the are under first, over last
- for (int i = 0; i < p_indices_count; i++) {
-
- int index = p_indices[i];
-
- if (p.is_point_over(p_points[index])) {
-
- // kind of slow (but cache friendly), should try something else,
- // but this is a corner case most of the time
-
- for (int j = index; j < p_indices_count - 1; j++)
- p_indices[j] = p_indices[j + 1];
-
- p_indices[p_indices_count - 1] = index;
-
- } else {
- under_count++;
- }
- }
-
- int total = 0;
-
- if (under_count > 0) {
- if (node->under == UNDER_LEAF) {
- total += under_count;
- } else {
- total += _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, under_count);
- }
- }
-
- if (under_count != p_indices_count) {
- if (node->over == OVER_LEAF) {
- //total+=0 //if they are over an OVER_LEAF, they are outside the model
- } else {
- total += _get_points_inside(node->over, p_points, &p_indices[under_count], p_center, p_half_extents, p_indices_count - under_count);
- }
- }
-
- return total;
-
- } else if (dist_min > 0) { //all points over plane
-
- if (node->over == OVER_LEAF) {
-
- return 0; // all these points are not visible
- }
-
- return _get_points_inside(node->over, p_points, p_indices, p_center, p_half_extents, p_indices_count);
- } else { //all points behind plane
-
- if (node->under == UNDER_LEAF) {
-
- return p_indices_count; // all these points are visible
- }
- return _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, p_indices_count);
- }
-}
-
-int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) const {
-
- if (nodes.size() == 0)
- return 0;
-
-#if 1
- //this version is easier to debug, and and MUCH faster in real world cases
-
- int pass_count = 0;
- const Node *nodesptr = &nodes[0];
- const Plane *planesptr = &planes[0];
- int node_count = nodes.size();
-
- if (node_count == 0) // no nodes!
- return 0;
-
- for (int i = 0; i < p_point_count; i++) {
-
- const Vector3 &point = p_points[i];
- if (!aabb.has_point(point)) {
- continue;
- }
-
- int idx = node_count - 1;
-
- bool pass = false;
-
- while (true) {
-
- if (idx == OVER_LEAF) {
- pass = false;
- break;
- } else if (idx == UNDER_LEAF) {
- pass = true;
- break;
- }
-
-#ifdef DEBUG_ENABLED
- int plane_count = planes.size();
- uint16_t plane = nodesptr[idx].plane;
- ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, 0);
-#endif
-
- idx = planesptr[nodesptr[idx].plane].is_point_over(point) ? nodes[idx].over : nodes[idx].under;
-
-#ifdef DEBUG_ENABLED
-
- ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, 0);
-#endif
- }
-
- if (pass)
- pass_count++;
- }
-
- return pass_count;
-
-#else
- //this version scales better but it's slower for real world cases
-
- int *indices = (int *)alloca(p_point_count * sizeof(int));
- AABB bounds;
-
- for (int i = 0; i < p_point_count; i++) {
-
- indices[i] = i;
- if (i == 0)
- bounds.pos = p_points[i];
- else
- bounds.expand_to(p_points[i]);
- }
-
- Vector3 half_extents = bounds.size / 2.0;
- return _get_points_inside(nodes.size() + 1, p_points, indices, bounds.pos + half_extents, half_extents, p_point_count);
-#endif
-}
-
-bool BSP_Tree::point_is_inside(const Vector3 &p_point) const {
-
- if (!aabb.has_point(p_point)) {
- return false;
- }
-
- int node_count = nodes.size();
-
- if (node_count == 0) // no nodes!
- return false;
-
- const Node *nodesptr = &nodes[0];
- const Plane *planesptr = &planes[0];
-
- int idx = node_count - 1;
-
- while (true) {
-
- if (idx == OVER_LEAF) {
- return false;
- }
- if (idx == UNDER_LEAF) {
-
- return true;
- }
-
-#ifdef DEBUG_ENABLED
- int plane_count = planes.size();
- uint16_t plane = nodesptr[idx].plane;
- ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, false);
-#endif
-
- bool over = planesptr[nodesptr[idx].plane].is_point_over(p_point);
-
- idx = over ? nodes[idx].over : nodes[idx].under;
-
-#ifdef DEBUG_ENABLED
- ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, false);
-#endif
- }
-}
-
-static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_indices, real_t p_tolerance) {
-
- int ic = p_indices.size();
- const int *indices = p_indices.ptr();
-
- int best_plane = -1;
- real_t best_plane_cost = 1e20;
-
- // Loop to find the polygon that best divides the set.
-
- for (int i = 0; i < ic; i++) {
-
- const Face3 &f = p_faces[indices[i]];
- Plane p = f.get_plane();
-
- int num_over = 0, num_under = 0, num_spanning = 0;
-
- for (int j = 0; j < ic; j++) {
-
- if (i == j)
- continue;
-
- const Face3 &g = p_faces[indices[j]];
- int over = 0, under = 0;
-
- for (int k = 0; k < 3; k++) {
-
- real_t d = p.distance_to(g.vertex[j]);
-
- if (Math::abs(d) > p_tolerance) {
-
- if (d > 0)
- over++;
- else
- under++;
- }
- }
-
- if (over && under)
- num_spanning++;
- else if (over)
- num_over++;
- else
- num_under++;
- }
-
- //real_t split_cost = num_spanning / (real_t) face_count;
- real_t relation = Math::abs(num_over - num_under) / (real_t)ic;
-
- // being honest, i never found a way to add split cost to the mix in a meaninguful way
- // in this engine, also, will likely be ignored anyway
-
- real_t plane_cost = /*split_cost +*/ relation;
-
- //printf("plane %i, %i over, %i under, %i spanning, cost is %g\n",i,num_over,num_under,num_spanning,plane_cost);
- if (plane_cost < best_plane_cost) {
-
- best_plane = i;
- best_plane_cost = plane_cost;
- }
- }
-
- return best_plane;
-}
-
-static int _bsp_create_node(const Face3 *p_faces, const Vector<int> &p_indices, Vector<Plane> &p_planes, Vector<BSP_Tree::Node> &p_nodes, real_t p_tolerance) {
-
- ERR_FAIL_COND_V(p_nodes.size() == BSP_Tree::MAX_NODES, -1);
-
- // should not reach here
- ERR_FAIL_COND_V(p_indices.size() == 0, -1);
-
- int ic = p_indices.size();
- const int *indices = p_indices.ptr();
-
- int divisor_idx = _bsp_find_best_half_plane(p_faces, p_indices, p_tolerance);
-
- // returned error
- ERR_FAIL_COND_V(divisor_idx < 0, -1);
-
- Vector<int> faces_over;
- Vector<int> faces_under;
-
- Plane divisor_plane = p_faces[indices[divisor_idx]].get_plane();
-
- for (int i = 0; i < ic; i++) {
-
- if (i == divisor_idx)
- continue;
-
- const Face3 &f = p_faces[indices[i]];
-
- /*
- if (f.get_plane().is_equal_approx(divisor_plane))
- continue;
- */
-
- int over_count = 0;
- int under_count = 0;
-
- for (int j = 0; j < 3; j++) {
-
- real_t d = divisor_plane.distance_to(f.vertex[j]);
- if (Math::abs(d) > p_tolerance) {
-
- if (d > 0)
- over_count++;
- else
- under_count++;
- }
- }
-
- if (over_count)
- faces_over.push_back(indices[i]);
- if (under_count)
- faces_under.push_back(indices[i]);
- }
-
- uint16_t over_idx = BSP_Tree::OVER_LEAF, under_idx = BSP_Tree::UNDER_LEAF;
-
- if (faces_over.size() > 0) { //have facess above?
-
- int idx = _bsp_create_node(p_faces, faces_over, p_planes, p_nodes, p_tolerance);
- if (idx >= 0)
- over_idx = idx;
- }
-
- if (faces_under.size() > 0) { //have facess above?
-
- int idx = _bsp_create_node(p_faces, faces_under, p_planes, p_nodes, p_tolerance);
- if (idx >= 0)
- under_idx = idx;
- }
-
- /* Create the node */
-
- // find existing divisor plane
- int divisor_plane_idx = -1;
-
- for (int i = 0; i < p_planes.size(); i++) {
-
- if (p_planes[i].is_equal_approx(divisor_plane)) {
- divisor_plane_idx = i;
- break;
- }
- }
-
- if (divisor_plane_idx == -1) {
-
- ERR_FAIL_COND_V(p_planes.size() == BSP_Tree::MAX_PLANES, -1);
- divisor_plane_idx = p_planes.size();
- p_planes.push_back(divisor_plane);
- }
-
- BSP_Tree::Node node;
- node.plane = divisor_plane_idx;
- node.under = under_idx;
- node.over = over_idx;
-
- p_nodes.push_back(node);
-
- return p_nodes.size() - 1;
-}
-
-BSP_Tree::operator Variant() const {
-
- Dictionary d;
- d["error_radius"] = error_radius;
-
- Vector<real_t> plane_values;
- plane_values.resize(planes.size() * 4);
-
- for (int i = 0; i < planes.size(); i++) {
-
- plane_values.write[i * 4 + 0] = planes[i].normal.x;
- plane_values.write[i * 4 + 1] = planes[i].normal.y;
- plane_values.write[i * 4 + 2] = planes[i].normal.z;
- plane_values.write[i * 4 + 3] = planes[i].d;
- }
-
- d["planes"] = plane_values;
-
- PoolVector<int> dst_nodes;
- dst_nodes.resize(nodes.size() * 3);
-
- for (int i = 0; i < nodes.size(); i++) {
-
- dst_nodes.set(i * 3 + 0, nodes[i].over);
- dst_nodes.set(i * 3 + 1, nodes[i].under);
- dst_nodes.set(i * 3 + 2, nodes[i].plane);
- }
-
- d["nodes"] = dst_nodes;
- d["aabb"] = aabb;
-
- return Variant(d);
-}
-
-BSP_Tree::BSP_Tree() {
-}
-
-BSP_Tree::BSP_Tree(const Variant &p_variant) {
-
- Dictionary d = p_variant;
- ERR_FAIL_COND(!d.has("nodes"));
- ERR_FAIL_COND(!d.has("planes"));
- ERR_FAIL_COND(!d.has("aabb"));
- ERR_FAIL_COND(!d.has("error_radius"));
-
- PoolVector<int> src_nodes = d["nodes"];
- ERR_FAIL_COND(src_nodes.size() % 3);
-
- if (d["planes"].get_type() == Variant::POOL_REAL_ARRAY) {
-
- PoolVector<real_t> src_planes = d["planes"];
- int plane_count = src_planes.size();
- ERR_FAIL_COND(plane_count % 4);
- planes.resize(plane_count / 4);
-
- if (plane_count) {
- PoolVector<real_t>::Read r = src_planes.read();
- for (int i = 0; i < plane_count / 4; i++) {
-
- planes.write[i].normal.x = r[i * 4 + 0];
- planes.write[i].normal.y = r[i * 4 + 1];
- planes.write[i].normal.z = r[i * 4 + 2];
- planes.write[i].d = r[i * 4 + 3];
- }
- }
-
- } else {
-
- planes = d["planes"];
- }
-
- error_radius = d["error"];
- aabb = d["aabb"];
-
- //int node_count = src_nodes.size();
- nodes.resize(src_nodes.size() / 3);
-
- PoolVector<int>::Read r = src_nodes.read();
-
- for (int i = 0; i < nodes.size(); i++) {
-
- nodes.write[i].over = r[i * 3 + 0];
- nodes.write[i].under = r[i * 3 + 1];
- nodes.write[i].plane = r[i * 3 + 2];
- }
-}
-
-BSP_Tree::BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius) {
-
- // compute aabb
-
- int face_count = p_faces.size();
- PoolVector<Face3>::Read faces_r = p_faces.read();
- const Face3 *facesptr = faces_r.ptr();
-
- bool first = true;
-
- Vector<int> indices;
-
- for (int i = 0; i < face_count; i++) {
-
- const Face3 &f = facesptr[i];
-
- if (f.is_degenerate())
- continue;
-
- for (int j = 0; j < 3; j++) {
-
- if (first) {
-
- aabb.position = f.vertex[0];
- first = false;
- } else {
-
- aabb.expand_to(f.vertex[j]);
- }
- }
-
- indices.push_back(i);
- }
-
- ERR_FAIL_COND(aabb.has_no_area());
-
- int top = _bsp_create_node(faces_r.ptr(), indices, planes, nodes, aabb.get_longest_axis_size() * 0.0001);
-
- if (top < 0) {
-
- nodes.clear();
- planes.clear();
- ERR_FAIL_COND(top < 0);
- }
-
- error_radius = p_error_radius;
-}
-
-BSP_Tree::BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius) :
- nodes(p_nodes),
- planes(p_planes),
- aabb(p_aabb),
- error_radius(p_error_radius) {
-}
-
-BSP_Tree::~BSP_Tree() {
-}
diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h
deleted file mode 100644
index 1c8ea380ff..0000000000
--- a/core/math/bsp_tree.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*************************************************************************/
-/* bsp_tree.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 BSP_TREE_H
-#define BSP_TREE_H
-
-#include "core/math/aabb.h"
-#include "core/math/face3.h"
-#include "core/math/plane.h"
-#include "core/method_ptrcall.h"
-#include "core/pool_vector.h"
-#include "core/variant.h"
-#include "core/vector.h"
-
-class BSP_Tree {
-public:
- enum {
-
- UNDER_LEAF = 0xFFFF,
- OVER_LEAF = 0xFFFE,
- MAX_NODES = 0xFFFE,
- MAX_PLANES = (1 << 16)
- };
-
- struct Node {
-
- uint16_t plane;
- uint16_t under;
- uint16_t over;
- };
-
-private:
- // thanks to the properties of Vector,
- // this class can be assigned and passed around between threads
- // with no cost.
-
- Vector<Node> nodes;
- Vector<Plane> planes;
- AABB aabb;
- real_t error_radius;
-
- int _get_points_inside(int p_node, const Vector3 *p_points, int *p_indices, const Vector3 &p_center, const Vector3 &p_half_extents, int p_indices_count) const;
-
- template <class T>
- bool _test_convex(const Node *p_nodes, const Plane *p_planes, int p_current, const T &p_convex) const;
-
-public:
- bool is_empty() const { return nodes.size() == 0; }
- Vector<Node> get_nodes() const;
- Vector<Plane> get_planes() const;
- AABB get_aabb() const;
-
- bool point_is_inside(const Vector3 &p_point) const;
- int get_points_inside(const Vector3 *p_points, int p_point_count) const;
- template <class T>
- bool convex_is_inside(const T &p_convex) const;
-
- operator Variant() const;
-
- void from_aabb(const AABB &p_aabb);
-
- BSP_Tree();
- BSP_Tree(const Variant &p_variant);
- BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius = 0);
- BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius = 0);
- ~BSP_Tree();
-};
-
-template <class T>
-bool BSP_Tree::_test_convex(const Node *p_nodes, const Plane *p_planes, int p_current, const T &p_convex) const {
-
- if (p_current == UNDER_LEAF)
- return true;
- else if (p_current == OVER_LEAF)
- return false;
-
- bool collided = false;
- const Node &n = p_nodes[p_current];
-
- const Plane &p = p_planes[n.plane];
-
- real_t min, max;
- p_convex.project_range(p.normal, min, max);
-
- bool go_under = min < p.d;
- bool go_over = max >= p.d;
-
- if (go_under && _test_convex(p_nodes, p_planes, n.under, p_convex))
- collided = true;
- if (go_over && _test_convex(p_nodes, p_planes, n.over, p_convex))
- collided = true;
-
- return collided;
-}
-
-template <class T>
-bool BSP_Tree::convex_is_inside(const T &p_convex) const {
-
- int node_count = nodes.size();
- if (node_count == 0)
- return false;
- const Node *nodes = &this->nodes[0];
- const Plane *planes = &this->planes[0];
-
- return _test_convex(nodes, planes, node_count - 1, p_convex);
-}
-
-#ifdef PTRCALL_ENABLED
-
-template <>
-struct PtrToArg<BSP_Tree> {
- _FORCE_INLINE_ static BSP_Tree convert(const void *p_ptr) {
- BSP_Tree s(Variant(*reinterpret_cast<const Dictionary *>(p_ptr)));
- return s;
- }
- _FORCE_INLINE_ static void encode(BSP_Tree p_val, void *p_ptr) {
- Dictionary *d = reinterpret_cast<Dictionary *>(p_ptr);
- *d = Variant(p_val);
- }
-};
-
-template <>
-struct PtrToArg<const BSP_Tree &> {
- _FORCE_INLINE_ static BSP_Tree convert(const void *p_ptr) {
- BSP_Tree s(Variant(*reinterpret_cast<const Dictionary *>(p_ptr)));
- return s;
- }
-};
-
-#endif
-
-#endif
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 2fda7a27d5..058673b681 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -208,16 +208,16 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
return 0;
}
-#define VALIDATE_ARG_NUM(m_arg) \
- if (!p_inputs[m_arg]->is_num()) { \
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \
- r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
- return; \
+#define VALIDATE_ARG_NUM(m_arg) \
+ if (!p_inputs[m_arg]->is_num()) { \
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
+ r_error.argument = m_arg; \
+ r_error.expected = Variant::FLOAT; \
+ return; \
}
-void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str) {
- r_error.error = Variant::CallError::CALL_OK;
+void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str) {
+ r_error.error = Callable::CallError::CALL_OK;
switch (p_func) {
case MATH_SIN: {
@@ -314,15 +314,15 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
int64_t i = *p_inputs[0];
*r_return = ABS(i);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = Math::abs(r);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case MATH_SIGN: {
@@ -331,15 +331,15 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
int64_t i = *p_inputs[0];
*r_return = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case MATH_POW: {
@@ -580,7 +580,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
if (p_inputs[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
@@ -614,7 +614,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
if (p_inputs[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
@@ -622,7 +622,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
}
if (p_inputs[1]->get_type() != Variant::STRING && p_inputs[1]->get_type() != Variant::NODE_PATH) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
@@ -644,7 +644,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
if (type < 0 || type >= Variant::VARIANT_MAX) {
r_error_str = RTR("Invalid type argument to convert(), use TYPE_* constants.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
return;
@@ -675,7 +675,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
if (p_inputs[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -687,7 +687,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
if (str.length() != 1) {
r_error_str = RTR("Expected a string of length 1 (a character).");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -732,7 +732,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
case STR_TO_VAR: {
if (p_inputs[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -747,7 +747,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
Error err = VariantParser::parse(&ss, *r_return, errs, line);
if (err != OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
*r_return = "Parse error at line " + itos(line) + ": " + errs;
@@ -757,12 +757,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
} break;
case VAR_TO_BYTES: {
- PoolByteArray barr;
+ PackedByteArray barr;
bool full_objects = *p_inputs[1];
int len;
Error err = encode_variant(*p_inputs[0], NULL, len, full_objects);
if (err) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::NIL;
r_error_str = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).";
@@ -771,32 +771,32 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
barr.resize(len);
{
- PoolByteArray::Write w = barr.write();
- encode_variant(*p_inputs[0], w.ptr(), len, full_objects);
+ uint8_t *w = barr.ptrw();
+ encode_variant(*p_inputs[0], w, len, full_objects);
}
*r_return = barr;
} break;
case BYTES_TO_VAR: {
- if (p_inputs[0]->get_type() != Variant::POOL_BYTE_ARRAY) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_inputs[0]->get_type() != Variant::PACKED_BYTE_ARRAY) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
- PoolByteArray varr = *p_inputs[0];
+ PackedByteArray varr = *p_inputs[0];
bool allow_objects = *p_inputs[1];
Variant ret;
{
- PoolByteArray::Read r = varr.read();
- Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects);
+ const uint8_t *r = varr.ptr();
+ Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects);
if (err != OK) {
r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
}
@@ -1161,7 +1161,7 @@ Error Expression::_get_token(Token &r_token) {
if (is_float)
r_token.value = num.to_double();
else
- r_token.value = num.to_int();
+ r_token.value = num.to_int64();
return OK;
} else if ((cchar >= 'A' && cchar <= 'Z') || (cchar >= 'a' && cchar <= 'z') || cchar == '_') {
@@ -2071,10 +2071,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
argp.write[i] = &arr[i];
}
- Variant::CallError ce;
+ Callable::CallError ce;
r_ret = Variant::construct(constructor->data_type, (const Variant **)argp.ptr(), argp.size(), ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = vformat(RTR("Invalid arguments to construct '%s'"), Variant::get_type_name(constructor->data_type));
return true;
}
@@ -2099,10 +2099,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
argp.write[i] = &arr[i];
}
- Variant::CallError ce;
+ Callable::CallError ce;
exec_func(bifunc->func, (const Variant **)argp.ptr(), &r_ret, ce, r_error_str);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = "Builtin Call Failed. " + r_error_str;
return true;
}
@@ -2134,10 +2134,10 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
argp.write[i] = &arr[i];
}
- Variant::CallError ce;
+ Callable::CallError ce;
r_ret = base.call(call->method, (const Variant **)argp.ptr(), argp.size(), ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = vformat(RTR("On call to '%s':"), String(call->method));
return true;
}
diff --git a/core/math/expression.h b/core/math/expression.h
index 1cd1415dcf..bbf946bb0a 100644
--- a/core/math/expression.h
+++ b/core/math/expression.h
@@ -111,7 +111,7 @@ public:
static int get_func_argument_count(BuiltinFunc p_func);
static String get_func_name(BuiltinFunc p_func);
- static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str);
+ static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str);
static BuiltinFunc find_function(const String &p_string);
private:
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index 7eb48290a8..69c7abfd30 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -214,23 +214,19 @@ static bool _group_face(_FaceClassify *p_faces, int len, int p_index, int p_grou
return true;
}
-PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_array) {
+Vector<Vector<Face3> > Geometry::separate_objects(Vector<Face3> p_array) {
- PoolVector<PoolVector<Face3> > objects;
+ Vector<Vector<Face3> > objects;
int len = p_array.size();
- PoolVector<Face3>::Read r = p_array.read();
+ const Face3 *arrayptr = p_array.ptr();
- const Face3 *arrayptr = r.ptr();
-
- PoolVector<_FaceClassify> fc;
+ Vector<_FaceClassify> fc;
fc.resize(len);
- PoolVector<_FaceClassify>::Write fcw = fc.write();
-
- _FaceClassify *_fcptr = fcw.ptr();
+ _FaceClassify *_fcptr = fc.ptrw();
for (int i = 0; i < len; i++) {
@@ -239,7 +235,7 @@ PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_ar
bool error = _connect_faces(_fcptr, len, -1);
- ERR_FAIL_COND_V_MSG(error, PoolVector<PoolVector<Face3> >(), "Invalid geometry.");
+ ERR_FAIL_COND_V_MSG(error, Vector<Vector<Face3> >(), "Invalid geometry.");
// Group connected faces in separate objects.
@@ -263,8 +259,7 @@ PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_ar
if (group >= 0) {
objects.resize(group);
- PoolVector<PoolVector<Face3> >::Write obw = objects.write();
- PoolVector<Face3> *group_faces = obw.ptr();
+ Vector<Face3> *group_faces = objects.ptrw();
for (int i = 0; i < len; i++) {
if (!_fcptr[i].valid)
@@ -470,7 +465,7 @@ static inline void _mark_outside(uint8_t ***p_cell_status, int x, int y, int z,
}
}
-static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, int len_x, int len_y, int len_z, PoolVector<Face3> &p_faces) {
+static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, int len_x, int len_y, int len_z, Vector<Face3> &p_faces) {
ERR_FAIL_INDEX(x, len_x);
ERR_FAIL_INDEX(y, len_y);
@@ -530,14 +525,13 @@ static inline void _build_faces(uint8_t ***p_cell_status, int x, int y, int z, i
}
}
-PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_error) {
+Vector<Face3> Geometry::wrap_geometry(Vector<Face3> p_array, real_t *p_error) {
#define _MIN_SIZE 1.0
#define _MAX_LENGTH 20
int face_count = p_array.size();
- PoolVector<Face3>::Read facesr = p_array.read();
- const Face3 *faces = facesr.ptr();
+ const Face3 *faces = p_array.ptr();
AABB global_aabb;
@@ -638,7 +632,7 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
// Build faces for the inside-outside cell divisors.
- PoolVector<Face3> wrapped_faces;
+ Vector<Face3> wrapped_faces;
for (int i = 0; i < div_x; i++) {
@@ -654,8 +648,7 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
// Transform face vertices to global coords.
int wrapped_faces_count = wrapped_faces.size();
- PoolVector<Face3>::Write wrapped_facesw = wrapped_faces.write();
- Face3 *wrapped_faces_ptr = wrapped_facesw.ptr();
+ Face3 *wrapped_faces_ptr = wrapped_faces.ptrw();
for (int i = 0; i < wrapped_faces_count; i++) {
@@ -720,7 +713,7 @@ Vector<Vector<Vector2> > Geometry::decompose_polygon_in_convex(Vector<Point2> po
return decomp;
}
-Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes) {
+Geometry::MeshData Geometry::build_convex_mesh(const Vector<Plane> &p_planes) {
MeshData mesh;
@@ -859,9 +852,9 @@ Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes
return mesh;
}
-PoolVector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) {
+Vector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) {
- PoolVector<Plane> planes;
+ Vector<Plane> planes;
planes.push_back(Plane(Vector3(1, 0, 0), p_extents.x));
planes.push_back(Plane(Vector3(-1, 0, 0), p_extents.x));
@@ -873,9 +866,9 @@ PoolVector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) {
return planes;
}
-PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) {
+Vector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) {
- PoolVector<Plane> planes;
+ Vector<Plane> planes;
for (int i = 0; i < p_sides; i++) {
@@ -895,9 +888,9 @@ PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_heig
return planes;
}
-PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis) {
+Vector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis) {
- PoolVector<Plane> planes;
+ Vector<Plane> planes;
Vector3 axis;
axis[p_axis] = 1.0;
@@ -928,9 +921,9 @@ PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int
return planes;
}
-PoolVector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
+Vector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
- PoolVector<Plane> planes;
+ Vector<Plane> planes;
Vector3 axis;
axis[p_axis] = 1.0;
diff --git a/core/math/geometry.h b/core/math/geometry.h
index b9193242bc..a94d00bf77 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -37,7 +37,7 @@
#include "core/math/triangulate.h"
#include "core/math/vector3.h"
#include "core/object.h"
-#include "core/pool_vector.h"
+
#include "core/print_string.h"
#include "core/vector.h"
@@ -899,10 +899,10 @@ public:
return (intersections & 1);
}
- static PoolVector<PoolVector<Face3> > separate_objects(PoolVector<Face3> p_array);
+ static Vector<Vector<Face3> > separate_objects(Vector<Face3> p_array);
// Create a "wrap" that encloses the given geometry.
- static PoolVector<Face3> wrap_geometry(PoolVector<Face3> p_array, real_t *p_error = NULL);
+ static Vector<Face3> wrap_geometry(Vector<Face3> p_array, real_t *p_error = NULL);
struct MeshData {
@@ -1006,11 +1006,11 @@ public:
}
static Vector<Vector<Vector2> > decompose_polygon_in_convex(Vector<Point2> polygon);
- static MeshData build_convex_mesh(const PoolVector<Plane> &p_planes);
- static PoolVector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z);
- static PoolVector<Plane> build_box_planes(const Vector3 &p_extents);
- static PoolVector<Plane> build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z);
- static PoolVector<Plane> build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z);
+ static MeshData build_convex_mesh(const Vector<Plane> &p_planes);
+ static Vector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z);
+ static Vector<Plane> build_box_planes(const Vector3 &p_extents);
+ static Vector<Plane> build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z);
+ static Vector<Plane> build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z);
static void make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size);
diff --git a/core/math/rect2.h b/core/math/rect2.h
index 0d2e7eb6e5..3b9660e2f0 100644
--- a/core/math/rect2.h
+++ b/core/math/rect2.h
@@ -47,28 +47,26 @@ struct Rect2 {
real_t get_area() const { return size.width * size.height; }
- inline bool intersects(const Rect2 &p_rect) const {
- if (position.x >= (p_rect.position.x + p_rect.size.width))
- return false;
- if ((position.x + size.width) <= p_rect.position.x)
- return false;
- if (position.y >= (p_rect.position.y + p_rect.size.height))
- return false;
- if ((position.y + size.height) <= p_rect.position.y)
- return false;
-
- return true;
- }
-
- inline bool intersects_touch(const Rect2 &p_rect) const {
- if (position.x > (p_rect.position.x + p_rect.size.width))
- return false;
- if ((position.x + size.width) < p_rect.position.x)
- return false;
- if (position.y > (p_rect.position.y + p_rect.size.height))
- return false;
- if ((position.y + size.height) < p_rect.position.y)
- return false;
+ inline bool intersects(const Rect2 &p_rect, const bool p_include_borders = false) const {
+ if (p_include_borders) {
+ if (position.x > (p_rect.position.x + p_rect.size.width))
+ return false;
+ if ((position.x + size.width) < p_rect.position.x)
+ return false;
+ if (position.y > (p_rect.position.y + p_rect.size.height))
+ return false;
+ if ((position.y + size.height) < p_rect.position.y)
+ return false;
+ } else {
+ if (position.x >= (p_rect.position.x + p_rect.size.width))
+ return false;
+ if ((position.x + size.width) <= p_rect.position.x)
+ return false;
+ if (position.y >= (p_rect.position.y + p_rect.size.height))
+ return false;
+ if ((position.y + size.height) <= p_rect.position.y)
+ return false;
+ }
return true;
}
@@ -387,6 +385,11 @@ struct Rect2i {
size = end - begin;
}
+ _FORCE_INLINE_ Rect2i abs() const {
+
+ return Rect2i(Point2i(position.x + MIN(size.x, 0), position.y + MIN(size.y, 0)), size.abs());
+ }
+
operator String() const { return String(position) + ", " + String(size); }
operator Rect2() const { return Rect2(position, size); }
diff --git a/core/math/transform.h b/core/math/transform.h
index ad397d9c09..c6e3be4c70 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -34,7 +34,6 @@
#include "core/math/aabb.h"
#include "core/math/basis.h"
#include "core/math/plane.h"
-#include "core/pool_vector.h"
class Transform {
public:
@@ -84,8 +83,8 @@ public:
_FORCE_INLINE_ AABB xform(const AABB &p_aabb) const;
_FORCE_INLINE_ AABB xform_inv(const AABB &p_aabb) const;
- _FORCE_INLINE_ PoolVector<Vector3> xform(const PoolVector<Vector3> &p_array) const;
- _FORCE_INLINE_ PoolVector<Vector3> xform_inv(const PoolVector<Vector3> &p_array) const;
+ _FORCE_INLINE_ Vector<Vector3> xform(const Vector<Vector3> &p_array) const;
+ _FORCE_INLINE_ Vector<Vector3> xform_inv(const Vector<Vector3> &p_array) const;
void operator*=(const Transform &p_transform);
Transform operator*(const Transform &p_transform) const;
@@ -210,13 +209,13 @@ _FORCE_INLINE_ AABB Transform::xform_inv(const AABB &p_aabb) const {
return ret;
}
-PoolVector<Vector3> Transform::xform(const PoolVector<Vector3> &p_array) const {
+Vector<Vector3> Transform::xform(const Vector<Vector3> &p_array) const {
- PoolVector<Vector3> array;
+ Vector<Vector3> array;
array.resize(p_array.size());
- PoolVector<Vector3>::Read r = p_array.read();
- PoolVector<Vector3>::Write w = array.write();
+ const Vector3 *r = p_array.ptr();
+ Vector3 *w = array.ptrw();
for (int i = 0; i < p_array.size(); ++i) {
w[i] = xform(r[i]);
@@ -224,13 +223,13 @@ PoolVector<Vector3> Transform::xform(const PoolVector<Vector3> &p_array) const {
return array;
}
-PoolVector<Vector3> Transform::xform_inv(const PoolVector<Vector3> &p_array) const {
+Vector<Vector3> Transform::xform_inv(const Vector<Vector3> &p_array) const {
- PoolVector<Vector3> array;
+ Vector<Vector3> array;
array.resize(p_array.size());
- PoolVector<Vector3>::Read r = p_array.read();
- PoolVector<Vector3>::Write w = array.write();
+ const Vector3 *r = p_array.ptr();
+ Vector3 *w = array.ptrw();
for (int i = 0; i < p_array.size(); ++i) {
w[i] = xform_inv(r[i]);
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 367f697ccf..fa43762aa4 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -32,7 +32,6 @@
#define TRANSFORM_2D_H
#include "core/math/rect2.h" // also includes vector2, math_funcs, and ustring
-#include "core/pool_vector.h"
struct Transform2D {
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of elements array, the basis matrix looks like "on paper":
@@ -112,8 +111,8 @@ struct Transform2D {
_FORCE_INLINE_ Vector2 xform_inv(const Vector2 &p_vec) const;
_FORCE_INLINE_ Rect2 xform(const Rect2 &p_rect) const;
_FORCE_INLINE_ Rect2 xform_inv(const Rect2 &p_rect) const;
- _FORCE_INLINE_ PoolVector<Vector2> xform(const PoolVector<Vector2> &p_array) const;
- _FORCE_INLINE_ PoolVector<Vector2> xform_inv(const PoolVector<Vector2> &p_array) const;
+ _FORCE_INLINE_ Vector<Vector2> xform(const Vector<Vector2> &p_array) const;
+ _FORCE_INLINE_ Vector<Vector2> xform_inv(const Vector<Vector2> &p_array) const;
operator String() const;
@@ -203,13 +202,13 @@ Rect2 Transform2D::xform_inv(const Rect2 &p_rect) const {
return new_rect;
}
-PoolVector<Vector2> Transform2D::xform(const PoolVector<Vector2> &p_array) const {
+Vector<Vector2> Transform2D::xform(const Vector<Vector2> &p_array) const {
- PoolVector<Vector2> array;
+ Vector<Vector2> array;
array.resize(p_array.size());
- PoolVector<Vector2>::Read r = p_array.read();
- PoolVector<Vector2>::Write w = array.write();
+ const Vector2 *r = p_array.ptr();
+ Vector2 *w = array.ptrw();
for (int i = 0; i < p_array.size(); ++i) {
w[i] = xform(r[i]);
@@ -217,13 +216,13 @@ PoolVector<Vector2> Transform2D::xform(const PoolVector<Vector2> &p_array) const
return array;
}
-PoolVector<Vector2> Transform2D::xform_inv(const PoolVector<Vector2> &p_array) const {
+Vector<Vector2> Transform2D::xform_inv(const Vector<Vector2> &p_array) const {
- PoolVector<Vector2> array;
+ Vector<Vector2> array;
array.resize(p_array.size());
- PoolVector<Vector2>::Read r = p_array.read();
- PoolVector<Vector2>::Write w = array.write();
+ const Vector2 *r = p_array.ptr();
+ Vector2 *w = array.ptrw();
for (int i = 0; i < p_array.size(); ++i) {
w[i] = xform_inv(r[i]);
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index 53d4ea0a96..01d38cf24e 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -89,7 +89,7 @@ int TriangleMesh::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, in
return index;
}
-void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const {
+void TriangleMesh::get_indices(Vector<int> *r_triangles_indices) const {
if (!valid)
return;
@@ -97,10 +97,10 @@ void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const {
const int triangles_num = triangles.size();
// Parse vertices indices
- PoolVector<Triangle>::Read triangles_read = triangles.read();
+ const Triangle *triangles_read = triangles.ptr();
r_triangles_indices->resize(triangles_num * 3);
- PoolVector<int>::Write r_indices_write = r_triangles_indices->write();
+ int *r_indices_write = r_triangles_indices->ptrw();
for (int i = 0; i < triangles_num; ++i) {
r_indices_write[3 * i + 0] = triangles_read[i].indices[0];
@@ -109,7 +109,7 @@ void TriangleMesh::get_indices(PoolVector<int> *r_triangles_indices) const {
}
}
-void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
+void TriangleMesh::create(const Vector<Vector3> &p_faces) {
valid = false;
@@ -119,7 +119,7 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
triangles.resize(fc);
bvh.resize(fc * 3); //will never be larger than this (todo make better)
- PoolVector<BVH>::Write bw = bvh.write();
+ BVH *bw = bvh.ptrw();
{
@@ -127,8 +127,8 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
//except for the Set for repeated triangles, everything
//goes in-place.
- PoolVector<Vector3>::Read r = p_faces.read();
- PoolVector<Triangle>::Write w = triangles.write();
+ const Vector3 *r = p_faces.ptr();
+ Triangle *w = triangles.ptrw();
Map<Vector3, int> db;
for (int i = 0; i < fc; i++) {
@@ -164,15 +164,15 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
}
vertices.resize(db.size());
- PoolVector<Vector3>::Write vw = vertices.write();
+ Vector3 *vw = vertices.ptrw();
for (Map<Vector3, int>::Element *E = db.front(); E; E = E->next()) {
vw[E->get()] = E->key();
}
}
- PoolVector<BVH *> bwptrs;
+ Vector<BVH *> bwptrs;
bwptrs.resize(fc);
- PoolVector<BVH *>::Write bwp = bwptrs.write();
+ BVH **bwp = bwptrs.ptrw();
for (int i = 0; i < fc; i++) {
bwp[i] = &bw[i];
@@ -180,9 +180,8 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
max_depth = 0;
int max_alloc = fc;
- _create_bvh(bw.ptr(), bwp.ptr(), 0, fc, 1, max_depth, max_alloc);
+ _create_bvh(bw, bwp, 0, fc, 1, max_depth, max_alloc);
- bw.release(); //clearup
bvh.resize(max_alloc); //resize back
valid = true;
@@ -208,13 +207,11 @@ Vector3 TriangleMesh::get_area_normal(const AABB &p_aabb) const {
int level = 0;
- PoolVector<Triangle>::Read trianglesr = triangles.read();
- PoolVector<Vector3>::Read verticesr = vertices.read();
- PoolVector<BVH>::Read bvhr = bvh.read();
+ const Triangle *triangleptr = triangles.ptr();
+ // const Vector3 *verticesr = vertices.ptr();
+ const BVH *bvhptr = bvh.ptr();
- const Triangle *triangleptr = trianglesr.ptr();
int pos = bvh.size() - 1;
- const BVH *bvhptr = bvhr.ptr();
stack[0] = pos;
while (true) {
@@ -304,14 +301,11 @@ bool TriangleMesh::intersect_segment(const Vector3 &p_begin, const Vector3 &p_en
int level = 0;
- PoolVector<Triangle>::Read trianglesr = triangles.read();
- PoolVector<Vector3>::Read verticesr = vertices.read();
- PoolVector<BVH>::Read bvhr = bvh.read();
+ const Triangle *triangleptr = triangles.ptr();
+ const Vector3 *vertexptr = vertices.ptr();
+ const BVH *bvhptr = bvh.ptr();
- const Triangle *triangleptr = trianglesr.ptr();
- const Vector3 *vertexptr = verticesr.ptr();
int pos = bvh.size() - 1;
- const BVH *bvhptr = bvhr.ptr();
stack[0] = pos;
while (true) {
@@ -419,14 +413,11 @@ bool TriangleMesh::intersect_ray(const Vector3 &p_begin, const Vector3 &p_dir, V
int level = 0;
- PoolVector<Triangle>::Read trianglesr = triangles.read();
- PoolVector<Vector3>::Read verticesr = vertices.read();
- PoolVector<BVH>::Read bvhr = bvh.read();
+ const Triangle *triangleptr = triangles.ptr();
+ const Vector3 *vertexptr = vertices.ptr();
+ const BVH *bvhptr = bvh.ptr();
- const Triangle *triangleptr = trianglesr.ptr();
- const Vector3 *vertexptr = verticesr.ptr();
int pos = bvh.size() - 1;
- const BVH *bvhptr = bvhr.ptr();
stack[0] = pos;
while (true) {
@@ -529,14 +520,11 @@ bool TriangleMesh::intersect_convex_shape(const Plane *p_planes, int p_plane_cou
int level = 0;
- PoolVector<Triangle>::Read trianglesr = triangles.read();
- PoolVector<Vector3>::Read verticesr = vertices.read();
- PoolVector<BVH>::Read bvhr = bvh.read();
+ const Triangle *triangleptr = triangles.ptr();
+ const Vector3 *vertexptr = vertices.ptr();
+ const BVH *bvhptr = bvh.ptr();
- const Triangle *triangleptr = trianglesr.ptr();
- const Vector3 *vertexptr = verticesr.ptr();
int pos = bvh.size() - 1;
- const BVH *bvhptr = bvhr.ptr();
stack[0] = pos;
while (true) {
@@ -645,16 +633,13 @@ bool TriangleMesh::inside_convex_shape(const Plane *p_planes, int p_plane_count,
int level = 0;
- PoolVector<Triangle>::Read trianglesr = triangles.read();
- PoolVector<Vector3>::Read verticesr = vertices.read();
- PoolVector<BVH>::Read bvhr = bvh.read();
+ const Triangle *triangleptr = triangles.ptr();
+ const Vector3 *vertexptr = vertices.ptr();
+ const BVH *bvhptr = bvh.ptr();
Transform scale(Basis().scaled(p_scale));
- const Triangle *triangleptr = trianglesr.ptr();
- const Vector3 *vertexptr = verticesr.ptr();
int pos = bvh.size() - 1;
- const BVH *bvhptr = bvhr.ptr();
stack[0] = pos;
while (true) {
@@ -732,18 +717,18 @@ bool TriangleMesh::is_valid() const {
return valid;
}
-PoolVector<Face3> TriangleMesh::get_faces() const {
+Vector<Face3> TriangleMesh::get_faces() const {
if (!valid)
- return PoolVector<Face3>();
+ return Vector<Face3>();
- PoolVector<Face3> faces;
+ Vector<Face3> faces;
int ts = triangles.size();
faces.resize(triangles.size());
- PoolVector<Face3>::Write w = faces.write();
- PoolVector<Triangle>::Read r = triangles.read();
- PoolVector<Vector3>::Read rv = vertices.read();
+ Face3 *w = faces.ptrw();
+ const Triangle *r = triangles.ptr();
+ const Vector3 *rv = vertices.ptr();
for (int i = 0; i < ts; i++) {
for (int j = 0; j < 3; j++) {
@@ -751,7 +736,6 @@ PoolVector<Face3> TriangleMesh::get_faces() const {
}
}
- w.release();
return faces;
}
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index 575a78b0b5..fdbfb90465 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -44,8 +44,8 @@ class TriangleMesh : public Reference {
int indices[3];
};
- PoolVector<Triangle> triangles;
- PoolVector<Vector3> vertices;
+ Vector<Triangle> triangles;
+ Vector<Vector3> vertices;
struct BVH {
@@ -82,7 +82,7 @@ class TriangleMesh : public Reference {
int _create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc);
- PoolVector<BVH> bvh;
+ Vector<BVH> bvh;
int max_depth;
bool valid;
@@ -93,13 +93,13 @@ public:
bool intersect_convex_shape(const Plane *p_planes, int p_plane_count) const;
bool inside_convex_shape(const Plane *p_planes, int p_plane_count, Vector3 p_scale = Vector3(1, 1, 1)) const;
Vector3 get_area_normal(const AABB &p_aabb) const;
- PoolVector<Face3> get_faces() const;
+ Vector<Face3> get_faces() const;
- PoolVector<Triangle> get_triangles() const { return triangles; }
- PoolVector<Vector3> get_vertices() const { return vertices; }
- void get_indices(PoolVector<int> *r_triangles_indices) const;
+ Vector<Triangle> get_triangles() const { return triangles; }
+ Vector<Vector3> get_vertices() const { return vertices; }
+ void get_indices(Vector<int> *r_triangles_indices) const;
- void create(const PoolVector<Vector3> &p_faces);
+ void create(const Vector<Vector3> &p_faces);
TriangleMesh();
};
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 1dec830821..ba5558102f 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -311,10 +311,15 @@ struct Vector2i {
bool operator<(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y < p_vec2.y) : (x < p_vec2.x); }
bool operator>(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y > p_vec2.y) : (x > p_vec2.x); }
+ bool operator<=(const Vector2i &p_vec2) const { return x == p_vec2.x ? (y <= p_vec2.y) : (x < p_vec2.x); }
+ bool operator>=(const Vector2i &p_vec2) const { return x == p_vec2.x ? (y >= p_vec2.y) : (x > p_vec2.x); }
+
bool operator==(const Vector2i &p_vec2) const;
bool operator!=(const Vector2i &p_vec2) const;
- real_t get_aspect() const { return width / (real_t)height; }
+ real_t aspect() const { return width / (real_t)height; }
+ Vector2i sign() const { return Vector2i(SGN(x), SGN(y)); }
+ Vector2i abs() const { return Vector2i(ABS(x), ABS(y)); }
operator String() const { return String::num(x) + ", " + String::num(y); }
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index 42390935d4..37207483fe 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -30,6 +30,7 @@
#include "message_queue.h"
+#include "core/core_string_names.h"
#include "core/project_settings.h"
#include "core/script_language.h"
@@ -42,37 +43,7 @@ MessageQueue *MessageQueue::get_singleton() {
Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const Variant **p_args, int p_argcount, bool p_show_error) {
- _THREAD_SAFE_METHOD_
-
- int room_needed = sizeof(Message) + sizeof(Variant) * p_argcount;
-
- if ((buffer_end + room_needed) >= buffer_size) {
- String type;
- if (ObjectDB::get_instance(p_id))
- type = ObjectDB::get_instance(p_id)->get_class();
- print_line("Failed method: " + type + ":" + p_method + " target ID: " + itos(p_id));
- statistics();
- ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings.");
- }
-
- Message *msg = memnew_placement(&buffer[buffer_end], Message);
- msg->args = p_argcount;
- msg->instance_id = p_id;
- msg->target = p_method;
- msg->type = TYPE_CALL;
- if (p_show_error)
- msg->type |= FLAG_SHOW_ERROR;
-
- buffer_end += sizeof(Message);
-
- for (int i = 0; i < p_argcount; i++) {
-
- Variant *v = memnew_placement(&buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = *p_args[i];
- }
-
- return OK;
+ return push_callable(Callable(p_id, p_method), p_args, p_argcount, p_show_error);
}
Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
@@ -107,8 +78,7 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName &p_prop, const Vari
Message *msg = memnew_placement(&buffer[buffer_end], Message);
msg->args = 1;
- msg->instance_id = p_id;
- msg->target = p_prop;
+ msg->callable = Callable(p_id, p_prop);
msg->type = TYPE_SET;
buffer_end += sizeof(Message);
@@ -137,7 +107,7 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) {
Message *msg = memnew_placement(&buffer[buffer_end], Message);
msg->type = TYPE_NOTIFICATION;
- msg->instance_id = p_id;
+ msg->callable = Callable(p_id, CoreStringNames::get_singleton()->notification); //name is meaningless but callable needs it
//msg->target;
msg->notification = p_notification;
@@ -160,18 +130,49 @@ Error MessageQueue::push_set(Object *p_object, const StringName &p_prop, const V
return push_set(p_object->get_instance_id(), p_prop, p_value);
}
+Error MessageQueue::push_callable(const Callable &p_callable, const Variant **p_args, int p_argcount, bool p_show_error) {
+
+ _THREAD_SAFE_METHOD_
+
+ int room_needed = sizeof(Message) + sizeof(Variant) * p_argcount;
+
+ if ((buffer_end + room_needed) >= buffer_size) {
+ print_line("Failed method: " + p_callable);
+ statistics();
+ ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_kb' in project settings.");
+ }
+
+ Message *msg = memnew_placement(&buffer[buffer_end], Message);
+ msg->args = p_argcount;
+ msg->callable = p_callable;
+ msg->type = TYPE_CALL;
+ if (p_show_error)
+ msg->type |= FLAG_SHOW_ERROR;
+
+ buffer_end += sizeof(Message);
+
+ for (int i = 0; i < p_argcount; i++) {
+
+ Variant *v = memnew_placement(&buffer[buffer_end], Variant);
+ buffer_end += sizeof(Variant);
+ *v = *p_args[i];
+ }
+
+ return OK;
+}
+
void MessageQueue::statistics() {
Map<StringName, int> set_count;
Map<int, int> notify_count;
- Map<StringName, int> call_count;
+ Map<Callable, int> call_count;
int null_count = 0;
uint32_t read_pos = 0;
while (read_pos < buffer_end) {
Message *message = (Message *)&buffer[read_pos];
- Object *target = ObjectDB::get_instance(message->instance_id);
+ Object *target = message->callable.get_object();
if (target != NULL) {
@@ -179,10 +180,10 @@ void MessageQueue::statistics() {
case TYPE_CALL: {
- if (!call_count.has(message->target))
- call_count[message->target] = 0;
+ if (!call_count.has(message->callable))
+ call_count[message->callable] = 0;
- call_count[message->target]++;
+ call_count[message->callable]++;
} break;
case TYPE_NOTIFICATION: {
@@ -195,10 +196,11 @@ void MessageQueue::statistics() {
} break;
case TYPE_SET: {
- if (!set_count.has(message->target))
- set_count[message->target] = 0;
+ StringName t = message->callable.get_method();
+ if (!set_count.has(t))
+ set_count[t] = 0;
- set_count[message->target]++;
+ set_count[t]++;
} break;
}
@@ -222,7 +224,7 @@ void MessageQueue::statistics() {
print_line("SET " + E->key() + ": " + itos(E->get()));
}
- for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) {
+ for (Map<Callable, int>::Element *E = call_count.front(); E; E = E->next()) {
print_line("CALL " + E->key() + ": " + itos(E->get()));
}
@@ -236,7 +238,7 @@ int MessageQueue::get_max_buffer_usage() const {
return buffer_max_used;
}
-void MessageQueue::_call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error) {
+void MessageQueue::_call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error) {
const Variant **argptrs = NULL;
if (p_argcount) {
@@ -246,11 +248,12 @@ void MessageQueue::_call_function(Object *p_target, const StringName &p_func, co
}
}
- Variant::CallError ce;
- p_target->call(p_func, argptrs, p_argcount, ce);
- if (p_show_error && ce.error != Variant::CallError::CALL_OK) {
+ Callable::CallError ce;
+ Variant ret;
+ p_callable.call(argptrs, p_argcount, ret, ce);
+ if (p_show_error && ce.error != Callable::CallError::CALL_OK) {
- ERR_PRINT("Error calling deferred method: " + Variant::get_call_error_text(p_target, p_func, argptrs, p_argcount, ce) + ".");
+ ERR_PRINT("Error calling deferred method: " + Variant::get_callable_error_text(p_callable, argptrs, p_argcount, ce) + ".");
}
}
@@ -265,7 +268,10 @@ void MessageQueue::flush() {
//using reverse locking strategy
_THREAD_SAFE_LOCK_
- ERR_FAIL_COND(flushing); //already flushing, you did something odd
+ if (flushing) {
+ _THREAD_SAFE_UNLOCK_
+ ERR_FAIL_COND(flushing); //already flushing, you did something odd
+ }
flushing = true;
while (read_pos < buffer_end) {
@@ -283,7 +289,7 @@ void MessageQueue::flush() {
_THREAD_SAFE_UNLOCK_
- Object *target = ObjectDB::get_instance(message->instance_id);
+ Object *target = message->callable.get_object();
if (target != NULL) {
@@ -294,7 +300,7 @@ void MessageQueue::flush() {
// messages don't expect a return value
- _call_function(target, message->target, args, message->args, message->type & FLAG_SHOW_ERROR);
+ _call_function(message->callable, args, message->args, message->type & FLAG_SHOW_ERROR);
} break;
case TYPE_NOTIFICATION: {
@@ -307,7 +313,7 @@ void MessageQueue::flush() {
Variant *arg = (Variant *)(message + 1);
// messages don't expect a return value
- target->set(message->target, *arg);
+ target->set(message->callable.get_method(), *arg);
} break;
}
diff --git a/core/message_queue.h b/core/message_queue.h
index e9a92ff5b7..9ba748bb42 100644
--- a/core/message_queue.h
+++ b/core/message_queue.h
@@ -54,8 +54,7 @@ class MessageQueue {
struct Message {
- ObjectID instance_id;
- StringName target;
+ Callable callable;
int16_t type;
union {
int16_t notification;
@@ -68,7 +67,7 @@ class MessageQueue {
uint32_t buffer_max_used;
uint32_t buffer_size;
- void _call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error);
+ void _call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error);
static MessageQueue *singleton;
@@ -81,6 +80,7 @@ public:
Error push_call(ObjectID p_id, const StringName &p_method, VARIANT_ARG_LIST);
Error push_notification(ObjectID p_id, int p_notification);
Error push_set(ObjectID p_id, const StringName &p_prop, const Variant &p_value);
+ Error push_callable(const Callable &p_callable, const Variant **p_args, int p_argcount, bool p_show_error = false);
Error push_call(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST);
Error push_notification(Object *p_object, int p_notification);
diff --git a/core/method_bind.h b/core/method_bind.h
index 1860d227f7..726ce512f8 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -31,19 +31,18 @@
#ifndef METHOD_BIND_H
#define METHOD_BIND_H
+#ifdef DEBUG_ENABLED
+#define DEBUG_METHODS_ENABLED
+#endif
+
#include "core/list.h"
#include "core/method_ptrcall.h"
#include "core/object.h"
+#include "core/type_info.h"
#include "core/variant.h"
#include <stdio.h>
-#ifdef DEBUG_ENABLED
-#define DEBUG_METHODS_ENABLED
-#endif
-
-#include "core/type_info.h"
-
enum MethodFlags {
METHOD_FLAG_NORMAL = 1,
@@ -155,7 +154,7 @@ struct VariantObjectClassChecker<Control *> {
Variant::Type argtype = get_argument_type(m_arg - 1); \
if (!Variant::can_convert_strict(p_args[m_arg - 1]->get_type(), argtype) || \
!VariantObjectClassChecker<P##m_arg>::check(*p_args[m_arg - 1])) { \
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
r_error.argument = m_arg - 1; \
r_error.expected = argtype; \
return Variant(); \
@@ -278,7 +277,7 @@ public:
_FORCE_INLINE_ int get_argument_count() const { return argument_count; };
- virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) = 0;
+ virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) = 0;
#ifdef PTRCALL_ENABLED
virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) = 0;
@@ -300,7 +299,7 @@ public:
template <class T>
class MethodBindVarArg : public MethodBind {
public:
- typedef Variant (T::*NativeCall)(const Variant **, int, Variant::CallError &);
+ typedef Variant (T::*NativeCall)(const Variant **, int, Callable::CallError &);
protected:
NativeCall call_method;
@@ -338,7 +337,7 @@ public:
}
#endif
- virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) {
+ virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
T *instance = static_cast<T *>(p_object);
return (instance->*call_method)(p_args, p_arg_count, r_error);
@@ -389,7 +388,7 @@ public:
};
template <class T>
-MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Variant::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) {
+MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Callable::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) {
MethodBindVarArg<T> *a = memnew((MethodBindVarArg<T>));
a->set_method(p_method);
diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h
index 118970de80..3db186ca69 100644
--- a/core/method_ptrcall.h
+++ b/core/method_ptrcall.h
@@ -125,17 +125,22 @@ MAKE_PTRARG_BY_REFERENCE(AABB);
MAKE_PTRARG_BY_REFERENCE(Basis);
MAKE_PTRARG_BY_REFERENCE(Transform);
MAKE_PTRARG_BY_REFERENCE(Color);
+MAKE_PTRARG(StringName);
MAKE_PTRARG(NodePath);
MAKE_PTRARG(RID);
MAKE_PTRARG(Dictionary);
+MAKE_PTRARG(Callable);
+MAKE_PTRARG(Signal);
MAKE_PTRARG(Array);
-MAKE_PTRARG(PoolByteArray);
-MAKE_PTRARG(PoolIntArray);
-MAKE_PTRARG(PoolRealArray);
-MAKE_PTRARG(PoolStringArray);
-MAKE_PTRARG(PoolVector2Array);
-MAKE_PTRARG(PoolVector3Array);
-MAKE_PTRARG(PoolColorArray);
+MAKE_PTRARG(PackedByteArray);
+MAKE_PTRARG(PackedInt32Array);
+MAKE_PTRARG(PackedInt64Array);
+MAKE_PTRARG(PackedFloat32Array);
+MAKE_PTRARG(PackedFloat64Array);
+MAKE_PTRARG(PackedStringArray);
+MAKE_PTRARG(PackedVector2Array);
+MAKE_PTRARG(PackedVector3Array);
+MAKE_PTRARG(PackedColorArray);
MAKE_PTRARG_BY_REFERENCE(Variant);
//this is for Object
@@ -185,95 +190,96 @@ struct PtrToArg<ObjectID> {
//this is for the special cases used by Variant
-#define MAKE_VECARG(m_type) \
- template <> \
- struct PtrToArg<Vector<m_type> > { \
- _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
- const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \
- Vector<m_type> ret; \
- int len = dvs->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Read r = dvs->read(); \
- for (int i = 0; i < len; i++) { \
- ret.write[i] = r[i]; \
- } \
- } \
- return ret; \
- } \
- _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \
- PoolVector<m_type> *dv = reinterpret_cast<PoolVector<m_type> *>(p_ptr); \
- int len = p_vec.size(); \
- dv->resize(len); \
- { \
- PoolVector<m_type>::Write w = dv->write(); \
- for (int i = 0; i < len; i++) { \
- w[i] = p_vec[i]; \
- } \
- } \
- } \
- }; \
- template <> \
- struct PtrToArg<const Vector<m_type> &> { \
- _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
- const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \
- Vector<m_type> ret; \
- int len = dvs->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Read r = dvs->read(); \
- for (int i = 0; i < len; i++) { \
- ret.write[i] = r[i]; \
- } \
- } \
- return ret; \
- } \
+#define MAKE_VECARG(m_type) \
+ template <> \
+ struct PtrToArg<Vector<m_type> > { \
+ _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
+ const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
+ Vector<m_type> ret; \
+ int len = dvs->size(); \
+ ret.resize(len); \
+ { \
+ const m_type *r = dvs->ptr(); \
+ for (int i = 0; i < len; i++) { \
+ ret.write[i] = r[i]; \
+ } \
+ } \
+ return ret; \
+ } \
+ _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \
+ Vector<m_type> *dv = reinterpret_cast<Vector<m_type> *>(p_ptr); \
+ int len = p_vec.size(); \
+ dv->resize(len); \
+ { \
+ m_type *w = dv->ptrw(); \
+ for (int i = 0; i < len; i++) { \
+ w[i] = p_vec[i]; \
+ } \
+ } \
+ } \
+ }; \
+ template <> \
+ struct PtrToArg<const Vector<m_type> &> { \
+ _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
+ const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
+ Vector<m_type> ret; \
+ int len = dvs->size(); \
+ ret.resize(len); \
+ { \
+ const m_type *r = dvs->ptr(); \
+ for (int i = 0; i < len; i++) { \
+ ret.write[i] = r[i]; \
+ } \
+ } \
+ return ret; \
+ } \
}
-#define MAKE_VECARG_ALT(m_type, m_type_alt) \
- template <> \
- struct PtrToArg<Vector<m_type_alt> > { \
- _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
- const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \
- Vector<m_type_alt> ret; \
- int len = dvs->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Read r = dvs->read(); \
- for (int i = 0; i < len; i++) { \
- ret.write[i] = r[i]; \
- } \
- } \
- return ret; \
- } \
- _FORCE_INLINE_ static void encode(Vector<m_type_alt> p_vec, void *p_ptr) { \
- PoolVector<m_type> *dv = reinterpret_cast<PoolVector<m_type> *>(p_ptr); \
- int len = p_vec.size(); \
- dv->resize(len); \
- { \
- PoolVector<m_type>::Write w = dv->write(); \
- for (int i = 0; i < len; i++) { \
- w[i] = p_vec[i]; \
- } \
- } \
- } \
- }; \
- template <> \
- struct PtrToArg<const Vector<m_type_alt> &> { \
- _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
- const PoolVector<m_type> *dvs = reinterpret_cast<const PoolVector<m_type> *>(p_ptr); \
- Vector<m_type_alt> ret; \
- int len = dvs->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Read r = dvs->read(); \
- for (int i = 0; i < len; i++) { \
- ret.write[i] = r[i]; \
- } \
- } \
- return ret; \
- } \
+#define MAKE_VECARG_ALT(m_type, m_type_alt) \
+ template <> \
+ struct PtrToArg<Vector<m_type_alt> > { \
+ _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
+ const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
+ Vector<m_type_alt> ret; \
+ int len = dvs->size(); \
+ ret.resize(len); \
+ { \
+ const m_type *r = dvs->ptr(); \
+ for (int i = 0; i < len; i++) { \
+ ret.write[i] = r[i]; \
+ } \
+ } \
+ return ret; \
+ } \
+ _FORCE_INLINE_ static void encode(Vector<m_type_alt> p_vec, void *p_ptr) { \
+ Vector<m_type> *dv = reinterpret_cast<Vector<m_type> *>(p_ptr); \
+ int len = p_vec.size(); \
+ dv->resize(len); \
+ { \
+ m_type *w = dv->ptrw(); \
+ for (int i = 0; i < len; i++) { \
+ w[i] = p_vec[i]; \
+ } \
+ } \
+ } \
+ }; \
+ template <> \
+ struct PtrToArg<const Vector<m_type_alt> &> { \
+ _FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
+ const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
+ Vector<m_type_alt> ret; \
+ int len = dvs->size(); \
+ ret.resize(len); \
+ { \
+ const m_type *r = dvs->ptr(); \
+ for (int i = 0; i < len; i++) { \
+ ret.write[i] = r[i]; \
+ } \
+ } \
+ return ret; \
+ } \
}
+/*
MAKE_VECARG(String);
MAKE_VECARG(uint8_t);
MAKE_VECARG(int);
@@ -281,6 +287,7 @@ MAKE_VECARG(float);
MAKE_VECARG(Vector2);
MAKE_VECARG(Vector3);
MAKE_VECARG(Color);
+*/
MAKE_VECARG_ALT(String, StringName);
//for stuff that gets converted to Array vectors
@@ -324,74 +331,52 @@ MAKE_VECARR(Variant);
MAKE_VECARR(RID);
MAKE_VECARR(Plane);
-#define MAKE_DVECARR(m_type) \
- template <> \
- struct PtrToArg<PoolVector<m_type> > { \
- _FORCE_INLINE_ static PoolVector<m_type> convert(const void *p_ptr) { \
- const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
- PoolVector<m_type> ret; \
- int len = arr->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Write w = ret.write(); \
- for (int i = 0; i < len; i++) { \
- w[i] = (*arr)[i]; \
- } \
- } \
- return ret; \
- } \
- _FORCE_INLINE_ static void encode(PoolVector<m_type> p_vec, void *p_ptr) { \
- Array *arr = reinterpret_cast<Array *>(p_ptr); \
- int len = p_vec.size(); \
- arr->resize(len); \
- { \
- PoolVector<m_type>::Read r = p_vec.read(); \
- for (int i = 0; i < len; i++) { \
- (*arr)[i] = r[i]; \
- } \
- } \
- } \
- }; \
- template <> \
- struct PtrToArg<const PoolVector<m_type> &> { \
- _FORCE_INLINE_ static PoolVector<m_type> convert(const void *p_ptr) { \
- const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
- PoolVector<m_type> ret; \
- int len = arr->size(); \
- ret.resize(len); \
- { \
- PoolVector<m_type>::Write w = ret.write(); \
- for (int i = 0; i < len; i++) { \
- w[i] = (*arr)[i]; \
- } \
- } \
- return ret; \
- } \
+#define MAKE_DVECARR(m_type) \
+ template <> \
+ struct PtrToArg<Vector<m_type> > { \
+ _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
+ const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
+ Vector<m_type> ret; \
+ int len = arr->size(); \
+ ret.resize(len); \
+ { \
+ m_type *w = ret.ptrw(); \
+ for (int i = 0; i < len; i++) { \
+ w[i] = (*arr)[i]; \
+ } \
+ } \
+ return ret; \
+ } \
+ _FORCE_INLINE_ static void encode(Vector<m_type> p_vec, void *p_ptr) { \
+ Array *arr = reinterpret_cast<Array *>(p_ptr); \
+ int len = p_vec.size(); \
+ arr->resize(len); \
+ { \
+ const m_type *r = p_vec.ptr(); \
+ for (int i = 0; i < len; i++) { \
+ (*arr)[i] = r[i]; \
+ } \
+ } \
+ } \
+ }; \
+ template <> \
+ struct PtrToArg<const Vector<m_type> &> { \
+ _FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
+ const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
+ Vector<m_type> ret; \
+ int len = arr->size(); \
+ ret.resize(len); \
+ { \
+ m_type *w = ret.ptrw(); \
+ for (int i = 0; i < len; i++) { \
+ w[i] = (*arr)[i]; \
+ } \
+ } \
+ return ret; \
+ } \
}
-MAKE_DVECARR(Plane);
-//for special case StringName
-
-#define MAKE_STRINGCONV(m_type) \
- template <> \
- struct PtrToArg<m_type> { \
- _FORCE_INLINE_ static m_type convert(const void *p_ptr) { \
- m_type s = *reinterpret_cast<const String *>(p_ptr); \
- return s; \
- } \
- _FORCE_INLINE_ static void encode(m_type p_vec, void *p_ptr) { \
- String *arr = reinterpret_cast<String *>(p_ptr); \
- *arr = p_vec; \
- } \
- }; \
- \
- template <> \
- struct PtrToArg<const m_type &> { \
- _FORCE_INLINE_ static m_type convert(const void *p_ptr) { \
- m_type s = *reinterpret_cast<const String *>(p_ptr); \
- return s; \
- } \
- }
+// Special case for IP_Address.
#define MAKE_STRINGCONV_BY_REFERENCE(m_type) \
template <> \
@@ -414,19 +399,18 @@ MAKE_DVECARR(Plane);
} \
}
-MAKE_STRINGCONV(StringName);
MAKE_STRINGCONV_BY_REFERENCE(IP_Address);
template <>
-struct PtrToArg<PoolVector<Face3> > {
- _FORCE_INLINE_ static PoolVector<Face3> convert(const void *p_ptr) {
- const PoolVector<Vector3> *dvs = reinterpret_cast<const PoolVector<Vector3> *>(p_ptr);
- PoolVector<Face3> ret;
+struct PtrToArg<Vector<Face3> > {
+ _FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
+ const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr);
+ Vector<Face3> ret;
int len = dvs->size() / 3;
ret.resize(len);
{
- PoolVector<Vector3>::Read r = dvs->read();
- PoolVector<Face3>::Write w = ret.write();
+ const Vector3 *r = dvs->ptr();
+ Face3 *w = ret.ptrw();
for (int i = 0; i < len; i++) {
w[i].vertex[0] = r[i * 3 + 0];
w[i].vertex[1] = r[i * 3 + 1];
@@ -435,13 +419,13 @@ struct PtrToArg<PoolVector<Face3> > {
}
return ret;
}
- _FORCE_INLINE_ static void encode(PoolVector<Face3> p_vec, void *p_ptr) {
- PoolVector<Vector3> *arr = reinterpret_cast<PoolVector<Vector3> *>(p_ptr);
+ _FORCE_INLINE_ static void encode(Vector<Face3> p_vec, void *p_ptr) {
+ Vector<Vector3> *arr = reinterpret_cast<Vector<Vector3> *>(p_ptr);
int len = p_vec.size();
arr->resize(len * 3);
{
- PoolVector<Face3>::Read r = p_vec.read();
- PoolVector<Vector3>::Write w = arr->write();
+ const Face3 *r = p_vec.ptr();
+ Vector3 *w = arr->ptrw();
for (int i = 0; i < len; i++) {
w[i * 3 + 0] = r[i].vertex[0];
w[i * 3 + 1] = r[i].vertex[1];
@@ -451,15 +435,15 @@ struct PtrToArg<PoolVector<Face3> > {
}
};
template <>
-struct PtrToArg<const PoolVector<Face3> &> {
- _FORCE_INLINE_ static PoolVector<Face3> convert(const void *p_ptr) {
- const PoolVector<Vector3> *dvs = reinterpret_cast<const PoolVector<Vector3> *>(p_ptr);
- PoolVector<Face3> ret;
+struct PtrToArg<const Vector<Face3> &> {
+ _FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
+ const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr);
+ Vector<Face3> ret;
int len = dvs->size() / 3;
ret.resize(len);
{
- PoolVector<Vector3>::Read r = dvs->read();
- PoolVector<Face3>::Write w = ret.write();
+ const Vector3 *r = dvs->ptr();
+ Face3 *w = ret.ptrw();
for (int i = 0; i < len; i++) {
w[i].vertex[0] = r[i * 3 + 0];
w[i].vertex[1] = r[i * 3 + 1];
diff --git a/core/node_path.h b/core/node_path.h
index 5439658910..05b6d844ff 100644
--- a/core/node_path.h
+++ b/core/node_path.h
@@ -54,15 +54,6 @@ class NodePath {
void _update_hash_cache() const;
public:
- _FORCE_INLINE_ StringName get_sname() const {
-
- if (data && data->path.size() == 1 && data->subpath.empty()) {
- return data->path[0];
- } else {
- return operator String();
- }
- }
-
bool is_absolute() const;
int get_name_count() const;
StringName get_name(int p_idx) const;
diff --git a/core/object.cpp b/core/object.cpp
index 9a5cfe5c22..140ee811fe 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -335,10 +335,8 @@ MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const Pr
Object::Connection::operator Variant() const {
Dictionary d;
- d["source"] = source;
d["signal"] = signal;
- d["target"] = target;
- d["method"] = method;
+ d["callable"] = callable;
d["flags"] = flags;
d["binds"] = binds;
return d;
@@ -346,34 +344,19 @@ Object::Connection::operator Variant() const {
bool Object::Connection::operator<(const Connection &p_conn) const {
- if (source == p_conn.source) {
-
- if (signal == p_conn.signal) {
-
- if (target == p_conn.target) {
-
- return method < p_conn.method;
- } else {
-
- return target < p_conn.target;
- }
- } else
- return signal < p_conn.signal;
+ if (signal == p_conn.signal) {
+ return callable < p_conn.callable;
} else {
- return source < p_conn.source;
+ return signal < p_conn.signal;
}
}
Object::Connection::Connection(const Variant &p_variant) {
Dictionary d = p_variant;
- if (d.has("source"))
- source = d["source"];
if (d.has("signal"))
signal = d["signal"];
- if (d.has("target"))
- target = d["target"];
- if (d.has("method"))
- method = d["method"];
+ if (d.has("callable"))
+ callable = d["callable"];
if (d.has("flags"))
flags = d["flags"];
if (d.has("binds"))
@@ -655,18 +638,18 @@ void Object::get_method_list(List<MethodInfo> *p_list) const {
}
}
-Variant Object::_call_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Object::_call_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
- if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::STRING;
+ r_error.expected = Variant::STRING_NAME;
return Variant();
}
@@ -675,22 +658,22 @@ Variant Object::_call_bind(const Variant **p_args, int p_argcount, Variant::Call
return call(method, &p_args[1], p_argcount - 1, r_error);
}
-Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
- if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::STRING;
+ r_error.expected = Variant::STRING_NAME;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
StringName method = *p_args[0];
@@ -700,29 +683,29 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari
}
#ifdef DEBUG_ENABLED
-static void _test_call_error(const StringName &p_func, const Variant::CallError &error) {
+static void _test_call_error(const StringName &p_func, const Callable::CallError &error) {
switch (error.error) {
- case Variant::CallError::CALL_OK:
- case Variant::CallError::CALL_ERROR_INVALID_METHOD:
+ case Callable::CallError::CALL_OK:
+ case Callable::CallError::CALL_ERROR_INVALID_METHOD:
break;
- case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: {
+ case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: {
- ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Invalid type for argument " + itos(error.argument) + ", expected " + Variant::get_type_name(error.expected) + ".");
+ ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Invalid type for argument " + itos(error.argument) + ", expected " + Variant::get_type_name(Variant::Type(error.expected)) + ".");
break;
}
- case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Too many arguments, expected " + itos(error.argument) + ".");
break;
}
- case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
ERR_FAIL_MSG("Error calling function: " + String(p_func) + " - Too few arguments, expected " + itos(error.argument) + ".");
break;
}
- case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL:
+ case Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL:
break;
}
}
@@ -749,7 +732,7 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args,
//Variant ret;
OBJ_DEBUG_LOCK
- Variant::CallError error;
+ Callable::CallError error;
if (script_instance) {
script_instance->call_multilevel(p_method, p_args, p_argcount);
@@ -769,7 +752,7 @@ void Object::call_multilevel_reversed(const StringName &p_method, const Variant
MethodBind *method = ClassDB::get_method(get_class_name(), p_method);
- Variant::CallError error;
+ Callable::CallError error;
OBJ_DEBUG_LOCK
if (method) {
@@ -823,9 +806,9 @@ Variant Object::callv(const StringName &p_method, const Array &p_args) {
}
}
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = call(p_method, argptrs, p_args.size(), ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(Variant(), "Error calling method from 'callv': " + Variant::get_call_error_text(this, p_method, argptrs, p_args.size(), ce) + ".");
}
return ret;
@@ -842,7 +825,7 @@ Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) {
argc++;
}
- Variant::CallError error;
+ Callable::CallError error;
Variant ret = call(p_name, argptr, argc, error);
return ret;
@@ -859,38 +842,38 @@ void Object::call_multilevel(const StringName &p_name, VARIANT_ARG_DECLARE) {
argc++;
}
- //Variant::CallError error;
+ //Callable::CallError error;
call_multilevel(p_name, argptr, argc);
}
-Variant Object::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Object::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
if (p_method == CoreStringNames::get_singleton()->_free) {
//free must be here, before anything, always ready
#ifdef DEBUG_ENABLED
if (p_argcount != 0) {
r_error.argument = 0;
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
return Variant();
}
if (Object::cast_to<Reference>(this)) {
r_error.argument = 0;
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_V_MSG(Variant(), "Can't 'free' a reference.");
}
if (_lock_index.get() > 1) {
r_error.argument = 0;
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_V_MSG(Variant(), "Object is locked and can't be freed.");
}
#endif
//must be here, must be before everything,
memdelete(this);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return Variant();
}
@@ -901,15 +884,15 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a
//force jumptable
switch (r_error.error) {
- case Variant::CallError::CALL_OK:
+ case Callable::CallError::CALL_OK:
return ret;
- case Variant::CallError::CALL_ERROR_INVALID_METHOD:
+ case Callable::CallError::CALL_ERROR_INVALID_METHOD:
break;
- case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT:
- case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS:
- case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS:
+ case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT:
+ case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS:
+ case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS:
return ret;
- case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL: {
+ case Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL: {
}
}
}
@@ -917,10 +900,9 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a
MethodBind *method = ClassDB::get_method(get_class_name(), p_method);
if (method) {
-
ret = method->call(this, p_args, p_argcount, r_error);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
return ret;
@@ -1075,9 +1057,9 @@ Array Object::_get_method_list_bind() const {
return ret;
}
-PoolVector<String> Object::_get_meta_list_bind() const {
+Vector<String> Object::_get_meta_list_bind() const {
- PoolVector<String> _metaret;
+ Vector<String> _metaret;
List<Variant> keys;
metadata.get_key_list(&keys);
@@ -1103,7 +1085,7 @@ void Object::add_user_signal(const MethodInfo &p_signal) {
ERR_FAIL_COND_MSG(p_signal.name == "", "Signal name cannot be empty.");
ERR_FAIL_COND_MSG(ClassDB::has_signal(get_class_name(), p_signal.name), "User signal's name conflicts with a built-in signal of '" + get_class_name() + "'.");
ERR_FAIL_COND_MSG(signal_map.has(p_signal.name), "Trying to add already existing signal '" + p_signal.name + "'.");
- Signal s;
+ SignalData s;
s.user = p_signal;
signal_map[p_signal.name] = s;
}
@@ -1118,23 +1100,22 @@ bool Object::_has_user_signal(const StringName &p_name) const {
struct _ObjectSignalDisconnectData {
StringName signal;
- Object *target;
- StringName method;
+ Callable callable;
};
-Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
ERR_FAIL_COND_V(p_argcount < 1, Variant());
- if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::STRING;
- ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING, Variant());
+ r_error.expected = Variant::STRING_NAME;
+ ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING, Variant());
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
StringName signal = *p_args[0];
@@ -1155,7 +1136,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
if (_block_signals)
return ERR_CANT_ACQUIRE_RESOURCE; //no emit, signals blocked
- Signal *s = signal_map.getptr(p_name);
+ SignalData *s = signal_map.getptr(p_name);
if (!s) {
#ifdef DEBUG_ENABLED
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_name);
@@ -1171,7 +1152,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
//copy on write will ensure that disconnecting the signal or even deleting the object will not affect the signal calling.
//this happens automatically and will not change the performance of calling.
//awesome, isn't it?
- VMap<Signal::Target, Signal::Slot> slot_map = s->slot_map;
+ VMap<Callable, SignalData::Slot> slot_map = s->slot_map;
int ssize = slot_map.size();
@@ -1185,7 +1166,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
const Connection &c = slot_map.getv(i).conn;
- Object *target = ObjectDB::get_instance(slot_map.getk(i)._id);
+ Object *target = c.callable.get_object();
if (!target) {
// Target might have been deleted during signal callback, this is expected and OK.
continue;
@@ -1210,22 +1191,23 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
}
if (c.flags & CONNECT_DEFERRED) {
- MessageQueue::get_singleton()->push_call(target->get_instance_id(), c.method, args, argc, true);
+ MessageQueue::get_singleton()->push_callable(c.callable, args, argc, true);
} else {
- Variant::CallError ce;
+ Callable::CallError ce;
_emitting = true;
- target->call(c.method, args, argc, ce);
+ Variant ret;
+ c.callable.call(args, argc, ret, ce);
_emitting = false;
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
#ifdef DEBUG_ENABLED
if (c.flags & CONNECT_PERSIST && Engine::get_singleton()->is_editor_hint() && (script.is_null() || !Ref<Script>(script)->is_tool()))
continue;
#endif
- if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) {
+ if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) {
//most likely object is not initialized yet, do not throw error.
} else {
- ERR_PRINT("Error calling method from signal '" + String(p_name) + "': " + Variant::get_call_error_text(target, c.method, args, argc, ce) + ".");
+ ERR_PRINT("Error calling from signal '" + String(p_name) + "' to callable: " + Variant::get_callable_error_text(c.callable, args, argc, ce) + ".");
err = ERR_METHOD_NOT_FOUND;
}
}
@@ -1242,8 +1224,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
_ObjectSignalDisconnectData dd;
dd.signal = p_name;
- dd.target = target;
- dd.method = c.method;
+ dd.callable = c.callable;
disconnect_data.push_back(dd);
}
}
@@ -1251,7 +1232,8 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
while (!disconnect_data.empty()) {
const _ObjectSignalDisconnectData &dd = disconnect_data.front()->get();
- disconnect(dd.signal, dd.target, dd.method);
+
+ _disconnect(dd.signal, dd.callable);
disconnect_data.pop_front();
}
@@ -1323,15 +1305,8 @@ Array Object::_get_signal_connection_list(const String &p_signal) const {
for (List<Connection>::Element *E = conns.front(); E; E = E->next()) {
Connection &c = E->get();
- if (c.signal == p_signal) {
- Dictionary rc;
- rc["signal"] = c.signal;
- rc["method"] = c.method;
- rc["source"] = c.source;
- rc["target"] = c.target;
- rc["binds"] = c.binds;
- rc["flags"] = c.flags;
- ret.push_back(rc);
+ if (c.signal.get_name() == p_signal) {
+ ret.push_back(c);
}
}
@@ -1343,11 +1318,7 @@ Array Object::_get_incoming_connections() const {
Array ret;
int connections_amount = connections.size();
for (int idx_conn = 0; idx_conn < connections_amount; idx_conn++) {
- Dictionary conn_data;
- conn_data["source"] = connections[idx_conn].source;
- conn_data["signal_name"] = connections[idx_conn].signal;
- conn_data["method_name"] = connections[idx_conn].method;
- ret.push_back(conn_data);
+ ret.push_back(connections[idx_conn]);
}
return ret;
@@ -1381,7 +1352,7 @@ void Object::get_all_signal_connections(List<Connection> *p_connections) const {
while ((S = signal_map.next(S))) {
- const Signal *s = &signal_map[*S];
+ const SignalData *s = &signal_map[*S];
for (int i = 0; i < s->slot_map.size(); i++) {
@@ -1392,7 +1363,7 @@ void Object::get_all_signal_connections(List<Connection> *p_connections) const {
void Object::get_signal_connection_list(const StringName &p_signal, List<Connection> *p_connections) const {
- const Signal *s = signal_map.getptr(p_signal);
+ const SignalData *s = signal_map.getptr(p_signal);
if (!s)
return; //nothing
@@ -1407,7 +1378,7 @@ int Object::get_persistent_signal_connection_count() const {
while ((S = signal_map.next(S))) {
- const Signal *s = &signal_map[*S];
+ const SignalData *s = &signal_map[*S];
for (int i = 0; i < s->slot_map.size(); i++) {
if (s->slot_map.getv(i).conn.flags & CONNECT_PERSIST) {
@@ -1426,11 +1397,18 @@ void Object::get_signals_connected_to_this(List<Connection> *p_connections) cons
}
}
-Error Object::connect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds, uint32_t p_flags) {
+Error Object::connect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds, uint32_t p_flags) {
+
+ return connect(p_signal, Callable(p_to_object, p_to_method), p_binds, p_flags);
+}
+Error Object::connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
+
+ ERR_FAIL_COND_V(p_callable.is_null(), ERR_INVALID_PARAMETER);
- ERR_FAIL_NULL_V(p_to_object, ERR_INVALID_PARAMETER);
+ Object *target_object = p_callable.get_object();
+ ERR_FAIL_COND_V(!target_object, ERR_INVALID_PARAMETER);
- Signal *s = signal_map.getptr(p_signal);
+ SignalData *s = signal_map.getptr(p_signal);
if (!s) {
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal);
//check in script
@@ -1449,33 +1427,32 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str
#endif
}
- ERR_FAIL_COND_V_MSG(!signal_is_valid, ERR_INVALID_PARAMETER, "In Object of type '" + String(get_class()) + "': Attempt to connect nonexistent signal '" + p_signal + "' to method '" + p_to_object->get_class() + "." + p_to_method + "'.");
+ ERR_FAIL_COND_V_MSG(!signal_is_valid, ERR_INVALID_PARAMETER, "In Object of type '" + String(get_class()) + "': Attempt to connect nonexistent signal '" + p_signal + "' to callable '" + p_callable + "'.");
- signal_map[p_signal] = Signal();
+ signal_map[p_signal] = SignalData();
s = &signal_map[p_signal];
}
- Signal::Target target(p_to_object->get_instance_id(), p_to_method);
+ Callable target = p_callable;
+
if (s->slot_map.has(target)) {
if (p_flags & CONNECT_REFERENCE_COUNTED) {
s->slot_map[target].reference_count++;
return OK;
} else {
- ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Signal '" + p_signal + "' is already connected to given method '" + p_to_method + "' in that object.");
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Signal '" + p_signal + "' is already connected to given callable '" + p_callable + "' in that object.");
}
}
- Signal::Slot slot;
+ SignalData::Slot slot;
Connection conn;
- conn.source = this;
- conn.target = p_to_object;
- conn.method = p_to_method;
- conn.signal = p_signal;
+ conn.callable = target;
+ conn.signal = ::Signal(this, p_signal);
conn.flags = p_flags;
conn.binds = p_binds;
slot.conn = conn;
- slot.cE = p_to_object->connections.push_back(conn);
+ slot.cE = target_object->connections.push_back(conn);
if (p_flags & CONNECT_REFERENCE_COUNTED) {
slot.reference_count = 1;
}
@@ -1485,10 +1462,15 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str
return OK;
}
-bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const {
+bool Object::is_connected_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const {
+
+ return is_connected(p_signal, Callable(p_to_object, p_to_method));
+}
- ERR_FAIL_NULL_V(p_to_object, false);
- const Signal *s = signal_map.getptr(p_signal);
+bool Object::is_connected(const StringName &p_signal, const Callable &p_callable) const {
+
+ ERR_FAIL_COND_V(p_callable.is_null(), false);
+ const SignalData *s = signal_map.getptr(p_signal);
if (!s) {
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal);
if (signal_is_valid)
@@ -1500,28 +1482,35 @@ bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const
ERR_FAIL_V_MSG(false, "Nonexistent signal: " + p_signal + ".");
}
- Signal::Target target(p_to_object->get_instance_id(), p_to_method);
+ Callable target = p_callable;
return s->slot_map.has(target);
//const Map<Signal::Target,Signal::Slot>::Element *E = s->slot_map.find(target);
//return (E!=NULL);
}
-void Object::disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) {
+void Object::disconnect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) {
- _disconnect(p_signal, p_to_object, p_to_method);
+ _disconnect(p_signal, Callable(p_to_object, p_to_method));
}
-void Object::_disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, bool p_force) {
- ERR_FAIL_NULL(p_to_object);
- Signal *s = signal_map.getptr(p_signal);
- ERR_FAIL_COND_MSG(!s, vformat("Nonexistent signal '%s' in %s.", p_signal, to_string()));
+void Object::disconnect(const StringName &p_signal, const Callable &p_callable) {
+ _disconnect(p_signal, p_callable);
+}
+
+void Object::_disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force) {
+
+ ERR_FAIL_COND(p_callable.is_null());
- Signal::Target target(p_to_object->get_instance_id(), p_to_method);
+ Object *target_object = p_callable.get_object();
+ ERR_FAIL_COND(!target_object);
+
+ SignalData *s = signal_map.getptr(p_signal);
+ ERR_FAIL_COND_MSG(!s, vformat("Nonexistent signal '%s' in %s.", p_signal, to_string()));
- ERR_FAIL_COND_MSG(!s->slot_map.has(target), "Disconnecting nonexistent signal '" + p_signal + "', slot: " + itos(target._id) + ":" + target.method + ".");
+ ERR_FAIL_COND_MSG(!s->slot_map.has(p_callable), "Disconnecting nonexistent signal '" + p_signal + "', callable: " + p_callable + ".");
- Signal::Slot *slot = &s->slot_map[target];
+ SignalData::Slot *slot = &s->slot_map[p_callable];
if (!p_force) {
slot->reference_count--; // by default is zero, if it was not referenced it will go below it
@@ -1530,8 +1519,8 @@ void Object::_disconnect(const StringName &p_signal, Object *p_to_object, const
}
}
- p_to_object->connections.erase(slot->cE);
- s->slot_map.erase(target);
+ target_object->connections.erase(slot->cE);
+ s->slot_map.erase(p_callable);
if (s->slot_map.empty() && ClassDB::has_signal(get_class_name(), p_signal)) {
//not user signal, delete
@@ -1680,7 +1669,7 @@ void Object::_bind_methods() {
{
MethodInfo mi;
mi.name = "emit_signal";
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "signal"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "signal"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "emit_signal", &Object::_emit_signal, mi, varray(), false);
}
@@ -1688,7 +1677,7 @@ void Object::_bind_methods() {
{
MethodInfo mi;
mi.name = "call";
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call", &Object::_call_bind, mi);
}
@@ -1696,7 +1685,7 @@ void Object::_bind_methods() {
{
MethodInfo mi;
mi.name = "call_deferred";
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_deferred", &Object::_call_deferred_bind, mi, varray(), false);
}
@@ -1711,9 +1700,9 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_signal_connection_list", "signal"), &Object::_get_signal_connection_list);
ClassDB::bind_method(D_METHOD("get_incoming_connections"), &Object::_get_incoming_connections);
- ClassDB::bind_method(D_METHOD("connect", "signal", "target", "method", "binds", "flags"), &Object::connect, DEFVAL(Array()), DEFVAL(0));
- ClassDB::bind_method(D_METHOD("disconnect", "signal", "target", "method"), &Object::disconnect);
- ClassDB::bind_method(D_METHOD("is_connected", "signal", "target", "method"), &Object::is_connected);
+ ClassDB::bind_method(D_METHOD("connect", "signal", "callable", "binds", "flags"), &Object::connect, DEFVAL(Array()), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("disconnect", "signal", "callable"), &Object::disconnect);
+ ClassDB::bind_method(D_METHOD("is_connected", "signal", "callable"), &Object::is_connected);
ClassDB::bind_method(D_METHOD("set_block_signals", "enable"), &Object::set_block_signals);
ClassDB::bind_method(D_METHOD("is_blocking_signals"), &Object::is_blocking_signals);
@@ -1730,9 +1719,9 @@ void Object::_bind_methods() {
ADD_SIGNAL(MethodInfo("script_changed"));
BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value")));
#ifdef TOOLS_ENABLED
- MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property"));
+ MethodInfo miget("_get", PropertyInfo(Variant::STRING_NAME, "property"));
miget.return_val.name = "Variant";
miget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
BIND_VMETHOD(miget);
@@ -1830,7 +1819,7 @@ Variant::Type Object::get_static_property_type_indexed(const Vector<StringName>
return Variant::NIL;
}
- Variant::CallError ce;
+ Callable::CallError ce;
Variant check = Variant::construct(t, NULL, 0, ce);
for (int i = 1; i < p_path.size(); i++) {
@@ -1957,15 +1946,15 @@ Object::~Object() {
while ((S = signal_map.next(NULL))) {
- Signal *s = &signal_map[*S];
+ SignalData *s = &signal_map[*S];
//brute force disconnect for performance
int slot_count = s->slot_map.size();
- const VMap<Signal::Target, Signal::Slot>::Pair *slot_list = s->slot_map.get_array();
+ const VMap<Callable, SignalData::Slot>::Pair *slot_list = s->slot_map.get_array();
for (int i = 0; i < slot_count; i++) {
- slot_list[i].value.conn.target->connections.erase(slot_list[i].value.cE);
+ slot_list[i].value.conn.callable.get_object()->connections.erase(slot_list[i].value.cE);
}
signal_map.erase(*S);
@@ -1975,7 +1964,7 @@ Object::~Object() {
while (connections.size()) {
Connection c = connections.front()->get();
- c.source->_disconnect(c.signal, c.target, c.method, true);
+ c.signal.get_object()->_disconnect(c.signal.get_name(), c.callable, true);
}
ObjectDB::remove_instance(this);
diff --git a/core/object.h b/core/object.h
index 6a229afaea..59d3f06cfe 100644
--- a/core/object.h
+++ b/core/object.h
@@ -126,6 +126,7 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 23,
PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 24,
PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 25, // Used in inspector to increment property when keyed in animation player
+ PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
@@ -413,18 +414,15 @@ public:
struct Connection {
- Object *source;
- StringName signal;
- Object *target;
- StringName method;
+ ::Signal signal;
+ Callable callable;
+
uint32_t flags;
Vector<Variant> binds;
bool operator<(const Connection &p_conn) const;
operator Variant() const;
Connection() {
- source = NULL;
- target = NULL;
flags = 0;
}
Connection(const Variant &p_variant);
@@ -441,21 +439,7 @@ private:
friend bool predelete_handler(Object *);
friend void postinitialize_handler(Object *);
- struct Signal {
-
- struct Target {
-
- ObjectID _id;
- StringName method;
-
- _FORCE_INLINE_ bool operator<(const Target &p_target) const { return (_id == p_target._id) ? (method < p_target.method) : (_id < p_target._id); }
-
- Target(const ObjectID &p_id, const StringName &p_method) :
- _id(p_id),
- method(p_method) {
- }
- Target() { _id = ObjectID(); }
- };
+ struct SignalData {
struct Slot {
@@ -466,11 +450,11 @@ private:
};
MethodInfo user;
- VMap<Target, Slot> slot_map;
- Signal() {}
+ VMap<Callable, Slot> slot_map;
+ SignalData() {}
};
- HashMap<StringName, Signal> signal_map;
+ HashMap<StringName, SignalData> signal_map;
List<Connection> connections;
#ifdef DEBUG_ENABLED
SafeRefCount _lock_index;
@@ -496,7 +480,7 @@ private:
void _add_user_signal(const String &p_name, const Array &p_args = Array());
bool _has_user_signal(const StringName &p_name) const;
- Variant _emit_signal(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Array _get_signal_list() const;
Array _get_signal_connection_list(const String &p_signal) const;
Array _get_incoming_connections() const;
@@ -554,8 +538,8 @@ protected:
//Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant());
//void _call_deferred_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant());
- Variant _call_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _call_deferred_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _call_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _call_deferred_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual const StringName *_get_class_namev() const {
if (!_class_name)
@@ -563,7 +547,7 @@ protected:
return &_class_name;
}
- PoolVector<String> _get_meta_list_bind() const;
+ Vector<String> _get_meta_list_bind() const;
Array _get_property_list_bind() const;
Array _get_method_list_bind() const;
@@ -572,7 +556,7 @@ protected:
friend class ClassDB;
virtual void _validate_property(PropertyInfo &property) const;
- void _disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, bool p_force = false);
+ void _disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force = false);
public: //should be protected, but bug in clang++
static void initialize_class();
@@ -670,7 +654,7 @@ public:
bool has_method(const StringName &p_method) const;
void get_method_list(List<MethodInfo> *p_list) const;
Variant callv(const StringName &p_method, const Array &p_args);
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount);
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper
@@ -716,9 +700,13 @@ public:
int get_persistent_signal_connection_count() const;
void get_signals_connected_to_this(List<Connection> *p_connections) const;
- Error connect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
- void disconnect(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method);
- bool is_connected(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const;
+ Error connect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
+ void disconnect_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method);
+ bool is_connected_compat(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const;
+
+ Error connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
+ void disconnect(const StringName &p_signal, const Callable &p_callable);
+ bool is_connected(const StringName &p_signal, const Callable &p_callable) const;
void call_deferred(const StringName &p_method, VARIANT_ARG_LIST);
void set_deferred(const StringName &p_property, const Variant &p_value);
diff --git a/core/object_id.h b/core/object_id.h
index 6ab1a3031a..63b0c27af8 100644
--- a/core/object_id.h
+++ b/core/object_id.h
@@ -1,3 +1,33 @@
+/*************************************************************************/
+/* object_id.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 OBJECT_ID_H
#define OBJECT_ID_H
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index f65fc00077..642c86be2f 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -66,6 +66,11 @@ int DirAccess::get_current_drive() {
return 0;
}
+bool DirAccess::drives_are_shortcuts() {
+
+ return false;
+}
+
static Error _erase_recursive(DirAccess *da) {
List<String> dirs;
diff --git a/core/os/dir_access.h b/core/os/dir_access.h
index 55a6d53f72..aac6c67f0a 100644
--- a/core/os/dir_access.h
+++ b/core/os/dir_access.h
@@ -76,9 +76,10 @@ public:
virtual int get_drive_count() = 0;
virtual String get_drive(int p_drive) = 0;
virtual int get_current_drive();
+ virtual bool drives_are_shortcuts();
virtual Error change_dir(String p_dir) = 0; ///< can be relative or absolute, return false on success
- virtual String get_current_dir() = 0; ///< return current dir location
+ virtual String get_current_dir(bool p_include_drive = true) = 0; ///< return current dir location
virtual Error make_dir(String p_dir) = 0;
virtual Error make_dir_recursive(String p_dir);
virtual Error erase_contents_recursive(); //super dangerous, use with care!
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 2917351a2f..30cfaa7617 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -408,17 +408,17 @@ int FileAccess::get_buffer(uint8_t *p_dst, int p_length) const {
}
String FileAccess::get_as_utf8_string() const {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
int len = get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = get_buffer(w, len);
ERR_FAIL_COND_V(r != len, String());
w[len] = 0;
String s;
- if (s.parse_utf8((const char *)w.ptr())) {
+ if (s.parse_utf8((const char *)w)) {
return String();
}
return s;
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 6f0392fec9..1768b851df 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -57,7 +57,7 @@ Input::MouseMode Input::get_mouse_mode() const {
void Input::_bind_methods() {
- ClassDB::bind_method(D_METHOD("is_key_pressed", "scancode"), &Input::is_key_pressed);
+ ClassDB::bind_method(D_METHOD("is_key_pressed", "keycode"), &Input::is_key_pressed);
ClassDB::bind_method(D_METHOD("is_mouse_button_pressed", "button"), &Input::is_mouse_button_pressed);
ClassDB::bind_method(D_METHOD("is_joy_button_pressed", "device", "button"), &Input::is_joy_button_pressed);
ClassDB::bind_method(D_METHOD("is_action_pressed", "action"), &Input::is_action_pressed);
diff --git a/core/os/input.h b/core/os/input.h
index 8df3b1c5a9..55e0511080 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -79,7 +79,7 @@ public:
static Input *get_singleton();
- virtual bool is_key_pressed(int p_scancode) const = 0;
+ virtual bool is_key_pressed(int p_keycode) const = 0;
virtual bool is_mouse_button_pressed(int p_button) const = 0;
virtual bool is_joy_button_pressed(int p_device, int p_button) const = 0;
virtual bool is_action_pressed(const StringName &p_action) const = 0;
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 2e863c9c76..204a36bf56 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -237,19 +237,31 @@ bool InputEventKey::is_pressed() const {
return pressed;
}
-void InputEventKey::set_scancode(uint32_t p_scancode) {
+void InputEventKey::set_keycode(uint32_t p_keycode) {
- scancode = p_scancode;
+ keycode = p_keycode;
}
-uint32_t InputEventKey::get_scancode() const {
- return scancode;
+uint32_t InputEventKey::get_keycode() const {
+
+ return keycode;
+}
+
+void InputEventKey::set_physical_keycode(uint32_t p_keycode) {
+
+ physical_keycode = p_keycode;
+}
+
+uint32_t InputEventKey::get_physical_keycode() const {
+
+ return physical_keycode;
}
void InputEventKey::set_unicode(uint32_t p_unicode) {
unicode = p_unicode;
}
+
uint32_t InputEventKey::get_unicode() const {
return unicode;
@@ -259,14 +271,30 @@ void InputEventKey::set_echo(bool p_enable) {
echo = p_enable;
}
+
bool InputEventKey::is_echo() const {
return echo;
}
-uint32_t InputEventKey::get_scancode_with_modifiers() const {
+uint32_t InputEventKey::get_keycode_with_modifiers() const {
- uint32_t sc = scancode;
+ uint32_t sc = keycode;
+ if (get_control())
+ sc |= KEY_MASK_CTRL;
+ if (get_alt())
+ sc |= KEY_MASK_ALT;
+ if (get_shift())
+ sc |= KEY_MASK_SHIFT;
+ if (get_metakey())
+ sc |= KEY_MASK_META;
+
+ return sc;
+}
+
+uint32_t InputEventKey::get_physical_keycode_with_modifiers() const {
+
+ uint32_t sc = physical_keycode;
if (get_control())
sc |= KEY_MASK_CTRL;
if (get_alt())
@@ -281,7 +309,7 @@ uint32_t InputEventKey::get_scancode_with_modifiers() const {
String InputEventKey::as_text() const {
- String kc = keycode_get_string(scancode);
+ String kc = keycode_get_string(keycode);
if (kc == String())
return kc;
@@ -306,10 +334,18 @@ bool InputEventKey::action_match(const Ref<InputEvent> &p_event, bool *p_pressed
if (key.is_null())
return false;
- uint32_t code = get_scancode_with_modifiers();
- uint32_t event_code = key->get_scancode_with_modifiers();
+ bool match = false;
+ if (get_keycode() == 0) {
+ uint32_t code = get_physical_keycode_with_modifiers();
+ uint32_t event_code = key->get_physical_keycode_with_modifiers();
- bool match = get_scancode() == key->get_scancode() && (!key->is_pressed() || (code & event_code) == code);
+ match = get_physical_keycode() == key->get_physical_keycode() && (!key->is_pressed() || (code & event_code) == code);
+ } else {
+ uint32_t code = get_keycode_with_modifiers();
+ uint32_t event_code = key->get_keycode_with_modifiers();
+
+ match = get_keycode() == key->get_keycode() && (!key->is_pressed() || (code & event_code) == code);
+ }
if (match) {
if (p_pressed != NULL)
*p_pressed = key->is_pressed();
@@ -325,8 +361,8 @@ bool InputEventKey::shortcut_match(const Ref<InputEvent> &p_event) const {
if (key.is_null())
return false;
- uint32_t code = get_scancode_with_modifiers();
- uint32_t event_code = key->get_scancode_with_modifiers();
+ uint32_t code = get_keycode_with_modifiers();
+ uint32_t event_code = key->get_keycode_with_modifiers();
return code == event_code;
}
@@ -335,26 +371,32 @@ void InputEventKey::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventKey::set_pressed);
- ClassDB::bind_method(D_METHOD("set_scancode", "scancode"), &InputEventKey::set_scancode);
- ClassDB::bind_method(D_METHOD("get_scancode"), &InputEventKey::get_scancode);
+ ClassDB::bind_method(D_METHOD("set_keycode", "keycode"), &InputEventKey::set_keycode);
+ ClassDB::bind_method(D_METHOD("get_keycode"), &InputEventKey::get_keycode);
+
+ ClassDB::bind_method(D_METHOD("set_physical_keycode", "physical_keycode"), &InputEventKey::set_physical_keycode);
+ ClassDB::bind_method(D_METHOD("get_physical_keycode"), &InputEventKey::get_physical_keycode);
ClassDB::bind_method(D_METHOD("set_unicode", "unicode"), &InputEventKey::set_unicode);
ClassDB::bind_method(D_METHOD("get_unicode"), &InputEventKey::get_unicode);
ClassDB::bind_method(D_METHOD("set_echo", "echo"), &InputEventKey::set_echo);
- ClassDB::bind_method(D_METHOD("get_scancode_with_modifiers"), &InputEventKey::get_scancode_with_modifiers);
+ ClassDB::bind_method(D_METHOD("get_keycode_with_modifiers"), &InputEventKey::get_keycode_with_modifiers);
+ ClassDB::bind_method(D_METHOD("get_physical_keycode_with_modifiers"), &InputEventKey::get_physical_keycode_with_modifiers);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "scancode"), "set_scancode", "get_scancode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "keycode"), "set_keycode", "get_keycode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "physical_keycode"), "set_physical_keycode", "get_physical_keycode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "unicode"), "set_unicode", "get_unicode");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "echo"), "set_echo", "is_echo");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "echo"), "set_echo", "is_echo");
}
InputEventKey::InputEventKey() {
pressed = false;
- scancode = 0;
+ keycode = 0;
+ physical_keycode = 0;
unicode = 0; ///unicode
echo = false;
}
@@ -541,7 +583,7 @@ void InputEventMouseButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_doubleclick", "doubleclick"), &InputEventMouseButton::set_doubleclick);
ClassDB::bind_method(D_METHOD("is_doubleclick"), &InputEventMouseButton::is_doubleclick);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor");
ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "doubleclick"), "set_doubleclick", "is_doubleclick");
@@ -702,7 +744,7 @@ void InputEventMouseMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_speed"), &InputEventMouseMotion::get_speed);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "tilt"), "set_tilt", "get_tilt");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "relative"), "set_relative", "get_relative");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "speed"), "set_speed", "get_speed");
}
@@ -780,7 +822,7 @@ void InputEventJoypadMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_axis_value"), &InputEventJoypadMotion::get_axis_value);
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "axis_value"), "set_axis_value", "get_axis_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "axis_value"), "set_axis_value", "get_axis_value");
}
InputEventJoypadMotion::InputEventJoypadMotion() {
@@ -861,7 +903,7 @@ void InputEventJoypadButton::_bind_methods() {
// ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventJoypadButton::is_pressed);
ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
}
@@ -1098,9 +1140,9 @@ void InputEventAction::_bind_methods() {
// ClassDB::bind_method(D_METHOD("is_action", "name"), &InputEventAction::is_action);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength");
}
InputEventAction::InputEventAction() {
@@ -1162,7 +1204,7 @@ void InputEventMagnifyGesture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMagnifyGesture::set_factor);
ClassDB::bind_method(D_METHOD("get_factor"), &InputEventMagnifyGesture::get_factor);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor");
}
InputEventMagnifyGesture::InputEventMagnifyGesture() {
diff --git a/core/os/input_event.h b/core/os/input_event.h
index c6b04bcfa5..c105fcd1c1 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -256,7 +256,8 @@ class InputEventKey : public InputEventWithModifiers {
bool pressed; /// otherwise release
- uint32_t scancode; ///< check keyboard.h , KeyCode enum, without modifier masks
+ uint32_t keycode; ///< check keyboard.h , KeyCode enum, without modifier masks
+ uint32_t physical_keycode;
uint32_t unicode; ///unicode
bool echo; /// true if this is an echo key
@@ -268,8 +269,11 @@ public:
void set_pressed(bool p_pressed);
virtual bool is_pressed() const;
- void set_scancode(uint32_t p_scancode);
- uint32_t get_scancode() const;
+ void set_keycode(uint32_t p_keycode);
+ uint32_t get_keycode() const;
+
+ void set_physical_keycode(uint32_t p_keycode);
+ uint32_t get_physical_keycode() const;
void set_unicode(uint32_t p_unicode);
uint32_t get_unicode() const;
@@ -277,7 +281,8 @@ public:
void set_echo(bool p_enable);
virtual bool is_echo() const;
- uint32_t get_scancode_with_modifiers() const;
+ uint32_t get_keycode_with_modifiers() const;
+ uint32_t get_physical_keycode_with_modifiers() const;
virtual bool action_match(const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const;
virtual bool shortcut_match(const Ref<InputEvent> &p_event) const;
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 6020c4b219..ab43ce4af7 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -44,9 +44,9 @@ void MainLoop::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::FLOAT, "delta")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::FLOAT, "delta")));
+ BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
BIND_VMETHOD(MethodInfo("_finalize"));
BIND_VMETHOD(MethodInfo("_global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta")));
diff --git a/core/os/memory.h b/core/os/memory.h
index e45f97e0c8..207149b57e 100644
--- a/core/os/memory.h
+++ b/core/os/memory.h
@@ -143,7 +143,7 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") {
if (p_elements == 0)
return 0;
/** overloading operator new[] cannot be done , because it may not return the real allocated address (it may pad the 'element count' before the actual array). Because of that, it must be done by hand. This is the
- same strategy used by std::vector, and the PoolVector class, so it should be safe.*/
+ same strategy used by std::vector, and the Vector class, so it should be safe.*/
size_t len = sizeof(T) * p_elements;
uint64_t *mem = (uint64_t *)Memory::alloc_static(len, true);
diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp
index 3e020a1585..6ebec50ff0 100644
--- a/core/os/midi_driver.cpp
+++ b/core/os/midi_driver.cpp
@@ -121,9 +121,9 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_
id->parse_input_event(event);
}
-PoolStringArray MIDIDriver::get_connected_inputs() {
+PackedStringArray MIDIDriver::get_connected_inputs() {
- PoolStringArray list;
+ PackedStringArray list;
return list;
}
diff --git a/core/os/midi_driver.h b/core/os/midi_driver.h
index 26dbdce151..4f53feb43e 100644
--- a/core/os/midi_driver.h
+++ b/core/os/midi_driver.h
@@ -50,7 +50,7 @@ public:
virtual Error open() = 0;
virtual void close() = 0;
- virtual PoolStringArray get_connected_inputs();
+ virtual PackedStringArray get_connected_inputs();
static void receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_t length);
diff --git a/core/os/mutex.cpp b/core/os/mutex.cpp
index f099b4319a..74c308f646 100644
--- a/core/os/mutex.cpp
+++ b/core/os/mutex.cpp
@@ -30,31 +30,17 @@
#include "mutex.h"
-#include "core/error_macros.h"
-
-#include <stddef.h>
-
-Mutex *(*Mutex::create_func)(bool) = 0;
-
-Mutex *Mutex::create(bool p_recursive) {
-
- ERR_FAIL_COND_V(!create_func, 0);
-
- return create_func(p_recursive);
-}
-
-Mutex::~Mutex() {
-}
-
-Mutex *_global_mutex = NULL;
+static Mutex _global_mutex;
void _global_lock() {
-
- if (_global_mutex)
- _global_mutex->lock();
+ _global_mutex.lock();
}
-void _global_unlock() {
- if (_global_mutex)
- _global_mutex->unlock();
+void _global_unlock() {
+ _global_mutex.unlock();
}
+
+template class MutexImpl<std::recursive_mutex>;
+template class MutexImpl<std::mutex>;
+template class MutexLock<MutexImpl<std::recursive_mutex> >;
+template class MutexLock<MutexImpl<std::mutex> >;
diff --git a/core/os/mutex.h b/core/os/mutex.h
index db82eb64f5..8d7b378d60 100644
--- a/core/os/mutex.h
+++ b/core/os/mutex.h
@@ -32,42 +32,69 @@
#define MUTEX_H
#include "core/error_list.h"
+#include "core/typedefs.h"
-/**
- * @class Mutex
- * @author Juan Linietsky
- * Portable Mutex (thread-safe locking) implementation.
- * Mutexes are always recursive ( they don't self-lock in a single thread ).
- * Mutexes can be used with a Lockp object like this, to avoid having to worry about unlocking:
- * Lockp( mutex );
- */
+#if !defined(NO_THREADS)
-class Mutex {
-protected:
- static Mutex *(*create_func)(bool);
+#include <mutex>
+
+template <class StdMutexT>
+class MutexImpl {
+ mutable StdMutexT mutex;
public:
- virtual void lock() = 0; ///< Lock the mutex, block if locked by someone else
- virtual void unlock() = 0; ///< Unlock the mutex, let other threads continue
- virtual Error try_lock() = 0; ///< Attempt to lock the mutex, OK on success, ERROR means it can't lock.
+ _ALWAYS_INLINE_ void lock() const {
+ mutex.lock();
+ }
- static Mutex *create(bool p_recursive = true); ///< Create a mutex
+ _ALWAYS_INLINE_ void unlock() const {
+ mutex.unlock();
+ }
- virtual ~Mutex();
+ _ALWAYS_INLINE_ Error try_lock() const {
+ return mutex.try_lock() ? OK : ERR_BUSY;
+ }
};
+template <class MutexT>
class MutexLock {
-
- Mutex *mutex;
+ const MutexT &mutex;
public:
- MutexLock(Mutex *p_mutex) {
- mutex = p_mutex;
- if (mutex) mutex->lock();
+ _ALWAYS_INLINE_ explicit MutexLock(const MutexT &p_mutex) :
+ mutex(p_mutex) {
+ mutex.lock();
}
- ~MutexLock() {
- if (mutex) mutex->unlock();
+
+ _ALWAYS_INLINE_ ~MutexLock() {
+ mutex.unlock();
}
};
+#else
+
+template <class StdMutexType>
+class MutexImpl {
+public:
+ _ALWAYS_INLINE_ void lock() const {}
+ _ALWAYS_INLINE_ void unlock() const {}
+ _ALWAYS_INLINE_ Error try_lock() const { return OK; }
+};
+
+template <class MutexT>
+class MutexLock {
+public:
+ explicit MutexLock(const MutexT &p_mutex) {}
+};
+
+#endif // !NO_THREADS
+
+using Mutex = MutexImpl<std::recursive_mutex>; // Recursive, for general use
+using BinaryMutex = MutexImpl<std::mutex>; // Non-recursive, handle with care
+
+extern template class MutexImpl<std::recursive_mutex>;
+extern template class MutexImpl<std::mutex>;
+extern template class MutexLock<MutexImpl<std::recursive_mutex> >;
+extern template class MutexLock<MutexImpl<std::mutex> >;
+
#endif
diff --git a/core/os/os.cpp b/core/os/os.cpp
index d1b6ccab54..9a65d537ac 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -416,10 +416,6 @@ uint64_t OS::get_static_memory_usage() const {
return Memory::get_mem_usage();
}
-uint64_t OS::get_dynamic_memory_usage() const {
-
- return MemoryPool::total_memory;
-}
uint64_t OS::get_static_memory_peak_usage() const {
@@ -712,12 +708,12 @@ List<String> OS::get_restart_on_exit_arguments() const {
return restart_commandline;
}
-PoolStringArray OS::get_connected_midi_inputs() {
+PackedStringArray OS::get_connected_midi_inputs() {
if (MIDIDriver::get_singleton())
return MIDIDriver::get_singleton()->get_connected_inputs();
- PoolStringArray list;
+ PackedStringArray list;
return list;
}
diff --git a/core/os/os.h b/core/os/os.h
index e4661e4583..1d3619b1e6 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -41,8 +41,6 @@
#include <stdarg.h>
-class Mutex;
-
class OS {
static OS *singleton;
@@ -185,7 +183,7 @@ public:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
- virtual PoolStringArray get_connected_midi_inputs();
+ virtual PackedStringArray get_connected_midi_inputs();
virtual void open_midi_inputs();
virtual void close_midi_inputs();
@@ -390,7 +388,6 @@ public:
virtual uint64_t get_static_memory_usage() const;
virtual uint64_t get_static_memory_peak_usage() const;
- virtual uint64_t get_dynamic_memory_usage() const;
virtual uint64_t get_free_static_memory() const;
RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }
diff --git a/core/os/semaphore.cpp b/core/os/semaphore.cpp
index 2c20f234d0..93f1e2dff4 100644
--- a/core/os/semaphore.cpp
+++ b/core/os/semaphore.cpp
@@ -29,17 +29,3 @@
/*************************************************************************/
#include "semaphore.h"
-
-#include "core/error_macros.h"
-
-SemaphoreOld *(*SemaphoreOld::create_func)() = 0;
-
-SemaphoreOld *SemaphoreOld::create() {
-
- ERR_FAIL_COND_V(!create_func, 0);
-
- return create_func();
-}
-
-SemaphoreOld::~SemaphoreOld() {
-}
diff --git a/core/os/semaphore.h b/core/os/semaphore.h
index f16a15a6db..6f194d4887 100644
--- a/core/os/semaphore.h
+++ b/core/os/semaphore.h
@@ -34,30 +34,32 @@
#include "core/error_list.h"
#include "core/typedefs.h"
+#if !defined(NO_THREADS)
+
#include <condition_variable>
#include <mutex>
class Semaphore {
private:
- std::mutex mutex_;
- std::condition_variable condition_;
- unsigned long count_ = 0; // Initialized as locked.
+ mutable std::mutex mutex_;
+ mutable std::condition_variable condition_;
+ mutable unsigned long count_ = 0; // Initialized as locked.
public:
- _ALWAYS_INLINE_ void post() {
+ _ALWAYS_INLINE_ void post() const {
std::lock_guard<decltype(mutex_)> lock(mutex_);
++count_;
condition_.notify_one();
}
- _ALWAYS_INLINE_ void wait() {
+ _ALWAYS_INLINE_ void wait() const {
std::unique_lock<decltype(mutex_)> lock(mutex_);
while (!count_) // Handle spurious wake-ups.
condition_.wait(lock);
--count_;
}
- _ALWAYS_INLINE_ bool try_wait() {
+ _ALWAYS_INLINE_ bool try_wait() const {
std::lock_guard<decltype(mutex_)> lock(mutex_);
if (count_) {
--count_;
@@ -67,18 +69,15 @@ public:
}
};
-class SemaphoreOld {
-protected:
- static SemaphoreOld *(*create_func)();
+#else
+class Semaphore {
public:
- virtual Error wait() = 0; ///< wait until semaphore has positive value, then decrement and pass
- virtual Error post() = 0; ///< unlock the semaphore, incrementing the value
- virtual int get() const = 0; ///< get semaphore value
-
- static SemaphoreOld *create(); ///< Create a mutex
-
- virtual ~SemaphoreOld();
+ _ALWAYS_INLINE_ void post() const {}
+ _ALWAYS_INLINE_ void wait() const {}
+ _ALWAYS_INLINE_ bool try_wait() const { return true; }
};
#endif
+
+#endif
diff --git a/core/os/thread_dummy.cpp b/core/os/thread_dummy.cpp
index 916aeeda30..9dcddcae11 100644
--- a/core/os/thread_dummy.cpp
+++ b/core/os/thread_dummy.cpp
@@ -40,22 +40,6 @@ void ThreadDummy::make_default() {
Thread::create_func = &ThreadDummy::create;
};
-Mutex *MutexDummy::create(bool p_recursive) {
- return memnew(MutexDummy);
-};
-
-void MutexDummy::make_default() {
- Mutex::create_func = &MutexDummy::create;
-};
-
-SemaphoreOld *SemaphoreDummy::create() {
- return memnew(SemaphoreDummy);
-};
-
-void SemaphoreDummy::make_default() {
- SemaphoreOld::create_func = &SemaphoreDummy::create;
-};
-
RWLock *RWLockDummy::create() {
return memnew(RWLockDummy);
};
diff --git a/core/os/thread_dummy.h b/core/os/thread_dummy.h
index 9329cdaa32..da8188f983 100644
--- a/core/os/thread_dummy.h
+++ b/core/os/thread_dummy.h
@@ -31,7 +31,6 @@
#ifndef THREAD_DUMMY_H
#define THREAD_DUMMY_H
-#include "core/os/mutex.h"
#include "core/os/rw_lock.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"
@@ -46,30 +45,6 @@ public:
static void make_default();
};
-class MutexDummy : public Mutex {
-
- static Mutex *create(bool p_recursive);
-
-public:
- virtual void lock(){};
- virtual void unlock(){};
- virtual Error try_lock() { return OK; };
-
- static void make_default();
-};
-
-class SemaphoreDummy : public SemaphoreOld {
-
- static SemaphoreOld *create();
-
-public:
- virtual Error wait() { return OK; };
- virtual Error post() { return OK; };
- virtual int get() const { return 0; }; ///< get semaphore value
-
- static void make_default();
-};
-
class RWLockDummy : public RWLock {
static RWLock *create();
diff --git a/core/os/thread_safe.h b/core/os/thread_safe.h
index a4238a9225..0221edf491 100644
--- a/core/os/thread_safe.h
+++ b/core/os/thread_safe.h
@@ -33,50 +33,9 @@
#include "core/os/mutex.h"
-class ThreadSafe {
-
- Mutex *mutex;
-
-public:
- inline void lock() const {
- if (mutex) mutex->lock();
- }
- inline void unlock() const {
- if (mutex) mutex->unlock();
- }
-
- ThreadSafe();
- ~ThreadSafe();
-};
-
-class ThreadSafeMethod {
-
- const ThreadSafe *_ts;
-
-public:
- ThreadSafeMethod(const ThreadSafe *p_ts) {
-
- _ts = p_ts;
- _ts->lock();
- }
-
- ~ThreadSafeMethod() { _ts->unlock(); }
-};
-
-#ifndef NO_THREADS
-
-#define _THREAD_SAFE_CLASS_ ThreadSafe __thread__safe__;
-#define _THREAD_SAFE_METHOD_ ThreadSafeMethod __thread_safe_method__(&__thread__safe__);
-#define _THREAD_SAFE_LOCK_ __thread__safe__.lock();
-#define _THREAD_SAFE_UNLOCK_ __thread__safe__.unlock();
-
-#else
-
-#define _THREAD_SAFE_CLASS_
-#define _THREAD_SAFE_METHOD_
-#define _THREAD_SAFE_LOCK_
-#define _THREAD_SAFE_UNLOCK_
-
-#endif
+#define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
+#define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);
+#define _THREAD_SAFE_LOCK_ _thread_safe_.lock();
+#define _THREAD_SAFE_UNLOCK_ _thread_safe_.unlock();
#endif
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index f8f51c4c75..b82a366ef2 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -80,20 +80,20 @@ Variant PackedDataContainer::_iter_get_ofs(const Variant &p_iter, uint32_t p_off
if (pos < 0 || pos >= size)
return Variant();
- PoolVector<uint8_t>::Read rd = data.read();
+ const uint8_t *rd = data.ptr();
const uint8_t *r = &rd[p_offset];
uint32_t type = decode_uint32(r);
bool err = false;
if (type == TYPE_ARRAY) {
- uint32_t vpos = decode_uint32(rd.ptr() + p_offset + 8 + pos * 4);
- return _get_at_ofs(vpos, rd.ptr(), err);
+ uint32_t vpos = decode_uint32(rd + p_offset + 8 + pos * 4);
+ return _get_at_ofs(vpos, rd, err);
} else if (type == TYPE_DICT) {
- uint32_t vpos = decode_uint32(rd.ptr() + p_offset + 8 + pos * 12 + 4);
- return _get_at_ofs(vpos, rd.ptr(), err);
+ uint32_t vpos = decode_uint32(rd + p_offset + 8 + pos * 12 + 4);
+ return _get_at_ofs(vpos, rd, err);
} else {
ERR_FAIL_V(Variant());
}
@@ -127,7 +127,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
- PoolVector<uint8_t>::Read rd = data.read();
+ const uint8_t *rd = data.ptr();
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);
@@ -136,8 +136,8 @@ uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
int PackedDataContainer::_size(uint32_t p_ofs) const {
- PoolVector<uint8_t>::Read rd = data.read();
- ERR_FAIL_COND_V(!rd.ptr(), 0);
+ const uint8_t *rd = data.ptr();
+ ERR_FAIL_COND_V(!rd, 0);
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);
@@ -157,7 +157,7 @@ int PackedDataContainer::_size(uint32_t p_ofs) const {
Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, bool &err) const {
- PoolVector<uint8_t>::Read rd = data.read();
+ const uint8_t *rd = data.ptr();
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);
@@ -172,7 +172,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b
return Variant();
}
uint32_t ofs = decode_uint32(r + 8 + 4 * idx);
- return _get_at_ofs(ofs, rd.ptr(), err);
+ return _get_at_ofs(ofs, rd, err);
} else {
err = true;
@@ -188,12 +188,12 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b
for (uint32_t i = 0; i < len; i++) {
uint32_t khash = decode_uint32(r + 8 + i * 12 + 0);
if (khash == hash) {
- Variant key = _get_at_ofs(decode_uint32(r + 8 + i * 12 + 4), rd.ptr(), err);
+ Variant key = _get_at_ofs(decode_uint32(r + 8 + i * 12 + 4), rd, err);
if (err)
return Variant();
if (key == p_key) {
//key matches, return value
- return _get_at_ofs(decode_uint32(r + 8 + i * 12 + 8), rd.ptr(), err);
+ return _get_at_ofs(decode_uint32(r + 8 + i * 12 + 8), rd, err);
}
found = true;
} else {
@@ -225,12 +225,12 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
string_cache[s] = tmpdata.size();
- FALLTHROUGH;
- };
+ [[fallthrough]];
+ }
case Variant::NIL:
case Variant::BOOL:
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::VECTOR2:
case Variant::RECT2:
case Variant::VECTOR3:
@@ -240,13 +240,16 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
case Variant::AABB:
case Variant::BASIS:
case Variant::TRANSFORM:
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR2_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
+ case Variant::STRING_NAME:
case Variant::NODE_PATH: {
uint32_t pos = tmpdata.size();
@@ -335,19 +338,19 @@ Error PackedDataContainer::pack(const Variant &p_data) {
_pack(p_data, tmpdata, string_cache);
datalen = tmpdata.size();
data.resize(tmpdata.size());
- PoolVector<uint8_t>::Write w = data.write();
- copymem(w.ptr(), tmpdata.ptr(), tmpdata.size());
+ uint8_t *w = data.ptrw();
+ copymem(w, tmpdata.ptr(), tmpdata.size());
return OK;
}
-void PackedDataContainer::_set_data(const PoolVector<uint8_t> &p_data) {
+void PackedDataContainer::_set_data(const Vector<uint8_t> &p_data) {
data = p_data;
datalen = data.size();
}
-PoolVector<uint8_t> PackedDataContainer::_get_data() const {
+Vector<uint8_t> PackedDataContainer::_get_data() const {
return data;
}
@@ -375,7 +378,7 @@ void PackedDataContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("pack", "value"), &PackedDataContainer::pack);
ClassDB::bind_method(D_METHOD("size"), &PackedDataContainer::size);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "__data__"), "_set_data", "_get_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "__data__"), "_set_data", "_get_data");
}
PackedDataContainer::PackedDataContainer() {
diff --git a/core/packed_data_container.h b/core/packed_data_container.h
index b534169077..852fdcd0d3 100644
--- a/core/packed_data_container.h
+++ b/core/packed_data_container.h
@@ -48,7 +48,7 @@ class PackedDataContainer : public Resource {
bool operator<(const DictKey &p_key) const { return hash < p_key.hash; }
};
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int datalen;
uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache);
@@ -68,8 +68,8 @@ class PackedDataContainer : public Resource {
int _size(uint32_t p_ofs) const;
protected:
- void _set_data(const PoolVector<uint8_t> &p_data);
- PoolVector<uint8_t> _get_data() const;
+ void _set_data(const Vector<uint8_t> &p_data);
+ Vector<uint8_t> _get_data() const;
static void _bind_methods();
public:
diff --git a/core/pool_vector.h b/core/pool_vector.h
deleted file mode 100644
index 01c40a237d..0000000000
--- a/core/pool_vector.h
+++ /dev/null
@@ -1,648 +0,0 @@
-/*************************************************************************/
-/* pool_vector.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 POOL_VECTOR_H
-#define POOL_VECTOR_H
-
-#include "core/os/copymem.h"
-#include "core/os/memory.h"
-#include "core/os/rw_lock.h"
-#include "core/pool_allocator.h"
-#include "core/safe_refcount.h"
-#include "core/ustring.h"
-
-struct MemoryPool {
-
- //avoid accessing these directly, must be public for template access
-
- static PoolAllocator *memory_pool;
- static uint8_t *pool_memory;
- static size_t *pool_size;
-
- struct Alloc {
-
- SafeRefCount refcount;
- uint32_t lock;
- void *mem;
- PoolAllocator::ID pool_id;
- size_t size;
-
- Alloc *free_list;
-
- Alloc() :
- lock(0),
- mem(NULL),
- pool_id(POOL_ALLOCATOR_INVALID_ID),
- size(0),
- free_list(NULL) {
- }
- };
-
- static Alloc *allocs;
- static Alloc *free_list;
- static uint32_t alloc_count;
- static uint32_t allocs_used;
- static Mutex *alloc_mutex;
- static size_t total_memory;
- static size_t max_memory;
-
- static void setup(uint32_t p_max_allocs = (1 << 16));
- static void cleanup();
-};
-
-template <class T>
-class PoolVector {
-
- MemoryPool::Alloc *alloc;
-
- void _copy_on_write() {
-
- if (!alloc)
- return;
-
- // ERR_FAIL_COND(alloc->lock>0); should not be illegal to lock this for copy on write, as it's a copy on write after all
-
- // Refcount should not be zero, otherwise it's a misuse of COW
- if (alloc->refcount.get() == 1)
- return; //nothing to do
-
- //must allocate something
-
- MemoryPool::alloc_mutex->lock();
- if (MemoryPool::allocs_used == MemoryPool::alloc_count) {
- MemoryPool::alloc_mutex->unlock();
- ERR_FAIL_MSG("All memory pool allocations are in use, can't COW.");
- }
-
- MemoryPool::Alloc *old_alloc = alloc;
-
- //take one from the free list
- alloc = MemoryPool::free_list;
- MemoryPool::free_list = alloc->free_list;
- //increment the used counter
- MemoryPool::allocs_used++;
-
- //copy the alloc data
- alloc->size = old_alloc->size;
- alloc->refcount.init();
- alloc->pool_id = POOL_ALLOCATOR_INVALID_ID;
- alloc->lock = 0;
-
-#ifdef DEBUG_ENABLED
- MemoryPool::total_memory += alloc->size;
- if (MemoryPool::total_memory > MemoryPool::max_memory) {
- MemoryPool::max_memory = MemoryPool::total_memory;
- }
-#endif
-
- MemoryPool::alloc_mutex->unlock();
-
- if (MemoryPool::memory_pool) {
-
- } else {
- alloc->mem = memalloc(alloc->size);
- }
-
- {
- Write w;
- w._ref(alloc);
- Read r;
- r._ref(old_alloc);
-
- int cur_elements = alloc->size / sizeof(T);
- T *dst = (T *)w.ptr();
- const T *src = (const T *)r.ptr();
- for (int i = 0; i < cur_elements; i++) {
- memnew_placement(&dst[i], T(src[i]));
- }
- }
-
- if (old_alloc->refcount.unref()) {
- //this should never happen but..
-
-#ifdef DEBUG_ENABLED
- MemoryPool::alloc_mutex->lock();
- MemoryPool::total_memory -= old_alloc->size;
- MemoryPool::alloc_mutex->unlock();
-#endif
-
- {
- Write w;
- w._ref(old_alloc);
-
- int cur_elements = old_alloc->size / sizeof(T);
- T *elems = (T *)w.ptr();
- for (int i = 0; i < cur_elements; i++) {
- elems[i].~T();
- }
- }
-
- if (MemoryPool::memory_pool) {
- //resize memory pool
- //if none, create
- //if some resize
- } else {
-
- memfree(old_alloc->mem);
- old_alloc->mem = NULL;
- old_alloc->size = 0;
-
- MemoryPool::alloc_mutex->lock();
- old_alloc->free_list = MemoryPool::free_list;
- MemoryPool::free_list = old_alloc;
- MemoryPool::allocs_used--;
- MemoryPool::alloc_mutex->unlock();
- }
- }
- }
-
- void _reference(const PoolVector &p_pool_vector) {
-
- if (alloc == p_pool_vector.alloc)
- return;
-
- _unreference();
-
- if (!p_pool_vector.alloc) {
- return;
- }
-
- if (p_pool_vector.alloc->refcount.ref()) {
- alloc = p_pool_vector.alloc;
- }
- }
-
- void _unreference() {
-
- if (!alloc)
- return;
-
- if (!alloc->refcount.unref()) {
- alloc = NULL;
- return;
- }
-
- //must be disposed!
-
- {
- int cur_elements = alloc->size / sizeof(T);
-
- // Don't use write() here because it could otherwise provoke COW,
- // which is not desirable here because we are destroying the last reference anyways
- Write w;
- // Reference to still prevent other threads from touching the alloc
- w._ref(alloc);
-
- for (int i = 0; i < cur_elements; i++) {
-
- w[i].~T();
- }
- }
-
-#ifdef DEBUG_ENABLED
- MemoryPool::alloc_mutex->lock();
- MemoryPool::total_memory -= alloc->size;
- MemoryPool::alloc_mutex->unlock();
-#endif
-
- if (MemoryPool::memory_pool) {
- //resize memory pool
- //if none, create
- //if some resize
- } else {
-
- memfree(alloc->mem);
- alloc->mem = NULL;
- alloc->size = 0;
-
- MemoryPool::alloc_mutex->lock();
- alloc->free_list = MemoryPool::free_list;
- MemoryPool::free_list = alloc;
- MemoryPool::allocs_used--;
- MemoryPool::alloc_mutex->unlock();
- }
-
- alloc = NULL;
- }
-
-public:
- class Access {
- friend class PoolVector;
-
- protected:
- MemoryPool::Alloc *alloc;
- T *mem;
-
- _FORCE_INLINE_ void _ref(MemoryPool::Alloc *p_alloc) {
- alloc = p_alloc;
- if (alloc) {
- if (atomic_increment(&alloc->lock) == 1) {
- if (MemoryPool::memory_pool) {
- //lock it and get mem
- }
- }
-
- mem = (T *)alloc->mem;
- }
- }
-
- _FORCE_INLINE_ void _unref() {
-
- if (alloc) {
- if (atomic_decrement(&alloc->lock) == 0) {
- if (MemoryPool::memory_pool) {
- //put mem back
- }
- }
-
- mem = NULL;
- alloc = NULL;
- }
- }
-
- Access() {
- alloc = NULL;
- mem = NULL;
- }
-
- public:
- virtual ~Access() {
- _unref();
- }
-
- void release() {
- _unref();
- }
- };
-
- class Read : public Access {
- public:
- _FORCE_INLINE_ const T &operator[](int p_index) const { return this->mem[p_index]; }
- _FORCE_INLINE_ const T *ptr() const { return this->mem; }
-
- void operator=(const Read &p_read) {
- if (this->alloc == p_read.alloc)
- return;
- this->_unref();
- this->_ref(p_read.alloc);
- }
-
- Read(const Read &p_read) {
- this->_ref(p_read.alloc);
- }
-
- Read() {}
- };
-
- class Write : public Access {
- public:
- _FORCE_INLINE_ T &operator[](int p_index) const { return this->mem[p_index]; }
- _FORCE_INLINE_ T *ptr() const { return this->mem; }
-
- void operator=(const Write &p_read) {
- if (this->alloc == p_read.alloc)
- return;
- this->_unref();
- this->_ref(p_read.alloc);
- }
-
- Write(const Write &p_read) {
- this->_ref(p_read.alloc);
- }
-
- Write() {}
- };
-
- Read read() const {
-
- Read r;
- if (alloc) {
- r._ref(alloc);
- }
- return r;
- }
- Write write() {
-
- Write w;
- if (alloc) {
- _copy_on_write(); //make sure there is only one being acessed
- w._ref(alloc);
- }
- return w;
- }
-
- template <class MC>
- void fill_with(const MC &p_mc) {
-
- int c = p_mc.size();
- resize(c);
- Write w = write();
- int idx = 0;
- for (const typename MC::Element *E = p_mc.front(); E; E = E->next()) {
-
- w[idx++] = E->get();
- }
- }
-
- void remove(int p_index) {
-
- int s = size();
- ERR_FAIL_INDEX(p_index, s);
- Write w = write();
- for (int i = p_index; i < s - 1; i++) {
-
- w[i] = w[i + 1];
- };
- w = Write();
- resize(s - 1);
- }
-
- inline int size() const;
- inline bool empty() const;
- T get(int p_index) const;
- void set(int p_index, const T &p_val);
- void push_back(const T &p_val);
- void append(const T &p_val) { push_back(p_val); }
- void append_array(const PoolVector<T> &p_arr) {
- int ds = p_arr.size();
- if (ds == 0)
- return;
- int bs = size();
- resize(bs + ds);
- Write w = write();
- Read r = p_arr.read();
- for (int i = 0; i < ds; i++)
- w[bs + i] = r[i];
- }
-
- PoolVector<T> subarray(int p_from, int p_to) {
-
- if (p_from < 0) {
- p_from = size() + p_from;
- }
- if (p_to < 0) {
- p_to = size() + p_to;
- }
-
- ERR_FAIL_INDEX_V(p_from, size(), PoolVector<T>());
- ERR_FAIL_INDEX_V(p_to, size(), PoolVector<T>());
-
- PoolVector<T> slice;
- int span = 1 + p_to - p_from;
- slice.resize(span);
- Read r = read();
- Write w = slice.write();
- for (int i = 0; i < span; ++i) {
- w[i] = r[p_from + i];
- }
-
- return slice;
- }
-
- Error insert(int p_pos, const T &p_val) {
-
- int s = size();
- ERR_FAIL_INDEX_V(p_pos, s + 1, ERR_INVALID_PARAMETER);
- resize(s + 1);
- {
- Write w = write();
- for (int i = s; i > p_pos; i--)
- w[i] = w[i - 1];
- w[p_pos] = p_val;
- }
-
- return OK;
- }
-
- String join(String delimiter) {
- String rs = "";
- int s = size();
- Read r = read();
- for (int i = 0; i < s; i++) {
- rs += r[i] + delimiter;
- }
- rs.erase(rs.length() - delimiter.length(), delimiter.length());
- return rs;
- }
-
- bool is_locked() const { return alloc && alloc->lock > 0; }
-
- inline T operator[](int p_index) const;
-
- Error resize(int p_size);
-
- void invert();
-
- void operator=(const PoolVector &p_pool_vector) { _reference(p_pool_vector); }
- PoolVector() { alloc = NULL; }
- PoolVector(const PoolVector &p_pool_vector) {
- alloc = NULL;
- _reference(p_pool_vector);
- }
- ~PoolVector() { _unreference(); }
-};
-
-template <class T>
-int PoolVector<T>::size() const {
-
- return alloc ? alloc->size / sizeof(T) : 0;
-}
-
-template <class T>
-bool PoolVector<T>::empty() const {
-
- return alloc ? alloc->size == 0 : true;
-}
-
-template <class T>
-T PoolVector<T>::get(int p_index) const {
-
- return operator[](p_index);
-}
-
-template <class T>
-void PoolVector<T>::set(int p_index, const T &p_val) {
-
- ERR_FAIL_INDEX(p_index, size());
-
- Write w = write();
- w[p_index] = p_val;
-}
-
-template <class T>
-void PoolVector<T>::push_back(const T &p_val) {
-
- resize(size() + 1);
- set(size() - 1, p_val);
-}
-
-template <class T>
-T PoolVector<T>::operator[](int p_index) const {
-
- CRASH_BAD_INDEX(p_index, size());
-
- Read r = read();
- return r[p_index];
-}
-
-template <class T>
-Error PoolVector<T>::resize(int p_size) {
-
- ERR_FAIL_COND_V_MSG(p_size < 0, ERR_INVALID_PARAMETER, "Size of PoolVector cannot be negative.");
-
- if (alloc == NULL) {
-
- if (p_size == 0)
- return OK; //nothing to do here
-
- //must allocate something
- MemoryPool::alloc_mutex->lock();
- if (MemoryPool::allocs_used == MemoryPool::alloc_count) {
- MemoryPool::alloc_mutex->unlock();
- ERR_FAIL_V_MSG(ERR_OUT_OF_MEMORY, "All memory pool allocations are in use.");
- }
-
- //take one from the free list
- alloc = MemoryPool::free_list;
- MemoryPool::free_list = alloc->free_list;
- //increment the used counter
- MemoryPool::allocs_used++;
-
- //cleanup the alloc
- alloc->size = 0;
- alloc->refcount.init();
- alloc->pool_id = POOL_ALLOCATOR_INVALID_ID;
- MemoryPool::alloc_mutex->unlock();
-
- } else {
-
- ERR_FAIL_COND_V_MSG(alloc->lock > 0, ERR_LOCKED, "Can't resize PoolVector if locked."); //can't resize if locked!
- }
-
- size_t new_size = sizeof(T) * p_size;
-
- if (alloc->size == new_size)
- return OK; //nothing to do
-
- if (p_size == 0) {
- _unreference();
- return OK;
- }
-
- _copy_on_write(); // make it unique
-
-#ifdef DEBUG_ENABLED
- MemoryPool::alloc_mutex->lock();
- MemoryPool::total_memory -= alloc->size;
- MemoryPool::total_memory += new_size;
- if (MemoryPool::total_memory > MemoryPool::max_memory) {
- MemoryPool::max_memory = MemoryPool::total_memory;
- }
- MemoryPool::alloc_mutex->unlock();
-#endif
-
- int cur_elements = alloc->size / sizeof(T);
-
- if (p_size > cur_elements) {
-
- if (MemoryPool::memory_pool) {
- //resize memory pool
- //if none, create
- //if some resize
- } else {
-
- if (alloc->size == 0) {
- alloc->mem = memalloc(new_size);
- } else {
- alloc->mem = memrealloc(alloc->mem, new_size);
- }
- }
-
- alloc->size = new_size;
-
- Write w = write();
-
- for (int i = cur_elements; i < p_size; i++) {
-
- memnew_placement(&w[i], T);
- }
-
- } else {
-
- {
- Write w = write();
- for (int i = p_size; i < cur_elements; i++) {
-
- w[i].~T();
- }
- }
-
- if (MemoryPool::memory_pool) {
- //resize memory pool
- //if none, create
- //if some resize
- } else {
-
- if (new_size == 0) {
- memfree(alloc->mem);
- alloc->mem = NULL;
- alloc->size = 0;
-
- MemoryPool::alloc_mutex->lock();
- alloc->free_list = MemoryPool::free_list;
- MemoryPool::free_list = alloc;
- MemoryPool::allocs_used--;
- MemoryPool::alloc_mutex->unlock();
-
- } else {
- alloc->mem = memrealloc(alloc->mem, new_size);
- alloc->size = new_size;
- }
- }
- }
-
- return OK;
-}
-
-template <class T>
-void PoolVector<T>::invert() {
- T temp;
- Write w = write();
- int s = size();
- int half_s = s / 2;
-
- for (int i = 0; i < half_s; i++) {
- temp = w[i];
- w[i] = w[s - i - 1];
- w[s - i - 1] = temp;
- }
-}
-
-#endif // POOL_VECTOR_H
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 59d7e82850..3a21610331 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -1023,14 +1023,14 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("audio/default_bus_layout", "res://default_bus_layout.tres");
custom_prop_info["audio/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/default_bus_layout", PROPERTY_HINT_FILE, "*.tres");
- PoolStringArray extensions = PoolStringArray();
+ PackedStringArray extensions = PackedStringArray();
extensions.push_back("gd");
if (Engine::get_singleton()->has_singleton("GodotSharp"))
extensions.push_back("cs");
extensions.push_back("shader");
GLOBAL_DEF("editor/search_in_file_extensions", extensions);
- custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::POOL_STRING_ARRAY, "editor/search_in_file_extensions");
+ custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/search_in_file_extensions");
GLOBAL_DEF("editor/script_templates_search_path", "res://script_templates");
custom_prop_info["editor/script_templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script_templates_search_path", PROPERTY_HINT_DIR);
@@ -1039,13 +1039,13 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_ENTER);
+ key->set_keycode(KEY_ENTER);
events.push_back(key);
key.instance();
- key->set_scancode(KEY_KP_ENTER);
+ key->set_keycode(KEY_KP_ENTER);
events.push_back(key);
key.instance();
- key->set_scancode(KEY_SPACE);
+ key->set_keycode(KEY_SPACE);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_BUTTON_0);
@@ -1058,7 +1058,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_SPACE);
+ key->set_keycode(KEY_SPACE);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_BUTTON_3);
@@ -1071,7 +1071,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_ESCAPE);
+ key->set_keycode(KEY_ESCAPE);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_BUTTON_1);
@@ -1084,7 +1084,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_TAB);
+ key->set_keycode(KEY_TAB);
events.push_back(key);
action["events"] = events;
GLOBAL_DEF("input/ui_focus_next", action);
@@ -1094,7 +1094,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_TAB);
+ key->set_keycode(KEY_TAB);
key->set_shift(true);
events.push_back(key);
action["events"] = events;
@@ -1105,7 +1105,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_LEFT);
+ key->set_keycode(KEY_LEFT);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_DPAD_LEFT);
@@ -1118,7 +1118,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_RIGHT);
+ key->set_keycode(KEY_RIGHT);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_DPAD_RIGHT);
@@ -1131,7 +1131,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_UP);
+ key->set_keycode(KEY_UP);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_DPAD_UP);
@@ -1144,7 +1144,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_DOWN);
+ key->set_keycode(KEY_DOWN);
events.push_back(key);
joyb.instance();
joyb->set_button_index(JOY_DPAD_DOWN);
@@ -1157,7 +1157,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_PAGEUP);
+ key->set_keycode(KEY_PAGEUP);
events.push_back(key);
action["events"] = events;
GLOBAL_DEF("input/ui_page_up", action);
@@ -1167,7 +1167,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_PAGEDOWN);
+ key->set_keycode(KEY_PAGEDOWN);
events.push_back(key);
action["events"] = events;
GLOBAL_DEF("input/ui_page_down", action);
@@ -1177,7 +1177,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_HOME);
+ key->set_keycode(KEY_HOME);
events.push_back(key);
action["events"] = events;
GLOBAL_DEF("input/ui_home", action);
@@ -1187,7 +1187,7 @@ ProjectSettings::ProjectSettings() {
action["deadzone"] = Variant(0.5f);
events = Array();
key.instance();
- key->set_scancode(KEY_END);
+ key->set_keycode(KEY_END);
events.push_back(key);
action["events"] = events;
GLOBAL_DEF("input/ui_end", action);
@@ -1215,9 +1215,6 @@ ProjectSettings::ProjectSettings() {
Compression::gzip_level = GLOBAL_DEF("compression/formats/gzip/compression_level", Z_DEFAULT_COMPRESSION);
custom_prop_info["compression/formats/gzip/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/gzip/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");
- // Would ideally be defined in an Android-specific file, but then it doesn't appear in the docs
- GLOBAL_DEF("android/modules", "");
-
using_datapack = false;
}
diff --git a/core/reference.h b/core/reference.h
index b01e0035a7..fd42c4e537 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -38,7 +38,6 @@
class Reference : public Object {
GDCLASS(Reference, Object);
- friend class RefBase;
SafeRefCount refcount;
SafeRefCount refcount_init;
@@ -170,9 +169,9 @@ public:
return;
}
- Reference *r = Object::cast_to<Reference>(object);
+ T *r = Object::cast_to<T>(object);
if (r && r->reference()) {
- reference = static_cast<T *>(r);
+ reference = r;
}
}
@@ -226,9 +225,9 @@ public:
return;
}
- Reference *r = Object::cast_to<Reference>(object);
+ T *r = Object::cast_to<T>(object);
if (r && r->reference()) {
- reference = static_cast<T *>(r);
+ reference = r;
} else {
reference = nullptr;
}
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 91d9289563..b0ba8ed194 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -40,12 +40,14 @@
#include "core/func_ref.h"
#include "core/input_map.h"
#include "core/io/config_file.h"
+#include "core/io/dtls_server.h"
#include "core/io/http_client.h"
#include "core/io/image_loader.h"
#include "core/io/marshalls.h"
#include "core/io/multiplayer_api.h"
#include "core/io/networked_multiplayer_peer.h"
#include "core/io/packet_peer.h"
+#include "core/io/packet_peer_dtls.h"
#include "core/io/packet_peer_udp.h"
#include "core/io/pck_packer.h"
#include "core/io/resource_format_binary.h"
@@ -53,6 +55,7 @@
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/translation_loader_po.h"
+#include "core/io/udp_server.h"
#include "core/io/xml_parser.h"
#include "core/math/a_star.h"
#include "core/math/expression.h"
@@ -87,7 +90,7 @@ static IP *ip = NULL;
static _Geometry *_geometry = NULL;
-extern Mutex *_global_mutex;
+extern Mutex _global_mutex;
extern void register_global_constants();
extern void unregister_global_constants();
@@ -96,11 +99,11 @@ extern void unregister_variant_methods();
void register_core_types() {
+ //consistency check
+ static_assert(sizeof(Callable) <= 16);
+
ObjectDB::setup();
ResourceCache::setup();
- MemoryPool::setup();
-
- _global_mutex = Mutex::create();
StringName::setup();
ResourceLoader::initialize();
@@ -155,6 +158,9 @@ void register_core_types() {
ClassDB::register_class<StreamPeerTCP>();
ClassDB::register_class<TCP_Server>();
ClassDB::register_class<PacketPeerUDP>();
+ ClassDB::register_class<UDPServer>();
+ ClassDB::register_custom_instance_class<PacketPeerDTLS>();
+ ClassDB::register_custom_instance_class<DTLSServer>();
// Crypto
ClassDB::register_class<HashingContext>();
@@ -180,8 +186,6 @@ void register_core_types() {
ClassDB::register_class<HTTPClient>();
ClassDB::register_class<TriangleMesh>();
- ClassDB::register_virtual_class<ResourceInteractiveLoader>();
-
ClassDB::register_class<ResourceFormatLoader>();
ClassDB::register_class<ResourceFormatSaver>();
@@ -311,11 +315,4 @@ void unregister_core_types() {
ResourceCache::clear();
CoreStringNames::free();
StringName::cleanup();
-
- if (_global_mutex) {
- memdelete(_global_mutex);
- _global_mutex = NULL; //still needed at a few places
- };
-
- MemoryPool::cleanup();
}
diff --git a/core/resource.cpp b/core/resource.cpp
index 30e09716aa..2afc9e4042 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -423,7 +423,7 @@ void Resource::_bind_methods() {
ADD_GROUP("Resource", "resource_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_path", "get_path");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_name"), "set_name", "get_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "resource_name"), "set_name", "get_name");
BIND_VMETHOD(MethodInfo("_setup_local_to_scene"));
}
diff --git a/core/rid_owner.h b/core/rid_owner.h
index bd01eba17d..5c8c48a4cb 100644
--- a/core/rid_owner.h
+++ b/core/rid_owner.h
@@ -298,7 +298,11 @@ public:
if (description) {
print_error("ERROR: " + itos(alloc_count) + " RID allocations of type '" + description + "' were leaked at exit.");
} else {
+#ifdef NO_SAFE_CAST
+ print_error("ERROR: " + itos(alloc_count) + " RID allocations of type 'unknown' were leaked at exit.");
+#else
print_error("ERROR: " + itos(alloc_count) + " RID allocations of type '" + typeid(T).name() + "' were leaked at exit.");
+#endif
}
for (size_t i = 0; i < max_alloc; i++) {
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
new file mode 100644
index 0000000000..67375da6e2
--- /dev/null
+++ b/core/script_debugger_remote.cpp
@@ -0,0 +1,1143 @@
+/*************************************************************************/
+/* script_debugger_remote.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "script_debugger_remote.h"
+
+#include "core/engine.h"
+#include "core/io/ip.h"
+#include "core/io/marshalls.h"
+#include "core/os/input.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
+#include "servers/visual_server.h"
+
+#define CHECK_SIZE(arr, expected, what) ERR_FAIL_COND_V_MSG((uint32_t)arr.size() < (uint32_t)(expected), false, String("Malformed ") + what + " message from script debugger, message too short. Exptected size: " + itos(expected) + ", actual size: " + itos(arr.size()))
+#define CHECK_END(arr, expected, what) ERR_FAIL_COND_V_MSG((uint32_t)arr.size() > (uint32_t)expected, false, String("Malformed ") + what + " message from script debugger, message too short. Exptected size: " + itos(expected) + ", actual size: " + itos(arr.size()))
+
+Array ScriptDebuggerRemote::ScriptStackDump::serialize() {
+ Array arr;
+ arr.push_back(frames.size() * 3);
+ for (int i = 0; i < frames.size(); i++) {
+ arr.push_back(frames[i].file);
+ arr.push_back(frames[i].line);
+ arr.push_back(frames[i].func);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::ScriptStackDump::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 1, "ScriptStackDump");
+ uint32_t size = p_arr[0];
+ CHECK_SIZE(p_arr, size, "ScriptStackDump");
+ int idx = 1;
+ for (uint32_t i = 0; i < size / 3; i++) {
+ ScriptLanguage::StackInfo sf;
+ sf.file = p_arr[idx];
+ sf.line = p_arr[idx + 1];
+ sf.func = p_arr[idx + 2];
+ frames.push_back(sf);
+ idx += 3;
+ }
+ CHECK_END(p_arr, idx, "ScriptStackDump");
+ return true;
+}
+
+Array ScriptDebuggerRemote::ScriptStackVariable::serialize(int max_size) {
+ Array arr;
+ arr.push_back(name);
+ arr.push_back(type);
+
+ Variant var = value;
+ if (value.get_type() == Variant::OBJECT && value.get_validated_object() == nullptr) {
+ var = Variant();
+ }
+
+ int len = 0;
+ Error err = encode_variant(var, NULL, len, true);
+ if (err != OK)
+ ERR_PRINT("Failed to encode variant.");
+
+ if (len > max_size) {
+ arr.push_back(Variant());
+ } else {
+ arr.push_back(var);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::ScriptStackVariable::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 3, "ScriptStackVariable");
+ name = p_arr[0];
+ type = p_arr[1];
+ value = p_arr[2];
+ CHECK_END(p_arr, 3, "ScriptStackVariable");
+ return true;
+}
+
+Array ScriptDebuggerRemote::OutputError::serialize() {
+ Array arr;
+ arr.push_back(hr);
+ arr.push_back(min);
+ arr.push_back(sec);
+ arr.push_back(msec);
+ arr.push_back(source_file);
+ arr.push_back(source_func);
+ arr.push_back(source_line);
+ arr.push_back(error);
+ arr.push_back(error_descr);
+ arr.push_back(warning);
+ unsigned int size = callstack.size();
+ const ScriptLanguage::StackInfo *r = callstack.ptr();
+ arr.push_back(size * 3);
+ for (int i = 0; i < callstack.size(); i++) {
+ arr.push_back(r[i].file);
+ arr.push_back(r[i].func);
+ arr.push_back(r[i].line);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::OutputError::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 11, "OutputError");
+ hr = p_arr[0];
+ min = p_arr[1];
+ sec = p_arr[2];
+ msec = p_arr[3];
+ source_file = p_arr[4];
+ source_func = p_arr[5];
+ source_line = p_arr[6];
+ error = p_arr[7];
+ error_descr = p_arr[8];
+ warning = p_arr[9];
+ unsigned int stack_size = p_arr[10];
+ CHECK_SIZE(p_arr, stack_size, "OutputError");
+ int idx = 11;
+ callstack.resize(stack_size / 3);
+ ScriptLanguage::StackInfo *w = callstack.ptrw();
+ for (unsigned int i = 0; i < stack_size / 3; i++) {
+ w[i].file = p_arr[idx];
+ w[i].func = p_arr[idx + 1];
+ w[i].line = p_arr[idx + 2];
+ idx += 3;
+ }
+ CHECK_END(p_arr, idx, "OutputError");
+ return true;
+}
+
+Array ScriptDebuggerRemote::ResourceUsage::serialize() {
+ infos.sort();
+
+ Array arr;
+ arr.push_back(infos.size() * 4);
+ for (List<ResourceInfo>::Element *E = infos.front(); E; E = E->next()) {
+ arr.push_back(E->get().path);
+ arr.push_back(E->get().format);
+ arr.push_back(E->get().type);
+ arr.push_back(E->get().vram);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::ResourceUsage::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 1, "ResourceUsage");
+ uint32_t size = p_arr[0];
+ CHECK_SIZE(p_arr, size, "ResourceUsage");
+ int idx = 1;
+ for (uint32_t i = 0; i < size / 4; i++) {
+ ResourceInfo info;
+ info.path = p_arr[idx];
+ info.format = p_arr[idx + 1];
+ info.type = p_arr[idx + 2];
+ info.vram = p_arr[idx + 3];
+ infos.push_back(info);
+ }
+ CHECK_END(p_arr, idx, "ResourceUsage");
+ return true;
+}
+
+Array ScriptDebuggerRemote::ProfilerSignature::serialize() {
+ Array arr;
+ arr.push_back(name);
+ arr.push_back(id);
+ return arr;
+}
+
+bool ScriptDebuggerRemote::ProfilerSignature::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 2, "ProfilerSignature");
+ name = p_arr[0];
+ id = p_arr[1];
+ CHECK_END(p_arr, 2, "ProfilerSignature");
+ return true;
+}
+
+Array ScriptDebuggerRemote::ProfilerFrame::serialize() {
+ Array arr;
+ arr.push_back(frame_number);
+ arr.push_back(frame_time);
+ arr.push_back(idle_time);
+ arr.push_back(physics_time);
+ arr.push_back(physics_frame_time);
+ arr.push_back(USEC_TO_SEC(script_time));
+
+ arr.push_back(frames_data.size());
+ arr.push_back(frame_functions.size() * 4);
+
+ // Servers profiling info.
+ for (int i = 0; i < frames_data.size(); i++) {
+ arr.push_back(frames_data[i].name); // Type (physics/process/audio/...)
+ arr.push_back(frames_data[i].data.size());
+ for (int j = 0; j < frames_data[i].data.size() / 2; j++) {
+ arr.push_back(frames_data[i].data[2 * j]); // NAME
+ arr.push_back(frames_data[i].data[2 * j + 1]); // TIME
+ }
+ }
+ for (int i = 0; i < frame_functions.size(); i++) {
+ arr.push_back(frame_functions[i].sig_id);
+ arr.push_back(frame_functions[i].call_count);
+ arr.push_back(frame_functions[i].self_time);
+ arr.push_back(frame_functions[i].total_time);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::ProfilerFrame::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 8, "ProfilerFrame");
+ frame_number = p_arr[0];
+ frame_time = p_arr[1];
+ idle_time = p_arr[2];
+ physics_time = p_arr[3];
+ physics_frame_time = p_arr[4];
+ script_time = p_arr[5];
+ uint32_t frame_data_size = p_arr[6];
+ int frame_func_size = p_arr[7];
+ int idx = 8;
+ while (frame_data_size) {
+ CHECK_SIZE(p_arr, idx + 2, "ProfilerFrame");
+ frame_data_size--;
+ FrameData fd;
+ fd.name = p_arr[idx];
+ int sub_data_size = p_arr[idx + 1];
+ idx += 2;
+ CHECK_SIZE(p_arr, idx + sub_data_size, "ProfilerFrame");
+ for (int j = 0; j < sub_data_size / 2; j++) {
+ fd.data.push_back(p_arr[idx]); // NAME
+ fd.data.push_back(p_arr[idx + 1]); // TIME
+ idx += 2;
+ }
+ frames_data.push_back(fd);
+ }
+ CHECK_SIZE(p_arr, idx + frame_func_size, "ProfilerFrame");
+ for (int i = 0; i < frame_func_size / 4; i++) {
+ FrameFunction ff;
+ ff.sig_id = p_arr[idx];
+ ff.call_count = p_arr[idx + 1];
+ ff.self_time = p_arr[idx + 2];
+ ff.total_time = p_arr[idx + 3];
+ frame_functions.push_back(ff);
+ idx += 4;
+ }
+ CHECK_END(p_arr, idx, "ProfilerFrame");
+ return true;
+}
+
+Array ScriptDebuggerRemote::NetworkProfilerFrame::serialize() {
+ Array arr;
+ arr.push_back(infos.size() * 6);
+ for (int i = 0; i < infos.size(); ++i) {
+ arr.push_back(uint64_t(infos[i].node));
+ arr.push_back(infos[i].node_path);
+ arr.push_back(infos[i].incoming_rpc);
+ arr.push_back(infos[i].incoming_rset);
+ arr.push_back(infos[i].outgoing_rpc);
+ arr.push_back(infos[i].outgoing_rset);
+ }
+ return arr;
+}
+
+bool ScriptDebuggerRemote::NetworkProfilerFrame::deserialize(const Array &p_arr) {
+ CHECK_SIZE(p_arr, 1, "NetworkProfilerFrame");
+ uint32_t size = p_arr[0];
+ CHECK_SIZE(p_arr, size, "NetworkProfilerFrame");
+ infos.resize(size);
+ int idx = 1;
+ for (uint32_t i = 0; i < size / 6; ++i) {
+ infos.write[i].node = uint64_t(p_arr[idx]);
+ infos.write[i].node_path = p_arr[idx + 1];
+ infos.write[i].incoming_rpc = p_arr[idx + 2];
+ infos.write[i].incoming_rset = p_arr[idx + 3];
+ infos.write[i].outgoing_rpc = p_arr[idx + 4];
+ infos.write[i].outgoing_rset = p_arr[idx + 5];
+ }
+ CHECK_END(p_arr, idx, "NetworkProfilerFrame");
+ return true;
+}
+
+void ScriptDebuggerRemote::_put_msg(String p_message, Array p_data) {
+ Array msg;
+ msg.push_back(p_message);
+ msg.push_back(p_data);
+ packet_peer_stream->put_var(msg);
+}
+
+bool ScriptDebuggerRemote::is_peer_connected() {
+ return tcp_client->is_connected_to_host() && tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED;
+}
+
+void ScriptDebuggerRemote::_send_video_memory() {
+
+ ResourceUsage usage;
+ if (resource_usage_func)
+ resource_usage_func(&usage);
+
+ _put_msg("message:video_mem", usage.serialize());
+}
+
+Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_port) {
+
+ IP_Address ip;
+ if (p_host.is_valid_ip_address())
+ ip = p_host;
+ else
+ ip = IP::get_singleton()->resolve_hostname(p_host);
+
+ int port = p_port;
+
+ const int tries = 6;
+ int waits[tries] = { 1, 10, 100, 1000, 1000, 1000 };
+
+ tcp_client->connect_to_host(ip, port);
+
+ for (int i = 0; i < tries; i++) {
+
+ if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
+ print_verbose("Remote Debugger: Connected!");
+ break;
+ } else {
+
+ const int ms = waits[i];
+ OS::get_singleton()->delay_usec(ms * 1000);
+ print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
+ };
+ };
+
+ if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
+
+ ERR_PRINT("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + ".");
+ return FAILED;
+ };
+
+ packet_peer_stream->set_stream_peer(tcp_client);
+ Array msg;
+ msg.push_back(OS::get_singleton()->get_process_id());
+ send_message("set_pid", msg);
+
+ return OK;
+}
+
+void ScriptDebuggerRemote::_parse_message(const String p_command, const Array &p_data, ScriptLanguage *p_script) {
+
+ if (p_command == "request_video_mem") {
+ _send_video_memory();
+
+ } else if (p_command == "start_profiling") {
+ ERR_FAIL_COND(p_data.size() < 1);
+
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ ScriptServer::get_language(i)->profiling_start();
+ }
+
+ max_frame_functions = p_data[0];
+ profiler_function_signature_map.clear();
+ profiling = true;
+ frame_time = 0;
+ idle_time = 0;
+ physics_time = 0;
+ physics_frame_time = 0;
+ print_line("PROFILING ALRIGHT!");
+
+ } else if (p_command == "stop_profiling") {
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ ScriptServer::get_language(i)->profiling_stop();
+ }
+ profiling = false;
+ _send_profiling_data(false);
+ print_line("PROFILING END!");
+
+ } else if (p_command == "start_visual_profiling") {
+
+ visual_profiling = true;
+ VS::get_singleton()->set_frame_profiling_enabled(true);
+ } else if (p_command == "stop_visual_profiling") {
+
+ visual_profiling = false;
+ VS::get_singleton()->set_frame_profiling_enabled(false);
+
+ } else if (p_command == "start_network_profiling") {
+
+ network_profiling = true;
+ multiplayer->profiling_start();
+
+ } else if (p_command == "stop_network_profiling") {
+
+ network_profiling = false;
+ multiplayer->profiling_end();
+
+ } else if (p_command == "reload_scripts") {
+ reload_all_scripts = true;
+
+ } else if (p_command == "breakpoint") {
+ ERR_FAIL_COND(p_data.size() < 3);
+ bool set = p_data[2];
+ if (set)
+ insert_breakpoint(p_data[1], p_data[0]);
+ else
+ remove_breakpoint(p_data[1], p_data[0]);
+
+ } else if (p_command == "set_skip_breakpoints") {
+ ERR_FAIL_COND(p_data.size() < 1);
+ skip_breakpoints = p_data[0];
+
+ } else if (p_command == "get_stack_dump") {
+ ERR_FAIL_COND(!p_script);
+ ScriptStackDump dump;
+ int slc = p_script->debug_get_stack_level_count();
+ for (int i = 0; i < slc; i++) {
+ ScriptLanguage::StackInfo frame;
+ frame.file = p_script->debug_get_stack_level_source(i);
+ frame.line = p_script->debug_get_stack_level_line(i);
+ frame.func = p_script->debug_get_stack_level_function(i);
+ dump.frames.push_back(frame);
+ }
+ _put_msg("stack_dump", dump.serialize());
+
+ } else if (p_command == "get_stack_frame_vars") {
+ ERR_FAIL_COND(p_data.size() != 1);
+ ERR_FAIL_COND(!p_script);
+ int lv = p_data[0];
+
+ List<String> members;
+ List<Variant> member_vals;
+ if (ScriptInstance *inst = p_script->debug_get_stack_level_instance(lv)) {
+ members.push_back("self");
+ member_vals.push_back(inst->get_owner());
+ }
+ p_script->debug_get_stack_level_members(lv, &members, &member_vals);
+ ERR_FAIL_COND(members.size() != member_vals.size());
+
+ List<String> locals;
+ List<Variant> local_vals;
+ p_script->debug_get_stack_level_locals(lv, &locals, &local_vals);
+ ERR_FAIL_COND(locals.size() != local_vals.size());
+
+ List<String> globals;
+ List<Variant> globals_vals;
+ p_script->debug_get_globals(&globals, &globals_vals);
+ ERR_FAIL_COND(globals.size() != globals_vals.size());
+
+ _put_msg("stack_frame_vars", Array());
+
+ ScriptStackVariable stvar;
+ { //locals
+ List<String>::Element *E = locals.front();
+ List<Variant>::Element *F = local_vals.front();
+ while (E) {
+ stvar.name = E->get();
+ stvar.value = F->get();
+ stvar.type = 0;
+ _put_msg("stack_frame_var", stvar.serialize());
+
+ E = E->next();
+ F = F->next();
+ }
+ }
+
+ { //members
+ List<String>::Element *E = members.front();
+ List<Variant>::Element *F = member_vals.front();
+ while (E) {
+ stvar.name = E->get();
+ stvar.value = F->get();
+ stvar.type = 1;
+ _put_msg("stack_frame_var", stvar.serialize());
+
+ E = E->next();
+ F = F->next();
+ }
+ }
+
+ { //globals
+ List<String>::Element *E = globals.front();
+ List<Variant>::Element *F = globals_vals.front();
+ while (E) {
+ stvar.name = E->get();
+ stvar.value = F->get();
+ stvar.type = 2;
+ _put_msg("stack_frame_var", stvar.serialize());
+
+ E = E->next();
+ F = F->next();
+ }
+ }
+
+ } else {
+ if (scene_tree_parse_func) {
+ scene_tree_parse_func(p_command, p_data);
+ }
+ // Unknown message...
+ }
+}
+
+void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue, bool p_is_error_breakpoint) {
+
+ //this function is called when there is a debugger break (bug on script)
+ //or when execution is paused from editor
+
+ if (skip_breakpoints && !p_is_error_breakpoint)
+ return;
+
+ ERR_FAIL_COND_MSG(!is_peer_connected(), "Script Debugger failed to connect, but being used anyway.");
+
+ Array msg;
+ msg.push_back(p_can_continue);
+ msg.push_back(p_script->debug_get_error());
+ _put_msg("debug_enter", msg);
+
+ skip_profile_frame = true; // to avoid super long frame time for the frame
+
+ Input::MouseMode mouse_mode = Input::get_singleton()->get_mouse_mode();
+ if (mouse_mode != Input::MOUSE_MODE_VISIBLE)
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+
+ uint64_t loop_begin_usec = 0;
+ uint64_t loop_time_sec = 0;
+ while (true) {
+ loop_begin_usec = OS::get_singleton()->get_ticks_usec();
+
+ _get_output();
+
+ if (packet_peer_stream->get_available_packet_count() > 0) {
+
+ Variant var;
+ Error err = packet_peer_stream->get_var(var);
+
+ ERR_CONTINUE(err != OK);
+ ERR_CONTINUE(var.get_type() != Variant::ARRAY);
+
+ Array cmd = var;
+
+ ERR_CONTINUE(cmd.size() != 2);
+ ERR_CONTINUE(cmd[0].get_type() != Variant::STRING);
+ ERR_CONTINUE(cmd[1].get_type() != Variant::ARRAY);
+
+ String command = cmd[0];
+ Array data = cmd[1];
+ if (command == "step") {
+
+ set_depth(-1);
+ set_lines_left(1);
+ break;
+ } else if (command == "next") {
+
+ set_depth(0);
+ set_lines_left(1);
+ break;
+
+ } else if (command == "continue") {
+ set_depth(-1);
+ set_lines_left(-1);
+ OS::get_singleton()->move_window_to_foreground();
+ break;
+ } else if (command == "break") {
+ ERR_PRINT("Got break when already broke!");
+ break;
+ }
+
+ _parse_message(command, data, p_script);
+ } else {
+ OS::get_singleton()->delay_usec(10000);
+ OS::get_singleton()->process_and_drop_events();
+ }
+
+ // This is for the camera override to stay live even when the game is paused from the editor
+ loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f;
+ VisualServer::get_singleton()->sync();
+ if (VisualServer::get_singleton()->has_changed()) {
+ VisualServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale());
+ }
+ }
+
+ _put_msg("debug_exit", Array());
+
+ if (mouse_mode != Input::MOUSE_MODE_VISIBLE)
+ Input::get_singleton()->set_mouse_mode(mouse_mode);
+}
+
+void ScriptDebuggerRemote::_get_output() {
+
+ MutexLock lock(mutex);
+
+ if (output_strings.size()) {
+
+ locking = true;
+
+ while (output_strings.size()) {
+
+ Array arr;
+ arr.push_back(output_strings.front()->get());
+ _put_msg("output", arr);
+ output_strings.pop_front();
+ }
+ locking = false;
+ }
+
+ if (n_messages_dropped > 0) {
+ Message msg;
+ msg.message = "Too many messages! " + String::num_int64(n_messages_dropped) + " messages were dropped.";
+ messages.push_back(msg);
+ n_messages_dropped = 0;
+ }
+
+ while (messages.size()) {
+ locking = true;
+ Message msg = messages.front()->get();
+ _put_msg("message:" + msg.message, msg.data);
+ messages.pop_front();
+ locking = false;
+ }
+
+ if (n_errors_dropped == 1) {
+ // Only print one message about dropping per second
+ OutputError oe;
+ oe.error = "TOO_MANY_ERRORS";
+ oe.error_descr = "Too many errors! Ignoring errors for up to 1 second.";
+ oe.warning = false;
+ uint64_t time = OS::get_singleton()->get_ticks_msec();
+ oe.hr = time / 3600000;
+ oe.min = (time / 60000) % 60;
+ oe.sec = (time / 1000) % 60;
+ oe.msec = time % 1000;
+ errors.push_back(oe);
+ }
+
+ if (n_warnings_dropped == 1) {
+ // Only print one message about dropping per second
+ OutputError oe;
+ oe.error = "TOO_MANY_WARNINGS";
+ oe.error_descr = "Too many warnings! Ignoring warnings for up to 1 second.";
+ oe.warning = true;
+ uint64_t time = OS::get_singleton()->get_ticks_msec();
+ oe.hr = time / 3600000;
+ oe.min = (time / 60000) % 60;
+ oe.sec = (time / 1000) % 60;
+ oe.msec = time % 1000;
+ errors.push_back(oe);
+ }
+
+ while (errors.size()) {
+ locking = true;
+ OutputError oe = errors.front()->get();
+ _put_msg("error", oe.serialize());
+ errors.pop_front();
+ locking = false;
+ }
+}
+
+void ScriptDebuggerRemote::line_poll() {
+
+ //the purpose of this is just processing events every now and then when the script might get too busy
+ //otherwise bugs like infinite loops can't be caught
+ if (poll_every % 2048 == 0)
+ _poll_events();
+ poll_every++;
+}
+
+void ScriptDebuggerRemote::_err_handler(void *ud, const char *p_func, const char *p_file, int p_line, const char *p_err, const char *p_descr, ErrorHandlerType p_type) {
+
+ if (p_type == ERR_HANDLER_SCRIPT)
+ return; //ignore script errors, those go through debugger
+
+ Vector<ScriptLanguage::StackInfo> si;
+
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ si = ScriptServer::get_language(i)->debug_get_current_stack_info();
+ if (si.size())
+ break;
+ }
+
+ ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud;
+ sdr->send_error(p_func, p_file, p_line, p_err, p_descr, p_type, si);
+}
+
+void ScriptDebuggerRemote::_poll_events() {
+
+ //this si called from ::idle_poll, happens only when running the game,
+ //does not get called while on debug break
+
+ while (packet_peer_stream->get_available_packet_count() > 0) {
+
+ _get_output();
+
+ //send over output_strings
+
+ Variant var;
+ Error err = packet_peer_stream->get_var(var);
+
+ ERR_CONTINUE(err != OK);
+ ERR_CONTINUE(var.get_type() != Variant::ARRAY);
+
+ Array cmd = var;
+
+ ERR_CONTINUE(cmd.size() < 2);
+ ERR_CONTINUE(cmd[0].get_type() != Variant::STRING);
+ ERR_CONTINUE(cmd[1].get_type() != Variant::ARRAY);
+
+ String command = cmd[0];
+ Array data = cmd[1];
+
+ if (command == "break") {
+
+ if (get_break_language())
+ debug(get_break_language());
+ } else {
+ _parse_message(command, data);
+ }
+ }
+}
+
+void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) {
+
+ int ofs = 0;
+
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ if (p_for_frame)
+ ofs += ScriptServer::get_language(i)->profiling_get_frame_data(&profile_info.write[ofs], profile_info.size() - ofs);
+ else
+ ofs += ScriptServer::get_language(i)->profiling_get_accumulated_data(&profile_info.write[ofs], profile_info.size() - ofs);
+ }
+
+ for (int i = 0; i < ofs; i++) {
+ profile_info_ptrs.write[i] = &profile_info.write[i];
+ }
+
+ SortArray<ScriptLanguage::ProfilingInfo *, ProfileInfoSort> sa;
+ sa.sort(profile_info_ptrs.ptrw(), ofs);
+
+ int to_send = MIN(ofs, max_frame_functions);
+
+ //check signatures first
+ uint64_t total_script_time = 0;
+
+ for (int i = 0; i < to_send; i++) {
+
+ if (!profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) {
+
+ int idx = profiler_function_signature_map.size();
+ ProfilerSignature sig;
+ sig.name = profile_info_ptrs[i]->signature;
+ sig.id = idx;
+ _put_msg("profile_sig", sig.serialize());
+ profiler_function_signature_map[profile_info_ptrs[i]->signature] = idx;
+ }
+
+ total_script_time += profile_info_ptrs[i]->self_time;
+ }
+
+ //send frames then
+ ProfilerFrame metric;
+ metric.frame_number = Engine::get_singleton()->get_frames_drawn();
+ metric.frame_time = frame_time;
+ metric.idle_time = idle_time;
+ metric.physics_time = physics_time;
+ metric.physics_frame_time = physics_frame_time;
+ metric.script_time = total_script_time;
+
+ // Add script functions information.
+ metric.frame_functions.resize(to_send);
+ FrameFunction *w = metric.frame_functions.ptrw();
+ for (int i = 0; i < to_send; i++) {
+
+ if (profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) {
+ w[i].sig_id = profiler_function_signature_map[profile_info_ptrs[i]->signature];
+ }
+
+ w[i].call_count = profile_info_ptrs[i]->call_count;
+ w[i].total_time = profile_info_ptrs[i]->total_time / 1000000.0;
+ w[i].self_time = profile_info_ptrs[i]->self_time / 1000000.0;
+ }
+ if (p_for_frame) {
+ // Add profile frame data information.
+ metric.frames_data.append_array(profile_frame_data);
+ _put_msg("profile_frame", metric.serialize());
+ profile_frame_data.clear();
+ } else {
+ _put_msg("profile_total", metric.serialize());
+ }
+}
+
+void ScriptDebuggerRemote::idle_poll() {
+
+ // this function is called every frame, except when there is a debugger break (::debug() in this class)
+ // execution stops and remains in the ::debug function
+
+ _get_output();
+
+ if (requested_quit) {
+
+ _put_msg("kill_me", Array());
+ requested_quit = false;
+ }
+
+ if (performance) {
+
+ uint64_t pt = OS::get_singleton()->get_ticks_msec();
+ if (pt - last_perf_time > 1000) {
+
+ last_perf_time = pt;
+ int max = performance->get("MONITOR_MAX");
+ Array arr;
+ arr.resize(max);
+ for (int i = 0; i < max; i++) {
+ arr[i] = performance->call("get_monitor", i);
+ }
+ _put_msg("performance", arr);
+ }
+ }
+
+ if (visual_profiling) {
+ Vector<VS::FrameProfileArea> profile_areas = VS::get_singleton()->get_frame_profile();
+ if (profile_areas.size()) {
+ Vector<String> area_names;
+ Vector<real_t> area_times;
+ area_names.resize(profile_areas.size());
+ area_times.resize(profile_areas.size() * 2);
+ {
+ String *area_namesw = area_names.ptrw();
+ real_t *area_timesw = area_times.ptrw();
+
+ for (int i = 0; i < profile_areas.size(); i++) {
+ area_namesw[i] = profile_areas[i].name;
+ area_timesw[i * 2 + 0] = profile_areas[i].cpu_msec;
+ area_timesw[i * 2 + 1] = profile_areas[i].gpu_msec;
+ }
+ }
+ Array msg;
+ msg.push_back(VS::get_singleton()->get_frame_profile_frame());
+ msg.push_back(area_names);
+ msg.push_back(area_times);
+ _put_msg("visual_profile", msg);
+ }
+ }
+
+ if (profiling) {
+
+ if (skip_profile_frame) {
+ skip_profile_frame = false;
+ } else {
+ //send profiling info normally
+ _send_profiling_data(true);
+ }
+ }
+
+ if (network_profiling) {
+ uint64_t pt = OS::get_singleton()->get_ticks_msec();
+ if (pt - last_net_bandwidth_time > 200) {
+ last_net_bandwidth_time = pt;
+ _send_network_bandwidth_usage();
+ }
+ if (pt - last_net_prof_time > 100) {
+ last_net_prof_time = pt;
+ _send_network_profiling_data();
+ }
+ }
+
+ if (reload_all_scripts) {
+
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ ScriptServer::get_language(i)->reload_all_scripts();
+ }
+ reload_all_scripts = false;
+ }
+
+ _poll_events();
+}
+
+void ScriptDebuggerRemote::_send_network_profiling_data() {
+ ERR_FAIL_COND(multiplayer.is_null());
+
+ int n_nodes = multiplayer->get_profiling_frame(&network_profile_info.write[0]);
+
+ NetworkProfilerFrame frame;
+ for (int i = 0; i < n_nodes; i++) {
+ frame.infos.push_back(network_profile_info[i]);
+ }
+ _put_msg("network_profile", frame.serialize());
+}
+
+void ScriptDebuggerRemote::_send_network_bandwidth_usage() {
+ ERR_FAIL_COND(multiplayer.is_null());
+
+ int incoming_bandwidth = multiplayer->get_incoming_bandwidth_usage();
+ int outgoing_bandwidth = multiplayer->get_outgoing_bandwidth_usage();
+
+ Array arr;
+ arr.push_back(incoming_bandwidth);
+ arr.push_back(outgoing_bandwidth);
+ _put_msg("network_bandwidth", arr);
+}
+
+void ScriptDebuggerRemote::send_message(const String &p_message, const Array &p_args) {
+
+ MutexLock lock(mutex);
+
+ if (!locking && is_peer_connected()) {
+
+ if (messages.size() >= max_messages_per_frame) {
+ n_messages_dropped++;
+ } else {
+ Message msg;
+ msg.message = p_message;
+ msg.data = p_args;
+ messages.push_back(msg);
+ }
+ }
+}
+
+void ScriptDebuggerRemote::send_error(const String &p_func, const String &p_file, int p_line, const String &p_err, const String &p_descr, ErrorHandlerType p_type, const Vector<ScriptLanguage::StackInfo> &p_stack_info) {
+
+ OutputError oe;
+ oe.error = p_err;
+ oe.error_descr = p_descr;
+ oe.source_file = p_file;
+ oe.source_line = p_line;
+ oe.source_func = p_func;
+ oe.warning = p_type == ERR_HANDLER_WARNING;
+ uint64_t time = OS::get_singleton()->get_ticks_msec();
+ oe.hr = time / 3600000;
+ oe.min = (time / 60000) % 60;
+ oe.sec = (time / 1000) % 60;
+ oe.msec = time % 1000;
+ Array cstack;
+
+ uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000;
+ msec_count += ticks - last_msec;
+ last_msec = ticks;
+
+ if (msec_count > 1000) {
+ msec_count = 0;
+
+ err_count = 0;
+ n_errors_dropped = 0;
+ warn_count = 0;
+ n_warnings_dropped = 0;
+ }
+
+ cstack.resize(p_stack_info.size() * 3);
+ for (int i = 0; i < p_stack_info.size(); i++) {
+ cstack[i * 3 + 0] = p_stack_info[i].file;
+ cstack[i * 3 + 1] = p_stack_info[i].func;
+ cstack[i * 3 + 2] = p_stack_info[i].line;
+ }
+
+ //oe.callstack = cstack;
+ if (oe.warning) {
+ warn_count++;
+ } else {
+ err_count++;
+ }
+
+ MutexLock lock(mutex);
+
+ if (!locking && is_peer_connected()) {
+
+ if (oe.warning) {
+ if (warn_count > max_warnings_per_second) {
+ n_warnings_dropped++;
+ } else {
+ errors.push_back(oe);
+ }
+ } else {
+ if (err_count > max_errors_per_second) {
+ n_errors_dropped++;
+ } else {
+ errors.push_back(oe);
+ }
+ }
+ }
+}
+
+void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string, bool p_error) {
+
+ ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)p_this;
+
+ uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000;
+ sdr->msec_count += ticks - sdr->last_msec;
+ sdr->last_msec = ticks;
+
+ if (sdr->msec_count > 1000) {
+ sdr->char_count = 0;
+ sdr->msec_count = 0;
+ }
+
+ String s = p_string;
+ int allowed_chars = MIN(MAX(sdr->max_cps - sdr->char_count, 0), s.length());
+
+ if (allowed_chars == 0)
+ return;
+
+ if (allowed_chars < s.length()) {
+ s = s.substr(0, allowed_chars);
+ }
+
+ sdr->char_count += allowed_chars;
+ bool overflowed = sdr->char_count >= sdr->max_cps;
+
+ {
+ MutexLock lock(sdr->mutex);
+
+ if (!sdr->locking && sdr->is_peer_connected()) {
+
+ if (overflowed)
+ s += "[...]";
+
+ sdr->output_strings.push_back(s);
+
+ if (overflowed) {
+ sdr->output_strings.push_back("[output overflow, print less text!]");
+ }
+ }
+ }
+}
+
+void ScriptDebuggerRemote::request_quit() {
+
+ requested_quit = true;
+}
+
+void ScriptDebuggerRemote::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) {
+ multiplayer = p_multiplayer;
+}
+
+bool ScriptDebuggerRemote::is_profiling() const {
+
+ return profiling;
+}
+void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, const Array &p_data) {
+
+ int idx = -1;
+ for (int i = 0; i < profile_frame_data.size(); i++) {
+ if (profile_frame_data[i].name == p_name) {
+ idx = i;
+ break;
+ }
+ }
+
+ FrameData fd;
+ fd.name = p_name;
+ fd.data = p_data;
+
+ if (idx == -1) {
+ profile_frame_data.push_back(fd);
+ } else {
+ profile_frame_data.write[idx] = fd;
+ }
+}
+
+void ScriptDebuggerRemote::profiling_start() {
+ //ignores this, uses it via connection
+}
+
+void ScriptDebuggerRemote::profiling_end() {
+ //ignores this, uses it via connection
+}
+
+void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
+
+ frame_time = p_frame_time;
+ idle_time = p_idle_time;
+ physics_time = p_physics_time;
+ physics_frame_time = p_physics_frame_time;
+}
+
+void ScriptDebuggerRemote::set_skip_breakpoints(bool p_skip_breakpoints) {
+ skip_breakpoints = p_skip_breakpoints;
+}
+
+ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
+ScriptDebuggerRemote::ParseMessageFunc ScriptDebuggerRemote::scene_tree_parse_func = NULL;
+
+ScriptDebuggerRemote::ScriptDebuggerRemote() :
+ profiling(false),
+ visual_profiling(false),
+ network_profiling(false),
+ max_frame_functions(16),
+ skip_profile_frame(false),
+ reload_all_scripts(false),
+ tcp_client(Ref<StreamPeerTCP>(memnew(StreamPeerTCP))),
+ packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))),
+ last_perf_time(0),
+ last_net_prof_time(0),
+ last_net_bandwidth_time(0),
+ performance(Engine::get_singleton()->get_singleton_object("Performance")),
+ requested_quit(false),
+ max_messages_per_frame(GLOBAL_GET("network/limits/debugger_stdout/max_messages_per_frame")),
+ n_messages_dropped(0),
+ max_errors_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_errors_per_second")),
+ max_warnings_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_warnings_per_second")),
+ n_errors_dropped(0),
+ max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")),
+ char_count(0),
+ err_count(0),
+ warn_count(0),
+ last_msec(0),
+ msec_count(0),
+ locking(false),
+ poll_every(0) {
+
+ packet_peer_stream->set_stream_peer(tcp_client);
+ packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator.
+
+ phl.printfunc = _print_handler;
+ phl.userdata = this;
+ add_print_handler(&phl);
+
+ eh.errfunc = _err_handler;
+ eh.userdata = this;
+ add_error_handler(&eh);
+
+ profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions"));
+ network_profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions"));
+ profile_info_ptrs.resize(profile_info.size());
+}
+
+ScriptDebuggerRemote::~ScriptDebuggerRemote() {
+
+ remove_print_handler(&phl);
+ remove_error_handler(&eh);
+}
diff --git a/scene/debugger/script_debugger_remote.h b/core/script_debugger_remote.h
index ae44bf9ca2..b7a309b2f9 100644
--- a/scene/debugger/script_debugger_remote.h
+++ b/core/script_debugger_remote.h
@@ -37,16 +37,170 @@
#include "core/os/os.h"
#include "core/script_language.h"
-class SceneTree;
-
class ScriptDebuggerRemote : public ScriptDebugger {
- struct Message {
+public:
+ class ResourceInfo {
+ public:
+ String path;
+ String format;
+ String type;
+ RID id;
+ int vram;
+ bool operator<(const ResourceInfo &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; }
+ ResourceInfo() {
+ vram = 0;
+ }
+ };
+
+ class ResourceUsage {
+ public:
+ List<ResourceInfo> infos;
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+ };
+
+ class FrameInfo {
+ public:
+ StringName name;
+ float self_time;
+ float total_time;
+
+ FrameInfo() {
+ self_time = 0;
+ total_time = 0;
+ }
+ };
+
+ class FrameFunction {
+ public:
+ int sig_id;
+ int call_count;
+ StringName name;
+ float self_time;
+ float total_time;
+
+ FrameFunction() {
+ sig_id = -1;
+ call_count = 0;
+ self_time = 0;
+ total_time = 0;
+ }
+ };
+ class ScriptStackVariable {
+ public:
+ String name;
+ Variant value;
+ int type;
+ ScriptStackVariable() {
+ type = -1;
+ }
+
+ Array serialize(int max_size = 1 << 20); // 1 MiB default.
+ bool deserialize(const Array &p_arr);
+ };
+
+ class ScriptStackDump {
+ public:
+ List<ScriptLanguage::StackInfo> frames;
+ ScriptStackDump() {}
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+ };
+
+ class Message {
+
+ public:
String message;
Array data;
+
+ Message() {}
+ };
+
+ class OutputError {
+ public:
+ int hr;
+ int min;
+ int sec;
+ int msec;
+ String source_file;
+ String source_func;
+ int source_line;
+ String error;
+ String error_descr;
+ bool warning;
+ Vector<ScriptLanguage::StackInfo> callstack;
+
+ OutputError() {
+ hr = -1;
+ min = -1;
+ sec = -1;
+ msec = -1;
+ source_line = -1;
+ warning = false;
+ }
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+ };
+
+ struct FrameData {
+
+ StringName name;
+ Array data;
+ };
+
+ class ProfilerSignature {
+ public:
+ StringName name;
+ int id;
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+
+ ProfilerSignature() {
+ id = -1;
+ };
+ };
+
+ class ProfilerFrame {
+ public:
+ int frame_number;
+ float frame_time;
+ float idle_time;
+ float physics_time;
+ float physics_frame_time;
+ float script_time;
+
+ Vector<FrameData> frames_data;
+ Vector<FrameFunction> frame_functions;
+
+ ProfilerFrame() {
+ frame_number = 0;
+ frame_time = 0;
+ idle_time = 0;
+ physics_time = 0;
+ physics_frame_time = 0;
+ }
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
};
+ class NetworkProfilerFrame {
+ public:
+ Vector<MultiplayerAPI::ProfilingInfo> infos;
+
+ Array serialize();
+ bool deserialize(const Array &p_arr);
+
+ NetworkProfilerFrame(){};
+ };
+
+protected:
struct ProfileInfoSort {
bool operator()(ScriptLanguage::ProfilingInfo *A, ScriptLanguage::ProfilingInfo *B) const {
@@ -76,22 +230,7 @@ class ScriptDebuggerRemote : public ScriptDebugger {
uint64_t last_net_bandwidth_time;
Object *performance;
bool requested_quit;
- Mutex *mutex;
-
- struct OutputError {
-
- int hr;
- int min;
- int sec;
- int msec;
- String source_file;
- String source_func;
- int source_line;
- String error;
- String error_descr;
- bool warning;
- Array callstack;
- };
+ Mutex mutex;
List<String> output_strings;
List<Message> messages;
@@ -119,9 +258,7 @@ class ScriptDebuggerRemote : public ScriptDebugger {
void _poll_events();
uint32_t poll_every;
- SceneTree *scene_tree;
-
- bool _parse_live_edit(const Array &p_command);
+ void _parse_message(const String p_command, const Array &p_data, ScriptLanguage *p_script = NULL);
void _set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value);
@@ -133,40 +270,24 @@ class ScriptDebuggerRemote : public ScriptDebugger {
ErrorHandlerList eh;
static void _err_handler(void *, const char *, const char *, int p_line, const char *, const char *, ErrorHandlerType p_type);
+ void _put_msg(String p_message, Array p_data);
void _send_profiling_data(bool p_for_frame);
void _send_network_profiling_data();
void _send_network_bandwidth_usage();
- struct FrameData {
-
- StringName name;
- Array data;
- };
-
Vector<FrameData> profile_frame_data;
- void _put_variable(const String &p_name, const Variant &p_variable);
-
- void _save_node(ObjectID id, const String &p_path);
-
bool skip_breakpoints;
public:
- struct ResourceUsage {
-
- String path;
- String format;
- String type;
- RID id;
- int vram;
- bool operator<(const ResourceUsage &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; }
- };
-
- typedef void (*ResourceUsageFunc)(List<ResourceUsage> *);
+ typedef void (*ResourceUsageFunc)(ResourceUsage *);
+ typedef Error (*ParseMessageFunc)(const String &p_name, const Array &p_msg); // Returns true if something was found (stopping propagation).
static ResourceUsageFunc resource_usage_func;
+ static ParseMessageFunc scene_tree_parse_func; // Could be made into list, extensible...
Error connect_to_host(const String &p_host, uint16_t p_port);
+ bool is_peer_connected();
virtual void debug(ScriptLanguage *p_script, bool p_can_continue = true, bool p_is_error_breakpoint = false);
virtual void idle_poll();
virtual void line_poll();
@@ -188,8 +309,6 @@ public:
virtual void set_skip_breakpoints(bool p_skip_breakpoints);
- void set_scene_tree(SceneTree *p_scene_tree) { scene_tree = p_scene_tree; };
-
ScriptDebuggerRemote();
~ScriptDebuggerRemote();
};
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 1149feac38..0b00247502 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -307,17 +307,17 @@ Variant ScriptInstance::call(const StringName &p_method, VARIANT_ARG_DECLARE) {
argc++;
}
- Variant::CallError error;
+ Callable::CallError error;
return call(p_method, argptr, argc, error);
}
void ScriptInstance::call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) {
- Variant::CallError ce;
+ Callable::CallError ce;
call(p_method, p_args, p_argcount, ce); // script may not support multilevel calls
}
void ScriptInstance::call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount) {
- Variant::CallError ce;
+ Callable::CallError ce;
call(p_method, p_args, p_argcount, ce); // script may not support multilevel calls
}
diff --git a/core/script_language.h b/core/script_language.h
index 788f5d6976..48570ae546 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -197,7 +197,7 @@ public:
virtual void get_method_list(List<MethodInfo> *p_list) const = 0;
virtual bool has_method(const StringName &p_method) const = 0;
virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST);
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) = 0;
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = 0;
virtual void call_multilevel(const StringName &p_method, VARIANT_ARG_LIST);
virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount);
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
@@ -313,7 +313,7 @@ public:
virtual bool supports_builtin_mode() const = 0;
virtual bool can_inherit_from_file() { return false; }
virtual int find_function(const String &p_function, const String &p_code) const = 0;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const = 0;
virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; }
virtual bool overrides_external_editor() { return false; }
@@ -424,12 +424,12 @@ public:
virtual void get_method_list(List<MethodInfo> *p_list) const;
virtual bool has_method(const StringName &p_method) const;
virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST) { return Variant(); }
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
//virtual void call_multilevel(const StringName& p_method,VARIANT_ARG_LIST) { return Variant(); }
- //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error) { return Variant(); }
+ //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount,Callable::CallError &r_error) { return Variant(); }
virtual void notification(int p_notification) {}
virtual Ref<Script> get_script() const { return script; }
diff --git a/core/string_name.cpp b/core/string_name.cpp
index 6f7b10c5fe..4ec9af008e 100644
--- a/core/string_name.cpp
+++ b/core/string_name.cpp
@@ -47,12 +47,10 @@ StringName _scs_create(const char *p_chr) {
}
bool StringName::configured = false;
-Mutex *StringName::lock = NULL;
+Mutex StringName::mutex;
void StringName::setup() {
- lock = Mutex::create();
-
ERR_FAIL_COND(configured);
for (int i = 0; i < STRING_TABLE_LEN; i++) {
@@ -63,7 +61,7 @@ void StringName::setup() {
void StringName::cleanup() {
- lock->lock();
+ MutexLock lock(mutex);
int lost_strings = 0;
for (int i = 0; i < STRING_TABLE_LEN; i++) {
@@ -87,9 +85,6 @@ void StringName::cleanup() {
if (lost_strings) {
print_verbose("StringName: " + itos(lost_strings) + " unclaimed string names at exit.");
}
- lock->unlock();
-
- memdelete(lock);
}
void StringName::unref() {
@@ -98,7 +93,7 @@ void StringName::unref() {
if (_data && _data->refcount.unref()) {
- lock->lock();
+ MutexLock lock(mutex);
if (_data->prev) {
_data->prev->next = _data->next;
@@ -113,7 +108,6 @@ void StringName::unref() {
_data->next->prev = _data->prev;
}
memdelete(_data);
- lock->unlock();
}
_data = NULL;
@@ -184,7 +178,7 @@ StringName::StringName(const char *p_name) {
if (!p_name || p_name[0] == 0)
return; //empty, ignore
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
@@ -203,7 +197,6 @@ StringName::StringName(const char *p_name) {
if (_data) {
if (_data->refcount.ref()) {
// exists
- lock->unlock();
return;
}
}
@@ -219,8 +212,6 @@ StringName::StringName(const char *p_name) {
if (_table[idx])
_table[idx]->prev = _data;
_table[idx] = _data;
-
- lock->unlock();
}
StringName::StringName(const StaticCString &p_static_string) {
@@ -231,7 +222,7 @@ StringName::StringName(const StaticCString &p_static_string) {
ERR_FAIL_COND(!p_static_string.ptr || !p_static_string.ptr[0]);
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_static_string.ptr);
@@ -250,7 +241,6 @@ StringName::StringName(const StaticCString &p_static_string) {
if (_data) {
if (_data->refcount.ref()) {
// exists
- lock->unlock();
return;
}
}
@@ -266,8 +256,6 @@ StringName::StringName(const StaticCString &p_static_string) {
if (_table[idx])
_table[idx]->prev = _data;
_table[idx] = _data;
-
- lock->unlock();
}
StringName::StringName(const String &p_name) {
@@ -279,10 +267,9 @@ StringName::StringName(const String &p_name) {
if (p_name == String())
return;
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = p_name.hash();
-
uint32_t idx = hash & STRING_TABLE_MASK;
_data = _table[idx];
@@ -297,7 +284,6 @@ StringName::StringName(const String &p_name) {
if (_data) {
if (_data->refcount.ref()) {
// exists
- lock->unlock();
return;
}
}
@@ -313,8 +299,6 @@ StringName::StringName(const String &p_name) {
if (_table[idx])
_table[idx]->prev = _data;
_table[idx] = _data;
-
- lock->unlock();
}
StringName StringName::search(const char *p_name) {
@@ -325,10 +309,9 @@ StringName StringName::search(const char *p_name) {
if (!p_name[0])
return StringName();
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
-
uint32_t idx = hash & STRING_TABLE_MASK;
_Data *_data = _table[idx];
@@ -342,12 +325,9 @@ StringName StringName::search(const char *p_name) {
}
if (_data && _data->refcount.ref()) {
- lock->unlock();
-
return StringName(_data);
}
- lock->unlock();
return StringName(); //does not exist
}
@@ -359,7 +339,7 @@ StringName StringName::search(const CharType *p_name) {
if (!p_name[0])
return StringName();
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
@@ -376,18 +356,16 @@ StringName StringName::search(const CharType *p_name) {
}
if (_data && _data->refcount.ref()) {
- lock->unlock();
return StringName(_data);
}
- lock->unlock();
return StringName(); //does not exist
}
StringName StringName::search(const String &p_name) {
ERR_FAIL_COND_V(p_name == "", StringName());
- lock->lock();
+ MutexLock lock(mutex);
uint32_t hash = p_name.hash();
@@ -404,11 +382,9 @@ StringName StringName::search(const String &p_name) {
}
if (_data && _data->refcount.ref()) {
- lock->unlock();
return StringName(_data);
}
- lock->unlock();
return StringName(); //does not exist
}
diff --git a/core/string_name.h b/core/string_name.h
index 4096b8f650..e68ab8bfa3 100644
--- a/core/string_name.h
+++ b/core/string_name.h
@@ -82,7 +82,7 @@ class StringName {
friend void register_core_types();
friend void unregister_core_types();
- static Mutex *lock;
+ static Mutex mutex;
static void setup();
static void cleanup();
static bool configured;
diff --git a/core/translation.cpp b/core/translation.cpp
index cf76de1c9e..17c23b86cd 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -794,9 +794,9 @@ static const char *locale_renames[][2] = {
///////////////////////////////////////////////
-PoolVector<String> Translation::_get_messages() const {
+Vector<String> Translation::_get_messages() const {
- PoolVector<String> msgs;
+ Vector<String> msgs;
msgs.resize(translation_map.size() * 2);
int idx = 0;
for (const Map<StringName, StringName>::Element *E = translation_map.front(); E; E = E->next()) {
@@ -809,9 +809,9 @@ PoolVector<String> Translation::_get_messages() const {
return msgs;
}
-PoolVector<String> Translation::_get_message_list() const {
+Vector<String> Translation::_get_message_list() const {
- PoolVector<String> msgs;
+ Vector<String> msgs;
msgs.resize(translation_map.size());
int idx = 0;
for (const Map<StringName, StringName>::Element *E = translation_map.front(); E; E = E->next()) {
@@ -823,12 +823,12 @@ PoolVector<String> Translation::_get_message_list() const {
return msgs;
}
-void Translation::_set_messages(const PoolVector<String> &p_messages) {
+void Translation::_set_messages(const Vector<String> &p_messages) {
int msg_count = p_messages.size();
ERR_FAIL_COND(msg_count % 2);
- PoolVector<String>::Read r = p_messages.read();
+ const String *r = p_messages.ptr();
for (int i = 0; i < msg_count; i += 2) {
@@ -898,7 +898,7 @@ void Translation::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_messages"), &Translation::_set_messages);
ClassDB::bind_method(D_METHOD("_get_messages"), &Translation::_get_messages);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
}
@@ -1146,12 +1146,12 @@ TranslationServer *TranslationServer::singleton = NULL;
bool TranslationServer::_load_translations(const String &p_from) {
if (ProjectSettings::get_singleton()->has_setting(p_from)) {
- PoolVector<String> translations = ProjectSettings::get_singleton()->get(p_from);
+ Vector<String> translations = ProjectSettings::get_singleton()->get(p_from);
int tcount = translations.size();
if (tcount) {
- PoolVector<String>::Read r = translations.read();
+ const String *r = translations.ptr();
for (int i = 0; i < tcount; i++) {
diff --git a/core/translation.h b/core/translation.h
index 8f56b7271d..0448ea56c5 100644
--- a/core/translation.h
+++ b/core/translation.h
@@ -42,10 +42,10 @@ class Translation : public Resource {
String locale;
Map<StringName, StringName> translation_map;
- PoolVector<String> _get_message_list() const;
+ Vector<String> _get_message_list() const;
- PoolVector<String> _get_messages() const;
- void _set_messages(const PoolVector<String> &p_messages);
+ Vector<String> _get_messages() const;
+ void _set_messages(const Vector<String> &p_messages);
protected:
static void _bind_methods();
diff --git a/core/type_info.h b/core/type_info.h
index 9ca6d7fe73..5dacf67de4 100644
--- a/core/type_info.h
+++ b/core/type_info.h
@@ -137,8 +137,8 @@ MAKE_TYPE_INFO_WITH_META(int32_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_I
MAKE_TYPE_INFO_WITH_META(uint64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_UINT64)
MAKE_TYPE_INFO_WITH_META(int64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_INT64)
MAKE_TYPE_INFO(wchar_t, Variant::INT)
-MAKE_TYPE_INFO_WITH_META(float, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_FLOAT)
-MAKE_TYPE_INFO_WITH_META(double, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_DOUBLE)
+MAKE_TYPE_INFO_WITH_META(float, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_FLOAT)
+MAKE_TYPE_INFO_WITH_META(double, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_DOUBLE)
MAKE_TYPE_INFO(String, Variant::STRING)
MAKE_TYPE_INFO(Vector2, Variant::VECTOR2)
@@ -151,23 +151,24 @@ MAKE_TYPE_INFO(AABB, Variant::AABB)
MAKE_TYPE_INFO(Basis, Variant::BASIS)
MAKE_TYPE_INFO(Transform, Variant::TRANSFORM)
MAKE_TYPE_INFO(Color, Variant::COLOR)
+MAKE_TYPE_INFO(StringName, Variant::STRING_NAME)
MAKE_TYPE_INFO(NodePath, Variant::NODE_PATH)
MAKE_TYPE_INFO(RID, Variant::_RID)
+MAKE_TYPE_INFO(Callable, Variant::CALLABLE)
+MAKE_TYPE_INFO(Signal, Variant::SIGNAL)
MAKE_TYPE_INFO(Dictionary, Variant::DICTIONARY)
MAKE_TYPE_INFO(Array, Variant::ARRAY)
-MAKE_TYPE_INFO(PoolByteArray, Variant::POOL_BYTE_ARRAY)
-MAKE_TYPE_INFO(PoolIntArray, Variant::POOL_INT_ARRAY)
-MAKE_TYPE_INFO(PoolRealArray, Variant::POOL_REAL_ARRAY)
-MAKE_TYPE_INFO(PoolStringArray, Variant::POOL_STRING_ARRAY)
-MAKE_TYPE_INFO(PoolVector2Array, Variant::POOL_VECTOR2_ARRAY)
-MAKE_TYPE_INFO(PoolVector3Array, Variant::POOL_VECTOR3_ARRAY)
-MAKE_TYPE_INFO(PoolColorArray, Variant::POOL_COLOR_ARRAY)
-
-MAKE_TYPE_INFO(StringName, Variant::STRING)
-MAKE_TYPE_INFO(IP_Address, Variant::STRING)
+MAKE_TYPE_INFO(PackedByteArray, Variant::PACKED_BYTE_ARRAY)
+MAKE_TYPE_INFO(PackedInt32Array, Variant::PACKED_INT32_ARRAY)
+MAKE_TYPE_INFO(PackedInt64Array, Variant::PACKED_INT64_ARRAY)
+MAKE_TYPE_INFO(PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY)
+MAKE_TYPE_INFO(PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY)
+MAKE_TYPE_INFO(PackedStringArray, Variant::PACKED_STRING_ARRAY)
+MAKE_TYPE_INFO(PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY)
+MAKE_TYPE_INFO(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY)
+MAKE_TYPE_INFO(PackedColorArray, Variant::PACKED_COLOR_ARRAY)
-class BSP_Tree;
-MAKE_TYPE_INFO(BSP_Tree, Variant::DICTIONARY)
+MAKE_TYPE_INFO(IP_Address, Variant::STRING)
//objectID
template <>
@@ -216,21 +217,11 @@ struct GetTypeInfo<const Variant &> {
} \
};
-MAKE_TEMPLATE_TYPE_INFO(Vector, uint8_t, Variant::POOL_BYTE_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, int, Variant::POOL_INT_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, float, Variant::POOL_REAL_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, String, Variant::POOL_STRING_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Vector2, Variant::POOL_VECTOR2_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Vector3, Variant::POOL_VECTOR3_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Color, Variant::POOL_COLOR_ARRAY)
-
MAKE_TEMPLATE_TYPE_INFO(Vector, Variant, Variant::ARRAY)
MAKE_TEMPLATE_TYPE_INFO(Vector, RID, Variant::ARRAY)
MAKE_TEMPLATE_TYPE_INFO(Vector, Plane, Variant::ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, StringName, Variant::POOL_STRING_ARRAY)
-
-MAKE_TEMPLATE_TYPE_INFO(PoolVector, Plane, Variant::ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(PoolVector, Face3, Variant::POOL_VECTOR3_ARRAY)
+MAKE_TEMPLATE_TYPE_INFO(Vector, Face3, Variant::PACKED_VECTOR3_ARRAY)
+MAKE_TEMPLATE_TYPE_INFO(Vector, StringName, Variant::PACKED_STRING_ARRAY)
template <typename T>
struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
diff --git a/core/typedefs.h b/core/typedefs.h
index 0bb80cb2dd..5376b0718a 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -335,26 +335,16 @@ struct _GlobalLock {
*/
#define CAST_INT_TO_UCHAR_PTR(ptr) ((uint8_t *)(uintptr_t)(ptr))
-/** Hint for compilers that this fallthrough in a switch is intentional.
- * Can be replaced by [[fallthrough]] annotation if we move to C++17.
- * Including conditional support for it for people who set -std=c++17
- * themselves.
- * Requires a trailing semicolon when used.
- */
-#if __cplusplus >= 201703L
-#define FALLTHROUGH [[fallthrough]]
-#elif defined(__GNUC__) && __GNUC__ >= 7
-#define FALLTHROUGH __attribute__((fallthrough))
-#elif defined(__llvm__) && __cplusplus >= 201103L && defined(__has_feature)
-#if __has_feature(cxx_attributes) && defined(__has_warning)
-#if __has_warning("-Wimplicit-fallthrough")
-#define FALLTHROUGH [[clang::fallthrough]]
-#endif
-#endif
-#endif
+// Home-made index sequence trick, so it can be used everywhere without the costly include of std::tuple.
+// https://stackoverflow.com/questions/15014096/c-index-of-type-during-variadic-template-expansion
-#ifndef FALLTHROUGH
-#define FALLTHROUGH
-#endif
+template <size_t... Is>
+struct IndexSequence {};
+
+template <size_t N, size_t... Is>
+struct BuildIndexSequence : BuildIndexSequence<N - 1, N - 1, Is...> {};
+
+template <size_t... Is>
+struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
#endif // TYPEDEFS_H
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 577879d448..02f460c93d 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -105,7 +105,7 @@ void UndoRedo::create_action(const String &p_name, MergeMode p_mode) {
action_level++;
}
-void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_ARG_DECLARE) {
+void UndoRedo::add_do_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) {
VARIANT_ARGPTRS
ERR_FAIL_COND(p_object == NULL);
@@ -125,7 +125,7 @@ void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_A
actions.write[current_action + 1].do_ops.push_back(do_op);
}
-void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT_ARG_DECLARE) {
+void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) {
VARIANT_ARGPTRS
ERR_FAIL_COND(p_object == NULL);
@@ -149,7 +149,7 @@ void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT
}
actions.write[current_action + 1].undo_ops.push_back(undo_op);
}
-void UndoRedo::add_do_property(Object *p_object, const String &p_property, const Variant &p_value) {
+void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value) {
ERR_FAIL_COND(p_object == NULL);
ERR_FAIL_COND(action_level <= 0);
@@ -164,7 +164,7 @@ void UndoRedo::add_do_property(Object *p_object, const String &p_property, const
do_op.args[0] = p_value;
actions.write[current_action + 1].do_ops.push_back(do_op);
}
-void UndoRedo::add_undo_property(Object *p_object, const String &p_property, const Variant &p_value) {
+void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value) {
ERR_FAIL_COND(p_object == NULL);
ERR_FAIL_COND(action_level <= 0);
@@ -290,9 +290,9 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) {
}
argptrs.resize(argc);
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(op.name, (const Variant **)argptrs.ptr(), argc, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
ERR_PRINT("Error calling method from signal '" + String(op.name) + "': " + Variant::get_call_error_text(obj, op.name, (const Variant **)argptrs.ptr(), argc, ce));
}
#ifdef TOOLS_ENABLED
@@ -431,32 +431,32 @@ UndoRedo::~UndoRedo() {
clear_history();
}
-Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
if (p_args[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
return Variant();
}
- if (p_args[1]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
- r_error.expected = Variant::STRING;
+ r_error.expected = Variant::STRING_NAME;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
Object *object = *p_args[0];
- String method = *p_args[1];
+ StringName method = *p_args[1];
Variant v[VARIANT_ARG_MAX];
@@ -469,32 +469,32 @@ Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Variant
return Variant();
}
-Variant UndoRedo::_add_undo_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant UndoRedo::_add_undo_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
if (p_args[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
return Variant();
}
- if (p_args[1]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
- r_error.expected = Variant::STRING;
+ r_error.expected = Variant::STRING_NAME;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
Object *object = *p_args[0];
- String method = *p_args[1];
+ StringName method = *p_args[1];
Variant v[VARIANT_ARG_MAX];
@@ -518,7 +518,7 @@ void UndoRedo::_bind_methods() {
MethodInfo mi;
mi.name = "add_do_method";
mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object"));
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "add_do_method", &UndoRedo::_add_do_method, mi, varray(), false);
}
@@ -527,7 +527,7 @@ void UndoRedo::_bind_methods() {
MethodInfo mi;
mi.name = "add_undo_method";
mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object"));
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "add_undo_method", &UndoRedo::_add_undo_method, mi, varray(), false);
}
diff --git a/core/undo_redo.h b/core/undo_redo.h
index bb9a4d1642..3b91e9ce36 100644
--- a/core/undo_redo.h
+++ b/core/undo_redo.h
@@ -47,8 +47,8 @@ public:
};
typedef void (*CommitNotifyCallback)(void *p_ud, const String &p_name);
- Variant _add_do_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _add_undo_method(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _add_do_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _add_undo_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
typedef void (*MethodNotifyCallback)(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE);
typedef void (*PropertyNotifyCallback)(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value);
@@ -65,7 +65,7 @@ private:
Type type;
Ref<Resource> resref;
ObjectID object;
- String name;
+ StringName name;
Variant args[VARIANT_ARG_MAX];
};
@@ -103,10 +103,10 @@ protected:
public:
void create_action(const String &p_name = "", MergeMode p_mode = MERGE_DISABLE);
- void add_do_method(Object *p_object, const String &p_method, VARIANT_ARG_LIST);
- void add_undo_method(Object *p_object, const String &p_method, VARIANT_ARG_LIST);
- void add_do_property(Object *p_object, const String &p_property, const Variant &p_value);
- void add_undo_property(Object *p_object, const String &p_property, const Variant &p_value);
+ void add_do_method(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST);
+ void add_undo_method(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST);
+ void add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value);
+ void add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value);
void add_do_reference(Object *p_object);
void add_undo_reference(Object *p_object);
diff --git a/core/ustring.cpp b/core/ustring.cpp
index c4543b89da..1d4d9c2dfd 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -2169,6 +2169,7 @@ int64_t String::to_int(const CharType *p_str, int p_len) {
} else {
break;
}
+ [[fallthrough]];
}
case READING_INT: {
diff --git a/core/variant.cpp b/core/variant.cpp
index c2ffe3721f..550974363b 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -57,7 +57,7 @@ String Variant::get_type_name(Variant::Type p_type) {
return "int";
} break;
- case REAL: {
+ case FLOAT: {
return "float";
@@ -72,10 +72,18 @@ String Variant::get_type_name(Variant::Type p_type) {
return "Vector2";
} break;
+ case VECTOR2I: {
+
+ return "Vector2i";
+ } break;
case RECT2: {
return "Rect2";
} break;
+ case RECT2I: {
+
+ return "Rect2i";
+ } break;
case TRANSFORM2D: {
return "Transform2D";
@@ -84,6 +92,10 @@ String Variant::get_type_name(Variant::Type p_type) {
return "Vector3";
} break;
+ case VECTOR3I: {
+
+ return "Vector3i";
+ } break;
case PLANE: {
return "Plane";
@@ -128,6 +140,19 @@ String Variant::get_type_name(Variant::Type p_type) {
return "Object";
} break;
+ case CALLABLE: {
+
+ return "Callable";
+ } break;
+ case SIGNAL: {
+
+ return "Signal";
+ } break;
+ case STRING_NAME: {
+
+ return "StringName";
+
+ } break;
case NODE_PATH: {
return "NodePath";
@@ -145,38 +170,48 @@ String Variant::get_type_name(Variant::Type p_type) {
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ return "PackedByteArray";
+
+ } break;
+ case PACKED_INT32_ARRAY: {
+
+ return "PackedInt32Array";
+
+ } break;
+ case PACKED_INT64_ARRAY: {
- return "PoolByteArray";
+ return "PackedInt64Array";
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- return "PoolIntArray";
+ return "PackedFloat32Array";
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- return "PoolRealArray";
+ return "PackedFloat64Array";
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- return "PoolStringArray";
+ return "PackedStringArray";
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- return "PoolVector2Array";
+ return "PackedVector2Array";
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- return "PoolVector3Array";
+ return "PackedVector3Array";
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
- return "PoolColorArray";
+ return "PackedColorArray";
} break;
default: {
@@ -205,7 +240,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type valid[] = {
INT,
- REAL,
+ FLOAT,
STRING,
NIL,
};
@@ -216,7 +251,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type valid[] = {
BOOL,
- REAL,
+ FLOAT,
STRING,
NIL,
};
@@ -224,7 +259,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case REAL: {
+ case FLOAT: {
static const Type valid[] = {
BOOL,
@@ -245,6 +280,46 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
invalid_types = invalid;
} break;
+ case VECTOR2: {
+
+ static const Type valid[] = {
+ VECTOR2I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case VECTOR2I: {
+
+ static const Type valid[] = {
+ VECTOR2,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case RECT2: {
+
+ static const Type valid[] = {
+ RECT2I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case RECT2I: {
+
+ static const Type valid[] = {
+ RECT2,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
case TRANSFORM2D: {
static const Type valid[] = {
@@ -254,6 +329,27 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
+ case VECTOR3: {
+
+ static const Type valid[] = {
+ VECTOR3I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case VECTOR3I: {
+
+ static const Type valid[] = {
+ VECTOR3,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+
case QUAT: {
static const Type valid[] = {
@@ -317,6 +413,15 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
+ case STRING_NAME: {
+
+ static const Type valid[] = {
+ STRING,
+ NIL
+ };
+
+ valid_types = valid;
+ } break;
case NODE_PATH: {
static const Type valid[] = {
@@ -329,37 +434,56 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
case ARRAY: {
static const Type valid[] = {
- POOL_BYTE_ARRAY,
- POOL_INT_ARRAY,
- POOL_STRING_ARRAY,
- POOL_REAL_ARRAY,
- POOL_COLOR_ARRAY,
- POOL_VECTOR2_ARRAY,
- POOL_VECTOR3_ARRAY,
+ PACKED_BYTE_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
+ PACKED_STRING_ARRAY,
+ PACKED_COLOR_ARRAY,
+ PACKED_VECTOR2_ARRAY,
+ PACKED_VECTOR3_ARRAY,
NIL
};
valid_types = valid;
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+
+ valid_types = valid;
+ } break;
+ case PACKED_INT32_ARRAY: {
static const Type valid[] = {
ARRAY,
NIL
};
+ valid_types = valid;
+ } break;
+ case PACKED_INT64_ARRAY: {
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
valid_types = valid;
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
static const Type valid[] = {
ARRAY,
NIL
};
+
valid_types = valid;
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -368,7 +492,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -376,7 +500,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
};
valid_types = valid;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -385,7 +509,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -394,7 +518,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -452,7 +576,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
INT,
- REAL,
+ FLOAT,
//STRING,
NIL,
};
@@ -463,7 +587,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
BOOL,
- REAL,
+ FLOAT,
//STRING,
NIL,
};
@@ -471,7 +595,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case REAL: {
+ case FLOAT: {
static const Type valid[] = {
BOOL,
@@ -487,11 +611,52 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
NODE_PATH,
+ STRING_NAME,
NIL
};
valid_types = valid;
} break;
+ case VECTOR2: {
+
+ static const Type valid[] = {
+ VECTOR2I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case VECTOR2I: {
+
+ static const Type valid[] = {
+ VECTOR2,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case RECT2: {
+
+ static const Type valid[] = {
+ RECT2I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case RECT2I: {
+
+ static const Type valid[] = {
+ RECT2,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
case TRANSFORM2D: {
static const Type valid[] = {
@@ -501,6 +666,27 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
+ case VECTOR3: {
+
+ static const Type valid[] = {
+ VECTOR3I,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+ case VECTOR3I: {
+
+ static const Type valid[] = {
+ VECTOR3,
+ NIL,
+ };
+
+ valid_types = valid;
+
+ } break;
+
case QUAT: {
static const Type valid[] = {
@@ -564,6 +750,15 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
+ case STRING_NAME: {
+
+ static const Type valid[] = {
+ STRING,
+ NIL
+ };
+
+ valid_types = valid;
+ } break;
case NODE_PATH: {
static const Type valid[] = {
@@ -576,37 +771,56 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
case ARRAY: {
static const Type valid[] = {
- POOL_BYTE_ARRAY,
- POOL_INT_ARRAY,
- POOL_STRING_ARRAY,
- POOL_REAL_ARRAY,
- POOL_COLOR_ARRAY,
- POOL_VECTOR2_ARRAY,
- POOL_VECTOR3_ARRAY,
+ PACKED_BYTE_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
+ PACKED_STRING_ARRAY,
+ PACKED_COLOR_ARRAY,
+ PACKED_VECTOR2_ARRAY,
+ PACKED_VECTOR3_ARRAY,
NIL
};
valid_types = valid;
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+
+ valid_types = valid;
+ } break;
+ case PACKED_INT32_ARRAY: {
static const Type valid[] = {
ARRAY,
NIL
};
+ valid_types = valid;
+ } break;
+ case PACKED_INT64_ARRAY: {
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
valid_types = valid;
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
static const Type valid[] = {
ARRAY,
NIL
};
+
valid_types = valid;
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -615,7 +829,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -623,7 +837,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
};
valid_types = valid;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -632,7 +846,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -641,7 +855,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -716,9 +930,9 @@ bool Variant::is_zero() const {
return _data._int == 0;
} break;
- case REAL: {
+ case FLOAT: {
- return _data._real == 0;
+ return _data._float == 0;
} break;
case STRING: {
@@ -733,11 +947,21 @@ bool Variant::is_zero() const {
return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2();
} break;
+ case VECTOR2I: {
+
+ return *reinterpret_cast<const Vector2i *>(_data._mem) == Vector2i();
+
+ } break;
case RECT2: {
return *reinterpret_cast<const Rect2 *>(_data._mem) == Rect2();
} break;
+ case RECT2I: {
+
+ return *reinterpret_cast<const Rect2i *>(_data._mem) == Rect2i();
+
+ } break;
case TRANSFORM2D: {
return *_data._transform2d == Transform2D();
@@ -748,6 +972,11 @@ bool Variant::is_zero() const {
return *reinterpret_cast<const Vector3 *>(_data._mem) == Vector3();
} break;
+ case VECTOR3I: {
+
+ return *reinterpret_cast<const Vector3i *>(_data._mem) == Vector3i();
+
+ } break;
case PLANE: {
return *reinterpret_cast<const Plane *>(_data._mem) == Plane();
@@ -792,6 +1021,19 @@ bool Variant::is_zero() const {
return _get_obj().obj == NULL;
} break;
+ case CALLABLE: {
+
+ return reinterpret_cast<const Callable *>(_data._mem)->is_null();
+ } break;
+ case SIGNAL: {
+
+ return reinterpret_cast<const Signal *>(_data._mem)->is_null();
+ } break;
+ case STRING_NAME: {
+
+ return *reinterpret_cast<const StringName *>(_data._mem) != StringName();
+
+ } break;
case NODE_PATH: {
return reinterpret_cast<const NodePath *>(_data._mem)->is_empty();
@@ -809,39 +1051,49 @@ bool Variant::is_zero() const {
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ return PackedArrayRef<uint8_t>::get_array(_data.packed_array).size() == 0;
+
+ } break;
+ case PACKED_INT32_ARRAY: {
- return reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<int32_t>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- return reinterpret_cast<const PoolVector<int> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<int64_t>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- return reinterpret_cast<const PoolVector<real_t> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<float>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- return reinterpret_cast<const PoolVector<String> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<double>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- return reinterpret_cast<const PoolVector<Vector2> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<String>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- return reinterpret_cast<const PoolVector<Vector3> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<Vector2>::get_array(_data.packed_array).size() == 0;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- return reinterpret_cast<const PoolVector<Color> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<Vector3>::get_array(_data.packed_array).size() == 0;
+
+ } break;
+ case PACKED_COLOR_ARRAY: {
+
+ return PackedArrayRef<Color>::get_array(_data.packed_array).size() == 0;
} break;
default: {
@@ -869,9 +1121,9 @@ bool Variant::is_one() const {
return _data._int == 1;
} break;
- case REAL: {
+ case FLOAT: {
- return _data._real == 1;
+ return _data._float == 1;
} break;
case VECTOR2: {
@@ -879,16 +1131,31 @@ bool Variant::is_one() const {
return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2(1, 1);
} break;
+ case VECTOR2I: {
+
+ return *reinterpret_cast<const Vector2i *>(_data._mem) == Vector2i(1, 1);
+
+ } break;
case RECT2: {
return *reinterpret_cast<const Rect2 *>(_data._mem) == Rect2(1, 1, 1, 1);
} break;
+ case RECT2I: {
+
+ return *reinterpret_cast<const Rect2i *>(_data._mem) == Rect2i(1, 1, 1, 1);
+
+ } break;
case VECTOR3: {
return *reinterpret_cast<const Vector3 *>(_data._mem) == Vector3(1, 1, 1);
} break;
+ case VECTOR3I: {
+
+ return *reinterpret_cast<const Vector3i *>(_data._mem) == Vector3i(1, 1, 1);
+
+ } break;
case PLANE: {
return *reinterpret_cast<const Plane *>(_data._mem) == Plane(1, 1, 1, 1);
@@ -922,7 +1189,7 @@ void Variant::reference(const Variant &p_variant) {
case NIL:
case BOOL:
case INT:
- case REAL:
+ case FLOAT:
break;
default:
clear();
@@ -945,9 +1212,9 @@ void Variant::reference(const Variant &p_variant) {
_data._int = p_variant._data._int;
} break;
- case REAL: {
+ case FLOAT: {
- _data._real = p_variant._data._real;
+ _data._float = p_variant._data._float;
} break;
case STRING: {
@@ -959,10 +1226,18 @@ void Variant::reference(const Variant &p_variant) {
memnew_placement(_data._mem, Vector2(*reinterpret_cast<const Vector2 *>(p_variant._data._mem)));
} break;
+ case VECTOR2I: {
+
+ memnew_placement(_data._mem, Vector2i(*reinterpret_cast<const Vector2i *>(p_variant._data._mem)));
+ } break;
case RECT2: {
memnew_placement(_data._mem, Rect2(*reinterpret_cast<const Rect2 *>(p_variant._data._mem)));
} break;
+ case RECT2I: {
+
+ memnew_placement(_data._mem, Rect2i(*reinterpret_cast<const Rect2i *>(p_variant._data._mem)));
+ } break;
case TRANSFORM2D: {
_data._transform2d = memnew(Transform2D(*p_variant._data._transform2d));
@@ -971,6 +1246,10 @@ void Variant::reference(const Variant &p_variant) {
memnew_placement(_data._mem, Vector3(*reinterpret_cast<const Vector3 *>(p_variant._data._mem)));
} break;
+ case VECTOR3I: {
+
+ memnew_placement(_data._mem, Vector3i(*reinterpret_cast<const Vector3i *>(p_variant._data._mem)));
+ } break;
case PLANE: {
memnew_placement(_data._mem, Plane(*reinterpret_cast<const Plane *>(p_variant._data._mem)));
@@ -1022,6 +1301,19 @@ void Variant::reference(const Variant &p_variant) {
_get_obj().id = p_variant._get_obj().id;
} break;
+ case CALLABLE: {
+
+ memnew_placement(_data._mem, Callable(*reinterpret_cast<const Callable *>(p_variant._data._mem)));
+ } break;
+ case SIGNAL: {
+
+ memnew_placement(_data._mem, Signal(*reinterpret_cast<const Signal *>(p_variant._data._mem)));
+ } break;
+ case STRING_NAME: {
+
+ memnew_placement(_data._mem, StringName(*reinterpret_cast<const StringName *>(p_variant._data._mem)));
+
+ } break;
case NODE_PATH: {
memnew_placement(_data._mem, NodePath(*reinterpret_cast<const NodePath *>(p_variant._data._mem)));
@@ -1039,39 +1331,76 @@ void Variant::reference(const Variant &p_variant) {
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
- memnew_placement(_data._mem, PoolVector<uint8_t>(*reinterpret_cast<const PoolVector<uint8_t> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<uint8_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<uint8_t>::create();
+ }
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- memnew_placement(_data._mem, PoolVector<int>(*reinterpret_cast<const PoolVector<int> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<int32_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<int32_t>::create();
+ }
+
+ } break;
+ case PACKED_INT64_ARRAY: {
+
+ _data.packed_array = static_cast<PackedArrayRef<int64_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<int64_t>::create();
+ }
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ _data.packed_array = static_cast<PackedArrayRef<float> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<float>::create();
+ }
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- memnew_placement(_data._mem, PoolVector<real_t>(*reinterpret_cast<const PoolVector<real_t> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<double> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<double>::create();
+ }
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- memnew_placement(_data._mem, PoolVector<String>(*reinterpret_cast<const PoolVector<String> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<String> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<String>::create();
+ }
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- memnew_placement(_data._mem, PoolVector<Vector2>(*reinterpret_cast<const PoolVector<Vector2> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Vector2> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Vector2>::create();
+ }
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- memnew_placement(_data._mem, PoolVector<Vector3>(*reinterpret_cast<const PoolVector<Vector3> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Vector3> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Vector3>::create();
+ }
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
- memnew_placement(_data._mem, PoolVector<Color>(*reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Color> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Color>::create();
+ }
} break;
default: {
@@ -1084,10 +1413,13 @@ void Variant::zero() {
case NIL: break;
case BOOL: this->_data._bool = false; break;
case INT: this->_data._int = 0; break;
- case REAL: this->_data._real = 0; break;
+ case FLOAT: this->_data._float = 0; break;
case VECTOR2: *reinterpret_cast<Vector2 *>(this->_data._mem) = Vector2(); break;
+ case VECTOR2I: *reinterpret_cast<Vector2i *>(this->_data._mem) = Vector2i(); break;
case RECT2: *reinterpret_cast<Rect2 *>(this->_data._mem) = Rect2(); break;
+ case RECT2I: *reinterpret_cast<Rect2i *>(this->_data._mem) = Rect2i(); break;
case VECTOR3: *reinterpret_cast<Vector3 *>(this->_data._mem) = Vector3(); break;
+ case VECTOR3I: *reinterpret_cast<Vector3i *>(this->_data._mem) = Vector3i(); break;
case PLANE: *reinterpret_cast<Plane *>(this->_data._mem) = Plane(); break;
case QUAT: *reinterpret_cast<Quat *>(this->_data._mem) = Quat(); break;
case COLOR: *reinterpret_cast<Color *>(this->_data._mem) = Color(); break;
@@ -1128,7 +1460,11 @@ void Variant::clear() {
memdelete(_data._transform);
} break;
- // misc types
+ // misc types
+ case STRING_NAME: {
+
+ reinterpret_cast<StringName *>(_data._mem)->~StringName();
+ } break;
case NODE_PATH: {
reinterpret_cast<NodePath *>(_data._mem)->~NodePath();
@@ -1149,6 +1485,14 @@ void Variant::clear() {
// not much need probably
reinterpret_cast<RID *>(_data._mem)->~RID();
} break;
+ case CALLABLE: {
+
+ reinterpret_cast<Callable *>(_data._mem)->~Callable();
+ } break;
+ case SIGNAL: {
+
+ reinterpret_cast<Signal *>(_data._mem)->~Signal();
+ } break;
case DICTIONARY: {
reinterpret_cast<Dictionary *>(_data._mem)->~Dictionary();
@@ -1158,33 +1502,41 @@ void Variant::clear() {
reinterpret_cast<Array *>(_data._mem)->~Array();
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ PackedArrayRefBase::destroy(_data.packed_array);
+ } break;
+ case PACKED_INT32_ARRAY: {
- reinterpret_cast<PoolVector<uint8_t> *>(_data._mem)->~PoolVector<uint8_t>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- reinterpret_cast<PoolVector<int> *>(_data._mem)->~PoolVector<int>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- reinterpret_cast<PoolVector<real_t> *>(_data._mem)->~PoolVector<real_t>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- reinterpret_cast<PoolVector<String> *>(_data._mem)->~PoolVector<String>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- reinterpret_cast<PoolVector<Vector2> *>(_data._mem)->~PoolVector<Vector2>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- reinterpret_cast<PoolVector<Vector3> *>(_data._mem)->~PoolVector<Vector3>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- reinterpret_cast<PoolVector<Color> *>(_data._mem)->~PoolVector<Color>();
+ PackedArrayRefBase::destroy(_data.packed_array);
+ } break;
+ case PACKED_COLOR_ARRAY: {
+
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
default: {
} /* not needed */
@@ -1200,7 +1552,7 @@ Variant::operator signed int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1215,7 +1567,7 @@ Variant::operator unsigned int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1231,7 +1583,7 @@ Variant::operator int64_t() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int64();
default: {
@@ -1248,7 +1600,7 @@ Variant::operator long unsigned int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1267,7 +1619,7 @@ Variant::operator uint64_t() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1279,6 +1631,8 @@ Variant::operator uint64_t() const {
Variant::operator ObjectID() const {
if (type == INT) {
return ObjectID(_data._int);
+ } else if (type == OBJECT) {
+ return _get_obj().id;
} else {
return ObjectID();
}
@@ -1292,7 +1646,7 @@ Variant::operator signed long() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1310,7 +1664,7 @@ Variant::operator unsigned long() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1329,7 +1683,7 @@ Variant::operator signed short() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1344,7 +1698,7 @@ Variant::operator unsigned short() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1359,7 +1713,7 @@ Variant::operator signed char() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1374,7 +1728,7 @@ Variant::operator unsigned char() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1395,7 +1749,7 @@ Variant::operator float() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1.0 : 0.0;
case INT: return (float)_data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_double();
default: {
@@ -1410,7 +1764,7 @@ Variant::operator double() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1.0 : 0.0;
case INT: return (double)_data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_double();
default: {
@@ -1421,10 +1775,13 @@ Variant::operator double() const {
Variant::operator StringName() const {
- if (type == NODE_PATH) {
- return reinterpret_cast<const NodePath *>(_data._mem)->get_sname();
+ if (type == STRING_NAME) {
+ return *reinterpret_cast<const StringName *>(_data._mem);
+ } else if (type == STRING) {
+ return *reinterpret_cast<const String *>(_data._mem);
}
- return StringName(operator String());
+
+ return StringName();
}
struct _VariantStrPair {
@@ -1450,16 +1807,19 @@ String Variant::stringify(List<const void *> &stack) const {
case NIL: return "Null";
case BOOL: return _data._bool ? "True" : "False";
case INT: return itos(_data._int);
- case REAL: return rtos(_data._real);
+ case FLOAT: return rtos(_data._float);
case STRING: return *reinterpret_cast<const String *>(_data._mem);
case VECTOR2: return "(" + operator Vector2() + ")";
+ case VECTOR2I: return "(" + operator Vector2i() + ")";
case RECT2: return "(" + operator Rect2() + ")";
+ case RECT2I: return "(" + operator Rect2i() + ")";
case TRANSFORM2D: {
Transform2D mat32 = operator Transform2D();
return "(" + Variant(mat32.elements[0]).operator String() + ", " + Variant(mat32.elements[1]).operator String() + ", " + Variant(mat32.elements[2]).operator String() + ")";
} break;
case VECTOR3: return "(" + operator Vector3() + ")";
+ case VECTOR3I: return "(" + operator Vector3i() + ")";
case PLANE:
return operator Plane();
//case QUAT:
@@ -1491,6 +1851,7 @@ String Variant::stringify(List<const void *> &stack) const {
return mtx + ")";
} break;
case TRANSFORM: return operator Transform();
+ case STRING_NAME: return operator StringName();
case NODE_PATH: return operator NodePath();
case COLOR: return String::num(operator Color().r) + "," + String::num(operator Color().g) + "," + String::num(operator Color().b) + "," + String::num(operator Color().a);
case DICTIONARY: {
@@ -1529,9 +1890,9 @@ String Variant::stringify(List<const void *> &stack) const {
return str;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- PoolVector<Vector2> vec = operator PoolVector<Vector2>();
+ Vector<Vector2> vec = operator Vector<Vector2>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1542,9 +1903,9 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- PoolVector<Vector3> vec = operator PoolVector<Vector3>();
+ Vector<Vector3> vec = operator Vector<Vector3>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1555,9 +1916,9 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- PoolVector<String> vec = operator PoolVector<String>();
+ Vector<String> vec = operator Vector<String>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1568,9 +1929,9 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- PoolVector<int> vec = operator PoolVector<int>();
+ Vector<int32_t> vec = operator Vector<int32_t>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1581,9 +1942,35 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- PoolVector<real_t> vec = operator PoolVector<real_t>();
+ Vector<int64_t> vec = operator Vector<int64_t>();
+ String str("[");
+ for (int i = 0; i < vec.size(); i++) {
+
+ if (i > 0)
+ str += ", ";
+ str = str + itos(vec[i]);
+ }
+ str += "]";
+ return str;
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ Vector<float> vec = operator Vector<float>();
+ String str("[");
+ for (int i = 0; i < vec.size(); i++) {
+
+ if (i > 0)
+ str += ", ";
+ str = str + rtos(vec[i]);
+ }
+ str += "]";
+ return str;
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ Vector<double> vec = operator Vector<double>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1627,6 +2014,18 @@ String Variant::stringify(List<const void *> &stack) const {
return "[Object:null]";
} break;
+ case CALLABLE: {
+ const Callable &c = *reinterpret_cast<const Callable *>(_data._mem);
+ return c;
+ } break;
+ case SIGNAL: {
+ const Signal &s = *reinterpret_cast<const Signal *>(_data._mem);
+ return s;
+ } break;
+ case _RID: {
+ const RID &s = *reinterpret_cast<const RID *>(_data._mem);
+ return "RID(" + itos(s.get_id()) + ")";
+ } break;
default: {
return "[" + get_type_name(type) + "]";
}
@@ -1639,28 +2038,78 @@ Variant::operator Vector2() const {
if (type == VECTOR2)
return *reinterpret_cast<const Vector2 *>(_data._mem);
+ else if (type == VECTOR2I)
+ return *reinterpret_cast<const Vector2i *>(_data._mem);
else if (type == VECTOR3)
return Vector2(reinterpret_cast<const Vector3 *>(_data._mem)->x, reinterpret_cast<const Vector3 *>(_data._mem)->y);
+ else if (type == VECTOR3I)
+ return Vector2(reinterpret_cast<const Vector3i *>(_data._mem)->x, reinterpret_cast<const Vector3i *>(_data._mem)->y);
else
return Vector2();
}
+
+Variant::operator Vector2i() const {
+
+ if (type == VECTOR2I)
+ return *reinterpret_cast<const Vector2i *>(_data._mem);
+ else if (type == VECTOR2)
+ return *reinterpret_cast<const Vector2 *>(_data._mem);
+ else if (type == VECTOR3)
+ return Vector2(reinterpret_cast<const Vector3 *>(_data._mem)->x, reinterpret_cast<const Vector3 *>(_data._mem)->y);
+ else if (type == VECTOR3I)
+ return Vector2(reinterpret_cast<const Vector3i *>(_data._mem)->x, reinterpret_cast<const Vector3i *>(_data._mem)->y);
+ else
+ return Vector2i();
+}
+
Variant::operator Rect2() const {
if (type == RECT2)
return *reinterpret_cast<const Rect2 *>(_data._mem);
+ else if (type == RECT2I)
+ return *reinterpret_cast<const Rect2i *>(_data._mem);
else
return Rect2();
}
+Variant::operator Rect2i() const {
+
+ if (type == RECT2I)
+ return *reinterpret_cast<const Rect2i *>(_data._mem);
+ else if (type == RECT2)
+ return *reinterpret_cast<const Rect2 *>(_data._mem);
+ else
+ return Rect2i();
+}
+
Variant::operator Vector3() const {
if (type == VECTOR3)
return *reinterpret_cast<const Vector3 *>(_data._mem);
+ else if (type == VECTOR3I)
+ return *reinterpret_cast<const Vector3i *>(_data._mem);
else if (type == VECTOR2)
return Vector3(reinterpret_cast<const Vector2 *>(_data._mem)->x, reinterpret_cast<const Vector2 *>(_data._mem)->y, 0.0);
+ else if (type == VECTOR2I)
+ return Vector3(reinterpret_cast<const Vector2i *>(_data._mem)->x, reinterpret_cast<const Vector2i *>(_data._mem)->y, 0.0);
else
return Vector3();
}
+
+Variant::operator Vector3i() const {
+
+ if (type == VECTOR3I)
+ return *reinterpret_cast<const Vector3i *>(_data._mem);
+ else if (type == VECTOR3)
+ return *reinterpret_cast<const Vector3 *>(_data._mem);
+ else if (type == VECTOR2)
+ return Vector3i(reinterpret_cast<const Vector2 *>(_data._mem)->x, reinterpret_cast<const Vector2 *>(_data._mem)->y, 0.0);
+ else if (type == VECTOR2I)
+ return Vector3i(reinterpret_cast<const Vector2i *>(_data._mem)->x, reinterpret_cast<const Vector2i *>(_data._mem)->y, 0.0);
+ else
+ return Vector3i();
+}
+
Variant::operator Plane() const {
if (type == PLANE)
@@ -1776,9 +2225,9 @@ Variant::operator RID() const {
ERR_FAIL_COND_V_MSG(ObjectDB::get_instance(_get_obj().id) == nullptr, RID(), "Invalid pointer (object was freed).");
};
#endif
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->get_rid, NULL, 0, ce);
- if (ce.error == Variant::CallError::CALL_OK && ret.get_type() == Variant::_RID) {
+ if (ce.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::_RID) {
return ret;
}
return RID();
@@ -1836,6 +2285,22 @@ Variant::operator Dictionary() const {
return Dictionary();
}
+Variant::operator Callable() const {
+
+ if (type == CALLABLE)
+ return *reinterpret_cast<const Callable *>(_data._mem);
+ else
+ return Callable();
+}
+
+Variant::operator Signal() const {
+
+ if (type == SIGNAL)
+ return *reinterpret_cast<const Signal *>(_data._mem);
+ else
+ return Signal();
+}
+
template <class DA, class SA>
inline DA _convert_array(const SA &p_array) {
@@ -1858,26 +2323,32 @@ inline DA _convert_array_from_variant(const Variant &p_variant) {
case Variant::ARRAY: {
return _convert_array<DA, Array>(p_variant.operator Array());
}
- case Variant::POOL_BYTE_ARRAY: {
- return _convert_array<DA, PoolVector<uint8_t> >(p_variant.operator PoolVector<uint8_t>());
+ case Variant::PACKED_BYTE_ARRAY: {
+ return _convert_array<DA, Vector<uint8_t> >(p_variant.operator Vector<uint8_t>());
+ }
+ case Variant::PACKED_INT32_ARRAY: {
+ return _convert_array<DA, Vector<int32_t> >(p_variant.operator Vector<int32_t>());
}
- case Variant::POOL_INT_ARRAY: {
- return _convert_array<DA, PoolVector<int> >(p_variant.operator PoolVector<int>());
+ case Variant::PACKED_INT64_ARRAY: {
+ return _convert_array<DA, Vector<int64_t> >(p_variant.operator Vector<int64_t>());
}
- case Variant::POOL_REAL_ARRAY: {
- return _convert_array<DA, PoolVector<real_t> >(p_variant.operator PoolVector<real_t>());
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ return _convert_array<DA, Vector<float> >(p_variant.operator Vector<float>());
}
- case Variant::POOL_STRING_ARRAY: {
- return _convert_array<DA, PoolVector<String> >(p_variant.operator PoolVector<String>());
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ return _convert_array<DA, Vector<double> >(p_variant.operator Vector<double>());
}
- case Variant::POOL_VECTOR2_ARRAY: {
- return _convert_array<DA, PoolVector<Vector2> >(p_variant.operator PoolVector<Vector2>());
+ case Variant::PACKED_STRING_ARRAY: {
+ return _convert_array<DA, Vector<String> >(p_variant.operator Vector<String>());
}
- case Variant::POOL_VECTOR3_ARRAY: {
- return _convert_array<DA, PoolVector<Vector3> >(p_variant.operator PoolVector<Vector3>());
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ return _convert_array<DA, Vector<Vector2> >(p_variant.operator Vector<Vector2>());
}
- case Variant::POOL_COLOR_ARRAY: {
- return _convert_array<DA, PoolVector<Color> >(p_variant.operator PoolVector<Color>());
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ return _convert_array<DA, Vector<Vector3> >(p_variant.operator Vector<Vector3>());
+ }
+ case Variant::PACKED_COLOR_ARRAY: {
+ return _convert_array<DA, Vector<Color> >(p_variant.operator Vector<Color>());
}
default: {
return DA();
@@ -1893,56 +2364,72 @@ Variant::operator Array() const {
return _convert_array_from_variant<Array>(*this);
}
-Variant::operator PoolVector<uint8_t>() const {
+Variant::operator Vector<uint8_t>() const {
+
+ if (type == PACKED_BYTE_ARRAY)
+ return static_cast<PackedArrayRef<uint8_t> *>(_data.packed_array)->array;
+ else
+ return _convert_array_from_variant<Vector<uint8_t> >(*this);
+}
+Variant::operator Vector<int32_t>() const {
+
+ if (type == PACKED_INT32_ARRAY)
+ return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array;
+ else
+ return _convert_array_from_variant<Vector<int> >(*this);
+}
+Variant::operator Vector<int64_t>() const {
- if (type == POOL_BYTE_ARRAY)
- return *reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ if (type == PACKED_INT64_ARRAY)
+ return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<uint8_t> >(*this);
+ return _convert_array_from_variant<Vector<int64_t> >(*this);
}
-Variant::operator PoolVector<int>() const {
- if (type == POOL_INT_ARRAY)
- return *reinterpret_cast<const PoolVector<int> *>(_data._mem);
+Variant::operator Vector<float>() const {
+
+ if (type == PACKED_FLOAT32_ARRAY)
+ return static_cast<PackedArrayRef<float> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<int> >(*this);
+ return _convert_array_from_variant<Vector<float> >(*this);
}
-Variant::operator PoolVector<real_t>() const {
- if (type == POOL_REAL_ARRAY)
- return *reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+Variant::operator Vector<double>() const {
+
+ if (type == PACKED_FLOAT64_ARRAY)
+ return static_cast<PackedArrayRef<double> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<real_t> >(*this);
+ return _convert_array_from_variant<Vector<double> >(*this);
}
-Variant::operator PoolVector<String>() const {
+Variant::operator Vector<String>() const {
- if (type == POOL_STRING_ARRAY)
- return *reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ if (type == PACKED_STRING_ARRAY)
+ return static_cast<PackedArrayRef<String> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<String> >(*this);
+ return _convert_array_from_variant<Vector<String> >(*this);
}
-Variant::operator PoolVector<Vector3>() const {
+Variant::operator Vector<Vector3>() const {
- if (type == POOL_VECTOR3_ARRAY)
- return *reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ if (type == PACKED_VECTOR3_ARRAY)
+ return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<Vector3> >(*this);
+ return _convert_array_from_variant<Vector<Vector3> >(*this);
}
-Variant::operator PoolVector<Vector2>() const {
+Variant::operator Vector<Vector2>() const {
- if (type == POOL_VECTOR2_ARRAY)
- return *reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ if (type == PACKED_VECTOR2_ARRAY)
+ return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<Vector2> >(*this);
+ return _convert_array_from_variant<Vector<Vector2> >(*this);
}
-Variant::operator PoolVector<Color>() const {
+Variant::operator Vector<Color>() const {
- if (type == POOL_COLOR_ARRAY)
- return *reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ if (type == PACKED_COLOR_ARRAY)
+ return static_cast<PackedArrayRef<Color> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<PoolVector<Color> >(*this);
+ return _convert_array_from_variant<Vector<Color> >(*this);
}
/* helpers */
@@ -1957,33 +2444,16 @@ Variant::operator Vector<RID>() const {
return rids;
}
-Variant::operator Vector<Vector2>() const {
-
- PoolVector<Vector2> from = operator PoolVector<Vector2>();
- Vector<Vector2> to;
- int len = from.size();
- if (len == 0)
- return Vector<Vector2>();
- to.resize(len);
- PoolVector<Vector2>::Read r = from.read();
- Vector2 *w = to.ptrw();
- for (int i = 0; i < len; i++) {
-
- w[i] = r[i];
- }
- return to;
-}
-
-Variant::operator PoolVector<Plane>() const {
+Variant::operator Vector<Plane>() const {
Array va = operator Array();
- PoolVector<Plane> planes;
+ Vector<Plane> planes;
int va_size = va.size();
if (va_size == 0)
return planes;
planes.resize(va_size);
- PoolVector<Plane>::Write w = planes.write();
+ Plane *w = planes.ptrw();
for (int i = 0; i < va_size; i++)
w[i] = va[i];
@@ -1991,17 +2461,17 @@ Variant::operator PoolVector<Plane>() const {
return planes;
}
-Variant::operator PoolVector<Face3>() const {
+Variant::operator Vector<Face3>() const {
- PoolVector<Vector3> va = operator PoolVector<Vector3>();
- PoolVector<Face3> faces;
+ Vector<Vector3> va = operator Vector<Vector3>();
+ Vector<Face3> faces;
int va_size = va.size();
if (va_size == 0)
return faces;
faces.resize(va_size / 3);
- PoolVector<Face3>::Write w = faces.write();
- PoolVector<Vector3>::Read r = va.read();
+ Face3 *w = faces.ptrw();
+ const Vector3 *r = va.ptr();
for (int i = 0; i < va_size; i++)
w[i / 3].vertex[i % 3] = r[i];
@@ -2009,87 +2479,24 @@ Variant::operator PoolVector<Face3>() const {
return faces;
}
-Variant::operator Vector<Plane>() const {
+Variant::operator Vector<Variant>() const {
Array va = operator Array();
- Vector<Plane> planes;
+ Vector<Variant> variants;
int va_size = va.size();
if (va_size == 0)
- return planes;
-
- planes.resize(va_size);
+ return variants;
+ variants.resize(va_size);
+ Variant *w = variants.ptrw();
for (int i = 0; i < va_size; i++)
- planes.write[i] = va[i];
-
- return planes;
-}
-
-Variant::operator Vector<Variant>() const {
-
- Array from = operator Array();
- Vector<Variant> to;
- int len = from.size();
- to.resize(len);
- for (int i = 0; i < len; i++) {
-
- to.write[i] = from[i];
- }
- return to;
-}
-
-Variant::operator Vector<uint8_t>() const {
-
- PoolVector<uint8_t> from = operator PoolVector<uint8_t>();
- Vector<uint8_t> to;
- int len = from.size();
- to.resize(len);
- for (int i = 0; i < len; i++) {
-
- to.write[i] = from[i];
- }
- return to;
-}
-Variant::operator Vector<int>() const {
-
- PoolVector<int> from = operator PoolVector<int>();
- Vector<int> to;
- int len = from.size();
- to.resize(len);
- for (int i = 0; i < len; i++) {
-
- to.write[i] = from[i];
- }
- return to;
-}
-Variant::operator Vector<real_t>() const {
-
- PoolVector<real_t> from = operator PoolVector<real_t>();
- Vector<real_t> to;
- int len = from.size();
- to.resize(len);
- for (int i = 0; i < len; i++) {
-
- to.write[i] = from[i];
- }
- return to;
-}
-
-Variant::operator Vector<String>() const {
-
- PoolVector<String> from = operator PoolVector<String>();
- Vector<String> to;
- int len = from.size();
- to.resize(len);
- for (int i = 0; i < len; i++) {
+ w[i] = va[i];
- to.write[i] = from[i];
- }
- return to;
+ return variants;
}
Variant::operator Vector<StringName>() const {
- PoolVector<String> from = operator PoolVector<String>();
+ Vector<String> from = operator Vector<String>();
Vector<StringName> to;
int len = from.size();
to.resize(len);
@@ -2100,39 +2507,6 @@ Variant::operator Vector<StringName>() const {
return to;
}
-Variant::operator Vector<Vector3>() const {
-
- PoolVector<Vector3> from = operator PoolVector<Vector3>();
- Vector<Vector3> to;
- int len = from.size();
- if (len == 0)
- return Vector<Vector3>();
- to.resize(len);
- PoolVector<Vector3>::Read r = from.read();
- Vector3 *w = to.ptrw();
- for (int i = 0; i < len; i++) {
-
- w[i] = r[i];
- }
- return to;
-}
-Variant::operator Vector<Color>() const {
-
- PoolVector<Color> from = operator PoolVector<Color>();
- Vector<Color> to;
- int len = from.size();
- if (len == 0)
- return Vector<Color>();
- to.resize(len);
- PoolVector<Color>::Read r = from.read();
- Color *w = to.ptrw();
- for (int i = 0; i < len; i++) {
-
- w[i] = r[i];
- }
- return to;
-}
-
Variant::operator Margin() const {
return (Margin) operator int();
@@ -2144,9 +2518,9 @@ Variant::operator Orientation() const {
Variant::operator IP_Address() const {
- if (type == POOL_REAL_ARRAY || type == POOL_INT_ARRAY || type == POOL_BYTE_ARRAY) {
+ if (type == PACKED_FLOAT32_ARRAY || type == PACKED_INT32_ARRAY || type == PACKED_FLOAT64_ARRAY || type == PACKED_INT64_ARRAY || type == PACKED_BYTE_ARRAY) {
- PoolVector<int> addr = operator PoolVector<int>();
+ Vector<int> addr = operator Vector<int>();
if (addr.size() == 4) {
return IP_Address(addr.get(0), addr.get(1), addr.get(2), addr.get(3));
}
@@ -2228,13 +2602,13 @@ Variant::Variant(unsigned char p_char) {
}
Variant::Variant(float p_float) {
- type = REAL;
- _data._real = p_float;
+ type = FLOAT;
+ _data._float = p_float;
}
Variant::Variant(double p_double) {
- type = REAL;
- _data._real = p_double;
+ type = FLOAT;
+ _data._float = p_double;
}
Variant::Variant(const ObjectID &p_id) {
@@ -2244,8 +2618,8 @@ Variant::Variant(const ObjectID &p_id) {
Variant::Variant(const StringName &p_string) {
- type = STRING;
- memnew_placement(_data._mem, String(p_string.operator String()));
+ type = STRING_NAME;
+ memnew_placement(_data._mem, StringName(p_string));
}
Variant::Variant(const String &p_string) {
@@ -2269,17 +2643,36 @@ Variant::Variant(const Vector3 &p_vector3) {
type = VECTOR3;
memnew_placement(_data._mem, Vector3(p_vector3));
}
+Variant::Variant(const Vector3i &p_vector3i) {
+
+ type = VECTOR3I;
+ memnew_placement(_data._mem, Vector3i(p_vector3i));
+}
+
Variant::Variant(const Vector2 &p_vector2) {
type = VECTOR2;
memnew_placement(_data._mem, Vector2(p_vector2));
}
+
+Variant::Variant(const Vector2i &p_vector2i) {
+
+ type = VECTOR2I;
+ memnew_placement(_data._mem, Vector2i(p_vector2i));
+}
+
Variant::Variant(const Rect2 &p_rect2) {
type = RECT2;
memnew_placement(_data._mem, Rect2(p_rect2));
}
+Variant::Variant(const Rect2i &p_rect2i) {
+
+ type = RECT2I;
+ memnew_placement(_data._mem, Rect2i(p_rect2i));
+}
+
Variant::Variant(const Plane &p_plane) {
type = PLANE;
@@ -2356,6 +2749,17 @@ Variant::Variant(const Object *p_object) {
}
}
+Variant::Variant(const Callable &p_callable) {
+
+ type = CALLABLE;
+ memnew_placement(_data._mem, Callable(p_callable));
+}
+Variant::Variant(const Signal &p_callable) {
+
+ type = SIGNAL;
+ memnew_placement(_data._mem, Signal(p_callable));
+}
+
Variant::Variant(const Dictionary &p_dictionary) {
type = DICTIONARY;
@@ -2368,20 +2772,6 @@ Variant::Variant(const Array &p_array) {
memnew_placement(_data._mem, Array(p_array));
}
-Variant::Variant(const PoolVector<Plane> &p_array) {
-
- type = ARRAY;
-
- Array *plane_array = memnew_placement(_data._mem, Array);
-
- plane_array->resize(p_array.size());
-
- for (int i = 0; i < p_array.size(); i++) {
-
- plane_array->operator[](i) = Variant(p_array[i]);
- }
-}
-
Variant::Variant(const Vector<Plane> &p_array) {
type = ARRAY;
@@ -2410,68 +2800,67 @@ Variant::Variant(const Vector<RID> &p_array) {
}
}
-Variant::Variant(const Vector<Vector2> &p_array) {
+Variant::Variant(const Vector<uint8_t> &p_byte_array) {
- type = NIL;
- PoolVector<Vector2> v;
- int len = p_array.size();
- if (len > 0) {
- v.resize(len);
- PoolVector<Vector2>::Write w = v.write();
- const Vector2 *r = p_array.ptr();
+ type = PACKED_BYTE_ARRAY;
- for (int i = 0; i < len; i++)
- w[i] = r[i];
- }
- *this = v;
+ _data.packed_array = PackedArrayRef<uint8_t>::create(p_byte_array);
+}
+Variant::Variant(const Vector<int32_t> &p_int32_array) {
+
+ type = PACKED_INT32_ARRAY;
+ _data.packed_array = PackedArrayRef<int32_t>::create(p_int32_array);
}
-Variant::Variant(const PoolVector<uint8_t> &p_raw_array) {
+Variant::Variant(const Vector<int64_t> &p_int64_array) {
- type = POOL_BYTE_ARRAY;
- memnew_placement(_data._mem, PoolVector<uint8_t>(p_raw_array));
+ type = PACKED_INT64_ARRAY;
+ _data.packed_array = PackedArrayRef<int64_t>::create(p_int64_array);
}
-Variant::Variant(const PoolVector<int> &p_int_array) {
- type = POOL_INT_ARRAY;
- memnew_placement(_data._mem, PoolVector<int>(p_int_array));
+Variant::Variant(const Vector<float> &p_float32_array) {
+
+ type = PACKED_FLOAT32_ARRAY;
+ _data.packed_array = PackedArrayRef<float>::create(p_float32_array);
}
-Variant::Variant(const PoolVector<real_t> &p_real_array) {
- type = POOL_REAL_ARRAY;
- memnew_placement(_data._mem, PoolVector<real_t>(p_real_array));
+Variant::Variant(const Vector<double> &p_float64_array) {
+
+ type = PACKED_FLOAT64_ARRAY;
+ _data.packed_array = PackedArrayRef<double>::create(p_float64_array);
}
-Variant::Variant(const PoolVector<String> &p_string_array) {
- type = POOL_STRING_ARRAY;
- memnew_placement(_data._mem, PoolVector<String>(p_string_array));
+Variant::Variant(const Vector<String> &p_string_array) {
+
+ type = PACKED_STRING_ARRAY;
+ _data.packed_array = PackedArrayRef<String>::create(p_string_array);
}
-Variant::Variant(const PoolVector<Vector3> &p_vector3_array) {
+Variant::Variant(const Vector<Vector3> &p_vector3_array) {
- type = POOL_VECTOR3_ARRAY;
- memnew_placement(_data._mem, PoolVector<Vector3>(p_vector3_array));
+ type = PACKED_VECTOR3_ARRAY;
+ _data.packed_array = PackedArrayRef<Vector3>::create(p_vector3_array);
}
-Variant::Variant(const PoolVector<Vector2> &p_vector2_array) {
+Variant::Variant(const Vector<Vector2> &p_vector2_array) {
- type = POOL_VECTOR2_ARRAY;
- memnew_placement(_data._mem, PoolVector<Vector2>(p_vector2_array));
+ type = PACKED_VECTOR2_ARRAY;
+ _data.packed_array = PackedArrayRef<Vector2>::create(p_vector2_array);
}
-Variant::Variant(const PoolVector<Color> &p_color_array) {
+Variant::Variant(const Vector<Color> &p_color_array) {
- type = POOL_COLOR_ARRAY;
- memnew_placement(_data._mem, PoolVector<Color>(p_color_array));
+ type = PACKED_COLOR_ARRAY;
+ _data.packed_array = PackedArrayRef<Color>::create(p_color_array);
}
-Variant::Variant(const PoolVector<Face3> &p_face_array) {
+Variant::Variant(const Vector<Face3> &p_face_array) {
- PoolVector<Vector3> vertices;
+ Vector<Vector3> vertices;
int face_count = p_face_array.size();
vertices.resize(face_count * 3);
if (face_count) {
- PoolVector<Face3>::Read r = p_face_array.read();
- PoolVector<Vector3>::Write w = vertices.write();
+ const Face3 *r = p_face_array.ptr();
+ Vector3 *w = vertices.ptrw();
for (int i = 0; i < face_count; i++) {
@@ -2486,93 +2875,20 @@ Variant::Variant(const PoolVector<Face3> &p_face_array) {
}
/* helpers */
-
Variant::Variant(const Vector<Variant> &p_array) {
-
- type = NIL;
- Array v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<uint8_t> &p_array) {
-
- type = NIL;
- PoolVector<uint8_t> v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<int> &p_array) {
-
- type = NIL;
- PoolVector<int> v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<real_t> &p_array) {
-
- type = NIL;
- PoolVector<real_t> v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<String> &p_array) {
-
- type = NIL;
- PoolVector<String> v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<StringName> &p_array) {
-
- type = NIL;
- PoolVector<String> v;
- int len = p_array.size();
- v.resize(len);
- for (int i = 0; i < len; i++)
- v.set(i, p_array[i]);
- *this = v;
-}
-
-Variant::Variant(const Vector<Vector3> &p_array) {
-
type = NIL;
- PoolVector<Vector3> v;
- int len = p_array.size();
- if (len > 0) {
- v.resize(len);
- PoolVector<Vector3>::Write w = v.write();
- const Vector3 *r = p_array.ptr();
-
- for (int i = 0; i < len; i++)
- w[i] = r[i];
+ Array arr;
+ arr.resize(p_array.size());
+ for (int i = 0; i < p_array.size(); i++) {
+ arr[i] = p_array[i];
}
- *this = v;
+ *this = arr;
}
-Variant::Variant(const Vector<Color> &p_array) {
+Variant::Variant(const Vector<StringName> &p_array) {
type = NIL;
- PoolVector<Color> v;
+ Vector<String> v;
int len = p_array.size();
v.resize(len);
for (int i = 0; i < len; i++)
@@ -2605,9 +2921,9 @@ void Variant::operator=(const Variant &p_variant) {
_data._int = p_variant._data._int;
} break;
- case REAL: {
+ case FLOAT: {
- _data._real = p_variant._data._real;
+ _data._float = p_variant._data._float;
} break;
case STRING: {
@@ -2619,10 +2935,18 @@ void Variant::operator=(const Variant &p_variant) {
*reinterpret_cast<Vector2 *>(_data._mem) = *reinterpret_cast<const Vector2 *>(p_variant._data._mem);
} break;
+ case VECTOR2I: {
+
+ *reinterpret_cast<Vector2i *>(_data._mem) = *reinterpret_cast<const Vector2i *>(p_variant._data._mem);
+ } break;
case RECT2: {
*reinterpret_cast<Rect2 *>(_data._mem) = *reinterpret_cast<const Rect2 *>(p_variant._data._mem);
} break;
+ case RECT2I: {
+
+ *reinterpret_cast<Rect2i *>(_data._mem) = *reinterpret_cast<const Rect2i *>(p_variant._data._mem);
+ } break;
case TRANSFORM2D: {
*_data._transform2d = *(p_variant._data._transform2d);
@@ -2631,6 +2955,10 @@ void Variant::operator=(const Variant &p_variant) {
*reinterpret_cast<Vector3 *>(_data._mem) = *reinterpret_cast<const Vector3 *>(p_variant._data._mem);
} break;
+ case VECTOR3I: {
+
+ *reinterpret_cast<Vector3i *>(_data._mem) = *reinterpret_cast<const Vector3i *>(p_variant._data._mem);
+ } break;
case PLANE: {
*reinterpret_cast<Plane *>(_data._mem) = *reinterpret_cast<const Plane *>(p_variant._data._mem);
@@ -2685,6 +3013,19 @@ void Variant::operator=(const Variant &p_variant) {
_get_obj().id = p_variant._get_obj().id;
} break;
+ case CALLABLE: {
+
+ *reinterpret_cast<Callable *>(_data._mem) = *reinterpret_cast<const Callable *>(p_variant._data._mem);
+ } break;
+ case SIGNAL: {
+
+ *reinterpret_cast<Signal *>(_data._mem) = *reinterpret_cast<const Signal *>(p_variant._data._mem);
+ } break;
+
+ case STRING_NAME: {
+
+ *reinterpret_cast<StringName *>(_data._mem) = *reinterpret_cast<const StringName *>(p_variant._data._mem);
+ } break;
case NODE_PATH: {
*reinterpret_cast<NodePath *>(_data._mem) = *reinterpret_cast<const NodePath *>(p_variant._data._mem);
@@ -2699,33 +3040,41 @@ void Variant::operator=(const Variant &p_variant) {
} break;
// arrays
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
+
+ _data.packed_array = PackedArrayRef<uint8_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
+ } break;
+ case PACKED_INT32_ARRAY: {
+
+ _data.packed_array = PackedArrayRef<int32_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
+ } break;
+ case PACKED_INT64_ARRAY: {
- *reinterpret_cast<PoolVector<uint8_t> *>(_data._mem) = *reinterpret_cast<const PoolVector<uint8_t> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<int64_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- *reinterpret_cast<PoolVector<int> *>(_data._mem) = *reinterpret_cast<const PoolVector<int> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<float>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- *reinterpret_cast<PoolVector<real_t> *>(_data._mem) = *reinterpret_cast<const PoolVector<real_t> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<double>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
- *reinterpret_cast<PoolVector<String> *>(_data._mem) = *reinterpret_cast<const PoolVector<String> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<String>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- *reinterpret_cast<PoolVector<Vector2> *>(_data._mem) = *reinterpret_cast<const PoolVector<Vector2> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Vector2>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- *reinterpret_cast<PoolVector<Vector3> *>(_data._mem) = *reinterpret_cast<const PoolVector<Vector3> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Vector3>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
- *reinterpret_cast<PoolVector<Color> *>(_data._mem) = *reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Color>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
default: {
}
@@ -2765,9 +3114,9 @@ uint32_t Variant::hash() const {
return _data._int;
} break;
- case REAL: {
+ case FLOAT: {
- return hash_djb2_one_float(_data._real);
+ return hash_djb2_one_float(_data._float);
} break;
case STRING: {
@@ -2780,6 +3129,11 @@ uint32_t Variant::hash() const {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->x);
return hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->y, hash);
} break;
+ case VECTOR2I: {
+
+ uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->x);
+ return hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->y, hash);
+ } break;
case RECT2: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->position.x);
@@ -2787,6 +3141,13 @@ uint32_t Variant::hash() const {
hash = hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->size.x, hash);
return hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->size.y, hash);
} break;
+ case RECT2I: {
+
+ uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.x);
+ hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.y, hash);
+ hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.x, hash);
+ return hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.y, hash);
+ } break;
case TRANSFORM2D: {
uint32_t hash = 5831;
@@ -2805,6 +3166,12 @@ uint32_t Variant::hash() const {
hash = hash_djb2_one_float(reinterpret_cast<const Vector3 *>(_data._mem)->y, hash);
return hash_djb2_one_float(reinterpret_cast<const Vector3 *>(_data._mem)->z, hash);
} break;
+ case VECTOR3I: {
+
+ uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->x);
+ hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->y, hash);
+ return hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->z, hash);
+ } break;
case PLANE: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.x);
@@ -2883,6 +3250,10 @@ uint32_t Variant::hash() const {
return hash_djb2_one_64(make_uint64_t(_get_obj().obj));
} break;
+ case STRING_NAME: {
+
+ return reinterpret_cast<const StringName *>(_data._mem)->hash();
+ } break;
case NODE_PATH: {
return reinterpret_cast<const NodePath *>(_data._mem)->hash();
@@ -2892,57 +3263,93 @@ uint32_t Variant::hash() const {
return reinterpret_cast<const Dictionary *>(_data._mem)->hash();
} break;
+ case CALLABLE: {
+
+ return reinterpret_cast<const Callable *>(_data._mem)->hash();
+
+ } break;
+ case SIGNAL: {
+
+ const Signal &s = *reinterpret_cast<const Signal *>(_data._mem);
+ uint32_t hash = s.get_name().hash();
+ return hash_djb2_one_64(s.get_object_id(), hash);
+ } break;
case ARRAY: {
const Array &arr = *reinterpret_cast<const Array *>(_data._mem);
return arr.hash();
} break;
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
- const PoolVector<uint8_t> &arr = *reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> &arr = PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<uint8_t>::Read r = arr.read();
+ const uint8_t *r = arr.ptr();
return hash_djb2_buffer((uint8_t *)&r[0], len);
} else {
return hash_djb2_one_64(0);
}
} break;
- case POOL_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- const PoolVector<int> &arr = *reinterpret_cast<const PoolVector<int> *>(_data._mem);
+ const Vector<int32_t> &arr = PackedArrayRef<int32_t>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<int>::Read r = arr.read();
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int));
+ const int32_t *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int32_t));
} else {
return hash_djb2_one_64(0);
}
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- const PoolVector<real_t> &arr = *reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+ const Vector<int64_t> &arr = PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int len = arr.size();
+ if (likely(len)) {
+ const int64_t *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int64_t));
+ } else {
+ return hash_djb2_one_64(0);
+ }
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ const Vector<float> &arr = PackedArrayRef<float>::get_array(_data.packed_array);
+ int len = arr.size();
+
+ if (likely(len)) {
+ const float *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(float));
+ } else {
+ return hash_djb2_one_float(0.0);
+ }
+
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ const Vector<double> &arr = PackedArrayRef<double>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<real_t>::Read r = arr.read();
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(real_t));
+ const double *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(double));
} else {
return hash_djb2_one_float(0.0);
}
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
uint32_t hash = 5831;
- const PoolVector<String> &arr = *reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ const Vector<String> &arr = PackedArrayRef<String>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<String>::Read r = arr.read();
+ const String *r = arr.ptr();
for (int i = 0; i < len; i++) {
hash = hash_djb2_one_32(r[i].hash(), hash);
@@ -2951,14 +3358,14 @@ uint32_t Variant::hash() const {
return hash;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
uint32_t hash = 5831;
- const PoolVector<Vector2> &arr = *reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ const Vector<Vector2> &arr = PackedArrayRef<Vector2>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<Vector2>::Read r = arr.read();
+ const Vector2 *r = arr.ptr();
for (int i = 0; i < len; i++) {
hash = hash_djb2_one_float(r[i].x, hash);
@@ -2968,14 +3375,14 @@ uint32_t Variant::hash() const {
return hash;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
uint32_t hash = 5831;
- const PoolVector<Vector3> &arr = *reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ const Vector<Vector3> &arr = PackedArrayRef<Vector3>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<Vector3>::Read r = arr.read();
+ const Vector3 *r = arr.ptr();
for (int i = 0; i < len; i++) {
hash = hash_djb2_one_float(r[i].x, hash);
@@ -2986,14 +3393,14 @@ uint32_t Variant::hash() const {
return hash;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
uint32_t hash = 5831;
- const PoolVector<Color> &arr = *reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ const Vector<Color> &arr = PackedArrayRef<Color>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- PoolVector<Color>::Read r = arr.read();
+ const Color *r = arr.ptr();
for (int i = 0; i < len; i++) {
hash = hash_djb2_one_float(r[i].r, hash);
@@ -3036,21 +3443,21 @@ uint32_t Variant::hash() const {
(hash_compare_scalar((p_lhs).b, (p_rhs).b)) && \
(hash_compare_scalar((p_lhs).a, (p_rhs).a))
-#define hash_compare_pool_array(p_lhs, p_rhs, p_type, p_compare_func) \
- const PoolVector<p_type> &l = *reinterpret_cast<const PoolVector<p_type> *>(p_lhs); \
- const PoolVector<p_type> &r = *reinterpret_cast<const PoolVector<p_type> *>(p_rhs); \
- \
- if (l.size() != r.size()) \
- return false; \
- \
- PoolVector<p_type>::Read lr = l.read(); \
- PoolVector<p_type>::Read rr = r.read(); \
- \
- for (int i = 0; i < l.size(); ++i) { \
- if (!p_compare_func((lr[i]), (rr[i]))) \
- return false; \
- } \
- \
+#define hash_compare_packed_array(p_lhs, p_rhs, p_type, p_compare_func) \
+ const Vector<p_type> &l = PackedArrayRef<p_type>::get_array(p_lhs); \
+ const Vector<p_type> &r = PackedArrayRef<p_type>::get_array(p_rhs); \
+ \
+ if (l.size() != r.size()) \
+ return false; \
+ \
+ const p_type *lr = l.ptr(); \
+ const p_type *rr = r.ptr(); \
+ \
+ for (int i = 0; i < l.size(); ++i) { \
+ if (!p_compare_func((lr[i]), (rr[i]))) \
+ return false; \
+ } \
+ \
return true
bool Variant::hash_compare(const Variant &p_variant) const {
@@ -3058,8 +3465,8 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return false;
switch (type) {
- case REAL: {
- return hash_compare_scalar(_data._real, p_variant._data._real);
+ case FLOAT: {
+ return hash_compare_scalar(_data._float, p_variant._data._float);
} break;
case VECTOR2: {
@@ -3068,6 +3475,11 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return hash_compare_vector2(*l, *r);
} break;
+ case VECTOR2I: {
+ const Vector2i *l = reinterpret_cast<const Vector2i *>(_data._mem);
+ const Vector2i *r = reinterpret_cast<const Vector2i *>(p_variant._data._mem);
+ return *l == *r;
+ } break;
case RECT2: {
const Rect2 *l = reinterpret_cast<const Rect2 *>(_data._mem);
@@ -3076,6 +3488,12 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return (hash_compare_vector2(l->position, r->position)) &&
(hash_compare_vector2(l->size, r->size));
} break;
+ case RECT2I: {
+ const Rect2i *l = reinterpret_cast<const Rect2i *>(_data._mem);
+ const Rect2i *r = reinterpret_cast<const Rect2i *>(p_variant._data._mem);
+
+ return *l == *r;
+ } break;
case TRANSFORM2D: {
Transform2D *l = _data._transform2d;
@@ -3095,6 +3513,12 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return hash_compare_vector3(*l, *r);
} break;
+ case VECTOR3I: {
+ const Vector3i *l = reinterpret_cast<const Vector3i *>(_data._mem);
+ const Vector3i *r = reinterpret_cast<const Vector3i *>(p_variant._data._mem);
+
+ return *l == *r;
+ } break;
case PLANE: {
const Plane *l = reinterpret_cast<const Plane *>(_data._mem);
@@ -3166,20 +3590,25 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return true;
} break;
- case POOL_REAL_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, real_t, hash_compare_scalar);
+ // This is for floating point comparisons only.
+ case PACKED_FLOAT32_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, float, hash_compare_scalar);
} break;
- case POOL_VECTOR2_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector2, hash_compare_vector2);
+ case PACKED_FLOAT64_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, double, hash_compare_scalar);
} break;
- case POOL_VECTOR3_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector3, hash_compare_vector3);
+ case PACKED_VECTOR2_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector2, hash_compare_vector2);
} break;
- case POOL_COLOR_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Color, hash_compare_color);
+ case PACKED_VECTOR3_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector3, hash_compare_vector3);
+ } break;
+
+ case PACKED_COLOR_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Color, hash_compare_color);
} break;
default:
@@ -3270,24 +3699,24 @@ Variant Variant::call(const StringName &p_method, VARIANT_ARG_DECLARE) {
argc++;
}
- CallError error;
+ Callable::CallError error;
Variant ret = call(p_method, argptr, argc, error);
switch (error.error) {
- case CallError::CALL_ERROR_INVALID_ARGUMENT: {
+ case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: {
- String err = "Invalid type for argument #" + itos(error.argument) + ", expected '" + Variant::get_type_name(error.expected) + "'.";
+ String err = "Invalid type for argument #" + itos(error.argument) + ", expected '" + Variant::get_type_name(Variant::Type(error.expected)) + "'.";
ERR_PRINT(err.utf8().get_data());
} break;
- case CallError::CALL_ERROR_INVALID_METHOD: {
+ case Callable::CallError::CALL_ERROR_INVALID_METHOD: {
String err = "Invalid method '" + p_method + "' for type '" + Variant::get_type_name(type) + "'.";
ERR_PRINT(err.utf8().get_data());
} break;
- case CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
String err = "Too many arguments for method '" + p_method + "'";
ERR_PRINT(err.utf8().get_data());
@@ -3312,26 +3741,26 @@ String Variant::get_construct_string() const {
return vars;
}
-String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Variant::CallError &ce) {
+String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) {
String err_text;
- if (ce.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) {
int errorarg = ce.argument;
if (p_argptrs) {
- err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(ce.expected) + ".";
+ err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + ".";
} else {
- err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(ce.expected) + ".";
+ err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + ".";
}
- } else if (ce.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
+ } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + ".";
- } else if (ce.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
+ } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + ".";
- } else if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
err_text = "Method not found.";
- } else if (ce.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
+ } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
err_text = "Instance is null";
- } else if (ce.error == Variant::CallError::CALL_OK) {
+ } else if (ce.error == Callable::CallError::CALL_OK) {
return "Call OK";
}
@@ -3344,6 +3773,32 @@ String Variant::get_call_error_text(Object *p_base, const StringName &p_method,
return "'" + class_name + "::" + String(p_method) + "': " + err_text;
}
+String Variant::get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) {
+
+ String err_text;
+
+ if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ int errorarg = ce.argument;
+ if (p_argptrs) {
+ err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + ".";
+ } else {
+ err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + ".";
+ }
+ } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
+ err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + ".";
+ } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
+ err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + ".";
+ } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
+ err_text = "Method not found.";
+ } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
+ err_text = "Instance is null";
+ } else if (ce.error == Callable::CallError::CALL_OK) {
+ return "Call OK";
+ }
+
+ return String(p_callable) + " : " + err_text;
+}
+
String vformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) {
Array args;
diff --git a/core/variant.h b/core/variant.h
index bb3840932d..614d39e84a 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -32,6 +32,7 @@
#define VARIANT_H
#include "core/array.h"
+#include "core/callable.h"
#include "core/color.h"
#include "core/dictionary.h"
#include "core/io/ip_address.h"
@@ -43,9 +44,9 @@
#include "core/math/transform.h"
#include "core/math/transform_2d.h"
#include "core/math/vector3.h"
+#include "core/math/vector3i.h"
#include "core/node_path.h"
#include "core/object_id.h"
-#include "core/pool_vector.h"
#include "core/rid.h"
#include "core/ustring.h"
@@ -56,13 +57,15 @@ class Control; // helper
struct PropertyInfo;
struct MethodInfo;
-typedef PoolVector<uint8_t> PoolByteArray;
-typedef PoolVector<int> PoolIntArray;
-typedef PoolVector<real_t> PoolRealArray;
-typedef PoolVector<String> PoolStringArray;
-typedef PoolVector<Vector2> PoolVector2Array;
-typedef PoolVector<Vector3> PoolVector3Array;
-typedef PoolVector<Color> PoolColorArray;
+typedef Vector<uint8_t> PackedByteArray;
+typedef Vector<int32_t> PackedInt32Array;
+typedef Vector<int64_t> PackedInt64Array;
+typedef Vector<float> PackedFloat32Array;
+typedef Vector<double> PackedFloat64Array;
+typedef Vector<String> PackedStringArray;
+typedef Vector<Vector2> PackedVector2Array;
+typedef Vector<Vector3> PackedVector3Array;
+typedef Vector<Color> PackedColorArray;
// Temporary workaround until c++11 alignas()
#ifdef __GNUC__
@@ -75,46 +78,51 @@ class Variant {
public:
// If this changes the table in variant_op must be updated
enum Type {
-
NIL,
// atomic types
BOOL,
INT,
- REAL,
+ FLOAT,
STRING,
// math types
-
- VECTOR2, // 5
+ VECTOR2,
+ VECTOR2I,
RECT2,
+ RECT2I,
VECTOR3,
+ VECTOR3I,
TRANSFORM2D,
PLANE,
- QUAT, // 10
+ QUAT,
AABB,
BASIS,
TRANSFORM,
// misc types
COLOR,
- NODE_PATH, // 15
+ STRING_NAME,
+ NODE_PATH,
_RID,
OBJECT,
+ CALLABLE,
+ SIGNAL,
DICTIONARY,
ARRAY,
- // arrays
- POOL_BYTE_ARRAY, // 20
- POOL_INT_ARRAY,
- POOL_REAL_ARRAY,
- POOL_STRING_ARRAY,
- POOL_VECTOR2_ARRAY,
- POOL_VECTOR3_ARRAY, // 25
- POOL_COLOR_ARRAY,
+ // typed arrays
+ PACKED_BYTE_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
+ PACKED_STRING_ARRAY,
+ PACKED_VECTOR2_ARRAY,
+ PACKED_VECTOR3_ARRAY,
+ PACKED_COLOR_ARRAY,
VARIANT_MAX
-
};
private:
@@ -130,17 +138,77 @@ private:
Object *obj;
};
+ /* array helpers */
+ struct PackedArrayRefBase {
+ SafeRefCount refcount;
+ _FORCE_INLINE_ PackedArrayRefBase *reference() {
+ if (this->refcount.ref()) {
+ return this;
+ } else {
+ return nullptr;
+ }
+ }
+ static _FORCE_INLINE_ PackedArrayRefBase *reference_from(PackedArrayRefBase *p_base, PackedArrayRefBase *p_from) {
+ if (p_base == p_from) {
+ return p_base; //same thing, do nothing
+ }
+
+ if (p_from->reference()) {
+ if (p_base->refcount.unref()) {
+ memdelete(p_base);
+ }
+ return p_from;
+ } else {
+ return p_base; //keep, could not reference new
+ }
+ }
+ static _FORCE_INLINE_ void destroy(PackedArrayRefBase *p_array) {
+ if (p_array->refcount.unref()) {
+ memdelete(p_array);
+ }
+ }
+ _FORCE_INLINE_ virtual ~PackedArrayRefBase() {} //needs virtual destructor, but make inline
+ };
+
+ template <class T>
+ struct PackedArrayRef : public PackedArrayRefBase {
+ Vector<T> array;
+ static _FORCE_INLINE_ PackedArrayRef<T> *create() {
+ return memnew(PackedArrayRef<T>);
+ }
+ static _FORCE_INLINE_ PackedArrayRef<T> *create(const Vector<T> &p_from) {
+ return memnew(PackedArrayRef<T>(p_from));
+ }
+
+ static _FORCE_INLINE_ const Vector<T> &get_array(PackedArrayRefBase *p_base) {
+ return static_cast<PackedArrayRef<T> *>(p_base)->array;
+ }
+ static _FORCE_INLINE_ Vector<T> *get_array_ptr(const PackedArrayRefBase *p_base) {
+ return &const_cast<PackedArrayRef<T> *>(static_cast<const PackedArrayRef<T> *>(p_base))->array;
+ }
+
+ _FORCE_INLINE_ PackedArrayRef(const Vector<T> &p_from) {
+ array = p_from;
+ refcount.init();
+ }
+ _FORCE_INLINE_ PackedArrayRef() {
+ refcount.init();
+ }
+ };
+
+ /* end of array helpers */
_ALWAYS_INLINE_ ObjData &_get_obj();
_ALWAYS_INLINE_ const ObjData &_get_obj() const;
union {
bool _bool;
int64_t _int;
- double _real;
+ double _float;
Transform2D *_transform2d;
::AABB *_aabb;
Basis *_basis;
Transform *_transform;
+ PackedArrayRefBase *packed_array;
void *_ptr; //generic pointer
uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)];
} _data GCC_ALIGNED_8;
@@ -149,14 +217,20 @@ private:
void clear();
public:
- _FORCE_INLINE_ Type get_type() const { return type; }
+ _FORCE_INLINE_ Type get_type() const {
+ return type;
+ }
static String get_type_name(Variant::Type p_type);
static bool can_convert(Type p_type_from, Type p_type_to);
static bool can_convert_strict(Type p_type_from, Type p_type_to);
bool is_ref() const;
- _FORCE_INLINE_ bool is_num() const { return type == INT || type == REAL; };
- _FORCE_INLINE_ bool is_array() const { return type >= ARRAY; };
+ _FORCE_INLINE_ bool is_num() const {
+ return type == INT || type == FLOAT;
+ };
+ _FORCE_INLINE_ bool is_array() const {
+ return type >= ARRAY;
+ };
bool is_shared() const;
bool is_zero() const;
bool is_one() const;
@@ -185,8 +259,11 @@ public:
operator String() const;
operator StringName() const;
operator Vector2() const;
+ operator Vector2i() const;
operator Rect2() const;
+ operator Rect2i() const;
operator Vector3() const;
+ operator Vector3i() const;
operator Plane() const;
operator ::AABB() const;
operator Quat() const;
@@ -202,30 +279,27 @@ public:
operator Node *() const;
operator Control *() const;
+ operator Callable() const;
+ operator Signal() const;
+
operator Dictionary() const;
operator Array() const;
- operator PoolVector<uint8_t>() const;
- operator PoolVector<int>() const;
- operator PoolVector<real_t>() const;
- operator PoolVector<String>() const;
- operator PoolVector<Vector3>() const;
- operator PoolVector<Color>() const;
- operator PoolVector<Plane>() const;
- operator PoolVector<Face3>() const;
-
- operator Vector<Variant>() const;
operator Vector<uint8_t>() const;
- operator Vector<int>() const;
- operator Vector<real_t>() const;
+ operator Vector<int32_t>() const;
+ operator Vector<int64_t>() const;
+ operator Vector<float>() const;
+ operator Vector<double>() const;
operator Vector<String>() const;
- operator Vector<StringName>() const;
operator Vector<Vector3>() const;
operator Vector<Color>() const;
+ operator Vector<Plane>() const;
+ operator Vector<Face3>() const;
+
+ operator Vector<Variant>() const;
+ operator Vector<StringName>() const;
operator Vector<RID>() const;
operator Vector<Vector2>() const;
- operator PoolVector<Vector2>() const;
- operator Vector<Plane>() const;
// some core type enums to convert to
operator Margin() const;
@@ -258,8 +332,11 @@ public:
Variant(const char *const p_cstring);
Variant(const CharType *p_wstring);
Variant(const Vector2 &p_vector2);
+ Variant(const Vector2i &p_vector2i);
Variant(const Rect2 &p_rect2);
+ Variant(const Rect2i &p_rect2i);
Variant(const Vector3 &p_vector3);
+ Variant(const Vector3i &p_vector3i);
Variant(const Plane &p_plane);
Variant(const ::AABB &p_aabb);
Variant(const Quat &p_quat);
@@ -270,30 +347,26 @@ public:
Variant(const NodePath &p_node_path);
Variant(const RID &p_rid);
Variant(const Object *p_object);
+ Variant(const Callable &p_callable);
+ Variant(const Signal &p_signal);
Variant(const Dictionary &p_dictionary);
Variant(const Array &p_array);
- Variant(const PoolVector<Plane> &p_array); // helper
- Variant(const PoolVector<uint8_t> &p_raw_array);
- Variant(const PoolVector<int> &p_int_array);
- Variant(const PoolVector<real_t> &p_real_array);
- Variant(const PoolVector<String> &p_string_array);
- Variant(const PoolVector<Vector3> &p_vector3_array);
- Variant(const PoolVector<Color> &p_color_array);
- Variant(const PoolVector<Face3> &p_face_array);
+ Variant(const Vector<Plane> &p_array); // helper
+ Variant(const Vector<uint8_t> &p_byte_array);
+ Variant(const Vector<int32_t> &p_int32_array);
+ Variant(const Vector<int64_t> &p_int64_array);
+ Variant(const Vector<float> &p_float32_array);
+ Variant(const Vector<double> &p_float64_array);
+ Variant(const Vector<String> &p_string_array);
+ Variant(const Vector<Vector3> &p_vector3_array);
+ Variant(const Vector<Color> &p_color_array);
+ Variant(const Vector<Face3> &p_face_array);
Variant(const Vector<Variant> &p_array);
- Variant(const Vector<uint8_t> &p_array);
- Variant(const Vector<int> &p_array);
- Variant(const Vector<real_t> &p_array);
- Variant(const Vector<String> &p_array);
Variant(const Vector<StringName> &p_array);
- Variant(const Vector<Vector3> &p_array);
- Variant(const Vector<Color> &p_array);
- Variant(const Vector<Plane> &p_array); // helper
Variant(const Vector<RID> &p_array); // helper
Variant(const Vector<Vector2> &p_array); // helper
- Variant(const PoolVector<Vector2> &p_vector2_array); // helper
Variant(const IP_Address &p_address);
@@ -349,27 +422,14 @@ public:
static void blend(const Variant &a, const Variant &b, float c, Variant &r_dst);
static void interpolate(const Variant &a, const Variant &b, float c, Variant &r_dst);
- struct CallError {
- enum Error {
- CALL_OK,
- CALL_ERROR_INVALID_METHOD,
- CALL_ERROR_INVALID_ARGUMENT,
- CALL_ERROR_TOO_MANY_ARGUMENTS,
- CALL_ERROR_TOO_FEW_ARGUMENTS,
- CALL_ERROR_INSTANCE_IS_NULL,
- };
- Error error;
- int argument;
- Type expected;
- };
-
- void call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, CallError &r_error);
- Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, CallError &r_error);
+ void call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, Callable::CallError &r_error);
+ Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Variant call(const StringName &p_method, const Variant &p_arg1 = Variant(), const Variant &p_arg2 = Variant(), const Variant &p_arg3 = Variant(), const Variant &p_arg4 = Variant(), const Variant &p_arg5 = Variant());
- static String get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Variant::CallError &ce);
+ static String get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce);
+ static String get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce);
- static Variant construct(const Variant::Type, const Variant **p_args, int p_argcount, CallError &r_error, bool p_strict = true);
+ static Variant construct(const Variant::Type, const Variant **p_args, int p_argcount, Callable::CallError &r_error, bool p_strict = true);
void get_method_list(List<MethodInfo> *p_list) const;
bool has_method(const StringName &p_method) const;
@@ -417,7 +477,9 @@ public:
void operator=(const Variant &p_variant); // only this is enough for all the other types
Variant(const Variant &p_variant);
- _FORCE_INLINE_ Variant() { type = NIL; }
+ _FORCE_INLINE_ Variant() {
+ type = NIL;
+ }
_FORCE_INLINE_ ~Variant() {
if (type != Variant::NIL) clear();
}
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index ac995d1c78..99cfc7ed3c 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -61,7 +61,7 @@ struct _VariantCall {
VariantFunc func;
- _FORCE_INLINE_ bool verify_arguments(const Variant **p_args, Variant::CallError &r_error) {
+ _FORCE_INLINE_ bool verify_arguments(const Variant **p_args, Callable::CallError &r_error) {
if (arg_count == 0)
return true;
@@ -73,7 +73,7 @@ struct _VariantCall {
if (tptr[i] == Variant::NIL || tptr[i] == p_args[i]->type)
continue; // all good
if (!Variant::can_convert(p_args[i]->type, tptr[i])) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = i;
r_error.expected = tptr[i];
return false;
@@ -82,10 +82,10 @@ struct _VariantCall {
return true;
}
- _FORCE_INLINE_ void call(Variant &r_ret, Variant &p_self, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+ _FORCE_INLINE_ void call(Variant &r_ret, Variant &p_self, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
#ifdef DEBUG_ENABLED
if (p_argcount > arg_count) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = arg_count;
return;
} else
@@ -94,7 +94,7 @@ struct _VariantCall {
int def_argcount = default_args.size();
#ifdef DEBUG_ENABLED
if (p_argcount < (arg_count - def_argcount)) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = arg_count - def_argcount;
return;
}
@@ -317,17 +317,16 @@ struct _VariantCall {
String *s = reinterpret_cast<String *>(p_self._data._mem);
if (s->empty()) {
- r_ret = PoolByteArray();
+ r_ret = PackedByteArray();
return;
}
CharString charstr = s->ascii();
- PoolByteArray retval;
+ PackedByteArray retval;
size_t len = charstr.length();
retval.resize(len);
- PoolByteArray::Write w = retval.write();
- copymem(w.ptr(), charstr.ptr(), len);
- w.release();
+ uint8_t *w = retval.ptrw();
+ copymem(w, charstr.ptr(), len);
r_ret = retval;
}
@@ -336,17 +335,16 @@ struct _VariantCall {
String *s = reinterpret_cast<String *>(p_self._data._mem);
if (s->empty()) {
- r_ret = PoolByteArray();
+ r_ret = PackedByteArray();
return;
}
CharString charstr = s->utf8();
- PoolByteArray retval;
+ PackedByteArray retval;
size_t len = charstr.length();
retval.resize(len);
- PoolByteArray::Write w = retval.write();
- copymem(w.ptr(), charstr.ptr(), len);
- w.release();
+ uint8_t *w = retval.ptrw();
+ copymem(w, charstr.ptr(), len);
r_ret = retval;
}
@@ -385,11 +383,15 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Vector2, clamped);
VCALL_LOCALMEM0R(Vector2, sign);
+ VCALL_LOCALMEM0R(Vector2i, aspect);
+ VCALL_LOCALMEM0R(Vector2i, sign);
+ VCALL_LOCALMEM0R(Vector2i, abs);
+
VCALL_LOCALMEM0R(Rect2, get_area);
VCALL_LOCALMEM0R(Rect2, has_no_area);
VCALL_LOCALMEM1R(Rect2, has_point);
VCALL_LOCALMEM1R(Rect2, is_equal_approx);
- VCALL_LOCALMEM1R(Rect2, intersects);
+ VCALL_LOCALMEM2R(Rect2, intersects);
VCALL_LOCALMEM1R(Rect2, encloses);
VCALL_LOCALMEM1R(Rect2, clip);
VCALL_LOCALMEM1R(Rect2, merge);
@@ -399,6 +401,19 @@ struct _VariantCall {
VCALL_LOCALMEM4R(Rect2, grow_individual);
VCALL_LOCALMEM0R(Rect2, abs);
+ VCALL_LOCALMEM0R(Rect2i, get_area);
+ VCALL_LOCALMEM0R(Rect2i, has_no_area);
+ VCALL_LOCALMEM1R(Rect2i, has_point);
+ VCALL_LOCALMEM1R(Rect2i, intersects);
+ VCALL_LOCALMEM1R(Rect2i, encloses);
+ VCALL_LOCALMEM1R(Rect2i, clip);
+ VCALL_LOCALMEM1R(Rect2i, merge);
+ VCALL_LOCALMEM1R(Rect2i, expand);
+ VCALL_LOCALMEM1R(Rect2i, grow);
+ VCALL_LOCALMEM2R(Rect2i, grow_margin);
+ VCALL_LOCALMEM4R(Rect2i, grow_individual);
+ VCALL_LOCALMEM0R(Rect2i, abs);
+
VCALL_LOCALMEM0R(Vector3, min_axis);
VCALL_LOCALMEM0R(Vector3, max_axis);
VCALL_LOCALMEM1R(Vector3, distance_to);
@@ -433,6 +448,10 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Vector3, reflect);
VCALL_LOCALMEM0R(Vector3, sign);
+ VCALL_LOCALMEM0R(Vector3i, min_axis);
+ VCALL_LOCALMEM0R(Vector3i, max_axis);
+ VCALL_LOCALMEM0R(Vector3i, sign);
+
VCALL_LOCALMEM0R(Plane, normalized);
VCALL_LOCALMEM0R(Plane, center);
VCALL_LOCALMEM0R(Plane, get_any_point);
@@ -521,6 +540,23 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Dictionary, duplicate);
VCALL_LOCALMEM2R(Dictionary, get);
+ VCALL_LOCALMEM0R(Callable, is_null);
+ VCALL_LOCALMEM0R(Callable, is_custom);
+ VCALL_LOCALMEM0(Callable, is_standard);
+ VCALL_LOCALMEM0(Callable, get_object);
+ VCALL_LOCALMEM0(Callable, get_object_id);
+ VCALL_LOCALMEM0(Callable, get_method);
+ VCALL_LOCALMEM0(Callable, hash);
+
+ VCALL_LOCALMEM0R(Signal, is_null);
+ VCALL_LOCALMEM0R(Signal, get_object);
+ VCALL_LOCALMEM0R(Signal, get_object_id);
+ VCALL_LOCALMEM0R(Signal, get_name);
+ VCALL_LOCALMEM3R(Signal, connect);
+ VCALL_LOCALMEM1(Signal, disconnect);
+ VCALL_LOCALMEM1R(Signal, is_connected);
+ VCALL_LOCALMEM0R(Signal, get_connections);
+
VCALL_LOCALMEM2(Array, set);
VCALL_LOCALMEM1R(Array, get);
VCALL_LOCALMEM0R(Array, size);
@@ -554,15 +590,15 @@ struct _VariantCall {
VCALL_LOCALMEM0R(Array, max);
VCALL_LOCALMEM0R(Array, min);
- static void _call_PoolByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) {
+ static void _call_PackedByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) {
- PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem);
+ PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem);
String s;
if (ba->size() > 0) {
- PoolByteArray::Read r = ba->read();
+ const uint8_t *r = ba->ptr();
CharString cs;
cs.resize(ba->size() + 1);
- copymem(cs.ptrw(), r.ptr(), ba->size());
+ copymem(cs.ptrw(), r, ba->size());
cs[ba->size()] = 0;
s = cs.get_data();
@@ -570,26 +606,26 @@ struct _VariantCall {
r_ret = s;
}
- static void _call_PoolByteArray_get_string_from_utf8(Variant &r_ret, Variant &p_self, const Variant **p_args) {
+ static void _call_PackedByteArray_get_string_from_utf8(Variant &r_ret, Variant &p_self, const Variant **p_args) {
- PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem);
+ PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem);
String s;
if (ba->size() > 0) {
- PoolByteArray::Read r = ba->read();
- s.parse_utf8((const char *)r.ptr(), ba->size());
+ const uint8_t *r = ba->ptr();
+ s.parse_utf8((const char *)r, ba->size());
}
r_ret = s;
}
- static void _call_PoolByteArray_compress(Variant &r_ret, Variant &p_self, const Variant **p_args) {
+ static void _call_PackedByteArray_compress(Variant &r_ret, Variant &p_self, const Variant **p_args) {
- PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem);
- PoolByteArray compressed;
+ PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem);
+ PackedByteArray compressed;
if (ba->size() > 0) {
Compression::Mode mode = (Compression::Mode)(int)(*p_args[0]);
compressed.resize(Compression::get_max_compressed_buffer_size(ba->size(), mode));
- int result = Compression::compress(compressed.write().ptr(), ba->read().ptr(), ba->size(), mode);
+ int result = Compression::compress(compressed.ptrw(), ba->ptr(), ba->size(), mode);
result = result >= 0 ? result : 0;
compressed.resize(result);
@@ -597,10 +633,10 @@ struct _VariantCall {
r_ret = compressed;
}
- static void _call_PoolByteArray_decompress(Variant &r_ret, Variant &p_self, const Variant **p_args) {
+ static void _call_PackedByteArray_decompress(Variant &r_ret, Variant &p_self, const Variant **p_args) {
- PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem);
- PoolByteArray decompressed;
+ PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem);
+ PackedByteArray decompressed;
Compression::Mode mode = (Compression::Mode)(int)(*p_args[1]);
int buffer_size = (int)(*p_args[0]);
@@ -611,7 +647,7 @@ struct _VariantCall {
}
decompressed.resize(buffer_size);
- int result = Compression::decompress(decompressed.write().ptr(), buffer_size, ba->read().ptr(), ba->size(), mode);
+ int result = Compression::decompress(decompressed.ptrw(), buffer_size, ba->ptr(), ba->size(), mode);
result = result >= 0 ? result : 0;
decompressed.resize(result);
@@ -619,102 +655,150 @@ struct _VariantCall {
r_ret = decompressed;
}
- static void _call_PoolByteArray_hex_encode(Variant &r_ret, Variant &p_self, const Variant **p_args) {
- PoolByteArray *ba = reinterpret_cast<PoolByteArray *>(p_self._data._mem);
+ static void _call_PackedByteArray_hex_encode(Variant &r_ret, Variant &p_self, const Variant **p_args) {
+ PackedByteArray *ba = reinterpret_cast<PackedByteArray *>(p_self._data._mem);
if (ba->size() == 0) {
r_ret = String();
return;
}
- PoolByteArray::Read r = ba->read();
+ const uint8_t *r = ba->ptr();
String s = String::hex_encode_buffer(&r[0], ba->size());
r_ret = s;
}
- VCALL_LOCALMEM0R(PoolByteArray, size);
- VCALL_LOCALMEM0R(PoolByteArray, empty);
- VCALL_LOCALMEM2(PoolByteArray, set);
- VCALL_LOCALMEM1R(PoolByteArray, get);
- VCALL_LOCALMEM1(PoolByteArray, push_back);
- VCALL_LOCALMEM1(PoolByteArray, resize);
- VCALL_LOCALMEM2R(PoolByteArray, insert);
- VCALL_LOCALMEM1(PoolByteArray, remove);
- VCALL_LOCALMEM1(PoolByteArray, append);
- VCALL_LOCALMEM1(PoolByteArray, append_array);
- VCALL_LOCALMEM0(PoolByteArray, invert);
- VCALL_LOCALMEM2R(PoolByteArray, subarray);
-
- VCALL_LOCALMEM0R(PoolIntArray, size);
- VCALL_LOCALMEM0R(PoolIntArray, empty);
- VCALL_LOCALMEM2(PoolIntArray, set);
- VCALL_LOCALMEM1R(PoolIntArray, get);
- VCALL_LOCALMEM1(PoolIntArray, push_back);
- VCALL_LOCALMEM1(PoolIntArray, resize);
- VCALL_LOCALMEM2R(PoolIntArray, insert);
- VCALL_LOCALMEM1(PoolIntArray, remove);
- VCALL_LOCALMEM1(PoolIntArray, append);
- VCALL_LOCALMEM1(PoolIntArray, append_array);
- VCALL_LOCALMEM0(PoolIntArray, invert);
-
- VCALL_LOCALMEM0R(PoolRealArray, size);
- VCALL_LOCALMEM0R(PoolRealArray, empty);
- VCALL_LOCALMEM2(PoolRealArray, set);
- VCALL_LOCALMEM1R(PoolRealArray, get);
- VCALL_LOCALMEM1(PoolRealArray, push_back);
- VCALL_LOCALMEM1(PoolRealArray, resize);
- VCALL_LOCALMEM2R(PoolRealArray, insert);
- VCALL_LOCALMEM1(PoolRealArray, remove);
- VCALL_LOCALMEM1(PoolRealArray, append);
- VCALL_LOCALMEM1(PoolRealArray, append_array);
- VCALL_LOCALMEM0(PoolRealArray, invert);
-
- VCALL_LOCALMEM0R(PoolStringArray, size);
- VCALL_LOCALMEM0R(PoolStringArray, empty);
- VCALL_LOCALMEM2(PoolStringArray, set);
- VCALL_LOCALMEM1R(PoolStringArray, get);
- VCALL_LOCALMEM1(PoolStringArray, push_back);
- VCALL_LOCALMEM1(PoolStringArray, resize);
- VCALL_LOCALMEM2R(PoolStringArray, insert);
- VCALL_LOCALMEM1(PoolStringArray, remove);
- VCALL_LOCALMEM1(PoolStringArray, append);
- VCALL_LOCALMEM1(PoolStringArray, append_array);
- VCALL_LOCALMEM0(PoolStringArray, invert);
- VCALL_LOCALMEM1R(PoolStringArray, join);
-
- VCALL_LOCALMEM0R(PoolVector2Array, size);
- VCALL_LOCALMEM0R(PoolVector2Array, empty);
- VCALL_LOCALMEM2(PoolVector2Array, set);
- VCALL_LOCALMEM1R(PoolVector2Array, get);
- VCALL_LOCALMEM1(PoolVector2Array, push_back);
- VCALL_LOCALMEM1(PoolVector2Array, resize);
- VCALL_LOCALMEM2R(PoolVector2Array, insert);
- VCALL_LOCALMEM1(PoolVector2Array, remove);
- VCALL_LOCALMEM1(PoolVector2Array, append);
- VCALL_LOCALMEM1(PoolVector2Array, append_array);
- VCALL_LOCALMEM0(PoolVector2Array, invert);
-
- VCALL_LOCALMEM0R(PoolVector3Array, size);
- VCALL_LOCALMEM0R(PoolVector3Array, empty);
- VCALL_LOCALMEM2(PoolVector3Array, set);
- VCALL_LOCALMEM1R(PoolVector3Array, get);
- VCALL_LOCALMEM1(PoolVector3Array, push_back);
- VCALL_LOCALMEM1(PoolVector3Array, resize);
- VCALL_LOCALMEM2R(PoolVector3Array, insert);
- VCALL_LOCALMEM1(PoolVector3Array, remove);
- VCALL_LOCALMEM1(PoolVector3Array, append);
- VCALL_LOCALMEM1(PoolVector3Array, append_array);
- VCALL_LOCALMEM0(PoolVector3Array, invert);
-
- VCALL_LOCALMEM0R(PoolColorArray, size);
- VCALL_LOCALMEM0R(PoolColorArray, empty);
- VCALL_LOCALMEM2(PoolColorArray, set);
- VCALL_LOCALMEM1R(PoolColorArray, get);
- VCALL_LOCALMEM1(PoolColorArray, push_back);
- VCALL_LOCALMEM1(PoolColorArray, resize);
- VCALL_LOCALMEM2R(PoolColorArray, insert);
- VCALL_LOCALMEM1(PoolColorArray, remove);
- VCALL_LOCALMEM1(PoolColorArray, append);
- VCALL_LOCALMEM1(PoolColorArray, append_array);
- VCALL_LOCALMEM0(PoolColorArray, invert);
+#define VCALL_PARRMEM0(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); }
+#define VCALL_PARRMEM0R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); }
+#define VCALL_PARRMEM1(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); }
+#define VCALL_PARRMEM1R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); }
+#define VCALL_PARRMEM2(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); }
+#define VCALL_PARRMEM2R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); }
+#define VCALL_PARRMEM3(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); }
+#define VCALL_PARRMEM3R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); }
+#define VCALL_PARRMEM4(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); }
+#define VCALL_PARRMEM4R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); }
+#define VCALL_PARRMEM5(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); }
+#define VCALL_PARRMEM5R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); }
+
+ VCALL_PARRMEM0R(PackedByteArray, uint8_t, size);
+ VCALL_PARRMEM0R(PackedByteArray, uint8_t, empty);
+ VCALL_PARRMEM2(PackedByteArray, uint8_t, set);
+ VCALL_PARRMEM1R(PackedByteArray, uint8_t, get);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, push_back);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, resize);
+ VCALL_PARRMEM2R(PackedByteArray, uint8_t, insert);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, remove);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, append);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, append_array);
+ VCALL_PARRMEM0(PackedByteArray, uint8_t, invert);
+ VCALL_PARRMEM2R(PackedByteArray, uint8_t, subarray);
+
+ VCALL_PARRMEM0R(PackedInt32Array, int32_t, size);
+ VCALL_PARRMEM0R(PackedInt32Array, int32_t, empty);
+ VCALL_PARRMEM2(PackedInt32Array, int32_t, set);
+ VCALL_PARRMEM1R(PackedInt32Array, int32_t, get);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, push_back);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, resize);
+ VCALL_PARRMEM2R(PackedInt32Array, int32_t, insert);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, remove);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, append);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, append_array);
+ VCALL_PARRMEM0(PackedInt32Array, int32_t, invert);
+
+ VCALL_PARRMEM0R(PackedInt64Array, int64_t, size);
+ VCALL_PARRMEM0R(PackedInt64Array, int64_t, empty);
+ VCALL_PARRMEM2(PackedInt64Array, int64_t, set);
+ VCALL_PARRMEM1R(PackedInt64Array, int64_t, get);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, push_back);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, resize);
+ VCALL_PARRMEM2R(PackedInt64Array, int64_t, insert);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, remove);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, append);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, append_array);
+ VCALL_PARRMEM0(PackedInt64Array, int64_t, invert);
+
+ VCALL_PARRMEM0R(PackedFloat32Array, float, size);
+ VCALL_PARRMEM0R(PackedFloat32Array, float, empty);
+ VCALL_PARRMEM2(PackedFloat32Array, float, set);
+ VCALL_PARRMEM1R(PackedFloat32Array, float, get);
+ VCALL_PARRMEM1(PackedFloat32Array, float, push_back);
+ VCALL_PARRMEM1(PackedFloat32Array, float, resize);
+ VCALL_PARRMEM2R(PackedFloat32Array, float, insert);
+ VCALL_PARRMEM1(PackedFloat32Array, float, remove);
+ VCALL_PARRMEM1(PackedFloat32Array, float, append);
+ VCALL_PARRMEM1(PackedFloat32Array, float, append_array);
+ VCALL_PARRMEM0(PackedFloat32Array, float, invert);
+
+ VCALL_PARRMEM0R(PackedFloat64Array, double, size);
+ VCALL_PARRMEM0R(PackedFloat64Array, double, empty);
+ VCALL_PARRMEM2(PackedFloat64Array, double, set);
+ VCALL_PARRMEM1R(PackedFloat64Array, double, get);
+ VCALL_PARRMEM1(PackedFloat64Array, double, push_back);
+ VCALL_PARRMEM1(PackedFloat64Array, double, resize);
+ VCALL_PARRMEM2R(PackedFloat64Array, double, insert);
+ VCALL_PARRMEM1(PackedFloat64Array, double, remove);
+ VCALL_PARRMEM1(PackedFloat64Array, double, append);
+ VCALL_PARRMEM1(PackedFloat64Array, double, append_array);
+ VCALL_PARRMEM0(PackedFloat64Array, double, invert);
+
+ VCALL_PARRMEM0R(PackedStringArray, String, size);
+ VCALL_PARRMEM0R(PackedStringArray, String, empty);
+ VCALL_PARRMEM2(PackedStringArray, String, set);
+ VCALL_PARRMEM1R(PackedStringArray, String, get);
+ VCALL_PARRMEM1(PackedStringArray, String, push_back);
+ VCALL_PARRMEM1(PackedStringArray, String, resize);
+ VCALL_PARRMEM2R(PackedStringArray, String, insert);
+ VCALL_PARRMEM1(PackedStringArray, String, remove);
+ VCALL_PARRMEM1(PackedStringArray, String, append);
+ VCALL_PARRMEM1(PackedStringArray, String, append_array);
+ VCALL_PARRMEM0(PackedStringArray, String, invert);
+
+ VCALL_PARRMEM0R(PackedVector2Array, Vector2, size);
+ VCALL_PARRMEM0R(PackedVector2Array, Vector2, empty);
+ VCALL_PARRMEM2(PackedVector2Array, Vector2, set);
+ VCALL_PARRMEM1R(PackedVector2Array, Vector2, get);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, push_back);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, resize);
+ VCALL_PARRMEM2R(PackedVector2Array, Vector2, insert);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, remove);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, append);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, append_array);
+ VCALL_PARRMEM0(PackedVector2Array, Vector2, invert);
+
+ VCALL_PARRMEM0R(PackedVector3Array, Vector3, size);
+ VCALL_PARRMEM0R(PackedVector3Array, Vector3, empty);
+ VCALL_PARRMEM2(PackedVector3Array, Vector3, set);
+ VCALL_PARRMEM1R(PackedVector3Array, Vector3, get);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, push_back);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, resize);
+ VCALL_PARRMEM2R(PackedVector3Array, Vector3, insert);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, remove);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, append);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, append_array);
+ VCALL_PARRMEM0(PackedVector3Array, Vector3, invert);
+
+ VCALL_PARRMEM0R(PackedColorArray, Color, size);
+ VCALL_PARRMEM0R(PackedColorArray, Color, empty);
+ VCALL_PARRMEM2(PackedColorArray, Color, set);
+ VCALL_PARRMEM1R(PackedColorArray, Color, get);
+ VCALL_PARRMEM1(PackedColorArray, Color, push_back);
+ VCALL_PARRMEM1(PackedColorArray, Color, resize);
+ VCALL_PARRMEM2R(PackedColorArray, Color, insert);
+ VCALL_PARRMEM1(PackedColorArray, Color, remove);
+ VCALL_PARRMEM1(PackedColorArray, Color, append);
+ VCALL_PARRMEM1(PackedColorArray, Color, append_array);
+ VCALL_PARRMEM0(PackedColorArray, Color, invert);
#define VCALL_PTR0(m_type, m_method) \
static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { reinterpret_cast<m_type *>(p_self._data._ptr)->m_method(); }
@@ -781,7 +865,7 @@ struct _VariantCall {
case Variant::VECTOR2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator Vector2()); return;
case Variant::RECT2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator Rect2()); return;
- case Variant::POOL_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator PoolVector2Array()); return;
+ case Variant::PACKED_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform(p_args[0]->operator PackedVector2Array()); return;
default: r_ret = Variant();
}
}
@@ -792,7 +876,7 @@ struct _VariantCall {
case Variant::VECTOR2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Vector2()); return;
case Variant::RECT2: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Rect2()); return;
- case Variant::POOL_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator PoolVector2Array()); return;
+ case Variant::PACKED_VECTOR2_ARRAY: r_ret = reinterpret_cast<Transform2D *>(p_self._data._ptr)->xform_inv(p_args[0]->operator PackedVector2Array()); return;
default: r_ret = Variant();
}
}
@@ -850,7 +934,7 @@ struct _VariantCall {
case Variant::VECTOR3: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator Vector3()); return;
case Variant::PLANE: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator Plane()); return;
case Variant::AABB: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::AABB()); return;
- case Variant::POOL_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::PoolVector3Array()); return;
+ case Variant::PACKED_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform(p_args[0]->operator ::PackedVector3Array()); return;
default: r_ret = Variant();
}
}
@@ -862,7 +946,7 @@ struct _VariantCall {
case Variant::VECTOR3: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Vector3()); return;
case Variant::PLANE: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator Plane()); return;
case Variant::AABB: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::AABB()); return;
- case Variant::POOL_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::PoolVector3Array()); return;
+ case Variant::PACKED_VECTOR3_ARRAY: r_ret = reinterpret_cast<Transform *>(p_self._data._ptr)->xform_inv(p_args[0]->operator ::PackedVector3Array()); return;
default: r_ret = Variant();
}
}
@@ -895,6 +979,11 @@ struct _VariantCall {
r_ret = Vector2(*p_args[0], *p_args[1]);
}
+ static void Vector2i_init1(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Vector2i(*p_args[0], *p_args[1]);
+ }
+
static void Rect2_init1(Variant &r_ret, const Variant **p_args) {
r_ret = Rect2(*p_args[0], *p_args[1]);
@@ -905,6 +994,16 @@ struct _VariantCall {
r_ret = Rect2(*p_args[0], *p_args[1], *p_args[2], *p_args[3]);
}
+ static void Rect2i_init1(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Rect2i(*p_args[0], *p_args[1]);
+ }
+
+ static void Rect2i_init2(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Rect2i(*p_args[0], *p_args[1], *p_args[2], *p_args[3]);
+ }
+
static void Transform2D_init2(Variant &r_ret, const Variant **p_args) {
Transform2D m(*p_args[0], *p_args[1]);
@@ -925,6 +1024,11 @@ struct _VariantCall {
r_ret = Vector3(*p_args[0], *p_args[1], *p_args[2]);
}
+ static void Vector3i_init1(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Vector3i(*p_args[0], *p_args[1], *p_args[2]);
+ }
+
static void Plane_init1(Variant &r_ret, const Variant **p_args) {
r_ret = Plane(*p_args[0], *p_args[1], *p_args[2], *p_args[3]);
@@ -1013,6 +1117,16 @@ struct _VariantCall {
r_ret = Transform(p_args[0]->operator Basis(), p_args[1]->operator Vector3());
}
+ static void Callable_init2(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Callable(p_args[0]->operator ObjectID(), p_args[1]->operator String());
+ }
+
+ static void Signal_init2(Variant &r_ret, const Variant **p_args) {
+
+ r_ret = Signal(p_args[0]->operator ObjectID(), p_args[1]->operator String());
+ }
+
static void add_constructor(VariantConstructFunc p_func, const Variant::Type p_type,
const String &p_name1 = "", const Variant::Type p_type1 = Variant::NIL,
const String &p_name2 = "", const Variant::Type p_type2 = Variant::NIL,
@@ -1081,26 +1195,26 @@ _VariantCall::TypeFunc *_VariantCall::type_funcs = NULL;
_VariantCall::ConstructFunc *_VariantCall::construct_funcs = NULL;
_VariantCall::ConstantData *_VariantCall::constant_data = NULL;
-Variant Variant::call(const StringName &p_method, const Variant **p_args, int p_argcount, CallError &r_error) {
+Variant Variant::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
Variant ret;
call_ptr(p_method, p_args, p_argcount, &ret, r_error);
return ret;
}
-void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, CallError &r_error) {
+void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p_argcount, Variant *r_ret, Callable::CallError &r_error) {
Variant ret;
if (type == Variant::OBJECT) {
//call object
Object *obj = _get_obj().obj;
if (!obj) {
- r_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return;
}
#ifdef DEBUG_ENABLED
if (ScriptDebugger::get_singleton() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
- r_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return;
}
@@ -1111,31 +1225,57 @@ void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p
} else {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
Map<StringName, _VariantCall::FuncData>::Element *E = _VariantCall::type_funcs[type].functions.find(p_method);
-#ifdef DEBUG_ENABLED
- if (!E) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
- return;
+
+ if (E) {
+
+ _VariantCall::FuncData &funcdata = E->get();
+ funcdata.call(ret, *this, p_args, p_argcount, r_error);
+
+ } else {
+ //handle vararg functions manually
+ bool valid = false;
+ if (type == CALLABLE) {
+ if (p_method == CoreStringNames::get_singleton()->call) {
+
+ reinterpret_cast<const Callable *>(_data._mem)->call(p_args, p_argcount, ret, r_error);
+ valid = true;
+ }
+ if (p_method == CoreStringNames::get_singleton()->call_deferred) {
+ reinterpret_cast<const Callable *>(_data._mem)->call_deferred(p_args, p_argcount);
+ valid = true;
+ }
+ } else if (type == SIGNAL) {
+ if (p_method == CoreStringNames::get_singleton()->emit) {
+ if (r_ret) {
+ *r_ret = Variant();
+ }
+ reinterpret_cast<const Signal *>(_data._mem)->emit(p_args, p_argcount);
+ valid = true;
+ }
+ }
+ if (!valid) {
+ //ok fail because not found
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
+ return;
+ }
}
-#endif
- _VariantCall::FuncData &funcdata = E->get();
- funcdata.call(ret, *this, p_args, p_argcount, r_error);
}
- if (r_error.error == Variant::CallError::CALL_OK && r_ret)
+ if (r_error.error == Callable::CallError::CALL_OK && r_ret)
*r_ret = ret;
}
#define VCALL(m_type, m_method) _VariantCall::_call_##m_type##_##m_method
-Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, int p_argcount, CallError &r_error, bool p_strict) {
+Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, int p_argcount, Callable::CallError &r_error, bool p_strict) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_INDEX_V(p_type, VARIANT_MAX, Variant());
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
if (p_argcount == 0) { //generic construct
switch (p_type) {
@@ -1145,41 +1285,47 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// atomic types
case BOOL: return Variant(false);
case INT: return 0;
- case REAL: return 0.0f;
+ case FLOAT: return 0.0f;
case STRING:
return String();
// math types
case VECTOR2:
- return Vector2(); // 5
+ return Vector2();
case RECT2: return Rect2();
case VECTOR3: return Vector3();
case TRANSFORM2D: return Transform2D();
case PLANE: return Plane();
case QUAT: return Quat();
case AABB:
- return ::AABB(); // 10
+ return ::AABB();
case BASIS: return Basis();
case TRANSFORM:
return Transform();
// misc types
case COLOR: return Color();
+ case STRING_NAME:
+ return StringName();
case NODE_PATH:
- return NodePath(); // 15
+ return NodePath();
case _RID: return RID();
case OBJECT: return (Object *)NULL;
+ case CALLABLE: return Callable();
+ case SIGNAL: return Signal();
case DICTIONARY: return Dictionary();
case ARRAY:
- return Array(); // 20
- case POOL_BYTE_ARRAY: return PoolByteArray();
- case POOL_INT_ARRAY: return PoolIntArray();
- case POOL_REAL_ARRAY: return PoolRealArray();
- case POOL_STRING_ARRAY: return PoolStringArray();
- case POOL_VECTOR2_ARRAY:
- return PoolVector2Array(); // 25
- case POOL_VECTOR3_ARRAY: return PoolVector3Array();
- case POOL_COLOR_ARRAY: return PoolColorArray();
+ return Array();
+ case PACKED_BYTE_ARRAY: return PackedByteArray();
+ case PACKED_INT32_ARRAY: return PackedInt32Array();
+ case PACKED_INT64_ARRAY: return PackedInt64Array();
+ case PACKED_FLOAT32_ARRAY: return PackedFloat32Array();
+ case PACKED_FLOAT64_ARRAY: return PackedFloat64Array();
+ case PACKED_STRING_ARRAY: return PackedStringArray();
+ case PACKED_VECTOR2_ARRAY:
+ return PackedVector2Array();
+ case PACKED_VECTOR3_ARRAY: return PackedVector3Array();
+ case PACKED_COLOR_ARRAY: return PackedColorArray();
default: return Variant();
}
@@ -1199,7 +1345,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
case INT: {
return (int64_t(*p_args[0]));
}
- case REAL: {
+ case FLOAT: {
return real_t(*p_args[0]);
}
case STRING: {
@@ -1208,35 +1354,46 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
case VECTOR2: {
return Vector2(*p_args[0]);
}
+ case VECTOR2I: {
+ return Vector2i(*p_args[0]);
+ }
case RECT2: return (Rect2(*p_args[0]));
+ case RECT2I: return (Rect2i(*p_args[0]));
case VECTOR3: return (Vector3(*p_args[0]));
+ case VECTOR3I: return (Vector3i(*p_args[0]));
case PLANE: return (Plane(*p_args[0]));
case QUAT: return (p_args[0]->operator Quat());
case AABB:
- return (::AABB(*p_args[0])); // 10
+ return (::AABB(*p_args[0]));
case BASIS: return (Basis(p_args[0]->operator Basis()));
case TRANSFORM:
return (Transform(p_args[0]->operator Transform()));
// misc types
case COLOR: return p_args[0]->type == Variant::STRING ? Color::html(*p_args[0]) : Color::hex(*p_args[0]);
+ case STRING_NAME:
+ return (StringName(p_args[0]->operator StringName()));
case NODE_PATH:
- return (NodePath(p_args[0]->operator NodePath())); // 15
+ return (NodePath(p_args[0]->operator NodePath()));
case _RID: return (RID(*p_args[0]));
case OBJECT: return ((Object *)(p_args[0]->operator Object *()));
+ case CALLABLE: return ((Callable)(p_args[0]->operator Callable()));
+ case SIGNAL: return ((Signal)(p_args[0]->operator Signal()));
case DICTIONARY: return p_args[0]->operator Dictionary();
case ARRAY:
- return p_args[0]->operator Array(); // 20
+ return p_args[0]->operator Array();
// arrays
- case POOL_BYTE_ARRAY: return (PoolByteArray(*p_args[0]));
- case POOL_INT_ARRAY: return (PoolIntArray(*p_args[0]));
- case POOL_REAL_ARRAY: return (PoolRealArray(*p_args[0]));
- case POOL_STRING_ARRAY: return (PoolStringArray(*p_args[0]));
- case POOL_VECTOR2_ARRAY:
- return (PoolVector2Array(*p_args[0])); // 25
- case POOL_VECTOR3_ARRAY: return (PoolVector3Array(*p_args[0]));
- case POOL_COLOR_ARRAY: return (PoolColorArray(*p_args[0]));
+ case PACKED_BYTE_ARRAY: return (PackedByteArray(*p_args[0]));
+ case PACKED_INT32_ARRAY: return (PackedInt32Array(*p_args[0]));
+ case PACKED_INT64_ARRAY: return (PackedInt64Array(*p_args[0]));
+ case PACKED_FLOAT32_ARRAY: return (PackedFloat32Array(*p_args[0]));
+ case PACKED_FLOAT64_ARRAY: return (PackedFloat64Array(*p_args[0]));
+ case PACKED_STRING_ARRAY: return (PackedStringArray(*p_args[0]));
+ case PACKED_VECTOR2_ARRAY:
+ return (PackedVector2Array(*p_args[0]));
+ case PACKED_VECTOR3_ARRAY: return (PackedVector3Array(*p_args[0]));
+ case PACKED_COLOR_ARRAY: return (PackedColorArray(*p_args[0]));
default: return Variant();
}
} else if (p_argcount >= 1) {
@@ -1252,7 +1409,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
//validate parameters
for (int i = 0; i < cd.arg_count; i++) {
if (!Variant::can_convert(p_args[i]->type, cd.arg_types[i])) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; //no such constructor
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; //no such constructor
r_error.argument = i;
r_error.expected = cd.arg_types[i];
return Variant();
@@ -1264,7 +1421,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
return v;
}
}
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; //no such constructor
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; //no such constructor
return Variant();
}
@@ -1376,6 +1533,30 @@ void Variant::get_method_list(List<MethodInfo> *p_list) const {
p_list->push_back(mi);
}
+
+ if (type == CALLABLE) {
+
+ MethodInfo mi;
+ mi.name = "call";
+ mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
+ mi.flags |= METHOD_FLAG_VARARG;
+
+ p_list->push_back(mi);
+
+ mi.name = "call_deferred";
+ mi.return_val.usage = 0;
+
+ p_list->push_back(mi);
+ }
+
+ if (type == SIGNAL) {
+
+ MethodInfo mi;
+ mi.name = "emit";
+ mi.flags |= METHOD_FLAG_VARARG;
+
+ p_list->push_back(mi);
+ }
}
void Variant::get_constructor_list(Variant::Type p_type, List<MethodInfo> *p_list) {
@@ -1543,8 +1724,8 @@ void register_variant_methods() {
ADDFUNC1R(STRING, BOOL, String, ends_with, STRING, "text", varray());
ADDFUNC1R(STRING, BOOL, String, is_subsequence_of, STRING, "text", varray());
ADDFUNC1R(STRING, BOOL, String, is_subsequence_ofi, STRING, "text", varray());
- ADDFUNC0R(STRING, POOL_STRING_ARRAY, String, bigrams, varray());
- ADDFUNC1R(STRING, REAL, String, similarity, STRING, "text", varray());
+ ADDFUNC0R(STRING, PACKED_STRING_ARRAY, String, bigrams, varray());
+ ADDFUNC1R(STRING, FLOAT, String, similarity, STRING, "text", varray());
ADDFUNC2R(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}"));
ADDFUNC2R(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray());
@@ -1552,9 +1733,9 @@ void register_variant_methods() {
ADDFUNC1R(STRING, STRING, String, repeat, INT, "count", varray());
ADDFUNC2R(STRING, STRING, String, insert, INT, "position", STRING, "what", varray());
ADDFUNC0R(STRING, STRING, String, capitalize, varray());
- ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
- ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
- ADDFUNC2R(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true));
+ ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
+ ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
+ ADDFUNC2R(STRING, PACKED_FLOAT32_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true));
ADDFUNC0R(STRING, STRING, String, to_upper, varray());
ADDFUNC0R(STRING, STRING, String, to_lower, varray());
@@ -1575,9 +1756,9 @@ void register_variant_methods() {
ADDFUNC0R(STRING, STRING, String, md5_text, varray());
ADDFUNC0R(STRING, STRING, String, sha1_text, varray());
ADDFUNC0R(STRING, STRING, String, sha256_text, varray());
- ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, md5_buffer, varray());
- ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha1_buffer, varray());
- ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha256_buffer, varray());
+ ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, md5_buffer, varray());
+ ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, sha1_buffer, varray());
+ ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, sha256_buffer, varray());
ADDFUNC0R(STRING, BOOL, String, empty, varray());
ADDFUNC1R(STRING, STRING, String, humanize_size, INT, "size", varray());
ADDFUNC0R(STRING, BOOL, String, is_abs_path, varray());
@@ -1601,83 +1782,100 @@ void register_variant_methods() {
ADDFUNC0R(STRING, BOOL, String, is_valid_ip_address, varray());
ADDFUNC0R(STRING, BOOL, String, is_valid_filename, varray());
ADDFUNC0R(STRING, INT, String, to_int, varray());
- ADDFUNC0R(STRING, REAL, String, to_float, varray());
+ ADDFUNC0R(STRING, FLOAT, String, to_float, varray());
ADDFUNC0R(STRING, INT, String, hex_to_int, varray());
ADDFUNC1R(STRING, STRING, String, pad_decimals, INT, "digits", varray());
ADDFUNC1R(STRING, STRING, String, pad_zeros, INT, "digits", varray());
ADDFUNC1R(STRING, STRING, String, trim_prefix, STRING, "prefix", varray());
ADDFUNC1R(STRING, STRING, String, trim_suffix, STRING, "suffix", varray());
- ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_ascii, varray());
- ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_utf8, varray());
+ ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_ascii, varray());
+ ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_utf8, varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, angle, varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to, VECTOR2, "to", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to_point, VECTOR2, "to", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, angle, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to_point, VECTOR2, "to", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, direction_to, VECTOR2, "b", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, length, varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, length_squared, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_squared_to, VECTOR2, "to", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, length, varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, length_squared, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, normalized, varray());
ADDFUNC0R(VECTOR2, BOOL, Vector2, is_normalized, varray());
ADDFUNC1R(VECTOR2, BOOL, Vector2, is_equal_approx, VECTOR2, "v", varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, REAL, "mod", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, FLOAT, "mod", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", REAL, "t", varray());
- ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", REAL, "delta", varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", FLOAT, "t", varray());
+ ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", FLOAT, "delta", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, FLOAT, "phi", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, floor, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, ceil, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, round, varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, aspect, varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, aspect, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, dot, VECTOR2, "with", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, slide, VECTOR2, "n", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, bounce, VECTOR2, "n", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, reflect, VECTOR2, "n", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, cross, VECTOR2, "with", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, cross, VECTOR2, "with", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, abs, varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, FLOAT, "length", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, sign, varray());
- ADDFUNC0R(RECT2, REAL, Rect2, get_area, varray());
+ ADDFUNC0R(VECTOR2I, FLOAT, Vector2i, aspect, varray());
+ ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, sign, varray());
+ ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, abs, varray());
+
+ ADDFUNC0R(RECT2, FLOAT, Rect2, get_area, varray());
ADDFUNC0R(RECT2, BOOL, Rect2, has_no_area, varray());
ADDFUNC1R(RECT2, BOOL, Rect2, has_point, VECTOR2, "point", varray());
ADDFUNC1R(RECT2, BOOL, Rect2, is_equal_approx, RECT2, "rect", varray());
- ADDFUNC1R(RECT2, BOOL, Rect2, intersects, RECT2, "b", varray());
+ ADDFUNC2R(RECT2, BOOL, Rect2, intersects, RECT2, "b", BOOL, "include_borders", varray(false));
ADDFUNC1R(RECT2, BOOL, Rect2, encloses, RECT2, "b", varray());
ADDFUNC1R(RECT2, RECT2, Rect2, clip, RECT2, "b", varray());
ADDFUNC1R(RECT2, RECT2, Rect2, merge, RECT2, "b", varray());
ADDFUNC1R(RECT2, RECT2, Rect2, expand, VECTOR2, "to", varray());
- ADDFUNC1R(RECT2, RECT2, Rect2, grow, REAL, "by", varray());
- ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", REAL, "by", varray());
- ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, REAL, "left", REAL, "top", REAL, "right", REAL, " bottom", varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, grow, FLOAT, "by", varray());
+ ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", FLOAT, "by", varray());
+ ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, FLOAT, "left", FLOAT, "top", FLOAT, "right", FLOAT, " bottom", varray());
ADDFUNC0R(RECT2, RECT2, Rect2, abs, varray());
+ ADDFUNC0R(RECT2I, INT, Rect2i, get_area, varray());
+ ADDFUNC0R(RECT2I, BOOL, Rect2i, has_no_area, varray());
+ ADDFUNC1R(RECT2I, BOOL, Rect2i, has_point, VECTOR2I, "point", varray());
+ ADDFUNC1R(RECT2I, BOOL, Rect2i, intersects, RECT2I, "b", varray());
+ ADDFUNC1R(RECT2I, BOOL, Rect2i, encloses, RECT2I, "b", varray());
+ ADDFUNC1R(RECT2I, RECT2I, Rect2i, clip, RECT2I, "b", varray());
+ ADDFUNC1R(RECT2I, RECT2I, Rect2i, merge, RECT2I, "b", varray());
+ ADDFUNC1R(RECT2I, RECT2I, Rect2i, expand, VECTOR2I, "to", varray());
+ ADDFUNC1R(RECT2I, RECT2I, Rect2i, grow, INT, "by", varray());
+ ADDFUNC2R(RECT2I, RECT2I, Rect2i, grow_margin, INT, "margin", INT, "by", varray());
+ ADDFUNC4R(RECT2I, RECT2I, Rect2i, grow_individual, INT, "left", INT, "top", INT, "right", INT, " bottom", varray());
+ ADDFUNC0R(RECT2I, RECT2I, Rect2i, abs, varray());
+
ADDFUNC0R(VECTOR3, INT, Vector3, min_axis, varray());
ADDFUNC0R(VECTOR3, INT, Vector3, max_axis, varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, angle_to, VECTOR3, "to", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, direction_to, VECTOR3, "b", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray());
- ADDFUNC0R(VECTOR3, REAL, Vector3, length, varray());
- ADDFUNC0R(VECTOR3, REAL, Vector3, length_squared, varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_to, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_squared_to, VECTOR3, "b", varray());
+ ADDFUNC0R(VECTOR3, FLOAT, Vector3, length, varray());
+ ADDFUNC0R(VECTOR3, FLOAT, Vector3, length_squared, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, normalized, varray());
ADDFUNC0R(VECTOR3, BOOL, Vector3, is_normalized, varray());
ADDFUNC1R(VECTOR3, BOOL, Vector3, is_equal_approx, VECTOR3, "v", varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", REAL, "t", varray());
- ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", REAL, "delta", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", FLOAT, "t", varray());
+ ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", FLOAT, "delta", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, dot, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
ADDFUNC0R(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray());
@@ -1685,7 +1883,7 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, floor, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, ceil, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, round, varray());
- ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, REAL, "mod", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, FLOAT, "mod", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmodv, VECTOR3, "modv", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, project, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, slide, VECTOR3, "n", varray());
@@ -1693,32 +1891,36 @@ void register_variant_methods() {
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, reflect, VECTOR3, "n", varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, sign, varray());
+ ADDFUNC0R(VECTOR3I, INT, Vector3i, min_axis, varray());
+ ADDFUNC0R(VECTOR3I, INT, Vector3i, max_axis, varray());
+ ADDFUNC0R(VECTOR3I, VECTOR3I, Vector3i, sign, varray());
+
ADDFUNC0R(PLANE, PLANE, Plane, normalized, varray());
ADDFUNC0R(PLANE, VECTOR3, Plane, center, varray());
ADDFUNC0R(PLANE, VECTOR3, Plane, get_any_point, varray());
ADDFUNC1R(PLANE, BOOL, Plane, is_equal_approx, PLANE, "plane", varray());
ADDFUNC1R(PLANE, BOOL, Plane, is_point_over, VECTOR3, "point", varray());
- ADDFUNC1R(PLANE, REAL, Plane, distance_to, VECTOR3, "point", varray());
- ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", REAL, "epsilon", varray(CMP_EPSILON));
+ ADDFUNC1R(PLANE, FLOAT, Plane, distance_to, VECTOR3, "point", varray());
+ ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", FLOAT, "epsilon", varray(CMP_EPSILON));
ADDFUNC1R(PLANE, VECTOR3, Plane, project, VECTOR3, "point", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersect_3, PLANE, "b", PLANE, "c", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_ray, VECTOR3, "from", VECTOR3, "dir", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_segment, VECTOR3, "begin", VECTOR3, "end", varray());
- ADDFUNC0R(QUAT, REAL, Quat, length, varray());
- ADDFUNC0R(QUAT, REAL, Quat, length_squared, varray());
+ ADDFUNC0R(QUAT, FLOAT, Quat, length, varray());
+ ADDFUNC0R(QUAT, FLOAT, Quat, length_squared, varray());
ADDFUNC0R(QUAT, QUAT, Quat, normalized, varray());
ADDFUNC0R(QUAT, BOOL, Quat, is_normalized, varray());
ADDFUNC1R(QUAT, BOOL, Quat, is_equal_approx, QUAT, "quat", varray());
ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray());
- ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray());
+ ADDFUNC1R(QUAT, FLOAT, Quat, dot, QUAT, "b", varray());
ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
- ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
- ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
- ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", FLOAT, "t", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", FLOAT, "t", varray());
+ ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", FLOAT, "t", varray());
ADDFUNC0R(QUAT, VECTOR3, Quat, get_euler, varray());
ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray());
- ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", REAL, "angle", varray());
+ ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", FLOAT, "angle", varray());
ADDFUNC0R(COLOR, INT, Color, to_argb32, varray());
ADDFUNC0R(COLOR, INT, Color, to_abgr32, varray());
@@ -1728,12 +1930,12 @@ void register_variant_methods() {
ADDFUNC0R(COLOR, INT, Color, to_rgba64, varray());
ADDFUNC0R(COLOR, COLOR, Color, inverted, varray());
ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray());
- ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
+ ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", FLOAT, "t", varray());
ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray());
- ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray());
- ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray());
+ ADDFUNC1R(COLOR, COLOR, Color, lightened, FLOAT, "amount", varray());
+ ADDFUNC1R(COLOR, COLOR, Color, darkened, FLOAT, "amount", varray());
ADDFUNC1R(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
- ADDFUNC4R(COLOR, COLOR, Color, from_hsv, REAL, "h", REAL, "s", REAL, "v", REAL, "a", varray(1.0));
+ ADDFUNC4R(COLOR, COLOR, Color, from_hsv, FLOAT, "h", FLOAT, "s", FLOAT, "v", FLOAT, "a", varray(1.0));
ADDFUNC1R(COLOR, BOOL, Color, is_equal_approx, COLOR, "color", varray());
ADDFUNC0R(_RID, INT, RID, get_id, varray());
@@ -1759,6 +1961,25 @@ void register_variant_methods() {
ADDFUNC1R(DICTIONARY, DICTIONARY, Dictionary, duplicate, BOOL, "deep", varray(false));
ADDFUNC2R(DICTIONARY, NIL, Dictionary, get, NIL, "key", NIL, "default", varray(Variant()));
+ ADDFUNC0R(CALLABLE, BOOL, Callable, is_null, varray());
+ ADDFUNC0R(CALLABLE, BOOL, Callable, is_custom, varray());
+ ADDFUNC0R(CALLABLE, BOOL, Callable, is_standard, varray());
+ ADDFUNC0R(CALLABLE, OBJECT, Callable, get_object, varray());
+ ADDFUNC0R(CALLABLE, INT, Callable, get_object_id, varray());
+ ADDFUNC0R(CALLABLE, STRING_NAME, Callable, get_method, varray());
+ ADDFUNC0R(CALLABLE, INT, Callable, hash, varray());
+
+ ADDFUNC0R(SIGNAL, BOOL, Signal, is_null, varray());
+ ADDFUNC0R(SIGNAL, OBJECT, Signal, get_object, varray());
+ ADDFUNC0R(SIGNAL, INT, Signal, get_object_id, varray());
+ ADDFUNC0R(SIGNAL, STRING_NAME, Signal, get_name, varray());
+
+ ADDFUNC3R(SIGNAL, INT, Signal, connect, CALLABLE, "callable", ARRAY, "binds", INT, "flags", varray(Array(), 0));
+
+ ADDFUNC1R(SIGNAL, NIL, Signal, disconnect, CALLABLE, "callable", varray());
+ ADDFUNC1R(SIGNAL, BOOL, Signal, is_connected, CALLABLE, "callable", varray());
+ ADDFUNC0R(SIGNAL, ARRAY, Signal, get_connections, varray());
+
ADDFUNC0R(ARRAY, INT, Array, size, varray());
ADDFUNC0R(ARRAY, BOOL, Array, empty, varray());
ADDFUNC0NC(ARRAY, NIL, Array, clear, varray());
@@ -1790,94 +2011,115 @@ void register_variant_methods() {
ADDFUNC0R(ARRAY, NIL, Array, max, varray());
ADDFUNC0R(ARRAY, NIL, Array, min, varray());
- ADDFUNC0R(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray());
- ADDFUNC0R(POOL_BYTE_ARRAY, BOOL, PoolByteArray, empty, varray());
- ADDFUNC2(POOL_BYTE_ARRAY, NIL, PoolByteArray, set, INT, "idx", INT, "byte", varray());
- ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, push_back, INT, "byte", varray());
- ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append, INT, "byte", varray());
- ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append_array, POOL_BYTE_ARRAY, "array", varray());
- ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_BYTE_ARRAY, INT, PoolByteArray, insert, INT, "idx", INT, "byte", varray());
- ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, resize, INT, "idx", varray());
- ADDFUNC0(POOL_BYTE_ARRAY, NIL, PoolByteArray, invert, varray());
- ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, subarray, INT, "from", INT, "to", varray());
-
- ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_ascii, varray());
- ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_utf8, varray());
- ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, hex_encode, varray());
- ADDFUNC1R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, compress, INT, "compression_mode", varray(0));
- ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0));
-
- ADDFUNC0R(POOL_INT_ARRAY, INT, PoolIntArray, size, varray());
- ADDFUNC0R(POOL_INT_ARRAY, BOOL, PoolIntArray, empty, varray());
- ADDFUNC2(POOL_INT_ARRAY, NIL, PoolIntArray, set, INT, "idx", INT, "integer", varray());
- ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, push_back, INT, "integer", varray());
- ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append, INT, "integer", varray());
- ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append_array, POOL_INT_ARRAY, "array", varray());
- ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_INT_ARRAY, INT, PoolIntArray, insert, INT, "idx", INT, "integer", varray());
- ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, resize, INT, "idx", varray());
- ADDFUNC0(POOL_INT_ARRAY, NIL, PoolIntArray, invert, varray());
-
- ADDFUNC0R(POOL_REAL_ARRAY, INT, PoolRealArray, size, varray());
- ADDFUNC0R(POOL_REAL_ARRAY, BOOL, PoolRealArray, empty, varray());
- ADDFUNC2(POOL_REAL_ARRAY, NIL, PoolRealArray, set, INT, "idx", REAL, "value", varray());
- ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, push_back, REAL, "value", varray());
- ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append, REAL, "value", varray());
- ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append_array, POOL_REAL_ARRAY, "array", varray());
- ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_REAL_ARRAY, INT, PoolRealArray, insert, INT, "idx", REAL, "value", varray());
- ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, resize, INT, "idx", varray());
- ADDFUNC0(POOL_REAL_ARRAY, NIL, PoolRealArray, invert, varray());
-
- ADDFUNC0R(POOL_STRING_ARRAY, INT, PoolStringArray, size, varray());
- ADDFUNC0R(POOL_STRING_ARRAY, BOOL, PoolStringArray, empty, varray());
- ADDFUNC2(POOL_STRING_ARRAY, NIL, PoolStringArray, set, INT, "idx", STRING, "string", varray());
- ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, push_back, STRING, "string", varray());
- ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append, STRING, "string", varray());
- ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append_array, POOL_STRING_ARRAY, "array", varray());
- ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray());
- ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, resize, INT, "idx", varray());
- ADDFUNC0(POOL_STRING_ARRAY, NIL, PoolStringArray, invert, varray());
- ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "delimiter", varray());
-
- ADDFUNC0R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray());
- ADDFUNC0R(POOL_VECTOR2_ARRAY, BOOL, PoolVector2Array, empty, varray());
- ADDFUNC2(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, set, INT, "idx", VECTOR2, "vector2", varray());
- ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, push_back, VECTOR2, "vector2", varray());
- ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append, VECTOR2, "vector2", varray());
- ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append_array, POOL_VECTOR2_ARRAY, "array", varray());
- ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray());
- ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, resize, INT, "idx", varray());
- ADDFUNC0(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, invert, varray());
-
- ADDFUNC0R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, size, varray());
- ADDFUNC0R(POOL_VECTOR3_ARRAY, BOOL, PoolVector3Array, empty, varray());
- ADDFUNC2(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, set, INT, "idx", VECTOR3, "vector3", varray());
- ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, push_back, VECTOR3, "vector3", varray());
- ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append, VECTOR3, "vector3", varray());
- ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append_array, POOL_VECTOR3_ARRAY, "array", varray());
- ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray());
- ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, resize, INT, "idx", varray());
- ADDFUNC0(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, invert, varray());
-
- ADDFUNC0R(POOL_COLOR_ARRAY, INT, PoolColorArray, size, varray());
- ADDFUNC0R(POOL_COLOR_ARRAY, BOOL, PoolColorArray, empty, varray());
- ADDFUNC2(POOL_COLOR_ARRAY, NIL, PoolColorArray, set, INT, "idx", COLOR, "color", varray());
- ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, push_back, COLOR, "color", varray());
- ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append, COLOR, "color", varray());
- ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append_array, POOL_COLOR_ARRAY, "array", varray());
- ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, remove, INT, "idx", varray());
- ADDFUNC2R(POOL_COLOR_ARRAY, INT, PoolColorArray, insert, INT, "idx", COLOR, "color", varray());
- ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, resize, INT, "idx", varray());
- ADDFUNC0(POOL_COLOR_ARRAY, NIL, PoolColorArray, invert, varray());
+ ADDFUNC0R(PACKED_BYTE_ARRAY, INT, PackedByteArray, size, varray());
+ ADDFUNC0R(PACKED_BYTE_ARRAY, BOOL, PackedByteArray, empty, varray());
+ ADDFUNC2(PACKED_BYTE_ARRAY, NIL, PackedByteArray, set, INT, "idx", INT, "byte", varray());
+ ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, push_back, INT, "byte", varray());
+ ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, append, INT, "byte", varray());
+ ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, append_array, PACKED_BYTE_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_BYTE_ARRAY, INT, PackedByteArray, insert, INT, "idx", INT, "byte", varray());
+ ADDFUNC1(PACKED_BYTE_ARRAY, NIL, PackedByteArray, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_BYTE_ARRAY, NIL, PackedByteArray, invert, varray());
+ ADDFUNC2R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, subarray, INT, "from", INT, "to", varray());
+
+ ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, get_string_from_ascii, varray());
+ ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, get_string_from_utf8, varray());
+ ADDFUNC0R(PACKED_BYTE_ARRAY, STRING, PackedByteArray, hex_encode, varray());
+ ADDFUNC1R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, compress, INT, "compression_mode", varray(0));
+ ADDFUNC2R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0));
+
+ ADDFUNC0R(PACKED_INT32_ARRAY, INT, PackedInt32Array, size, varray());
+ ADDFUNC0R(PACKED_INT32_ARRAY, BOOL, PackedInt32Array, empty, varray());
+ ADDFUNC2(PACKED_INT32_ARRAY, NIL, PackedInt32Array, set, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, push_back, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append_array, PACKED_INT32_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_INT32_ARRAY, INT, PackedInt32Array, insert, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_INT32_ARRAY, NIL, PackedInt32Array, invert, varray());
+
+ ADDFUNC0R(PACKED_INT64_ARRAY, INT, PackedInt64Array, size, varray());
+ ADDFUNC0R(PACKED_INT64_ARRAY, BOOL, PackedInt64Array, empty, varray());
+ ADDFUNC2(PACKED_INT64_ARRAY, NIL, PackedInt64Array, set, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, push_back, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append_array, PACKED_INT64_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_INT64_ARRAY, INT, PackedInt64Array, insert, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_INT64_ARRAY, NIL, PackedInt64Array, invert, varray());
+
+ ADDFUNC0R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, size, varray());
+ ADDFUNC0R(PACKED_FLOAT32_ARRAY, BOOL, PackedFloat32Array, empty, varray());
+ ADDFUNC2(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, set, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, push_back, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append_array, PACKED_FLOAT32_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, insert, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, invert, varray());
+
+ ADDFUNC0R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, size, varray());
+ ADDFUNC0R(PACKED_FLOAT64_ARRAY, BOOL, PackedFloat64Array, empty, varray());
+ ADDFUNC2(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, set, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, push_back, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append_array, PACKED_FLOAT64_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, insert, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, invert, varray());
+
+ ADDFUNC0R(PACKED_STRING_ARRAY, INT, PackedStringArray, size, varray());
+ ADDFUNC0R(PACKED_STRING_ARRAY, BOOL, PackedStringArray, empty, varray());
+ ADDFUNC2(PACKED_STRING_ARRAY, NIL, PackedStringArray, set, INT, "idx", STRING, "string", varray());
+ ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, push_back, STRING, "string", varray());
+ ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, append, STRING, "string", varray());
+ ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, append_array, PACKED_STRING_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_STRING_ARRAY, INT, PackedStringArray, insert, INT, "idx", STRING, "string", varray());
+ ADDFUNC1(PACKED_STRING_ARRAY, NIL, PackedStringArray, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_STRING_ARRAY, NIL, PackedStringArray, invert, varray());
+
+ ADDFUNC0R(PACKED_VECTOR2_ARRAY, INT, PackedVector2Array, size, varray());
+ ADDFUNC0R(PACKED_VECTOR2_ARRAY, BOOL, PackedVector2Array, empty, varray());
+ ADDFUNC2(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, set, INT, "idx", VECTOR2, "vector2", varray());
+ ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, push_back, VECTOR2, "vector2", varray());
+ ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, append, VECTOR2, "vector2", varray());
+ ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, append_array, PACKED_VECTOR2_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_VECTOR2_ARRAY, INT, PackedVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray());
+ ADDFUNC1(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_VECTOR2_ARRAY, NIL, PackedVector2Array, invert, varray());
+
+ ADDFUNC0R(PACKED_VECTOR3_ARRAY, INT, PackedVector3Array, size, varray());
+ ADDFUNC0R(PACKED_VECTOR3_ARRAY, BOOL, PackedVector3Array, empty, varray());
+ ADDFUNC2(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, set, INT, "idx", VECTOR3, "vector3", varray());
+ ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, push_back, VECTOR3, "vector3", varray());
+ ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, append, VECTOR3, "vector3", varray());
+ ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, append_array, PACKED_VECTOR3_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_VECTOR3_ARRAY, INT, PackedVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray());
+ ADDFUNC1(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_VECTOR3_ARRAY, NIL, PackedVector3Array, invert, varray());
+
+ ADDFUNC0R(PACKED_COLOR_ARRAY, INT, PackedColorArray, size, varray());
+ ADDFUNC0R(PACKED_COLOR_ARRAY, BOOL, PackedColorArray, empty, varray());
+ ADDFUNC2(PACKED_COLOR_ARRAY, NIL, PackedColorArray, set, INT, "idx", COLOR, "color", varray());
+ ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, push_back, COLOR, "color", varray());
+ ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, append, COLOR, "color", varray());
+ ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, append_array, PACKED_COLOR_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_COLOR_ARRAY, INT, PackedColorArray, insert, INT, "idx", COLOR, "color", varray());
+ ADDFUNC1(PACKED_COLOR_ARRAY, NIL, PackedColorArray, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_COLOR_ARRAY, NIL, PackedColorArray, invert, varray());
//pointerbased
- ADDFUNC0R(AABB, REAL, AABB, get_area, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_area, varray());
ADDFUNC0R(AABB, BOOL, AABB, has_no_area, varray());
ADDFUNC0R(AABB, BOOL, AABB, has_no_surface, varray());
ADDFUNC1R(AABB, BOOL, AABB, has_point, VECTOR3, "point", varray());
@@ -1889,93 +2131,101 @@ void register_variant_methods() {
ADDFUNC1R(AABB, AABB, AABB, intersection, AABB, "with", varray());
ADDFUNC1R(AABB, AABB, AABB, merge, AABB, "with", varray());
ADDFUNC1R(AABB, AABB, AABB, expand, VECTOR3, "to_point", varray());
- ADDFUNC1R(AABB, AABB, AABB, grow, REAL, "by", varray());
+ ADDFUNC1R(AABB, AABB, AABB, grow, FLOAT, "by", varray());
ADDFUNC1R(AABB, VECTOR3, AABB, get_support, VECTOR3, "dir", varray());
ADDFUNC0R(AABB, VECTOR3, AABB, get_longest_axis, varray());
ADDFUNC0R(AABB, INT, AABB, get_longest_axis_index, varray());
- ADDFUNC0R(AABB, REAL, AABB, get_longest_axis_size, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_longest_axis_size, varray());
ADDFUNC0R(AABB, VECTOR3, AABB, get_shortest_axis, varray());
ADDFUNC0R(AABB, INT, AABB, get_shortest_axis_index, varray());
- ADDFUNC0R(AABB, REAL, AABB, get_shortest_axis_size, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_shortest_axis_size, varray());
ADDFUNC1R(AABB, VECTOR3, AABB, get_endpoint, INT, "idx", varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, inverse, varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, affine_inverse, varray());
- ADDFUNC0R(TRANSFORM2D, REAL, Transform2D, get_rotation, varray());
+ ADDFUNC0R(TRANSFORM2D, FLOAT, Transform2D, get_rotation, varray());
ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_origin, varray());
ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_scale, varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, orthonormalized, varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, FLOAT, "phi", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray());
ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform, NIL, "v", varray());
ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform_inv, NIL, "v", varray());
ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform, VECTOR2, "v", varray());
ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform_inv, VECTOR2, "v", varray());
- ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray());
+ ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", FLOAT, "weight", varray());
ADDFUNC1R(TRANSFORM2D, BOOL, Transform2D, is_equal_approx, TRANSFORM2D, "transform", varray());
ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray());
ADDFUNC0R(BASIS, BASIS, Basis, transposed, varray());
ADDFUNC0R(BASIS, BASIS, Basis, orthonormalized, varray());
- ADDFUNC0R(BASIS, REAL, Basis, determinant, varray());
- ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC0R(BASIS, FLOAT, Basis, determinant, varray());
+ ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
ADDFUNC1R(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray());
ADDFUNC0R(BASIS, VECTOR3, Basis, get_scale, varray());
ADDFUNC0R(BASIS, VECTOR3, Basis, get_euler, varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdoty, VECTOR3, "with", varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdotz, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdotx, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdoty, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdotz, VECTOR3, "with", varray());
ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
- ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", REAL, "t", varray());
- ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO.
+ ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray());
+ ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", FLOAT, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO.
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, orthonormalized, varray());
- ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, scaled, VECTOR3, "scale", varray());
ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, translated, VECTOR3, "offset", varray());
ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, looking_at, VECTOR3, "target", VECTOR3, "up", varray());
- ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", REAL, "weight", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", FLOAT, "weight", varray());
ADDFUNC1R(TRANSFORM, BOOL, Transform, is_equal_approx, TRANSFORM, "transform", varray());
ADDFUNC1R(TRANSFORM, NIL, Transform, xform, NIL, "v", varray());
ADDFUNC1R(TRANSFORM, NIL, Transform, xform_inv, NIL, "v", varray());
/* REGISTER CONSTRUCTORS */
- _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::FLOAT, "y", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Vector2i_init1, Variant::VECTOR2I, "x", Variant::INT, "y", Variant::INT);
_VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "position", Variant::VECTOR2, "size", Variant::VECTOR2);
- _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::REAL, "y", Variant::REAL, "width", Variant::REAL, "height", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::FLOAT, "y", Variant::FLOAT, "width", Variant::FLOAT, "height", Variant::FLOAT);
- _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::REAL, "position", Variant::VECTOR2);
+ _VariantCall::add_constructor(_VariantCall::Rect2i_init1, Variant::RECT2I, "position", Variant::VECTOR2, "size", Variant::VECTOR2);
+ _VariantCall::add_constructor(_VariantCall::Rect2i_init2, Variant::RECT2I, "x", Variant::INT, "y", Variant::INT, "width", Variant::INT, "height", Variant::INT);
+
+ _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::FLOAT, "position", Variant::VECTOR2);
_VariantCall::add_constructor(_VariantCall::Transform2D_init3, Variant::TRANSFORM2D, "x_axis", Variant::VECTOR2, "y_axis", Variant::VECTOR2, "origin", Variant::VECTOR2);
- _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Vector3i_init1, Variant::VECTOR3I, "x", Variant::INT, "y", Variant::INT, "z", Variant::INT);
- _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::REAL, "b", Variant::REAL, "c", Variant::REAL, "d", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::FLOAT, "b", Variant::FLOAT, "c", Variant::FLOAT, "d", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Plane_init2, Variant::PLANE, "v1", Variant::VECTOR3, "v2", Variant::VECTOR3, "v3", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::FLOAT);
- _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL, "w", Variant::REAL);
- _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT, "w", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Quat_init3, Variant::QUAT, "euler", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL);
- _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT, "a", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::AABB_init1, Variant::AABB, "position", Variant::VECTOR3, "size", Variant::VECTOR3);
_VariantCall::add_constructor(_VariantCall::Basis_init1, Variant::BASIS, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Transform_init1, Variant::TRANSFORM, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3, "origin", Variant::VECTOR3);
_VariantCall::add_constructor(_VariantCall::Transform_init2, Variant::TRANSFORM, "basis", Variant::BASIS, "origin", Variant::VECTOR3);
+ _VariantCall::add_constructor(_VariantCall::Callable_init2, Variant::CALLABLE, "object", Variant::OBJECT, "method_name", Variant::STRING_NAME);
+ _VariantCall::add_constructor(_VariantCall::Signal_init2, Variant::SIGNAL, "object", Variant::OBJECT, "signal_name", Variant::STRING_NAME);
+
/* REGISTER CONSTANTS */
_populate_named_colors();
@@ -1997,9 +2247,25 @@ void register_variant_methods() {
_VariantCall::add_variant_constant(Variant::VECTOR3, "FORWARD", Vector3(0, 0, -1));
_VariantCall::add_variant_constant(Variant::VECTOR3, "BACK", Vector3(0, 0, 1));
+ _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_X", Vector3::AXIS_X);
+ _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_Y", Vector3::AXIS_Y);
+ _VariantCall::add_constant(Variant::VECTOR3I, "AXIS_Z", Vector3::AXIS_Z);
+
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "ZERO", Vector3i(0, 0, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "ONE", Vector3i(1, 1, 1));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "LEFT", Vector3i(-1, 0, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "RIGHT", Vector3i(1, 0, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "UP", Vector3i(0, 1, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "DOWN", Vector3i(0, -1, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "FORWARD", Vector3i(0, 0, -1));
+ _VariantCall::add_variant_constant(Variant::VECTOR3I, "BACK", Vector3i(0, 0, 1));
+
_VariantCall::add_constant(Variant::VECTOR2, "AXIS_X", Vector2::AXIS_X);
_VariantCall::add_constant(Variant::VECTOR2, "AXIS_Y", Vector2::AXIS_Y);
+ _VariantCall::add_constant(Variant::VECTOR2I, "AXIS_X", Vector2::AXIS_X);
+ _VariantCall::add_constant(Variant::VECTOR2I, "AXIS_Y", Vector2::AXIS_Y);
+
_VariantCall::add_variant_constant(Variant::VECTOR2, "ZERO", Vector2(0, 0));
_VariantCall::add_variant_constant(Variant::VECTOR2, "ONE", Vector2(1, 1));
_VariantCall::add_variant_constant(Variant::VECTOR2, "INF", Vector2(Math_INF, Math_INF));
@@ -2008,6 +2274,13 @@ void register_variant_methods() {
_VariantCall::add_variant_constant(Variant::VECTOR2, "UP", Vector2(0, -1));
_VariantCall::add_variant_constant(Variant::VECTOR2, "DOWN", Vector2(0, 1));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "ZERO", Vector2i(0, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "ONE", Vector2i(1, 1));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "LEFT", Vector2i(-1, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "RIGHT", Vector2i(1, 0));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "UP", Vector2i(0, -1));
+ _VariantCall::add_variant_constant(Variant::VECTOR2I, "DOWN", Vector2i(0, 1));
+
_VariantCall::add_variant_constant(Variant::TRANSFORM2D, "IDENTITY", Transform2D());
_VariantCall::add_variant_constant(Variant::TRANSFORM2D, "FLIP_X", Transform2D(-1, 0, 0, 1, 0, 0));
_VariantCall::add_variant_constant(Variant::TRANSFORM2D, "FLIP_Y", Transform2D(1, 0, 0, -1, 0, 0));
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index c7a52b0347..36d1278929 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -38,33 +38,41 @@
CASE_TYPE(PREFIX, OP, INT) \
CASE_TYPE_ALL_BUT_INT(PREFIX, OP)
-#define CASE_TYPE_ALL_BUT_INT(PREFIX, OP) \
- CASE_TYPE(PREFIX, OP, NIL) \
- CASE_TYPE(PREFIX, OP, BOOL) \
- CASE_TYPE(PREFIX, OP, REAL) \
- CASE_TYPE(PREFIX, OP, STRING) \
- CASE_TYPE(PREFIX, OP, VECTOR2) \
- CASE_TYPE(PREFIX, OP, RECT2) \
- CASE_TYPE(PREFIX, OP, VECTOR3) \
- CASE_TYPE(PREFIX, OP, TRANSFORM2D) \
- CASE_TYPE(PREFIX, OP, PLANE) \
- CASE_TYPE(PREFIX, OP, QUAT) \
- CASE_TYPE(PREFIX, OP, AABB) \
- CASE_TYPE(PREFIX, OP, BASIS) \
- CASE_TYPE(PREFIX, OP, TRANSFORM) \
- CASE_TYPE(PREFIX, OP, COLOR) \
- CASE_TYPE(PREFIX, OP, NODE_PATH) \
- CASE_TYPE(PREFIX, OP, _RID) \
- CASE_TYPE(PREFIX, OP, OBJECT) \
- CASE_TYPE(PREFIX, OP, DICTIONARY) \
- CASE_TYPE(PREFIX, OP, ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_BYTE_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_INT_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_REAL_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_STRING_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_VECTOR2_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_VECTOR3_ARRAY) \
- CASE_TYPE(PREFIX, OP, POOL_COLOR_ARRAY)
+#define CASE_TYPE_ALL_BUT_INT(PREFIX, OP) \
+ CASE_TYPE(PREFIX, OP, NIL) \
+ CASE_TYPE(PREFIX, OP, BOOL) \
+ CASE_TYPE(PREFIX, OP, FLOAT) \
+ CASE_TYPE(PREFIX, OP, STRING) \
+ CASE_TYPE(PREFIX, OP, VECTOR2) \
+ CASE_TYPE(PREFIX, OP, VECTOR2I) \
+ CASE_TYPE(PREFIX, OP, RECT2) \
+ CASE_TYPE(PREFIX, OP, RECT2I) \
+ CASE_TYPE(PREFIX, OP, VECTOR3) \
+ CASE_TYPE(PREFIX, OP, VECTOR3I) \
+ CASE_TYPE(PREFIX, OP, TRANSFORM2D) \
+ CASE_TYPE(PREFIX, OP, PLANE) \
+ CASE_TYPE(PREFIX, OP, QUAT) \
+ CASE_TYPE(PREFIX, OP, AABB) \
+ CASE_TYPE(PREFIX, OP, BASIS) \
+ CASE_TYPE(PREFIX, OP, TRANSFORM) \
+ CASE_TYPE(PREFIX, OP, COLOR) \
+ CASE_TYPE(PREFIX, OP, STRING_NAME) \
+ CASE_TYPE(PREFIX, OP, NODE_PATH) \
+ CASE_TYPE(PREFIX, OP, _RID) \
+ CASE_TYPE(PREFIX, OP, OBJECT) \
+ CASE_TYPE(PREFIX, OP, CALLABLE) \
+ CASE_TYPE(PREFIX, OP, SIGNAL) \
+ CASE_TYPE(PREFIX, OP, DICTIONARY) \
+ CASE_TYPE(PREFIX, OP, ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_BYTE_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_INT32_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_INT64_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_STRING_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_COLOR_ARRAY)
#ifdef __GNUC__
#define TYPE(PREFIX, OP, TYPE) &&PREFIX##_##OP##_##TYPE
@@ -74,11 +82,14 @@
TYPE(PREFIX, OP, NIL), \
TYPE(PREFIX, OP, BOOL), \
TYPE(PREFIX, OP, INT), \
- TYPE(PREFIX, OP, REAL), \
+ TYPE(PREFIX, OP, FLOAT), \
TYPE(PREFIX, OP, STRING), \
TYPE(PREFIX, OP, VECTOR2), \
+ TYPE(PREFIX, OP, VECTOR2I), \
TYPE(PREFIX, OP, RECT2), \
+ TYPE(PREFIX, OP, RECT2I), \
TYPE(PREFIX, OP, VECTOR3), \
+ TYPE(PREFIX, OP, VECTOR3I), \
TYPE(PREFIX, OP, TRANSFORM2D), \
TYPE(PREFIX, OP, PLANE), \
TYPE(PREFIX, OP, QUAT), \
@@ -86,47 +97,52 @@
TYPE(PREFIX, OP, BASIS), \
TYPE(PREFIX, OP, TRANSFORM), \
TYPE(PREFIX, OP, COLOR), \
+ TYPE(PREFIX, OP, STRING_NAME), \
TYPE(PREFIX, OP, NODE_PATH), \
TYPE(PREFIX, OP, _RID), \
TYPE(PREFIX, OP, OBJECT), \
+ TYPE(PREFIX, OP, CALLABLE), \
+ TYPE(PREFIX, OP, SIGNAL), \
TYPE(PREFIX, OP, DICTIONARY), \
TYPE(PREFIX, OP, ARRAY), \
- TYPE(PREFIX, OP, POOL_BYTE_ARRAY), \
- TYPE(PREFIX, OP, POOL_INT_ARRAY), \
- TYPE(PREFIX, OP, POOL_REAL_ARRAY), \
- TYPE(PREFIX, OP, POOL_STRING_ARRAY), \
- TYPE(PREFIX, OP, POOL_VECTOR2_ARRAY), \
- TYPE(PREFIX, OP, POOL_VECTOR3_ARRAY), \
- TYPE(PREFIX, OP, POOL_COLOR_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_BYTE_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_INT32_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_INT64_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_STRING_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_COLOR_ARRAY), \
}
/* clang-format on */
-#define CASES(PREFIX) static const void *switch_table_##PREFIX[25][27] = { \
- TYPES(PREFIX, OP_EQUAL), \
- TYPES(PREFIX, OP_NOT_EQUAL), \
- TYPES(PREFIX, OP_LESS), \
- TYPES(PREFIX, OP_LESS_EQUAL), \
- TYPES(PREFIX, OP_GREATER), \
- TYPES(PREFIX, OP_GREATER_EQUAL), \
- TYPES(PREFIX, OP_ADD), \
- TYPES(PREFIX, OP_SUBTRACT), \
- TYPES(PREFIX, OP_MULTIPLY), \
- TYPES(PREFIX, OP_DIVIDE), \
- TYPES(PREFIX, OP_NEGATE), \
- TYPES(PREFIX, OP_POSITIVE), \
- TYPES(PREFIX, OP_MODULE), \
- TYPES(PREFIX, OP_STRING_CONCAT), \
- TYPES(PREFIX, OP_SHIFT_LEFT), \
- TYPES(PREFIX, OP_SHIFT_RIGHT), \
- TYPES(PREFIX, OP_BIT_AND), \
- TYPES(PREFIX, OP_BIT_OR), \
- TYPES(PREFIX, OP_BIT_XOR), \
- TYPES(PREFIX, OP_BIT_NEGATE), \
- TYPES(PREFIX, OP_AND), \
- TYPES(PREFIX, OP_OR), \
- TYPES(PREFIX, OP_XOR), \
- TYPES(PREFIX, OP_NOT), \
- TYPES(PREFIX, OP_IN), \
+#define CASES(PREFIX) static const void *switch_table_##PREFIX[25][Variant::VARIANT_MAX] = { \
+ TYPES(PREFIX, OP_EQUAL), \
+ TYPES(PREFIX, OP_NOT_EQUAL), \
+ TYPES(PREFIX, OP_LESS), \
+ TYPES(PREFIX, OP_LESS_EQUAL), \
+ TYPES(PREFIX, OP_GREATER), \
+ TYPES(PREFIX, OP_GREATER_EQUAL), \
+ TYPES(PREFIX, OP_ADD), \
+ TYPES(PREFIX, OP_SUBTRACT), \
+ TYPES(PREFIX, OP_MULTIPLY), \
+ TYPES(PREFIX, OP_DIVIDE), \
+ TYPES(PREFIX, OP_NEGATE), \
+ TYPES(PREFIX, OP_POSITIVE), \
+ TYPES(PREFIX, OP_MODULE), \
+ TYPES(PREFIX, OP_STRING_CONCAT), \
+ TYPES(PREFIX, OP_SHIFT_LEFT), \
+ TYPES(PREFIX, OP_SHIFT_RIGHT), \
+ TYPES(PREFIX, OP_BIT_AND), \
+ TYPES(PREFIX, OP_BIT_OR), \
+ TYPES(PREFIX, OP_BIT_XOR), \
+ TYPES(PREFIX, OP_BIT_NEGATE), \
+ TYPES(PREFIX, OP_AND), \
+ TYPES(PREFIX, OP_OR), \
+ TYPES(PREFIX, OP_XOR), \
+ TYPES(PREFIX, OP_NOT), \
+ TYPES(PREFIX, OP_IN), \
}
#define SWITCH(PREFIX, op, val) goto *switch_table_##PREFIX[op][val];
@@ -165,21 +181,21 @@ bool Variant::booleanize() const {
return; \
}
-#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
+ \
+ _RETURN_FAIL \
};
-#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
+ \
+ _RETURN_FAIL \
};
#ifdef DEBUG_ENABLED
@@ -192,23 +208,23 @@ bool Variant::booleanize() const {
} \
_RETURN(p_a._data.m_type / p_b._data._int); \
} \
- if (p_b.type == REAL) { \
- if (p_b._data._real == 0) { \
+ if (p_b.type == FLOAT) { \
+ if (p_b._data._float == 0) { \
r_valid = false; \
_RETURN("Division By Zero"); \
} \
- _RETURN(p_a._data.m_type / p_b._data._real); \
+ _RETURN(p_a._data.m_type / p_b._data._float); \
} \
\
_RETURN_FAIL \
};
#else
-#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type / p_b._data._real); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type / p_b._data._float); \
+ \
+ _RETURN_FAIL \
};
#endif
@@ -222,33 +238,47 @@ bool Variant::booleanize() const {
_RETURN(p_a._data.m_type); \
};
-#define DEFAULT_OP_NUM_VEC(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- if (p_b.type == VECTOR2) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \
- if (p_b.type == VECTOR3) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM_VEC(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
+ if (p_b.type == VECTOR2) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \
+ if (p_b.type == VECTOR3) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \
+ if (p_b.type == VECTOR2I) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \
+ if (p_b.type == VECTOR3I) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \
+ \
+ _RETURN_FAIL \
};
-#define DEFAULT_OP_STR_REV(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const String *>(p_a._data._mem)); \
- if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const NodePath *>(p_a._data._mem)); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_STR_REV(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const String *>(p_a._data._mem)); \
+ if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const StringName *>(p_a._data._mem)); \
+ if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_b._data._mem) m_op *reinterpret_cast<const NodePath *>(p_a._data._mem)); \
+ \
+ _RETURN_FAIL \
};
-#define DEFAULT_OP_STR(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
- if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_STR(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
+ if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \
+ if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
+ \
+ _RETURN_FAIL \
+ };
+
+#define DEFAULT_OP_STR_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
+ if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \
+ if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
+ \
+ _RETURN_FAIL \
};
-#define DEFAULT_OP_STR_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
+#define DEFAULT_OP_STR_NULL_NP(m_prefix, m_op_name, m_name, m_op, m_type) \
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
if (p_b.type == NODE_PATH) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const NodePath *>(p_b._data._mem)); \
@@ -257,6 +287,15 @@ bool Variant::booleanize() const {
_RETURN_FAIL \
};
+#define DEFAULT_OP_STR_NULL_SN(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == STRING) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const String *>(p_b._data._mem)); \
+ if (p_b.type == STRING_NAME) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const StringName *>(p_b._data._mem)); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
+ \
+ _RETURN_FAIL \
+ };
+
#define DEFAULT_OP_LOCALMEM_REV(m_prefix, m_op_name, m_name, m_op, m_type) \
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == m_name) \
@@ -297,7 +336,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == m_name) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const m_type *>(p_b._data._mem)); \
if (p_b.type == INT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._real); \
+ if (p_b.type == FLOAT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._float); \
\
_RETURN_FAIL \
}
@@ -357,16 +396,16 @@ bool Variant::booleanize() const {
if (p_a.type != p_b.type) \
_RETURN_FAIL \
\
- const PoolVector<m_type> &array_a = *reinterpret_cast<const PoolVector<m_type> *>(p_a._data._mem); \
- const PoolVector<m_type> &array_b = *reinterpret_cast<const PoolVector<m_type> *>(p_b._data._mem); \
+ const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \
+ const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \
\
int a_len = array_a.size(); \
if (a_len m_opa array_b.size()) { \
_RETURN(m_ret_s); \
} else { \
\
- PoolVector<m_type>::Read ra = array_a.read(); \
- PoolVector<m_type>::Read rb = array_b.read(); \
+ const m_type *ra = array_a.ptr(); \
+ const m_type *rb = array_b.ptr(); \
\
for (int i = 0; i < a_len; i++) { \
if (ra[i] m_opb rb[i]) \
@@ -376,16 +415,16 @@ bool Variant::booleanize() const {
_RETURN(m_ret_def); \
}
-#define DEFAULT_OP_ARRAY_ADD(m_prefix, m_op_name, m_name, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_a.type != p_b.type) \
- _RETURN_FAIL; \
- \
- const PoolVector<m_type> &array_a = *reinterpret_cast<const PoolVector<m_type> *>(p_a._data._mem); \
- const PoolVector<m_type> &array_b = *reinterpret_cast<const PoolVector<m_type> *>(p_b._data._mem); \
- PoolVector<m_type> sum = array_a; \
- sum.append_array(array_b); \
- _RETURN(sum); \
+#define DEFAULT_OP_ARRAY_ADD(m_prefix, m_op_name, m_name, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_a.type != p_b.type) \
+ _RETURN_FAIL; \
+ \
+ const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \
+ const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \
+ Vector<m_type> sum = array_a; \
+ sum.append_array(array_b); \
+ _RETURN(sum); \
}
void Variant::evaluate(const Operator &p_op, const Variant &p_a,
@@ -423,6 +462,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
_RETURN_FAIL;
}
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, CALLABLE, ==, Callable);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, SIGNAL, ==, Signal);
+
CASE_TYPE(math, OP_EQUAL, DICTIONARY) {
if (p_b.type != DICTIONARY) {
if (p_b.type == NIL)
@@ -458,28 +500,34 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_NULL(math, OP_EQUAL, INT, ==, _int);
- DEFAULT_OP_NUM_NULL(math, OP_EQUAL, REAL, ==, _real);
+ DEFAULT_OP_NUM_NULL(math, OP_EQUAL, FLOAT, ==, _float);
DEFAULT_OP_STR_NULL(math, OP_EQUAL, STRING, ==, String);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2, ==, Vector2);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2I, ==, Vector2i);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, RECT2, ==, Rect2);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, RECT2I, ==, Rect2i);
DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, TRANSFORM2D, ==, _transform2d);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR3, ==, Vector3);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR3I, ==, Vector3i);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, PLANE, ==, Plane);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, QUAT, ==, Quat);
DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, AABB, ==, _aabb);
DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, BASIS, ==, _basis);
DEFAULT_OP_PTRREF_NULL(math, OP_EQUAL, TRANSFORM, ==, _transform);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, COLOR, ==, Color);
- DEFAULT_OP_STR_NULL(math, OP_EQUAL, NODE_PATH, ==, NodePath);
+ DEFAULT_OP_STR_NULL_SN(math, OP_EQUAL, STRING_NAME, ==, StringName);
+ DEFAULT_OP_STR_NULL_NP(math, OP_EQUAL, NODE_PATH, ==, NodePath);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, _RID, ==, RID);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_REAL_ARRAY, real_t);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_STRING_ARRAY, String);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_VECTOR2_ARRAY, Vector2);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_VECTOR3_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, POOL_COLOR_ARRAY, Color);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_BYTE_ARRAY, uint8_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT64_ARRAY, double);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_STRING_ARRAY, String);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR2_ARRAY, Vector2);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR3_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_COLOR_ARRAY, Color);
}
SWITCH_OP(math, OP_NOT_EQUAL, p_a.type) {
@@ -511,6 +559,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
_RETURN_FAIL;
}
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, CALLABLE, !=, Callable);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, SIGNAL, !=, Signal);
+
CASE_TYPE(math, OP_NOT_EQUAL, DICTIONARY) {
if (p_b.type != DICTIONARY) {
if (p_b.type == NIL)
@@ -548,28 +599,34 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, INT, !=, _int);
- DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, REAL, !=, _real);
+ DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, FLOAT, !=, _float);
DEFAULT_OP_STR_NULL(math, OP_NOT_EQUAL, STRING, !=, String);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2, !=, Vector2);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2I, !=, Vector2i);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, RECT2, !=, Rect2);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, RECT2I, !=, Rect2i);
DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, TRANSFORM2D, !=, _transform2d);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR3, !=, Vector3);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR3I, !=, Vector3i);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, PLANE, !=, Plane);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, QUAT, !=, Quat);
DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, AABB, !=, _aabb);
DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, BASIS, !=, _basis);
DEFAULT_OP_PTRREF_NULL(math, OP_NOT_EQUAL, TRANSFORM, !=, _transform);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, COLOR, !=, Color);
- DEFAULT_OP_STR_NULL(math, OP_NOT_EQUAL, NODE_PATH, !=, NodePath);
+ DEFAULT_OP_STR_NULL_SN(math, OP_NOT_EQUAL, STRING_NAME, !=, StringName);
+ DEFAULT_OP_STR_NULL_NP(math, OP_NOT_EQUAL, NODE_PATH, !=, NodePath);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, _RID, !=, RID);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_REAL_ARRAY, real_t);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_STRING_ARRAY, String);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_VECTOR2_ARRAY, Vector2);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_VECTOR3_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, POOL_COLOR_ARRAY, Color);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_BYTE_ARRAY, uint8_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT64_ARRAY, double);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_STRING_ARRAY, String);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR2_ARRAY, Vector2);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR3_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_COLOR_ARRAY, Color);
}
SWITCH_OP(math, OP_LESS, p_a.type) {
@@ -592,6 +649,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
_RETURN((p_a._get_obj().obj < p_b._get_obj().obj));
}
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_LESS, CALLABLE, <, Callable);
+ DEFAULT_OP_LOCALMEM_NULL(math, OP_LESS, SIGNAL, <, Signal);
+
CASE_TYPE(math, OP_LESS, ARRAY) {
if (p_b.type != ARRAY)
_RETURN_FAIL;
@@ -612,21 +672,26 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_LESS, INT, <, _int);
- DEFAULT_OP_NUM(math, OP_LESS, REAL, <, _real);
+ DEFAULT_OP_NUM(math, OP_LESS, FLOAT, <, _float);
DEFAULT_OP_STR(math, OP_LESS, STRING, <, String);
DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2, <, Vector2);
+ DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2I, <, Vector2i);
DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR3, <, Vector3);
+ DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR3I, <, Vector3i);
DEFAULT_OP_LOCALMEM(math, OP_LESS, _RID, <, RID);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_REAL_ARRAY, real_t);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_STRING_ARRAY, String);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_VECTOR2_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_VECTOR3_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, POOL_COLOR_ARRAY, Color);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_BYTE_ARRAY, uint8_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT64_ARRAY, double);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_STRING_ARRAY, String);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR2_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR3_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_COLOR_ARRAY, Color);
CASE_TYPE(math, OP_LESS, NIL)
CASE_TYPE(math, OP_LESS, RECT2)
+ CASE_TYPE(math, OP_LESS, RECT2I)
CASE_TYPE(math, OP_LESS, TRANSFORM2D)
CASE_TYPE(math, OP_LESS, PLANE)
CASE_TYPE(math, OP_LESS, QUAT)
@@ -634,6 +699,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_LESS, BASIS)
CASE_TYPE(math, OP_LESS, TRANSFORM)
CASE_TYPE(math, OP_LESS, COLOR)
+ CASE_TYPE(math, OP_LESS, STRING_NAME)
CASE_TYPE(math, OP_LESS, NODE_PATH)
CASE_TYPE(math, OP_LESS, DICTIONARY)
_RETURN_FAIL;
@@ -647,15 +713,18 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_LESS_EQUAL, INT, <=, _int);
- DEFAULT_OP_NUM(math, OP_LESS_EQUAL, REAL, <=, _real);
+ DEFAULT_OP_NUM(math, OP_LESS_EQUAL, FLOAT, <=, _float);
DEFAULT_OP_STR(math, OP_LESS_EQUAL, STRING, <=, String);
DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2, <=, Vector2);
+ DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2I, <=, Vector2i);
DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR3, <=, Vector3);
+ DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR3I, <=, Vector3i);
DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, _RID, <=, RID);
CASE_TYPE(math, OP_LESS_EQUAL, NIL)
CASE_TYPE(math, OP_LESS_EQUAL, BOOL)
CASE_TYPE(math, OP_LESS_EQUAL, RECT2)
+ CASE_TYPE(math, OP_LESS_EQUAL, RECT2I)
CASE_TYPE(math, OP_LESS_EQUAL, TRANSFORM2D)
CASE_TYPE(math, OP_LESS_EQUAL, PLANE)
CASE_TYPE(math, OP_LESS_EQUAL, QUAT)
@@ -663,16 +732,22 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_LESS_EQUAL, BASIS)
CASE_TYPE(math, OP_LESS_EQUAL, TRANSFORM)
CASE_TYPE(math, OP_LESS_EQUAL, COLOR)
+ CASE_TYPE(math, OP_LESS_EQUAL, STRING_NAME)
CASE_TYPE(math, OP_LESS_EQUAL, NODE_PATH)
+ CASE_TYPE(math, OP_LESS_EQUAL, CALLABLE)
+ CASE_TYPE(math, OP_LESS_EQUAL, SIGNAL)
+
CASE_TYPE(math, OP_LESS_EQUAL, DICTIONARY)
CASE_TYPE(math, OP_LESS_EQUAL, ARRAY)
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_BYTE_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_INT_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_REAL_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_STRING_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_VECTOR2_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_VECTOR3_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, POOL_COLOR_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_BYTE_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT64_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_STRING_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR2_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR3_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_COLOR_ARRAY);
_RETURN_FAIL;
}
@@ -716,21 +791,26 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_GREATER, INT, >, _int);
- DEFAULT_OP_NUM(math, OP_GREATER, REAL, >, _real);
+ DEFAULT_OP_NUM(math, OP_GREATER, FLOAT, >, _float);
DEFAULT_OP_STR_REV(math, OP_GREATER, STRING, <, String);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2, <, Vector2);
+ DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2I, <, Vector2i);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR3, <, Vector3);
+ DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR3I, <, Vector3i);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, _RID, <, RID);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_REAL_ARRAY, real_t);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_STRING_ARRAY, String);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_VECTOR2_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_VECTOR3_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, POOL_COLOR_ARRAY, Color);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_BYTE_ARRAY, uint8_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT64_ARRAY, double);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_STRING_ARRAY, String);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR2_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR3_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_COLOR_ARRAY, Color);
CASE_TYPE(math, OP_GREATER, NIL)
CASE_TYPE(math, OP_GREATER, RECT2)
+ CASE_TYPE(math, OP_GREATER, RECT2I)
CASE_TYPE(math, OP_GREATER, TRANSFORM2D)
CASE_TYPE(math, OP_GREATER, PLANE)
CASE_TYPE(math, OP_GREATER, QUAT)
@@ -738,8 +818,12 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_GREATER, BASIS)
CASE_TYPE(math, OP_GREATER, TRANSFORM)
CASE_TYPE(math, OP_GREATER, COLOR)
+ CASE_TYPE(math, OP_GREATER, STRING_NAME)
CASE_TYPE(math, OP_GREATER, NODE_PATH)
CASE_TYPE(math, OP_GREATER, DICTIONARY)
+ CASE_TYPE(math, OP_GREATER, CALLABLE)
+ CASE_TYPE(math, OP_GREATER, SIGNAL)
+
_RETURN_FAIL;
}
@@ -751,15 +835,18 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, INT, >=, _int);
- DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, REAL, >=, _real);
+ DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, FLOAT, >=, _float);
DEFAULT_OP_STR_REV(math, OP_GREATER_EQUAL, STRING, <=, String);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2, <=, Vector2);
+ DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2I, <=, Vector2i);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR3, <=, Vector3);
+ DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR3I, <=, Vector3i);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, _RID, <=, RID);
CASE_TYPE(math, OP_GREATER_EQUAL, NIL)
CASE_TYPE(math, OP_GREATER_EQUAL, BOOL)
CASE_TYPE(math, OP_GREATER_EQUAL, RECT2)
+ CASE_TYPE(math, OP_GREATER_EQUAL, RECT2I)
CASE_TYPE(math, OP_GREATER_EQUAL, TRANSFORM2D)
CASE_TYPE(math, OP_GREATER_EQUAL, PLANE)
CASE_TYPE(math, OP_GREATER_EQUAL, QUAT)
@@ -767,16 +854,22 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_GREATER_EQUAL, BASIS)
CASE_TYPE(math, OP_GREATER_EQUAL, TRANSFORM)
CASE_TYPE(math, OP_GREATER_EQUAL, COLOR)
+ CASE_TYPE(math, OP_GREATER_EQUAL, STRING_NAME)
CASE_TYPE(math, OP_GREATER_EQUAL, NODE_PATH)
+ CASE_TYPE(math, OP_GREATER_EQUAL, CALLABLE)
+ CASE_TYPE(math, OP_GREATER_EQUAL, SIGNAL)
+
CASE_TYPE(math, OP_GREATER_EQUAL, DICTIONARY)
CASE_TYPE(math, OP_GREATER_EQUAL, ARRAY)
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_BYTE_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_INT_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_REAL_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_STRING_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_VECTOR2_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_VECTOR3_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, POOL_COLOR_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_BYTE_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT64_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_STRING_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR2_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR3_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_COLOR_ARRAY);
_RETURN_FAIL;
}
@@ -799,41 +892,52 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_ADD, INT, +, _int);
- DEFAULT_OP_NUM(math, OP_ADD, REAL, +, _real);
+ DEFAULT_OP_NUM(math, OP_ADD, FLOAT, +, _float);
DEFAULT_OP_STR(math, OP_ADD, STRING, +, String);
DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2, +, Vector2);
+ DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2I, +, Vector2i);
DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR3, +, Vector3);
+ DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR3I, +, Vector3i);
DEFAULT_OP_LOCALMEM(math, OP_ADD, QUAT, +, Quat);
DEFAULT_OP_LOCALMEM(math, OP_ADD, COLOR, +, Color);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_REAL_ARRAY, real_t);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_STRING_ARRAY, String);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_VECTOR2_ARRAY, Vector2);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_VECTOR3_ARRAY, Vector3);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, POOL_COLOR_ARRAY, Color);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_BYTE_ARRAY, uint8_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT64_ARRAY, double);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_STRING_ARRAY, String);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR2_ARRAY, Vector2);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR3_ARRAY, Vector3);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_COLOR_ARRAY, Color);
CASE_TYPE(math, OP_ADD, NIL)
CASE_TYPE(math, OP_ADD, BOOL)
CASE_TYPE(math, OP_ADD, RECT2)
+ CASE_TYPE(math, OP_ADD, RECT2I)
CASE_TYPE(math, OP_ADD, TRANSFORM2D)
CASE_TYPE(math, OP_ADD, PLANE)
CASE_TYPE(math, OP_ADD, AABB)
CASE_TYPE(math, OP_ADD, BASIS)
CASE_TYPE(math, OP_ADD, TRANSFORM)
+ CASE_TYPE(math, OP_ADD, STRING_NAME)
CASE_TYPE(math, OP_ADD, NODE_PATH)
CASE_TYPE(math, OP_ADD, _RID)
CASE_TYPE(math, OP_ADD, OBJECT)
+ CASE_TYPE(math, OP_ADD, CALLABLE)
+ CASE_TYPE(math, OP_ADD, SIGNAL)
+
CASE_TYPE(math, OP_ADD, DICTIONARY)
_RETURN_FAIL;
}
SWITCH_OP(math, OP_SUBTRACT, p_a.type) {
DEFAULT_OP_NUM(math, OP_SUBTRACT, INT, -, _int);
- DEFAULT_OP_NUM(math, OP_SUBTRACT, REAL, -, _real);
+ DEFAULT_OP_NUM(math, OP_SUBTRACT, FLOAT, -, _float);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2, -, Vector2);
+ DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2I, -, Vector2i);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR3, -, Vector3);
+ DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR3I, -, Vector3i);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, QUAT, -, Quat);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, COLOR, -, Color);
@@ -841,23 +945,30 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_SUBTRACT, BOOL)
CASE_TYPE(math, OP_SUBTRACT, STRING)
CASE_TYPE(math, OP_SUBTRACT, RECT2)
+ CASE_TYPE(math, OP_SUBTRACT, RECT2I)
CASE_TYPE(math, OP_SUBTRACT, TRANSFORM2D)
CASE_TYPE(math, OP_SUBTRACT, PLANE)
CASE_TYPE(math, OP_SUBTRACT, AABB)
CASE_TYPE(math, OP_SUBTRACT, BASIS)
CASE_TYPE(math, OP_SUBTRACT, TRANSFORM)
+ CASE_TYPE(math, OP_SUBTRACT, STRING_NAME)
CASE_TYPE(math, OP_SUBTRACT, NODE_PATH)
CASE_TYPE(math, OP_SUBTRACT, _RID)
CASE_TYPE(math, OP_SUBTRACT, OBJECT)
+ CASE_TYPE(math, OP_SUBTRACT, CALLABLE)
+ CASE_TYPE(math, OP_SUBTRACT, SIGNAL)
+
CASE_TYPE(math, OP_SUBTRACT, DICTIONARY)
CASE_TYPE(math, OP_SUBTRACT, ARRAY)
- CASE_TYPE(math, OP_SUBTRACT, POOL_BYTE_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_INT_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_REAL_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_STRING_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_VECTOR2_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_VECTOR3_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, POOL_COLOR_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_BYTE_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT64_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_STRING_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR2_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR3_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_COLOR_ARRAY);
_RETURN_FAIL;
}
@@ -882,8 +993,8 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
case QUAT: {
_RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * *reinterpret_cast<const Quat *>(p_b._data._mem));
}
- case REAL: {
- _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._real);
+ case FLOAT: {
+ _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._float);
}
default: _RETURN_FAIL;
}
@@ -914,113 +1025,142 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, INT, *, _int);
- DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, REAL, *, _real);
+ DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, FLOAT, *, _float);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2, *, Vector2);
+ DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2I, *, Vector2i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3, *, Vector3);
+ DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3I, *, Vector3i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, COLOR, *, Color);
CASE_TYPE(math, OP_MULTIPLY, NIL)
CASE_TYPE(math, OP_MULTIPLY, BOOL)
CASE_TYPE(math, OP_MULTIPLY, STRING)
CASE_TYPE(math, OP_MULTIPLY, RECT2)
+ CASE_TYPE(math, OP_MULTIPLY, RECT2I)
CASE_TYPE(math, OP_MULTIPLY, PLANE)
CASE_TYPE(math, OP_MULTIPLY, AABB)
+ CASE_TYPE(math, OP_MULTIPLY, STRING_NAME)
CASE_TYPE(math, OP_MULTIPLY, NODE_PATH)
CASE_TYPE(math, OP_MULTIPLY, _RID)
CASE_TYPE(math, OP_MULTIPLY, OBJECT)
+ CASE_TYPE(math, OP_MULTIPLY, CALLABLE)
+ CASE_TYPE(math, OP_MULTIPLY, SIGNAL)
+
CASE_TYPE(math, OP_MULTIPLY, DICTIONARY)
CASE_TYPE(math, OP_MULTIPLY, ARRAY)
- CASE_TYPE(math, OP_MULTIPLY, POOL_BYTE_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_INT_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_REAL_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_STRING_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_VECTOR2_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_VECTOR3_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, POOL_COLOR_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_BYTE_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT64_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_STRING_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR2_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR3_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_COLOR_ARRAY);
_RETURN_FAIL;
}
SWITCH_OP(math, OP_DIVIDE, p_a.type) {
CASE_TYPE(math, OP_DIVIDE, QUAT) {
- if (p_b.type != REAL)
+ if (p_b.type != FLOAT)
_RETURN_FAIL;
#ifdef DEBUG_ENABLED
- if (p_b._data._real == 0) {
+ if (p_b._data._float == 0) {
r_valid = false;
_RETURN("Division By Zero");
}
#endif
- _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._real);
+ _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._float);
}
DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, INT, _int);
- DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, REAL, _real);
+ DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2, /, Vector2);
+ DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2I, /, Vector2i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR3, /, Vector3);
+ DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR3I, /, Vector3i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, COLOR, /, Color);
CASE_TYPE(math, OP_DIVIDE, NIL)
CASE_TYPE(math, OP_DIVIDE, BOOL)
CASE_TYPE(math, OP_DIVIDE, STRING)
CASE_TYPE(math, OP_DIVIDE, RECT2)
+ CASE_TYPE(math, OP_DIVIDE, RECT2I)
CASE_TYPE(math, OP_DIVIDE, TRANSFORM2D)
CASE_TYPE(math, OP_DIVIDE, PLANE)
CASE_TYPE(math, OP_DIVIDE, AABB)
CASE_TYPE(math, OP_DIVIDE, BASIS)
CASE_TYPE(math, OP_DIVIDE, TRANSFORM)
+ CASE_TYPE(math, OP_DIVIDE, STRING_NAME)
CASE_TYPE(math, OP_DIVIDE, NODE_PATH)
CASE_TYPE(math, OP_DIVIDE, _RID)
CASE_TYPE(math, OP_DIVIDE, OBJECT)
+ CASE_TYPE(math, OP_DIVIDE, CALLABLE)
+ CASE_TYPE(math, OP_DIVIDE, SIGNAL)
+
CASE_TYPE(math, OP_DIVIDE, DICTIONARY)
CASE_TYPE(math, OP_DIVIDE, ARRAY)
- CASE_TYPE(math, OP_DIVIDE, POOL_BYTE_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_INT_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_REAL_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_STRING_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_VECTOR2_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_VECTOR3_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, POOL_COLOR_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_BYTE_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT64_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_STRING_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR2_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR3_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_COLOR_ARRAY);
_RETURN_FAIL;
}
SWITCH_OP(math, OP_POSITIVE, p_a.type) {
DEFAULT_OP_NUM_POS(math, OP_POSITIVE, INT, _int);
- DEFAULT_OP_NUM_POS(math, OP_POSITIVE, REAL, _real);
+ DEFAULT_OP_NUM_POS(math, OP_POSITIVE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3, Vector3);
+ DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3I, Vector3i);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, PLANE, Plane);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, QUAT, Quat);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR2, Vector2);
+ DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR2I, Vector2i);
CASE_TYPE(math, OP_POSITIVE, NIL)
CASE_TYPE(math, OP_POSITIVE, BOOL)
CASE_TYPE(math, OP_POSITIVE, STRING)
CASE_TYPE(math, OP_POSITIVE, RECT2)
+ CASE_TYPE(math, OP_POSITIVE, RECT2I)
CASE_TYPE(math, OP_POSITIVE, TRANSFORM2D)
CASE_TYPE(math, OP_POSITIVE, AABB)
CASE_TYPE(math, OP_POSITIVE, BASIS)
CASE_TYPE(math, OP_POSITIVE, TRANSFORM)
CASE_TYPE(math, OP_POSITIVE, COLOR)
+ CASE_TYPE(math, OP_POSITIVE, STRING_NAME)
CASE_TYPE(math, OP_POSITIVE, NODE_PATH)
CASE_TYPE(math, OP_POSITIVE, _RID)
CASE_TYPE(math, OP_POSITIVE, OBJECT)
+ CASE_TYPE(math, OP_POSITIVE, CALLABLE)
+ CASE_TYPE(math, OP_POSITIVE, SIGNAL)
+
CASE_TYPE(math, OP_POSITIVE, DICTIONARY)
CASE_TYPE(math, OP_POSITIVE, ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_BYTE_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_INT_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_REAL_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_STRING_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_VECTOR2_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_VECTOR3_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, POOL_COLOR_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_BYTE_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT64_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_STRING_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR2_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR3_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_COLOR_ARRAY)
_RETURN_FAIL;
}
SWITCH_OP(math, OP_NEGATE, p_a.type) {
DEFAULT_OP_NUM_NEG(math, OP_NEGATE, INT, _int);
- DEFAULT_OP_NUM_NEG(math, OP_NEGATE, REAL, _real);
+ DEFAULT_OP_NUM_NEG(math, OP_NEGATE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2, Vector2);
+ DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2I, Vector2i);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR3, Vector3);
+ DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR3I, Vector3i);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, PLANE, Plane);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, QUAT, Quat);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, COLOR, Color);
@@ -1029,22 +1169,29 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_NEGATE, BOOL)
CASE_TYPE(math, OP_NEGATE, STRING)
CASE_TYPE(math, OP_NEGATE, RECT2)
+ CASE_TYPE(math, OP_NEGATE, RECT2I)
CASE_TYPE(math, OP_NEGATE, TRANSFORM2D)
CASE_TYPE(math, OP_NEGATE, AABB)
CASE_TYPE(math, OP_NEGATE, BASIS)
CASE_TYPE(math, OP_NEGATE, TRANSFORM)
+ CASE_TYPE(math, OP_NEGATE, STRING_NAME)
CASE_TYPE(math, OP_NEGATE, NODE_PATH)
CASE_TYPE(math, OP_NEGATE, _RID)
CASE_TYPE(math, OP_NEGATE, OBJECT)
+ CASE_TYPE(math, OP_NEGATE, CALLABLE)
+ CASE_TYPE(math, OP_NEGATE, SIGNAL)
+
CASE_TYPE(math, OP_NEGATE, DICTIONARY)
CASE_TYPE(math, OP_NEGATE, ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_BYTE_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_INT_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_REAL_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_STRING_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_VECTOR2_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_VECTOR3_ARRAY)
- CASE_TYPE(math, OP_NEGATE, POOL_COLOR_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_BYTE_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT64_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_STRING_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR2_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR3_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_COLOR_ARRAY)
_RETURN_FAIL;
}
@@ -1082,10 +1229,13 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_MODULE, NIL)
CASE_TYPE(math, OP_MODULE, BOOL)
- CASE_TYPE(math, OP_MODULE, REAL)
+ CASE_TYPE(math, OP_MODULE, FLOAT)
CASE_TYPE(math, OP_MODULE, VECTOR2)
+ CASE_TYPE(math, OP_MODULE, VECTOR2I)
CASE_TYPE(math, OP_MODULE, RECT2)
+ CASE_TYPE(math, OP_MODULE, RECT2I)
CASE_TYPE(math, OP_MODULE, VECTOR3)
+ CASE_TYPE(math, OP_MODULE, VECTOR3I)
CASE_TYPE(math, OP_MODULE, TRANSFORM2D)
CASE_TYPE(math, OP_MODULE, PLANE)
CASE_TYPE(math, OP_MODULE, QUAT)
@@ -1093,18 +1243,24 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_MODULE, BASIS)
CASE_TYPE(math, OP_MODULE, TRANSFORM)
CASE_TYPE(math, OP_MODULE, COLOR)
+ CASE_TYPE(math, OP_MODULE, STRING_NAME)
CASE_TYPE(math, OP_MODULE, NODE_PATH)
CASE_TYPE(math, OP_MODULE, _RID)
CASE_TYPE(math, OP_MODULE, OBJECT)
+ CASE_TYPE(math, OP_MODULE, CALLABLE)
+ CASE_TYPE(math, OP_MODULE, SIGNAL)
+
CASE_TYPE(math, OP_MODULE, DICTIONARY)
CASE_TYPE(math, OP_MODULE, ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_BYTE_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_INT_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_REAL_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_STRING_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_VECTOR2_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_VECTOR3_ARRAY)
- CASE_TYPE(math, OP_MODULE, POOL_COLOR_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_BYTE_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_FLOAT64_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_STRING_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_VECTOR2_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_VECTOR3_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_COLOR_ARRAY)
_RETURN_FAIL;
}
@@ -1237,13 +1393,35 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->y = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector2 *v = reinterpret_cast<Vector2 *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
+ valid = true;
+ }
+ }
+
+ } break;
+ case VECTOR2I: {
+ if (p_value.type == Variant::INT) {
+ Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ v->x = p_value._data._int;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ v->y = p_value._data._int;
+ valid = true;
+ }
+ } else if (p_value.type == Variant::FLOAT) {
+ Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ v->x = p_value._data._float;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ v->y = p_value._data._float;
valid = true;
}
}
@@ -1266,6 +1444,23 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
}
}
} break;
+ case RECT2I: {
+
+ if (p_value.type == Variant::VECTOR2I) {
+ Rect2i *v = reinterpret_cast<Rect2i *>(_data._mem);
+ //scalar name
+ if (p_index == CoreStringNames::singleton->position) {
+ v->position = *reinterpret_cast<const Vector2i *>(p_value._data._mem);
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->size) {
+ v->size = *reinterpret_cast<const Vector2i *>(p_value._data._mem);
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->end) {
+ v->size = *reinterpret_cast<const Vector2i *>(p_value._data._mem) - v->position;
+ valid = true;
+ }
+ }
+ } break;
case TRANSFORM2D: {
if (p_value.type == Variant::VECTOR2) {
@@ -1297,16 +1492,45 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->z = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector3 *v = reinterpret_cast<Vector3 *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->z = p_value._data._real;
+ v->z = p_value._data._float;
+ valid = true;
+ }
+ }
+
+ } break;
+ case VECTOR3I: {
+
+ if (p_value.type == Variant::INT) {
+ Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ v->x = p_value._data._int;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ v->y = p_value._data._int;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->z) {
+ v->z = p_value._data._int;
+ valid = true;
+ }
+ } else if (p_value.type == Variant::FLOAT) {
+ Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ v->x = p_value._data._float;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ v->y = p_value._data._float;
+ valid = true;
+ } else if (p_index == CoreStringNames::singleton->z) {
+ v->z = p_value._data._float;
valid = true;
}
}
@@ -1329,19 +1553,19 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->d = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Plane *v = reinterpret_cast<Plane *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->normal.x = p_value._data._real;
+ v->normal.x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->normal.y = p_value._data._real;
+ v->normal.y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->normal.z = p_value._data._real;
+ v->normal.z = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->d) {
- v->d = p_value._data._real;
+ v->d = p_value._data._float;
valid = true;
}
@@ -1371,24 +1595,24 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->w = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Quat *v = reinterpret_cast<Quat *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->z = p_value._data._real;
+ v->z = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->w) {
- v->w = p_value._data._real;
+ v->w = p_value._data._float;
valid = true;
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_value.type == Variant::VECTOR3) {
@@ -1472,40 +1696,40 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->set_hsv(v->get_h(), v->get_v(), p_value._data._int, v->a);
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Color *v = reinterpret_cast<Color *>(_data._mem);
if (p_index == CoreStringNames::singleton->r) {
- v->r = p_value._data._real;
+ v->r = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->g) {
- v->g = p_value._data._real;
+ v->g = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->b) {
- v->b = p_value._data._real;
+ v->b = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->a) {
- v->a = p_value._data._real;
+ v->a = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->r8) {
- v->r = p_value._data._real / 255.0;
+ v->r = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->g8) {
- v->g = p_value._data._real / 255.0;
+ v->g = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->b8) {
- v->b = p_value._data._real / 255.0;
+ v->b = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->a8) {
- v->a = p_value._data._real / 255.0;
+ v->a = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->h) {
- v->set_hsv(p_value._data._real, v->get_s(), v->get_v(), v->a);
+ v->set_hsv(p_value._data._float, v->get_s(), v->get_v(), v->a);
valid = true;
} else if (p_index == CoreStringNames::singleton->s) {
- v->set_hsv(v->get_h(), p_value._data._real, v->get_v(), v->a);
+ v->set_hsv(v->get_h(), p_value._data._float, v->get_v(), v->a);
valid = true;
} else if (p_index == CoreStringNames::singleton->v) {
- v->set_hsv(v->get_h(), v->get_s(), p_value._data._real, v->a);
+ v->set_hsv(v->get_h(), v->get_s(), p_value._data._float, v->a);
valid = true;
}
}
@@ -1548,6 +1772,15 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
}
} break;
+ case VECTOR2I: {
+ const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ return v->x;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ return v->y;
+ }
+
+ } break;
case RECT2: {
const Rect2 *v = reinterpret_cast<const Rect2 *>(_data._mem);
@@ -1560,6 +1793,18 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
return v->size + v->position;
}
} break;
+ case RECT2I: {
+
+ const Rect2i *v = reinterpret_cast<const Rect2i *>(_data._mem);
+ //scalar name
+ if (p_index == CoreStringNames::singleton->position) {
+ return v->position;
+ } else if (p_index == CoreStringNames::singleton->size) {
+ return v->size;
+ } else if (p_index == CoreStringNames::singleton->end) {
+ return v->size + v->position;
+ }
+ } break;
case TRANSFORM2D: {
const Transform2D *v = _data._transform2d;
@@ -1584,6 +1829,18 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
}
} break;
+ case VECTOR3I: {
+
+ const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem);
+ if (p_index == CoreStringNames::singleton->x) {
+ return v->x;
+ } else if (p_index == CoreStringNames::singleton->y) {
+ return v->y;
+ } else if (p_index == CoreStringNames::singleton->z) {
+ return v->z;
+ }
+
+ } break;
case PLANE: {
const Plane *v = reinterpret_cast<const Plane *>(_data._mem);
@@ -1613,7 +1870,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
return v->w;
}
- } break; // 10
+ } break;
case AABB: {
const ::AABB *v = _data._aabb;
@@ -1707,28 +1964,55 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
return Variant();
}
-#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \
- case m_name: { \
- skip_test; \
- \
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { \
- int index = p_index; \
- m_type *arr = reinterpret_cast<m_type *>(_data._mem); \
- \
- if (index < 0) \
- index += arr->size(); \
- if (index >= 0 && index < arr->size()) { \
- valid = true; \
- cmd; \
- } \
- } \
+#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \
+ case m_name: { \
+ skip_test; \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ m_type *arr = reinterpret_cast<m_type *>(_data._mem); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ cmd; \
+ } \
+ } \
} break;
-#define DEFAULT_OP_DVECTOR_SET(m_name, dv_type, skip_cond) \
- DEFAULT_OP_ARRAY_CMD(m_name, PoolVector<dv_type>, if (skip_cond) return;, arr->set(index, p_value); return )
+#define DEFAULT_OP_DVECTOR_SET(m_name, m_type, skip_cond) \
+ case m_name: { \
+ if (skip_cond) return; \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ Vector<m_type> *arr = PackedArrayRef<m_type>::get_array_ptr(_data.packed_array); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ arr->set(index, p_value); \
+ } \
+ } \
+ } break;
-#define DEFAULT_OP_DVECTOR_GET(m_name, dv_type) \
- DEFAULT_OP_ARRAY_CMD(m_name, const PoolVector<dv_type>, ;, return arr->get(index))
+#define DEFAULT_OP_DVECTOR_GET(m_name, m_type) \
+ case m_name: { \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ const Vector<m_type> *arr = &PackedArrayRef<m_type>::get_array(_data.packed_array); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ return arr->get(index); \
+ } \
+ } \
+ } break;
void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) {
@@ -1747,12 +2031,12 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
case INT: {
return;
} break;
- case REAL: {
+ case FLOAT: {
return;
} break;
case STRING: {
- if (p_index.type != Variant::INT && p_index.type != Variant::REAL)
+ if (p_index.type != Variant::INT && p_index.type != Variant::FLOAT)
return;
int idx = p_index;
@@ -1764,7 +2048,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
return;
String chr;
- if (p_value.type == Variant::INT || p_value.type == Variant::REAL) {
+ if (p_value.type == Variant::INT || p_value.type == Variant::FLOAT) {
chr = String::chr(p_value);
} else if (p_value.type == Variant::STRING) {
@@ -1781,10 +2065,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case VECTOR2: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
@@ -1813,7 +2097,42 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break; // 5
+ } break;
+ case VECTOR2I: {
+
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
+ return;
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+ // scalar index
+ int idx = p_index;
+
+ if (idx < 0)
+ idx += 2;
+ if (idx >= 0 && idx < 2) {
+
+ Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem);
+ valid = true;
+ (*v)[idx] = p_value;
+ return;
+ }
+ } else if (p_index.get_type() == Variant::STRING) {
+ //scalar name
+
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem);
+ if (*str == "x") {
+ valid = true;
+ v->x = p_value;
+ return;
+ } else if (*str == "y") {
+ valid = true;
+ v->y = p_value;
+ return;
+ }
+ }
+
+ } break;
case RECT2: {
if (p_value.type != Variant::VECTOR2)
@@ -1839,12 +2158,37 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
} break;
+ case RECT2I: {
+
+ if (p_value.type != Variant::VECTOR2I)
+ return;
+
+ if (p_index.get_type() == Variant::STRING) {
+ //scalar name
+
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ Rect2i *v = reinterpret_cast<Rect2i *>(_data._mem);
+ if (*str == "position") {
+ valid = true;
+ v->position = p_value;
+ return;
+ } else if (*str == "size") {
+ valid = true;
+ v->size = p_value;
+ return;
+ } else if (*str == "end") {
+ valid = true;
+ v->size = Vector2i(p_value) - v->position;
+ return;
+ }
+ }
+ } break;
case TRANSFORM2D: {
if (p_value.type != Variant::VECTOR2)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -1880,10 +2224,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case VECTOR3: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -1916,6 +2260,44 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
} break;
+ case VECTOR3I: {
+
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
+ return;
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+ //scalar index
+ int idx = p_index;
+ if (idx < 0)
+ idx += 3;
+ if (idx >= 0 && idx < 3) {
+
+ Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem);
+ valid = true;
+ (*v)[idx] = p_value;
+ return;
+ }
+ } else if (p_index.get_type() == Variant::STRING) {
+
+ //scalar name
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem);
+ if (*str == "x") {
+ valid = true;
+ v->x = p_value;
+ return;
+ } else if (*str == "y") {
+ valid = true;
+ v->y = p_value;
+ return;
+ } else if (*str == "z") {
+ valid = true;
+ v->z = p_value;
+ return;
+ }
+ }
+
+ } break;
case PLANE: {
if (p_index.get_type() == Variant::STRING) {
@@ -1923,21 +2305,21 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
const String *str = reinterpret_cast<const String *>(p_index._data._mem);
Plane *v = reinterpret_cast<Plane *>(_data._mem);
if (*str == "x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
v->normal.x = p_value;
return;
} else if (*str == "y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
v->normal.y = p_value;
return;
} else if (*str == "z") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
@@ -1960,7 +2342,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case QUAT: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
if (p_index.get_type() == Variant::STRING) {
@@ -1986,7 +2368,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_value.type != Variant::VECTOR3)
@@ -2017,7 +2399,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
if (p_value.type != Variant::VECTOR3)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -2053,7 +2435,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case TRANSFORM: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
if (p_value.type != Variant::VECTOR3)
return;
@@ -2096,7 +2478,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case COLOR: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
if (p_index.get_type() == Variant::STRING) {
@@ -2161,8 +2543,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
} break;
+ case STRING_NAME: {
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -2180,7 +2564,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
#endif
- if (p_index.get_type() != Variant::STRING) {
+ if (p_index.get_type() != Variant::STRING_NAME && p_index.get_type() != Variant::STRING) {
obj->setvar(p_index, p_value, r_valid);
return;
}
@@ -2196,14 +2580,16 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
valid = true; //always valid, i guess? should this really be ok?
return;
} break;
- DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return ) // 20
- DEFAULT_OP_DVECTOR_SET(POOL_BYTE_ARRAY, uint8_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(POOL_INT_ARRAY, int, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(POOL_REAL_ARRAY, real_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(POOL_STRING_ARRAY, String, p_value.type != Variant::STRING)
- DEFAULT_OP_DVECTOR_SET(POOL_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2) // 25
- DEFAULT_OP_DVECTOR_SET(POOL_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3)
- DEFAULT_OP_DVECTOR_SET(POOL_COLOR_ARRAY, Color, p_value.type != Variant::COLOR)
+ DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return )
+ DEFAULT_OP_DVECTOR_SET(PACKED_BYTE_ARRAY, uint8_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_INT32_ARRAY, int32_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_INT64_ARRAY, int64_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT32_ARRAY, float, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT64_ARRAY, double, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_STRING_ARRAY, String, p_value.type != Variant::STRING)
+ DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2)
+ DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3)
+ DEFAULT_OP_DVECTOR_SET(PACKED_COLOR_ARRAY, Color, p_value.type != Variant::COLOR)
default:
return;
}
@@ -2227,12 +2613,12 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
case INT: {
return Variant();
} break;
- case REAL: {
+ case FLOAT: {
return Variant();
} break;
case STRING: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//string index
int idx = p_index;
@@ -2249,7 +2635,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case VECTOR2: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
if (idx < 0)
@@ -2274,7 +2660,35 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break; // 5
+ } break;
+ case VECTOR2I: {
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+ // scalar index
+ int idx = p_index;
+ if (idx < 0)
+ idx += 2;
+ if (idx >= 0 && idx < 2) {
+
+ const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem);
+ valid = true;
+ return (*v)[idx];
+ }
+ } else if (p_index.get_type() == Variant::STRING) {
+ //scalar name
+
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ const Vector2i *v = reinterpret_cast<const Vector2i *>(_data._mem);
+ if (*str == "x") {
+ valid = true;
+ return v->x;
+ } else if (*str == "y") {
+ valid = true;
+ return v->y;
+ }
+ }
+
+ } break;
case RECT2: {
if (p_index.get_type() == Variant::STRING) {
@@ -2294,9 +2708,28 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
} break;
+ case RECT2I: {
+
+ if (p_index.get_type() == Variant::STRING) {
+ //scalar name
+
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ const Rect2i *v = reinterpret_cast<const Rect2i *>(_data._mem);
+ if (*str == "position") {
+ valid = true;
+ return v->position;
+ } else if (*str == "size") {
+ valid = true;
+ return v->size;
+ } else if (*str == "end") {
+ valid = true;
+ return v->size + v->position;
+ }
+ }
+ } break;
case VECTOR3: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -2325,9 +2758,40 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
} break;
+ case VECTOR3I: {
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+ //scalar index
+ int idx = p_index;
+ if (idx < 0)
+ idx += 3;
+ if (idx >= 0 && idx < 3) {
+
+ const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem);
+ valid = true;
+ return (*v)[idx];
+ }
+ } else if (p_index.get_type() == Variant::STRING) {
+
+ //scalar name
+ const String *str = reinterpret_cast<const String *>(p_index._data._mem);
+ const Vector3i *v = reinterpret_cast<const Vector3i *>(_data._mem);
+ if (*str == "x") {
+ valid = true;
+ return v->x;
+ } else if (*str == "y") {
+ valid = true;
+ return v->y;
+ } else if (*str == "z") {
+ valid = true;
+ return v->z;
+ }
+ }
+
+ } break;
case TRANSFORM2D: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -2403,7 +2867,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_index.get_type() == Variant::STRING) {
@@ -2425,7 +2889,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case BASIS: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
if (index < 0)
@@ -2456,7 +2920,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case TRANSFORM: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
if (index < 0)
@@ -2535,8 +2999,10 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
} break;
+ case STRING_NAME: {
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -2568,14 +3034,16 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
return *res;
}
} break;
- DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index]) // 20
- DEFAULT_OP_DVECTOR_GET(POOL_BYTE_ARRAY, uint8_t)
- DEFAULT_OP_DVECTOR_GET(POOL_INT_ARRAY, int)
- DEFAULT_OP_DVECTOR_GET(POOL_REAL_ARRAY, real_t)
- DEFAULT_OP_DVECTOR_GET(POOL_STRING_ARRAY, String)
- DEFAULT_OP_DVECTOR_GET(POOL_VECTOR2_ARRAY, Vector2) // 25
- DEFAULT_OP_DVECTOR_GET(POOL_VECTOR3_ARRAY, Vector3)
- DEFAULT_OP_DVECTOR_GET(POOL_COLOR_ARRAY, Color)
+ DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index])
+ DEFAULT_OP_DVECTOR_GET(PACKED_BYTE_ARRAY, uint8_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_INT32_ARRAY, int32_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_INT64_ARRAY, int64_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT32_ARRAY, float)
+ DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT64_ARRAY, double)
+ DEFAULT_OP_DVECTOR_GET(PACKED_STRING_ARRAY, String)
+ DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR2_ARRAY, Vector2)
+ DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR3_ARRAY, Vector3)
+ DEFAULT_OP_DVECTOR_GET(PACKED_COLOR_ARRAY, Color)
default:
return Variant();
}
@@ -2635,7 +3103,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem);
return dic->has(p_index);
- } break; // 20
+ } break;
case ARRAY: {
const Array *arr = reinterpret_cast<const Array *>(_data._mem);
@@ -2651,14 +3119,14 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
return false;
} break;
- case POOL_BYTE_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ case PACKED_BYTE_ARRAY: {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
- const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<uint8_t>::Read r = arr->read();
+ const uint8_t *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2669,14 +3137,49 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break;
- case POOL_INT_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ case PACKED_INT32_ARRAY: {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
- int index = p_index;
- const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem);
+ int32_t index = p_index;
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t l = arr->size();
+ if (l) {
+ const int32_t *r = arr->ptr();
+ for (int32_t i = 0; i < l; i++) {
+ if (r[i] == index)
+ return true;
+ }
+ }
+
+ return false;
+ }
+ } break;
+ case PACKED_INT64_ARRAY: {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+
+ int64_t index = p_index;
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t l = arr->size();
+ if (l) {
+ const int64_t *r = arr->ptr();
+ for (int64_t i = 0; i < l; i++) {
+ if (r[i] == index)
+ return true;
+ }
+ }
+
+ return false;
+ }
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+
+ real_t index = p_index;
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<int>::Read r = arr->read();
+ const float *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2685,16 +3188,17 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
return false;
}
+
} break;
- case POOL_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
real_t index = p_index;
- const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<real_t>::Read r = arr->read();
+ const double *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2705,15 +3209,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
if (p_index.get_type() == Variant::STRING) {
String index = p_index;
- const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<String>::Read r = arr->read();
+ const String *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2724,15 +3228,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break; //25
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
if (p_index.get_type() == Variant::VECTOR2) {
Vector2 index = p_index;
- const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<Vector2>::Read r = arr->read();
+ const Vector2 *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2743,15 +3247,15 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
if (p_index.get_type() == Variant::VECTOR3) {
Vector3 index = p_index;
- const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<Vector3>::Read r = arr->read();
+ const Vector3 *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2762,16 +3266,16 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
if (p_index.get_type() == Variant::COLOR) {
Color index = p_index;
- const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- PoolVector<Color>::Read r = arr->read();
+ const Color *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -2795,10 +3299,16 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
switch (type) {
case VECTOR2: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+
+ } break;
+ case VECTOR2I: {
+
+ p_list->push_back(PropertyInfo(Variant::INT, "x"));
+ p_list->push_back(PropertyInfo(Variant::INT, "y"));
- } break; // 5
+ } break;
case RECT2: {
p_list->push_back(PropertyInfo(Variant::VECTOR2, "position"));
@@ -2806,11 +3316,25 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::VECTOR2, "end"));
} break;
+ case RECT2I: {
+
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "position"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "end"));
+
+ } break;
case VECTOR3: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
+
+ } break;
+ case VECTOR3I: {
+
+ p_list->push_back(PropertyInfo(Variant::INT, "x"));
+ p_list->push_back(PropertyInfo(Variant::INT, "y"));
+ p_list->push_back(PropertyInfo(Variant::INT, "z"));
} break;
case TRANSFORM2D: {
@@ -2823,20 +3347,20 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
case PLANE: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "normal"));
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
- p_list->push_back(PropertyInfo(Variant::REAL, "d"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "d"));
} break;
case QUAT: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
- p_list->push_back(PropertyInfo(Variant::REAL, "w"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "w"));
- } break; // 10
+ } break;
case AABB: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "position"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "size"));
@@ -2856,21 +3380,23 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
} break;
case COLOR: {
- p_list->push_back(PropertyInfo(Variant::REAL, "r"));
- p_list->push_back(PropertyInfo(Variant::REAL, "g"));
- p_list->push_back(PropertyInfo(Variant::REAL, "b"));
- p_list->push_back(PropertyInfo(Variant::REAL, "a"));
- p_list->push_back(PropertyInfo(Variant::REAL, "h"));
- p_list->push_back(PropertyInfo(Variant::REAL, "s"));
- p_list->push_back(PropertyInfo(Variant::REAL, "v"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "r"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "g"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "b"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "a"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "h"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "s"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "v"));
p_list->push_back(PropertyInfo(Variant::INT, "r8"));
p_list->push_back(PropertyInfo(Variant::INT, "g8"));
p_list->push_back(PropertyInfo(Variant::INT, "b8"));
p_list->push_back(PropertyInfo(Variant::INT, "a8"));
} break;
+ case STRING_NAME: {
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -2901,14 +3427,16 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
}
}
} break;
- case ARRAY: // 20
- case POOL_BYTE_ARRAY:
- case POOL_INT_ARRAY:
- case POOL_REAL_ARRAY:
- case POOL_STRING_ARRAY:
- case POOL_VECTOR2_ARRAY: // 25
- case POOL_VECTOR3_ARRAY:
- case POOL_COLOR_ARRAY: {
+ case ARRAY:
+ case PACKED_BYTE_ARRAY:
+ case PACKED_INT32_ARRAY:
+ case PACKED_INT64_ARRAY:
+ case PACKED_FLOAT32_ARRAY:
+ case PACKED_FLOAT64_ARRAY:
+ case PACKED_STRING_ARRAY:
+ case PACKED_VECTOR2_ARRAY:
+ case PACKED_VECTOR3_ARRAY:
+ case PACKED_COLOR_ARRAY: {
//nothing
} break;
@@ -2925,9 +3453,9 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
r_iter = 0;
return _data._int > 0;
} break;
- case REAL: {
+ case FLOAT: {
r_iter = 0;
- return _data._real > 0.0;
+ return _data._float > 0.0;
} break;
case VECTOR2: {
int64_t from = reinterpret_cast<const Vector2 *>(_data._mem)->x;
@@ -2968,15 +3496,15 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
}
#endif
- Variant::CallError ce;
- ce.error = Variant::CallError::CALL_OK;
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
Array ref;
ref.push_back(r_iter);
Variant vref = ref;
const Variant *refp[] = { &vref };
Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_init, refp, 1, ce);
- if (ref.size() != 1 || ce.error != Variant::CallError::CALL_OK) {
+ if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) {
valid = false;
return false;
}
@@ -3012,56 +3540,72 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
r_iter = 0;
return true;
} break;
- case POOL_BYTE_ARRAY: {
- const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ case PACKED_BYTE_ARRAY: {
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case POOL_INT_ARRAY: {
- const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case POOL_REAL_ARRAY: {
- const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case POOL_STRING_ARRAY: {
- const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
+
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
+ if (arr->size() == 0)
+ return false;
+ r_iter = 0;
+ return true;
- const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ } break;
+ case PACKED_STRING_ARRAY: {
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
+ if (arr->size() == 0)
+ return false;
+ r_iter = 0;
+ return true;
+ } break;
+ case PACKED_COLOR_ARRAY: {
+
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3087,10 +3631,10 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case REAL: {
+ case FLOAT: {
int64_t idx = r_iter;
idx++;
- if (idx >= _data._real)
+ if (idx >= _data._float)
return false;
r_iter = idx;
return true;
@@ -3138,15 +3682,15 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
}
#endif
- Variant::CallError ce;
- ce.error = Variant::CallError::CALL_OK;
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
Array ref;
ref.push_back(r_iter);
Variant vref = ref;
const Variant *refp[] = { &vref };
Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_next, refp, 1, ce);
- if (ref.size() != 1 || ce.error != Variant::CallError::CALL_OK) {
+ if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) {
valid = false;
return false;
}
@@ -3187,8 +3731,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case POOL_BYTE_ARRAY: {
- const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ case PACKED_BYTE_ARRAY: {
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3197,8 +3741,28 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
- case POOL_INT_ARRAY: {
- const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t idx = r_iter;
+ idx++;
+ if (idx >= arr->size())
+ return false;
+ r_iter = idx;
+ return true;
+
+ } break;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t idx = r_iter;
+ idx++;
+ if (idx >= arr->size())
+ return false;
+ r_iter = idx;
+ return true;
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3207,8 +3771,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
- case POOL_REAL_ARRAY: {
- const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3217,8 +3781,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
- case POOL_STRING_ARRAY: {
- const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ case PACKED_STRING_ARRAY: {
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3226,9 +3790,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3236,9 +3800,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3246,9 +3810,9 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
- const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3272,7 +3836,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
return r_iter;
} break;
- case REAL: {
+ case FLOAT: {
return r_iter;
} break;
@@ -3297,12 +3861,12 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
}
#endif
- Variant::CallError ce;
- ce.error = Variant::CallError::CALL_OK;
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
const Variant *refp[] = { &r_iter };
Variant ret = _get_obj().obj->call(CoreStringNames::get_singleton()->_iter_get, refp, 1, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_valid = false;
return Variant();
}
@@ -3334,8 +3898,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_BYTE_ARRAY: {
- const PoolVector<uint8_t> *arr = reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
+ case PACKED_BYTE_ARRAY: {
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3345,8 +3909,30 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_INT_ARRAY: {
- const PoolVector<int> *arr = reinterpret_cast<const PoolVector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t idx = r_iter;
+#ifdef DEBUG_ENABLED
+ if (idx < 0 || idx >= arr->size()) {
+ r_valid = false;
+ return Variant();
+ }
+#endif
+ return arr->get(idx);
+ } break;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t idx = r_iter;
+#ifdef DEBUG_ENABLED
+ if (idx < 0 || idx >= arr->size()) {
+ r_valid = false;
+ return Variant();
+ }
+#endif
+ return arr->get(idx);
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3356,8 +3942,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_REAL_ARRAY: {
- const PoolVector<real_t> *arr = reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3367,8 +3953,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_STRING_ARRAY: {
- const PoolVector<String> *arr = reinterpret_cast<const PoolVector<String> *>(_data._mem);
+ case PACKED_STRING_ARRAY: {
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3378,9 +3964,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_VECTOR2_ARRAY: {
+ case PACKED_VECTOR2_ARRAY: {
- const PoolVector<Vector2> *arr = reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3390,9 +3976,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- const PoolVector<Vector3> *arr = reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3402,9 +3988,9 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case POOL_COLOR_ARRAY: {
+ case PACKED_COLOR_ARRAY: {
- const PoolVector<Color> *arr = reinterpret_cast<const PoolVector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3467,9 +4053,9 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst)
r_dst = int(va + vb * c + 0.5);
}
return;
- case REAL: {
- double ra = a._data._real;
- double rb = b._data._real;
+ case FLOAT: {
+ double ra = a._data._float;
+ double rb = b._data._float;
r_dst = ra + rb * c;
}
return;
@@ -3477,16 +4063,50 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst)
r_dst = *reinterpret_cast<const Vector2 *>(a._data._mem) + *reinterpret_cast<const Vector2 *>(b._data._mem) * c;
}
return;
+ case VECTOR2I: {
+ int32_t vax = reinterpret_cast<const Vector2i *>(a._data._mem)->x;
+ int32_t vbx = reinterpret_cast<const Vector2i *>(b._data._mem)->x;
+ int32_t vay = reinterpret_cast<const Vector2i *>(a._data._mem)->y;
+ int32_t vby = reinterpret_cast<const Vector2i *>(b._data._mem)->y;
+ r_dst = Vector2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5));
+ }
+ return;
case RECT2: {
const Rect2 *ra = reinterpret_cast<const Rect2 *>(a._data._mem);
const Rect2 *rb = reinterpret_cast<const Rect2 *>(b._data._mem);
r_dst = Rect2(ra->position + rb->position * c, ra->size + rb->size * c);
}
return;
+ case RECT2I: {
+ const Rect2i *ra = reinterpret_cast<const Rect2i *>(a._data._mem);
+ const Rect2i *rb = reinterpret_cast<const Rect2i *>(b._data._mem);
+
+ int32_t vax = ra->position.x;
+ int32_t vay = ra->position.y;
+ int32_t vbx = ra->size.x;
+ int32_t vby = ra->size.y;
+ int32_t vcx = rb->position.x;
+ int32_t vcy = rb->position.y;
+ int32_t vdx = rb->size.x;
+ int32_t vdy = rb->size.y;
+
+ r_dst = Rect2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vcx + vdx * c + 0.5), int32_t(vcy + vdy * c + 0.5));
+ }
+ return;
case VECTOR3: {
r_dst = *reinterpret_cast<const Vector3 *>(a._data._mem) + *reinterpret_cast<const Vector3 *>(b._data._mem) * c;
}
return;
+ case VECTOR3I: {
+ int32_t vax = reinterpret_cast<const Vector3i *>(a._data._mem)->x;
+ int32_t vbx = reinterpret_cast<const Vector3i *>(b._data._mem)->x;
+ int32_t vay = reinterpret_cast<const Vector3i *>(a._data._mem)->y;
+ int32_t vby = reinterpret_cast<const Vector3i *>(b._data._mem)->y;
+ int32_t vaz = reinterpret_cast<const Vector3i *>(a._data._mem)->z;
+ int32_t vbz = reinterpret_cast<const Vector3i *>(b._data._mem)->z;
+ r_dst = Vector3i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vaz + vbz * c + 0.5));
+ }
+ return;
case AABB: {
const ::AABB *ra = reinterpret_cast<const ::AABB *>(a._data._mem);
const ::AABB *rb = reinterpret_cast<const ::AABB *>(b._data._mem);
@@ -3552,9 +4172,9 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = int(va + (vb - va) * c);
}
return;
- case REAL: {
- real_t va = a._data._real;
- real_t vb = b._data._real;
+ case FLOAT: {
+ real_t va = a._data._float;
+ real_t vb = b._data._float;
r_dst = va + (vb - va) * c;
}
return;
@@ -3603,14 +4223,51 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = reinterpret_cast<const Vector2 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector2 *>(b._data._mem), c);
}
return;
+ case VECTOR2I: {
+ int32_t vax = reinterpret_cast<const Vector2i *>(a._data._mem)->x;
+ int32_t vbx = reinterpret_cast<const Vector2i *>(b._data._mem)->x;
+ int32_t vay = reinterpret_cast<const Vector2i *>(a._data._mem)->y;
+ int32_t vby = reinterpret_cast<const Vector2i *>(b._data._mem)->y;
+ r_dst = Vector2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5));
+ }
+ return;
+
case RECT2: {
r_dst = Rect2(reinterpret_cast<const Rect2 *>(a._data._mem)->position.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->position, c), reinterpret_cast<const Rect2 *>(a._data._mem)->size.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->size, c));
}
return;
+ case RECT2I: {
+ const Rect2i *ra = reinterpret_cast<const Rect2i *>(a._data._mem);
+ const Rect2i *rb = reinterpret_cast<const Rect2i *>(b._data._mem);
+
+ int32_t vax = ra->position.x;
+ int32_t vay = ra->position.y;
+ int32_t vbx = ra->size.x;
+ int32_t vby = ra->size.y;
+ int32_t vcx = rb->position.x;
+ int32_t vcy = rb->position.y;
+ int32_t vdx = rb->size.x;
+ int32_t vdy = rb->size.y;
+
+ r_dst = Rect2i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vcx + vdx * c + 0.5), int32_t(vcy + vdy * c + 0.5));
+ }
+ return;
+
case VECTOR3: {
r_dst = reinterpret_cast<const Vector3 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector3 *>(b._data._mem), c);
}
return;
+ case VECTOR3I: {
+ int32_t vax = reinterpret_cast<const Vector3i *>(a._data._mem)->x;
+ int32_t vbx = reinterpret_cast<const Vector3i *>(b._data._mem)->x;
+ int32_t vay = reinterpret_cast<const Vector3i *>(a._data._mem)->y;
+ int32_t vby = reinterpret_cast<const Vector3i *>(b._data._mem)->y;
+ int32_t vaz = reinterpret_cast<const Vector3i *>(a._data._mem)->z;
+ int32_t vbz = reinterpret_cast<const Vector3i *>(b._data._mem)->z;
+ r_dst = Vector3i(int32_t(vax + vbx * c + 0.5), int32_t(vay + vby * c + 0.5), int32_t(vaz + vbz * c + 0.5));
+ }
+ return;
+
case TRANSFORM2D: {
r_dst = a._data._transform2d->interpolate_with(*b._data._transform2d, c);
}
@@ -3639,6 +4296,10 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = reinterpret_cast<const Color *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Color *>(b._data._mem), c);
}
return;
+ case STRING_NAME: {
+ r_dst = a;
+ }
+ return;
case NODE_PATH: {
r_dst = a;
}
@@ -3658,25 +4319,77 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = a;
}
return;
- case POOL_BYTE_ARRAY: {
+ case PACKED_BYTE_ARRAY: {
r_dst = a;
}
return;
- case POOL_INT_ARRAY: {
- const PoolVector<int> *arr_a = reinterpret_cast<const PoolVector<int> *>(a._data._mem);
- const PoolVector<int> *arr_b = reinterpret_cast<const PoolVector<int> *>(b._data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr_a = &PackedArrayRef<int32_t>::get_array(a._data.packed_array);
+ const Vector<int32_t> *arr_b = &PackedArrayRef<int32_t>::get_array(b._data.packed_array);
+ int32_t sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ Vector<int32_t> v;
+ v.resize(sz);
+ {
+ int32_t *vw = v.ptrw();
+ const int32_t *ar = arr_a->ptr();
+ const int32_t *br = arr_b->ptr();
+
+ Variant va;
+ for (int32_t i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
+ }
+ return;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr_a = &PackedArrayRef<int64_t>::get_array(a._data.packed_array);
+ const Vector<int64_t> *arr_b = &PackedArrayRef<int64_t>::get_array(b._data.packed_array);
+ int64_t sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ Vector<int64_t> v;
+ v.resize(sz);
+ {
+ int64_t *vw = v.ptrw();
+ const int64_t *ar = arr_a->ptr();
+ const int64_t *br = arr_b->ptr();
+
+ Variant va;
+ for (int64_t i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
+ }
+ return;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr_a = &PackedArrayRef<float>::get_array(a._data.packed_array);
+ const Vector<float> *arr_b = &PackedArrayRef<float>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- PoolVector<int> v;
+ Vector<float> v;
v.resize(sz);
{
- PoolVector<int>::Write vw = v.write();
- PoolVector<int>::Read ar = arr_a->read();
- PoolVector<int>::Read br = arr_b->read();
+ float *vw = v.ptrw();
+ const float *ar = arr_a->ptr();
+ const float *br = arr_b->ptr();
Variant va;
for (int i = 0; i < sz; i++) {
@@ -3688,21 +4401,21 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
}
return;
- case POOL_REAL_ARRAY: {
- const PoolVector<real_t> *arr_a = reinterpret_cast<const PoolVector<real_t> *>(a._data._mem);
- const PoolVector<real_t> *arr_b = reinterpret_cast<const PoolVector<real_t> *>(b._data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr_a = &PackedArrayRef<double>::get_array(a._data.packed_array);
+ const Vector<double> *arr_b = &PackedArrayRef<double>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- PoolVector<real_t> v;
+ Vector<double> v;
v.resize(sz);
{
- PoolVector<real_t>::Write vw = v.write();
- PoolVector<real_t>::Read ar = arr_a->read();
- PoolVector<real_t>::Read br = arr_b->read();
+ double *vw = v.ptrw();
+ const double *ar = arr_a->ptr();
+ const double *br = arr_b->ptr();
Variant va;
for (int i = 0; i < sz; i++) {
@@ -3714,25 +4427,25 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
}
return;
- case POOL_STRING_ARRAY: {
+ case PACKED_STRING_ARRAY: {
r_dst = a;
}
return;
- case POOL_VECTOR2_ARRAY: {
- const PoolVector<Vector2> *arr_a = reinterpret_cast<const PoolVector<Vector2> *>(a._data._mem);
- const PoolVector<Vector2> *arr_b = reinterpret_cast<const PoolVector<Vector2> *>(b._data._mem);
+ case PACKED_VECTOR2_ARRAY: {
+ const Vector<Vector2> *arr_a = &PackedArrayRef<Vector2>::get_array(a._data.packed_array);
+ const Vector<Vector2> *arr_b = &PackedArrayRef<Vector2>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- PoolVector<Vector2> v;
+ Vector<Vector2> v;
v.resize(sz);
{
- PoolVector<Vector2>::Write vw = v.write();
- PoolVector<Vector2>::Read ar = arr_a->read();
- PoolVector<Vector2>::Read br = arr_b->read();
+ Vector2 *vw = v.ptrw();
+ const Vector2 *ar = arr_a->ptr();
+ const Vector2 *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
vw[i] = ar[i].linear_interpolate(br[i], c);
@@ -3742,22 +4455,22 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
}
return;
- case POOL_VECTOR3_ARRAY: {
+ case PACKED_VECTOR3_ARRAY: {
- const PoolVector<Vector3> *arr_a = reinterpret_cast<const PoolVector<Vector3> *>(a._data._mem);
- const PoolVector<Vector3> *arr_b = reinterpret_cast<const PoolVector<Vector3> *>(b._data._mem);
+ const Vector<Vector3> *arr_a = &PackedArrayRef<Vector3>::get_array(a._data.packed_array);
+ const Vector<Vector3> *arr_b = &PackedArrayRef<Vector3>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- PoolVector<Vector3> v;
+ Vector<Vector3> v;
v.resize(sz);
{
- PoolVector<Vector3>::Write vw = v.write();
- PoolVector<Vector3>::Read ar = arr_a->read();
- PoolVector<Vector3>::Read br = arr_b->read();
+ Vector3 *vw = v.ptrw();
+ const Vector3 *ar = arr_a->ptr();
+ const Vector3 *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
vw[i] = ar[i].linear_interpolate(br[i], c);
@@ -3767,21 +4480,21 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
}
return;
- case POOL_COLOR_ARRAY: {
- const PoolVector<Color> *arr_a = reinterpret_cast<const PoolVector<Color> *>(a._data._mem);
- const PoolVector<Color> *arr_b = reinterpret_cast<const PoolVector<Color> *>(b._data._mem);
+ case PACKED_COLOR_ARRAY: {
+ const Vector<Color> *arr_a = &PackedArrayRef<Color>::get_array(a._data.packed_array);
+ const Vector<Color> *arr_b = &PackedArrayRef<Color>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- PoolVector<Color> v;
+ Vector<Color> v;
v.resize(sz);
{
- PoolVector<Color>::Write vw = v.write();
- PoolVector<Color>::Read ar = arr_a->read();
- PoolVector<Color>::Read br = arr_b->read();
+ Color *vw = v.ptrw();
+ const Color *ar = arr_a->ptr();
+ const Color *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
vw[i] = ar[i].linear_interpolate(br[i], c);
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 996b25308e..d2ee0b71c9 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -81,6 +81,7 @@ const char *VariantParser::tk_name[TK_MAX] = {
"')'",
"identifier",
"string",
+ "string_name",
"number",
"color",
"':'",
@@ -93,6 +94,8 @@ const char *VariantParser::tk_name[TK_MAX] = {
Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, String &r_err_str) {
+ bool string_name = false;
+
while (true) {
CharType cchar;
@@ -204,6 +207,17 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
r_token.type = TK_COLOR;
return OK;
};
+ case '@': {
+ cchar = p_stream->get_char();
+ if (cchar != '"') {
+ r_err_str = "Expected '\"' after '@'";
+ r_token.type = TK_ERROR;
+ return ERR_PARSE_ERROR;
+ }
+
+ string_name = true;
+ [[fallthrough]];
+ }
case '"': {
String str;
@@ -285,8 +299,14 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
if (p_stream->is_utf8()) {
str.parse_utf8(str.ascii(true).get_data());
}
- r_token.type = TK_STRING;
- r_token.value = str;
+ if (string_name) {
+ r_token.type = TK_STRING_NAME;
+ r_token.value = StringName(str);
+ string_name = false; //reset
+ } else {
+ r_token.type = TK_STRING;
+ r_token.value = str;
+ }
return OK;
} break;
@@ -512,6 +532,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = false;
else if (id == "null" || id == "nil")
value = Variant();
+ else if (id == "inf")
+ value = Math_INF;
+ else if (id == "nan")
+ value = Math_NAN;
else if (id == "Vector2") {
Vector<float> args;
@@ -525,6 +549,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = Vector2(args[0], args[1]);
return OK;
+ } else if (id == "Vector2i") {
+
+ Vector<int32_t> args;
+ Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ if (args.size() != 2) {
+ r_err_str = "Expected 2 arguments for constructor";
+ }
+
+ value = Vector2i(args[0], args[1]);
+ return OK;
} else if (id == "Rect2") {
Vector<float> args;
@@ -538,6 +575,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = Rect2(args[0], args[1], args[2], args[3]);
return OK;
+ } else if (id == "Rect2i") {
+
+ Vector<int32_t> args;
+ Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ if (args.size() != 4) {
+ r_err_str = "Expected 4 arguments for constructor";
+ }
+
+ value = Rect2i(args[0], args[1], args[2], args[3]);
+ return OK;
} else if (id == "Vector3") {
Vector<float> args;
@@ -551,6 +601,19 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = Vector3(args[0], args[1], args[2]);
return OK;
+ } else if (id == "Vector3i") {
+
+ Vector<int32_t> args;
+ Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ if (args.size() != 3) {
+ r_err_str = "Expected 3 arguments for constructor";
+ }
+
+ value = Vector3i(args[0], args[1], args[2]);
+ return OK;
} else if (id == "Transform2D" || id == "Matrix32") { //compatibility
Vector<float> args;
@@ -861,18 +924,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
}
}
- } else if (id == "PoolByteArray" || id == "ByteArray") {
+ } else if (id == "PackedByteArray" || id == "PoolByteArray" || id == "ByteArray") {
Vector<uint8_t> args;
Error err = _parse_construct<uint8_t>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<uint8_t> arr;
+ Vector<uint8_t> arr;
{
int len = args.size();
arr.resize(len);
- PoolVector<uint8_t>::Write w = arr.write();
+ uint8_t *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = args[i];
}
@@ -882,20 +945,41 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolIntArray" || id == "IntArray") {
+ } else if (id == "PackedInt32Array" || id == "PackedIntArray" || id == "PoolIntArray" || id == "IntArray") {
- Vector<int> args;
- Error err = _parse_construct<int>(p_stream, args, line, r_err_str);
+ Vector<int32_t> args;
+ Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<int> arr;
+ Vector<int32_t> arr;
{
- int len = args.size();
+ int32_t len = args.size();
arr.resize(len);
- PoolVector<int>::Write w = arr.write();
- for (int i = 0; i < len; i++) {
- w[i] = int(args[i]);
+ int32_t *w = arr.ptrw();
+ for (int32_t i = 0; i < len; i++) {
+ w[i] = int32_t(args[i]);
+ }
+ }
+
+ value = arr;
+
+ return OK;
+
+ } else if (id == "PackedInt64Array") {
+
+ Vector<int64_t> args;
+ Error err = _parse_construct<int64_t>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ Vector<int64_t> arr;
+ {
+ int64_t len = args.size();
+ arr.resize(len);
+ int64_t *w = arr.ptrw();
+ for (int64_t i = 0; i < len; i++) {
+ w[i] = int64_t(args[i]);
}
}
@@ -903,18 +987,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolRealArray" || id == "FloatArray") {
+ } else if (id == "PackedFloat32Array" || id == "PackedRealArray" || id == "PoolRealArray" || id == "FloatArray") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<float> arr;
+ Vector<float> arr;
{
int len = args.size();
arr.resize(len);
- PoolVector<float>::Write w = arr.write();
+ float *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = args[i];
}
@@ -923,7 +1007,27 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = arr;
return OK;
- } else if (id == "PoolStringArray" || id == "StringArray") {
+ } else if (id == "PackedFloat64Array") {
+
+ Vector<double> args;
+ Error err = _parse_construct<double>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ Vector<double> arr;
+ {
+ int len = args.size();
+ arr.resize(len);
+ double *w = arr.ptrw();
+ for (int i = 0; i < len; i++) {
+ w[i] = args[i];
+ }
+ }
+
+ value = arr;
+
+ return OK;
+ } else if (id == "PackedStringArray" || id == "PoolStringArray" || id == "StringArray") {
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_PARENTHESIS_OPEN) {
@@ -960,11 +1064,11 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
cs.push_back(token.value);
}
- PoolVector<String> arr;
+ Vector<String> arr;
{
int len = cs.size();
arr.resize(len);
- PoolVector<String>::Write w = arr.write();
+ String *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = cs[i];
}
@@ -974,18 +1078,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolVector2Array" || id == "Vector2Array") {
+ } else if (id == "PackedVector2Array" || id == "PoolVector2Array" || id == "Vector2Array") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<Vector2> arr;
+ Vector<Vector2> arr;
{
int len = args.size() / 2;
arr.resize(len);
- PoolVector<Vector2>::Write w = arr.write();
+ Vector2 *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = Vector2(args[i * 2 + 0], args[i * 2 + 1]);
}
@@ -995,18 +1099,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolVector3Array" || id == "Vector3Array") {
+ } else if (id == "PackedVector3Array" || id == "PoolVector3Array" || id == "Vector3Array") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<Vector3> arr;
+ Vector<Vector3> arr;
{
int len = args.size() / 3;
arr.resize(len);
- PoolVector<Vector3>::Write w = arr.write();
+ Vector3 *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = Vector3(args[i * 3 + 0], args[i * 3 + 1], args[i * 3 + 2]);
}
@@ -1016,18 +1120,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolColorArray" || id == "ColorArray") {
+ } else if (id == "PackedColorArray" || id == "PoolColorArray" || id == "ColorArray") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
if (err)
return err;
- PoolVector<Color> arr;
+ Vector<Color> arr;
{
int len = args.size() / 4;
arr.resize(len);
- PoolVector<Color>::Write w = arr.write();
+ Color *w = arr.ptrw();
for (int i = 0; i < len; i++) {
w[i] = Color(args[i * 4 + 0], args[i * 4 + 1], args[i * 4 + 2], args[i * 4 + 3]);
}
@@ -1051,6 +1155,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = token.value;
return OK;
+ } else if (token.type == TK_STRING_NAME) {
+
+ value = token.value;
+ return OK;
} else if (token.type == TK_COLOR) {
value = token.value;
@@ -1392,11 +1500,13 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, itos(p_variant.operator int64_t()));
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
String s = rtosfix(p_variant.operator real_t());
- if (s.find(".") == -1 && s.find("e") == -1)
- s += ".0";
+ if (s != "inf" && s != "nan") {
+ if (s.find(".") == -1 && s.find("e") == -1)
+ s += ".0";
+ }
p_store_string_func(p_store_string_ud, s);
} break;
case Variant::STRING: {
@@ -1411,17 +1521,33 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
Vector2 v = p_variant;
p_store_string_func(p_store_string_ud, "Vector2( " + rtosfix(v.x) + ", " + rtosfix(v.y) + " )");
} break;
+ case Variant::VECTOR2I: {
+
+ Vector2i v = p_variant;
+ p_store_string_func(p_store_string_ud, "Vector2i( " + itos(v.x) + ", " + itos(v.y) + " )");
+ } break;
case Variant::RECT2: {
Rect2 aabb = p_variant;
p_store_string_func(p_store_string_ud, "Rect2( " + rtosfix(aabb.position.x) + ", " + rtosfix(aabb.position.y) + ", " + rtosfix(aabb.size.x) + ", " + rtosfix(aabb.size.y) + " )");
} break;
+ case Variant::RECT2I: {
+
+ Rect2i aabb = p_variant;
+ p_store_string_func(p_store_string_ud, "Rect2i( " + itos(aabb.position.x) + ", " + itos(aabb.position.y) + ", " + itos(aabb.size.x) + ", " + itos(aabb.size.y) + " )");
+
+ } break;
case Variant::VECTOR3: {
Vector3 v = p_variant;
p_store_string_func(p_store_string_ud, "Vector3( " + rtosfix(v.x) + ", " + rtosfix(v.y) + ", " + rtosfix(v.z) + " )");
} break;
+ case Variant::VECTOR3I: {
+
+ Vector3i v = p_variant;
+ p_store_string_func(p_store_string_ud, "Vector3i( " + itos(v.x) + ", " + itos(v.y) + ", " + itos(v.z) + " )");
+ } break;
case Variant::PLANE: {
Plane p = p_variant;
@@ -1498,6 +1624,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, "Color( " + rtosfix(c.r) + ", " + rtosfix(c.g) + ", " + rtosfix(c.b) + ", " + rtosfix(c.a) + " )");
} break;
+ case Variant::STRING_NAME: {
+
+ String str = p_variant;
+
+ str = "@\"" + str.c_escape() + "\"";
+ p_store_string_func(p_store_string_ud, str);
+
+ } break;
case Variant::NODE_PATH: {
String str = p_variant;
@@ -1609,14 +1743,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolByteArray( ");
+ p_store_string_func(p_store_string_ud, "PackedByteArray( ");
String s;
- PoolVector<uint8_t> data = p_variant;
+ Vector<uint8_t> data = p_variant;
int len = data.size();
- PoolVector<uint8_t>::Read r = data.read();
- const uint8_t *ptr = r.ptr();
+ const uint8_t *ptr = data.ptr();
+
for (int i = 0; i < len; i++) {
if (i > 0)
@@ -1628,15 +1762,32 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolIntArray( ");
- PoolVector<int> data = p_variant;
- int len = data.size();
- PoolVector<int>::Read r = data.read();
- const int *ptr = r.ptr();
+ p_store_string_func(p_store_string_ud, "PackedInt32Array( ");
+ Vector<int32_t> data = p_variant;
+ int32_t len = data.size();
+ const int32_t *ptr = data.ptr();
- for (int i = 0; i < len; i++) {
+ for (int32_t i = 0; i < len; i++) {
+
+ if (i > 0)
+ p_store_string_func(p_store_string_ud, ", ");
+
+ p_store_string_func(p_store_string_ud, itos(ptr[i]));
+ }
+
+ p_store_string_func(p_store_string_ud, " )");
+
+ } break;
+ case Variant::PACKED_INT64_ARRAY: {
+
+ p_store_string_func(p_store_string_ud, "PackedInt64Array( ");
+ Vector<int64_t> data = p_variant;
+ int64_t len = data.size();
+ const int64_t *ptr = data.ptr();
+
+ for (int64_t i = 0; i < len; i++) {
if (i > 0)
p_store_string_func(p_store_string_ud, ", ");
@@ -1647,13 +1798,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolRealArray( ");
- PoolVector<real_t> data = p_variant;
+ p_store_string_func(p_store_string_ud, "PackedFloat32Array( ");
+ Vector<float> data = p_variant;
int len = data.size();
- PoolVector<real_t>::Read r = data.read();
- const real_t *ptr = r.ptr();
+ const float *ptr = data.ptr();
for (int i = 0; i < len; i++) {
@@ -1665,13 +1815,30 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolStringArray( ");
- PoolVector<String> data = p_variant;
+ p_store_string_func(p_store_string_ud, "PackedFloat64Array( ");
+ Vector<double> data = p_variant;
int len = data.size();
- PoolVector<String>::Read r = data.read();
- const String *ptr = r.ptr();
+ const double *ptr = data.ptr();
+
+ for (int i = 0; i < len; i++) {
+
+ if (i > 0)
+ p_store_string_func(p_store_string_ud, ", ");
+ p_store_string_func(p_store_string_ud, rtosfix(ptr[i]));
+ }
+
+ p_store_string_func(p_store_string_ud, " )");
+
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
+
+ p_store_string_func(p_store_string_ud, "PackedStringArray( ");
+ Vector<String> data = p_variant;
+ int len = data.size();
+ const String *ptr = data.ptr();
+
String s;
//write_string("\n");
@@ -1686,13 +1853,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolVector2Array( ");
- PoolVector<Vector2> data = p_variant;
+ p_store_string_func(p_store_string_ud, "PackedVector2Array( ");
+ Vector<Vector2> data = p_variant;
int len = data.size();
- PoolVector<Vector2>::Read r = data.read();
- const Vector2 *ptr = r.ptr();
+ const Vector2 *ptr = data.ptr();
for (int i = 0; i < len; i++) {
@@ -1704,13 +1870,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolVector3Array( ");
- PoolVector<Vector3> data = p_variant;
+ p_store_string_func(p_store_string_ud, "PackedVector3Array( ");
+ Vector<Vector3> data = p_variant;
int len = data.size();
- PoolVector<Vector3>::Read r = data.read();
- const Vector3 *ptr = r.ptr();
+ const Vector3 *ptr = data.ptr();
for (int i = 0; i < len; i++) {
@@ -1722,14 +1887,13 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolColorArray( ");
+ p_store_string_func(p_store_string_ud, "PackedColorArray( ");
- PoolVector<Color> data = p_variant;
+ Vector<Color> data = p_variant;
int len = data.size();
- PoolVector<Color>::Read r = data.read();
- const Color *ptr = r.ptr();
+ const Color *ptr = data.ptr();
for (int i = 0; i < len; i++) {
diff --git a/core/variant_parser.h b/core/variant_parser.h
index 89db3ada0d..d50842145c 100644
--- a/core/variant_parser.h
+++ b/core/variant_parser.h
@@ -77,7 +77,7 @@ public:
struct ResourceParser {
- void *userdata;
+ void *userdata = nullptr;
ParseResourceFunc func;
ParseResourceFunc ext_func;
ParseResourceFunc sub_func;
@@ -92,6 +92,7 @@ public:
TK_PARENTHESIS_CLOSE,
TK_IDENTIFIER,
TK_STRING,
+ TK_STRING_NAME,
TK_NUMBER,
TK_COLOR,
TK_COLON,
diff --git a/core/vector.h b/core/vector.h
index 44add2c4d7..d3476679ff 100644
--- a/core/vector.h
+++ b/core/vector.h
@@ -34,7 +34,7 @@
/**
* @class Vector
* @author Juan Linietsky
- * Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use PoolVector for large arrays.
+ * Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use Vector for large arrays.
*/
#include "core/cowdata.h"
@@ -64,12 +64,13 @@ private:
public:
bool push_back(T p_elem);
+ _FORCE_INLINE_ bool append(const T &p_elem) { return push_back(p_elem); } //alias
void remove(int p_index) { _cowdata.remove(p_index); }
void erase(const T &p_val) {
int idx = find(p_val);
if (idx >= 0) remove(idx);
- };
+ }
void invert();
_FORCE_INLINE_ T *ptrw() { return _cowdata.ptrw(); }
@@ -123,6 +124,30 @@ public:
return *this;
}
+ Vector<T> subarray(int p_from, int p_to) const {
+
+ if (p_from < 0) {
+ p_from = size() + p_from;
+ }
+ if (p_to < 0) {
+ p_to = size() + p_to;
+ }
+
+ ERR_FAIL_INDEX_V(p_from, size(), Vector<T>());
+ ERR_FAIL_INDEX_V(p_to, size(), Vector<T>());
+
+ Vector<T> slice;
+ int span = 1 + p_to - p_from;
+ slice.resize(span);
+ const T *r = ptr();
+ T *w = slice.ptrw();
+ for (int i = 0; i < span; ++i) {
+ w[i] = r[p_from + i];
+ }
+
+ return slice;
+ }
+
_FORCE_INLINE_ ~Vector() {}
};
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 439937e4f5..74c364bad5 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -4,7 +4,7 @@
Global scope constants and variables.
</brief_description>
<description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc.
+ Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
</description>
<tutorials>
@@ -30,6 +30,9 @@
<member name="Geometry" type="Geometry" setter="" getter="">
The [Geometry] singleton.
</member>
+ <member name="GodotSharp" type="GodotSharp" setter="" getter="">
+ The [GodotSharp] singleton. Only available when using Godot's Mono build.
+ </member>
<member name="IP" type="IP" setter="" getter="">
The [IP] singleton.
</member>
@@ -50,7 +53,7 @@
The [JavaScript] singleton.
[b]Note:[/b] Only implemented on HTML5.
</member>
- <member name="Marshalls" type="Reference" setter="" getter="">
+ <member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
<member name="Navigation2DServer" type="Navigation2DServer" setter="" getter="">
@@ -143,7 +146,7 @@
Vertical bottom alignment, usually for text-derived classes.
</constant>
<constant name="SPKEY" value="16777216">
- Scancodes with this bit applied are non-printable.
+ Keycodes with this bit applied are non-printable.
</constant>
<constant name="KEY_ESCAPE" value="16777217" enum="KeyList">
Escape key.
@@ -1477,70 +1480,94 @@
<constant name="TYPE_VECTOR2" value="5" enum="Variant.Type">
Variable is of type [Vector2].
</constant>
- <constant name="TYPE_RECT2" value="6" enum="Variant.Type">
+ <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type">
+ Variable is of type [Vector2i].
+ </constant>
+ <constant name="TYPE_RECT2" value="7" enum="Variant.Type">
Variable is of type [Rect2].
</constant>
- <constant name="TYPE_VECTOR3" value="7" enum="Variant.Type">
+ <constant name="TYPE_RECT2I" value="8" enum="Variant.Type">
+ Variable is of type [Rect2i].
+ </constant>
+ <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type">
Variable is of type [Vector3].
</constant>
- <constant name="TYPE_TRANSFORM2D" value="8" enum="Variant.Type">
+ <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type">
+ Variable is of type [Vector3i].
+ </constant>
+ <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
Variable is of type [Transform2D].
</constant>
- <constant name="TYPE_PLANE" value="9" enum="Variant.Type">
+ <constant name="TYPE_PLANE" value="12" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUAT" value="10" enum="Variant.Type">
+ <constant name="TYPE_QUAT" value="13" enum="Variant.Type">
Variable is of type [Quat].
</constant>
- <constant name="TYPE_AABB" value="11" enum="Variant.Type">
+ <constant name="TYPE_AABB" value="14" enum="Variant.Type">
Variable is of type [AABB].
</constant>
- <constant name="TYPE_BASIS" value="12" enum="Variant.Type">
+ <constant name="TYPE_BASIS" value="15" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM" value="13" enum="Variant.Type">
+ <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type">
Variable is of type [Transform].
</constant>
- <constant name="TYPE_COLOR" value="14" enum="Variant.Type">
+ <constant name="TYPE_COLOR" value="17" enum="Variant.Type">
Variable is of type [Color].
</constant>
- <constant name="TYPE_NODE_PATH" value="15" enum="Variant.Type">
+ <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type">
+ Variable is of type [StringName].
+ </constant>
+ <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type">
Variable is of type [NodePath].
</constant>
- <constant name="TYPE_RID" value="16" enum="Variant.Type">
+ <constant name="TYPE_RID" value="20" enum="Variant.Type">
Variable is of type [RID].
</constant>
- <constant name="TYPE_OBJECT" value="17" enum="Variant.Type">
+ <constant name="TYPE_OBJECT" value="21" enum="Variant.Type">
Variable is of type [Object].
</constant>
- <constant name="TYPE_DICTIONARY" value="18" enum="Variant.Type">
+ <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type">
+ Variable is of type [Callable].
+ </constant>
+ <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type">
+ Variable is of type [Signal].
+ </constant>
+ <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type">
Variable is of type [Dictionary].
</constant>
- <constant name="TYPE_ARRAY" value="19" enum="Variant.Type">
+ <constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_RAW_ARRAY" value="20" enum="Variant.Type">
- Variable is of type [PoolByteArray].
+ <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type">
+ Variable is of type [PackedByteArray].
+ </constant>
+ <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type">
+ Variable is of type [PackedInt32Array].
+ </constant>
+ <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type">
+ Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_INT_ARRAY" value="21" enum="Variant.Type">
- Variable is of type [PoolIntArray].
+ <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_REAL_ARRAY" value="22" enum="Variant.Type">
- Variable is of type [PoolRealArray].
+ <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_STRING_ARRAY" value="23" enum="Variant.Type">
- Variable is of type [PoolStringArray].
+ <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type">
+ Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="24" enum="Variant.Type">
- Variable is of type [PoolVector2Array].
+ <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="25" enum="Variant.Type">
- Variable is of type [PoolVector3Array].
+ <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_COLOR_ARRAY" value="26" enum="Variant.Type">
- Variable is of type [PoolColorArray].
+ <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type">
+ Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="27" enum="Variant.Type">
+ <constant name="TYPE_MAX" value="35" enum="Variant.Type">
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index e485bd6f1a..ebae25feb7 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -57,7 +57,7 @@
</description>
</method>
<method name="is_button_pressed" qualifiers="const">
- <return type="int">
+ <return type="bool">
</return>
<argument index="0" name="button" type="int">
</argument>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index d9757ad023..0727bda668 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -26,7 +26,7 @@
</description>
</method>
<method name="get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index a151f8d652..640b721d37 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -34,7 +34,7 @@
</description>
</method>
<method name="get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the controller or anchor point's name if available.
@@ -54,6 +54,13 @@
Returns the world-space controller position.
</description>
</method>
+ <method name="get_tracker_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [ARVRController] and [ARVRAnchor] nodes.
+ </description>
+ </method>
<method name="get_tracks_orientation" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 6f0e4488fa..6db7121858 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -120,21 +120,21 @@
</members>
<signals>
<signal name="interface_added">
- <argument index="0" name="interface_name" type="String">
+ <argument index="0" name="interface_name" type="StringName">
</argument>
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
- <argument index="0" name="interface_name" type="String">
+ <argument index="0" name="interface_name" type="StringName">
</argument>
<description>
Emitted when an interface is removed.
</description>
</signal>
<signal name="tracker_added">
- <argument index="0" name="tracker_name" type="String">
+ <argument index="0" name="tracker_name" type="StringName">
</argument>
<argument index="1" name="type" type="int">
</argument>
@@ -145,7 +145,7 @@
</description>
</signal>
<signal name="tracker_removed">
- <argument index="0" name="tracker_name" type="String">
+ <argument index="0" name="tracker_name" type="StringName">
</argument>
<argument index="1" name="type" type="int">
</argument>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index ccbb033444..e930abba87 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -152,7 +152,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -185,7 +185,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -213,7 +213,7 @@
</description>
</method>
<method name="get_point_path">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index d620ef2a79..2639f62552 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -111,7 +111,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -144,7 +144,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -172,7 +172,7 @@
</description>
</method>
<method name="get_point_path">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index b0b9c155bb..01540383dc 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -76,7 +76,7 @@
</description>
</signal>
<signal name="custom_action">
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Emitted when a custom button is pressed. See [method add_button].
diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml
index 3caad10f6d..03c23b6fdd 100644
--- a/doc/classes/AnimatedSprite.xml
+++ b/doc/classes/AnimatedSprite.xml
@@ -19,7 +19,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
</argument>
<argument index="1" name="backwards" type="bool" default="false">
</argument>
@@ -36,7 +36,7 @@
</method>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index e24119c6c7..ad9706a52a 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -19,7 +19,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ <argument index="0" name="anim" type="StringName" default="@&quot;&quot;">
</argument>
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
@@ -34,7 +34,7 @@
</method>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;default&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index f77dfdc9a1..0926ef9855 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -32,7 +32,7 @@
</description>
</method>
<method name="animation_track_get_key_animation" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -48,7 +48,7 @@
</argument>
<argument index="1" name="time" type="float">
</argument>
- <argument index="2" name="animation" type="String">
+ <argument index="2" name="animation" type="StringName">
</argument>
<description>
</description>
@@ -60,7 +60,7 @@
</argument>
<argument index="1" name="key_idx" type="int">
</argument>
- <argument index="2" name="animation" type="String">
+ <argument index="2" name="animation" type="StringName">
</argument>
<description>
</description>
@@ -274,7 +274,7 @@
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -287,7 +287,7 @@
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -627,7 +627,7 @@
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 331a30bd9e..3d6ebd5934 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -23,7 +23,7 @@
<method name="blend_animation">
<return type="void">
</return>
- <argument index="0" name="animation" type="String">
+ <argument index="0" name="animation" type="StringName">
</argument>
<argument index="1" name="time" type="float">
</argument>
@@ -59,7 +59,7 @@
<method name="blend_node">
<return type="float">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
@@ -119,7 +119,7 @@
<method name="get_parameter" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
@@ -128,7 +128,7 @@
<method name="get_parameter_default_value" qualifiers="virtual">
<return type="Variant">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
@@ -142,7 +142,7 @@
</description>
</method>
<method name="has_filter" qualifiers="virtual">
- <return type="String">
+ <return type="bool">
</return>
<description>
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
@@ -193,7 +193,7 @@
<method name="set_parameter">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index 369969a2d4..ab44148c15 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;&quot;">
+ <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;&quot;">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
</members>
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index 5a86af6865..0befb79577 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -11,7 +11,7 @@
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
@@ -23,11 +23,11 @@
<method name="connect_node">
<return type="void">
</return>
- <argument index="0" name="input_node" type="String">
+ <argument index="0" name="input_node" type="StringName">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
- <argument index="2" name="output_node" type="String">
+ <argument index="2" name="output_node" type="StringName">
</argument>
<description>
</description>
@@ -35,7 +35,7 @@
<method name="disconnect_node">
<return type="void">
</return>
- <argument index="0" name="input_node" type="String">
+ <argument index="0" name="input_node" type="StringName">
</argument>
<argument index="1" name="input_index" type="int">
</argument>
@@ -45,7 +45,7 @@
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
@@ -53,7 +53,7 @@
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
@@ -61,7 +61,7 @@
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
@@ -69,7 +69,7 @@
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
</description>
@@ -77,9 +77,9 @@
<method name="rename_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
</description>
@@ -87,7 +87,7 @@
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 39a9af5ead..b647ff70b8 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -18,7 +18,7 @@
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="node" type="AnimationNode">
</argument>
@@ -31,9 +31,9 @@
<method name="add_transition">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
</argument>
@@ -58,14 +58,14 @@
<method name="get_node" qualifiers="const">
<return type="AnimationNode">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="node" type="AnimationNode">
</argument>
@@ -76,7 +76,7 @@
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the given node's coordinates. Used for display in the editor.
@@ -106,7 +106,7 @@
</description>
</method>
<method name="get_transition_from" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -115,7 +115,7 @@
</description>
</method>
<method name="get_transition_to" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -126,7 +126,7 @@
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the graph contains the given node.
@@ -135,9 +135,9 @@
<method name="has_transition" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
@@ -146,7 +146,7 @@
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Deletes the given node from the graph.
@@ -155,9 +155,9 @@
<method name="remove_transition">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
- <argument index="1" name="to" type="String">
+ <argument index="1" name="to" type="StringName">
</argument>
<description>
Deletes the transition between the two specified nodes.
@@ -175,9 +175,9 @@
<method name="rename_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
Renames the given node.
@@ -186,7 +186,7 @@
<method name="set_end_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Sets the given node as the graph end point.
@@ -204,7 +204,7 @@
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
@@ -215,7 +215,7 @@
<method name="set_start_node">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Sets the given node as the graph start point.
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 0198237bed..f4b89a5086 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -16,14 +16,14 @@
</tutorials>
<methods>
<method name="get_current_node" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the current travel path as computed internally by the A* algorithm.
@@ -39,7 +39,7 @@
<method name="start">
<return type="void">
</return>
- <argument index="0" name="node" type="String">
+ <argument index="0" name="node" type="StringName">
</argument>
<description>
Starts playing the given animation.
@@ -55,7 +55,7 @@
<method name="travel">
<return type="void">
</return>
- <argument index="0" name="to_node" type="String">
+ <argument index="0" name="to_node" type="StringName">
</argument>
<description>
Transitions from the current state to another one, following the shortest path.
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index d40a6f1e46..f0b7cc4099 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -10,7 +10,7 @@
<methods>
</methods>
<members>
- <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default="&quot;&quot;">
+ <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@&quot;&quot;">
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblock]
$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 3e8315f686..1420b1bf64 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -16,7 +16,7 @@
<method name="add_animation">
<return type="int" enum="Error">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="animation" type="Animation">
</argument>
@@ -34,9 +34,9 @@
</description>
</method>
<method name="animation_get_next" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
<description>
Returns the name of the next animation in the queue.
@@ -45,9 +45,9 @@
<method name="animation_set_next">
<return type="void">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<description>
Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
@@ -68,7 +68,7 @@
</description>
</method>
<method name="find_animation" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="animation" type="Animation">
</argument>
@@ -79,14 +79,14 @@
<method name="get_animation" qualifiers="const">
<return type="Animation">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the list of stored animation names.
@@ -95,9 +95,9 @@
<method name="get_blend_time" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<description>
Gets the blend time (in seconds) between two animations, referenced by their names.
@@ -111,7 +111,7 @@
</description>
</method>
<method name="get_queue">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns a list of the animation names that are currently queued to play.
@@ -120,7 +120,7 @@
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
@@ -136,7 +136,7 @@
<method name="play">
<return type="void">
</return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <argument index="0" name="name" type="StringName" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
@@ -153,7 +153,7 @@
<method name="play_backwards">
<return type="void">
</return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <argument index="0" name="name" type="StringName" default="&quot;&quot;">
</argument>
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
@@ -165,7 +165,7 @@
<method name="queue">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Queues an animation for playback once the current one is done.
@@ -175,7 +175,7 @@
<method name="remove_animation">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Removes the animation with key [code]name[/code].
@@ -184,9 +184,9 @@
<method name="rename_animation">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Renames an existing animation with key [code]name[/code] to [code]newname[/code].
@@ -206,9 +206,9 @@
<method name="set_blend_time">
<return type="void">
</return>
- <argument index="0" name="anim_from" type="String">
+ <argument index="0" name="anim_from" type="StringName">
</argument>
- <argument index="1" name="anim_to" type="String">
+ <argument index="1" name="anim_to" type="StringName">
</argument>
<argument index="2" name="sec" type="float">
</argument>
@@ -264,23 +264,23 @@
</members>
<signals>
<signal name="animation_changed">
- <argument index="0" name="old_name" type="String">
+ <argument index="0" name="old_name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
If the currently being played animation changes, this signal will notify of such change.
</description>
</signal>
<signal name="animation_finished">
- <argument index="0" name="anim_name" type="String">
+ <argument index="0" name="anim_name" type="StringName">
</argument>
<description>
Notifies when an animation finished playing.
</description>
</signal>
<signal name="animation_started">
- <argument index="0" name="anim_name" type="String">
+ <argument index="0" name="anim_name" type="StringName">
</argument>
<description>
Notifies when an animation starts playing.
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index f2f9284ae3..b273a7a9d9 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -89,7 +89,7 @@
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" default="&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
@@ -131,7 +131,7 @@
<member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
If [code]true[/code], the area applies reverb to its associated audio.
</member>
- <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" default="&quot;Master&quot;">
+ <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@&quot;Master&quot;">
The reverb bus name to use for this area's associated audio.
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 715e9b3286..0c1317f19d 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -90,7 +90,7 @@
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 08455bb7bc..6401feb95c 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -14,6 +14,12 @@
array[2] = "Three"
print(array[-2]) # Three.
[/codeblock]
+ Arrays can be concatenated using the [code]+[/code] operator:
+ [codeblock]
+ var array1 = ["One", 2]
+ var array2 = [3, "Four"]
+ print(array1 + array2) # ["One", 2, 3, "Four"]
+ [/codeblock]
Arrays are always passed by reference.
</description>
<tutorials>
@@ -22,67 +28,87 @@
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolColorArray">
+ <argument index="0" name="from" type="PackedColorArray">
+ </argument>
+ <description>
+ Constructs an array from a [PackedColorArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedVector3Array">
+ </argument>
+ <description>
+ Constructs an array from a [PackedVector3Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedVector2Array">
</argument>
<description>
- Constructs an array from a [PoolColorArray].
+ Constructs an array from a [PackedVector2Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolVector3Array">
+ <argument index="0" name="from" type="PackedStringArray">
</argument>
<description>
- Constructs an array from a [PoolVector3Array].
+ Constructs an array from a [PackedStringArray].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolVector2Array">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs an array from a [PoolVector2Array].
+ Constructs an array from a [PackedFloat64Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolStringArray">
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs an array from a [PoolStringArray].
+ Constructs an array from a [PackedFloat32Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolRealArray">
+ <argument index="0" name="from" type="PackedInt64Array">
</argument>
<description>
- Constructs an array from a [PoolRealArray].
+ Constructs an array from a [PackedInt64Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolIntArray">
+ <argument index="0" name="from" type="PackedInt32Array">
</argument>
<description>
- Constructs an array from a [PoolIntArray].
+ Constructs an array from a [PackedInt32Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PoolByteArray">
+ <argument index="0" name="from" type="PackedByteArray">
</argument>
<description>
- Constructs an array from a [PoolByteArray].
+ Constructs an array from a [PackedByteArray].
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -90,7 +116,7 @@
</description>
</method>
<method name="back">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Returns the last element of the array, or [code]null[/code] if the array is empty.
@@ -101,7 +127,7 @@
</return>
<argument index="0" name="value" type="Variant">
</argument>
- <argument index="1" name="before" type="bool" default="True">
+ <argument index="1" name="before" type="bool" default="true">
</argument>
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
@@ -117,7 +143,7 @@
</argument>
<argument index="2" name="func" type="String">
</argument>
- <argument index="3" name="before" type="bool" default="True">
+ <argument index="3" name="before" type="bool" default="true">
</argument>
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
@@ -125,6 +151,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
</description>
@@ -141,7 +169,7 @@
<method name="duplicate">
<return type="Array">
</return>
- <argument index="0" name="deep" type="bool" default="False">
+ <argument index="0" name="deep" type="bool" default="false">
</argument>
<description>
Returns a copy of the array.
@@ -156,6 +184,8 @@
</description>
</method>
<method name="erase">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -183,7 +213,7 @@
</description>
</method>
<method name="front">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Returns the first element of the array, or [code]null[/code] if the array is empty.
@@ -212,6 +242,8 @@
</description>
</method>
<method name="insert">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<argument index="1" name="value" type="Variant">
@@ -221,39 +253,43 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="max">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="min">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="pop_back">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<method name="pop_front">
- <return type="Variant">
+ <return type="void">
</return>
<description>
Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -261,6 +297,8 @@
</description>
</method>
<method name="push_front">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -268,6 +306,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<description>
@@ -275,6 +315,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
@@ -293,6 +335,8 @@
</description>
</method>
<method name="shuffle">
+ <return type="void">
+ </return>
<description>
Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
</description>
@@ -313,13 +357,15 @@
</argument>
<argument index="2" name="step" type="int" default="1">
</argument>
- <argument index="3" name="deep" type="bool" default="False">
+ <argument index="3" name="deep" type="bool" default="false">
</argument>
<description>
Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
</description>
</method>
<method name="sort">
+ <return type="void">
+ </return>
<description>
Sorts the array.
[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:
@@ -331,6 +377,8 @@
</description>
</method>
<method name="sort_custom">
+ <return type="void">
+ </return>
<argument index="0" name="obj" type="Object">
</argument>
<argument index="1" name="func" type="String">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 2dbf55e522..33b62054df 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -7,7 +7,7 @@
The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.
The most basic example is the creation of a single triangle:
[codeblock]
- var vertices = PoolVector3Array()
+ var vertices = PackedVector3Array()
vertices.push_back(Vector3(0, 1, 0))
vertices.push_back(Vector3(1, 0, 0))
vertices.push_back(Vector3(0, 0, 1))
@@ -30,7 +30,7 @@
<method name="add_blend_shape">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
@@ -80,7 +80,7 @@
</description>
</method>
<method name="get_blend_shape_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="index" type="int">
</argument>
@@ -178,7 +178,7 @@
</argument>
<argument index="1" name="offset" type="int">
</argument>
- <argument index="2" name="data" type="PoolByteArray">
+ <argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
Updates a specified region of mesh arrays on the GPU.
@@ -202,31 +202,31 @@
Amount of weights/bone indices per vertex (always 4).
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
- [PoolVector3Array], [PoolVector2Array], or [Array] of vertex positions.
+ [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
</constant>
<constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
- [PoolVector3Array] of vertex normals.
+ [PackedVector3Array] of vertex normals.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
- [PoolRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
+ [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
- [PoolColorArray] of vertex colors.
+ [PackedColorArray] of vertex colors.
</constant>
<constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
- [PoolVector2Array] for UV coordinates.
+ [PackedVector2Array] for UV coordinates.
</constant>
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
- [PoolVector2Array] for second UV coordinates.
+ [PackedVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
- [PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats.
+ [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- [PoolRealArray] of bone weights. Each element in groups of 4 floats.
+ [PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- [PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
+ [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index fe0d63777f..3117978d8a 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -32,7 +32,7 @@
<member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0">
Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000.
</member>
- <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" default="&quot;&quot;">
+ <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@&quot;&quot;">
Reduce the sound level using another audio bus for threshold detection.
</member>
<member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0">
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 72acf616a9..49c6f5bb34 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -107,7 +107,7 @@
<method name="get_bus_index" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="bus_name" type="String">
+ <argument index="0" name="bus_name" type="StringName">
</argument>
<description>
Returns the index of the bus with the name [code]bus_name[/code].
@@ -145,7 +145,7 @@
</description>
</method>
<method name="get_bus_send" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
@@ -341,7 +341,7 @@
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
- <argument index="1" name="send" type="String">
+ <argument index="1" name="send" type="StringName">
</argument>
<description>
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 2552cd50a4..e3e17b8a93 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -37,7 +37,7 @@
<method name="push_buffer">
<return type="bool">
</return>
- <argument index="0" name="frames" type="PoolVector2Array">
+ <argument index="0" name="frames" type="PackedVector2Array">
</argument>
<description>
</description>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 2d65defad3..eab6505734 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -54,7 +54,7 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 66254b504a..fdbef1b89e 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -60,7 +60,7 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index f476bec323..4ec8dba2c6 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -66,7 +66,7 @@
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 898879ae27..6d99433c90 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -22,7 +22,7 @@
</method>
</methods>
<members>
- <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )">
+ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )">
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 46a96020d0..2e4ca9677d 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -428,11 +428,11 @@
</constant>
<constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter">
</constant>
- <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="2" enum="TextureFilter">
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter">
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="3" enum="TextureFilter">
</constant>
- <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="4" enum="TextureFilter">
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter">
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
</constant>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index e2b5c23c11..3952ea2d27 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -100,7 +100,7 @@
</return>
<argument index="0" name="b" type="Basis">
</argument>
- <argument index="1" name="epsilon" type="float" default="0.00001">
+ <argument index="1" name="epsilon" type="float" default="1e-05">
</argument>
<description>
Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index 4b5d4c853a..0d8233e6ff 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -4,7 +4,7 @@
Base class for box containers.
</brief_description>
<description>
- Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
+ Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
</description>
<tutorials>
</tutorials>
@@ -15,13 +15,13 @@
<argument index="0" name="begin" type="bool">
</argument>
<description>
- Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children.
+ Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children.
</description>
</method>
</methods>
<members>
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
- The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]).
+ The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]).
</member>
</members>
<constants>
diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml
index b9cc655784..6a6525e99a 100644
--- a/doc/classes/CPUParticles.xml
+++ b/doc/classes/CPUParticles.xml
@@ -171,13 +171,13 @@
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
</member>
- <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )">
+ <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PackedColorArray( )">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals">
+ <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )">
+ <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array( )">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0">
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 926b8e461c..799ba32075 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -169,13 +169,13 @@
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
- <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
+ <member name="emission_colors" type="PackedColorArray" setter="set_emission_colors" getter="get_emission_colors">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals">
+ <member name="emission_normals" type="PackedVector2Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
- <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points">
+ <member name="emission_points" type="PackedVector2Array" setter="set_emission_points" getter="get_emission_points">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents">
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
new file mode 100644
index 0000000000..ec38128c1e
--- /dev/null
+++ b/doc/classes/Callable.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Callable" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="Callable">
+ <return type="Callable">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method_name" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="call" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="call_deferred" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_method">
+ <return type="StringName">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_object">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_object_id">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_custom">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_null">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_standard">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 7f50587e66..dec7c907a4 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -76,11 +76,11 @@
<method name="draw_colored_polygon">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -88,7 +88,7 @@
</argument>
<argument index="5" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -118,17 +118,17 @@
</return>
<argument index="0" name="mesh" type="Mesh">
</argument>
- <argument index="1" name="texture" type="Texture2D" default="null">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<argument index="2" name="normal_map" type="Texture2D" default="null">
</argument>
- <argument index="3" name="specular_map" type="Texture2D" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="4" name="transform" type="Color" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="5" name="modulate" type="Transform2D" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
</argument>
- <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -141,7 +141,7 @@
<method name="draw_multiline">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
@@ -154,9 +154,9 @@
<method name="draw_multiline_colors">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
@@ -169,13 +169,13 @@
</return>
<argument index="0" name="multimesh" type="MultiMesh">
</argument>
- <argument index="1" name="texture" type="Texture2D" default="null">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<argument index="2" name="normal_map" type="Texture2D" default="null">
</argument>
<argument index="3" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="4" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="4" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="5" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -188,11 +188,11 @@
<method name="draw_polygon">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -200,7 +200,7 @@
</argument>
<argument index="5" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="6" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="7" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -213,7 +213,7 @@
<method name="draw_polyline">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
@@ -226,9 +226,9 @@
<method name="draw_polyline_colors">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
@@ -239,11 +239,11 @@
<method name="draw_primitive">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="colors" type="PoolColorArray">
+ <argument index="1" name="colors" type="PackedColorArray">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array">
+ <argument index="2" name="uvs" type="PackedVector2Array">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -253,14 +253,14 @@
</argument>
<argument index="6" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="7" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
<argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
- Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
+ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad.
</description>
</method>
<method name="draw_rect">
@@ -342,7 +342,7 @@
</argument>
<argument index="4" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="5" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="6" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -369,7 +369,7 @@
</argument>
<argument index="6" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="7" name="specular_shinness" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="8" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -396,9 +396,9 @@
</argument>
<argument index="6" name="specular_map" type="Texture2D" default="null">
</argument>
- <argument index="7" name="clip_uv" type="Color" default="true">
+ <argument index="7" name="specular_shininess" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="8" name="specular_shinness" type="bool" default="Color( 1, 1, 1, 1 )">
+ <argument index="8" name="clip_uv" type="bool" default="true">
</argument>
<argument index="9" name="texture_filter" type="int" enum="CanvasItem.TextureFilter" default="0">
</argument>
@@ -661,11 +661,11 @@
</constant>
<constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter">
</constant>
- <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="TextureFilter">
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter">
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter">
</constant>
- <constant name="TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="5" enum="TextureFilter">
+ <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter">
</constant>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 4d7ccb65e8..2a6a2ddd91 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -12,7 +12,7 @@
<method name="can_instance" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case.
@@ -21,16 +21,16 @@
<method name="class_exists" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns whether the specified [code]class[/code] is available or not.
</description>
</method>
<method name="class_get_category" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
@@ -39,18 +39,18 @@
<method name="class_get_integer_constant" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found.
</description>
</method>
<method name="class_get_integer_constant_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -61,7 +61,7 @@
<method name="class_get_method_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -74,7 +74,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<description>
Returns the value of [code]property[/code] of [code]class[/code] or its ancestry.
@@ -83,7 +83,7 @@
<method name="class_get_property_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -94,9 +94,9 @@
<method name="class_get_signal" qualifiers="const">
<return type="Dictionary">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="signal" type="String">
+ <argument index="1" name="signal" type="StringName">
</argument>
<description>
Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
@@ -105,7 +105,7 @@
<method name="class_get_signal_list" qualifiers="const">
<return type="Array">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<argument index="1" name="no_inheritance" type="bool" default="false">
</argument>
@@ -116,9 +116,9 @@
<method name="class_has_integer_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not.
@@ -127,9 +127,9 @@
<method name="class_has_method" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="no_inheritance" type="bool" default="false">
</argument>
@@ -140,9 +140,9 @@
<method name="class_has_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="signal" type="String">
+ <argument index="1" name="signal" type="StringName">
</argument>
<description>
Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not.
@@ -153,7 +153,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -162,25 +162,25 @@
</description>
</method>
<method name="get_class_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the names of all the classes available.
</description>
</method>
<method name="get_inheriters_from_class" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns the names of all the classes that directly or indirectly inherit from [code]class[/code].
</description>
</method>
<method name="get_parent_class" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns the parent class of [code]class[/code].
@@ -189,7 +189,7 @@
<method name="instance" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Creates an instance of [code]class[/code].
@@ -198,7 +198,7 @@
<method name="is_class_enabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
<description>
Returns whether this [code]class[/code] is enabled or not.
@@ -207,9 +207,9 @@
<method name="is_parent_class" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class" type="String">
+ <argument index="0" name="class" type="StringName">
</argument>
- <argument index="1" name="inherits" type="String">
+ <argument index="1" name="inherits" type="StringName">
</argument>
<description>
Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not.
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index ac519d3817..8aceec17a8 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -17,7 +17,7 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collision will be produced.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
Array of vertices which define the polygon.
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index c4fd417918..e3135a4d0f 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -22,8 +22,8 @@
</member>
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
- The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference.
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
+ The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 7335ff5a2e..8587acade3 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -119,7 +119,7 @@
</argument>
<argument index="2" name="v" type="float">
</argument>
- <argument index="3" name="a" type="float" default="1">
+ <argument index="3" name="a" type="float" default="1.0">
</argument>
<description>
Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1.
@@ -224,7 +224,7 @@
<method name="to_html">
<return type="String">
</return>
- <argument index="0" name="with_alpha" type="bool" default="True">
+ <argument index="0" name="with_alpha" type="bool" default="true">
</argument>
<description>
Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]).
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index d0c8e3f948..5ab929d911 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -4,7 +4,7 @@
Color picker control.
</brief_description>
<description>
- [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
+ Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
</description>
<tutorials>
</tutorials>
@@ -29,7 +29,7 @@
</description>
</method>
<method name="get_presets" qualifiers="const">
- <return type="PoolColorArray">
+ <return type="PackedColorArray">
</return>
<description>
Returns the list of colors in the presets of the color picker.
diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml
index 3ae07ee52f..47f2276c63 100644
--- a/doc/classes/ConcavePolygonShape.xml
+++ b/doc/classes/ConcavePolygonShape.xml
@@ -5,12 +5,13 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
+ Note: when used for collision, [ConcavePolygonShape] is intended to work with static [PhysicsBody] nodes like [StaticBody] and will not work with [KinematicBody] or [RigidBody] with a mode other than Static.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
Returns the faces (an array of triangles).
@@ -19,7 +20,7 @@
<method name="set_faces">
<return type="void">
</return>
- <argument index="0" name="faces" type="PoolVector3Array">
+ <argument index="0" name="faces" type="PackedVector3Array">
</argument>
<description>
Sets the faces (an array of triangles).
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index 6fb32436a8..9999d086da 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" default="PoolVector2Array( )">
+ <member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array( )">
The array of points that make up the [ConcavePolygonShape2D]'s line segments.
</member>
</members>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index ad36f1f1c3..a16326d55a 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -37,7 +37,7 @@
<argument index="0" name="section" type="String">
</argument>
<description>
- Deletes the specified section along with all the key-value pairs inside.
+ Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist.
</description>
</method>
<method name="erase_section_key">
@@ -48,19 +48,20 @@
<argument index="1" name="key" type="String">
</argument>
<description>
+ Deletes the specified key in a section. Raises an error if either the section or the key do not exist.
</description>
</method>
<method name="get_section_keys" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="section" type="String">
</argument>
<description>
- Returns an array of all defined key identifiers in the specified section.
+ Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist.
</description>
</method>
<method name="get_sections" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array of all defined section identifiers.
@@ -76,7 +77,7 @@
<argument index="2" name="default" type="Variant" default="null">
</argument>
<description>
- Returns the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [code]default[/code] argument, or [code]null[/code] if it is omitted.
+ Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [code]default[/code] value. If [code]default[/code] is not specified or set to [code]null[/code], an error is also raised.
</description>
</method>
<method name="has_section" qualifiers="const">
@@ -105,7 +106,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on.
+ Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
@@ -114,9 +115,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="key" type="PoolByteArray">
+ <argument index="1" name="key" type="PackedByteArray">
</argument>
<description>
+ Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="load_encrypted_pass">
@@ -124,9 +127,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="pass" type="String">
+ <argument index="1" name="password" type="String">
</argument>
<description>
+ Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="parse">
@@ -145,7 +150,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
+ Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.
Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
@@ -154,9 +159,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="key" type="PoolByteArray">
+ <argument index="1" name="key" type="PackedByteArray">
</argument>
<description>
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="save_encrypted_pass">
@@ -164,9 +171,11 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="pass" type="String">
+ <argument index="1" name="password" type="String">
</argument>
<description>
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="set_value">
@@ -179,7 +188,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Assigns a value to the specified key of the specified section. If the section and/or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed.
+ Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed.
</description>
</method>
</methods>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 3bf2ede896..89db5baf8a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -90,7 +90,7 @@
<method name="add_color_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="color" type="Color">
</argument>
@@ -101,7 +101,7 @@
<method name="add_constant_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="constant" type="int">
</argument>
@@ -112,7 +112,7 @@
<method name="add_font_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="font" type="Font">
</argument>
@@ -123,7 +123,7 @@
<method name="add_icon_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="texture" type="Texture2D">
</argument>
@@ -134,7 +134,7 @@
<method name="add_shader_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="shader" type="Shader">
</argument>
@@ -145,7 +145,7 @@
<method name="add_stylebox_override">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="stylebox" type="StyleBox">
</argument>
@@ -220,9 +220,9 @@
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -242,9 +242,9 @@
<method name="get_constant" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -301,9 +301,9 @@
<method name="get_font" qualifiers="const">
<return type="Font">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -319,9 +319,9 @@
<method name="get_icon" qualifiers="const">
<return type="Texture2D">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -374,9 +374,9 @@
<method name="get_stylebox" qualifiers="const">
<return type="StyleBox">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
@@ -412,9 +412,9 @@
<method name="has_color" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
@@ -423,7 +423,7 @@
<method name="has_color_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node.
@@ -432,9 +432,9 @@
<method name="has_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
@@ -443,7 +443,7 @@
<method name="has_constant_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node.
@@ -459,9 +459,9 @@
<method name="has_font" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
@@ -470,7 +470,7 @@
<method name="has_font_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node.
@@ -479,9 +479,9 @@
<method name="has_icon" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
@@ -490,7 +490,7 @@
<method name="has_icon_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
@@ -510,7 +510,7 @@
<method name="has_shader_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
@@ -519,9 +519,9 @@
<method name="has_stylebox" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
@@ -530,7 +530,7 @@
<method name="has_stylebox_override" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node.
diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml
index 544f304051..077bb57a03 100644
--- a/doc/classes/ConvexPolygonShape.xml
+++ b/doc/classes/ConvexPolygonShape.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )">
+ <member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array( )">
The list of 3D points forming the convex polygon shape.
</member>
</members>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index e17048e061..cba446fff8 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -13,7 +13,7 @@
<method name="set_point_cloud">
<return type="void">
</return>
- <argument index="0" name="point_cloud" type="PoolVector2Array">
+ <argument index="0" name="point_cloud" type="PackedVector2Array">
</argument>
<description>
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details.
@@ -21,7 +21,7 @@
</method>
</methods>
<members>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )">
+ <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member>
</members>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index fb373145f9..10f1f18f0d 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -28,12 +28,12 @@
</tutorials>
<methods>
<method name="generate_random_bytes">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="size" type="int">
</argument>
<description>
- Generates a [PoolByteArray] of cryptographically secure random bytes with given [code]size[/code].
+ Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code].
</description>
</method>
<method name="generate_rsa">
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index f6eacfb33b..8ac6258e97 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -41,10 +41,10 @@
</description>
</method>
<method name="get_baked_points" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<description>
- Returns the cache of points as a [PoolVector2Array].
+ Returns the cache of points as a [PackedVector2Array].
</description>
</method>
<method name="get_closest_offset" qualifiers="const">
@@ -178,7 +178,7 @@
</description>
</method>
<method name="tessellate" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 52b0052908..5024cdefbd 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -41,24 +41,24 @@
</description>
</method>
<method name="get_baked_points" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
- Returns the cache of points as a [PoolVector3Array].
+ Returns the cache of points as a [PackedVector3Array].
</description>
</method>
<method name="get_baked_tilts" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<description>
- Returns the cache of tilts as a [PoolRealArray].
+ Returns the cache of tilts as a [PackedFloat32Array].
</description>
</method>
<method name="get_baked_up_vectors" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
- Returns the cache of up vectors as a [PoolVector3Array].
+ Returns the cache of up vectors as a [PackedVector3Array].
If [member up_vector_enabled] is [code]false[/code], the cache will be empty.
</description>
</method>
@@ -227,7 +227,7 @@
</description>
</method>
<method name="tessellate" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
new file mode 100644
index 0000000000..8c71b61553
--- /dev/null
+++ b/doc/classes/DTLSServer.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DTLSServer" inherits="Reference" version="4.0">
+ <brief_description>
+ Helper class to implement a DTLS server.
+ </brief_description>
+ <description>
+ This class is used to store the state of a DTLS server. Upon [method setup] it converts connected [PacketPeerUDP] to [PacketPeerDTLS] accepting them via [method take_connection] as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation.
+ Below a small example of how to use it:
+ [codeblock]
+ # server.gd
+ extends Node
+
+ var dtls := DTLSServer.new()
+ var server := UDPServer.new()
+ var peers = []
+
+ func _ready():
+ server.listen(4242)
+ var key = load("key.key") # Your private key.
+ var cert = load("cert.crt") # Your X509 certificate.
+ dtls.setup(key, cert)
+
+ func _process(delta):
+ while server.is_connection_available():
+ var peer : PacketPeerUDP = server.take_connection()
+ var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)
+ if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:
+ continue # It is normal that 50% of the connections fails due to cookie exchange.
+ print("Peer connected!")
+ peers.append(dtls_peer)
+ for p in peers:
+ p.poll() # Must poll to update the state.
+ if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
+ while p.get_available_packet_count() &gt; 0:
+ print("Received message from client: %s" % p.get_packet().get_string_from_utf8())
+ p.put_packet("Hello DTLS client".to_utf8())
+ [/codeblock]
+ [codeblock]
+ # client.gd
+ extends Node
+
+ var dtls := PacketPeerDTLS.new()
+ var udp := PacketPeerUDP.new()
+ var connected = false
+
+ func _ready():
+ udp.connect_to_host("127.0.0.1", 4242)
+ dtls.connect_to_peer(udp, false) # Use true in production for certificate validation!
+
+ func _process(delta):
+ dtls.poll()
+ if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
+ if !connected:
+ # Try to contact server
+ dtls.put_packet("The answer is... 42!".to_utf8())
+ while dtls.get_available_packet_count() &gt; 0:
+ print("Connected: %s" % dtls.get_packet().get_string_from_utf8())
+ connected = true
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="setup">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="key" type="CryptoKey">
+ </argument>
+ <argument index="1" name="certificate" type="X509Certificate">
+ </argument>
+ <argument index="2" name="chain" type="X509Certificate" default="null">
+ </argument>
+ <description>
+ Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate.
+ </description>
+ </method>
+ <method name="take_connection">
+ <return type="PacketPeerDTLS">
+ </return>
+ <argument index="0" name="udp_peer" type="PacketPeerUDP">
+ </argument>
+ <description>
+ Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]).
+ [b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 8432744ea7..062e72388f 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -66,6 +66,8 @@
</tutorials>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the dictionary, removing all key/value pairs.
</description>
@@ -73,7 +75,7 @@
<method name="duplicate">
<return type="Dictionary">
</return>
- <argument index="0" name="deep" type="bool" default="False">
+ <argument index="0" name="deep" type="bool" default="false">
</argument>
<description>
Creates a copy of the dictionary, and returns it.
@@ -96,11 +98,11 @@
</description>
</method>
<method name="get">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="key" type="Variant">
</argument>
- <argument index="1" name="default" type="Variant" default="Null">
+ <argument index="1" name="default" type="Variant" default="null">
</argument>
<description>
Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted.
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index ed4257a809..cb59a69876 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -77,8 +77,11 @@
<method name="get_current_dir">
<return type="String">
</return>
+ <argument index="0" name="include_drive" type="bool" default="true">
+ </argument>
<description>
Returns the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
+ On Windows, if [code]include_drive[/code] is [code]false[/code], the leading drive specificator is omitted from the returned value (e.g. [code]\tmp\folder[/code]).
</description>
</method>
<method name="get_current_drive">
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 5de68cae71..da3840384e 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -10,7 +10,7 @@
<method name="_export_begin" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="features" type="PoolStringArray">
+ <argument index="0" name="features" type="PackedStringArray">
</argument>
<argument index="1" name="is_debug" type="bool">
</argument>
@@ -34,7 +34,7 @@
</argument>
<argument index="1" name="type" type="String">
</argument>
- <argument index="2" name="features" type="PoolStringArray">
+ <argument index="2" name="features" type="PackedStringArray">
</argument>
<description>
</description>
@@ -44,7 +44,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="file" type="PoolByteArray">
+ <argument index="1" name="file" type="PackedByteArray">
</argument>
<argument index="2" name="remap" type="bool">
</argument>
@@ -96,7 +96,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="tags" type="PoolStringArray">
+ <argument index="1" name="tags" type="PackedStringArray">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index 5fac4f7822..387962cf6a 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -18,7 +18,7 @@
<method name="is_class_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<description>
</description>
@@ -26,7 +26,7 @@
<method name="is_class_editor_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<description>
</description>
@@ -34,9 +34,9 @@
<method name="is_class_property_disabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<description>
</description>
@@ -68,7 +68,7 @@
<method name="set_disable_class">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<argument index="1" name="disable" type="bool">
</argument>
@@ -78,7 +78,7 @@
<method name="set_disable_class_editor">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
<argument index="1" name="disable" type="bool">
</argument>
@@ -88,9 +88,9 @@
<method name="set_disable_class_property">
<return type="void">
</return>
- <argument index="0" name="class_name" type="String">
+ <argument index="0" name="class_name" type="StringName">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="disable" type="bool">
</argument>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 91adf6f2af..2afdfde064 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -84,7 +84,7 @@
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
+ <argument index="0" name="paths" type="PackedStringArray">
</argument>
<description>
Emitted when multiple files are selected.
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index a05fbf2be7..a79c57e90f 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -85,14 +85,14 @@
</description>
</signal>
<signal name="resources_reimported">
- <argument index="0" name="resources" type="PoolStringArray">
+ <argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
Remitted if a resource is reimported.
</description>
</signal>
<signal name="resources_reload">
- <argument index="0" name="resources" type="PoolStringArray">
+ <argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index bbd3ee9b17..096fe5df8f 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -78,7 +78,7 @@
</description>
</method>
<method name="get_file_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index eaddd9917c..3cc624f49b 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -40,7 +40,7 @@
</return>
<argument index="0" name="label" type="String">
</argument>
- <argument index="1" name="properties" type="PoolStringArray">
+ <argument index="1" name="properties" type="PackedStringArray">
</argument>
<argument index="2" name="editor" type="Control">
</argument>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index e441562051..587fd51f1e 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -253,7 +253,7 @@
</description>
</method>
<method name="get_breakpoints" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code].
@@ -267,15 +267,27 @@
</description>
</method>
<method name="get_plugin_icon" qualifiers="virtual">
- <return type="Object">
+ <return type="Texture2D">
</return>
<description>
+ Override this method in your plugin to return a [Texture2D] in order to give it an icon.
+ For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
+ Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
+ [codeblock]
+ func get_plugin_icon():
+ # You can use a custom icon:
+ return preload("res://addons/my_plugin/my_plugin_icon.svg")
+ # Or use a built-in icon:
+ return get_editor_interface().get_base_control().get_icon("Node", "EditorIcons")
+ [/codeblock]
</description>
</method>
<method name="get_plugin_name" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
+ For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
</description>
</method>
<method name="get_script_create_dialog">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index b93274491a..3216541b20 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -21,11 +21,11 @@
<method name="emit_changed">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
- <argument index="2" name="field" type="String" default="&quot;&quot;">
+ <argument index="2" name="field" type="StringName" default="@&quot;&quot;">
</argument>
<argument index="3" name="changing" type="bool" default="false">
</argument>
@@ -41,7 +41,7 @@
</description>
</method>
<method name="get_edited_property">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property.
@@ -93,7 +93,7 @@
</members>
<signals>
<signal name="multiple_properties_changed">
- <argument index="0" name="properties" type="PoolStringArray">
+ <argument index="0" name="properties" type="PackedStringArray">
</argument>
<argument index="1" name="value" type="Array">
</argument>
@@ -102,7 +102,7 @@
</description>
</signal>
<signal name="object_id_selected">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -111,7 +111,7 @@
</description>
</signal>
<signal name="property_changed">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -120,7 +120,7 @@
</description>
</signal>
<signal name="property_checked">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="bool" type="String">
</argument>
@@ -129,14 +129,14 @@
</description>
</signal>
<signal name="property_keyed">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
Emit it if you want to add this value as an animation key (check for keying being enabled first).
</description>
</signal>
<signal name="property_keyed_with_value">
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 8e0f8842e9..aac75c5c8e 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -34,7 +34,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="receiver_func" type="String">
+ <argument index="2" name="receiver_func" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant">
</argument>
@@ -49,7 +49,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="receiver_func" type="String">
+ <argument index="2" name="receiver_func" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant">
</argument>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 30fc1e0c7b..73ef807c5f 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -50,7 +50,7 @@
</description>
</method>
<method name="get_favorites" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of favorite files and directories for this project.
@@ -76,7 +76,7 @@
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of recently visited folders in the file dialog for this project.
@@ -126,7 +126,7 @@
<method name="set_favorites">
<return type="void">
</return>
- <argument index="0" name="dirs" type="PoolStringArray">
+ <argument index="0" name="dirs" type="PackedStringArray">
</argument>
<description>
Sets the list of favorite files and directories for this project.
@@ -135,7 +135,7 @@
<method name="set_initial_value">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -159,7 +159,7 @@
<method name="set_recent_dirs">
<return type="void">
</return>
- <argument index="0" name="dirs" type="PoolStringArray">
+ <argument index="0" name="dirs" type="PackedStringArray">
</argument>
<description>
Sets the list of recently visited folders in the file dialog for this project.
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index e7c5ca9c0f..b8c4daab07 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -12,7 +12,7 @@
<method name="add_collision_segments">
<return type="void">
</return>
- <argument index="0" name="segments" type="PoolVector3Array">
+ <argument index="0" name="segments" type="PackedVector3Array">
</argument>
<description>
</description>
@@ -29,7 +29,7 @@
<method name="add_handles">
<return type="void">
</return>
- <argument index="0" name="handles" type="PoolVector3Array">
+ <argument index="0" name="handles" type="PackedVector3Array">
</argument>
<argument index="1" name="material" type="Material">
</argument>
@@ -45,7 +45,7 @@
<method name="add_lines">
<return type="void">
</return>
- <argument index="0" name="lines" type="PoolVector3Array">
+ <argument index="0" name="lines" type="PackedVector3Array">
</argument>
<argument index="1" name="material" type="Material">
</argument>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 8cdb9c1c3f..45c153b6dc 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -147,10 +147,10 @@
If [code]true[/code], it is running inside the editor. Useful for tool scripts.
</member>
<member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60">
- The number of fixed iterations per second (for fixed process and physics).
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage.
</member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
- Controls how much physic ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
+ Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
</member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index b0a2802e43..fcd1aa43c0 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -59,7 +59,7 @@
</return>
<argument index="0" name="expression" type="String">
</argument>
- <argument index="1" name="input_names" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<description>
Parses the expression and returns an [enum Error] code.
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 7fa87c2b60..e9477517cf 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -87,16 +87,16 @@
</description>
</method>
<method name="get_buffer" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="len" type="int">
</argument>
<description>
- Returns next [code]len[/code] bytes of the file as a [PoolByteArray].
+ Returns next [code]len[/code] bytes of the file as a [PackedByteArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delim" type="String" default="&quot;,&quot;">
</argument>
@@ -252,7 +252,7 @@
</argument>
<argument index="1" name="mode_flags" type="int" enum="File.ModeFlags">
</argument>
- <argument index="2" name="key" type="PoolByteArray">
+ <argument index="2" name="key" type="PackedByteArray">
</argument>
<description>
Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
@@ -329,7 +329,7 @@
<method name="store_buffer">
<return type="void">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Stores the given array of bytes in the file.
@@ -338,12 +338,12 @@
<method name="store_csv_line">
<return type="void">
</return>
- <argument index="0" name="values" type="PoolStringArray">
+ <argument index="0" name="values" type="PackedStringArray">
</argument>
<argument index="1" name="delim" type="String" default="&quot;,&quot;">
</argument>
<description>
- Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
+ Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
Text will be encoded as UTF-8.
</description>
</method>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 37b5cec2c9..f2c65a8610 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -68,8 +68,8 @@
The currently selected file path of the file dialog.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
- <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" default="PoolStringArray( )">
- The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
+ <member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
+ The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4">
The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants.
@@ -98,7 +98,7 @@
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
+ <argument index="0" name="paths" type="PackedStringArray">
</argument>
<description>
Emitted when the user selects multiple files.
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index 37c3597a95..bf0c0b0d34 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -36,7 +36,7 @@
<method name="set_function">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
The name of the referenced function to call on the object, without parentheses or any parameters.
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index d2918c24f7..228e1afb4c 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -16,13 +16,13 @@
</argument>
<argument index="2" name="octree_size" type="Vector3">
</argument>
- <argument index="3" name="octree_cells" type="PoolByteArray">
+ <argument index="3" name="octree_cells" type="PackedByteArray">
</argument>
- <argument index="4" name="data_cells" type="PoolByteArray">
+ <argument index="4" name="data_cells" type="PackedByteArray">
</argument>
- <argument index="5" name="distance_field" type="PoolByteArray">
+ <argument index="5" name="distance_field" type="PackedByteArray">
</argument>
- <argument index="6" name="level_counts" type="PoolIntArray">
+ <argument index="6" name="level_counts" type="PackedInt32Array">
</argument>
<description>
</description>
@@ -34,19 +34,19 @@
</description>
</method>
<method name="get_data_cells" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
</description>
</method>
<method name="get_level_counts" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
</description>
</method>
<method name="get_octree_cells" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
</description>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
index 739c860b28..b2d77f6f92 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry.xml
@@ -51,9 +51,9 @@
</description>
</method>
<method name="clip_polygon">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
- <argument index="0" name="points" type="PoolVector3Array">
+ <argument index="0" name="points" type="PackedVector3Array">
</argument>
<argument index="1" name="plane" type="Plane">
</argument>
@@ -64,9 +64,9 @@
<method name="clip_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code].
@@ -76,18 +76,18 @@
<method name="clip_polyline_with_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
</description>
</method>
<method name="convex_hull_2d">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<description>
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
@@ -96,9 +96,9 @@
<method name="exclude_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
@@ -158,7 +158,7 @@
</description>
</method>
<method name="get_closest_points_between_segments">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="p1" type="Vector3">
</argument>
@@ -169,11 +169,11 @@
<argument index="3" name="q2" type="Vector3">
</argument>
<description>
- Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
<method name="get_closest_points_between_segments_2d">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="p1" type="Vector2">
</argument>
@@ -184,7 +184,7 @@
<argument index="3" name="q2" type="Vector2">
</argument>
<description>
- Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
<method name="get_uv84_normal_bit">
@@ -199,9 +199,9 @@
<method name="intersect_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.
@@ -211,9 +211,9 @@
<method name="intersect_polyline_with_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape.
@@ -237,7 +237,7 @@
</return>
<argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="polygon" type="PoolVector2Array">
+ <argument index="1" name="polygon" type="PackedVector2Array">
</argument>
<description>
Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code].
@@ -246,7 +246,7 @@
<method name="is_polygon_clockwise">
<return type="bool">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<description>
Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
@@ -271,7 +271,7 @@
<method name="make_atlas">
<return type="Dictionary">
</return>
- <argument index="0" name="sizes" type="PoolVector2Array">
+ <argument index="0" name="sizes" type="PackedVector2Array">
</argument>
<description>
Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
@@ -280,9 +280,9 @@
<method name="merge_polygons_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon_a" type="PoolVector2Array">
+ <argument index="0" name="polygon_a" type="PackedVector2Array">
</argument>
- <argument index="1" name="polygon_b" type="PoolVector2Array">
+ <argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons.
@@ -292,7 +292,7 @@
<method name="offset_polygon_2d">
<return type="Array">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
@@ -307,7 +307,7 @@
<method name="offset_polyline_2d">
<return type="Array">
</return>
- <argument index="0" name="polyline" type="PoolVector2Array">
+ <argument index="0" name="polyline" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
@@ -370,7 +370,7 @@
</description>
</method>
<method name="segment_intersects_convex">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -379,11 +379,11 @@
<argument index="2" name="planes" type="Array">
</argument>
<description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PoolVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
+ Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
</description>
</method>
<method name="segment_intersects_cylinder">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -394,7 +394,7 @@
<argument index="3" name="radius" type="float">
</argument>
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PoolVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_segment_2d">
@@ -413,7 +413,7 @@
</description>
</method>
<method name="segment_intersects_sphere">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Vector3">
</argument>
@@ -424,7 +424,7 @@
<argument index="3" name="sphere_radius" type="float">
</argument>
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PoolVector3Array]. If yes, returns a [PoolVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_triangle">
@@ -445,21 +445,21 @@
</description>
</method>
<method name="triangulate_delaunay_2d">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
<description>
- Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned.
+ Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
<method name="triangulate_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
- <argument index="0" name="polygon" type="PoolVector2Array">
+ <argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<description>
- Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PoolIntArray] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PoolIntArray] is returned.
+ Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
</methods>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 3ce70045ef..05aebef9de 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -87,11 +87,11 @@
</method>
</methods>
<members>
- <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" default="PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
- Gradient's colors returned as a [PoolColorArray].
+ <member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
+ Gradient's colors returned as a [PackedColorArray].
</member>
- <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" default="PoolRealArray( 0, 1 )">
- Gradient's offsets returned as a [PoolRealArray].
+ <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )">
+ Gradient's offsets returned as a [PackedFloat32Array].
</member>
</members>
<constants>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 8733b94ee7..543afb01ee 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -49,11 +49,11 @@
<method name="connect_node">
<return type="int" enum="Error">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -64,11 +64,11 @@
<method name="disconnect_node">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -94,11 +94,11 @@
<method name="is_node_connected">
<return type="bool">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -149,11 +149,11 @@
<method name="set_connection_activity">
<return type="void">
</return>
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_port" type="int">
</argument>
@@ -204,7 +204,7 @@
</description>
</signal>
<signal name="connection_from_empty">
- <argument index="0" name="to" type="String">
+ <argument index="0" name="to" type="StringName">
</argument>
<argument index="1" name="to_slot" type="int">
</argument>
@@ -215,11 +215,11 @@
</description>
</signal>
<signal name="connection_request">
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_slot" type="int">
</argument>
@@ -228,7 +228,7 @@
</description>
</signal>
<signal name="connection_to_empty">
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
@@ -249,11 +249,11 @@
</description>
</signal>
<signal name="disconnection_request">
- <argument index="0" name="from" type="String">
+ <argument index="0" name="from" type="StringName">
</argument>
<argument index="1" name="from_slot" type="int">
</argument>
- <argument index="2" name="to" type="String">
+ <argument index="2" name="to" type="StringName">
</argument>
<argument index="3" name="to_slot" type="int">
</argument>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index bdcbb11ef0..76153ae041 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -55,7 +55,7 @@
</description>
</method>
<method name="get_response_headers">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the response headers.
@@ -124,7 +124,7 @@
</description>
</method>
<method name="read_response_body_chunk">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Reads one chunk from the response.
@@ -137,7 +137,7 @@
</argument>
<argument index="1" name="url" type="String">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
<argument index="3" name="body" type="String" default="&quot;&quot;">
</argument>
@@ -160,9 +160,9 @@
</argument>
<argument index="1" name="url" type="String">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
- <argument index="3" name="body" type="PoolByteArray">
+ <argument index="3" name="body" type="PackedByteArray">
</argument>
<description>
Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 313f21d8f9..53ca1fc6a9 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -96,7 +96,7 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
@@ -136,9 +136,9 @@
</argument>
<argument index="1" name="response_code" type="int">
</argument>
- <argument index="2" name="headers" type="PoolStringArray">
+ <argument index="2" name="headers" type="PackedStringArray">
</argument>
- <argument index="3" name="body" type="PoolByteArray">
+ <argument index="3" name="body" type="PackedByteArray">
</argument>
<description>
Emitted when a request is completed.
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index bc585df4a0..f8152c813e 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -33,7 +33,7 @@
</tutorials>
<methods>
<method name="finish">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Closes the current context, and return the computed hash.
@@ -51,7 +51,7 @@
<method name="update">
<return type="int" enum="Error">
</return>
- <argument index="0" name="chunk" type="PoolByteArray">
+ <argument index="0" name="chunk" type="PackedByteArray">
</argument>
<description>
Updates the computation with the given [code]chunk[/code] of data.
diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml
index f94089066c..029f3642d2 100644
--- a/doc/classes/HeightMapShape.xml
+++ b/doc/classes/HeightMapShape.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )">
+ <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )">
Height map data, pool array must be of [member map_width] * [member map_depth] size.
</member>
<member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2">
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index b4a46dd661..8bd2213194 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -150,7 +150,7 @@
</argument>
<argument index="3" name="format" type="int" enum="Image.Format">
</argument>
- <argument index="4" name="data" type="PoolByteArray">
+ <argument index="4" name="data" type="PackedByteArray">
</argument>
<description>
Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
@@ -236,7 +236,7 @@
</description>
</method>
<method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the image's raw data.
@@ -273,7 +273,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the color of the pixel at [code](x, y)[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixelv], but two integer arguments instead of a Vector2 argument.
+ Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2] argument.
</description>
</method>
<method name="get_pixelv" qualifiers="const">
@@ -282,7 +282,7 @@
<argument index="0" name="src" type="Vector2">
</argument>
<description>
- Returns the color of the pixel at [code]src[/code] if the image is locked. If the image is unlocked, it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code]. This is the same as [method get_pixel], but with a Vector2 argument instead of two integer arguments.
+ Returns the color of the pixel at [code]src[/code]. This is the same as [method get_pixel], but with a [Vector2] argument instead of two integer arguments.
</description>
</method>
<method name="get_rect" qualifiers="const">
@@ -355,7 +355,7 @@
<method name="load_jpg_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a JPEG file.
@@ -364,7 +364,7 @@
<method name="load_png_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a PNG file.
@@ -373,19 +373,12 @@
<method name="load_webp_from_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a WebP file.
</description>
</method>
- <method name="lock">
- <return type="void">
- </return>
- <description>
- Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel.
- </description>
- </method>
<method name="normalmap_to_xy">
<return type="void">
</return>
@@ -459,14 +452,11 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](x, y)[/code] if the image is locked. Example:
+ Sets the [Color] of the pixel at [code](x, y)[/code]. Example:
[codeblock]
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.lock()
- img.set_pixel(x, y, color) # Works
- img.unlock()
- img.set_pixel(x, y, color) # Does not have an effect
+ img.set_pixel(x, y, color)
[/codeblock]
</description>
</method>
@@ -478,14 +468,11 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example:
+ Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code]. Note that the [code]dst[/code] values must be integers. Example:
[codeblock]
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.lock()
- img.set_pixelv(Vector2(x, y), color) # Works
- img.unlock()
- img.set_pixelv(Vector2(x, y), color) # Does not have an effect
+ img.set_pixelv(Vector2(x, y), color)
[/codeblock]
</description>
</method>
@@ -503,16 +490,9 @@
Converts the raw data from the sRGB colorspace to a linear scale.
</description>
</method>
- <method name="unlock">
- <return type="void">
- </return>
- <description>
- Unlocks the data and prevents changes.
- </description>
- </method>
</methods>
<members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PoolByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
Holds all of the image's color data in a given format. See [enum Format] constants.
</member>
</members>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index b7afe57218..557a63b1cc 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -13,7 +13,7 @@
<method name="action_press">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="strength" type="float" default="1.0">
</argument>
@@ -26,7 +26,7 @@
<method name="action_release">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
If the specified action is already pressed, this will release it.
@@ -54,7 +54,7 @@
<method name="get_action_strength" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1.
@@ -202,7 +202,7 @@
<method name="is_action_just_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
@@ -212,7 +212,7 @@
<method name="is_action_just_released" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button.
@@ -221,7 +221,7 @@
<method name="is_action_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
@@ -250,10 +250,10 @@
<method name="is_key_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="scancode" type="int">
+ <argument index="0" name="keycode" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the key. You can pass a [enum KeyList] constant.
+ Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant.
</description>
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 9e3764206b..413e217b45 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -31,7 +31,7 @@
<method name="get_action_strength" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion].
@@ -40,7 +40,7 @@
<method name="is_action" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if this input event matches a pre-defined action of any type.
@@ -49,7 +49,7 @@
<method name="is_action_pressed" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="allow_echo" type="bool" default="false">
</argument>
@@ -60,7 +60,7 @@
<method name="is_action_released" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 2dac693a52..1c38ff8e8f 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -12,7 +12,7 @@
<methods>
</methods>
<members>
- <member name="action" type="String" setter="set_action" getter="get_action" default="&quot;&quot;">
+ <member name="action" type="StringName" setter="set_action" getter="get_action" default="@&quot;&quot;">
The action's name. Actions are accessed via this [String].
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index 637f697f01..c8d0769b90 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -10,12 +10,20 @@
<link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
<methods>
- <method name="get_scancode_with_modifiers" qualifiers="const">
+ <method name="get_keycode_with_modifiers" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
- To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_scancode_string(event.get_scancode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
+ Returns the keycode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
+ To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
+ </description>
+ </method>
+ <method name="get_physical_keycode_with_modifiers" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the physical keycode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
+ To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
</description>
</method>
</methods>
@@ -23,13 +31,17 @@
<member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false">
If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
</member>
+ <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0">
+ The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout.
+ To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
+ </member>
+ <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0">
+ Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
+ To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
+ </member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
</member>
- <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" default="0">
- The key scancode, which corresponds to one of the [enum KeyList] constants.
- To get a human-readable representation of the [InputEventKey], use [code]OS.get_scancode_string(event.scancode)[/code] where [code]event[/code] is the [InputEventKey].
- </member>
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information.
</member>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index aa3400dd97..da93d7fb53 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -13,7 +13,7 @@
<method name="action_add_event">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -24,7 +24,7 @@
<method name="action_erase_event">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -35,7 +35,7 @@
<method name="action_erase_events">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Removes all events from an action.
@@ -44,7 +44,7 @@
<method name="action_has_event">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
@@ -55,7 +55,7 @@
<method name="action_set_deadzone">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="deadzone" type="float">
</argument>
@@ -66,7 +66,7 @@
<method name="add_action">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<argument index="1" name="deadzone" type="float" default="0.5">
</argument>
@@ -78,7 +78,7 @@
<method name="erase_action">
<return type="void">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Removes an action from the [InputMap].
@@ -89,7 +89,7 @@
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
- <argument index="1" name="action" type="String">
+ <argument index="1" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
@@ -98,7 +98,7 @@
<method name="get_action_list">
<return type="Array">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns an array of [InputEvent]s associated with a given action.
@@ -114,7 +114,7 @@
<method name="has_action" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="action" type="String">
+ <argument index="0" name="action" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 1bc36abf66..c6ed1e22ed 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -142,7 +142,7 @@
</description>
</method>
<method name="get_selected_items">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns an array with the indexes of the selected items.
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 2cf49f417c..4ccbc679bf 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -105,7 +105,8 @@
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code].
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 58d7b1f831..6b2bbeb895 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -103,7 +103,8 @@
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index bed5bbaea7..68cec3e624 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -84,7 +84,7 @@
<member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0">
The style for the points between the start and the end.
</member>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )">
+ <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array( )">
The points that form the lines. The line is drawn between every point set in this array.
</member>
<member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8">
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 2ae7eacdb6..af71c30936 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -26,9 +26,9 @@
func _input_event(event):
# Record keys.
if event is InputEventKey and event.pressed and !event.echo:
- keys_typed.append(OS.get_scancode_string(event.scancode))
+ keys_typed.append(OS.get_keycode_string(event.keycode))
# Quit on Escape press.
- if event.scancode == KEY_ESCAPE:
+ if event.keycode == KEY_ESCAPE:
quit = true
# Quit on any mouse click.
if event is InputEventMouseButton:
@@ -46,7 +46,7 @@
<method name="_drop_files" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="files" type="PoolStringArray">
+ <argument index="0" name="files" type="PackedStringArray">
</argument>
<argument index="1" name="from_screen" type="int">
</argument>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index f9ca391f1c..4250ffd700 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Marshalls" inherits="Reference" version="4.0">
+<class name="Marshalls" inherits="Object" version="4.0">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
@@ -10,12 +10,12 @@
</tutorials>
<methods>
<method name="base64_to_raw">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="base64_str" type="String">
</argument>
<description>
- Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string [code]base64_str[/code].
+ Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code].
</description>
</method>
<method name="base64_to_utf8">
@@ -42,10 +42,10 @@
<method name="raw_to_base64">
<return type="String">
</return>
- <argument index="0" name="array" type="PoolByteArray">
+ <argument index="0" name="array" type="PackedByteArray">
</argument>
<description>
- Returns a Base64-encoded string of a given [PoolByteArray].
+ Returns a Base64-encoded string of a given [PackedByteArray].
</description>
</method>
<method name="utf8_to_base64">
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index f2602dfc7f..dc7ffc8934 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -49,7 +49,7 @@
</description>
</method>
<method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 5c6401521a..81ff5969e3 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -57,7 +57,7 @@
</description>
</method>
<method name="get_edge_faces" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -160,7 +160,7 @@
</description>
</method>
<method name="get_vertex_bones" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -185,7 +185,7 @@
</description>
</method>
<method name="get_vertex_edges" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -194,7 +194,7 @@
</description>
</method>
<method name="get_vertex_faces" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -248,7 +248,7 @@
</description>
</method>
<method name="get_vertex_weights" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -303,7 +303,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="bones" type="PoolIntArray">
+ <argument index="1" name="bones" type="PackedInt32Array">
</argument>
<description>
Sets the bones of the given vertex.
@@ -380,7 +380,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
Sets the bone weights of the given vertex.
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 3a3dd08caf..a96f6d7231 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -36,7 +36,7 @@
</description>
</method>
<method name="get_item_list" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the list of item IDs in use.
@@ -84,8 +84,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns a generated item preview (a 3D rendering in isometric perspective).
- [b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture2D] in a running project.
+ When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.
</description>
</method>
<method name="get_item_shapes" qualifiers="const">
diff --git a/doc/classes/MonoGCHandle.xml b/doc/classes/MonoGCHandle.xml
new file mode 100644
index 0000000000..1e33dd1359
--- /dev/null
+++ b/doc/classes/MonoGCHandle.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MonoGCHandle" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 8a4a192ed4..24b87f8e28 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -105,11 +105,11 @@
</method>
</methods>
<members>
- <member name="buffer" type="PoolRealArray" setter="set_buffer" getter="get_buffer" default="PoolRealArray( )">
+ <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )">
</member>
- <member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array">
+ <member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array">
</member>
- <member name="custom_data_array" type="PoolColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
+ <member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0">
Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count].
@@ -117,9 +117,9 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Mesh to be drawn.
</member>
- <member name="transform_2d_array" type="PoolVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array">
+ <member name="transform_2d_array" type="PackedVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array">
</member>
- <member name="transform_array" type="PoolVector3Array" setter="_set_transform_array" getter="_get_transform_array">
+ <member name="transform_array" type="PackedVector3Array" setter="_set_transform_array" getter="_get_transform_array">
</member>
<member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0">
Format of transform used to transform mesh, either 2D or 3D.
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index b82214b246..9c753818d9 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -19,7 +19,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer].
@@ -65,7 +65,7 @@
<method name="send_bytes">
<return type="int" enum="Error">
</return>
- <argument index="0" name="bytes" type="PoolByteArray">
+ <argument index="0" name="bytes" type="PackedByteArray">
</argument>
<argument index="1" name="id" type="int" default="0">
</argument>
@@ -126,7 +126,7 @@
<signal name="network_peer_packet">
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="packet" type="PoolByteArray">
+ <argument index="1" name="packet" type="PackedByteArray">
</argument>
<description>
Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
index be36be0429..93170bca4a 100644
--- a/doc/classes/Navigation.xml
+++ b/doc/classes/Navigation.xml
@@ -4,19 +4,59 @@
Mesh-based navigation and pathfinding node.
</brief_description>
<description>
- Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationMeshInstance] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
+ Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="get_closest_point_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the normal for the point returned by [method get_closest_point].
+ </description>
+ </method>
+ <method name="get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method get_closest_point].
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="start" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <argument index="2" name="use_collision" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the closest point between the navigation surface and the segment.
+ </description>
+ </method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
</description>
</method>
- <method name="get_simple_path">
- <return type="PoolVector3Array">
+ <method name="get_simple_path" qualifiers="const">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="start" type="Vector3">
</argument>
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
index 734469eaa9..dcbfbc2350 100644
--- a/doc/classes/Navigation2D.xml
+++ b/doc/classes/Navigation2D.xml
@@ -4,19 +4,37 @@
2D navigation and pathfinding node.
</brief_description>
<description>
- Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationPolygonInstance] nodes.
+ Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method get_closest_point].
+ </description>
+ </method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
</description>
</method>
- <method name="get_simple_path">
- <return type="PoolVector2Array">
+ <method name="get_simple_path" qualifiers="const">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="start" type="Vector2">
</argument>
diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml
index 3950e35697..110844c492 100644
--- a/doc/classes/Navigation2DServer.xml
+++ b/doc/classes/Navigation2DServer.xml
@@ -32,7 +32,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
@@ -164,6 +164,28 @@
Returns the map cell size.
</description>
</method>
+ <method name="map_get_closest_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="map_get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
<method name="map_get_edge_connection_margin" qualifiers="const">
<return type="float">
</return>
@@ -174,7 +196,7 @@
</description>
</method>
<method name="map_get_path" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="map" type="RID">
</argument>
diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml
index dc759bc72b..f896bf6d15 100644
--- a/doc/classes/NavigationAgent.xml
+++ b/doc/classes/NavigationAgent.xml
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_nav_path" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
Returns the path from start to finish in global coordinates.
@@ -34,7 +34,7 @@
<return type="int">
</return>
<description>
- Returns which index the agent is currently on in the navigation path's [PoolVector3Array].
+ Returns which index the agent is currently on in the navigation path's [PackedVector3Array].
</description>
</method>
<method name="get_navigation" qualifiers="const">
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 6f356e7e4c..116db76cc5 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_nav_path" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<description>
Returns the path from start to finish in global coordinates.
@@ -34,7 +34,7 @@
<return type="int">
</return>
<description>
- Returns which index the agent is currently on in the navigation path's [PoolVector2Array].
+ Returns which index the agent is currently on in the navigation path's [PackedVector2Array].
</description>
</method>
<method name="get_navigation" qualifiers="const">
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index fb3babf4aa..6deca4394f 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -10,7 +10,7 @@
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PoolIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
</description>
@@ -38,7 +38,7 @@
</description>
</method>
<method name="get_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -52,7 +52,7 @@
</description>
</method>
<method name="get_vertices" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<description>
</description>
@@ -70,7 +70,7 @@
<method name="set_vertices">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PackedVector3Array">
</argument>
<description>
</description>
@@ -109,7 +109,7 @@
</member>
<member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0">
</member>
- <member name="geometry/source_group_name" type="String" setter="set_source_group_name" getter="get_source_group_name">
+ <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name">
</member>
<member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0">
</member>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 0157a6f3f7..b0f77dff83 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -8,19 +8,19 @@
Using [method add_outline]:
[codeblock]
var polygon = NavigationPolygon.new()
- var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
+ var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
- $NavigationPolygonInstance.navpoly = polygon
+ $NavigationRegion2D.navpoly = polygon
[/codeblock]
Using [method add_polygon] and indices of the vertices array.
[codeblock]
var polygon = NavigationPolygon.new()
- var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
+ var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.set_vertices(vertices)
- var indices = PoolIntArray(0, 3, 1)
+ var indices = PackedInt32Array(0, 3, 1)
polygon.add_polygon(indices)
- $NavigationPolygonInstance.navpoly = polygon
+ $NavigationRegion2D.navpoly = polygon
[/codeblock]
</description>
<tutorials>
@@ -29,27 +29,27 @@
<method name="add_outline">
<return type="void">
</return>
- <argument index="0" name="outline" type="PoolVector2Array">
+ <argument index="0" name="outline" type="PackedVector2Array">
</argument>
<description>
- Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
+ Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_outline_at_index">
<return type="void">
</return>
- <argument index="0" name="outline" type="PoolVector2Array">
+ <argument index="0" name="outline" type="PackedVector2Array">
</argument>
<argument index="1" name="index" type="int">
</argument>
<description>
- Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
+ Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PoolIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
@@ -70,12 +70,12 @@
</description>
</method>
<method name="get_outline" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script.
+ Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script.
</description>
</method>
<method name="get_outline_count" qualifiers="const">
@@ -86,12 +86,12 @@
</description>
</method>
<method name="get_polygon">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns a [PoolIntArray] containing the indices of the vertices of a created polygon.
+ Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
</description>
</method>
<method name="get_polygon_count" qualifiers="const">
@@ -102,10 +102,10 @@
</description>
</method>
<method name="get_vertices" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<description>
- Returns a [PoolVector2Array] containing all the vertices being used to create the polygons.
+ Returns a [PackedVector2Array] containing all the vertices being used to create the polygons.
</description>
</method>
<method name="make_polygons_from_outlines">
@@ -129,7 +129,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="outline" type="PoolVector2Array">
+ <argument index="1" name="outline" type="PackedVector2Array">
</argument>
<description>
Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update.
@@ -138,7 +138,7 @@
<method name="set_vertices">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector2Array">
+ <argument index="0" name="vertices" type="PackedVector2Array">
</argument>
<description>
Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method.
diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationRegion.xml
index 75bd62e278..41fac70654 100644
--- a/doc/classes/NavigationMeshInstance.xml
+++ b/doc/classes/NavigationRegion.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMeshInstance" inherits="Spatial" version="4.0">
+<class name="NavigationRegion" inherits="Spatial" version="4.0">
<brief_description>
- An instance of a [NavigationMesh].
+ A region of the navigation map.
</brief_description>
<description>
- An instance of a [NavigationMesh]. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation] node.
+ A region of the navigation map. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation] node (even not a direct child).
</description>
<tutorials>
</tutorials>
@@ -19,7 +19,7 @@
</methods>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
- Determines if the [NavigationMeshInstance] is enabled or disabled.
+ Determines if the [NavigationRegion] is enabled or disabled.
</member>
<member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
The [NavigationMesh] resource to use.
diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationRegion2D.xml
index 34c6b09859..aef114e1db 100644
--- a/doc/classes/NavigationPolygonInstance.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygonInstance" inherits="Node2D" version="4.0">
+<class name="NavigationRegion2D" inherits="Node2D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml
index 7553d700f8..1b534b8458 100644
--- a/doc/classes/NavigationServer.xml
+++ b/doc/classes/NavigationServer.xml
@@ -32,7 +32,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
@@ -164,6 +164,54 @@
Returns the map cell size.
</description>
</method>
+ <method name="map_get_closest_point" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the point closest to the provided [code]point[/code] on the navigation mesh surface.
+ </description>
+ </method>
+ <method name="map_get_closest_point_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the normal for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
+ <method name="map_get_closest_point_owner" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Returns the owner region RID for the point returned by [method map_get_closest_point].
+ </description>
+ </method>
+ <method name="map_get_closest_point_to_segment" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <argument index="1" name="start" type="Vector3">
+ </argument>
+ <argument index="2" name="end" type="Vector3">
+ </argument>
+ <argument index="3" name="use_collision" type="bool" default="false">
+ </argument>
+ <description>
+ Returns the closest point between the navigation surface and the segment.
+ </description>
+ </method>
<method name="map_get_edge_connection_margin" qualifiers="const">
<return type="float">
</return>
@@ -174,7 +222,7 @@
</description>
</method>
<method name="map_get_path" qualifiers="const">
- <return type="PoolVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="map" type="RID">
</argument>
@@ -250,6 +298,17 @@
Sets the map up direction.
</description>
</method>
+ <method name="process">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta_time" type="float">
+ </argument>
+ <description>
+ Process the collision avoidance agents.
+ The result of this process is needed by the physics server, so this must be called in the main thread.
+ Note: This function is not thread safe.
+ </description>
+ </method>
<method name="region_bake_navmesh" qualifiers="const">
<return type="void">
</return>
@@ -310,15 +369,6 @@
Control activation of this server.
</description>
</method>
- <method name="step">
- <return type="void">
- </return>
- <argument index="0" name="delta_time" type="float">
- </argument>
- <description>
- Steps the server. This is not threadsafe and must be called in single thread.
- </description>
- </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 5fd0da7452..717130728d 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -129,27 +129,29 @@
child_node.get_parent().remove_child(child_node)
add_child(child_node)
[/codeblock]
+ If you need the child node to be added below a specific node in the list of children, use [method add_child_below_node] instead of this method.
[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
</description>
</method>
<method name="add_child_below_node">
<return type="void">
</return>
- <argument index="0" name="node" type="Node">
+ <argument index="0" name="preceding_node" type="Node">
</argument>
- <argument index="1" name="child_node" type="Node">
+ <argument index="1" name="node" type="Node">
</argument>
<argument index="2" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Adds a child node. The child is placed below the given node in the list of children.
+ Adds a child node below the [code]preceding_node[/code].
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
</description>
</method>
<method name="add_to_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="persistent" type="bool" default="false">
</argument>
@@ -326,7 +328,7 @@
<return type="float">
</return>
<description>
- Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.target_fps].
+ Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second].
</description>
</method>
<method name="get_position_in_parent" qualifiers="const">
@@ -410,7 +412,7 @@
<method name="is_in_group" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree].
@@ -532,7 +534,7 @@
<method name="propagate_call">
<return type="void">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="args" type="Array" default="[ ]">
</argument>
@@ -584,7 +586,7 @@
<method name="remove_from_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
@@ -611,7 +613,7 @@
<method name="rpc" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant].
@@ -621,7 +623,7 @@
<method name="rpc_config">
<return type="int">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
@@ -634,7 +636,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
@@ -643,7 +645,7 @@
<method name="rpc_unreliable" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant].
@@ -654,7 +656,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
@@ -663,7 +665,7 @@
<method name="rset">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -674,7 +676,7 @@
<method name="rset_config">
<return type="int">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
@@ -687,7 +689,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -698,7 +700,7 @@
<method name="rset_unreliable">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -711,7 +713,7 @@
</return>
<argument index="0" name="peer_id" type="int">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -745,7 +747,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.target_fps] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored.
+ Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.iterations_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_physics_process_internal">
@@ -830,7 +832,7 @@
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
</member>
- <member name="name" type="String" setter="set_name" getter="get_name">
+ <member name="name" type="StringName" setter="set_name" getter="get_name">
The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
</member>
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index d361ea83e6..d43c395433 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -93,7 +93,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="arguments" type="PoolStringArray">
+ <argument index="1" name="arguments" type="PackedStringArray">
</argument>
<argument index="2" name="blocking" type="bool" default="true">
</argument>
@@ -124,13 +124,13 @@
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
- <method name="find_scancode_from_string" qualifiers="const">
+ <method name="find_keycode_from_string" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="string" type="String">
</argument>
<description>
- Returns the scancode of the given string (e.g. "Escape").
+ Returns the keycode of the given string (e.g. "Escape").
</description>
</method>
<method name="get_audio_driver_count" qualifiers="const">
@@ -150,14 +150,14 @@
</description>
</method>
<method name="get_cmdline_args">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the command line arguments passed to the engine.
</description>
</method>
<method name="get_connected_midi_inputs">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array of MIDI device names.
@@ -200,13 +200,6 @@
The returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch.
</description>
</method>
- <method name="get_dynamic_memory_usage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total amount of dynamic memory used (only works in debug).
- </description>
- </method>
<method name="get_environment" qualifiers="const">
<return type="String">
</return>
@@ -224,7 +217,7 @@
</description>
</method>
<method name="get_granted_permissions" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
With this function you can get the list of dangerous permissions that have been granted to the Android application.
@@ -249,6 +242,16 @@
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
+ <method name="get_keycode_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="code" type="int">
+ </argument>
+ <description>
+ Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
+ See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
+ </description>
+ </method>
<method name="get_latin_keyboard_variant" qualifiers="const">
<return type="String">
</return>
@@ -302,16 +305,6 @@
Returns the window size including decorations like window borders.
</description>
</method>
- <method name="get_scancode_string" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="code" type="int">
- </argument>
- <description>
- Returns the given scancode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
- See also [member InputEventKey.scancode] and [method InputEventKey.get_scancode_with_modifiers].
- </description>
- </method>
<method name="get_screen_count" qualifiers="const">
<return type="int">
</return>
@@ -595,20 +588,20 @@
To check whether the Godot binary used to run the project is an export template (debug or release), use [code]OS.has_feature("standalone")[/code] instead.
</description>
</method>
- <method name="is_ok_left_and_cancel_right" qualifiers="const">
+ <method name="is_keycode_unicode" qualifiers="const">
<return type="bool">
</return>
+ <argument index="0" name="code" type="int">
+ </argument>
<description>
- Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
+ Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
</description>
</method>
- <method name="is_scancode_unicode" qualifiers="const">
+ <method name="is_ok_left_and_cancel_right" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="code" type="int">
- </argument>
<description>
- Returns [code]true[/code] if the input scancode corresponds to a Unicode character.
+ Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
</description>
</method>
<method name="is_stdout_verbose" qualifiers="const">
@@ -734,7 +727,7 @@
<method name="print_resources_by_type">
<return type="void">
</return>
- <argument index="0" name="types" type="PoolStringArray">
+ <argument index="0" name="types" type="PackedStringArray">
</argument>
<description>
Shows the number of resources loaded by the game of the given types.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 858bf5b635..a3faccae1a 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -23,7 +23,7 @@
<method name="_get" qualifiers="virtual">
<return type="Variant">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
Virtual method which can be overridden to customize the return value of [method get].
@@ -58,7 +58,7 @@
<method name="_set" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -89,7 +89,7 @@
<method name="call" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
@@ -101,7 +101,7 @@
<method name="call_deferred" qualifiers="vararg">
<return type="void">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
@@ -113,7 +113,7 @@
<method name="callv">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<argument index="1" name="arg_array" type="Array">
</argument>
@@ -134,17 +134,16 @@
<method name="connect">
<return type="int" enum="Error">
</return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
- <argument index="3" name="binds" type="Array" default="[ ]">
+ <argument index="2" name="binds" type="Array" default="[ ]">
</argument>
- <argument index="4" name="flags" type="int" default="0">
+ <argument index="3" name="flags" type="int" default="0">
</argument>
<description>
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
@@ -166,13 +165,12 @@
<method name="disconnect">
<return type="void">
</return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
<description>
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
</description>
@@ -180,7 +178,7 @@
<method name="emit_signal" qualifiers="vararg">
<return type="void">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
<description>
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
@@ -251,10 +249,10 @@
</description>
</method>
<method name="get_meta_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
- Returns the object's metadata as a [PoolStringArray].
+ Returns the object's metadata as a [PackedStringArray].
</description>
</method>
<method name="get_method_list" qualifiers="const">
@@ -273,7 +271,7 @@
</description>
</method>
<method name="get_script" qualifiers="const">
- <return type="Reference">
+ <return type="Variant">
</return>
<description>
Returns the object's [Script] instance, or [code]null[/code] if none is assigned.
@@ -307,7 +305,7 @@
<method name="has_method" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the object contains the given [code]method[/code].
@@ -316,7 +314,7 @@
<method name="has_user_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given user-defined [code]signal[/code] exists.
@@ -341,13 +339,12 @@
<method name="is_connected" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal" type="String">
+ <argument index="0" name="signal" type="StringName">
</argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
+ <argument index="1" name="callable" type="Callable">
</argument>
<description>
+ [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
</description>
</method>
@@ -409,7 +406,7 @@
<method name="set_deferred">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -456,7 +453,7 @@
<method name="set_script">
<return type="void">
</return>
- <argument index="0" name="script" type="Reference">
+ <argument index="0" name="script" type="Variant">
</argument>
<description>
Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
@@ -472,9 +469,9 @@
</description>
</method>
<method name="tr" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="message" type="String">
+ <argument index="0" name="message" type="StringName">
</argument>
<description>
Translates a message using translation catalogs configured in the Project Settings.
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 6cfef42204..8a59ef5cb4 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -17,7 +17,7 @@
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0">
The culling mode to use.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
A [Vector2] array with the index for polygon's vertices positions.
[b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference.
</member>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PackedByteArray.xml
index 63a7037fb1..b08357e278 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolByteArray" version="4.0">
+<class name="PackedByteArray" version="4.0">
<brief_description>
- A pooled [Array] of bytes.
+ A packed [Array] of bytes.
</brief_description>
<description>
- An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolByteArray">
- <return type="PoolByteArray">
+ <method name="PackedByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="byte" type="int">
</argument>
<description>
@@ -27,30 +29,32 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolByteArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedByteArray">
</argument>
<description>
- Appends a [PoolByteArray] at the end of this array.
+ Appends a [PackedByteArray] at the end of this array.
</description>
</method>
<method name="compress">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
<method name="decompress">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="buffer_size" type="int">
</argument>
<argument index="1" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
<method name="empty">
@@ -80,7 +84,7 @@
<description>
Returns a hexadecimal representation of this array as a [String].
[codeblock]
- var array = PoolByteArray([11, 46, 255])
+ var array = PackedByteArray([11, 46, 255])
print(array.hex_encode()) # Prints: 0b2eff
[/codeblock]
</description>
@@ -97,11 +101,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="byte" type="int">
</argument>
<description>
@@ -109,6 +117,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -116,6 +126,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -123,6 +135,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="byte" type="int">
@@ -139,14 +153,14 @@
</description>
</method>
<method name="subarray">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="from" type="int">
</argument>
<argument index="1" name="to" type="int">
</argument>
<description>
- Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array.
+ Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array.
</description>
</method>
</methods>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PackedColorArray.xml
index d5599f821c..06228e4dac 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolColorArray" version="4.0">
+<class name="PackedColorArray" version="4.0">
<brief_description>
- A pooled [Array] of [Color].
+ A packed [Array] of [Color]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolColorArray">
- <return type="PoolColorArray">
+ <method name="PackedColorArray">
+ <return type="PackedColorArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolColorArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedColorArray">
</argument>
<description>
- Appends a [PoolColorArray] at the end of this array.
+ Appends a [PackedColorArray] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="color" type="Color">
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index 79c9fa8d9c..296f9d3373 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -23,7 +23,7 @@
</method>
</methods>
<members>
- <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" default="PoolByteArray( )">
+ <member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray( )">
</member>
</members>
<constants>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PackedFloat32Array.xml
index 6957e7282b..ee82586cdb 100644
--- a/doc/classes/PoolRealArray.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -1,25 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolRealArray" version="4.0">
+<class name="PackedFloat32Array" version="4.0">
<brief_description>
- A pooled [Array] of reals ([float]).
+ A packed [Array] of 32-bit floating-point values.
</brief_description>
<description>
- An [Array] specifically designed to hold floating-point values ([float]). Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
+ If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolRealArray">
- <return type="PoolRealArray">
+ <method name="PackedFloat32Array">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -27,10 +30,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolRealArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedFloat32Array">
</argument>
<description>
- Appends a [PoolRealArray] at the end of this array.
+ Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +57,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -64,6 +73,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +82,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +91,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="value" type="float">
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
new file mode 100644
index 0000000000..ce2300c65a
--- /dev/null
+++ b/doc/classes/PackedFloat64Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedFloat64Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 64-bit floating-point values.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedFloat64Array">
+ <return type="PackedFloat64Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedFloat64Array">
+ </argument>
+ <description>
+ Appends a [PackedFloat64Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Changes the float at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
new file mode 100644
index 0000000000..176c624956
--- /dev/null
+++ b/doc/classes/PackedInt32Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedInt32Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 32-bit integers.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedInt32Array">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedInt32Array">
+ </argument>
+ <description>
+ Appends a [PackedInt32Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends a value to the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Changes the integer at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the array size.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PackedInt64Array.xml
index 54f0f46e11..d8a8071590 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolIntArray" version="4.0">
+<class name="PackedInt64Array" version="4.0">
<brief_description>
- A pooled [Array] of integers ([int]).
+ A packed [Array] of 64-bit integers.
</brief_description>
<description>
- An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
- [b]Note:[/b] This type is limited to signed 32-bit integers, which means it can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values.
+ [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolIntArray">
- <return type="PoolIntArray">
+ <method name="PackedInt64Array">
+ <return type="PackedInt64Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="integer" type="int">
</argument>
<description>
@@ -28,10 +30,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolIntArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedInt64Array">
</argument>
<description>
- Appends a [PoolIntArray] at the end of this array.
+ Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -49,15 +53,19 @@
<argument index="1" name="integer" type="int">
</argument>
<description>
- Inserts a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="integer" type="int">
</argument>
<description>
@@ -65,6 +73,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -72,6 +82,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -79,12 +91,14 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="integer" type="int">
</argument>
<description>
- Changes the int at the given index.
+ Changes the integer at the given index.
</description>
</method>
<method name="size">
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index d13195bd5e..e422545b7b 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -65,7 +65,7 @@
</method>
</methods>
<members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PoolIntArray( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PoolStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PoolIntArray( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedInt32Array( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
A dictionary representation of the scene contents.
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PackedStringArray.xml
index b4fb7b31d4..9526f5899d 100644
--- a/doc/classes/PoolStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolStringArray" version="4.0">
+<class name="PackedStringArray" version="4.0">
<brief_description>
- A pooled [Array] of [String].
+ A packed [Array] of [String]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [String]s. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolStringArray">
- <return type="PoolStringArray">
+ <method name="PackedStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolStringArray">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedStringArray">
</argument>
<description>
- Appends a [PoolStringArray] at the end of this array.
+ Appends a [PackedStringArray] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,20 +56,15 @@
</description>
</method>
<method name="invert">
- <description>
- Reverses the order of the elements in the array.
- </description>
- </method>
- <method name="join">
- <return type="String">
+ <return type="void">
</return>
- <argument index="0" name="delimiter" type="String">
- </argument>
<description>
- Returns a [String] with each element of the array joined with the given [code]delimiter[/code].
+ Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -73,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -80,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -87,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="string" type="String">
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PackedVector2Array.xml
index cb4536be5b..87f202357c 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector2Array" version="4.0">
+<class name="PackedVector2Array" version="4.0">
<brief_description>
- A pooled [Array] of [Vector2].
+ A packed [Array] of [Vector2]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolVector2Array">
- <return type="PoolVector2Array">
+ <method name="PackedVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolVector2Array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedVector2Array">
</argument>
<description>
- Appends a [PoolVector2Array] at the end of this array.
+ Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="vector2" type="Vector2">
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 6c40de9bd8..7bfa684ff5 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector3Array" version="4.0">
+<class name="PackedVector3Array" version="4.0">
<brief_description>
- A pooled [Array] of [Vector3].
+ A packed [Array] of [Vector3]s.
</brief_description>
<description>
- An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory.
+ An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PoolVector3Array">
- <return type="PoolVector3Array">
+ <method name="PackedVector3Array">
+ <return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
+ <return type="void">
+ </return>
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
@@ -27,10 +29,12 @@
</description>
</method>
<method name="append_array">
- <argument index="0" name="array" type="PoolVector3Array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedVector3Array">
</argument>
<description>
- Appends a [PoolVector3Array] at the end of this array.
+ Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
<method name="empty">
@@ -52,11 +56,15 @@
</description>
</method>
<method name="invert">
+ <return type="void">
+ </return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="push_back">
+ <return type="void">
+ </return>
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
@@ -64,6 +72,8 @@
</description>
</method>
<method name="remove">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -71,6 +81,8 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -78,6 +90,8 @@
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="vector3" type="Vector3">
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index b721bc9df4..e3e2f63e14 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -17,7 +17,7 @@
</description>
</method>
<method name="get_packet">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Gets a raw packet.
@@ -43,7 +43,7 @@
<method name="put_packet">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Sends a raw packet.
diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml
new file mode 100644
index 0000000000..19ebb9d81e
--- /dev/null
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeerDTLS" inherits="PacketPeer" version="4.0">
+ <brief_description>
+ DTLS packet peer.
+ </brief_description>
+ <description>
+ This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="connect_to_peer">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="packet_peer" type="PacketPeerUDP">
+ </argument>
+ <argument index="1" name="validate_certs" type="bool" default="true">
+ </argument>
+ <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="3" name="valid_certificate" type="X509Certificate" default="null">
+ </argument>
+ <description>
+ Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument.
+ </description>
+ </method>
+ <method name="disconnect_from_peer">
+ <return type="void">
+ </return>
+ <description>
+ Disconnects this peer, terminating the DTLS session.
+ </description>
+ </method>
+ <method name="get_status" qualifiers="const">
+ <return type="int" enum="PacketPeerDTLS.Status">
+ </return>
+ <description>
+ Returns the status of the connection. See [enum Status] for values.
+ </description>
+ </method>
+ <method name="poll">
+ <return type="void">
+ </return>
+ <description>
+ Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STATUS_DISCONNECTED" value="0" enum="Status">
+ A status representing a [PacketPeerDTLS] that is disconnected.
+ </constant>
+ <constant name="STATUS_HANDSHAKING" value="1" enum="Status">
+ A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer.
+ </constant>
+ <constant name="STATUS_CONNECTED" value="2" enum="Status">
+ A status representing a [PacketPeerDTLS] that is connected to a remote peer.
+ </constant>
+ <constant name="STATUS_ERROR" value="3" enum="Status">
+ A status representing a [PacketPeerDTLS] in a generic error state.
+ </constant>
+ <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status">
+ An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 81cd341ef7..aa5599a3fb 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -16,6 +16,18 @@
Closes the UDP socket the [PacketPeerUDP] is currently listening on.
</description>
</method>
+ <method name="connect_to_host">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <description>
+ Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer].
+ Note: Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transfering sensitive information.
+ </description>
+ </method>
<method name="get_packet_ip" qualifiers="const">
<return type="String">
</return>
@@ -30,6 +42,13 @@
Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]).
</description>
</method>
+ <method name="is_connected_to_host" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host].
+ </description>
+ </method>
<method name="is_listening" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml
index c600a4425b..0ddf1cb054 100644
--- a/doc/classes/PanoramaSky.xml
+++ b/doc/classes/PanoramaSky.xml
@@ -5,6 +5,8 @@
</brief_description>
<description>
A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map.
+ Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose.
+ You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index a7bf947011..378b165644 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -37,82 +37,76 @@
<constant name="MEMORY_STATIC" value="3" enum="Monitor">
Static memory currently used, in bytes. Not available in release builds.
</constant>
- <constant name="MEMORY_DYNAMIC" value="4" enum="Monitor">
- Dynamic memory currently used, in bytes. Not available in release builds.
- </constant>
- <constant name="MEMORY_STATIC_MAX" value="5" enum="Monitor">
+ <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor">
Available static memory. Not available in release builds.
</constant>
- <constant name="MEMORY_DYNAMIC_MAX" value="6" enum="Monitor">
- Available dynamic memory. Not available in release builds.
- </constant>
- <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7" enum="Monitor">
+ <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor">
Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
</constant>
- <constant name="OBJECT_COUNT" value="8" enum="Monitor">
+ <constant name="OBJECT_COUNT" value="6" enum="Monitor">
Number of objects currently instanced (including nodes).
</constant>
- <constant name="OBJECT_RESOURCE_COUNT" value="9" enum="Monitor">
+ <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor">
Number of resources currently used.
</constant>
- <constant name="OBJECT_NODE_COUNT" value="10" enum="Monitor">
+ <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor">
Number of nodes currently instanced in the scene tree. This also includes the root node.
</constant>
- <constant name="OBJECT_ORPHAN_NODE_COUNT" value="11" enum="Monitor">
+ <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor">
Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree.
</constant>
- <constant name="RENDER_OBJECTS_IN_FRAME" value="12" enum="Monitor">
+ <constant name="RENDER_OBJECTS_IN_FRAME" value="10" enum="Monitor">
3D objects drawn per frame.
</constant>
- <constant name="RENDER_VERTICES_IN_FRAME" value="13" enum="Monitor">
+ <constant name="RENDER_VERTICES_IN_FRAME" value="11" enum="Monitor">
Vertices drawn per frame. 3D only.
</constant>
- <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="14" enum="Monitor">
+ <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="12" enum="Monitor">
Material changes per frame. 3D only.
</constant>
- <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="15" enum="Monitor">
+ <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="13" enum="Monitor">
Shader changes per frame. 3D only.
</constant>
- <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="16" enum="Monitor">
+ <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="14" enum="Monitor">
Render surface changes per frame. 3D only.
</constant>
- <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="17" enum="Monitor">
+ <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="15" enum="Monitor">
Draw calls per frame. 3D only.
</constant>
- <constant name="RENDER_VIDEO_MEM_USED" value="18" enum="Monitor">
+ <constant name="RENDER_VIDEO_MEM_USED" value="16" enum="Monitor">
The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
- <constant name="RENDER_TEXTURE_MEM_USED" value="19" enum="Monitor">
+ <constant name="RENDER_TEXTURE_MEM_USED" value="17" enum="Monitor">
The amount of texture memory used.
</constant>
- <constant name="RENDER_VERTEX_MEM_USED" value="20" enum="Monitor">
+ <constant name="RENDER_VERTEX_MEM_USED" value="18" enum="Monitor">
The amount of vertex memory used.
</constant>
- <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="21" enum="Monitor">
+ <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="19" enum="Monitor">
Unimplemented in the GLES2 rendering backend, always returns 0.
</constant>
- <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="22" enum="Monitor">
+ <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="20" enum="Monitor">
Number of active [RigidBody2D] nodes in the game.
</constant>
- <constant name="PHYSICS_2D_COLLISION_PAIRS" value="23" enum="Monitor">
+ <constant name="PHYSICS_2D_COLLISION_PAIRS" value="21" enum="Monitor">
Number of collision pairs in the 2D physics engine.
</constant>
- <constant name="PHYSICS_2D_ISLAND_COUNT" value="24" enum="Monitor">
+ <constant name="PHYSICS_2D_ISLAND_COUNT" value="22" enum="Monitor">
Number of islands in the 2D physics engine.
</constant>
- <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="25" enum="Monitor">
+ <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="23" enum="Monitor">
Number of active [RigidBody] and [VehicleBody] nodes in the game.
</constant>
- <constant name="PHYSICS_3D_COLLISION_PAIRS" value="26" enum="Monitor">
+ <constant name="PHYSICS_3D_COLLISION_PAIRS" value="24" enum="Monitor">
Number of collision pairs in the 3D physics engine.
</constant>
- <constant name="PHYSICS_3D_ISLAND_COUNT" value="27" enum="Monitor">
+ <constant name="PHYSICS_3D_ISLAND_COUNT" value="25" enum="Monitor">
Number of islands in the 3D physics engine.
</constant>
- <constant name="AUDIO_OUTPUT_LATENCY" value="28" enum="Monitor">
+ <constant name="AUDIO_OUTPUT_LATENCY" value="26" enum="Monitor">
Output latency of the [AudioServer].
</constant>
- <constant name="MONITOR_MAX" value="29" enum="Monitor">
+ <constant name="MONITOR_MAX" value="27" enum="Monitor">
Represents the size of the [enum Monitor] enum.
</constant>
</constants>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index 4fac27a82b..45215253be 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -165,7 +165,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
</description>
@@ -199,7 +199,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
@@ -661,7 +661,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index d54a907d3d..c9f4accee2 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -156,7 +156,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
</description>
@@ -190,7 +190,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
@@ -678,7 +678,7 @@
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<argument index="3" name="userdata" type="Variant" default="null">
</argument>
@@ -1467,7 +1467,7 @@
If [code]set[/code] there is a linear motor on this axis that targets a specific velocity.
</constant>
<constant name="SHAPE_PLANE" value="0" enum="ShapeType">
- The [Shape] is a [PlaneShape].
+ The [Shape] is a [WorldMarginShape].
</constant>
<constant name="SHAPE_RAY" value="1" enum="ShapeType">
The [Shape] is a [RayShape].
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 8f0043fb86..292acd8b5d 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -77,7 +77,7 @@
</return>
<argument index="0" name="point" type="Vector3">
</argument>
- <argument index="1" name="epsilon" type="float" default="0.00001">
+ <argument index="1" name="epsilon" type="float" default="1e-05">
</argument>
<description>
Returns [code]true[/code] if [code]point[/code] is inside the plane (by a very minimum [code]epsilon[/code] threshold).
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index af4e8e1671..f777545733 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -14,7 +14,7 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
</description>
@@ -48,7 +48,7 @@
</description>
</method>
<method name="get_bone_weights" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="index" type="int">
</argument>
@@ -70,7 +70,7 @@
</return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="weights" type="PoolRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
</description>
@@ -98,9 +98,9 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The offset applied to each vertex.
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
The polygon's list of vertices. The final point will be connected to the first.
- [b]Note:[/b] This returns a copy of the [PoolVector2Array] rather than a reference.
+ [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference.
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]">
</member>
@@ -127,10 +127,10 @@
<member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )">
Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa.
</member>
- <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" default="PoolVector2Array( )">
+ <member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array( )">
Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code].
</member>
- <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PoolColorArray( )">
+ <member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray( )">
Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code].
</member>
</members>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index 28a0447f3d..49453d32ac 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -8,7 +8,7 @@
</tutorials>
<methods>
<method name="find_path">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Vector2">
</argument>
@@ -32,7 +32,7 @@
</description>
</method>
<method name="get_intersections" qualifiers="const">
- <return type="PoolVector2Array">
+ <return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="Vector2">
</argument>
@@ -70,9 +70,9 @@
<method name="setup">
<return type="void">
</return>
- <argument index="0" name="points" type="PoolVector2Array">
+ <argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="connections" type="PoolIntArray">
+ <argument index="1" name="connections" type="PackedInt32Array">
</argument>
<description>
</description>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 0bedb3afe3..8347283785 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -179,9 +179,6 @@
</method>
</methods>
<members>
- <member name="android/modules" type="String" setter="" getter="" default="&quot;&quot;">
- Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]org/godotengine/org/GodotPaymentV3,org/godotengine/godot/MyCustomSingleton"[/code].
- </member>
<member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.14, 0.14, 0.14, 1 )">
Background color for the boot splash.
</member>
@@ -469,7 +466,7 @@
<member name="editor/script_templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path.
</member>
- <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
</member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
@@ -815,6 +812,18 @@
<member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60">
This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number.
</member>
+ <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685">
+ </member>
+ <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000">
+ </member>
+ <member name="mono/profiler/args" type="String" setter="" getter="" default="&quot;log:calls,alloc,sample,output=output.mlpd&quot;">
+ </member>
+ <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
+ </member>
<member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter="" default="2048">
Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
</member>
@@ -956,10 +965,12 @@
Enables [member Viewport.physics_object_picking] on the root viewport.
</member>
<member name="physics/common/physics_fps" type="int" setter="" getter="" default="60">
- Frames per second used in the physics. Physics always needs a fixed amount of frames per second.
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
+ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead.
</member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
+ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
<member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color].
@@ -1023,26 +1034,28 @@
Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64">
+ Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM.
</member>
- <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256">
+ <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="128">
+ Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower.
</member>
<member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128">
+ Lower-end override for [member rendering/quality/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/reflections/atlas_size" type="int" setter="" getter="" default="2048">
- Size of the atlas used by reflection probes. A larger size can result in higher visual quality, while a smaller size will be faster and take up less memory.
+ <member name="rendering/quality/reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false">
+ Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed.
</member>
<member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024">
+ Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail.
</member>
<member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128">
- </member>
- <member name="rendering/quality/reflections/ggx_samples_realtime" type="int" setter="" getter="" default="64">
- </member>
- <member name="rendering/quality/reflections/ggx_samples_realtime.mobile" type="int" setter="" getter="" default="16">
+ Lower-end override for [member rendering/quality/reflections/ggx_samples] on mobile devices, due to performance concerns or driver support.
</member>
<member name="rendering/quality/reflections/roughness_layers" type="int" setter="" getter="" default="6">
+ Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM.
</member>
<member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true">
- If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory.
+ If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/quality/reflections/roughness_layers] times more memory.
</member>
<member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index f11f20f1f9..327fa882e5 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -132,6 +132,8 @@
</description>
</method>
<method name="set_axis_angle">
+ <return type="void">
+ </return>
<argument index="0" name="axis" type="Vector3">
</argument>
<argument index="1" name="angle" type="float">
@@ -141,6 +143,8 @@
</description>
</method>
<method name="set_euler">
+ <return type="void">
+ </return>
<argument index="0" name="euler" type="Vector3">
</argument>
<description>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index e32b19ff00..dbf461cdf1 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Rect2" version="4.0">
<brief_description>
- 2D axis-aligned bounding box.
+ 2D axis-aligned bounding box using floating point coordinates.
</brief_description>
<description>
- Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -36,6 +37,15 @@
Constructs a [Rect2] by x, y, width, and height.
</description>
</method>
+ <method name="Rect2">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a [Rect2] from a [Rect2i].
+ </description>
+ </method>
<method name="abs">
<return type="Rect2">
</return>
@@ -133,8 +143,11 @@
</return>
<argument index="0" name="b" type="Rect2">
</argument>
+ <argument index="1" name="include_borders" type="bool" default="false">
+ </argument>
<description>
- Returns [code]true[/code] if the [Rect2] overlaps with another.
+ Returns [code]true[/code] if the [Rect2] overlaps with [code]b[/code] (i.e. they have at least one point in common).
+ If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
</description>
</method>
<method name="is_equal_approx">
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
new file mode 100644
index 0000000000..2e8be384c1
--- /dev/null
+++ b/doc/classes/Rect2i.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Rect2i" version="4.0">
+ <brief_description>
+ 2D axis-aligned bounding box using integer coordinates.
+ </brief_description>
+ <description>
+ [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by position and size.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="width" type="int">
+ </argument>
+ <argument index="3" name="height" type="int">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by x, y, width, and height.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="from" type="Rect2">
+ </argument>
+ <description>
+ Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 9c7a645fec..e138af6841 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -4,7 +4,7 @@
Captures its surroundings to create reflections.
</brief_description>
<description>
- Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
+ Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
</description>
<tutorials>
@@ -52,7 +52,7 @@
</members>
<constants>
<constant name="UPDATE_ONCE" value="0" enum="UpdateMode">
- Update the probe once on the next frame.
+ Update the probe once on the next frame. The corresponding radiance map will be generated over the following six frames. This is slower to update than [constant UPDATE_ALWAYS] but can result in higher quality reflections.
</constant>
<constant name="UPDATE_ALWAYS" value="1" enum="UpdateMode">
Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible.
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index fc36f922e1..713f2c1726 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_recognized_extensions" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Gets the list of extensions for files this loader is able to read.
@@ -43,7 +43,7 @@
<method name="handles_type" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="typename" type="String">
+ <argument index="0" name="typename" type="StringName">
</argument>
<description>
Tells which resource class this loader can load.
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 369c158ce4..69f8b43898 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="get_recognized_extensions" qualifiers="virtual">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="resource" type="Resource">
</argument>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
deleted file mode 100644
index 64e94c4f2d..0000000000
--- a/doc/classes/ResourceInteractiveLoader.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceInteractiveLoader" inherits="Reference" version="4.0">
- <brief_description>
- Interactive [Resource] loader.
- </brief_description>
- <description>
- Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_resource">
- <return type="Resource">
- </return>
- <description>
- Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise.
- </description>
- </method>
- <method name="get_stage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the load stage. The total amount of stages can be queried with [method get_stage_count].
- </description>
- </method>
- <method name="get_stage_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the total amount of stages (calls to [method poll]) needed to completely load this resource.
- </description>
- </method>
- <method name="poll">
- <return type="int" enum="Error">
- </return>
- <description>
- Polls the loading operation, i.e. loads a data chunk up to the next stage.
- Returns [constant OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed.
- Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
- Returns another [enum Error] code if the poll has failed.
- </description>
- </method>
- <method name="wait">
- <return type="int" enum="Error">
- </return>
- <description>
- Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.
- Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
- Returns another [enum Error] code if a poll has failed, aborting the operation.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 85c9438d4f..533bc9ec28 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -24,7 +24,7 @@
</description>
</method>
<method name="get_dependencies">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -33,7 +33,7 @@
</description>
</method>
<method name="get_recognized_extensions_for_type">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
@@ -48,7 +48,7 @@
</argument>
<description>
Returns whether a cached resource is available for the given [code]path[/code].
- Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] or [method load_interactive] methods will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.
+ Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.
</description>
</method>
<method name="load">
@@ -68,16 +68,34 @@
Returns an empty resource if no ResourceFormatLoader could handle the file.
</description>
</method>
- <method name="load_interactive">
- <return type="ResourceInteractiveLoader">
+ <method name="load_threaded_get">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_threaded_get_status">
+ <return type="int" enum="ResourceLoader.ThreadLoadStatus">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="progress" type="Array" default="[ ]">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_threaded_request">
+ <return type="int" enum="Error">
</return>
<argument index="0" name="path" type="String">
</argument>
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
+ <argument index="2" name="use_sub_threads" type="bool" default="false">
+ </argument>
<description>
- Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks.
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
</description>
</method>
<method name="set_abort_on_missing_resources">
@@ -91,5 +109,13 @@
</method>
</methods>
<constants>
+ <constant name="THREAD_LOAD_INVALID_RESOURCE" value="0" enum="ThreadLoadStatus">
+ </constant>
+ <constant name="THREAD_LOAD_IN_PROGRESS" value="1" enum="ThreadLoadStatus">
+ </constant>
+ <constant name="THREAD_LOAD_FAILED" value="2" enum="ThreadLoadStatus">
+ </constant>
+ <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 1e0dcaaea8..3159a4c424 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -13,7 +13,7 @@
<method name="add_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="resource" type="Resource">
</argument>
@@ -24,14 +24,14 @@
<method name="get_resource" qualifiers="const">
<return type="Resource">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the list of resources inside the preloader.
@@ -40,7 +40,7 @@
<method name="has_resource" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code].
@@ -49,7 +49,7 @@
<method name="remove_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Removes the resource associated to [code]name[/code] from the preloader.
@@ -58,9 +58,9 @@
<method name="rename_resource">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index 8c27b951f5..ecde5754f9 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="get_recognized_extensions">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="Resource">
</argument>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 983f768b85..5f07133a27 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -113,7 +113,7 @@
<method name="parse_expressions_for_values">
<return type="Dictionary">
</return>
- <argument index="0" name="expressions" type="PoolStringArray">
+ <argument index="0" name="expressions" type="PackedStringArray">
</argument>
<description>
Parses BBCode parameter [code]expressions[/code] into a dictionary.
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index 7304e03bf6..abc429d5fe 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -37,7 +37,7 @@
</description>
</method>
<method name="get_connection_method" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -46,7 +46,7 @@
</description>
</method>
<method name="get_connection_signal" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -81,7 +81,7 @@
</description>
</method>
<method name="get_node_groups" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -117,7 +117,7 @@
</description>
</method>
<method name="get_node_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -157,7 +157,7 @@
</description>
</method>
<method name="get_node_property_name" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -179,7 +179,7 @@
</description>
</method>
<method name="get_node_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 1499173d6b..e6778013cf 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -16,9 +16,9 @@
<method name="call_group" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Calls [code]method[/code] on each member of the given group.
@@ -29,9 +29,9 @@
</return>
<argument index="0" name="flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
- <argument index="2" name="method" type="String">
+ <argument index="2" name="method" type="StringName">
</argument>
<description>
Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags].
@@ -83,7 +83,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer].
@@ -106,7 +106,7 @@
<method name="get_nodes_in_group">
<return type="Array">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<description>
Returns a list of all nodes assigned to the given group.
@@ -122,7 +122,7 @@
<method name="has_group" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the given group exists.
@@ -152,7 +152,7 @@
<method name="notify_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="notification" type="int">
</argument>
@@ -165,7 +165,7 @@
</return>
<argument index="0" name="call_flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
<argument index="2" name="notification" type="int">
</argument>
@@ -212,7 +212,7 @@
<method name="set_group">
<return type="void">
</return>
- <argument index="0" name="group" type="String">
+ <argument index="0" name="group" type="StringName">
</argument>
<argument index="1" name="property" type="String">
</argument>
@@ -227,7 +227,7 @@
</return>
<argument index="0" name="call_flags" type="int">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="group" type="StringName">
</argument>
<argument index="2" name="property" type="String">
</argument>
@@ -320,7 +320,7 @@
</description>
</signal>
<signal name="files_dropped">
- <argument index="0" name="files" type="PoolStringArray">
+ <argument index="0" name="files" type="PackedStringArray">
</argument>
<argument index="1" name="screen" type="int">
</argument>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 0f07cb83f3..f671315620 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -26,7 +26,7 @@
</description>
</method>
<method name="get_instance_base_type" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
<description>
Returns the script's base type.
@@ -35,7 +35,7 @@
<method name="get_property_default_value">
<return type="Variant">
</return>
- <argument index="0" name="property" type="String">
+ <argument index="0" name="property" type="StringName">
</argument>
<description>
</description>
@@ -67,7 +67,7 @@
<method name="has_script_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="signal_name" type="String">
+ <argument index="0" name="signal_name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the script, or a base class, defines a signal with the given name.
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 0b113bebe5..9c5634f43a 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -4,7 +4,9 @@
A helper node for displaying scrollable elements such as lists.
</brief_description>
<description>
- A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
+ A ScrollContainer node meant to contain a [Control] child.
+ ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer.
+ Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index eca98fb10e..c9745acfcd 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -11,17 +11,24 @@
</tutorials>
<methods>
<method name="post">
+ <return type="void">
+ </return>
+ <description>
+ Lowers the [Semaphore], allowing one more thread in.
+ </description>
+ </method>
+ <method name="try_wait">
<return type="int" enum="Error">
</return>
<description>
- Lowers the [Semaphore], allowing one more thread in. Returns [constant OK] on success, [constant ERR_BUSY] otherwise.
+ Like [method wait], but won't block, so if the value is zero, fails immediately and returns [constant ERR_BUSY]. If non-zero, it returns [constant OK] to report success.
</description>
</method>
<method name="wait">
- <return type="int" enum="Error">
+ <return type="void">
</return>
<description>
- Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. Returns [constant OK] on success, [constant ERR_BUSY] otherwise.
+ Waits for the [Semaphore], if its value is zero, blocks until non-zero.
</description>
</method>
</methods>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index a2fbf5a1b1..14c5d7a03c 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -14,7 +14,7 @@
<method name="get_default_texture_param" qualifiers="const">
<return type="Texture2D">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<description>
Returns the texture that is set as default for the specified parameter.
@@ -31,7 +31,7 @@
<method name="has_param" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if the shader has this param defined as a uniform in its code.
@@ -41,7 +41,7 @@
<method name="set_default_texture_param">
<return type="void">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<argument index="1" name="texture" type="Texture2D">
</argument>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index adb30c14d1..7e0e1ce831 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -13,7 +13,7 @@
<method name="get_shader_param" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<description>
Returns the current value set for this material of a uniform in the shader.
@@ -40,7 +40,7 @@
<method name="set_shader_param">
<return type="void">
</return>
- <argument index="0" name="param" type="String">
+ <argument index="0" name="param" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
new file mode 100644
index 0000000000..350ab40c0e
--- /dev/null
+++ b/doc/classes/Signal.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Signal" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="Signal">
+ <return type="Signal">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="signal_name" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="connect">
+ <return type="int">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <argument index="1" name="binds" type="Array" default="[ ]">
+ </argument>
+ <argument index="2" name="flags" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="disconnect">
+ <return type="void">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="emit" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_connections">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_name">
+ <return type="StringName">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_object">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_object_id">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_connected">
+ <return type="bool">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_null">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml
index 0f07031708..1db78314d2 100644
--- a/doc/classes/SkeletonIK.xml
+++ b/doc/classes/SkeletonIK.xml
@@ -45,13 +45,13 @@
</member>
<member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true">
</member>
- <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone" default="&quot;&quot;">
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@&quot;&quot;">
</member>
<member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
</member>
<member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
</member>
- <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone" default="&quot;&quot;">
+ <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@&quot;&quot;">
</member>
<member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false">
</member>
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index b65d9d8f98..e22feb42f0 100644
--- a/doc/classes/Skin.xml
+++ b/doc/classes/Skin.xml
@@ -37,6 +37,14 @@
<description>
</description>
</method>
+ <method name="get_bind_name" qualifiers="const">
+ <return type="StringName">
+ </return>
+ <argument index="0" name="bind_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_bind_pose" qualifiers="const">
<return type="Transform">
</return>
@@ -63,6 +71,16 @@
<description>
</description>
</method>
+ <method name="set_bind_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="bind_index" type="int">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_bind_pose">
<return type="void">
</return>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 72599a323d..ba9c5ee661 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -12,6 +12,7 @@
</methods>
<members>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0">
+ Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See [enum ProcessMode] for options.
</member>
<member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2">
The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.
@@ -45,8 +46,11 @@
Represents the size of the [enum RadianceSize] enum.
</constant>
<constant name="PROCESS_MODE_QUALITY" value="0" enum="ProcessMode">
+ Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime.
</constant>
<constant name="PROCESS_MODE_REALTIME" value="1" enum="ProcessMode">
+ Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
+ [b]Note:[/b] The fast filtering algorithm is limited to 128x128 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_128].
</constant>
</constants>
</class>
diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml
index f426cfc352..780ed5077d 100644
--- a/doc/classes/SpringArm.xml
+++ b/doc/classes/SpringArm.xml
@@ -18,14 +18,14 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
- Adds the object with the given [RID] to the list of objects excluded from the collision check.
+ Adds the [PhysicsBody] object with the given [RID] to the list of [PhysicsBody] objects excluded from the collision check.
</description>
</method>
<method name="clear_excluded_objects">
<return type="void">
</return>
<description>
- Clears the list of objects excluded from the collision check.
+ Clears the list of [PhysicsBody] objects excluded from the collision check.
</description>
</method>
<method name="get_hit_length">
@@ -41,7 +41,7 @@
<argument index="0" name="RID" type="RID">
</argument>
<description>
- Removes the given [RID] from the list of objects excluded from the collision check.
+ Removes the given [RID] from the list of [PhysicsBody] objects excluded from the collision check.
</description>
</method>
</methods>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index fe4b888a3c..9facdde681 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -12,7 +12,7 @@
<method name="add_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Adds a new animation to the library.
@@ -21,7 +21,7 @@
<method name="add_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="frame" type="Texture2D">
</argument>
@@ -34,7 +34,7 @@
<method name="clear">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Removes all frames from the given animation.
@@ -50,14 +50,14 @@
<method name="get_animation_loop" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
If [code]true[/code], the given animation will loop.
</description>
</method>
<method name="get_animation_names" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns an array containing the names associated to each animation. Values are placed in alphabetical order.
@@ -66,7 +66,7 @@
<method name="get_animation_speed" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
The animation's speed in frames per second.
@@ -75,7 +75,7 @@
<method name="get_frame" qualifiers="const">
<return type="Texture2D">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
@@ -86,7 +86,7 @@
<method name="get_frame_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Returns the number of frames in the animation.
@@ -95,7 +95,7 @@
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
If [code]true[/code], the named animation exists.
@@ -104,7 +104,7 @@
<method name="remove_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<description>
Removes the given animation.
@@ -113,7 +113,7 @@
<method name="remove_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
@@ -124,9 +124,9 @@
<method name="rename_animation">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
- <argument index="1" name="newname" type="String">
+ <argument index="1" name="newname" type="StringName">
</argument>
<description>
Changes the animation's name to [code]newname[/code].
@@ -135,7 +135,7 @@
<method name="set_animation_loop">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="loop" type="bool">
</argument>
@@ -146,7 +146,7 @@
<method name="set_animation_speed">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="speed" type="float">
</argument>
@@ -157,7 +157,7 @@
<method name="set_frame">
<return type="void">
</return>
- <argument index="0" name="anim" type="String">
+ <argument index="0" name="anim" type="StringName">
</argument>
<argument index="1" name="idx" type="int">
</argument>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 31742199dd..a73d3c8212 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -171,7 +171,7 @@
<method name="put_data">
<return type="int" enum="Error">
</return>
- <argument index="0" name="data" type="PoolByteArray">
+ <argument index="0" name="data" type="PackedByteArray">
</argument>
<description>
Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code.
@@ -198,7 +198,7 @@
<method name="put_partial_data">
<return type="Array">
</return>
- <argument index="0" name="data" type="PoolByteArray">
+ <argument index="0" name="data" type="PackedByteArray">
</argument>
<description>
Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent.
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 23e3890fdb..41cef9fb55 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -49,7 +49,7 @@
</method>
</methods>
<members>
- <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array" default="PoolByteArray( )">
+ <member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray( )">
</member>
</members>
<constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index cb80d04f24..a72b8f05d8 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -49,6 +49,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Rect2">
</argument>
<description>
@@ -58,6 +67,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Rect2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Vector3">
</argument>
<description>
@@ -67,6 +85,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector3i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
@@ -130,6 +157,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="StringName">
+ </argument>
+ <description>
+ Constructs a new String from the given [StringName].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="NodePath">
</argument>
<description>
@@ -148,6 +184,24 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Callable">
+ </argument>
+ <description>
+ Constructs a new String from the given [Callable].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Signal">
+ </argument>
+ <description>
+ Constructs a new String from the given [Signal].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Dictionary">
</argument>
<description>
@@ -166,64 +220,82 @@
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolByteArray">
+ <argument index="0" name="from" type="PackedByteArray">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedByteArray].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedInt32Array">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedInt32Array].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedInt64Array">
</argument>
<description>
- Constructs a new String from the given [PoolByteArray].
+ Constructs a new String from the given [PackedInt64Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolIntArray">
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs a new String from the given [PoolIntArray].
+ Constructs a new String from the given [PackedFloat32Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolRealArray">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs a new String from the given [PoolRealArray].
+ Constructs a new String from the given [PackedFloat64Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolStringArray">
+ <argument index="0" name="from" type="PackedStringArray">
</argument>
<description>
- Constructs a new String from the given [PoolStringArray].
+ Constructs a new String from the given [PackedStringArray].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolVector2Array">
+ <argument index="0" name="from" type="PackedVector2Array">
</argument>
<description>
- Constructs a new String from the given [PoolVector2Array].
+ Constructs a new String from the given [PackedVector2Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolVector3Array">
+ <argument index="0" name="from" type="PackedVector3Array">
</argument>
<description>
- Constructs a new String from the given [PoolVector3Array].
+ Constructs a new String from the given [PackedVector3Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PoolColorArray">
+ <argument index="0" name="from" type="PackedColorArray">
</argument>
<description>
- Constructs a new String from the given [PoolColorArray].
+ Constructs a new String from the given [PackedColorArray].
</description>
</method>
<method name="begins_with">
@@ -236,7 +308,7 @@
</description>
</method>
<method name="bigrams">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns the bigrams (pairs of consecutive letters) of this string.
@@ -322,6 +394,8 @@
</description>
</method>
<method name="erase">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="int">
</argument>
<argument index="1" name="chars" type="int">
@@ -366,7 +440,7 @@
</return>
<argument index="0" name="values" type="Variant">
</argument>
- <argument index="1" name="placeholder" type="String" default="{_}">
+ <argument index="1" name="placeholder" type="String" default="&quot;{_}&quot;">
</argument>
<description>
Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code].
@@ -512,7 +586,7 @@
<method name="is_valid_hex_number">
<return type="bool">
</return>
- <argument index="0" name="with_prefix" type="bool" default="False">
+ <argument index="0" name="with_prefix" type="bool" default="false">
</argument>
<description>
Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
@@ -597,7 +671,7 @@
</description>
</method>
<method name="md5_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the MD5 hash of the string as an array of bytes.
@@ -732,11 +806,11 @@
</description>
</method>
<method name="rsplit">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<argument index="2" name="maxsplit" type="int" default="0">
</argument>
@@ -764,7 +838,7 @@
</description>
</method>
<method name="sha1_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the SHA-1 hash of the string as an array of bytes.
@@ -778,7 +852,7 @@
</description>
</method>
<method name="sha256_buffer">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns the SHA-256 hash of the string as an array of bytes.
@@ -801,11 +875,11 @@
</description>
</method>
<method name="split">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<argument index="2" name="maxsplit" type="int" default="0">
</argument>
@@ -823,11 +897,11 @@
</description>
</method>
<method name="split_floats">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
- <argument index="1" name="allow_empty" type="bool" default="True">
+ <argument index="1" name="allow_empty" type="bool" default="true">
</argument>
<description>
Splits the string in floats by using a delimiter string and returns an array of the substrings.
@@ -837,9 +911,9 @@
<method name="strip_edges">
<return type="String">
</return>
- <argument index="0" name="left" type="bool" default="True">
+ <argument index="0" name="left" type="bool" default="true">
</argument>
- <argument index="1" name="right" type="bool" default="True">
+ <argument index="1" name="right" type="bool" default="true">
</argument>
<description>
Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
@@ -864,10 +938,10 @@
</description>
</method>
<method name="to_ascii">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
- Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters.
+ Converts the String (which is a character array) to [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters.
</description>
</method>
<method name="to_float">
@@ -899,10 +973,10 @@
</description>
</method>
<method name="to_utf8">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
- Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii].
+ Converts the String (which is an array of characters) to [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii].
</description>
</method>
<method name="trim_prefix">
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
new file mode 100644
index 0000000000..f323a4bb6a
--- /dev/null
+++ b/doc/classes/StringName.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StringName" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="StringName">
+ <return type="StringName">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 23363fcad5..4304a8df5e 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -22,7 +22,7 @@
<method name="add_bones">
<return type="void">
</return>
- <argument index="0" name="bones" type="PoolIntArray">
+ <argument index="0" name="bones" type="PackedInt32Array">
</argument>
<description>
Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers.
@@ -76,15 +76,15 @@
<method name="add_triangle_fan">
<return type="void">
</return>
- <argument index="0" name="vertices" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PackedVector3Array">
</argument>
- <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
- <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )">
+ <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )">
</argument>
- <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )">
+ <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )">
</argument>
- <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )">
+ <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )">
</argument>
<argument index="5" name="tangents" type="Array" default="[ ]">
</argument>
@@ -123,7 +123,7 @@
<method name="add_weights">
<return type="void">
</return>
- <argument index="0" name="weights" type="PoolRealArray">
+ <argument index="0" name="weights" type="PackedFloat32Array">
</argument>
<description>
Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values.
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 73b5afe6a7..3c4fd4c41a 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -204,10 +204,6 @@
</theme_item>
<theme_item name="increment_highlight" type="Texture2D">
</theme_item>
- <theme_item name="label_valign_bg" type="int" default="2">
- </theme_item>
- <theme_item name="label_valign_fg" type="int" default="0">
- </theme_item>
<theme_item name="menu" type="Texture2D">
</theme_item>
<theme_item name="menu_highlight" type="Texture2D">
@@ -222,7 +218,5 @@
</theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
- <theme_item name="top_margin" type="int" default="24">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 266a733f8f..8f31b24131 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -285,10 +285,6 @@
</theme_item>
<theme_item name="increment_highlight" type="Texture2D">
</theme_item>
- <theme_item name="label_valign_bg" type="int" default="2">
- </theme_item>
- <theme_item name="label_valign_fg" type="int" default="0">
- </theme_item>
<theme_item name="panel" type="StyleBox">
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
@@ -297,7 +293,5 @@
</theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
- <theme_item name="top_margin" type="int" default="24">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index c4a05db3a7..d4eeb574eb 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -299,7 +299,7 @@
</description>
</method>
<method name="search" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="key" type="String">
</argument>
@@ -311,7 +311,7 @@
</argument>
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
- Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
+ Returns an empty [code]PackedInt32Array[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
[codeblock]
var result = search(key, flags, line, column)
if result.size() &gt; 0:
diff --git a/doc/classes/TextFile.xml b/doc/classes/TextFile.xml
new file mode 100644
index 0000000000..1c2c2ff25c
--- /dev/null
+++ b/doc/classes/TextFile.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextFile" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index 2ccb469eb1..63cdb0d90a 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture2D" inherits="Resource" version="4.0">
+<class name="Texture2D" inherits="Texture" version="4.0">
<brief_description>
Texture for 2D and 3D.
</brief_description>
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index f9ecdb02f0..66e5b69ab4 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureLayered" inherits="Resource" version="4.0">
+<class name="TextureLayered" inherits="Texture" version="4.0">
<brief_description>
Base class for 3D texture types.
</brief_description>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index d11cfc7aa2..70a4eda867 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -21,9 +21,9 @@
<method name="clear_color">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Clears the [Color] at [code]name[/code] if the theme has [code]type[/code].
@@ -32,9 +32,9 @@
<method name="clear_constant">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Clears the constant at [code]name[/code] if the theme has [code]type[/code].
@@ -43,9 +43,9 @@
<method name="clear_font">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Clears the [Font] at [code]name[/code] if the theme has [code]type[/code].
@@ -54,9 +54,9 @@
<method name="clear_icon">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Clears the icon at [code]name[/code] if the theme has [code]type[/code].
@@ -65,9 +65,9 @@
<method name="clear_stylebox">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
@@ -92,125 +92,125 @@
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns the [Color] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code].
+ Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns the constant at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code].
+ Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code].
</description>
</method>
<method name="get_font" qualifiers="const">
<return type="Font">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_font_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code].
+ Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon" qualifiers="const">
<return type="Texture2D">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the icons as a [PoolStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code].
+ Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox" qualifiers="const">
<return type="StyleBox">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code].
+ Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code].
</description>
</method>
<method name="get_stylebox_types" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
- Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code].
+ Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code].
</description>
</method>
<method name="get_type_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code].
+ Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code].
</description>
</method>
<method name="has_color" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code].
@@ -220,9 +220,9 @@
<method name="has_constant" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code].
@@ -232,9 +232,9 @@
<method name="has_font" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
@@ -244,9 +244,9 @@
<method name="has_icon" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code].
@@ -256,9 +256,9 @@
<method name="has_stylebox" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code].
@@ -268,9 +268,9 @@
<method name="set_color">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="color" type="Color">
</argument>
@@ -282,9 +282,9 @@
<method name="set_constant">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="constant" type="int">
</argument>
@@ -296,9 +296,9 @@
<method name="set_font">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="font" type="Font">
</argument>
@@ -310,9 +310,9 @@
<method name="set_icon">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="texture" type="Texture2D">
</argument>
@@ -324,9 +324,9 @@
<method name="set_stylebox">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="String">
+ <argument index="1" name="type" type="StringName">
</argument>
<argument index="2" name="texture" type="StyleBox">
</argument>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index f616a9d9b1..3bb5797df5 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -29,7 +29,7 @@
</return>
<argument index="0" name="instance" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="userdata" type="Variant" default="null">
</argument>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index e9d7208f66..72f9c5493a 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -149,21 +149,21 @@
</description>
</method>
<method name="xform">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform.
+ Transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform.
</description>
</method>
<method name="xform_inv">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Inverse-transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by this transform.
+ Inverse-transforms the given [Vector3], [Plane], [AABB], or [PackedVector3Array] by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 9719326f59..164efd4e5e 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -151,21 +151,21 @@
</description>
</method>
<method name="xform">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform.
+ Transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform.
</description>
</method>
<method name="xform_inv">
- <return type="Variant">
+ <return type="void">
</return>
<argument index="0" name="v" type="Variant">
</argument>
<description>
- Inverse-transforms the given [Vector2], [Rect2], or [PoolVector2Array] by this transform.
+ Inverse-transforms the given [Vector2], [Rect2], or [PackedVector2Array] by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index f80e59f6f9..11245195bf 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -14,9 +14,9 @@
<method name="add_message">
<return type="void">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
- <argument index="1" name="xlated_message" type="String">
+ <argument index="1" name="xlated_message" type="StringName">
</argument>
<description>
Adds a message if nonexistent, followed by its translation.
@@ -25,16 +25,16 @@
<method name="erase_message">
<return type="void">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
<description>
Erases a message.
</description>
</method>
<method name="get_message" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="src_message" type="String">
+ <argument index="0" name="src_message" type="StringName">
</argument>
<description>
Returns a message's translation.
@@ -48,7 +48,7 @@
</description>
</method>
<method name="get_message_list" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns all the messages (keys).
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 8a2a8b9768..aaf7a4d160 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -69,9 +69,9 @@
</description>
</method>
<method name="translate" qualifiers="const">
- <return type="String">
+ <return type="StringName">
</return>
- <argument index="0" name="message" type="String">
+ <argument index="0" name="message" type="StringName">
</argument>
<description>
Returns the current locale's translation for the given message (key).
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index e4d2af0c6e..f498919f9e 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -30,7 +30,7 @@
<method name="call_recursive" qualifiers="vararg">
<return type="Variant">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
@@ -452,7 +452,7 @@
</argument>
<argument index="1" name="object" type="Object">
</argument>
- <argument index="2" name="callback" type="String">
+ <argument index="2" name="callback" type="StringName">
</argument>
<description>
Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index e60dc07e99..371b027534 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -21,17 +21,17 @@
</tutorials>
<methods>
<method name="follow_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial_val" type="Variant">
</argument>
<argument index="3" name="target" type="Object">
</argument>
- <argument index="4" name="target_method" type="String">
+ <argument index="4" name="target_method" type="StringName">
</argument>
<argument index="5" name="duration" type="float">
</argument>
@@ -47,7 +47,7 @@
</description>
</method>
<method name="follow_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -80,7 +80,7 @@
</description>
</method>
<method name="interpolate_callback">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -103,7 +103,7 @@
</description>
</method>
<method name="interpolate_deferred_callback">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -126,11 +126,11 @@
</description>
</method>
<method name="interpolate_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial_val" type="Variant">
</argument>
@@ -150,7 +150,7 @@
</description>
</method>
<method name="interpolate_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -182,61 +182,61 @@
</description>
</method>
<method name="remove">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
</description>
</method>
<method name="remove_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Stops animation and removes all tweens.
</description>
</method>
<method name="reset">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
</description>
</method>
<method name="reset_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Resets all tweens to their initial values (the ones given, not those before the tween).
</description>
</method>
<method name="resume">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified.
</description>
</method>
<method name="resume_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Continues animating all stopped tweens.
</description>
</method>
<method name="seek">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="time" type="float">
</argument>
@@ -254,40 +254,40 @@
</description>
</method>
<method name="start">
- <return type="bool">
+ <return type="void">
</return>
<description>
Starts the tween. You can define animations both before and after this.
</description>
</method>
<method name="stop">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="StringName" default="&quot;&quot;">
</argument>
<description>
Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified.
</description>
</method>
<method name="stop_all">
- <return type="bool">
+ <return type="void">
</return>
<description>
Stops animating all tweens.
</description>
</method>
<method name="targeting_method">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="initial" type="Object">
</argument>
- <argument index="3" name="initial_method" type="String">
+ <argument index="3" name="initial_method" type="StringName">
</argument>
<argument index="4" name="final_val" type="Variant">
</argument>
@@ -305,7 +305,7 @@
</description>
</method>
<method name="targeting_property">
- <return type="bool">
+ <return type="void">
</return>
<argument index="0" name="object" type="Object">
</argument>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
new file mode 100644
index 0000000000..f3c865c392
--- /dev/null
+++ b/doc/classes/UDPServer.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="UDPServer" inherits="Reference" version="4.0">
+ <brief_description>
+ Helper class to implement a UDP server.
+ </brief_description>
+ <description>
+ A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host].
+ Below a small example of how it can be used:
+ [codeblock]
+ # server.gd
+ extends Node
+
+ var server := UDPServer.new()
+ var peers = []
+
+ func _ready():
+ server.listen(4242)
+
+ func _process(delta):
+ if server.is_connection_available():
+ var peer : PacketPeerUDP = server.take_connection()
+ var pkt = peer.get_packet()
+ print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()])
+ print("Received data: %s" % [pkt.get_string_from_utf8()])
+ # Reply so it knows we received the message.
+ peer.put_packet(pkt)
+ # Keep a reference so we can keep contacting the remote peer.
+ peers.append(peer)
+
+ for i in range(0, peers.size()):
+ pass # Do something with the connected peers.
+
+ [/codeblock]
+ [codeblock]
+ # client.gd
+ extends Node
+
+ var udp := PacketPeerUDP.new()
+ var connected = false
+
+ func _ready():
+ udp.connect_to_host("127.0.0.1", 4242)
+
+ func _process(delta):
+ if !connected:
+ # Try to contact server
+ udp.put_packet("The answer is... 42!".to_utf8())
+ if udp.get_available_packet_count() &gt; 0:
+ print("Connected: %s" % udp.get_packet().get_string_from_utf8())
+ connected = true
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="is_connection_available" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if a packet with a new address/port combination is received on the socket.
+ </description>
+ </method>
+ <method name="is_listening" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the socket is open and listening on a port.
+ </description>
+ </method>
+ <method name="listen">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
+ </argument>
+ <description>
+ Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen].
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stops the server, closing the UDP socket if open. Will not disconnect any connected [PacketPeerUDP].
+ </description>
+ </method>
+ <method name="take_connection">
+ <return type="PacketPeerUDP">
+ </return>
+ <description>
+ Returns a [PacketPeerUDP] connected to the address/port combination of the first packet in queue. Will return [code]null[/code] if no packet is in queue. See also [method PacketPeerUDP.connect_to_host].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 06fcb1ca03..766ebf7e32 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -36,7 +36,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Register a method that will be called when the action is committed.
@@ -47,7 +47,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -69,7 +69,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<description>
Register a method that will be called when the action is undone.
@@ -80,7 +80,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="property" type="String">
+ <argument index="1" name="property" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 4eef103d1f..7b02a1a4c9 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector2" version="4.0">
<brief_description>
- Vector used for 2D math.
+ Vector used for 2D math using floating point coordinates.
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,12 +14,21 @@
<method name="Vector2">
<return type="Vector2">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new [Vector2] from [Vector2i].
+ </description>
+ </method>
+ <method name="Vector2">
+ <return type="Vector2">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
</argument>
<description>
- Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code].
+ Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
</description>
</method>
<method name="abs">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
new file mode 100644
index 0000000000..a516eb01dd
--- /dev/null
+++ b/doc/classes/Vector2i.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector2i" version="4.0">
+ <brief_description>
+ Vector used for 2D math using integer coordinates.
+ </brief_description>
+ <description>
+ 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
+ </description>
+ </method>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="ZERO" value="Vector2i( 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector2i( 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector2i( -1, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector2i( 1, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector2i( 0, -1 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector2i( 0, 1 )">
+ Down unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 7ae89cc450..600c03ba7d 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector3" version="4.0">
<brief_description>
- Vector used for 3D math.
+ Vector used for 3D math using floating point coordinates.
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,6 +14,15 @@
<method name="Vector3">
<return type="Vector3">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new [Vector3] from [Vector3i].
+ </description>
+ </method>
+ <method name="Vector3">
+ <return type="Vector3">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
@@ -20,7 +30,7 @@
<argument index="2" name="z" type="float">
</argument>
<description>
- Returns a Vector3 with the given components.
+ Returns a [Vector3] with the given components.
</description>
</method>
<method name="abs">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
new file mode 100644
index 0000000000..4f5a658b89
--- /dev/null
+++ b/doc/classes/Vector3i.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector3i" version="4.0">
+ <brief_description>
+ Vector used for 3D math using integer coordinates.
+ </brief_description>
+ <description>
+ 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <description>
+ Returns a [Vector3i] with the given components.
+ </description>
+ </method>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <description>
+ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis.
+ </constant>
+ <constant name="ZERO" value="Vector3i( 0, 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector3i( 1, 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector3i( -1, 0, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector3i( 1, 0, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector3i( 0, 1, 0 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector3i( 0, -1, 0 )">
+ Down unit vector.
+ </constant>
+ <constant name="FORWARD" value="Vector3i( 0, 0, -1 )">
+ Forward unit vector.
+ </constant>
+ <constant name="BACK" value="Vector3i( 0, 0, 1 )">
+ Back unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index d2b9af4580..91c8ad0a77 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -58,7 +58,7 @@
<member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500">
Amount of time in milliseconds to store in buffer while playing.
</member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" default="&quot;Master&quot;">
+ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Audio bus to use for sound playback.
</member>
<member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 076977c364..0632be28e1 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -425,7 +425,7 @@
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="2" enum="DefaultCanvasItemTextureFilter">
</constant>
- <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="DefaultCanvasItemTextureFilter">
+ <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="DefaultCanvasItemTextureFilter">
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX" value="4" enum="DefaultCanvasItemTextureFilter">
</constant>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 1634db2484..ca2058ddbb 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -540,7 +540,7 @@
</return>
<argument index="0" name="occluder_polygon" type="RID">
</argument>
- <argument index="1" name="shape" type="PoolVector2Array">
+ <argument index="1" name="shape" type="PackedVector2Array">
</argument>
<argument index="2" name="closed" type="bool">
</argument>
@@ -553,7 +553,7 @@
</return>
<argument index="0" name="occluder_polygon" type="RID">
</argument>
- <argument index="1" name="shape" type="PoolVector2Array">
+ <argument index="1" name="shape" type="PackedVector2Array">
</argument>
<description>
Sets the shape of the occluder polygon as lines.
@@ -801,6 +801,30 @@
Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis].
</description>
</method>
+ <method name="environment_set_ssao">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="radius" type="float">
+ </argument>
+ <argument index="3" name="intensity" type="float">
+ </argument>
+ <argument index="4" name="bias" type="float">
+ </argument>
+ <argument index="5" name="light_affect" type="float">
+ </argument>
+ <argument index="6" name="ao_channel_affect" type="float">
+ </argument>
+ <argument index="7" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur">
+ </argument>
+ <argument index="8" name="bilateral_sharpness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="environment_set_ssr">
<return type="void">
</return>
@@ -1540,7 +1564,7 @@
</description>
</method>
<method name="lightmap_capture_get_octree" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="capture" type="RID">
</argument>
@@ -1593,7 +1617,7 @@
</return>
<argument index="0" name="capture" type="RID">
</argument>
- <argument index="1" name="octree" type="PoolByteArray">
+ <argument index="1" name="octree" type="PackedByteArray">
</argument>
<description>
Sets the octree to be used by this lightmap capture.
@@ -1647,7 +1671,7 @@
</return>
<argument index="0" name="material" type="RID">
</argument>
- <argument index="1" name="parameter" type="String">
+ <argument index="1" name="parameter" type="StringName">
</argument>
<description>
Returns the value of a certain material's parameter.
@@ -1669,7 +1693,7 @@
</return>
<argument index="0" name="material" type="RID">
</argument>
- <argument index="1" name="parameter" type="String">
+ <argument index="1" name="parameter" type="StringName">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -1878,7 +1902,7 @@
</argument>
<argument index="2" name="offset" type="int">
</argument>
- <argument index="3" name="data" type="PoolByteArray">
+ <argument index="3" name="data" type="PackedByteArray">
</argument>
<description>
Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
@@ -1919,7 +1943,7 @@
</description>
</method>
<method name="multimesh_get_buffer" qualifiers="const">
- <return type="PoolRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
@@ -2054,7 +2078,7 @@
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
- <argument index="1" name="buffer" type="PoolRealArray">
+ <argument index="1" name="buffer" type="PackedFloat32Array">
</argument>
<description>
</description>
@@ -2479,7 +2503,7 @@
</return>
<argument index="0" name="where" type="Object">
</argument>
- <argument index="1" name="method" type="String">
+ <argument index="1" name="method" type="StringName">
</argument>
<argument index="2" name="userdata" type="Variant">
</argument>
@@ -2585,7 +2609,7 @@
</return>
<argument index="0" name="shader" type="RID">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<description>
Returns a default texture from a shader searched by name.
@@ -2596,7 +2620,7 @@
</return>
<argument index="0" name="material" type="RID">
</argument>
- <argument index="1" name="parameter" type="String">
+ <argument index="1" name="parameter" type="StringName">
</argument>
<description>
</description>
@@ -2626,7 +2650,7 @@
</return>
<argument index="0" name="shader" type="RID">
</argument>
- <argument index="1" name="name" type="String">
+ <argument index="1" name="name" type="StringName">
</argument>
<argument index="2" name="texture" type="RID">
</argument>
@@ -3497,15 +3521,6 @@
<constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
Use the ACES tonemapper.
</constant>
- <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
- Lowest quality of screen space ambient occlusion.
- </constant>
- <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
- Medium quality screen space ambient occlusion.
- </constant>
- <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
- Highest quality screen space ambient occlusion.
- </constant>
<constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
Disables the blur set for SSAO. Will make SSAO look noisier.
</constant>
@@ -3518,6 +3533,15 @@
<constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO.
</constant>
+ <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
+ Lowest quality of screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
+ Medium quality screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
+ Highest quality screen space ambient occlusion.
+ </constant>
<constant name="ENV_SSAO_QUALITY_ULTRA" value="3" enum="EnvironmentSSAOQuality">
</constant>
<constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality">
@@ -3617,11 +3641,11 @@
</constant>
<constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="2" enum="CanvasItemTextureFilter">
</constant>
- <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS" value="3" enum="CanvasItemTextureFilter">
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="CanvasItemTextureFilter">
</constant>
<constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="CanvasItemTextureFilter">
</constant>
- <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter">
+ <constant name="CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="CanvasItemTextureFilter">
</constant>
<constant name="CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="CanvasItemTextureFilter">
</constant>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 44e843f8a5..0dd8ec0064 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -107,7 +107,7 @@
</description>
</method>
<method name="get_node_list" qualifiers="const">
- <return type="PoolIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="type" type="int" enum="VisualShader.Type">
</argument>
@@ -183,6 +183,8 @@
<member name="code" type="String" setter="set_code" getter="get_code" override="true" default="&quot;shader_type spatial;void vertex() {// Output:0}void fragment() {// Output:0}void light() {// Output:0}&quot;" />
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
</member>
+ <member name="version" type="String" setter="set_version" getter="get_version" default="&quot;&quot;">
+ </member>
</members>
<constants>
<constant name="TYPE_VERTEX" value="0" enum="Type">
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index d3227f421e..72ce743656 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -61,19 +61,22 @@
<constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
Floating-point scalar. Translated to [code]float[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_VECTOR" value="1" enum="PortType">
+ <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
+ Integer scalar. Translated to [code]int[/code] type in shader code.
+ </constant>
+ <constant name="PORT_TYPE_VECTOR" value="2" enum="PortType">
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType">
+ <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType">
Boolean type. Translated to [code]bool[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType">
+ <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType">
Transform type. Translated to [code]mat4[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType">
+ <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType">
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
</constant>
- <constant name="PORT_TYPE_MAX" value="5" enum="PortType">
+ <constant name="PORT_TYPE_MAX" value="6" enum="PortType">
Represents the size of the [enum PortType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml
index f207cba0a5..9c2331edea 100644
--- a/doc/classes/VisualShaderNodeCompare.xml
+++ b/doc/classes/VisualShaderNodeCompare.xml
@@ -25,13 +25,16 @@
<constant name="CTYPE_SCALAR" value="0" enum="ComparisonType">
A floating-point scalar.
</constant>
- <constant name="CTYPE_VECTOR" value="1" enum="ComparisonType">
+ <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType">
+ An integer scalar.
+ </constant>
+ <constant name="CTYPE_VECTOR" value="2" enum="ComparisonType">
A 3D vector type.
</constant>
- <constant name="CTYPE_BOOLEAN" value="2" enum="ComparisonType">
+ <constant name="CTYPE_BOOLEAN" value="3" enum="ComparisonType">
A boolean type.
</constant>
- <constant name="CTYPE_TRANSFORM" value="3" enum="ComparisonType">
+ <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType">
A transform ([code]mat4[/code]) type.
</constant>
<constant name="FUNC_EQUAL" value="0" enum="Function">
@@ -50,7 +53,7 @@
Comparison for less than ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
- Comparison for less than or equal ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
+ Comparison for less than or equal ([code]a &lt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="COND_ALL" value="0" enum="Condition">
The result will be true if all of component in vector satisfy the comparison condition.
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index 0d1bcc754f..5bd8ec38ed 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -20,8 +20,8 @@
<return type="String">
</return>
<description>
- Override this method to define the category of the associated custom node in the Visual Shader Editor's members dialog.
- Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Custom" category.
+ Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code].
+ Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category.
</description>
</method>
<method name="_get_code" qualifiers="virtual">
@@ -72,7 +72,7 @@
</description>
</method>
<method name="_get_input_port_name" qualifiers="virtual">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="port" type="int">
</argument>
@@ -108,7 +108,7 @@
</description>
</method>
<method name="_get_output_port_name" qualifiers="virtual">
- <return type="String">
+ <return type="StringName">
</return>
<argument index="0" name="port" type="int">
</argument>
@@ -135,14 +135,6 @@
Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.
</description>
</method>
- <method name="_get_subcategory" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- Override this method to define the subcategory of the associated custom node in the Visual Shader Editor's members dialog.
- Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the root of the main category (see [method _get_category]).
- </description>
- </method>
<method name="_is_highend" qualifiers="virtual">
<return type="bool">
</return>
diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index f7b94d9e39..3ba9ff07d3 100644
--- a/doc/classes/VisualShaderNodeScalarConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]float[/code] in the shader language.
</description>
<tutorials>
</tutorials>
@@ -10,6 +12,7 @@
</methods>
<members>
<member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0">
+ A floating-point constant which represents a state of this node.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
new file mode 100644
index 0000000000..bb7486e8cf
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar floating-point function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_SIN" value="0" enum="Function">
+ Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COS" value="1" enum="Function">
+ Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TAN" value="2" enum="Function">
+ Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASIN" value="3" enum="Function">
+ Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ACOS" value="4" enum="Function">
+ Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATAN" value="5" enum="Function">
+ Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SINH" value="6" enum="Function">
+ Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COSH" value="7" enum="Function">
+ Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TANH" value="8" enum="Function">
+ Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG" value="9" enum="Function">
+ Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP" value="10" enum="Function">
+ Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SQRT" value="11" enum="Function">
+ Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ABS" value="12" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SIGN" value="13" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FLOOR" value="14" enum="Function">
+ Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ROUND" value="15" enum="Function">
+ Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CEIL" value="16" enum="Function">
+ Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FRAC" value="17" enum="Function">
+ Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SATURATE" value="18" enum="Function">
+ Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code].
+ </constant>
+ <constant name="FUNC_NEGATE" value="19" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_ACOSH" value="20" enum="Function">
+ Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASINH" value="21" enum="Function">
+ Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATANH" value="22" enum="Function">
+ Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_DEGREES" value="23" enum="Function">
+ Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP2" value="24" enum="Function">
+ Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
+ Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG2" value="26" enum="Function">
+ Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RADIANS" value="27" enum="Function">
+ Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
+ Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]).
+ </constant>
+ <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
+ Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TRUNC" value="30" enum="Function">
+ Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ONEMINUS" value="31" enum="Function">
+ Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml
new file mode 100644
index 0000000000..2c9ebabb89
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatOp.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A floating-point scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_POW" value="5" enum="Operator">
+ Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MAX" value="6" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="7" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_ATAN2" value="8" enum="Operator">
+ Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_STEP" value="9" enum="Operator">
+ Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml
index fab766d3f9..33ece8ac1b 100644
--- a/doc/classes/VisualShaderNodeScalarUniform.xml
+++ b/doc/classes/VisualShaderNodeFloatUniform.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
- A scalar uniform to be used within the visual shader graph.
+ A scalar float uniform to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform float[/code] in the shader language.
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0">
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0">
A hint applied to the uniform, which controls the values it can take when set through the inspector.
</member>
<member name="max" type="float" setter="set_max" getter="get_max" default="1.0">
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index 0a8fdcfd4d..1ebd945d42 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
<description>
+ First two ports are scalar floatin-point numbers to compare, third is tolerance comparsion amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectivly.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 1c8d8d84c4..ed629508d0 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Represents the input shader parameter within the visual shader graph.
</brief_description>
<description>
</description>
@@ -11,16 +12,19 @@
<return type="String">
</return>
<description>
+ Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
<members>
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
+ One of the several input constants in lower-case style like: "vertex"([/code]VERTEX[code]) or "point_size"([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
<signal name="input_type_changed">
<description>
+ Emitted when input is changed via [member input_name].
</description>
</signal>
</signals>
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
new file mode 100644
index 0000000000..1c407b21ca
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer constant to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0">
+ An integer constant which represents a state of this node.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
new file mode 100644
index 0000000000..5c68c0ec71
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_ABS" value="0" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CLAMP" value="1" enum="Function">
+ Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_NEGATE" value="2" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_SIGN" value="3" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
new file mode 100644
index 0000000000..fc9a0a9a0a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ An integer scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers using [code]a % b[/code].
+ </constant>
+ <constant name="OP_MAX" value="5" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="6" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
new file mode 100644
index 0000000000..8c7c288177
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntUniform.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0">
+ <brief_description>
+ A scalar integer uniform to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0">
+ A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ </member>
+ <member name="max" type="int" setter="set_max" getter="get_max" default="100">
+ Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="min" type="int" setter="set_min" getter="get_min" default="0">
+ Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="step" type="int" setter="set_step" getter="get_step" default="1">
+ Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP].
+ </member>
+ </members>
+ <constants>
+ <constant name="HINT_NONE" value="0" enum="Hint">
+ No hint used.
+ </constant>
+ <constant name="HINT_RANGE" value="1" enum="Hint">
+ A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code.
+ </constant>
+ <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
+ A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml
deleted file mode 100644
index b306d198f6..0000000000
--- a/doc/classes/VisualShaderNodeScalarFunc.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13">
- </member>
- </members>
- <constants>
- <constant name="FUNC_SIN" value="0" enum="Function">
- </constant>
- <constant name="FUNC_COS" value="1" enum="Function">
- </constant>
- <constant name="FUNC_TAN" value="2" enum="Function">
- </constant>
- <constant name="FUNC_ASIN" value="3" enum="Function">
- </constant>
- <constant name="FUNC_ACOS" value="4" enum="Function">
- </constant>
- <constant name="FUNC_ATAN" value="5" enum="Function">
- </constant>
- <constant name="FUNC_SINH" value="6" enum="Function">
- </constant>
- <constant name="FUNC_COSH" value="7" enum="Function">
- </constant>
- <constant name="FUNC_TANH" value="8" enum="Function">
- </constant>
- <constant name="FUNC_LOG" value="9" enum="Function">
- </constant>
- <constant name="FUNC_EXP" value="10" enum="Function">
- </constant>
- <constant name="FUNC_SQRT" value="11" enum="Function">
- </constant>
- <constant name="FUNC_ABS" value="12" enum="Function">
- </constant>
- <constant name="FUNC_SIGN" value="13" enum="Function">
- </constant>
- <constant name="FUNC_FLOOR" value="14" enum="Function">
- </constant>
- <constant name="FUNC_ROUND" value="15" enum="Function">
- </constant>
- <constant name="FUNC_CEIL" value="16" enum="Function">
- </constant>
- <constant name="FUNC_FRAC" value="17" enum="Function">
- </constant>
- <constant name="FUNC_SATURATE" value="18" enum="Function">
- </constant>
- <constant name="FUNC_NEGATE" value="19" enum="Function">
- </constant>
- <constant name="FUNC_ACOSH" value="20" enum="Function">
- </constant>
- <constant name="FUNC_ASINH" value="21" enum="Function">
- </constant>
- <constant name="FUNC_ATANH" value="22" enum="Function">
- </constant>
- <constant name="FUNC_DEGREES" value="23" enum="Function">
- </constant>
- <constant name="FUNC_EXP2" value="24" enum="Function">
- </constant>
- <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
- </constant>
- <constant name="FUNC_LOG2" value="26" enum="Function">
- </constant>
- <constant name="FUNC_RADIANS" value="27" enum="Function">
- </constant>
- <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
- </constant>
- <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
- </constant>
- <constant name="FUNC_TRUNC" value="30" enum="Function">
- </constant>
- <constant name="FUNC_ONEMINUS" value="31" enum="Function">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml
deleted file mode 100644
index f13f16cdd2..0000000000
--- a/doc/classes/VisualShaderNodeScalarOp.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0">
- </member>
- </members>
- <constants>
- <constant name="OP_ADD" value="0" enum="Operator">
- </constant>
- <constant name="OP_SUB" value="1" enum="Operator">
- </constant>
- <constant name="OP_MUL" value="2" enum="Operator">
- </constant>
- <constant name="OP_DIV" value="3" enum="Operator">
- </constant>
- <constant name="OP_MOD" value="4" enum="Operator">
- </constant>
- <constant name="OP_POW" value="5" enum="Operator">
- </constant>
- <constant name="OP_MAX" value="6" enum="Operator">
- </constant>
- <constant name="OP_MIN" value="7" enum="Operator">
- </constant>
- <constant name="OP_ATAN2" value="8" enum="Operator">
- </constant>
- <constant name="OP_STEP" value="9" enum="Operator">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/WorldMarginShape.xml
index b40e133d00..54f76a066b 100644
--- a/doc/classes/PlaneShape.xml
+++ b/doc/classes/WorldMarginShape.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneShape" inherits="Shape" version="4.0">
+<class name="WorldMarginShape" inherits="Shape" version="4.0">
<brief_description>
Infinite plane shape for 3D collisions.
</brief_description>
<description>
- An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane.
+ An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane.
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
</methods>
<members>
<member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )">
- The [Plane] used by the [PlaneShape] for collision.
+ The [Plane] used by the [WorldMarginShape] for collision.
</member>
</members>
<constants>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 8140fde62d..2849ea62ab 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -115,7 +115,7 @@
<method name="open_buffer">
<return type="int" enum="Error">
</return>
- <argument index="0" name="buffer" type="PoolByteArray">
+ <argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Opens an XML raw buffer for parsing. This returns an error code.
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index fe6cd091b7..400ce31bf7 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -154,7 +154,6 @@ Error AudioDriverALSA::init() {
Error err = init_device();
if (err == OK) {
- mutex = Mutex::create();
thread = Thread::create(AudioDriverALSA::thread_func, this);
}
@@ -299,16 +298,16 @@ void AudioDriverALSA::set_device(String device) {
void AudioDriverALSA::lock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->lock();
+ mutex.lock();
}
void AudioDriverALSA::unlock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverALSA::finish_device() {
@@ -327,11 +326,6 @@ void AudioDriverALSA::finish() {
memdelete(thread);
thread = NULL;
-
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
}
finish_device();
@@ -339,7 +333,6 @@ void AudioDriverALSA::finish() {
AudioDriverALSA::AudioDriverALSA() :
thread(NULL),
- mutex(NULL),
pcm_handle(NULL),
device_name("Default"),
new_device("Default") {
diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h
index fb793df6cd..a8caf0fbae 100644
--- a/drivers/alsa/audio_driver_alsa.h
+++ b/drivers/alsa/audio_driver_alsa.h
@@ -40,7 +40,7 @@
class AudioDriverALSA : public AudioDriver {
Thread *thread;
- Mutex *mutex;
+ Mutex mutex;
snd_pcm_t *pcm_handle;
diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp
index 6121a44b36..0cecf1de3e 100644
--- a/drivers/alsamidi/midi_driver_alsamidi.cpp
+++ b/drivers/alsamidi/midi_driver_alsamidi.cpp
@@ -148,7 +148,6 @@ Error MIDIDriverALSAMidi::open() {
}
snd_device_name_free_hint(hints);
- mutex = Mutex::create();
exit_thread = false;
thread = Thread::create(MIDIDriverALSAMidi::thread_func, this);
@@ -165,11 +164,6 @@ void MIDIDriverALSAMidi::close() {
thread = NULL;
}
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
-
for (int i = 0; i < connected_inputs.size(); i++) {
snd_rawmidi_t *midi_in = connected_inputs[i];
snd_rawmidi_close(midi_in);
@@ -179,19 +173,17 @@ void MIDIDriverALSAMidi::close() {
void MIDIDriverALSAMidi::lock() const {
- if (mutex)
- mutex->lock();
+ mutex.lock();
}
void MIDIDriverALSAMidi::unlock() const {
- if (mutex)
- mutex->unlock();
+ mutex.unlock();
}
-PoolStringArray MIDIDriverALSAMidi::get_connected_inputs() {
+PackedStringArray MIDIDriverALSAMidi::get_connected_inputs() {
- PoolStringArray list;
+ PackedStringArray list;
lock();
for (int i = 0; i < connected_inputs.size(); i++) {
@@ -210,7 +202,6 @@ PoolStringArray MIDIDriverALSAMidi::get_connected_inputs() {
MIDIDriverALSAMidi::MIDIDriverALSAMidi() {
- mutex = NULL;
thread = NULL;
exit_thread = false;
diff --git a/drivers/alsamidi/midi_driver_alsamidi.h b/drivers/alsamidi/midi_driver_alsamidi.h
index 354fcce147..6797c7c138 100644
--- a/drivers/alsamidi/midi_driver_alsamidi.h
+++ b/drivers/alsamidi/midi_driver_alsamidi.h
@@ -44,7 +44,7 @@
class MIDIDriverALSAMidi : public MIDIDriver {
Thread *thread;
- Mutex *mutex;
+ Mutex mutex;
Vector<snd_rawmidi_t *> connected_inputs;
@@ -59,7 +59,7 @@ public:
virtual Error open();
virtual void close();
- virtual PoolStringArray get_connected_inputs();
+ virtual PackedStringArray get_connected_inputs();
MIDIDriverALSAMidi();
virtual ~MIDIDriverALSAMidi();
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index d8229f7bf2..1e95bcf5d9 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -69,8 +69,6 @@ OSStatus AudioDriverCoreAudio::output_device_address_cb(AudioObjectID inObjectID
#endif
Error AudioDriverCoreAudio::init() {
- mutex = Mutex::create();
-
AudioComponentDescription desc;
zeromem(&desc, sizeof(desc));
desc.componentType = kAudioUnitType_Output;
@@ -280,19 +278,15 @@ AudioDriver::SpeakerMode AudioDriverCoreAudio::get_speaker_mode() const {
};
void AudioDriverCoreAudio::lock() {
- if (mutex)
- mutex->lock();
+ mutex.lock();
};
void AudioDriverCoreAudio::unlock() {
- if (mutex)
- mutex->unlock();
+ mutex.unlock();
};
bool AudioDriverCoreAudio::try_lock() {
- if (mutex)
- return mutex->try_lock() == OK;
- return true;
+ return mutex.try_lock() == OK;
}
void AudioDriverCoreAudio::finish() {
@@ -344,11 +338,6 @@ void AudioDriverCoreAudio::finish() {
audio_unit = NULL;
unlock();
}
-
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
}
Error AudioDriverCoreAudio::capture_init() {
@@ -691,7 +680,6 @@ AudioDriverCoreAudio::AudioDriverCoreAudio() :
audio_unit(NULL),
input_unit(NULL),
active(false),
- mutex(NULL),
device_name("Default"),
capture_device_name("Default"),
mix_rate(0),
diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h
index 05aa759078..fb9473e230 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.h
+++ b/drivers/coreaudio/audio_driver_coreaudio.h
@@ -46,7 +46,7 @@ class AudioDriverCoreAudio : public AudioDriver {
AudioComponentInstance input_unit;
bool active;
- Mutex *mutex;
+ Mutex mutex;
String device_name;
String capture_device_name;
diff --git a/drivers/coremidi/midi_driver_coremidi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp
index 99628c7fe3..d807896e61 100644
--- a/drivers/coremidi/midi_driver_coremidi.cpp
+++ b/drivers/coremidi/midi_driver_coremidi.cpp
@@ -93,9 +93,9 @@ void MIDIDriverCoreMidi::close() {
}
}
-PoolStringArray MIDIDriverCoreMidi::get_connected_inputs() {
+PackedStringArray MIDIDriverCoreMidi::get_connected_inputs() {
- PoolStringArray list;
+ PackedStringArray list;
for (int i = 0; i < connected_sources.size(); i++) {
MIDIEndpointRef source = connected_sources[i];
diff --git a/drivers/coremidi/midi_driver_coremidi.h b/drivers/coremidi/midi_driver_coremidi.h
index f32644e80c..e8b4481c20 100644
--- a/drivers/coremidi/midi_driver_coremidi.h
+++ b/drivers/coremidi/midi_driver_coremidi.h
@@ -52,7 +52,7 @@ public:
virtual Error open();
virtual void close();
- PoolStringArray get_connected_inputs();
+ PackedStringArray get_connected_inputs();
MIDIDriverCoreMidi();
virtual ~MIDIDriverCoreMidi();
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h
index 990a0dc455..fb23370863 100644
--- a/drivers/dummy/rasterizer_dummy.h
+++ b/drivers/dummy/rasterizer_dummy.h
@@ -134,12 +134,12 @@ public:
struct DummySurface {
uint32_t format;
VS::PrimitiveType primitive;
- PoolVector<uint8_t> array;
+ Vector<uint8_t> array;
int vertex_count;
- PoolVector<uint8_t> index_array;
+ Vector<uint8_t> index_array;
int index_count;
AABB aabb;
- Vector<PoolVector<uint8_t> > blend_shapes;
+ Vector<Vector<uint8_t> > blend_shapes;
Vector<AABB> bone_aabbs;
};
@@ -295,7 +295,7 @@ public:
return mesh_owner.make_rid(mesh);
}
- void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) {
+ void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) {
DummyMesh *m = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!m);
@@ -334,7 +334,7 @@ public:
return m->blend_shape_mode;
}
- void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {}
+ void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {}
void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {}
RID mesh_surface_get_material(RID p_mesh, int p_surface) const { return RID(); }
@@ -352,15 +352,15 @@ public:
return m->surfaces[p_surface].index_count;
}
- PoolVector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const {
+ Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const {
DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!m, Vector<uint8_t>());
return m->surfaces[p_surface].array;
}
- PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const {
+ Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const {
DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!m, Vector<uint8_t>());
return m->surfaces[p_surface].index_array;
}
@@ -384,9 +384,9 @@ public:
return m->surfaces[p_surface].aabb;
}
- Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
+ Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, Vector<PoolVector<uint8_t> >());
+ ERR_FAIL_COND_V(!m, Vector<Vector<uint8_t> >());
return m->surfaces[p_surface].blend_shapes;
}
@@ -436,7 +436,7 @@ public:
Color multimesh_instance_get_color(RID p_multimesh, int p_index) const { return Color(); }
Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const { return Color(); }
- void multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array) {}
+ void multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array) {}
void multimesh_set_visible_instances(RID p_multimesh, int p_visible) {}
int multimesh_get_visible_instances(RID p_multimesh) const { return 0; }
@@ -555,9 +555,9 @@ public:
void gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform) {}
Transform gi_probe_get_to_cell_xform(RID p_probe) const { return Transform(); }
- void gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data) {}
- PoolVector<int> gi_probe_get_dynamic_data(RID p_probe) const {
- PoolVector<int> p;
+ void gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data) {}
+ Vector<int> gi_probe_get_dynamic_data(RID p_probe) const {
+ Vector<int> p;
return p;
}
@@ -620,7 +620,7 @@ public:
struct LightmapCapture : public Instantiable {
- PoolVector<LightmapCaptureOctree> octree;
+ Vector<LightmapCaptureOctree> octree;
AABB bounds;
Transform cell_xform;
int cell_subdiv;
@@ -634,15 +634,15 @@ public:
mutable RID_PtrOwner<LightmapCapture> lightmap_capture_data_owner;
void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {}
AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); }
- void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {}
+ void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {}
RID lightmap_capture_create() {
LightmapCapture *capture = memnew(LightmapCapture);
return lightmap_capture_data_owner.make_rid(capture);
}
- PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const {
+ Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
- ERR_FAIL_COND_V(!capture, PoolVector<uint8_t>());
- return PoolVector<uint8_t>();
+ ERR_FAIL_COND_V(!capture, Vector<uint8_t>());
+ return Vector<uint8_t>();
}
void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {}
Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); }
@@ -650,7 +650,7 @@ public:
int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; }
void lightmap_capture_set_energy(RID p_capture, float p_energy) {}
float lightmap_capture_get_energy(RID p_capture) const { return 0.0; }
- const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const {
+ const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND_V(!capture, NULL);
return &capture->octree;
@@ -711,7 +711,7 @@ public:
/* LIGHT SHADOW MAPPING */
RID canvas_light_occluder_create() { return RID(); }
- void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) {}
+ void canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines) {}
VS::InstanceType get_base_type(RID p_rid) const {
if (mesh_owner.owns(p_rid)) {
diff --git a/drivers/dummy/texture_loader_dummy.cpp b/drivers/dummy/texture_loader_dummy.cpp
index bf51d76527..95876f5c7d 100644
--- a/drivers/dummy/texture_loader_dummy.cpp
+++ b/drivers/dummy/texture_loader_dummy.cpp
@@ -35,7 +35,7 @@
#include <string.h>
-RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
unsigned int width = 8;
unsigned int height = 8;
@@ -43,7 +43,7 @@ RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_origi
Image::Format fmt = Image::FORMAT_RGB8;
int rowsize = 3 * width;
- PoolVector<uint8_t> dstbuff;
+ Vector<uint8_t> dstbuff;
dstbuff.resize(rowsize * height);
diff --git a/drivers/dummy/texture_loader_dummy.h b/drivers/dummy/texture_loader_dummy.h
index 86c9a375a3..e5ae945706 100644
--- a/drivers/dummy/texture_loader_dummy.h
+++ b/drivers/dummy/texture_loader_dummy.h
@@ -36,7 +36,7 @@
class ResourceFormatDummyTexture : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 2e35bd0ccf..c433886545 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -1500,7 +1500,7 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste
//use transform buffer workflow
ERR_FAIL_COND(p_skeleton->use_2d);
- PoolVector<float> &transform_buffer = storage->resources.skeleton_transform_cpu_buffer;
+ Vector<float> &transform_buffer = storage->resources.skeleton_transform_cpu_buffer;
if (!s->attribs[VS::ARRAY_BONES].enabled || !s->attribs[VS::ARRAY_WEIGHTS].enabled) {
break; // the whole instance has a skeleton, but this surface is not affected by it.
@@ -1517,10 +1517,10 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste
const size_t bone_weight_stride = s->attribs[VS::ARRAY_WEIGHTS].stride;
{
- PoolVector<float>::Write write = transform_buffer.write();
+ float *write = transform_buffer.ptrw();
float *buffer = write.ptr();
- PoolVector<uint8_t>::Read vertex_array_read = s->data.read();
+ const uint8_t *vertex_array_read = s->data.ptr();
const uint8_t *vertex_data = vertex_array_read.ptr();
for (int i = 0; i < s->array_len; i++) {
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index 245531a935..55b1c7e560 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -750,7 +750,7 @@ void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p
}
texture->data_size = img->get_data().size();
- PoolVector<uint8_t>::Read read = img->get_data().read();
+ const uint8_t *read = img->get_data().ptr();
ERR_FAIL_COND(!read.ptr());
glActiveTexture(GL_TEXTURE0);
@@ -888,12 +888,12 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
bool compressed;
_get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, false);
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, real_format, texture->mipmaps > 1);
data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers
- PoolVector<uint8_t>::Write wb = data.write();
+ uint8_t *wb = data.ptrw();
glActiveTexture(GL_TEXTURE0);
@@ -930,12 +930,12 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
bool compressed;
_get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, texture->resize_to_po2);
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, Image::FORMAT_RGBA8, false);
data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers
- PoolVector<uint8_t>::Write wb = data.write();
+ uint8_t *wb = data.ptrw();
GLuint temp_framebuffer;
glGenFramebuffers(1, &temp_framebuffer);
@@ -1681,11 +1681,11 @@ void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyIn
case ShaderLanguage::TYPE_UVEC3:
case ShaderLanguage::TYPE_IVEC4:
case ShaderLanguage::TYPE_UVEC4: {
- pi.type = Variant::POOL_INT_ARRAY;
+ pi.type = Variant::PACKED_INT32_ARRAY;
} break;
case ShaderLanguage::TYPE_FLOAT: {
- pi.type = Variant::REAL;
+ pi.type = Variant::FLOAT;
if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
pi.hint = PROPERTY_HINT_RANGE;
pi.hint_string = rtos(u.hint_range[0]) + "," + rtos(u.hint_range[1]) + "," + rtos(u.hint_range[2]);
@@ -2081,7 +2081,7 @@ RID RasterizerStorageGLES2::mesh_create() {
return mesh_owner.make_rid(mesh);
}
-static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array, uint32_t &format, int p_vertices) {
+static Vector<uint8_t> _unpack_half_floats(const Vector<uint8_t> &array, uint32_t &format, int p_vertices) {
uint32_t p_format = format;
@@ -2223,11 +2223,11 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array,
dst_stride += dst_size[i];
}
- PoolVector<uint8_t> ret;
+ Vector<uint8_t> ret;
ret.resize(p_vertices * dst_stride);
- PoolVector<uint8_t>::Read r = array.read();
- PoolVector<uint8_t>::Write w = ret.write();
+ const uint8_t *r = array.ptr();
+ uint8_t *w = ret.ptrw();
int src_offset = 0;
int dst_offset = 0;
@@ -2270,7 +2270,7 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array,
return ret;
}
-void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
+void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
@@ -2457,18 +2457,18 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
}
//validate sizes
- PoolVector<uint8_t> array = p_array;
+ Vector<uint8_t> array = p_array;
int array_size = stride * p_vertex_count;
int index_array_size = 0;
if (array.size() != array_size && array.size() + p_vertex_count * 2 == array_size) {
//old format, convert
- array = PoolVector<uint8_t>();
+ array = Vector<uint8_t>();
array.resize(p_array.size() + p_vertex_count * 2);
- PoolVector<uint8_t>::Write w = array.write();
- PoolVector<uint8_t>::Read r = p_array.read();
+ uint8_t *w = array.ptrw();
+ const uint8_t *r = p_array.ptr();
uint16_t *w16 = (uint16_t *)w.ptr();
const uint16_t *r16 = (uint16_t *)r.ptr();
@@ -2492,7 +2492,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
if (!config.support_half_float_vertices && uses_half_float) {
uint32_t new_format = p_format;
- PoolVector<uint8_t> unpacked_array = _unpack_half_floats(array, new_format, p_vertex_count);
+ Vector<uint8_t> unpacked_array = _unpack_half_floats(array, new_format, p_vertex_count);
mesh_add_surface(p_mesh, new_format, p_primitive, unpacked_array, p_vertex_count, p_index_array, p_index_count, p_aabb, p_blend_shapes, p_bone_aabbs);
return; //do not go any further, above function used unpacked stuff will be used instead.
@@ -2549,7 +2549,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
// Okay, now the OpenGL stuff, wheeeeey \o/
{
- PoolVector<uint8_t>::Read vr = array.read();
+ const uint8_t *vr = array.ptr();
glGenBuffers(1, &surface->vertex_id);
glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
@@ -2558,7 +2558,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
glBindBuffer(GL_ARRAY_BUFFER, 0);
if (p_format & VS::ARRAY_FORMAT_INDEX) {
- PoolVector<uint8_t>::Read ir = p_index_array.read();
+ const uint8_t *ir = p_index_array.ptr();
glGenBuffers(1, &surface->index_id);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
@@ -2578,7 +2578,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
Surface::BlendShape mt;
- PoolVector<uint8_t>::Read vr = p_blend_shapes[i].read();
+ const uint8_t *vr = p_blend_shapes[i].ptr();
surface->total_data_size += array_size;
@@ -2628,7 +2628,7 @@ VS::BlendShapeMode RasterizerStorageGLES2::mesh_get_blend_shape_mode(RID p_mesh)
return mesh->blend_shape_mode;
}
-void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {
+void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
@@ -2637,7 +2637,7 @@ void RasterizerStorageGLES2::mesh_surface_update_region(RID p_mesh, int p_surfac
int total_size = p_data.size();
ERR_FAIL_COND(p_offset + total_size > mesh->surfaces[p_surface]->array_byte_size);
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
glBindBuffer(GL_ARRAY_BUFFER, mesh->surfaces[p_surface]->vertex_id);
glBufferSubData(GL_ARRAY_BUFFER, p_offset, total_size, r.ptr());
@@ -2689,11 +2689,11 @@ int RasterizerStorageGLES2::mesh_surface_get_array_index_len(RID p_mesh, int p_s
return mesh->surfaces[p_surface]->index_array_len;
}
-PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p_surface) const {
+Vector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!mesh, PoolVector<uint8_t>());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!mesh, Vector<uint8_t>());
+ ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>());
Surface *surface = mesh->surfaces[p_surface];
#ifndef TOOLS_ENABLED
@@ -2702,10 +2702,10 @@ PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, i
return surface->data;
}
-PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_index_array(RID p_mesh, int p_surface) const {
+Vector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_index_array(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!mesh, PoolVector<uint8_t>());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!mesh, Vector<uint8_t>());
+ ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>());
Surface *surface = mesh->surfaces[p_surface];
@@ -2737,10 +2737,10 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co
return mesh->surfaces[p_surface]->aabb;
}
-Vector<PoolVector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
+Vector<Vector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!mesh, Vector<PoolVector<uint8_t> >());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<PoolVector<uint8_t> >());
+ ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t> >());
+ ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t> >());
#ifndef TOOLS_ENABLED
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
#endif
@@ -3332,7 +3332,7 @@ Color RasterizerStorageGLES2::multimesh_instance_get_custom_data(RID p_multimesh
return Color();
}
-void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array) {
+void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array) {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_COND(!multimesh->data.ptr());
@@ -3341,7 +3341,7 @@ void RasterizerStorageGLES2::multimesh_set_as_bulk_array(RID p_multimesh, const
ERR_FAIL_COND(dsize != p_array.size());
- PoolVector<float>::Read r = p_array.read();
+ const float *r = p_array.ptr();
ERR_FAIL_COND(!r.ptr());
copymem(multimesh->data.ptrw(), r.ptr(), dsize * sizeof(float));
@@ -3767,7 +3767,7 @@ void RasterizerStorageGLES2::skeleton_set_base_transform_2d(RID p_skeleton, cons
skeleton->base_transform_2d = p_base_transform;
}
-void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size) {
+void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const Vector<float> &p_data, size_t p_size) {
glBindBuffer(GL_ARRAY_BUFFER, resources.skeleton_transform_buffer);
@@ -3776,9 +3776,9 @@ void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector<
resources.skeleton_transform_buffer_size = p_size;
- glBufferData(GL_ARRAY_BUFFER, p_size * sizeof(float), p_data.read().ptr(), GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, p_size * sizeof(float), p_data.ptr(), GL_DYNAMIC_DRAW);
} else {
- glBufferSubData(GL_ARRAY_BUFFER, 0, p_size * sizeof(float), p_data.read().ptr());
+ glBufferSubData(GL_ARRAY_BUFFER, 0, p_size * sizeof(float), p_data.ptr());
}
glBindBuffer(GL_ARRAY_BUFFER, 0);
@@ -4298,11 +4298,11 @@ Transform RasterizerStorageGLES2::gi_probe_get_to_cell_xform(RID p_probe) const
return Transform();
}
-void RasterizerStorageGLES2::gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data) {
+void RasterizerStorageGLES2::gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data) {
}
-PoolVector<int> RasterizerStorageGLES2::gi_probe_get_dynamic_data(RID p_probe) const {
- return PoolVector<int>();
+Vector<int> RasterizerStorageGLES2::gi_probe_get_dynamic_data(RID p_probe) const {
+ return Vector<int>();
}
void RasterizerStorageGLES2::gi_probe_set_dynamic_range(RID p_probe, int p_range) {
@@ -4389,7 +4389,7 @@ AABB RasterizerStorageGLES2::lightmap_capture_get_bounds(RID p_capture) const {
ERR_FAIL_COND_V(!capture, AABB());
return capture->bounds;
}
-void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {
+void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {
LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND(!capture);
@@ -4398,25 +4398,25 @@ void RasterizerStorageGLES2::lightmap_capture_set_octree(RID p_capture, const Po
capture->octree.resize(p_octree.size() / sizeof(LightmapCaptureOctree));
if (p_octree.size()) {
- PoolVector<LightmapCaptureOctree>::Write w = capture->octree.write();
- PoolVector<uint8_t>::Read r = p_octree.read();
+ LightmapCaptureOctree *w = capture->octree.ptrw();
+ const uint8_t *r = p_octree.ptr();
copymem(w.ptr(), r.ptr(), p_octree.size());
}
capture->instance_change_notify(true, false);
}
-PoolVector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const {
+Vector<uint8_t> RasterizerStorageGLES2::lightmap_capture_get_octree(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
- ERR_FAIL_COND_V(!capture, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!capture, Vector<uint8_t>());
if (capture->octree.size() == 0)
- return PoolVector<uint8_t>();
+ return Vector<uint8_t>();
- PoolVector<uint8_t> ret;
+ Vector<uint8_t> ret;
ret.resize(capture->octree.size() * sizeof(LightmapCaptureOctree));
{
- PoolVector<LightmapCaptureOctree>::Read r = capture->octree.read();
- PoolVector<uint8_t>::Write w = ret.write();
+ const LightmapCaptureOctree *r = capture->octree.ptr();
+ uint8_t *w = ret.ptrw();
copymem(w.ptr(), r.ptr(), ret.size());
}
@@ -4461,7 +4461,7 @@ float RasterizerStorageGLES2::lightmap_capture_get_energy(RID p_capture) const {
return capture->energy;
}
-const PoolVector<RasterizerStorage::LightmapCaptureOctree> *RasterizerStorageGLES2::lightmap_capture_get_octree_ptr(RID p_capture) const {
+const Vector<RasterizerStorage::LightmapCaptureOctree> *RasterizerStorageGLES2::lightmap_capture_get_octree_ptr(RID p_capture) const {
const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
ERR_FAIL_COND_V(!capture, NULL);
return &capture->octree;
@@ -5449,7 +5449,7 @@ RID RasterizerStorageGLES2::canvas_light_occluder_create() {
return canvas_occluder_owner.make_rid(co);
}
-void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) {
+void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines) {
CanvasOccluder *co = canvas_occluder_owner.getornull(p_occluder);
ERR_FAIL_COND(!co);
@@ -5470,17 +5470,17 @@ void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder,
if (p_lines.size()) {
- PoolVector<float> geometry;
- PoolVector<uint16_t> indices;
+ Vector<float> geometry;
+ Vector<uint16_t> indices;
int lc = p_lines.size();
geometry.resize(lc * 6);
indices.resize(lc * 3);
- PoolVector<float>::Write vw = geometry.write();
- PoolVector<uint16_t>::Write iw = indices.write();
+ float *vw = geometry.ptrw();
+ uint16_t *iw = indices.ptrw();
- PoolVector<Vector2>::Read lr = p_lines.read();
+ const Vector2 *lr = p_lines.ptr();
const int POLY_HEIGHT = 16384;
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
index a6aae400ca..6fbfe57778 100644
--- a/drivers/gles2/rasterizer_storage_gles2.h
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -31,7 +31,6 @@
#ifndef RASTERIZERSTORAGEGLES2_H
#define RASTERIZERSTORAGEGLES2_H
-#include "core/pool_vector.h"
#include "core/self_list.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual/shader_language.h"
@@ -125,7 +124,7 @@ public:
size_t skeleton_transform_buffer_size;
GLuint skeleton_transform_buffer;
- PoolVector<float> skeleton_transform_cpu_buffer;
+ Vector<float> skeleton_transform_cpu_buffer;
} resources;
@@ -649,9 +648,9 @@ public:
bool active;
- PoolVector<uint8_t> data;
- PoolVector<uint8_t> index_data;
- Vector<PoolVector<uint8_t> > blend_shape_data;
+ Vector<uint8_t> data;
+ Vector<uint8_t> index_data;
+ Vector<Vector<uint8_t> > blend_shape_data;
int total_data_size;
@@ -703,7 +702,7 @@ public:
virtual RID mesh_create();
- virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
+ virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount);
virtual int mesh_get_blend_shape_count(RID p_mesh) const;
@@ -711,7 +710,7 @@ public:
virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode);
virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const;
- virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data);
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data);
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material);
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
@@ -719,14 +718,14 @@ public:
virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const;
virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const;
- virtual PoolVector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const;
- virtual PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const;
+ virtual Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const;
+ virtual Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const;
virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const;
virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const;
- virtual Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
+ virtual Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const;
virtual void mesh_remove_surface(RID p_mesh, int p_surface);
@@ -803,7 +802,7 @@ public:
virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const;
virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const;
- virtual void multimesh_set_as_bulk_array(RID p_multimesh, const PoolVector<float> &p_array);
+ virtual void multimesh_set_as_bulk_array(RID p_multimesh, const Vector<float> &p_array);
virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible);
virtual int multimesh_get_visible_instances(RID p_multimesh) const;
@@ -902,7 +901,7 @@ public:
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform);
- void _update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size);
+ void _update_skeleton_transform_buffer(const Vector<float> &p_data, size_t p_size);
/* Light API */
@@ -1030,8 +1029,8 @@ public:
virtual void gi_probe_set_to_cell_xform(RID p_probe, const Transform &p_xform);
virtual Transform gi_probe_get_to_cell_xform(RID p_probe) const;
- virtual void gi_probe_set_dynamic_data(RID p_probe, const PoolVector<int> &p_data);
- virtual PoolVector<int> gi_probe_get_dynamic_data(RID p_probe) const;
+ virtual void gi_probe_set_dynamic_data(RID p_probe, const Vector<int> &p_data);
+ virtual Vector<int> gi_probe_get_dynamic_data(RID p_probe) const;
virtual void gi_probe_set_dynamic_range(RID p_probe, int p_range);
virtual int gi_probe_get_dynamic_range(RID p_probe) const;
@@ -1064,7 +1063,7 @@ public:
struct LightmapCapture : public Instantiable {
- PoolVector<LightmapCaptureOctree> octree;
+ Vector<LightmapCaptureOctree> octree;
AABB bounds;
Transform cell_xform;
int cell_subdiv;
@@ -1080,15 +1079,15 @@ public:
virtual RID lightmap_capture_create();
virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds);
virtual AABB lightmap_capture_get_bounds(RID p_capture) const;
- virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree);
- virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const;
+ virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree);
+ virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const;
virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform);
virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const;
virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv);
virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const;
virtual void lightmap_capture_set_energy(RID p_capture, float p_energy);
virtual float lightmap_capture_get_energy(RID p_capture) const;
- virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const;
+ virtual const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const;
/* PARTICLES */
void update_particles();
@@ -1271,14 +1270,14 @@ public:
GLuint vertex_id; // 0 means, unconfigured
GLuint index_id; // 0 means, unconfigured
- PoolVector<Vector2> lines;
+ Vector<Vector2> lines;
int len;
};
RID_PtrOwner<CanvasOccluder> canvas_occluder_owner;
virtual RID canvas_light_occluder_create();
- virtual void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines);
+ virtual void canvas_light_occluder_set_polylines(RID p_occluder, const Vector<Vector2> &p_lines);
virtual VS::InstanceType get_base_type(RID p_rid) const;
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp
index eb7d196e1d..4cb93a821c 100644
--- a/drivers/png/image_loader_png.cpp
+++ b/drivers/png/image_loader_png.cpp
@@ -39,19 +39,19 @@
Error ImageLoaderPNG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
const size_t buffer_size = f->get_len();
- PoolVector<uint8_t> file_buffer;
+ Vector<uint8_t> file_buffer;
Error err = file_buffer.resize(buffer_size);
if (err) {
f->close();
return err;
}
{
- PoolVector<uint8_t>::Write writer = file_buffer.write();
- f->get_buffer(writer.ptr(), buffer_size);
+ uint8_t *writer = file_buffer.ptrw();
+ f->get_buffer(writer, buffer_size);
f->close();
}
- PoolVector<uint8_t>::Read reader = file_buffer.read();
- return PNGDriverCommon::png_to_image(reader.ptr(), buffer_size, p_image);
+ const uint8_t *reader = file_buffer.ptr();
+ return PNGDriverCommon::png_to_image(reader, buffer_size, p_image);
}
void ImageLoaderPNG::get_recognized_extensions(List<String> *p_extensions) const {
@@ -70,34 +70,34 @@ Ref<Image> ImageLoaderPNG::load_mem_png(const uint8_t *p_png, int p_size) {
return img;
}
-Ref<Image> ImageLoaderPNG::lossless_unpack_png(const PoolVector<uint8_t> &p_data) {
+Ref<Image> ImageLoaderPNG::lossless_unpack_png(const Vector<uint8_t> &p_data) {
const int len = p_data.size();
ERR_FAIL_COND_V(len < 4, Ref<Image>());
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
ERR_FAIL_COND_V(r[0] != 'P' || r[1] != 'N' || r[2] != 'G' || r[3] != ' ', Ref<Image>());
return load_mem_png(&r[4], len - 4);
}
-PoolVector<uint8_t> ImageLoaderPNG::lossless_pack_png(const Ref<Image> &p_image) {
+Vector<uint8_t> ImageLoaderPNG::lossless_pack_png(const Ref<Image> &p_image) {
- PoolVector<uint8_t> out_buffer;
+ Vector<uint8_t> out_buffer;
// add Godot's own "PNG " prefix
if (out_buffer.resize(4) != OK) {
- ERR_FAIL_V(PoolVector<uint8_t>());
+ ERR_FAIL_V(Vector<uint8_t>());
}
// scope for writer lifetime
{
// must be closed before call to image_to_png
- PoolVector<uint8_t>::Write writer = out_buffer.write();
- copymem(writer.ptr(), "PNG ", 4);
+ uint8_t *writer = out_buffer.ptrw();
+ copymem(writer, "PNG ", 4);
}
Error err = PNGDriverCommon::image_to_png(p_image, out_buffer);
if (err) {
- ERR_FAIL_V(PoolVector<uint8_t>());
+ ERR_FAIL_V(Vector<uint8_t>());
}
return out_buffer;
diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h
index 57f8aa314d..0154be0398 100644
--- a/drivers/png/image_loader_png.h
+++ b/drivers/png/image_loader_png.h
@@ -35,8 +35,8 @@
class ImageLoaderPNG : public ImageFormatLoader {
private:
- static PoolVector<uint8_t> lossless_pack_png(const Ref<Image> &p_image);
- static Ref<Image> lossless_unpack_png(const PoolVector<uint8_t> &p_data);
+ static Vector<uint8_t> lossless_pack_png(const Ref<Image> &p_image);
+ static Ref<Image> lossless_unpack_png(const Vector<uint8_t> &p_data);
static Ref<Image> load_mem_png(const uint8_t *p_png, int p_size);
public:
diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp
index 750d00eb59..efd488fd5c 100644
--- a/drivers/png/png_driver_common.cpp
+++ b/drivers/png/png_driver_common.cpp
@@ -101,16 +101,16 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image) {
}
const png_uint_32 stride = PNG_IMAGE_ROW_STRIDE(png_img);
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
Error err = buffer.resize(PNG_IMAGE_BUFFER_SIZE(png_img, stride));
if (err) {
png_image_free(&png_img); // only required when we return before finish_read
return err;
}
- PoolVector<uint8_t>::Write writer = buffer.write();
+ uint8_t *writer = buffer.ptrw();
// read image data to buffer and release libpng resources
- success = png_image_finish_read(&png_img, NULL, writer.ptr(), stride, NULL);
+ success = png_image_finish_read(&png_img, NULL, writer, stride, NULL);
ERR_FAIL_COND_V_MSG(check_error(png_img), ERR_FILE_CORRUPT, png_img.message);
ERR_FAIL_COND_V(!success, ERR_FILE_CORRUPT);
@@ -120,7 +120,7 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image) {
return OK;
}
-Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) {
+Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer) {
Ref<Image> source_image = p_image->duplicate();
@@ -158,8 +158,8 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) {
}
}
- const PoolVector<uint8_t> image_data = source_image->get_data();
- const PoolVector<uint8_t>::Read reader = image_data.read();
+ const Vector<uint8_t> image_data = source_image->get_data();
+ const uint8_t *reader = image_data.ptr();
// we may be passed a buffer with existing content we're expected to append to
const int buffer_offset = p_buffer.size();
@@ -173,9 +173,9 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) {
Error err = p_buffer.resize(buffer_offset + png_size_estimate);
ERR_FAIL_COND_V(err, err);
- PoolVector<uint8_t>::Write writer = p_buffer.write();
+ uint8_t *writer = p_buffer.ptrw();
success = png_image_write_to_memory(&png_img, &writer[buffer_offset],
- &compressed_size, 0, reader.ptr(), 0, NULL);
+ &compressed_size, 0, reader, 0, NULL);
ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message);
}
if (!success) {
@@ -187,9 +187,9 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer) {
Error err = p_buffer.resize(buffer_offset + compressed_size);
ERR_FAIL_COND_V(err, err);
- PoolVector<uint8_t>::Write writer = p_buffer.write();
+ uint8_t *writer = p_buffer.ptrw();
success = png_image_write_to_memory(&png_img, &writer[buffer_offset],
- &compressed_size, 0, reader.ptr(), 0, NULL);
+ &compressed_size, 0, reader, 0, NULL);
ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message);
ERR_FAIL_COND_V(!success, FAILED);
}
diff --git a/drivers/png/png_driver_common.h b/drivers/png/png_driver_common.h
index ee1d32ce68..12129f034e 100644
--- a/drivers/png/png_driver_common.h
+++ b/drivers/png/png_driver_common.h
@@ -32,7 +32,6 @@
#define PNG_DRIVER_COMMON_H
#include "core/image.h"
-#include "core/pool_vector.h"
namespace PNGDriverCommon {
@@ -41,7 +40,7 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image);
// Append p_image, as a png, to p_buffer.
// Contents of p_buffer is unspecified if error returned.
-Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer);
+Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer);
} // namespace PNGDriverCommon
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 566bfbcc1d..2380c2685f 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -51,15 +51,15 @@ Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32
Error ResourceSaverPNG::save_image(const String &p_path, const Ref<Image> &p_img) {
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
Error err = PNGDriverCommon::image_to_png(p_img, buffer);
ERR_FAIL_COND_V_MSG(err, err, "Can't convert image to PNG.");
FileAccess *file = FileAccess::open(p_path, FileAccess::WRITE, &err);
ERR_FAIL_COND_V_MSG(err, err, vformat("Can't save PNG at path: '%s'.", p_path));
- PoolVector<uint8_t>::Read reader = buffer.read();
+ const uint8_t *reader = buffer.ptr();
- file->store_buffer(reader.ptr(), buffer.size());
+ file->store_buffer(reader, buffer.size());
if (file->get_error() != OK && file->get_error() != ERR_FILE_EOF) {
memdelete(file);
return ERR_CANT_CREATE;
@@ -71,11 +71,11 @@ Error ResourceSaverPNG::save_image(const String &p_path, const Ref<Image> &p_img
return OK;
}
-PoolVector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img) {
+Vector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img) {
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
Error err = PNGDriverCommon::image_to_png(p_img, buffer);
- ERR_FAIL_COND_V_MSG(err, PoolVector<uint8_t>(), "Can't convert image to PNG.");
+ ERR_FAIL_COND_V_MSG(err, Vector<uint8_t>(), "Can't convert image to PNG.");
return buffer;
}
diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h
index 2cac20991a..c32b383521 100644
--- a/drivers/png/resource_saver_png.h
+++ b/drivers/png/resource_saver_png.h
@@ -37,7 +37,7 @@
class ResourceSaverPNG : public ResourceFormatSaver {
public:
static Error save_image(const String &p_path, const Ref<Image> &p_img);
- static PoolVector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img);
+ static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img);
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual bool recognize(const RES &p_resource) const;
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index df9303fbec..ee9278fb8f 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -291,7 +291,6 @@ Error AudioDriverPulseAudio::init() {
Error err = init_device();
if (err == OK) {
- mutex = Mutex::create();
thread = Thread::create(AudioDriverPulseAudio::thread_func, this);
}
@@ -597,16 +596,16 @@ void AudioDriverPulseAudio::set_device(String device) {
void AudioDriverPulseAudio::lock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->lock();
+ mutex.lock();
}
void AudioDriverPulseAudio::unlock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverPulseAudio::finish_device() {
@@ -640,10 +639,6 @@ void AudioDriverPulseAudio::finish() {
}
memdelete(thread);
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
thread = NULL;
}
@@ -800,7 +795,6 @@ String AudioDriverPulseAudio::capture_get_device() {
AudioDriverPulseAudio::AudioDriverPulseAudio() :
thread(NULL),
- mutex(NULL),
pa_ml(NULL),
pa_ctx(NULL),
pa_str(NULL),
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h
index 15948fa763..1ece332a8a 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.h
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.h
@@ -42,7 +42,7 @@
class AudioDriverPulseAudio : public AudioDriver {
Thread *thread;
- Mutex *mutex;
+ Mutex mutex;
pa_mainloop *pa_ml;
pa_context *pa_ctx;
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index 02cb4fa956..715bc56003 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -269,6 +269,11 @@ String DirAccessUnix::get_drive(int p_drive) {
return list[p_drive];
}
+bool DirAccessUnix::drives_are_shortcuts() {
+
+ return true;
+}
+
Error DirAccessUnix::make_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
@@ -337,7 +342,7 @@ Error DirAccessUnix::change_dir(String p_dir) {
return OK;
}
-String DirAccessUnix::get_current_dir() {
+String DirAccessUnix::get_current_dir(bool p_include_drive) {
String base = _get_root_path();
if (base != "") {
diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h
index 32ddc76638..b403d8e356 100644
--- a/drivers/unix/dir_access_unix.h
+++ b/drivers/unix/dir_access_unix.h
@@ -63,9 +63,10 @@ public:
virtual int get_drive_count();
virtual String get_drive(int p_drive);
+ virtual bool drives_are_shortcuts();
virtual Error change_dir(String p_dir); ///< can be relative or absolute, return false on success
- virtual String get_current_dir(); ///< return current dir location
+ virtual String get_current_dir(bool p_include_drive = true); ///< return current dir location
virtual Error make_dir(String p_dir);
virtual bool file_exists(String p_file);
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index cab5513e0a..4adeeb1d9b 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -544,14 +544,14 @@ Error NetSocketPosix::recv(uint8_t *p_buffer, int p_len, int &r_read) {
return OK;
}
-Error NetSocketPosix::recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) {
+Error NetSocketPosix::recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek) {
ERR_FAIL_COND_V(!is_open(), ERR_UNCONFIGURED);
struct sockaddr_storage from;
socklen_t len = sizeof(struct sockaddr_storage);
memset(&from, 0, len);
- r_read = ::recvfrom(_sock, SOCK_BUF(p_buffer), p_len, 0, (struct sockaddr *)&from, &len);
+ r_read = ::recvfrom(_sock, SOCK_BUF(p_buffer), p_len, p_peek ? MSG_PEEK : 0, (struct sockaddr *)&from, &len);
if (r_read < 0) {
NetError err = _get_socket_error();
@@ -673,22 +673,27 @@ void NetSocketPosix::set_tcp_no_delay_enabled(bool p_enabled) {
void NetSocketPosix::set_reuse_address_enabled(bool p_enabled) {
ERR_FAIL_COND(!is_open());
+// On Windows, enabling SO_REUSEADDR actually would also enable reuse port, very bad on TCP. Denying...
+// Windows does not have this option, SO_REUSEADDR in this magical world means SO_REUSEPORT
+#ifndef WINDOWS_ENABLED
int par = p_enabled ? 1 : 0;
if (setsockopt(_sock, SOL_SOCKET, SO_REUSEADDR, SOCK_CBUF(&par), sizeof(int)) < 0) {
WARN_PRINT("Unable to set socket REUSEADDR option!");
}
+#endif
}
void NetSocketPosix::set_reuse_port_enabled(bool p_enabled) {
-// Windows does not have this option, as it is always ON when setting REUSEADDR.
-#ifndef WINDOWS_ENABLED
ERR_FAIL_COND(!is_open());
+// See comment above...
+#ifdef WINDOWS_ENABLED
+#define SO_REUSEPORT SO_REUSEADDR
+#endif
int par = p_enabled ? 1 : 0;
if (setsockopt(_sock, SOL_SOCKET, SO_REUSEPORT, SOCK_CBUF(&par), sizeof(int)) < 0) {
WARN_PRINT("Unable to set socket REUSEPORT option!");
}
-#endif
}
bool NetSocketPosix::is_open() const {
diff --git a/drivers/unix/net_socket_posix.h b/drivers/unix/net_socket_posix.h
index 25ac6e2e56..0a19967265 100644
--- a/drivers/unix/net_socket_posix.h
+++ b/drivers/unix/net_socket_posix.h
@@ -81,7 +81,7 @@ public:
virtual Error connect_to_host(IP_Address p_host, uint16_t p_port);
virtual Error poll(PollType p_type, int timeout) const;
virtual Error recv(uint8_t *p_buffer, int p_len, int &r_read);
- virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port);
+ virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port, bool p_peek = false);
virtual Error send(const uint8_t *p_buffer, int p_len, int &r_sent);
virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port);
virtual Ref<NetSocket> accept(IP_Address &r_ip, uint16_t &r_port);
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 2d8d37b2f1..d21b095037 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -36,10 +36,8 @@
#include "core/project_settings.h"
#include "drivers/unix/dir_access_unix.h"
#include "drivers/unix/file_access_unix.h"
-#include "drivers/unix/mutex_posix.h"
#include "drivers/unix/net_socket_posix.h"
#include "drivers/unix/rw_lock_posix.h"
-#include "drivers/unix/semaphore_posix.h"
#include "drivers/unix/thread_posix.h"
#include "servers/visual_server.h"
@@ -122,15 +120,9 @@ void OS_Unix::initialize_core() {
#ifdef NO_THREADS
ThreadDummy::make_default();
- SemaphoreDummy::make_default();
- MutexDummy::make_default();
RWLockDummy::make_default();
#else
ThreadPosix::make_default();
-#if !defined(OSX_ENABLED) && !defined(IPHONE_ENABLED)
- SemaphorePosix::make_default();
-#endif
- MutexPosix::make_default();
RWLockPosix::make_default();
#endif
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_RESOURCES);
@@ -310,7 +302,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
if (p_pipe_mutex) {
p_pipe_mutex->lock();
}
- (*r_pipe) += buf;
+ (*r_pipe) += String::utf8(buf);
if (p_pipe_mutex) {
p_pipe_mutex->unlock();
}
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub
index 2576f68f92..85a5ae8d26 100644
--- a/drivers/vulkan/SCsub
+++ b/drivers/vulkan/SCsub
@@ -49,6 +49,14 @@ if env['builtin_vulkan']:
'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share',
'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg'
])
+ elif env['platform'] == "iphone":
+ env_thirdparty.AppendUnique(CPPDEFINES=[
+ 'VK_USE_PLATFORM_IOS_MVK',
+ 'VULKAN_NON_CMAKE_BUILD',
+ 'SYSCONFDIR=\\"%s\\"' % '/etc',
+ 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share',
+ 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg'
+ ])
elif env['platform'] == "x11":
env_thirdparty.AppendUnique(CPPDEFINES=[
'VK_USE_PLATFORM_XLIB_KHR',
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 1eb6f204f2..3b0d1f6ac3 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -1557,7 +1557,7 @@ void RenderingDeviceVulkan::_buffer_memory_barrier(VkBuffer buffer, uint64_t p_f
/**** TEXTURE ****/
/*****************/
-RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data) {
+RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data) {
_THREAD_SAFE_METHOD_
@@ -2077,7 +2077,7 @@ RID RenderingDeviceVulkan::texture_create_shared_from_slice(const TextureView &p
return id;
}
-Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw) {
_THREAD_SAFE_METHOD_
@@ -2121,7 +2121,7 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
uint32_t region_size = texture_upload_region_size_px;
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
@@ -2153,7 +2153,7 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
uint32_t depth;
uint32_t image_total = get_image_format_required_size(texture->format, texture->width, texture->height, texture->depth, mm_i + 1, &width, &height, &depth);
- const uint8_t *read_ptr_mipmap = r.ptr() + mipmap_offset;
+ const uint8_t *read_ptr_mipmap = r + mipmap_offset;
image_size = image_total - mipmap_offset;
for (uint32_t z = 0; z < depth; z++) { //for 3D textures, depth may be > 0
@@ -2288,12 +2288,12 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
return OK;
}
-PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d) {
+Vector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d) {
uint32_t width, height, depth;
uint32_t image_size = get_image_format_required_size(tex->format, tex->width, tex->height, p_2d ? 1 : tex->depth, tex->mipmaps, &width, &height, &depth);
- PoolVector<uint8_t> image_data;
+ Vector<uint8_t> image_data;
image_data.resize(image_size);
void *img_mem;
@@ -2305,14 +2305,14 @@ PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture
uint32_t pixel_size = get_image_format_pixel_size(tex->format);
{
- PoolVector<uint8_t>::Write w = image_data.write();
+ uint8_t *w = image_data.ptrw();
uint32_t mipmap_offset = 0;
for (uint32_t mm_i = 0; mm_i < tex->mipmaps; mm_i++) {
uint32_t image_total = get_image_format_required_size(tex->format, tex->width, tex->height, p_2d ? 1 : tex->depth, mm_i + 1, &width, &height, &depth);
- uint8_t *write_ptr_mipmap = w.ptr() + mipmap_offset;
+ uint8_t *write_ptr_mipmap = w + mipmap_offset;
image_size = image_total - mipmap_offset;
VkImageSubresource image_sub_resorce;
@@ -2355,23 +2355,23 @@ PoolVector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture
return image_data;
}
-PoolVector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t p_layer) {
+Vector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t p_layer) {
_THREAD_SAFE_METHOD_
Texture *tex = texture_owner.getornull(p_texture);
- ERR_FAIL_COND_V(!tex, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!tex, Vector<uint8_t>());
- ERR_FAIL_COND_V_MSG(tex->bound, PoolVector<uint8_t>(),
+ ERR_FAIL_COND_V_MSG(tex->bound, Vector<uint8_t>(),
"Texture can't be retrieved while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
- ERR_FAIL_COND_V_MSG(!(tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), PoolVector<uint8_t>(),
+ ERR_FAIL_COND_V_MSG(!(tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), Vector<uint8_t>(),
"Texture requires the TEXTURE_USAGE_CAN_COPY_FROM_BIT in order to be retrieved.");
uint32_t layer_count = tex->layers;
if (tex->type == TEXTURE_TYPE_CUBE || tex->type == TEXTURE_TYPE_CUBE_ARRAY) {
layer_count *= 6;
}
- ERR_FAIL_COND_V(p_layer >= layer_count, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(p_layer >= layer_count, Vector<uint8_t>());
if (tex->usage_flags & TEXTURE_USAGE_CPU_READ_BIT) {
//does not need anything fancy, map and read.
@@ -2469,15 +2469,15 @@ PoolVector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint3
void *buffer_mem;
VkResult vkerr = vmaMapMemory(allocator, tmp_buffer.allocation, &buffer_mem);
if (vkerr) {
- ERR_FAIL_V(PoolVector<uint8_t>());
+ ERR_FAIL_V(Vector<uint8_t>());
}
- PoolVector<uint8_t> buffer_data;
+ Vector<uint8_t> buffer_data;
{
buffer_data.resize(buffer_size);
- PoolVector<uint8_t>::Write w = buffer_data.write();
- copymem(w.ptr(), buffer_mem, buffer_size);
+ uint8_t *w = buffer_data.ptrw();
+ copymem(w, buffer_mem, buffer_size);
}
vmaUnmapMemory(allocator, tmp_buffer.allocation);
@@ -3135,7 +3135,7 @@ RID RenderingDeviceVulkan::sampler_create(const SamplerState &p_state) {
/**** VERTEX ARRAY ****/
/**********************/
-RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) {
+RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) {
_THREAD_SAFE_METHOD_
@@ -3145,8 +3145,8 @@ RID RenderingDeviceVulkan::vertex_buffer_create(uint32_t p_size_bytes, const Poo
_buffer_allocate(&buffer, p_size_bytes, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, VMA_MEMORY_USAGE_GPU_ONLY);
if (p_data.size()) {
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
- _buffer_update(&buffer, 0, r.ptr(), data_size);
+ const uint8_t *r = p_data.ptr();
+ _buffer_update(&buffer, 0, r, data_size);
_buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, false);
}
@@ -3263,7 +3263,7 @@ RID RenderingDeviceVulkan::vertex_array_create(uint32_t p_vertex_count, VertexFo
return id;
}
-RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data, bool p_use_restart_indices) {
+RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBufferFormat p_format, const Vector<uint8_t> &p_data, bool p_use_restart_indices) {
_THREAD_SAFE_METHOD_
@@ -3279,9 +3279,9 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff
index_buffer.max_index = 0;
ERR_FAIL_COND_V_MSG((uint32_t)p_data.size() != size_bytes, RID(),
"Default index buffer initializer array size (" + itos(p_data.size()) + ") does not match format required size (" + itos(size_bytes) + ").");
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
if (p_format == INDEX_BUFFER_FORMAT_UINT16) {
- const uint16_t *index16 = (const uint16_t *)r.ptr();
+ const uint16_t *index16 = (const uint16_t *)r;
for (uint32_t i = 0; i < p_index_count; i++) {
if (p_use_restart_indices && index16[i] == 0xFFFF) {
continue; //restart index, ingnore
@@ -3289,7 +3289,7 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff
index_buffer.max_index = MAX(index16[i], index_buffer.max_index);
}
} else {
- const uint32_t *index32 = (const uint32_t *)r.ptr();
+ const uint32_t *index32 = (const uint32_t *)r;
for (uint32_t i = 0; i < p_index_count; i++) {
if (p_use_restart_indices && index32[i] == 0xFFFFFFFF) {
continue; //restart index, ingnore
@@ -3306,8 +3306,8 @@ RID RenderingDeviceVulkan::index_buffer_create(uint32_t p_index_count, IndexBuff
_buffer_allocate(&index_buffer, size_bytes, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VMA_MEMORY_USAGE_GPU_ONLY);
if (p_data.size()) {
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
- _buffer_update(&index_buffer, 0, r.ptr(), data_size);
+ const uint8_t *r = p_data.ptr();
+ _buffer_update(&index_buffer, 0, r, data_size);
_buffer_memory_barrier(index_buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_INDEX_READ_BIT, false);
}
return index_buffer_owner.make_rid(index_buffer);
@@ -3606,8 +3606,8 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
{
SpvReflectShaderModule module;
- PoolVector<uint8_t>::Read spirv = p_stages[i].spir_v.read();
- SpvReflectResult result = spvReflectCreateShaderModule(p_stages[i].spir_v.size(), spirv.ptr(), &module);
+ const uint8_t *spirv = p_stages[i].spir_v.ptr();
+ SpvReflectResult result = spvReflectCreateShaderModule(p_stages[i].spir_v.size(), spirv, &module);
ERR_FAIL_COND_V_MSG(result != SPV_REFLECT_RESULT_SUCCESS, RID(),
"Reflection of SPIR-V shader stage '" + String(shader_stage_names[p_stages[i].shader_stage]) + "' failed parsing shader.");
@@ -3872,9 +3872,9 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
shader_module_create_info.pNext = NULL;
shader_module_create_info.flags = 0;
shader_module_create_info.codeSize = p_stages[i].spir_v.size();
- PoolVector<uint8_t>::Read r = p_stages[i].spir_v.read();
+ const uint8_t *r = p_stages[i].spir_v.ptr();
- shader_module_create_info.pCode = (const uint32_t *)r.ptr();
+ shader_module_create_info.pCode = (const uint32_t *)r;
VkShaderModule module;
VkResult res = vkCreateShaderModule(device, &shader_module_create_info, NULL, &module);
@@ -4016,7 +4016,7 @@ uint32_t RenderingDeviceVulkan::shader_get_vertex_input_attribute_mask(RID p_sha
/**** UNIFORMS ****/
/******************/
-RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) {
+RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) {
_THREAD_SAFE_METHOD_
@@ -4027,14 +4027,14 @@ RID RenderingDeviceVulkan::uniform_buffer_create(uint32_t p_size_bytes, const Po
ERR_FAIL_COND_V(err != OK, RID());
if (p_data.size()) {
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
- _buffer_update(&buffer, 0, r.ptr(), data_size);
+ const uint8_t *r = p_data.ptr();
+ _buffer_update(&buffer, 0, r, data_size);
_buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_UNIFORM_READ_BIT, false);
}
return uniform_buffer_owner.make_rid(buffer);
}
-RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data) {
+RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data) {
_THREAD_SAFE_METHOD_
@@ -4046,14 +4046,14 @@ RID RenderingDeviceVulkan::storage_buffer_create(uint32_t p_size_bytes, const Po
if (p_data.size()) {
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
- _buffer_update(&buffer, 0, r.ptr(), data_size);
+ const uint8_t *r = p_data.ptr();
+ _buffer_update(&buffer, 0, r, data_size);
_buffer_memory_barrier(buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT, false);
}
return storage_buffer_owner.make_rid(buffer);
}
-RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data) {
+RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data) {
_THREAD_SAFE_METHOD_
@@ -4069,8 +4069,8 @@ RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataF
if (p_data.size()) {
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
- _buffer_update(&texture_buffer.buffer, 0, r.ptr(), data_size);
+ const uint8_t *r = p_data.ptr();
+ _buffer_update(&texture_buffer.buffer, 0, r, data_size);
_buffer_memory_barrier(texture_buffer.buffer.buffer, 0, data_size, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, false);
}
@@ -4182,7 +4182,10 @@ RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_a
descriptor_pool_create_info.poolSizeCount = sizes.size();
descriptor_pool_create_info.pPoolSizes = sizes.ptr();
VkResult res = vkCreateDescriptorPool(device, &descriptor_pool_create_info, NULL, &pool->pool);
- ERR_FAIL_COND_V(res, NULL);
+ if (res) {
+ memdelete(pool);
+ ERR_FAIL_COND_V(res, NULL);
+ }
descriptor_pools[p_key].insert(pool);
}
@@ -4689,7 +4692,7 @@ Error RenderingDeviceVulkan::buffer_update(RID p_buffer, uint32_t p_offset, uint
return err;
}
-PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) {
+Vector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) {
_THREAD_SAFE_METHOD_
@@ -4703,7 +4706,7 @@ PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) {
} else if (storage_buffer_owner.owns(p_buffer)) {
buffer = storage_buffer_owner.getornull(p_buffer);
} else {
- ERR_FAIL_V_MSG(PoolVector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving.");
+ ERR_FAIL_V_MSG(Vector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving.");
}
VkCommandBuffer command_buffer = frames[frame].setup_command_buffer;
@@ -4720,15 +4723,15 @@ PoolVector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) {
void *buffer_mem;
VkResult vkerr = vmaMapMemory(allocator, tmp_buffer.allocation, &buffer_mem);
if (vkerr) {
- ERR_FAIL_V(PoolVector<uint8_t>());
+ ERR_FAIL_V(Vector<uint8_t>());
}
- PoolVector<uint8_t> buffer_data;
+ Vector<uint8_t> buffer_data;
{
buffer_data.resize(buffer->size);
- PoolVector<uint8_t>::Write w = buffer_data.write();
- copymem(w.ptr(), buffer_mem, buffer->size);
+ uint8_t *w = buffer_data.ptrw();
+ copymem(w, buffer_mem, buffer->size);
}
vmaUnmapMemory(allocator, tmp_buffer.allocation);
@@ -5977,7 +5980,7 @@ void RenderingDeviceVulkan::draw_list_draw(DrawListID p_list, bool p_use_indices
if (p_procedural_vertices > 0) {
#ifdef DEBUG_ENABLED
- ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format == INVALID_ID,
+ ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format != INVALID_ID,
"Procedural vertices requested, but pipeline expects a vertex array.");
#endif
to_draw = p_procedural_vertices;
@@ -6862,7 +6865,7 @@ void RenderingDeviceVulkan::initialize(VulkanContext *p_context) {
max_descriptors_per_pool = GLOBAL_DEF("rendering/vulkan/descriptor_pools/max_descriptors_per_pool", 64);
//check to make sure DescriptorPoolKey is good
- ERR_FAIL_COND(sizeof(uint64_t) * 3 < UNIFORM_TYPE_MAX * sizeof(uint16_t));
+ static_assert(sizeof(uint64_t) * 3 >= UNIFORM_TYPE_MAX * sizeof(uint16_t));
draw_list = NULL;
draw_list_count = 0;
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 8ef24d319b..30c10e922e 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -150,7 +150,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
RID_Owner<Texture, true> texture_owner;
uint32_t texture_upload_region_size_px;
- PoolVector<uint8_t> _texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d = false);
+ Vector<uint8_t> _texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer, bool p_2d = false);
/*****************/
/**** SAMPLER ****/
@@ -354,7 +354,9 @@ class RenderingDeviceVulkan : public RenderingDevice {
if (a.stride != b.stride) {
return false;
}
- return a.frequency != b.frequency;
+ if (a.frequency != b.frequency) {
+ return false;
+ }
}
return true; //they are equal
}
@@ -966,12 +968,12 @@ class RenderingDeviceVulkan : public RenderingDevice {
void _free_rids(T &p_owner, const char *p_type);
public:
- virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >());
+ virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >());
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture);
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D);
- virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false);
- virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer);
+ virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false);
+ virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer);
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const;
virtual bool texture_is_shared(RID p_texture);
@@ -1001,13 +1003,13 @@ public:
/**** VERTEX ARRAY ****/
/**********************/
- virtual RID vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>());
+ virtual RID vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>());
// Internally reference counted, this ID is warranted to be unique for the same description, but needs to be freed as many times as it was allocated
virtual VertexFormatID vertex_format_create(const Vector<VertexDescription> &p_vertex_formats);
virtual RID vertex_array_create(uint32_t p_vertex_count, VertexFormatID p_vertex_format, const Vector<RID> &p_src_buffers);
- virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>(), bool p_use_restart_indices = false);
+ virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>(), bool p_use_restart_indices = false);
virtual RID index_array_create(RID p_index_buffer, uint32_t p_index_offset, uint32_t p_index_count);
@@ -1022,15 +1024,15 @@ public:
/**** UNIFORM ****/
/*****************/
- virtual RID uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>());
- virtual RID storage_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>());
- virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>());
+ virtual RID uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>());
+ virtual RID storage_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>());
+ virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>());
virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set);
virtual bool uniform_set_is_valid(RID p_uniform_set);
virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false); //works for any buffer
- virtual PoolVector<uint8_t> buffer_get_data(RID p_buffer);
+ virtual Vector<uint8_t> buffer_get_data(RID p_buffer);
/*************************/
/**** RENDER PIPELINE ****/
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index ca488fc3a3..038cae7f96 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -29,111 +29,120 @@
/*************************************************************************/
#include "vulkan_context.h"
+
#include "core/engine.h"
-#include "core/print_string.h"
#include "core/project_settings.h"
+#include "core/ustring.h"
#include "core/version.h"
+
#include "vk_enum_string_helper.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-#define VULKAN_DEBUG(m_text) print_line(m_text)
#define APP_SHORT_NAME "GodotEngine"
-VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(
+ VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
VkDebugUtilsMessageTypeFlagsEXT messageType,
const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *pUserData) {
- char prefix[64] = "";
- char *message = (char *)malloc(strlen(pCallbackData->pMessage) + 5000);
- ERR_FAIL_COND_V(!message, false);
- //This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors
+ // This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors.
if (strstr(pCallbackData->pMessage, "Mapping an image with layout") != NULL &&
strstr(pCallbackData->pMessage, "can result in undefined behavior if this memory is used by the device") != NULL) {
- free(message);
return VK_FALSE;
}
- // This needs to be ignored because Validator is wrong here
+ // This needs to be ignored because Validator is wrong here.
if (strstr(pCallbackData->pMessage, "SPIR-V module not valid: Pointer operand") != NULL &&
strstr(pCallbackData->pMessage, "must be a memory object") != NULL) {
- free(message);
return VK_FALSE;
}
- if (strstr(pCallbackData->pMessageIdName, "UNASSIGNED-CoreValidation-DrawState-ClearCmdBeforeDraw") != NULL) {
- free(message);
+ // Workaround for Vulkan-Loader usability bug: https://github.com/KhronosGroup/Vulkan-Loader/issues/262.
+ if (strstr(pCallbackData->pMessage, "wrong ELF class: ELFCLASS32") != NULL) {
return VK_FALSE;
}
-
- if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) {
- strcat(prefix, "VERBOSE : ");
- } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) {
- strcat(prefix, "INFO : ");
- } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) {
- strcat(prefix, "WARNING : ");
- } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
- strcat(prefix, "ERROR : ");
+ if (pCallbackData->pMessageIdName && strstr(pCallbackData->pMessageIdName, "UNASSIGNED-CoreValidation-DrawState-ClearCmdBeforeDraw") != NULL) {
+ return VK_FALSE;
}
- if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT) {
- strcat(prefix, "GENERAL");
- } else {
- if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) {
- strcat(prefix, "VALIDATION");
- //validation_error = 1;
- }
- if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT) {
- if (messageType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) {
- strcat(prefix, "|");
- }
- strcat(prefix, "PERFORMANCE");
- }
+ String type_string;
+ switch (messageType) {
+ case (VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT):
+ type_string = "GENERAL";
+ break;
+ case (VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT):
+ type_string = "VALIDATION";
+ break;
+ case (VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT):
+ type_string = "PERFORMANCE";
+ break;
+ case (VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT & VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT):
+ type_string = "VALIDATION|PERFORMANCE";
+ break;
}
- sprintf(message, "%s - Message Id Number: %d | Message Id Name: %s\n\t%s\n", prefix, pCallbackData->messageIdNumber,
- pCallbackData->pMessageIdName, pCallbackData->pMessage);
-
+ String objects_string;
if (pCallbackData->objectCount > 0) {
- char tmp_message[500];
- sprintf(tmp_message, "\n\tObjects - %d\n", pCallbackData->objectCount);
- strcat(message, tmp_message);
+ objects_string = "\n\tObjects - " + String::num_int64(pCallbackData->objectCount);
for (uint32_t object = 0; object < pCallbackData->objectCount; ++object) {
+ objects_string +=
+ "\n\t\tObject[" + String::num_int64(object) + "]" +
+ " - " + string_VkObjectType(pCallbackData->pObjects[object].objectType) +
+ ", Handle " + String::num_int64(pCallbackData->pObjects[object].objectHandle);
if (NULL != pCallbackData->pObjects[object].pObjectName && strlen(pCallbackData->pObjects[object].pObjectName) > 0) {
- sprintf(tmp_message, "\t\tObject[%d] - %s, Handle %p, Name \"%s\"\n", object,
- string_VkObjectType(pCallbackData->pObjects[object].objectType),
- (void *)(pCallbackData->pObjects[object].objectHandle), pCallbackData->pObjects[object].pObjectName);
- } else {
- sprintf(tmp_message, "\t\tObject[%d] - %s, Handle %p\n", object,
- string_VkObjectType(pCallbackData->pObjects[object].objectType),
- (void *)(pCallbackData->pObjects[object].objectHandle));
+ objects_string += ", Name \"" + String(pCallbackData->pObjects[object].pObjectName) + "\"";
}
- strcat(message, tmp_message);
}
}
+
+ String labels_string;
if (pCallbackData->cmdBufLabelCount > 0) {
- char tmp_message[500];
- sprintf(tmp_message, "\n\tCommand Buffer Labels - %d\n", pCallbackData->cmdBufLabelCount);
- strcat(message, tmp_message);
+ labels_string = "\n\tCommand Buffer Labels - " + String::num_int64(pCallbackData->cmdBufLabelCount);
for (uint32_t cmd_buf_label = 0; cmd_buf_label < pCallbackData->cmdBufLabelCount; ++cmd_buf_label) {
- sprintf(tmp_message, "\t\tLabel[%d] - %s { %f, %f, %f, %f}\n", cmd_buf_label,
- pCallbackData->pCmdBufLabels[cmd_buf_label].pLabelName, pCallbackData->pCmdBufLabels[cmd_buf_label].color[0],
- pCallbackData->pCmdBufLabels[cmd_buf_label].color[1], pCallbackData->pCmdBufLabels[cmd_buf_label].color[2],
- pCallbackData->pCmdBufLabels[cmd_buf_label].color[3]);
- strcat(message, tmp_message);
+ labels_string +=
+ "\n\t\tLabel[" + String::num_int64(cmd_buf_label) + "]" +
+ " - " + pCallbackData->pCmdBufLabels[cmd_buf_label].pLabelName +
+ "{ ";
+ for (int color_idx = 0; color_idx < 4; ++color_idx) {
+ labels_string += String::num(pCallbackData->pCmdBufLabels[cmd_buf_label].color[color_idx]);
+ if (color_idx < 3) {
+ labels_string += ", ";
+ }
+ }
+ labels_string += " }";
}
}
- ERR_PRINT(message);
-
- free(message);
+ String error_message(type_string +
+ " - Message Id Number: " + String::num_int64(pCallbackData->messageIdNumber) +
+ " | Message Id Name: " + pCallbackData->pMessageIdName +
+ "\n\t" + pCallbackData->pMessage +
+ objects_string + labels_string);
- if (Engine::get_singleton()->is_abort_on_gpu_errors_enabled()) {
- abort();
+ // Convert VK severity to our own log macros.
+ switch (messageSeverity) {
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT:
+ print_verbose(error_message);
+ break;
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT:
+ print_line(error_message);
+ break;
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT:
+ WARN_PRINT(error_message);
+ break;
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT:
+ ERR_PRINT(error_message);
+ CRASH_COND_MSG(Engine::get_singleton()->is_abort_on_gpu_errors_enabled(),
+ "Crashing, because abort on GPU errors is enabled.");
+ break;
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT:
+ break; // Shouldn't happen, only handling to make compilers happy.
}
- // Don't bail out, but keep going.
- return false;
+
+ return VK_FALSE;
}
VkBool32 VulkanContext::_check_layers(uint32_t check_count, const char **check_names, uint32_t layer_count, VkLayerProperties *layers) {
@@ -347,8 +356,39 @@ Error VulkanContext::_create_physical_device() {
free(physical_devices);
ERR_FAIL_V(ERR_CANT_CREATE);
}
- /* for now, just grab the first physical device */
- gpu = physical_devices[0];
+
+ /*Find the first discrete GPU with the most VRAM.*/
+ {
+ print_line("Selecting primary GPU.");
+ VkPhysicalDeviceProperties device_properties;
+ VkPhysicalDeviceMemoryProperties memory_properties;
+ gpu = physical_devices[0];
+ uint32_t largest_vram_size = 0;
+ VkPhysicalDeviceType gpu_type = VK_PHYSICAL_DEVICE_TYPE_OTHER;
+ for (uint32_t i = 0; i < gpu_count; i++) {
+ vkGetPhysicalDeviceProperties(physical_devices[i], &device_properties);
+
+ /*Skip virtual and CPU devices for now.*/
+ if (device_properties.deviceType > VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
+ continue;
+ }
+
+ vkGetPhysicalDeviceMemoryProperties(physical_devices[i], &memory_properties);
+
+ /*Total all heaps in case of 3GB+1GB configurations and similar.*/
+ uint32_t memory_size = 0;
+ for (uint32_t j = 0; j < memory_properties.memoryHeapCount; j++) {
+ memory_size += memory_properties.memoryHeaps[j].size;
+ }
+
+ if ((device_properties.deviceType >= gpu_type) || (device_properties.deviceType == gpu_type && memory_size > largest_vram_size)) {
+ gpu = physical_devices[i];
+ gpu_type = device_properties.deviceType;
+ largest_vram_size = memory_size;
+ print_line(device_properties.deviceName);
+ }
+ }
+ }
free(physical_devices);
/* Look for device extensions */
@@ -389,16 +429,12 @@ Error VulkanContext::_create_physical_device() {
if (!strcmp(VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, device_extensions[i].extensionName)) {
extension_names[enabled_extension_count++] = VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME;
VK_KHR_incremental_present_enabled = true;
- VULKAN_DEBUG("VK_KHR_incremental_present extension enabled\n");
}
if (enabled_extension_count >= MAX_EXTENSIONS) {
free(device_extensions);
ERR_FAIL_V_MSG(ERR_BUG, "Enabled extension count reaches MAX_EXTENSIONS, BUG");
}
}
- if (!VK_KHR_incremental_present_enabled) {
- VULKAN_DEBUG("VK_KHR_incremental_present extension NOT AVAILABLE\n");
- }
}
if (VK_GOOGLE_display_timing_enabled) {
@@ -411,16 +447,12 @@ Error VulkanContext::_create_physical_device() {
if (!strcmp(VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, device_extensions[i].extensionName)) {
extension_names[enabled_extension_count++] = VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME;
VK_GOOGLE_display_timing_enabled = true;
- VULKAN_DEBUG("VK_GOOGLE_display_timing extension enabled\n");
}
if (enabled_extension_count >= MAX_EXTENSIONS) {
free(device_extensions);
ERR_FAIL_V_MSG(ERR_BUG, "Enabled extension count reaches MAX_EXTENSIONS, BUG");
}
}
- if (!VK_GOOGLE_display_timing_enabled) {
- VULKAN_DEBUG("VK_GOOGLE_display_timing extension NOT AVAILABLE\n");
- }
}
free(device_extensions);
@@ -1132,7 +1164,7 @@ Error VulkanContext::initialize() {
if (err) {
return err;
}
- print_line("Vulkan physical device creation success o_O");
+
return OK;
}
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 8aa6fb96c9..fa78771993 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -406,7 +406,6 @@ Error AudioDriverWASAPI::init() {
exit_thread = false;
thread_exited = false;
- mutex = Mutex::create(true);
thread = Thread::create(thread_func, this);
return OK;
@@ -782,14 +781,12 @@ void AudioDriverWASAPI::start() {
void AudioDriverWASAPI::lock() {
- if (mutex)
- mutex->lock();
+ mutex.lock();
}
void AudioDriverWASAPI::unlock() {
- if (mutex)
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverWASAPI::finish() {
@@ -804,11 +801,6 @@ void AudioDriverWASAPI::finish() {
finish_capture_device();
finish_render_device();
-
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
}
Error AudioDriverWASAPI::capture_start() {
@@ -863,7 +855,6 @@ String AudioDriverWASAPI::capture_get_device() {
AudioDriverWASAPI::AudioDriverWASAPI() {
- mutex = NULL;
thread = NULL;
samples_in.clear();
diff --git a/drivers/wasapi/audio_driver_wasapi.h b/drivers/wasapi/audio_driver_wasapi.h
index ebceedd431..3ea61c6010 100644
--- a/drivers/wasapi/audio_driver_wasapi.h
+++ b/drivers/wasapi/audio_driver_wasapi.h
@@ -75,7 +75,7 @@ class AudioDriverWASAPI : public AudioDriver {
AudioDeviceWASAPI audio_input;
AudioDeviceWASAPI audio_output;
- Mutex *mutex;
+ Mutex mutex;
Thread *thread;
Vector<int32_t> samples_in;
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 8e0eac6986..cf09f79832 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -189,7 +189,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
return ERR_CANT_CREATE;
}
-String DirAccessWindows::get_current_dir() {
+String DirAccessWindows::get_current_dir(bool p_include_drive) {
String base = _get_root_path();
if (base != "") {
@@ -203,7 +203,11 @@ String DirAccessWindows::get_current_dir() {
} else {
}
- return current_dir;
+ if (p_include_drive) {
+ return current_dir;
+ } else {
+ return current_dir.right(current_dir.find(":") + 1);
+ }
}
bool DirAccessWindows::file_exists(String p_file) {
diff --git a/drivers/windows/dir_access_windows.h b/drivers/windows/dir_access_windows.h
index 43951c0be9..f59e4d7030 100644
--- a/drivers/windows/dir_access_windows.h
+++ b/drivers/windows/dir_access_windows.h
@@ -69,7 +69,7 @@ public:
virtual String get_drive(int p_drive);
virtual Error change_dir(String p_dir); ///< can be relative or absolute, return false on success
- virtual String get_current_dir(); ///< return current dir location
+ virtual String get_current_dir(bool p_include_drive = true); ///< return current dir location
virtual bool file_exists(String p_file);
virtual bool dir_exists(String p_dir);
diff --git a/drivers/windows/mutex_windows.cpp b/drivers/windows/mutex_windows.cpp
deleted file mode 100644
index 1f14adb48f..0000000000
--- a/drivers/windows/mutex_windows.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************/
-/* mutex_windows.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 "mutex_windows.h"
-
-#include "core/os/memory.h"
-
-#ifdef WINDOWS_ENABLED
-
-void MutexWindows::lock() {
-
-#ifdef WINDOWS_USE_MUTEX
- WaitForSingleObject(mutex, INFINITE);
-#else
- EnterCriticalSection(&mutex);
-#endif
-}
-
-void MutexWindows::unlock() {
-
-#ifdef WINDOWS_USE_MUTEX
- ReleaseMutex(mutex);
-#else
- LeaveCriticalSection(&mutex);
-#endif
-}
-
-Error MutexWindows::try_lock() {
-
-#ifdef WINDOWS_USE_MUTEX
- return (WaitForSingleObject(mutex, 0) == WAIT_TIMEOUT) ? ERR_BUSY : OK;
-#else
-
- if (TryEnterCriticalSection(&mutex))
- return OK;
- else
- return ERR_BUSY;
-#endif
-}
-
-Mutex *MutexWindows::create_func_windows(bool p_recursive) {
-
- return memnew(MutexWindows);
-}
-
-void MutexWindows::make_default() {
-
- create_func = create_func_windows;
-}
-
-MutexWindows::MutexWindows() {
-
-#ifdef WINDOWS_USE_MUTEX
- mutex = CreateMutex(NULL, FALSE, NULL);
-#else
-#ifdef UWP_ENABLED
- InitializeCriticalSectionEx(&mutex, 0, 0);
-#else
- InitializeCriticalSection(&mutex);
-#endif
-#endif
-}
-
-MutexWindows::~MutexWindows() {
-
-#ifdef WINDOWS_USE_MUTEX
- CloseHandle(mutex);
-#else
-
- DeleteCriticalSection(&mutex);
-#endif
-}
-
-#endif
diff --git a/drivers/winmidi/midi_driver_winmidi.cpp b/drivers/winmidi/midi_driver_winmidi.cpp
index 01c194b7d8..57fb9b0e57 100644
--- a/drivers/winmidi/midi_driver_winmidi.cpp
+++ b/drivers/winmidi/midi_driver_winmidi.cpp
@@ -66,9 +66,9 @@ Error MIDIDriverWinMidi::open() {
return OK;
}
-PoolStringArray MIDIDriverWinMidi::get_connected_inputs() {
+PackedStringArray MIDIDriverWinMidi::get_connected_inputs() {
- PoolStringArray list;
+ PackedStringArray list;
for (int i = 0; i < connected_sources.size(); i++) {
HMIDIIN midi_in = connected_sources[i];
diff --git a/drivers/winmidi/midi_driver_winmidi.h b/drivers/winmidi/midi_driver_winmidi.h
index a689d3a500..c240c8c7aa 100644
--- a/drivers/winmidi/midi_driver_winmidi.h
+++ b/drivers/winmidi/midi_driver_winmidi.h
@@ -51,7 +51,7 @@ public:
virtual Error open();
virtual void close();
- virtual PoolStringArray get_connected_inputs();
+ virtual PackedStringArray get_connected_inputs();
MIDIDriverWinMidi();
virtual ~MIDIDriverWinMidi();
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp
index 85e505009b..9c7cb4f0f3 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.cpp
+++ b/drivers/xaudio2/audio_driver_xaudio2.cpp
@@ -79,7 +79,6 @@ Error AudioDriverXAudio2::init() {
hr = xaudio->CreateSourceVoice(&source_voice, &wave_format, 0, XAUDIO2_MAX_FREQ_RATIO, &voice_callback);
ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_UNAVAILABLE, "Error creating XAudio2 source voice. Error code: " + itos(hr) + ".");
- mutex = Mutex::create();
thread = Thread::create(AudioDriverXAudio2::thread_func, this);
return OK;
@@ -158,15 +157,15 @@ float AudioDriverXAudio2::get_latency() {
void AudioDriverXAudio2::lock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->lock();
+ mutex.lock();
}
void AudioDriverXAudio2::unlock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverXAudio2::finish() {
@@ -194,14 +193,11 @@ void AudioDriverXAudio2::finish() {
mastering_voice->DestroyVoice();
memdelete(thread);
- if (mutex)
- memdelete(mutex);
thread = NULL;
}
AudioDriverXAudio2::AudioDriverXAudio2() :
thread(NULL),
- mutex(NULL),
current_buffer(0) {
wave_format = { 0 };
for (int i = 0; i < AUDIO_BUFFERS; i++) {
diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h
index 98950851d0..108891a288 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.h
+++ b/drivers/xaudio2/audio_driver_xaudio2.h
@@ -65,7 +65,7 @@ class AudioDriverXAudio2 : public AudioDriver {
};
Thread *thread;
- Mutex *mutex;
+ Mutex mutex;
int32_t *samples_in;
int16_t *samples_out[AUDIO_BUFFERS];
diff --git a/editor/SCsub b/editor/SCsub
index 2b560f68e8..4431166ee6 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -82,6 +82,7 @@ if env['tools']:
SConscript('collada/SCsub')
SConscript('doc/SCsub')
+ SConscript('debugger/SCsub')
SConscript('fileserver/SCsub')
SConscript('icons/SCsub')
SConscript('import/SCsub')
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 719e4af6b5..e0839a9f27 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -502,12 +502,12 @@ void AnimationBezierTrackEdit::set_animation_and_track(const Ref<Animation> &p_a
animation = p_animation;
track = p_track;
- if (is_connected("select_key", editor, "_key_selected"))
- disconnect("select_key", editor, "_key_selected");
- if (is_connected("deselect_key", editor, "_key_deselected"))
- disconnect("deselect_key", editor, "_key_deselected");
- connect("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED);
- connect("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED);
+ if (is_connected_compat("select_key", editor, "_key_selected"))
+ disconnect_compat("select_key", editor, "_key_selected");
+ if (is_connected_compat("deselect_key", editor, "_key_deselected"))
+ disconnect_compat("deselect_key", editor, "_key_deselected");
+ connect_compat("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED);
+ connect_compat("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED);
update();
}
@@ -522,11 +522,11 @@ void AnimationBezierTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) {
void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
- timeline->connect("zoom_changed", this, "_zoom_changed");
+ timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed));
}
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
- connect("clear_selection", editor, "_clear_selection", varray(false));
+ connect_compat("clear_selection", editor, "_clear_selection", varray(false));
}
void AnimationBezierTrackEdit::_play_position_draw() {
@@ -1141,25 +1141,22 @@ void AnimationBezierTrackEdit::set_block_animation_update_ptr(bool *p_block_ptr)
void AnimationBezierTrackEdit::_bind_methods() {
- ClassDB::bind_method("_zoom_changed", &AnimationBezierTrackEdit::_zoom_changed);
- ClassDB::bind_method("_menu_selected", &AnimationBezierTrackEdit::_menu_selected);
ClassDB::bind_method("_gui_input", &AnimationBezierTrackEdit::_gui_input);
- ClassDB::bind_method("_play_position_draw", &AnimationBezierTrackEdit::_play_position_draw);
ClassDB::bind_method("_clear_selection", &AnimationBezierTrackEdit::_clear_selection);
ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim);
ClassDB::bind_method("_select_at_anim", &AnimationBezierTrackEdit::_select_at_anim);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
- ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single")));
ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("clear_selection"));
ADD_SIGNAL(MethodInfo("close_request"));
ADD_SIGNAL(MethodInfo("move_selection_begin"));
- ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("move_selection_commit"));
ADD_SIGNAL(MethodInfo("move_selection_cancel"));
}
@@ -1184,7 +1181,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_margins_preset(PRESET_WIDE);
- play_position->connect("draw", this, "_play_position_draw");
+ play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
v_scroll = 0;
@@ -1198,7 +1195,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect("id_pressed", callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
//set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection
}
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index cc64db22cc..095dbd6849 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -235,7 +235,7 @@ public:
Variant::Type t = Variant::Type(int(p_value));
if (t != args[idx].get_type()) {
- Variant::CallError err;
+ Callable::CallError err;
if (Variant::can_convert(args[idx].get_type(), t)) {
Variant old = args[idx];
Variant *ptrs[1] = { &old };
@@ -548,9 +548,9 @@ public:
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
} else {
- p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
}
switch (animation->track_get_type(track)) {
@@ -593,7 +593,7 @@ public:
} break;
case Animation::TYPE_METHOD: {
- p_list->push_back(PropertyInfo(Variant::STRING, "name"));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
Dictionary d = animation->track_get_key_value(track, key);
@@ -617,7 +617,7 @@ public:
} break;
case Animation::TYPE_BEZIER: {
- p_list->push_back(PropertyInfo(Variant::REAL, "value"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
@@ -625,8 +625,8 @@ public:
case Animation::TYPE_AUDIO: {
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
@@ -654,13 +654,13 @@ public:
}
animations += "[stop]";
- p_list->push_back(PropertyInfo(Variant::STRING, "animation", PROPERTY_HINT_ENUM, animations));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations));
} break;
}
if (animation->track_get_type(track) == Animation::TYPE_VALUE) {
- p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
}
}
@@ -898,7 +898,7 @@ public:
Variant::Type t = Variant::Type(int(p_value));
if (t != args[idx].get_type()) {
- Variant::CallError err;
+ Callable::CallError err;
if (Variant::can_convert(args[idx].get_type(), t)) {
Variant old = args[idx];
Variant *ptrs[1] = { &old };
@@ -1243,9 +1243,9 @@ public:
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
} else {
- p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
}
}
@@ -1289,11 +1289,11 @@ public:
p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
}
- p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
} break;
case Animation::TYPE_METHOD: {
- p_list->push_back(PropertyInfo(Variant::STRING, "name"));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
Dictionary d = animation->track_get_key_value(first_track, first_key);
@@ -1316,15 +1316,15 @@ public:
} break;
case Animation::TYPE_BEZIER: {
- p_list->push_back(PropertyInfo(Variant::REAL, "value"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
} break;
case Animation::TYPE_AUDIO: {
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
@@ -1354,7 +1354,7 @@ public:
}
animations += "[stop]";
- p_list->push_back(PropertyInfo(Variant::STRING, "animation", PROPERTY_HINT_ENUM, animations));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations));
} break;
}
}
@@ -1697,7 +1697,7 @@ void AnimationTimelineEdit::set_undo_redo(UndoRedo *p_undo_redo) {
void AnimationTimelineEdit::set_zoom(Range *p_zoom) {
zoom = p_zoom;
- zoom->connect("value_changed", this, "_zoom_changed");
+ zoom->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_zoom_changed));
}
void AnimationTimelineEdit::set_play_position(float p_pos) {
@@ -1845,18 +1845,13 @@ void AnimationTimelineEdit::_track_added(int p_track) {
}
void AnimationTimelineEdit::_bind_methods() {
- ClassDB::bind_method("_zoom_changed", &AnimationTimelineEdit::_zoom_changed);
- ClassDB::bind_method("_anim_length_changed", &AnimationTimelineEdit::_anim_length_changed);
- ClassDB::bind_method("_anim_loop_pressed", &AnimationTimelineEdit::_anim_loop_pressed);
- ClassDB::bind_method("_play_position_draw", &AnimationTimelineEdit::_play_position_draw);
ClassDB::bind_method("_gui_input", &AnimationTimelineEdit::_gui_input);
- ClassDB::bind_method("_track_added", &AnimationTimelineEdit::_track_added);
ADD_SIGNAL(MethodInfo("zoom_changed"));
ADD_SIGNAL(MethodInfo("name_limit_changed"));
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("track_added", PropertyInfo(Variant::INT, "track")));
- ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::REAL, "size")));
+ ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::FLOAT, "size")));
}
AnimationTimelineEdit::AnimationTimelineEdit() {
@@ -1871,7 +1866,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_margins_preset(PRESET_WIDE);
- play_position->connect("draw", this, "_play_position_draw");
+ play_position->connect("draw", callable_mp(this, &AnimationTimelineEdit::_play_position_draw));
add_track = memnew(MenuButton);
add_track->set_position(Vector2(0, 0));
@@ -1895,17 +1890,17 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
length->set_hide_slider(true);
length->set_tooltip(TTR("Animation length (seconds)"));
- length->connect("value_changed", this, "_anim_length_changed");
+ length->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
len_hb->add_child(length);
loop = memnew(ToolButton);
loop->set_tooltip(TTR("Animation Looping"));
- loop->connect("pressed", this, "_anim_loop_pressed");
+ loop->connect("pressed", callable_mp(this, &AnimationTimelineEdit::_anim_loop_pressed));
loop->set_toggle_mode(true);
len_hb->add_child(loop);
add_child(len_hb);
add_track->hide();
- add_track->get_popup()->connect("index_pressed", this, "_track_added");
+ add_track->get_popup()->connect("index_pressed", callable_mp(this, &AnimationTimelineEdit::_track_added));
len_hb->hide();
panning_timeline = false;
@@ -2429,8 +2424,8 @@ void AnimationTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) {
void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
- timeline->connect("zoom_changed", this, "_zoom_changed");
- timeline->connect("name_limit_changed", this, "_zoom_changed");
+ timeline->connect("zoom_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
+ timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEdit::_zoom_changed));
}
void AnimationTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
@@ -2480,6 +2475,9 @@ void AnimationTrackEdit::_path_entered(const String &p_text) {
bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
+ if (root == nullptr)
+ return false;
+
RES res;
Vector<StringName> leftover_path;
Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);
@@ -2688,7 +2686,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
menu->add_icon_item(get_icon("TrackContinuous", "EditorIcons"), TTR("Continuous"), MENU_CALL_MODE_CONTINUOUS);
@@ -2707,7 +2705,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
menu->add_icon_item(get_icon("InterpRaw", "EditorIcons"), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
@@ -2725,7 +2723,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
menu->add_icon_item(get_icon("InterpWrapClamp", "EditorIcons"), TTR("Clamp Loop Interp"), MENU_LOOP_CLAMP);
@@ -2820,7 +2818,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
@@ -2848,7 +2846,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
path = memnew(LineEdit);
add_child(path);
path->set_as_toplevel(true);
- path->connect("text_entered", this, "_path_entered");
+ path->connect("text_entered", callable_mp(this, &AnimationTrackEdit::_path_entered));
}
path->set_text(animation->track_get_path(track));
@@ -3067,22 +3065,18 @@ void AnimationTrackEdit::append_to_selection(const Rect2 &p_box, bool p_deselect
void AnimationTrackEdit::_bind_methods() {
- ClassDB::bind_method("_zoom_changed", &AnimationTrackEdit::_zoom_changed);
- ClassDB::bind_method("_menu_selected", &AnimationTrackEdit::_menu_selected);
ClassDB::bind_method("_gui_input", &AnimationTrackEdit::_gui_input);
- ClassDB::bind_method("_path_entered", &AnimationTrackEdit::_path_entered);
- ClassDB::bind_method("_play_position_draw", &AnimationTrackEdit::_play_position_draw);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
ADD_SIGNAL(MethodInfo("dropped", PropertyInfo(Variant::INT, "from_track"), PropertyInfo(Variant::INT, "to_track")));
- ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single")));
ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("bezier_edit"));
ADD_SIGNAL(MethodInfo("move_selection_begin"));
- ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("move_selection_commit"));
ADD_SIGNAL(MethodInfo("move_selection_cancel"));
@@ -3111,7 +3105,7 @@ AnimationTrackEdit::AnimationTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_margins_preset(PRESET_WIDE);
- play_position->connect("draw", this, "_play_position_draw");
+ play_position->connect("draw", callable_mp(this, &AnimationTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection
}
@@ -3138,7 +3132,7 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_
&args[5]
};
- Variant::CallError ce;
+ Callable::CallError ce;
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *());
}
return NULL;
@@ -3217,8 +3211,8 @@ Size2 AnimationTrackEditGroup::get_minimum_size() const {
void AnimationTrackEditGroup::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
- timeline->connect("zoom_changed", this, "_zoom_changed");
- timeline->connect("name_limit_changed", this, "_zoom_changed");
+ timeline->connect("zoom_changed", callable_mp(this, &AnimationTrackEditGroup::_zoom_changed));
+ timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEditGroup::_zoom_changed));
}
void AnimationTrackEditGroup::set_root(Node *p_root) {
@@ -3231,7 +3225,6 @@ void AnimationTrackEditGroup::_zoom_changed() {
}
void AnimationTrackEditGroup::_bind_methods() {
- ClassDB::bind_method("_zoom_changed", &AnimationTrackEditGroup::_zoom_changed);
}
AnimationTrackEditGroup::AnimationTrackEditGroup() {
@@ -3258,7 +3251,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
track_edits[_get_track_selected()]->release_focus();
}
if (animation.is_valid()) {
- animation->disconnect("changed", this, "_animation_changed");
+ animation->disconnect("changed", callable_mp(this, &AnimationTrackEditor::_animation_changed));
_clear_selection();
}
animation = p_anim;
@@ -3268,7 +3261,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
_update_tracks();
if (animation.is_valid()) {
- animation->connect("changed", this, "_animation_changed");
+ animation->connect("changed", callable_mp(this, &AnimationTrackEditor::_animation_changed));
hscroll->show();
edit->set_disabled(false);
@@ -3311,13 +3304,13 @@ void AnimationTrackEditor::_root_removed(Node *p_root) {
void AnimationTrackEditor::set_root(Node *p_root) {
if (root) {
- root->disconnect("tree_exiting", this, "_root_removed");
+ root->disconnect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed));
}
root = p_root;
if (root) {
- root->connect("tree_exiting", this, "_root_removed", make_binds(), CONNECT_ONESHOT);
+ root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), make_binds(), CONNECT_ONESHOT);
}
_update_tracks();
@@ -3482,7 +3475,7 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
switch (insert_data[i].value.get_type()) {
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::VECTOR2:
case Variant::VECTOR3:
case Variant::QUAT:
@@ -3913,7 +3906,7 @@ static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool
case Variant::INT: {
subindices.push_back("");
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
subindices.push_back("");
} break;
case Variant::VECTOR2: {
@@ -3991,7 +3984,7 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np);
animation->remove_track(animation->get_track_count() - 1); //hack
- if (h.type == Variant::REAL ||
+ if (h.type == Variant::FLOAT ||
h.type == Variant::VECTOR2 ||
h.type == Variant::RECT2 ||
h.type == Variant::VECTOR3 ||
@@ -4257,21 +4250,21 @@ void AnimationTrackEditor::_update_tracks() {
track_edit->grab_focus();
}
- track_edit->connect("timeline_changed", this, "_timeline_changed");
- track_edit->connect("remove_request", this, "_track_remove_request", varray(), CONNECT_DEFERRED);
- track_edit->connect("dropped", this, "_dropped_track", varray(), CONNECT_DEFERRED);
- track_edit->connect("insert_key", this, "_insert_key_from_track", varray(i), CONNECT_DEFERRED);
- track_edit->connect("select_key", this, "_key_selected", varray(i), CONNECT_DEFERRED);
- track_edit->connect("deselect_key", this, "_key_deselected", varray(i), CONNECT_DEFERRED);
- track_edit->connect("bezier_edit", this, "_bezier_edit", varray(i), CONNECT_DEFERRED);
- track_edit->connect("move_selection_begin", this, "_move_selection_begin");
- track_edit->connect("move_selection", this, "_move_selection");
- track_edit->connect("move_selection_commit", this, "_move_selection_commit");
- track_edit->connect("move_selection_cancel", this, "_move_selection_cancel");
+ track_edit->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
+ track_edit->connect("remove_request", callable_mp(this, &AnimationTrackEditor::_track_remove_request), varray(), CONNECT_DEFERRED);
+ track_edit->connect("dropped", callable_mp(this, &AnimationTrackEditor::_dropped_track), varray(), CONNECT_DEFERRED);
+ track_edit->connect("insert_key", callable_mp(this, &AnimationTrackEditor::_insert_key_from_track), varray(i), CONNECT_DEFERRED);
+ track_edit->connect("select_key", callable_mp(this, &AnimationTrackEditor::_key_selected), varray(i), CONNECT_DEFERRED);
+ track_edit->connect("deselect_key", callable_mp(this, &AnimationTrackEditor::_key_deselected), varray(i), CONNECT_DEFERRED);
+ track_edit->connect("bezier_edit", callable_mp(this, &AnimationTrackEditor::_bezier_edit), varray(i), CONNECT_DEFERRED);
+ track_edit->connect("move_selection_begin", callable_mp(this, &AnimationTrackEditor::_move_selection_begin));
+ track_edit->connect("move_selection", callable_mp(this, &AnimationTrackEditor::_move_selection));
+ track_edit->connect("move_selection_commit", callable_mp(this, &AnimationTrackEditor::_move_selection_commit));
+ track_edit->connect("move_selection_cancel", callable_mp(this, &AnimationTrackEditor::_move_selection_cancel));
- track_edit->connect("duplicate_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED);
- track_edit->connect("duplicate_transpose_request", this, "_edit_menu_pressed", varray(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED);
- track_edit->connect("delete_request", this, "_edit_menu_pressed", varray(EDIT_DELETE_SELECTION), CONNECT_DEFERRED);
+ track_edit->connect("duplicate_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED);
+ track_edit->connect("duplicate_transpose_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED);
+ track_edit->connect("delete_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DELETE_SELECTION), CONNECT_DEFERRED);
}
}
@@ -4384,7 +4377,7 @@ void AnimationTrackEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_READY) {
- EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", this, "_selection_changed");
+ EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &AnimationTrackEditor::_selection_changed));
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
@@ -4473,7 +4466,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
Vector<Variant::Type> filter;
filter.push_back(Variant::INT);
- filter.push_back(Variant::REAL);
+ filter.push_back(Variant::FLOAT);
filter.push_back(Variant::VECTOR2);
filter.push_back(Variant::VECTOR3);
filter.push_back(Variant::QUAT);
@@ -4543,7 +4536,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
animation->track_set_path(animation->get_track_count() - 1, full_path);
PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np);
animation->remove_track(animation->get_track_count() - 1); //hack
- if (h.type == Variant::REAL ||
+ if (h.type == Variant::FLOAT ||
h.type == Variant::VECTOR2 ||
h.type == Variant::RECT2 ||
h.type == Variant::VECTOR3 ||
@@ -4753,7 +4746,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
Variant arg = E->get().default_arguments[i - first_defarg];
params.push_back(arg);
} else {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant arg = Variant::construct(E->get().arguments[i].type, NULL, 0, ce);
params.push_back(arg);
}
@@ -5707,7 +5700,7 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) {
return p_value;
}
-void AnimationTrackEditor::_show_imported_anim_warning() const {
+void AnimationTrackEditor::_show_imported_anim_warning() {
// It looks terrible on a single line but the TTR extractor doesn't support line breaks yet.
EditorNode::get_singleton()->show_warning(TTR("This animation belongs to an imported scene, so changes to imported tracks will not be saved.\n\nTo enable the ability to add custom tracks, navigate to the scene's import settings and set\n\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks\", then re-import.\nAlternatively, use an import preset that imports animations to separate files."),
@@ -5737,50 +5730,21 @@ void AnimationTrackEditor::_select_all_tracks_for_copy() {
void AnimationTrackEditor::_bind_methods() {
- ClassDB::bind_method("_animation_changed", &AnimationTrackEditor::_animation_changed);
ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update);
- ClassDB::bind_method("_timeline_changed", &AnimationTrackEditor::_timeline_changed);
- ClassDB::bind_method("_track_remove_request", &AnimationTrackEditor::_track_remove_request);
ClassDB::bind_method("_track_grab_focus", &AnimationTrackEditor::_track_grab_focus);
- ClassDB::bind_method("_name_limit_changed", &AnimationTrackEditor::_name_limit_changed);
- ClassDB::bind_method("_update_scroll", &AnimationTrackEditor::_update_scroll);
ClassDB::bind_method("_update_tracks", &AnimationTrackEditor::_update_tracks);
- ClassDB::bind_method("_update_step", &AnimationTrackEditor::_update_step);
- ClassDB::bind_method("_update_length", &AnimationTrackEditor::_update_length);
- ClassDB::bind_method("_dropped_track", &AnimationTrackEditor::_dropped_track);
- ClassDB::bind_method("_add_track", &AnimationTrackEditor::_add_track);
- ClassDB::bind_method("_new_track_node_selected", &AnimationTrackEditor::_new_track_node_selected);
- ClassDB::bind_method("_new_track_property_selected", &AnimationTrackEditor::_new_track_property_selected);
- ClassDB::bind_method("_root_removed", &AnimationTrackEditor::_root_removed);
- ClassDB::bind_method("_confirm_insert_list", &AnimationTrackEditor::_confirm_insert_list);
ClassDB::bind_method("_insert_delay", &AnimationTrackEditor::_insert_delay);
- ClassDB::bind_method("_timeline_value_changed", &AnimationTrackEditor::_timeline_value_changed);
- ClassDB::bind_method("_insert_key_from_track", &AnimationTrackEditor::_insert_key_from_track);
- ClassDB::bind_method("_add_method_key", &AnimationTrackEditor::_add_method_key);
- ClassDB::bind_method("_key_selected", &AnimationTrackEditor::_key_selected);
- ClassDB::bind_method("_key_deselected", &AnimationTrackEditor::_key_deselected);
- ClassDB::bind_method("_clear_selection", &AnimationTrackEditor::_clear_selection);
- ClassDB::bind_method("_move_selection_begin", &AnimationTrackEditor::_move_selection_begin);
- ClassDB::bind_method("_move_selection", &AnimationTrackEditor::_move_selection);
- ClassDB::bind_method("_move_selection_commit", &AnimationTrackEditor::_move_selection_commit);
- ClassDB::bind_method("_move_selection_cancel", &AnimationTrackEditor::_move_selection_cancel);
ClassDB::bind_method("_clear_selection_for_anim", &AnimationTrackEditor::_clear_selection_for_anim);
ClassDB::bind_method("_select_at_anim", &AnimationTrackEditor::_select_at_anim);
- ClassDB::bind_method("_scroll_input", &AnimationTrackEditor::_scroll_input);
- ClassDB::bind_method("_box_selection_draw", &AnimationTrackEditor::_box_selection_draw);
- ClassDB::bind_method("_bezier_edit", &AnimationTrackEditor::_bezier_edit);
- ClassDB::bind_method("_cancel_bezier_edit", &AnimationTrackEditor::_cancel_bezier_edit);
- ClassDB::bind_method("_edit_menu_pressed", &AnimationTrackEditor::_edit_menu_pressed);
- ClassDB::bind_method("_view_group_toggle", &AnimationTrackEditor::_view_group_toggle);
- ClassDB::bind_method("_selection_changed", &AnimationTrackEditor::_selection_changed);
- ClassDB::bind_method("_snap_mode_changed", &AnimationTrackEditor::_snap_mode_changed);
- ClassDB::bind_method("_show_imported_anim_warning", &AnimationTrackEditor::_show_imported_anim_warning);
- ClassDB::bind_method("_select_all_tracks_for_copy", &AnimationTrackEditor::_select_all_tracks_for_copy);
-
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+
+ ClassDB::bind_method("_key_selected", &AnimationTrackEditor::_key_selected); // Still used by some connect_compat.
+ ClassDB::bind_method("_key_deselected", &AnimationTrackEditor::_key_deselected); // Still used by some connect_compat.
+ ClassDB::bind_method("_clear_selection", &AnimationTrackEditor::_clear_selection); // Still used by some connect_compat.
+
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("keying_changed"));
- ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::REAL, "len")));
- ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::REAL, "step")));
+ ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::FLOAT, "len")));
+ ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::FLOAT, "step")));
}
AnimationTrackEditor::AnimationTrackEditor() {
@@ -5813,11 +5777,11 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline = memnew(AnimationTimelineEdit);
timeline->set_undo_redo(undo_redo);
timeline_vbox->add_child(timeline);
- timeline->connect("timeline_changed", this, "_timeline_changed");
- timeline->connect("name_limit_changed", this, "_name_limit_changed");
- timeline->connect("track_added", this, "_add_track");
- timeline->connect("value_changed", this, "_timeline_value_changed");
- timeline->connect("length_changed", this, "_update_length");
+ timeline->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
+ timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEditor::_name_limit_changed));
+ timeline->connect("track_added", callable_mp(this, &AnimationTrackEditor::_add_track));
+ timeline->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_timeline_value_changed));
+ timeline->connect("length_changed", callable_mp(this, &AnimationTrackEditor::_update_length));
scroll = memnew(ScrollContainer);
timeline_vbox->add_child(scroll);
@@ -5825,7 +5789,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
VScrollBar *sb = scroll->get_v_scrollbar();
scroll->remove_child(sb);
timeline_scroll->add_child(sb); //move here so timeline and tracks are always aligned
- scroll->connect("gui_input", this, "_scroll_input");
+ scroll->connect("gui_input", callable_mp(this, &AnimationTrackEditor::_scroll_input));
bezier_edit = memnew(AnimationBezierTrackEdit);
timeline_vbox->add_child(bezier_edit);
@@ -5834,14 +5798,14 @@ AnimationTrackEditor::AnimationTrackEditor() {
bezier_edit->set_timeline(timeline);
bezier_edit->hide();
bezier_edit->set_v_size_flags(SIZE_EXPAND_FILL);
- bezier_edit->connect("close_request", this, "_cancel_bezier_edit");
+ bezier_edit->connect("close_request", callable_mp(this, &AnimationTrackEditor::_cancel_bezier_edit));
timeline_vbox->set_custom_minimum_size(Size2(0, 150) * EDSCALE);
hscroll = memnew(HScrollBar);
hscroll->share(timeline);
hscroll->hide();
- hscroll->connect("value_changed", this, "_update_scroll");
+ hscroll->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_update_scroll));
timeline_vbox->add_child(hscroll);
timeline->set_hscroll(hscroll);
@@ -5858,20 +5822,20 @@ AnimationTrackEditor::AnimationTrackEditor() {
imported_anim_warning = memnew(Button);
imported_anim_warning->hide();
imported_anim_warning->set_tooltip(TTR("Warning: Editing imported animation"));
- imported_anim_warning->connect("pressed", this, "_show_imported_anim_warning");
+ imported_anim_warning->connect("pressed", callable_mp(this, &AnimationTrackEditor::_show_imported_anim_warning));
bottom_hb->add_child(imported_anim_warning);
bottom_hb->add_spacer();
selected_filter = memnew(ToolButton);
- selected_filter->connect("pressed", this, "_view_group_toggle"); //same function works the same
+ selected_filter->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle)); //same function works the same
selected_filter->set_toggle_mode(true);
selected_filter->set_tooltip(TTR("Only show tracks from nodes selected in tree."));
bottom_hb->add_child(selected_filter);
view_group = memnew(ToolButton);
- view_group->connect("pressed", this, "_view_group_toggle");
+ view_group->connect("pressed", callable_mp(this, &AnimationTrackEditor::_view_group_toggle));
view_group->set_toggle_mode(true);
view_group->set_tooltip(TTR("Group tracks by node or display them as plain list."));
@@ -5893,14 +5857,14 @@ AnimationTrackEditor::AnimationTrackEditor() {
step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
step->set_tooltip(TTR("Animation step value."));
bottom_hb->add_child(step);
- step->connect("value_changed", this, "_update_step");
+ step->connect("value_changed", callable_mp(this, &AnimationTrackEditor::_update_step));
step->set_read_only(true);
snap_mode = memnew(OptionButton);
snap_mode->add_item(TTR("Seconds"));
snap_mode->add_item(TTR("FPS"));
bottom_hb->add_child(snap_mode);
- snap_mode->connect("item_selected", this, "_snap_mode_changed");
+ snap_mode->connect("item_selected", callable_mp(this, &AnimationTrackEditor::_snap_mode_changed));
snap_mode->set_disabled(true);
bottom_hb->add_child(memnew(VSeparator));
@@ -5945,19 +5909,19 @@ AnimationTrackEditor::AnimationTrackEditor() {
edit->get_popup()->add_item(TTR("Optimize Animation"), EDIT_OPTIMIZE_ANIMATION);
edit->get_popup()->add_item(TTR("Clean-Up Animation"), EDIT_CLEAN_UP_ANIMATION);
- edit->get_popup()->connect("id_pressed", this, "_edit_menu_pressed");
+ edit->get_popup()->connect("id_pressed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
pick_track = memnew(SceneTreeDialog);
add_child(pick_track);
pick_track->set_title(TTR("Pick the node that will be animated:"));
- pick_track->connect("selected", this, "_new_track_node_selected");
+ pick_track->connect("selected", callable_mp(this, &AnimationTrackEditor::_new_track_node_selected));
prop_selector = memnew(PropertySelector);
add_child(prop_selector);
- prop_selector->connect("selected", this, "_new_track_property_selected");
+ prop_selector->connect("selected", callable_mp(this, &AnimationTrackEditor::_new_track_property_selected));
method_selector = memnew(PropertySelector);
add_child(method_selector);
- method_selector->connect("selected", this, "_add_method_key");
+ method_selector->connect("selected", callable_mp(this, &AnimationTrackEditor::_add_method_key));
inserting = false;
insert_query = false;
@@ -5966,7 +5930,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
insert_confirm = memnew(ConfirmationDialog);
add_child(insert_confirm);
- insert_confirm->connect("confirmed", this, "_confirm_insert_list");
+ insert_confirm->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_confirm_insert_list));
VBoxContainer *icvb = memnew(VBoxContainer);
insert_confirm->add_child(icvb);
insert_confirm_text = memnew(Label);
@@ -5984,7 +5948,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
box_selection->set_as_toplevel(true);
box_selection->set_mouse_filter(MOUSE_FILTER_IGNORE);
box_selection->hide();
- box_selection->connect("draw", this, "_box_selection_draw");
+ box_selection->connect("draw", callable_mp(this, &AnimationTrackEditor::_box_selection_draw));
box_selecting = false;
//default plugins
@@ -6022,7 +5986,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
optimize_max_angle->set_value(22);
optimize_dialog->get_ok()->set_text(TTR("Optimize"));
- optimize_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
+ optimize_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
//
@@ -6048,7 +6012,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)"));
cleanup_dialog->get_ok()->set_text(TTR("Clean-Up"));
- cleanup_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
+ cleanup_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
//
scale_dialog = memnew(ConfirmationDialog);
@@ -6060,7 +6024,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
scale->set_max(99999);
scale->set_step(0.001);
vbc->add_margin_child(TTR("Scale Ratio:"), scale);
- scale_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_SCALE_CONFIRM));
+ scale_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_SCALE_CONFIRM));
add_child(scale_dialog);
track_copy_dialog = memnew(ConfirmationDialog);
@@ -6073,7 +6037,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
Button *select_all_button = memnew(Button);
select_all_button->set_text(TTR("Select All/None"));
- select_all_button->connect("pressed", this, "_select_all_tracks_for_copy");
+ select_all_button->connect("pressed", callable_mp(this, &AnimationTrackEditor::_select_all_tracks_for_copy));
track_vbox->add_child(select_all_button);
track_copy_select = memnew(Tree);
@@ -6081,7 +6045,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true);
track_vbox->add_child(track_copy_select);
- track_copy_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM));
+ track_copy_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_COPY_TRACKS_CONFIRM));
animation_changing_awaiting_update = false;
}
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index c2660652d6..26f9c15f6c 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -314,7 +314,7 @@ class AnimationTrackEditor : public VBoxContainer {
OptionButton *snap_mode;
Button *imported_anim_warning;
- void _show_imported_anim_warning() const;
+ void _show_imported_anim_warning();
void _snap_mode_changed(int p_mode);
Vector<AnimationTrackEdit *> track_edits;
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index bcdd09987f..fc47a69a2c 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -330,11 +330,10 @@ void AnimationTrackEditAudio::set_node(Object *p_object) {
}
void AnimationTrackEditAudio::_bind_methods() {
- ClassDB::bind_method("_preview_changed", &AnimationTrackEditAudio::_preview_changed);
}
AnimationTrackEditAudio::AnimationTrackEditAudio() {
- AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed");
+ AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AnimationTrackEditAudio::_preview_changed));
}
/// SPRITE FRAME / FRAME_COORDS ///
@@ -945,11 +944,10 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
}
void AnimationTrackEditTypeAudio::_bind_methods() {
- ClassDB::bind_method("_preview_changed", &AnimationTrackEditTypeAudio::_preview_changed);
}
AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() {
- AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed");
+ AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AnimationTrackEditTypeAudio::_preview_changed));
len_resizing = false;
}
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 8cbc6a8dff..f14b12b132 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -42,7 +42,7 @@ Variant ArrayPropertyEdit::get_array() const {
return Array();
Variant arr = o->get(property);
if (!arr.is_array()) {
- Variant::CallError ce;
+ Callable::CallError ce;
arr = Variant::construct(default_type, NULL, 0, ce);
}
return arr;
@@ -104,7 +104,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
} else if (newsize > size) {
Variant init;
- Variant::CallError ce;
+ Callable::CallError ce;
Variant::Type new_type = subtype;
if (new_type == Variant::NIL && size) {
new_type = arr.get(size - 1).get_type();
@@ -139,7 +139,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
Variant value = arr.get(idx);
if (value.get_type() != type && type >= 0 && type < Variant::VARIANT_MAX) {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant new_value = Variant::construct(Variant::Type(type), NULL, 0, ce);
UndoRedo *ur = EditorNode::get_undo_redo();
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index e898bc54dd..ddd702fc6c 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -122,7 +122,7 @@ void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
bool accepted = true;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_ESCAPE: {
@@ -200,7 +200,7 @@ void FindReplaceBar::_replace() {
void FindReplaceBar::_replace_all() {
- text_edit->disconnect("text_changed", this, "_editor_text_changed");
+ text_edit->disconnect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
// Line as x so it gets priority in comparison, column as y.
Point2i orig_cursor(text_edit->cursor_get_line(), text_edit->cursor_get_column());
Point2i prev_match = Point2(-1, -1);
@@ -280,7 +280,7 @@ void FindReplaceBar::_replace_all() {
matches_label->add_color_override("font_color", rc > 0 ? get_color("font_color", "Label") : get_color("error_color", "Editor"));
matches_label->set_text(vformat(TTR("%d replaced."), rc));
- text_edit->call_deferred("connect", "text_changed", this, "_editor_text_changed");
+ text_edit->call_deferred("connect", "text_changed", Callable(this, "_editor_text_changed"));
results_count = -1;
}
@@ -559,24 +559,14 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
results_count = -1;
text_edit = p_text_edit;
- text_edit->connect("text_changed", this, "_editor_text_changed");
+ text_edit->connect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
}
void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input);
- ClassDB::bind_method("_editor_text_changed", &FindReplaceBar::_editor_text_changed);
- ClassDB::bind_method("_search_text_changed", &FindReplaceBar::_search_text_changed);
- ClassDB::bind_method("_search_text_entered", &FindReplaceBar::_search_text_entered);
- ClassDB::bind_method("_replace_text_entered", &FindReplaceBar::_replace_text_entered);
ClassDB::bind_method("_search_current", &FindReplaceBar::search_current);
- ClassDB::bind_method("_search_next", &FindReplaceBar::search_next);
- ClassDB::bind_method("_search_prev", &FindReplaceBar::search_prev);
- ClassDB::bind_method("_replace_pressed", &FindReplaceBar::_replace);
- ClassDB::bind_method("_replace_all_pressed", &FindReplaceBar::_replace_all);
- ClassDB::bind_method("_search_options_changed", &FindReplaceBar::_search_options_changed);
- ClassDB::bind_method("_hide_pressed", &FindReplaceBar::_hide_bar);
ADD_SIGNAL(MethodInfo("search"));
ADD_SIGNAL(MethodInfo("error"));
@@ -613,8 +603,8 @@ FindReplaceBar::FindReplaceBar() {
search_text = memnew(LineEdit);
vbc_lineedit->add_child(search_text);
search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- search_text->connect("text_changed", this, "_search_text_changed");
- search_text->connect("text_entered", this, "_search_text_entered");
+ search_text->connect("text_changed", callable_mp(this, &FindReplaceBar::_search_text_changed));
+ search_text->connect("text_entered", callable_mp(this, &FindReplaceBar::_search_text_entered));
matches_label = memnew(Label);
hbc_button_search->add_child(matches_label);
@@ -623,51 +613,51 @@ FindReplaceBar::FindReplaceBar() {
find_prev = memnew(ToolButton);
hbc_button_search->add_child(find_prev);
find_prev->set_focus_mode(FOCUS_NONE);
- find_prev->connect("pressed", this, "_search_prev");
+ find_prev->connect("pressed", callable_mp(this, &FindReplaceBar::search_prev));
find_next = memnew(ToolButton);
hbc_button_search->add_child(find_next);
find_next->set_focus_mode(FOCUS_NONE);
- find_next->connect("pressed", this, "_search_next");
+ find_next->connect("pressed", callable_mp(this, &FindReplaceBar::search_next));
case_sensitive = memnew(CheckBox);
hbc_option_search->add_child(case_sensitive);
case_sensitive->set_text(TTR("Match Case"));
case_sensitive->set_focus_mode(FOCUS_NONE);
- case_sensitive->connect("toggled", this, "_search_options_changed");
+ case_sensitive->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
whole_words = memnew(CheckBox);
hbc_option_search->add_child(whole_words);
whole_words->set_text(TTR("Whole Words"));
whole_words->set_focus_mode(FOCUS_NONE);
- whole_words->connect("toggled", this, "_search_options_changed");
+ whole_words->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
// replace toolbar
replace_text = memnew(LineEdit);
vbc_lineedit->add_child(replace_text);
replace_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- replace_text->connect("text_entered", this, "_replace_text_entered");
+ replace_text->connect("text_entered", callable_mp(this, &FindReplaceBar::_replace_text_entered));
replace = memnew(Button);
hbc_button_replace->add_child(replace);
replace->set_text(TTR("Replace"));
- replace->connect("pressed", this, "_replace_pressed");
+ replace->connect("pressed", callable_mp(this, &FindReplaceBar::_replace));
replace_all = memnew(Button);
hbc_button_replace->add_child(replace_all);
replace_all->set_text(TTR("Replace All"));
- replace_all->connect("pressed", this, "_replace_all_pressed");
+ replace_all->connect("pressed", callable_mp(this, &FindReplaceBar::_replace_all));
selection_only = memnew(CheckBox);
hbc_option_replace->add_child(selection_only);
selection_only->set_text(TTR("Selection Only"));
selection_only->set_focus_mode(FOCUS_NONE);
- selection_only->connect("toggled", this, "_search_options_changed");
+ selection_only->connect("toggled", callable_mp(this, &FindReplaceBar::_search_options_changed));
hide_button = memnew(TextureButton);
add_child(hide_button);
hide_button->set_focus_mode(FOCUS_NONE);
- hide_button->connect("pressed", this, "_hide_pressed");
+ hide_button->connect("pressed", callable_mp(this, &FindReplaceBar::_hide_bar));
hide_button->set_v_size_flags(SIZE_SHRINK_CENTER);
}
@@ -691,6 +681,16 @@ void CodeTextEditor::_input(const Ref<InputEvent> &event) {
accept_event();
return;
}
+ if (ED_IS_SHORTCUT("script_text_editor/delete_line", key_event)) {
+ delete_lines();
+ accept_event();
+ return;
+ }
+ if (ED_IS_SHORTCUT("script_text_editor/clone_down", key_event)) {
+ clone_lines_down();
+ accept_event();
+ return;
+ }
}
void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
@@ -915,8 +915,9 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_hiding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
text_editor->set_wrap_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/word_wrap"));
- text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guideline"));
- text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_column"));
+ text_editor->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines"));
+ text_editor->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
+ text_editor->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret"));
text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
@@ -1256,7 +1257,7 @@ void CodeTextEditor::clone_lines_down() {
text_editor->cursor_set_line(cursor_new_line);
text_editor->cursor_set_column(cursor_new_column);
if (selection_active) {
- text_editor->select(to_line, to_column, 2 * to_line - from_line, 2 * to_column - from_column);
+ text_editor->select(to_line, to_column, 2 * to_line - from_line, to_line == from_line ? 2 * to_column - from_column : to_column);
}
text_editor->end_complex_operation();
@@ -1632,18 +1633,6 @@ void CodeTextEditor::remove_all_bookmarks() {
void CodeTextEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_input"), &CodeTextEditor::_input);
- ClassDB::bind_method("_text_editor_gui_input", &CodeTextEditor::_text_editor_gui_input);
- ClassDB::bind_method("_line_col_changed", &CodeTextEditor::_line_col_changed);
- ClassDB::bind_method("_text_changed", &CodeTextEditor::_text_changed);
- ClassDB::bind_method("_on_settings_change", &CodeTextEditor::_on_settings_change);
- ClassDB::bind_method("_text_changed_idle_timeout", &CodeTextEditor::_text_changed_idle_timeout);
- ClassDB::bind_method("_code_complete_timer_timeout", &CodeTextEditor::_code_complete_timer_timeout);
- ClassDB::bind_method("_complete_request", &CodeTextEditor::_complete_request);
- ClassDB::bind_method("_font_resize_timeout", &CodeTextEditor::_font_resize_timeout);
- ClassDB::bind_method("_error_pressed", &CodeTextEditor::_error_pressed);
- ClassDB::bind_method("_toggle_scripts_pressed", &CodeTextEditor::_toggle_scripts_pressed);
- ClassDB::bind_method("_warning_button_pressed", &CodeTextEditor::_warning_button_pressed);
- ClassDB::bind_method("_warning_label_gui_input", &CodeTextEditor::_warning_label_gui_input);
ADD_SIGNAL(MethodInfo("validate_script"));
ADD_SIGNAL(MethodInfo("load_theme_settings"));
@@ -1707,7 +1696,7 @@ CodeTextEditor::CodeTextEditor() {
error_column = 0;
toggle_scripts_button = memnew(ToolButton);
- toggle_scripts_button->connect("pressed", this, "_toggle_scripts_pressed");
+ toggle_scripts_button->connect("pressed", callable_mp(this, &CodeTextEditor::_toggle_scripts_pressed));
status_bar->add_child(toggle_scripts_button);
toggle_scripts_button->hide();
@@ -1722,15 +1711,15 @@ CodeTextEditor::CodeTextEditor() {
scroll->add_child(error);
error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
error->set_mouse_filter(MOUSE_FILTER_STOP);
- error->connect("gui_input", this, "_error_pressed");
- find_replace_bar->connect("error", error, "set_text");
+ error->connect("gui_input", callable_mp(this, &CodeTextEditor::_error_pressed));
+ find_replace_bar->connect("error", callable_mp(error, &Label::set_text));
// Warnings
warning_button = memnew(ToolButton);
status_bar->add_child(warning_button);
warning_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
warning_button->set_default_cursor_shape(CURSOR_POINTING_HAND);
- warning_button->connect("pressed", this, "_warning_button_pressed");
+ warning_button->connect("pressed", callable_mp(this, &CodeTextEditor::_warning_button_pressed));
warning_button->set_tooltip(TTR("Warnings"));
warning_count_label = memnew(Label);
@@ -1742,7 +1731,7 @@ CodeTextEditor::CodeTextEditor() {
warning_count_label->set_tooltip(TTR("Warnings"));
warning_count_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("warning_color", "Editor"));
warning_count_label->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
- warning_count_label->connect("gui_input", this, "_warning_label_gui_input");
+ warning_count_label->connect("gui_input", callable_mp(this, &CodeTextEditor::_warning_label_gui_input));
is_warnings_panel_opened = false;
set_warning_nb(0);
@@ -1755,10 +1744,10 @@ CodeTextEditor::CodeTextEditor() {
line_and_col_txt->set_tooltip(TTR("Line and column numbers."));
line_and_col_txt->set_mouse_filter(MOUSE_FILTER_STOP);
- text_editor->connect("gui_input", this, "_text_editor_gui_input");
- text_editor->connect("cursor_changed", this, "_line_col_changed");
- text_editor->connect("text_changed", this, "_text_changed");
- text_editor->connect("request_completion", this, "_complete_request");
+ text_editor->connect("gui_input", callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
+ text_editor->connect("cursor_changed", callable_mp(this, &CodeTextEditor::_line_col_changed));
+ text_editor->connect("text_changed", callable_mp(this, &CodeTextEditor::_text_changed));
+ text_editor->connect("request_completion", callable_mp(this, &CodeTextEditor::_complete_request));
Vector<String> cs;
cs.push_back(".");
cs.push_back(",");
@@ -1766,9 +1755,9 @@ CodeTextEditor::CodeTextEditor() {
cs.push_back("=");
cs.push_back("$");
text_editor->set_completion(true, cs);
- idle->connect("timeout", this, "_text_changed_idle_timeout");
+ idle->connect("timeout", callable_mp(this, &CodeTextEditor::_text_changed_idle_timeout));
- code_complete_timer->connect("timeout", this, "_code_complete_timer_timeout");
+ code_complete_timer->connect("timeout", callable_mp(this, &CodeTextEditor::_code_complete_timer_timeout));
font_resize_val = 0;
font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
@@ -1776,7 +1765,7 @@ CodeTextEditor::CodeTextEditor() {
add_child(font_resize_timer);
font_resize_timer->set_one_shot(true);
font_resize_timer->set_wait_time(0.07);
- font_resize_timer->connect("timeout", this, "_font_resize_timeout");
+ font_resize_timer->connect("timeout", callable_mp(this, &CodeTextEditor::_font_resize_timeout));
- EditorSettings::get_singleton()->connect("settings_changed", this, "_on_settings_change");
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &CodeTextEditor::_on_settings_change));
}
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index deabb06e1a..eea92fb7ed 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -134,10 +134,17 @@ void ConnectDialog::ok_pressed() {
}
void ConnectDialog::_cancel_pressed() {
-
hide();
}
+void ConnectDialog::_item_activated() {
+ _ok_pressed(); // From AcceptDialog.
+}
+
+void ConnectDialog::_text_entered(const String &p_text) {
+ _ok_pressed(); // From AcceptDialog.
+}
+
/*
* Called each time a target node is selected within the target node tree.
*/
@@ -166,8 +173,9 @@ void ConnectDialog::_add_bind() {
switch (vt) {
case Variant::BOOL: value = false; break;
case Variant::INT: value = 0; break;
- case Variant::REAL: value = 0.0; break;
+ case Variant::FLOAT: value = 0.0; break;
case Variant::STRING: value = ""; break;
+ case Variant::STRING_NAME: value = ""; break;
case Variant::VECTOR2: value = Vector2(); break;
case Variant::RECT2: value = Rect2(); break;
case Variant::VECTOR3: value = Vector3(); break;
@@ -233,11 +241,7 @@ void ConnectDialog::_notification(int p_what) {
void ConnectDialog::_bind_methods() {
- ClassDB::bind_method("_advanced_pressed", &ConnectDialog::_advanced_pressed);
ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed);
- ClassDB::bind_method("_tree_node_selected", &ConnectDialog::_tree_node_selected);
- ClassDB::bind_method("_add_bind", &ConnectDialog::_add_bind);
- ClassDB::bind_method("_remove_bind", &ConnectDialog::_remove_bind);
ClassDB::bind_method("_update_ok_enabled", &ConnectDialog::_update_ok_enabled);
ADD_SIGNAL(MethodInfo("connected"));
@@ -304,7 +308,7 @@ bool ConnectDialog::is_editing() const {
* If creating a connection from scratch, sensible defaults are used.
* If editing an existing connection, previous data is retained.
*/
-void ConnectDialog::init(Connection c, bool bEdit) {
+void ConnectDialog::init(ConnectionData c, bool bEdit) {
set_hide_on_ok(false);
@@ -389,8 +393,8 @@ ConnectDialog::ConnectDialog() {
tree = memnew(SceneTreeEditor(false));
tree->set_connecting_signal(true);
- tree->get_scene_tree()->connect("item_activated", this, "_ok");
- tree->connect("node_selected", this, "_tree_node_selected");
+ tree->get_scene_tree()->connect("item_activated", callable_mp(this, &ConnectDialog::_item_activated));
+ tree->connect("node_selected", callable_mp(this, &ConnectDialog::_tree_node_selected));
tree->set_connect_to_script_mode(true);
Node *mc = vbc_left->add_margin_child(TTR("Connect to Script:"), tree, true);
@@ -413,8 +417,9 @@ ConnectDialog::ConnectDialog() {
add_bind_hb->add_child(type_list);
type_list->add_item("bool", Variant::BOOL);
type_list->add_item("int", Variant::INT);
- type_list->add_item("real", Variant::REAL);
+ type_list->add_item("real", Variant::FLOAT);
type_list->add_item("String", Variant::STRING);
+ type_list->add_item("StringName", Variant::STRING_NAME);
type_list->add_item("Vector2", Variant::VECTOR2);
type_list->add_item("Rect2", Variant::RECT2);
type_list->add_item("Vector3", Variant::VECTOR3);
@@ -429,12 +434,12 @@ ConnectDialog::ConnectDialog() {
Button *add_bind = memnew(Button);
add_bind->set_text(TTR("Add"));
add_bind_hb->add_child(add_bind);
- add_bind->connect("pressed", this, "_add_bind");
+ add_bind->connect("pressed", callable_mp(this, &ConnectDialog::_add_bind));
Button *del_bind = memnew(Button);
del_bind->set_text(TTR("Remove"));
add_bind_hb->add_child(del_bind);
- del_bind->connect("pressed", this, "_remove_bind");
+ del_bind->connect("pressed", callable_mp(this, &ConnectDialog::_remove_bind));
vbc_right->add_margin_child(TTR("Add Extra Call Argument:"), add_bind_hb);
@@ -447,13 +452,13 @@ ConnectDialog::ConnectDialog() {
dst_method = memnew(LineEdit);
dst_method->set_h_size_flags(SIZE_EXPAND_FILL);
- dst_method->connect("text_entered", this, "_builtin_text_entered");
+ dst_method->connect("text_entered", callable_mp(this, &ConnectDialog::_text_entered));
dstm_hb->add_child(dst_method);
advanced = memnew(CheckButton);
dstm_hb->add_child(advanced);
advanced->set_text(TTR("Advanced"));
- advanced->connect("pressed", this, "_advanced_pressed");
+ advanced->connect("pressed", callable_mp(this, &ConnectDialog::_advanced_pressed));
// Add spacing so the tree and inspector are the same size.
Control *spacing = memnew(Control);
@@ -500,7 +505,6 @@ Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const {
String text = TTR("Signal:") + " [u][b]" + p_text.get_slice("::", 0) + "[/b][/u]";
text += p_text.get_slice("::", 1).strip_edges() + "\n";
text += p_text.get_slice("::", 2).strip_edges();
- help_bit->set_text(text);
help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
return help_bit;
}
@@ -525,7 +529,7 @@ void ConnectionsDock::_make_or_edit_connection() {
Node *target = selectedNode->get_node(dst_path);
ERR_FAIL_COND(!target);
- Connection cToMake;
+ ConnectDialog::ConnectionData cToMake;
cToMake.source = connect_dialog->get_source();
cToMake.target = target;
cToMake.signal = connect_dialog->get_signal_name();
@@ -555,12 +559,12 @@ void ConnectionsDock::_make_or_edit_connection() {
add_script_function = !found_inherited_function;
}
- PoolStringArray script_function_args;
+ PackedStringArray script_function_args;
if (add_script_function) {
// Pick up args here before "it" is deleted by update_tree.
script_function_args = it->get_metadata(0).operator Dictionary()["args"];
for (int i = 0; i < cToMake.binds.size(); i++) {
- script_function_args.append("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cToMake.binds[i].get_type()));
+ script_function_args.push_back("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cToMake.binds[i].get_type()));
}
}
@@ -585,7 +589,7 @@ void ConnectionsDock::_make_or_edit_connection() {
/*
* Creates single connection w/ undo-redo functionality.
*/
-void ConnectionsDock::_connect(Connection cToMake) {
+void ConnectionsDock::_connect(ConnectDialog::ConnectionData cToMake) {
Node *source = static_cast<Node *>(cToMake.source);
Node *target = static_cast<Node *>(cToMake.target);
@@ -595,8 +599,10 @@ void ConnectionsDock::_connect(Connection cToMake) {
undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"), String(cToMake.signal), String(cToMake.method)));
- undo_redo->add_do_method(source, "connect", cToMake.signal, target, cToMake.method, cToMake.binds, cToMake.flags);
- undo_redo->add_undo_method(source, "disconnect", cToMake.signal, target, cToMake.method);
+ Callable c(target, cToMake.method);
+
+ undo_redo->add_do_method(source, "connect", cToMake.signal, c, cToMake.binds, cToMake.flags);
+ undo_redo->add_undo_method(source, "disconnect", cToMake.signal, c);
undo_redo->add_do_method(this, "update_tree");
undo_redo->add_undo_method(this, "update_tree");
undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
@@ -610,13 +616,15 @@ void ConnectionsDock::_connect(Connection cToMake) {
*/
void ConnectionsDock::_disconnect(TreeItem &item) {
- Connection c = item.get_metadata(0);
+ Connection cd = item.get_metadata(0);
+ ConnectDialog::ConnectionData c = cd;
+
ERR_FAIL_COND(c.source != selectedNode); // Shouldn't happen but... Bugcheck.
undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), c.signal, c.method));
- undo_redo->add_do_method(selectedNode, "disconnect", c.signal, c.target, c.method);
- undo_redo->add_undo_method(selectedNode, "connect", c.signal, c.target, c.method, c.binds, c.flags);
+ undo_redo->add_do_method(selectedNode, "disconnect", c.signal, Callable(c.target, c.method));
+ undo_redo->add_undo_method(selectedNode, "connect", c.signal, Callable(c.target, c.method), c.binds, c.flags);
undo_redo->add_do_method(this, "update_tree");
undo_redo->add_undo_method(this, "update_tree");
undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); // To force redraw of scene tree.
@@ -641,9 +649,10 @@ void ConnectionsDock::_disconnect_all() {
undo_redo->create_action(vformat(TTR("Disconnect all from signal: '%s'"), signalName));
while (child) {
- Connection c = child->get_metadata(0);
- undo_redo->add_do_method(selectedNode, "disconnect", c.signal, c.target, c.method);
- undo_redo->add_undo_method(selectedNode, "connect", c.signal, c.target, c.method, c.binds, c.flags);
+ Connection cd = child->get_metadata(0);
+ ConnectDialog::ConnectionData c = cd;
+ undo_redo->add_do_method(selectedNode, "disconnect", c.signal, Callable(c.target, c.method));
+ undo_redo->add_undo_method(selectedNode, "connect", c.signal, Callable(c.target, c.method), c.binds, c.flags);
child = child->get_next();
}
@@ -720,7 +729,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
StringName dst_method = "_on_" + midname + "_" + signal;
- Connection c;
+ ConnectDialog::ConnectionData c;
c.source = selectedNode;
c.signal = StringName(signalname);
c.target = dst_node;
@@ -733,7 +742,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
/*
* Open connection dialog with Connection data to EDIT an existing connection.
*/
-void ConnectionsDock::_open_connection_dialog(Connection cToEdit) {
+void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData cToEdit) {
Node *src = static_cast<Node *>(cToEdit.source);
Node *dst = static_cast<Node *>(cToEdit.target);
@@ -753,7 +762,8 @@ void ConnectionsDock::_go_to_script(TreeItem &item) {
if (_is_item_signal(item))
return;
- Connection c = item.get_metadata(0);
+ Connection cd = item.get_metadata(0);
+ ConnectDialog::ConnectionData c = cd;
ERR_FAIL_COND(c.source != selectedNode); //shouldn't happen but...bugcheck
if (!c.target)
@@ -858,15 +868,6 @@ void ConnectionsDock::_notification(int p_what) {
void ConnectionsDock::_bind_methods() {
- ClassDB::bind_method("_make_or_edit_connection", &ConnectionsDock::_make_or_edit_connection);
- ClassDB::bind_method("_disconnect_all", &ConnectionsDock::_disconnect_all);
- ClassDB::bind_method("_tree_item_selected", &ConnectionsDock::_tree_item_selected);
- ClassDB::bind_method("_tree_item_activated", &ConnectionsDock::_tree_item_activated);
- ClassDB::bind_method("_handle_signal_menu_option", &ConnectionsDock::_handle_signal_menu_option);
- ClassDB::bind_method("_handle_slot_menu_option", &ConnectionsDock::_handle_slot_menu_option);
- ClassDB::bind_method("_rmb_pressed", &ConnectionsDock::_rmb_pressed);
- ClassDB::bind_method("_close", &ConnectionsDock::_close);
- ClassDB::bind_method("_connect_pressed", &ConnectionsDock::_connect_pressed);
ClassDB::bind_method("update_tree", &ConnectionsDock::update_tree);
}
@@ -943,7 +944,7 @@ void ConnectionsDock::update_tree() {
StringName signal_name = mi.name;
String signaldesc = "(";
- PoolStringArray argnames;
+ PackedStringArray argnames;
if (mi.arguments.size()) {
for (int i = 0; i < mi.arguments.size(); i++) {
@@ -1014,9 +1015,10 @@ void ConnectionsDock::update_tree() {
for (List<Object::Connection>::Element *F = connections.front(); F; F = F->next()) {
- Object::Connection &c = F->get();
- if (!(c.flags & CONNECT_PERSIST))
+ Connection cn = F->get();
+ if (!(cn.flags & CONNECT_PERSIST))
continue;
+ ConnectDialog::ConnectionData c = cn;
Node *target = Object::cast_to<Node>(c.target);
if (!target)
@@ -1041,7 +1043,8 @@ void ConnectionsDock::update_tree() {
TreeItem *item2 = tree->create_item(item);
item2->set_text(0, path);
- item2->set_metadata(0, c);
+ Connection cd = c;
+ item2->set_metadata(0, cd);
item2->set_icon(0, get_icon("Slot", "EditorIcons"));
}
}
@@ -1077,7 +1080,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
vbc->add_child(hb);
hb->add_spacer();
hb->add_child(connect_button);
- connect_button->connect("pressed", this, "_connect_pressed");
+ connect_button->connect("pressed", callable_mp(this, &ConnectionsDock::_connect_pressed));
connect_dialog = memnew(ConnectDialog);
connect_dialog->set_as_toplevel(true);
@@ -1086,26 +1089,26 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
disconnect_all_dialog = memnew(ConfirmationDialog);
disconnect_all_dialog->set_as_toplevel(true);
add_child(disconnect_all_dialog);
- disconnect_all_dialog->connect("confirmed", this, "_disconnect_all");
+ disconnect_all_dialog->connect("confirmed", callable_mp(this, &ConnectionsDock::_disconnect_all));
disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?"));
signal_menu = memnew(PopupMenu);
add_child(signal_menu);
- signal_menu->connect("id_pressed", this, "_handle_signal_menu_option");
+ signal_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
signal_menu->add_item(TTR("Connect..."), CONNECT);
signal_menu->add_item(TTR("Disconnect All"), DISCONNECT_ALL);
slot_menu = memnew(PopupMenu);
add_child(slot_menu);
- slot_menu->connect("id_pressed", this, "_handle_slot_menu_option");
+ slot_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
slot_menu->add_item(TTR("Edit..."), EDIT);
slot_menu->add_item(TTR("Go To Method"), GO_TO_SCRIPT);
slot_menu->add_item(TTR("Disconnect"), DISCONNECT);
- connect_dialog->connect("connected", this, "_make_or_edit_connection");
- tree->connect("item_selected", this, "_tree_item_selected");
- tree->connect("item_activated", this, "_tree_item_activated");
- tree->connect("item_rmb_selected", this, "_rmb_pressed");
+ connect_dialog->connect("connected", callable_mp(this, &ConnectionsDock::_make_or_edit_connection));
+ tree->connect("item_selected", callable_mp(this, &ConnectionsDock::_tree_item_selected));
+ tree->connect("item_activated", callable_mp(this, &ConnectionsDock::_tree_item_activated));
+ tree->connect("item_rmb_selected", callable_mp(this, &ConnectionsDock::_rmb_pressed));
add_constant_override("separation", 3 * EDSCALE);
}
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 7e39d7d904..988a8a1271 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -53,6 +53,36 @@ class ConnectDialog : public ConfirmationDialog {
GDCLASS(ConnectDialog, ConfirmationDialog);
+public:
+ struct ConnectionData {
+ Node *source = nullptr;
+ Node *target = nullptr;
+ StringName signal;
+ StringName method;
+ uint32_t flags = 0;
+ Vector<Variant> binds;
+
+ ConnectionData() {
+ }
+ ConnectionData(const Connection &p_connection) {
+ source = Object::cast_to<Node>(p_connection.signal.get_object());
+ signal = p_connection.signal.get_name();
+ target = Object::cast_to<Node>(p_connection.callable.get_object());
+ method = p_connection.callable.get_method();
+ flags = p_connection.flags;
+ binds = p_connection.binds;
+ }
+ operator Connection() {
+ Connection c;
+ c.signal = ::Signal(source, signal);
+ c.callable = Callable(target, method);
+ c.flags = flags;
+ c.binds = binds;
+ return c;
+ }
+ };
+
+private:
Label *connect_to_label;
LineEdit *from_signal;
Node *source;
@@ -75,6 +105,8 @@ class ConnectDialog : public ConfirmationDialog {
void ok_pressed();
void _cancel_pressed();
+ void _item_activated();
+ void _text_entered(const String &_text);
void _tree_node_selected();
void _add_bind();
void _remove_bind();
@@ -98,7 +130,7 @@ public:
bool get_oneshot() const;
bool is_editing() const;
- void init(Connection c, bool bEdit = false);
+ void init(ConnectionData c, bool bEdit = false);
void popup_dialog(const String &p_for_signal);
ConnectDialog();
@@ -144,7 +176,7 @@ class ConnectionsDock : public VBoxContainer {
Map<StringName, Map<StringName, String> > descr_cache;
void _make_or_edit_connection();
- void _connect(Connection cToMake);
+ void _connect(ConnectDialog::ConnectionData cToMake);
void _disconnect(TreeItem &item);
void _disconnect_all();
@@ -153,7 +185,7 @@ class ConnectionsDock : public VBoxContainer {
bool _is_item_signal(TreeItem &item);
void _open_connection_dialog(TreeItem &item);
- void _open_connection_dialog(Connection cToEdit);
+ void _open_connection_dialog(ConnectDialog::ConnectionData cToEdit);
void _go_to_script(TreeItem &item);
void _handle_signal_menu_option(int option);
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 4adb3844bc..3e09a9a760 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -127,10 +127,10 @@ void CreateDialog::_text_changed(const String &p_newtext) {
void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> k = p_ie;
- if (k.is_valid() && (k->get_scancode() == KEY_UP ||
- k->get_scancode() == KEY_DOWN ||
- k->get_scancode() == KEY_PAGEUP ||
- k->get_scancode() == KEY_PAGEDOWN)) {
+ if (k.is_valid() && (k->get_keycode() == KEY_UP ||
+ k->get_keycode() == KEY_DOWN ||
+ k->get_keycode() == KEY_PAGEUP ||
+ k->get_keycode() == KEY_PAGEDOWN)) {
search_options->call("_gui_input", k);
search_box->accept_event();
@@ -459,13 +459,13 @@ void CreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
favorite->set_icon(get_icon("Favorites", "EditorIcons"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("confirmed", this, "_confirmed");
+ disconnect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible_in_tree()) {
@@ -561,6 +561,10 @@ void CreateDialog::_item_selected() {
get_ok()->set_disabled(false);
}
+void CreateDialog::_hide_requested() {
+ _closed(); // From WindowDialog.
+}
+
void CreateDialog::_favorite_toggled() {
TreeItem *item = search_options->get_selected();
@@ -725,15 +729,6 @@ void CreateDialog::_save_and_update_favorite_list() {
void CreateDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_text_changed"), &CreateDialog::_text_changed);
- ClassDB::bind_method(D_METHOD("_confirmed"), &CreateDialog::_confirmed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &CreateDialog::_sbox_input);
- ClassDB::bind_method(D_METHOD("_item_selected"), &CreateDialog::_item_selected);
- ClassDB::bind_method(D_METHOD("_favorite_toggled"), &CreateDialog::_favorite_toggled);
- ClassDB::bind_method(D_METHOD("_history_selected"), &CreateDialog::_history_selected);
- ClassDB::bind_method(D_METHOD("_favorite_selected"), &CreateDialog::_favorite_selected);
- ClassDB::bind_method(D_METHOD("_history_activated"), &CreateDialog::_history_activated);
- ClassDB::bind_method(D_METHOD("_favorite_activated"), &CreateDialog::_favorite_activated);
ClassDB::bind_method(D_METHOD("_save_and_update_favorite_list"), &CreateDialog::_save_and_update_favorite_list);
ClassDB::bind_method("get_drag_data_fw", &CreateDialog::get_drag_data_fw);
@@ -766,8 +761,8 @@ CreateDialog::CreateDialog() {
favorites->set_hide_root(true);
favorites->set_hide_folding(true);
favorites->set_allow_reselect(true);
- favorites->connect("cell_selected", this, "_favorite_selected");
- favorites->connect("item_activated", this, "_favorite_activated");
+ favorites->connect("cell_selected", callable_mp(this, &CreateDialog::_favorite_selected));
+ favorites->connect("item_activated", callable_mp(this, &CreateDialog::_favorite_activated));
favorites->set_drag_forwarding(this);
favorites->add_constant_override("draw_guides", 1);
@@ -781,8 +776,8 @@ CreateDialog::CreateDialog() {
recent->set_hide_root(true);
recent->set_hide_folding(true);
recent->set_allow_reselect(true);
- recent->connect("cell_selected", this, "_history_selected");
- recent->connect("item_activated", this, "_history_activated");
+ recent->connect("cell_selected", callable_mp(this, &CreateDialog::_history_selected));
+ recent->connect("item_activated", callable_mp(this, &CreateDialog::_history_activated));
recent->add_constant_override("draw_guides", 1);
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -797,23 +792,23 @@ CreateDialog::CreateDialog() {
favorite->set_flat(true);
favorite->set_toggle_mode(true);
search_hb->add_child(favorite);
- favorite->connect("pressed", this, "_favorite_toggled");
+ favorite->connect("pressed", callable_mp(this, &CreateDialog::_favorite_toggled));
vbc->add_margin_child(TTR("Search:"), search_hb);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &CreateDialog::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &CreateDialog::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
- search_options->connect("cell_selected", this, "_item_selected");
+ search_options->connect("item_activated", callable_mp(this, &CreateDialog::_confirmed));
+ search_options->connect("cell_selected", callable_mp(this, &CreateDialog::_item_selected));
base_type = "Object";
preferred_search_result_type = "";
help_bit = memnew(EditorHelpBit);
vbc->add_margin_child(TTR("Description:"), help_bit);
- help_bit->connect("request_hide", this, "_closed");
+ help_bit->connect("request_hide", callable_mp(this, &CreateDialog::_hide_requested));
type_blacklist.insert("PluginScript"); // PluginScript must be initialized before use, which is not possible here
type_blacklist.insert("ScriptCreateDialog"); // This is an exposed editor Node that doesn't have an Editor prefix.
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index a807e50f65..f2e2eb1b04 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -60,6 +60,7 @@ class CreateDialog : public ConfirmationDialog {
Set<StringName> type_blacklist;
void _item_selected();
+ void _hide_requested();
void _update_search();
void _update_favorite_list();
diff --git a/editor/debugger/SCsub b/editor/debugger/SCsub
new file mode 100644
index 0000000000..2b1e889fb0
--- /dev/null
+++ b/editor/debugger/SCsub
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+
+Import('env')
+
+env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
new file mode 100644
index 0000000000..1506d64b63
--- /dev/null
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -0,0 +1,276 @@
+/*************************************************************************/
+/* editor_debugger_inspector.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "editor_debugger_inspector.h"
+
+#include "core/io/marshalls.h"
+#include "core/script_debugger_remote.h"
+#include "editor/editor_node.h"
+#include "scene/debugger/scene_debugger.h"
+
+bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p_value) {
+
+ if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/"))
+ return false;
+
+ prop_values[p_name] = p_value;
+ emit_signal("value_edited", remote_object_id, p_name, p_value);
+ return true;
+}
+
+bool EditorDebuggerRemoteObject::_get(const StringName &p_name, Variant &r_ret) const {
+
+ if (!prop_values.has(p_name))
+ return false;
+
+ r_ret = prop_values[p_name];
+ return true;
+}
+
+void EditorDebuggerRemoteObject::_get_property_list(List<PropertyInfo> *p_list) const {
+
+ p_list->clear(); //sorry, no want category
+ for (const List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) {
+ p_list->push_back(E->get());
+ }
+}
+
+String EditorDebuggerRemoteObject::get_title() {
+ if (remote_object_id.is_valid())
+ return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id);
+ else
+ return "<null>";
+}
+
+Variant EditorDebuggerRemoteObject::get_variant(const StringName &p_name) {
+ Variant var;
+ _get(p_name, var);
+ return var;
+}
+
+void EditorDebuggerRemoteObject::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("get_title"), &EditorDebuggerRemoteObject::get_title);
+ ClassDB::bind_method(D_METHOD("get_variant"), &EditorDebuggerRemoteObject::get_variant);
+ ClassDB::bind_method(D_METHOD("clear"), &EditorDebuggerRemoteObject::clear);
+ ClassDB::bind_method(D_METHOD("get_remote_object_id"), &EditorDebuggerRemoteObject::get_remote_object_id);
+
+ ADD_SIGNAL(MethodInfo("value_edited", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::STRING, "property"), PropertyInfo("value")));
+}
+
+EditorDebuggerInspector::EditorDebuggerInspector() {
+ variables = memnew(EditorDebuggerRemoteObject);
+ variables->editable = false;
+}
+
+EditorDebuggerInspector::~EditorDebuggerInspector() {
+ clear_cache();
+ memdelete(variables);
+}
+
+void EditorDebuggerInspector::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("object_selected", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("object_edited", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property"), PropertyInfo("value")));
+ ADD_SIGNAL(MethodInfo("object_property_updated", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property")));
+}
+
+void EditorDebuggerInspector::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_POSTINITIALIZE:
+ connect("object_id_selected", callable_mp(this, &EditorDebuggerInspector::_object_selected));
+ break;
+ case NOTIFICATION_ENTER_TREE:
+ edit(variables);
+ break;
+ default:
+ break;
+ }
+}
+
+void EditorDebuggerInspector::_object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value) {
+
+ emit_signal("object_edited", p_id, p_prop, p_value);
+}
+
+void EditorDebuggerInspector::_object_selected(ObjectID p_object) {
+
+ emit_signal("object_selected", p_object);
+}
+
+ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
+ EditorDebuggerRemoteObject *debugObj = NULL;
+
+ SceneDebuggerObject obj;
+ obj.deserialize(p_arr);
+ ERR_FAIL_COND_V(obj.id.is_null(), ObjectID());
+
+ if (remote_objects.has(obj.id)) {
+ debugObj = remote_objects[obj.id];
+ } else {
+ debugObj = memnew(EditorDebuggerRemoteObject);
+ debugObj->remote_object_id = obj.id;
+ debugObj->type_name = obj.class_name;
+ remote_objects[obj.id] = debugObj;
+ debugObj->connect("value_edited", callable_mp(this, &EditorDebuggerInspector::_object_edited));
+ }
+
+ int old_prop_size = debugObj->prop_list.size();
+
+ debugObj->prop_list.clear();
+ int new_props_added = 0;
+ Set<String> changed;
+ for (int i = 0; i < obj.properties.size(); i++) {
+
+ PropertyInfo &pinfo = obj.properties[i].first;
+ Variant &var = obj.properties[i].second;
+
+ if (pinfo.type == Variant::OBJECT) {
+ if (var.get_type() == Variant::STRING) {
+ String path = var;
+ if (path.find("::") != -1) {
+ // built-in resource
+ String base_path = path.get_slice("::", 0);
+ if (ResourceLoader::get_resource_type(base_path) == "PackedScene") {
+ if (!EditorNode::get_singleton()->is_scene_open(base_path)) {
+ EditorNode::get_singleton()->load_scene(base_path);
+ }
+ } else {
+ EditorNode::get_singleton()->load_resource(base_path);
+ }
+ }
+ var = ResourceLoader::load(path);
+
+ if (pinfo.hint_string == "Script") {
+ if (debugObj->get_script() != var) {
+ debugObj->set_script(REF());
+ Ref<Script> script(var);
+ if (!script.is_null()) {
+ ScriptInstance *script_instance = script->placeholder_instance_create(debugObj);
+ debugObj->set_script_and_instance(var, script_instance);
+ }
+ }
+ }
+ }
+ }
+
+ //always add the property, since props may have been added or removed
+ debugObj->prop_list.push_back(pinfo);
+
+ if (!debugObj->prop_values.has(pinfo.name)) {
+ new_props_added++;
+ debugObj->prop_values[pinfo.name] = var;
+ } else {
+
+ if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) {
+ debugObj->prop_values[pinfo.name] = var;
+ changed.insert(pinfo.name);
+ }
+ }
+ }
+
+ if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) {
+ //only some may have changed, if so, then update those, if exist
+ for (Set<String>::Element *E = changed.front(); E; E = E->next()) {
+ emit_signal("object_property_updated", debugObj->remote_object_id, E->get());
+ }
+ } else {
+ //full update, because props were added or removed
+ debugObj->update();
+ }
+ return obj.id;
+}
+
+void EditorDebuggerInspector::clear_cache() {
+ for (Map<ObjectID, EditorDebuggerRemoteObject *>::Element *E = remote_objects.front(); E; E = E->next()) {
+ EditorNode *editor = EditorNode::get_singleton();
+ if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) {
+ editor->push_item(NULL);
+ }
+ memdelete(E->value());
+ }
+ remote_objects.clear();
+}
+
+Object *EditorDebuggerInspector::get_object(ObjectID p_id) {
+ if (remote_objects.has(p_id))
+ return remote_objects[p_id];
+ return NULL;
+}
+
+void EditorDebuggerInspector::add_stack_variable(const Array &p_array) {
+
+ ScriptDebuggerRemote::ScriptStackVariable var;
+ var.deserialize(p_array);
+ String n = var.name;
+ Variant v = var.value;
+
+ PropertyHint h = PROPERTY_HINT_NONE;
+ String hs = String();
+
+ if (v.get_type() == Variant::OBJECT) {
+ v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
+ h = PROPERTY_HINT_OBJECT_ID;
+ hs = "Object";
+ }
+ String type;
+ switch (var.type) {
+ case 0:
+ type = "Locals/";
+ break;
+ case 1:
+ type = "Members/";
+ break;
+ case 2:
+ type = "Globals/";
+ break;
+ default:
+ type = "Unknown/";
+ }
+
+ PropertyInfo pinfo;
+ pinfo.name = type + n;
+ pinfo.type = v.get_type();
+ pinfo.hint = h;
+ pinfo.hint_string = hs;
+
+ variables->prop_list.push_back(pinfo);
+ variables->prop_values[type + n] = v;
+ variables->update();
+ edit(variables);
+}
+
+void EditorDebuggerInspector::clear_stack_variables() {
+ variables->clear();
+ variables->update();
+}
+
+String EditorDebuggerInspector::get_stack_variable(const String &p_var) {
+ return variables->get_variant(p_var);
+}
diff --git a/platform/osx/semaphore_osx.h b/editor/debugger/editor_debugger_inspector.h
index 9aa2b47bc8..e1dfbefcf3 100644
--- a/platform/osx/semaphore_osx.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_osx.h */
+/* editor_debugger_inspector.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,32 +28,71 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEMAPHORE_OSX_H
-#define SEMAPHORE_OSX_H
+#ifndef EDITOR_DEBUGGER_INSPECTOR_H
+#define EDITOR_DEBUGGER_INSPECTOR_H
+#include "editor/editor_inspector.h"
-struct cgsem {
- int pipefd[2];
+class EditorDebuggerRemoteObject : public Object {
+
+ GDCLASS(EditorDebuggerRemoteObject, Object);
+
+protected:
+ bool _set(const StringName &p_name, const Variant &p_value);
+ bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _get_property_list(List<PropertyInfo> *p_list) const;
+ static void _bind_methods();
+
+public:
+ bool editable = false;
+ ObjectID remote_object_id;
+ String type_name;
+ List<PropertyInfo> prop_list;
+ Map<StringName, Variant> prop_values;
+
+ ObjectID get_remote_object_id() { return remote_object_id; };
+ String get_title();
+
+ Variant get_variant(const StringName &p_name);
+
+ void clear() {
+ prop_list.clear();
+ prop_values.clear();
+ }
+
+ void update() { _change_notify(); }
+
+ EditorDebuggerRemoteObject(){};
};
-typedef struct cgsem cgsem_t;
+class EditorDebuggerInspector : public EditorInspector {
-#include "core/os/semaphore.h"
+ GDCLASS(EditorDebuggerInspector, EditorInspector);
-class SemaphoreOSX : public SemaphoreOld {
+private:
+ ObjectID inspected_object_id;
+ Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects;
+ EditorDebuggerRemoteObject *variables;
- mutable cgsem_t sem;
+ void _object_selected(ObjectID p_object);
+ void _object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value);
- static SemaphoreOld *create_semaphore_osx();
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
public:
- virtual Error wait();
- virtual Error post();
- virtual int get() const;
+ EditorDebuggerInspector();
+ ~EditorDebuggerInspector();
- static void make_default();
- SemaphoreOSX();
+ // Remote Object cache
+ ObjectID add_object(const Array &p_arr);
+ Object *get_object(ObjectID p_id);
+ void clear_cache();
- ~SemaphoreOSX();
+ // Stack Dump variables
+ String get_stack_variable(const String &p_var);
+ void add_stack_variable(const Array &p_arr);
+ void clear_stack_variables();
};
-#endif // SEMAPHORE_OSX_H
+#endif // EDITOR_DEBUGGER_INSPECTOR_H
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
new file mode 100644
index 0000000000..fba86f2954
--- /dev/null
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -0,0 +1,574 @@
+/*************************************************************************/
+/* editor_debugger_node.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "editor_debugger_node.h"
+
+#include "editor/debugger/editor_debugger_tree.h"
+#include "editor/editor_log.h"
+#include "editor/editor_node.h"
+#include "editor/plugins/script_editor_plugin.h"
+
+template <typename Func>
+void _for_all(TabContainer *p_node, const Func &p_func) {
+ for (int i = 0; i < p_node->get_tab_count(); i++) {
+ ScriptEditorDebugger *dbg = Object::cast_to<ScriptEditorDebugger>(p_node->get_tab_control(i));
+ ERR_FAIL_COND(!dbg);
+ p_func(dbg);
+ }
+}
+
+EditorDebuggerNode *EditorDebuggerNode::singleton = NULL;
+
+EditorDebuggerNode::EditorDebuggerNode() {
+ if (!singleton)
+ singleton = this;
+ server.instance();
+
+ add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
+ add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
+
+ tabs = memnew(TabContainer);
+ tabs->set_tab_align(TabContainer::ALIGN_LEFT);
+ tabs->set_tabs_visible(false);
+ tabs->connect("tab_changed", callable_mp(this, &EditorDebuggerNode::_debugger_changed));
+ add_child(tabs);
+
+ Ref<StyleBoxEmpty> empty;
+ empty.instance();
+ tabs->add_style_override("panel", empty);
+
+ auto_switch_remote_scene_tree = EDITOR_DEF("debugger/auto_switch_to_remote_scene_tree", false);
+ _add_debugger();
+
+ // Remote scene tree
+ remote_scene_tree = memnew(EditorDebuggerTree);
+ remote_scene_tree->connect("object_selected", callable_mp(this, &EditorDebuggerNode::_remote_object_requested));
+ remote_scene_tree->connect("save_node", callable_mp(this, &EditorDebuggerNode::_save_node_requested));
+ EditorNode::get_singleton()->get_scene_tree_dock()->add_remote_tree_editor(remote_scene_tree);
+ EditorNode::get_singleton()->get_scene_tree_dock()->connect("remote_tree_selected", callable_mp(this, &EditorDebuggerNode::request_remote_tree));
+
+ remote_scene_tree_timeout = EDITOR_DEF("debugger/remote_scene_tree_refresh_interval", 1.0);
+ inspect_edited_object_timeout = EDITOR_DEF("debugger/remote_inspect_refresh_interval", 0.2);
+
+ EditorNode *editor = EditorNode::get_singleton();
+ editor->get_undo_redo()->set_method_notify_callback(_method_changeds, this);
+ editor->get_undo_redo()->set_property_notify_callback(_property_changeds, this);
+ editor->get_pause_button()->connect("pressed", callable_mp(this, &EditorDebuggerNode::_paused));
+}
+
+ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
+ ScriptEditorDebugger *node = memnew(ScriptEditorDebugger(EditorNode::get_singleton()));
+
+ int id = tabs->get_tab_count();
+ node->connect("stop_requested", callable_mp(this, &EditorDebuggerNode::_debugger_wants_stop), varray(id));
+ node->connect("stopped", callable_mp(this, &EditorDebuggerNode::_debugger_stopped), varray(id));
+ node->connect("stack_frame_selected", callable_mp(this, &EditorDebuggerNode::_stack_frame_selected), varray(id));
+ node->connect("error_selected", callable_mp(this, &EditorDebuggerNode::_error_selected), varray(id));
+ node->connect("clear_execution", callable_mp(this, &EditorDebuggerNode::_clear_execution));
+ node->connect("breaked", callable_mp(this, &EditorDebuggerNode::_breaked), varray(id));
+ node->connect("remote_tree_updated", callable_mp(this, &EditorDebuggerNode::_remote_tree_updated), varray(id));
+ node->connect("remote_object_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_updated), varray(id));
+ node->connect("remote_object_property_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_property_updated), varray(id));
+ node->connect("remote_object_requested", callable_mp(this, &EditorDebuggerNode::_remote_object_requested), varray(id));
+
+ if (tabs->get_tab_count() > 0) {
+ get_debugger(0)->clear_style();
+ }
+
+ tabs->add_child(node);
+
+ node->set_name("Session " + itos(tabs->get_tab_count()));
+ if (tabs->get_tab_count() > 1) {
+ node->clear_style();
+ tabs->set_tabs_visible(true);
+ tabs->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ }
+
+ return node;
+}
+
+void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
+ const ScriptEditorDebugger *dbg = get_debugger(p_debugger);
+ ERR_FAIL_COND(!dbg);
+ if (dbg != get_current_debugger())
+ return;
+ _text_editor_stack_goto(dbg);
+}
+
+void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p_debugger) {
+ Ref<Script> s = ResourceLoader::load(p_file);
+ emit_signal("goto_script_line", s, p_line - 1);
+}
+
+void EditorDebuggerNode::_text_editor_stack_goto(const ScriptEditorDebugger *p_debugger) {
+ const String file = p_debugger->get_stack_script_file();
+ if (file.empty())
+ return;
+ stack_script = ResourceLoader::load(file);
+ const int line = p_debugger->get_stack_script_line() - 1;
+ emit_signal("goto_script_line", stack_script, line);
+ emit_signal("set_execution", stack_script, line);
+ stack_script.unref(); // Why?!?
+}
+
+void EditorDebuggerNode::_bind_methods() {
+
+ // LiveDebug.
+ ClassDB::bind_method("live_debug_create_node", &EditorDebuggerNode::live_debug_create_node);
+ ClassDB::bind_method("live_debug_instance_node", &EditorDebuggerNode::live_debug_instance_node);
+ ClassDB::bind_method("live_debug_remove_node", &EditorDebuggerNode::live_debug_remove_node);
+ ClassDB::bind_method("live_debug_remove_and_keep_node", &EditorDebuggerNode::live_debug_remove_and_keep_node);
+ ClassDB::bind_method("live_debug_restore_node", &EditorDebuggerNode::live_debug_restore_node);
+ ClassDB::bind_method("live_debug_duplicate_node", &EditorDebuggerNode::live_debug_duplicate_node);
+ ClassDB::bind_method("live_debug_reparent_node", &EditorDebuggerNode::live_debug_reparent_node);
+
+ ADD_SIGNAL(MethodInfo("goto_script_line"));
+ ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
+ ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script")));
+ ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug")));
+}
+
+EditorDebuggerRemoteObject *EditorDebuggerNode::get_inspected_remote_object() {
+ return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_current()));
+}
+
+ScriptEditorDebugger *EditorDebuggerNode::get_debugger(int p_id) const {
+ return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(p_id));
+}
+
+ScriptEditorDebugger *EditorDebuggerNode::get_current_debugger() const {
+ return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(tabs->get_current_tab()));
+}
+
+ScriptEditorDebugger *EditorDebuggerNode::get_default_debugger() const {
+ return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(0));
+}
+
+Error EditorDebuggerNode::start() {
+ stop();
+ if (EDITOR_GET("run/output/always_open_output_on_play")) {
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
+ } else {
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+ }
+
+ int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ const Error err = server->listen(remote_port);
+ if (err != OK) {
+ EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), EditorLog::MSG_TYPE_ERROR);
+ return err;
+ }
+ set_process(true);
+ EditorNode::get_log()->add_message("--- Debugging process started ---", EditorLog::MSG_TYPE_EDITOR);
+ return OK;
+}
+
+void EditorDebuggerNode::stop() {
+ if (server->is_listening()) {
+ server->stop();
+ EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR);
+ }
+ // Also close all debugging sessions.
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ if (dbg->is_session_active())
+ dbg->stop();
+ });
+ _break_state_changed();
+ if (hide_on_stop) {
+ if (is_visible_in_tree())
+ EditorNode::get_singleton()->hide_bottom_panel();
+ }
+ breakpoints.clear();
+ set_process(false);
+}
+
+void EditorDebuggerNode::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ EditorNode::get_singleton()->connect("play_pressed", callable_mp(this, &EditorDebuggerNode::start));
+ EditorNode::get_singleton()->connect("stop_pressed", callable_mp(this, &EditorDebuggerNode::stop));
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
+ EditorNode::get_singleton()->disconnect("play_pressed", callable_mp(this, &EditorDebuggerNode::start));
+ EditorNode::get_singleton()->disconnect("stop_pressed", callable_mp(this, &EditorDebuggerNode::stop));
+ } break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ if (tabs->get_tab_count() > 1) {
+ add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
+ add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
+
+ tabs->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ }
+ } break;
+ default:
+ break;
+ }
+
+ if (p_what != NOTIFICATION_PROCESS || !server->is_listening())
+ return;
+
+ // Errors and warnings
+ int error_count = 0;
+ int warning_count = 0;
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ error_count += dbg->get_error_count();
+ warning_count += dbg->get_warning_count();
+ });
+
+ if (error_count != last_error_count || warning_count != last_warning_count) {
+
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->update_tabs();
+ });
+
+ if (error_count == 0 && warning_count == 0) {
+ debugger_button->set_text(TTR("Debugger"));
+ debugger_button->set_icon(Ref<Texture2D>());
+ } else {
+ debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
+ if (error_count == 0) {
+ debugger_button->set_icon(get_icon("Warning", "EditorIcons"));
+ } else {
+ debugger_button->set_icon(get_icon("Error", "EditorIcons"));
+ }
+ }
+ last_error_count = error_count;
+ last_warning_count = warning_count;
+ }
+
+ // Remote scene tree update
+ remote_scene_tree_timeout -= get_process_delta_time();
+ if (remote_scene_tree_timeout < 0) {
+ remote_scene_tree_timeout = EditorSettings::get_singleton()->get("debugger/remote_scene_tree_refresh_interval");
+ if (remote_scene_tree->is_visible_in_tree()) {
+ get_current_debugger()->request_remote_tree();
+ }
+ }
+
+ // Remote inspector update
+ inspect_edited_object_timeout -= get_process_delta_time();
+ if (inspect_edited_object_timeout < 0) {
+ inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
+ if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
+ get_current_debugger()->request_remote_object(obj->remote_object_id);
+ }
+ }
+
+ // Take connections.
+ if (server->is_connection_available()) {
+ ScriptEditorDebugger *debugger = NULL;
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ if (debugger || dbg->is_session_active())
+ return;
+ debugger = dbg;
+ });
+ if (debugger == NULL) {
+ if (tabs->get_tab_count() <= 4) { // Max 4 debugging sessions active.
+ debugger = _add_debugger();
+ } else {
+ // We already have too many sessions, disconnecting new clients to prevent it from hanging.
+ // (Not keeping a reference to the connection will disconnect it)
+ server->take_connection();
+ return; // Can't add, stop here.
+ }
+ }
+
+ EditorNode::get_singleton()->get_pause_button()->set_disabled(false);
+ // Switch to remote tree view if so desired.
+ auto_switch_remote_scene_tree = (bool)EditorSettings::get_singleton()->get("debugger/auto_switch_to_remote_scene_tree");
+ if (auto_switch_remote_scene_tree) {
+ EditorNode::get_singleton()->get_scene_tree_dock()->show_remote_tree();
+ }
+ // Good to go.
+ EditorNode::get_singleton()->get_scene_tree_dock()->show_tab_buttons();
+ debugger->set_editor_remote_tree(remote_scene_tree);
+ debugger->start(server->take_connection());
+ // Send breakpoints.
+ for (Map<Breakpoint, bool>::Element *E = breakpoints.front(); E; E = E->next()) {
+ const Breakpoint &bp = E->key();
+ debugger->set_breakpoint(bp.source, bp.line, E->get());
+ } // Will arrive too late, how does the regular run work?
+
+ debugger->update_live_edit_root();
+ }
+}
+
+void EditorDebuggerNode::_debugger_stopped(int p_id) {
+ ScriptEditorDebugger *dbg = get_debugger(p_id);
+ ERR_FAIL_COND(!dbg);
+
+ bool found = false;
+ _for_all(tabs, [&](ScriptEditorDebugger *p_debugger) {
+ if (p_debugger->is_session_active())
+ found = true;
+ });
+ if (!found) {
+ EditorNode::get_singleton()->get_pause_button()->set_pressed(false);
+ EditorNode::get_singleton()->get_pause_button()->set_disabled(true);
+ EditorNode::get_singleton()->get_scene_tree_dock()->hide_remote_tree();
+ EditorNode::get_singleton()->get_scene_tree_dock()->hide_tab_buttons();
+ EditorNode::get_singleton()->notify_all_debug_sessions_exited();
+ }
+}
+
+void EditorDebuggerNode::_debugger_wants_stop(int p_id) {
+ // Ask editor to kill PID.
+ int pid = get_debugger(p_id)->get_remote_pid();
+ if (pid)
+ EditorNode::get_singleton()->call_deferred("stop_child_process", pid);
+}
+
+void EditorDebuggerNode::_debugger_changed(int p_tab) {
+ if (get_inspected_remote_object()) {
+ // Clear inspected object, you can only inspect objects in selected debugger.
+ // Hopefully, in the future, we will have one inspector per debugger.
+ EditorNode::get_singleton()->push_item(NULL);
+ }
+ if (remote_scene_tree->is_visible_in_tree()) {
+ get_current_debugger()->request_remote_tree();
+ }
+ if (get_current_debugger()->is_breaked()) {
+ _text_editor_stack_goto(get_current_debugger());
+ }
+}
+
+void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) {
+ script_menu = p_button;
+ script_menu->set_text(TTR("Debug"));
+ script_menu->set_switch_on_hover(true);
+ PopupMenu *p = script_menu->get_popup();
+ p->set_hide_on_window_lose_focus(true);
+ p->add_shortcut(ED_GET_SHORTCUT("debugger/step_into"), DEBUG_STEP);
+ p->add_shortcut(ED_GET_SHORTCUT("debugger/step_over"), DEBUG_NEXT);
+ p->add_separator();
+ p->add_shortcut(ED_GET_SHORTCUT("debugger/break"), DEBUG_BREAK);
+ p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE);
+ p->add_separator();
+ p->add_check_shortcut(ED_GET_SHORTCUT("debugger/keep_debugger_open"), DEBUG_SHOW_KEEP_OPEN);
+ p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR);
+ p->connect("id_pressed", callable_mp(this, &EditorDebuggerNode::_menu_option));
+
+ _break_state_changed();
+ script_menu->show();
+}
+
+void EditorDebuggerNode::_break_state_changed() {
+ const bool breaked = get_current_debugger()->is_breaked();
+ const bool can_debug = get_current_debugger()->is_debuggable();
+ if (breaked) // Show debugger.
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+
+ // Update script menu.
+ if (!script_menu)
+ return;
+ PopupMenu *p = script_menu->get_popup();
+ p->set_item_disabled(p->get_item_index(DEBUG_NEXT), !(breaked && can_debug));
+ p->set_item_disabled(p->get_item_index(DEBUG_STEP), !(breaked && can_debug));
+ p->set_item_disabled(p->get_item_index(DEBUG_BREAK), breaked);
+ p->set_item_disabled(p->get_item_index(DEBUG_CONTINUE), !breaked);
+}
+
+void EditorDebuggerNode::_menu_option(int p_id) {
+ switch (p_id) {
+ case DEBUG_NEXT: {
+ debug_next();
+ } break;
+ case DEBUG_STEP: {
+ debug_step();
+ } break;
+ case DEBUG_BREAK: {
+ debug_break();
+ } break;
+ case DEBUG_CONTINUE: {
+ debug_continue();
+ } break;
+
+ case DEBUG_SHOW_KEEP_OPEN: {
+ bool visible = script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN));
+ hide_on_stop = visible;
+ script_menu->get_popup()->set_item_checked(script_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible);
+ } break;
+ case DEBUG_WITH_EXTERNAL_EDITOR: {
+ bool checked = !script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR));
+ debug_with_external_editor = checked;
+ script_menu->get_popup()->set_item_checked(script_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR), checked);
+ } break;
+ }
+}
+
+void EditorDebuggerNode::_paused() {
+ const bool paused = EditorNode::get_singleton()->get_pause_button()->is_pressed();
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ if (paused && !dbg->is_breaked()) {
+ dbg->debug_break();
+ } else if (!paused && dbg->is_breaked()) {
+ dbg->debug_continue();
+ }
+ });
+}
+
+void EditorDebuggerNode::_breaked(bool p_breaked, bool p_can_debug, int p_debugger) {
+ if (get_current_debugger() != get_debugger(p_debugger)) {
+ if (!p_breaked)
+ return;
+ tabs->set_current_tab(p_debugger);
+ }
+ _break_state_changed();
+ EditorNode::get_singleton()->get_pause_button()->set_pressed(p_breaked);
+ emit_signal("breaked", p_breaked, p_can_debug);
+}
+
+bool EditorDebuggerNode::is_skip_breakpoints() const {
+ return get_default_debugger()->is_skip_breakpoints();
+}
+
+void EditorDebuggerNode::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
+ breakpoints[Breakpoint(p_path, p_line)] = p_enabled;
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->set_breakpoint(p_path, p_line, p_enabled);
+ });
+}
+
+void EditorDebuggerNode::reload_scripts() {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->reload_scripts();
+ });
+}
+
+// LiveEdit/Inspector
+void EditorDebuggerNode::request_remote_tree() {
+ get_current_debugger()->request_remote_tree();
+}
+
+void EditorDebuggerNode::_remote_tree_updated(int p_debugger) {
+ if (p_debugger != tabs->get_current_tab())
+ return;
+ remote_scene_tree->clear();
+ remote_scene_tree->update_scene_tree(get_current_debugger()->get_remote_tree(), p_debugger);
+}
+
+void EditorDebuggerNode::_remote_object_updated(ObjectID p_id, int p_debugger) {
+ if (p_debugger != tabs->get_current_tab())
+ return;
+ if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
+ if (obj->remote_object_id == p_id)
+ return; // Already being edited
+ }
+
+ EditorNode::get_singleton()->push_item(get_current_debugger()->get_remote_object(p_id));
+}
+
+void EditorDebuggerNode::_remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger) {
+ if (p_debugger != tabs->get_current_tab())
+ return;
+ if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
+ if (obj->remote_object_id != p_id)
+ return;
+ EditorNode::get_singleton()->get_inspector()->update_property(p_property);
+ }
+}
+
+void EditorDebuggerNode::_remote_object_requested(ObjectID p_id, int p_debugger) {
+ if (p_debugger != tabs->get_current_tab())
+ return;
+ inspect_edited_object_timeout = 0.7; // Temporarily disable timeout to avoid multiple requests.
+ get_current_debugger()->request_remote_object(p_id);
+}
+
+void EditorDebuggerNode::_save_node_requested(ObjectID p_id, const String &p_file, int p_debugger) {
+ if (p_debugger != tabs->get_current_tab())
+ return;
+ get_current_debugger()->save_node(p_id, p_file);
+}
+
+// Remote inspector/edit.
+void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
+ if (!singleton)
+ return;
+ _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->_method_changed(p_base, p_name, VARIANT_ARG_PASS);
+ });
+}
+
+void EditorDebuggerNode::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) {
+ if (!singleton)
+ return;
+ _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->_property_changed(p_base, p_property, p_value);
+ });
+}
+
+// LiveDebug
+void EditorDebuggerNode::set_live_debugging(bool p_enabled) {
+
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->set_live_debugging(p_enabled);
+ });
+}
+void EditorDebuggerNode::update_live_edit_root() {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->update_live_edit_root();
+ });
+}
+void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_create_node(p_parent, p_type, p_name);
+ });
+}
+void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_instance_node(p_parent, p_path, p_name);
+ });
+}
+void EditorDebuggerNode::live_debug_remove_node(const NodePath &p_at) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_remove_node(p_at);
+ });
+}
+void EditorDebuggerNode::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_remove_and_keep_node(p_at, p_keep_id);
+ });
+}
+void EditorDebuggerNode::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_restore_node(p_id, p_at, p_at_pos);
+ });
+}
+void EditorDebuggerNode::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_duplicate_node(p_at, p_new_name);
+ });
+}
+void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->live_debug_reparent_node(p_at, p_new_place, p_new_name, p_at_pos);
+ });
+}
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
new file mode 100644
index 0000000000..13a1d6dcb3
--- /dev/null
+++ b/editor/debugger/editor_debugger_node.h
@@ -0,0 +1,177 @@
+/*************************************************************************/
+/* editor_debugger_node.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 EDITOR_DEBUGGER_NODE_H
+#define EDITOR_DEBUGGER_NODE_H
+
+#include "core/io/tcp_server.h"
+#include "editor/debugger/script_editor_debugger.h"
+#include "scene/gui/button.h"
+#include "scene/gui/tab_container.h"
+
+class EditorDebuggerTree;
+
+class EditorDebuggerNode : public MarginContainer {
+
+ GDCLASS(EditorDebuggerNode, MarginContainer);
+
+private:
+ enum Options {
+ DEBUG_NEXT,
+ DEBUG_STEP,
+ DEBUG_BREAK,
+ DEBUG_CONTINUE,
+ DEBUG_SHOW_KEEP_OPEN,
+ DEBUG_WITH_EXTERNAL_EDITOR,
+ };
+
+ class Breakpoint {
+ public:
+ String source;
+ int line = 0;
+
+ bool operator<(const Breakpoint &p_b) const {
+ if (line == p_b.line)
+ return source < p_b.source;
+ return line < p_b.line;
+ }
+
+ Breakpoint(){};
+
+ Breakpoint(const String &p_source, int p_line) {
+ line = p_line;
+ source = p_source;
+ }
+ };
+
+ Ref<TCP_Server> server = NULL;
+ TabContainer *tabs = NULL;
+ Button *debugger_button = NULL;
+ MenuButton *script_menu = NULL;
+
+ Ref<Script> stack_script; // Why?!?
+
+ int last_error_count = 0;
+ int last_warning_count = 0;
+
+ float inspect_edited_object_timeout = 0;
+ EditorDebuggerTree *remote_scene_tree = NULL;
+ float remote_scene_tree_timeout = 0.0;
+ bool auto_switch_remote_scene_tree = false;
+ bool debug_with_external_editor = false;
+ bool hide_on_stop = true;
+ ScriptEditorDebugger::CameraOverride camera_override = ScriptEditorDebugger::OVERRIDE_NONE;
+ Map<Breakpoint, bool> breakpoints;
+
+ ScriptEditorDebugger *_add_debugger();
+ EditorDebuggerRemoteObject *get_inspected_remote_object();
+
+ friend class DebuggerEditorPlugin;
+ static EditorDebuggerNode *singleton;
+ EditorDebuggerNode();
+
+protected:
+ void _debugger_stopped(int p_id);
+ void _debugger_wants_stop(int p_id);
+ void _debugger_changed(int p_tab);
+ void _remote_tree_updated(int p_debugger);
+ void _remote_object_updated(ObjectID p_id, int p_debugger);
+ void _remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger);
+ void _remote_object_requested(ObjectID p_id, int p_debugger);
+ void _save_node_requested(ObjectID p_id, const String &p_file, int p_debugger);
+
+ void _clear_execution(REF p_script) {
+ emit_signal("clear_execution", p_script);
+ }
+
+ void _text_editor_stack_goto(const ScriptEditorDebugger *p_debugger);
+ void _stack_frame_selected(int p_debugger);
+ void _error_selected(const String &p_file, int p_line, int p_debugger);
+ void _breaked(bool p_breaked, bool p_can_debug, int p_debugger);
+ void _paused();
+ void _break_state_changed();
+ void _menu_option(int p_id);
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ static EditorDebuggerNode *get_singleton() { return singleton; }
+
+ ScriptEditorDebugger *get_current_debugger() const;
+ ScriptEditorDebugger *get_default_debugger() const;
+ ScriptEditorDebugger *get_debugger(int p_debugger) const;
+
+ void debug_next() { get_default_debugger()->debug_next(); }
+ void debug_step() { get_default_debugger()->debug_step(); }
+ void debug_break() { get_default_debugger()->debug_break(); }
+ void debug_continue() { get_default_debugger()->debug_continue(); }
+
+ void set_script_debug_button(MenuButton *p_button);
+
+ void set_tool_button(Button *p_button) {
+ debugger_button = p_button;
+ }
+
+ String get_var_value(const String &p_var) const { return get_default_debugger()->get_var_value(p_var); }
+ Ref<Script> get_dump_stack_script() const { return stack_script; } // Why do we need this?
+
+ bool get_debug_with_external_editor() { return debug_with_external_editor; }
+
+ bool is_skip_breakpoints() const;
+ void set_breakpoint(const String &p_path, int p_line, bool p_enabled);
+ void reload_scripts();
+
+ // Remote inspector/edit.
+ void request_remote_tree();
+ static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE);
+ static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value);
+
+ // LiveDebug
+ void set_live_debugging(bool p_enabled);
+ void update_live_edit_root();
+ void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name);
+ void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name);
+ void live_debug_remove_node(const NodePath &p_at);
+ void live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id);
+ void live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos);
+ void live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name);
+ void live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos);
+
+ // Camera
+ void set_camera_override(ScriptEditorDebugger::CameraOverride p_override) { camera_override = p_override; }
+ ScriptEditorDebugger::CameraOverride get_camera_override() { return camera_override; }
+
+ Error start();
+
+ void stop();
+};
+#endif // EDITOR_DEBUGGER_NODE_H
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
new file mode 100644
index 0000000000..441f6082c3
--- /dev/null
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -0,0 +1,269 @@
+/*************************************************************************/
+/* editor_debugger_tree.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "editor_debugger_tree.h"
+
+#include "editor/editor_node.h"
+#include "scene/debugger/scene_debugger.h"
+#include "scene/resources/packed_scene.h"
+
+EditorDebuggerTree::EditorDebuggerTree() {
+ set_v_size_flags(SIZE_EXPAND_FILL);
+ set_allow_rmb_select(true);
+
+ // Popup
+ item_menu = memnew(PopupMenu);
+ item_menu->connect("id_pressed", callable_mp(this, &EditorDebuggerTree::_item_menu_id_pressed));
+ add_child(item_menu);
+
+ // File Dialog
+ file_dialog = memnew(EditorFileDialog);
+ file_dialog->connect("file_selected", callable_mp(this, &EditorDebuggerTree::_file_selected));
+ add_child(file_dialog);
+}
+
+void EditorDebuggerTree::_notification(int p_what) {
+ if (p_what == NOTIFICATION_POSTINITIALIZE) {
+ connect("cell_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_selected));
+ connect("item_collapsed", callable_mp(this, &EditorDebuggerTree::_scene_tree_folded));
+ connect("item_rmb_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_rmb_selected));
+ }
+}
+
+void EditorDebuggerTree::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("object_selected", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::INT, "debugger")));
+ ADD_SIGNAL(MethodInfo("save_node", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::STRING, "filename"), PropertyInfo(Variant::INT, "debugger")));
+}
+
+void EditorDebuggerTree::_scene_tree_selected() {
+
+ if (updating_scene_tree) {
+ return;
+ }
+
+ TreeItem *item = get_selected();
+ if (!item) {
+ return;
+ }
+
+ inspected_object_id = uint64_t(item->get_metadata(0));
+
+ emit_signal("object_selected", inspected_object_id, debugger_id);
+}
+
+void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) {
+
+ if (updating_scene_tree) {
+
+ return;
+ }
+ TreeItem *item = Object::cast_to<TreeItem>(p_obj);
+
+ if (!item)
+ return;
+
+ ObjectID id = ObjectID(uint64_t(item->get_metadata(0)));
+ if (unfold_cache.has(id)) {
+ unfold_cache.erase(id);
+ } else {
+ unfold_cache.insert(id);
+ }
+}
+
+void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position) {
+
+ TreeItem *item = get_item_at_position(p_position);
+ if (!item)
+ return;
+
+ item->select(0);
+
+ item_menu->clear();
+ item_menu->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE);
+ item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH);
+ item_menu->set_global_position(get_global_mouse_position());
+ item_menu->popup();
+}
+
+/// Populates inspect_scene_tree given data in nodes as a flat list, encoded depth first.
+///
+/// Given a nodes array like [R,A,B,C,D,E] the following Tree will be generated, assuming
+/// filter is an empty String, R and A child count are 2, B is 1 and C, D and E are 0.
+///
+/// R
+/// |-A
+/// | |-B
+/// | | |-C
+/// | |
+/// | |-D
+/// |
+/// |-E
+///
+void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger) {
+ updating_scene_tree = true;
+ const String last_path = get_selected_path();
+ const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
+
+ // Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion.
+ List<Pair<TreeItem *, int> > parents;
+ for (int i = 0; i < p_tree->nodes.size(); i++) {
+ TreeItem *parent = NULL;
+ if (parents.size()) { // Find last parent.
+ Pair<TreeItem *, int> &p = parents[0];
+ parent = p.first;
+ if (!(--p.second)) { // If no child left, remove it.
+ parents.pop_front();
+ }
+ }
+ // Add this node.
+ const SceneDebuggerTree::RemoteNode &node = p_tree->nodes[i];
+ TreeItem *item = create_item(parent);
+ item->set_text(0, node.name);
+ item->set_tooltip(0, TTR("Type:") + " " + node.type_name);
+ Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(node.type_name, "");
+ if (icon.is_valid()) {
+ item->set_icon(0, icon);
+ }
+ item->set_metadata(0, node.id);
+
+ // Set current item as collapsed if necessary (root is never collapsed)
+ if (parent) {
+ if (!unfold_cache.has(node.id)) {
+ item->set_collapsed(true);
+ }
+ }
+ // Select previously selected node.
+ if (debugger_id == p_debugger) { // Can use remote id.
+ if (node.id == inspected_object_id) {
+ item->select(0);
+ }
+ } else { // Must use path
+ if (last_path == _get_path(item)) {
+ updating_scene_tree = false; // Force emission of new selection
+ item->select(0);
+ updating_scene_tree = true;
+ }
+ }
+
+ // Add in front of the parents stack if children are expected.
+ if (node.child_count) {
+ parents.push_front(Pair<TreeItem *, int>(item, node.child_count));
+ } else {
+ // Apply filters.
+ while (parent) {
+ const bool had_siblings = item->get_prev() || item->get_next();
+ if (filter.is_subsequence_ofi(item->get_text(0)))
+ break; // Filter matches, must survive.
+ parent->remove_child(item);
+ memdelete(item);
+ if (had_siblings)
+ break; // Parent must survive.
+ item = parent;
+ parent = item->get_parent();
+ // Check if parent expects more children.
+ for (int j = 0; j < parents.size(); j++) {
+ if (parents[j].first == item) {
+ parent = NULL;
+ break; // Might have more children.
+ }
+ }
+ }
+ }
+ }
+ debugger_id = p_debugger; // Needed by hook, could be avoided if every debugger had its own tree
+ updating_scene_tree = false;
+}
+
+String EditorDebuggerTree::get_selected_path() {
+ if (!get_selected())
+ return "";
+ return _get_path(get_selected());
+}
+
+String EditorDebuggerTree::_get_path(TreeItem *p_item) {
+ ERR_FAIL_COND_V(!p_item, "");
+
+ if (p_item->get_parent() == NULL) {
+ return "/root";
+ }
+ String text = p_item->get_text(0);
+ TreeItem *cur = p_item->get_parent();
+ while (cur) {
+ text = cur->get_text(0) + "/" + text;
+ cur = cur->get_parent();
+ }
+ return "/" + text;
+}
+
+void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
+
+ switch (p_option) {
+
+ case ITEM_MENU_SAVE_REMOTE_NODE: {
+
+ file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES);
+ file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
+
+ List<String> extensions;
+ Ref<PackedScene> sd = memnew(PackedScene);
+ ResourceSaver::get_recognized_extensions(sd, &extensions);
+ file_dialog->clear_filters();
+ for (int i = 0; i < extensions.size(); i++) {
+ file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
+ }
+
+ file_dialog->popup_centered_ratio();
+ } break;
+ case ITEM_MENU_COPY_NODE_PATH: {
+
+ String text = get_selected_path();
+ if (text.empty()) {
+ return;
+ } else if (text == "/root") {
+ text = ".";
+ } else {
+ text = text.replace("/root/", "");
+ int slash = text.find("/");
+ if (slash < 0) {
+ text = ".";
+ } else {
+ text = text.substr(slash + 1);
+ }
+ }
+ OS::get_singleton()->set_clipboard(text);
+ } break;
+ }
+}
+
+void EditorDebuggerTree::_file_selected(const String &p_file) {
+ if (inspected_object_id.is_null())
+ return;
+ emit_signal("save_node", inspected_object_id, p_file, debugger_id);
+}
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
new file mode 100644
index 0000000000..d9084bc596
--- /dev/null
+++ b/editor/debugger/editor_debugger_tree.h
@@ -0,0 +1,74 @@
+/*************************************************************************/
+/* editor_debugger_tree.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "scene/gui/tree.h"
+
+#ifndef EDITOR_DEBUGGER_TREE_H
+#define EDITOR_DEBUGGER_TREE_H
+
+class SceneDebuggerTree;
+class EditorFileDialog;
+
+class EditorDebuggerTree : public Tree {
+
+ GDCLASS(EditorDebuggerTree, Tree);
+
+private:
+ enum ItemMenu {
+ ITEM_MENU_SAVE_REMOTE_NODE,
+ ITEM_MENU_COPY_NODE_PATH,
+ };
+
+ ObjectID inspected_object_id;
+ int debugger_id = 0;
+ bool updating_scene_tree = false;
+ Set<ObjectID> unfold_cache;
+ PopupMenu *item_menu = NULL;
+ EditorFileDialog *file_dialog = NULL;
+
+ String _get_path(TreeItem *p_item);
+ void _scene_tree_folded(Object *p_obj);
+ void _scene_tree_selected();
+ void _scene_tree_rmb_selected(const Vector2 &p_position);
+ void _item_menu_id_pressed(int p_option);
+ void _file_selected(const String &p_file);
+
+protected:
+ static void _bind_methods();
+ void _notification(int p_what);
+
+public:
+ String get_selected_path();
+ ObjectID get_selected_object();
+ int get_current_debugger(); // Would love to have one tree for every debugger.
+ void update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger);
+ EditorDebuggerTree();
+};
+#endif // EDITOR_DEBUGGER_TREE_H
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
new file mode 100644
index 0000000000..169ff61e71
--- /dev/null
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -0,0 +1,1838 @@
+/*************************************************************************/
+/* script_editor_debugger.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "script_editor_debugger.h"
+
+#include "core/io/marshalls.h"
+#include "core/project_settings.h"
+#include "core/script_debugger_remote.h"
+#include "core/ustring.h"
+#include "editor/editor_log.h"
+#include "editor/editor_network_profiler.h"
+#include "editor/editor_node.h"
+#include "editor/editor_profiler.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_visual_profiler.h"
+#include "editor/plugins/canvas_item_editor_plugin.h"
+#include "editor/plugins/spatial_editor_plugin.h"
+#include "editor/property_editor.h"
+#include "main/performance.h"
+#include "scene/debugger/scene_debugger.h"
+#include "scene/gui/dialogs.h"
+#include "scene/gui/label.h"
+#include "scene/gui/line_edit.h"
+#include "scene/gui/margin_container.h"
+#include "scene/gui/rich_text_label.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/split_container.h"
+#include "scene/gui/tab_container.h"
+#include "scene/gui/texture_button.h"
+#include "scene/gui/tree.h"
+#include "scene/resources/packed_scene.h"
+
+void ScriptEditorDebugger::_put_msg(String p_message, Array p_data) {
+ if (is_session_active()) {
+ Array msg;
+ msg.push_back(p_message);
+ msg.push_back(p_data);
+ ppeer->put_var(msg);
+ }
+}
+
+void ScriptEditorDebugger::debug_copy() {
+ String msg = reason->get_text();
+ if (msg == "") return;
+ OS::get_singleton()->set_clipboard(msg);
+}
+
+void ScriptEditorDebugger::debug_skip_breakpoints() {
+ skip_breakpoints_value = !skip_breakpoints_value;
+ if (skip_breakpoints_value)
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOn", "EditorIcons"));
+ else
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
+
+ Array msg;
+ msg.push_back(skip_breakpoints_value);
+ _put_msg("set_skip_breakpoints", msg);
+}
+
+void ScriptEditorDebugger::debug_next() {
+
+ ERR_FAIL_COND(!breaked);
+
+ _put_msg("next", Array());
+ _clear_execution();
+}
+void ScriptEditorDebugger::debug_step() {
+
+ ERR_FAIL_COND(!breaked);
+
+ _put_msg("step", Array());
+ _clear_execution();
+}
+
+void ScriptEditorDebugger::debug_break() {
+
+ ERR_FAIL_COND(breaked);
+
+ _put_msg("break", Array());
+}
+
+void ScriptEditorDebugger::debug_continue() {
+
+ ERR_FAIL_COND(!breaked);
+
+ // Allow focus stealing only if we actually run this client for security.
+ if (remote_pid && EditorNode::get_singleton()->has_child_process(remote_pid))
+ OS::get_singleton()->enable_for_stealing_focus(remote_pid);
+
+ _clear_execution();
+ _put_msg("continue", Array());
+}
+
+void ScriptEditorDebugger::update_tabs() {
+ if (error_count == 0 && warning_count == 0) {
+ errors_tab->set_name(TTR("Errors"));
+ tabs->set_tab_icon(errors_tab->get_index(), Ref<Texture2D>());
+ } else {
+ errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
+ if (error_count == 0) {
+ tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons"));
+ } else {
+ tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons"));
+ }
+ }
+}
+
+void ScriptEditorDebugger::clear_style() {
+ tabs->add_style_override("panel", NULL);
+}
+
+void ScriptEditorDebugger::save_node(ObjectID p_id, const String &p_file) {
+ Array msg;
+ msg.push_back(p_id);
+ msg.push_back(p_file);
+ _put_msg("save_node", msg);
+}
+
+void ScriptEditorDebugger::_file_selected(const String &p_file) {
+ Error err;
+ FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
+
+ if (err != OK) {
+ ERR_PRINT("Failed to open " + p_file);
+ return;
+ }
+ Vector<String> line;
+ line.resize(Performance::MONITOR_MAX);
+
+ // signatures
+ for (int i = 0; i < Performance::MONITOR_MAX; i++) {
+ line.write[i] = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
+ }
+ file->store_csv_line(line);
+
+ // values
+ List<Vector<float> >::Element *E = perf_history.back();
+ while (E) {
+
+ Vector<float> &perf_data = E->get();
+ for (int i = 0; i < perf_data.size(); i++) {
+
+ line.write[i] = String::num_real(perf_data[i]);
+ }
+ file->store_csv_line(line);
+ E = E->prev();
+ }
+ file->store_string("\n");
+
+ Vector<Vector<String> > profiler_data = profiler->get_data_as_csv();
+ for (int i = 0; i < profiler_data.size(); i++) {
+ file->store_csv_line(profiler_data[i]);
+ }
+}
+
+void ScriptEditorDebugger::request_remote_tree() {
+
+ _put_msg("request_scene_tree", Array());
+}
+
+const SceneDebuggerTree *ScriptEditorDebugger::get_remote_tree() {
+ return scene_tree;
+}
+
+void ScriptEditorDebugger::update_remote_object(ObjectID p_obj_id, const String &p_prop, const Variant &p_value) {
+
+ Array msg;
+ msg.push_back(p_obj_id);
+ msg.push_back(p_prop);
+ msg.push_back(p_value);
+ _put_msg("set_object_property", msg);
+}
+
+void ScriptEditorDebugger::request_remote_object(ObjectID p_obj_id) {
+
+ ERR_FAIL_COND(p_obj_id.is_null());
+ Array msg;
+ msg.push_back(p_obj_id);
+ _put_msg("inspect_object", msg);
+}
+
+Object *ScriptEditorDebugger::get_remote_object(ObjectID p_id) {
+ return inspector->get_object(p_id);
+}
+
+void ScriptEditorDebugger::_remote_object_selected(ObjectID p_id) {
+ emit_signal("remote_object_requested", p_id);
+}
+
+void ScriptEditorDebugger::_remote_object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value) {
+ update_remote_object(p_id, p_prop, p_value);
+ request_remote_object(p_id);
+}
+
+void ScriptEditorDebugger::_remote_object_property_updated(ObjectID p_id, const String &p_property) {
+ emit_signal("remote_object_property_updated", p_id, p_property);
+}
+
+void ScriptEditorDebugger::_video_mem_request() {
+
+ _put_msg("request_video_mem", Array());
+}
+
+Size2 ScriptEditorDebugger::get_minimum_size() const {
+
+ Size2 ms = MarginContainer::get_minimum_size();
+ ms.y = MAX(ms.y, 250 * EDSCALE);
+ return ms;
+}
+
+void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
+
+ if (p_msg == "debug_enter") {
+
+ _put_msg("get_stack_dump", Array());
+
+ ERR_FAIL_COND(p_data.size() != 2);
+ bool can_continue = p_data[0];
+ String error = p_data[1];
+ breaked = true;
+ can_debug = can_continue;
+ _update_buttons_state();
+ _set_reason_text(error, MESSAGE_ERROR);
+ emit_signal("breaked", true, can_continue);
+ OS::get_singleton()->move_window_to_foreground();
+ if (error != "") {
+ tabs->set_current_tab(0);
+ }
+ profiler->set_enabled(false);
+ inspector->clear_cache(); // Take a chance to force remote objects update.
+
+ } else if (p_msg == "debug_exit") {
+
+ breaked = false;
+ can_debug = false;
+ _clear_execution();
+ _update_buttons_state();
+ _set_reason_text(TTR("Execution resumed."), MESSAGE_SUCCESS);
+ emit_signal("breaked", false, false);
+ profiler->set_enabled(true);
+ profiler->disable_seeking();
+ } else if (p_msg == "message:set_pid") {
+
+ ERR_FAIL_COND(p_data.size() < 1);
+ remote_pid = p_data[0];
+ } else if (p_msg == "message:click_ctrl") {
+
+ ERR_FAIL_COND(p_data.size() < 2);
+ clicked_ctrl->set_text(p_data[0]);
+ clicked_ctrl_type->set_text(p_data[1]);
+ } else if (p_msg == "message:scene_tree") {
+
+ scene_tree->nodes.clear();
+ scene_tree->deserialize(p_data);
+ emit_signal("remote_tree_updated");
+ _update_buttons_state();
+ } else if (p_msg == "message:inspect_object") {
+
+ ObjectID id = inspector->add_object(p_data);
+ if (id.is_valid())
+ emit_signal("remote_object_updated", id);
+ } else if (p_msg == "message:video_mem") {
+
+ vmem_tree->clear();
+ TreeItem *root = vmem_tree->create_item();
+ ScriptDebuggerRemote::ResourceUsage usage;
+ usage.deserialize(p_data);
+
+ int total = 0;
+
+ for (List<ScriptDebuggerRemote::ResourceInfo>::Element *E = usage.infos.front(); E; E = E->next()) {
+
+ TreeItem *it = vmem_tree->create_item(root);
+ String type = E->get().type;
+ int bytes = E->get().vram;
+ it->set_text(0, E->get().path);
+ it->set_text(1, type);
+ it->set_text(2, E->get().format);
+ it->set_text(3, String::humanize_size(bytes));
+ total += bytes;
+
+ if (has_icon(type, "EditorIcons"))
+ it->set_icon(0, get_icon(type, "EditorIcons"));
+ }
+
+ vmem_total->set_tooltip(TTR("Bytes:") + " " + itos(total));
+ vmem_total->set_text(String::humanize_size(total));
+
+ } else if (p_msg == "stack_dump") {
+
+ ScriptDebuggerRemote::ScriptStackDump stack;
+ stack.deserialize(p_data);
+
+ stack_dump->clear();
+ inspector->clear_stack_variables();
+ TreeItem *r = stack_dump->create_item();
+
+ for (int i = 0; i < stack.frames.size(); i++) {
+
+ TreeItem *s = stack_dump->create_item(r);
+ Dictionary d;
+ d["frame"] = i;
+ d["file"] = stack.frames[i].file;
+ d["function"] = stack.frames[i].func;
+ d["line"] = stack.frames[i].line;
+ s->set_metadata(0, d);
+
+ String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + d["function"];
+ s->set_text(0, line);
+
+ if (i == 0)
+ s->select(0);
+ }
+ } else if (p_msg == "stack_frame_vars") {
+
+ inspector->clear_stack_variables();
+
+ } else if (p_msg == "stack_frame_var") {
+
+ inspector->add_stack_variable(p_data);
+
+ } else if (p_msg == "output") {
+ ERR_FAIL_COND(p_data.size() < 1);
+ String t = p_data[0];
+ EditorNode::get_log()->add_message(t);
+
+ } else if (p_msg == "performance") {
+ Vector<float> p;
+ p.resize(p_data.size());
+ for (int i = 0; i < p_data.size(); i++) {
+ p.write[i] = p_data[i];
+ if (i < perf_items.size()) {
+
+ const float value = p[i];
+ String label = rtos(value);
+ String tooltip = label;
+ switch (Performance::MonitorType((int)perf_items[i]->get_metadata(1))) {
+ case Performance::MONITOR_TYPE_MEMORY: {
+ label = String::humanize_size(value);
+ tooltip = label;
+ } break;
+ case Performance::MONITOR_TYPE_TIME: {
+ label = rtos(value * 1000).pad_decimals(2) + " ms";
+ tooltip = label;
+ } break;
+ default: {
+ tooltip += " " + perf_items[i]->get_text(0);
+ } break;
+ }
+
+ perf_items[i]->set_text(1, label);
+ perf_items[i]->set_tooltip(1, tooltip);
+ if (p[i] > perf_max[i])
+ perf_max.write[i] = p[i];
+ }
+ }
+ perf_history.push_front(p);
+ perf_draw->update();
+
+ } else if (p_msg == "visual_profile") {
+ // TODO check me.
+ uint64_t frame = p_data[0];
+ Vector<String> names = p_data[1];
+ Vector<real_t> values = p_data[2];
+
+ EditorVisualProfiler::Metric metric;
+ metric.areas.resize(names.size());
+ metric.frame_number = frame;
+ metric.valid = true;
+
+ {
+ EditorVisualProfiler::Metric::Area *areas_ptr = metric.areas.ptrw();
+ int metric_count = names.size();
+
+ const String *rs = names.ptr();
+ const real_t *rr = values.ptr();
+
+ for (int i = 0; i < metric_count; i++) {
+
+ areas_ptr[i].name = rs[i];
+ areas_ptr[i].cpu_time = rr[i * 2 + 0];
+ areas_ptr[i].gpu_time = rr[i * 2 + 1];
+ }
+ }
+ visual_profiler->add_frame_metric(metric);
+
+ } else if (p_msg == "error") {
+
+ ScriptDebuggerRemote::OutputError oe;
+ ERR_FAIL_COND_MSG(oe.deserialize(p_data) == false, "Failed to deserialize error message");
+
+ // Format time.
+ Array time_vals;
+ time_vals.push_back(oe.hr);
+ time_vals.push_back(oe.min);
+ time_vals.push_back(oe.sec);
+ time_vals.push_back(oe.msec);
+ bool e;
+ String time = String("%d:%02d:%02d:%04d").sprintf(time_vals, &e);
+
+ // Rest of the error data.
+ bool source_is_project_file = oe.source_file.begins_with("res://");
+
+ // Metadata to highlight error line in scripts.
+ Array source_meta;
+ source_meta.push_back(oe.source_file);
+ source_meta.push_back(oe.source_line);
+
+ // Create error tree to display above error or warning details.
+ TreeItem *r = error_tree->get_root();
+ if (!r) {
+ r = error_tree->create_item();
+ }
+
+ // Also provide the relevant details as tooltip to quickly check without
+ // uncollapsing the tree.
+ String tooltip = oe.warning ? TTR("Warning:") : TTR("Error:");
+
+ TreeItem *error = error_tree->create_item(r);
+ error->set_collapsed(true);
+
+ error->set_icon(0, get_icon(oe.warning ? "Warning" : "Error", "EditorIcons"));
+ error->set_text(0, time);
+ error->set_text_align(0, TreeItem::ALIGN_LEFT);
+
+ String error_title;
+ // Include method name, when given, in error title.
+ if (!oe.source_func.empty())
+ error_title += oe.source_func + ": ";
+ // If we have a (custom) error message, use it as title, and add a C++ Error
+ // item with the original error condition.
+ error_title += oe.error_descr.empty() ? oe.error : oe.error_descr;
+ error->set_text(1, error_title);
+ tooltip += " " + error_title + "\n";
+
+ if (!oe.error_descr.empty()) {
+ // Add item for C++ error condition.
+ TreeItem *cpp_cond = error_tree->create_item(error);
+ cpp_cond->set_text(0, "<" + TTR("C++ Error") + ">");
+ cpp_cond->set_text(1, oe.error);
+ cpp_cond->set_text_align(0, TreeItem::ALIGN_LEFT);
+ tooltip += TTR("C++ Error:") + " " + oe.error + "\n";
+ if (source_is_project_file)
+ cpp_cond->set_metadata(0, source_meta);
+ }
+ Vector<uint8_t> v;
+ v.resize(100);
+
+ // Source of the error.
+ String source_txt = (source_is_project_file ? oe.source_file.get_file() : oe.source_file) + ":" + itos(oe.source_line);
+ if (!oe.source_func.empty())
+ source_txt += " @ " + oe.source_func + "()";
+
+ TreeItem *cpp_source = error_tree->create_item(error);
+ cpp_source->set_text(0, "<" + (source_is_project_file ? TTR("Source") : TTR("C++ Source")) + ">");
+ cpp_source->set_text(1, source_txt);
+ cpp_source->set_text_align(0, TreeItem::ALIGN_LEFT);
+ tooltip += (source_is_project_file ? TTR("Source:") : TTR("C++ Source:")) + " " + source_txt + "\n";
+
+ // Set metadata to highlight error line in scripts.
+ if (source_is_project_file) {
+ error->set_metadata(0, source_meta);
+ cpp_source->set_metadata(0, source_meta);
+ }
+
+ error->set_tooltip(0, tooltip);
+ error->set_tooltip(1, tooltip);
+
+ // Format stack trace.
+ // stack_items_count is the number of elements to parse, with 3 items per frame
+ // of the stack trace (script, method, line).
+ const ScriptLanguage::StackInfo *infos = oe.callstack.ptr();
+ for (unsigned int i = 0; i < (unsigned int)oe.callstack.size(); i++) {
+
+ TreeItem *stack_trace = error_tree->create_item(error);
+
+ Array meta;
+ meta.push_back(infos[i].file);
+ meta.push_back(infos[i].line);
+ stack_trace->set_metadata(0, meta);
+
+ if (i == 0) {
+ stack_trace->set_text(0, "<" + TTR("Stack Trace") + ">");
+ stack_trace->set_text_align(0, TreeItem::ALIGN_LEFT);
+ error->set_metadata(0, meta);
+ }
+ stack_trace->set_text(1, infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()");
+ }
+
+ if (oe.warning)
+ warning_count++;
+ else
+ error_count++;
+
+ } else if (p_msg == "profile_sig") {
+ // Cache a profiler signature.
+ ScriptDebuggerRemote::ProfilerSignature sig;
+ sig.deserialize(p_data);
+ profiler_signature[sig.id] = sig.name;
+
+ } else if (p_msg == "profile_frame" || p_msg == "profile_total") {
+ EditorProfiler::Metric metric;
+ ScriptDebuggerRemote::ProfilerFrame frame;
+ frame.deserialize(p_data);
+ metric.valid = true;
+ metric.frame_number = frame.frame_number;
+ metric.frame_time = frame.frame_time;
+ metric.idle_time = frame.idle_time;
+ metric.physics_time = frame.physics_time;
+ metric.physics_frame_time = frame.physics_frame_time;
+ int frame_data_amount = frame.frames_data.size();
+ int frame_function_amount = frame.frame_functions.size();
+
+ if (frame_data_amount) {
+ EditorProfiler::Metric::Category frame_time;
+ frame_time.signature = "category_frame_time";
+ frame_time.name = "Frame Time";
+ frame_time.total_time = metric.frame_time;
+
+ EditorProfiler::Metric::Category::Item item;
+ item.calls = 1;
+ item.line = 0;
+
+ item.name = "Physics Time";
+ item.total = metric.physics_time;
+ item.self = item.total;
+ item.signature = "physics_time";
+
+ frame_time.items.push_back(item);
+
+ item.name = "Idle Time";
+ item.total = metric.idle_time;
+ item.self = item.total;
+ item.signature = "idle_time";
+
+ frame_time.items.push_back(item);
+
+ item.name = "Physics Frame Time";
+ item.total = metric.physics_frame_time;
+ item.self = item.total;
+ item.signature = "physics_frame_time";
+
+ frame_time.items.push_back(item);
+
+ metric.categories.push_back(frame_time);
+ }
+
+ for (int i = 0; i < frame_data_amount; i++) {
+
+ EditorProfiler::Metric::Category c;
+ String name = frame.frames_data[i].name;
+ Array values = frame.frames_data[i].data;
+ c.name = name.capitalize();
+ c.items.resize(values.size() / 2);
+ c.total_time = 0;
+ c.signature = "categ::" + name;
+ for (int j = 0; j < values.size(); j += 2) {
+
+ EditorProfiler::Metric::Category::Item item;
+ item.calls = 1;
+ item.line = 0;
+ item.name = values[j];
+ item.self = values[j + 1];
+ item.total = item.self;
+ item.signature = "categ::" + name + "::" + item.name;
+ item.name = item.name.capitalize();
+ c.total_time += item.total;
+ c.items.write[j / 2] = item;
+ }
+ metric.categories.push_back(c);
+ }
+
+ EditorProfiler::Metric::Category funcs;
+ funcs.total_time = frame.script_time;
+ funcs.items.resize(frame_function_amount);
+ funcs.name = "Script Functions";
+ funcs.signature = "script_functions";
+ for (int i = 0; i < frame_function_amount; i++) {
+
+ int signature = frame.frame_functions[i].sig_id;
+ int calls = frame.frame_functions[i].call_count;
+ float total = frame.frame_functions[i].total_time;
+ float self = frame.frame_functions[i].self_time;
+
+ EditorProfiler::Metric::Category::Item item;
+ if (profiler_signature.has(signature)) {
+
+ item.signature = profiler_signature[signature];
+
+ String name = profiler_signature[signature];
+ Vector<String> strings = name.split("::");
+ if (strings.size() == 3) {
+ item.name = strings[2];
+ item.script = strings[0];
+ item.line = strings[1].to_int();
+ } else if (strings.size() == 4) { //Built-in scripts have an :: in their name
+ item.name = strings[3];
+ item.script = strings[0] + "::" + strings[1];
+ item.line = strings[2].to_int();
+ }
+
+ } else {
+ item.name = "SigErr " + itos(signature);
+ }
+
+ item.calls = calls;
+ item.self = self;
+ item.total = total;
+ funcs.items.write[i] = item;
+ }
+
+ metric.categories.push_back(funcs);
+
+ if (p_msg == "profile_frame")
+ profiler->add_frame_metric(metric, false);
+ else
+ profiler->add_frame_metric(metric, true);
+
+ } else if (p_msg == "network_profile") {
+ ScriptDebuggerRemote::NetworkProfilerFrame frame;
+ frame.deserialize(p_data);
+ for (int i = 0; i < frame.infos.size(); i++) {
+ network_profiler->add_node_frame_data(frame.infos[i]);
+ }
+ } else if (p_msg == "network_bandwidth") {
+ ERR_FAIL_COND(p_data.size() < 2);
+ network_profiler->set_bandwidth(p_data[0], p_data[1]);
+ } else if (p_msg == "kill_me") {
+
+ emit_signal("stop_requested");
+ _stop_and_notify();
+ }
+}
+
+void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType p_type) {
+ switch (p_type) {
+ case MESSAGE_ERROR:
+ reason->add_color_override("font_color", get_color("error_color", "Editor"));
+ break;
+ case MESSAGE_WARNING:
+ reason->add_color_override("font_color", get_color("warning_color", "Editor"));
+ break;
+ default:
+ reason->add_color_override("font_color", get_color("success_color", "Editor"));
+ }
+ reason->set_text(p_reason);
+ reason->set_tooltip(p_reason.word_wrap(80));
+}
+
+void ScriptEditorDebugger::_performance_select() {
+
+ perf_draw->update();
+}
+
+void ScriptEditorDebugger::_performance_draw() {
+
+ Vector<int> which;
+ for (int i = 0; i < perf_items.size(); i++) {
+
+ if (perf_items[i]->is_checked(0))
+ which.push_back(i);
+ }
+
+ if (which.empty()) {
+ info_message->show();
+ return;
+ }
+
+ info_message->hide();
+
+ Ref<StyleBox> graph_sb = get_stylebox("normal", "TextEdit");
+ Ref<Font> graph_font = get_font("font", "TextEdit");
+
+ int cols = Math::ceil(Math::sqrt((float)which.size()));
+ int rows = Math::ceil((float)which.size() / cols);
+ if (which.size() == 1)
+ rows = 1;
+
+ int margin = 3;
+ int point_sep = 5;
+ Size2i s = Size2i(perf_draw->get_size()) / Size2i(cols, rows);
+ for (int i = 0; i < which.size(); i++) {
+
+ Point2i p(i % cols, i / cols);
+ Rect2i r(p * s, s);
+ r.position += Point2(margin, margin);
+ r.size -= Point2(margin, margin) * 2.0;
+ perf_draw->draw_style_box(graph_sb, r);
+ r.position += graph_sb->get_offset();
+ r.size -= graph_sb->get_minimum_size();
+ int pi = which[i];
+ Color c = get_color("accent_color", "Editor");
+ float h = (float)which[i] / (float)(perf_items.size());
+ // Use a darker color on light backgrounds for better visibility
+ float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55;
+ c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * value_multiplier);
+
+ c.a = 0.6;
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
+ c.a = 0.9;
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
+
+ float spacing = point_sep / float(cols);
+ float from = r.size.width;
+
+ List<Vector<float> >::Element *E = perf_history.front();
+ float prev = -1;
+ while (from >= 0 && E) {
+
+ float m = perf_max[pi];
+ if (m == 0)
+ m = 0.00001;
+ float h2 = E->get()[pi] / m;
+ h2 = (1.0 - h2) * r.size.y;
+
+ if (E != perf_history.front())
+ perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE));
+ prev = h2;
+ E = E->next();
+ from -= spacing;
+ }
+ }
+}
+
+void ScriptEditorDebugger::_notification(int p_what) {
+
+ switch (p_what) {
+
+ case NOTIFICATION_ENTER_TREE: {
+
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
+ copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
+
+ step->set_icon(get_icon("DebugStep", "EditorIcons"));
+ next->set_icon(get_icon("DebugNext", "EditorIcons"));
+ dobreak->set_icon(get_icon("Pause", "EditorIcons"));
+ docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
+ le_set->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
+ le_clear->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
+ error_tree->connect("item_selected", callable_mp(this, &ScriptEditorDebugger::_error_selected));
+ error_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
+ vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
+
+ reason->add_color_override("font_color", get_color("error_color", "Editor"));
+
+ } break;
+ case NOTIFICATION_PROCESS: {
+
+ if (is_session_active()) {
+
+ if (camera_override == OVERRIDE_2D) {
+ CanvasItemEditor *editor = CanvasItemEditor::get_singleton();
+
+ Dictionary state = editor->get_state();
+ float zoom = state["zoom"];
+ Point2 offset = state["ofs"];
+ Transform2D transform;
+
+ transform.scale_basis(Size2(zoom, zoom));
+ transform.elements[2] = -offset * zoom;
+
+ Array msg;
+ msg.push_back(transform);
+ _put_msg("override_camera_2D:transform", msg);
+
+ } else if (camera_override >= OVERRIDE_3D_1) {
+ int viewport_idx = camera_override - OVERRIDE_3D_1;
+ SpatialEditorViewport *viewport = SpatialEditor::get_singleton()->get_editor_viewport(viewport_idx);
+ Camera *const cam = viewport->get_camera();
+
+ Array msg;
+ msg.push_back(cam->get_camera_transform());
+ if (cam->get_projection() == Camera::PROJECTION_ORTHOGONAL) {
+ msg.push_back(false);
+ msg.push_back(cam->get_size());
+ } else {
+ msg.push_back(true);
+ msg.push_back(cam->get_fov());
+ }
+ msg.push_back(cam->get_znear());
+ msg.push_back(cam->get_zfar());
+ _put_msg("override_camera_3D:transform", msg);
+ }
+ }
+
+ if (!is_session_active()) {
+ _stop_and_notify();
+ break;
+ };
+
+ if (ppeer->get_available_packet_count() <= 0) {
+ break;
+ };
+
+ const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20;
+
+ while (ppeer->get_available_packet_count() > 0) {
+
+ Variant cmd;
+ Error ret = ppeer->get_var(cmd);
+ if (ret != OK) {
+ _stop_and_notify();
+ ERR_FAIL_MSG("Error decoding variant from peer");
+ }
+ if (cmd.get_type() != Variant::ARRAY) {
+ _stop_and_notify();
+ ERR_FAIL_MSG("Invalid message format received from peer");
+ }
+ Array arr = cmd;
+ if (arr.size() != 2 || arr[0].get_type() != Variant::STRING || arr[1].get_type() != Variant::ARRAY) {
+ _stop_and_notify();
+ ERR_FAIL_MSG("Invalid message format received from peer");
+ }
+ _parse_message(arr[0], arr[1]);
+
+ if (OS::get_singleton()->get_ticks_msec() > until)
+ break;
+ }
+ } break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
+ if (tabs->has_stylebox_override("panel")) {
+ tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ }
+
+ copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
+ step->set_icon(get_icon("DebugStep", "EditorIcons"));
+ next->set_icon(get_icon("DebugNext", "EditorIcons"));
+ dobreak->set_icon(get_icon("Pause", "EditorIcons"));
+ docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
+ vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
+ } break;
+ }
+}
+
+void ScriptEditorDebugger::_clear_execution() {
+ TreeItem *ti = stack_dump->get_selected();
+ if (!ti)
+ return;
+
+ Dictionary d = ti->get_metadata(0);
+
+ stack_script = ResourceLoader::load(d["file"]);
+ emit_signal("clear_execution", stack_script);
+ stack_script.unref();
+ stack_dump->clear();
+ inspector->clear_stack_variables();
+}
+
+void ScriptEditorDebugger::start(Ref<StreamPeerTCP> p_connection) {
+
+ error_count = 0;
+ warning_count = 0;
+ stop();
+
+ connection = p_connection;
+ ppeer->set_stream_peer(connection);
+
+ perf_history.clear();
+ for (int i = 0; i < Performance::MONITOR_MAX; i++) {
+
+ perf_max.write[i] = 0;
+ }
+
+ set_process(true);
+ breaked = false;
+ can_debug = true;
+ camera_override = OVERRIDE_NONE;
+
+ tabs->set_current_tab(0);
+ _set_reason_text(TTR("Debug session started."), MESSAGE_SUCCESS);
+ _update_buttons_state();
+
+ if (profiler->is_profiling()) {
+ _profiler_activate(true);
+ }
+
+ if (network_profiler->is_profiling()) {
+ _network_profiler_activate(true);
+ }
+}
+
+void ScriptEditorDebugger::_update_buttons_state() {
+ const bool active = is_session_active();
+ const bool has_editor_tree = active && editor_remote_tree && editor_remote_tree->get_selected();
+ vmem_refresh->set_disabled(!active);
+ step->set_disabled(!active || !breaked || !can_debug);
+ next->set_disabled(!active || !breaked || !can_debug);
+ copy->set_disabled(!active || !breaked);
+ docontinue->set_disabled(!active || !breaked);
+ dobreak->set_disabled(!active || breaked);
+ le_clear->set_disabled(!active);
+ le_set->set_disabled(!has_editor_tree);
+}
+
+void ScriptEditorDebugger::_stop_and_notify() {
+ stop();
+ emit_signal("stopped");
+ _set_reason_text(TTR("Debug session closed."), MESSAGE_WARNING);
+}
+
+void ScriptEditorDebugger::stop() {
+
+ set_process(false);
+ breaked = false;
+ can_debug = false;
+ remote_pid = 0;
+ _clear_execution();
+
+ inspector->clear_cache();
+ ppeer->set_stream_peer(Ref<StreamPeer>());
+
+ if (connection.is_valid()) {
+ connection.unref();
+ reason->set_text("");
+ reason->set_tooltip("");
+ }
+
+ node_path_cache.clear();
+ res_path_cache.clear();
+ profiler_signature.clear();
+
+ inspector->edit(NULL);
+ _update_buttons_state();
+}
+
+void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
+
+ if (p_enable) {
+ profiler_signature.clear();
+ Array msg;
+ int max_funcs = EditorSettings::get_singleton()->get("debugger/profiler_frame_max_functions");
+ max_funcs = CLAMP(max_funcs, 16, 512);
+ msg.push_back(max_funcs);
+ _put_msg("start_profiling", msg);
+ print_verbose("Starting profiling.");
+
+ } else {
+ _put_msg("stop_profiling", Array());
+ print_verbose("Ending profiling.");
+ }
+}
+
+void ScriptEditorDebugger::_visual_profiler_activate(bool p_enable) {
+
+ if (!connection.is_valid())
+ return;
+
+ if (p_enable) {
+ profiler_signature.clear();
+ _put_msg("start_visual_profiling", Array());
+ print_verbose("Starting visual profiling.");
+
+ } else {
+ _put_msg("stop_visual_profiling", Array());
+ print_verbose("Ending visual profiling.");
+ }
+}
+
+void ScriptEditorDebugger::_network_profiler_activate(bool p_enable) {
+
+ if (p_enable) {
+ profiler_signature.clear();
+ _put_msg("start_network_profiling", Array());
+ print_verbose("Starting network profiling.");
+
+ } else {
+ _put_msg("stop_network_profiling", Array());
+ print_verbose("Ending network profiling.");
+ }
+}
+
+void ScriptEditorDebugger::_profiler_seeked() {
+
+ if (breaked)
+ return;
+ debug_break();
+}
+
+void ScriptEditorDebugger::_stack_dump_frame_selected() {
+
+ emit_signal("stack_frame_selected");
+
+ int frame = get_stack_script_frame();
+
+ if (is_session_active() && frame >= 0) {
+ Array msg;
+ msg.push_back(frame);
+ _put_msg("get_stack_frame_vars", msg);
+ } else {
+ inspector->edit(NULL);
+ }
+}
+
+void ScriptEditorDebugger::_export_csv() {
+
+ file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
+ file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ file_dialog->popup_centered_ratio();
+}
+
+String ScriptEditorDebugger::get_var_value(const String &p_var) const {
+ if (!breaked)
+ return String();
+ return inspector->get_stack_variable(p_var);
+}
+
+int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
+
+ const int *r = node_path_cache.getptr(p_path);
+ if (r)
+ return *r;
+
+ last_path_id++;
+
+ node_path_cache[p_path] = last_path_id;
+ Array msg;
+ msg.push_back(p_path);
+ msg.push_back(last_path_id);
+ _put_msg("live_node_path", msg);
+
+ return last_path_id;
+}
+
+int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
+
+ Map<String, int>::Element *E = res_path_cache.find(p_path);
+
+ if (E)
+ return E->get();
+
+ last_path_id++;
+
+ res_path_cache[p_path] = last_path_id;
+ Array msg;
+ msg.push_back(p_path);
+ msg.push_back(last_path_id);
+ _put_msg("live_res_path", msg);
+
+ return last_path_id;
+}
+
+void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
+
+ if (!p_base || !live_debug || !is_session_active() || !editor->get_edited_scene())
+ return;
+
+ Node *node = Object::cast_to<Node>(p_base);
+
+ VARIANT_ARGPTRS
+
+ for (int i = 0; i < VARIANT_ARG_MAX; i++) {
+ //no pointers, sorry
+ if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::_RID))
+ return;
+ }
+
+ if (node) {
+
+ NodePath path = editor->get_edited_scene()->get_path_to(node);
+ int pathid = _get_node_path_cache(path);
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_name);
+ for (int i = 0; i < VARIANT_ARG_MAX; i++) {
+ //no pointers, sorry
+ msg.push_back(*argptr[i]);
+ }
+ _put_msg("live_node_call", msg);
+
+ return;
+ }
+
+ Resource *res = Object::cast_to<Resource>(p_base);
+
+ if (res && res->get_path() != String()) {
+
+ String respath = res->get_path();
+ int pathid = _get_res_path_cache(respath);
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_name);
+ for (int i = 0; i < VARIANT_ARG_MAX; i++) {
+ //no pointers, sorry
+ msg.push_back(*argptr[i]);
+ }
+ _put_msg("live_res_call", msg);
+
+ return;
+ }
+}
+
+void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
+
+ if (!p_base || !live_debug || !editor->get_edited_scene())
+ return;
+
+ Node *node = Object::cast_to<Node>(p_base);
+
+ if (node) {
+
+ NodePath path = editor->get_edited_scene()->get_path_to(node);
+ int pathid = _get_node_path_cache(path);
+
+ if (p_value.is_ref()) {
+ Ref<Resource> res = p_value;
+ if (res.is_valid() && res->get_path() != String()) {
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_property);
+ msg.push_back(res->get_path());
+ _put_msg("live_node_prop_res", msg);
+ }
+ } else {
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_property);
+ msg.push_back(p_value);
+ _put_msg("live_node_prop", msg);
+ }
+
+ return;
+ }
+
+ Resource *res = Object::cast_to<Resource>(p_base);
+
+ if (res && res->get_path() != String()) {
+
+ String respath = res->get_path();
+ int pathid = _get_res_path_cache(respath);
+
+ if (p_value.is_ref()) {
+ Ref<Resource> res2 = p_value;
+ if (res2.is_valid() && res2->get_path() != String()) {
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_property);
+ msg.push_back(res2->get_path());
+ _put_msg("live_res_prop_res", msg);
+ }
+ } else {
+
+ Array msg;
+ msg.push_back(pathid);
+ msg.push_back(p_property);
+ msg.push_back(p_value);
+ _put_msg("live_res_prop", msg);
+ }
+
+ return;
+ }
+}
+
+String ScriptEditorDebugger::get_stack_script_file() const {
+ TreeItem *ti = stack_dump->get_selected();
+ if (!ti)
+ return "";
+ Dictionary d = ti->get_metadata(0);
+ return d["file"];
+}
+
+int ScriptEditorDebugger::get_stack_script_line() const {
+ TreeItem *ti = stack_dump->get_selected();
+ if (!ti)
+ return -1;
+ Dictionary d = ti->get_metadata(0);
+ return d["line"];
+}
+
+int ScriptEditorDebugger::get_stack_script_frame() const {
+ TreeItem *ti = stack_dump->get_selected();
+ if (!ti)
+ return -1;
+ Dictionary d = ti->get_metadata(0);
+ return d["frame"];
+}
+
+void ScriptEditorDebugger::set_live_debugging(bool p_enable) {
+
+ live_debug = p_enable;
+}
+
+void ScriptEditorDebugger::_live_edit_set() {
+
+ if (!is_session_active() || !editor_remote_tree)
+ return;
+
+ TreeItem *ti = editor_remote_tree->get_selected();
+ if (!ti)
+ return;
+
+ String path;
+
+ while (ti) {
+ String lp = ti->get_text(0);
+ path = "/" + lp + path;
+ ti = ti->get_parent();
+ }
+
+ NodePath np = path;
+
+ editor->get_editor_data().set_edited_scene_live_edit_root(np);
+
+ update_live_edit_root();
+}
+
+void ScriptEditorDebugger::_live_edit_clear() {
+
+ NodePath np = NodePath("/root");
+ editor->get_editor_data().set_edited_scene_live_edit_root(np);
+
+ update_live_edit_root();
+}
+
+void ScriptEditorDebugger::update_live_edit_root() {
+
+ NodePath np = editor->get_editor_data().get_edited_scene_live_edit_root();
+
+ Array msg;
+ msg.push_back(np);
+ if (editor->get_edited_scene())
+ msg.push_back(editor->get_edited_scene()->get_filename());
+ else
+ msg.push_back("");
+ _put_msg("live_set_root", msg);
+ live_edit_root->set_text(np);
+}
+
+void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_parent);
+ msg.push_back(p_type);
+ msg.push_back(p_name);
+ _put_msg("live_create_node", msg);
+ }
+}
+
+void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_parent);
+ msg.push_back(p_path);
+ msg.push_back(p_name);
+ _put_msg("live_instance_node", msg);
+ }
+}
+void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_at);
+ _put_msg("live_remove_node", msg);
+ }
+}
+void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_at);
+ msg.push_back(p_keep_id);
+ _put_msg("live_remove_and_keep_node", msg);
+ }
+}
+void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_id);
+ msg.push_back(p_at);
+ msg.push_back(p_at_pos);
+ _put_msg("live_restore_node", msg);
+ }
+}
+void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_at);
+ msg.push_back(p_new_name);
+ _put_msg("live_duplicate_node", msg);
+ }
+}
+void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
+
+ if (live_debug) {
+ Array msg;
+ msg.push_back(p_at);
+ msg.push_back(p_new_place);
+ msg.push_back(p_new_name);
+ msg.push_back(p_at_pos);
+ _put_msg("live_reparent_node", msg);
+ }
+}
+
+ScriptEditorDebugger::CameraOverride ScriptEditorDebugger::get_camera_override() const {
+ return camera_override;
+}
+
+void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
+
+ if (p_override == OVERRIDE_2D && camera_override != OVERRIDE_2D) {
+ Array msg;
+ msg.push_back(true);
+ _put_msg("override_camera_2D:set", msg);
+ } else if (p_override != OVERRIDE_2D && camera_override == OVERRIDE_2D) {
+ Array msg;
+ msg.push_back(false);
+ _put_msg("override_camera_2D:set", msg);
+ } else if (p_override >= OVERRIDE_3D_1 && camera_override < OVERRIDE_3D_1) {
+ Array msg;
+ msg.push_back(true);
+ _put_msg("override_camera_3D:set", msg);
+ } else if (p_override < OVERRIDE_3D_1 && camera_override >= OVERRIDE_3D_1) {
+ Array msg;
+ msg.push_back(false);
+ _put_msg("override_camera_3D:set", msg);
+ }
+
+ camera_override = p_override;
+}
+
+void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
+
+ Array msg;
+ msg.push_back(p_path);
+ msg.push_back(p_line);
+ msg.push_back(p_enabled);
+ _put_msg("breakpoint", msg);
+}
+
+void ScriptEditorDebugger::reload_scripts() {
+
+ _put_msg("reload_scripts", Array());
+}
+
+bool ScriptEditorDebugger::is_skip_breakpoints() {
+ return skip_breakpoints_value;
+}
+
+void ScriptEditorDebugger::_error_activated() {
+ TreeItem *selected = error_tree->get_selected();
+
+ TreeItem *ci = selected->get_children();
+ if (ci) {
+ selected->set_collapsed(!selected->is_collapsed());
+ }
+}
+
+void ScriptEditorDebugger::_error_selected() {
+ TreeItem *selected = error_tree->get_selected();
+ Array meta = selected->get_metadata(0);
+ if (meta.size() == 0) {
+ return;
+ }
+
+ emit_signal("error_selected", String(meta[0]), int(meta[1]));
+}
+
+void ScriptEditorDebugger::_expand_errors_list() {
+
+ TreeItem *root = error_tree->get_root();
+ if (!root)
+ return;
+
+ TreeItem *item = root->get_children();
+ while (item) {
+ item->set_collapsed(false);
+ item = item->get_next();
+ }
+}
+
+void ScriptEditorDebugger::_collapse_errors_list() {
+
+ TreeItem *root = error_tree->get_root();
+ if (!root)
+ return;
+
+ TreeItem *item = root->get_children();
+ while (item) {
+ item->set_collapsed(true);
+ item = item->get_next();
+ }
+}
+
+void ScriptEditorDebugger::_clear_errors_list() {
+
+ error_tree->clear();
+ error_count = 0;
+ warning_count = 0;
+ update_tabs();
+}
+
+// Right click on specific file(s) or folder(s).
+void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
+
+ item_menu->clear();
+ item_menu->set_size(Size2(1, 1));
+
+ if (error_tree->is_anything_selected()) {
+ item_menu->add_icon_item(get_icon("ActionCopy", "EditorIcons"), TTR("Copy Error"), 0);
+ }
+
+ if (item_menu->get_item_count() > 0) {
+ item_menu->set_position(error_tree->get_global_position() + p_pos);
+ item_menu->popup();
+ }
+}
+
+void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
+ TreeItem *ti = error_tree->get_selected();
+ while (ti->get_parent() != error_tree->get_root())
+ ti = ti->get_parent();
+
+ String type;
+
+ if (ti->get_icon(0) == get_icon("Warning", "EditorIcons")) {
+ type = "W ";
+ } else if (ti->get_icon(0) == get_icon("Error", "EditorIcons")) {
+ type = "E ";
+ }
+
+ String text = ti->get_text(0) + " ";
+ int rpad_len = text.length();
+
+ text = type + text + ti->get_text(1) + "\n";
+ TreeItem *ci = ti->get_children();
+ while (ci) {
+ text += " " + ci->get_text(0).rpad(rpad_len) + ci->get_text(1) + "\n";
+ ci = ci->get_next();
+ }
+
+ OS::get_singleton()->set_clipboard(text);
+}
+
+void ScriptEditorDebugger::_tab_changed(int p_tab) {
+ if (tabs->get_tab_title(p_tab) == TTR("Video RAM")) {
+ // "Video RAM" tab was clicked, refresh the data it's dislaying when entering the tab.
+ _video_mem_request();
+ }
+}
+
+void ScriptEditorDebugger::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node);
+ ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node);
+ ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &ScriptEditorDebugger::live_debug_remove_node);
+ ClassDB::bind_method(D_METHOD("live_debug_remove_and_keep_node"), &ScriptEditorDebugger::live_debug_remove_and_keep_node);
+ ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &ScriptEditorDebugger::live_debug_restore_node);
+ ClassDB::bind_method(D_METHOD("live_debug_duplicate_node"), &ScriptEditorDebugger::live_debug_duplicate_node);
+ ClassDB::bind_method(D_METHOD("live_debug_reparent_node"), &ScriptEditorDebugger::live_debug_reparent_node);
+ ClassDB::bind_method(D_METHOD("request_remote_object", "id"), &ScriptEditorDebugger::request_remote_object);
+ ClassDB::bind_method(D_METHOD("update_remote_object", "id", "property", "value"), &ScriptEditorDebugger::update_remote_object);
+
+ ADD_SIGNAL(MethodInfo("stopped"));
+ ADD_SIGNAL(MethodInfo("stop_requested"));
+ ADD_SIGNAL(MethodInfo("stack_frame_selected", PropertyInfo(Variant::INT, "frame")));
+ ADD_SIGNAL(MethodInfo("error_selected", PropertyInfo(Variant::INT, "error")));
+ ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
+ ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script")));
+ ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug")));
+ ADD_SIGNAL(MethodInfo("remote_object_requested", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("remote_object_updated", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("remote_object_property_updated", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "property")));
+ ADD_SIGNAL(MethodInfo("remote_tree_updated"));
+}
+
+ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
+
+ ppeer = Ref<PacketPeerStream>(memnew(PacketPeerStream));
+ ppeer->set_input_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be enough, minus 4 bytes for separator.
+ editor = p_editor;
+
+ tabs = memnew(TabContainer);
+ tabs->set_tab_align(TabContainer::ALIGN_LEFT);
+ tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ tabs->connect("tab_changed", callable_mp(this, &ScriptEditorDebugger::_tab_changed));
+
+ add_child(tabs);
+
+ { //debugger
+ VBoxContainer *vbc = memnew(VBoxContainer);
+ vbc->set_name(TTR("Debugger"));
+ Control *dbg = vbc;
+
+ HBoxContainer *hbc = memnew(HBoxContainer);
+ vbc->add_child(hbc);
+
+ reason = memnew(Label);
+ reason->set_text("");
+ hbc->add_child(reason);
+ reason->set_h_size_flags(SIZE_EXPAND_FILL);
+ reason->set_autowrap(true);
+ reason->set_max_lines_visible(3);
+ reason->set_mouse_filter(Control::MOUSE_FILTER_PASS);
+
+ hbc->add_child(memnew(VSeparator));
+
+ skip_breakpoints = memnew(ToolButton);
+ hbc->add_child(skip_breakpoints);
+ skip_breakpoints->set_tooltip(TTR("Skip Breakpoints"));
+ skip_breakpoints->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_skip_breakpoints));
+
+ hbc->add_child(memnew(VSeparator));
+
+ copy = memnew(ToolButton);
+ hbc->add_child(copy);
+ copy->set_tooltip(TTR("Copy Error"));
+ copy->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_copy));
+
+ hbc->add_child(memnew(VSeparator));
+
+ step = memnew(ToolButton);
+ hbc->add_child(step);
+ step->set_tooltip(TTR("Step Into"));
+ step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into"));
+ step->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_step));
+
+ next = memnew(ToolButton);
+ hbc->add_child(next);
+ next->set_tooltip(TTR("Step Over"));
+ next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over"));
+ next->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_next));
+
+ hbc->add_child(memnew(VSeparator));
+
+ dobreak = memnew(ToolButton);
+ hbc->add_child(dobreak);
+ dobreak->set_tooltip(TTR("Break"));
+ dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break"));
+ dobreak->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_break));
+
+ docontinue = memnew(ToolButton);
+ hbc->add_child(docontinue);
+ docontinue->set_tooltip(TTR("Continue"));
+ docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue"));
+ docontinue->connect("pressed", callable_mp(this, &ScriptEditorDebugger::debug_continue));
+
+ HSplitContainer *sc = memnew(HSplitContainer);
+ vbc->add_child(sc);
+ sc->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ stack_dump = memnew(Tree);
+ stack_dump->set_allow_reselect(true);
+ stack_dump->set_columns(1);
+ stack_dump->set_column_titles_visible(true);
+ stack_dump->set_column_title(0, TTR("Stack Frames"));
+ stack_dump->set_h_size_flags(SIZE_EXPAND_FILL);
+ stack_dump->set_hide_root(true);
+ stack_dump->connect("cell_selected", callable_mp(this, &ScriptEditorDebugger::_stack_dump_frame_selected));
+ sc->add_child(stack_dump);
+
+ inspector = memnew(EditorDebuggerInspector);
+ inspector->set_h_size_flags(SIZE_EXPAND_FILL);
+ inspector->set_enable_capitalize_paths(false);
+ inspector->set_read_only(true);
+ inspector->connect("object_selected", callable_mp(this, &ScriptEditorDebugger::_remote_object_selected));
+ inspector->connect("object_edited", callable_mp(this, &ScriptEditorDebugger::_remote_object_edited));
+ inspector->connect("object_property_updated", callable_mp(this, &ScriptEditorDebugger::_remote_object_property_updated));
+ sc->add_child(inspector);
+ tabs->add_child(dbg);
+ }
+
+ { //errors
+ errors_tab = memnew(VBoxContainer);
+ errors_tab->set_name(TTR("Errors"));
+
+ HBoxContainer *errhb = memnew(HBoxContainer);
+ errors_tab->add_child(errhb);
+
+ Button *expand_all = memnew(Button);
+ expand_all->set_text(TTR("Expand All"));
+ expand_all->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_expand_errors_list));
+ errhb->add_child(expand_all);
+
+ Button *collapse_all = memnew(Button);
+ collapse_all->set_text(TTR("Collapse All"));
+ collapse_all->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_collapse_errors_list));
+ errhb->add_child(collapse_all);
+
+ Control *space = memnew(Control);
+ space->set_h_size_flags(SIZE_EXPAND_FILL);
+ errhb->add_child(space);
+
+ clearbutton = memnew(Button);
+ clearbutton->set_text(TTR("Clear"));
+ clearbutton->set_h_size_flags(0);
+ clearbutton->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_clear_errors_list));
+ errhb->add_child(clearbutton);
+
+ error_tree = memnew(Tree);
+ error_tree->set_columns(2);
+
+ error_tree->set_column_expand(0, false);
+ error_tree->set_column_min_width(0, 140);
+
+ error_tree->set_column_expand(1, true);
+
+ error_tree->set_select_mode(Tree::SELECT_ROW);
+ error_tree->set_hide_root(true);
+ error_tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ error_tree->set_allow_rmb_select(true);
+ error_tree->connect("item_rmb_selected", callable_mp(this, &ScriptEditorDebugger::_error_tree_item_rmb_selected));
+ errors_tab->add_child(error_tree);
+
+ item_menu = memnew(PopupMenu);
+ item_menu->connect("id_pressed", callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
+ error_tree->add_child(item_menu);
+
+ tabs->add_child(errors_tab);
+ }
+
+ { // File dialog
+ file_dialog = memnew(EditorFileDialog);
+ file_dialog->connect("file_selected", callable_mp(this, &ScriptEditorDebugger::_file_selected));
+ add_child(file_dialog);
+ }
+
+ { //profiler
+ profiler = memnew(EditorProfiler);
+ profiler->set_name(TTR("Profiler"));
+ tabs->add_child(profiler);
+ profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate));
+ profiler->connect("break_request", callable_mp(this, &ScriptEditorDebugger::_profiler_seeked));
+ }
+
+ { //frame profiler
+ visual_profiler = memnew(EditorVisualProfiler);
+ visual_profiler->set_name(TTR("Visual Profiler"));
+ tabs->add_child(visual_profiler);
+ visual_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_visual_profiler_activate));
+ }
+
+ { //network profiler
+ network_profiler = memnew(EditorNetworkProfiler);
+ network_profiler->set_name(TTR("Network Profiler"));
+ tabs->add_child(network_profiler);
+ network_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_network_profiler_activate));
+ }
+
+ { //monitors
+
+ HSplitContainer *hsp = memnew(HSplitContainer);
+
+ perf_monitors = memnew(Tree);
+ perf_monitors->set_columns(2);
+ perf_monitors->set_column_title(0, TTR("Monitor"));
+ perf_monitors->set_column_title(1, TTR("Value"));
+ perf_monitors->set_column_titles_visible(true);
+ perf_monitors->connect("item_edited", callable_mp(this, &ScriptEditorDebugger::_performance_select));
+ hsp->add_child(perf_monitors);
+
+ perf_draw = memnew(Control);
+ perf_draw->set_clip_contents(true);
+ perf_draw->connect("draw", callable_mp(this, &ScriptEditorDebugger::_performance_draw));
+ hsp->add_child(perf_draw);
+
+ hsp->set_name(TTR("Monitors"));
+ hsp->set_split_offset(340 * EDSCALE);
+ tabs->add_child(hsp);
+ perf_max.resize(Performance::MONITOR_MAX);
+
+ Map<String, TreeItem *> bases;
+ TreeItem *root = perf_monitors->create_item();
+ perf_monitors->set_hide_root(true);
+ for (int i = 0; i < Performance::MONITOR_MAX; i++) {
+
+ String n = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
+ Performance::MonitorType mtype = Performance::get_singleton()->get_monitor_type(Performance::Monitor(i));
+ String base = n.get_slice("/", 0);
+ String name = n.get_slice("/", 1);
+ if (!bases.has(base)) {
+ TreeItem *b = perf_monitors->create_item(root);
+ b->set_text(0, base.capitalize());
+ b->set_editable(0, false);
+ b->set_selectable(0, false);
+ b->set_expand_right(0, true);
+ bases[base] = b;
+ }
+
+ TreeItem *it = perf_monitors->create_item(bases[base]);
+ it->set_metadata(1, mtype);
+ it->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ it->set_editable(0, true);
+ it->set_selectable(0, false);
+ it->set_selectable(1, false);
+ it->set_text(0, name.capitalize());
+ perf_items.push_back(it);
+ perf_max.write[i] = 0;
+ }
+
+ info_message = memnew(Label);
+ info_message->set_text(TTR("Pick one or more items from the list to display the graph."));
+ info_message->set_valign(Label::VALIGN_CENTER);
+ info_message->set_align(Label::ALIGN_CENTER);
+ info_message->set_autowrap(true);
+ info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
+ info_message->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+ perf_draw->add_child(info_message);
+ }
+
+ { //vmem inspect
+ VBoxContainer *vmem_vb = memnew(VBoxContainer);
+ HBoxContainer *vmem_hb = memnew(HBoxContainer);
+ Label *vmlb = memnew(Label(TTR("List of Video Memory Usage by Resource:") + " "));
+ vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
+ vmem_hb->add_child(vmlb);
+ vmem_hb->add_child(memnew(Label(TTR("Total:") + " ")));
+ vmem_total = memnew(LineEdit);
+ vmem_total->set_editable(false);
+ vmem_total->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
+ vmem_hb->add_child(vmem_total);
+ vmem_refresh = memnew(ToolButton);
+ vmem_hb->add_child(vmem_refresh);
+ vmem_vb->add_child(vmem_hb);
+ vmem_refresh->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_video_mem_request));
+
+ VBoxContainer *vmmc = memnew(VBoxContainer);
+ vmem_tree = memnew(Tree);
+ vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL);
+ vmmc->add_child(vmem_tree);
+ vmmc->set_v_size_flags(SIZE_EXPAND_FILL);
+ vmem_vb->add_child(vmmc);
+
+ vmem_vb->set_name(TTR("Video RAM"));
+ vmem_tree->set_columns(4);
+ vmem_tree->set_column_titles_visible(true);
+ vmem_tree->set_column_title(0, TTR("Resource Path"));
+ vmem_tree->set_column_expand(0, true);
+ vmem_tree->set_column_expand(1, false);
+ vmem_tree->set_column_title(1, TTR("Type"));
+ vmem_tree->set_column_min_width(1, 100 * EDSCALE);
+ vmem_tree->set_column_expand(2, false);
+ vmem_tree->set_column_title(2, TTR("Format"));
+ vmem_tree->set_column_min_width(2, 150 * EDSCALE);
+ vmem_tree->set_column_expand(3, false);
+ vmem_tree->set_column_title(3, TTR("Usage"));
+ vmem_tree->set_column_min_width(3, 80 * EDSCALE);
+ vmem_tree->set_hide_root(true);
+
+ tabs->add_child(vmem_vb);
+ }
+
+ { // misc
+ VBoxContainer *misc = memnew(VBoxContainer);
+ misc->set_name(TTR("Misc"));
+ tabs->add_child(misc);
+
+ GridContainer *info_left = memnew(GridContainer);
+ info_left->set_columns(2);
+ misc->add_child(info_left);
+ clicked_ctrl = memnew(LineEdit);
+ clicked_ctrl->set_h_size_flags(SIZE_EXPAND_FILL);
+ info_left->add_child(memnew(Label(TTR("Clicked Control:"))));
+ info_left->add_child(clicked_ctrl);
+ clicked_ctrl_type = memnew(LineEdit);
+ info_left->add_child(memnew(Label(TTR("Clicked Control Type:"))));
+ info_left->add_child(clicked_ctrl_type);
+
+ scene_tree = memnew(SceneDebuggerTree);
+ live_edit_root = memnew(LineEdit);
+ live_edit_root->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ {
+ HBoxContainer *lehb = memnew(HBoxContainer);
+ Label *l = memnew(Label(TTR("Live Edit Root:")));
+ info_left->add_child(l);
+ lehb->add_child(live_edit_root);
+ le_set = memnew(Button(TTR("Set From Tree")));
+ lehb->add_child(le_set);
+ le_clear = memnew(Button(TTR("Clear")));
+ lehb->add_child(le_clear);
+ info_left->add_child(lehb);
+ }
+
+ misc->add_child(memnew(VSeparator));
+
+ HBoxContainer *buttons = memnew(HBoxContainer);
+
+ export_csv = memnew(Button(TTR("Export measures as CSV")));
+ export_csv->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_export_csv));
+ buttons->add_child(export_csv);
+
+ misc->add_child(buttons);
+ }
+
+ msgdialog = memnew(AcceptDialog);
+ add_child(msgdialog);
+
+ live_debug = true;
+ camera_override = OVERRIDE_NONE;
+ last_path_id = false;
+ error_count = 0;
+ warning_count = 0;
+ _update_buttons_state();
+}
+
+ScriptEditorDebugger::~ScriptEditorDebugger() {
+
+ ppeer->set_stream_peer(Ref<StreamPeer>());
+ memdelete(scene_tree);
+}
diff --git a/editor/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index 5a821a4a88..fd034ba983 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -32,7 +32,8 @@
#define SCRIPT_EDITOR_DEBUGGER_H
#include "core/io/packet_peer.h"
-#include "core/io/tcp_server.h"
+#include "core/io/stream_peer_tcp.h"
+#include "editor/debugger/editor_debugger_inspector.h"
#include "editor/editor_inspector.h"
#include "editor/property_editor.h"
#include "scene/3d/camera.h"
@@ -41,7 +42,6 @@
class Tree;
class EditorNode;
-class ScriptEditorDebuggerVariables;
class LineEdit;
class TabContainer;
class RichTextLabel;
@@ -53,13 +53,14 @@ class ItemList;
class EditorProfiler;
class EditorVisualProfiler;
class EditorNetworkProfiler;
-
-class ScriptEditorDebuggerInspectedObject;
+class SceneDebuggerTree;
class ScriptEditorDebugger : public MarginContainer {
GDCLASS(ScriptEditorDebugger, MarginContainer);
+ friend class EditorDebuggerNode;
+
public:
enum CameraOverride {
OVERRIDE_NONE,
@@ -77,16 +78,8 @@ private:
MESSAGE_SUCCESS,
};
- enum ItemMenu {
- ITEM_MENU_COPY_ERROR,
- ITEM_MENU_SAVE_REMOTE_NODE,
- ITEM_MENU_COPY_NODE_PATH,
- };
-
AcceptDialog *msgdialog;
- Button *debugger_button;
-
LineEdit *clicked_ctrl;
LineEdit *clicked_ctrl_type;
LineEdit *live_edit_root;
@@ -94,35 +87,15 @@ private:
Button *le_clear;
Button *export_csv;
- bool updating_scene_tree;
- float inspect_scene_tree_timeout;
- float inspect_edited_object_timeout;
- bool auto_switch_remote_scene_tree;
- ObjectID inspected_object_id;
- ScriptEditorDebuggerVariables *variables;
- Map<ObjectID, ScriptEditorDebuggerInspectedObject *> remote_objects;
- Set<ObjectID> unfold_cache;
-
VBoxContainer *errors_tab;
Tree *error_tree;
- Tree *inspect_scene_tree;
Button *clearbutton;
PopupMenu *item_menu;
EditorFileDialog *file_dialog;
- enum FileDialogMode {
- SAVE_CSV,
- SAVE_NODE,
- };
- FileDialogMode file_dialog_mode;
int error_count;
int warning_count;
- int last_error_count;
- int last_warning_count;
-
- bool hide_on_stop;
- bool enable_external_editor;
bool skip_breakpoints_value = false;
Ref<Script> stack_script;
@@ -135,10 +108,11 @@ private:
Button *copy;
Button *step;
Button *next;
- Button *back;
- Button *forward;
Button *dobreak;
Button *docontinue;
+ // Reference to "Remote" tab in scene tree. Needed by _live_edit_set and buttons state.
+ // Each debugger should have it's tree in the future I guess.
+ const Tree *editor_remote_tree = NULL;
List<Vector<float> > perf_history;
Vector<float> perf_max;
@@ -155,16 +129,12 @@ private:
LineEdit *vmem_total;
Tree *stack_dump;
- EditorInspector *inspector;
+ EditorDebuggerInspector *inspector;
+ SceneDebuggerTree *scene_tree;
- Ref<TCP_Server> server;
Ref<StreamPeerTCP> connection;
Ref<PacketPeerStream> ppeer;
- String message_type;
- Array message;
- int pending_in_queue;
-
HashMap<NodePath, int> node_path_cache;
int last_path_id;
Map<String, int> res_path_cache;
@@ -175,7 +145,9 @@ private:
EditorNode *editor;
- bool breaked;
+ OS::ProcessID remote_pid = 0;
+ bool breaked = false;
+ bool can_debug = false;
bool live_debug;
@@ -184,18 +156,14 @@ private:
void _performance_draw();
void _performance_select();
void _stack_dump_frame_selected();
- void _output_clear();
- void _scene_tree_folded(Object *obj);
- void _scene_tree_selected();
- void _scene_tree_rmb_selected(const Vector2 &p_position);
void _file_selected(const String &p_file);
- void _scene_tree_request();
void _parse_message(const String &p_msg, const Array &p_data);
void _set_reason_text(const String &p_reason, MessageType p_type);
- void _scene_tree_property_select_object(ObjectID p_object);
- void _scene_tree_property_value_edited(const String &p_prop, const Variant &p_value);
- int _update_scene_tree(TreeItem *parent, const Array &nodes, int current_index);
+ void _update_buttons_state();
+ void _remote_object_selected(ObjectID p_object);
+ void _remote_object_edited(ObjectID, const String &p_prop, const Variant &p_value);
+ void _remote_object_property_updated(ObjectID p_id, const String &p_property);
void _video_mem_request();
@@ -221,28 +189,34 @@ private:
void _network_profiler_activate(bool p_enable);
- void _paused();
-
- void _set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj);
- void _clear_remote_objects();
void _clear_errors_list();
void _error_tree_item_rmb_selected(const Vector2 &p_pos);
void _item_menu_id_pressed(int p_option);
void _tab_changed(int p_tab);
+ void _put_msg(String p_message, Array p_data);
void _export_csv();
void _clear_execution();
+ void _stop_and_notify();
protected:
void _notification(int p_what);
static void _bind_methods();
public:
- void start();
- void pause();
- void unpause();
+ void request_remote_object(ObjectID p_obj_id);
+ void update_remote_object(ObjectID p_obj_id, const String &p_prop, const Variant &p_value);
+ Object *get_remote_object(ObjectID p_id);
+
+ // Needed by _live_edit_set, buttons state.
+ void set_editor_remote_tree(const Tree *p_tree) { editor_remote_tree = p_tree; }
+
+ void request_remote_tree();
+ const SceneDebuggerTree *get_remote_tree();
+
+ void start(Ref<StreamPeerTCP> p_connection);
void stop();
void debug_skip_breakpoints();
@@ -252,14 +226,24 @@ public:
void debug_step();
void debug_break();
void debug_continue();
-
+ bool is_breaked() const { return breaked; }
+ bool is_debuggable() const { return can_debug; }
+ bool is_session_active() { return connection.is_valid() && connection->is_connected_to_host(); };
+ int get_remote_pid() const { return remote_pid; }
+
+ int get_error_count() const { return error_count; }
+ int get_warning_count() const { return warning_count; }
+ String get_stack_script_file() const;
+ int get_stack_script_line() const;
+ int get_stack_script_frame() const;
+
+ void update_tabs();
+ void clear_style();
String get_var_value(const String &p_var) const;
+ void save_node(ObjectID p_id, const String &p_file);
void set_live_debugging(bool p_enable);
- static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE);
- static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value);
-
void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name);
void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name);
void live_debug_remove_node(const NodePath &p_at);
@@ -275,15 +259,6 @@ public:
void update_live_edit_root();
- void set_hide_on_stop(bool p_hide);
-
- bool get_debug_with_external_editor() const;
- void set_debug_with_external_editor(bool p_enabled);
-
- Ref<Script> get_dump_stack_script() const;
-
- void set_tool_button(Button *p_tb) { debugger_button = p_tb; }
-
void reload_scripts();
bool is_skip_breakpoints();
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 46f6815f77..0c95a64d06 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -229,10 +229,6 @@ void DependencyEditor::edit(const String &p_path) {
}
void DependencyEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_searched"), &DependencyEditor::_searched);
- ClassDB::bind_method(D_METHOD("_load_pressed"), &DependencyEditor::_load_pressed);
- ClassDB::bind_method(D_METHOD("_fix_all"), &DependencyEditor::_fix_all);
}
DependencyEditor::DependencyEditor() {
@@ -247,7 +243,7 @@ DependencyEditor::DependencyEditor() {
tree->set_column_title(0, TTR("Resource"));
tree->set_column_title(1, TTR("Path"));
tree->set_hide_root(true);
- tree->connect("button_pressed", this, "_load_pressed");
+ tree->connect("button_pressed", callable_mp(this, &DependencyEditor::_load_pressed));
HBoxContainer *hbc = memnew(HBoxContainer);
Label *label = memnew(Label(TTR("Dependencies:")));
@@ -255,7 +251,7 @@ DependencyEditor::DependencyEditor() {
hbc->add_spacer();
fixdeps = memnew(Button(TTR("Fix Broken")));
hbc->add_child(fixdeps);
- fixdeps->connect("pressed", this, "_fix_all");
+ fixdeps->connect("pressed", callable_mp(this, &DependencyEditor::_fix_all));
vb->add_child(hbc);
@@ -267,7 +263,7 @@ DependencyEditor::DependencyEditor() {
set_title(TTR("Dependency Editor"));
search = memnew(EditorFileDialog);
- search->connect("file_selected", this, "_searched");
+ search->connect("file_selected", callable_mp(this, &DependencyEditor::_searched));
search->set_mode(EditorFileDialog::MODE_OPEN_FILE);
search->set_title(TTR("Search Replacement Resource:"));
add_child(search);
@@ -310,10 +306,6 @@ void DependencyEditorOwners::_file_option(int p_option) {
}
void DependencyEditorOwners::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_list_rmb_select"), &DependencyEditorOwners::_list_rmb_select);
- ClassDB::bind_method(D_METHOD("_file_option"), &DependencyEditorOwners::_file_option);
- ClassDB::bind_method(D_METHOD("_select_file"), &DependencyEditorOwners::_select_file);
}
void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
@@ -360,12 +352,12 @@ DependencyEditorOwners::DependencyEditorOwners(EditorNode *p_editor) {
file_options = memnew(PopupMenu);
add_child(file_options);
- file_options->connect("id_pressed", this, "_file_option");
+ file_options->connect("id_pressed", callable_mp(this, &DependencyEditorOwners::_file_option));
owners = memnew(ItemList);
owners->set_select_mode(ItemList::SELECT_SINGLE);
- owners->connect("item_rmb_selected", this, "_list_rmb_select");
- owners->connect("item_activated", this, "_select_file");
+ owners->connect("item_rmb_selected", callable_mp(this, &DependencyEditorOwners::_list_rmb_select));
+ owners->connect("item_activated", callable_mp(this, &DependencyEditorOwners::_select_file));
owners->set_allow_rmb_select(true);
add_child(owners);
}
@@ -787,9 +779,6 @@ void OrphanResourcesDialog::_button_pressed(Object *p_item, int p_column, int p_
}
void OrphanResourcesDialog::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_delete_confirm"), &OrphanResourcesDialog::_delete_confirm);
- ClassDB::bind_method(D_METHOD("_button_pressed"), &OrphanResourcesDialog::_button_pressed);
}
OrphanResourcesDialog::OrphanResourcesDialog() {
@@ -800,7 +789,7 @@ OrphanResourcesDialog::OrphanResourcesDialog() {
add_child(delete_confirm);
dep_edit = memnew(DependencyEditor);
add_child(dep_edit);
- delete_confirm->connect("confirmed", this, "_delete_confirm");
+ delete_confirm->connect("confirmed", callable_mp(this, &OrphanResourcesDialog::_delete_confirm));
set_hide_on_ok(false);
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -816,5 +805,5 @@ OrphanResourcesDialog::OrphanResourcesDialog() {
files->set_column_title(1, TTR("Owns"));
files->set_hide_root(true);
vbc->add_margin_child(TTR("Resources Without Explicit Ownership:"), files, true);
- files->connect("button_pressed", this, "_button_pressed");
+ files->connect("button_pressed", callable_mp(this, &OrphanResourcesDialog::_button_pressed));
}
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index de3d13cdac..38ff9cd5fc 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -533,7 +533,7 @@ void DocData::generate(bool p_basic_types) {
ClassDoc &c = class_list[cname];
c.name = cname;
- Variant::CallError cerror;
+ Callable::CallError cerror;
Variant v = Variant::construct(Variant::Type(i), NULL, 0, cerror);
List<MethodInfo> method_list;
@@ -555,18 +555,21 @@ void DocData::generate(bool p_basic_types) {
argument_doc_from_arginfo(ad, mi.arguments[j]);
ad.name = arginfo.name;
- int defarg = mi.default_arguments.size() - mi.arguments.size() + j;
- if (defarg >= 0)
- ad.default_value = mi.default_arguments[defarg];
+ int darg_idx = mi.default_arguments.size() - mi.arguments.size() + j;
+ if (darg_idx >= 0) {
+ Variant default_arg = mi.default_arguments[darg_idx];
+ ad.default_value = default_arg.get_construct_string();
+ }
method.arguments.push_back(ad);
}
- if (mi.return_val.type == Variant::NIL) {
- if (mi.return_val.name != "")
- method.return_type = "Variant";
- } else {
- method.return_type = Variant::get_type_name(mi.return_val.type);
+ return_doc_from_retinfo(method, mi.return_val);
+
+ if (mi.flags & METHOD_FLAG_VARARG) {
+ if (method.qualifiers != "")
+ method.qualifiers += " ";
+ method.qualifiers += "vararg";
}
c.methods.push_back(method);
@@ -673,7 +676,6 @@ void DocData::generate(bool p_basic_types) {
argument_doc_from_arginfo(ad, mi.arguments[j]);
int darg_idx = j - (mi.arguments.size() - mi.default_arguments.size());
-
if (darg_idx >= 0) {
Variant default_arg = E->get().default_arguments[darg_idx];
ad.default_value = default_arg.get_construct_string();
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 5f7fa53ee7..b0a89ff4b8 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -161,10 +161,13 @@ void DocDump::dump(const String &p_file) {
default_arg_text = "false";
break;
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
//keep it
break;
case Variant::STRING:
+ case Variant::STRING_NAME:
+ default_arg_text = "@\"" + default_arg_text + "\"";
+ break;
case Variant::NODE_PATH:
default_arg_text = "\"" + default_arg_text + "\"";
break;
@@ -184,16 +187,18 @@ void DocDump::dump(const String &p_file) {
case Variant::AABB:
case Variant::BASIS:
case Variant::COLOR:
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
case Variant::OBJECT:
- case Variant::DICTIONARY: // 20
+ case Variant::DICTIONARY:
case Variant::ARRAY:
case Variant::_RID:
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index ba653017ef..a223cee360 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -63,8 +63,6 @@ void EditorAbout::_license_tree_selected() {
}
void EditorAbout::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_license_tree_selected"), &EditorAbout::_license_tree_selected);
}
TextureRect *EditorAbout::get_logo() const {
@@ -255,7 +253,7 @@ EditorAbout::EditorAbout() {
_tpl_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tpl_hbc->add_child(_tpl_text);
- _tpl_tree->connect("item_selected", this, "_license_tree_selected");
+ _tpl_tree->connect("item_selected", callable_mp(this, &EditorAbout::_license_tree_selected));
tpl_ti_all->select(0);
_tpl_text->set_text(tpl_ti_all->get_metadata(0));
}
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 783b996c4d..73c70f422d 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -307,8 +307,6 @@ void EditorAssetInstaller::ok_pressed() {
}
void EditorAssetInstaller::_bind_methods() {
-
- ClassDB::bind_method("_item_edited", &EditorAssetInstaller::_item_edited);
}
EditorAssetInstaller::EditorAssetInstaller() {
@@ -318,7 +316,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
tree = memnew(Tree);
vb->add_margin_child(TTR("Package Contents:"), tree, true);
- tree->connect("item_edited", this, "_item_edited");
+ tree->connect("item_edited", callable_mp(this, &EditorAssetInstaller::_item_edited));
error = memnew(AcceptDialog);
add_child(error);
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 594322f00d..d77216697e 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -549,7 +549,7 @@ void EditorAudioBus::_effect_add(int p_which) {
void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && !k->is_echo()) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
accept_event();
emit_signal("delete_request");
}
@@ -757,25 +757,10 @@ void EditorAudioBus::_bind_methods() {
ClassDB::bind_method("update_bus", &EditorAudioBus::update_bus);
ClassDB::bind_method("update_send", &EditorAudioBus::update_send);
- ClassDB::bind_method("_name_changed", &EditorAudioBus::_name_changed);
- ClassDB::bind_method("_volume_changed", &EditorAudioBus::_volume_changed);
- ClassDB::bind_method("_show_value", &EditorAudioBus::_show_value);
- ClassDB::bind_method("_hide_value_preview", &EditorAudioBus::_hide_value_preview);
- ClassDB::bind_method("_solo_toggled", &EditorAudioBus::_solo_toggled);
- ClassDB::bind_method("_mute_toggled", &EditorAudioBus::_mute_toggled);
- ClassDB::bind_method("_bypass_toggled", &EditorAudioBus::_bypass_toggled);
- ClassDB::bind_method("_name_focus_exit", &EditorAudioBus::_name_focus_exit);
- ClassDB::bind_method("_send_selected", &EditorAudioBus::_send_selected);
- ClassDB::bind_method("_effect_edited", &EditorAudioBus::_effect_edited);
- ClassDB::bind_method("_effect_selected", &EditorAudioBus::_effect_selected);
- ClassDB::bind_method("_effect_add", &EditorAudioBus::_effect_add);
ClassDB::bind_method("_gui_input", &EditorAudioBus::_gui_input);
- ClassDB::bind_method("_bus_popup_pressed", &EditorAudioBus::_bus_popup_pressed);
ClassDB::bind_method("get_drag_data_fw", &EditorAudioBus::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAudioBus::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &EditorAudioBus::drop_data_fw);
- ClassDB::bind_method("_delete_effect_pressed", &EditorAudioBus::_delete_effect_pressed);
- ClassDB::bind_method("_effect_rmb", &EditorAudioBus::_effect_rmb);
ADD_SIGNAL(MethodInfo("duplicate_request"));
ADD_SIGNAL(MethodInfo("delete_request"));
@@ -799,8 +784,8 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
set_v_size_flags(SIZE_EXPAND_FILL);
track_name = memnew(LineEdit);
- track_name->connect("text_entered", this, "_name_changed");
- track_name->connect("focus_exited", this, "_name_focus_exit");
+ track_name->connect("text_entered", callable_mp(this, &EditorAudioBus::_name_changed));
+ track_name->connect("focus_exited", callable_mp(this, &EditorAudioBus::_name_focus_exit));
vb->add_child(track_name);
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -809,19 +794,19 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
solo->set_toggle_mode(true);
solo->set_tooltip(TTR("Solo"));
solo->set_focus_mode(FOCUS_NONE);
- solo->connect("pressed", this, "_solo_toggled");
+ solo->connect("pressed", callable_mp(this, &EditorAudioBus::_solo_toggled));
hbc->add_child(solo);
mute = memnew(ToolButton);
mute->set_toggle_mode(true);
mute->set_tooltip(TTR("Mute"));
mute->set_focus_mode(FOCUS_NONE);
- mute->connect("pressed", this, "_mute_toggled");
+ mute->connect("pressed", callable_mp(this, &EditorAudioBus::_mute_toggled));
hbc->add_child(mute);
bypass = memnew(ToolButton);
bypass->set_toggle_mode(true);
bypass->set_tooltip(TTR("Bypass"));
bypass->set_focus_mode(FOCUS_NONE);
- bypass->connect("pressed", this, "_bypass_toggled");
+ bypass->connect("pressed", callable_mp(this, &EditorAudioBus::_bypass_toggled));
hbc->add_child(bypass);
hbc->add_spacer();
@@ -878,9 +863,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
preview_timer->set_one_shot(true);
add_child(preview_timer);
- slider->connect("value_changed", this, "_volume_changed");
- slider->connect("value_changed", this, "_show_value");
- preview_timer->connect("timeout", this, "_hide_value_preview");
+ slider->connect("value_changed", callable_mp(this, &EditorAudioBus::_volume_changed));
+ slider->connect("value_changed", callable_mp(this, &EditorAudioBus::_show_value));
+ preview_timer->connect("timeout", callable_mp(this, &EditorAudioBus::_hide_value_preview));
hb->add_child(slider);
cc = 0;
@@ -918,24 +903,24 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
effects->set_hide_folding(true);
effects->set_v_size_flags(SIZE_EXPAND_FILL);
vb->add_child(effects);
- effects->connect("item_edited", this, "_effect_edited");
- effects->connect("cell_selected", this, "_effect_selected");
+ effects->connect("item_edited", callable_mp(this, &EditorAudioBus::_effect_edited));
+ effects->connect("cell_selected", callable_mp(this, &EditorAudioBus::_effect_selected));
effects->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
effects->set_drag_forwarding(this);
- effects->connect("item_rmb_selected", this, "_effect_rmb");
+ effects->connect("item_rmb_selected", callable_mp(this, &EditorAudioBus::_effect_rmb));
effects->set_allow_rmb_select(true);
effects->set_focus_mode(FOCUS_CLICK);
effects->set_allow_reselect(true);
send = memnew(OptionButton);
send->set_clip_text(true);
- send->connect("item_selected", this, "_send_selected");
+ send->connect("item_selected", callable_mp(this, &EditorAudioBus::_send_selected));
vb->add_child(send);
set_focus_mode(FOCUS_CLICK);
effect_options = memnew(PopupMenu);
- effect_options->connect("index_pressed", this, "_effect_add");
+ effect_options->connect("index_pressed", callable_mp(this, &EditorAudioBus::_effect_add));
add_child(effect_options);
List<StringName> effects;
ClassDB::get_inheriters_from_class("AudioEffect", &effects);
@@ -956,12 +941,12 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
bus_popup->add_item(TTR("Delete"));
bus_popup->set_item_disabled(1, is_master);
bus_popup->add_item(TTR("Reset Volume"));
- bus_popup->connect("index_pressed", this, "_bus_popup_pressed");
+ bus_popup->connect("index_pressed", callable_mp(this, &EditorAudioBus::_bus_popup_pressed));
delete_effect_popup = memnew(PopupMenu);
delete_effect_popup->add_item(TTR("Delete Effect"));
add_child(delete_effect_popup);
- delete_effect_popup->connect("index_pressed", this, "_delete_effect_pressed");
+ delete_effect_popup->connect("index_pressed", callable_mp(this, &EditorAudioBus::_delete_effect_pressed));
}
void EditorAudioBusDrop::_notification(int p_what) {
@@ -1029,11 +1014,11 @@ void EditorAudioBuses::_update_buses() {
bool is_master = (i == 0);
EditorAudioBus *audio_bus = memnew(EditorAudioBus(this, is_master));
bus_hb->add_child(audio_bus);
- audio_bus->connect("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED);
- audio_bus->connect("duplicate_request", this, "_duplicate_bus", varray(), CONNECT_DEFERRED);
- audio_bus->connect("vol_reset_request", this, "_reset_bus_volume", varray(audio_bus), CONNECT_DEFERRED);
- audio_bus->connect("drop_end_request", this, "_request_drop_end");
- audio_bus->connect("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED);
+ audio_bus->connect("delete_request", callable_mp(this, &EditorAudioBuses::_delete_bus), varray(audio_bus), CONNECT_DEFERRED);
+ audio_bus->connect("duplicate_request", callable_mp(this, &EditorAudioBuses::_duplicate_bus), varray(), CONNECT_DEFERRED);
+ audio_bus->connect("vol_reset_request", callable_mp(this, &EditorAudioBuses::_reset_bus_volume), varray(audio_bus), CONNECT_DEFERRED);
+ audio_bus->connect("drop_end_request", callable_mp(this, &EditorAudioBuses::_request_drop_end));
+ audio_bus->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), varray(), CONNECT_DEFERRED);
}
}
@@ -1187,7 +1172,7 @@ void EditorAudioBuses::_request_drop_end() {
bus_hb->add_child(drop_end);
drop_end->set_custom_minimum_size(Object::cast_to<Control>(bus_hb->get_child(0))->get_size());
- drop_end->connect("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED);
+ drop_end->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), varray(), CONNECT_DEFERRED);
}
}
@@ -1303,23 +1288,10 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
void EditorAudioBuses::_bind_methods() {
- ClassDB::bind_method("_add_bus", &EditorAudioBuses::_add_bus);
ClassDB::bind_method("_update_buses", &EditorAudioBuses::_update_buses);
ClassDB::bind_method("_update_bus", &EditorAudioBuses::_update_bus);
ClassDB::bind_method("_update_sends", &EditorAudioBuses::_update_sends);
- ClassDB::bind_method("_delete_bus", &EditorAudioBuses::_delete_bus);
- ClassDB::bind_method("_request_drop_end", &EditorAudioBuses::_request_drop_end);
- ClassDB::bind_method("_drop_at_index", &EditorAudioBuses::_drop_at_index);
- ClassDB::bind_method("_server_save", &EditorAudioBuses::_server_save);
ClassDB::bind_method("_select_layout", &EditorAudioBuses::_select_layout);
- ClassDB::bind_method("_save_as_layout", &EditorAudioBuses::_save_as_layout);
- ClassDB::bind_method("_load_layout", &EditorAudioBuses::_load_layout);
- ClassDB::bind_method("_load_default_layout", &EditorAudioBuses::_load_default_layout);
- ClassDB::bind_method("_new_layout", &EditorAudioBuses::_new_layout);
- ClassDB::bind_method("_duplicate_bus", &EditorAudioBuses::_duplicate_bus);
- ClassDB::bind_method("_reset_bus_volume", &EditorAudioBuses::_reset_bus_volume);
-
- ClassDB::bind_method("_file_dialog_callback", &EditorAudioBuses::_file_dialog_callback);
}
EditorAudioBuses::EditorAudioBuses() {
@@ -1339,7 +1311,7 @@ EditorAudioBuses::EditorAudioBuses() {
top_hb->add_child(add);
add->set_text(TTR("Add Bus"));
add->set_tooltip(TTR("Add a new Audio Bus to this layout."));
- add->connect("pressed", this, "_add_bus");
+ add->connect("pressed", callable_mp(this, &EditorAudioBuses::_add_bus));
VSeparator *separator = memnew(VSeparator);
top_hb->add_child(separator);
@@ -1348,25 +1320,25 @@ EditorAudioBuses::EditorAudioBuses() {
load->set_text(TTR("Load"));
load->set_tooltip(TTR("Load an existing Bus Layout."));
top_hb->add_child(load);
- load->connect("pressed", this, "_load_layout");
+ load->connect("pressed", callable_mp(this, &EditorAudioBuses::_load_layout));
save_as = memnew(Button);
save_as->set_text(TTR("Save As"));
save_as->set_tooltip(TTR("Save this Bus Layout to a file."));
top_hb->add_child(save_as);
- save_as->connect("pressed", this, "_save_as_layout");
+ save_as->connect("pressed", callable_mp(this, &EditorAudioBuses::_save_as_layout));
_default = memnew(Button);
_default->set_text(TTR("Load Default"));
_default->set_tooltip(TTR("Load the default Bus Layout."));
top_hb->add_child(_default);
- _default->connect("pressed", this, "_load_default_layout");
+ _default->connect("pressed", callable_mp(this, &EditorAudioBuses::_load_default_layout));
_new = memnew(Button);
_new->set_text(TTR("Create"));
_new->set_tooltip(TTR("Create a new Bus Layout."));
top_hb->add_child(_new);
- _new->connect("pressed", this, "_new_layout");
+ _new->connect("pressed", callable_mp(this, &EditorAudioBuses::_new_layout));
bus_scroll = memnew(ScrollContainer);
bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1381,7 +1353,7 @@ EditorAudioBuses::EditorAudioBuses() {
save_timer->set_wait_time(0.8);
save_timer->set_one_shot(true);
add_child(save_timer);
- save_timer->connect("timeout", this, "_server_save");
+ save_timer->connect("timeout", callable_mp(this, &EditorAudioBuses::_server_save));
set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1394,7 +1366,7 @@ EditorAudioBuses::EditorAudioBuses() {
file_dialog->add_filter("*." + E->get() + "; Audio Bus Layout");
}
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_file_dialog_callback");
+ file_dialog->connect("file_selected", callable_mp(this, &EditorAudioBuses::_file_dialog_callback));
set_process(true);
}
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 549b15d6f9..83a1e2fca2 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -521,7 +521,7 @@ Variant EditorAutoloadSettings::get_drag_data_fw(const Point2 &p_point, Control
if (autoload_cache.size() <= 1)
return false;
- PoolStringArray autoloads;
+ PackedStringArray autoloads;
TreeItem *next = tree->get_next_selected(NULL);
@@ -612,7 +612,7 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &
}
Dictionary drop_data = p_data;
- PoolStringArray autoloads = drop_data["autoloads"];
+ PackedStringArray autoloads = drop_data["autoloads"];
Vector<int> orders;
orders.resize(autoload_cache.size());
@@ -736,16 +736,7 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
void EditorAutoloadSettings::_bind_methods() {
- ClassDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
- ClassDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
- ClassDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
- ClassDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
- ClassDB::bind_method("_autoload_activated", &EditorAutoloadSettings::_autoload_activated);
- ClassDB::bind_method("_autoload_path_text_changed", &EditorAutoloadSettings::_autoload_path_text_changed);
- ClassDB::bind_method("_autoload_text_entered", &EditorAutoloadSettings::_autoload_text_entered);
- ClassDB::bind_method("_autoload_text_changed", &EditorAutoloadSettings::_autoload_text_changed);
ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open);
- ClassDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
@@ -835,8 +826,8 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_path = memnew(EditorLineEditFileChooser);
autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- autoload_add_path->get_file_dialog()->connect("file_selected", this, "_autoload_file_callback");
- autoload_add_path->get_line_edit()->connect("text_changed", this, "_autoload_path_text_changed");
+ autoload_add_path->get_file_dialog()->connect("file_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_file_callback));
+ autoload_add_path->get_line_edit()->connect("text_changed", callable_mp(this, &EditorAutoloadSettings::_autoload_path_text_changed));
hbc->add_child(autoload_add_path);
@@ -846,13 +837,13 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_name = memnew(LineEdit);
autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
- autoload_add_name->connect("text_entered", this, "_autoload_text_entered");
- autoload_add_name->connect("text_changed", this, "_autoload_text_changed");
+ autoload_add_name->connect("text_entered", callable_mp(this, &EditorAutoloadSettings::_autoload_text_entered));
+ autoload_add_name->connect("text_changed", callable_mp(this, &EditorAutoloadSettings::_autoload_text_changed));
hbc->add_child(autoload_add_name);
add_autoload = memnew(Button);
add_autoload->set_text(TTR("Add"));
- add_autoload->connect("pressed", this, "_autoload_add");
+ add_autoload->connect("pressed", callable_mp(this, &EditorAutoloadSettings::_autoload_add));
// The button will be enabled once a valid name is entered (either automatically or manually).
add_autoload->set_disabled(true);
hbc->add_child(add_autoload);
@@ -882,10 +873,10 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_expand(3, false);
tree->set_column_min_width(3, 120 * EDSCALE);
- tree->connect("cell_selected", this, "_autoload_selected");
- tree->connect("item_edited", this, "_autoload_edited");
- tree->connect("button_pressed", this, "_autoload_button_pressed");
- tree->connect("item_activated", this, "_autoload_activated");
+ tree->connect("cell_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_selected));
+ tree->connect("item_edited", callable_mp(this, &EditorAutoloadSettings::_autoload_edited));
+ tree->connect("button_pressed", callable_mp(this, &EditorAutoloadSettings::_autoload_button_pressed));
+ tree->connect("item_activated", callable_mp(this, &EditorAutoloadSettings::_autoload_activated));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(tree, true);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 1468b8fc35..192e7d286f 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -435,10 +435,14 @@ void EditorData::restore_editor_global_states() {
void EditorData::paste_object_params(Object *p_object) {
+ ERR_FAIL_NULL(p_object);
+ undo_redo.create_action(TTR("Paste Params"));
for (List<PropertyData>::Element *E = clipboard.front(); E; E = E->next()) {
-
- p_object->set(E->get().name, E->get().value);
+ String name = E->get().name;
+ undo_redo.add_do_property(p_object, name, E->get().value);
+ undo_redo.add_undo_property(p_object, name, p_object->get(name));
}
+ undo_redo.commit_action();
}
bool EditorData::call_build() {
@@ -1024,7 +1028,7 @@ void EditorSelection::add_node(Node *p_node) {
}
selection[p_node] = meta;
- p_node->connect("tree_exiting", this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed), varray(p_node), CONNECT_ONESHOT);
//emit_signal("selection_changed");
}
@@ -1042,7 +1046,7 @@ void EditorSelection::remove_node(Node *p_node) {
if (meta)
memdelete(meta);
selection.erase(p_node);
- p_node->disconnect("tree_exiting", this, "_node_removed");
+ p_node->disconnect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed));
//emit_signal("selection_changed");
}
bool EditorSelection::is_selected(Node *p_node) const {
@@ -1076,7 +1080,6 @@ Array EditorSelection::get_selected_nodes() {
void EditorSelection::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_node_removed"), &EditorSelection::_node_removed);
ClassDB::bind_method(D_METHOD("clear"), &EditorSelection::clear);
ClassDB::bind_method(D_METHOD("add_node", "node"), &EditorSelection::add_node);
ClassDB::bind_method(D_METHOD("remove_node", "node"), &EditorSelection::remove_node);
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 09e63f70b4..20fe349ef6 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -35,6 +35,7 @@
#include "editor/editor_file_system.h"
#include "editor/editor_settings.h"
#include "editor_scale.h"
+
void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) {
updating = true;
@@ -82,21 +83,21 @@ void EditorDirDialog::reload(const String &p_path) {
void EditorDirDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "reload");
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds(""));
reload();
- if (!tree->is_connected("item_collapsed", this, "_item_collapsed")) {
- tree->connect("item_collapsed", this, "_item_collapsed", varray(), CONNECT_DEFERRED);
+ if (!tree->is_connected("item_collapsed", callable_mp(this, &EditorDirDialog::_item_collapsed))) {
+ tree->connect("item_collapsed", callable_mp(this, &EditorDirDialog::_item_collapsed), varray(), CONNECT_DEFERRED);
}
- if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "reload")) {
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "reload");
+ if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &EditorDirDialog::reload))) {
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds(""));
}
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "reload")) {
- EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "reload");
+ if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &EditorDirDialog::reload))) {
+ EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload));
}
}
@@ -120,6 +121,10 @@ void EditorDirDialog::_item_collapsed(Object *p_item) {
opened_paths.insert(item->get_metadata(0));
}
+void EditorDirDialog::_item_activated() {
+ _ok_pressed(); // From AcceptDialog.
+}
+
void EditorDirDialog::ok_pressed() {
TreeItem *ti = tree->get_selected();
@@ -168,11 +173,6 @@ void EditorDirDialog::_make_dir_confirm() {
void EditorDirDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_item_collapsed"), &EditorDirDialog::_item_collapsed);
- ClassDB::bind_method(D_METHOD("_make_dir"), &EditorDirDialog::_make_dir);
- ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &EditorDirDialog::_make_dir_confirm);
- ClassDB::bind_method(D_METHOD("reload"), &EditorDirDialog::reload, DEFVAL(""));
-
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
}
@@ -186,10 +186,10 @@ EditorDirDialog::EditorDirDialog() {
tree = memnew(Tree);
add_child(tree);
- tree->connect("item_activated", this, "_ok");
+ tree->connect("item_activated", callable_mp(this, &EditorDirDialog::_item_activated));
makedir = add_button(TTR("Create Folder"), OS::get_singleton()->get_swap_ok_cancel(), "makedir");
- makedir->connect("pressed", this, "_make_dir");
+ makedir->connect("pressed", callable_mp(this, &EditorDirDialog::_make_dir));
makedialog = memnew(ConfirmationDialog);
makedialog->set_title(TTR("Create Folder"));
@@ -202,7 +202,7 @@ EditorDirDialog::EditorDirDialog() {
makedirname = memnew(LineEdit);
makevb->add_margin_child(TTR("Name:"), makedirname);
makedialog->register_text_enter(makedirname);
- makedialog->connect("confirmed", this, "_make_dir_confirm");
+ makedialog->connect("confirmed", callable_mp(this, &EditorDirDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog);
mkdirerr->set_text(TTR("Could not create folder."));
diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h
index 44f6683034..2233dbbeee 100644
--- a/editor/editor_dir_dialog.h
+++ b/editor/editor_dir_dialog.h
@@ -50,6 +50,7 @@ class EditorDirDialog : public ConfirmationDialog {
bool updating;
void _item_collapsed(Object *p_item);
+ void _item_activated();
void _update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path = String());
void _make_dir();
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index f638df28a8..4941f295d7 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -582,14 +582,14 @@ String EditorExportPlugin::get_ios_cpp_code() const {
return ios_cpp_code;
}
-void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features) {
+void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
if (get_script_instance()) {
get_script_instance()->call("_export_file", p_path, p_type, p_features);
}
}
-void EditorExportPlugin::_export_begin_script(const PoolVector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
+void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
if (get_script_instance()) {
get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags);
@@ -625,8 +625,8 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
- BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::POOL_STRING_ARRAY, "features")));
- BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::POOL_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags")));
+ BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "features")));
+ BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::PACKED_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags")));
BIND_VMETHOD(MethodInfo("_export_end"));
}
@@ -731,7 +731,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
FeatureContainers feature_containers = get_feature_containers(p_preset);
Set<String> &features = feature_containers.features;
- PoolVector<String> &features_pv = feature_containers.features_pv;
+ Vector<String> &features_pv = feature_containers.features_pv;
//store everything in the export medium
int idx = 0;
@@ -1213,8 +1213,6 @@ void EditorExport::save_presets() {
}
void EditorExport::_bind_methods() {
-
- ClassDB::bind_method("_save", &EditorExport::_save);
}
void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
@@ -1416,7 +1414,7 @@ EditorExport::EditorExport() {
add_child(save_timer);
save_timer->set_wait_time(0.8);
save_timer->set_one_shot(true);
- save_timer->connect("timeout", this, "_save");
+ save_timer->connect("timeout", callable_mp(this, &EditorExport::_save));
block_save = false;
singleton = this;
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 19651b2c62..139d672cb8 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -188,7 +188,7 @@ private:
struct FeatureContainers {
Set<String> features;
- PoolVector<String> features_pv;
+ Vector<String> features_pv;
};
void _export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths);
@@ -310,8 +310,8 @@ class EditorExportPlugin : public Reference {
ios_cpp_code = "";
}
- void _export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features);
- void _export_begin_script(const PoolVector<String> &p_features, bool p_debug, const String &p_path, int p_flags);
+ void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
+ void _export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags);
void _export_end_script();
protected:
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 559a0ef0ea..959507535b 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -534,7 +534,7 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
}
Variant md = item->get_metadata(0);
- if (md.get_type() != Variant::STRING) {
+ if (md.get_type() != Variant::STRING && md.get_type() != Variant::STRING_NAME) {
return;
}
@@ -598,7 +598,7 @@ void EditorFeatureProfileManager::_class_list_item_edited() {
bool checked = item->is_checked(0);
Variant md = item->get_metadata(0);
- if (md.get_type() == Variant::STRING) {
+ if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) {
String class_selected = md;
edited->set_disable_class(class_selected, !checked);
_save_and_update();
@@ -620,7 +620,7 @@ void EditorFeatureProfileManager::_property_item_edited() {
}
Variant md = class_item->get_metadata(0);
- if (md.get_type() != Variant::STRING) {
+ if (md.get_type() != Variant::STRING && md.get_type() != Variant::STRING_NAME) {
return;
}
@@ -633,7 +633,7 @@ void EditorFeatureProfileManager::_property_item_edited() {
bool checked = item->is_checked(0);
md = item->get_metadata(0);
- if (md.get_type() == Variant::STRING) {
+ if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) {
String property_selected = md;
edited->set_disable_class_property(class_name, property_selected, !checked);
_save_and_update();
@@ -657,7 +657,7 @@ void EditorFeatureProfileManager::_update_selected_profile() {
if (class_list->get_selected()) {
Variant md = class_list->get_selected()->get_metadata(0);
- if (md.get_type() == Variant::STRING) {
+ if (md.get_type() == Variant::STRING || md.get_type() == Variant::STRING_NAME) {
class_selected = md;
} else if (md.get_type() == Variant::INT) {
feature_selected = md;
@@ -792,16 +792,6 @@ EditorFeatureProfileManager *EditorFeatureProfileManager::singleton = NULL;
void EditorFeatureProfileManager::_bind_methods() {
ClassDB::bind_method("_update_selected_profile", &EditorFeatureProfileManager::_update_selected_profile);
- ClassDB::bind_method("_profile_action", &EditorFeatureProfileManager::_profile_action);
- ClassDB::bind_method("_create_new_profile", &EditorFeatureProfileManager::_create_new_profile);
- ClassDB::bind_method("_profile_selected", &EditorFeatureProfileManager::_profile_selected);
- ClassDB::bind_method("_erase_selected_profile", &EditorFeatureProfileManager::_erase_selected_profile);
- ClassDB::bind_method("_import_profiles", &EditorFeatureProfileManager::_import_profiles);
- ClassDB::bind_method("_export_profile", &EditorFeatureProfileManager::_export_profile);
- ClassDB::bind_method("_class_list_item_selected", &EditorFeatureProfileManager::_class_list_item_selected);
- ClassDB::bind_method("_class_list_item_edited", &EditorFeatureProfileManager::_class_list_item_edited);
- ClassDB::bind_method("_property_item_edited", &EditorFeatureProfileManager::_property_item_edited);
- ClassDB::bind_method("_emit_current_profile_changed", &EditorFeatureProfileManager::_emit_current_profile_changed);
ADD_SIGNAL(MethodInfo("current_feature_profile_changed"));
}
@@ -819,7 +809,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Unset")));
name_hbc->add_child(profile_actions[PROFILE_CLEAR]);
profile_actions[PROFILE_CLEAR]->set_disabled(true);
- profile_actions[PROFILE_CLEAR]->connect("pressed", this, "_profile_action", varray(PROFILE_CLEAR));
+ profile_actions[PROFILE_CLEAR]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_CLEAR));
main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc);
@@ -827,34 +817,34 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
profile_list = memnew(OptionButton);
profile_list->set_h_size_flags(SIZE_EXPAND_FILL);
profiles_hbc->add_child(profile_list);
- profile_list->connect("item_selected", this, "_profile_selected");
+ profile_list->connect("item_selected", callable_mp(this, &EditorFeatureProfileManager::_profile_selected));
profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current")));
profiles_hbc->add_child(profile_actions[PROFILE_SET]);
profile_actions[PROFILE_SET]->set_disabled(true);
- profile_actions[PROFILE_SET]->connect("pressed", this, "_profile_action", varray(PROFILE_SET));
+ profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_SET));
profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove")));
profiles_hbc->add_child(profile_actions[PROFILE_ERASE]);
profile_actions[PROFILE_ERASE]->set_disabled(true);
- profile_actions[PROFILE_ERASE]->connect("pressed", this, "_profile_action", varray(PROFILE_ERASE));
+ profile_actions[PROFILE_ERASE]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_ERASE));
profiles_hbc->add_child(memnew(VSeparator));
profile_actions[PROFILE_NEW] = memnew(Button(TTR("New")));
profiles_hbc->add_child(profile_actions[PROFILE_NEW]);
- profile_actions[PROFILE_NEW]->connect("pressed", this, "_profile_action", varray(PROFILE_NEW));
+ profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_NEW));
profiles_hbc->add_child(memnew(VSeparator));
profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import")));
profiles_hbc->add_child(profile_actions[PROFILE_IMPORT]);
- profile_actions[PROFILE_IMPORT]->connect("pressed", this, "_profile_action", varray(PROFILE_IMPORT));
+ profile_actions[PROFILE_IMPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_IMPORT));
profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export")));
profiles_hbc->add_child(profile_actions[PROFILE_EXPORT]);
profile_actions[PROFILE_EXPORT]->set_disabled(true);
- profile_actions[PROFILE_EXPORT]->connect("pressed", this, "_profile_action", varray(PROFILE_EXPORT));
+ profile_actions[PROFILE_EXPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_EXPORT));
main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc);
@@ -870,8 +860,8 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
class_list_vbc->add_margin_child(TTR("Enabled Classes:"), class_list, true);
class_list->set_hide_root(true);
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- class_list->connect("cell_selected", this, "_class_list_item_selected");
- class_list->connect("item_edited", this, "_class_list_item_edited", varray(), CONNECT_DEFERRED);
+ class_list->connect("cell_selected", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_selected));
+ class_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_edited), varray(), CONNECT_DEFERRED);
VBoxContainer *property_list_vbc = memnew(VBoxContainer);
h_split->add_child(property_list_vbc);
@@ -882,7 +872,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
property_list->set_hide_root(true);
property_list->set_hide_folding(true);
property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- property_list->connect("item_edited", this, "_property_item_edited", varray(), CONNECT_DEFERRED);
+ property_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_property_item_edited), varray(), CONNECT_DEFERRED);
new_profile_dialog = memnew(ConfirmationDialog);
new_profile_dialog->set_title(TTR("New profile name:"));
@@ -890,20 +880,20 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
new_profile_dialog->add_child(new_profile_name);
new_profile_name->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
add_child(new_profile_dialog);
- new_profile_dialog->connect("confirmed", this, "_create_new_profile");
+ new_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_create_new_profile));
new_profile_dialog->register_text_enter(new_profile_name);
new_profile_dialog->get_ok()->set_text(TTR("Create"));
erase_profile_dialog = memnew(ConfirmationDialog);
add_child(erase_profile_dialog);
erase_profile_dialog->set_title(TTR("Erase Profile"));
- erase_profile_dialog->connect("confirmed", this, "_erase_selected_profile");
+ erase_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_erase_selected_profile));
import_profiles = memnew(EditorFileDialog);
add_child(import_profiles);
import_profiles->set_mode(EditorFileDialog::MODE_OPEN_FILES);
import_profiles->add_filter("*.profile; " + TTR("Godot Feature Profile"));
- import_profiles->connect("files_selected", this, "_import_profiles");
+ import_profiles->connect("files_selected", callable_mp(this, &EditorFeatureProfileManager::_import_profiles));
import_profiles->set_title(TTR("Import Profile(s)"));
import_profiles->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@@ -911,7 +901,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
add_child(export_profile);
export_profile->set_mode(EditorFileDialog::MODE_SAVE_FILE);
export_profile->add_filter("*.profile; " + TTR("Godot Feature Profile"));
- export_profile->connect("file_selected", this, "_export_profile");
+ export_profile->connect("file_selected", callable_mp(this, &EditorFeatureProfileManager::_export_profile));
export_profile->set_title(TTR("Export Profile"));
export_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@@ -921,7 +911,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
update_timer = memnew(Timer);
update_timer->set_wait_time(1); //wait a second before updating editor
add_child(update_timer);
- update_timer->connect("timeout", this, "_emit_current_profile_changed");
+ update_timer->connect("timeout", callable_mp(this, &EditorFeatureProfileManager::_emit_current_profile_changed));
update_timer->set_one_shot(true);
updating_features = false;
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index c869768c6c..250fa6b3e0 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -199,7 +199,10 @@ Vector<String> EditorFileDialog::get_selected_files() const {
void EditorFileDialog::update_dir() {
- dir->set_text(dir_access->get_current_dir());
+ if (drives->is_visible()) {
+ drives->select(dir_access->get_current_drive());
+ }
+ dir->set_text(dir_access->get_current_dir(false));
// Disable "Open" button only when selecting file(s) mode.
get_ok()->set_disabled(_is_open_should_be_disabled());
@@ -347,7 +350,7 @@ void EditorFileDialog::_action_pressed() {
String fbase = dir_access->get_current_dir();
- PoolVector<String> files;
+ Vector<String> files;
for (int i = 0; i < item_list->get_item_count(); i++) {
if (item_list->is_selected(i))
files.push_back(fbase.plus_file(item_list->get_item_text(i)));
@@ -691,7 +694,7 @@ void EditorFileDialog::update_file_name() {
String base_name = file_str.get_basename();
Vector<String> filter_substr = filter_str.split(";");
if (filter_substr.size() >= 2) {
- file_str = base_name + "." + filter_substr[1].strip_edges().to_lower();
+ file_str = base_name + "." + filter_substr[0].strip_edges().lstrip("*.").to_lower();
} else {
file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower();
}
@@ -946,7 +949,7 @@ void EditorFileDialog::add_filter(const String &p_filter) {
String EditorFileDialog::get_current_dir() const {
- return dir->get_text();
+ return dir_access->get_current_dir();
}
String EditorFileDialog::get_current_file() const {
@@ -954,7 +957,7 @@ String EditorFileDialog::get_current_file() const {
}
String EditorFileDialog::get_current_path() const {
- return dir->get_text().plus_file(file->get_text());
+ return dir_access->get_current_dir().plus_file(file->get_text());
}
void EditorFileDialog::set_current_dir(const String &p_dir) {
@@ -1149,6 +1152,12 @@ void EditorFileDialog::_update_drives() {
drives->hide();
} else {
drives->clear();
+ Node *dp = drives->get_parent();
+ if (dp) {
+ dp->remove_child(drives);
+ }
+ dp = dir_access->drives_are_shortcuts() ? shortcuts_container : drives_container;
+ dp->add_child(drives);
drives->show();
for (int i = 0; i < dir_access->get_drive_count(); i++) {
@@ -1364,19 +1373,7 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorFileDialog::_unhandled_input);
- ClassDB::bind_method(D_METHOD("_item_selected"), &EditorFileDialog::_item_selected);
- ClassDB::bind_method(D_METHOD("_multi_selected"), &EditorFileDialog::_multi_selected);
- ClassDB::bind_method(D_METHOD("_items_clear_selection"), &EditorFileDialog::_items_clear_selection);
- ClassDB::bind_method(D_METHOD("_item_list_item_rmb_selected"), &EditorFileDialog::_item_list_item_rmb_selected);
- ClassDB::bind_method(D_METHOD("_item_list_rmb_clicked"), &EditorFileDialog::_item_list_rmb_clicked);
- ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &EditorFileDialog::_item_menu_id_pressed);
- ClassDB::bind_method(D_METHOD("_item_db_selected"), &EditorFileDialog::_item_dc_selected);
- ClassDB::bind_method(D_METHOD("_dir_entered"), &EditorFileDialog::_dir_entered);
- ClassDB::bind_method(D_METHOD("_file_entered"), &EditorFileDialog::_file_entered);
- ClassDB::bind_method(D_METHOD("_action_pressed"), &EditorFileDialog::_action_pressed);
ClassDB::bind_method(D_METHOD("_cancel_pressed"), &EditorFileDialog::_cancel_pressed);
- ClassDB::bind_method(D_METHOD("_filter_selected"), &EditorFileDialog::_filter_selected);
- ClassDB::bind_method(D_METHOD("_save_confirm_pressed"), &EditorFileDialog::_save_confirm_pressed);
ClassDB::bind_method(D_METHOD("clear_filters"), &EditorFileDialog::clear_filters);
ClassDB::bind_method(D_METHOD("add_filter", "filter"), &EditorFileDialog::add_filter);
@@ -1393,12 +1390,9 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_access"), &EditorFileDialog::get_access);
ClassDB::bind_method(D_METHOD("set_show_hidden_files", "show"), &EditorFileDialog::set_show_hidden_files);
ClassDB::bind_method(D_METHOD("is_showing_hidden_files"), &EditorFileDialog::is_showing_hidden_files);
- ClassDB::bind_method(D_METHOD("_select_drive"), &EditorFileDialog::_select_drive);
- ClassDB::bind_method(D_METHOD("_make_dir"), &EditorFileDialog::_make_dir);
- ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &EditorFileDialog::_make_dir_confirm);
ClassDB::bind_method(D_METHOD("_update_file_name"), &EditorFileDialog::update_file_name);
- ClassDB::bind_method(D_METHOD("_update_file_list"), &EditorFileDialog::update_file_list);
ClassDB::bind_method(D_METHOD("_update_dir"), &EditorFileDialog::update_dir);
+ ClassDB::bind_method(D_METHOD("_update_file_list"), &EditorFileDialog::update_file_list);
ClassDB::bind_method(D_METHOD("_thumbnail_done"), &EditorFileDialog::_thumbnail_done);
ClassDB::bind_method(D_METHOD("set_display_mode", "mode"), &EditorFileDialog::set_display_mode);
ClassDB::bind_method(D_METHOD("get_display_mode"), &EditorFileDialog::get_display_mode);
@@ -1406,20 +1400,10 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_disable_overwrite_warning", "disable"), &EditorFileDialog::set_disable_overwrite_warning);
ClassDB::bind_method(D_METHOD("is_overwrite_warning_disabled"), &EditorFileDialog::is_overwrite_warning_disabled);
- ClassDB::bind_method(D_METHOD("_recent_selected"), &EditorFileDialog::_recent_selected);
- ClassDB::bind_method(D_METHOD("_go_back"), &EditorFileDialog::_go_back);
- ClassDB::bind_method(D_METHOD("_go_forward"), &EditorFileDialog::_go_forward);
- ClassDB::bind_method(D_METHOD("_go_up"), &EditorFileDialog::_go_up);
-
- ClassDB::bind_method(D_METHOD("_favorite_pressed"), &EditorFileDialog::_favorite_pressed);
- ClassDB::bind_method(D_METHOD("_favorite_selected"), &EditorFileDialog::_favorite_selected);
- ClassDB::bind_method(D_METHOD("_favorite_move_up"), &EditorFileDialog::_favorite_move_up);
- ClassDB::bind_method(D_METHOD("_favorite_move_down"), &EditorFileDialog::_favorite_move_down);
-
ClassDB::bind_method(D_METHOD("invalidate"), &EditorFileDialog::invalidate);
ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path")));
- ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths")));
+ ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::PACKED_STRING_ARRAY, "paths")));
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access");
@@ -1537,32 +1521,35 @@ EditorFileDialog::EditorFileDialog() {
pathhb->add_child(dir_next);
pathhb->add_child(dir_up);
- dir_prev->connect("pressed", this, "_go_back");
- dir_next->connect("pressed", this, "_go_forward");
- dir_up->connect("pressed", this, "_go_up");
+ dir_prev->connect("pressed", callable_mp(this, &EditorFileDialog::_go_back));
+ dir_next->connect("pressed", callable_mp(this, &EditorFileDialog::_go_forward));
+ dir_up->connect("pressed", callable_mp(this, &EditorFileDialog::_go_up));
pathhb->add_child(memnew(Label(TTR("Path:"))));
+ drives_container = memnew(HBoxContainer);
+ pathhb->add_child(drives_container);
+
dir = memnew(LineEdit);
pathhb->add_child(dir);
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
refresh->set_tooltip(TTR("Refresh files."));
- refresh->connect("pressed", this, "_update_file_list");
+ refresh->connect("pressed", callable_mp(this, &EditorFileDialog::update_file_list));
pathhb->add_child(refresh);
favorite = memnew(ToolButton);
favorite->set_toggle_mode(true);
favorite->set_tooltip(TTR("(Un)favorite current folder."));
- favorite->connect("pressed", this, "_favorite_pressed");
+ favorite->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_pressed));
pathhb->add_child(favorite);
show_hidden = memnew(ToolButton);
show_hidden->set_toggle_mode(true);
show_hidden->set_pressed(is_showing_hidden_files());
show_hidden->set_tooltip(TTR("Toggle the visibility of hidden files."));
- show_hidden->connect("toggled", this, "set_show_hidden_files");
+ show_hidden->connect("toggled", callable_mp(this, &EditorFileDialog::set_show_hidden_files));
pathhb->add_child(show_hidden);
pathhb->add_child(memnew(VSeparator));
@@ -1571,7 +1558,7 @@ EditorFileDialog::EditorFileDialog() {
view_mode_group.instance();
mode_thumbnails = memnew(ToolButton);
- mode_thumbnails->connect("pressed", this, "set_display_mode", varray(DISPLAY_THUMBNAILS));
+ mode_thumbnails->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_THUMBNAILS));
mode_thumbnails->set_toggle_mode(true);
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
mode_thumbnails->set_button_group(view_mode_group);
@@ -1579,20 +1566,22 @@ EditorFileDialog::EditorFileDialog() {
pathhb->add_child(mode_thumbnails);
mode_list = memnew(ToolButton);
- mode_list->connect("pressed", this, "set_display_mode", varray(DISPLAY_LIST));
+ mode_list->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_LIST));
mode_list->set_toggle_mode(true);
mode_list->set_pressed(display_mode == DISPLAY_LIST);
mode_list->set_button_group(view_mode_group);
mode_list->set_tooltip(TTR("View items as a list."));
pathhb->add_child(mode_list);
+ shortcuts_container = memnew(HBoxContainer);
+ pathhb->add_child(shortcuts_container);
+
drives = memnew(OptionButton);
- pathhb->add_child(drives);
- drives->connect("item_selected", this, "_select_drive");
+ drives->connect("item_selected", callable_mp(this, &EditorFileDialog::_select_drive));
makedir = memnew(Button);
makedir->set_text(TTR("Create Folder"));
- makedir->connect("pressed", this, "_make_dir");
+ makedir->connect("pressed", callable_mp(this, &EditorFileDialog::_make_dir));
pathhb->add_child(makedir);
list_hb = memnew(HSplitContainer);
@@ -1614,15 +1603,15 @@ EditorFileDialog::EditorFileDialog() {
fav_hb->add_spacer();
fav_up = memnew(ToolButton);
fav_hb->add_child(fav_up);
- fav_up->connect("pressed", this, "_favorite_move_up");
+ fav_up->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_up));
fav_down = memnew(ToolButton);
fav_hb->add_child(fav_down);
- fav_down->connect("pressed", this, "_favorite_move_down");
+ fav_down->connect("pressed", callable_mp(this, &EditorFileDialog::_favorite_move_down));
favorites = memnew(ItemList);
fav_vb->add_child(favorites);
favorites->set_v_size_flags(SIZE_EXPAND_FILL);
- favorites->connect("item_selected", this, "_favorite_selected");
+ favorites->connect("item_selected", callable_mp(this, &EditorFileDialog::_favorite_selected));
VBoxContainer *rec_vb = memnew(VBoxContainer);
vsc->add_child(rec_vb);
@@ -1631,7 +1620,7 @@ EditorFileDialog::EditorFileDialog() {
recent = memnew(ItemList);
recent->set_allow_reselect(true);
rec_vb->add_margin_child(TTR("Recent:"), recent, true);
- recent->connect("item_selected", this, "_recent_selected");
+ recent->connect("item_selected", callable_mp(this, &EditorFileDialog::_recent_selected));
VBoxContainer *item_vb = memnew(VBoxContainer);
list_hb->add_child(item_vb);
@@ -1650,13 +1639,13 @@ EditorFileDialog::EditorFileDialog() {
item_list = memnew(ItemList);
item_list->set_v_size_flags(SIZE_EXPAND_FILL);
- item_list->connect("item_rmb_selected", this, "_item_list_item_rmb_selected");
- item_list->connect("rmb_clicked", this, "_item_list_rmb_clicked");
+ item_list->connect("item_rmb_selected", callable_mp(this, &EditorFileDialog::_item_list_item_rmb_selected));
+ item_list->connect("rmb_clicked", callable_mp(this, &EditorFileDialog::_item_list_rmb_clicked));
item_list->set_allow_rmb_select(true);
list_vb->add_child(item_list);
item_menu = memnew(PopupMenu);
- item_menu->connect("id_pressed", this, "_item_menu_id_pressed");
+ item_menu->connect("id_pressed", callable_mp(this, &EditorFileDialog::_item_menu_id_pressed));
add_child(item_menu);
// Other stuff.
@@ -1687,19 +1676,19 @@ EditorFileDialog::EditorFileDialog() {
access = ACCESS_RESOURCES;
_update_drives();
- connect("confirmed", this, "_action_pressed");
- item_list->connect("item_selected", this, "_item_selected", varray(), CONNECT_DEFERRED);
- item_list->connect("multi_selected", this, "_multi_selected", varray(), CONNECT_DEFERRED);
- item_list->connect("item_activated", this, "_item_db_selected", varray());
- item_list->connect("nothing_selected", this, "_items_clear_selection");
- dir->connect("text_entered", this, "_dir_entered");
- file->connect("text_entered", this, "_file_entered");
- filter->connect("item_selected", this, "_filter_selected");
+ connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed));
+ item_list->connect("item_selected", callable_mp(this, &EditorFileDialog::_item_selected), varray(), CONNECT_DEFERRED);
+ item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), varray(), CONNECT_DEFERRED);
+ item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected), varray());
+ item_list->connect("nothing_selected", callable_mp(this, &EditorFileDialog::_items_clear_selection));
+ dir->connect("text_entered", callable_mp(this, &EditorFileDialog::_dir_entered));
+ file->connect("text_entered", callable_mp(this, &EditorFileDialog::_file_entered));
+ filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected));
confirm_save = memnew(ConfirmationDialog);
confirm_save->set_as_toplevel(true);
add_child(confirm_save);
- confirm_save->connect("confirmed", this, "_save_confirm_pressed");
+ confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed));
remove_dialog = memnew(DependencyRemoveDialog);
add_child(remove_dialog);
@@ -1713,7 +1702,7 @@ EditorFileDialog::EditorFileDialog() {
makevb->add_margin_child(TTR("Name:"), makedirname);
add_child(makedialog);
makedialog->register_text_enter(makedirname);
- makedialog->connect("confirmed", this, "_make_dir_confirm");
+ makedialog->connect("confirmed", callable_mp(this, &EditorFileDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog);
mkdirerr->set_text(TTR("Could not create folder."));
add_child(mkdirerr);
@@ -1752,8 +1741,6 @@ void EditorLineEditFileChooser::_notification(int p_what) {
void EditorLineEditFileChooser::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_browse"), &EditorLineEditFileChooser::_browse);
- ClassDB::bind_method(D_METHOD("_chosen"), &EditorLineEditFileChooser::_chosen);
ClassDB::bind_method(D_METHOD("get_button"), &EditorLineEditFileChooser::get_button);
ClassDB::bind_method(D_METHOD("get_line_edit"), &EditorLineEditFileChooser::get_line_edit);
ClassDB::bind_method(D_METHOD("get_file_dialog"), &EditorLineEditFileChooser::get_file_dialog);
@@ -1777,10 +1764,10 @@ EditorLineEditFileChooser::EditorLineEditFileChooser() {
line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
button = memnew(Button);
add_child(button);
- button->connect("pressed", this, "_browse");
+ button->connect("pressed", callable_mp(this, &EditorLineEditFileChooser::_browse));
dialog = memnew(EditorFileDialog);
add_child(dialog);
- dialog->connect("file_selected", this, "_chosen");
- dialog->connect("dir_selected", this, "_chosen");
- dialog->connect("files_selected", this, "_chosen");
+ dialog->connect("file_selected", callable_mp(this, &EditorLineEditFileChooser::_chosen));
+ dialog->connect("dir_selected", callable_mp(this, &EditorLineEditFileChooser::_chosen));
+ dialog->connect("files_selected", callable_mp(this, &EditorLineEditFileChooser::_chosen));
}
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 8b48604b31..998ac33761 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -100,6 +100,8 @@ private:
ToolButton *dir_next;
ToolButton *dir_up;
+ HBoxContainer *drives_container;
+ HBoxContainer *shortcuts_container;
OptionButton *drives;
ItemList *item_list;
PopupMenu *item_menu;
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 107ecac3b0..b5ec08ef60 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -2100,8 +2100,8 @@ void EditorFileSystem::_bind_methods() {
ADD_SIGNAL(MethodInfo("filesystem_changed"));
ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist")));
- ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::POOL_STRING_ARRAY, "resources")));
- ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::POOL_STRING_ARRAY, "resources")));
+ ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));
+ ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));
}
void EditorFileSystem::_update_extensions() {
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 475f16f12f..507a77e641 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -34,12 +34,12 @@
#include "editor_inspector.h"
#include "editor_settings.h"
-PoolVector<String> EditorFolding::_get_unfolds(const Object *p_object) {
+Vector<String> EditorFolding::_get_unfolds(const Object *p_object) {
- PoolVector<String> sections;
+ Vector<String> sections;
sections.resize(p_object->editor_get_section_folding().size());
if (sections.size()) {
- PoolVector<String>::Write w = sections.write();
+ String *w = sections.ptrw();
int idx = 0;
for (const Set<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) {
w[idx++] = E->get();
@@ -52,7 +52,7 @@ PoolVector<String> EditorFolding::_get_unfolds(const Object *p_object) {
void EditorFolding::save_resource_folding(const RES &p_resource, const String &p_path) {
Ref<ConfigFile> config;
config.instance();
- PoolVector<String> unfolds = _get_unfolds(p_resource.ptr());
+ Vector<String> unfolds = _get_unfolds(p_resource.ptr());
config->set_value("folding", "sections_unfolded", unfolds);
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
@@ -60,10 +60,10 @@ void EditorFolding::save_resource_folding(const RES &p_resource, const String &p
config->save(file);
}
-void EditorFolding::_set_unfolds(Object *p_object, const PoolVector<String> &p_unfolds) {
+void EditorFolding::_set_unfolds(Object *p_object, const Vector<String> &p_unfolds) {
int uc = p_unfolds.size();
- PoolVector<String>::Read r = p_unfolds.read();
+ const String *r = p_unfolds.ptr();
p_object->editor_clear_section_folding();
for (int i = 0; i < uc; i++) {
p_object->editor_set_section_unfold(r[i], true);
@@ -82,7 +82,7 @@ void EditorFolding::load_resource_folding(RES p_resource, const String &p_path)
return;
}
- PoolVector<String> unfolds;
+ Vector<String> unfolds;
if (config->has_section_key("folding", "sections_unfolded")) {
unfolds = config->get_value("folding", "sections_unfolded");
@@ -103,7 +103,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
if (p_node->is_displayed_folded()) {
nodes_folded.push_back(p_root->get_path_to(p_node));
}
- PoolVector<String> unfolds = _get_unfolds(p_node);
+ Vector<String> unfolds = _get_unfolds(p_node);
if (unfolds.size()) {
p_folds.push_back(p_root->get_path_to(p_node));
@@ -118,7 +118,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
RES res = p_node->get(E->get().name);
if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
- PoolVector<String> res_unfolds = _get_unfolds(res.ptr());
+ Vector<String> res_unfolds = _get_unfolds(res.ptr());
resource_folds.push_back(res->get_path());
resource_folds.push_back(res_unfolds);
resources.insert(res);
@@ -133,6 +133,8 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
}
void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) {
+ ERR_FAIL_NULL(p_scene);
+
FileAccessRef file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
if (!file_check->file_exists(p_path)) //This can happen when creating scene from FilesystemDock. It has path, but no file.
return;
@@ -184,7 +186,7 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
for (int i = 0; i < unfolds.size(); i += 2) {
NodePath path2 = unfolds[i];
- PoolVector<String> un = unfolds[i + 1];
+ Vector<String> un = unfolds[i + 1];
Node *node = p_scene->get_node_or_null(path2);
if (!node) {
continue;
@@ -202,7 +204,7 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
continue;
}
- PoolVector<String> unfolds2 = res_unfolds[i + 1];
+ Vector<String> unfolds2 = res_unfolds[i + 1];
_set_unfolds(res.ptr(), unfolds2);
}
diff --git a/editor/editor_folding.h b/editor/editor_folding.h
index cc49b062d0..5220907fe7 100644
--- a/editor/editor_folding.h
+++ b/editor/editor_folding.h
@@ -35,8 +35,8 @@
class EditorFolding {
- PoolVector<String> _get_unfolds(const Object *p_object);
- void _set_unfolds(Object *p_object, const PoolVector<String> &p_unfolds);
+ Vector<String> _get_unfolds(const Object *p_object);
+ void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds);
void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<RES> &resources);
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index db2f9c53d9..171b7a2176 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -256,6 +256,10 @@ void editor_register_fonts(Ref<Theme> p_theme) {
MAKE_DEFAULT_FONT(df_rulers, 8 * EDSCALE);
p_theme->set_font("rulers", "EditorFonts", df_rulers);
+ // Rotation widget font
+ MAKE_DEFAULT_FONT(df_rotation_control, 14 * EDSCALE);
+ p_theme->set_font("rotation_control", "EditorFonts", df_rotation_control);
+
// Code font
MAKE_SOURCE_FONT(df_code, int(EDITOR_GET("interface/editor/code_font_size")) * EDSCALE);
p_theme->set_font("source", "EditorFonts", df_code);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 0ade4c5c80..b26fa77e16 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -66,7 +66,7 @@ void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
Ref<InputEventKey> k = p_ev;
- if (k.is_valid() && k->get_control() && k->get_scancode() == KEY_F) {
+ if (k.is_valid() && k->get_control() && k->get_keycode() == KEY_F) {
search->grab_focus();
search->select_all();
@@ -1529,9 +1529,6 @@ void EditorHelp::set_scroll(int p_scroll) {
void EditorHelp::_bind_methods() {
ClassDB::bind_method("_class_list_select", &EditorHelp::_class_list_select);
- ClassDB::bind_method("_class_desc_select", &EditorHelp::_class_desc_select);
- ClassDB::bind_method("_class_desc_input", &EditorHelp::_class_desc_input);
- ClassDB::bind_method("_class_desc_resized", &EditorHelp::_class_desc_resized);
ClassDB::bind_method("_request_help", &EditorHelp::_request_help);
ClassDB::bind_method("_unhandled_key_input", &EditorHelp::_unhandled_key_input);
ClassDB::bind_method("_search", &EditorHelp::_search);
@@ -1551,9 +1548,9 @@ EditorHelp::EditorHelp() {
class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
class_desc->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
- class_desc->connect("meta_clicked", this, "_class_desc_select");
- class_desc->connect("gui_input", this, "_class_desc_input");
- class_desc->connect("resized", this, "_class_desc_resized");
+ class_desc->connect("meta_clicked", callable_mp(this, &EditorHelp::_class_desc_select));
+ class_desc->connect("gui_input", callable_mp(this, &EditorHelp::_class_desc_input));
+ class_desc->connect("resized", callable_mp(this, &EditorHelp::_class_desc_resized));
_class_desc_resized();
// Added second so it opens at the bottom so it won't offset the entire widget.
@@ -1607,7 +1604,6 @@ void EditorHelpBit::_meta_clicked(String p_select) {
void EditorHelpBit::_bind_methods() {
- ClassDB::bind_method("_meta_clicked", &EditorHelpBit::_meta_clicked);
ClassDB::bind_method(D_METHOD("set_text", "text"), &EditorHelpBit::set_text);
ADD_SIGNAL(MethodInfo("request_hide"));
}
@@ -1633,7 +1629,7 @@ EditorHelpBit::EditorHelpBit() {
rich_text = memnew(RichTextLabel);
add_child(rich_text);
- rich_text->connect("meta_clicked", this, "_meta_clicked");
+ rich_text->connect("meta_clicked", callable_mp(this, &EditorHelpBit::_meta_clicked));
rich_text->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
rich_text->set_override_selected_font_color(false);
set_custom_minimum_size(Size2(0, 70 * EDSCALE));
@@ -1645,8 +1641,8 @@ FindBar::FindBar() {
add_child(search_text);
search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
search_text->set_h_size_flags(SIZE_EXPAND_FILL);
- search_text->connect("text_changed", this, "_search_text_changed");
- search_text->connect("text_entered", this, "_search_text_entered");
+ search_text->connect("text_changed", callable_mp(this, &FindBar::_search_text_changed));
+ search_text->connect("text_entered", callable_mp(this, &FindBar::_search_text_entered));
matches_label = memnew(Label);
add_child(matches_label);
@@ -1655,12 +1651,12 @@ FindBar::FindBar() {
find_prev = memnew(ToolButton);
add_child(find_prev);
find_prev->set_focus_mode(FOCUS_NONE);
- find_prev->connect("pressed", this, "_search_prev");
+ find_prev->connect("pressed", callable_mp(this, &FindBar::search_prev));
find_next = memnew(ToolButton);
add_child(find_next);
find_next->set_focus_mode(FOCUS_NONE);
- find_next->connect("pressed", this, "_search_next");
+ find_next->connect("pressed", callable_mp(this, &FindBar::search_next));
Control *space = memnew(Control);
add_child(space);
@@ -1671,7 +1667,7 @@ FindBar::FindBar() {
hide_button->set_focus_mode(FOCUS_NONE);
hide_button->set_expand(true);
hide_button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
- hide_button->connect("pressed", this, "_hide_pressed");
+ hide_button->connect("pressed", callable_mp(this, &FindBar::_hide_bar));
}
void FindBar::popup_search() {
@@ -1717,12 +1713,6 @@ void FindBar::_bind_methods() {
ClassDB::bind_method("_unhandled_input", &FindBar::_unhandled_input);
- ClassDB::bind_method("_search_text_changed", &FindBar::_search_text_changed);
- ClassDB::bind_method("_search_text_entered", &FindBar::_search_text_entered);
- ClassDB::bind_method("_search_next", &FindBar::search_next);
- ClassDB::bind_method("_search_prev", &FindBar::search_prev);
- ClassDB::bind_method("_hide_pressed", &FindBar::_hide_bar);
-
ADD_SIGNAL(MethodInfo("search"));
}
@@ -1813,7 +1803,7 @@ void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
bool accepted = true;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_ESCAPE: {
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index d45b66afce..f7ce2dd4fc 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -66,7 +66,7 @@ void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) {
// Redirect up and down navigational key events to the results list.
Ref<InputEventKey> key = p_event;
if (key.is_valid()) {
- switch (key->get_scancode()) {
+ switch (key->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
@@ -111,7 +111,7 @@ void EditorHelpSearch::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &EditorHelpSearch::_confirmed));
_update_icons();
} break;
case NOTIFICATION_POPUP_HIDE: {
@@ -147,11 +147,6 @@ void EditorHelpSearch::_notification(int p_what) {
void EditorHelpSearch::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_results"), &EditorHelpSearch::_update_results);
- ClassDB::bind_method(D_METHOD("_search_box_gui_input"), &EditorHelpSearch::_search_box_gui_input);
- ClassDB::bind_method(D_METHOD("_search_box_text_changed"), &EditorHelpSearch::_search_box_text_changed);
- ClassDB::bind_method(D_METHOD("_filter_combo_item_selected"), &EditorHelpSearch::_filter_combo_item_selected);
- ClassDB::bind_method(D_METHOD("_confirmed"), &EditorHelpSearch::_confirmed);
ADD_SIGNAL(MethodInfo("go_to_help"));
}
@@ -206,21 +201,21 @@ EditorHelpSearch::EditorHelpSearch() {
search_box = memnew(LineEdit);
search_box->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
- search_box->connect("gui_input", this, "_search_box_gui_input");
- search_box->connect("text_changed", this, "_search_box_text_changed");
+ search_box->connect("gui_input", callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
+ search_box->connect("text_changed", callable_mp(this, &EditorHelpSearch::_search_box_text_changed));
register_text_enter(search_box);
hbox->add_child(search_box);
case_sensitive_button = memnew(ToolButton);
case_sensitive_button->set_tooltip(TTR("Case Sensitive"));
- case_sensitive_button->connect("pressed", this, "_update_results");
+ case_sensitive_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
case_sensitive_button->set_toggle_mode(true);
case_sensitive_button->set_focus_mode(FOCUS_NONE);
hbox->add_child(case_sensitive_button);
hierarchy_button = memnew(ToolButton);
hierarchy_button->set_tooltip(TTR("Show Hierarchy"));
- hierarchy_button->connect("pressed", this, "_update_results");
+ hierarchy_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
hierarchy_button->set_toggle_mode(true);
hierarchy_button->set_pressed(true);
hierarchy_button->set_focus_mode(FOCUS_NONE);
@@ -237,7 +232,7 @@ EditorHelpSearch::EditorHelpSearch() {
filter_combo->add_item(TTR("Constants Only"), SEARCH_CONSTANTS);
filter_combo->add_item(TTR("Properties Only"), SEARCH_PROPERTIES);
filter_combo->add_item(TTR("Theme Properties Only"), SEARCH_THEME_ITEMS);
- filter_combo->connect("item_selected", this, "_filter_combo_item_selected");
+ filter_combo->connect("item_selected", callable_mp(this, &EditorHelpSearch::_filter_combo_item_selected));
hbox->add_child(filter_combo);
// Create the results tree.
@@ -251,8 +246,8 @@ EditorHelpSearch::EditorHelpSearch() {
results_tree->set_custom_minimum_size(Size2(0, 100) * EDSCALE);
results_tree->set_hide_root(true);
results_tree->set_select_mode(Tree::SELECT_ROW);
- results_tree->connect("item_activated", this, "_confirmed");
- results_tree->connect("item_selected", get_ok(), "set_disabled", varray(false));
+ results_tree->connect("item_activated", callable_mp(this, &EditorHelpSearch::_confirmed));
+ results_tree->connect("item_selected", callable_mp((BaseButton *)get_ok(), &BaseButton::set_disabled), varray(false));
vbox->add_child(results_tree, true);
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 6d2b891dc6..ed5a411d8b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_inspector.h"
+
#include "array_property_edit.h"
#include "dictionary_property_edit.h"
#include "editor_feature_profile.h"
@@ -430,7 +431,7 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian
return false; //pointless to check if we are not comparing against anything.
}
- if (p_current.get_type() == Variant::REAL && p_orig.get_type() == Variant::REAL) {
+ if (p_current.get_type() == Variant::FLOAT && p_orig.get_type() == Variant::FLOAT) {
float a = p_current;
float b = p_orig;
@@ -570,7 +571,7 @@ void EditorProperty::_focusable_focused(int p_index) {
void EditorProperty::add_focusable(Control *p_control) {
- p_control->connect("focus_entered", this, "_focusable_focused", varray(focusables.size()));
+ p_control->connect("focus_entered", callable_mp(this, &EditorProperty::_focusable_focused), varray(focusables.size()));
focusables.push_back(p_control);
}
@@ -778,10 +779,20 @@ Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
- String text = TTR("Property:") + " [u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n";
- text += p_text.get_slice("::", 1).strip_edges();
- help_bit->set_text(text);
- help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
+ PackedStringArray slices = p_text.split("::", false);
+ if (!slices.empty()) {
+ String property_name = slices[0].strip_edges();
+ String text = TTR("Property:") + " [u][b]" + property_name + "[/b][/u]";
+
+ if (slices.size() > 1) {
+ String property_doc = slices[1].strip_edges();
+ if (property_name != property_doc) {
+ text += "\n" + property_doc;
+ }
+ }
+ help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
+ }
+
return help_bit;
}
@@ -813,7 +824,6 @@ void EditorProperty::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edited_object"), &EditorProperty::get_edited_object);
ClassDB::bind_method(D_METHOD("_gui_input"), &EditorProperty::_gui_input);
- ClassDB::bind_method(D_METHOD("_focusable_focused"), &EditorProperty::_focusable_focused);
ClassDB::bind_method(D_METHOD("get_tooltip_text"), &EditorProperty::get_tooltip_text);
@@ -828,13 +838,13 @@ void EditorProperty::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "checked"), "set_checked", "is_checked");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_red"), "set_draw_red", "is_draw_red");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keying"), "set_keying", "is_keying");
- ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
- ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::POOL_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value")));
- ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING, "property")));
- ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
- ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::STRING, "bool")));
+ ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
+ ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::PACKED_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value")));
+ ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING_NAME, "property")));
+ ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
+ ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::STRING, "bool")));
ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
- ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx")));
MethodInfo vm;
@@ -925,7 +935,7 @@ bool EditorInspectorPlugin::parse_property(Object *p_object, Variant::Type p_typ
&arg[0], &arg[1], &arg[2], &arg[3], &arg[4], &arg[5]
};
- Variant::CallError err;
+ Callable::CallError err;
return get_script_instance()->call("parse_property", (const Variant **)&argptr, 6, err);
}
return false;
@@ -1005,10 +1015,20 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons
help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
- String text = "[u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n";
- text += p_text.get_slice("::", 1).strip_edges();
- help_bit->set_text(text);
- help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
+ PackedStringArray slices = p_text.split("::", false);
+ if (!slices.empty()) {
+ String property_name = slices[0].strip_edges();
+ String text = "[u][b]" + property_name + "[/b][/u]";
+
+ if (slices.size() > 1) {
+ String property_doc = slices[1].strip_edges();
+ if (property_name != property_doc) {
+ text += "\n" + property_doc;
+ }
+ }
+ help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
+ }
+
return help_bit;
}
@@ -1339,14 +1359,14 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
if (ep) {
ep->object = object;
- ep->connect("property_changed", this, "_property_changed");
- ep->connect("property_keyed", this, "_property_keyed");
- ep->connect("property_keyed_with_value", this, "_property_keyed_with_value");
- ep->connect("property_checked", this, "_property_checked");
- ep->connect("selected", this, "_property_selected");
- ep->connect("multiple_properties_changed", this, "_multiple_properties_changed");
- ep->connect("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED);
- ep->connect("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED);
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
+ ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
+ ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));
+ ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked));
+ ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected));
+ ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed));
+ ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED);
+ ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), varray(), CONNECT_DEFERRED);
if (F->get().properties.size()) {
@@ -1751,17 +1771,17 @@ void EditorInspector::update_tree() {
if (ep) {
- ep->connect("property_changed", this, "_property_changed");
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
if (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED) {
- ep->connect("property_changed", this, "_property_changed_update_all", varray(), CONNECT_DEFERRED);
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed_update_all), varray(), CONNECT_DEFERRED);
}
- ep->connect("property_keyed", this, "_property_keyed");
- ep->connect("property_keyed_with_value", this, "_property_keyed_with_value");
- ep->connect("property_checked", this, "_property_checked");
- ep->connect("selected", this, "_property_selected");
- ep->connect("multiple_properties_changed", this, "_multiple_properties_changed");
- ep->connect("resource_selected", this, "_resource_selected", varray(), CONNECT_DEFERRED);
- ep->connect("object_id_selected", this, "_object_id_selected", varray(), CONNECT_DEFERRED);
+ ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
+ ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));
+ ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked));
+ ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected));
+ ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed));
+ ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED);
+ ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), varray(), CONNECT_DEFERRED);
if (doc_hint != String()) {
ep->set_tooltip(property_prefix + p.name + "::" + doc_hint);
} else {
@@ -1889,7 +1909,7 @@ void EditorInspector::set_use_filter(bool p_use) {
void EditorInspector::register_text_enter(Node *p_line_edit) {
search_box = Object::cast_to<LineEdit>(p_line_edit);
if (search_box)
- search_box->connect("text_changed", this, "_filter_changed");
+ search_box->connect("text_changed", callable_mp(this, &EditorInspector::_filter_changed));
}
void EditorInspector::_filter_changed(const String &p_text) {
@@ -2033,16 +2053,16 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
}
-void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool changing) {
+void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing) {
// The "changing" variable must be true for properties that trigger events as typing occurs,
- // like "text_changed" signal. eg: Text property of Label, Button, RichTextLabel, etc.
- if (changing)
+ // like "text_changed" signal. E.g. text property of Label, Button, RichTextLabel, etc.
+ if (p_changing)
this->changing++;
_edit_set(p_path, p_value, false, p_name);
- if (changing)
+ if (p_changing)
this->changing--;
if (restart_request_props.has(p_path)) {
@@ -2109,7 +2129,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) {
object->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
if (E->get().name == p_path) {
- Variant::CallError ce;
+ Callable::CallError ce;
to_create = Variant::construct(E->get().type, NULL, 0, ce);
break;
}
@@ -2165,7 +2185,7 @@ void EditorInspector::_node_removed(Node *p_node) {
void EditorInspector::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed");
+ EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed));
}
if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -2174,7 +2194,7 @@ void EditorInspector::_notification(int p_what) {
add_style_override("bg", get_stylebox("sub_inspector_bg", "Editor"));
} else {
add_style_override("bg", get_stylebox("bg", "Tree"));
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
}
if (p_what == NOTIFICATION_PREDELETE) {
@@ -2183,7 +2203,7 @@ void EditorInspector::_notification(int p_what) {
if (p_what == NOTIFICATION_EXIT_TREE) {
if (!sub_inspector) {
- get_tree()->disconnect("node_removed", this, "_node_removed");
+ get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
edit(NULL);
}
@@ -2281,21 +2301,7 @@ void EditorInspector::_feature_profile_changed() {
void EditorInspector::_bind_methods() {
- ClassDB::bind_method("_property_changed", &EditorInspector::_property_changed, DEFVAL(""), DEFVAL(false));
- ClassDB::bind_method("_multiple_properties_changed", &EditorInspector::_multiple_properties_changed);
- ClassDB::bind_method("_property_changed_update_all", &EditorInspector::_property_changed_update_all);
-
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
- ClassDB::bind_method("_node_removed", &EditorInspector::_node_removed);
- ClassDB::bind_method("_filter_changed", &EditorInspector::_filter_changed);
- ClassDB::bind_method("_property_keyed", &EditorInspector::_property_keyed);
- ClassDB::bind_method("_property_keyed_with_value", &EditorInspector::_property_keyed_with_value);
- ClassDB::bind_method("_property_checked", &EditorInspector::_property_checked);
- ClassDB::bind_method("_property_selected", &EditorInspector::_property_selected);
- ClassDB::bind_method("_resource_selected", &EditorInspector::_resource_selected);
- ClassDB::bind_method("_object_id_selected", &EditorInspector::_object_id_selected);
- ClassDB::bind_method("_vscroll_changed", &EditorInspector::_vscroll_changed);
- ClassDB::bind_method("_feature_profile_changed", &EditorInspector::_feature_profile_changed);
ClassDB::bind_method("refresh", &EditorInspector::refresh);
@@ -2337,6 +2343,6 @@ EditorInspector::EditorInspector() {
property_focusable = -1;
sub_inspector = false;
- get_v_scrollbar()->connect("value_changed", this, "_vscroll_changed");
+ get_v_scrollbar()->connect("value_changed", callable_mp(this, &EditorInspector::_vscroll_changed));
update_scroll_request = -1;
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 7ad55a13ad..7a1542d30f 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -302,7 +302,7 @@ class EditorInspector : public ScrollContainer {
void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field);
- void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool changing = false);
+ void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false);
void _property_changed_update_all(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false);
void _multiple_properties_changed(Vector<String> p_paths, Array p_values);
void _property_keyed(const String &p_path, bool p_advance);
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp
index 727e758341..776fbd9314 100644
--- a/editor/editor_layouts_dialog.cpp
+++ b/editor/editor_layouts_dialog.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_layouts_dialog.h"
+
#include "core/class_db.h"
#include "core/io/config_file.h"
#include "core/os/keyboard.h"
@@ -44,7 +45,7 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
if (!k->is_pressed())
return;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_KP_ENTER:
case KEY_ENTER: {
@@ -63,7 +64,6 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
}
void EditorLayoutsDialog::_bind_methods() {
- ClassDB::bind_method("_line_gui_input", &EditorLayoutsDialog::_line_gui_input);
ADD_SIGNAL(MethodInfo("name_confirmed", PropertyInfo(Variant::STRING, "name")));
}
@@ -128,8 +128,8 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
name->set_margin(MARGIN_TOP, 5);
name->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5);
name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5);
- name->connect("gui_input", this, "_line_gui_input");
- name->connect("focus_entered", layout_names, "unselect_all");
+ name->connect("gui_input", callable_mp(this, &EditorLayoutsDialog::_line_gui_input));
+ name->connect("focus_entered", callable_mp(layout_names, &ItemList::unselect_all));
}
void EditorLayoutsDialog::set_name_line_enabled(bool p_enabled) {
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 5b77db7707..0e50a5e95c 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -138,8 +138,6 @@ void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
void EditorLog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_clear_request"), &EditorLog::_clear_request);
- ClassDB::bind_method(D_METHOD("_copy_request"), &EditorLog::_copy_request);
ADD_SIGNAL(MethodInfo("clear_request"));
ADD_SIGNAL(MethodInfo("copy_request"));
}
@@ -159,13 +157,13 @@ EditorLog::EditorLog() {
hb->add_child(copybutton);
copybutton->set_text(TTR("Copy"));
copybutton->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KEY_MASK_CMD | KEY_C));
- copybutton->connect("pressed", this, "_copy_request");
+ copybutton->connect("pressed", callable_mp(this, &EditorLog::_copy_request));
clearbutton = memnew(Button);
hb->add_child(clearbutton);
clearbutton->set_text(TTR("Clear"));
clearbutton->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K));
- clearbutton->connect("pressed", this, "_clear_request");
+ clearbutton->connect("pressed", callable_mp(this, &EditorLog::_clear_request));
log = memnew(RichTextLabel);
log->set_scroll_follow(true);
diff --git a/editor/editor_network_profiler.cpp b/editor/editor_network_profiler.cpp
index 1b80743237..a9ef21bb87 100644
--- a/editor/editor_network_profiler.cpp
+++ b/editor/editor_network_profiler.cpp
@@ -35,9 +35,6 @@
#include "editor_settings.h"
void EditorNetworkProfiler::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_frame"), &EditorNetworkProfiler::_update_frame);
- ClassDB::bind_method(D_METHOD("_activate_pressed"), &EditorNetworkProfiler::_activate_pressed);
- ClassDB::bind_method(D_METHOD("_clear_pressed"), &EditorNetworkProfiler::_clear_pressed);
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
}
@@ -142,12 +139,12 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
- activate->connect("pressed", this, "_activate_pressed");
+ activate->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_activate_pressed));
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", this, "_clear_pressed");
+ clear_button->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_clear_pressed));
hb->add_child(clear_button);
hb->add_spacer();
@@ -207,5 +204,5 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
frame_delay->set_wait_time(0.1);
frame_delay->set_one_shot(true);
add_child(frame_delay);
- frame_delay->connect("timeout", this, "_update_frame");
+ frame_delay->connect("timeout", callable_mp(this, &EditorNetworkProfiler::_update_frame));
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 24656410e8..43e640b40e 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -123,6 +123,7 @@
#include "editor/plugins/cpu_particles_2d_editor_plugin.h"
#include "editor/plugins/cpu_particles_editor_plugin.h"
#include "editor/plugins/curve_editor_plugin.h"
+#include "editor/plugins/debugger_editor_plugin.h"
#include "editor/plugins/editor_preview_plugins.h"
#include "editor/plugins/gi_probe_editor_plugin.h"
#include "editor/plugins/gradient_editor_plugin.h"
@@ -168,7 +169,6 @@
#include "editor/quick_open.h"
#include "editor/register_exporters.h"
#include "editor/run_settings_dialog.h"
-#include "editor/script_editor_debugger.h"
#include "editor/settings_config_dialog.h"
#include <stdio.h>
@@ -374,8 +374,8 @@ void EditorNode::_notification(int p_what) {
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
- get_tree()->connect("files_dropped", this, "_dropped_files");
- get_tree()->connect("global_menu_action", this, "_global_menu_action");
+ get_tree()->connect("files_dropped", callable_mp(this, &EditorNode::_dropped_files));
+ get_tree()->connect("global_menu_action", callable_mp(this, &EditorNode::_global_menu_action));
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
} break;
@@ -472,7 +472,7 @@ void EditorNode::_notification(int p_what) {
recent_scenes->set_as_minsize();
// debugger area
- if (ScriptEditor::get_singleton()->get_debugger()->is_visible())
+ if (EditorDebuggerNode::get_singleton()->is_visible())
bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
// update_icons
@@ -547,7 +547,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam
push_item(script.operator->());
}
-void EditorNode::_resources_changed(const PoolVector<String> &p_resources) {
+void EditorNode::_resources_changed(const Vector<String> &p_resources) {
List<Ref<Resource> > changed;
@@ -1846,7 +1846,7 @@ void EditorNode::_edit_current() {
Node *selected_node = NULL;
- if (current_obj->is_class("ScriptEditorDebuggerInspectedObject")) {
+ if (current_obj->is_class("EditorDebuggerRemoteObject")) {
editable_warning = TTR("This is a remote object, so changes to it won't be kept.\nPlease read the documentation relevant to debugging to better understand this workflow.");
capitalize = false;
disable_folding = true;
@@ -2048,9 +2048,13 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
editor_data.get_editor_breakpoints(&breakpoints);
args = ProjectSettings::get_singleton()->get("editor/main_run_args");
- skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints();
+ skip_breakpoints = EditorDebuggerNode::get_singleton()->is_skip_breakpoints();
- Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints);
+ int instances = 1;
+ if (debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO)))
+ instances = 2;
+
+ Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints, instances);
if (error != OK) {
@@ -2174,7 +2178,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case SCENE_TAB_CLOSE:
case FILE_SAVE_SCENE: {
@@ -2195,7 +2199,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case FILE_SAVE_AS_SCENE: {
int scene_idx = (p_option == FILE_SAVE_SCENE || p_option == FILE_SAVE_AS_SCENE) ? -1 : tab_closing;
@@ -2481,6 +2485,16 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
run_settings_dialog->popup_run_settings();
} break;
+ case RUN_DEBUG_ONE: {
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_ONE), true);
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO), false);
+
+ } break;
+ case RUN_DEBUG_TWO: {
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_TWO), true);
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_ONE), false);
+
+ } break;
case RUN_SETTINGS: {
project_settings->popup_project_settings();
@@ -2571,7 +2585,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
- ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
+ EditorDebuggerNode::get_singleton()->set_live_debugging(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked);
} break;
@@ -2746,10 +2760,10 @@ void EditorNode::_tool_menu_option(int p_idx) {
Object *handler = ObjectDB::get_instance(params[0]);
String callback = params[1];
Variant *ud = &params[2];
- Variant::CallError ce;
+ Callable::CallError ce;
handler->call(callback, (const Variant **)&ud, 1, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_call_error_text(handler, callback, (const Variant **)&ud, 1, ce);
ERR_PRINT("Error calling function from tool menu: " + err);
}
@@ -2958,7 +2972,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
ToolButton *tb = memnew(ToolButton);
tb->set_toggle_mode(true);
- tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
+ tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select), varray(singleton->main_editor_buttons.size()));
tb->set_text(p_editor->get_name());
Ref<Texture2D> icon = p_editor->get_icon();
@@ -3052,7 +3066,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
String addon_path = String("res://addons").plus_file(p_addon).plus_file("plugin.cfg");
if (!DirAccess::exists(addon_path.get_base_dir())) {
ProjectSettings *ps = ProjectSettings::get_singleton();
- PoolStringArray enabled_plugins = ps->get("editor_plugins/enabled");
+ PackedStringArray enabled_plugins = ps->get("editor_plugins/enabled");
for (int i = 0; i < enabled_plugins.size(); ++i) {
if (enabled_plugins.get(i) == p_addon) {
enabled_plugins.remove(i);
@@ -3242,7 +3256,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
//this should only happen at the very end
- ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
+ EditorDebuggerNode::get_singleton()->update_live_edit_root();
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
editor_data.notify_edited_scene_changed();
}
@@ -3265,7 +3279,7 @@ void EditorNode::_clear_undo_history() {
void EditorNode::set_current_scene(int p_idx) {
//Save the folding in case the scene gets reloaded.
- if (editor_data.get_scene_path(p_idx) != "")
+ if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx))
editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
if (editor_data.check_and_update_scene(p_idx)) {
@@ -3477,7 +3491,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
opening_prev = false;
scene_tree_dock->set_selected(new_scene);
- ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
+ EditorDebuggerNode::get_singleton()->update_live_edit_root();
push_item(new_scene);
@@ -3619,7 +3633,7 @@ void EditorNode::_quick_run() {
_run(false, quick_run->get_selected());
}
-void EditorNode::notify_child_process_exited() {
+void EditorNode::notify_all_debug_sessions_exited() {
_menu_option_confirm(RUN_STOP, false);
stop_button->set_pressed(false);
@@ -3703,9 +3717,13 @@ void EditorNode::unregister_editor_types() {
_init_callbacks.clear();
}
-void EditorNode::stop_child_process() {
+void EditorNode::stop_child_process(OS::ProcessID p_pid) {
- _menu_option_confirm(RUN_STOP, false);
+ if (has_child_process(p_pid)) {
+ editor_run.stop_child_process(p_pid);
+ if (!editor_run.get_child_process_count()) // All children stopped. Closing.
+ _menu_option_confirm(RUN_STOP, false);
+ }
}
Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) const {
@@ -4785,7 +4803,7 @@ void EditorNode::_scene_tab_changed(int p_tab) {
ToolButton *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) {
ToolButton *tb = memnew(ToolButton);
- tb->connect("toggled", this, "_bottom_panel_switch", varray(bottom_panel_items.size()));
+ tb->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(bottom_panel_items.size()));
tb->set_text(p_text);
tb->set_toggle_mode(true);
tb->set_focus_mode(Control::FOCUS_NONE);
@@ -4847,8 +4865,8 @@ void EditorNode::raise_bottom_panel_item(Control *p_item) {
}
for (int i = 0; i < bottom_panel_items.size(); i++) {
- bottom_panel_items[i].button->disconnect("toggled", this, "_bottom_panel_switch");
- bottom_panel_items[i].button->connect("toggled", this, "_bottom_panel_switch", varray(i));
+ bottom_panel_items[i].button->disconnect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch));
+ bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(i));
}
}
@@ -4869,8 +4887,8 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
}
for (int i = 0; i < bottom_panel_items.size(); i++) {
- bottom_panel_items[i].button->disconnect("toggled", this, "_bottom_panel_switch");
- bottom_panel_items[i].button->connect("toggled", this, "_bottom_panel_switch", varray(i));
+ bottom_panel_items[i].button->disconnect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch));
+ bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(i));
}
}
@@ -4888,7 +4906,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
bottom_panel_items[i].button->set_pressed(i == p_idx);
bottom_panel_items[i].control->set_visible(i == p_idx);
}
- if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller
+ if (EditorDebuggerNode::get_singleton() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller
bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
} else {
bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
@@ -5427,99 +5445,44 @@ void EditorNode::_feature_profile_changed() {
void EditorNode::_bind_methods() {
- ClassDB::bind_method("_menu_option", &EditorNode::_menu_option);
- ClassDB::bind_method("_tool_menu_option", &EditorNode::_tool_menu_option);
- ClassDB::bind_method("_menu_confirm_current", &EditorNode::_menu_confirm_current);
- ClassDB::bind_method("_dialog_action", &EditorNode::_dialog_action);
ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
ClassDB::bind_method("_unhandled_input", &EditorNode::_unhandled_input);
- ClassDB::bind_method("_update_file_menu_opened", &EditorNode::_update_file_menu_opened);
- ClassDB::bind_method("_update_file_menu_closed", &EditorNode::_update_file_menu_closed);
ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false));
ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata);
ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene);
ClassDB::bind_method("open_request", &EditorNode::open_request);
- ClassDB::bind_method("_inherit_request", &EditorNode::_inherit_request);
- ClassDB::bind_method("_instance_request", &EditorNode::_instance_request);
ClassDB::bind_method("_close_messages", &EditorNode::_close_messages);
ClassDB::bind_method("_show_messages", &EditorNode::_show_messages);
- ClassDB::bind_method("_vp_resized", &EditorNode::_vp_resized);
- ClassDB::bind_method("_quick_opened", &EditorNode::_quick_opened);
- ClassDB::bind_method("_quick_run", &EditorNode::_quick_run);
-
- ClassDB::bind_method("_open_recent_scene", &EditorNode::_open_recent_scene);
ClassDB::bind_method("stop_child_process", &EditorNode::stop_child_process);
ClassDB::bind_method("get_script_create_dialog", &EditorNode::get_script_create_dialog);
- ClassDB::bind_method("_sources_changed", &EditorNode::_sources_changed);
- ClassDB::bind_method("_fs_changed", &EditorNode::_fs_changed);
- ClassDB::bind_method("_dock_select_draw", &EditorNode::_dock_select_draw);
- ClassDB::bind_method("_dock_select_input", &EditorNode::_dock_select_input);
- ClassDB::bind_method("_dock_pre_popup", &EditorNode::_dock_pre_popup);
- ClassDB::bind_method("_dock_split_dragged", &EditorNode::_dock_split_dragged);
- ClassDB::bind_method("_save_docks", &EditorNode::_save_docks);
- ClassDB::bind_method("_dock_popup_exit", &EditorNode::_dock_popup_exit);
- ClassDB::bind_method("_dock_move_left", &EditorNode::_dock_move_left);
- ClassDB::bind_method("_dock_move_right", &EditorNode::_dock_move_right);
- ClassDB::bind_method("_dock_tab_changed", &EditorNode::_dock_tab_changed);
-
- ClassDB::bind_method("_layout_menu_option", &EditorNode::_layout_menu_option);
-
ClassDB::bind_method("set_current_scene", &EditorNode::set_current_scene);
ClassDB::bind_method("set_current_version", &EditorNode::set_current_version);
- ClassDB::bind_method("_scene_tab_changed", &EditorNode::_scene_tab_changed);
- ClassDB::bind_method("_scene_tab_closed", &EditorNode::_scene_tab_closed);
- ClassDB::bind_method("_scene_tab_hover", &EditorNode::_scene_tab_hover);
- ClassDB::bind_method("_scene_tab_exit", &EditorNode::_scene_tab_exit);
- ClassDB::bind_method("_scene_tab_input", &EditorNode::_scene_tab_input);
- ClassDB::bind_method("_reposition_active_tab", &EditorNode::_reposition_active_tab);
ClassDB::bind_method("_thumbnail_done", &EditorNode::_thumbnail_done);
- ClassDB::bind_method("_scene_tab_script_edited", &EditorNode::_scene_tab_script_edited);
ClassDB::bind_method("_set_main_scene_state", &EditorNode::_set_main_scene_state);
- ClassDB::bind_method("_update_scene_tabs", &EditorNode::_update_scene_tabs);
- ClassDB::bind_method("_discard_changes", &EditorNode::_discard_changes);
ClassDB::bind_method("_update_recent_scenes", &EditorNode::_update_recent_scenes);
ClassDB::bind_method("_clear_undo_history", &EditorNode::_clear_undo_history);
- ClassDB::bind_method("_dropped_files", &EditorNode::_dropped_files);
- ClassDB::bind_method(D_METHOD("_global_menu_action"), &EditorNode::_global_menu_action, DEFVAL(Variant()));
- ClassDB::bind_method("_toggle_distraction_free_mode", &EditorNode::_toggle_distraction_free_mode);
- ClassDB::bind_method("_version_control_menu_option", &EditorNode::_version_control_menu_option);
ClassDB::bind_method("edit_item_resource", &EditorNode::edit_item_resource);
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
- ClassDB::bind_method(D_METHOD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
-
- ClassDB::bind_method(D_METHOD("_open_imported"), &EditorNode::_open_imported);
- ClassDB::bind_method(D_METHOD("_inherit_imported"), &EditorNode::_inherit_imported);
- ClassDB::bind_method("_copy_warning", &EditorNode::_copy_warning);
-
- ClassDB::bind_method(D_METHOD("_resources_reimported"), &EditorNode::_resources_reimported);
- ClassDB::bind_method(D_METHOD("_bottom_panel_raise_toggled"), &EditorNode::_bottom_panel_raise_toggled);
-
- ClassDB::bind_method(D_METHOD("_on_plugin_ready"), &EditorNode::_on_plugin_ready);
-
- ClassDB::bind_method(D_METHOD("_video_driver_selected"), &EditorNode::_video_driver_selected);
-
- ClassDB::bind_method(D_METHOD("_resources_changed"), &EditorNode::_resources_changed);
- ClassDB::bind_method(D_METHOD("_feature_profile_changed"), &EditorNode::_feature_profile_changed);
+ ClassDB::bind_method(D_METHOD("_on_plugin_ready"), &EditorNode::_on_plugin_ready); // Still used by some connect_compat.
ClassDB::bind_method("_screenshot", &EditorNode::_screenshot);
- ClassDB::bind_method("_request_screenshot", &EditorNode::_request_screenshot);
ClassDB::bind_method("_save_screenshot", &EditorNode::_save_screenshot);
ADD_SIGNAL(MethodInfo("play_pressed"));
ADD_SIGNAL(MethodInfo("pause_pressed"));
ADD_SIGNAL(MethodInfo("stop_pressed"));
ADD_SIGNAL(MethodInfo("request_help_search"));
- ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::POOL_STRING_ARRAY, "args")));
+ ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args")));
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj")));
}
@@ -5536,7 +5499,7 @@ void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_err
static void _execute_thread(void *p_ud) {
EditorNode::ExecuteThreadArgs *eta = (EditorNode::ExecuteThreadArgs *)p_ud;
- Error err = OS::get_singleton()->execute(eta->path, eta->args, true, NULL, &eta->output, &eta->exitcode, true, eta->execute_output_mutex);
+ Error err = OS::get_singleton()->execute(eta->path, eta->args, true, NULL, &eta->output, &eta->exitcode, true, &eta->execute_output_mutex);
print_verbose("Thread exit status: " + itos(eta->exitcode));
if (err != OK) {
eta->exitcode = err;
@@ -5556,7 +5519,6 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
ExecuteThreadArgs eta;
eta.path = p_path;
eta.args = p_arguments;
- eta.execute_output_mutex = Mutex::create();
eta.exitcode = 255;
eta.done = false;
@@ -5567,20 +5529,20 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
ERR_FAIL_COND_V(!eta.execute_output_thread, 0);
while (!eta.done) {
- eta.execute_output_mutex->lock();
- if (prev_len != eta.output.length()) {
- String to_add = eta.output.substr(prev_len, eta.output.length());
- prev_len = eta.output.length();
- execute_outputs->add_text(to_add);
- Main::iteration();
- }
- eta.execute_output_mutex->unlock();
+ {
+ MutexLock lock(eta.execute_output_mutex);
+ if (prev_len != eta.output.length()) {
+ String to_add = eta.output.substr(prev_len, eta.output.length());
+ prev_len = eta.output.length();
+ execute_outputs->add_text(to_add);
+ Main::iteration();
+ }
+ }
OS::get_singleton()->delay_usec(1000);
}
Thread::wait_to_finish(eta.execute_output_thread);
memdelete(eta.execute_output_thread);
- memdelete(eta.execute_output_mutex);
execute_outputs->add_text("\nExit Code: " + itos(eta.exitcode));
if (p_close_on_errors && eta.exitcode != 0) {
@@ -5823,7 +5785,7 @@ EditorNode::EditorNode() {
EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true);
EDITOR_DEF_RST("interface/inspector/capitalize_properties", true);
EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0"));
EDITOR_DEF_RST("interface/inspector/disable_folding", false);
EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true);
EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false);
@@ -5925,8 +5887,8 @@ EditorNode::EditorNode() {
hsplits.push_back(right_hsplit);
for (int i = 0; i < vsplits.size(); i++) {
- vsplits[i]->connect("dragged", this, "_dock_split_dragged");
- hsplits[i]->connect("dragged", this, "_dock_split_dragged");
+ vsplits[i]->connect("dragged", callable_mp(this, &EditorNode::_dock_split_dragged));
+ hsplits[i]->connect("dragged", callable_mp(this, &EditorNode::_dock_split_dragged));
}
dock_select_popup = memnew(PopupPanel);
@@ -5938,7 +5900,7 @@ EditorNode::EditorNode() {
dock_tab_move_left = memnew(ToolButton);
dock_tab_move_left->set_icon(theme->get_icon("Back", "EditorIcons"));
dock_tab_move_left->set_focus_mode(Control::FOCUS_NONE);
- dock_tab_move_left->connect("pressed", this, "_dock_move_left");
+ dock_tab_move_left->connect("pressed", callable_mp(this, &EditorNode::_dock_move_left));
dock_hb->add_child(dock_tab_move_left);
Label *dock_label = memnew(Label);
@@ -5950,16 +5912,16 @@ EditorNode::EditorNode() {
dock_tab_move_right = memnew(ToolButton);
dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons"));
dock_tab_move_right->set_focus_mode(Control::FOCUS_NONE);
- dock_tab_move_right->connect("pressed", this, "_dock_move_right");
+ dock_tab_move_right->connect("pressed", callable_mp(this, &EditorNode::_dock_move_right));
dock_hb->add_child(dock_tab_move_right);
dock_vb->add_child(dock_hb);
dock_select = memnew(Control);
dock_select->set_custom_minimum_size(Size2(128, 64) * EDSCALE);
- dock_select->connect("gui_input", this, "_dock_select_input");
- dock_select->connect("draw", this, "_dock_select_draw");
- dock_select->connect("mouse_exited", this, "_dock_popup_exit");
+ dock_select->connect("gui_input", callable_mp(this, &EditorNode::_dock_select_input));
+ dock_select->connect("draw", callable_mp(this, &EditorNode::_dock_select_draw));
+ dock_select->connect("mouse_exited", callable_mp(this, &EditorNode::_dock_popup_exit));
dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_vb->add_child(dock_select);
@@ -5970,11 +5932,11 @@ EditorNode::EditorNode() {
dock_slot[i]->set_custom_minimum_size(Size2(170, 0) * EDSCALE);
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_slot[i]->set_popup(dock_select_popup);
- dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
+ dock_slot[i]->connect("pre_popup_pressed", callable_mp(this, &EditorNode::_dock_pre_popup), varray(i));
dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
dock_slot[i]->set_drag_to_rearrange_enabled(true);
dock_slot[i]->set_tabs_rearrange_group(1);
- dock_slot[i]->connect("tab_changed", this, "_dock_tab_changed");
+ dock_slot[i]->connect("tab_changed", callable_mp(this, &EditorNode::_dock_tab_changed));
dock_slot[i]->set_use_hidden_tabs_for_min_size(true);
}
@@ -5982,7 +5944,7 @@ EditorNode::EditorNode() {
add_child(dock_drag_timer);
dock_drag_timer->set_wait_time(0.5);
dock_drag_timer->set_one_shot(true);
- dock_drag_timer->connect("timeout", this, "_save_docks");
+ dock_drag_timer->connect("timeout", callable_mp(this, &EditorNode::_save_docks));
top_split = memnew(VSplitContainer);
center_split->add_child(top_split);
@@ -6015,21 +5977,21 @@ EditorNode::EditorNode() {
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE);
scene_tabs->set_drag_to_rearrange_enabled(true);
- scene_tabs->connect("tab_changed", this, "_scene_tab_changed");
- scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited");
- scene_tabs->connect("tab_close", this, "_scene_tab_closed", varray(SCENE_TAB_CLOSE));
- scene_tabs->connect("tab_hover", this, "_scene_tab_hover");
- scene_tabs->connect("mouse_exited", this, "_scene_tab_exit");
- scene_tabs->connect("gui_input", this, "_scene_tab_input");
- scene_tabs->connect("reposition_active_tab_request", this, "_reposition_active_tab");
- scene_tabs->connect("resized", this, "_update_scene_tabs");
+ scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed));
+ scene_tabs->connect("right_button_pressed", callable_mp(this, &EditorNode::_scene_tab_script_edited));
+ scene_tabs->connect("tab_close", callable_mp(this, &EditorNode::_scene_tab_closed), varray(SCENE_TAB_CLOSE));
+ scene_tabs->connect("tab_hover", callable_mp(this, &EditorNode::_scene_tab_hover));
+ scene_tabs->connect("mouse_exited", callable_mp(this, &EditorNode::_scene_tab_exit));
+ scene_tabs->connect("gui_input", callable_mp(this, &EditorNode::_scene_tab_input));
+ scene_tabs->connect("reposition_active_tab_request", callable_mp(this, &EditorNode::_reposition_active_tab));
+ scene_tabs->connect("resized", callable_mp(this, &EditorNode::_update_scene_tabs));
tabbar_container = memnew(HBoxContainer);
scene_tabs->set_h_size_flags(Control::SIZE_EXPAND_FILL);
scene_tabs_context_menu = memnew(PopupMenu);
tabbar_container->add_child(scene_tabs_context_menu);
- scene_tabs_context_menu->connect("id_pressed", this, "_menu_option");
+ scene_tabs_context_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
scene_tabs_context_menu->set_hide_on_window_lose_focus(true);
srt->add_child(tabbar_container);
@@ -6041,7 +6003,7 @@ EditorNode::EditorNode() {
distraction_free->set_shortcut(ED_SHORTCUT("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11));
#endif
distraction_free->set_tooltip(TTR("Toggle distraction-free mode."));
- distraction_free->connect("pressed", this, "_toggle_distraction_free_mode");
+ distraction_free->connect("pressed", callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
distraction_free->set_icon(gui_base->get_icon("DistractionFree", "EditorIcons"));
distraction_free->set_toggle_mode(true);
@@ -6051,7 +6013,7 @@ EditorNode::EditorNode() {
scene_tab_add->set_tooltip(TTR("Add a new scene."));
scene_tab_add->set_icon(gui_base->get_icon("Add", "EditorIcons"));
scene_tab_add->add_color_override("icon_color_normal", Color(0.6f, 0.6f, 0.6f, 0.8f));
- scene_tab_add->connect("pressed", this, "_menu_option", make_binds(FILE_NEW_SCENE));
+ scene_tab_add->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(FILE_NEW_SCENE));
scene_root_parent = memnew(PanelContainer);
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
@@ -6086,14 +6048,14 @@ EditorNode::EditorNode() {
prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons"));
prev_scene->set_tooltip(TTR("Go to previously opened scene."));
prev_scene->set_disabled(true);
- prev_scene->connect("pressed", this, "_menu_option", make_binds(FILE_OPEN_PREV));
+ prev_scene->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(FILE_OPEN_PREV));
gui_base->add_child(prev_scene);
prev_scene->set_position(Point2(3, 24));
prev_scene->hide();
accept = memnew(AcceptDialog);
gui_base->add_child(accept);
- accept->connect("confirmed", this, "_menu_confirm_current");
+ accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
project_export = memnew(ProjectExportDialog);
gui_base->add_child(project_export);
@@ -6120,16 +6082,16 @@ EditorNode::EditorNode() {
gui_base->add_child(feature_profile_manager);
about = memnew(EditorAbout);
gui_base->add_child(about);
- feature_profile_manager->connect("current_feature_profile_changed", this, "_feature_profile_changed");
+ feature_profile_manager->connect("current_feature_profile_changed", callable_mp(this, &EditorNode::_feature_profile_changed));
warning = memnew(AcceptDialog);
warning->add_button(TTR("Copy Text"), true, "copy");
gui_base->add_child(warning);
- warning->connect("custom_action", this, "_copy_warning");
+ warning->connect("custom_action", callable_mp(this, &EditorNode::_copy_warning));
ED_SHORTCUT("editor/next_tab", TTR("Next tab"), KEY_MASK_CMD + KEY_TAB);
ED_SHORTCUT("editor/prev_tab", TTR("Previous tab"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_TAB);
- ED_SHORTCUT("editor/filter_files", TTR("Filter Files..."), KEY_MASK_ALT + KEY_MASK_CMD + KEY_P);
+ ED_SHORTCUT("editor/filter_files", TTR("Filter Files..."), KEY_MASK_CMD + KEY_MASK_ALT + KEY_P);
PopupMenu *p;
file_menu->set_tooltip(TTR("Operations with scene files."));
@@ -6144,13 +6106,14 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/save_scene", TTR("Save Scene"), KEY_MASK_CMD + KEY_S), FILE_SAVE_SCENE);
- p->add_shortcut(ED_SHORTCUT("editor/save_scene_as", TTR("Save Scene As..."), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_S), FILE_SAVE_AS_SCENE);
- p->add_shortcut(ED_SHORTCUT("editor/save_all_scenes", TTR("Save All Scenes"), KEY_MASK_ALT + KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_S), FILE_SAVE_ALL_SCENES);
+ p->add_shortcut(ED_SHORTCUT("editor/save_scene_as", TTR("Save Scene As..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_S), FILE_SAVE_AS_SCENE);
+ p->add_shortcut(ED_SHORTCUT("editor/save_all_scenes", TTR("Save All Scenes"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_S), FILE_SAVE_ALL_SCENES);
p->add_separator();
+
p->add_shortcut(ED_SHORTCUT("editor/quick_open", TTR("Quick Open..."), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN);
- p->add_shortcut(ED_SHORTCUT("editor/quick_open_scene", TTR("Quick Open Scene..."), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_O), FILE_QUICK_OPEN_SCENE);
- p->add_shortcut(ED_SHORTCUT("editor/quick_open_script", TTR("Quick Open Script..."), KEY_MASK_ALT + KEY_MASK_CMD + KEY_O), FILE_QUICK_OPEN_SCRIPT);
+ p->add_shortcut(ED_SHORTCUT("editor/quick_open_scene", TTR("Quick Open Scene..."), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_O), FILE_QUICK_OPEN_SCENE);
+ p->add_shortcut(ED_SHORTCUT("editor/quick_open_script", TTR("Quick Open Script..."), KEY_MASK_CMD + KEY_MASK_ALT + KEY_O), FILE_QUICK_OPEN_SCRIPT);
p->add_separator();
PopupMenu *pm_export = memnew(PopupMenu);
@@ -6159,20 +6122,20 @@ EditorNode::EditorNode() {
p->add_submenu_item(TTR("Convert To..."), "Export");
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_MeshLibrary", TTR("MeshLibrary...")), FILE_EXPORT_MESH_LIBRARY);
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_TileSet", TTR("TileSet...")), FILE_EXPORT_TILESET);
- pm_export->connect("id_pressed", this, "_menu_option");
+ pm_export->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"), KEY_MASK_CMD + KEY_Z), EDIT_UNDO, true);
- p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Z), EDIT_REDO, true);
+ p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Z), EDIT_REDO, true);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/revert_scene", TTR("Revert Scene")), EDIT_REVERT);
- p->add_shortcut(ED_SHORTCUT("editor/close_scene", TTR("Close Scene"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_W), FILE_CLOSE);
+ p->add_shortcut(ED_SHORTCUT("editor/close_scene", TTR("Close Scene"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_W), FILE_CLOSE);
recent_scenes = memnew(PopupMenu);
recent_scenes->set_name("RecentScenes");
p->add_child(recent_scenes);
- recent_scenes->connect("id_pressed", this, "_open_recent_scene");
+ recent_scenes->connect("id_pressed", callable_mp(this, &EditorNode::_open_recent_scene));
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/file_quit", TTR("Quit"), KEY_MASK_CMD + KEY_Q), FILE_QUIT, true);
@@ -6188,11 +6151,11 @@ EditorNode::EditorNode() {
p = project_menu->get_popup();
p->set_hide_on_window_lose_focus(true);
p->add_shortcut(ED_SHORTCUT("editor/project_settings", TTR("Project Settings...")), RUN_SETTINGS);
- p->connect("id_pressed", this, "_menu_option");
+ p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel();
vcs_actions_menu->set_name("Version Control");
- vcs_actions_menu->connect("index_pressed", this, "_version_control_menu_option");
+ vcs_actions_menu->connect("index_pressed", callable_mp(this, &EditorNode::_version_control_menu_option));
p->add_separator();
p->add_child(vcs_actions_menu);
p->add_submenu_item(TTR("Version Control"), "Version Control");
@@ -6205,12 +6168,12 @@ EditorNode::EditorNode() {
p->add_item(TTR("Open Project Data Folder"), RUN_PROJECT_DATA_FOLDER);
plugin_config_dialog = memnew(PluginConfigDialog);
- plugin_config_dialog->connect("plugin_ready", this, "_on_plugin_ready");
+ plugin_config_dialog->connect("plugin_ready", callable_mp(this, &EditorNode::_on_plugin_ready));
gui_base->add_child(plugin_config_dialog);
tool_menu = memnew(PopupMenu);
tool_menu->set_name("Tools");
- tool_menu->connect("index_pressed", this, "_tool_menu_option");
+ tool_menu->connect("index_pressed", callable_mp(this, &EditorNode::_tool_menu_option));
p->add_child(tool_menu);
p->add_submenu_item(TTR("Tools"), "Tools");
tool_menu->add_item(TTR("Orphan Resource Explorer..."), TOOLS_ORPHAN_RESOURCES);
@@ -6219,7 +6182,7 @@ EditorNode::EditorNode() {
#ifdef OSX_ENABLED
p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q), RUN_PROJECT_MANAGER, true);
#else
- p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Q), RUN_PROJECT_MANAGER, true);
+ p->add_shortcut(ED_SHORTCUT("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Q), RUN_PROJECT_MANAGER, true);
#endif
menu_hb->add_spacer();
@@ -6254,7 +6217,14 @@ EditorNode::EditorNode() {
p->add_check_shortcut(ED_SHORTCUT("editor/sync_script_changes", TTR("Sync Script Changes")), RUN_RELOAD_SCRIPTS);
p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
p->set_item_checked(p->get_item_count() - 1, true);
- p->connect("id_pressed", this, "_menu_option");
+
+ // Multi-instance, start/stop
+ p->add_separator();
+ p->add_radio_check_item(TTR("Debug 1 instance"), RUN_DEBUG_ONE);
+ p->add_radio_check_item(TTR("Debug 2 instances"), RUN_DEBUG_TWO);
+ p->set_item_checked(p->get_item_index(RUN_DEBUG_ONE), true);
+
+ p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
menu_hb->add_spacer();
@@ -6273,7 +6243,7 @@ EditorNode::EditorNode() {
editor_layouts = memnew(PopupMenu);
editor_layouts->set_name("Layouts");
p->add_child(editor_layouts);
- editor_layouts->connect("id_pressed", this, "_layout_menu_option");
+ editor_layouts->connect("id_pressed", callable_mp(this, &EditorNode::_layout_menu_option));
p->add_submenu_item(TTR("Editor Layout"), "Layouts");
p->add_separator();
#ifdef OSX_ENABLED
@@ -6315,7 +6285,7 @@ EditorNode::EditorNode() {
p = help_menu->get_popup();
p->set_hide_on_window_lose_focus(true);
- p->connect("id_pressed", this, "_menu_option");
+ p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
p->add_icon_shortcut(gui_base->get_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search"), KEY_MASK_SHIFT | KEY_F1), HELP_SEARCH);
p->add_separator();
p->add_icon_shortcut(gui_base->get_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS);
@@ -6333,7 +6303,7 @@ EditorNode::EditorNode() {
play_button->set_toggle_mode(true);
play_button->set_icon(gui_base->get_icon("MainPlay", "EditorIcons"));
play_button->set_focus_mode(Control::FOCUS_NONE);
- play_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY));
+ play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY));
play_button->set_tooltip(TTR("Play the project."));
#ifdef OSX_ENABLED
play_button->set_shortcut(ED_SHORTCUT("editor/play", TTR("Play"), KEY_MASK_CMD | KEY_B));
@@ -6358,7 +6328,7 @@ EditorNode::EditorNode() {
play_hb->add_child(stop_button);
stop_button->set_focus_mode(Control::FOCUS_NONE);
stop_button->set_icon(gui_base->get_icon("Stop", "EditorIcons"));
- stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
+ stop_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_STOP));
stop_button->set_tooltip(TTR("Stop the scene."));
stop_button->set_disabled(true);
#ifdef OSX_ENABLED
@@ -6369,14 +6339,14 @@ EditorNode::EditorNode() {
run_native = memnew(EditorRunNative);
play_hb->add_child(run_native);
- run_native->connect("native_run", this, "_menu_option", varray(RUN_PLAY_NATIVE));
+ run_native->connect("native_run", callable_mp(this, &EditorNode::_menu_option), varray(RUN_PLAY_NATIVE));
play_scene_button = memnew(ToolButton);
play_hb->add_child(play_scene_button);
play_scene_button->set_toggle_mode(true);
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
- play_scene_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY_SCENE));
+ play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_SCENE));
play_scene_button->set_tooltip(TTR("Play the edited scene."));
#ifdef OSX_ENABLED
play_scene_button->set_shortcut(ED_SHORTCUT("editor/play_scene", TTR("Play Scene"), KEY_MASK_CMD | KEY_R));
@@ -6389,7 +6359,7 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_toggle_mode(true);
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
- play_custom_scene_button->connect("pressed", this, "_menu_option", make_binds(RUN_PLAY_CUSTOM_SCENE));
+ play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_CUSTOM_SCENE));
play_custom_scene_button->set_tooltip(TTR("Play custom scene"));
#ifdef OSX_ENABLED
play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R));
@@ -6404,7 +6374,7 @@ EditorNode::EditorNode() {
video_driver = memnew(OptionButton);
video_driver->set_flat(true);
video_driver->set_focus_mode(Control::FOCUS_NONE);
- video_driver->connect("item_selected", this, "_video_driver_selected");
+ video_driver->connect("item_selected", callable_mp(this, &EditorNode::_video_driver_selected));
video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts"));
// TODO re-enable when GLES2 is ported
video_driver->set_disabled(true);
@@ -6429,7 +6399,7 @@ EditorNode::EditorNode() {
video_restart_dialog = memnew(ConfirmationDialog);
video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor."));
video_restart_dialog->get_ok()->set_text(TTR("Save & Restart"));
- video_restart_dialog->connect("confirmed", this, "_menu_option", varray(SET_VIDEO_DRIVER_SAVE_AND_RESTART));
+ video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SET_VIDEO_DRIVER_SAVE_AND_RESTART));
gui_base->add_child(video_restart_dialog);
progress_hb = memnew(BackgroundProgress);
@@ -6438,13 +6408,13 @@ EditorNode::EditorNode() {
gui_base->add_child(layout_dialog);
layout_dialog->set_hide_on_ok(false);
layout_dialog->set_size(Size2(225, 270) * EDSCALE);
- layout_dialog->connect("name_confirmed", this, "_dialog_action");
+ layout_dialog->connect("name_confirmed", callable_mp(this, &EditorNode::_dialog_action));
update_spinner = memnew(MenuButton);
update_spinner->set_tooltip(TTR("Spins when the editor window redraws."));
right_menu_hb->add_child(update_spinner);
update_spinner->set_icon(gui_base->get_icon("Progress1", "EditorIcons"));
- update_spinner->get_popup()->connect("id_pressed", this, "_menu_option");
+ update_spinner->get_popup()->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
p = update_spinner->get_popup();
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED);
@@ -6460,9 +6430,9 @@ EditorNode::EditorNode() {
node_dock = memnew(NodeDock);
filesystem_dock = memnew(FileSystemDock(this));
- filesystem_dock->connect("inherit", this, "_inherit_request");
- filesystem_dock->connect("instance", this, "_instance_request");
- filesystem_dock->connect("display_mode_changed", this, "_save_docks");
+ filesystem_dock->connect("inherit", callable_mp(this, &EditorNode::_inherit_request));
+ filesystem_dock->connect("instance", callable_mp(this, &EditorNode::_instance_request));
+ filesystem_dock->connect("display_mode_changed", callable_mp(this, &EditorNode::_save_docks));
// Scene: Top left
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
@@ -6548,7 +6518,7 @@ EditorNode::EditorNode() {
bottom_panel_hb->add_child(bottom_panel_raise);
bottom_panel_raise->hide();
bottom_panel_raise->set_toggle_mode(true);
- bottom_panel_raise->connect("toggled", this, "_bottom_panel_raise_toggled");
+ bottom_panel_raise->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_raise_toggled));
log = memnew(EditorLog);
ToolButton *output_button = add_bottom_panel_item(TTR("Output"), log);
@@ -6556,37 +6526,37 @@ EditorNode::EditorNode() {
old_split_ofs = 0;
- center_split->connect("resized", this, "_vp_resized");
+ center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
orphan_resources = memnew(OrphanResourcesDialog);
gui_base->add_child(orphan_resources);
confirmation = memnew(ConfirmationDialog);
gui_base->add_child(confirmation);
- confirmation->connect("confirmed", this, "_menu_confirm_current");
+ confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
save_confirmation = memnew(ConfirmationDialog);
save_confirmation->add_button(TTR("Don't Save"), OS::get_singleton()->get_swap_ok_cancel(), "discard");
gui_base->add_child(save_confirmation);
- save_confirmation->connect("confirmed", this, "_menu_confirm_current");
- save_confirmation->connect("custom_action", this, "_discard_changes");
+ save_confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
+ save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
custom_build_manage_templates = memnew(ConfirmationDialog);
custom_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
custom_build_manage_templates->get_ok()->set_text(TTR("Manage Templates"));
- custom_build_manage_templates->connect("confirmed", this, "_menu_option", varray(SETTINGS_MANAGE_EXPORT_TEMPLATES));
+ custom_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_MANAGE_EXPORT_TEMPLATES));
gui_base->add_child(custom_build_manage_templates);
install_android_build_template = memnew(ConfirmationDialog);
install_android_build_template->set_text(TTR("This will set up your project for custom Android builds by installing the source template to \"res://android/build\".\nYou can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).\nNote that in order to make custom builds instead of using pre-built APKs, the \"Use Custom Build\" option should be enabled in the Android export preset."));
install_android_build_template->get_ok()->set_text(TTR("Install"));
- install_android_build_template->connect("confirmed", this, "_menu_confirm_current");
+ install_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
gui_base->add_child(install_android_build_template);
remove_android_build_template = memnew(ConfirmationDialog);
remove_android_build_template->set_text(TTR("The Android build template is already installed in this project and it won't be overwritten.\nRemove the \"res://android/build\" directory manually before attempting this operation again."));
remove_android_build_template->get_ok()->set_text(TTR("Show in File Manager"));
- remove_android_build_template->connect("confirmed", this, "_menu_option", varray(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES));
+ remove_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES));
gui_base->add_child(remove_android_build_template);
file_templates = memnew(EditorFileDialog);
@@ -6605,7 +6575,7 @@ EditorNode::EditorNode() {
file_export_lib = memnew(EditorFileDialog);
file_export_lib->set_title(TTR("Export Library"));
file_export_lib->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- file_export_lib->connect("file_selected", this, "_dialog_action");
+ file_export_lib->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
file_export_lib_merge = memnew(CheckBox);
file_export_lib_merge->set_text(TTR("Merge With Existing"));
file_export_lib_merge->set_pressed(true);
@@ -6622,16 +6592,16 @@ EditorNode::EditorNode() {
file_script->add_filter("*." + E->get());
}
gui_base->add_child(file_script);
- file_script->connect("file_selected", this, "_dialog_action");
+ file_script->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
- file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
- file_menu->connect("about_to_show", this, "_update_file_menu_opened");
- file_menu->get_popup()->connect("popup_hide", this, "_update_file_menu_closed");
+ file_menu->get_popup()->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ file_menu->connect("about_to_show", callable_mp(this, &EditorNode::_update_file_menu_opened));
+ file_menu->get_popup()->connect("popup_hide", callable_mp(this, &EditorNode::_update_file_menu_closed));
- settings_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ settings_menu->get_popup()->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
- file->connect("file_selected", this, "_dialog_action");
- file_templates->connect("file_selected", this, "_dialog_action");
+ file->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
+ file_templates->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
preview_gen = memnew(AudioStreamPreviewGenerator);
add_child(preview_gen);
@@ -6639,6 +6609,7 @@ EditorNode::EditorNode() {
file_server = memnew(EditorFileServer);
+ add_editor_plugin(memnew(DebuggerEditorPlugin(this)));
add_editor_plugin(memnew(AnimationPlayerEditorPlugin(this)));
add_editor_plugin(memnew(CanvasItemEditorPlugin(this)));
add_editor_plugin(memnew(SpatialEditorPlugin(this)));
@@ -6767,8 +6738,8 @@ EditorNode::EditorNode() {
open_imported = memnew(ConfirmationDialog);
open_imported->get_ok()->set_text(TTR("Open Anyway"));
new_inherited_button = open_imported->add_button(TTR("New Inherited"), !OS::get_singleton()->get_swap_ok_cancel(), "inherit");
- open_imported->connect("confirmed", this, "_open_imported");
- open_imported->connect("custom_action", this, "_inherit_imported");
+ open_imported->connect("confirmed", callable_mp(this, &EditorNode::_open_imported));
+ open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported));
gui_base->add_child(open_imported);
saved_version = 1;
@@ -6777,11 +6748,11 @@ EditorNode::EditorNode() {
quick_open = memnew(EditorQuickOpen);
gui_base->add_child(quick_open);
- quick_open->connect("quick_open", this, "_quick_opened");
+ quick_open->connect("quick_open", callable_mp(this, &EditorNode::_quick_opened));
quick_run = memnew(EditorQuickOpen);
gui_base->add_child(quick_run);
- quick_run->connect("quick_open", this, "_quick_run");
+ quick_run->connect("quick_open", callable_mp(this, &EditorNode::_quick_run));
_update_recent_scenes();
@@ -6803,10 +6774,10 @@ EditorNode::EditorNode() {
execute_output_dialog->set_title("");
gui_base->add_child(execute_output_dialog);
- EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed");
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed");
- EditorFileSystem::get_singleton()->connect("resources_reimported", this, "_resources_reimported");
- EditorFileSystem::get_singleton()->connect("resources_reload", this, "_resources_changed");
+ EditorFileSystem::get_singleton()->connect("sources_changed", callable_mp(this, &EditorNode::_sources_changed));
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorNode::_fs_changed));
+ EditorFileSystem::get_singleton()->connect("resources_reimported", callable_mp(this, &EditorNode::_resources_reimported));
+ EditorFileSystem::get_singleton()->connect("resources_reload", callable_mp(this, &EditorNode::_resources_changed));
_build_icon_type_cache();
@@ -6815,7 +6786,7 @@ EditorNode::EditorNode() {
pick_main_scene = memnew(ConfirmationDialog);
gui_base->add_child(pick_main_scene);
pick_main_scene->get_ok()->set_text(TTR("Select"));
- pick_main_scene->connect("confirmed", this, "_menu_option", varray(SETTINGS_PICK_MAIN_SCENE));
+ pick_main_scene->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_PICK_MAIN_SCENE));
for (int i = 0; i < _init_callbacks.size(); i++)
_init_callbacks[i]();
@@ -6855,7 +6826,7 @@ EditorNode::EditorNode() {
screenshot_timer = memnew(Timer);
screenshot_timer->set_one_shot(true);
screenshot_timer->set_wait_time(settings_menu->get_popup()->get_submenu_popup_delay() + 0.1f);
- screenshot_timer->connect("timeout", this, "_request_screenshot");
+ screenshot_timer->connect("timeout", callable_mp(this, &EditorNode::_request_screenshot));
add_child(screenshot_timer);
screenshot_timer->set_owner(get_owner());
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index bd2c3d73ae..0b3de5c142 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -107,7 +107,7 @@ public:
List<String> args;
String output;
Thread *execute_output_thread;
- Mutex *execute_output_mutex;
+ Mutex execute_output_mutex;
int exitcode;
volatile bool done;
};
@@ -162,6 +162,8 @@ private:
RUN_PLAY_NATIVE,
RUN_PLAY_CUSTOM_SCENE,
RUN_SCENE_SETTINGS,
+ RUN_DEBUG_ONE,
+ RUN_DEBUG_TWO,
RUN_SETTINGS,
RUN_PROJECT_DATA_FOLDER,
RUN_PROJECT_MANAGER,
@@ -639,7 +641,7 @@ private:
static void _resource_saved(RES p_resource, const String &p_path);
static void _resource_loaded(RES p_resource, const String &p_path);
- void _resources_changed(const PoolVector<String> &p_resources);
+ void _resources_changed(const Vector<String> &p_resources);
void _feature_profile_changed();
bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class);
@@ -764,10 +766,10 @@ public:
void set_convert_old_scene(bool p_old) { convert_old = p_old; }
- void notify_child_process_exited();
+ void notify_all_debug_sessions_exited();
- OS::ProcessID get_child_process_id() const { return editor_run.get_pid(); }
- void stop_child_process();
+ OS::ProcessID has_child_process(OS::ProcessID p_pid) const { return editor_run.has_child_process(p_pid); }
+ void stop_child_process(OS::ProcessID p_pid);
Ref<Theme> get_editor_theme() const { return theme; }
Ref<Script> get_object_custom_type_base(const Object *p_object) const;
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 6a1d052e02..305dc03568 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -106,7 +106,7 @@ void EditorPath::update_path() {
if (name == "")
name = r->get_class();
- } else if (obj->is_class("ScriptEditorDebuggerInspectedObject"))
+ } else if (obj->is_class("EditorDebuggerRemoteObject"))
name = obj->call("get_title");
else if (Object::cast_to<Node>(obj))
name = Object::cast_to<Node>(obj)->get_name();
@@ -142,9 +142,6 @@ void EditorPath::_notification(int p_what) {
}
void EditorPath::_bind_methods() {
-
- ClassDB::bind_method("_about_to_show", &EditorPath::_about_to_show);
- ClassDB::bind_method("_id_pressed", &EditorPath::_id_pressed);
}
EditorPath::EditorPath(EditorHistory *p_history) {
@@ -152,6 +149,6 @@ EditorPath::EditorPath(EditorHistory *p_history) {
history = p_history;
set_clip_text(true);
set_text_align(ALIGN_LEFT);
- get_popup()->connect("about_to_show", this, "_about_to_show");
- get_popup()->connect("id_pressed", this, "_id_pressed");
+ get_popup()->connect("about_to_show", callable_mp(this, &EditorPath::_about_to_show));
+ get_popup()->connect("id_pressed", callable_mp(this, &EditorPath::_id_pressed));
}
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index ce847d02eb..10ecdb19c0 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -688,7 +688,7 @@ void EditorPlugin::apply_changes() {
void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
if (get_script_instance() && get_script_instance()->has_method("get_breakpoints")) {
- PoolStringArray arr = get_script_instance()->call("get_breakpoints");
+ PackedStringArray arr = get_script_instance()->call("get_breakpoints");
for (int i = 0; i < arr.size(); i++)
p_breakpoints->push_back(arr[i]);
}
@@ -743,8 +743,8 @@ void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_
ResourceImporterScene::get_singleton()->remove_importer(p_importer);
}
-int find(const PoolStringArray &a, const String &v) {
- PoolStringArray::Read r = a.read();
+int find(const PackedStringArray &a, const String &v) {
+ const String *r = a.ptr();
for (int j = 0; j < a.size(); ++j) {
if (r[j] == v) {
return j;
@@ -862,7 +862,7 @@ void EditorPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_plugin_name"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "get_plugin_icon"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "get_plugin_icon"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "has_main_screen"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("make_visible", PropertyInfo(Variant::BOOL, "visible")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("edit", PropertyInfo(Variant::OBJECT, "object")));
@@ -872,7 +872,7 @@ void EditorPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo("clear"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("save_external_data"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("apply_changes"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_breakpoints"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::PACKED_STRING_ARRAY, "get_breakpoints"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "build"));
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 16decf5c04..76dbadf67e 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -43,8 +43,8 @@ void EditorPluginSettings::_notification(int p_what) {
if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) {
update_plugins();
} else if (p_what == Node::NOTIFICATION_READY) {
- plugin_config_dialog->connect("plugin_ready", EditorNode::get_singleton(), "_on_plugin_ready");
- plugin_list->connect("button_pressed", this, "_cell_button_pressed");
+ plugin_config_dialog->connect_compat("plugin_ready", EditorNode::get_singleton(), "_on_plugin_ready");
+ plugin_list->connect("button_pressed", callable_mp(this, &EditorPluginSettings::_cell_button_pressed));
}
}
@@ -202,11 +202,6 @@ void EditorPluginSettings::_cell_button_pressed(Object *p_item, int p_column, in
}
void EditorPluginSettings::_bind_methods() {
-
- ClassDB::bind_method("update_plugins", &EditorPluginSettings::update_plugins);
- ClassDB::bind_method("_create_clicked", &EditorPluginSettings::_create_clicked);
- ClassDB::bind_method("_plugin_activity_changed", &EditorPluginSettings::_plugin_activity_changed);
- ClassDB::bind_method("_cell_button_pressed", &EditorPluginSettings::_cell_button_pressed);
}
EditorPluginSettings::EditorPluginSettings() {
@@ -219,10 +214,10 @@ EditorPluginSettings::EditorPluginSettings() {
title_hb->add_child(memnew(Label(TTR("Installed Plugins:"))));
title_hb->add_spacer();
create_plugin = memnew(Button(TTR("Create")));
- create_plugin->connect("pressed", this, "_create_clicked");
+ create_plugin->connect("pressed", callable_mp(this, &EditorPluginSettings::_create_clicked));
title_hb->add_child(create_plugin);
update_list = memnew(Button(TTR("Update")));
- update_list->connect("pressed", this, "update_plugins");
+ update_list->connect("pressed", callable_mp(this, &EditorPluginSettings::update_plugins));
title_hb->add_child(update_list);
add_child(title_hb);
@@ -245,7 +240,7 @@ EditorPluginSettings::EditorPluginSettings() {
plugin_list->set_column_min_width(3, 80 * EDSCALE);
plugin_list->set_column_min_width(4, 40 * EDSCALE);
plugin_list->set_hide_root(true);
- plugin_list->connect("item_edited", this, "_plugin_activity_changed");
+ plugin_list->connect("item_edited", callable_mp(this, &EditorPluginSettings::_plugin_activity_changed));
VBoxContainer *mc = memnew(VBoxContainer);
mc->add_child(plugin_list);
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 3ac4fcc21b..64b633e656 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -175,7 +175,7 @@ void EditorProfiler::_update_plot() {
graph_image.resize(desired_len);
}
- PoolVector<uint8_t>::Write wr = graph_image.write();
+ uint8_t *wr = graph_image.ptrw();
const Color background_color = get_color("dark_color_2", "Editor");
// Clear the previous frame and set the background color.
@@ -342,8 +342,6 @@ void EditorProfiler::_update_plot() {
}
}
- wr.release();
-
Ref<Image> img;
img.instance();
img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
@@ -600,17 +598,6 @@ void EditorProfiler::_combo_changed(int) {
void EditorProfiler::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_frame"), &EditorProfiler::_update_frame);
- ClassDB::bind_method(D_METHOD("_update_plot"), &EditorProfiler::_update_plot);
- ClassDB::bind_method(D_METHOD("_activate_pressed"), &EditorProfiler::_activate_pressed);
- ClassDB::bind_method(D_METHOD("_clear_pressed"), &EditorProfiler::_clear_pressed);
- ClassDB::bind_method(D_METHOD("_graph_tex_draw"), &EditorProfiler::_graph_tex_draw);
- ClassDB::bind_method(D_METHOD("_graph_tex_input"), &EditorProfiler::_graph_tex_input);
- ClassDB::bind_method(D_METHOD("_graph_tex_mouse_exit"), &EditorProfiler::_graph_tex_mouse_exit);
- ClassDB::bind_method(D_METHOD("_cursor_metric_changed"), &EditorProfiler::_cursor_metric_changed);
- ClassDB::bind_method(D_METHOD("_combo_changed"), &EditorProfiler::_combo_changed);
-
- ClassDB::bind_method(D_METHOD("_item_edited"), &EditorProfiler::_item_edited);
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
ADD_SIGNAL(MethodInfo("break_request"));
}
@@ -688,12 +675,12 @@ EditorProfiler::EditorProfiler() {
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
- activate->connect("pressed", this, "_activate_pressed");
+ activate->connect("pressed", callable_mp(this, &EditorProfiler::_activate_pressed));
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", this, "_clear_pressed");
+ clear_button->connect("pressed", callable_mp(this, &EditorProfiler::_clear_pressed));
hb->add_child(clear_button);
hb->add_child(memnew(Label(TTR("Measure:"))));
@@ -703,7 +690,7 @@ EditorProfiler::EditorProfiler() {
display_mode->add_item(TTR("Average Time (sec)"));
display_mode->add_item(TTR("Frame %"));
display_mode->add_item(TTR("Physics Frame %"));
- display_mode->connect("item_selected", this, "_combo_changed");
+ display_mode->connect("item_selected", callable_mp(this, &EditorProfiler::_combo_changed));
hb->add_child(display_mode);
@@ -712,7 +699,7 @@ EditorProfiler::EditorProfiler() {
display_time = memnew(OptionButton);
display_time->add_item(TTR("Inclusive"));
display_time->add_item(TTR("Self"));
- display_time->connect("item_selected", this, "_combo_changed");
+ display_time->connect("item_selected", callable_mp(this, &EditorProfiler::_combo_changed));
hb->add_child(display_time);
@@ -723,7 +710,7 @@ EditorProfiler::EditorProfiler() {
cursor_metric_edit = memnew(SpinBox);
cursor_metric_edit->set_h_size_flags(SIZE_FILL);
hb->add_child(cursor_metric_edit);
- cursor_metric_edit->connect("value_changed", this, "_cursor_metric_changed");
+ cursor_metric_edit->connect("value_changed", callable_mp(this, &EditorProfiler::_cursor_metric_changed));
hb->add_constant_override("separation", 8 * EDSCALE);
@@ -747,14 +734,14 @@ EditorProfiler::EditorProfiler() {
variables->set_column_title(2, TTR("Calls"));
variables->set_column_expand(2, false);
variables->set_column_min_width(2, 60 * EDSCALE);
- variables->connect("item_edited", this, "_item_edited");
+ variables->connect("item_edited", callable_mp(this, &EditorProfiler::_item_edited));
graph = memnew(TextureRect);
graph->set_expand(true);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
- graph->connect("draw", this, "_graph_tex_draw");
- graph->connect("gui_input", this, "_graph_tex_input");
- graph->connect("mouse_exited", this, "_graph_tex_mouse_exit");
+ graph->connect("draw", callable_mp(this, &EditorProfiler::_graph_tex_draw));
+ graph->connect("gui_input", callable_mp(this, &EditorProfiler::_graph_tex_input));
+ graph->connect("mouse_exited", callable_mp(this, &EditorProfiler::_graph_tex_mouse_exit));
h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -770,13 +757,13 @@ EditorProfiler::EditorProfiler() {
frame_delay->set_wait_time(0.1);
frame_delay->set_one_shot(true);
add_child(frame_delay);
- frame_delay->connect("timeout", this, "_update_frame");
+ frame_delay->connect("timeout", callable_mp(this, &EditorProfiler::_update_frame));
plot_delay = memnew(Timer);
plot_delay->set_wait_time(0.1);
plot_delay->set_one_shot(true);
add_child(plot_delay);
- plot_delay->connect("timeout", this, "_update_plot");
+ plot_delay->connect("timeout", callable_mp(this, &EditorProfiler::_update_plot));
plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index f8accdf6d2..0a442ddd5c 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -103,7 +103,7 @@ private:
Button *clear_button;
TextureRect *graph;
Ref<ImageTexture> graph_texture;
- PoolVector<uint8_t> graph_image;
+ Vector<uint8_t> graph_image;
Tree *variables;
HSplitContainer *h_split;
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 905e928c5a..9ff34f8fb4 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -64,7 +64,11 @@ void EditorPropertyText::_text_changed(const String &p_string) {
if (updating)
return;
- emit_changed(get_edited_property(), p_string, "", true);
+ if (string_name) {
+ emit_changed(get_edited_property(), StringName(p_string), "", true);
+ } else {
+ emit_changed(get_edited_property(), p_string, "", true);
+ }
}
void EditorPropertyText::update_property() {
@@ -75,23 +79,24 @@ void EditorPropertyText::update_property() {
updating = false;
}
+void EditorPropertyText::set_string_name(bool p_enabled) {
+ string_name = p_enabled;
+}
void EditorPropertyText::set_placeholder(const String &p_string) {
text->set_placeholder(p_string);
}
void EditorPropertyText::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_text_changed", "txt"), &EditorPropertyText::_text_changed);
- ClassDB::bind_method(D_METHOD("_text_entered", "txt"), &EditorPropertyText::_text_entered);
}
EditorPropertyText::EditorPropertyText() {
text = memnew(LineEdit);
add_child(text);
add_focusable(text);
- text->connect("text_changed", this, "_text_changed");
- text->connect("text_entered", this, "_text_entered");
+ text->connect("text_changed", callable_mp(this, &EditorPropertyText::_text_changed));
+ text->connect("text_entered", callable_mp(this, &EditorPropertyText::_text_entered));
+ string_name = false;
updating = false;
}
@@ -110,7 +115,7 @@ void EditorPropertyMultilineText::_open_big_text() {
if (!big_text_dialog) {
big_text = memnew(TextEdit);
- big_text->connect("text_changed", this, "_big_text_changed");
+ big_text->connect("text_changed", callable_mp(this, &EditorPropertyMultilineText::_big_text_changed));
big_text->set_wrap_enabled(true);
big_text_dialog = memnew(AcceptDialog);
big_text_dialog->add_child(big_text);
@@ -145,10 +150,6 @@ void EditorPropertyMultilineText::_notification(int p_what) {
}
void EditorPropertyMultilineText::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_text_changed"), &EditorPropertyMultilineText::_text_changed);
- ClassDB::bind_method(D_METHOD("_big_text_changed"), &EditorPropertyMultilineText::_big_text_changed);
- ClassDB::bind_method(D_METHOD("_open_big_text"), &EditorPropertyMultilineText::_open_big_text);
}
EditorPropertyMultilineText::EditorPropertyMultilineText() {
@@ -156,13 +157,13 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() {
add_child(hb);
set_bottom_editor(hb);
text = memnew(TextEdit);
- text->connect("text_changed", this, "_text_changed");
+ text->connect("text_changed", callable_mp(this, &EditorPropertyMultilineText::_text_changed));
text->set_wrap_enabled(true);
add_focusable(text);
hb->add_child(text);
text->set_h_size_flags(SIZE_EXPAND_FILL);
open_big_text = memnew(ToolButton);
- open_big_text->connect("pressed", this, "_open_big_text");
+ open_big_text->connect("pressed", callable_mp(this, &EditorPropertyMultilineText::_open_big_text));
hb->add_child(open_big_text);
big_text_dialog = NULL;
big_text = NULL;
@@ -172,7 +173,12 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() {
void EditorPropertyTextEnum::_option_selected(int p_which) {
- emit_changed(get_edited_property(), options->get_item_text(p_which));
+ if (string_name) {
+
+ emit_changed(get_edited_property(), StringName(options->get_item_text(p_which)));
+ } else {
+ emit_changed(get_edited_property(), options->get_item_text(p_which));
+ }
}
void EditorPropertyTextEnum::update_property() {
@@ -187,25 +193,25 @@ void EditorPropertyTextEnum::update_property() {
}
}
-void EditorPropertyTextEnum::setup(const Vector<String> &p_options) {
+void EditorPropertyTextEnum::setup(const Vector<String> &p_options, bool p_string_name) {
for (int i = 0; i < p_options.size(); i++) {
options->add_item(p_options[i], i);
}
+ string_name = p_string_name;
}
void EditorPropertyTextEnum::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_option_selected"), &EditorPropertyTextEnum::_option_selected);
}
EditorPropertyTextEnum::EditorPropertyTextEnum() {
options = memnew(OptionButton);
options->set_clip_text(true);
options->set_flat(true);
+ string_name = false;
add_child(options);
add_focusable(options);
- options->connect("item_selected", this, "_option_selected");
+ options->connect("item_selected", callable_mp(this, &EditorPropertyTextEnum::_option_selected));
}
///////////////////// PATH /////////////////////////
@@ -218,8 +224,8 @@ void EditorPropertyPath::_path_pressed() {
if (!dialog) {
dialog = memnew(EditorFileDialog);
- dialog->connect("file_selected", this, "_path_selected");
- dialog->connect("dir_selected", this, "_path_selected");
+ dialog->connect("file_selected", callable_mp(this, &EditorPropertyPath::_path_selected));
+ dialog->connect("dir_selected", callable_mp(this, &EditorPropertyPath::_path_selected));
add_child(dialog);
}
@@ -282,10 +288,6 @@ void EditorPropertyPath::_path_focus_exited() {
}
void EditorPropertyPath::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_path_pressed"), &EditorPropertyPath::_path_pressed);
- ClassDB::bind_method(D_METHOD("_path_selected"), &EditorPropertyPath::_path_selected);
- ClassDB::bind_method(D_METHOD("_path_focus_exited"), &EditorPropertyPath::_path_focus_exited);
}
EditorPropertyPath::EditorPropertyPath() {
@@ -293,8 +295,8 @@ EditorPropertyPath::EditorPropertyPath() {
add_child(path_hb);
path = memnew(LineEdit);
path_hb->add_child(path);
- path->connect("text_entered", this, "_path_selected");
- path->connect("focus_exited", this, "_path_focus_exited");
+ path->connect("text_entered", callable_mp(this, &EditorPropertyPath::_path_selected));
+ path->connect("focus_exited", callable_mp(this, &EditorPropertyPath::_path_focus_exited));
path->set_h_size_flags(SIZE_EXPAND_FILL);
path_edit = memnew(Button);
@@ -302,7 +304,7 @@ EditorPropertyPath::EditorPropertyPath() {
path_hb->add_child(path_edit);
add_focusable(path);
dialog = NULL;
- path_edit->connect("pressed", this, "_path_pressed");
+ path_edit->connect("pressed", callable_mp(this, &EditorPropertyPath::_path_pressed));
folder = false;
global = false;
save_mode = false;
@@ -336,8 +338,6 @@ void EditorPropertyClassName::_dialog_created() {
}
void EditorPropertyClassName::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_dialog_created"), &EditorPropertyClassName::_dialog_created);
- ClassDB::bind_method(D_METHOD("_property_selected"), &EditorPropertyClassName::_property_selected);
}
EditorPropertyClassName::EditorPropertyClassName() {
@@ -346,10 +346,10 @@ EditorPropertyClassName::EditorPropertyClassName() {
add_child(property);
add_focusable(property);
property->set_text(selected_type);
- property->connect("pressed", this, "_property_selected");
+ property->connect("pressed", callable_mp(this, &EditorPropertyClassName::_property_selected));
dialog = memnew(CreateDialog);
dialog->set_base_type(base_type);
- dialog->connect("create", this, "_dialog_created");
+ dialog->connect("create", callable_mp(this, &EditorPropertyClassName::_dialog_created));
add_child(dialog);
}
@@ -365,7 +365,7 @@ void EditorPropertyMember::_property_select() {
if (!selector) {
selector = memnew(PropertySelector);
- selector->connect("selected", this, "_property_selected");
+ selector->connect("selected", callable_mp(this, &EditorPropertyMember::_property_selected));
add_child(selector);
}
@@ -445,8 +445,6 @@ void EditorPropertyMember::update_property() {
}
void EditorPropertyMember::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_property_selected"), &EditorPropertyMember::_property_selected);
- ClassDB::bind_method(D_METHOD("_property_select"), &EditorPropertyMember::_property_select);
}
EditorPropertyMember::EditorPropertyMember() {
@@ -455,7 +453,7 @@ EditorPropertyMember::EditorPropertyMember() {
property->set_clip_text(true);
add_child(property);
add_focusable(property);
- property->connect("pressed", this, "_property_select");
+ property->connect("pressed", callable_mp(this, &EditorPropertyMember::_property_select));
}
///////////////////// CHECK /////////////////////////
@@ -471,8 +469,6 @@ void EditorPropertyCheck::update_property() {
}
void EditorPropertyCheck::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_checkbox_pressed"), &EditorPropertyCheck::_checkbox_pressed);
}
EditorPropertyCheck::EditorPropertyCheck() {
@@ -480,7 +476,7 @@ EditorPropertyCheck::EditorPropertyCheck() {
checkbox->set_text(TTR("On"));
add_child(checkbox);
add_focusable(checkbox);
- checkbox->connect("pressed", this, "_checkbox_pressed");
+ checkbox->connect("pressed", callable_mp(this, &EditorPropertyCheck::_checkbox_pressed));
}
///////////////////// ENUM /////////////////////////
@@ -521,8 +517,6 @@ void EditorPropertyEnum::set_option_button_clip(bool p_enable) {
}
void EditorPropertyEnum::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_option_selected"), &EditorPropertyEnum::_option_selected);
}
EditorPropertyEnum::EditorPropertyEnum() {
@@ -531,7 +525,7 @@ EditorPropertyEnum::EditorPropertyEnum() {
options->set_flat(true);
add_child(options);
add_focusable(options);
- options->connect("item_selected", this, "_option_selected");
+ options->connect("item_selected", callable_mp(this, &EditorPropertyEnum::_option_selected));
}
///////////////////// FLAGS /////////////////////////
@@ -576,7 +570,7 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
CheckBox *cb = memnew(CheckBox);
cb->set_text(option);
cb->set_clip_text(true);
- cb->connect("pressed", this, "_flag_toggled");
+ cb->connect("pressed", callable_mp(this, &EditorPropertyFlags::_flag_toggled));
add_focusable(cb);
vbox->add_child(cb);
flags.push_back(cb);
@@ -590,8 +584,6 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
}
void EditorPropertyFlags::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_flag_toggled"), &EditorPropertyFlags::_flag_toggled);
}
EditorPropertyFlags::EditorPropertyFlags() {
@@ -776,10 +768,6 @@ void EditorPropertyLayers::_menu_pressed(int p_menu) {
}
void EditorPropertyLayers::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_grid_changed"), &EditorPropertyLayers::_grid_changed);
- ClassDB::bind_method(D_METHOD("_button_pressed"), &EditorPropertyLayers::_button_pressed);
- ClassDB::bind_method(D_METHOD("_menu_pressed"), &EditorPropertyLayers::_menu_pressed);
}
EditorPropertyLayers::EditorPropertyLayers() {
@@ -787,20 +775,20 @@ EditorPropertyLayers::EditorPropertyLayers() {
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
grid = memnew(EditorPropertyLayersGrid);
- grid->connect("flag_changed", this, "_grid_changed");
+ grid->connect("flag_changed", callable_mp(this, &EditorPropertyLayers::_grid_changed));
grid->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(grid);
button = memnew(Button);
button->set_toggle_mode(true);
button->set_text("..");
- button->connect("pressed", this, "_button_pressed");
+ button->connect("pressed", callable_mp(this, &EditorPropertyLayers::_button_pressed));
hb->add_child(button);
set_bottom_editor(hb);
layers = memnew(PopupMenu);
add_child(layers);
layers->set_hide_on_checkable_item_selection(false);
- layers->connect("id_pressed", this, "_menu_pressed");
- layers->connect("popup_hide", button, "set_pressed", varray(false));
+ layers->connect("id_pressed", callable_mp(this, &EditorPropertyLayers::_menu_pressed));
+ layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed), varray(false));
}
///////////////////// INT /////////////////////////
@@ -825,7 +813,6 @@ void EditorPropertyInteger::update_property() {
}
void EditorPropertyInteger::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyInteger::_value_changed);
}
void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser) {
@@ -841,7 +828,7 @@ EditorPropertyInteger::EditorPropertyInteger() {
spin->set_flat(true);
add_child(spin);
add_focusable(spin);
- spin->connect("value_changed", this, "_value_changed");
+ spin->connect("value_changed", callable_mp(this, &EditorPropertyInteger::_value_changed));
setting = false;
}
@@ -874,14 +861,13 @@ void EditorPropertyObjectID::setup(const String &p_base_type) {
}
void EditorPropertyObjectID::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_edit_pressed"), &EditorPropertyObjectID::_edit_pressed);
}
EditorPropertyObjectID::EditorPropertyObjectID() {
edit = memnew(Button);
add_child(edit);
add_focusable(edit);
- edit->connect("pressed", this, "_edit_pressed");
+ edit->connect("pressed", callable_mp(this, &EditorPropertyObjectID::_edit_pressed));
}
///////////////////// FLOAT /////////////////////////
@@ -901,8 +887,6 @@ void EditorPropertyFloat::update_property() {
}
void EditorPropertyFloat::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyFloat::_value_changed);
}
void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser) {
@@ -921,7 +905,7 @@ EditorPropertyFloat::EditorPropertyFloat() {
spin->set_flat(true);
add_child(spin);
add_focusable(spin);
- spin->connect("value_changed", this, "_value_changed");
+ spin->connect("value_changed", callable_mp(this, &EditorPropertyFloat::_value_changed));
setting = false;
}
@@ -1088,26 +1072,19 @@ void EditorPropertyEasing::_notification(int p_what) {
}
void EditorPropertyEasing::_bind_methods() {
-
- ClassDB::bind_method("_draw_easing", &EditorPropertyEasing::_draw_easing);
- ClassDB::bind_method("_drag_easing", &EditorPropertyEasing::_drag_easing);
- ClassDB::bind_method("_set_preset", &EditorPropertyEasing::_set_preset);
-
- ClassDB::bind_method("_spin_value_changed", &EditorPropertyEasing::_spin_value_changed);
- ClassDB::bind_method("_spin_focus_exited", &EditorPropertyEasing::_spin_focus_exited);
}
EditorPropertyEasing::EditorPropertyEasing() {
easing_draw = memnew(Control);
- easing_draw->connect("draw", this, "_draw_easing");
- easing_draw->connect("gui_input", this, "_drag_easing");
+ easing_draw->connect("draw", callable_mp(this, &EditorPropertyEasing::_draw_easing));
+ easing_draw->connect("gui_input", callable_mp(this, &EditorPropertyEasing::_drag_easing));
easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE);
add_child(easing_draw);
preset = memnew(PopupMenu);
add_child(preset);
- preset->connect("id_pressed", this, "_set_preset");
+ preset->connect("id_pressed", callable_mp(this, &EditorPropertyEasing::_set_preset));
spin = memnew(EditorSpinSlider);
spin->set_flat(true);
@@ -1117,8 +1094,8 @@ EditorPropertyEasing::EditorPropertyEasing() {
spin->set_hide_slider(true);
spin->set_allow_lesser(true);
spin->set_allow_greater(true);
- spin->connect("value_changed", this, "_spin_value_changed");
- spin->get_line_edit()->connect("focus_exited", this, "_spin_focus_exited");
+ spin->connect("value_changed", callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
+ spin->get_line_edit()->connect("focus_exited", callable_mp(this, &EditorPropertyEasing::_spin_focus_exited));
spin->hide();
add_child(spin);
@@ -1160,8 +1137,6 @@ void EditorPropertyVector2::_notification(int p_what) {
}
void EditorPropertyVector2::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyVector2::_value_changed);
}
void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1196,7 +1171,7 @@ EditorPropertyVector2::EditorPropertyVector2() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector2::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1243,8 +1218,6 @@ void EditorPropertyRect2::_notification(int p_what) {
}
}
void EditorPropertyRect2::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyRect2::_value_changed);
}
void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1280,7 +1253,7 @@ EditorPropertyRect2::EditorPropertyRect2() {
spin[i]->set_flat(true);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1325,8 +1298,6 @@ void EditorPropertyVector3::_notification(int p_what) {
}
}
void EditorPropertyVector3::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyVector3::_value_changed);
}
void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1361,7 +1332,7 @@ EditorPropertyVector3::EditorPropertyVector3() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector3::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1407,8 +1378,6 @@ void EditorPropertyPlane::_notification(int p_what) {
}
}
void EditorPropertyPlane::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyPlane::_value_changed);
}
void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1444,7 +1413,7 @@ EditorPropertyPlane::EditorPropertyPlane() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyPlane::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1491,8 +1460,6 @@ void EditorPropertyQuat::_notification(int p_what) {
}
}
void EditorPropertyQuat::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyQuat::_value_changed);
}
void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1527,7 +1494,7 @@ EditorPropertyQuat::EditorPropertyQuat() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuat::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1580,8 +1547,6 @@ void EditorPropertyAABB::_notification(int p_what) {
}
}
void EditorPropertyAABB::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyAABB::_value_changed);
}
void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1609,7 +1574,7 @@ EditorPropertyAABB::EditorPropertyAABB() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyAABB::_value_changed), varray(desc[i]));
}
set_bottom_editor(g);
setting = false;
@@ -1656,8 +1621,6 @@ void EditorPropertyTransform2D::_notification(int p_what) {
}
}
void EditorPropertyTransform2D::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyTransform2D::_value_changed);
}
void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1684,7 +1647,7 @@ EditorPropertyTransform2D::EditorPropertyTransform2D() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed), varray(desc[i]));
}
set_bottom_editor(g);
setting = false;
@@ -1737,8 +1700,6 @@ void EditorPropertyBasis::_notification(int p_what) {
}
}
void EditorPropertyBasis::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyBasis::_value_changed);
}
void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1765,7 +1726,7 @@ EditorPropertyBasis::EditorPropertyBasis() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyBasis::_value_changed), varray(desc[i]));
}
set_bottom_editor(g);
setting = false;
@@ -1824,8 +1785,6 @@ void EditorPropertyTransform::_notification(int p_what) {
}
}
void EditorPropertyTransform::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyTransform::_value_changed);
}
void EditorPropertyTransform::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
@@ -1852,7 +1811,7 @@ EditorPropertyTransform::EditorPropertyTransform() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", this, "_value_changed", varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform::_value_changed), varray(desc[i]));
}
set_bottom_editor(g);
setting = false;
@@ -1880,10 +1839,6 @@ void EditorPropertyColor::_picker_created() {
}
void EditorPropertyColor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_color_changed"), &EditorPropertyColor::_color_changed);
- ClassDB::bind_method(D_METHOD("_popup_closed"), &EditorPropertyColor::_popup_closed);
- ClassDB::bind_method(D_METHOD("_picker_created"), &EditorPropertyColor::_picker_created);
}
void EditorPropertyColor::update_property() {
@@ -1917,9 +1872,9 @@ EditorPropertyColor::EditorPropertyColor() {
picker = memnew(ColorPickerButton);
add_child(picker);
picker->set_flat(true);
- picker->connect("color_changed", this, "_color_changed");
- picker->connect("popup_closed", this, "_popup_closed");
- picker->connect("picker_created", this, "_picker_created");
+ picker->connect("color_changed", callable_mp(this, &EditorPropertyColor::_color_changed));
+ picker->connect("popup_closed", callable_mp(this, &EditorPropertyColor::_popup_closed));
+ picker->connect("picker_created", callable_mp(this, &EditorPropertyColor::_picker_created));
}
////////////// NODE PATH //////////////////////
@@ -1966,7 +1921,7 @@ void EditorPropertyNodePath::_node_assign() {
scene_tree->get_scene_tree()->set_show_enabled_subscene(true);
scene_tree->get_scene_tree()->set_valid_types(valid_types);
add_child(scene_tree);
- scene_tree->connect("selected", this, "_node_selected");
+ scene_tree->connect("selected", callable_mp(this, &EditorPropertyNodePath::_node_selected));
}
scene_tree->popup_centered_ratio();
}
@@ -2034,10 +1989,6 @@ void EditorPropertyNodePath::_notification(int p_what) {
}
void EditorPropertyNodePath::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_node_selected"), &EditorPropertyNodePath::_node_selected);
- ClassDB::bind_method(D_METHOD("_node_assign"), &EditorPropertyNodePath::_node_assign);
- ClassDB::bind_method(D_METHOD("_node_clear"), &EditorPropertyNodePath::_node_clear);
}
EditorPropertyNodePath::EditorPropertyNodePath() {
@@ -2048,12 +1999,12 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
assign->set_flat(true);
assign->set_h_size_flags(SIZE_EXPAND_FILL);
assign->set_clip_text(true);
- assign->connect("pressed", this, "_node_assign");
+ assign->connect("pressed", callable_mp(this, &EditorPropertyNodePath::_node_assign));
hbc->add_child(assign);
clear = memnew(Button);
clear->set_flat(true);
- clear->connect("pressed", this, "_node_clear");
+ clear->connect("pressed", callable_mp(this, &EditorPropertyNodePath::_node_clear));
hbc->add_child(clear);
use_path_from_scene_root = false;
@@ -2120,7 +2071,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
if (!file) {
file = memnew(EditorFileDialog);
- file->connect("file_selected", this, "_file_selected");
+ file->connect("file_selected", callable_mp(this, &EditorPropertyResource::_file_selected));
add_child(file);
}
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
@@ -2289,7 +2240,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
scene_tree->get_scene_tree()->set_valid_types(valid_types);
scene_tree->get_scene_tree()->set_show_enabled_subscene(true);
add_child(scene_tree);
- scene_tree->connect("selected", this, "_viewport_selected");
+ scene_tree->connect("selected", callable_mp(this, &EditorPropertyResource::_viewport_selected));
scene_tree->set_title(TTR("Pick a Viewport"));
}
scene_tree->popup_centered_ratio();
@@ -2607,9 +2558,9 @@ void EditorPropertyResource::update_property() {
sub_inspector->set_sub_inspector(true);
sub_inspector->set_enable_capitalize_paths(true);
- sub_inspector->connect("property_keyed", this, "_sub_inspector_property_keyed");
- sub_inspector->connect("resource_selected", this, "_sub_inspector_resource_selected");
- sub_inspector->connect("object_id_selected", this, "_sub_inspector_object_id_selected");
+ sub_inspector->connect("property_keyed", callable_mp(this, &EditorPropertyResource::_sub_inspector_property_keyed));
+ sub_inspector->connect("resource_selected", callable_mp(this, &EditorPropertyResource::_sub_inspector_resource_selected));
+ sub_inspector->connect("object_id_selected", callable_mp(this, &EditorPropertyResource::_sub_inspector_object_id_selected));
sub_inspector->set_keying(is_keying());
sub_inspector->set_read_only(is_read_only());
sub_inspector->set_use_folding(is_using_folding());
@@ -2861,21 +2812,11 @@ void EditorPropertyResource::set_use_sub_inspector(bool p_enable) {
void EditorPropertyResource::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_file_selected"), &EditorPropertyResource::_file_selected);
- ClassDB::bind_method(D_METHOD("_menu_option"), &EditorPropertyResource::_menu_option);
- ClassDB::bind_method(D_METHOD("_update_menu"), &EditorPropertyResource::_update_menu);
ClassDB::bind_method(D_METHOD("_resource_preview"), &EditorPropertyResource::_resource_preview);
- ClassDB::bind_method(D_METHOD("_resource_selected"), &EditorPropertyResource::_resource_selected);
- ClassDB::bind_method(D_METHOD("_viewport_selected"), &EditorPropertyResource::_viewport_selected);
- ClassDB::bind_method(D_METHOD("_sub_inspector_property_keyed"), &EditorPropertyResource::_sub_inspector_property_keyed);
- ClassDB::bind_method(D_METHOD("_sub_inspector_resource_selected"), &EditorPropertyResource::_sub_inspector_resource_selected);
- ClassDB::bind_method(D_METHOD("_sub_inspector_object_id_selected"), &EditorPropertyResource::_sub_inspector_object_id_selected);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &EditorPropertyResource::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &EditorPropertyResource::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &EditorPropertyResource::drop_data_fw);
- ClassDB::bind_method(D_METHOD("_button_draw"), &EditorPropertyResource::_button_draw);
ClassDB::bind_method(D_METHOD("_open_editor_pressed"), &EditorPropertyResource::_open_editor_pressed);
- ClassDB::bind_method(D_METHOD("_button_input"), &EditorPropertyResource::_button_input);
ClassDB::bind_method(D_METHOD("_fold_other_editors"), &EditorPropertyResource::_fold_other_editors);
}
@@ -2892,9 +2833,9 @@ EditorPropertyResource::EditorPropertyResource() {
assign->set_flat(true);
assign->set_h_size_flags(SIZE_EXPAND_FILL);
assign->set_clip_text(true);
- assign->connect("pressed", this, "_resource_selected");
+ assign->connect("pressed", callable_mp(this, &EditorPropertyResource::_resource_selected));
assign->set_drag_forwarding(this);
- assign->connect("draw", this, "_button_draw");
+ assign->connect("draw", callable_mp(this, &EditorPropertyResource::_button_draw));
hbc->add_child(assign);
add_focusable(assign);
@@ -2905,18 +2846,18 @@ EditorPropertyResource::EditorPropertyResource() {
preview->set_margin(MARGIN_BOTTOM, -1);
preview->set_margin(MARGIN_RIGHT, -1);
assign->add_child(preview);
- assign->connect("gui_input", this, "_button_input");
+ assign->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input));
menu = memnew(PopupMenu);
add_child(menu);
edit = memnew(Button);
edit->set_flat(true);
edit->set_toggle_mode(true);
- menu->connect("id_pressed", this, "_menu_option");
- menu->connect("popup_hide", edit, "set_pressed", varray(false));
- edit->connect("pressed", this, "_update_menu");
+ menu->connect("id_pressed", callable_mp(this, &EditorPropertyResource::_menu_option));
+ menu->connect("popup_hide", callable_mp((BaseButton *)edit, &BaseButton::set_pressed), varray(false));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyResource::_update_menu));
hbc->add_child(edit);
- edit->connect("gui_input", this, "_button_input");
+ edit->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input));
add_focusable(edit);
file = NULL;
@@ -3024,7 +2965,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (p_hint == PROPERTY_HINT_EXP_EASING) {
EditorPropertyEasing *editor = memnew(EditorPropertyEasing);
@@ -3158,7 +3099,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
- } break; // 5
+ } break;
case Variant::RECT2: {
EditorPropertyRect2 *editor = memnew(EditorPropertyRect2);
double min = -65535, max = 65535, step = default_float_step;
@@ -3245,7 +3186,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
- } break; // 10
+ } break;
case Variant::AABB: {
EditorPropertyAABB *editor = memnew(EditorPropertyAABB);
double min = -65535, max = 65535, step = default_float_step;
@@ -3305,6 +3246,22 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(p_hint != PROPERTY_HINT_COLOR_NO_ALPHA);
add_property_editor(p_path, editor);
} break;
+ case Variant::STRING_NAME: {
+
+ if (p_hint == PROPERTY_HINT_ENUM) {
+ EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);
+ Vector<String> options = p_hint_text.split(",");
+ editor->setup(options, true);
+ add_property_editor(p_path, editor);
+ } else {
+ EditorPropertyText *editor = memnew(EditorPropertyText);
+ if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) {
+ editor->set_placeholder(p_hint_text);
+ }
+ editor->set_string_name(true);
+ add_property_editor(p_path, editor);
+ }
+ } break;
case Variant::NODE_PATH: {
EditorPropertyNodePath *editor = memnew(EditorPropertyNodePath);
@@ -3318,7 +3275,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
add_property_editor(p_path, editor);
- } break; // 15
+ } break;
case Variant::_RID: {
EditorPropertyRID *editor = memnew(EditorPropertyRID);
add_property_editor(p_path, editor);
@@ -3353,39 +3310,49 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(Variant::ARRAY, p_hint_text);
add_property_editor(p_path, editor);
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_BYTE_ARRAY);
+ editor->setup(Variant::PACKED_BYTE_ARRAY);
add_property_editor(p_path, editor);
- } break; // 20
- case Variant::POOL_INT_ARRAY: {
+ } break;
+ case Variant::PACKED_INT32_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_INT_ARRAY);
+ editor->setup(Variant::PACKED_INT32_ARRAY);
add_property_editor(p_path, editor);
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_REAL_ARRAY);
+ editor->setup(Variant::PACKED_INT64_ARRAY);
add_property_editor(p_path, editor);
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_STRING_ARRAY);
+ editor->setup(Variant::PACKED_FLOAT32_ARRAY);
add_property_editor(p_path, editor);
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_VECTOR2_ARRAY);
+ editor->setup(Variant::PACKED_FLOAT64_ARRAY);
add_property_editor(p_path, editor);
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_STRING_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_VECTOR3_ARRAY);
+ editor->setup(Variant::PACKED_STRING_ARRAY);
add_property_editor(p_path, editor);
- } break; // 25
- case Variant::POOL_COLOR_ARRAY: {
+ } break;
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_VECTOR2_ARRAY);
+ add_property_editor(p_path, editor);
+ } break;
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_VECTOR3_ARRAY);
+ add_property_editor(p_path, editor);
+ } break;
+ case Variant::PACKED_COLOR_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_COLOR_ARRAY);
+ editor->setup(Variant::PACKED_COLOR_ARRAY);
add_property_editor(p_path, editor);
} break;
default: {
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 7c343f1c67..c5fc8aaf77 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -53,6 +53,7 @@ class EditorPropertyText : public EditorProperty {
LineEdit *text;
bool updating;
+ bool string_name;
void _text_changed(const String &p_string);
void _text_entered(const String &p_string);
@@ -60,6 +61,7 @@ protected:
static void _bind_methods();
public:
+ void set_string_name(bool p_enabled);
virtual void update_property();
void set_placeholder(const String &p_string);
EditorPropertyText();
@@ -91,12 +93,13 @@ class EditorPropertyTextEnum : public EditorProperty {
OptionButton *options;
void _option_selected(int p_which);
+ bool string_name;
protected:
static void _bind_methods();
public:
- void setup(const Vector<String> &p_options);
+ void setup(const Vector<String> &p_options, bool p_string_name = false);
virtual void update_property();
EditorPropertyTextEnum();
};
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 0dc67b298f..c2a6aeb582 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -165,10 +165,10 @@ EditorPropertyDictionaryObject::EditorPropertyDictionaryObject() {
///////////////////// ARRAY ///////////////////////////
-void EditorPropertyArray::_property_changed(const String &p_prop, Variant p_value, const String &p_name, bool changing) {
+void EditorPropertyArray::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
- if (p_prop.begins_with("indices")) {
- int idx = p_prop.get_slice("/", 1).to_int();
+ if (p_property.begins_with("indices")) {
+ int idx = p_property.get_slice("/", 1).to_int();
Variant array = object->get_array();
array.set(idx, p_value);
emit_changed(get_edited_property(), array, "", true);
@@ -198,7 +198,7 @@ void EditorPropertyArray::_change_type_menu(int p_index) {
}
Variant value;
- Variant::CallError ce;
+ Callable::CallError ce;
value = Variant::construct(Variant::Type(p_index), NULL, 0, ce);
Variant array = object->get_array();
array.set(changing_type_idx, value);
@@ -213,7 +213,7 @@ void EditorPropertyArray::_change_type_menu(int p_index) {
update_property();
}
-void EditorPropertyArray::_object_id_selected(const String &p_property, ObjectID p_id) {
+void EditorPropertyArray::_object_id_selected(const StringName &p_property, ObjectID p_id) {
emit_signal("object_id_selected", p_property, p_id);
}
@@ -225,36 +225,35 @@ void EditorPropertyArray::update_property() {
switch (array_type) {
case Variant::ARRAY: {
arrtype = "Array";
-
} break;
// arrays
- case Variant::POOL_BYTE_ARRAY: {
- arrtype = "PoolByteArray";
-
+ case Variant::PACKED_BYTE_ARRAY: {
+ arrtype = "PackedByteArray";
} break;
- case Variant::POOL_INT_ARRAY: {
- arrtype = "PoolIntArray";
-
+ case Variant::PACKED_INT32_ARRAY: {
+ arrtype = "PackedInt32Array";
} break;
- case Variant::POOL_REAL_ARRAY: {
-
- arrtype = "PoolFloatArray";
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ arrtype = "PackedFloat32Array";
} break;
- case Variant::POOL_STRING_ARRAY: {
-
- arrtype = "PoolStringArray";
+ case Variant::PACKED_INT64_ARRAY: {
+ arrtype = "PackedInt64Array";
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
-
- arrtype = "PoolVector2Array";
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ arrtype = "PackedFloat64Array";
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
- arrtype = "PoolVector3Array";
-
+ case Variant::PACKED_STRING_ARRAY: {
+ arrtype = "PackedStringArray";
+ } break;
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ arrtype = "PackedVector2Array";
} break;
- case Variant::POOL_COLOR_ARRAY: {
- arrtype = "PoolColorArray";
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ arrtype = "PackedVector3Array";
+ } break;
+ case Variant::PACKED_COLOR_ARRAY: {
+ arrtype = "PackedColorArray";
} break;
default: {
}
@@ -297,7 +296,7 @@ void EditorPropertyArray::update_property() {
length->set_max(1000000);
length->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(length);
- length->connect("value_changed", this, "_length_changed");
+ length->connect("value_changed", callable_mp(this, &EditorPropertyArray::_length_changed));
page_hb = memnew(HBoxContainer);
vbox->add_child(page_hb);
@@ -308,7 +307,7 @@ void EditorPropertyArray::update_property() {
page->set_step(1);
page_hb->add_child(page);
page->set_h_size_flags(SIZE_EXPAND_FILL);
- page->connect("value_changed", this, "_page_changed");
+ page->connect("value_changed", callable_mp(this, &EditorPropertyArray::_page_changed));
} else {
//bye bye children of the box
while (vbox->get_child_count() > 2) {
@@ -360,8 +359,8 @@ void EditorPropertyArray::update_property() {
prop->set_object_and_property(object.ptr(), prop_name);
prop->set_label(itos(i + offset));
prop->set_selectable(false);
- prop->connect("property_changed", this, "_property_changed");
- prop->connect("object_id_selected", this, "_object_id_selected");
+ prop->connect("property_changed", callable_mp(this, &EditorPropertyArray::_property_changed));
+ prop->connect("object_id_selected", callable_mp(this, &EditorPropertyArray::_object_id_selected));
prop->set_h_size_flags(SIZE_EXPAND_FILL);
HBoxContainer *hb = memnew(HBoxContainer);
@@ -376,12 +375,12 @@ void EditorPropertyArray::update_property() {
Button *edit = memnew(Button);
edit->set_icon(get_icon("Edit", "EditorIcons"));
hb->add_child(edit);
- edit->connect("pressed", this, "_change_type", varray(edit, i + offset));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type), varray(edit, i + offset));
} else {
Button *remove = memnew(Button);
remove->set_icon(get_icon("Remove", "EditorIcons"));
- remove->connect("pressed", this, "_remove_pressed", varray(i + offset));
+ remove->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed), varray(i + offset));
hb->add_child(remove);
}
@@ -419,7 +418,7 @@ void EditorPropertyArray::_edit_pressed() {
Variant array = get_edited_object()->get(get_edited_property());
if (!array.is_array()) {
- Variant::CallError ce;
+ Callable::CallError ce;
array = Variant::construct(array_type, NULL, 0, ce);
get_edited_object()->set(get_edited_property(), array);
@@ -450,7 +449,7 @@ void EditorPropertyArray::_length_changed(double p_page) {
int size = array.call("size");
for (int i = previous_size; i < size; i++) {
if (array.get(i).get_type() == Variant::NIL) {
- Variant::CallError ce;
+ Callable::CallError ce;
array.set(i, Variant::construct(subtype, NULL, 0, ce));
}
}
@@ -460,7 +459,7 @@ void EditorPropertyArray::_length_changed(double p_page) {
int size = array.call("size");
// Pool*Array don't initialize their elements, have to do it manually
for (int i = previous_size; i < size; i++) {
- Variant::CallError ce;
+ Callable::CallError ce;
array.set(i, Variant::construct(array.get(i).get_type(), NULL, 0, ce));
}
}
@@ -491,14 +490,6 @@ void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint
}
void EditorPropertyArray::_bind_methods() {
- ClassDB::bind_method("_edit_pressed", &EditorPropertyArray::_edit_pressed);
- ClassDB::bind_method("_page_changed", &EditorPropertyArray::_page_changed);
- ClassDB::bind_method("_length_changed", &EditorPropertyArray::_length_changed);
- ClassDB::bind_method("_property_changed", &EditorPropertyArray::_property_changed, DEFVAL(String()), DEFVAL(false));
- ClassDB::bind_method("_change_type", &EditorPropertyArray::_change_type);
- ClassDB::bind_method("_change_type_menu", &EditorPropertyArray::_change_type_menu);
- ClassDB::bind_method("_object_id_selected", &EditorPropertyArray::_object_id_selected);
- ClassDB::bind_method("_remove_pressed", &EditorPropertyArray::_remove_pressed);
}
EditorPropertyArray::EditorPropertyArray() {
@@ -510,7 +501,7 @@ EditorPropertyArray::EditorPropertyArray() {
edit->set_flat(true);
edit->set_h_size_flags(SIZE_EXPAND_FILL);
edit->set_clip_text(true);
- edit->connect("pressed", this, "_edit_pressed");
+ edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_edit_pressed));
edit->set_toggle_mode(true);
add_child(edit);
add_focusable(edit);
@@ -520,7 +511,7 @@ EditorPropertyArray::EditorPropertyArray() {
updating = false;
change_type = memnew(PopupMenu);
add_child(change_type);
- change_type->connect("id_pressed", this, "_change_type_menu");
+ change_type->connect("id_pressed", callable_mp(this, &EditorPropertyArray::_change_type_menu));
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
String type = Variant::get_type_name(Variant::Type(i));
@@ -537,16 +528,16 @@ EditorPropertyArray::EditorPropertyArray() {
///////////////////// DICTIONARY ///////////////////////////
-void EditorPropertyDictionary::_property_changed(const String &p_prop, Variant p_value, const String &p_name, bool changing) {
+void EditorPropertyDictionary::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
- if (p_prop == "new_item_key") {
+ if (p_property == "new_item_key") {
object->set_new_item_key(p_value);
- } else if (p_prop == "new_item_value") {
+ } else if (p_property == "new_item_value") {
object->set_new_item_value(p_value);
- } else if (p_prop.begins_with("indices")) {
- int idx = p_prop.get_slice("/", 1).to_int();
+ } else if (p_property.begins_with("indices")) {
+ int idx = p_property.get_slice("/", 1).to_int();
Dictionary dict = object->get_dict();
Variant key = dict.get_key_at_index(idx);
dict[key] = p_value;
@@ -593,7 +584,7 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
if (changing_type_idx < 0) {
Variant value;
- Variant::CallError ce;
+ Callable::CallError ce;
value = Variant::construct(Variant::Type(p_index), NULL, 0, ce);
if (changing_type_idx == -1) {
object->set_new_item_key(value);
@@ -609,7 +600,7 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
if (p_index < Variant::VARIANT_MAX) {
Variant value;
- Variant::CallError ce;
+ Callable::CallError ce;
value = Variant::construct(Variant::Type(p_index), NULL, 0, ce);
Variant key = dict.get_key_at_index(changing_type_idx);
dict[key] = value;
@@ -668,7 +659,7 @@ void EditorPropertyDictionary::update_property() {
page->set_step(1);
page_hb->add_child(page);
page->set_h_size_flags(SIZE_EXPAND_FILL);
- page->connect("value_changed", this, "_page_changed");
+ page->connect("value_changed", callable_mp(this, &EditorPropertyDictionary::_page_changed));
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = 1; i < vbox->get_child_count(); i++) {
@@ -731,7 +722,7 @@ void EditorPropertyDictionary::update_property() {
prop = editor;
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
EditorPropertyFloat *editor = memnew(EditorPropertyFloat);
editor->setup(-100000, 100000, 0.001, true, false, true, true);
@@ -811,6 +802,12 @@ void EditorPropertyDictionary::update_property() {
prop = memnew(EditorPropertyColor);
} break;
+ case Variant::STRING_NAME: {
+ EditorPropertyText *ept = memnew(EditorPropertyText);
+ ept->set_string_name(true);
+ prop = ept;
+
+ } break;
case Variant::NODE_PATH: {
prop = memnew(EditorPropertyNodePath);
@@ -846,46 +843,58 @@ void EditorPropertyDictionary::update_property() {
} break;
// arrays
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
+
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_BYTE_ARRAY);
+ prop = editor;
+ } break;
+ case Variant::PACKED_INT32_ARRAY: {
+
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_INT32_ARRAY);
+ prop = editor;
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_BYTE_ARRAY);
+ editor->setup(Variant::PACKED_FLOAT32_ARRAY);
prop = editor;
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_INT_ARRAY);
+ editor->setup(Variant::PACKED_INT64_ARRAY);
prop = editor;
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_REAL_ARRAY);
+ editor->setup(Variant::PACKED_FLOAT64_ARRAY);
prop = editor;
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_STRING_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_STRING_ARRAY);
+ editor->setup(Variant::PACKED_STRING_ARRAY);
prop = editor;
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_VECTOR2_ARRAY);
+ editor->setup(Variant::PACKED_VECTOR2_ARRAY);
prop = editor;
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_VECTOR3_ARRAY);
+ editor->setup(Variant::PACKED_VECTOR3_ARRAY);
prop = editor;
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::POOL_COLOR_ARRAY);
+ editor->setup(Variant::PACKED_COLOR_ARRAY);
prop = editor;
} break;
default: {
@@ -923,8 +932,8 @@ void EditorPropertyDictionary::update_property() {
}
prop->set_selectable(false);
- prop->connect("property_changed", this, "_property_changed");
- prop->connect("object_id_selected", this, "_object_id_selected");
+ prop->connect("property_changed", callable_mp(this, &EditorPropertyDictionary::_property_changed));
+ prop->connect("object_id_selected", callable_mp(this, &EditorPropertyDictionary::_object_id_selected));
HBoxContainer *hb = memnew(HBoxContainer);
if (add_vbox) {
@@ -937,14 +946,14 @@ void EditorPropertyDictionary::update_property() {
Button *edit = memnew(Button);
edit->set_icon(get_icon("Edit", "EditorIcons"));
hb->add_child(edit);
- edit->connect("pressed", this, "_change_type", varray(edit, change_index));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type), varray(edit, change_index));
prop->update_property();
if (i == amount + 1) {
Button *butt_add_item = memnew(Button);
butt_add_item->set_text(TTR("Add Key/Value Pair"));
- butt_add_item->connect("pressed", this, "_add_key_value");
+ butt_add_item->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_add_key_value));
add_vbox->add_child(butt_add_item);
}
}
@@ -960,7 +969,7 @@ void EditorPropertyDictionary::update_property() {
}
}
-void EditorPropertyDictionary::_object_id_selected(const String &p_property, ObjectID p_id) {
+void EditorPropertyDictionary::_object_id_selected(const StringName &p_property, ObjectID p_id) {
emit_signal("object_id_selected", p_property, p_id);
}
@@ -971,7 +980,7 @@ void EditorPropertyDictionary::_edit_pressed() {
Variant prop_val = get_edited_object()->get(get_edited_property());
if (prop_val.get_type() == Variant::NIL) {
- Variant::CallError ce;
+ Callable::CallError ce;
prop_val = Variant::construct(Variant::DICTIONARY, NULL, 0, ce);
get_edited_object()->set(get_edited_property(), prop_val);
}
@@ -988,13 +997,6 @@ void EditorPropertyDictionary::_page_changed(double p_page) {
}
void EditorPropertyDictionary::_bind_methods() {
- ClassDB::bind_method("_edit_pressed", &EditorPropertyDictionary::_edit_pressed);
- ClassDB::bind_method("_page_changed", &EditorPropertyDictionary::_page_changed);
- ClassDB::bind_method("_property_changed", &EditorPropertyDictionary::_property_changed, DEFVAL(String()), DEFVAL(false));
- ClassDB::bind_method("_change_type", &EditorPropertyDictionary::_change_type);
- ClassDB::bind_method("_change_type_menu", &EditorPropertyDictionary::_change_type_menu);
- ClassDB::bind_method("_add_key_value", &EditorPropertyDictionary::_add_key_value);
- ClassDB::bind_method("_object_id_selected", &EditorPropertyDictionary::_object_id_selected);
}
EditorPropertyDictionary::EditorPropertyDictionary() {
@@ -1006,7 +1008,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
edit->set_flat(true);
edit->set_h_size_flags(SIZE_EXPAND_FILL);
edit->set_clip_text(true);
- edit->connect("pressed", this, "_edit_pressed");
+ edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_edit_pressed));
edit->set_toggle_mode(true);
add_child(edit);
add_focusable(edit);
@@ -1015,7 +1017,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
updating = false;
change_type = memnew(PopupMenu);
add_child(change_type);
- change_type->connect("id_pressed", this, "_change_type_menu");
+ change_type->connect("id_pressed", callable_mp(this, &EditorPropertyDictionary::_change_type_menu));
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
String type = Variant::get_type_name(Variant::Type(i));
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index d4f8abf583..51a4be1b3a 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -100,11 +100,11 @@ class EditorPropertyArray : public EditorProperty {
void _page_changed(double p_page);
void _length_changed(double p_page);
void _edit_pressed();
- void _property_changed(const String &p_prop, Variant p_value, const String &p_name = String(), bool changing = false);
+ void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false);
void _change_type(Object *p_button, int p_index);
void _change_type_menu(int p_index);
- void _object_id_selected(const String &p_property, ObjectID p_id);
+ void _object_id_selected(const StringName &p_property, ObjectID p_id);
void _remove_pressed(int p_index);
protected:
@@ -135,12 +135,12 @@ class EditorPropertyDictionary : public EditorProperty {
void _page_changed(double p_page);
void _edit_pressed();
- void _property_changed(const String &p_prop, Variant p_value, const String &p_name = String(), bool changing = false);
+ void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false);
void _change_type(Object *p_button, int p_index);
void _change_type_menu(int p_index);
void _add_key_value();
- void _object_id_selected(const String &p_property, ObjectID p_id);
+ void _object_id_selected(const StringName &p_property, ObjectID p_id);
protected:
static void _bind_methods();
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index c0f58c9aae..3c401a6fc7 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -109,29 +109,28 @@ void EditorResourcePreview::_thread_func(void *ud) {
void EditorResourcePreview::_preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud) {
- preview_mutex->lock();
-
+ MutexLock lock(preview_mutex);
String path = p_str;
- uint32_t hash = 0;
- uint64_t modified_time = 0;
-
- if (p_str.begins_with("ID:")) {
- hash = uint32_t(p_str.get_slicec(':', 2).to_int64());
- path = "ID:" + p_str.get_slicec(':', 1);
- } else {
- modified_time = FileAccess::get_modified_time(path);
- }
+ {
+ uint32_t hash = 0;
+ uint64_t modified_time = 0;
- Item item;
- item.order = order++;
- item.preview = p_texture;
- item.small_preview = p_small_texture;
- item.last_hash = hash;
- item.modified_time = modified_time;
+ if (p_str.begins_with("ID:")) {
+ hash = uint32_t(p_str.get_slicec(':', 2).to_int64());
+ path = "ID:" + p_str.get_slicec(':', 1);
+ } else {
+ modified_time = FileAccess::get_modified_time(path);
+ }
- cache[path] = item;
+ Item item;
+ item.order = order++;
+ item.preview = p_texture;
+ item.small_preview = p_small_texture;
+ item.last_hash = hash;
+ item.modified_time = modified_time;
- preview_mutex->unlock();
+ cache[path] = item;
+ }
MessageQueue::get_singleton()->push_call(id, p_func, path, p_texture, p_small_texture, p_ud);
}
@@ -218,8 +217,8 @@ void EditorResourcePreview::_thread() {
exited = false;
while (!exit) {
- preview_sem->wait();
- preview_mutex->lock();
+ preview_sem.wait();
+ preview_mutex.lock();
if (queue.size()) {
@@ -235,10 +234,10 @@ void EditorResourcePreview::_thread() {
_preview_ready(path, cache[item.path].preview, cache[item.path].small_preview, item.id, item.function, item.userdata);
- preview_mutex->unlock();
+ preview_mutex.unlock();
} else {
- preview_mutex->unlock();
+ preview_mutex.unlock();
Ref<ImageTexture> texture;
Ref<ImageTexture> small_texture;
@@ -345,7 +344,7 @@ void EditorResourcePreview::_thread() {
}
} else {
- preview_mutex->unlock();
+ preview_mutex.unlock();
}
}
exited = true;
@@ -356,52 +355,55 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
ERR_FAIL_NULL(p_receiver);
ERR_FAIL_COND(!p_res.is_valid());
- preview_mutex->lock();
+ {
+ MutexLock lock(preview_mutex);
- String path_id = "ID:" + itos(p_res->get_instance_id());
+ String path_id = "ID:" + itos(p_res->get_instance_id());
- if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version()) {
+ if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version()) {
- cache[path_id].order = order++;
- p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
- preview_mutex->unlock();
- return;
- }
+ cache[path_id].order = order++;
+ p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
+ preview_mutex.unlock();
+ return;
+ }
- cache.erase(path_id); //erase if exists, since it will be regen
+ cache.erase(path_id); //erase if exists, since it will be regen
- QueueItem item;
- item.function = p_receiver_func;
- item.id = p_receiver->get_instance_id();
- item.resource = p_res;
- item.path = path_id;
- item.userdata = p_userdata;
+ QueueItem item;
+ item.function = p_receiver_func;
+ item.id = p_receiver->get_instance_id();
+ item.resource = p_res;
+ item.path = path_id;
+ item.userdata = p_userdata;
- queue.push_back(item);
- preview_mutex->unlock();
- preview_sem->post();
+ queue.push_back(item);
+ }
+ preview_sem.post();
}
void EditorResourcePreview::queue_resource_preview(const String &p_path, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
ERR_FAIL_NULL(p_receiver);
- preview_mutex->lock();
- if (cache.has(p_path)) {
- cache[p_path].order = order++;
- p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata);
- preview_mutex->unlock();
- return;
- }
+ {
+ MutexLock lock(preview_mutex);
+
+ if (cache.has(p_path)) {
+ cache[p_path].order = order++;
+ p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata);
+ preview_mutex.unlock();
+ return;
+ }
- QueueItem item;
- item.function = p_receiver_func;
- item.id = p_receiver->get_instance_id();
- item.path = p_path;
- item.userdata = p_userdata;
+ QueueItem item;
+ item.function = p_receiver_func;
+ item.id = p_receiver->get_instance_id();
+ item.path = p_path;
+ item.userdata = p_userdata;
- queue.push_back(item);
- preview_mutex->unlock();
- preview_sem->post();
+ queue.push_back(item);
+ }
+ preview_sem.post();
}
void EditorResourcePreview::add_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator) {
@@ -434,20 +436,19 @@ void EditorResourcePreview::_bind_methods() {
void EditorResourcePreview::check_for_invalidation(const String &p_path) {
- preview_mutex->lock();
-
+ MutexLock lock(preview_mutex);
bool call_invalidated = false;
- if (cache.has(p_path)) {
+ {
+ if (cache.has(p_path)) {
- uint64_t modified_time = FileAccess::get_modified_time(p_path);
- if (modified_time != cache[p_path].modified_time) {
- cache.erase(p_path);
- call_invalidated = true;
+ uint64_t modified_time = FileAccess::get_modified_time(p_path);
+ if (modified_time != cache[p_path].modified_time) {
+ cache.erase(p_path);
+ call_invalidated = true;
+ }
}
}
- preview_mutex->unlock();
-
if (call_invalidated) { //do outside mutex
call_deferred("emit_signal", "preview_invalidated", p_path);
}
@@ -461,7 +462,7 @@ void EditorResourcePreview::start() {
void EditorResourcePreview::stop() {
if (thread) {
exit = true;
- preview_sem->post();
+ preview_sem.post();
while (!exited) {
OS::get_singleton()->delay_usec(10000);
VisualServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server
@@ -475,8 +476,6 @@ void EditorResourcePreview::stop() {
EditorResourcePreview::EditorResourcePreview() {
thread = NULL;
singleton = this;
- preview_mutex = Mutex::create();
- preview_sem = SemaphoreOld::create();
order = 0;
exit = false;
exited = false;
@@ -485,6 +484,4 @@ EditorResourcePreview::EditorResourcePreview() {
EditorResourcePreview::~EditorResourcePreview() {
stop();
- memdelete(preview_mutex);
- memdelete(preview_sem);
}
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index 0a89154243..0e1684963c 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -70,8 +70,8 @@ class EditorResourcePreview : public Node {
List<QueueItem> queue;
- Mutex *preview_mutex;
- SemaphoreOld *preview_sem;
+ Mutex preview_mutex;
+ Semaphore preview_sem;
Thread *thread;
volatile bool exit;
volatile bool exited;
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index ff7420e19b..3200a0ac8b 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -38,7 +38,7 @@ EditorRun::Status EditorRun::get_status() const {
return status;
}
-Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints) {
+Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints, const int &p_instances) {
List<String> args;
@@ -187,20 +187,40 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
};
printf("\n");
- pid = 0;
- Error err = OS::get_singleton()->execute(exec, args, false, &pid);
- ERR_FAIL_COND_V(err, err);
+ for (int i = 0; i < p_instances; i++) {
+ OS::ProcessID pid = 0;
+ Error err = OS::get_singleton()->execute(exec, args, false, &pid);
+ ERR_FAIL_COND_V(err, err);
+ pids.push_back(pid);
+ }
status = STATUS_PLAY;
return OK;
}
+bool EditorRun::has_child_process(OS::ProcessID p_pid) const {
+ for (const List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) {
+ if (E->get() == p_pid)
+ return true;
+ }
+ return false;
+}
+
+void EditorRun::stop_child_process(OS::ProcessID p_pid) {
+ if (has_child_process(p_pid)) {
+ OS::get_singleton()->kill(p_pid);
+ pids.erase(p_pid);
+ }
+}
+
void EditorRun::stop() {
- if (status != STATUS_STOP && pid != 0) {
+ if (status != STATUS_STOP && pids.size() > 0) {
- OS::get_singleton()->kill(pid);
+ for (List<OS::ProcessID>::Element *E = pids.front(); E; E = E->next()) {
+ OS::get_singleton()->kill(E->get());
+ }
}
status = STATUS_STOP;
diff --git a/editor/editor_run.h b/editor/editor_run.h
index b50a2c2f0e..389a1e6b20 100644
--- a/editor/editor_run.h
+++ b/editor/editor_run.h
@@ -42,7 +42,7 @@ public:
STATUS_STOP
};
- OS::ProcessID pid;
+ List<OS::ProcessID> pids;
private:
bool debug_collisions;
@@ -51,11 +51,13 @@ private:
public:
Status get_status() const;
- Error run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints = false);
+ Error run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints = false, const int &p_instances = 1);
void run_native_notify() { status = STATUS_PLAY; }
void stop();
- OS::ProcessID get_pid() const { return pid; }
+ void stop_child_process(OS::ProcessID p_pid);
+ bool has_child_process(OS::ProcessID p_pid) const;
+ int get_child_process_count() const { return pids.size(); }
void set_debug_collisions(bool p_debug);
bool get_debug_collisions() const;
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index db88b0cea4..e57b4cc7b5 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -55,8 +55,8 @@ void EditorRunNative::_notification(int p_what) {
small_icon.instance();
small_icon->create_from_image(im);
MenuButton *mb = memnew(MenuButton);
- mb->get_popup()->connect("id_pressed", this, "_run_native", varray(i));
- mb->connect("pressed", this, "_run_native", varray(-1, i));
+ mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::_run_native), varray(i));
+ mb->connect("pressed", callable_mp(this, &EditorRunNative::_run_native), varray(-1, i));
mb->set_icon(small_icon);
add_child(mb);
menus[i] = mb;
@@ -154,8 +154,6 @@ void EditorRunNative::resume_run_native() {
void EditorRunNative::_bind_methods() {
- ClassDB::bind_method("_run_native", &EditorRunNative::_run_native);
-
ADD_SIGNAL(MethodInfo("native_run"));
}
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 1f269c246a..628055cac6 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -71,10 +71,10 @@ void EditorScript::_run() {
return;
}
- Variant::CallError ce;
- ce.error = Variant::CallError::CALL_OK;
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
get_script_instance()->call("_run", NULL, 0, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
EditorNode::add_io_error(TTR("Couldn't run script:") + "\n " + s->get_path() + "\n" + TTR("Did you forget the '_run' method?"));
}
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index c4a84bfcdc..fe28efedeb 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -133,9 +133,6 @@ public:
void SectionedInspector::_bind_methods() {
- ClassDB::bind_method("_section_selected", &SectionedInspector::_section_selected);
- ClassDB::bind_method("_search_changed", &SectionedInspector::_search_changed);
-
ClassDB::bind_method("update_category_list", &SectionedInspector::update_category_list);
}
@@ -294,7 +291,7 @@ void SectionedInspector::register_search_box(LineEdit *p_box) {
search_box = p_box;
inspector->register_text_enter(p_box);
- search_box->connect("text_changed", this, "_search_changed");
+ search_box->connect("text_changed", callable_mp(this, &SectionedInspector::_search_changed));
}
void SectionedInspector::_search_changed(const String &p_what) {
@@ -332,7 +329,7 @@ SectionedInspector::SectionedInspector() :
right_vb->add_child(inspector, true);
inspector->set_use_doc_hints(true);
- sections->connect("cell_selected", this, "_section_selected");
+ sections->connect("cell_selected", callable_mp(this, &SectionedInspector::_section_selected));
}
SectionedInspector::~SectionedInspector() {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index d81b9bbb82..ae16a50279 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -319,7 +319,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/display_scale", 0);
hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, "Auto,75%,100%,125%,150%,175%,200%,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/custom_display_scale", 1.0f);
- hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::REAL, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/main_font_size", 14);
hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/code_font_size", 14);
@@ -335,9 +335,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
_initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS
- hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 50000); // 20 FPS
- hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/separate_distraction_mode", false);
_initial_set("interface/editor/automatically_open_screenshots", true);
_initial_set("interface/editor/hide_console_window", false);
@@ -354,15 +354,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91));
hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/contrast", 0.25);
- hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
+ hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
_initial_set("interface/theme/relationship_line_opacity", 0.1);
- hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::REAL, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
+ hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
_initial_set("interface/theme/highlight_tabs", false);
_initial_set("interface/theme/border_size", 1);
_initial_set("interface/theme/use_graph_node_headers", false);
hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/additional_spacing", 0);
- hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
+ hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::FLOAT, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/custom_theme", "");
hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT);
@@ -456,9 +456,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/appearance/show_info_gutter", true);
_initial_set("text_editor/appearance/code_folding", true);
_initial_set("text_editor/appearance/word_wrap", false);
- _initial_set("text_editor/appearance/show_line_length_guideline", true);
- _initial_set("text_editor/appearance/line_length_guideline_column", 80);
- hints["text_editor/appearance/line_length_guideline_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+ _initial_set("text_editor/appearance/show_line_length_guidelines", true);
+ _initial_set("text_editor/appearance/line_length_guideline_soft_column", 80);
+ hints["text_editor/appearance/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+ _initial_set("text_editor/appearance/line_length_guideline_hard_column", 100);
+ hints["text_editor/appearance/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1");
// Script list
_initial_set("text_editor/script_list/show_members_overview", true);
@@ -477,15 +479,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/cursor/block_caret", false);
_initial_set("text_editor/cursor/caret_blink", true);
_initial_set("text_editor/cursor/caret_blink_speed", 0.5);
- hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
_initial_set("text_editor/cursor/right_click_moves_caret", true);
// Completion
_initial_set("text_editor/completion/idle_parse_delay", 2.0);
- hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
_initial_set("text_editor/completion/auto_brace_complete", true);
_initial_set("text_editor/completion/code_complete_delay", 0.3);
- hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
+ hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
_initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true);
_initial_set("text_editor/completion/callhint_tooltip_offset", Vector2());
_initial_set("text_editor/completion/complete_file_paths", true);
@@ -541,23 +543,23 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// 3D: Navigation feel
_initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4);
- hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
+ hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
_initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05);
- hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/translation_inertia", 0.15);
- hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075);
- hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
// 3D: Freelook
_initial_set("editors/3d/freelook/freelook_inertia", 0.1);
- hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/freelook/freelook_base_speed", 5.0);
- hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
+ hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
_initial_set("editors/3d/freelook/freelook_activation_modifier", 0);
hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
_initial_set("editors/3d/freelook/freelook_speed_zoom_link", false);
@@ -1529,7 +1531,7 @@ Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
ie.instance();
ie->set_unicode(p_keycode & KEY_CODE_MASK);
- ie->set_scancode(p_keycode & KEY_CODE_MASK);
+ ie->set_keycode(p_keycode & KEY_CODE_MASK);
ie->set_shift(bool(p_keycode & KEY_MASK_SHIFT));
ie->set_alt(bool(p_keycode & KEY_MASK_ALT));
ie->set_control(bool(p_keycode & KEY_MASK_CTRL));
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 4caa494d59..d4dd19ee10 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -117,7 +117,7 @@ private:
void _get_property_list(List<PropertyInfo> *p_list) const;
void _add_property_info_bind(const Dictionary &p_info);
- void _load_defaults(Ref<ConfigFile> p_extra_config = NULL);
+ void _load_defaults(Ref<ConfigFile> p_extra_config = Ref<ConfigFile>());
void _load_default_text_editor_theme();
bool _save_text_editor_theme(String p_file);
bool _is_default_text_editor_theme(String p_theme_name);
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index bdd5c57b43..0ede0a3b7a 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -463,12 +463,6 @@ void EditorSpinSlider::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
ClassDB::bind_method(D_METHOD("_gui_input"), &EditorSpinSlider::_gui_input);
- ClassDB::bind_method(D_METHOD("_grabber_mouse_entered"), &EditorSpinSlider::_grabber_mouse_entered);
- ClassDB::bind_method(D_METHOD("_grabber_mouse_exited"), &EditorSpinSlider::_grabber_mouse_exited);
- ClassDB::bind_method(D_METHOD("_grabber_gui_input"), &EditorSpinSlider::_grabber_gui_input);
- ClassDB::bind_method(D_METHOD("_value_input_closed"), &EditorSpinSlider::_value_input_closed);
- ClassDB::bind_method(D_METHOD("_value_input_entered"), &EditorSpinSlider::_value_input_entered);
- ClassDB::bind_method(D_METHOD("_value_focus_exited"), &EditorSpinSlider::_value_focus_exited);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "label"), "set_label", "get_label");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
@@ -490,9 +484,9 @@ EditorSpinSlider::EditorSpinSlider() {
grabber->hide();
grabber->set_as_toplevel(true);
grabber->set_mouse_filter(MOUSE_FILTER_STOP);
- grabber->connect("mouse_entered", this, "_grabber_mouse_entered");
- grabber->connect("mouse_exited", this, "_grabber_mouse_exited");
- grabber->connect("gui_input", this, "_grabber_gui_input");
+ grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
+ grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
+ grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
mouse_over_spin = false;
mouse_over_grabber = false;
mousewheel_over_grabber = false;
@@ -502,9 +496,9 @@ EditorSpinSlider::EditorSpinSlider() {
add_child(value_input);
value_input->set_as_toplevel(true);
value_input->hide();
- value_input->connect("modal_closed", this, "_value_input_closed");
- value_input->connect("text_entered", this, "_value_input_entered");
- value_input->connect("focus_exited", this, "_value_focus_exited");
+ value_input->connect("modal_closed", callable_mp(this, &EditorSpinSlider::_value_input_closed));
+ value_input->connect("text_entered", callable_mp(this, &EditorSpinSlider::_value_input_entered));
+ value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
value_input_just_closed = false;
hide_slider = false;
read_only = false;
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index cd533649e3..3ebd8f0475 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -131,6 +131,10 @@ void EditorSubScene::_item_multi_selected(Object *p_object, int p_cell, bool p_s
}
}
+void EditorSubScene::_item_activated() {
+ _ok_pressed(); // From AcceptDialog.
+}
+
void EditorSubScene::_remove_selection_child(Node *p_node) {
if (p_node->get_child_count() > 0) {
for (int i = 0; i < p_node->get_child_count(); i++) {
@@ -217,11 +221,6 @@ void EditorSubScene::clear() {
void EditorSubScene::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_path_selected"), &EditorSubScene::_path_selected);
- ClassDB::bind_method(D_METHOD("_path_changed"), &EditorSubScene::_path_changed);
- ClassDB::bind_method(D_METHOD("_path_browse"), &EditorSubScene::_path_browse);
- ClassDB::bind_method(D_METHOD("_item_multi_selected"), &EditorSubScene::_item_multi_selected);
- ClassDB::bind_method(D_METHOD("_selected_changed"), &EditorSubScene::_selected_changed);
ADD_SIGNAL(MethodInfo("subscene_selected"));
}
@@ -239,24 +238,24 @@ EditorSubScene::EditorSubScene() {
HBoxContainer *hb = memnew(HBoxContainer);
path = memnew(LineEdit);
- path->connect("text_entered", this, "_path_changed");
+ path->connect("text_entered", callable_mp(this, &EditorSubScene::_path_changed));
hb->add_child(path);
path->set_h_size_flags(SIZE_EXPAND_FILL);
Button *b = memnew(Button);
b->set_text(TTR("Browse"));
hb->add_child(b);
- b->connect("pressed", this, "_path_browse");
+ b->connect("pressed", callable_mp(this, &EditorSubScene::_path_browse));
vb->add_margin_child(TTR("Scene Path:"), hb);
tree = memnew(Tree);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
vb->add_margin_child(TTR("Import From Node:"), tree, true);
tree->set_select_mode(Tree::SELECT_MULTI);
- tree->connect("multi_selected", this, "_item_multi_selected");
+ tree->connect("multi_selected", callable_mp(this, &EditorSubScene::_item_multi_selected));
//tree->connect("nothing_selected", this, "_deselect_items");
- tree->connect("cell_selected", this, "_selected_changed");
+ tree->connect("cell_selected", callable_mp(this, &EditorSubScene::_selected_changed));
- tree->connect("item_activated", this, "_ok", make_binds(), CONNECT_DEFERRED);
+ tree->connect("item_activated", callable_mp(this, &EditorSubScene::_item_activated), make_binds(), CONNECT_DEFERRED);
file_dialog = memnew(EditorFileDialog);
List<String> extensions;
@@ -269,5 +268,5 @@ EditorSubScene::EditorSubScene() {
file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_path_selected");
+ file_dialog->connect("file_selected", callable_mp(this, &EditorSubScene::_path_selected));
}
diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h
index 8205db25d7..5c3b4377d4 100644
--- a/editor/editor_sub_scene.h
+++ b/editor/editor_sub_scene.h
@@ -50,6 +50,7 @@ class EditorSubScene : public ConfirmationDialog {
void _fill_tree(Node *p_node, TreeItem *p_parent);
void _selected_changed();
void _item_multi_selected(Object *p_object, int p_cell, bool p_selected);
+ void _item_activated();
void _remove_selection_child(Node *p_node);
void _reown(Node *p_node, List<Node *> *p_to_reown);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 50e3408037..39d4b70a6a 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -852,12 +852,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_panel_debugger = style_content_panel->duplicate();
style_panel_debugger->set_border_width(MARGIN_BOTTOM, 0);
theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
- theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_selected);
- theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_unselected);
Ref<StyleBoxFlat> style_panel_invisible_top = style_content_panel->duplicate();
int stylebox_offset = theme->get_font("tab_fg", "TabContainer")->get_height() + theme->get_stylebox("tab_fg", "TabContainer")->get_minimum_size().height + theme->get_stylebox("panel", "TabContainer")->get_default_margin(MARGIN_TOP);
style_panel_invisible_top->set_expand_margin_size(MARGIN_TOP, -stylebox_offset);
+ style_panel_invisible_top->set_default_margin(MARGIN_TOP, 0);
theme->set_stylebox("BottomPanelDebuggerOverride", "EditorStyles", style_panel_invisible_top);
// LineEdit
diff --git a/editor/editor_visual_profiler.cpp b/editor/editor_visual_profiler.cpp
index 1b68a89181..e9638148e2 100644
--- a/editor/editor_visual_profiler.cpp
+++ b/editor/editor_visual_profiler.cpp
@@ -161,7 +161,7 @@ void EditorVisualProfiler::_update_plot() {
graph_image.resize(desired_len);
}
- PoolVector<uint8_t>::Write wr = graph_image.write();
+ uint8_t *wr = graph_image.ptrw();
//clear
for (int i = 0; i < desired_len; i += 4) {
@@ -305,8 +305,6 @@ void EditorVisualProfiler::_update_plot() {
}
}
- wr.release();
-
Ref<Image> img;
img.instance();
img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
@@ -590,8 +588,7 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
if (activate->is_pressed()) {
if (!seeking) {
- //probably not need to break request, can just stop profiling
- //emit_signal("break_request");
+ // Break request is not required, just stop profiling
}
}
@@ -669,19 +666,7 @@ void EditorVisualProfiler::_combo_changed(int) {
void EditorVisualProfiler::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_frame"), &EditorVisualProfiler::_update_frame, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_update_plot"), &EditorVisualProfiler::_update_plot);
- ClassDB::bind_method(D_METHOD("_activate_pressed"), &EditorVisualProfiler::_activate_pressed);
- ClassDB::bind_method(D_METHOD("_clear_pressed"), &EditorVisualProfiler::_clear_pressed);
- ClassDB::bind_method(D_METHOD("_graph_tex_draw"), &EditorVisualProfiler::_graph_tex_draw);
- ClassDB::bind_method(D_METHOD("_graph_tex_input"), &EditorVisualProfiler::_graph_tex_input);
- ClassDB::bind_method(D_METHOD("_graph_tex_mouse_exit"), &EditorVisualProfiler::_graph_tex_mouse_exit);
- ClassDB::bind_method(D_METHOD("_cursor_metric_changed"), &EditorVisualProfiler::_cursor_metric_changed);
- ClassDB::bind_method(D_METHOD("_combo_changed"), &EditorVisualProfiler::_combo_changed);
-
- ClassDB::bind_method(D_METHOD("_item_selected"), &EditorVisualProfiler::_item_selected);
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
- ADD_SIGNAL(MethodInfo("break_request"));
}
void EditorVisualProfiler::set_enabled(bool p_enable) {
@@ -757,12 +742,12 @@ EditorVisualProfiler::EditorVisualProfiler() {
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
- activate->connect("pressed", this, "_activate_pressed");
+ activate->connect("pressed", callable_mp(this, &EditorVisualProfiler::_activate_pressed));
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", this, "_clear_pressed");
+ clear_button->connect("pressed", callable_mp(this, &EditorVisualProfiler::_clear_pressed));
hb->add_child(clear_button);
hb->add_child(memnew(Label(TTR("Measure:"))));
@@ -770,18 +755,18 @@ EditorVisualProfiler::EditorVisualProfiler() {
display_mode = memnew(OptionButton);
display_mode->add_item(TTR("Frame Time (msec)"));
display_mode->add_item(TTR("Frame %"));
- display_mode->connect("item_selected", this, "_combo_changed");
+ display_mode->connect("item_selected", callable_mp(this, &EditorVisualProfiler::_combo_changed));
hb->add_child(display_mode);
frame_relative = memnew(CheckBox(TTR("Fit to Frame")));
frame_relative->set_pressed(true);
hb->add_child(frame_relative);
- frame_relative->connect("pressed", this, "_update_plot");
+ frame_relative->connect("pressed", callable_mp(this, &EditorVisualProfiler::_update_plot));
linked = memnew(CheckBox(TTR("Linked")));
linked->set_pressed(true);
hb->add_child(linked);
- linked->connect("pressed", this, "_update_plot");
+ linked->connect("pressed", callable_mp(this, &EditorVisualProfiler::_update_plot));
hb->add_spacer();
@@ -790,7 +775,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
cursor_metric_edit = memnew(SpinBox);
cursor_metric_edit->set_h_size_flags(SIZE_FILL);
hb->add_child(cursor_metric_edit);
- cursor_metric_edit->connect("value_changed", this, "_cursor_metric_changed");
+ cursor_metric_edit->connect("value_changed", callable_mp(this, &EditorVisualProfiler::_cursor_metric_changed));
hb->add_constant_override("separation", 8 * EDSCALE);
@@ -814,15 +799,15 @@ EditorVisualProfiler::EditorVisualProfiler() {
variables->set_column_title(2, TTR("GPU"));
variables->set_column_expand(2, false);
variables->set_column_min_width(2, 60 * EDSCALE);
- variables->connect("cell_selected", this, "_item_selected");
+ variables->connect("cell_selected", callable_mp(this, &EditorVisualProfiler::_item_selected));
graph = memnew(TextureRect);
graph->set_expand(true);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
//graph->set_ignore_mouse(false);
- graph->connect("draw", this, "_graph_tex_draw");
- graph->connect("gui_input", this, "_graph_tex_input");
- graph->connect("mouse_exited", this, "_graph_tex_mouse_exit");
+ graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
+ graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
+ graph->connect("mouse_exited", callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit));
h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -839,13 +824,13 @@ EditorVisualProfiler::EditorVisualProfiler() {
frame_delay->set_wait_time(0.1);
frame_delay->set_one_shot(true);
add_child(frame_delay);
- frame_delay->connect("timeout", this, "_update_frame");
+ frame_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_frame), make_binds(false));
plot_delay = memnew(Timer);
plot_delay->set_wait_time(0.1);
plot_delay->set_one_shot(true);
add_child(plot_delay);
- plot_delay->connect("timeout", this, "_update_plot");
+ plot_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_plot));
seeking = false;
graph_height_cpu = 1;
diff --git a/editor/editor_visual_profiler.h b/editor/editor_visual_profiler.h
index b4c03b227e..5194c08b96 100644
--- a/editor/editor_visual_profiler.h
+++ b/editor/editor_visual_profiler.h
@@ -78,7 +78,7 @@ private:
TextureRect *graph;
Ref<ImageTexture> graph_texture;
- PoolVector<uint8_t> graph_image;
+ Vector<uint8_t> graph_image;
Tree *variables;
HSplitContainer *h_split;
CheckBox *frame_relative;
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 7ed6688154..9328a5e04d 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -93,14 +93,14 @@ void ExportTemplateManager::_update_template_list() {
Button *redownload = memnew(Button);
redownload->set_text(TTR("Redownload"));
current_hb->add_child(redownload);
- redownload->connect("pressed", this, "_download_template", varray(current_version));
+ redownload->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_template), varray(current_version));
}
Button *uninstall = memnew(Button);
uninstall->set_text(TTR("Uninstall"));
current_hb->add_child(uninstall);
current->set_text(current_version + " " + TTR("(Installed)"));
- uninstall->connect("pressed", this, "_uninstall_template", varray(current_version));
+ uninstall->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(current_version));
} else {
current->add_color_override("font_color", get_color("error_color", "Editor"));
@@ -112,7 +112,7 @@ void ExportTemplateManager::_update_template_list() {
redownload->set_tooltip(TTR("Official export templates aren't available for development builds."));
}
- redownload->connect("pressed", this, "_download_template", varray(current_version));
+ redownload->connect("pressed", callable_mp(this, &ExportTemplateManager::_download_template), varray(current_version));
current_hb->add_child(redownload);
current->set_text(current_version + " " + TTR("(Missing)"));
}
@@ -134,7 +134,7 @@ void ExportTemplateManager::_update_template_list() {
uninstall->set_text(TTR("Uninstall"));
hbc->add_child(uninstall);
- uninstall->connect("pressed", this, "_uninstall_template", varray(E->get()));
+ uninstall->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(E->get()));
installed_vb->add_child(hbc);
}
@@ -350,7 +350,7 @@ void ExportTemplateManager::ok_pressed() {
template_open->popup_centered_ratio();
}
-void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) {
+void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
if (p_status != HTTPRequest::RESULT_SUCCESS || p_code != 200) {
EditorNode::get_singleton()->show_warning(TTR("Error getting the list of mirrors."));
@@ -359,8 +359,8 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
String mirror_str;
{
- PoolByteArray::Read r = p_data.read();
- mirror_str.parse_utf8((const char *)r.ptr(), p_data.size());
+ const uint8_t *r = p_data.ptr();
+ mirror_str.parse_utf8((const char *)r, p_data.size());
}
template_list_state->hide();
@@ -385,7 +385,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
ERR_CONTINUE(!m.has("url") || !m.has("name"));
LinkButton *lb = memnew(LinkButton);
lb->set_text(m["name"]);
- lb->connect("pressed", this, "_begin_template_download", varray(m["url"]));
+ lb->connect("pressed", callable_mp(this, &ExportTemplateManager::_begin_template_download), varray(m["url"]));
template_list->add_child(lb);
mirrors_found = true;
}
@@ -396,7 +396,7 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
return;
}
}
-void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) {
+void ExportTemplateManager::_http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
switch (p_status) {
@@ -547,9 +547,7 @@ void ExportTemplateManager::_notification(int p_what) {
bool ExportTemplateManager::can_install_android_template() {
const String templates_dir = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
- return FileAccess::exists(templates_dir.plus_file("android_source.zip")) &&
- FileAccess::exists(templates_dir.plus_file("android_release.apk")) &&
- FileAccess::exists(templates_dir.plus_file("android_debug.apk"));
+ return FileAccess::exists(templates_dir.plus_file("android_source.zip"));
}
Error ExportTemplateManager::install_android_template() {
@@ -563,13 +561,6 @@ Error ExportTemplateManager::install_android_template() {
// Make res://android dir (if it does not exist).
da->make_dir("android");
{
- // Add an empty .gdignore file to avoid scan.
- FileAccessRef f = FileAccess::open("res://android/.gdignore", FileAccess::WRITE);
- ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
- f->store_line("");
- f->close();
- }
- {
// Add version, to ensure building won't work if template and Godot version don't match.
FileAccessRef f = FileAccess::open("res://android/.build_version", FileAccess::WRITE);
ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
@@ -577,9 +568,20 @@ Error ExportTemplateManager::install_android_template() {
f->close();
}
- Error err = da->make_dir_recursive("android/build");
+ // Create the android plugins directory.
+ Error err = da->make_dir_recursive("android/plugins");
ERR_FAIL_COND_V(err != OK, err);
+ err = da->make_dir_recursive("android/build");
+ ERR_FAIL_COND_V(err != OK, err);
+ {
+ // Add an empty .gdignore file to avoid scan.
+ FileAccessRef f = FileAccess::open("res://android/build/.gdignore", FileAccess::WRITE);
+ ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
+ f->store_line("");
+ f->close();
+ }
+
// Uncompress source template.
const String &templates_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
@@ -655,15 +657,6 @@ Error ExportTemplateManager::install_android_template() {
}
void ExportTemplateManager::_bind_methods() {
-
- ClassDB::bind_method("_download_template", &ExportTemplateManager::_download_template);
- ClassDB::bind_method("_uninstall_template", &ExportTemplateManager::_uninstall_template);
- ClassDB::bind_method("_uninstall_template_confirm", &ExportTemplateManager::_uninstall_template_confirm);
- ClassDB::bind_method("_install_from_file", &ExportTemplateManager::_install_from_file);
- ClassDB::bind_method("_http_download_mirror_completed", &ExportTemplateManager::_http_download_mirror_completed);
- ClassDB::bind_method("_http_download_templates_completed", &ExportTemplateManager::_http_download_templates_completed);
- ClassDB::bind_method("_begin_template_download", &ExportTemplateManager::_begin_template_download);
- ClassDB::bind_method("_window_template_downloader_closed", &ExportTemplateManager::_window_template_downloader_closed);
}
ExportTemplateManager::ExportTemplateManager() {
@@ -689,14 +682,14 @@ ExportTemplateManager::ExportTemplateManager() {
remove_confirm = memnew(ConfirmationDialog);
remove_confirm->set_title(TTR("Remove Template"));
add_child(remove_confirm);
- remove_confirm->connect("confirmed", this, "_uninstall_template_confirm");
+ remove_confirm->connect("confirmed", callable_mp(this, &ExportTemplateManager::_uninstall_template_confirm));
template_open = memnew(FileDialog);
template_open->set_title(TTR("Select Template File"));
template_open->add_filter("*.tpz ; " + TTR("Godot Export Templates"));
template_open->set_access(FileDialog::ACCESS_FILESYSTEM);
template_open->set_mode(FileDialog::MODE_OPEN_FILE);
- template_open->connect("file_selected", this, "_install_from_file", varray(true));
+ template_open->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_from_file), varray(true));
add_child(template_open);
set_title(TTR("Export Template Manager"));
@@ -704,18 +697,18 @@ ExportTemplateManager::ExportTemplateManager() {
request_mirror = memnew(HTTPRequest);
add_child(request_mirror);
- request_mirror->connect("request_completed", this, "_http_download_mirror_completed");
+ request_mirror->connect("request_completed", callable_mp(this, &ExportTemplateManager::_http_download_mirror_completed));
download_templates = memnew(HTTPRequest);
add_child(download_templates);
- download_templates->connect("request_completed", this, "_http_download_templates_completed");
+ download_templates->connect("request_completed", callable_mp(this, &ExportTemplateManager::_http_download_templates_completed));
template_downloader = memnew(AcceptDialog);
template_downloader->set_title(TTR("Download Templates"));
template_downloader->get_ok()->set_text(TTR("Close"));
template_downloader->set_exclusive(true);
add_child(template_downloader);
- template_downloader->connect("popup_hide", this, "_window_template_downloader_closed");
+ template_downloader->connect("popup_hide", callable_mp(this, &ExportTemplateManager::_window_template_downloader_closed));
VBoxContainer *vbc = memnew(VBoxContainer);
template_downloader->add_child(vbc);
diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h
index 96e61a6569..6ebc7fd131 100644
--- a/editor/export_template_manager.h
+++ b/editor/export_template_manager.h
@@ -72,8 +72,8 @@ class ExportTemplateManager : public ConfirmationDialog {
virtual void ok_pressed();
bool _install_from_file(const String &p_file, bool p_use_progress = true);
- void _http_download_mirror_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
- void _http_download_templates_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
+ void _http_download_mirror_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
+ void _http_download_templates_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
void _begin_template_download(const String &p_url);
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index af7eb0c4c7..fb44c145b2 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -42,9 +42,10 @@
void EditorFileServer::_close_client(ClientData *cd) {
cd->connection->disconnect_from_host();
- cd->efs->wait_mutex->lock();
- cd->efs->to_wait.insert(cd->thread);
- cd->efs->wait_mutex->unlock();
+ {
+ MutexLock lock(cd->efs->wait_mutex);
+ cd->efs->to_wait.insert(cd->thread);
+ }
while (cd->files.size()) {
memdelete(cd->files.front()->get());
cd->files.erase(cd->files.front());
@@ -295,16 +296,16 @@ void EditorFileServer::_thread_start(void *s) {
}
}
- self->wait_mutex->lock();
+ self->wait_mutex.lock();
while (self->to_wait.size()) {
Thread *w = self->to_wait.front()->get();
self->to_wait.erase(w);
- self->wait_mutex->unlock();
+ self->wait_mutex.unlock();
Thread::wait_to_finish(w);
memdelete(w);
- self->wait_mutex->lock();
+ self->wait_mutex.lock();
}
- self->wait_mutex->unlock();
+ self->wait_mutex.unlock();
OS::get_singleton()->delay_usec(100000);
}
@@ -331,7 +332,6 @@ void EditorFileServer::stop() {
EditorFileServer::EditorFileServer() {
server.instance();
- wait_mutex = Mutex::create();
quit = false;
active = false;
cmd = CMD_NONE;
@@ -346,5 +346,4 @@ EditorFileServer::~EditorFileServer() {
quit = true;
Thread::wait_to_finish(thread);
memdelete(thread);
- memdelete(wait_mutex);
}
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 4ce4c0cda6..cc3cb44566 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -62,7 +62,7 @@ class EditorFileServer : public Object {
static void _close_client(ClientData *cd);
static void _subthread_start(void *s);
- Mutex *wait_mutex;
+ Mutex wait_mutex;
Thread *thread;
static void _thread_start(void *);
bool quit;
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index a3def15532..6c69f46941 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -300,19 +300,19 @@ void FileSystemDock::_notification(int p_what) {
if (initialized)
return;
initialized = true;
- EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed");
+ EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &FileSystemDock::_feature_profile_changed));
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed");
- EditorResourcePreview::get_singleton()->connect("preview_invalidated", this, "_preview_invalidated");
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &FileSystemDock::_fs_changed));
+ EditorResourcePreview::get_singleton()->connect("preview_invalidated", callable_mp(this, &FileSystemDock::_preview_invalidated));
String ei = "EditorIcons";
button_reload->set_icon(get_icon("Reload", ei));
button_toggle_display_mode->set_icon(get_icon("Panels2", ei));
- button_file_list_display_mode->connect("pressed", this, "_toggle_file_display");
+ button_file_list_display_mode->connect("pressed", callable_mp(this, &FileSystemDock::_toggle_file_display));
- files->connect("item_activated", this, "_file_list_activate_file");
- button_hist_next->connect("pressed", this, "_fw_history");
- button_hist_prev->connect("pressed", this, "_bw_history");
+ files->connect("item_activated", callable_mp(this, &FileSystemDock::_file_list_activate_file));
+ button_hist_next->connect("pressed", callable_mp(this, &FileSystemDock::_fw_history));
+ button_hist_prev->connect("pressed", callable_mp(this, &FileSystemDock::_bw_history));
tree_search_box->set_right_icon(get_icon("Search", ei));
tree_search_box->set_clear_button_enabled(true);
file_list_search_box->set_right_icon(get_icon("Search", ei));
@@ -320,10 +320,10 @@ void FileSystemDock::_notification(int p_what) {
button_hist_next->set_icon(get_icon("Forward", ei));
button_hist_prev->set_icon(get_icon("Back", ei));
- file_list_popup->connect("id_pressed", this, "_file_list_rmb_option");
- tree_popup->connect("id_pressed", this, "_tree_rmb_option");
+ file_list_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_list_rmb_option));
+ tree_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
- current_path->connect("text_entered", this, "_navigate_to_path");
+ current_path->connect("text_entered", callable_mp(this, &FileSystemDock::_navigate_to_path), make_binds(false));
always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
@@ -1406,8 +1406,8 @@ bool FileSystemDock::_check_existing() {
return true;
}
-void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overwrite) {
- if (!overwrite) {
+void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_overwrite) {
+ if (!p_overwrite) {
to_move_path = p_to_path;
bool can_move = _check_existing();
if (!can_move) {
@@ -1775,7 +1775,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
}
-void FileSystemDock::_resource_created() const {
+void FileSystemDock::_resource_created() {
Object *c = new_resource_dialog->instance_selected();
ERR_FAIL_COND(!c);
@@ -2453,60 +2453,22 @@ void FileSystemDock::_feature_profile_changed() {
}
void FileSystemDock::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_file_list_gui_input"), &FileSystemDock::_file_list_gui_input);
- ClassDB::bind_method(D_METHOD("_tree_gui_input"), &FileSystemDock::_tree_gui_input);
ClassDB::bind_method(D_METHOD("_update_tree"), &FileSystemDock::_update_tree);
- ClassDB::bind_method(D_METHOD("_rescan"), &FileSystemDock::_rescan);
-
- ClassDB::bind_method(D_METHOD("_toggle_split_mode"), &FileSystemDock::_toggle_split_mode);
-
- ClassDB::bind_method(D_METHOD("_tree_rmb_option", "option"), &FileSystemDock::_tree_rmb_option);
- ClassDB::bind_method(D_METHOD("_tree_rmb_select"), &FileSystemDock::_tree_rmb_select);
- ClassDB::bind_method(D_METHOD("_tree_empty_selected"), &FileSystemDock::_tree_empty_selected);
-
- ClassDB::bind_method(D_METHOD("_file_list_rmb_option", "option"), &FileSystemDock::_file_list_rmb_option);
- ClassDB::bind_method(D_METHOD("_file_list_rmb_select"), &FileSystemDock::_file_list_rmb_select);
- ClassDB::bind_method(D_METHOD("_file_list_rmb_pressed"), &FileSystemDock::_file_list_rmb_pressed);
- ClassDB::bind_method(D_METHOD("_tree_rmb_empty"), &FileSystemDock::_tree_rmb_empty);
-
- ClassDB::bind_method(D_METHOD("_file_deleted"), &FileSystemDock::_file_deleted);
- ClassDB::bind_method(D_METHOD("_folder_deleted"), &FileSystemDock::_folder_deleted);
ClassDB::bind_method(D_METHOD("_file_list_thumbnail_done"), &FileSystemDock::_file_list_thumbnail_done);
ClassDB::bind_method(D_METHOD("_tree_thumbnail_done"), &FileSystemDock::_tree_thumbnail_done);
- ClassDB::bind_method(D_METHOD("_file_list_activate_file"), &FileSystemDock::_file_list_activate_file);
- ClassDB::bind_method(D_METHOD("_tree_activate_file"), &FileSystemDock::_tree_activate_file);
ClassDB::bind_method(D_METHOD("_select_file"), &FileSystemDock::_select_file);
- ClassDB::bind_method(D_METHOD("_navigate_to_path"), &FileSystemDock::_navigate_to_path, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_toggle_file_display"), &FileSystemDock::_toggle_file_display);
- ClassDB::bind_method(D_METHOD("_fw_history"), &FileSystemDock::_fw_history);
- ClassDB::bind_method(D_METHOD("_bw_history"), &FileSystemDock::_bw_history);
- ClassDB::bind_method(D_METHOD("_fs_changed"), &FileSystemDock::_fs_changed);
- ClassDB::bind_method(D_METHOD("_tree_multi_selected"), &FileSystemDock::_tree_multi_selected);
- ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &FileSystemDock::_make_dir_confirm);
- ClassDB::bind_method(D_METHOD("_make_scene_confirm"), &FileSystemDock::_make_scene_confirm);
- ClassDB::bind_method(D_METHOD("_resource_created"), &FileSystemDock::_resource_created);
- ClassDB::bind_method(D_METHOD("_move_operation_confirm", "to_path", "overwrite"), &FileSystemDock::_move_operation_confirm, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_move_with_overwrite"), &FileSystemDock::_move_with_overwrite);
- ClassDB::bind_method(D_METHOD("_rename_operation_confirm"), &FileSystemDock::_rename_operation_confirm);
- ClassDB::bind_method(D_METHOD("_duplicate_operation_confirm"), &FileSystemDock::_duplicate_operation_confirm);
-
- ClassDB::bind_method(D_METHOD("_search_changed"), &FileSystemDock::_search_changed);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &FileSystemDock::drop_data_fw);
ClassDB::bind_method(D_METHOD("navigate_to_path"), &FileSystemDock::navigate_to_path);
- ClassDB::bind_method(D_METHOD("_preview_invalidated"), &FileSystemDock::_preview_invalidated);
- ClassDB::bind_method(D_METHOD("_file_multi_selected"), &FileSystemDock::_file_multi_selected);
ClassDB::bind_method(D_METHOD("_update_import_dock"), &FileSystemDock::_update_import_dock);
- ClassDB::bind_method(D_METHOD("_feature_profile_changed"), &FileSystemDock::_feature_profile_changed);
-
ADD_SIGNAL(MethodInfo("inherit", PropertyInfo(Variant::STRING, "file")));
- ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::POOL_STRING_ARRAY, "files")));
+ ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files")));
ADD_SIGNAL(MethodInfo("file_removed", PropertyInfo(Variant::STRING, "file")));
ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder")));
@@ -2552,7 +2514,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
button_reload = memnew(Button);
button_reload->set_flat(true);
- button_reload->connect("pressed", this, "_rescan");
+ button_reload->connect("pressed", callable_mp(this, &FileSystemDock::_rescan));
button_reload->set_focus_mode(FOCUS_NONE);
button_reload->set_tooltip(TTR("Re-Scan Filesystem"));
button_reload->hide();
@@ -2561,7 +2523,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
button_toggle_display_mode = memnew(Button);
button_toggle_display_mode->set_flat(true);
button_toggle_display_mode->set_toggle_mode(true);
- button_toggle_display_mode->connect("toggled", this, "_toggle_split_mode");
+ button_toggle_display_mode->connect("toggled", callable_mp(this, &FileSystemDock::_toggle_split_mode));
button_toggle_display_mode->set_focus_mode(FOCUS_NONE);
button_toggle_display_mode->set_tooltip(TTR("Toggle Split Mode"));
toolbar_hbc->add_child(button_toggle_display_mode);
@@ -2573,7 +2535,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree_search_box = memnew(LineEdit);
tree_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
tree_search_box->set_placeholder(TTR("Search files"));
- tree_search_box->connect("text_changed", this, "_search_changed", varray(tree_search_box));
+ tree_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed), varray(tree_search_box));
toolbar2_hbc->add_child(tree_search_box);
file_list_popup = memnew(PopupMenu);
@@ -2597,12 +2559,12 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree->set_custom_minimum_size(Size2(0, 15 * EDSCALE));
split_box->add_child(tree);
- tree->connect("item_activated", this, "_tree_activate_file");
- tree->connect("multi_selected", this, "_tree_multi_selected");
- tree->connect("item_rmb_selected", this, "_tree_rmb_select");
- tree->connect("empty_rmb", this, "_tree_rmb_empty");
- tree->connect("nothing_selected", this, "_tree_empty_selected");
- tree->connect("gui_input", this, "_tree_gui_input");
+ tree->connect("item_activated", callable_mp(this, &FileSystemDock::_tree_activate_file));
+ tree->connect("multi_selected", callable_mp(this, &FileSystemDock::_tree_multi_selected));
+ tree->connect("item_rmb_selected", callable_mp(this, &FileSystemDock::_tree_rmb_select));
+ tree->connect("empty_rmb", callable_mp(this, &FileSystemDock::_tree_rmb_empty));
+ tree->connect("nothing_selected", callable_mp(this, &FileSystemDock::_tree_empty_selected));
+ tree->connect("gui_input", callable_mp(this, &FileSystemDock::_tree_gui_input));
file_list_vb = memnew(VBoxContainer);
file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -2614,7 +2576,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
file_list_search_box = memnew(LineEdit);
file_list_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
file_list_search_box->set_placeholder(TTR("Search files"));
- file_list_search_box->connect("text_changed", this, "_search_changed", varray(file_list_search_box));
+ file_list_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed), varray(file_list_search_box));
path_hb->add_child(file_list_search_box);
button_file_list_display_mode = memnew(ToolButton);
@@ -2624,10 +2586,10 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
files->set_v_size_flags(SIZE_EXPAND_FILL);
files->set_select_mode(ItemList::SELECT_MULTI);
files->set_drag_forwarding(this);
- files->connect("item_rmb_selected", this, "_file_list_rmb_select");
- files->connect("gui_input", this, "_file_list_gui_input");
- files->connect("multi_selected", this, "_file_multi_selected");
- files->connect("rmb_clicked", this, "_file_list_rmb_pressed");
+ files->connect("item_rmb_selected", callable_mp(this, &FileSystemDock::_file_list_rmb_select));
+ files->connect("gui_input", callable_mp(this, &FileSystemDock::_file_list_gui_input));
+ files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected));
+ files->connect("rmb_clicked", callable_mp(this, &FileSystemDock::_file_list_rmb_pressed));
files->set_custom_minimum_size(Size2(0, 15 * EDSCALE));
files->set_allow_rmb_select(true);
file_list_vb->add_child(files);
@@ -2651,14 +2613,14 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
add_child(owners_editor);
remove_dialog = memnew(DependencyRemoveDialog);
- remove_dialog->connect("file_removed", this, "_file_deleted");
- remove_dialog->connect("folder_removed", this, "_folder_deleted");
+ remove_dialog->connect("file_removed", callable_mp(this, &FileSystemDock::_file_deleted));
+ remove_dialog->connect("folder_removed", callable_mp(this, &FileSystemDock::_folder_deleted));
add_child(remove_dialog);
move_dialog = memnew(EditorDirDialog);
move_dialog->get_ok()->set_text(TTR("Move"));
add_child(move_dialog);
- move_dialog->connect("dir_selected", this, "_move_operation_confirm");
+ move_dialog->connect("dir_selected", callable_mp(this, &FileSystemDock::_move_operation_confirm), make_binds(false));
rename_dialog = memnew(ConfirmationDialog);
VBoxContainer *rename_dialog_vb = memnew(VBoxContainer);
@@ -2669,13 +2631,13 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
rename_dialog->get_ok()->set_text(TTR("Rename"));
add_child(rename_dialog);
rename_dialog->register_text_enter(rename_dialog_text);
- rename_dialog->connect("confirmed", this, "_rename_operation_confirm");
+ rename_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_rename_operation_confirm));
overwrite_dialog = memnew(ConfirmationDialog);
overwrite_dialog->set_text(TTR("There is already file or folder with the same name in this location."));
overwrite_dialog->get_ok()->set_text(TTR("Overwrite"));
add_child(overwrite_dialog);
- overwrite_dialog->connect("confirmed", this, "_move_with_overwrite");
+ overwrite_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_move_with_overwrite));
duplicate_dialog = memnew(ConfirmationDialog);
VBoxContainer *duplicate_dialog_vb = memnew(VBoxContainer);
@@ -2686,7 +2648,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
duplicate_dialog->get_ok()->set_text(TTR("Duplicate"));
add_child(duplicate_dialog);
duplicate_dialog->register_text_enter(duplicate_dialog_text);
- duplicate_dialog->connect("confirmed", this, "_duplicate_operation_confirm");
+ duplicate_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_duplicate_operation_confirm));
make_dir_dialog = memnew(ConfirmationDialog);
make_dir_dialog->set_title(TTR("Create Folder"));
@@ -2697,7 +2659,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
make_folder_dialog_vb->add_margin_child(TTR("Name:"), make_dir_dialog_text);
add_child(make_dir_dialog);
make_dir_dialog->register_text_enter(make_dir_dialog_text);
- make_dir_dialog->connect("confirmed", this, "_make_dir_confirm");
+ make_dir_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_make_dir_confirm));
make_scene_dialog = memnew(ConfirmationDialog);
make_scene_dialog->set_title(TTR("Create Scene"));
@@ -2708,7 +2670,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
make_scene_dialog_vb->add_margin_child(TTR("Name:"), make_scene_dialog_text);
add_child(make_scene_dialog);
make_scene_dialog->register_text_enter(make_scene_dialog_text);
- make_scene_dialog->connect("confirmed", this, "_make_scene_confirm");
+ make_scene_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_make_scene_confirm));
make_script_dialog = memnew(ScriptCreateDialog);
make_script_dialog->set_title(TTR("Create Script"));
@@ -2717,7 +2679,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
new_resource_dialog = memnew(CreateDialog);
add_child(new_resource_dialog);
new_resource_dialog->set_base_type("Resource");
- new_resource_dialog->connect("create", this, "_resource_created");
+ new_resource_dialog->connect("create", callable_mp(this, &FileSystemDock::_resource_created));
searched_string = String();
uncollapsed_paths_before_search = Vector<String>();
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index d20d4add4e..00f8cd9d50 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -215,14 +215,14 @@ private:
void _files_moved(String p_old_file, String p_new_file);
void _folder_moved(String p_old_folder, String p_new_folder);
- void _resource_created() const;
+ void _resource_created();
void _make_dir_confirm();
void _make_scene_confirm();
void _rename_operation_confirm();
void _duplicate_operation_confirm();
void _move_with_overwrite();
bool _check_existing();
- void _move_operation_confirm(const String &p_to_path, bool overwrite = false);
+ void _move_operation_confirm(const String &p_to_path, bool p_overwrite = false);
void _tree_rmb_option(int p_option);
void _file_list_rmb_option(int p_option);
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 095e1b804a..5a7d4cede7 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -47,7 +47,7 @@
const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found";
const char *FindInFiles::SIGNAL_FINISHED = "finished";
-// TODO Would be nice in Vector and PoolVectors
+// TODO Would be nice in Vector and Vectors
template <typename T>
inline void pop_back(T &container) {
container.resize(container.size() - 1);
@@ -132,8 +132,8 @@ void FindInFiles::start() {
// Init search
_current_dir = "";
- PoolStringArray init_folder;
- init_folder.append(_root_dir);
+ PackedStringArray init_folder;
+ init_folder.push_back(_root_dir);
_folders_stack.clear();
_folders_stack.push_back(init_folder);
@@ -168,7 +168,7 @@ void FindInFiles::_iterate() {
// Scan folders first so we can build a list of files and have progress info later
- PoolStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1];
+ PackedStringArray &folders_to_scan = _folders_stack.write[_folders_stack.size() - 1];
if (folders_to_scan.size() != 0) {
// Scan one folder below
@@ -178,7 +178,7 @@ void FindInFiles::_iterate() {
_current_dir = _current_dir.plus_file(folder_name);
- PoolStringArray sub_dirs;
+ PackedStringArray sub_dirs;
_scan_dir("res://" + _current_dir, sub_dirs);
_folders_stack.push_back(sub_dirs);
@@ -219,7 +219,7 @@ float FindInFiles::get_progress() const {
return 0;
}
-void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
+void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) {
DirAccessRef dir = DirAccess::open(path);
if (!dir) {
@@ -242,7 +242,7 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
continue;
if (dir->current_is_dir())
- out_folders.append(file);
+ out_folders.push_back(file);
else {
String file_ext = file.get_extension();
@@ -319,8 +319,8 @@ FindInFilesDialog::FindInFilesDialog() {
_search_text_line_edit = memnew(LineEdit);
_search_text_line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
- _search_text_line_edit->connect("text_changed", this, "_on_search_text_modified");
- _search_text_line_edit->connect("text_entered", this, "_on_search_text_entered");
+ _search_text_line_edit->connect("text_changed", callable_mp(this, &FindInFilesDialog::_on_search_text_modified));
+ _search_text_line_edit->connect("text_entered", callable_mp(this, &FindInFilesDialog::_on_search_text_entered));
gc->add_child(_search_text_line_edit);
_replace_label = memnew(Label);
@@ -330,7 +330,7 @@ FindInFilesDialog::FindInFilesDialog() {
_replace_text_line_edit = memnew(LineEdit);
_replace_text_line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
- _replace_text_line_edit->connect("text_entered", this, "_on_replace_text_entered");
+ _replace_text_line_edit->connect("text_entered", callable_mp(this, &FindInFilesDialog::_on_replace_text_entered));
_replace_text_line_edit->hide();
gc->add_child(_replace_text_line_edit);
@@ -367,12 +367,12 @@ FindInFilesDialog::FindInFilesDialog() {
Button *folder_button = memnew(Button);
folder_button->set_text("...");
- folder_button->connect("pressed", this, "_on_folder_button_pressed");
+ folder_button->connect("pressed", callable_mp(this, &FindInFilesDialog::_on_folder_button_pressed));
hbc->add_child(folder_button);
_folder_dialog = memnew(FileDialog);
_folder_dialog->set_mode(FileDialog::MODE_OPEN_DIR);
- _folder_dialog->connect("dir_selected", this, "_on_folder_selected");
+ _folder_dialog->connect("dir_selected", callable_mp(this, &FindInFilesDialog::_on_folder_selected));
add_child(_folder_dialog);
gc->add_child(hbc);
@@ -546,12 +546,6 @@ void FindInFilesDialog::_on_folder_selected(String path) {
void FindInFilesDialog::_bind_methods() {
- ClassDB::bind_method("_on_folder_button_pressed", &FindInFilesDialog::_on_folder_button_pressed);
- ClassDB::bind_method("_on_folder_selected", &FindInFilesDialog::_on_folder_selected);
- ClassDB::bind_method("_on_search_text_modified", &FindInFilesDialog::_on_search_text_modified);
- ClassDB::bind_method("_on_search_text_entered", &FindInFilesDialog::_on_search_text_entered);
- ClassDB::bind_method("_on_replace_text_entered", &FindInFilesDialog::_on_replace_text_entered);
-
ADD_SIGNAL(MethodInfo(SIGNAL_FIND_REQUESTED));
ADD_SIGNAL(MethodInfo(SIGNAL_REPLACE_REQUESTED));
}
@@ -563,8 +557,8 @@ const char *FindInFilesPanel::SIGNAL_FILES_MODIFIED = "files_modified";
FindInFilesPanel::FindInFilesPanel() {
_finder = memnew(FindInFiles);
- _finder->connect(FindInFiles::SIGNAL_RESULT_FOUND, this, "_on_result_found");
- _finder->connect(FindInFiles::SIGNAL_FINISHED, this, "_on_finished");
+ _finder->connect(FindInFiles::SIGNAL_RESULT_FOUND, callable_mp(this, &FindInFilesPanel::_on_result_found));
+ _finder->connect(FindInFiles::SIGNAL_FINISHED, callable_mp(this, &FindInFilesPanel::_on_finished));
add_child(_finder);
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -594,9 +588,15 @@ FindInFilesPanel::FindInFilesPanel() {
_status_label = memnew(Label);
hbc->add_child(_status_label);
+ _refresh_button = memnew(Button);
+ _refresh_button->set_text(TTR("Refresh"));
+ _refresh_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_refresh_button_clicked));
+ _refresh_button->hide();
+ hbc->add_child(_refresh_button);
+
_cancel_button = memnew(Button);
_cancel_button->set_text(TTR("Cancel"));
- _cancel_button->connect("pressed", this, "_on_cancel_button_clicked");
+ _cancel_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_cancel_button_clicked));
_cancel_button->hide();
hbc->add_child(_cancel_button);
@@ -606,8 +606,8 @@ FindInFilesPanel::FindInFilesPanel() {
_results_display = memnew(Tree);
_results_display->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("source", "EditorFonts"));
_results_display->set_v_size_flags(SIZE_EXPAND_FILL);
- _results_display->connect("item_selected", this, "_on_result_selected");
- _results_display->connect("item_edited", this, "_on_item_edited");
+ _results_display->connect("item_selected", callable_mp(this, &FindInFilesPanel::_on_result_selected));
+ _results_display->connect("item_edited", callable_mp(this, &FindInFilesPanel::_on_item_edited));
_results_display->set_hide_root(true);
_results_display->set_select_mode(Tree::SELECT_ROW);
_results_display->set_allow_rmb_select(true);
@@ -625,12 +625,12 @@ FindInFilesPanel::FindInFilesPanel() {
_replace_line_edit = memnew(LineEdit);
_replace_line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
- _replace_line_edit->connect("text_changed", this, "_on_replace_text_changed");
+ _replace_line_edit->connect("text_changed", callable_mp(this, &FindInFilesPanel::_on_replace_text_changed));
_replace_container->add_child(_replace_line_edit);
_replace_all_button = memnew(Button);
_replace_all_button->set_text(TTR("Replace all (no undo)"));
- _replace_all_button->connect("pressed", this, "_on_replace_all_clicked");
+ _replace_all_button->connect("pressed", callable_mp(this, &FindInFilesPanel::_on_replace_all_clicked));
_replace_container->add_child(_replace_all_button);
_replace_container->hide();
@@ -681,6 +681,7 @@ void FindInFilesPanel::start_search() {
_finder->start();
update_replace_buttons();
+ _refresh_button->hide();
_cancel_button->show();
}
@@ -691,6 +692,7 @@ void FindInFilesPanel::stop_search() {
_status_label->set_text("");
update_replace_buttons();
set_progress_visible(false);
+ _refresh_button->show();
_cancel_button->hide();
}
@@ -793,9 +795,14 @@ void FindInFilesPanel::_on_finished() {
_status_label->set_text(TTR("Search complete"));
update_replace_buttons();
set_progress_visible(false);
+ _refresh_button->show();
_cancel_button->hide();
}
+void FindInFilesPanel::_on_refresh_button_clicked() {
+ start_search();
+}
+
void FindInFilesPanel::_on_cancel_button_clicked() {
stop_search();
}
@@ -823,7 +830,7 @@ void FindInFilesPanel::_on_replace_all_clicked() {
String replace_text = get_replace_text();
- PoolStringArray modified_files;
+ PackedStringArray modified_files;
for (Map<String, TreeItem *>::Element *E = _file_items.front(); E; E = E->next()) {
@@ -844,7 +851,7 @@ void FindInFilesPanel::_on_replace_all_clicked() {
if (locations.size() != 0) {
// Results are sorted by file, so we can batch replaces
apply_replaces_in_file(fpath, locations, replace_text);
- modified_files.append(fpath);
+ modified_files.push_back(fpath);
}
}
@@ -968,12 +975,7 @@ void FindInFilesPanel::set_progress_visible(bool visible) {
void FindInFilesPanel::_bind_methods() {
ClassDB::bind_method("_on_result_found", &FindInFilesPanel::_on_result_found);
- ClassDB::bind_method("_on_item_edited", &FindInFilesPanel::_on_item_edited);
ClassDB::bind_method("_on_finished", &FindInFilesPanel::_on_finished);
- ClassDB::bind_method("_on_cancel_button_clicked", &FindInFilesPanel::_on_cancel_button_clicked);
- ClassDB::bind_method("_on_result_selected", &FindInFilesPanel::_on_result_selected);
- ClassDB::bind_method("_on_replace_text_changed", &FindInFilesPanel::_on_replace_text_changed);
- ClassDB::bind_method("_on_replace_all_clicked", &FindInFilesPanel::_on_replace_all_clicked);
ClassDB::bind_method("_draw_result_text", &FindInFilesPanel::draw_result_text);
ADD_SIGNAL(MethodInfo(SIGNAL_RESULT_SELECTED,
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index 243f59096a..7002f750b7 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -69,7 +69,7 @@ protected:
private:
void _process();
void _iterate();
- void _scan_dir(String path, PoolStringArray &out_folders);
+ void _scan_dir(String path, PackedStringArray &out_folders);
void _scan_file(String fpath);
// Config
@@ -82,7 +82,7 @@ private:
// State
bool _searching;
String _current_dir;
- Vector<PoolStringArray> _folders_stack;
+ Vector<PackedStringArray> _folders_stack;
Vector<String> _files_to_scan;
int _initial_files_count;
};
@@ -179,6 +179,7 @@ protected:
private:
void _on_result_found(String fpath, int line_number, int begin, int end, String text);
void _on_finished();
+ void _on_refresh_button_clicked();
void _on_cancel_button_clicked();
void _on_result_selected();
void _on_item_edited();
@@ -206,6 +207,7 @@ private:
Label *_search_text_label;
Tree *_results_display;
Label *_status_label;
+ Button *_refresh_button;
Button *_cancel_button;
ProgressBar *_progress_bar;
Map<String, TreeItem *> _file_items;
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index cd185ae12e..b4c9a01f2a 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "groups_editor.h"
+
#include "editor/scene_tree_editor.h"
#include "editor_node.h"
#include "editor_scale.h"
@@ -388,19 +389,10 @@ void GroupDialog::edit() {
}
void GroupDialog::_bind_methods() {
- ClassDB::bind_method("_add_pressed", &GroupDialog::_add_pressed);
- ClassDB::bind_method("_removed_pressed", &GroupDialog::_removed_pressed);
- ClassDB::bind_method("_delete_group_pressed", &GroupDialog::_delete_group_pressed);
ClassDB::bind_method("_delete_group_item", &GroupDialog::_delete_group_item);
- ClassDB::bind_method("_group_selected", &GroupDialog::_group_selected);
- ClassDB::bind_method("_add_group_pressed", &GroupDialog::_add_group_pressed);
ClassDB::bind_method("_add_group", &GroupDialog::_add_group);
- ClassDB::bind_method("_add_filter_changed", &GroupDialog::_add_filter_changed);
- ClassDB::bind_method("_remove_filter_changed", &GroupDialog::_remove_filter_changed);
-
- ClassDB::bind_method("_group_renamed", &GroupDialog::_group_renamed);
ClassDB::bind_method("_rename_group_item", &GroupDialog::_rename_group_item);
ADD_SIGNAL(MethodInfo("group_edited"));
@@ -435,9 +427,9 @@ GroupDialog::GroupDialog() {
groups->set_allow_rmb_select(true);
groups->set_v_size_flags(SIZE_EXPAND_FILL);
groups->add_constant_override("draw_guides", 1);
- groups->connect("item_selected", this, "_group_selected");
- groups->connect("button_pressed", this, "_delete_group_pressed");
- groups->connect("item_edited", this, "_group_renamed");
+ groups->connect("item_selected", callable_mp(this, &GroupDialog::_group_selected));
+ groups->connect("button_pressed", callable_mp(this, &GroupDialog::_delete_group_pressed));
+ groups->connect("item_edited", callable_mp(this, &GroupDialog::_group_renamed));
HBoxContainer *chbc = memnew(HBoxContainer);
vbc_left->add_child(chbc);
@@ -446,12 +438,12 @@ GroupDialog::GroupDialog() {
add_group_text = memnew(LineEdit);
chbc->add_child(add_group_text);
add_group_text->set_h_size_flags(SIZE_EXPAND_FILL);
- add_group_text->connect("text_entered", this, "_add_group_pressed");
+ add_group_text->connect("text_entered", callable_mp(this, &GroupDialog::_add_group_pressed));
Button *add_group_button = memnew(Button);
add_group_button->set_text(TTR("Add"));
chbc->add_child(add_group_button);
- add_group_button->connect("pressed", this, "_add_group_pressed", varray(String()));
+ add_group_button->connect("pressed", callable_mp(this, &GroupDialog::_add_group_pressed), varray(String()));
VBoxContainer *vbc_add = memnew(VBoxContainer);
hbc->add_child(vbc_add);
@@ -468,7 +460,6 @@ GroupDialog::GroupDialog() {
nodes_to_add->set_select_mode(Tree::SELECT_MULTI);
nodes_to_add->set_v_size_flags(SIZE_EXPAND_FILL);
nodes_to_add->add_constant_override("draw_guides", 1);
- nodes_to_add->connect("item_selected", this, "_nodes_to_add_selected");
HBoxContainer *add_filter_hbc = memnew(HBoxContainer);
add_filter_hbc->add_constant_override("separate", 0);
@@ -478,7 +469,7 @@ GroupDialog::GroupDialog() {
add_filter->set_h_size_flags(SIZE_EXPAND_FILL);
add_filter->set_placeholder(TTR("Filter nodes"));
add_filter_hbc->add_child(add_filter);
- add_filter->connect("text_changed", this, "_add_filter_changed");
+ add_filter->connect("text_changed", callable_mp(this, &GroupDialog::_add_filter_changed));
VBoxContainer *vbc_buttons = memnew(VBoxContainer);
hbc->add_child(vbc_buttons);
@@ -487,7 +478,7 @@ GroupDialog::GroupDialog() {
add_button = memnew(ToolButton);
add_button->set_text(TTR("Add"));
- add_button->connect("pressed", this, "_add_pressed");
+ add_button->connect("pressed", callable_mp(this, &GroupDialog::_add_pressed));
vbc_buttons->add_child(add_button);
vbc_buttons->add_spacer();
@@ -496,7 +487,7 @@ GroupDialog::GroupDialog() {
remove_button = memnew(ToolButton);
remove_button->set_text(TTR("Remove"));
- remove_button->connect("pressed", this, "_removed_pressed");
+ remove_button->connect("pressed", callable_mp(this, &GroupDialog::_removed_pressed));
vbc_buttons->add_child(remove_button);
@@ -515,7 +506,6 @@ GroupDialog::GroupDialog() {
nodes_to_remove->set_hide_folding(true);
nodes_to_remove->set_select_mode(Tree::SELECT_MULTI);
nodes_to_remove->add_constant_override("draw_guides", 1);
- nodes_to_remove->connect("item_selected", this, "_node_to_remove_selected");
HBoxContainer *remove_filter_hbc = memnew(HBoxContainer);
remove_filter_hbc->add_constant_override("separate", 0);
@@ -525,7 +515,7 @@ GroupDialog::GroupDialog() {
remove_filter->set_h_size_flags(SIZE_EXPAND_FILL);
remove_filter->set_placeholder(TTR("Filter nodes"));
remove_filter_hbc->add_child(remove_filter);
- remove_filter->connect("text_changed", this, "_remove_filter_changed");
+ remove_filter->connect("text_changed", callable_mp(this, &GroupDialog::_remove_filter_changed));
group_empty = memnew(Label());
group_empty->set_text(TTR("Empty groups will be automatically removed."));
@@ -669,12 +659,7 @@ void GroupsEditor::_show_group_dialog() {
}
void GroupsEditor::_bind_methods() {
-
- ClassDB::bind_method("_add_group", &GroupsEditor::_add_group);
- ClassDB::bind_method("_remove_group", &GroupsEditor::_remove_group);
ClassDB::bind_method("update_tree", &GroupsEditor::update_tree);
-
- ClassDB::bind_method("_show_group_dialog", &GroupsEditor::_show_group_dialog);
}
GroupsEditor::GroupsEditor() {
@@ -686,12 +671,12 @@ GroupsEditor::GroupsEditor() {
group_dialog = memnew(GroupDialog);
group_dialog->set_as_toplevel(true);
add_child(group_dialog);
- group_dialog->connect("group_edited", this, "update_tree");
+ group_dialog->connect("group_edited", callable_mp(this, &GroupsEditor::update_tree));
Button *group_dialog_button = memnew(Button);
group_dialog_button->set_text(TTR("Manage Groups"));
vbc->add_child(group_dialog_button);
- group_dialog_button->connect("pressed", this, "_show_group_dialog");
+ group_dialog_button->connect("pressed", callable_mp(this, &GroupsEditor::_show_group_dialog));
HBoxContainer *hbc = memnew(HBoxContainer);
vbc->add_child(hbc);
@@ -699,18 +684,18 @@ GroupsEditor::GroupsEditor() {
group_name = memnew(LineEdit);
group_name->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(group_name);
- group_name->connect("text_entered", this, "_add_group");
+ group_name->connect("text_entered", callable_mp(this, &GroupsEditor::_add_group));
add = memnew(Button);
add->set_text(TTR("Add"));
hbc->add_child(add);
- add->connect("pressed", this, "_add_group", varray(String()));
+ add->connect("pressed", callable_mp(this, &GroupsEditor::_add_group), varray(String()));
tree = memnew(Tree);
tree->set_hide_root(true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
vbc->add_child(tree);
- tree->connect("button_pressed", this, "_remove_group");
+ tree->connect("button_pressed", callable_mp(this, &GroupsEditor::_remove_group));
tree->add_constant_override("draw_guides", 1);
add_constant_override("separation", 3 * EDSCALE);
}
diff --git a/editor/icons/icon_2_d.svg b/editor/icons/2D.svg
index e1a96aeab6..e1a96aeab6 100644
--- a/editor/icons/icon_2_d.svg
+++ b/editor/icons/2D.svg
diff --git a/editor/icons/icon_3_d.svg b/editor/icons/3D.svg
index 2a1d5ff36d..2a1d5ff36d 100644
--- a/editor/icons/icon_3_d.svg
+++ b/editor/icons/3D.svg
diff --git a/editor/icons/icon_a_a_b_b.svg b/editor/icons/AABB.svg
index d6fbc52541..d6fbc52541 100644
--- a/editor/icons/icon_a_a_b_b.svg
+++ b/editor/icons/AABB.svg
diff --git a/editor/icons/icon_a_r_v_r_anchor.svg b/editor/icons/ARVRAnchor.svg
index f1571b3fcc..f1571b3fcc 100644
--- a/editor/icons/icon_a_r_v_r_anchor.svg
+++ b/editor/icons/ARVRAnchor.svg
diff --git a/editor/icons/icon_a_r_v_r_camera.svg b/editor/icons/ARVRCamera.svg
index f59a8c8b4a..f59a8c8b4a 100644
--- a/editor/icons/icon_a_r_v_r_camera.svg
+++ b/editor/icons/ARVRCamera.svg
diff --git a/editor/icons/icon_a_r_v_r_controller.svg b/editor/icons/ARVRController.svg
index 40e5b8dce1..40e5b8dce1 100644
--- a/editor/icons/icon_a_r_v_r_controller.svg
+++ b/editor/icons/ARVRController.svg
diff --git a/editor/icons/icon_a_r_v_r_origin.svg b/editor/icons/ARVROrigin.svg
index dbb93ba7a5..dbb93ba7a5 100644
--- a/editor/icons/icon_a_r_v_r_origin.svg
+++ b/editor/icons/ARVROrigin.svg
diff --git a/editor/icons/icon_accept_dialog.svg b/editor/icons/AcceptDialog.svg
index e0bf7b8336..e0bf7b8336 100644
--- a/editor/icons/icon_accept_dialog.svg
+++ b/editor/icons/AcceptDialog.svg
diff --git a/editor/icons/icon_action_copy.svg b/editor/icons/ActionCopy.svg
index d7a1e1097a..d7a1e1097a 100644
--- a/editor/icons/icon_action_copy.svg
+++ b/editor/icons/ActionCopy.svg
diff --git a/editor/icons/icon_action_cut.svg b/editor/icons/ActionCut.svg
index 97df9b2d5a..97df9b2d5a 100644
--- a/editor/icons/icon_action_cut.svg
+++ b/editor/icons/ActionCut.svg
diff --git a/editor/icons/icon_action_paste.svg b/editor/icons/ActionPaste.svg
index 6d46f899f8..6d46f899f8 100644
--- a/editor/icons/icon_action_paste.svg
+++ b/editor/icons/ActionPaste.svg
diff --git a/editor/icons/icon_add.svg b/editor/icons/Add.svg
index a241829603..a241829603 100644
--- a/editor/icons/icon_add.svg
+++ b/editor/icons/Add.svg
diff --git a/editor/icons/icon_add_atlas_tile.svg b/editor/icons/AddAtlasTile.svg
index 97d3590678..97d3590678 100644
--- a/editor/icons/icon_add_atlas_tile.svg
+++ b/editor/icons/AddAtlasTile.svg
diff --git a/editor/icons/icon_add_autotile.svg b/editor/icons/AddAutotile.svg
index c6f1df422d..c6f1df422d 100644
--- a/editor/icons/icon_add_autotile.svg
+++ b/editor/icons/AddAutotile.svg
diff --git a/editor/icons/icon_add_single_tile.svg b/editor/icons/AddSingleTile.svg
index 319fef8078..319fef8078 100644
--- a/editor/icons/icon_add_single_tile.svg
+++ b/editor/icons/AddSingleTile.svg
diff --git a/editor/icons/icon_add_split.svg b/editor/icons/AddSplit.svg
index 1f33e8c72b..1f33e8c72b 100644
--- a/editor/icons/icon_add_split.svg
+++ b/editor/icons/AddSplit.svg
diff --git a/editor/icons/icon_anchor.svg b/editor/icons/Anchor.svg
index 119960d177..119960d177 100644
--- a/editor/icons/icon_anchor.svg
+++ b/editor/icons/Anchor.svg
diff --git a/editor/icons/icon_animated_sprite.svg b/editor/icons/AnimatedSprite.svg
index 411ddda015..411ddda015 100644
--- a/editor/icons/icon_animated_sprite.svg
+++ b/editor/icons/AnimatedSprite.svg
diff --git a/editor/icons/icon_animated_sprite_3d.svg b/editor/icons/AnimatedSprite3D.svg
index 974c4e04eb..974c4e04eb 100644
--- a/editor/icons/icon_animated_sprite_3d.svg
+++ b/editor/icons/AnimatedSprite3D.svg
diff --git a/editor/icons/icon_animated_texture.svg b/editor/icons/AnimatedTexture.svg
index 3719b64747..3719b64747 100644
--- a/editor/icons/icon_animated_texture.svg
+++ b/editor/icons/AnimatedTexture.svg
diff --git a/editor/icons/icon_animation.svg b/editor/icons/Animation.svg
index 2cb738a8a6..2cb738a8a6 100644
--- a/editor/icons/icon_animation.svg
+++ b/editor/icons/Animation.svg
diff --git a/editor/icons/icon_animation_filter.svg b/editor/icons/AnimationFilter.svg
index 45c323543d..45c323543d 100644
--- a/editor/icons/icon_animation_filter.svg
+++ b/editor/icons/AnimationFilter.svg
diff --git a/editor/icons/icon_animation_player.svg b/editor/icons/AnimationPlayer.svg
index a5f7804e0d..a5f7804e0d 100644
--- a/editor/icons/icon_animation_player.svg
+++ b/editor/icons/AnimationPlayer.svg
diff --git a/editor/icons/icon_animation_track_group.svg b/editor/icons/AnimationTrackGroup.svg
index d0d14b7c44..d0d14b7c44 100644
--- a/editor/icons/icon_animation_track_group.svg
+++ b/editor/icons/AnimationTrackGroup.svg
diff --git a/editor/icons/icon_animation_track_list.svg b/editor/icons/AnimationTrackList.svg
index e47c8b18cb..e47c8b18cb 100644
--- a/editor/icons/icon_animation_track_list.svg
+++ b/editor/icons/AnimationTrackList.svg
diff --git a/editor/icons/icon_animation_tree.svg b/editor/icons/AnimationTree.svg
index 718eaac2d2..718eaac2d2 100644
--- a/editor/icons/icon_animation_tree.svg
+++ b/editor/icons/AnimationTree.svg
diff --git a/editor/icons/icon_area.svg b/editor/icons/Area.svg
index 21ebe3c251..21ebe3c251 100644
--- a/editor/icons/icon_area.svg
+++ b/editor/icons/Area.svg
diff --git a/editor/icons/icon_area_2d.svg b/editor/icons/Area2D.svg
index e374205b13..e374205b13 100644
--- a/editor/icons/icon_area_2d.svg
+++ b/editor/icons/Area2D.svg
diff --git a/editor/icons/icon_array.svg b/editor/icons/Array.svg
index d499fcac3a..d499fcac3a 100644
--- a/editor/icons/icon_array.svg
+++ b/editor/icons/Array.svg
diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/ArrayMesh.svg
index 394a18623d..394a18623d 100644
--- a/editor/icons/icon_array_mesh.svg
+++ b/editor/icons/ArrayMesh.svg
diff --git a/editor/icons/icon_arrow_down.svg b/editor/icons/ArrowDown.svg
index 49a93e6e28..49a93e6e28 100644
--- a/editor/icons/icon_arrow_down.svg
+++ b/editor/icons/ArrowDown.svg
diff --git a/editor/icons/icon_arrow_left.svg b/editor/icons/ArrowLeft.svg
index fbbe5d9075..fbbe5d9075 100644
--- a/editor/icons/icon_arrow_left.svg
+++ b/editor/icons/ArrowLeft.svg
diff --git a/editor/icons/icon_arrow_right.svg b/editor/icons/ArrowRight.svg
index 7895158bb1..7895158bb1 100644
--- a/editor/icons/icon_arrow_right.svg
+++ b/editor/icons/ArrowRight.svg
diff --git a/editor/icons/icon_arrow_up.svg b/editor/icons/ArrowUp.svg
index 9bf19a6a12..9bf19a6a12 100644
--- a/editor/icons/icon_arrow_up.svg
+++ b/editor/icons/ArrowUp.svg
diff --git a/editor/icons/icon_asset_lib.svg b/editor/icons/AssetLib.svg
index 72b20ec047..72b20ec047 100644
--- a/editor/icons/icon_asset_lib.svg
+++ b/editor/icons/AssetLib.svg
diff --git a/editor/icons/icon_atlas_texture.svg b/editor/icons/AtlasTexture.svg
index 28a44e179a..28a44e179a 100644
--- a/editor/icons/icon_atlas_texture.svg
+++ b/editor/icons/AtlasTexture.svg
diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/AudioBusBypass.svg
index c251a7c83f..c251a7c83f 100644
--- a/editor/icons/icon_audio_bus_bypass.svg
+++ b/editor/icons/AudioBusBypass.svg
diff --git a/editor/icons/icon_audio_bus_layout.svg b/editor/icons/AudioBusLayout.svg
index f95794a7c7..f95794a7c7 100644
--- a/editor/icons/icon_audio_bus_layout.svg
+++ b/editor/icons/AudioBusLayout.svg
diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/AudioBusMute.svg
index 4750b0fec0..4750b0fec0 100644
--- a/editor/icons/icon_audio_bus_mute.svg
+++ b/editor/icons/AudioBusMute.svg
diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/AudioBusSolo.svg
index 5be72a8961..5be72a8961 100644
--- a/editor/icons/icon_audio_bus_solo.svg
+++ b/editor/icons/AudioBusSolo.svg
diff --git a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg b/editor/icons/AudioStreamOGGVorbis.svg
index a8d6fb6bf1..a8d6fb6bf1 100644
--- a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg
+++ b/editor/icons/AudioStreamOGGVorbis.svg
diff --git a/editor/icons/icon_audio_stream_player.svg b/editor/icons/AudioStreamPlayer.svg
index bbe2793407..bbe2793407 100644
--- a/editor/icons/icon_audio_stream_player.svg
+++ b/editor/icons/AudioStreamPlayer.svg
diff --git a/editor/icons/icon_audio_stream_player_2_d.svg b/editor/icons/AudioStreamPlayer2D.svg
index 090b23ff7c..090b23ff7c 100644
--- a/editor/icons/icon_audio_stream_player_2_d.svg
+++ b/editor/icons/AudioStreamPlayer2D.svg
diff --git a/editor/icons/icon_audio_stream_player_3_d.svg b/editor/icons/AudioStreamPlayer3D.svg
index 95da9818aa..95da9818aa 100644
--- a/editor/icons/icon_audio_stream_player_3_d.svg
+++ b/editor/icons/AudioStreamPlayer3D.svg
diff --git a/editor/icons/icon_audio_stream_sample.svg b/editor/icons/AudioStreamSample.svg
index a8d6fb6bf1..a8d6fb6bf1 100644
--- a/editor/icons/icon_audio_stream_sample.svg
+++ b/editor/icons/AudioStreamSample.svg
diff --git a/editor/icons/icon_auto_end.svg b/editor/icons/AutoEnd.svg
index 35f5fb2b1c..35f5fb2b1c 100644
--- a/editor/icons/icon_auto_end.svg
+++ b/editor/icons/AutoEnd.svg
diff --git a/editor/icons/icon_auto_key.svg b/editor/icons/AutoKey.svg
index 3d5569397f..3d5569397f 100644
--- a/editor/icons/icon_auto_key.svg
+++ b/editor/icons/AutoKey.svg
diff --git a/editor/icons/icon_auto_play.svg b/editor/icons/AutoPlay.svg
index dbe41f244f..dbe41f244f 100644
--- a/editor/icons/icon_auto_play.svg
+++ b/editor/icons/AutoPlay.svg
diff --git a/editor/icons/icon_auto_triangle.svg b/editor/icons/AutoTriangle.svg
index 13b8f7c5d2..13b8f7c5d2 100644
--- a/editor/icons/icon_auto_triangle.svg
+++ b/editor/icons/AutoTriangle.svg
diff --git a/editor/icons/icon_back.svg b/editor/icons/Back.svg
index c8ea97fa5c..c8ea97fa5c 100644
--- a/editor/icons/icon_back.svg
+++ b/editor/icons/Back.svg
diff --git a/editor/icons/icon_back_buffer_copy.svg b/editor/icons/BackBufferCopy.svg
index c16cfe9009..c16cfe9009 100644
--- a/editor/icons/icon_back_buffer_copy.svg
+++ b/editor/icons/BackBufferCopy.svg
diff --git a/editor/icons/icon_bake.svg b/editor/icons/Bake.svg
index 9bcfb174dc..9bcfb174dc 100644
--- a/editor/icons/icon_bake.svg
+++ b/editor/icons/Bake.svg
diff --git a/editor/icons/icon_baked_lightmap.svg b/editor/icons/BakedLightmap.svg
index 338a100022..338a100022 100644
--- a/editor/icons/icon_baked_lightmap.svg
+++ b/editor/icons/BakedLightmap.svg
diff --git a/editor/icons/icon_baked_lightmap_data.svg b/editor/icons/BakedLightmapData.svg
index e8d471c2af..e8d471c2af 100644
--- a/editor/icons/icon_baked_lightmap_data.svg
+++ b/editor/icons/BakedLightmapData.svg
diff --git a/editor/icons/icon_basis.svg b/editor/icons/Basis.svg
index ecdb0f4ec0..ecdb0f4ec0 100644
--- a/editor/icons/icon_basis.svg
+++ b/editor/icons/Basis.svg
diff --git a/editor/icons/icon_bezier_handles_balanced.svg b/editor/icons/BezierHandlesBalanced.svg
index 6656d3f5eb..6656d3f5eb 100644
--- a/editor/icons/icon_bezier_handles_balanced.svg
+++ b/editor/icons/BezierHandlesBalanced.svg
diff --git a/editor/icons/icon_bezier_handles_free.svg b/editor/icons/BezierHandlesFree.svg
index 06abfe34ab..06abfe34ab 100644
--- a/editor/icons/icon_bezier_handles_free.svg
+++ b/editor/icons/BezierHandlesFree.svg
diff --git a/editor/icons/icon_bezier_handles_mirror.svg b/editor/icons/BezierHandlesMirror.svg
index be85f170c7..be85f170c7 100644
--- a/editor/icons/icon_bezier_handles_mirror.svg
+++ b/editor/icons/BezierHandlesMirror.svg
diff --git a/editor/icons/icon_bit_map.svg b/editor/icons/BitMap.svg
index b61c1b7dc5..b61c1b7dc5 100644
--- a/editor/icons/icon_bit_map.svg
+++ b/editor/icons/BitMap.svg
diff --git a/editor/icons/icon_bitmap_font.svg b/editor/icons/BitmapFont.svg
index 5e5bd859c9..5e5bd859c9 100644
--- a/editor/icons/icon_bitmap_font.svg
+++ b/editor/icons/BitmapFont.svg
diff --git a/editor/icons/icon_blend.svg b/editor/icons/Blend.svg
index c78b9287fa..c78b9287fa 100644
--- a/editor/icons/icon_blend.svg
+++ b/editor/icons/Blend.svg
diff --git a/editor/icons/icon_bone.svg b/editor/icons/Bone.svg
index fafebb0394..fafebb0394 100644
--- a/editor/icons/icon_bone.svg
+++ b/editor/icons/Bone.svg
diff --git a/editor/icons/icon_bone_2_d.svg b/editor/icons/Bone2D.svg
index 94bfff61e4..94bfff61e4 100644
--- a/editor/icons/icon_bone_2_d.svg
+++ b/editor/icons/Bone2D.svg
diff --git a/editor/icons/icon_bone_attachment.svg b/editor/icons/BoneAttachment.svg
index 0b7dede0b6..0b7dede0b6 100644
--- a/editor/icons/icon_bone_attachment.svg
+++ b/editor/icons/BoneAttachment.svg
diff --git a/editor/icons/icon_bone_track.svg b/editor/icons/BoneTrack.svg
index 0f6f9bb6cd..0f6f9bb6cd 100644
--- a/editor/icons/icon_bone_track.svg
+++ b/editor/icons/BoneTrack.svg
diff --git a/editor/icons/icon_box_shape.svg b/editor/icons/BoxShape.svg
index 171e95f4fa..171e95f4fa 100644
--- a/editor/icons/icon_box_shape.svg
+++ b/editor/icons/BoxShape.svg
diff --git a/editor/icons/icon_bucket.svg b/editor/icons/Bucket.svg
index fc3481290d..fc3481290d 100644
--- a/editor/icons/icon_bucket.svg
+++ b/editor/icons/Bucket.svg
diff --git a/editor/icons/icon_bus_vu_empty.svg b/editor/icons/BusVuEmpty.svg
index 5260b9e252..5260b9e252 100644
--- a/editor/icons/icon_bus_vu_empty.svg
+++ b/editor/icons/BusVuEmpty.svg
diff --git a/editor/icons/icon_bus_vu_frozen.svg b/editor/icons/BusVuFrozen.svg
index c10bb5a1a2..c10bb5a1a2 100644
--- a/editor/icons/icon_bus_vu_frozen.svg
+++ b/editor/icons/BusVuFrozen.svg
diff --git a/editor/icons/icon_bus_vu_full.svg b/editor/icons/BusVuFull.svg
index 377ac60bc1..377ac60bc1 100644
--- a/editor/icons/icon_bus_vu_full.svg
+++ b/editor/icons/BusVuFull.svg
diff --git a/editor/icons/icon_button.svg b/editor/icons/Button.svg
index 6ea5663dda..6ea5663dda 100644
--- a/editor/icons/icon_button.svg
+++ b/editor/icons/Button.svg
diff --git a/editor/icons/icon_button_group.svg b/editor/icons/ButtonGroup.svg
index 683a8c3054..683a8c3054 100644
--- a/editor/icons/icon_button_group.svg
+++ b/editor/icons/ButtonGroup.svg
diff --git a/editor/icons/icon_c_p_u_particles.svg b/editor/icons/CPUParticles.svg
index af4115c93f..af4115c93f 100644
--- a/editor/icons/icon_c_p_u_particles.svg
+++ b/editor/icons/CPUParticles.svg
diff --git a/editor/icons/icon_c_p_u_particles_2_d.svg b/editor/icons/CPUParticles2D.svg
index 25afc35bec..25afc35bec 100644
--- a/editor/icons/icon_c_p_u_particles_2_d.svg
+++ b/editor/icons/CPUParticles2D.svg
diff --git a/editor/icons/Callable.svg b/editor/icons/Callable.svg
new file mode 100644
index 0000000000..8f421f4fed
--- /dev/null
+++ b/editor/icons/Callable.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -292.77)">
+<path transform="matrix(.26458 0 0 .26458 0 292.77)" d="m12 1c-2 2-4 4-7 4h-4v5h4c3 3.8e-5 5 2 7 4v-13zm1 4v5c2.5896-0.015798 2.5896-4.9849 0-5zm-11 6v4h2l1-4h-3z" fill="#e0e0e0"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_camera.svg b/editor/icons/Camera.svg
index af1cb8a2e9..af1cb8a2e9 100644
--- a/editor/icons/icon_camera.svg
+++ b/editor/icons/Camera.svg
diff --git a/editor/icons/icon_camera_2d.svg b/editor/icons/Camera2D.svg
index 9a91b3017b..9a91b3017b 100644
--- a/editor/icons/icon_camera_2d.svg
+++ b/editor/icons/Camera2D.svg
diff --git a/editor/icons/icon_camera_texture.svg b/editor/icons/CameraTexture.svg
index e61b5902f0..e61b5902f0 100644
--- a/editor/icons/icon_camera_texture.svg
+++ b/editor/icons/CameraTexture.svg
diff --git a/editor/icons/icon_canvas_item.svg b/editor/icons/CanvasItem.svg
index eefe501ca8..eefe501ca8 100644
--- a/editor/icons/icon_canvas_item.svg
+++ b/editor/icons/CanvasItem.svg
diff --git a/editor/icons/icon_canvas_item_material.svg b/editor/icons/CanvasItemMaterial.svg
index 7df06ed686..7df06ed686 100644
--- a/editor/icons/icon_canvas_item_material.svg
+++ b/editor/icons/CanvasItemMaterial.svg
diff --git a/editor/icons/icon_canvas_item_shader.svg b/editor/icons/CanvasItemShader.svg
index 834fe61472..834fe61472 100644
--- a/editor/icons/icon_canvas_item_shader.svg
+++ b/editor/icons/CanvasItemShader.svg
diff --git a/editor/icons/icon_canvas_item_shader_graph.svg b/editor/icons/CanvasItemShaderGraph.svg
index 3e83751698..3e83751698 100644
--- a/editor/icons/icon_canvas_item_shader_graph.svg
+++ b/editor/icons/CanvasItemShaderGraph.svg
diff --git a/editor/icons/icon_canvas_layer.svg b/editor/icons/CanvasLayer.svg
index a3fcc903d7..a3fcc903d7 100644
--- a/editor/icons/icon_canvas_layer.svg
+++ b/editor/icons/CanvasLayer.svg
diff --git a/editor/icons/icon_canvas_modulate.svg b/editor/icons/CanvasModulate.svg
index a7b788d638..a7b788d638 100644
--- a/editor/icons/icon_canvas_modulate.svg
+++ b/editor/icons/CanvasModulate.svg
diff --git a/editor/icons/icon_capsule_mesh.svg b/editor/icons/CapsuleMesh.svg
index 1c9470105f..1c9470105f 100644
--- a/editor/icons/icon_capsule_mesh.svg
+++ b/editor/icons/CapsuleMesh.svg
diff --git a/editor/icons/icon_capsule_shape.svg b/editor/icons/CapsuleShape.svg
index ba035ca196..ba035ca196 100644
--- a/editor/icons/icon_capsule_shape.svg
+++ b/editor/icons/CapsuleShape.svg
diff --git a/editor/icons/icon_capsule_shape_2d.svg b/editor/icons/CapsuleShape2D.svg
index 81de995cb4..81de995cb4 100644
--- a/editor/icons/icon_capsule_shape_2d.svg
+++ b/editor/icons/CapsuleShape2D.svg
diff --git a/editor/icons/icon_center_container.svg b/editor/icons/CenterContainer.svg
index 5d854a3cc3..5d854a3cc3 100644
--- a/editor/icons/icon_center_container.svg
+++ b/editor/icons/CenterContainer.svg
diff --git a/editor/icons/icon_check_box.svg b/editor/icons/CheckBox.svg
index 6cb1f2aacd..6cb1f2aacd 100644
--- a/editor/icons/icon_check_box.svg
+++ b/editor/icons/CheckBox.svg
diff --git a/editor/icons/icon_check_button.svg b/editor/icons/CheckButton.svg
index f689c5fe47..f689c5fe47 100644
--- a/editor/icons/icon_check_button.svg
+++ b/editor/icons/CheckButton.svg
diff --git a/editor/icons/icon_checkerboard.svg b/editor/icons/Checkerboard.svg
index 7923291017..7923291017 100644
--- a/editor/icons/icon_checkerboard.svg
+++ b/editor/icons/Checkerboard.svg
diff --git a/editor/icons/icon_circle_shape_2d.svg b/editor/icons/CircleShape2D.svg
index e41fc8807c..e41fc8807c 100644
--- a/editor/icons/icon_circle_shape_2d.svg
+++ b/editor/icons/CircleShape2D.svg
diff --git a/editor/icons/icon_class_list.svg b/editor/icons/ClassList.svg
index ae2494724d..ae2494724d 100644
--- a/editor/icons/icon_class_list.svg
+++ b/editor/icons/ClassList.svg
diff --git a/editor/icons/icon_clear.svg b/editor/icons/Clear.svg
index 91343ca6af..91343ca6af 100644
--- a/editor/icons/icon_clear.svg
+++ b/editor/icons/Clear.svg
diff --git a/editor/icons/icon_clipped_camera.svg b/editor/icons/ClippedCamera.svg
index 8c80c04e27..8c80c04e27 100644
--- a/editor/icons/icon_clipped_camera.svg
+++ b/editor/icons/ClippedCamera.svg
diff --git a/editor/icons/icon_close.svg b/editor/icons/Close.svg
index 4147c7bcdd..4147c7bcdd 100644
--- a/editor/icons/icon_close.svg
+++ b/editor/icons/Close.svg
diff --git a/editor/icons/icon_collapse.svg b/editor/icons/Collapse.svg
index 62b5e55d81..62b5e55d81 100644
--- a/editor/icons/icon_collapse.svg
+++ b/editor/icons/Collapse.svg
diff --git a/editor/icons/icon_collision_polygon.svg b/editor/icons/CollisionPolygon.svg
index 5e849ae4e3..5e849ae4e3 100644
--- a/editor/icons/icon_collision_polygon.svg
+++ b/editor/icons/CollisionPolygon.svg
diff --git a/editor/icons/icon_collision_polygon_2d.svg b/editor/icons/CollisionPolygon2D.svg
index 54148f3fd4..54148f3fd4 100644
--- a/editor/icons/icon_collision_polygon_2d.svg
+++ b/editor/icons/CollisionPolygon2D.svg
diff --git a/editor/icons/icon_collision_shape.svg b/editor/icons/CollisionShape.svg
index 8f14996a97..8f14996a97 100644
--- a/editor/icons/icon_collision_shape.svg
+++ b/editor/icons/CollisionShape.svg
diff --git a/editor/icons/icon_collision_shape_2d.svg b/editor/icons/CollisionShape2D.svg
index 8210bf917f..8210bf917f 100644
--- a/editor/icons/icon_collision_shape_2d.svg
+++ b/editor/icons/CollisionShape2D.svg
diff --git a/editor/icons/icon_color.svg b/editor/icons/Color.svg
index de0540763e..de0540763e 100644
--- a/editor/icons/icon_color.svg
+++ b/editor/icons/Color.svg
diff --git a/editor/icons/icon_color_pick.svg b/editor/icons/ColorPick.svg
index d73225bd60..d73225bd60 100644
--- a/editor/icons/icon_color_pick.svg
+++ b/editor/icons/ColorPick.svg
diff --git a/editor/icons/icon_color_picker.svg b/editor/icons/ColorPicker.svg
index 3d03615708..3d03615708 100644
--- a/editor/icons/icon_color_picker.svg
+++ b/editor/icons/ColorPicker.svg
diff --git a/editor/icons/icon_color_picker_button.svg b/editor/icons/ColorPickerButton.svg
index b9fa86db6a..b9fa86db6a 100644
--- a/editor/icons/icon_color_picker_button.svg
+++ b/editor/icons/ColorPickerButton.svg
diff --git a/editor/icons/icon_color_ramp.svg b/editor/icons/ColorRamp.svg
index e0f0a67483..e0f0a67483 100644
--- a/editor/icons/icon_color_ramp.svg
+++ b/editor/icons/ColorRamp.svg
diff --git a/editor/icons/icon_color_rect.svg b/editor/icons/ColorRect.svg
index c2054de9d3..c2054de9d3 100644
--- a/editor/icons/icon_color_rect.svg
+++ b/editor/icons/ColorRect.svg
diff --git a/editor/icons/icon_color_track_vu.svg b/editor/icons/ColorTrackVu.svg
index 5760f81070..5760f81070 100644
--- a/editor/icons/icon_color_track_vu.svg
+++ b/editor/icons/ColorTrackVu.svg
diff --git a/editor/icons/icon_concave_polygon_shape.svg b/editor/icons/ConcavePolygonShape.svg
index 001ab82826..001ab82826 100644
--- a/editor/icons/icon_concave_polygon_shape.svg
+++ b/editor/icons/ConcavePolygonShape.svg
diff --git a/editor/icons/icon_concave_polygon_shape_2d.svg b/editor/icons/ConcavePolygonShape2D.svg
index 38a92095c9..38a92095c9 100644
--- a/editor/icons/icon_concave_polygon_shape_2d.svg
+++ b/editor/icons/ConcavePolygonShape2D.svg
diff --git a/editor/icons/icon_cone_twist_joint.svg b/editor/icons/ConeTwistJoint.svg
index 0e5e98a17b..0e5e98a17b 100644
--- a/editor/icons/icon_cone_twist_joint.svg
+++ b/editor/icons/ConeTwistJoint.svg
diff --git a/editor/icons/icon_confirmation_dialog.svg b/editor/icons/ConfirmationDialog.svg
index d1f13fbb3b..d1f13fbb3b 100644
--- a/editor/icons/icon_confirmation_dialog.svg
+++ b/editor/icons/ConfirmationDialog.svg
diff --git a/editor/icons/icon_container.svg b/editor/icons/Container.svg
index aaea67faa1..aaea67faa1 100644
--- a/editor/icons/icon_container.svg
+++ b/editor/icons/Container.svg
diff --git a/editor/icons/icon_control.svg b/editor/icons/Control.svg
index ff6a52e29a..ff6a52e29a 100644
--- a/editor/icons/icon_control.svg
+++ b/editor/icons/Control.svg
diff --git a/editor/icons/icon_control_align_bottom_center.svg b/editor/icons/ControlAlignBottomCenter.svg
index 7aee8caa79..7aee8caa79 100644
--- a/editor/icons/icon_control_align_bottom_center.svg
+++ b/editor/icons/ControlAlignBottomCenter.svg
diff --git a/editor/icons/icon_control_align_bottom_left.svg b/editor/icons/ControlAlignBottomLeft.svg
index aa26eb570a..aa26eb570a 100644
--- a/editor/icons/icon_control_align_bottom_left.svg
+++ b/editor/icons/ControlAlignBottomLeft.svg
diff --git a/editor/icons/icon_control_align_bottom_right.svg b/editor/icons/ControlAlignBottomRight.svg
index 737328e6f0..737328e6f0 100644
--- a/editor/icons/icon_control_align_bottom_right.svg
+++ b/editor/icons/ControlAlignBottomRight.svg
diff --git a/editor/icons/icon_control_align_bottom_wide.svg b/editor/icons/ControlAlignBottomWide.svg
index ad0d7fac85..ad0d7fac85 100644
--- a/editor/icons/icon_control_align_bottom_wide.svg
+++ b/editor/icons/ControlAlignBottomWide.svg
diff --git a/editor/icons/icon_control_align_center.svg b/editor/icons/ControlAlignCenter.svg
index 14dd500500..14dd500500 100644
--- a/editor/icons/icon_control_align_center.svg
+++ b/editor/icons/ControlAlignCenter.svg
diff --git a/editor/icons/icon_control_align_center_left.svg b/editor/icons/ControlAlignCenterLeft.svg
index 52f1d4d143..52f1d4d143 100644
--- a/editor/icons/icon_control_align_center_left.svg
+++ b/editor/icons/ControlAlignCenterLeft.svg
diff --git a/editor/icons/icon_control_align_center_right.svg b/editor/icons/ControlAlignCenterRight.svg
index 201796f172..201796f172 100644
--- a/editor/icons/icon_control_align_center_right.svg
+++ b/editor/icons/ControlAlignCenterRight.svg
diff --git a/editor/icons/icon_control_align_left_center.svg b/editor/icons/ControlAlignLeftCenter.svg
index 8135c9d851..8135c9d851 100644
--- a/editor/icons/icon_control_align_left_center.svg
+++ b/editor/icons/ControlAlignLeftCenter.svg
diff --git a/editor/icons/icon_control_align_left_wide.svg b/editor/icons/ControlAlignLeftWide.svg
index 56d16bec76..56d16bec76 100644
--- a/editor/icons/icon_control_align_left_wide.svg
+++ b/editor/icons/ControlAlignLeftWide.svg
diff --git a/editor/icons/icon_control_align_right_center.svg b/editor/icons/ControlAlignRightCenter.svg
index 69c4dba40d..69c4dba40d 100644
--- a/editor/icons/icon_control_align_right_center.svg
+++ b/editor/icons/ControlAlignRightCenter.svg
diff --git a/editor/icons/icon_control_align_right_wide.svg b/editor/icons/ControlAlignRightWide.svg
index b0a46cdb82..b0a46cdb82 100644
--- a/editor/icons/icon_control_align_right_wide.svg
+++ b/editor/icons/ControlAlignRightWide.svg
diff --git a/editor/icons/icon_control_align_top_center.svg b/editor/icons/ControlAlignTopCenter.svg
index cafb3ff856..cafb3ff856 100644
--- a/editor/icons/icon_control_align_top_center.svg
+++ b/editor/icons/ControlAlignTopCenter.svg
diff --git a/editor/icons/icon_control_align_top_left.svg b/editor/icons/ControlAlignTopLeft.svg
index ad288647fb..ad288647fb 100644
--- a/editor/icons/icon_control_align_top_left.svg
+++ b/editor/icons/ControlAlignTopLeft.svg
diff --git a/editor/icons/icon_control_align_top_right.svg b/editor/icons/ControlAlignTopRight.svg
index d9955de728..d9955de728 100644
--- a/editor/icons/icon_control_align_top_right.svg
+++ b/editor/icons/ControlAlignTopRight.svg
diff --git a/editor/icons/icon_control_align_top_wide.svg b/editor/icons/ControlAlignTopWide.svg
index 2526b45ad9..2526b45ad9 100644
--- a/editor/icons/icon_control_align_top_wide.svg
+++ b/editor/icons/ControlAlignTopWide.svg
diff --git a/editor/icons/icon_control_align_wide.svg b/editor/icons/ControlAlignWide.svg
index 5d1467cd9b..5d1467cd9b 100644
--- a/editor/icons/icon_control_align_wide.svg
+++ b/editor/icons/ControlAlignWide.svg
diff --git a/editor/icons/icon_control_hcenter_wide.svg b/editor/icons/ControlHcenterWide.svg
index 51c9aeb22d..51c9aeb22d 100644
--- a/editor/icons/icon_control_hcenter_wide.svg
+++ b/editor/icons/ControlHcenterWide.svg
diff --git a/editor/icons/icon_control_layout.svg b/editor/icons/ControlLayout.svg
index e39e6b474c..e39e6b474c 100644
--- a/editor/icons/icon_control_layout.svg
+++ b/editor/icons/ControlLayout.svg
diff --git a/editor/icons/icon_control_vcenter_wide.svg b/editor/icons/ControlVcenterWide.svg
index 93bbc5748b..93bbc5748b 100644
--- a/editor/icons/icon_control_vcenter_wide.svg
+++ b/editor/icons/ControlVcenterWide.svg
diff --git a/editor/icons/icon_convex_polygon_shape.svg b/editor/icons/ConvexPolygonShape.svg
index bfb9230586..bfb9230586 100644
--- a/editor/icons/icon_convex_polygon_shape.svg
+++ b/editor/icons/ConvexPolygonShape.svg
diff --git a/editor/icons/icon_convex_polygon_shape_2d.svg b/editor/icons/ConvexPolygonShape2D.svg
index 8d16523d93..8d16523d93 100644
--- a/editor/icons/icon_convex_polygon_shape_2d.svg
+++ b/editor/icons/ConvexPolygonShape2D.svg
diff --git a/editor/icons/icon_copy_node_path.svg b/editor/icons/CopyNodePath.svg
index 2cabe0a44e..2cabe0a44e 100644
--- a/editor/icons/icon_copy_node_path.svg
+++ b/editor/icons/CopyNodePath.svg
diff --git a/editor/icons/icon_create_new_scene_from.svg b/editor/icons/CreateNewSceneFrom.svg
index ffeaa36bc4..ffeaa36bc4 100644
--- a/editor/icons/icon_create_new_scene_from.svg
+++ b/editor/icons/CreateNewSceneFrom.svg
diff --git a/editor/icons/icon_crosshair.svg b/editor/icons/Crosshair.svg
index b6fa5ec654..b6fa5ec654 100644
--- a/editor/icons/icon_crosshair.svg
+++ b/editor/icons/Crosshair.svg
diff --git a/editor/icons/icon_crypto_key.svg b/editor/icons/CryptoKey.svg
index 45b53c815d..45b53c815d 100644
--- a/editor/icons/icon_crypto_key.svg
+++ b/editor/icons/CryptoKey.svg
diff --git a/editor/icons/icon_cube_map.svg b/editor/icons/CubeMap.svg
index c9e6f1fa7d..c9e6f1fa7d 100644
--- a/editor/icons/icon_cube_map.svg
+++ b/editor/icons/CubeMap.svg
diff --git a/editor/icons/icon_cube_mesh.svg b/editor/icons/CubeMesh.svg
index aeb5324b1b..aeb5324b1b 100644
--- a/editor/icons/icon_cube_mesh.svg
+++ b/editor/icons/CubeMesh.svg
diff --git a/editor/icons/icon_curve.svg b/editor/icons/Curve.svg
index 14895337c6..14895337c6 100644
--- a/editor/icons/icon_curve.svg
+++ b/editor/icons/Curve.svg
diff --git a/editor/icons/icon_curve_2d.svg b/editor/icons/Curve2D.svg
index 23f585c7c5..23f585c7c5 100644
--- a/editor/icons/icon_curve_2d.svg
+++ b/editor/icons/Curve2D.svg
diff --git a/editor/icons/icon_curve_3d.svg b/editor/icons/Curve3D.svg
index f14c581ec3..f14c581ec3 100644
--- a/editor/icons/icon_curve_3d.svg
+++ b/editor/icons/Curve3D.svg
diff --git a/editor/icons/icon_curve_close.svg b/editor/icons/CurveClose.svg
index 7d7bae88c2..7d7bae88c2 100644
--- a/editor/icons/icon_curve_close.svg
+++ b/editor/icons/CurveClose.svg
diff --git a/editor/icons/icon_curve_constant.svg b/editor/icons/CurveConstant.svg
index 713a3a982a..713a3a982a 100644
--- a/editor/icons/icon_curve_constant.svg
+++ b/editor/icons/CurveConstant.svg
diff --git a/editor/icons/icon_curve_create.svg b/editor/icons/CurveCreate.svg
index 43811f93f5..43811f93f5 100644
--- a/editor/icons/icon_curve_create.svg
+++ b/editor/icons/CurveCreate.svg
diff --git a/editor/icons/icon_curve_curve.svg b/editor/icons/CurveCurve.svg
index 60f965abc1..60f965abc1 100644
--- a/editor/icons/icon_curve_curve.svg
+++ b/editor/icons/CurveCurve.svg
diff --git a/editor/icons/icon_curve_delete.svg b/editor/icons/CurveDelete.svg
index afb545840f..afb545840f 100644
--- a/editor/icons/icon_curve_delete.svg
+++ b/editor/icons/CurveDelete.svg
diff --git a/editor/icons/icon_curve_edit.svg b/editor/icons/CurveEdit.svg
index 5d1d6560e1..5d1d6560e1 100644
--- a/editor/icons/icon_curve_edit.svg
+++ b/editor/icons/CurveEdit.svg
diff --git a/editor/icons/icon_curve_in.svg b/editor/icons/CurveIn.svg
index b9e203dea0..b9e203dea0 100644
--- a/editor/icons/icon_curve_in.svg
+++ b/editor/icons/CurveIn.svg
diff --git a/editor/icons/icon_curve_in_out.svg b/editor/icons/CurveInOut.svg
index 6d3c57d4f5..6d3c57d4f5 100644
--- a/editor/icons/icon_curve_in_out.svg
+++ b/editor/icons/CurveInOut.svg
diff --git a/editor/icons/icon_curve_linear.svg b/editor/icons/CurveLinear.svg
index 2256f493ce..2256f493ce 100644
--- a/editor/icons/icon_curve_linear.svg
+++ b/editor/icons/CurveLinear.svg
diff --git a/editor/icons/icon_curve_out.svg b/editor/icons/CurveOut.svg
index 9b04df6b6c..9b04df6b6c 100644
--- a/editor/icons/icon_curve_out.svg
+++ b/editor/icons/CurveOut.svg
diff --git a/editor/icons/icon_curve_out_in.svg b/editor/icons/CurveOutIn.svg
index 4a08d30966..4a08d30966 100644
--- a/editor/icons/icon_curve_out_in.svg
+++ b/editor/icons/CurveOutIn.svg
diff --git a/editor/icons/icon_curve_texture.svg b/editor/icons/CurveTexture.svg
index 05f9d62775..05f9d62775 100644
--- a/editor/icons/icon_curve_texture.svg
+++ b/editor/icons/CurveTexture.svg
diff --git a/editor/icons/icon_cylinder_mesh.svg b/editor/icons/CylinderMesh.svg
index f204edc985..f204edc985 100644
--- a/editor/icons/icon_cylinder_mesh.svg
+++ b/editor/icons/CylinderMesh.svg
diff --git a/editor/icons/icon_cylinder_shape.svg b/editor/icons/CylinderShape.svg
index f0aa5833d2..f0aa5833d2 100644
--- a/editor/icons/icon_cylinder_shape.svg
+++ b/editor/icons/CylinderShape.svg
diff --git a/editor/icons/icon_damped_spring_joint_2d.svg b/editor/icons/DampedSpringJoint2D.svg
index 9bd842bcc8..9bd842bcc8 100644
--- a/editor/icons/icon_damped_spring_joint_2d.svg
+++ b/editor/icons/DampedSpringJoint2D.svg
diff --git a/editor/icons/icon_debug.svg b/editor/icons/Debug.svg
index 7490862c4a..7490862c4a 100644
--- a/editor/icons/icon_debug.svg
+++ b/editor/icons/Debug.svg
diff --git a/editor/icons/icon_debug_continue.svg b/editor/icons/DebugContinue.svg
index 69c64c4fd4..69c64c4fd4 100644
--- a/editor/icons/icon_debug_continue.svg
+++ b/editor/icons/DebugContinue.svg
diff --git a/editor/icons/icon_debug_next.svg b/editor/icons/DebugNext.svg
index 133be255e1..133be255e1 100644
--- a/editor/icons/icon_debug_next.svg
+++ b/editor/icons/DebugNext.svg
diff --git a/editor/icons/icon_debug_skip_breakpoints_off.svg b/editor/icons/DebugSkipBreakpointsOff.svg
index f8923510bb..f8923510bb 100644
--- a/editor/icons/icon_debug_skip_breakpoints_off.svg
+++ b/editor/icons/DebugSkipBreakpointsOff.svg
diff --git a/editor/icons/icon_debug_skip_breakpoints_on.svg b/editor/icons/DebugSkipBreakpointsOn.svg
index d4a4b4c138..d4a4b4c138 100644
--- a/editor/icons/icon_debug_skip_breakpoints_on.svg
+++ b/editor/icons/DebugSkipBreakpointsOn.svg
diff --git a/editor/icons/icon_debug_step.svg b/editor/icons/DebugStep.svg
index c0356463fe..c0356463fe 100644
--- a/editor/icons/icon_debug_step.svg
+++ b/editor/icons/DebugStep.svg
diff --git a/editor/icons/icon_default_project_icon.svg b/editor/icons/DefaultProjectIcon.svg
index 10ecbd019d..10ecbd019d 100644
--- a/editor/icons/icon_default_project_icon.svg
+++ b/editor/icons/DefaultProjectIcon.svg
diff --git a/editor/icons/icon_delete_split.svg b/editor/icons/DeleteSplit.svg
index 7424de3b8a..7424de3b8a 100644
--- a/editor/icons/icon_delete_split.svg
+++ b/editor/icons/DeleteSplit.svg
diff --git a/editor/icons/icon_dictionary.svg b/editor/icons/Dictionary.svg
index 668ef37a86..668ef37a86 100644
--- a/editor/icons/icon_dictionary.svg
+++ b/editor/icons/Dictionary.svg
diff --git a/editor/icons/icon_directional_light.svg b/editor/icons/DirectionalLight.svg
index faac2be134..faac2be134 100644
--- a/editor/icons/icon_directional_light.svg
+++ b/editor/icons/DirectionalLight.svg
diff --git a/editor/icons/icon_distraction_free.svg b/editor/icons/DistractionFree.svg
index 8608b33f58..8608b33f58 100644
--- a/editor/icons/icon_distraction_free.svg
+++ b/editor/icons/DistractionFree.svg
diff --git a/editor/icons/icon_duplicate.svg b/editor/icons/Duplicate.svg
index d506b7a8c7..d506b7a8c7 100644
--- a/editor/icons/icon_duplicate.svg
+++ b/editor/icons/Duplicate.svg
diff --git a/editor/icons/icon_dynamic_font.svg b/editor/icons/DynamicFont.svg
index fe5eca2e35..fe5eca2e35 100644
--- a/editor/icons/icon_dynamic_font.svg
+++ b/editor/icons/DynamicFont.svg
diff --git a/editor/icons/icon_dynamic_font_data.svg b/editor/icons/DynamicFontData.svg
index 56426dd33e..56426dd33e 100644
--- a/editor/icons/icon_dynamic_font_data.svg
+++ b/editor/icons/DynamicFontData.svg
diff --git a/editor/icons/icon_edit.svg b/editor/icons/Edit.svg
index bb7ffa2fce..bb7ffa2fce 100644
--- a/editor/icons/icon_edit.svg
+++ b/editor/icons/Edit.svg
diff --git a/editor/icons/icon_edit_bezier.svg b/editor/icons/EditBezier.svg
index be9e2f22b8..be9e2f22b8 100644
--- a/editor/icons/icon_edit_bezier.svg
+++ b/editor/icons/EditBezier.svg
diff --git a/editor/icons/icon_edit_internal.svg b/editor/icons/EditInternal.svg
index 2a538102ce..2a538102ce 100644
--- a/editor/icons/icon_edit_internal.svg
+++ b/editor/icons/EditInternal.svg
diff --git a/editor/icons/icon_edit_key.svg b/editor/icons/EditKey.svg
index 883ddfda71..883ddfda71 100644
--- a/editor/icons/icon_edit_key.svg
+++ b/editor/icons/EditKey.svg
diff --git a/editor/icons/icon_edit_pivot.svg b/editor/icons/EditPivot.svg
index ae303535b4..ae303535b4 100644
--- a/editor/icons/icon_edit_pivot.svg
+++ b/editor/icons/EditPivot.svg
diff --git a/editor/icons/icon_edit_resource.svg b/editor/icons/EditResource.svg
index e16ca00355..e16ca00355 100644
--- a/editor/icons/icon_edit_resource.svg
+++ b/editor/icons/EditResource.svg
diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/Editor3DHandle.svg
index 687a5b184d..687a5b184d 100644
--- a/editor/icons/icon_editor_3d_handle.svg
+++ b/editor/icons/Editor3DHandle.svg
diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/EditorControlAnchor.svg
index 11e2bb5175..11e2bb5175 100644
--- a/editor/icons/icon_editor_control_anchor.svg
+++ b/editor/icons/EditorControlAnchor.svg
diff --git a/editor/icons/icon_editor_curve_handle.svg b/editor/icons/EditorCurveHandle.svg
index c405ceab9d..c405ceab9d 100644
--- a/editor/icons/icon_editor_curve_handle.svg
+++ b/editor/icons/EditorCurveHandle.svg
diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/EditorHandle.svg
index 8b11e782db..8b11e782db 100644
--- a/editor/icons/icon_editor_handle.svg
+++ b/editor/icons/EditorHandle.svg
diff --git a/editor/icons/icon_editor_handle_add.svg b/editor/icons/EditorHandleAdd.svg
index bf3b604d5c..bf3b604d5c 100644
--- a/editor/icons/icon_editor_handle_add.svg
+++ b/editor/icons/EditorHandleAdd.svg
diff --git a/editor/icons/icon_editor_internal_handle.svg b/editor/icons/EditorInternalHandle.svg
index 244e6b5d6c..244e6b5d6c 100644
--- a/editor/icons/icon_editor_internal_handle.svg
+++ b/editor/icons/EditorInternalHandle.svg
diff --git a/editor/icons/icon_editor_path_sharp_handle.svg b/editor/icons/EditorPathSharpHandle.svg
index db160dfeae..db160dfeae 100644
--- a/editor/icons/icon_editor_path_sharp_handle.svg
+++ b/editor/icons/EditorPathSharpHandle.svg
diff --git a/editor/icons/icon_editor_path_smooth_handle.svg b/editor/icons/EditorPathSmoothHandle.svg
index 34f3d290bd..34f3d290bd 100644
--- a/editor/icons/icon_editor_path_smooth_handle.svg
+++ b/editor/icons/EditorPathSmoothHandle.svg
diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/EditorPivot.svg
index 8e00f60530..8e00f60530 100644
--- a/editor/icons/icon_editor_pivot.svg
+++ b/editor/icons/EditorPivot.svg
diff --git a/editor/icons/icon_editor_plugin.svg b/editor/icons/EditorPlugin.svg
index 72f2bd5c28..72f2bd5c28 100644
--- a/editor/icons/icon_editor_plugin.svg
+++ b/editor/icons/EditorPlugin.svg
diff --git a/editor/icons/icon_editor_position.svg b/editor/icons/EditorPosition.svg
index 7b17fb5aa3..7b17fb5aa3 100644
--- a/editor/icons/icon_editor_position.svg
+++ b/editor/icons/EditorPosition.svg
diff --git a/editor/icons/icon_editor_position_previous.svg b/editor/icons/EditorPositionPrevious.svg
index 8c1d2992a5..8c1d2992a5 100644
--- a/editor/icons/icon_editor_position_previous.svg
+++ b/editor/icons/EditorPositionPrevious.svg
diff --git a/editor/icons/icon_editor_position_unselected.svg b/editor/icons/EditorPositionUnselected.svg
index b9a38ca371..b9a38ca371 100644
--- a/editor/icons/icon_editor_position_unselected.svg
+++ b/editor/icons/EditorPositionUnselected.svg
diff --git a/editor/icons/icon_enum.svg b/editor/icons/Enum.svg
index efa3050e95..efa3050e95 100644
--- a/editor/icons/icon_enum.svg
+++ b/editor/icons/Enum.svg
diff --git a/editor/icons/icon_environment.svg b/editor/icons/Environment.svg
index ee29342942..ee29342942 100644
--- a/editor/icons/icon_environment.svg
+++ b/editor/icons/Environment.svg
diff --git a/editor/icons/icon_error.svg b/editor/icons/Error.svg
index 05e548068d..05e548068d 100644
--- a/editor/icons/icon_error.svg
+++ b/editor/icons/Error.svg
diff --git a/editor/icons/icon_error_sign.svg b/editor/icons/ErrorSign.svg
index 96aace5c0c..96aace5c0c 100644
--- a/editor/icons/icon_error_sign.svg
+++ b/editor/icons/ErrorSign.svg
diff --git a/editor/icons/icon_expand_bottom_dock.svg b/editor/icons/ExpandBottomDock.svg
index 09cc3b9b07..09cc3b9b07 100644
--- a/editor/icons/icon_expand_bottom_dock.svg
+++ b/editor/icons/ExpandBottomDock.svg
diff --git a/editor/icons/icon_favorites.svg b/editor/icons/Favorites.svg
index 79e0c8475e..79e0c8475e 100644
--- a/editor/icons/icon_favorites.svg
+++ b/editor/icons/Favorites.svg
diff --git a/editor/icons/icon_file.svg b/editor/icons/File.svg
index 22d330fd56..22d330fd56 100644
--- a/editor/icons/icon_file.svg
+++ b/editor/icons/File.svg
diff --git a/editor/icons/icon_file_big_thumb.svg b/editor/icons/FileBigThumb.svg
index 50900ab684..50900ab684 100644
--- a/editor/icons/icon_file_big_thumb.svg
+++ b/editor/icons/FileBigThumb.svg
diff --git a/editor/icons/icon_file_broken.svg b/editor/icons/FileBroken.svg
index af79f02c12..af79f02c12 100644
--- a/editor/icons/icon_file_broken.svg
+++ b/editor/icons/FileBroken.svg
diff --git a/editor/icons/icon_file_broken_big_thumb.svg b/editor/icons/FileBrokenBigThumb.svg
index 08dee26f1c..08dee26f1c 100644
--- a/editor/icons/icon_file_broken_big_thumb.svg
+++ b/editor/icons/FileBrokenBigThumb.svg
diff --git a/editor/icons/icon_file_dead.svg b/editor/icons/FileDead.svg
index c40aa1b9a4..c40aa1b9a4 100644
--- a/editor/icons/icon_file_dead.svg
+++ b/editor/icons/FileDead.svg
diff --git a/editor/icons/icon_file_dead_big_thumb.svg b/editor/icons/FileDeadBigThumb.svg
index 79369873a6..79369873a6 100644
--- a/editor/icons/icon_file_dead_big_thumb.svg
+++ b/editor/icons/FileDeadBigThumb.svg
diff --git a/editor/icons/icon_file_dead_medium_thumb.svg b/editor/icons/FileDeadMediumThumb.svg
index 62496daaae..62496daaae 100644
--- a/editor/icons/icon_file_dead_medium_thumb.svg
+++ b/editor/icons/FileDeadMediumThumb.svg
diff --git a/editor/icons/icon_file_dialog.svg b/editor/icons/FileDialog.svg
index 7708659c21..7708659c21 100644
--- a/editor/icons/icon_file_dialog.svg
+++ b/editor/icons/FileDialog.svg
diff --git a/editor/icons/icon_file_list.svg b/editor/icons/FileList.svg
index e47c8b18cb..e47c8b18cb 100644
--- a/editor/icons/icon_file_list.svg
+++ b/editor/icons/FileList.svg
diff --git a/editor/icons/icon_file_medium_thumb.svg b/editor/icons/FileMediumThumb.svg
index 4c7d78b58e..4c7d78b58e 100644
--- a/editor/icons/icon_file_medium_thumb.svg
+++ b/editor/icons/FileMediumThumb.svg
diff --git a/editor/icons/icon_file_thumbnail.svg b/editor/icons/FileThumbnail.svg
index 571335a935..571335a935 100644
--- a/editor/icons/icon_file_thumbnail.svg
+++ b/editor/icons/FileThumbnail.svg
diff --git a/editor/icons/icon_filesystem.svg b/editor/icons/Filesystem.svg
index da6fa2ad60..da6fa2ad60 100644
--- a/editor/icons/icon_filesystem.svg
+++ b/editor/icons/Filesystem.svg
diff --git a/editor/icons/icon_fixed_material.svg b/editor/icons/FixedMaterial.svg
index 903691689b..903691689b 100644
--- a/editor/icons/icon_fixed_material.svg
+++ b/editor/icons/FixedMaterial.svg
diff --git a/editor/icons/icon_fixed_spatial_material.svg b/editor/icons/FixedSpatialMaterial.svg
index ba1e251088..ba1e251088 100644
--- a/editor/icons/icon_fixed_spatial_material.svg
+++ b/editor/icons/FixedSpatialMaterial.svg
diff --git a/editor/icons/icon_folder.svg b/editor/icons/Folder.svg
index 00ff7a95e9..00ff7a95e9 100644
--- a/editor/icons/icon_folder.svg
+++ b/editor/icons/Folder.svg
diff --git a/editor/icons/icon_folder_big_thumb.svg b/editor/icons/FolderBigThumb.svg
index a620d17b8f..a620d17b8f 100644
--- a/editor/icons/icon_folder_big_thumb.svg
+++ b/editor/icons/FolderBigThumb.svg
diff --git a/editor/icons/icon_folder_medium_thumb.svg b/editor/icons/FolderMediumThumb.svg
index 431650aff0..431650aff0 100644
--- a/editor/icons/icon_folder_medium_thumb.svg
+++ b/editor/icons/FolderMediumThumb.svg
diff --git a/editor/icons/icon_font.svg b/editor/icons/Font.svg
index 4b71b59d2e..4b71b59d2e 100644
--- a/editor/icons/icon_font.svg
+++ b/editor/icons/Font.svg
diff --git a/editor/icons/icon_forward.svg b/editor/icons/Forward.svg
index aecd4b362c..aecd4b362c 100644
--- a/editor/icons/icon_forward.svg
+++ b/editor/icons/Forward.svg
diff --git a/editor/icons/icon_g_i_probe.svg b/editor/icons/GIProbe.svg
index 5a5bfd3c5a..5a5bfd3c5a 100644
--- a/editor/icons/icon_g_i_probe.svg
+++ b/editor/icons/GIProbe.svg
diff --git a/editor/icons/icon_g_i_probe_data.svg b/editor/icons/GIProbeData.svg
index d4765be30f..d4765be30f 100644
--- a/editor/icons/icon_g_i_probe_data.svg
+++ b/editor/icons/GIProbeData.svg
diff --git a/editor/icons/icon_generic_6_d_o_f_joint.svg b/editor/icons/Generic6DOFJoint.svg
index 30d892e7a1..30d892e7a1 100644
--- a/editor/icons/icon_generic_6_d_o_f_joint.svg
+++ b/editor/icons/Generic6DOFJoint.svg
diff --git a/editor/icons/icon_gizmo_baked_lightmap.svg b/editor/icons/GizmoBakedLightmap.svg
index 9568f7ff25..9568f7ff25 100644
--- a/editor/icons/icon_gizmo_baked_lightmap.svg
+++ b/editor/icons/GizmoBakedLightmap.svg
diff --git a/editor/icons/icon_gizmo_c_p_u_particles.svg b/editor/icons/GizmoCPUParticles.svg
index d4e86d9c42..d4e86d9c42 100644
--- a/editor/icons/icon_gizmo_c_p_u_particles.svg
+++ b/editor/icons/GizmoCPUParticles.svg
diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/GizmoCamera.svg
index f28efb813e..f28efb813e 100644
--- a/editor/icons/icon_gizmo_camera.svg
+++ b/editor/icons/GizmoCamera.svg
diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/GizmoDirectionalLight.svg
index dc2d6bf82d..dc2d6bf82d 100644
--- a/editor/icons/icon_gizmo_directional_light.svg
+++ b/editor/icons/GizmoDirectionalLight.svg
diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/GizmoGIProbe.svg
index c792dc5a28..c792dc5a28 100644
--- a/editor/icons/icon_gizmo_g_i_probe.svg
+++ b/editor/icons/GizmoGIProbe.svg
diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/GizmoLight.svg
index 1e47082a0a..1e47082a0a 100644
--- a/editor/icons/icon_gizmo_light.svg
+++ b/editor/icons/GizmoLight.svg
diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/GizmoListener.svg
index 9e28c7730f..9e28c7730f 100644
--- a/editor/icons/icon_gizmo_listener.svg
+++ b/editor/icons/GizmoListener.svg
diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/GizmoParticles.svg
index 1c5d8c5f2d..1c5d8c5f2d 100644
--- a/editor/icons/icon_gizmo_particles.svg
+++ b/editor/icons/GizmoParticles.svg
diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/GizmoReflectionProbe.svg
index 82136821c7..82136821c7 100644
--- a/editor/icons/icon_gizmo_reflection_probe.svg
+++ b/editor/icons/GizmoReflectionProbe.svg
diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/GizmoSpatialSamplePlayer.svg
index ee471124dc..ee471124dc 100644
--- a/editor/icons/icon_gizmo_spatial_sample_player.svg
+++ b/editor/icons/GizmoSpatialSamplePlayer.svg
diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/GizmoSpotLight.svg
index 23a8364679..23a8364679 100644
--- a/editor/icons/icon_gizmo_spot_light.svg
+++ b/editor/icons/GizmoSpotLight.svg
diff --git a/editor/icons/icon_godot.svg b/editor/icons/Godot.svg
index 8ca9fdcabd..8ca9fdcabd 100644
--- a/editor/icons/icon_godot.svg
+++ b/editor/icons/Godot.svg
diff --git a/editor/icons/icon_gradient.svg b/editor/icons/Gradient.svg
index b67a9e6f8a..b67a9e6f8a 100644
--- a/editor/icons/icon_gradient.svg
+++ b/editor/icons/Gradient.svg
diff --git a/editor/icons/icon_gradient_texture.svg b/editor/icons/GradientTexture.svg
index 1388c141bd..1388c141bd 100644
--- a/editor/icons/icon_gradient_texture.svg
+++ b/editor/icons/GradientTexture.svg
diff --git a/editor/icons/icon_graph_edit.svg b/editor/icons/GraphEdit.svg
index 7ab7245260..7ab7245260 100644
--- a/editor/icons/icon_graph_edit.svg
+++ b/editor/icons/GraphEdit.svg
diff --git a/editor/icons/icon_graph_node.svg b/editor/icons/GraphNode.svg
index c8d4fda910..c8d4fda910 100644
--- a/editor/icons/icon_graph_node.svg
+++ b/editor/icons/GraphNode.svg
diff --git a/editor/icons/icon_grid.svg b/editor/icons/Grid.svg
index 869bc649fe..869bc649fe 100644
--- a/editor/icons/icon_grid.svg
+++ b/editor/icons/Grid.svg
diff --git a/editor/icons/icon_grid_container.svg b/editor/icons/GridContainer.svg
index 9fffd8b342..9fffd8b342 100644
--- a/editor/icons/icon_grid_container.svg
+++ b/editor/icons/GridContainer.svg
diff --git a/editor/icons/icon_groove_joint_2d.svg b/editor/icons/GrooveJoint2D.svg
index a2c7b741ad..a2c7b741ad 100644
--- a/editor/icons/icon_groove_joint_2d.svg
+++ b/editor/icons/GrooveJoint2D.svg
diff --git a/editor/icons/icon_group.svg b/editor/icons/Group.svg
index 7e0b2f3675..7e0b2f3675 100644
--- a/editor/icons/icon_group.svg
+++ b/editor/icons/Group.svg
diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/GroupViewport.svg
index 768c87e18d..768c87e18d 100644
--- a/editor/icons/icon_group_viewport.svg
+++ b/editor/icons/GroupViewport.svg
diff --git a/editor/icons/icon_groups.svg b/editor/icons/Groups.svg
index 5c8bd73f0f..5c8bd73f0f 100644
--- a/editor/icons/icon_groups.svg
+++ b/editor/icons/Groups.svg
diff --git a/editor/icons/icon_GUI_checked.svg b/editor/icons/GuiChecked.svg
index 8d00eca8d3..8d00eca8d3 100644
--- a/editor/icons/icon_GUI_checked.svg
+++ b/editor/icons/GuiChecked.svg
diff --git a/editor/icons/icon_gui_close.svg b/editor/icons/GuiClose.svg
index 3596061877..3596061877 100644
--- a/editor/icons/icon_gui_close.svg
+++ b/editor/icons/GuiClose.svg
diff --git a/editor/icons/icon_gui_close_customizable.svg b/editor/icons/GuiCloseCustomizable.svg
index 3596061877..3596061877 100644
--- a/editor/icons/icon_gui_close_customizable.svg
+++ b/editor/icons/GuiCloseCustomizable.svg
diff --git a/editor/icons/icon_GUI_dropdown.svg b/editor/icons/GuiDropdown.svg
index 3ed9466f4a..3ed9466f4a 100644
--- a/editor/icons/icon_GUI_dropdown.svg
+++ b/editor/icons/GuiDropdown.svg
diff --git a/editor/icons/icon_GUI_ellipsis.svg b/editor/icons/GuiEllipsis.svg
index 4d530d635e..4d530d635e 100644
--- a/editor/icons/icon_GUI_ellipsis.svg
+++ b/editor/icons/GuiEllipsis.svg
diff --git a/editor/icons/icon_gui_graph_node_port.svg b/editor/icons/GuiGraphNodePort.svg
index 2023a30ead..2023a30ead 100644
--- a/editor/icons/icon_gui_graph_node_port.svg
+++ b/editor/icons/GuiGraphNodePort.svg
diff --git a/editor/icons/icon_GUI_h_tick.svg b/editor/icons/GuiHTick.svg
index 01fecf5d12..01fecf5d12 100644
--- a/editor/icons/icon_GUI_h_tick.svg
+++ b/editor/icons/GuiHTick.svg
diff --git a/editor/icons/icon_GUI_hsplitter.svg b/editor/icons/GuiHsplitter.svg
index f94a81cb1e..f94a81cb1e 100644
--- a/editor/icons/icon_GUI_hsplitter.svg
+++ b/editor/icons/GuiHsplitter.svg
diff --git a/editor/icons/icon_GUI_mini_checkerboard.svg b/editor/icons/GuiMiniCheckerboard.svg
index dc6c7e37d1..dc6c7e37d1 100644
--- a/editor/icons/icon_GUI_mini_checkerboard.svg
+++ b/editor/icons/GuiMiniCheckerboard.svg
diff --git a/editor/icons/icon_GUI_option_arrow.svg b/editor/icons/GuiOptionArrow.svg
index 28435e08c3..28435e08c3 100644
--- a/editor/icons/icon_GUI_option_arrow.svg
+++ b/editor/icons/GuiOptionArrow.svg
diff --git a/editor/icons/icon_GUI_progress_bar.svg b/editor/icons/GuiProgressBar.svg
index a7a57adaa7..a7a57adaa7 100644
--- a/editor/icons/icon_GUI_progress_bar.svg
+++ b/editor/icons/GuiProgressBar.svg
diff --git a/editor/icons/icon_GUI_progress_fill.svg b/editor/icons/GuiProgressFill.svg
index a75bf93edd..a75bf93edd 100644
--- a/editor/icons/icon_GUI_progress_fill.svg
+++ b/editor/icons/GuiProgressFill.svg
diff --git a/editor/icons/icon_GUI_radio_checked.svg b/editor/icons/GuiRadioChecked.svg
index 447b57f8ae..447b57f8ae 100644
--- a/editor/icons/icon_GUI_radio_checked.svg
+++ b/editor/icons/GuiRadioChecked.svg
diff --git a/editor/icons/icon_GUI_radio_unchecked.svg b/editor/icons/GuiRadioUnchecked.svg
index 1e8117bd10..1e8117bd10 100644
--- a/editor/icons/icon_GUI_radio_unchecked.svg
+++ b/editor/icons/GuiRadioUnchecked.svg
diff --git a/editor/icons/icon_gui_resizer.svg b/editor/icons/GuiResizer.svg
index 545a1c9612..545a1c9612 100644
--- a/editor/icons/icon_gui_resizer.svg
+++ b/editor/icons/GuiResizer.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_left.svg b/editor/icons/GuiScrollArrowLeft.svg
index a118f04e17..a118f04e17 100644
--- a/editor/icons/icon_GUI_scroll_arrow_left.svg
+++ b/editor/icons/GuiScrollArrowLeft.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg b/editor/icons/GuiScrollArrowLeftHl.svg
index 046356f18b..046356f18b 100644
--- a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg
+++ b/editor/icons/GuiScrollArrowLeftHl.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_right.svg b/editor/icons/GuiScrollArrowRight.svg
index 4e0a8b5327..4e0a8b5327 100644
--- a/editor/icons/icon_GUI_scroll_arrow_right.svg
+++ b/editor/icons/GuiScrollArrowRight.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg b/editor/icons/GuiScrollArrowRightHl.svg
index 4224ca8de4..4224ca8de4 100644
--- a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg
+++ b/editor/icons/GuiScrollArrowRightHl.svg
diff --git a/editor/icons/icon_GUI_scroll_bg.svg b/editor/icons/GuiScrollBg.svg
index 263b42ea61..263b42ea61 100644
--- a/editor/icons/icon_GUI_scroll_bg.svg
+++ b/editor/icons/GuiScrollBg.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber.svg b/editor/icons/GuiScrollGrabber.svg
index 9f6e9f2e25..9f6e9f2e25 100644
--- a/editor/icons/icon_GUI_scroll_grabber.svg
+++ b/editor/icons/GuiScrollGrabber.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber_hl.svg b/editor/icons/GuiScrollGrabberHl.svg
index bf5bce6934..bf5bce6934 100644
--- a/editor/icons/icon_GUI_scroll_grabber_hl.svg
+++ b/editor/icons/GuiScrollGrabberHl.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber_pressed.svg b/editor/icons/GuiScrollGrabberPressed.svg
index da26032474..da26032474 100644
--- a/editor/icons/icon_GUI_scroll_grabber_pressed.svg
+++ b/editor/icons/GuiScrollGrabberPressed.svg
diff --git a/editor/icons/icon_GUI_slider_grabber.svg b/editor/icons/GuiSliderGrabber.svg
index dd751ead80..dd751ead80 100644
--- a/editor/icons/icon_GUI_slider_grabber.svg
+++ b/editor/icons/GuiSliderGrabber.svg
diff --git a/editor/icons/icon_GUI_slider_grabber_hl.svg b/editor/icons/GuiSliderGrabberHl.svg
index 90d62934ec..90d62934ec 100644
--- a/editor/icons/icon_GUI_slider_grabber_hl.svg
+++ b/editor/icons/GuiSliderGrabberHl.svg
diff --git a/editor/icons/icon_GUI_space.svg b/editor/icons/GuiSpace.svg
index b43e97b6e1..b43e97b6e1 100644
--- a/editor/icons/icon_GUI_space.svg
+++ b/editor/icons/GuiSpace.svg
diff --git a/editor/icons/icon_GUI_spinbox_updown.svg b/editor/icons/GuiSpinboxUpdown.svg
index a6776728e3..a6776728e3 100644
--- a/editor/icons/icon_GUI_spinbox_updown.svg
+++ b/editor/icons/GuiSpinboxUpdown.svg
diff --git a/editor/icons/icon_GUI_tab.svg b/editor/icons/GuiTab.svg
index 8451ebe5c0..8451ebe5c0 100644
--- a/editor/icons/icon_GUI_tab.svg
+++ b/editor/icons/GuiTab.svg
diff --git a/editor/icons/icon_GUI_tab_menu.svg b/editor/icons/GuiTabMenu.svg
index 8bf5ef2f7d..8bf5ef2f7d 100644
--- a/editor/icons/icon_GUI_tab_menu.svg
+++ b/editor/icons/GuiTabMenu.svg
diff --git a/editor/icons/icon_GUI_tab_menu_hl.svg b/editor/icons/GuiTabMenuHl.svg
index 42d58a5abf..42d58a5abf 100644
--- a/editor/icons/icon_GUI_tab_menu_hl.svg
+++ b/editor/icons/GuiTabMenuHl.svg
diff --git a/editor/icons/icon_GUI_toggle_off.svg b/editor/icons/GuiToggleOff.svg
index 46f13d198d..46f13d198d 100644
--- a/editor/icons/icon_GUI_toggle_off.svg
+++ b/editor/icons/GuiToggleOff.svg
diff --git a/editor/icons/icon_GUI_toggle_on.svg b/editor/icons/GuiToggleOn.svg
index 0316680daa..0316680daa 100644
--- a/editor/icons/icon_GUI_toggle_on.svg
+++ b/editor/icons/GuiToggleOn.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_down.svg b/editor/icons/GuiTreeArrowDown.svg
index fd2d900711..fd2d900711 100644
--- a/editor/icons/icon_GUI_tree_arrow_down.svg
+++ b/editor/icons/GuiTreeArrowDown.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_right.svg b/editor/icons/GuiTreeArrowRight.svg
index e20c92e2e7..e20c92e2e7 100644
--- a/editor/icons/icon_GUI_tree_arrow_right.svg
+++ b/editor/icons/GuiTreeArrowRight.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_up.svg b/editor/icons/GuiTreeArrowUp.svg
index 464363a8b1..464363a8b1 100644
--- a/editor/icons/icon_GUI_tree_arrow_up.svg
+++ b/editor/icons/GuiTreeArrowUp.svg
diff --git a/editor/icons/icon_GUI_tree_updown.svg b/editor/icons/GuiTreeUpdown.svg
index 66716845df..66716845df 100644
--- a/editor/icons/icon_GUI_tree_updown.svg
+++ b/editor/icons/GuiTreeUpdown.svg
diff --git a/editor/icons/icon_GUI_unchecked.svg b/editor/icons/GuiUnchecked.svg
index 9575422df3..9575422df3 100644
--- a/editor/icons/icon_GUI_unchecked.svg
+++ b/editor/icons/GuiUnchecked.svg
diff --git a/editor/icons/icon_GUI_v_tick.svg b/editor/icons/GuiVTick.svg
index 4205237952..4205237952 100644
--- a/editor/icons/icon_GUI_v_tick.svg
+++ b/editor/icons/GuiVTick.svg
diff --git a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg b/editor/icons/GuiViewportHdiagsplitter.svg
index b1705582dc..b1705582dc 100644
--- a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg
+++ b/editor/icons/GuiViewportHdiagsplitter.svg
diff --git a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg b/editor/icons/GuiViewportVdiagsplitter.svg
index 0817529ff1..0817529ff1 100644
--- a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg
+++ b/editor/icons/GuiViewportVdiagsplitter.svg
diff --git a/editor/icons/icon_GUI_viewport_vhsplitter.svg b/editor/icons/GuiViewportVhsplitter.svg
index a11fbd1b4c..a11fbd1b4c 100644
--- a/editor/icons/icon_GUI_viewport_vhsplitter.svg
+++ b/editor/icons/GuiViewportVhsplitter.svg
diff --git a/editor/icons/icon_GUI_visibility_hidden.svg b/editor/icons/GuiVisibilityHidden.svg
index 1d1e61d1bb..1d1e61d1bb 100644
--- a/editor/icons/icon_GUI_visibility_hidden.svg
+++ b/editor/icons/GuiVisibilityHidden.svg
diff --git a/editor/icons/icon_GUI_visibility_visible.svg b/editor/icons/GuiVisibilityVisible.svg
index 2e56f57ed8..2e56f57ed8 100644
--- a/editor/icons/icon_GUI_visibility_visible.svg
+++ b/editor/icons/GuiVisibilityVisible.svg
diff --git a/editor/icons/icon_GUI_visibility_xray.svg b/editor/icons/GuiVisibilityXray.svg
index 241ff3e7e5..241ff3e7e5 100644
--- a/editor/icons/icon_GUI_visibility_xray.svg
+++ b/editor/icons/GuiVisibilityXray.svg
diff --git a/editor/icons/icon_GUI_vsplit_bg.svg b/editor/icons/GuiVsplitBg.svg
index fa572c797e..fa572c797e 100644
--- a/editor/icons/icon_GUI_vsplit_bg.svg
+++ b/editor/icons/GuiVsplitBg.svg
diff --git a/editor/icons/icon_GUI_vsplitter.svg b/editor/icons/GuiVsplitter.svg
index 8629801713..8629801713 100644
--- a/editor/icons/icon_GUI_vsplitter.svg
+++ b/editor/icons/GuiVsplitter.svg
diff --git a/editor/icons/icon_h_box_container.svg b/editor/icons/HBoxContainer.svg
index 0ddbaf5a2e..0ddbaf5a2e 100644
--- a/editor/icons/icon_h_box_container.svg
+++ b/editor/icons/HBoxContainer.svg
diff --git a/editor/icons/icon_h_scroll_bar.svg b/editor/icons/HScrollBar.svg
index 039ebdf0c1..039ebdf0c1 100644
--- a/editor/icons/icon_h_scroll_bar.svg
+++ b/editor/icons/HScrollBar.svg
diff --git a/editor/icons/icon_h_separator.svg b/editor/icons/HSeparator.svg
index 762992acb8..762992acb8 100644
--- a/editor/icons/icon_h_separator.svg
+++ b/editor/icons/HSeparator.svg
diff --git a/editor/icons/icon_h_slider.svg b/editor/icons/HSlider.svg
index 20fbf0d00b..20fbf0d00b 100644
--- a/editor/icons/icon_h_slider.svg
+++ b/editor/icons/HSlider.svg
diff --git a/editor/icons/icon_h_split_container.svg b/editor/icons/HSplitContainer.svg
index ae7c05ee61..ae7c05ee61 100644
--- a/editor/icons/icon_h_split_container.svg
+++ b/editor/icons/HSplitContainer.svg
diff --git a/editor/icons/icon_h_t_t_p_request.svg b/editor/icons/HTTPRequest.svg
index c79af15a43..c79af15a43 100644
--- a/editor/icons/icon_h_t_t_p_request.svg
+++ b/editor/icons/HTTPRequest.svg
diff --git a/editor/icons/icon_headphones.svg b/editor/icons/Headphones.svg
index 82ef7acb29..82ef7acb29 100644
--- a/editor/icons/icon_headphones.svg
+++ b/editor/icons/Headphones.svg
diff --git a/editor/icons/icon_height_map_shape.svg b/editor/icons/HeightMapShape.svg
index 2e0bf53565..2e0bf53565 100644
--- a/editor/icons/icon_height_map_shape.svg
+++ b/editor/icons/HeightMapShape.svg
diff --git a/editor/icons/icon_help.svg b/editor/icons/Help.svg
index d993c95982..d993c95982 100644
--- a/editor/icons/icon_help.svg
+++ b/editor/icons/Help.svg
diff --git a/editor/icons/icon_help_search.svg b/editor/icons/HelpSearch.svg
index 4a82ba23c7..4a82ba23c7 100644
--- a/editor/icons/icon_help_search.svg
+++ b/editor/icons/HelpSearch.svg
diff --git a/editor/icons/icon_hinge_joint.svg b/editor/icons/HingeJoint.svg
index 21b3e29cb5..21b3e29cb5 100644
--- a/editor/icons/icon_hinge_joint.svg
+++ b/editor/icons/HingeJoint.svg
diff --git a/editor/icons/icon_history.svg b/editor/icons/History.svg
index 48eed7b0c8..48eed7b0c8 100644
--- a/editor/icons/icon_history.svg
+++ b/editor/icons/History.svg
diff --git a/editor/icons/icon_hsize.svg b/editor/icons/Hsize.svg
index 075bab1050..075bab1050 100644
--- a/editor/icons/icon_hsize.svg
+++ b/editor/icons/Hsize.svg
diff --git a/editor/icons/icon_image.svg b/editor/icons/Image.svg
index f3beda898e..f3beda898e 100644
--- a/editor/icons/icon_image.svg
+++ b/editor/icons/Image.svg
diff --git a/editor/icons/icon_image_texture.svg b/editor/icons/ImageTexture.svg
index 6e9905881b..6e9905881b 100644
--- a/editor/icons/icon_image_texture.svg
+++ b/editor/icons/ImageTexture.svg
diff --git a/editor/icons/icon_immediate_geometry.svg b/editor/icons/ImmediateGeometry.svg
index 5679d5906f..5679d5906f 100644
--- a/editor/icons/icon_immediate_geometry.svg
+++ b/editor/icons/ImmediateGeometry.svg
diff --git a/editor/icons/icon_import_check.svg b/editor/icons/ImportCheck.svg
index b2b967f37a..b2b967f37a 100644
--- a/editor/icons/icon_import_check.svg
+++ b/editor/icons/ImportCheck.svg
diff --git a/editor/icons/icon_import_fail.svg b/editor/icons/ImportFail.svg
index 6c81f88d9f..6c81f88d9f 100644
--- a/editor/icons/icon_import_fail.svg
+++ b/editor/icons/ImportFail.svg
diff --git a/editor/icons/icon_information_sign.svg b/editor/icons/InformationSign.svg
index a99be1b042..a99be1b042 100644
--- a/editor/icons/icon_information_sign.svg
+++ b/editor/icons/InformationSign.svg
diff --git a/editor/icons/icon_insert_after.svg b/editor/icons/InsertAfter.svg
index cab00048ac..cab00048ac 100644
--- a/editor/icons/icon_insert_after.svg
+++ b/editor/icons/InsertAfter.svg
diff --git a/editor/icons/icon_insert_before.svg b/editor/icons/InsertBefore.svg
index 366be3a1e6..366be3a1e6 100644
--- a/editor/icons/icon_insert_before.svg
+++ b/editor/icons/InsertBefore.svg
diff --git a/editor/icons/icon_instance.svg b/editor/icons/Instance.svg
index 8fc985bb51..8fc985bb51 100644
--- a/editor/icons/icon_instance.svg
+++ b/editor/icons/Instance.svg
diff --git a/editor/icons/icon_instance_options.svg b/editor/icons/InstanceOptions.svg
index ca9a5bcc87..ca9a5bcc87 100644
--- a/editor/icons/icon_instance_options.svg
+++ b/editor/icons/InstanceOptions.svg
diff --git a/editor/icons/icon_interp_cubic.svg b/editor/icons/InterpCubic.svg
index c2dd7db08c..c2dd7db08c 100644
--- a/editor/icons/icon_interp_cubic.svg
+++ b/editor/icons/InterpCubic.svg
diff --git a/editor/icons/icon_interp_linear.svg b/editor/icons/InterpLinear.svg
index 368be15315..368be15315 100644
--- a/editor/icons/icon_interp_linear.svg
+++ b/editor/icons/InterpLinear.svg
diff --git a/editor/icons/icon_interp_raw.svg b/editor/icons/InterpRaw.svg
index 1c6ae0062a..1c6ae0062a 100644
--- a/editor/icons/icon_interp_raw.svg
+++ b/editor/icons/InterpRaw.svg
diff --git a/editor/icons/icon_interp_wrap_clamp.svg b/editor/icons/InterpWrapClamp.svg
index 9634dc8a07..9634dc8a07 100644
--- a/editor/icons/icon_interp_wrap_clamp.svg
+++ b/editor/icons/InterpWrapClamp.svg
diff --git a/editor/icons/icon_interp_wrap_loop.svg b/editor/icons/InterpWrapLoop.svg
index 6fbb4356c8..6fbb4356c8 100644
--- a/editor/icons/icon_interp_wrap_loop.svg
+++ b/editor/icons/InterpWrapLoop.svg
diff --git a/editor/icons/icon_interpolated_camera.svg b/editor/icons/InterpolatedCamera.svg
index 4bc4ba1ee9..4bc4ba1ee9 100644
--- a/editor/icons/icon_interpolated_camera.svg
+++ b/editor/icons/InterpolatedCamera.svg
diff --git a/editor/icons/icon_inverse_kinematics.svg b/editor/icons/InverseKinematics.svg
index a98c989ccc..a98c989ccc 100644
--- a/editor/icons/icon_inverse_kinematics.svg
+++ b/editor/icons/InverseKinematics.svg
diff --git a/editor/icons/icon_issue.svg b/editor/icons/Issue.svg
index ddaaf41440..ddaaf41440 100644
--- a/editor/icons/icon_issue.svg
+++ b/editor/icons/Issue.svg
diff --git a/editor/icons/icon_item_list.svg b/editor/icons/ItemList.svg
index 311ed08a44..311ed08a44 100644
--- a/editor/icons/icon_item_list.svg
+++ b/editor/icons/ItemList.svg
diff --git a/editor/icons/icon_joy_axis.svg b/editor/icons/JoyAxis.svg
index cb7b5cdf8f..cb7b5cdf8f 100644
--- a/editor/icons/icon_joy_axis.svg
+++ b/editor/icons/JoyAxis.svg
diff --git a/editor/icons/icon_joy_button.svg b/editor/icons/JoyButton.svg
index 9f4fbfdf2d..9f4fbfdf2d 100644
--- a/editor/icons/icon_joy_button.svg
+++ b/editor/icons/JoyButton.svg
diff --git a/editor/icons/icon_joypad.svg b/editor/icons/Joypad.svg
index 8cb5de0c0e..8cb5de0c0e 100644
--- a/editor/icons/icon_joypad.svg
+++ b/editor/icons/Joypad.svg
diff --git a/editor/icons/icon_key.svg b/editor/icons/Key.svg
index d134735c53..d134735c53 100644
--- a/editor/icons/icon_key.svg
+++ b/editor/icons/Key.svg
diff --git a/editor/icons/icon_key_animation.svg b/editor/icons/KeyAnimation.svg
index 6db513ca26..6db513ca26 100644
--- a/editor/icons/icon_key_animation.svg
+++ b/editor/icons/KeyAnimation.svg
diff --git a/editor/icons/icon_key_audio.svg b/editor/icons/KeyAudio.svg
index 75576885ec..75576885ec 100644
--- a/editor/icons/icon_key_audio.svg
+++ b/editor/icons/KeyAudio.svg
diff --git a/editor/icons/icon_key_bezier.svg b/editor/icons/KeyBezier.svg
index dc5800fd5a..dc5800fd5a 100644
--- a/editor/icons/icon_key_bezier.svg
+++ b/editor/icons/KeyBezier.svg
diff --git a/editor/icons/icon_key_bezier_handle.svg b/editor/icons/KeyBezierHandle.svg
index 9f00f61304..9f00f61304 100644
--- a/editor/icons/icon_key_bezier_handle.svg
+++ b/editor/icons/KeyBezierHandle.svg
diff --git a/editor/icons/icon_key_bezier_point.svg b/editor/icons/KeyBezierPoint.svg
index 0edb55cda1..0edb55cda1 100644
--- a/editor/icons/icon_key_bezier_point.svg
+++ b/editor/icons/KeyBezierPoint.svg
diff --git a/editor/icons/icon_key_bezier_selected.svg b/editor/icons/KeyBezierSelected.svg
index 9e50e2bdf1..9e50e2bdf1 100644
--- a/editor/icons/icon_key_bezier_selected.svg
+++ b/editor/icons/KeyBezierSelected.svg
diff --git a/editor/icons/icon_key_call.svg b/editor/icons/KeyCall.svg
index 6cc442c391..6cc442c391 100644
--- a/editor/icons/icon_key_call.svg
+++ b/editor/icons/KeyCall.svg
diff --git a/editor/icons/icon_key_hover.svg b/editor/icons/KeyHover.svg
index 417621716b..417621716b 100644
--- a/editor/icons/icon_key_hover.svg
+++ b/editor/icons/KeyHover.svg
diff --git a/editor/icons/icon_key_invalid.svg b/editor/icons/KeyInvalid.svg
index 8ac9445b31..8ac9445b31 100644
--- a/editor/icons/icon_key_invalid.svg
+++ b/editor/icons/KeyInvalid.svg
diff --git a/editor/icons/icon_key_next.svg b/editor/icons/KeyNext.svg
index 2d064e7e86..2d064e7e86 100644
--- a/editor/icons/icon_key_next.svg
+++ b/editor/icons/KeyNext.svg
diff --git a/editor/icons/icon_key_position.svg b/editor/icons/KeyPosition.svg
index d152b76e8d..d152b76e8d 100644
--- a/editor/icons/icon_key_position.svg
+++ b/editor/icons/KeyPosition.svg
diff --git a/editor/icons/icon_key_rotation.svg b/editor/icons/KeyRotation.svg
index 0d3577eac4..0d3577eac4 100644
--- a/editor/icons/icon_key_rotation.svg
+++ b/editor/icons/KeyRotation.svg
diff --git a/editor/icons/icon_key_scale.svg b/editor/icons/KeyScale.svg
index a1214db62e..a1214db62e 100644
--- a/editor/icons/icon_key_scale.svg
+++ b/editor/icons/KeyScale.svg
diff --git a/editor/icons/icon_key_selected.svg b/editor/icons/KeySelected.svg
index 6594aec6ee..6594aec6ee 100644
--- a/editor/icons/icon_key_selected.svg
+++ b/editor/icons/KeySelected.svg
diff --git a/editor/icons/icon_key_value.svg b/editor/icons/KeyValue.svg
index 8a4787d6ed..8a4787d6ed 100644
--- a/editor/icons/icon_key_value.svg
+++ b/editor/icons/KeyValue.svg
diff --git a/editor/icons/icon_key_xform.svg b/editor/icons/KeyXform.svg
index 4a567075a7..4a567075a7 100644
--- a/editor/icons/icon_key_xform.svg
+++ b/editor/icons/KeyXform.svg
diff --git a/editor/icons/Keyboard.svg b/editor/icons/Keyboard.svg
new file mode 100644
index 0000000000..c76e88e5e3
--- /dev/null
+++ b/editor/icons/Keyboard.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M4 2a1 1 0 0 0-1 1v9.084c0 .506.448.916 1 .916h8c.552 0 1-.41 1-.916V3a1 1 0 0 0-1-1H4zm1.543 1.139h1.393L8.77 7.338h1.295v.437c.708.052 1.246.239 1.61.559.368.316.55.747.55 1.295 0 .552-.182.99-.55 1.314-.368.32-.906.505-1.61.553v.467H8.771v-.473c-.708-.06-1.247-.248-1.615-.564-.364-.316-.545-.75-.545-1.297 0-.548.181-.977.545-1.29.368-.315.907-.504 1.615-.564v-.437H7.307l-.282-.733H5.43l-.284.733H3.707l1.836-4.2zm.684 1.39l-.409 1.057h.817l-.408-1.057zm3.84 4.338v1.526c.28-.04.483-.12.607-.24.124-.125.185-.302.185-.53 0-.224-.063-.396-.191-.516-.124-.12-.326-.2-.602-.24zm-1.296.006c-.284.04-.487.12-.61.24-.12.116-.182.288-.182.516 0 .22.065.392.193.512.132.12.331.202.6.246V8.873z" fill="#e0e0e0" fill-opacity=".996"/><path d="M27 2h7v14h-7z" fill="#fff" fill-opacity=".996"/><path fill="#e0e0e0" fill-opacity=".996" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4z"/></svg> \ No newline at end of file
diff --git a/editor/icons/KeyboardPhysical.svg b/editor/icons/KeyboardPhysical.svg
new file mode 100644
index 0000000000..2bd35bc78e
--- /dev/null
+++ b/editor/icons/KeyboardPhysical.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M4 2a1 1 0 0 0-1 1v9.084c0 .506.448.916 1 .916h8c.552 0 1-.41 1-.916V3a1 1 0 0 0-1-1zm2.762 1.768h2.476l3.264 7.464H9.898l-.502-1.3H6.561l-.502 1.3H3.498zm1.217 2.474L7.254 8.12h1.45z" fill="#e0e0e0" fill-opacity=".996"/><path d="M27 2h7v14h-7z" fill="#fff" fill-opacity=".996"/><path fill="#e0e0e0" fill-opacity=".996" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4z"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_kinematic_body.svg b/editor/icons/KinematicBody.svg
index 16078fbdec..16078fbdec 100644
--- a/editor/icons/icon_kinematic_body.svg
+++ b/editor/icons/KinematicBody.svg
diff --git a/editor/icons/icon_kinematic_body_2d.svg b/editor/icons/KinematicBody2D.svg
index be9dfa2d27..be9dfa2d27 100644
--- a/editor/icons/icon_kinematic_body_2d.svg
+++ b/editor/icons/KinematicBody2D.svg
diff --git a/editor/icons/icon_label.svg b/editor/icons/Label.svg
index 24de398501..24de398501 100644
--- a/editor/icons/icon_label.svg
+++ b/editor/icons/Label.svg
diff --git a/editor/icons/icon_large_texture.svg b/editor/icons/LargeTexture.svg
index 15920bf3d3..15920bf3d3 100644
--- a/editor/icons/icon_large_texture.svg
+++ b/editor/icons/LargeTexture.svg
diff --git a/editor/icons/icon_light_2d.svg b/editor/icons/Light2D.svg
index 87cfb29149..87cfb29149 100644
--- a/editor/icons/icon_light_2d.svg
+++ b/editor/icons/Light2D.svg
diff --git a/editor/icons/icon_light_occluder_2d.svg b/editor/icons/LightOccluder2D.svg
index 2905f9badd..2905f9badd 100644
--- a/editor/icons/icon_light_occluder_2d.svg
+++ b/editor/icons/LightOccluder2D.svg
diff --git a/editor/icons/icon_line_2d.svg b/editor/icons/Line2D.svg
index 9728262e50..9728262e50 100644
--- a/editor/icons/icon_line_2d.svg
+++ b/editor/icons/Line2D.svg
diff --git a/editor/icons/icon_line_edit.svg b/editor/icons/LineEdit.svg
index 4df7a3b248..4df7a3b248 100644
--- a/editor/icons/icon_line_edit.svg
+++ b/editor/icons/LineEdit.svg
diff --git a/editor/icons/icon_line_shape_2d.svg b/editor/icons/LineShape2D.svg
index 758c0fbef2..758c0fbef2 100644
--- a/editor/icons/icon_line_shape_2d.svg
+++ b/editor/icons/LineShape2D.svg
diff --git a/editor/icons/icon_link_button.svg b/editor/icons/LinkButton.svg
index bf7f7657eb..bf7f7657eb 100644
--- a/editor/icons/icon_link_button.svg
+++ b/editor/icons/LinkButton.svg
diff --git a/editor/icons/icon_list_select.svg b/editor/icons/ListSelect.svg
index 42feb1922b..42feb1922b 100644
--- a/editor/icons/icon_list_select.svg
+++ b/editor/icons/ListSelect.svg
diff --git a/editor/icons/icon_listener.svg b/editor/icons/Listener.svg
index 96eaeaffa9..96eaeaffa9 100644
--- a/editor/icons/icon_listener.svg
+++ b/editor/icons/Listener.svg
diff --git a/editor/icons/icon_load.svg b/editor/icons/Load.svg
index 7ee6ae2a2d..7ee6ae2a2d 100644
--- a/editor/icons/icon_load.svg
+++ b/editor/icons/Load.svg
diff --git a/editor/icons/icon_lock.svg b/editor/icons/Lock.svg
index 4136dad557..4136dad557 100644
--- a/editor/icons/icon_lock.svg
+++ b/editor/icons/Lock.svg
diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/LockViewport.svg
index 99c066055d..99c066055d 100644
--- a/editor/icons/icon_lock_viewport.svg
+++ b/editor/icons/LockViewport.svg
diff --git a/editor/icons/icon_logo.svg b/editor/icons/Logo.svg
index f5379c48d4..f5379c48d4 100644
--- a/editor/icons/icon_logo.svg
+++ b/editor/icons/Logo.svg
diff --git a/editor/icons/icon_loop.svg b/editor/icons/Loop.svg
index bbb8dadc06..bbb8dadc06 100644
--- a/editor/icons/icon_loop.svg
+++ b/editor/icons/Loop.svg
diff --git a/editor/icons/icon_loop_interpolation.svg b/editor/icons/LoopInterpolation.svg
index 052a34ab36..052a34ab36 100644
--- a/editor/icons/icon_loop_interpolation.svg
+++ b/editor/icons/LoopInterpolation.svg
diff --git a/editor/icons/icon_main_play.svg b/editor/icons/MainPlay.svg
index 5fd62b9453..5fd62b9453 100644
--- a/editor/icons/icon_main_play.svg
+++ b/editor/icons/MainPlay.svg
diff --git a/editor/icons/icon_margin_container.svg b/editor/icons/MarginContainer.svg
index f11b415c06..f11b415c06 100644
--- a/editor/icons/icon_margin_container.svg
+++ b/editor/icons/MarginContainer.svg
diff --git a/editor/icons/icon_match_case.svg b/editor/icons/MatchCase.svg
index 1b348f3d46..1b348f3d46 100644
--- a/editor/icons/icon_match_case.svg
+++ b/editor/icons/MatchCase.svg
diff --git a/editor/icons/icon_material_preview_cube.svg b/editor/icons/MaterialPreviewCube.svg
index 7992ce05c1..7992ce05c1 100644
--- a/editor/icons/icon_material_preview_cube.svg
+++ b/editor/icons/MaterialPreviewCube.svg
diff --git a/editor/icons/icon_material_preview_cube_off.svg b/editor/icons/MaterialPreviewCubeOff.svg
index 6dfe169eae..6dfe169eae 100644
--- a/editor/icons/icon_material_preview_cube_off.svg
+++ b/editor/icons/MaterialPreviewCubeOff.svg
diff --git a/editor/icons/icon_material_preview_light_1.svg b/editor/icons/MaterialPreviewLight1.svg
index 3003793013..3003793013 100644
--- a/editor/icons/icon_material_preview_light_1.svg
+++ b/editor/icons/MaterialPreviewLight1.svg
diff --git a/editor/icons/icon_material_preview_light_1_off.svg b/editor/icons/MaterialPreviewLight1Off.svg
index 6948e3d77e..6948e3d77e 100644
--- a/editor/icons/icon_material_preview_light_1_off.svg
+++ b/editor/icons/MaterialPreviewLight1Off.svg
diff --git a/editor/icons/icon_material_preview_light_2.svg b/editor/icons/MaterialPreviewLight2.svg
index 08c05379e4..08c05379e4 100644
--- a/editor/icons/icon_material_preview_light_2.svg
+++ b/editor/icons/MaterialPreviewLight2.svg
diff --git a/editor/icons/icon_material_preview_light_2_off.svg b/editor/icons/MaterialPreviewLight2Off.svg
index cc48927ece..cc48927ece 100644
--- a/editor/icons/icon_material_preview_light_2_off.svg
+++ b/editor/icons/MaterialPreviewLight2Off.svg
diff --git a/editor/icons/icon_material_preview_sphere.svg b/editor/icons/MaterialPreviewSphere.svg
index 4f4ef67e20..4f4ef67e20 100644
--- a/editor/icons/icon_material_preview_sphere.svg
+++ b/editor/icons/MaterialPreviewSphere.svg
diff --git a/editor/icons/icon_material_preview_sphere_off.svg b/editor/icons/MaterialPreviewSphereOff.svg
index f702b4fd27..f702b4fd27 100644
--- a/editor/icons/icon_material_preview_sphere_off.svg
+++ b/editor/icons/MaterialPreviewSphereOff.svg
diff --git a/editor/icons/icon_member_constant.svg b/editor/icons/MemberConstant.svg
index ec82749cf4..ec82749cf4 100644
--- a/editor/icons/icon_member_constant.svg
+++ b/editor/icons/MemberConstant.svg
diff --git a/editor/icons/icon_member_method.svg b/editor/icons/MemberMethod.svg
index ea5c64482c..ea5c64482c 100644
--- a/editor/icons/icon_member_method.svg
+++ b/editor/icons/MemberMethod.svg
diff --git a/editor/icons/icon_member_property.svg b/editor/icons/MemberProperty.svg
index 4b6b7ab5df..4b6b7ab5df 100644
--- a/editor/icons/icon_member_property.svg
+++ b/editor/icons/MemberProperty.svg
diff --git a/editor/icons/icon_member_signal.svg b/editor/icons/MemberSignal.svg
index 5159e4acd7..5159e4acd7 100644
--- a/editor/icons/icon_member_signal.svg
+++ b/editor/icons/MemberSignal.svg
diff --git a/editor/icons/icon_member_theme.svg b/editor/icons/MemberTheme.svg
index 7aaaf2b808..7aaaf2b808 100644
--- a/editor/icons/icon_member_theme.svg
+++ b/editor/icons/MemberTheme.svg
diff --git a/editor/icons/icon_menu_button.svg b/editor/icons/MenuButton.svg
index 8c23927783..8c23927783 100644
--- a/editor/icons/icon_menu_button.svg
+++ b/editor/icons/MenuButton.svg
diff --git a/editor/icons/icon_mesh.svg b/editor/icons/Mesh.svg
index 0fb9e74584..0fb9e74584 100644
--- a/editor/icons/icon_mesh.svg
+++ b/editor/icons/Mesh.svg
diff --git a/editor/icons/icon_mesh_instance.svg b/editor/icons/MeshInstance.svg
index 68344b7dbd..68344b7dbd 100644
--- a/editor/icons/icon_mesh_instance.svg
+++ b/editor/icons/MeshInstance.svg
diff --git a/editor/icons/icon_mesh_instance_2d.svg b/editor/icons/MeshInstance2D.svg
index a173d02771..a173d02771 100644
--- a/editor/icons/icon_mesh_instance_2d.svg
+++ b/editor/icons/MeshInstance2D.svg
diff --git a/editor/icons/icon_mesh_library.svg b/editor/icons/MeshLibrary.svg
index 13ae8fece7..13ae8fece7 100644
--- a/editor/icons/icon_mesh_library.svg
+++ b/editor/icons/MeshLibrary.svg
diff --git a/editor/icons/icon_mesh_texture.svg b/editor/icons/MeshTexture.svg
index b3beff05c0..b3beff05c0 100644
--- a/editor/icons/icon_mesh_texture.svg
+++ b/editor/icons/MeshTexture.svg
diff --git a/editor/icons/icon_mini_object.svg b/editor/icons/MiniObject.svg
index 0b34a9fdbb..0b34a9fdbb 100644
--- a/editor/icons/icon_mini_object.svg
+++ b/editor/icons/MiniObject.svg
diff --git a/editor/icons/icon_mirror_x.svg b/editor/icons/MirrorX.svg
index 445a4e058d..445a4e058d 100644
--- a/editor/icons/icon_mirror_x.svg
+++ b/editor/icons/MirrorX.svg
diff --git a/editor/icons/icon_mirror_y.svg b/editor/icons/MirrorY.svg
index ebfcf8cabd..ebfcf8cabd 100644
--- a/editor/icons/icon_mirror_y.svg
+++ b/editor/icons/MirrorY.svg
diff --git a/editor/icons/icon_mouse.svg b/editor/icons/Mouse.svg
index 571288675a..571288675a 100644
--- a/editor/icons/icon_mouse.svg
+++ b/editor/icons/Mouse.svg
diff --git a/editor/icons/icon_move_down.svg b/editor/icons/MoveDown.svg
index ba0c5d80ba..ba0c5d80ba 100644
--- a/editor/icons/icon_move_down.svg
+++ b/editor/icons/MoveDown.svg
diff --git a/editor/icons/icon_move_left.svg b/editor/icons/MoveLeft.svg
index f4ad280ae1..f4ad280ae1 100644
--- a/editor/icons/icon_move_left.svg
+++ b/editor/icons/MoveLeft.svg
diff --git a/editor/icons/icon_move_point.svg b/editor/icons/MovePoint.svg
index a8c11e7cb3..a8c11e7cb3 100644
--- a/editor/icons/icon_move_point.svg
+++ b/editor/icons/MovePoint.svg
diff --git a/editor/icons/icon_move_right.svg b/editor/icons/MoveRight.svg
index 4d1c3b1145..4d1c3b1145 100644
--- a/editor/icons/icon_move_right.svg
+++ b/editor/icons/MoveRight.svg
diff --git a/editor/icons/icon_move_up.svg b/editor/icons/MoveUp.svg
index 87c7834597..87c7834597 100644
--- a/editor/icons/icon_move_up.svg
+++ b/editor/icons/MoveUp.svg
diff --git a/editor/icons/icon_multi_edit.svg b/editor/icons/MultiEdit.svg
index 9a5b3237b2..9a5b3237b2 100644
--- a/editor/icons/icon_multi_edit.svg
+++ b/editor/icons/MultiEdit.svg
diff --git a/editor/icons/icon_multi_line.svg b/editor/icons/MultiLine.svg
index dd79bb50d8..dd79bb50d8 100644
--- a/editor/icons/icon_multi_line.svg
+++ b/editor/icons/MultiLine.svg
diff --git a/editor/icons/icon_multi_mesh.svg b/editor/icons/MultiMesh.svg
index d317129ef4..d317129ef4 100644
--- a/editor/icons/icon_multi_mesh.svg
+++ b/editor/icons/MultiMesh.svg
diff --git a/editor/icons/icon_multi_mesh_instance.svg b/editor/icons/MultiMeshInstance.svg
index c114a725db..c114a725db 100644
--- a/editor/icons/icon_multi_mesh_instance.svg
+++ b/editor/icons/MultiMeshInstance.svg
diff --git a/editor/icons/icon_multi_mesh_instance_2d.svg b/editor/icons/MultiMeshInstance2D.svg
index 6c54a63ae2..6c54a63ae2 100644
--- a/editor/icons/icon_multi_mesh_instance_2d.svg
+++ b/editor/icons/MultiMeshInstance2D.svg
diff --git a/editor/icons/icon_navigation.svg b/editor/icons/Navigation.svg
index d5a8f8618b..d5a8f8618b 100644
--- a/editor/icons/icon_navigation.svg
+++ b/editor/icons/Navigation.svg
diff --git a/editor/icons/icon_navigation_2d.svg b/editor/icons/Navigation2D.svg
index 79dc532aee..79dc532aee 100644
--- a/editor/icons/icon_navigation_2d.svg
+++ b/editor/icons/Navigation2D.svg
diff --git a/editor/icons/NavigationAgent.svg b/editor/icons/NavigationAgent.svg
new file mode 100644
index 0000000000..44c991d44c
--- /dev/null
+++ b/editor/icons/NavigationAgent.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333335" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="scale(.26458333)"><path d="m9 1c-1.3712923 0-2.308408.4294811-2.9394531 1.0742188-.6678822.6627728-1.3395938 1.3233299-2.0097657 1.984375-.0455468 1.7412784.7567781 4.3277129 2.3652344 4.84375.1781835.3171398.3844475.6487461.5839844.9765624v5.1210938l2-2c2-3 4-5.9999874 4-8s-1-4-4-4z" fill="#fff" fill-opacity=".392157"/><path d="m7 3c-3 0-4 1.9999874-4 4s2.0000003 5 4 8c2.0000001-3 4-5.9999874 4-8s-1-4-4-4zm0 2a1.9999999 1.9999999 0 0 1 2 2 1.9999999 1.9999999 0 0 1 -2 2 1.9999999 1.9999999 0 0 1 -2-2 1.9999999 1.9999999 0 0 1 2-2z" fill="#e0e0e0"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/NavigationAgent2D.svg b/editor/icons/NavigationAgent2D.svg
new file mode 100644
index 0000000000..8ded0cea55
--- /dev/null
+++ b/editor/icons/NavigationAgent2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333335" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-2.9999997.0000126-5 2-5 5s3.0000003 6 5 9c2-3 5.007143-6.0296693 5-9 0-3-2-4.9999874-5-5zm0 2.5a2.4999999 2.4999999 0 0 1 2.5 2.5 2.4999999 2.4999999 0 0 1 -2.5 2.5 2.4999999 2.4999999 0 0 1 -2.5-2.5 2.4999999 2.4999999 0 0 1 2.5-2.5z" fill="#e0e0e0" transform="scale(.26458333)"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_navigation_mesh.svg b/editor/icons/NavigationMesh.svg
index 9bc4a00d53..9bc4a00d53 100644
--- a/editor/icons/icon_navigation_mesh.svg
+++ b/editor/icons/NavigationMesh.svg
diff --git a/editor/icons/NavigationObstacle.svg b/editor/icons/NavigationObstacle.svg
new file mode 100644
index 0000000000..42481a6067
--- /dev/null
+++ b/editor/icons/NavigationObstacle.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333335" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="scale(.26458333)"><path d="m4.6074219 8.3789062c-1.7979243.927604-3.60742192 2.0716858-3.6074219 2.6210938 0 .999987 6.0000005 4 7 4 1.0000006 0 7-3.000013 7-4 0-.549408-1.809498-1.6934898-3.607422-2.6210938l.607422 1.6210938c2 4.000025-9.9999999 4.000025-8 0z" fill="#fff" fill-opacity=".392157"/><path d="m8 .875c-.375 0-.7499997.3749906-1 1.125l-3 8c-1.9999998 4.000025 10 4.000025 8 0l-3-8c-.2499997-.7500094-.625-1.125-1-1.125zm-1.5 4.125c.9999999.4999937 2.0000001.4999937 3 0l1 3.5c-1.4999996.9999874-3.4999996.9999874-5 0z" fill="#e0e0e0"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/NavigationObstacle2D.svg b/editor/icons/NavigationObstacle2D.svg
new file mode 100644
index 0000000000..8a9c43ddad
--- /dev/null
+++ b/editor/icons/NavigationObstacle2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333335" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 .875c-.625 0-1.2499999.3749906-1.5 1.125l-2.9999999 10h8.9999999l-3-10c-.2499999-.7500094-.875-1.125-1.5-1.125zm-1.5 4.125h3l1 4h-5zm-4.5 8c-1 0-1 2 0 2h12c1 0 1-2 0-2z" fill="#e0e0e0" transform="scale(.26458333)"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_navigation_polygon.svg b/editor/icons/NavigationPolygon.svg
index df2ddb07f6..df2ddb07f6 100644
--- a/editor/icons/icon_navigation_polygon.svg
+++ b/editor/icons/NavigationPolygon.svg
diff --git a/editor/icons/NavigationRegion.svg b/editor/icons/NavigationRegion.svg
new file mode 100644
index 0000000000..61f43497b4
--- /dev/null
+++ b/editor/icons/NavigationRegion.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.1339223.0000569-.2535666.030668-.3652344.074219-.022275.00881-.041042.020919-.0625.03125-.088962.042467-.1681009.095499-.2382812.1601562-.021532.01952-.042739.037285-.0625.058594-.074111.081092-.13722.1698052-.1816406.2695312-.00343.00765-.00847.013733-.011719.021484l-.00195.00195c-.0452281.1091913-.0629952.2269004-.0683623.3457062-.0005086.0130821-.0078112.023903-.0078125.0371094v12c.0000552.552262.4477381.999945 1 1h4.8847656a2.1184381 2.1184381 0 0 1 .1328125-.744141l2.9999999-7.9999996a2.1184381 2.1184381 0 0 1 2.007813-1.3730469 2.1184381 2.1184381 0 0 1 1.957031 1.3730469l1.017578 2.7128906v-6.96875c-.000001-.013206-.0073-.024027-.0078-.037109-.0054-.1188058-.02313-.2365149-.06836-.3457031l-.002-.00195c-.0032-.00756-.0084-.013999-.01172-.021484-.04442-.099726-.107529-.188439-.18164-.2695312-.01976-.021308-.04097-.039073-.0625-.058594-.07018-.064657-.149319-.1176895-.238282-.1601562-.02146-.010331-.04022-.022439-.0625-.03125-.111631-.0435548-.231276-.0741656-.365198-.0742225zm10 6-3 8 3-2 3 2z" fill="#fc9c9c" fill-opacity=".996078" fill-rule="evenodd"/></svg> \ No newline at end of file
diff --git a/editor/icons/NavigationRegion2D.svg b/editor/icons/NavigationRegion2D.svg
new file mode 100644
index 0000000000..f22e9f64f7
--- /dev/null
+++ b/editor/icons/NavigationRegion2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.1339223.0000569-.2535666.0306675-.3652344.0742188-.022275.0088111-.0410424.0209185-.0625.03125-.0889622.0424668-.1681009.0954994-.2382812.1601562-.0215322.0195204-.0427394.0372854-.0625.0585938-.0741112.0810923-.13722.1698052-.1816406.2695312-.0034324.0076504-.0084746.0137334-.0117188.0214844l-.0019531.0019531c-.0452252.1091882-.0629923.2268973-.0683594.3457031-.0005086.0130821-.0078112.023903-.0078125.0371094v12c.0000552.552262.4477381.999945 1 1h4.8847656a2.1184381 2.1184381 0 0 1 .1328125-.744141l2.9999999-7.9999996a2.1184381 2.1184381 0 0 1 2.007813-1.3730469 2.1184381 2.1184381 0 0 1 1.957031 1.3730469l1.017578 2.7128906v-6.96875c-.000001-.0132064-.007305-.0240273-.007812-.0371094-.005369-.1188058-.023135-.2365149-.06836-.3457031l-.001953-.0019531c-.003155-.0075626-.008384-.0139987-.011719-.0214844-.044421-.099726-.107529-.188439-.18164-.2695312-.019761-.0213083-.040968-.0390734-.0625-.0585938-.070181-.0646568-.149319-.1176895-.238282-.1601562-.021457-.0103315-.040225-.022439-.0625-.03125-.111667-.0435511-.231312-.0741619-.365234-.0742188zm10 6-3 8 3-2 3 2z" fill="#a5b7f3" fill-opacity=".98824" fill-rule="evenodd"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_new.svg b/editor/icons/New.svg
index a3199e3fba..a3199e3fba 100644
--- a/editor/icons/icon_new.svg
+++ b/editor/icons/New.svg
diff --git a/editor/icons/icon_new_root.svg b/editor/icons/NewRoot.svg
index d32777d507..d32777d507 100644
--- a/editor/icons/icon_new_root.svg
+++ b/editor/icons/NewRoot.svg
diff --git a/editor/icons/icon_nil.svg b/editor/icons/Nil.svg
index 04a29abaaa..04a29abaaa 100644
--- a/editor/icons/icon_nil.svg
+++ b/editor/icons/Nil.svg
diff --git a/editor/icons/icon_nine_patch_rect.svg b/editor/icons/NinePatchRect.svg
index c5b04ec049..c5b04ec049 100644
--- a/editor/icons/icon_nine_patch_rect.svg
+++ b/editor/icons/NinePatchRect.svg
diff --git a/editor/icons/icon_node.svg b/editor/icons/Node.svg
index 93f0ce80b1..93f0ce80b1 100644
--- a/editor/icons/icon_node.svg
+++ b/editor/icons/Node.svg
diff --git a/editor/icons/icon_node_2d.svg b/editor/icons/Node2D.svg
index 5ca5754daa..5ca5754daa 100644
--- a/editor/icons/icon_node_2d.svg
+++ b/editor/icons/Node2D.svg
diff --git a/editor/icons/icon_node_path.svg b/editor/icons/NodePath.svg
index 580283b75a..580283b75a 100644
--- a/editor/icons/icon_node_path.svg
+++ b/editor/icons/NodePath.svg
diff --git a/editor/icons/icon_node_warning.svg b/editor/icons/NodeWarning.svg
index 587a49412e..587a49412e 100644
--- a/editor/icons/icon_node_warning.svg
+++ b/editor/icons/NodeWarning.svg
diff --git a/editor/icons/icon_non_favorite.svg b/editor/icons/NonFavorite.svg
index eb0ebf052c..eb0ebf052c 100644
--- a/editor/icons/icon_non_favorite.svg
+++ b/editor/icons/NonFavorite.svg
diff --git a/editor/icons/icon_o_r_m_material_3d.svg b/editor/icons/ORMMaterial3D.svg
index 3dd6013436..3dd6013436 100644
--- a/editor/icons/icon_o_r_m_material_3d.svg
+++ b/editor/icons/ORMMaterial3D.svg
diff --git a/editor/icons/icon_object.svg b/editor/icons/Object.svg
index c3d1b47538..c3d1b47538 100644
--- a/editor/icons/icon_object.svg
+++ b/editor/icons/Object.svg
diff --git a/editor/icons/icon_occluder_polygon_2d.svg b/editor/icons/OccluderPolygon2D.svg
index 19244f35ca..19244f35ca 100644
--- a/editor/icons/icon_occluder_polygon_2d.svg
+++ b/editor/icons/OccluderPolygon2D.svg
diff --git a/editor/icons/icon_omni_light.svg b/editor/icons/OmniLight.svg
index 6fa0454e8c..6fa0454e8c 100644
--- a/editor/icons/icon_omni_light.svg
+++ b/editor/icons/OmniLight.svg
diff --git a/editor/icons/icon_onion.svg b/editor/icons/Onion.svg
index ff1376c316..ff1376c316 100644
--- a/editor/icons/icon_onion.svg
+++ b/editor/icons/Onion.svg
diff --git a/editor/icons/icon_option_button.svg b/editor/icons/OptionButton.svg
index 6b4402481d..6b4402481d 100644
--- a/editor/icons/icon_option_button.svg
+++ b/editor/icons/OptionButton.svg
diff --git a/editor/icons/icon_overbright_indicator.svg b/editor/icons/OverbrightIndicator.svg
index 9e6f53b727..9e6f53b727 100644
--- a/editor/icons/icon_overbright_indicator.svg
+++ b/editor/icons/OverbrightIndicator.svg
diff --git a/editor/icons/icon_override.svg b/editor/icons/Override.svg
index 2d8a1fb309..2d8a1fb309 100644
--- a/editor/icons/icon_override.svg
+++ b/editor/icons/Override.svg
diff --git a/editor/icons/icon_pool_byte_array.svg b/editor/icons/PackedByteArray.svg
index 5409a47bc4..5409a47bc4 100644
--- a/editor/icons/icon_pool_byte_array.svg
+++ b/editor/icons/PackedByteArray.svg
diff --git a/editor/icons/icon_pool_color_array.svg b/editor/icons/PackedColorArray.svg
index 7a312d0e91..7a312d0e91 100644
--- a/editor/icons/icon_pool_color_array.svg
+++ b/editor/icons/PackedColorArray.svg
diff --git a/editor/icons/icon_packed_data_container.svg b/editor/icons/PackedDataContainer.svg
index 18bad53f66..18bad53f66 100644
--- a/editor/icons/icon_packed_data_container.svg
+++ b/editor/icons/PackedDataContainer.svg
diff --git a/editor/icons/icon_pool_real_array.svg b/editor/icons/PackedFloat32Array.svg
index 734f40cd05..734f40cd05 100644
--- a/editor/icons/icon_pool_real_array.svg
+++ b/editor/icons/PackedFloat32Array.svg
diff --git a/editor/icons/PackedFloat64Array.svg b/editor/icons/PackedFloat64Array.svg
new file mode 100644
index 0000000000..734f40cd05
--- /dev/null
+++ b/editor/icons/PackedFloat64Array.svg
@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m6 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1-1zm1 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5zm3 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2z" fill="#61daf4"/><path d="m7 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5z" fill="#fff" fill-opacity=".39216"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_pool_int_array.svg b/editor/icons/PackedInt32Array.svg
index a664b2d5fd..a664b2d5fd 100644
--- a/editor/icons/icon_pool_int_array.svg
+++ b/editor/icons/PackedInt32Array.svg
diff --git a/editor/icons/PackedInt64Array.svg b/editor/icons/PackedInt64Array.svg
new file mode 100644
index 0000000000..a664b2d5fd
--- /dev/null
+++ b/editor/icons/PackedInt64Array.svg
@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m3 2v2h2v-2zm2 2v2h-2v4h4v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3zm5 3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2h-2z" fill="#7dc6ef"/><path d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3z" fill="#fff" fill-opacity=".39216"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_packed_scene.svg b/editor/icons/PackedScene.svg
index 9c1d88db1c..9c1d88db1c 100644
--- a/editor/icons/icon_packed_scene.svg
+++ b/editor/icons/PackedScene.svg
diff --git a/editor/icons/icon_pool_string_array.svg b/editor/icons/PackedStringArray.svg
index 7e66f5f5e5..7e66f5f5e5 100644
--- a/editor/icons/icon_pool_string_array.svg
+++ b/editor/icons/PackedStringArray.svg
diff --git a/editor/icons/icon_pool_vector2_array.svg b/editor/icons/PackedVector2Array.svg
index 170512eb39..170512eb39 100644
--- a/editor/icons/icon_pool_vector2_array.svg
+++ b/editor/icons/PackedVector2Array.svg
diff --git a/editor/icons/icon_pool_vector3_array.svg b/editor/icons/PackedVector3Array.svg
index cd3578182f..cd3578182f 100644
--- a/editor/icons/icon_pool_vector3_array.svg
+++ b/editor/icons/PackedVector3Array.svg
diff --git a/editor/icons/icon_paint_vertex.svg b/editor/icons/PaintVertex.svg
index cab3716bf5..cab3716bf5 100644
--- a/editor/icons/icon_paint_vertex.svg
+++ b/editor/icons/PaintVertex.svg
diff --git a/editor/icons/icon_panel.svg b/editor/icons/Panel.svg
index 10a67bae7e..10a67bae7e 100644
--- a/editor/icons/icon_panel.svg
+++ b/editor/icons/Panel.svg
diff --git a/editor/icons/icon_panel_container.svg b/editor/icons/PanelContainer.svg
index 08c5492f7e..08c5492f7e 100644
--- a/editor/icons/icon_panel_container.svg
+++ b/editor/icons/PanelContainer.svg
diff --git a/editor/icons/icon_panels_1.svg b/editor/icons/Panels1.svg
index 850aad2cff..850aad2cff 100644
--- a/editor/icons/icon_panels_1.svg
+++ b/editor/icons/Panels1.svg
diff --git a/editor/icons/icon_panels_2.svg b/editor/icons/Panels2.svg
index 5f3fc6cf48..5f3fc6cf48 100644
--- a/editor/icons/icon_panels_2.svg
+++ b/editor/icons/Panels2.svg
diff --git a/editor/icons/icon_panels_2_alt.svg b/editor/icons/Panels2Alt.svg
index edee3a660f..edee3a660f 100644
--- a/editor/icons/icon_panels_2_alt.svg
+++ b/editor/icons/Panels2Alt.svg
diff --git a/editor/icons/icon_panels_3.svg b/editor/icons/Panels3.svg
index 3ddcb5e2ef..3ddcb5e2ef 100644
--- a/editor/icons/icon_panels_3.svg
+++ b/editor/icons/Panels3.svg
diff --git a/editor/icons/icon_panels_3_alt.svg b/editor/icons/Panels3Alt.svg
index 0f36a24da8..0f36a24da8 100644
--- a/editor/icons/icon_panels_3_alt.svg
+++ b/editor/icons/Panels3Alt.svg
diff --git a/editor/icons/icon_panels_4.svg b/editor/icons/Panels4.svg
index 7b2189087f..7b2189087f 100644
--- a/editor/icons/icon_panels_4.svg
+++ b/editor/icons/Panels4.svg
diff --git a/editor/icons/icon_panorama_sky.svg b/editor/icons/PanoramaSky.svg
index bfff6840bd..bfff6840bd 100644
--- a/editor/icons/icon_panorama_sky.svg
+++ b/editor/icons/PanoramaSky.svg
diff --git a/editor/icons/icon_parallax_background.svg b/editor/icons/ParallaxBackground.svg
index 09e6a7d19d..09e6a7d19d 100644
--- a/editor/icons/icon_parallax_background.svg
+++ b/editor/icons/ParallaxBackground.svg
diff --git a/editor/icons/icon_parallax_layer.svg b/editor/icons/ParallaxLayer.svg
index d8a5ef5e1f..d8a5ef5e1f 100644
--- a/editor/icons/icon_parallax_layer.svg
+++ b/editor/icons/ParallaxLayer.svg
diff --git a/editor/icons/icon_particles.svg b/editor/icons/Particles.svg
index f1378e3f8c..f1378e3f8c 100644
--- a/editor/icons/icon_particles.svg
+++ b/editor/icons/Particles.svg
diff --git a/editor/icons/icon_particles_2d.svg b/editor/icons/Particles2D.svg
index 7151194e36..7151194e36 100644
--- a/editor/icons/icon_particles_2d.svg
+++ b/editor/icons/Particles2D.svg
diff --git a/editor/icons/icon_particles_material.svg b/editor/icons/ParticlesMaterial.svg
index af45f9888a..af45f9888a 100644
--- a/editor/icons/icon_particles_material.svg
+++ b/editor/icons/ParticlesMaterial.svg
diff --git a/editor/icons/icon_path.svg b/editor/icons/Path.svg
index cde9a06903..cde9a06903 100644
--- a/editor/icons/icon_path.svg
+++ b/editor/icons/Path.svg
diff --git a/editor/icons/icon_path_2d.svg b/editor/icons/Path2D.svg
index 8aa0453b88..8aa0453b88 100644
--- a/editor/icons/icon_path_2d.svg
+++ b/editor/icons/Path2D.svg
diff --git a/editor/icons/icon_path_follow.svg b/editor/icons/PathFollow.svg
index 8e904ab5a5..8e904ab5a5 100644
--- a/editor/icons/icon_path_follow.svg
+++ b/editor/icons/PathFollow.svg
diff --git a/editor/icons/icon_path_follow_2d.svg b/editor/icons/PathFollow2D.svg
index 20a32f2d83..20a32f2d83 100644
--- a/editor/icons/icon_path_follow_2d.svg
+++ b/editor/icons/PathFollow2D.svg
diff --git a/editor/icons/icon_pause.svg b/editor/icons/Pause.svg
index 14c9971383..14c9971383 100644
--- a/editor/icons/icon_pause.svg
+++ b/editor/icons/Pause.svg
diff --git a/editor/icons/icon_physical_bone.svg b/editor/icons/PhysicalBone.svg
index 0a34eb6e48..0a34eb6e48 100644
--- a/editor/icons/icon_physical_bone.svg
+++ b/editor/icons/PhysicalBone.svg
diff --git a/editor/icons/icon_pin.svg b/editor/icons/Pin.svg
index 85cd815b64..85cd815b64 100644
--- a/editor/icons/icon_pin.svg
+++ b/editor/icons/Pin.svg
diff --git a/editor/icons/icon_pin_joint.svg b/editor/icons/PinJoint.svg
index 147553d316..147553d316 100644
--- a/editor/icons/icon_pin_joint.svg
+++ b/editor/icons/PinJoint.svg
diff --git a/editor/icons/icon_pin_joint_2d.svg b/editor/icons/PinJoint2D.svg
index f1dcafb923..f1dcafb923 100644
--- a/editor/icons/icon_pin_joint_2d.svg
+++ b/editor/icons/PinJoint2D.svg
diff --git a/editor/icons/icon_pin_pressed.svg b/editor/icons/PinPressed.svg
index 85cd815b64..85cd815b64 100644
--- a/editor/icons/icon_pin_pressed.svg
+++ b/editor/icons/PinPressed.svg
diff --git a/editor/icons/icon_plane.svg b/editor/icons/Plane.svg
index 3a943af0b3..3a943af0b3 100644
--- a/editor/icons/icon_plane.svg
+++ b/editor/icons/Plane.svg
diff --git a/editor/icons/PlaneMesh.svg b/editor/icons/PlaneMesh.svg
new file mode 100644
index 0000000000..2512fc9031
--- /dev/null
+++ b/editor/icons/PlaneMesh.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 4-7 4 7 4 7-4zm0 2 3.5 2-3.5 2-3.5-2z" fill="#ffd684"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_plane_shape.svg b/editor/icons/PlaneShape.svg
index 2c90cf6d53..2c90cf6d53 100644
--- a/editor/icons/icon_plane_shape.svg
+++ b/editor/icons/PlaneShape.svg
diff --git a/editor/icons/icon_play.svg b/editor/icons/Play.svg
index 4c16215a68..4c16215a68 100644
--- a/editor/icons/icon_play.svg
+++ b/editor/icons/Play.svg
diff --git a/editor/icons/icon_play_backwards.svg b/editor/icons/PlayBackwards.svg
index c98f15ea50..c98f15ea50 100644
--- a/editor/icons/icon_play_backwards.svg
+++ b/editor/icons/PlayBackwards.svg
diff --git a/editor/icons/icon_play_custom.svg b/editor/icons/PlayCustom.svg
index e19a8e7028..e19a8e7028 100644
--- a/editor/icons/icon_play_custom.svg
+++ b/editor/icons/PlayCustom.svg
diff --git a/editor/icons/icon_play_overlay.svg b/editor/icons/PlayOverlay.svg
index 1fb2da6596..1fb2da6596 100644
--- a/editor/icons/icon_play_overlay.svg
+++ b/editor/icons/PlayOverlay.svg
diff --git a/editor/icons/icon_play_scene.svg b/editor/icons/PlayScene.svg
index 5e5097fd66..5e5097fd66 100644
--- a/editor/icons/icon_play_scene.svg
+++ b/editor/icons/PlayScene.svg
diff --git a/editor/icons/icon_play_start.svg b/editor/icons/PlayStart.svg
index 2ade7371e0..2ade7371e0 100644
--- a/editor/icons/icon_play_start.svg
+++ b/editor/icons/PlayStart.svg
diff --git a/editor/icons/icon_play_start_backwards.svg b/editor/icons/PlayStartBackwards.svg
index 195f9a646e..195f9a646e 100644
--- a/editor/icons/icon_play_start_backwards.svg
+++ b/editor/icons/PlayStartBackwards.svg
diff --git a/editor/icons/icon_play_travel.svg b/editor/icons/PlayTravel.svg
index d772476e15..d772476e15 100644
--- a/editor/icons/icon_play_travel.svg
+++ b/editor/icons/PlayTravel.svg
diff --git a/editor/icons/icon_plugin_script.svg b/editor/icons/PluginScript.svg
index 0d080c132e..0d080c132e 100644
--- a/editor/icons/icon_plugin_script.svg
+++ b/editor/icons/PluginScript.svg
diff --git a/editor/icons/icon_point_mesh.svg b/editor/icons/PointMesh.svg
index 0504b7ff01..0504b7ff01 100644
--- a/editor/icons/icon_point_mesh.svg
+++ b/editor/icons/PointMesh.svg
diff --git a/editor/icons/Polygon2D.svg b/editor/icons/Polygon2D.svg
new file mode 100644
index 0000000000..6767992581
--- /dev/null
+++ b/editor/icons/Polygon2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12l-6 6z" fill="#a5b7f3" stroke="#a5b7f3" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_polygon_path_finder.svg b/editor/icons/PolygonPathFinder.svg
index b41067d08a..b41067d08a 100644
--- a/editor/icons/icon_polygon_path_finder.svg
+++ b/editor/icons/PolygonPathFinder.svg
diff --git a/editor/icons/icon_popup.svg b/editor/icons/Popup.svg
index 93f7e5000d..93f7e5000d 100644
--- a/editor/icons/icon_popup.svg
+++ b/editor/icons/Popup.svg
diff --git a/editor/icons/icon_popup_dialog.svg b/editor/icons/PopupDialog.svg
index d871e56a63..d871e56a63 100644
--- a/editor/icons/icon_popup_dialog.svg
+++ b/editor/icons/PopupDialog.svg
diff --git a/editor/icons/icon_popup_menu.svg b/editor/icons/PopupMenu.svg
index dd7b2bb0fd..dd7b2bb0fd 100644
--- a/editor/icons/icon_popup_menu.svg
+++ b/editor/icons/PopupMenu.svg
diff --git a/editor/icons/icon_popup_panel.svg b/editor/icons/PopupPanel.svg
index 47a5448f5b..47a5448f5b 100644
--- a/editor/icons/icon_popup_panel.svg
+++ b/editor/icons/PopupPanel.svg
diff --git a/editor/icons/icon_portal.svg b/editor/icons/Portal.svg
index 99d626e2f4..99d626e2f4 100644
--- a/editor/icons/icon_portal.svg
+++ b/editor/icons/Portal.svg
diff --git a/editor/icons/icon_position_2d.svg b/editor/icons/Position2D.svg
index 22d4ab05ca..22d4ab05ca 100644
--- a/editor/icons/icon_position_2d.svg
+++ b/editor/icons/Position2D.svg
diff --git a/editor/icons/icon_position_3d.svg b/editor/icons/Position3D.svg
index 0401942d69..0401942d69 100644
--- a/editor/icons/icon_position_3d.svg
+++ b/editor/icons/Position3D.svg
diff --git a/editor/icons/icon_prism_mesh.svg b/editor/icons/PrismMesh.svg
index c391652add..c391652add 100644
--- a/editor/icons/icon_prism_mesh.svg
+++ b/editor/icons/PrismMesh.svg
diff --git a/editor/icons/icon_procedural_sky.svg b/editor/icons/ProceduralSky.svg
index 356a966fe9..356a966fe9 100644
--- a/editor/icons/icon_procedural_sky.svg
+++ b/editor/icons/ProceduralSky.svg
diff --git a/editor/icons/icon_progress_1.svg b/editor/icons/Progress1.svg
index 01c2f8f334..01c2f8f334 100644
--- a/editor/icons/icon_progress_1.svg
+++ b/editor/icons/Progress1.svg
diff --git a/editor/icons/icon_progress_2.svg b/editor/icons/Progress2.svg
index a18ceb0381..a18ceb0381 100644
--- a/editor/icons/icon_progress_2.svg
+++ b/editor/icons/Progress2.svg
diff --git a/editor/icons/icon_progress_3.svg b/editor/icons/Progress3.svg
index 55b01dad83..55b01dad83 100644
--- a/editor/icons/icon_progress_3.svg
+++ b/editor/icons/Progress3.svg
diff --git a/editor/icons/icon_progress_4.svg b/editor/icons/Progress4.svg
index a038bbec70..a038bbec70 100644
--- a/editor/icons/icon_progress_4.svg
+++ b/editor/icons/Progress4.svg
diff --git a/editor/icons/icon_progress_5.svg b/editor/icons/Progress5.svg
index 64144978af..64144978af 100644
--- a/editor/icons/icon_progress_5.svg
+++ b/editor/icons/Progress5.svg
diff --git a/editor/icons/icon_progress_6.svg b/editor/icons/Progress6.svg
index 83b1806263..83b1806263 100644
--- a/editor/icons/icon_progress_6.svg
+++ b/editor/icons/Progress6.svg
diff --git a/editor/icons/icon_progress_7.svg b/editor/icons/Progress7.svg
index 77d4321a14..77d4321a14 100644
--- a/editor/icons/icon_progress_7.svg
+++ b/editor/icons/Progress7.svg
diff --git a/editor/icons/icon_progress_8.svg b/editor/icons/Progress8.svg
index ee76ba4499..ee76ba4499 100644
--- a/editor/icons/icon_progress_8.svg
+++ b/editor/icons/Progress8.svg
diff --git a/editor/icons/icon_progress_bar.svg b/editor/icons/ProgressBar.svg
index 70f99e3bbb..70f99e3bbb 100644
--- a/editor/icons/icon_progress_bar.svg
+++ b/editor/icons/ProgressBar.svg
diff --git a/editor/icons/icon_project_icon_loading.svg b/editor/icons/ProjectIconLoading.svg
index 3802b67654..3802b67654 100644
--- a/editor/icons/icon_project_icon_loading.svg
+++ b/editor/icons/ProjectIconLoading.svg
diff --git a/editor/icons/icon_proximity_group.svg b/editor/icons/ProximityGroup.svg
index 7df1cc9093..7df1cc9093 100644
--- a/editor/icons/icon_proximity_group.svg
+++ b/editor/icons/ProximityGroup.svg
diff --git a/editor/icons/icon_proxy_texture.svg b/editor/icons/ProxyTexture.svg
index 0c19363cb4..0c19363cb4 100644
--- a/editor/icons/icon_proxy_texture.svg
+++ b/editor/icons/ProxyTexture.svg
diff --git a/editor/icons/icon_quad.svg b/editor/icons/Quad.svg
index 4657e0b0bd..4657e0b0bd 100644
--- a/editor/icons/icon_quad.svg
+++ b/editor/icons/Quad.svg
diff --git a/editor/icons/icon_quad_mesh.svg b/editor/icons/QuadMesh.svg
index de0bd3e127..de0bd3e127 100644
--- a/editor/icons/icon_quad_mesh.svg
+++ b/editor/icons/QuadMesh.svg
diff --git a/editor/icons/icon_quat.svg b/editor/icons/Quat.svg
index 8702a3041a..8702a3041a 100644
--- a/editor/icons/icon_quat.svg
+++ b/editor/icons/Quat.svg
diff --git a/editor/icons/icon_r_i_d.svg b/editor/icons/RID.svg
index a6ace54d12..a6ace54d12 100644
--- a/editor/icons/icon_r_i_d.svg
+++ b/editor/icons/RID.svg
diff --git a/editor/icons/icon_ray_cast.svg b/editor/icons/RayCast.svg
index e782b27e9f..e782b27e9f 100644
--- a/editor/icons/icon_ray_cast.svg
+++ b/editor/icons/RayCast.svg
diff --git a/editor/icons/icon_ray_cast_2d.svg b/editor/icons/RayCast2D.svg
index 02faaa51c9..02faaa51c9 100644
--- a/editor/icons/icon_ray_cast_2d.svg
+++ b/editor/icons/RayCast2D.svg
diff --git a/editor/icons/icon_ray_shape.svg b/editor/icons/RayShape.svg
index 37c2206740..37c2206740 100644
--- a/editor/icons/icon_ray_shape.svg
+++ b/editor/icons/RayShape.svg
diff --git a/editor/icons/icon_ray_shape_2d.svg b/editor/icons/RayShape2D.svg
index 109c254fc3..109c254fc3 100644
--- a/editor/icons/icon_ray_shape_2d.svg
+++ b/editor/icons/RayShape2D.svg
diff --git a/editor/icons/icon_rayito.svg b/editor/icons/Rayito.svg
index 4fd6a2827b..4fd6a2827b 100644
--- a/editor/icons/icon_rayito.svg
+++ b/editor/icons/Rayito.svg
diff --git a/editor/icons/icon_rect2.svg b/editor/icons/Rect2.svg
index 25feb52cab..25feb52cab 100644
--- a/editor/icons/icon_rect2.svg
+++ b/editor/icons/Rect2.svg
diff --git a/editor/icons/Rect2i.svg b/editor/icons/Rect2i.svg
new file mode 100644
index 0000000000..d28c098ed6
--- /dev/null
+++ b/editor/icons/Rect2i.svg
@@ -0,0 +1,4 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m9 2v2h-1c-1.7267 0-3 1.3359-3 3 0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228 0-1-0.44772-1-1s0.44772-1 1-1h1v1c0 1.6569 1.3431 3 3 3v-2c-0.55228 0-0.93526-0.45152-1-1v-1h1v-2h-1v-2zm-5 2c-1.6569 0-2.9547 1.3438-3 3v3h2v-3c0-0.55228 0.44772-1 1-1h1v-2z" fill="#f191a5"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_rectangle_shape_2d.svg b/editor/icons/RectangleShape2D.svg
index 437547ece3..437547ece3 100644
--- a/editor/icons/icon_rectangle_shape_2d.svg
+++ b/editor/icons/RectangleShape2D.svg
diff --git a/editor/icons/icon_reference_rect.svg b/editor/icons/ReferenceRect.svg
index 2fd530d584..2fd530d584 100644
--- a/editor/icons/icon_reference_rect.svg
+++ b/editor/icons/ReferenceRect.svg
diff --git a/editor/icons/icon_reflection_probe.svg b/editor/icons/ReflectionProbe.svg
index 6bf9cc9013..6bf9cc9013 100644
--- a/editor/icons/icon_reflection_probe.svg
+++ b/editor/icons/ReflectionProbe.svg
diff --git a/editor/icons/icon_region_edit.svg b/editor/icons/RegionEdit.svg
index 8443c0e454..8443c0e454 100644
--- a/editor/icons/icon_region_edit.svg
+++ b/editor/icons/RegionEdit.svg
diff --git a/editor/icons/icon_reload.svg b/editor/icons/Reload.svg
index 223a725332..223a725332 100644
--- a/editor/icons/icon_reload.svg
+++ b/editor/icons/Reload.svg
diff --git a/editor/icons/icon_reload_small.svg b/editor/icons/ReloadSmall.svg
index ce707b645a..ce707b645a 100644
--- a/editor/icons/icon_reload_small.svg
+++ b/editor/icons/ReloadSmall.svg
diff --git a/editor/icons/icon_remote_transform.svg b/editor/icons/RemoteTransform.svg
index 2bdf8cd858..2bdf8cd858 100644
--- a/editor/icons/icon_remote_transform.svg
+++ b/editor/icons/RemoteTransform.svg
diff --git a/editor/icons/icon_remote_transform_2d.svg b/editor/icons/RemoteTransform2D.svg
index 51c9e084df..51c9e084df 100644
--- a/editor/icons/icon_remote_transform_2d.svg
+++ b/editor/icons/RemoteTransform2D.svg
diff --git a/editor/icons/icon_remove.svg b/editor/icons/Remove.svg
index 9372eb08b5..9372eb08b5 100644
--- a/editor/icons/icon_remove.svg
+++ b/editor/icons/Remove.svg
diff --git a/editor/icons/icon_remove_internal.svg b/editor/icons/RemoveInternal.svg
index 0a7e06e6cd..0a7e06e6cd 100644
--- a/editor/icons/icon_remove_internal.svg
+++ b/editor/icons/RemoveInternal.svg
diff --git a/editor/icons/icon_rename.svg b/editor/icons/Rename.svg
index 01923e3a0a..01923e3a0a 100644
--- a/editor/icons/icon_rename.svg
+++ b/editor/icons/Rename.svg
diff --git a/editor/icons/icon_reparent.svg b/editor/icons/Reparent.svg
index 39b79cd3a1..39b79cd3a1 100644
--- a/editor/icons/icon_reparent.svg
+++ b/editor/icons/Reparent.svg
diff --git a/editor/icons/icon_reparent_to_new_node.svg b/editor/icons/ReparentToNewNode.svg
index 37fbee848c..37fbee848c 100644
--- a/editor/icons/icon_reparent_to_new_node.svg
+++ b/editor/icons/ReparentToNewNode.svg
diff --git a/editor/icons/icon_resource_preloader.svg b/editor/icons/ResourcePreloader.svg
index 417e63b604..417e63b604 100644
--- a/editor/icons/icon_resource_preloader.svg
+++ b/editor/icons/ResourcePreloader.svg
diff --git a/editor/icons/icon_rich_text_effect.svg b/editor/icons/RichTextEffect.svg
index afe08685bd..afe08685bd 100644
--- a/editor/icons/icon_rich_text_effect.svg
+++ b/editor/icons/RichTextEffect.svg
diff --git a/editor/icons/icon_rich_text_label.svg b/editor/icons/RichTextLabel.svg
index 3f4b33707c..3f4b33707c 100644
--- a/editor/icons/icon_rich_text_label.svg
+++ b/editor/icons/RichTextLabel.svg
diff --git a/editor/icons/icon_rigid_body.svg b/editor/icons/RigidBody.svg
index 5d766f7c3d..5d766f7c3d 100644
--- a/editor/icons/icon_rigid_body.svg
+++ b/editor/icons/RigidBody.svg
diff --git a/editor/icons/icon_rigid_body_2d.svg b/editor/icons/RigidBody2D.svg
index bb97fa650b..bb97fa650b 100644
--- a/editor/icons/icon_rigid_body_2d.svg
+++ b/editor/icons/RigidBody2D.svg
diff --git a/editor/icons/icon_room.svg b/editor/icons/Room.svg
index 799be9f99a..799be9f99a 100644
--- a/editor/icons/icon_room.svg
+++ b/editor/icons/Room.svg
diff --git a/editor/icons/icon_room_bounds.svg b/editor/icons/RoomBounds.svg
index ad90944ac6..ad90944ac6 100644
--- a/editor/icons/icon_room_bounds.svg
+++ b/editor/icons/RoomBounds.svg
diff --git a/editor/icons/icon_rotate_0.svg b/editor/icons/Rotate0.svg
index 96174ca93b..96174ca93b 100644
--- a/editor/icons/icon_rotate_0.svg
+++ b/editor/icons/Rotate0.svg
diff --git a/editor/icons/icon_rotate_180.svg b/editor/icons/Rotate180.svg
index 11415e1e19..11415e1e19 100644
--- a/editor/icons/icon_rotate_180.svg
+++ b/editor/icons/Rotate180.svg
diff --git a/editor/icons/icon_rotate_270.svg b/editor/icons/Rotate270.svg
index be26bc4337..be26bc4337 100644
--- a/editor/icons/icon_rotate_270.svg
+++ b/editor/icons/Rotate270.svg
diff --git a/editor/icons/icon_rotate_90.svg b/editor/icons/Rotate90.svg
index d46c56a1fc..d46c56a1fc 100644
--- a/editor/icons/icon_rotate_90.svg
+++ b/editor/icons/Rotate90.svg
diff --git a/editor/icons/icon_rotate_left.svg b/editor/icons/RotateLeft.svg
index 223a725332..223a725332 100644
--- a/editor/icons/icon_rotate_left.svg
+++ b/editor/icons/RotateLeft.svg
diff --git a/editor/icons/icon_rotate_right.svg b/editor/icons/RotateRight.svg
index 2b66bae998..2b66bae998 100644
--- a/editor/icons/icon_rotate_right.svg
+++ b/editor/icons/RotateRight.svg
diff --git a/editor/icons/icon_ruler.svg b/editor/icons/Ruler.svg
index dbe02102ec..dbe02102ec 100644
--- a/editor/icons/icon_ruler.svg
+++ b/editor/icons/Ruler.svg
diff --git a/editor/icons/icon_sample_library.svg b/editor/icons/SampleLibrary.svg
index e83a1a3778..e83a1a3778 100644
--- a/editor/icons/icon_sample_library.svg
+++ b/editor/icons/SampleLibrary.svg
diff --git a/editor/icons/icon_save.svg b/editor/icons/Save.svg
index be5d3ef6fd..be5d3ef6fd 100644
--- a/editor/icons/icon_save.svg
+++ b/editor/icons/Save.svg
diff --git a/editor/icons/icon_script.svg b/editor/icons/Script.svg
index 1c6ec51a48..1c6ec51a48 100644
--- a/editor/icons/icon_script.svg
+++ b/editor/icons/Script.svg
diff --git a/editor/icons/icon_script_create.svg b/editor/icons/ScriptCreate.svg
index 0a03907a13..0a03907a13 100644
--- a/editor/icons/icon_script_create.svg
+++ b/editor/icons/ScriptCreate.svg
diff --git a/editor/icons/icon_script_create_dialog.svg b/editor/icons/ScriptCreateDialog.svg
index 751b799ba9..751b799ba9 100644
--- a/editor/icons/icon_script_create_dialog.svg
+++ b/editor/icons/ScriptCreateDialog.svg
diff --git a/editor/icons/icon_script_extend.svg b/editor/icons/ScriptExtend.svg
index efa0077ab1..efa0077ab1 100644
--- a/editor/icons/icon_script_extend.svg
+++ b/editor/icons/ScriptExtend.svg
diff --git a/editor/icons/icon_script_remove.svg b/editor/icons/ScriptRemove.svg
index de67d02947..de67d02947 100644
--- a/editor/icons/icon_script_remove.svg
+++ b/editor/icons/ScriptRemove.svg
diff --git a/editor/icons/icon_scroll_container.svg b/editor/icons/ScrollContainer.svg
index 738748ca91..738748ca91 100644
--- a/editor/icons/icon_scroll_container.svg
+++ b/editor/icons/ScrollContainer.svg
diff --git a/editor/icons/icon_search.svg b/editor/icons/Search.svg
index 04dc4f7372..04dc4f7372 100644
--- a/editor/icons/icon_search.svg
+++ b/editor/icons/Search.svg
diff --git a/editor/icons/icon_segment_shape_2d.svg b/editor/icons/SegmentShape2D.svg
index e4c04ae7c6..e4c04ae7c6 100644
--- a/editor/icons/icon_segment_shape_2d.svg
+++ b/editor/icons/SegmentShape2D.svg
diff --git a/editor/icons/icon_shader.svg b/editor/icons/Shader.svg
index 479379d235..479379d235 100644
--- a/editor/icons/icon_shader.svg
+++ b/editor/icons/Shader.svg
diff --git a/editor/icons/icon_shader_material.svg b/editor/icons/ShaderMaterial.svg
index 37c1610f29..37c1610f29 100644
--- a/editor/icons/icon_shader_material.svg
+++ b/editor/icons/ShaderMaterial.svg
diff --git a/editor/icons/icon_short_cut.svg b/editor/icons/ShortCut.svg
index f4e302efdb..f4e302efdb 100644
--- a/editor/icons/icon_short_cut.svg
+++ b/editor/icons/ShortCut.svg
diff --git a/editor/icons/icon_signal.svg b/editor/icons/Signal.svg
index 82fdf2b059..82fdf2b059 100644
--- a/editor/icons/icon_signal.svg
+++ b/editor/icons/Signal.svg
diff --git a/editor/icons/icon_signals.svg b/editor/icons/Signals.svg
index 9c09546f84..9c09546f84 100644
--- a/editor/icons/icon_signals.svg
+++ b/editor/icons/Signals.svg
diff --git a/editor/icons/icon_signals_and_groups.svg b/editor/icons/SignalsAndGroups.svg
index d568296d5f..d568296d5f 100644
--- a/editor/icons/icon_signals_and_groups.svg
+++ b/editor/icons/SignalsAndGroups.svg
diff --git a/editor/icons/icon_skeleton.svg b/editor/icons/Skeleton.svg
index 015c842125..015c842125 100644
--- a/editor/icons/icon_skeleton.svg
+++ b/editor/icons/Skeleton.svg
diff --git a/editor/icons/icon_skeleton_2d.svg b/editor/icons/Skeleton2D.svg
index 8e38b5c971..8e38b5c971 100644
--- a/editor/icons/icon_skeleton_2d.svg
+++ b/editor/icons/Skeleton2D.svg
diff --git a/editor/icons/icon_skeleton_i_k.svg b/editor/icons/SkeletonIK.svg
index e69f6e8bf3..e69f6e8bf3 100644
--- a/editor/icons/icon_skeleton_i_k.svg
+++ b/editor/icons/SkeletonIK.svg
diff --git a/editor/icons/icon_slider_joint.svg b/editor/icons/SliderJoint.svg
index fdd7487bbf..fdd7487bbf 100644
--- a/editor/icons/icon_slider_joint.svg
+++ b/editor/icons/SliderJoint.svg
diff --git a/editor/icons/icon_slot.svg b/editor/icons/Slot.svg
index 24d54297a8..24d54297a8 100644
--- a/editor/icons/icon_slot.svg
+++ b/editor/icons/Slot.svg
diff --git a/editor/icons/icon_snap.svg b/editor/icons/Snap.svg
index 632cf6c27d..632cf6c27d 100644
--- a/editor/icons/icon_snap.svg
+++ b/editor/icons/Snap.svg
diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/SnapGrid.svg
index a4a1f33053..a4a1f33053 100644
--- a/editor/icons/icon_snap_grid.svg
+++ b/editor/icons/SnapGrid.svg
diff --git a/editor/icons/icon_soft_body.svg b/editor/icons/SoftBody.svg
index 2c907df847..2c907df847 100644
--- a/editor/icons/icon_soft_body.svg
+++ b/editor/icons/SoftBody.svg
diff --git a/editor/icons/icon_sort.svg b/editor/icons/Sort.svg
index 0b2f7f7ea9..0b2f7f7ea9 100644
--- a/editor/icons/icon_sort.svg
+++ b/editor/icons/Sort.svg
diff --git a/editor/icons/icon_spatial.svg b/editor/icons/Spatial.svg
index 6a469dde13..6a469dde13 100644
--- a/editor/icons/icon_spatial.svg
+++ b/editor/icons/Spatial.svg
diff --git a/editor/icons/icon_spatial_material.svg b/editor/icons/SpatialMaterial.svg
index cfd994a0fe..cfd994a0fe 100644
--- a/editor/icons/icon_spatial_material.svg
+++ b/editor/icons/SpatialMaterial.svg
diff --git a/editor/icons/icon_sphere_mesh.svg b/editor/icons/SphereMesh.svg
index b01ba46bcf..b01ba46bcf 100644
--- a/editor/icons/icon_sphere_mesh.svg
+++ b/editor/icons/SphereMesh.svg
diff --git a/editor/icons/icon_sphere_shape.svg b/editor/icons/SphereShape.svg
index 4da18a1a38..4da18a1a38 100644
--- a/editor/icons/icon_sphere_shape.svg
+++ b/editor/icons/SphereShape.svg
diff --git a/editor/icons/icon_spin_box.svg b/editor/icons/SpinBox.svg
index 728710e440..728710e440 100644
--- a/editor/icons/icon_spin_box.svg
+++ b/editor/icons/SpinBox.svg
diff --git a/editor/icons/icon_spot_light.svg b/editor/icons/SpotLight.svg
index 6a35ee3890..6a35ee3890 100644
--- a/editor/icons/icon_spot_light.svg
+++ b/editor/icons/SpotLight.svg
diff --git a/editor/icons/icon_spring_arm.svg b/editor/icons/SpringArm.svg
index eb0c1ebd7d..eb0c1ebd7d 100644
--- a/editor/icons/icon_spring_arm.svg
+++ b/editor/icons/SpringArm.svg
diff --git a/editor/icons/icon_sprite.svg b/editor/icons/Sprite.svg
index 26a10625fc..26a10625fc 100644
--- a/editor/icons/icon_sprite.svg
+++ b/editor/icons/Sprite.svg
diff --git a/editor/icons/icon_sprite_3d.svg b/editor/icons/Sprite3D.svg
index 385bb8f87d..385bb8f87d 100644
--- a/editor/icons/icon_sprite_3d.svg
+++ b/editor/icons/Sprite3D.svg
diff --git a/editor/icons/icon_sprite_frames.svg b/editor/icons/SpriteFrames.svg
index f27adcb78c..f27adcb78c 100644
--- a/editor/icons/icon_sprite_frames.svg
+++ b/editor/icons/SpriteFrames.svg
diff --git a/editor/icons/icon_sprite_sheet.svg b/editor/icons/SpriteSheet.svg
index 9b3eda3287..9b3eda3287 100644
--- a/editor/icons/icon_sprite_sheet.svg
+++ b/editor/icons/SpriteSheet.svg
diff --git a/editor/icons/icon_standard_material_3d.svg b/editor/icons/StandardMaterial3D.svg
index aa8bfc9a5b..aa8bfc9a5b 100644
--- a/editor/icons/icon_standard_material_3d.svg
+++ b/editor/icons/StandardMaterial3D.svg
diff --git a/editor/icons/icon_static_body.svg b/editor/icons/StaticBody.svg
index de819bd76b..de819bd76b 100644
--- a/editor/icons/icon_static_body.svg
+++ b/editor/icons/StaticBody.svg
diff --git a/editor/icons/icon_static_body_2d.svg b/editor/icons/StaticBody2D.svg
index 2d846c5471..2d846c5471 100644
--- a/editor/icons/icon_static_body_2d.svg
+++ b/editor/icons/StaticBody2D.svg
diff --git a/editor/icons/icon_status_error.svg b/editor/icons/StatusError.svg
index ac3060e155..ac3060e155 100644
--- a/editor/icons/icon_status_error.svg
+++ b/editor/icons/StatusError.svg
diff --git a/editor/icons/icon_status_success.svg b/editor/icons/StatusSuccess.svg
index 4a22c6fc7f..4a22c6fc7f 100644
--- a/editor/icons/icon_status_success.svg
+++ b/editor/icons/StatusSuccess.svg
diff --git a/editor/icons/icon_status_warning.svg b/editor/icons/StatusWarning.svg
index 4ec16008d7..4ec16008d7 100644
--- a/editor/icons/icon_status_warning.svg
+++ b/editor/icons/StatusWarning.svg
diff --git a/editor/icons/icon_stop.svg b/editor/icons/Stop.svg
index 2cb013c0df..2cb013c0df 100644
--- a/editor/icons/icon_stop.svg
+++ b/editor/icons/Stop.svg
diff --git a/editor/icons/icon_stream_texture.svg b/editor/icons/StreamTexture.svg
index e7845e10f3..e7845e10f3 100644
--- a/editor/icons/icon_stream_texture.svg
+++ b/editor/icons/StreamTexture.svg
diff --git a/editor/icons/icon_string.svg b/editor/icons/String.svg
index 9f3bb0b011..9f3bb0b011 100644
--- a/editor/icons/icon_string.svg
+++ b/editor/icons/String.svg
diff --git a/editor/icons/StringName.svg b/editor/icons/StringName.svg
new file mode 100644
index 0000000000..bedaa6d634
--- /dev/null
+++ b/editor/icons/StringName.svg
@@ -0,0 +1,4 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m5 2c-1.6569 0-3 1.3431-3 3v2c0 0.55228-0.44772 1-1 1h-1v2h1c1.6569 0 3-1.3431 3-3v-2c0-0.55228 0.44772-1 1-1h1v3c0 1.6569 1.3431 3 3 3h3v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-5v-2zm3 4h2v2h-1c-0.55228 0-1-0.44772-1-1z" fill="#6ba7ec"/>
+<path d="m10 4v6h2v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-1z" fill="#fff" fill-opacity=".39216"/>
+</svg>
diff --git a/editor/icons/icon_style_box_empty.svg b/editor/icons/StyleBoxEmpty.svg
index 0268b03ef2..0268b03ef2 100644
--- a/editor/icons/icon_style_box_empty.svg
+++ b/editor/icons/StyleBoxEmpty.svg
diff --git a/editor/icons/icon_style_box_flat.svg b/editor/icons/StyleBoxFlat.svg
index a6f43be4c8..a6f43be4c8 100644
--- a/editor/icons/icon_style_box_flat.svg
+++ b/editor/icons/StyleBoxFlat.svg
diff --git a/editor/icons/icon_style_box_line.svg b/editor/icons/StyleBoxLine.svg
index d7c26aac9d..d7c26aac9d 100644
--- a/editor/icons/icon_style_box_line.svg
+++ b/editor/icons/StyleBoxLine.svg
diff --git a/editor/icons/icon_style_box_texture.svg b/editor/icons/StyleBoxTexture.svg
index 6f067a4db4..6f067a4db4 100644
--- a/editor/icons/icon_style_box_texture.svg
+++ b/editor/icons/StyleBoxTexture.svg
diff --git a/editor/icons/icon_tab_container.svg b/editor/icons/TabContainer.svg
index fe0e426ef9..fe0e426ef9 100644
--- a/editor/icons/icon_tab_container.svg
+++ b/editor/icons/TabContainer.svg
diff --git a/editor/icons/icon_tabs.svg b/editor/icons/Tabs.svg
index ad1e9069d0..ad1e9069d0 100644
--- a/editor/icons/icon_tabs.svg
+++ b/editor/icons/Tabs.svg
diff --git a/editor/icons/icon_test_cube.svg b/editor/icons/TestCube.svg
index 16cf68520f..16cf68520f 100644
--- a/editor/icons/icon_test_cube.svg
+++ b/editor/icons/TestCube.svg
diff --git a/editor/icons/icon_text_edit.svg b/editor/icons/TextEdit.svg
index 66f2fca4ba..66f2fca4ba 100644
--- a/editor/icons/icon_text_edit.svg
+++ b/editor/icons/TextEdit.svg
diff --git a/editor/icons/icon_text_file.svg b/editor/icons/TextFile.svg
index d381048212..d381048212 100644
--- a/editor/icons/icon_text_file.svg
+++ b/editor/icons/TextFile.svg
diff --git a/editor/icons/icon_texture_3_d.svg b/editor/icons/Texture3D.svg
index ed8ce3e4ef..ed8ce3e4ef 100644
--- a/editor/icons/icon_texture_3_d.svg
+++ b/editor/icons/Texture3D.svg
diff --git a/editor/icons/icon_texture_array.svg b/editor/icons/TextureArray.svg
index 4631b1449c..4631b1449c 100644
--- a/editor/icons/icon_texture_array.svg
+++ b/editor/icons/TextureArray.svg
diff --git a/editor/icons/icon_texture_button.svg b/editor/icons/TextureButton.svg
index 6e1d1b6436..6e1d1b6436 100644
--- a/editor/icons/icon_texture_button.svg
+++ b/editor/icons/TextureButton.svg
diff --git a/editor/icons/icon_texture_progress.svg b/editor/icons/TextureProgress.svg
index 5763fde840..5763fde840 100644
--- a/editor/icons/icon_texture_progress.svg
+++ b/editor/icons/TextureProgress.svg
diff --git a/editor/icons/icon_texture_rect.svg b/editor/icons/TextureRect.svg
index 1d1b5ed8f7..1d1b5ed8f7 100644
--- a/editor/icons/icon_texture_rect.svg
+++ b/editor/icons/TextureRect.svg
diff --git a/editor/icons/icon_theme.svg b/editor/icons/Theme.svg
index e16acbfb72..e16acbfb72 100644
--- a/editor/icons/icon_theme.svg
+++ b/editor/icons/Theme.svg
diff --git a/editor/icons/icon_thumbnail_wait.svg b/editor/icons/ThumbnailWait.svg
index fe242e81fb..fe242e81fb 100644
--- a/editor/icons/icon_thumbnail_wait.svg
+++ b/editor/icons/ThumbnailWait.svg
diff --git a/editor/icons/icon_tile_map.svg b/editor/icons/TileMap.svg
index afdaeea7e8..afdaeea7e8 100644
--- a/editor/icons/icon_tile_map.svg
+++ b/editor/icons/TileMap.svg
diff --git a/editor/icons/icon_tile_set.svg b/editor/icons/TileSet.svg
index 0948e6dae1..0948e6dae1 100644
--- a/editor/icons/icon_tile_set.svg
+++ b/editor/icons/TileSet.svg
diff --git a/editor/icons/icon_time.svg b/editor/icons/Time.svg
index eb411c6858..eb411c6858 100644
--- a/editor/icons/icon_time.svg
+++ b/editor/icons/Time.svg
diff --git a/editor/icons/icon_timeline_indicator.svg b/editor/icons/TimelineIndicator.svg
index fd18192705..fd18192705 100644
--- a/editor/icons/icon_timeline_indicator.svg
+++ b/editor/icons/TimelineIndicator.svg
diff --git a/editor/icons/icon_timer.svg b/editor/icons/Timer.svg
index d445eeb1dd..d445eeb1dd 100644
--- a/editor/icons/icon_timer.svg
+++ b/editor/icons/Timer.svg
diff --git a/editor/icons/icon_tool_add_node.svg b/editor/icons/ToolAddNode.svg
index 71599c0b0d..71599c0b0d 100644
--- a/editor/icons/icon_tool_add_node.svg
+++ b/editor/icons/ToolAddNode.svg
diff --git a/editor/icons/icon_tool_button.svg b/editor/icons/ToolButton.svg
index 98a41d2a08..98a41d2a08 100644
--- a/editor/icons/icon_tool_button.svg
+++ b/editor/icons/ToolButton.svg
diff --git a/editor/icons/icon_tool_connect.svg b/editor/icons/ToolConnect.svg
index 321f68654a..321f68654a 100644
--- a/editor/icons/icon_tool_connect.svg
+++ b/editor/icons/ToolConnect.svg
diff --git a/editor/icons/icon_tool_move.svg b/editor/icons/ToolMove.svg
index a02296fed6..a02296fed6 100644
--- a/editor/icons/icon_tool_move.svg
+++ b/editor/icons/ToolMove.svg
diff --git a/editor/icons/icon_tool_pan.svg b/editor/icons/ToolPan.svg
index e195542687..e195542687 100644
--- a/editor/icons/icon_tool_pan.svg
+++ b/editor/icons/ToolPan.svg
diff --git a/editor/icons/icon_tool_rotate.svg b/editor/icons/ToolRotate.svg
index e25b08cd07..e25b08cd07 100644
--- a/editor/icons/icon_tool_rotate.svg
+++ b/editor/icons/ToolRotate.svg
diff --git a/editor/icons/icon_tool_scale.svg b/editor/icons/ToolScale.svg
index 8fc1527296..8fc1527296 100644
--- a/editor/icons/icon_tool_scale.svg
+++ b/editor/icons/ToolScale.svg
diff --git a/editor/icons/icon_tool_select.svg b/editor/icons/ToolSelect.svg
index 4285b3181b..4285b3181b 100644
--- a/editor/icons/icon_tool_select.svg
+++ b/editor/icons/ToolSelect.svg
diff --git a/editor/icons/icon_tool_triangle.svg b/editor/icons/ToolTriangle.svg
index 17ce12265e..17ce12265e 100644
--- a/editor/icons/icon_tool_triangle.svg
+++ b/editor/icons/ToolTriangle.svg
diff --git a/editor/icons/icon_tools.svg b/editor/icons/Tools.svg
index dc002d6a4d..dc002d6a4d 100644
--- a/editor/icons/icon_tools.svg
+++ b/editor/icons/Tools.svg
diff --git a/editor/icons/icon_touch_screen_button.svg b/editor/icons/TouchScreenButton.svg
index d29e411f05..d29e411f05 100644
--- a/editor/icons/icon_touch_screen_button.svg
+++ b/editor/icons/TouchScreenButton.svg
diff --git a/editor/icons/icon_track_add_key.svg b/editor/icons/TrackAddKey.svg
index 582003cd9b..582003cd9b 100644
--- a/editor/icons/icon_track_add_key.svg
+++ b/editor/icons/TrackAddKey.svg
diff --git a/editor/icons/icon_track_add_key_hl.svg b/editor/icons/TrackAddKeyHl.svg
index 7f3c60a562..7f3c60a562 100644
--- a/editor/icons/icon_track_add_key_hl.svg
+++ b/editor/icons/TrackAddKeyHl.svg
diff --git a/editor/icons/icon_track_capture.svg b/editor/icons/TrackCapture.svg
index 51a38ff1fb..51a38ff1fb 100644
--- a/editor/icons/icon_track_capture.svg
+++ b/editor/icons/TrackCapture.svg
diff --git a/editor/icons/icon_track_color.svg b/editor/icons/TrackColor.svg
index 6a736c7a84..6a736c7a84 100644
--- a/editor/icons/icon_track_color.svg
+++ b/editor/icons/TrackColor.svg
diff --git a/editor/icons/icon_track_continuous.svg b/editor/icons/TrackContinuous.svg
index 2e89cdd821..2e89cdd821 100644
--- a/editor/icons/icon_track_continuous.svg
+++ b/editor/icons/TrackContinuous.svg
diff --git a/editor/icons/icon_track_discrete.svg b/editor/icons/TrackDiscrete.svg
index a0550822bf..a0550822bf 100644
--- a/editor/icons/icon_track_discrete.svg
+++ b/editor/icons/TrackDiscrete.svg
diff --git a/editor/icons/icon_track_trigger.svg b/editor/icons/TrackTrigger.svg
index 5572b254a2..5572b254a2 100644
--- a/editor/icons/icon_track_trigger.svg
+++ b/editor/icons/TrackTrigger.svg
diff --git a/editor/icons/icon_transform.svg b/editor/icons/Transform.svg
index 0ed5377ed7..0ed5377ed7 100644
--- a/editor/icons/icon_transform.svg
+++ b/editor/icons/Transform.svg
diff --git a/editor/icons/icon_transform_2_D.svg b/editor/icons/Transform2D.svg
index a57587ba06..a57587ba06 100644
--- a/editor/icons/icon_transform_2_D.svg
+++ b/editor/icons/Transform2D.svg
diff --git a/editor/icons/icon_transition_end.svg b/editor/icons/TransitionEnd.svg
index 8d6857432f..8d6857432f 100644
--- a/editor/icons/icon_transition_end.svg
+++ b/editor/icons/TransitionEnd.svg
diff --git a/editor/icons/icon_transition_end_auto.svg b/editor/icons/TransitionEndAuto.svg
index fbfa7b03db..fbfa7b03db 100644
--- a/editor/icons/icon_transition_end_auto.svg
+++ b/editor/icons/TransitionEndAuto.svg
diff --git a/editor/icons/icon_transition_end_auto_big.svg b/editor/icons/TransitionEndAutoBig.svg
index fcc894a3e6..fcc894a3e6 100644
--- a/editor/icons/icon_transition_end_auto_big.svg
+++ b/editor/icons/TransitionEndAutoBig.svg
diff --git a/editor/icons/icon_transition_end_big.svg b/editor/icons/TransitionEndBig.svg
index cc93dd5808..cc93dd5808 100644
--- a/editor/icons/icon_transition_end_big.svg
+++ b/editor/icons/TransitionEndBig.svg
diff --git a/editor/icons/icon_transition_immediate.svg b/editor/icons/TransitionImmediate.svg
index 56e9b6c0f3..56e9b6c0f3 100644
--- a/editor/icons/icon_transition_immediate.svg
+++ b/editor/icons/TransitionImmediate.svg
diff --git a/editor/icons/icon_transition_immediate_auto.svg b/editor/icons/TransitionImmediateAuto.svg
index 8453bcff08..8453bcff08 100644
--- a/editor/icons/icon_transition_immediate_auto.svg
+++ b/editor/icons/TransitionImmediateAuto.svg
diff --git a/editor/icons/icon_transition_immediate_auto_big.svg b/editor/icons/TransitionImmediateAutoBig.svg
index 77f7ba592e..77f7ba592e 100644
--- a/editor/icons/icon_transition_immediate_auto_big.svg
+++ b/editor/icons/TransitionImmediateAutoBig.svg
diff --git a/editor/icons/icon_transition_immediate_big.svg b/editor/icons/TransitionImmediateBig.svg
index 94584c45f7..94584c45f7 100644
--- a/editor/icons/icon_transition_immediate_big.svg
+++ b/editor/icons/TransitionImmediateBig.svg
diff --git a/editor/icons/icon_transition_sync.svg b/editor/icons/TransitionSync.svg
index affa353100..affa353100 100644
--- a/editor/icons/icon_transition_sync.svg
+++ b/editor/icons/TransitionSync.svg
diff --git a/editor/icons/icon_transition_sync_auto.svg b/editor/icons/TransitionSyncAuto.svg
index 767773a000..767773a000 100644
--- a/editor/icons/icon_transition_sync_auto.svg
+++ b/editor/icons/TransitionSyncAuto.svg
diff --git a/editor/icons/icon_transition_sync_auto_big.svg b/editor/icons/TransitionSyncAutoBig.svg
index c9735a2653..c9735a2653 100644
--- a/editor/icons/icon_transition_sync_auto_big.svg
+++ b/editor/icons/TransitionSyncAutoBig.svg
diff --git a/editor/icons/icon_transition_sync_big.svg b/editor/icons/TransitionSyncBig.svg
index 959f26c6f1..959f26c6f1 100644
--- a/editor/icons/icon_transition_sync_big.svg
+++ b/editor/icons/TransitionSyncBig.svg
diff --git a/editor/icons/icon_translation.svg b/editor/icons/Translation.svg
index 4195ce04a9..4195ce04a9 100644
--- a/editor/icons/icon_translation.svg
+++ b/editor/icons/Translation.svg
diff --git a/editor/icons/icon_transpose.svg b/editor/icons/Transpose.svg
index e63c679323..e63c679323 100644
--- a/editor/icons/icon_transpose.svg
+++ b/editor/icons/Transpose.svg
diff --git a/editor/icons/icon_tree.svg b/editor/icons/Tree.svg
index 8e450948ce..8e450948ce 100644
--- a/editor/icons/icon_tree.svg
+++ b/editor/icons/Tree.svg
diff --git a/editor/icons/icon_tween.svg b/editor/icons/Tween.svg
index c311cbd05e..c311cbd05e 100644
--- a/editor/icons/icon_tween.svg
+++ b/editor/icons/Tween.svg
diff --git a/editor/icons/icon_unbone.svg b/editor/icons/Unbone.svg
index 75df7e6ce9..75df7e6ce9 100644
--- a/editor/icons/icon_unbone.svg
+++ b/editor/icons/Unbone.svg
diff --git a/editor/icons/icon_ungroup.svg b/editor/icons/Ungroup.svg
index c6e235f47d..c6e235f47d 100644
--- a/editor/icons/icon_ungroup.svg
+++ b/editor/icons/Ungroup.svg
diff --git a/editor/icons/icon_unlock.svg b/editor/icons/Unlock.svg
index 52be7e2233..52be7e2233 100644
--- a/editor/icons/icon_unlock.svg
+++ b/editor/icons/Unlock.svg
diff --git a/editor/icons/icon_unpaint_vertex.svg b/editor/icons/UnpaintVertex.svg
index 7bb94f06be..7bb94f06be 100644
--- a/editor/icons/icon_unpaint_vertex.svg
+++ b/editor/icons/UnpaintVertex.svg
diff --git a/editor/icons/icon_uv.svg b/editor/icons/Uv.svg
index f68ea2c984..f68ea2c984 100644
--- a/editor/icons/icon_uv.svg
+++ b/editor/icons/Uv.svg
diff --git a/editor/icons/icon_v_box_container.svg b/editor/icons/VBoxContainer.svg
index 17b83ced0a..17b83ced0a 100644
--- a/editor/icons/icon_v_box_container.svg
+++ b/editor/icons/VBoxContainer.svg
diff --git a/editor/icons/icon_v_scroll_bar.svg b/editor/icons/VScrollBar.svg
index 285e54fbd1..285e54fbd1 100644
--- a/editor/icons/icon_v_scroll_bar.svg
+++ b/editor/icons/VScrollBar.svg
diff --git a/editor/icons/icon_v_separator.svg b/editor/icons/VSeparator.svg
index 6476ea5ad7..6476ea5ad7 100644
--- a/editor/icons/icon_v_separator.svg
+++ b/editor/icons/VSeparator.svg
diff --git a/editor/icons/icon_v_slider.svg b/editor/icons/VSlider.svg
index c6fc1e6e0f..c6fc1e6e0f 100644
--- a/editor/icons/icon_v_slider.svg
+++ b/editor/icons/VSlider.svg
diff --git a/editor/icons/icon_v_split_container.svg b/editor/icons/VSplitContainer.svg
index b9bbb4bfc3..b9bbb4bfc3 100644
--- a/editor/icons/icon_v_split_container.svg
+++ b/editor/icons/VSplitContainer.svg
diff --git a/editor/icons/icon_variant.svg b/editor/icons/Variant.svg
index 7c2e4559d1..7c2e4559d1 100644
--- a/editor/icons/icon_variant.svg
+++ b/editor/icons/Variant.svg
diff --git a/editor/icons/icon_vector2.svg b/editor/icons/Vector2.svg
index b4e9b44c03..b4e9b44c03 100644
--- a/editor/icons/icon_vector2.svg
+++ b/editor/icons/Vector2.svg
diff --git a/editor/icons/Vector2i.svg b/editor/icons/Vector2i.svg
new file mode 100644
index 0000000000..6cf9a896f3
--- /dev/null
+++ b/editor/icons/Vector2i.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-2e-3v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53578-0.92809-1.526-1.4999-2.5977-1.5zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#bd91f1"/>
+<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-0.001953v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53583-0.92809-1.526-1.4999-2.5977-1.5z" fill="#fff" fill-opacity=".39216"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_vector3.svg b/editor/icons/Vector3.svg
index 74861160d6..74861160d6 100644
--- a/editor/icons/icon_vector3.svg
+++ b/editor/icons/Vector3.svg
diff --git a/editor/icons/Vector3i.svg b/editor/icons/Vector3i.svg
new file mode 100644
index 0000000000..d0be27886d
--- /dev/null
+++ b/editor/icons/Vector3i.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.45296 0.92408-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#e286f0"/>
+<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.44948 0.95585-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2z" fill="#fff" fill-opacity=".39216"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_vehicle_body.svg b/editor/icons/VehicleBody.svg
index a509730602..a509730602 100644
--- a/editor/icons/icon_vehicle_body.svg
+++ b/editor/icons/VehicleBody.svg
diff --git a/editor/icons/icon_vehicle_wheel.svg b/editor/icons/VehicleWheel.svg
index bd870c0118..bd870c0118 100644
--- a/editor/icons/icon_vehicle_wheel.svg
+++ b/editor/icons/VehicleWheel.svg
diff --git a/editor/icons/icon_video_player.svg b/editor/icons/VideoPlayer.svg
index 4e8dcf0ec2..4e8dcf0ec2 100644
--- a/editor/icons/icon_video_player.svg
+++ b/editor/icons/VideoPlayer.svg
diff --git a/editor/icons/icon_viewport.svg b/editor/icons/Viewport.svg
index 7cd5d73cde..7cd5d73cde 100644
--- a/editor/icons/icon_viewport.svg
+++ b/editor/icons/Viewport.svg
diff --git a/editor/icons/icon_viewport_container.svg b/editor/icons/ViewportContainer.svg
index 18dcddc15f..18dcddc15f 100644
--- a/editor/icons/icon_viewport_container.svg
+++ b/editor/icons/ViewportContainer.svg
diff --git a/editor/icons/icon_viewport_speed.svg b/editor/icons/ViewportSpeed.svg
index 364eb4969b..364eb4969b 100644
--- a/editor/icons/icon_viewport_speed.svg
+++ b/editor/icons/ViewportSpeed.svg
diff --git a/editor/icons/icon_viewport_texture.svg b/editor/icons/ViewportTexture.svg
index 145beff6bc..145beff6bc 100644
--- a/editor/icons/icon_viewport_texture.svg
+++ b/editor/icons/ViewportTexture.svg
diff --git a/editor/icons/icon_viewport_zoom.svg b/editor/icons/ViewportZoom.svg
index 6d64d1b8a4..6d64d1b8a4 100644
--- a/editor/icons/icon_viewport_zoom.svg
+++ b/editor/icons/ViewportZoom.svg
diff --git a/editor/icons/icon_visibility_enabler.svg b/editor/icons/VisibilityEnabler.svg
index 70e4f081c2..70e4f081c2 100644
--- a/editor/icons/icon_visibility_enabler.svg
+++ b/editor/icons/VisibilityEnabler.svg
diff --git a/editor/icons/icon_visibility_enabler_2d.svg b/editor/icons/VisibilityEnabler2D.svg
index 2976e468ed..2976e468ed 100644
--- a/editor/icons/icon_visibility_enabler_2d.svg
+++ b/editor/icons/VisibilityEnabler2D.svg
diff --git a/editor/icons/icon_visibility_notifier.svg b/editor/icons/VisibilityNotifier.svg
index c908d5c99d..c908d5c99d 100644
--- a/editor/icons/icon_visibility_notifier.svg
+++ b/editor/icons/VisibilityNotifier.svg
diff --git a/editor/icons/icon_visibility_notifier_2d.svg b/editor/icons/VisibilityNotifier2D.svg
index e05d7d3887..e05d7d3887 100644
--- a/editor/icons/icon_visibility_notifier_2d.svg
+++ b/editor/icons/VisibilityNotifier2D.svg
diff --git a/editor/icons/icon_visual_shader.svg b/editor/icons/VisualShader.svg
index 15cb60d2e3..15cb60d2e3 100644
--- a/editor/icons/icon_visual_shader.svg
+++ b/editor/icons/VisualShader.svg
diff --git a/editor/icons/icon_visual_shader_port.svg b/editor/icons/VisualShaderPort.svg
index 9df6344fe2..9df6344fe2 100644
--- a/editor/icons/icon_visual_shader_port.svg
+++ b/editor/icons/VisualShaderPort.svg
diff --git a/editor/icons/icon_warning.svg b/editor/icons/Warning.svg
index 698288d5a9..698288d5a9 100644
--- a/editor/icons/icon_warning.svg
+++ b/editor/icons/Warning.svg
diff --git a/editor/icons/icon_window_dialog.svg b/editor/icons/WindowDialog.svg
index 3c7be2a58d..3c7be2a58d 100644
--- a/editor/icons/icon_window_dialog.svg
+++ b/editor/icons/WindowDialog.svg
diff --git a/editor/icons/icon_world.svg b/editor/icons/World.svg
index 3db96a75a6..3db96a75a6 100644
--- a/editor/icons/icon_world.svg
+++ b/editor/icons/World.svg
diff --git a/editor/icons/icon_world_2d.svg b/editor/icons/World2D.svg
index 862242ec44..862242ec44 100644
--- a/editor/icons/icon_world_2d.svg
+++ b/editor/icons/World2D.svg
diff --git a/editor/icons/icon_world_environment.svg b/editor/icons/WorldEnvironment.svg
index e87a4b5b0c..e87a4b5b0c 100644
--- a/editor/icons/icon_world_environment.svg
+++ b/editor/icons/WorldEnvironment.svg
diff --git a/editor/icons/WorldMarginShape.svg b/editor/icons/WorldMarginShape.svg
new file mode 100644
index 0000000000..2c90cf6d53
--- /dev/null
+++ b/editor/icons/WorldMarginShape.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1044.4 7 3 7-3-7-3z" fill="#a2d2ff" fill-rule="evenodd" transform="translate(0 -1036.4)"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_x509_certificate.svg b/editor/icons/X509Certificate.svg
index e175fa3234..e175fa3234 100644
--- a/editor/icons/icon_x509_certificate.svg
+++ b/editor/icons/X509Certificate.svg
diff --git a/editor/icons/icon_y_sort.svg b/editor/icons/YSort.svg
index dbcefef216..dbcefef216 100644
--- a/editor/icons/icon_y_sort.svg
+++ b/editor/icons/YSort.svg
diff --git a/editor/icons/icon_zoom.svg b/editor/icons/Zoom.svg
index aa517b6ae2..aa517b6ae2 100644
--- a/editor/icons/icon_zoom.svg
+++ b/editor/icons/Zoom.svg
diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/ZoomLess.svg
index cf3b4475c9..cf3b4475c9 100644
--- a/editor/icons/icon_zoom_less.svg
+++ b/editor/icons/ZoomLess.svg
diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/ZoomMore.svg
index 8847eea53f..8847eea53f 100644
--- a/editor/icons/icon_zoom_more.svg
+++ b/editor/icons/ZoomMore.svg
diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/ZoomReset.svg
index 6ecb4111fe..6ecb4111fe 100644
--- a/editor/icons/icon_zoom_reset.svg
+++ b/editor/icons/ZoomReset.svg
diff --git a/editor/icons/icon_bool.svg b/editor/icons/bool.svg
index 5ffd40a815..5ffd40a815 100644
--- a/editor/icons/icon_bool.svg
+++ b/editor/icons/bool.svg
diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py
index dfd0802ce9..ea2c2e57d1 100644
--- a/editor/icons/editor_icons_builders.py
+++ b/editor/icons/editor_icons_builders.py
@@ -27,7 +27,6 @@ def make_editor_icons_action(target, source, env):
icons_string.write("\\" + str(hex(ord(b)))[1:])
b = svgf.read(1)
-
icons_string.write('"')
if fname != svg_icons[-1]:
icons_string.write(",")
@@ -44,17 +43,16 @@ def make_editor_icons_action(target, source, env):
s.write("static const char *editor_icons_names[] = {\n")
# this is used to store the indices of thumbnail icons
- thumb_medium_indices = [];
- thumb_big_indices = [];
+ thumb_medium_indices = []
+ thumb_big_indices = []
index = 0
for f in svg_icons:
fname = str(f)
- icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ # Trim the `.svg` extension from the string.
+ icon_name = os.path.basename(fname)[:-4]
# some special cases
- if icon_name in ['Int', 'Bool', 'Float']:
- icon_name = icon_name.lower()
if icon_name.endswith("MediumThumb"): # don't know a better way to handle this
thumb_medium_indices.append(str(index))
if icon_name.endswith("BigThumb"): # don't know a better way to handle this
diff --git a/editor/icons/icon_float.svg b/editor/icons/float.svg
index 5c09d4c244..5c09d4c244 100644
--- a/editor/icons/icon_float.svg
+++ b/editor/icons/float.svg
diff --git a/editor/icons/icon_gizmo_spatial_stream_player.svg b/editor/icons/icon_gizmo_spatial_stream_player.svg
deleted file mode 100644
index 473fd2c2cd..0000000000
--- a/editor/icons/icon_gizmo_spatial_stream_player.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m99.645 6.0059c-.9956.029687-1.9837.18322-2.9414.45703l-56 16c-5.1336 1.4668-8.7021 6.198-8.7031 11.537v44.203c-11.16 1.0331-20 10.379-20 21.797.000011 12.103 9.8971 22 22 22 12.103-.00001 22-9.8971 22-22v-56.947l32-9.1426v28.293c-11.16 1.0331-20 10.379-20 21.797.000011 12.103 9.8971 22 22 22 12.103-.00001 22-9.8971 22-22v-66c-.00104-6.7137-5.6428-12.192-12.354-11.994z" fill-opacity=".29412"/><path d="m99.764 10.004a8.0008 8.0008 0 0 0 -1.9609.30469l-56 16a8.0008 8.0008 0 0 0 -5.8027 7.6914v48.121a18 18 0 0 0 -2-.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18-18v-59.965l40-11.428v37.514a18 18 0 0 0 -2-.12109 18 18 0 0 0 -18 18 18 18 0 0 0 18 18 18 18 0 0 0 18-18v-66a8.0008 8.0008 0 0 0 -8.2363-7.9961z" fill="#f7f5cf"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_keyboard.svg b/editor/icons/icon_keyboard.svg
deleted file mode 100644
index bd8736278d..0000000000
--- a/editor/icons/icon_keyboard.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m4 2a1 1 0 0 0 -1 1v9.084a1 .91667 0 0 0 1 .91602h8a1 .91667 0 0 0 1-.91602v-9.084a1 1 0 0 0 -1-1zm-3 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9h-1v9a.99998.99998 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-9zm4 0h2v3l2-3h2l-2 3 2 4h-2l-2-4v4h-2z" fill="#e0e0e0" transform="translate(0 1036.4)"/><path d="m27 1038.4h7v14h-7z" fill="#fff"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/icon_navigation_mesh_instance.svg b/editor/icons/icon_navigation_mesh_instance.svg
deleted file mode 100644
index 737d9c319d..0000000000
--- a/editor/icons/icon_navigation_mesh_instance.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305-1h2.5078l.75-2h-3.2598a2 2 0 0 0 -.72852-.73047v-5.8555l4.6973 4.6973.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 .72852.73047v.27148a2.0002 2.0002 0 0 1 .023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l.12695.33789v-1.9082a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285-1zm9 6-3 8 3-2 3 2z" fill="#fc9c9c" fill-opacity=".99608"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_navigation_polygon_instance.svg b/editor/icons/icon_navigation_polygon_instance.svg
deleted file mode 100644
index e16d10614e..0000000000
--- a/editor/icons/icon_navigation_polygon_instance.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#a5b7f3" fill-opacity=".98824" fill-rule="evenodd" transform="translate(0 -1036.4)"><path d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4.9023a2.1002 2.1002 0 0 1 .13086-.73633l.47461-1.2637h-4.5078v-10h8.5859l-4.293 4.293a1.0001 1.0001 0 0 0 0 1.4141l1.3262 1.3262 1.4141-3.7695a2.1002 2.1002 0 0 1 1.9922-1.3613 2.1002 2.1002 0 0 1 .43555.050781l2.2461-2.2461a1.0001 1.0001 0 0 0 -.70703-1.707h-12z" transform="translate(0 1036.4)"/><path d="m15 1051.4-3-8-3 8 3-2z"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/icon_plane_mesh.svg b/editor/icons/icon_plane_mesh.svg
deleted file mode 100644
index ddcc623c67..0000000000
--- a/editor/icons/icon_plane_mesh.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 12h12l-3-8h-6z" fill="none" stroke="#ffd684" stroke-linejoin="round" stroke-width="2"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_polygon_2_d.svg b/editor/icons/icon_polygon_2_d.svg
deleted file mode 100644
index 485109072e..0000000000
--- a/editor/icons/icon_polygon_2_d.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#a5b7f3" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_int.svg b/editor/icons/int.svg
index 4226c8cb7e..4226c8cb7e 100644
--- a/editor/icons/icon_int.svg
+++ b/editor/icons/int.svg
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 53a654c971..aad378c94f 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -162,7 +162,7 @@ void EditorImportPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_import_options", PropertyInfo(Variant::INT, "preset")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_save_extension"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::REAL, "get_priority"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::FLOAT, "get_priority"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_import_order"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files")));
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index c0d84b61b4..731d094745 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -764,10 +764,10 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, const
return dst_buffer;
}
-PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
- PoolVector<int> ret;
+ Vector<int> ret;
if (attribs.size() == 0)
return ret;
@@ -776,7 +776,7 @@ PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &sta
const int ret_size = attribs.size();
ret.resize(ret_size);
{
- PoolVector<int>::Write w = ret.write();
+ int *w = ret.ptrw();
for (int i = 0; i < ret_size; i++) {
w[i] = int(attribs_ptr[i]);
}
@@ -784,10 +784,10 @@ PoolVector<int> EditorSceneImporterGLTF::_decode_accessor_as_ints(GLTFState &sta
return ret;
}
-PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
- PoolVector<float> ret;
+ Vector<float> ret;
if (attribs.size() == 0)
return ret;
@@ -796,7 +796,7 @@ PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState
const int ret_size = attribs.size();
ret.resize(ret_size);
{
- PoolVector<float>::Write w = ret.write();
+ float *w = ret.ptrw();
for (int i = 0; i < ret_size; i++) {
w[i] = float(attribs_ptr[i]);
}
@@ -804,10 +804,10 @@ PoolVector<float> EditorSceneImporterGLTF::_decode_accessor_as_floats(GLTFState
return ret;
}
-PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
- PoolVector<Vector2> ret;
+ Vector<Vector2> ret;
if (attribs.size() == 0)
return ret;
@@ -817,7 +817,7 @@ PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState
const int ret_size = attribs.size() / 2;
ret.resize(ret_size);
{
- PoolVector<Vector2>::Write w = ret.write();
+ Vector2 *w = ret.ptrw();
for (int i = 0; i < ret_size; i++) {
w[i] = Vector2(attribs_ptr[i * 2 + 0], attribs_ptr[i * 2 + 1]);
}
@@ -825,10 +825,10 @@ PoolVector<Vector2> EditorSceneImporterGLTF::_decode_accessor_as_vec2(GLTFState
return ret;
}
-PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
- PoolVector<Vector3> ret;
+ Vector<Vector3> ret;
if (attribs.size() == 0)
return ret;
@@ -838,7 +838,7 @@ PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState
const int ret_size = attribs.size() / 3;
ret.resize(ret_size);
{
- PoolVector<Vector3>::Write w = ret.write();
+ Vector3 *w = ret.ptrw();
for (int i = 0; i < ret_size; i++) {
w[i] = Vector3(attribs_ptr[i * 3 + 0], attribs_ptr[i * 3 + 1], attribs_ptr[i * 3 + 2]);
}
@@ -846,10 +846,10 @@ PoolVector<Vector3> EditorSceneImporterGLTF::_decode_accessor_as_vec3(GLTFState
return ret;
}
-PoolVector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
+Vector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex) {
const Vector<double> attribs = _decode_accessor(state, p_accessor, p_for_vertex);
- PoolVector<Color> ret;
+ Vector<Color> ret;
if (attribs.size() == 0)
return ret;
@@ -866,7 +866,7 @@ PoolVector<Color> EditorSceneImporterGLTF::_decode_accessor_as_color(GLTFState &
const int ret_size = attribs.size() / vec_len;
ret.resize(ret_size);
{
- PoolVector<Color>::Write w = ret.write();
+ Color *w = ret.ptrw();
for (int i = 0; i < ret_size; i++) {
w[i] = Color(attribs_ptr[i * vec_len + 0], attribs_ptr[i * vec_len + 1], attribs_ptr[i * vec_len + 2], vec_len == 4 ? attribs_ptr[i * 4 + 3] : 1.0);
}
@@ -1021,10 +1021,10 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
array[Mesh::ARRAY_BONES] = _decode_accessor_as_ints(state, a["JOINTS_0"], true);
}
if (a.has("WEIGHTS_0")) {
- PoolVector<float> weights = _decode_accessor_as_floats(state, a["WEIGHTS_0"], true);
+ Vector<float> weights = _decode_accessor_as_floats(state, a["WEIGHTS_0"], true);
{ //gltf does not seem to normalize the weights for some reason..
int wc = weights.size();
- PoolVector<float>::Write w = weights.write();
+ float *w = weights.ptrw();
for (int k = 0; k < wc; k += 4) {
float total = 0.0;
@@ -1044,13 +1044,13 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
}
if (p.has("indices")) {
- PoolVector<int> indices = _decode_accessor_as_ints(state, p["indices"], false);
+ Vector<int> indices = _decode_accessor_as_ints(state, p["indices"], false);
if (primitive == Mesh::PRIMITIVE_TRIANGLES) {
//swap around indices, convert ccw to cw for front face
const int is = indices.size();
- const PoolVector<int>::Write w = indices.write();
+ int *w = indices.ptrw();
for (int k = 0; k < is; k += 3) {
SWAP(w[k + 1], w[k + 2]);
}
@@ -1059,13 +1059,13 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
} else if (primitive == Mesh::PRIMITIVE_TRIANGLES) {
//generate indices because they need to be swapped for CW/CCW
- const PoolVector<Vector3> &vertices = array[Mesh::ARRAY_VERTEX];
+ const Vector<Vector3> &vertices = array[Mesh::ARRAY_VERTEX];
ERR_FAIL_COND_V(vertices.size() == 0, ERR_PARSE_ERROR);
- PoolVector<int> indices;
+ Vector<int> indices;
const int vs = vertices.size();
indices.resize(vs);
{
- const PoolVector<int>::Write w = indices.write();
+ int *w = indices.ptrw();
for (int k = 0; k < vs; k += 3) {
w[k] = k;
w[k + 1] = k + 2;
@@ -1127,8 +1127,8 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
array_copy[Mesh::ARRAY_INDEX] = Variant();
if (t.has("POSITION")) {
- PoolVector<Vector3> varr = _decode_accessor_as_vec3(state, t["POSITION"], true);
- const PoolVector<Vector3> src_varr = array[Mesh::ARRAY_VERTEX];
+ Vector<Vector3> varr = _decode_accessor_as_vec3(state, t["POSITION"], true);
+ const Vector<Vector3> src_varr = array[Mesh::ARRAY_VERTEX];
const int size = src_varr.size();
ERR_FAIL_COND_V(size == 0, ERR_PARSE_ERROR);
{
@@ -1136,9 +1136,9 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
const int max_idx = varr.size();
varr.resize(size);
- const PoolVector<Vector3>::Write w_varr = varr.write();
- const PoolVector<Vector3>::Read r_varr = varr.read();
- const PoolVector<Vector3>::Read r_src_varr = src_varr.read();
+ Vector3 *w_varr = varr.ptrw();
+ const Vector3 *r_varr = varr.ptr();
+ const Vector3 *r_src_varr = src_varr.ptr();
for (int l = 0; l < size; l++) {
if (l < max_idx) {
w_varr[l] = r_varr[l] + r_src_varr[l];
@@ -1150,17 +1150,17 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
array_copy[Mesh::ARRAY_VERTEX] = varr;
}
if (t.has("NORMAL")) {
- PoolVector<Vector3> narr = _decode_accessor_as_vec3(state, t["NORMAL"], true);
- const PoolVector<Vector3> src_narr = array[Mesh::ARRAY_NORMAL];
+ Vector<Vector3> narr = _decode_accessor_as_vec3(state, t["NORMAL"], true);
+ const Vector<Vector3> src_narr = array[Mesh::ARRAY_NORMAL];
int size = src_narr.size();
ERR_FAIL_COND_V(size == 0, ERR_PARSE_ERROR);
{
int max_idx = narr.size();
narr.resize(size);
- const PoolVector<Vector3>::Write w_narr = narr.write();
- const PoolVector<Vector3>::Read r_narr = narr.read();
- const PoolVector<Vector3>::Read r_src_narr = src_narr.read();
+ Vector3 *w_narr = narr.ptrw();
+ const Vector3 *r_narr = narr.ptr();
+ const Vector3 *r_src_narr = src_narr.ptr();
for (int l = 0; l < size; l++) {
if (l < max_idx) {
w_narr[l] = r_narr[l] + r_src_narr[l];
@@ -1172,11 +1172,11 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
array_copy[Mesh::ARRAY_NORMAL] = narr;
}
if (t.has("TANGENT")) {
- const PoolVector<Vector3> tangents_v3 = _decode_accessor_as_vec3(state, t["TANGENT"], true);
- const PoolVector<float> src_tangents = array[Mesh::ARRAY_TANGENT];
+ const Vector<Vector3> tangents_v3 = _decode_accessor_as_vec3(state, t["TANGENT"], true);
+ const Vector<float> src_tangents = array[Mesh::ARRAY_TANGENT];
ERR_FAIL_COND_V(src_tangents.size() == 0, ERR_PARSE_ERROR);
- PoolVector<float> tangents_v4;
+ Vector<float> tangents_v4;
{
@@ -1184,10 +1184,10 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
int size4 = src_tangents.size();
tangents_v4.resize(size4);
- const PoolVector<float>::Write w4 = tangents_v4.write();
+ float *w4 = tangents_v4.ptrw();
- const PoolVector<Vector3>::Read r3 = tangents_v3.read();
- const PoolVector<float>::Read r4 = src_tangents.read();
+ const Vector3 *r3 = tangents_v3.ptr();
+ const float *r4 = src_tangents.ptr();
for (int l = 0; l < size4 / 4; l++) {
@@ -2183,6 +2183,8 @@ Error EditorSceneImporterGLTF::_map_skin_joints_indices_to_skeleton_bone_indices
const GLTFNodeIndex node_i = skin.joints_original[joint_index];
const GLTFNode *node = state.nodes[node_i];
+ skin.joint_i_to_name.insert(joint_index, node->name);
+
const int bone_index = skeleton.godot_skeleton->find_bone(node->name);
ERR_FAIL_COND_V(bone_index < 0, FAILED);
@@ -2204,12 +2206,18 @@ Error EditorSceneImporterGLTF::_create_skins(GLTFState &state) {
const bool has_ibms = !gltf_skin.inverse_binds.empty();
for (int joint_i = 0; joint_i < gltf_skin.joints_original.size(); ++joint_i) {
- int bone_i = gltf_skin.joint_i_to_bone_i[joint_i];
+ Transform xform;
if (has_ibms) {
- skin->add_bind(bone_i, gltf_skin.inverse_binds[joint_i]);
+ xform = gltf_skin.inverse_binds[joint_i];
+ }
+
+ if (state.use_named_skin_binds) {
+ StringName name = gltf_skin.joint_i_to_name[joint_i];
+ skin->add_named_bind(name, xform);
} else {
- skin->add_bind(bone_i, Transform());
+ int bone_i = gltf_skin.joint_i_to_bone_i[joint_i];
+ skin->add_bind(bone_i, xform);
}
}
@@ -2397,9 +2405,9 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
}
}
- const PoolVector<float> times = _decode_accessor_as_floats(state, input, false);
+ const Vector<float> times = _decode_accessor_as_floats(state, input, false);
if (path == "translation") {
- const PoolVector<Vector3> translations = _decode_accessor_as_vec3(state, output, false);
+ const Vector<Vector3> translations = _decode_accessor_as_vec3(state, output, false);
track->translation_track.interpolation = interp;
track->translation_track.times = Variant(times); //convert via variant
track->translation_track.values = Variant(translations); //convert via variant
@@ -2409,12 +2417,12 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
track->rotation_track.times = Variant(times); //convert via variant
track->rotation_track.values = rotations; //convert via variant
} else if (path == "scale") {
- const PoolVector<Vector3> scales = _decode_accessor_as_vec3(state, output, false);
+ const Vector<Vector3> scales = _decode_accessor_as_vec3(state, output, false);
track->scale_track.interpolation = interp;
track->scale_track.times = Variant(times); //convert via variant
track->scale_track.values = Variant(scales); //convert via variant
} else if (path == "weights") {
- const PoolVector<float> weights = _decode_accessor_as_floats(state, output, false);
+ const Vector<float> weights = _decode_accessor_as_floats(state, output, false);
ERR_FAIL_INDEX_V(state.nodes[node]->mesh, state.meshes.size(), ERR_PARSE_ERROR);
const GLTFMesh *mesh = &state.meshes[state.nodes[node]->mesh];
@@ -2427,7 +2435,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
ERR_FAIL_COND_V_MSG(weights.size() != expected_value_count, ERR_PARSE_ERROR, "Invalid weight data, expected " + itos(expected_value_count) + " weight values, got " + itos(weights.size()) + " instead.");
const int wlen = weights.size() / wc;
- PoolVector<float>::Read r = weights.read();
+ const float *r = weights.ptr();
for (int k = 0; k < wc; k++) { //separate tracks, having them together is not such a good idea
GLTFAnimation::Channel<float> cf;
cf.interpolation = interp;
@@ -2995,6 +3003,7 @@ Node *EditorSceneImporterGLTF::import_scene(const String &p_path, uint32_t p_fla
state.major_version = version.get_slice(".", 0).to_int();
state.minor_version = version.get_slice(".", 1).to_int();
+ state.use_named_skin_binds = p_flags & IMPORT_USE_NAMED_SKIN_BINDS;
/* STEP 0 PARSE SCENE */
Error err = _parse_scenes(state);
diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h
index a4a715d17c..5d2711483b 100644
--- a/editor/import/editor_scene_importer_gltf.h
+++ b/editor/import/editor_scene_importer_gltf.h
@@ -231,6 +231,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
// A mapping from the joint indices (in the order of joints_original) to the
// Godot Skeleton's bone_indices
Map<int, int> joint_i_to_bone_i;
+ Map<int, StringName> joint_i_to_name;
// The Actual Skin that will be created as a mapping between the IBM's of this skin
// to the generated skeleton for the mesh instances.
@@ -298,6 +299,8 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
int minor_version;
Vector<uint8_t> glb_data;
+ bool use_named_skin_binds;
+
Vector<GLTFNode *> nodes;
Vector<Vector<uint8_t> > buffers;
Vector<GLTFBufferView> buffer_views;
@@ -352,11 +355,11 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Error _decode_buffer_view(GLTFState &state, double *dst, const GLTFBufferViewIndex p_buffer_view, const int skip_every, const int skip_bytes, const int element_size, const int count, const GLTFType type, const int component_count, const int component_type, const int component_size, const bool normalized, const int byte_offset, const bool for_vertex);
Vector<double> _decode_accessor(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
- PoolVector<float> _decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
- PoolVector<int> _decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
- PoolVector<Vector2> _decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
- PoolVector<Vector3> _decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
- PoolVector<Color> _decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
+ Vector<float> _decode_accessor_as_floats(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
+ Vector<int> _decode_accessor_as_ints(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
+ Vector<Vector2> _decode_accessor_as_vec2(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
+ Vector<Vector3> _decode_accessor_as_vec3(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
+ Vector<Color> _decode_accessor_as_color(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
Vector<Quat> _decode_accessor_as_quat(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
Vector<Transform2D> _decode_accessor_as_xform2d(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
Vector<Basis> _decode_accessor_as_basis(GLTFState &state, const GLTFAccessorIndex p_accessor, const bool p_for_vertex);
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index c6fdbd1378..252af9050b 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -75,7 +75,7 @@ String ResourceImporterBitMap::get_preset_name(int p_idx) const {
void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "create_from", PROPERTY_HINT_ENUM, "Black & White,Alpha"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
}
Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
@@ -94,7 +94,6 @@ Error ResourceImporterBitMap::import(const String &p_source_file, const String &
Ref<BitMap> bitmap;
bitmap.instance();
bitmap->create(Size2(w, h));
- image->lock();
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index 9ea2911c63..d472070808 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -187,11 +187,11 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag
image->shrink_x2();
}
- PoolVector<uint8_t> data = Image::lossless_packer(image);
+ Vector<uint8_t> data = Image::lossless_packer(image);
int data_len = data.size();
f->store_32(data_len);
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t* r = data.ptr();
f->store_buffer(r.ptr(), data_len);
}
@@ -210,10 +210,10 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag
f->store_32(p_compress_mode); // 0 - lossless (PNG), 1 - vram, 2 - uncompressed
}
- PoolVector<uint8_t> data = image->get_data();
+ Vector<uint8_t> data = image->get_data();
int dl = data.size();
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t* r = data.ptr();
f->store_buffer(r.ptr(), dl);
} break;
case COMPRESS_UNCOMPRESSED: {
@@ -226,10 +226,10 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag
image->clear_mipmaps();
}
- PoolVector<uint8_t> data = image->get_data();
+ Vector<uint8_t> data = image->get_data();
int dl = data.size();
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t* r = data.ptr();
f->store_buffer(r.ptr(), dl);
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 4b0bfa7222..5651197fa3 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -41,10 +41,10 @@
#include "scene/resources/animation.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/packed_scene.h"
-#include "scene/resources/plane_shape.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/resource_format_text.h"
#include "scene/resources/sphere_shape.h"
+#include "scene/resources/world_margin_shape.h"
uint32_t EditorSceneImporter::get_import_flags() const {
@@ -446,9 +446,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
colshape->set_name("RayShape");
Object::cast_to<Spatial>(sb)->rotate_x(Math_PI / 2);
} else if (empty_draw_type == "IMAGE") {
- PlaneShape *planeShape = memnew(PlaneShape);
- colshape->set_shape(planeShape);
- colshape->set_name("PlaneShape");
+ WorldMarginShape *world_margin_shape = memnew(WorldMarginShape);
+ colshape->set_shape(world_margin_shape);
+ colshape->set_name("WorldMarginShape");
} else {
SphereShape *sphereShape = memnew(SphereShape);
sphereShape->set_radius(1);
@@ -559,7 +559,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
Ref<ArrayMesh> mesh = mi->get_mesh();
ERR_FAIL_COND_V(mesh.is_null(), NULL);
- NavigationMeshInstance *nmi = memnew(NavigationMeshInstance);
+ NavigationRegion *nmi = memnew(NavigationRegion);
nmi->set_name(_fixstr(name, "navmesh"));
Ref<NavigationMesh> nmesh = memnew(NavigationMesh);
@@ -1160,7 +1160,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
bool scenes_out = p_preset == PRESET_MULTIPLE_SCENES || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS;
bool animations_out = p_preset == PRESET_SEPARATE_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_MATERIALS_AND_ANIMATIONS;
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), (meshes_out || materials_out) ? 1 : 0));
@@ -1170,17 +1170,18 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.mesh),Files (.tres)"), meshes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "animation/filter_script", PROPERTY_HINT_MULTILINE_TEXT), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.anim),Files (.tres)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), animations_out));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/keep_custom_tracks"), animations_out));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_linear_error"), 0.05));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angular_error"), 0.01));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angle"), 22));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_linear_error"), 0.05));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angular_error"), 0.01));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angle"), 22));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/remove_unused_tracks"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/clips/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
for (int i = 0; i < 256; i++) {
@@ -1313,6 +1314,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
if (int(p_options["materials/location"]) == 0)
import_flags |= EditorSceneImporter::IMPORT_MATERIALS_IN_INSTANCES;
+ if (bool(p_options["skins/use_named_skins"]))
+ import_flags |= EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS;
+
Error err = OK;
List<String> missing_deps; // for now, not much will be done with this
Node *scene = importer->import_scene(src_path, import_flags, fps, &missing_deps, &err);
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 2691b224eb..20e7af15b5 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -59,7 +59,8 @@ public:
IMPORT_GENERATE_TANGENT_ARRAYS = 256,
IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 512,
IMPORT_MATERIALS_IN_INSTANCES = 1024,
- IMPORT_USE_COMPRESSION = 2048
+ IMPORT_USE_COMPRESSION = 2048,
+ IMPORT_USE_NAMED_SKIN_BINDS = 4096,
};
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index aa7346efe8..92ecda8508 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -38,7 +38,8 @@
void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTexture> &p_tex, const String &p_normal_path, VS::TextureDetectRoughnessChannel p_channel) {
- singleton->mutex->lock();
+ MutexLock lock(singleton->mutex);
+
StringName path = p_tex->get_path();
if (!singleton->make_flags.has(path)) {
@@ -48,13 +49,12 @@ void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTextur
singleton->make_flags[path].flags |= MAKE_ROUGHNESS_FLAG;
singleton->make_flags[path].channel_for_roughness = p_channel;
singleton->make_flags[path].normal_path_for_roughness = p_normal_path;
-
- singleton->mutex->unlock();
}
void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture> &p_tex) {
- singleton->mutex->lock();
+ MutexLock lock(singleton->mutex);
+
StringName path = p_tex->get_path();
if (!singleton->make_flags.has(path)) {
@@ -62,13 +62,12 @@ void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture> &p_t
}
singleton->make_flags[path].flags |= MAKE_3D_FLAG;
-
- singleton->mutex->unlock();
}
void ResourceImporterTexture::_texture_reimport_normal(const Ref<StreamTexture> &p_tex) {
- singleton->mutex->lock();
+ MutexLock lock(singleton->mutex);
+
StringName path = p_tex->get_path();
if (!singleton->make_flags.has(path)) {
@@ -76,8 +75,6 @@ void ResourceImporterTexture::_texture_reimport_normal(const Ref<StreamTexture>
}
singleton->make_flags[path].flags |= MAKE_NORMAL_FLAG;
-
- singleton->mutex->unlock();
}
void ResourceImporterTexture::update_imports() {
@@ -85,57 +82,56 @@ void ResourceImporterTexture::update_imports() {
if (EditorFileSystem::get_singleton()->is_scanning() || EditorFileSystem::get_singleton()->is_importing()) {
return; // do nothing for now
}
- mutex->lock();
-
- if (make_flags.empty()) {
- mutex->unlock();
- return;
- }
+ MutexLock lock(mutex);
Vector<String> to_reimport;
- for (Map<StringName, MakeInfo>::Element *E = make_flags.front(); E; E = E->next()) {
+ {
+ if (make_flags.empty()) {
+ return;
+ }
- Ref<ConfigFile> cf;
- cf.instance();
- String src_path = String(E->key()) + ".import";
+ for (Map<StringName, MakeInfo>::Element *E = make_flags.front(); E; E = E->next()) {
- Error err = cf->load(src_path);
- ERR_CONTINUE(err != OK);
+ Ref<ConfigFile> cf;
+ cf.instance();
+ String src_path = String(E->key()) + ".import";
- bool changed = false;
+ Error err = cf->load(src_path);
+ ERR_CONTINUE(err != OK);
- if (E->get().flags & MAKE_NORMAL_FLAG && int(cf->get_value("params", "compress/normal_map")) == 0) {
- cf->set_value("params", "compress/normal_map", 1);
- changed = true;
- }
+ bool changed = false;
- if (E->get().flags & MAKE_ROUGHNESS_FLAG && int(cf->get_value("params", "roughness/mode")) == 0) {
- cf->set_value("params", "roughness/mode", E->get().channel_for_roughness + 2);
- cf->set_value("params", "roughness/src_normal", E->get().normal_path_for_roughness);
- changed = true;
- }
+ if (E->get().flags & MAKE_NORMAL_FLAG && int(cf->get_value("params", "compress/normal_map")) == 0) {
+ cf->set_value("params", "compress/normal_map", 1);
+ changed = true;
+ }
- if (E->get().flags & MAKE_3D_FLAG && bool(cf->get_value("params", "detect_3d/compress_to"))) {
- int compress_to = cf->get_value("params", "detect_3d/compress_to");
- cf->set_value("params", "detect_3d/compress_to", 0);
- if (compress_to == 1) {
- cf->set_value("params", "compress/mode", COMPRESS_VRAM_COMPRESSED);
- } else if (compress_to == 2) {
- cf->set_value("params", "compress/mode", COMPRESS_BASIS_UNIVERSAL);
+ if (E->get().flags & MAKE_ROUGHNESS_FLAG && int(cf->get_value("params", "roughness/mode")) == 0) {
+ cf->set_value("params", "roughness/mode", E->get().channel_for_roughness + 2);
+ cf->set_value("params", "roughness/src_normal", E->get().normal_path_for_roughness);
+ changed = true;
}
- cf->set_value("params", "mipmaps/generate", true);
- changed = true;
- }
- if (changed) {
- cf->save(src_path);
- to_reimport.push_back(E->key());
- }
- }
+ if (E->get().flags & MAKE_3D_FLAG && bool(cf->get_value("params", "detect_3d/compress_to"))) {
+ int compress_to = cf->get_value("params", "detect_3d/compress_to");
+ cf->set_value("params", "detect_3d/compress_to", 0);
+ if (compress_to == 1) {
+ cf->set_value("params", "compress/mode", COMPRESS_VRAM_COMPRESSED);
+ } else if (compress_to == 2) {
+ cf->set_value("params", "compress/mode", COMPRESS_BASIS_UNIVERSAL);
+ }
+ cf->set_value("params", "mipmaps/generate", true);
+ changed = true;
+ }
- make_flags.clear();
+ if (changed) {
+ cf->save(src_path);
+ to_reimport.push_back(E->key());
+ }
+ }
- mutex->unlock();
+ make_flags.clear();
+ }
if (to_reimport.size()) {
EditorFileSystem::get_singleton()->reimport_files(to_reimport);
@@ -210,7 +206,7 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const {
void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_mode", PROPERTY_HINT_ENUM, "Enabled,Force RGBE"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Enabled,RGBA Only"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/normal_map", PROPERTY_HINT_ENUM, "Detect,Enable,Disabled"), 0));
@@ -226,7 +222,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/HDR_as_SRGB"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
}
void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality, bool p_force_rgbe) {
@@ -242,12 +238,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
- PoolVector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i));
+ Vector<uint8_t> data = Image::lossless_packer(p_image->get_image_from_mipmap(i));
int data_len = data.size();
f->store_32(data_len);
- PoolVector<uint8_t>::Read r = data.read();
- f->store_buffer(r.ptr(), data_len);
+ const uint8_t *r = data.ptr();
+ f->store_buffer(r, data_len);
}
} break;
@@ -261,12 +257,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
- PoolVector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality);
+ Vector<uint8_t> data = Image::lossy_packer(p_image->get_image_from_mipmap(i), p_lossy_quality);
int data_len = data.size();
f->store_32(data_len);
- PoolVector<uint8_t>::Read r = data.read();
- f->store_buffer(r.ptr(), data_len);
+ const uint8_t *r = data.ptr();
+ f->store_buffer(r, data_len);
}
} break;
case COMPRESS_VRAM_COMPRESSED: {
@@ -285,10 +281,10 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_32(image->get_mipmap_count());
f->store_32(image->get_format());
- PoolVector<uint8_t> data = image->get_data();
+ Vector<uint8_t> data = image->get_data();
int dl = data.size();
- PoolVector<uint8_t>::Read r = data.read();
- f->store_buffer(r.ptr(), dl);
+ const uint8_t *r = data.ptr();
+ f->store_buffer(r, dl);
} break;
case COMPRESS_VRAM_UNCOMPRESSED: {
@@ -298,11 +294,11 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
f->store_32(p_image->get_mipmap_count());
f->store_32(p_image->get_format());
- PoolVector<uint8_t> data = p_image->get_data();
+ Vector<uint8_t> data = p_image->get_data();
int dl = data.size();
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t *r = data.ptr();
- f->store_buffer(r.ptr(), dl);
+ f->store_buffer(r, dl);
} break;
case COMPRESS_BASIS_UNIVERSAL: {
@@ -315,12 +311,12 @@ void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image
for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
- PoolVector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels);
+ Vector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels);
int data_len = data.size();
f->store_32(data_len);
- PoolVector<uint8_t>::Read r = data.read();
- f->store_buffer(r.ptr(), data_len);
+ const uint8_t *r = data.ptr();
+ f->store_buffer(r, data_len);
}
} break;
}
@@ -476,13 +472,11 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
int height = image->get_height();
int width = image->get_width();
- image->lock();
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
image->set_pixel(i, j, image->get_pixel(i, j).inverted());
}
}
- image->unlock();
}
if (compress_mode == COMPRESS_BASIS_UNIVERSAL && image->get_format() >= Image::FORMAT_RF) {
@@ -644,10 +638,7 @@ ResourceImporterTexture::ResourceImporterTexture() {
StreamTexture::request_3d_callback = _texture_reimport_3d;
StreamTexture::request_roughness_callback = _texture_reimport_roughness;
StreamTexture::request_normal_callback = _texture_reimport_normal;
- mutex = Mutex::create();
}
ResourceImporterTexture::~ResourceImporterTexture() {
-
- memdelete(mutex);
}
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 19d5498b4a..ed0fe1be89 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -58,7 +58,7 @@ protected:
MAKE_NORMAL_FLAG = 4
};
- Mutex *mutex;
+ Mutex mutex;
struct MakeInfo {
int flags;
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 00a25ec886..3172cc7279 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -143,8 +143,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
int px = xi, py = yi;
int sx = px, sy = py;
- sx = CLAMP(sx, 0, src_width);
- sy = CLAMP(sy, 0, src_height);
+ sx = CLAMP(sx, 0, src_width - 1);
+ sy = CLAMP(sy, 0, src_height - 1);
Color color = p_src_image->get_pixel(sx, sy);
if (p_transposed) {
SWAP(px, py);
@@ -165,8 +165,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) {
int px = xi, py = yi;
int sx = px, sy = py;
- sx = CLAMP(sx, 0, src_width);
- sy = CLAMP(sy, 0, src_height);
+ sx = CLAMP(sx, 0, src_width - 1);
+ sy = CLAMP(sy, 0, src_height - 1);
Color color = p_src_image->get_pixel(sx, sy);
if (p_transposed) {
SWAP(px, py);
@@ -286,12 +286,10 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
new_atlas.instance();
new_atlas->create(atlas_width, atlas_height, false, Image::FORMAT_RGBA8);
- new_atlas->lock();
-
for (int i = 0; i < pack_data_files.size(); i++) {
PackData &pack_data = pack_data_files.write[i];
- pack_data.image->lock();
+
for (int j = 0; j < pack_data.chart_pieces.size(); j++) {
const EditorAtlasPacker::Chart &chart = charts[pack_data.chart_pieces[j]];
for (int k = 0; k < chart.faces.size(); k++) {
@@ -304,9 +302,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
_plot_triangle(positions, chart.final_offset, chart.transposed, new_atlas, pack_data.image);
}
}
- pack_data.image->unlock();
}
- new_atlas->unlock();
//save the atlas
@@ -350,9 +346,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
for (int i = 0; i < pack_data.chart_pieces.size(); i++) {
const EditorAtlasPacker::Chart &chart = charts[pack_data.chart_pieces[i]];
- PoolVector<Vector2> vertices;
- PoolVector<int> indices;
- PoolVector<Vector2> uvs;
+ Vector<Vector2> vertices;
+ Vector<int> indices;
+ Vector<Vector2> uvs;
int vc = chart.vertices.size();
int fc = chart.faces.size();
vertices.resize(vc);
@@ -360,9 +356,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
indices.resize(fc * 3);
{
- PoolVector<Vector2>::Write vw = vertices.write();
- PoolVector<int>::Write iw = indices.write();
- PoolVector<Vector2>::Write uvw = uvs.write();
+ Vector2 *vw = vertices.ptrw();
+ int *iw = indices.ptrw();
+ Vector2 *uvw = uvs.ptrw();
for (int j = 0; j < vc; j++) {
vw[j] = chart.vertices[j];
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 2d43fa089d..71f81051bc 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -82,7 +82,7 @@ void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/8_bit"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/mono"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/max_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/trim"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/normalize"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/loop"), false));
@@ -467,7 +467,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
is16 = false;
}
- PoolVector<uint8_t> dst_data;
+ Vector<uint8_t> dst_data;
AudioStreamSample::Format dst_format;
if (compression == 1) {
@@ -490,8 +490,8 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
right.write[i] = data[i * 2 + 1];
}
- PoolVector<uint8_t> bleft;
- PoolVector<uint8_t> bright;
+ Vector<uint8_t> bleft;
+ Vector<uint8_t> bright;
_compress_ima_adpcm(left, bleft);
_compress_ima_adpcm(right, bright);
@@ -499,9 +499,9 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
int dl = bleft.size();
dst_data.resize(dl * 2);
- PoolVector<uint8_t>::Write w = dst_data.write();
- PoolVector<uint8_t>::Read rl = bleft.read();
- PoolVector<uint8_t>::Read rr = bright.read();
+ uint8_t *w = dst_data.ptrw();
+ const uint8_t *rl = bleft.ptr();
+ const uint8_t *rr = bright.ptr();
for (int i = 0; i < dl; i++) {
w[i * 2 + 0] = rl[i];
@@ -514,7 +514,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS;
dst_data.resize(data.size() * (is16 ? 2 : 1));
{
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
int ds = data.size();
for (int i = 0; i < ds; i++) {
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index 59d33feef0..6df5b88b13 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -49,7 +49,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- static void _compress_ima_adpcm(const Vector<float> &p_data, PoolVector<uint8_t> &dst_data) {
+ static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) {
/*p_sample_data->data = (void*)malloc(len);
xm_s8 *dataptr=(xm_s8*)p_sample_data->data;*/
@@ -76,10 +76,10 @@ public:
datalen++;
dst_data.resize(datalen / 2 + 4);
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
int i, step_idx = 0, prev = 0;
- uint8_t *out = w.ptr();
+ uint8_t *out = w;
//int16_t xm_prev=0;
const float *in = p_data.ptr();
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 1eb453f4d0..3ef88105fe 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -107,6 +107,9 @@ void ImportDock::set_edit_path(const String &p_path) {
return;
}
+ params->paths.clear();
+ params->paths.push_back(p_path);
+
_update_options(config);
List<Ref<ResourceImporter> > importers;
@@ -129,8 +132,6 @@ void ImportDock::set_edit_path(const String &p_path) {
}
}
- params->paths.clear();
- params->paths.push_back(p_path);
import->set_disabled(false);
import_as->set_disabled(false);
preset->set_disabled(false);
@@ -145,7 +146,7 @@ void ImportDock::_update_options(const Ref<ConfigFile> &p_config) {
params->properties.clear();
params->values.clear();
- params->checking = false;
+ params->checking = params->paths.size() > 1;
params->checked.clear();
for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
@@ -266,7 +267,7 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
import_as->set_disabled(false);
preset->set_disabled(false);
- imported->set_text(itos(p_paths.size()) + TTR(" Files"));
+ imported->set_text(vformat(TTR("%d Files"), p_paths.size()));
}
void ImportDock::_update_preset_menu() {
@@ -512,11 +513,6 @@ void ImportDock::_property_toggled(const StringName &p_prop, bool p_checked) {
void ImportDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reimport"), &ImportDock::_reimport);
- ClassDB::bind_method(D_METHOD("_preset_selected"), &ImportDock::_preset_selected);
- ClassDB::bind_method(D_METHOD("_importer_selected"), &ImportDock::_importer_selected);
- ClassDB::bind_method(D_METHOD("_property_toggled"), &ImportDock::_property_toggled);
- ClassDB::bind_method(D_METHOD("_reimport_and_restart"), &ImportDock::_reimport_and_restart);
- ClassDB::bind_method(D_METHOD("_reimport_attempt"), &ImportDock::_reimport_attempt);
}
void ImportDock::initialize_import_options() const {
@@ -537,26 +533,26 @@ ImportDock::ImportDock() {
add_margin_child(TTR("Import As:"), hb);
import_as = memnew(OptionButton);
import_as->set_disabled(true);
- import_as->connect("item_selected", this, "_importer_selected");
+ import_as->connect("item_selected", callable_mp(this, &ImportDock::_importer_selected));
hb->add_child(import_as);
import_as->set_h_size_flags(SIZE_EXPAND_FILL);
preset = memnew(MenuButton);
preset->set_text(TTR("Preset"));
preset->set_disabled(true);
- preset->get_popup()->connect("index_pressed", this, "_preset_selected");
+ preset->get_popup()->connect("index_pressed", callable_mp(this, &ImportDock::_preset_selected));
hb->add_child(preset);
import_opts = memnew(EditorInspector);
add_child(import_opts);
import_opts->set_v_size_flags(SIZE_EXPAND_FILL);
- import_opts->connect("property_toggled", this, "_property_toggled");
+ import_opts->connect("property_toggled", callable_mp(this, &ImportDock::_property_toggled));
hb = memnew(HBoxContainer);
add_child(hb);
import = memnew(Button);
import->set_text(TTR("Reimport"));
import->set_disabled(true);
- import->connect("pressed", this, "_reimport_attempt");
+ import->connect("pressed", callable_mp(this, &ImportDock::_reimport_attempt));
hb->add_spacer();
hb->add_child(import);
hb->add_spacer();
@@ -564,7 +560,7 @@ ImportDock::ImportDock() {
reimport_confirm = memnew(ConfirmationDialog);
reimport_confirm->get_ok()->set_text(TTR("Save scenes, re-import and restart"));
add_child(reimport_confirm);
- reimport_confirm->connect("confirmed", this, "_reimport_and_restart");
+ reimport_confirm->connect("confirmed", callable_mp(this, &ImportDock::_reimport_and_restart));
VBoxContainer *vbc_confirm = memnew(VBoxContainer());
vbc_confirm->add_child(memnew(Label(TTR("Changing the type of an imported file requires editor restart."))));
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 954a941a96..2729d9ecb5 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -76,7 +76,6 @@ void InspectorDock::_menu_option(int p_option) {
editor_data->apply_changes_in_editors();
if (current)
editor_data->paste_object_params(current);
- editor_data->get_undo_redo().clear_history();
} break;
case OBJECT_UNIQUE_RESOURCES: {
@@ -247,7 +246,7 @@ void InspectorDock::_prepare_history() {
}
} else if (Object::cast_to<Node>(obj)) {
text = Object::cast_to<Node>(obj)->get_name();
- } else if (obj->is_class("ScriptEditorDebuggerInspectedObject")) {
+ } else if (obj->is_class("EditorDebuggerRemoteObject")) {
text = obj->call("get_title");
} else {
text = obj->get_class();
@@ -260,7 +259,7 @@ void InspectorDock::_prepare_history() {
}
}
-void InspectorDock::_select_history(int p_idx) const {
+void InspectorDock::_select_history(int p_idx) {
//push it to the top, it is not correct, but it's more useful
ObjectID id = EditorNode::get_singleton()->get_editor_history()->get_history_obj(p_idx);
Object *obj = ObjectDB::get_instance(id);
@@ -269,7 +268,7 @@ void InspectorDock::_select_history(int p_idx) const {
editor->push_item(obj);
}
-void InspectorDock::_resource_created() const {
+void InspectorDock::_resource_created() {
Object *c = new_resource_dialog->instance_selected();
ERR_FAIL_COND(!c);
@@ -280,7 +279,7 @@ void InspectorDock::_resource_created() const {
editor->push_item(c);
}
-void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) const {
+void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) {
if (p_res.is_null())
return;
@@ -343,28 +342,16 @@ void InspectorDock::_notification(int p_what) {
}
void InspectorDock::_bind_methods() {
- ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);
ClassDB::bind_method("update_keying", &InspectorDock::update_keying);
- ClassDB::bind_method("_property_keyed", &InspectorDock::_property_keyed);
- ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed);
+ ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat.
- ClassDB::bind_method("_new_resource", &InspectorDock::_new_resource);
- ClassDB::bind_method("_resource_file_selected", &InspectorDock::_resource_file_selected);
- ClassDB::bind_method("_open_resource_selector", &InspectorDock::_open_resource_selector);
ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource);
ClassDB::bind_method("_paste_resource", &InspectorDock::_paste_resource);
ClassDB::bind_method("_copy_resource", &InspectorDock::_copy_resource);
- ClassDB::bind_method("_select_history", &InspectorDock::_select_history);
- ClassDB::bind_method("_prepare_history", &InspectorDock::_prepare_history);
- ClassDB::bind_method("_resource_created", &InspectorDock::_resource_created);
- ClassDB::bind_method("_resource_selected", &InspectorDock::_resource_selected, DEFVAL(""));
ClassDB::bind_method("_menu_collapseall", &InspectorDock::_menu_collapseall);
ClassDB::bind_method("_menu_expandall", &InspectorDock::_menu_expandall);
- ClassDB::bind_method("_warning_pressed", &InspectorDock::_warning_pressed);
- ClassDB::bind_method("_edit_forward", &InspectorDock::_edit_forward);
- ClassDB::bind_method("_edit_back", &InspectorDock::_edit_back);
ADD_SIGNAL(MethodInfo("request_help"));
}
@@ -511,14 +498,14 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it."));
resource_new_button->set_icon(get_icon("New", "EditorIcons"));
general_options_hb->add_child(resource_new_button);
- resource_new_button->connect("pressed", this, "_new_resource");
+ resource_new_button->connect("pressed", callable_mp(this, &InspectorDock::_new_resource));
resource_new_button->set_focus_mode(Control::FOCUS_NONE);
resource_load_button = memnew(ToolButton);
resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it."));
resource_load_button->set_icon(get_icon("Load", "EditorIcons"));
general_options_hb->add_child(resource_load_button);
- resource_load_button->connect("pressed", this, "_open_resource_selector");
+ resource_load_button->connect("pressed", callable_mp(this, &InspectorDock::_open_resource_selector));
resource_load_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button = memnew(MenuButton);
@@ -527,7 +514,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
general_options_hb->add_child(resource_save_button);
resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE);
resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS);
- resource_save_button->get_popup()->connect("id_pressed", this, "_menu_option");
+ resource_save_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button->set_disabled(true);
@@ -539,7 +526,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
backward_button->set_flat(true);
backward_button->set_tooltip(TTR("Go to the previous edited object in history."));
backward_button->set_disabled(true);
- backward_button->connect("pressed", this, "_edit_back");
+ backward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_back));
forward_button = memnew(ToolButton);
general_options_hb->add_child(forward_button);
@@ -547,14 +534,14 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
forward_button->set_flat(true);
forward_button->set_tooltip(TTR("Go to the next edited object in history."));
forward_button->set_disabled(true);
- forward_button->connect("pressed", this, "_edit_forward");
+ forward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_forward));
history_menu = memnew(MenuButton);
history_menu->set_tooltip(TTR("History of recently edited objects."));
history_menu->set_icon(get_icon("History", "EditorIcons"));
general_options_hb->add_child(history_menu);
- history_menu->connect("about_to_show", this, "_prepare_history");
- history_menu->get_popup()->connect("id_pressed", this, "_select_history");
+ history_menu->connect("about_to_show", callable_mp(this, &InspectorDock::_prepare_history));
+ history_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_select_history));
HBoxContainer *node_info_hb = memnew(HBoxContainer);
add_child(node_info_hb);
@@ -567,12 +554,12 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
object_menu->set_icon(get_icon("Tools", "EditorIcons"));
node_info_hb->add_child(object_menu);
object_menu->set_tooltip(TTR("Object properties."));
- object_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
new_resource_dialog = memnew(CreateDialog);
editor->get_gui_base()->add_child(new_resource_dialog);
new_resource_dialog->set_base_type("Resource");
- new_resource_dialog->connect("create", this, "_resource_created");
+ new_resource_dialog->connect("create", callable_mp(this, &InspectorDock::_resource_created));
search = memnew(LineEdit);
search->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -588,7 +575,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
warning->add_color_override("font_color", get_color("warning_color", "Editor"));
warning->set_clip_text(true);
warning->hide();
- warning->connect("pressed", this, "_warning_pressed");
+ warning->connect("pressed", callable_mp(this, &InspectorDock::_warning_pressed));
warning_dialog = memnew(AcceptDialog);
editor->get_gui_base()->add_child(warning_dialog);
@@ -596,7 +583,7 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
load_resource_dialog = memnew(EditorFileDialog);
add_child(load_resource_dialog);
load_resource_dialog->set_current_dir("res://");
- load_resource_dialog->connect("file_selected", this, "_resource_file_selected");
+ load_resource_dialog->connect("file_selected", callable_mp(this, &InspectorDock::_resource_file_selected));
inspector = memnew(EditorInspector);
add_child(inspector);
@@ -612,8 +599,8 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
inspector->set_use_filter(true); // TODO: check me
- inspector->connect("resource_selected", this, "_resource_selected");
- inspector->connect("property_keyed", this, "_property_keyed");
+ inspector->connect("resource_selected", callable_mp(this, &InspectorDock::_resource_selected));
+ inspector->connect("property_keyed", callable_mp(this, &InspectorDock::_property_keyed));
}
InspectorDock::~InspectorDock() {
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index a7da4bef4c..61b3239169 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -104,13 +104,13 @@ class InspectorDock : public VBoxContainer {
void _paste_resource() const;
void _warning_pressed();
- void _resource_created() const;
- void _resource_selected(const RES &p_res, const String &p_property = "") const;
+ void _resource_created();
+ void _resource_selected(const RES &p_res, const String &p_property);
void _edit_forward();
void _edit_back();
void _menu_collapseall();
void _menu_expandall();
- void _select_history(int p_idx) const;
+ void _select_history(int p_idx);
void _prepare_history();
void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance);
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index c53c5f330b..3013406152 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -50,9 +50,6 @@ void NodeDock::show_connections() {
}
void NodeDock::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("show_groups"), &NodeDock::show_groups);
- ClassDB::bind_method(D_METHOD("show_connections"), &NodeDock::show_connections);
}
void NodeDock::_notification(int p_what) {
@@ -107,7 +104,7 @@ NodeDock::NodeDock() {
connections_button->set_h_size_flags(SIZE_EXPAND_FILL);
connections_button->set_clip_text(true);
mode_hb->add_child(connections_button);
- connections_button->connect("pressed", this, "show_connections");
+ connections_button->connect("pressed", callable_mp(this, &NodeDock::show_connections));
groups_button = memnew(ToolButton);
groups_button->set_text(TTR("Groups"));
@@ -116,7 +113,7 @@ NodeDock::NodeDock() {
groups_button->set_h_size_flags(SIZE_EXPAND_FILL);
groups_button->set_clip_text(true);
mode_hb->add_child(groups_button);
- groups_button->connect("pressed", this, "show_groups");
+ groups_button->connect("pressed", callable_mp(this, &NodeDock::show_groups));
connections = memnew(ConnectionsDock(EditorNode::get_singleton()));
connections->set_undoredo(EditorNode::get_undo_redo());
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 1506ba319c..1e7c625abb 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -132,8 +132,8 @@ void PluginConfigDialog::_on_required_text_changed(const String &) {
void PluginConfigDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- connect("confirmed", this, "_on_confirmed");
- get_cancel()->connect("pressed", this, "_on_cancelled");
+ connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed));
+ get_cancel()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_cancelled));
} break;
case NOTIFICATION_POST_POPUP: {
@@ -175,9 +175,6 @@ void PluginConfigDialog::config(const String &p_config_path) {
}
void PluginConfigDialog::_bind_methods() {
- ClassDB::bind_method("_on_required_text_changed", &PluginConfigDialog::_on_required_text_changed);
- ClassDB::bind_method("_on_confirmed", &PluginConfigDialog::_on_confirmed);
- ClassDB::bind_method("_on_cancelled", &PluginConfigDialog::_on_cancelled);
ADD_SIGNAL(MethodInfo("plugin_ready", PropertyInfo(Variant::STRING, "script_path", PROPERTY_HINT_NONE, ""), PropertyInfo(Variant::STRING, "activate_name")));
}
@@ -194,7 +191,7 @@ PluginConfigDialog::PluginConfigDialog() {
grid->add_child(name_lb);
name_edit = memnew(LineEdit);
- name_edit->connect("text_changed", this, "_on_required_text_changed");
+ name_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
name_edit->set_placeholder("MyPlugin");
grid->add_child(name_edit);
@@ -253,7 +250,7 @@ PluginConfigDialog::PluginConfigDialog() {
grid->add_child(script_lb);
script_edit = memnew(LineEdit);
- script_edit->connect("text_changed", this, "_on_required_text_changed");
+ script_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd");
grid->add_child(script_edit);
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index b2d132b3da..8d5444db73 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -150,7 +150,7 @@ void AbstractPolygon2DEditor::_action_add_polygon(const Variant &p_polygon) {
void AbstractPolygon2DEditor::_action_remove_polygon(int p_idx) {
- _action_set_polygon(p_idx, _get_polygon(p_idx), PoolVector<Vector2>());
+ _action_set_polygon(p_idx, _get_polygon(p_idx), Vector<Vector2>());
}
void AbstractPolygon2DEditor::_action_set_polygon(int p_idx, const Variant &p_polygon) {
@@ -209,8 +209,8 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons"));
button_edit->set_pressed(true);
- get_tree()->connect("node_removed", this, "_node_removed");
- create_resource->connect("confirmed", this, "_create_resource");
+ get_tree()->connect("node_removed", callable_mp(this, &AbstractPolygon2DEditor::_node_removed));
+ create_resource->connect("confirmed", callable_mp(this, &AbstractPolygon2DEditor::_create_resource));
} break;
}
}
@@ -256,7 +256,7 @@ void AbstractPolygon2DEditor::_wip_close() {
undo_redo->create_action(TTR("Create Polygon"));
_action_add_polygon(wip);
if (_has_uv()) {
- undo_redo->add_do_method(_get_node(), "set_uv", PoolVector<Vector2>());
+ undo_redo->add_do_method(_get_node(), "set_uv", Vector<Vector2>());
undo_redo->add_undo_method(_get_node(), "set_uv", _get_node()->get("uv"));
}
_commit_action();
@@ -533,7 +533,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (k.is_valid() && k->is_pressed()) {
- if (k->get_scancode() == KEY_DELETE || k->get_scancode() == KEY_BACKSPACE) {
+ if (k->get_keycode() == KEY_DELETE || k->get_keycode() == KEY_BACKSPACE) {
if (wip_active && selected_point.polygon == -1) {
@@ -555,10 +555,10 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
}
}
- } else if (wip_active && k->get_scancode() == KEY_ENTER) {
+ } else if (wip_active && k->get_keycode() == KEY_ENTER) {
_wip_close();
- } else if (wip_active && k->get_scancode() == KEY_ESCAPE) {
+ } else if (wip_active && k->get_keycode() == KEY_ESCAPE) {
_wip_cancel();
}
}
@@ -584,7 +584,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
if (wip_active && wip_destructive && j != -1)
continue;
- PoolVector<Vector2> points;
+ Vector<Vector2> points;
Vector2 offset;
if (wip_active && j == edited_point.polygon) {
@@ -695,15 +695,11 @@ void AbstractPolygon2DEditor::edit(Node *p_polygon) {
}
void AbstractPolygon2DEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_node_removed"), &AbstractPolygon2DEditor::_node_removed);
- ClassDB::bind_method(D_METHOD("_menu_option"), &AbstractPolygon2DEditor::_menu_option);
- ClassDB::bind_method(D_METHOD("_create_resource"), &AbstractPolygon2DEditor::_create_resource);
}
void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
- PoolVector<Vector2> vertices = _get_polygon(p_vertex.polygon);
+ Vector<Vector2> vertices = _get_polygon(p_vertex.polygon);
if (vertices.size() > (_is_line() ? 2 : 3)) {
@@ -744,7 +740,7 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const
for (int j = 0; j < n_polygons; j++) {
- PoolVector<Vector2> points = _get_polygon(j);
+ Vector<Vector2> points = _get_polygon(j);
const Vector2 offset = _get_offset(j);
const int n_points = points.size();
@@ -777,7 +773,7 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
for (int j = 0; j < n_polygons; j++) {
- PoolVector<Vector2> points = _get_polygon(j);
+ Vector<Vector2> points = _get_polygon(j);
const Vector2 offset = _get_offset(j);
const int n_points = points.size();
const int n_segments = n_points - (_is_line() ? 1 : 0);
@@ -820,17 +816,17 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi
add_child(memnew(VSeparator));
button_create = memnew(ToolButton);
add_child(button_create);
- button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE));
+ button_create->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(ToolButton);
add_child(button_edit);
- button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
+ button_edit->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
button_delete = memnew(ToolButton);
add_child(button_delete);
- button_delete->connect("pressed", this, "_menu_option", varray(MODE_DELETE));
+ button_delete->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_DELETE));
button_delete->set_toggle_mode(true);
create_resource = memnew(ConfirmationDialog);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 9261613ddd..7916ac71ea 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -42,7 +42,7 @@ StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && !k->is_echo()) {
+ if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
if (selected_point != -1) {
_erase_selected();
accept_event();
@@ -568,25 +568,10 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
}
void AnimationNodeBlendSpace1DEditor::_bind_methods() {
- ClassDB::bind_method("_blend_space_gui_input", &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input);
- ClassDB::bind_method("_blend_space_draw", &AnimationNodeBlendSpace1DEditor::_blend_space_draw);
- ClassDB::bind_method("_config_changed", &AnimationNodeBlendSpace1DEditor::_config_changed);
- ClassDB::bind_method("_labels_changed", &AnimationNodeBlendSpace1DEditor::_labels_changed);
ClassDB::bind_method("_update_space", &AnimationNodeBlendSpace1DEditor::_update_space);
- ClassDB::bind_method("_snap_toggled", &AnimationNodeBlendSpace1DEditor::_snap_toggled);
- ClassDB::bind_method("_tool_switch", &AnimationNodeBlendSpace1DEditor::_tool_switch);
- ClassDB::bind_method("_erase_selected", &AnimationNodeBlendSpace1DEditor::_erase_selected);
ClassDB::bind_method("_update_tool_erase", &AnimationNodeBlendSpace1DEditor::_update_tool_erase);
- ClassDB::bind_method("_edit_point_pos", &AnimationNodeBlendSpace1DEditor::_edit_point_pos);
-
- ClassDB::bind_method("_add_menu_type", &AnimationNodeBlendSpace1DEditor::_add_menu_type);
- ClassDB::bind_method("_add_animation_type", &AnimationNodeBlendSpace1DEditor::_add_animation_type);
ClassDB::bind_method("_update_edited_point_pos", &AnimationNodeBlendSpace1DEditor::_update_edited_point_pos);
-
- ClassDB::bind_method("_open_editor", &AnimationNodeBlendSpace1DEditor::_open_editor);
-
- ClassDB::bind_method("_file_opened", &AnimationNodeBlendSpace1DEditor::_file_opened);
}
bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node) {
@@ -622,28 +607,28 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", this, "_tool_switch", varray(3));
+ tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(3));
tool_select = memnew(ToolButton);
tool_select->set_toggle_mode(true);
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", this, "_tool_switch", varray(0));
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(0));
tool_create = memnew(ToolButton);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", this, "_tool_switch", varray(1));
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(1));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
tool_erase = memnew(ToolButton);
top_hb->add_child(tool_erase);
tool_erase->set_tooltip(TTR("Erase points."));
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
top_hb->add_child(memnew(VSeparator));
@@ -652,7 +637,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(snap);
snap->set_pressed(true);
snap->set_tooltip(TTR("Enable snap and show grid."));
- snap->connect("pressed", this, "_snap_toggled");
+ snap->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_snap_toggled));
snap_value = memnew(SpinBox);
top_hb->add_child(snap_value);
@@ -670,12 +655,12 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
edit_value->set_min(-1000);
edit_value->set_max(1000);
edit_value->set_step(0.01);
- edit_value->connect("value_changed", this, "_edit_point_pos");
+ edit_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_edit_point_pos));
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
+ open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), varray(), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
@@ -691,8 +676,8 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
panel->set_v_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
- blend_space_draw->connect("gui_input", this, "_blend_space_gui_input");
- blend_space_draw->connect("draw", this, "_blend_space_draw");
+ blend_space_draw->connect("gui_input", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_gui_input));
+ blend_space_draw->connect("draw", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_blend_space_draw));
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);
@@ -724,10 +709,10 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
bottom_hb->add_child(max_value);
}
- snap_value->connect("value_changed", this, "_config_changed");
- min_value->connect("value_changed", this, "_config_changed");
- max_value->connect("value_changed", this, "_config_changed");
- label_value->connect("text_changed", this, "_labels_changed");
+ snap_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
+ min_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
+ max_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
+ label_value->connect("text_changed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_labels_changed));
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -740,18 +725,18 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_animation_type));
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened));
undo_redo = EditorNode::get_undo_redo();
selected_point = -1;
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index fdd8ffd58f..663f2dde05 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -55,12 +55,12 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_changed() {
void AnimationNodeBlendSpace2DEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_space.is_valid()) {
- blend_space->disconnect("triangles_updated", this, "_blend_space_changed");
+ blend_space->disconnect("triangles_updated", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_changed));
}
blend_space = p_node;
if (!blend_space.is_null()) {
- blend_space->connect("triangles_updated", this, "_blend_space_changed");
+ blend_space->connect("triangles_updated", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_changed));
_update_space();
}
}
@@ -73,7 +73,7 @@ StringName AnimationNodeBlendSpace2DEditor::get_blend_position_path() const {
void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && !k->is_echo()) {
+ if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
if (selected_point != -1 || selected_triangle != -1) {
_erase_selected();
accept_event();
@@ -825,30 +825,12 @@ void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
void AnimationNodeBlendSpace2DEditor::_bind_methods() {
- ClassDB::bind_method("_blend_space_gui_input", &AnimationNodeBlendSpace2DEditor::_blend_space_gui_input);
- ClassDB::bind_method("_blend_space_draw", &AnimationNodeBlendSpace2DEditor::_blend_space_draw);
- ClassDB::bind_method("_config_changed", &AnimationNodeBlendSpace2DEditor::_config_changed);
- ClassDB::bind_method("_labels_changed", &AnimationNodeBlendSpace2DEditor::_labels_changed);
ClassDB::bind_method("_update_space", &AnimationNodeBlendSpace2DEditor::_update_space);
- ClassDB::bind_method("_snap_toggled", &AnimationNodeBlendSpace2DEditor::_snap_toggled);
- ClassDB::bind_method("_tool_switch", &AnimationNodeBlendSpace2DEditor::_tool_switch);
- ClassDB::bind_method("_erase_selected", &AnimationNodeBlendSpace2DEditor::_erase_selected);
ClassDB::bind_method("_update_tool_erase", &AnimationNodeBlendSpace2DEditor::_update_tool_erase);
- ClassDB::bind_method("_edit_point_pos", &AnimationNodeBlendSpace2DEditor::_edit_point_pos);
-
- ClassDB::bind_method("_add_menu_type", &AnimationNodeBlendSpace2DEditor::_add_menu_type);
- ClassDB::bind_method("_add_animation_type", &AnimationNodeBlendSpace2DEditor::_add_animation_type);
ClassDB::bind_method("_update_edited_point_pos", &AnimationNodeBlendSpace2DEditor::_update_edited_point_pos);
- ClassDB::bind_method("_open_editor", &AnimationNodeBlendSpace2DEditor::_open_editor);
-
ClassDB::bind_method("_removed_from_graph", &AnimationNodeBlendSpace2DEditor::_removed_from_graph);
-
- ClassDB::bind_method("_auto_triangles_toggled", &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled);
- ClassDB::bind_method("_blend_space_changed", &AnimationNodeBlendSpace2DEditor::_blend_space_changed);
-
- ClassDB::bind_method("_file_opened", &AnimationNodeBlendSpace2DEditor::_file_opened);
}
AnimationNodeBlendSpace2DEditor *AnimationNodeBlendSpace2DEditor::singleton = NULL;
@@ -870,42 +852,42 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", this, "_tool_switch", varray(3));
+ tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(3));
tool_select = memnew(ToolButton);
tool_select->set_toggle_mode(true);
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", this, "_tool_switch", varray(0));
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(0));
tool_create = memnew(ToolButton);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", this, "_tool_switch", varray(1));
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(1));
tool_triangle = memnew(ToolButton);
tool_triangle->set_toggle_mode(true);
tool_triangle->set_button_group(bg);
top_hb->add_child(tool_triangle);
tool_triangle->set_tooltip(TTR("Create triangles by connecting points."));
- tool_triangle->connect("pressed", this, "_tool_switch", varray(2));
+ tool_triangle->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(2));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
tool_erase = memnew(ToolButton);
top_hb->add_child(tool_erase);
tool_erase->set_tooltip(TTR("Erase points and triangles."));
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected));
tool_erase->set_disabled(true);
top_hb->add_child(memnew(VSeparator));
auto_triangles = memnew(ToolButton);
top_hb->add_child(auto_triangles);
- auto_triangles->connect("pressed", this, "_auto_triangles_toggled");
+ auto_triangles->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled));
auto_triangles->set_toggle_mode(true);
auto_triangles->set_tooltip(TTR("Generate blend triangles automatically (instead of manually)"));
@@ -916,7 +898,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(snap);
snap->set_pressed(true);
snap->set_tooltip(TTR("Enable snap and show grid."));
- snap->connect("pressed", this, "_snap_toggled");
+ snap->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_snap_toggled));
snap_x = memnew(SpinBox);
top_hb->add_child(snap_x);
@@ -937,7 +919,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(memnew(Label(TTR("Blend:"))));
interpolation = memnew(OptionButton);
top_hb->add_child(interpolation);
- interpolation->connect("item_selected", this, "_config_changed");
+ interpolation->connect("item_selected", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
edit_hb = memnew(HBoxContainer);
top_hb->add_child(edit_hb);
@@ -948,17 +930,17 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
edit_x->set_min(-1000);
edit_x->set_step(0.01);
edit_x->set_max(1000);
- edit_x->connect("value_changed", this, "_edit_point_pos");
+ edit_x->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_edit_point_pos));
edit_y = memnew(SpinBox);
edit_hb->add_child(edit_y);
edit_y->set_min(-1000);
edit_y->set_step(0.01);
edit_y->set_max(1000);
- edit_y->connect("value_changed", this, "_edit_point_pos");
+ edit_y->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_edit_point_pos));
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", this, "_open_editor", varray(), CONNECT_DEFERRED);
+ open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_open_editor), varray(), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
@@ -999,8 +981,8 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
panel->set_h_size_flags(SIZE_EXPAND_FILL);
blend_space_draw = memnew(Control);
- blend_space_draw->connect("gui_input", this, "_blend_space_gui_input");
- blend_space_draw->connect("draw", this, "_blend_space_draw");
+ blend_space_draw->connect("gui_input", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_gui_input));
+ blend_space_draw->connect("draw", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_blend_space_draw));
blend_space_draw->set_focus_mode(FOCUS_ALL);
panel->add_child(blend_space_draw);
@@ -1029,14 +1011,14 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
min_x_value->set_step(0.01);
}
- snap_x->connect("value_changed", this, "_config_changed");
- snap_y->connect("value_changed", this, "_config_changed");
- max_x_value->connect("value_changed", this, "_config_changed");
- min_x_value->connect("value_changed", this, "_config_changed");
- max_y_value->connect("value_changed", this, "_config_changed");
- min_y_value->connect("value_changed", this, "_config_changed");
- label_x->connect("text_changed", this, "_labels_changed");
- label_y->connect("text_changed", this, "_labels_changed");
+ snap_x->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ snap_y->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ max_x_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ min_x_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ max_y_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ min_y_value->connect("value_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_config_changed));
+ label_x->connect("text_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_labels_changed));
+ label_y->connect("text_changed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_labels_changed));
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -1050,18 +1032,18 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_menu_type));
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_animation_type));
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_file_opened));
undo_redo = EditorNode::get_undo_redo();
selected_point = -1;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index a100525d10..5e53adf471 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -146,11 +146,11 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
name->set_expand_to_text_length(true);
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, 0, get_color("font_color", "Label"));
- name->connect("text_entered", this, "_node_renamed", varray(agnode));
- name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED);
+ name->connect("text_entered", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed), varray(agnode));
+ name->connect("focus_exited", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out), varray(name, agnode), CONNECT_DEFERRED);
base = 1;
node->set_show_close_button(true);
- node->connect("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED);
+ node->connect("close_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_request), varray(E->get()), CONNECT_DEFERRED);
}
for (int i = 0; i < agnode->get_input_count(); i++) {
@@ -173,13 +173,13 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
prop->set_object_and_property(AnimationTreeEditor::get_singleton()->get_tree(), base_path);
prop->update_property();
prop->set_name_split_ratio(0);
- prop->connect("property_changed", this, "_property_changed");
+ prop->connect("property_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_property_changed));
node->add_child(prop);
visible_properties.push_back(prop);
}
}
- node->connect("dragged", this, "_node_dragged", varray(E->get()));
+ node->connect("dragged", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_dragged), varray(E->get()));
if (AnimationTreeEditor::get_singleton()->can_edit(agnode)) {
node->add_child(memnew(HSeparator));
@@ -187,7 +187,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
open_in_editor->set_text(TTR("Open Editor"));
open_in_editor->set_icon(get_icon("Edit", "EditorIcons"));
node->add_child(open_in_editor);
- open_in_editor->connect("pressed", this, "_open_in_editor", varray(E->get()), CONNECT_DEFERRED);
+ open_in_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor), varray(E->get()), CONNECT_DEFERRED);
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -198,7 +198,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
edit_filters->set_text(TTR("Edit Filters"));
edit_filters->set_icon(get_icon("AnimationFilter", "EditorIcons"));
node->add_child(edit_filters);
- edit_filters->connect("pressed", this, "_edit_filters", varray(E->get()), CONNECT_DEFERRED);
+ edit_filters->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_edit_filters), varray(E->get()), CONNECT_DEFERRED);
edit_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -238,7 +238,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
animations[E->get()] = pb;
node->add_child(pb);
- mb->get_popup()->connect("index_pressed", this, "_anim_selected", varray(options, E->get()), CONNECT_DEFERRED);
+ mb->get_popup()->connect("index_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_anim_selected), varray(options, E->get()), CONNECT_DEFERRED);
}
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
@@ -799,28 +799,7 @@ void AnimationNodeBlendTreeEditor::_scroll_changed(const Vector2 &p_scroll) {
void AnimationNodeBlendTreeEditor::_bind_methods() {
ClassDB::bind_method("_update_graph", &AnimationNodeBlendTreeEditor::_update_graph);
- ClassDB::bind_method("_add_node", &AnimationNodeBlendTreeEditor::_add_node);
- ClassDB::bind_method("_node_dragged", &AnimationNodeBlendTreeEditor::_node_dragged);
- ClassDB::bind_method("_node_renamed", &AnimationNodeBlendTreeEditor::_node_renamed);
- ClassDB::bind_method("_node_renamed_focus_out", &AnimationNodeBlendTreeEditor::_node_renamed_focus_out);
- ClassDB::bind_method("_connection_request", &AnimationNodeBlendTreeEditor::_connection_request);
- ClassDB::bind_method("_disconnection_request", &AnimationNodeBlendTreeEditor::_disconnection_request);
- ClassDB::bind_method("_node_selected", &AnimationNodeBlendTreeEditor::_node_selected);
- ClassDB::bind_method("_open_in_editor", &AnimationNodeBlendTreeEditor::_open_in_editor);
- ClassDB::bind_method("_scroll_changed", &AnimationNodeBlendTreeEditor::_scroll_changed);
- ClassDB::bind_method("_delete_request", &AnimationNodeBlendTreeEditor::_delete_request);
- ClassDB::bind_method("_delete_nodes_request", &AnimationNodeBlendTreeEditor::_delete_nodes_request);
- ClassDB::bind_method("_popup_request", &AnimationNodeBlendTreeEditor::_popup_request);
- ClassDB::bind_method("_edit_filters", &AnimationNodeBlendTreeEditor::_edit_filters);
ClassDB::bind_method("_update_filters", &AnimationNodeBlendTreeEditor::_update_filters);
- ClassDB::bind_method("_filter_edited", &AnimationNodeBlendTreeEditor::_filter_edited);
- ClassDB::bind_method("_filter_toggled", &AnimationNodeBlendTreeEditor::_filter_toggled);
- ClassDB::bind_method("_removed_from_graph", &AnimationNodeBlendTreeEditor::_removed_from_graph);
- ClassDB::bind_method("_property_changed", &AnimationNodeBlendTreeEditor::_property_changed);
- ClassDB::bind_method("_file_opened", &AnimationNodeBlendTreeEditor::_file_opened);
- ClassDB::bind_method("_update_options_menu", &AnimationNodeBlendTreeEditor::_update_options_menu);
-
- ClassDB::bind_method("_anim_selected", &AnimationNodeBlendTreeEditor::_anim_selected);
}
AnimationNodeBlendTreeEditor *AnimationNodeBlendTreeEditor::singleton = NULL;
@@ -911,7 +890,7 @@ bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) {
void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_tree.is_valid()) {
- blend_tree->disconnect("removed_from_graph", this, "_removed_from_graph");
+ blend_tree->disconnect("removed_from_graph", callable_mp(this, &AnimationNodeBlendTreeEditor::_removed_from_graph));
}
blend_tree = p_node;
@@ -919,7 +898,7 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_tree.is_null()) {
hide();
} else {
- blend_tree->connect("removed_from_graph", this, "_removed_from_graph");
+ blend_tree->connect("removed_from_graph", callable_mp(this, &AnimationNodeBlendTreeEditor::_removed_from_graph));
_update_graph();
}
@@ -936,12 +915,12 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->add_valid_right_disconnect_type(0);
graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
- graph->connect("node_selected", this, "_node_selected");
- graph->connect("scroll_offset_changed", this, "_scroll_changed");
- graph->connect("delete_nodes_request", this, "_delete_nodes_request");
- graph->connect("popup_request", this, "_popup_request");
+ graph->connect("connection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("disconnection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_disconnection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("node_selected", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_selected));
+ graph->connect("scroll_offset_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_scroll_changed));
+ graph->connect("delete_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_nodes_request));
+ graph->connect("popup_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_request));
VSeparator *vs = memnew(VSeparator);
graph->get_zoom_hbox()->add_child(vs);
@@ -951,8 +930,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->get_zoom_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->get_popup()->connect("id_pressed", this, "_add_node");
- add_node->connect("about_to_show", this, "_update_options_menu");
+ add_node->get_popup()->connect("id_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
+ add_node->connect("about_to_show", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu));
add_options.push_back(AddOption("Animation", "AnimationNodeAnimation"));
add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot"));
@@ -984,19 +963,19 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
filter_enabled = memnew(CheckBox);
filter_enabled->set_text(TTR("Enable Filtering"));
- filter_enabled->connect("pressed", this, "_filter_toggled");
+ filter_enabled->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_toggled));
filter_vbox->add_child(filter_enabled);
filters = memnew(Tree);
filter_vbox->add_child(filters);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
- filters->connect("item_edited", this, "_filter_edited");
+ filters->connect("item_edited", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_edited));
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendTreeEditor::_file_opened));
undo_redo = EditorNode::get_undo_redo();
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index d8bbac9c49..af12335a27 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -38,10 +38,8 @@
#include "editor/animation_track_editor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-
-// For onion skinning.
-#include "editor/plugins/canvas_item_editor_plugin.h"
-#include "editor/plugins/spatial_editor_plugin.h"
+#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning.
+#include "editor/plugins/spatial_editor_plugin.h" // For onion skinning.
#include "scene/main/viewport.h"
#include "servers/visual_server.h"
@@ -99,13 +97,13 @@ void AnimationPlayerEditor::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- tool_anim->get_popup()->connect("id_pressed", this, "_animation_tool_menu");
+ tool_anim->get_popup()->connect("id_pressed", callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
- onion_skinning->get_popup()->connect("id_pressed", this, "_onion_skinning_menu");
+ onion_skinning->get_popup()->connect("id_pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
- blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
+ blend_editor.next->connect("item_selected", callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &AnimationPlayerEditor::_node_removed));
add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel"));
} break;
@@ -375,8 +373,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
- accept->set_text(TTR("Error saving resource!"));
- accept->popup_centered_minsize();
+ EditorNode::get_singleton()->show_warning(TTR("Error saving resource!"));
return;
}
@@ -1271,7 +1268,7 @@ void AnimationPlayerEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
Ref<InputEventKey> k = p_ev;
if (is_visible_in_tree() && k.is_valid() && k->is_pressed() && !k->is_echo() && !k->get_alt() && !k->get_control() && !k->get_metakey()) {
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_A: {
if (!k->get_shift())
@@ -1372,6 +1369,10 @@ void AnimationPlayerEditor::_prepare_onion_layers_1() {
call_deferred("_prepare_onion_layers_2");
}
+void AnimationPlayerEditor::_prepare_onion_layers_1_deferred() {
+ call_deferred("_prepare_onion_layers_1");
+}
+
void AnimationPlayerEditor::_prepare_onion_layers_2() {
Ref<Animation> anim = player->get_animation(player->get_assigned_animation());
@@ -1504,16 +1505,16 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
void AnimationPlayerEditor::_start_onion_skinning() {
// FIXME: Using "idle_frame" makes onion layers update one frame behind the current.
- if (!get_tree()->is_connected("idle_frame", this, "call_deferred")) {
- get_tree()->connect("idle_frame", this, "call_deferred", varray("_prepare_onion_layers_1"));
+ if (!get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) {
+ get_tree()->connect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred));
}
}
void AnimationPlayerEditor::_stop_onion_skinning() {
- if (get_tree()->is_connected("idle_frame", this, "call_deferred")) {
+ if (get_tree()->is_connected("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred))) {
- get_tree()->disconnect("idle_frame", this, "call_deferred");
+ get_tree()->disconnect("idle_frame", callable_mp(this, &AnimationPlayerEditor::_prepare_onion_layers_1_deferred));
_free_onion_layers();
@@ -1530,44 +1531,22 @@ void AnimationPlayerEditor::_pin_pressed() {
void AnimationPlayerEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_node_removed"), &AnimationPlayerEditor::_node_removed);
- ClassDB::bind_method(D_METHOD("_play_pressed"), &AnimationPlayerEditor::_play_pressed);
- ClassDB::bind_method(D_METHOD("_play_from_pressed"), &AnimationPlayerEditor::_play_from_pressed);
- ClassDB::bind_method(D_METHOD("_play_bw_pressed"), &AnimationPlayerEditor::_play_bw_pressed);
- ClassDB::bind_method(D_METHOD("_play_bw_from_pressed"), &AnimationPlayerEditor::_play_bw_from_pressed);
- ClassDB::bind_method(D_METHOD("_stop_pressed"), &AnimationPlayerEditor::_stop_pressed);
- ClassDB::bind_method(D_METHOD("_autoplay_pressed"), &AnimationPlayerEditor::_autoplay_pressed);
- ClassDB::bind_method(D_METHOD("_animation_selected"), &AnimationPlayerEditor::_animation_selected);
- ClassDB::bind_method(D_METHOD("_animation_name_edited"), &AnimationPlayerEditor::_animation_name_edited);
ClassDB::bind_method(D_METHOD("_animation_new"), &AnimationPlayerEditor::_animation_new);
ClassDB::bind_method(D_METHOD("_animation_rename"), &AnimationPlayerEditor::_animation_rename);
ClassDB::bind_method(D_METHOD("_animation_load"), &AnimationPlayerEditor::_animation_load);
ClassDB::bind_method(D_METHOD("_animation_remove"), &AnimationPlayerEditor::_animation_remove);
- ClassDB::bind_method(D_METHOD("_animation_remove_confirmed"), &AnimationPlayerEditor::_animation_remove_confirmed);
ClassDB::bind_method(D_METHOD("_animation_blend"), &AnimationPlayerEditor::_animation_blend);
ClassDB::bind_method(D_METHOD("_animation_edit"), &AnimationPlayerEditor::_animation_edit);
ClassDB::bind_method(D_METHOD("_animation_resource_edit"), &AnimationPlayerEditor::_animation_resource_edit);
- ClassDB::bind_method(D_METHOD("_dialog_action"), &AnimationPlayerEditor::_dialog_action);
- ClassDB::bind_method(D_METHOD("_seek_value_changed"), &AnimationPlayerEditor::_seek_value_changed, DEFVAL(true));
ClassDB::bind_method(D_METHOD("_animation_player_changed"), &AnimationPlayerEditor::_animation_player_changed);
- ClassDB::bind_method(D_METHOD("_blend_edited"), &AnimationPlayerEditor::_blend_edited);
- ClassDB::bind_method(D_METHOD("_scale_changed"), &AnimationPlayerEditor::_scale_changed);
ClassDB::bind_method(D_METHOD("_list_changed"), &AnimationPlayerEditor::_list_changed);
- ClassDB::bind_method(D_METHOD("_animation_key_editor_seek"), &AnimationPlayerEditor::_animation_key_editor_seek);
- ClassDB::bind_method(D_METHOD("_animation_key_editor_anim_len_changed"), &AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
ClassDB::bind_method(D_METHOD("_animation_duplicate"), &AnimationPlayerEditor::_animation_duplicate);
- ClassDB::bind_method(D_METHOD("_blend_editor_next_changed"), &AnimationPlayerEditor::_blend_editor_next_changed);
ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &AnimationPlayerEditor::_unhandled_key_input);
- ClassDB::bind_method(D_METHOD("_animation_tool_menu"), &AnimationPlayerEditor::_animation_tool_menu);
- ClassDB::bind_method(D_METHOD("_onion_skinning_menu"), &AnimationPlayerEditor::_onion_skinning_menu);
- ClassDB::bind_method(D_METHOD("_editor_visibility_changed"), &AnimationPlayerEditor::_editor_visibility_changed);
ClassDB::bind_method(D_METHOD("_prepare_onion_layers_1"), &AnimationPlayerEditor::_prepare_onion_layers_1);
ClassDB::bind_method(D_METHOD("_prepare_onion_layers_2"), &AnimationPlayerEditor::_prepare_onion_layers_2);
ClassDB::bind_method(D_METHOD("_start_onion_skinning"), &AnimationPlayerEditor::_start_onion_skinning);
ClassDB::bind_method(D_METHOD("_stop_onion_skinning"), &AnimationPlayerEditor::_stop_onion_skinning);
-
- ClassDB::bind_method(D_METHOD("_pin_pressed"), &AnimationPlayerEditor::_pin_pressed);
}
AnimationPlayerEditor *AnimationPlayerEditor::singleton = NULL;
@@ -1628,13 +1607,9 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
scale->set_tooltip(TTR("Scale animation playback globally for the node."));
scale->hide();
- accept = memnew(AcceptDialog);
- add_child(accept);
- accept->connect("confirmed", this, "_menu_confirm_current");
-
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", this, "_animation_remove_confirmed");
+ delete_dialog->connect("confirmed", callable_mp(this, &AnimationPlayerEditor::_animation_remove_confirmed));
tool_anim = memnew(MenuButton);
tool_anim->set_flat(false);
@@ -1679,7 +1654,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
onion_toggle = memnew(ToolButton);
onion_toggle->set_toggle_mode(true);
onion_toggle->set_tooltip(TTR("Enable Onion Skinning"));
- onion_toggle->connect("pressed", this, "_onion_skinning_menu", varray(ONION_SKINNING_ENABLE));
+ onion_toggle->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu), varray(ONION_SKINNING_ENABLE));
hb->add_child(onion_toggle);
onion_skinning = memnew(MenuButton);
@@ -1705,7 +1680,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
pin->set_toggle_mode(true);
pin->set_tooltip(TTR("Pin AnimationPlayer"));
hb->add_child(pin);
- pin->connect("pressed", this, "_pin_pressed");
+ pin->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_pin_pressed));
file = memnew(EditorFileDialog);
add_child(file);
@@ -1729,7 +1704,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
error_dialog->set_title(TTR("Error!"));
add_child(error_dialog);
- name_dialog->connect("confirmed", this, "_animation_name_edited");
+ name_dialog->connect("confirmed", callable_mp(this, &AnimationPlayerEditor::_animation_name_edited));
blend_editor.dialog = memnew(AcceptDialog);
add_child(blend_editor.dialog);
@@ -1745,21 +1720,21 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
updating_blends = false;
- blend_editor.tree->connect("item_edited", this, "_blend_edited");
+ blend_editor.tree->connect("item_edited", callable_mp(this, &AnimationPlayerEditor::_blend_edited));
- autoplay->connect("pressed", this, "_autoplay_pressed");
+ autoplay->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_autoplay_pressed));
autoplay->set_toggle_mode(true);
- play->connect("pressed", this, "_play_pressed");
- play_from->connect("pressed", this, "_play_from_pressed");
- play_bw->connect("pressed", this, "_play_bw_pressed");
- play_bw_from->connect("pressed", this, "_play_bw_from_pressed");
- stop->connect("pressed", this, "_stop_pressed");
+ play->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_play_pressed));
+ play_from->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_play_from_pressed));
+ play_bw->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_play_bw_pressed));
+ play_bw_from->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_play_bw_from_pressed));
+ stop->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_stop_pressed));
- animation->connect("item_selected", this, "_animation_selected", Vector<Variant>(), true);
+ animation->connect("item_selected", callable_mp(this, &AnimationPlayerEditor::_animation_selected));
- file->connect("file_selected", this, "_dialog_action");
- frame->connect("value_changed", this, "_seek_value_changed", Vector<Variant>(), true);
- scale->connect("text_entered", this, "_scale_changed", Vector<Variant>(), true);
+ file->connect("file_selected", callable_mp(this, &AnimationPlayerEditor::_dialog_action));
+ frame->connect("value_changed", callable_mp(this, &AnimationPlayerEditor::_seek_value_changed), make_binds(true));
+ scale->connect("text_entered", callable_mp(this, &AnimationPlayerEditor::_scale_changed));
renaming = false;
last_active = false;
@@ -1769,14 +1744,14 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
add_child(track_editor);
track_editor->set_v_size_flags(SIZE_EXPAND_FILL);
- track_editor->connect("timeline_changed", this, "_animation_key_editor_seek");
- track_editor->connect("animation_len_changed", this, "_animation_key_editor_anim_len_changed");
+ track_editor->connect("timeline_changed", callable_mp(this, &AnimationPlayerEditor::_animation_key_editor_seek));
+ track_editor->connect("animation_len_changed", callable_mp(this, &AnimationPlayerEditor::_animation_key_editor_anim_len_changed));
_update_player();
// Onion skinning.
- track_editor->connect("visibility_changed", this, "_editor_visibility_changed");
+ track_editor->connect("visibility_changed", callable_mp(this, &AnimationPlayerEditor::_editor_visibility_changed));
onion.enabled = false;
onion.past = true;
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index ab9db279d5..1abefad635 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -110,7 +110,6 @@ class AnimationPlayerEditor : public VBoxContainer {
float timeline_position;
EditorFileDialog *file;
- AcceptDialog *accept;
ConfirmationDialog *delete_dialog;
int current_option;
@@ -210,6 +209,7 @@ class AnimationPlayerEditor : public VBoxContainer {
void _allocate_onion_layers();
void _free_onion_layers();
void _prepare_onion_layers_1();
+ void _prepare_onion_layers_1_deferred();
void _prepare_onion_layers_2();
void _start_onion_skinning();
void _stop_onion_skinning();
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 035a67b821..cae959e1f4 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -69,7 +69,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
return;
Ref<InputEventKey> k = p_event;
- if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && !k->is_echo()) {
+ if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && !k->is_echo()) {
if (selected_node != StringName() || selected_transition_to != StringName() || selected_transition_from != StringName()) {
_erase_selected();
accept_event();
@@ -1234,27 +1234,11 @@ void AnimationNodeStateMachineEditor::_update_mode() {
void AnimationNodeStateMachineEditor::_bind_methods() {
- ClassDB::bind_method("_state_machine_gui_input", &AnimationNodeStateMachineEditor::_state_machine_gui_input);
- ClassDB::bind_method("_state_machine_draw", &AnimationNodeStateMachineEditor::_state_machine_draw);
- ClassDB::bind_method("_state_machine_pos_draw", &AnimationNodeStateMachineEditor::_state_machine_pos_draw);
ClassDB::bind_method("_update_graph", &AnimationNodeStateMachineEditor::_update_graph);
- ClassDB::bind_method("_add_menu_type", &AnimationNodeStateMachineEditor::_add_menu_type);
- ClassDB::bind_method("_add_animation_type", &AnimationNodeStateMachineEditor::_add_animation_type);
-
- ClassDB::bind_method("_name_edited", &AnimationNodeStateMachineEditor::_name_edited);
- ClassDB::bind_method("_name_edited_focus_out", &AnimationNodeStateMachineEditor::_name_edited_focus_out);
-
ClassDB::bind_method("_removed_from_graph", &AnimationNodeStateMachineEditor::_removed_from_graph);
ClassDB::bind_method("_open_editor", &AnimationNodeStateMachineEditor::_open_editor);
- ClassDB::bind_method("_scroll_changed", &AnimationNodeStateMachineEditor::_scroll_changed);
-
- ClassDB::bind_method("_erase_selected", &AnimationNodeStateMachineEditor::_erase_selected);
- ClassDB::bind_method("_autoplay_selected", &AnimationNodeStateMachineEditor::_autoplay_selected);
- ClassDB::bind_method("_end_selected", &AnimationNodeStateMachineEditor::_end_selected);
- ClassDB::bind_method("_update_mode", &AnimationNodeStateMachineEditor::_update_mode);
- ClassDB::bind_method("_file_opened", &AnimationNodeStateMachineEditor::_file_opened);
}
AnimationNodeStateMachineEditor *AnimationNodeStateMachineEditor::singleton = NULL;
@@ -1276,21 +1260,21 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_select->set_button_group(bg);
tool_select->set_pressed(true);
tool_select->set_tooltip(TTR("Select and move nodes.\nRMB to add new nodes.\nShift+LMB to create connections."));
- tool_select->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
tool_create = memnew(ToolButton);
top_hb->add_child(tool_create);
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
tool_create->set_tooltip(TTR("Create new nodes."));
- tool_create->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
tool_connect = memnew(ToolButton);
top_hb->add_child(tool_connect);
tool_connect->set_toggle_mode(true);
tool_connect->set_button_group(bg);
tool_connect->set_tooltip(TTR("Connect nodes."));
- tool_connect->connect("pressed", this, "_update_mode", varray(), CONNECT_DEFERRED);
+ tool_connect->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
tool_erase_hb = memnew(HBoxContainer);
top_hb->add_child(tool_erase_hb);
@@ -1298,7 +1282,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_erase = memnew(ToolButton);
tool_erase->set_tooltip(TTR("Remove selected node or transition."));
tool_erase_hb->add_child(tool_erase);
- tool_erase->connect("pressed", this, "_erase_selected");
+ tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected));
tool_erase->set_disabled(true);
tool_erase_hb->add_child(memnew(VSeparator));
@@ -1306,13 +1290,13 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_autoplay = memnew(ToolButton);
tool_autoplay->set_tooltip(TTR("Toggle autoplay this animation on start, restart or seek to zero."));
tool_erase_hb->add_child(tool_autoplay);
- tool_autoplay->connect("pressed", this, "_autoplay_selected");
+ tool_autoplay->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_autoplay_selected));
tool_autoplay->set_disabled(true);
tool_end = memnew(ToolButton);
tool_end->set_tooltip(TTR("Set the end animation. This is useful for sub-transitions."));
tool_erase_hb->add_child(tool_end);
- tool_end->connect("pressed", this, "_end_selected");
+ tool_end->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_end_selected));
tool_end->set_disabled(true);
top_hb->add_child(memnew(VSeparator));
@@ -1333,26 +1317,26 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
state_machine_draw = memnew(Control);
panel->add_child(state_machine_draw);
- state_machine_draw->connect("gui_input", this, "_state_machine_gui_input");
- state_machine_draw->connect("draw", this, "_state_machine_draw");
+ state_machine_draw->connect("gui_input", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_gui_input));
+ state_machine_draw->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_draw));
state_machine_draw->set_focus_mode(FOCUS_ALL);
state_machine_play_pos = memnew(Control);
state_machine_draw->add_child(state_machine_play_pos);
state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent
state_machine_play_pos->set_anchors_and_margins_preset(PRESET_WIDE);
- state_machine_play_pos->connect("draw", this, "_state_machine_pos_draw");
+ state_machine_play_pos->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw));
v_scroll = memnew(VScrollBar);
state_machine_draw->add_child(v_scroll);
v_scroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE);
- v_scroll->connect("value_changed", this, "_scroll_changed");
+ v_scroll->connect("value_changed", callable_mp(this, &AnimationNodeStateMachineEditor::_scroll_changed));
h_scroll = memnew(HScrollBar);
state_machine_draw->add_child(h_scroll);
h_scroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
h_scroll->set_margin(MARGIN_RIGHT, -v_scroll->get_size().x * EDSCALE);
- h_scroll->connect("value_changed", this, "_scroll_changed");
+ h_scroll->connect("value_changed", callable_mp(this, &AnimationNodeStateMachineEditor::_scroll_changed));
error_panel = memnew(PanelContainer);
add_child(error_panel);
@@ -1366,25 +1350,25 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_add_menu_type");
+ menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type));
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
animations_menu->set_name("animations");
- animations_menu->connect("index_pressed", this, "_add_animation_type");
+ animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_animation_type));
name_edit = memnew(LineEdit);
state_machine_draw->add_child(name_edit);
name_edit->hide();
- name_edit->connect("text_entered", this, "_name_edited");
- name_edit->connect("focus_exited", this, "_name_edited_focus_out");
+ name_edit->connect("text_entered", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited));
+ name_edit->connect("focus_exited", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited_focus_out));
name_edit->set_as_toplevel(true);
open_file = memnew(EditorFileDialog);
add_child(open_file);
open_file->set_title(TTR("Open Animation Node"));
open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- open_file->connect("file_selected", this, "_file_opened");
+ open_file->connect("file_selected", callable_mp(this, &AnimationNodeStateMachineEditor::_file_opened));
undo_redo = EditorNode::get_undo_redo();
over_text = false;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index a729c90160..c9706a7f68 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -85,7 +85,7 @@ void AnimationTreeEditor::_update_path() {
b->set_button_group(group);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", this, "_path_button_pressed", varray(-1));
+ b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed), varray(-1));
path_hb->add_child(b);
for (int i = 0; i < button_path.size(); i++) {
b = memnew(Button);
@@ -95,7 +95,7 @@ void AnimationTreeEditor::_update_path() {
path_hb->add_child(b);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", this, "_path_button_pressed", varray(i));
+ b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed), varray(i));
}
}
@@ -167,7 +167,6 @@ void AnimationTreeEditor::_notification(int p_what) {
}
void AnimationTreeEditor::_bind_methods() {
- ClassDB::bind_method("_path_button_pressed", &AnimationTreeEditor::_path_button_pressed);
}
AnimationTreeEditor *AnimationTreeEditor::singleton = NULL;
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index a479703527..80b7e6ffc8 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -86,9 +86,6 @@ void EditorAssetLibraryItem::_author_clicked() {
void EditorAssetLibraryItem::_bind_methods() {
ClassDB::bind_method("set_image", &EditorAssetLibraryItem::set_image);
- ClassDB::bind_method("_asset_clicked", &EditorAssetLibraryItem::_asset_clicked);
- ClassDB::bind_method("_category_clicked", &EditorAssetLibraryItem::_category_clicked);
- ClassDB::bind_method("_author_clicked", &EditorAssetLibraryItem::_author_clicked);
ADD_SIGNAL(MethodInfo("asset_selected"));
ADD_SIGNAL(MethodInfo("category_selected"));
ADD_SIGNAL(MethodInfo("author_selected"));
@@ -112,7 +109,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
icon = memnew(TextureButton);
icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE);
icon->set_default_cursor_shape(CURSOR_POINTING_HAND);
- icon->connect("pressed", this, "_asset_clicked");
+ icon->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
hb->add_child(icon);
@@ -123,17 +120,17 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
title = memnew(LinkButton);
title->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- title->connect("pressed", this, "_asset_clicked");
+ title->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_asset_clicked));
vb->add_child(title);
category = memnew(LinkButton);
category->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- category->connect("pressed", this, "_category_clicked");
+ category->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_category_clicked));
vb->add_child(category);
author = memnew(LinkButton);
author->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- author->connect("pressed", this, "_author_clicked");
+ author->connect("pressed", callable_mp(this, &EditorAssetLibraryItem::_author_clicked));
vb->add_child(author);
price = memnew(Label);
@@ -166,9 +163,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
// Overlay and thumbnail need the same format for `blend_rect` to work.
thumbnail->convert(Image::FORMAT_RGBA8);
- thumbnail->lock();
+
thumbnail->blend_rect(overlay, overlay->get_used_rect(), overlay_pos);
- thumbnail->unlock();
Ref<ImageTexture> tex;
tex.instance();
@@ -209,8 +205,6 @@ void EditorAssetLibraryItemDescription::_notification(int p_what) {
void EditorAssetLibraryItemDescription::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_image"), &EditorAssetLibraryItemDescription::set_image);
- ClassDB::bind_method(D_METHOD("_link_click"), &EditorAssetLibraryItemDescription::_link_click);
- ClassDB::bind_method(D_METHOD("_preview_click"), &EditorAssetLibraryItemDescription::_preview_click);
}
void EditorAssetLibraryItemDescription::_link_click(const String &p_url) {
@@ -264,7 +258,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
preview.button->set_flat(true);
preview.button->set_icon(get_icon("ThumbnailWait", "EditorIcons"));
preview.button->set_toggle_mode(true);
- preview.button->connect("pressed", this, "_preview_click", varray(p_id));
+ preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click), varray(p_id));
preview_hb->add_child(preview.button);
if (!p_video) {
preview.image = get_icon("ThumbnailWait", "EditorIcons");
@@ -291,7 +285,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
description = memnew(RichTextLabel);
desc_vbox->add_child(description);
description->set_v_size_flags(SIZE_EXPAND_FILL);
- description->connect("meta_clicked", this, "_link_click");
+ description->connect("meta_clicked", callable_mp(this, &EditorAssetLibraryItemDescription::_link_click));
description->add_constant_override("line_separation", Math::round(5 * EDSCALE));
VBoxContainer *previews_vbox = memnew(VBoxContainer);
@@ -322,7 +316,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
}
///////////////////////////////////////////////////////////////////////////////////
-void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) {
+void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
String error_text;
@@ -501,11 +495,6 @@ void EditorAssetLibraryItemDownload::_make_request() {
void EditorAssetLibraryItemDownload::_bind_methods() {
- ClassDB::bind_method("_http_download_completed", &EditorAssetLibraryItemDownload::_http_download_completed);
- ClassDB::bind_method("_install", &EditorAssetLibraryItemDownload::_install);
- ClassDB::bind_method("_close", &EditorAssetLibraryItemDownload::_close);
- ClassDB::bind_method("_make_request", &EditorAssetLibraryItemDownload::_make_request);
-
ADD_SIGNAL(MethodInfo("install_asset", PropertyInfo(Variant::STRING, "zip_path"), PropertyInfo(Variant::STRING, "name")));
}
@@ -527,7 +516,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
title->set_h_size_flags(SIZE_EXPAND_FILL);
dismiss = memnew(TextureButton);
- dismiss->connect("pressed", this, "_close");
+ dismiss->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
title_hb->add_child(dismiss);
title->set_clip_text(true);
@@ -547,11 +536,11 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
install = memnew(Button);
install->set_text(TTR("Install..."));
install->set_disabled(true);
- install->connect("pressed", this, "_install");
+ install->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_install));
retry = memnew(Button);
retry->set_text(TTR("Retry"));
- retry->connect("pressed", this, "_make_request");
+ retry->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
hb2->add_child(retry);
hb2->add_child(install);
@@ -559,7 +548,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
download = memnew(HTTPRequest);
add_child(download);
- download->connect("request_completed", this, "_http_download_completed");
+ download->connect("request_completed", callable_mp(this, &EditorAssetLibraryItemDownload::_http_download_completed));
download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
download_error = memnew(AcceptDialog);
@@ -568,7 +557,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
asset_installer = memnew(EditorAssetInstaller);
add_child(asset_installer);
- asset_installer->connect("confirmed", this, "_close");
+ asset_installer->connect("confirmed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
prev_status = -1;
@@ -628,7 +617,7 @@ void EditorAssetLibrary::_unhandled_input(const Ref<InputEvent> &p_event) {
if (key.is_valid() && key->is_pressed()) {
- if (key->get_scancode_with_modifiers() == (KEY_MASK_CMD | KEY_F) && is_visible_in_tree()) {
+ if (key->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F) && is_visible_in_tree()) {
filter->grab_focus();
filter->select_all();
@@ -658,7 +647,7 @@ void EditorAssetLibrary::_install_asset() {
if (templates_only) {
download->set_external_install(true);
- download->connect("install_asset", this, "_install_external_asset");
+ download->connect("install_asset", callable_mp(this, &EditorAssetLibrary::_install_external_asset));
}
}
@@ -710,12 +699,12 @@ void EditorAssetLibrary::_select_asset(int p_id) {
_api_request("asset/" + itos(p_id), REQUESTING_ASSET);
}
-void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByteArray &p_data, int p_queue_id) {
+void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id) {
Object *obj = ObjectDB::get_instance(image_queue[p_queue_id].target);
if (obj) {
bool image_set = false;
- PoolByteArray image_data = p_data;
+ PackedByteArray image_data = p_data;
if (use_cache) {
String cache_filename_base = EditorSettings::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
@@ -723,12 +712,12 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
FileAccess *file = FileAccess::open(cache_filename_base + ".data", FileAccess::READ);
if (file) {
- PoolByteArray cached_data;
+ PackedByteArray cached_data;
int len = file->get_32();
cached_data.resize(len);
- PoolByteArray::Write w = cached_data.write();
- file->get_buffer(w.ptr(), len);
+ uint8_t *w = cached_data.ptrw();
+ file->get_buffer(w, len);
image_data = cached_data;
file->close();
@@ -737,17 +726,17 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
}
int len = image_data.size();
- PoolByteArray::Read r = image_data.read();
+ const uint8_t *r = image_data.ptr();
Ref<Image> image = Ref<Image>(memnew(Image));
uint8_t png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
uint8_t jpg_signature[3] = { 255, 216, 255 };
- if (r.ptr()) {
+ if (r) {
if ((memcmp(&r[0], &png_signature[0], 8) == 0) && Image::_png_mem_loader_func) {
- image->copy_internals_from(Image::_png_mem_loader_func(r.ptr(), len));
+ image->copy_internals_from(Image::_png_mem_loader_func(r, len));
} else if ((memcmp(&r[0], &jpg_signature[0], 3) == 0) && Image::_jpg_mem_loader_func) {
- image->copy_internals_from(Image::_jpg_mem_loader_func(r.ptr(), len));
+ image->copy_internals_from(Image::_jpg_mem_loader_func(r, len));
}
}
@@ -790,7 +779,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
}
}
-void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data, int p_queue_id) {
+void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id) {
ERR_FAIL_COND(!image_queue.has(p_queue_id));
@@ -811,11 +800,11 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
}
int len = p_data.size();
- PoolByteArray::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
file = FileAccess::open(cache_filename_base + ".data", FileAccess::WRITE);
if (file) {
file->store_32(len);
- file->store_buffer(r.ptr(), len);
+ file->store_buffer(r, len);
file->close();
memdelete(file);
}
@@ -893,13 +882,13 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag
iq.queue_id = ++last_queue_id;
iq.active = false;
- iq.request->connect("request_completed", this, "_image_request_completed", varray(iq.queue_id));
+ iq.request->connect("request_completed", callable_mp(this, &EditorAssetLibrary::_image_request_completed), varray(iq.queue_id));
image_queue[iq.queue_id] = iq;
add_child(iq.request);
- _image_update(true, false, PoolByteArray(), iq.queue_id);
+ _image_update(true, false, PackedByteArray(), iq.queue_id);
_update_image_queue();
}
@@ -992,7 +981,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *first = memnew(Button);
first->set_text(TTR("First"));
if (p_page != 0) {
- first->connect("pressed", this, "_search", varray(0));
+ first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(0));
} else {
first->set_disabled(true);
first->set_focus_mode(Control::FOCUS_NONE);
@@ -1002,7 +991,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *prev = memnew(Button);
prev->set_text(TTR("Previous"));
if (p_page > 0) {
- prev->connect("pressed", this, "_search", varray(p_page - 1));
+ prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page - 1));
} else {
prev->set_disabled(true);
prev->set_focus_mode(Control::FOCUS_NONE);
@@ -1024,7 +1013,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *current = memnew(Button);
current->set_text(itos(i + 1));
- current->connect("pressed", this, "_search", varray(i));
+ current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(i));
hbc->add_child(current);
}
@@ -1033,7 +1022,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *next = memnew(Button);
next->set_text(TTR("Next"));
if (p_page < p_page_count - 1) {
- next->connect("pressed", this, "_search", varray(p_page + 1));
+ next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page + 1));
} else {
next->set_disabled(true);
next->set_focus_mode(Control::FOCUS_NONE);
@@ -1044,7 +1033,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *last = memnew(Button);
last->set_text(TTR("Last"));
if (p_page != p_page_count - 1) {
- last->connect("pressed", this, "_search", varray(p_page_count - 1));
+ last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page_count - 1));
} else {
last->set_disabled(true);
last->set_focus_mode(Control::FOCUS_NONE);
@@ -1068,14 +1057,14 @@ void EditorAssetLibrary::_api_request(const String &p_request, RequestType p_req
request->request(host + "/" + p_request + p_arguments);
}
-void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) {
+void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
String str;
{
int datalen = p_data.size();
- PoolByteArray::Read r = p_data.read();
- str.parse_utf8((const char *)r.ptr(), datalen);
+ const uint8_t *r = p_data.ptr();
+ str.parse_utf8((const char *)r, datalen);
}
bool error_abort = true;
@@ -1211,7 +1200,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
library_vb->add_child(asset_bottom_page);
if (result.empty()) {
- library_error->set_text(vformat(TTR("No results for \"%s\"."), filter->get_text()));
+ if (filter->get_text() != String()) {
+ library_error->set_text(
+ vformat(TTR("No results for \"%s\"."), filter->get_text()));
+ } else {
+ // No results, even though the user didn't search for anything specific.
+ // This is typically because the version number changed recently
+ // and no assets compatible with the new version have been published yet.
+ library_error->set_text(
+ vformat(TTR("No results compatible with %s %s."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH)));
+ }
library_error->show();
}
@@ -1230,9 +1228,9 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
EditorAssetLibraryItem *item = memnew(EditorAssetLibraryItem);
asset_items->add_child(item);
item->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"]);
- item->connect("asset_selected", this, "_select_asset");
- item->connect("author_selected", this, "_select_author");
- item->connect("category_selected", this, "_select_category");
+ item->connect("asset_selected", callable_mp(this, &EditorAssetLibrary::_select_asset));
+ item->connect("author_selected", callable_mp(this, &EditorAssetLibrary::_select_author));
+ item->connect("category_selected", callable_mp(this, &EditorAssetLibrary::_select_category));
if (r.has("icon_url") && r["icon_url"] != "") {
_request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0);
@@ -1263,7 +1261,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
description = memnew(EditorAssetLibraryItemDescription);
add_child(description);
description->popup_centered_minsize();
- description->connect("confirmed", this, "_install_asset");
+ description->connect("confirmed", callable_mp(this, &EditorAssetLibrary::_install_asset));
description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]);
@@ -1338,21 +1336,6 @@ void EditorAssetLibrary::disable_community_support() {
void EditorAssetLibrary::_bind_methods() {
ClassDB::bind_method("_unhandled_input", &EditorAssetLibrary::_unhandled_input);
- ClassDB::bind_method("_http_request_completed", &EditorAssetLibrary::_http_request_completed);
- ClassDB::bind_method("_select_asset", &EditorAssetLibrary::_select_asset);
- ClassDB::bind_method("_select_author", &EditorAssetLibrary::_select_author);
- ClassDB::bind_method("_select_category", &EditorAssetLibrary::_select_category);
- ClassDB::bind_method("_image_request_completed", &EditorAssetLibrary::_image_request_completed);
- ClassDB::bind_method("_search", &EditorAssetLibrary::_search, DEFVAL(0));
- ClassDB::bind_method("_search_text_entered", &EditorAssetLibrary::_search_text_entered);
- ClassDB::bind_method("_install_asset", &EditorAssetLibrary::_install_asset);
- ClassDB::bind_method("_manage_plugins", &EditorAssetLibrary::_manage_plugins);
- ClassDB::bind_method("_asset_open", &EditorAssetLibrary::_asset_open);
- ClassDB::bind_method("_asset_file_selected", &EditorAssetLibrary::_asset_file_selected);
- ClassDB::bind_method("_repository_changed", &EditorAssetLibrary::_repository_changed);
- ClassDB::bind_method("_support_toggled", &EditorAssetLibrary::_support_toggled);
- ClassDB::bind_method("_rerun_search", &EditorAssetLibrary::_rerun_search);
- ClassDB::bind_method("_install_external_asset", &EditorAssetLibrary::_install_external_asset);
ADD_SIGNAL(MethodInfo("install_asset", PropertyInfo(Variant::STRING, "zip_path"), PropertyInfo(Variant::STRING, "name")));
}
@@ -1375,9 +1358,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
filter = memnew(LineEdit);
search_hb->add_child(filter);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
- filter->connect("text_entered", this, "_search_text_entered");
+ filter->connect("text_entered", callable_mp(this, &EditorAssetLibrary::_search_text_entered));
search = memnew(Button(TTR("Search")));
- search->connect("pressed", this, "_search");
+ search->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), make_binds(0));
search_hb->add_child(search);
if (!p_templates_only)
@@ -1386,12 +1369,12 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
Button *open_asset = memnew(Button);
open_asset->set_text(TTR("Import..."));
search_hb->add_child(open_asset);
- open_asset->connect("pressed", this, "_asset_open");
+ open_asset->connect("pressed", callable_mp(this, &EditorAssetLibrary::_asset_open));
Button *plugins = memnew(Button);
plugins->set_text(TTR("Plugins..."));
search_hb->add_child(plugins);
- plugins->connect("pressed", this, "_manage_plugins");
+ plugins->connect("pressed", callable_mp(this, &EditorAssetLibrary::_manage_plugins));
if (p_templates_only) {
open_asset->hide();
@@ -1410,7 +1393,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(sort);
sort->set_h_size_flags(SIZE_EXPAND_FILL);
- sort->connect("item_selected", this, "_rerun_search");
+ sort->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_rerun_search));
search_hb2->add_child(memnew(VSeparator));
@@ -1419,7 +1402,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
categories->add_item(TTR("All"));
search_hb2->add_child(categories);
categories->set_h_size_flags(SIZE_EXPAND_FILL);
- categories->connect("item_selected", this, "_rerun_search");
+ categories->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_rerun_search));
search_hb2->add_child(memnew(VSeparator));
@@ -1431,7 +1414,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
repository->add_item("localhost");
repository->set_item_metadata(1, "http://127.0.0.1/asset-library/api");
- repository->connect("item_selected", this, "_repository_changed");
+ repository->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_repository_changed));
search_hb2->add_child(repository);
repository->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1446,7 +1429,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
support->get_popup()->add_check_item(TTR("Testing"), SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_OFFICIAL, true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
- support->get_popup()->connect("id_pressed", this, "_support_toggled");
+ support->get_popup()->connect("id_pressed", callable_mp(this, &EditorAssetLibrary::_support_toggled));
/////////
@@ -1502,7 +1485,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
request = memnew(HTTPRequest);
add_child(request);
request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
- request->connect("request_completed", this, "_http_request_completed");
+ request->connect("request_completed", callable_mp(this, &EditorAssetLibrary::_http_request_completed));
last_queue_id = 0;
@@ -1535,7 +1518,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
asset_open->add_filter("*.zip ; " + TTR("Assets ZIP File"));
asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(asset_open);
- asset_open->connect("file_selected", this, "_asset_file_selected");
+ asset_open->connect("file_selected", callable_mp(this, &EditorAssetLibrary::_asset_file_selected));
asset_installer = NULL;
}
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index e13d8a6149..536a855d03 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -156,7 +156,7 @@ class EditorAssetLibraryItemDownload : public PanelContainer {
void _close();
void _install();
void _make_request();
- void _http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
+ void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
protected:
void _notification(int p_what);
@@ -250,8 +250,8 @@ class EditorAssetLibrary : public PanelContainer {
int last_queue_id;
Map<int, ImageQueue> image_queue;
- void _image_update(bool use_cache, bool final, const PoolByteArray &p_data, int p_queue_id);
- void _image_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data, int p_queue_id);
+ void _image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id);
+ void _image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id);
void _request_image(ObjectID p_for, String p_image_url, ImageType p_type, int p_image_index);
void _update_image_queue();
@@ -286,8 +286,8 @@ class EditorAssetLibrary : public PanelContainer {
void _rerun_search(int p_ignore);
void _search_text_entered(const String &p_text = "");
void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = "");
- void _http_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
- void _http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
+ void _http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
+ void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
void _repository_changed(int p_repository_id);
void _support_toggled(int p_support);
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index 60cb2ff54d..7a1722c73b 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -39,7 +39,7 @@
void AudioStreamEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", this, "_preview_changed");
+ AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AudioStreamEditor::_preview_changed));
}
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
@@ -197,14 +197,6 @@ void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
}
void AudioStreamEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_preview_changed"), &AudioStreamEditor::_preview_changed);
- ClassDB::bind_method(D_METHOD("_play"), &AudioStreamEditor::_play);
- ClassDB::bind_method(D_METHOD("_stop"), &AudioStreamEditor::_stop);
- ClassDB::bind_method(D_METHOD("_on_finished"), &AudioStreamEditor::_on_finished);
- ClassDB::bind_method(D_METHOD("_draw_preview"), &AudioStreamEditor::_draw_preview);
- ClassDB::bind_method(D_METHOD("_draw_indicator"), &AudioStreamEditor::_draw_indicator);
- ClassDB::bind_method(D_METHOD("_on_input_indicator"), &AudioStreamEditor::_on_input_indicator);
}
AudioStreamEditor::AudioStreamEditor() {
@@ -214,7 +206,7 @@ AudioStreamEditor::AudioStreamEditor() {
_dragging = false;
_player = memnew(AudioStreamPlayer);
- _player->connect("finished", this, "_on_finished");
+ _player->connect("finished", callable_mp(this, &AudioStreamEditor::_on_finished));
add_child(_player);
VBoxContainer *vbox = memnew(VBoxContainer);
@@ -223,13 +215,13 @@ AudioStreamEditor::AudioStreamEditor() {
_preview = memnew(ColorRect);
_preview->set_v_size_flags(SIZE_EXPAND_FILL);
- _preview->connect("draw", this, "_draw_preview");
+ _preview->connect("draw", callable_mp(this, &AudioStreamEditor::_draw_preview));
vbox->add_child(_preview);
_indicator = memnew(Control);
_indicator->set_anchors_and_margins_preset(PRESET_WIDE);
- _indicator->connect("draw", this, "_draw_indicator");
- _indicator->connect("gui_input", this, "_on_input_indicator");
+ _indicator->connect("draw", callable_mp(this, &AudioStreamEditor::_draw_indicator));
+ _indicator->connect("gui_input", callable_mp(this, &AudioStreamEditor::_on_input_indicator));
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);
@@ -239,12 +231,12 @@ AudioStreamEditor::AudioStreamEditor() {
_play_button = memnew(ToolButton);
hbox->add_child(_play_button);
_play_button->set_focus_mode(Control::FOCUS_NONE);
- _play_button->connect("pressed", this, "_play");
+ _play_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_play));
_stop_button = memnew(ToolButton);
hbox->add_child(_stop_button);
_stop_button->set_focus_mode(Control::FOCUS_NONE);
- _stop_button->connect("pressed", this, "_stop");
+ _stop_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_stop));
_current_label = memnew(Label);
_current_label->set_align(Label::ALIGN_RIGHT);
diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp
index 6f5bc69bd1..8726c8c552 100644
--- a/editor/plugins/camera_editor_plugin.cpp
+++ b/editor/plugins/camera_editor_plugin.cpp
@@ -48,8 +48,6 @@ void CameraEditor::_pressed() {
}
void CameraEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_pressed"), &CameraEditor::_pressed);
}
void CameraEditor::edit(Node *p_camera) {
@@ -81,7 +79,7 @@ CameraEditor::CameraEditor() {
preview->set_margin(MARGIN_RIGHT, 0);
preview->set_margin(MARGIN_TOP, 0);
preview->set_margin(MARGIN_BOTTOM, 10);
- preview->connect("pressed", this, "_pressed");
+ preview->connect("pressed", callable_mp(this, &CameraEditor::_pressed));
}
void CameraEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index f7a3b50052..af7f8cf5d6 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -34,12 +34,12 @@
#include "core/os/keyboard.h"
#include "core/print_string.h"
#include "core/project_settings.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "editor/script_editor_debugger.h"
#include "scene/2d/light_2d.h"
#include "scene/2d/particles_2d.h"
#include "scene/2d/polygon_2d.h"
@@ -472,7 +472,7 @@ void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
- if (k->get_scancode() == KEY_CONTROL || k->get_scancode() == KEY_ALT || k->get_scancode() == KEY_SHIFT) {
+ if (k->get_keycode() == KEY_CONTROL || k->get_keycode() == KEY_ALT || k->get_keycode() == KEY_SHIFT) {
viewport->update();
}
@@ -1315,7 +1315,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
// Drag the pivot (in pivot mode / with V key)
if (drag_type == DRAG_NONE) {
if ((b.is_valid() && b->is_pressed() && b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) ||
- (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_scancode() == KEY_V)) {
+ (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_V)) {
List<CanvasItem *> selection = _get_edited_canvas_items();
// Filters the selection with nodes that allow setting the pivot
@@ -1367,7 +1367,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
// Confirm the pivot move
if ((b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) ||
- (k.is_valid() && !k->is_pressed() && k->get_scancode() == KEY_V)) {
+ (k.is_valid() && !k->is_pressed() && k->get_keycode() == KEY_V)) {
_commit_canvas_item_state(drag_selection, TTR("Move pivot"));
drag_type = DRAG_NONE;
return true;
@@ -2109,7 +2109,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
// Move the canvas items with the arrow keys
if (k.is_valid() && k->is_pressed() && (tool == TOOL_SELECT || tool == TOOL_MOVE) &&
- (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
+ (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) {
if (!k->is_echo()) {
// Start moving the canvas items with the keyboard
drag_selection = _get_edited_canvas_items();
@@ -2135,13 +2135,13 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
bool move_local_base_rotated = k->get_control() || k->get_metakey();
Vector2 dir;
- if (k->get_scancode() == KEY_UP)
+ if (k->get_keycode() == KEY_UP)
dir += Vector2(0, -1);
- else if (k->get_scancode() == KEY_DOWN)
+ else if (k->get_keycode() == KEY_DOWN)
dir += Vector2(0, 1);
- else if (k->get_scancode() == KEY_LEFT)
+ else if (k->get_keycode() == KEY_LEFT)
dir += Vector2(-1, 0);
- else if (k->get_scancode() == KEY_RIGHT)
+ else if (k->get_keycode() == KEY_RIGHT)
dir += Vector2(1, 0);
if (k->get_shift())
dir *= grid_step * Math::pow(2.0, grid_step_multiplier);
@@ -2197,7 +2197,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && tool == TOOL_SELECT &&
- (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
+ (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) {
// Confirm canvas items move by arrow keys
if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) &&
(!Input::get_singleton()->is_key_pressed(KEY_DOWN)) &&
@@ -2210,7 +2210,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
return true;
}
- return (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)); // Accept the key event in any case
+ return (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)); // Accept the key event in any case
}
bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
@@ -2387,7 +2387,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
}
}
- if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) {
// Unselect everything
editor_selection->clear();
viewport->update();
@@ -3100,7 +3100,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
case DRAG_TOP_LEFT:
case DRAG_BOTTOM_LEFT:
_draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
start = Vector2(node_pos_in_parent[0], Math::lerp(node_pos_in_parent[1], node_pos_in_parent[3], ratio));
end = start - Vector2(control->get_margin(MARGIN_LEFT), 0);
@@ -3115,7 +3115,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
case DRAG_TOP_RIGHT:
case DRAG_BOTTOM_RIGHT:
_draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
start = Vector2(node_pos_in_parent[2], Math::lerp(node_pos_in_parent[3], node_pos_in_parent[1], ratio));
end = start - Vector2(control->get_margin(MARGIN_RIGHT), 0);
@@ -3130,7 +3130,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
case DRAG_TOP_LEFT:
case DRAG_TOP_RIGHT:
_draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2)) + Vector2(5, 0), MARGIN_RIGHT);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
start = Vector2(Math::lerp(node_pos_in_parent[0], node_pos_in_parent[2], ratio), node_pos_in_parent[1]);
end = start - Vector2(0, control->get_margin(MARGIN_TOP));
@@ -3145,7 +3145,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
case DRAG_BOTTOM_LEFT:
case DRAG_BOTTOM_RIGHT:
_draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2) + Vector2(5, 0)), MARGIN_RIGHT);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
start = Vector2(Math::lerp(node_pos_in_parent[2], node_pos_in_parent[0], ratio), node_pos_in_parent[3]);
end = start - Vector2(0, control->get_margin(MARGIN_BOTTOM));
@@ -3891,10 +3891,10 @@ void CanvasItemEditor::_notification(int p_what) {
select_sb->set_default_margin(Margin(i), 4);
}
- AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", this, "_keying_changed");
+ AnimationPlayerEditor::singleton->get_track_editor()->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_keying_changed));
_keying_changed();
- get_tree()->connect("node_added", this, "_tree_changed", varray());
- get_tree()->connect("node_removed", this, "_tree_changed", varray());
+ get_tree()->connect("node_added", callable_mp(this, &CanvasItemEditor::_tree_changed), varray());
+ get_tree()->connect("node_removed", callable_mp(this, &CanvasItemEditor::_tree_changed), varray());
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
@@ -3902,8 +3902,8 @@ void CanvasItemEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- get_tree()->disconnect("node_added", this, "_tree_changed");
- get_tree()->disconnect("node_removed", this, "_tree_changed");
+ get_tree()->disconnect("node_added", callable_mp(this, &CanvasItemEditor::_tree_changed));
+ get_tree()->disconnect("node_removed", callable_mp(this, &CanvasItemEditor::_tree_changed));
}
if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
@@ -3990,7 +3990,7 @@ void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && override_camera_button->is_pressed()) {
- ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
override_camera_button->set_pressed(false);
@@ -4181,7 +4181,7 @@ void CanvasItemEditor::_popup_warning_temporarily(Control *p_control, const floa
Timer *timer;
if (!popup_temporarily_timers.has(p_control)) {
timer = memnew(Timer);
- timer->connect("timeout", this, "_popup_warning_depop", varray(p_control));
+ timer->connect("timeout", callable_mp(this, &CanvasItemEditor::_popup_warning_depop), varray(p_control));
timer->set_one_shot(true);
add_child(timer);
@@ -4345,7 +4345,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
viewport->update();
}
void CanvasItemEditor::_button_override_camera(bool p_pressed) {
- ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
if (p_pressed) {
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_2D);
@@ -5060,31 +5060,11 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
- ClassDB::bind_method("_button_zoom_minus", &CanvasItemEditor::_button_zoom_minus);
- ClassDB::bind_method("_button_zoom_reset", &CanvasItemEditor::_button_zoom_reset);
- ClassDB::bind_method("_button_zoom_plus", &CanvasItemEditor::_button_zoom_plus);
- ClassDB::bind_method("_button_toggle_smart_snap", &CanvasItemEditor::_button_toggle_smart_snap);
- ClassDB::bind_method("_button_toggle_grid_snap", &CanvasItemEditor::_button_toggle_grid_snap);
- ClassDB::bind_method(D_METHOD("_button_override_camera", "pressed"), &CanvasItemEditor::_button_override_camera);
ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button);
- ClassDB::bind_method("_button_toggle_anchor_mode", &CanvasItemEditor::_button_toggle_anchor_mode);
- ClassDB::bind_method("_update_scroll", &CanvasItemEditor::_update_scroll);
- ClassDB::bind_method("_update_scrollbars", &CanvasItemEditor::_update_scrollbars);
- ClassDB::bind_method("_popup_callback", &CanvasItemEditor::_popup_callback);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
- ClassDB::bind_method("_button_tool_select", &CanvasItemEditor::_button_tool_select);
- ClassDB::bind_method("_keying_changed", &CanvasItemEditor::_keying_changed);
ClassDB::bind_method("_unhandled_key_input", &CanvasItemEditor::_unhandled_key_input);
- ClassDB::bind_method("_draw_viewport", &CanvasItemEditor::_draw_viewport);
- ClassDB::bind_method("_gui_input_viewport", &CanvasItemEditor::_gui_input_viewport);
- ClassDB::bind_method("_snap_changed", &CanvasItemEditor::_snap_changed);
ClassDB::bind_method("_queue_update_bone_list", &CanvasItemEditor::_update_bone_list);
ClassDB::bind_method("_update_bone_list", &CanvasItemEditor::_update_bone_list);
- ClassDB::bind_method("_tree_changed", &CanvasItemEditor::_tree_changed);
- ClassDB::bind_method("_selection_changed", &CanvasItemEditor::_selection_changed);
- ClassDB::bind_method("_popup_warning_depop", &CanvasItemEditor::_popup_warning_depop);
- ClassDB::bind_method(D_METHOD("_selection_result_pressed"), &CanvasItemEditor::_selection_result_pressed);
- ClassDB::bind_method(D_METHOD("_selection_menu_hide"), &CanvasItemEditor::_selection_menu_hide);
ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
@@ -5410,11 +5390,11 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
editor = p_editor;
editor_selection = p_editor->get_editor_selection();
editor_selection->add_editor_plugin(this);
- editor_selection->connect("selection_changed", this, "update");
- editor_selection->connect("selection_changed", this, "_selection_changed");
+ editor_selection->connect("selection_changed", callable_mp((CanvasItem *)this, &CanvasItem::update));
+ editor_selection->connect("selection_changed", callable_mp(this, &CanvasItemEditor::_selection_changed));
- editor->call_deferred("connect", "play_pressed", this, "_update_override_camera_button", make_binds(true));
- editor->call_deferred("connect", "stop_pressed", this, "_update_override_camera_button", make_binds(false));
+ editor->call_deferred("connect", "play_pressed", Callable(this, "_update_override_camera_button"), make_binds(true));
+ editor->call_deferred("connect", "stop_pressed", Callable(this, "_update_override_camera_button"), make_binds(false));
hb = memnew(HBoxContainer);
add_child(hb);
@@ -5434,7 +5414,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport_scrollable->set_clip_contents(true);
viewport_scrollable->set_v_size_flags(SIZE_EXPAND_FILL);
viewport_scrollable->set_h_size_flags(SIZE_EXPAND_FILL);
- viewport_scrollable->connect("draw", this, "_update_scrollbars");
+ viewport_scrollable->connect("draw", callable_mp(this, &CanvasItemEditor::_update_scrollbars));
ViewportContainer *scene_tree = memnew(ViewportContainer);
viewport_scrollable->add_child(scene_tree);
@@ -5456,8 +5436,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport->set_anchors_and_margins_preset(Control::PRESET_WIDE);
viewport->set_clip_contents(true);
viewport->set_focus_mode(FOCUS_ALL);
- viewport->connect("draw", this, "_draw_viewport");
- viewport->connect("gui_input", this, "_gui_input_viewport");
+ viewport->connect("draw", callable_mp(this, &CanvasItemEditor::_draw_viewport));
+ viewport->connect("gui_input", callable_mp(this, &CanvasItemEditor::_gui_input_viewport));
info_overlay = memnew(VBoxContainer);
info_overlay->set_anchors_and_margins_preset(Control::PRESET_BOTTOM_LEFT);
@@ -5485,25 +5465,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
h_scroll = memnew(HScrollBar);
viewport->add_child(h_scroll);
- h_scroll->connect("value_changed", this, "_update_scroll");
+ h_scroll->connect("value_changed", callable_mp(this, &CanvasItemEditor::_update_scroll));
h_scroll->hide();
v_scroll = memnew(VScrollBar);
viewport->add_child(v_scroll);
- v_scroll->connect("value_changed", this, "_update_scroll");
+ v_scroll->connect("value_changed", callable_mp(this, &CanvasItemEditor::_update_scroll));
v_scroll->hide();
viewport->add_child(controls_vb);
zoom_minus = memnew(ToolButton);
zoom_hb->add_child(zoom_minus);
- zoom_minus->connect("pressed", this, "_button_zoom_minus");
+ zoom_minus->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_minus));
zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS));
zoom_minus->set_focus_mode(FOCUS_NONE);
zoom_reset = memnew(ToolButton);
zoom_hb->add_child(zoom_reset);
- zoom_reset->connect("pressed", this, "_button_zoom_reset");
+ zoom_reset->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_reset));
zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0));
zoom_reset->set_focus_mode(FOCUS_NONE);
zoom_reset->set_text_align(Button::TextAlign::ALIGN_CENTER);
@@ -5512,7 +5492,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
zoom_plus = memnew(ToolButton);
zoom_hb->add_child(zoom_plus);
- zoom_plus->connect("pressed", this, "_button_zoom_plus");
+ zoom_plus->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_plus));
zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KEY_MASK_CMD | KEY_EQUAL)); // Usually direct access key for PLUS
zoom_plus->set_focus_mode(FOCUS_NONE);
@@ -5521,7 +5501,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
select_button = memnew(ToolButton);
hb->add_child(select_button);
select_button->set_toggle_mode(true);
- select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECT));
+ select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SELECT));
select_button->set_pressed(true);
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), KEY_Q));
select_button->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate") + "\n" + TTR("Alt+Drag: Move") + "\n" + TTR("Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).") + "\n" + TTR("Alt+RMB: Depth list selection"));
@@ -5531,21 +5511,21 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
move_button = memnew(ToolButton);
hb->add_child(move_button);
move_button->set_toggle_mode(true);
- move_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE));
+ move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_MOVE));
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W));
move_button->set_tooltip(TTR("Move Mode"));
rotate_button = memnew(ToolButton);
hb->add_child(rotate_button);
rotate_button->set_toggle_mode(true);
- rotate_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE));
+ rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_ROTATE));
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E));
rotate_button->set_tooltip(TTR("Rotate Mode"));
scale_button = memnew(ToolButton);
hb->add_child(scale_button);
scale_button->set_toggle_mode(true);
- scale_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SCALE));
+ scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SCALE));
scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), KEY_S));
scale_button->set_tooltip(TTR("Scale Mode"));
@@ -5554,25 +5534,25 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
list_select_button = memnew(ToolButton);
hb->add_child(list_select_button);
list_select_button->set_toggle_mode(true);
- list_select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT));
+ list_select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_LIST_SELECT));
list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
pivot_button = memnew(ToolButton);
hb->add_child(pivot_button);
pivot_button->set_toggle_mode(true);
- pivot_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT));
+ pivot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_EDIT_PIVOT));
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot."));
pan_button = memnew(ToolButton);
hb->add_child(pan_button);
pan_button->set_toggle_mode(true);
- pan_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PAN));
+ pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_PAN));
pan_button->set_tooltip(TTR("Pan Mode"));
ruler_button = memnew(ToolButton);
hb->add_child(ruler_button);
ruler_button->set_toggle_mode(true);
- ruler_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_RULER));
+ ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_RULER));
ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), KEY_R));
ruler_button->set_tooltip(TTR("Ruler Mode"));
@@ -5581,14 +5561,14 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smart_snap_button = memnew(ToolButton);
hb->add_child(smart_snap_button);
smart_snap_button->set_toggle_mode(true);
- smart_snap_button->connect("toggled", this, "_button_toggle_smart_snap");
+ smart_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap));
smart_snap_button->set_tooltip(TTR("Toggle smart snapping."));
smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTR("Use Smart Snap"), KEY_MASK_SHIFT | KEY_S));
grid_snap_button = memnew(ToolButton);
hb->add_child(grid_snap_button);
grid_snap_button->set_toggle_mode(true);
- grid_snap_button->connect("toggled", this, "_button_toggle_grid_snap");
+ grid_snap_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap));
grid_snap_button->set_tooltip(TTR("Toggle grid snapping."));
grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTR("Use Grid Snap"), KEY_MASK_SHIFT | KEY_G));
@@ -5599,7 +5579,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_config_menu->set_switch_on_hover(true);
PopupMenu *p = snap_config_menu->get_popup();
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE);
@@ -5613,7 +5593,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smartsnap_config_popup = memnew(PopupMenu);
p->add_child(smartsnap_config_popup);
smartsnap_config_popup->set_name("SmartSnapping");
- smartsnap_config_popup->connect("id_pressed", this, "_popup_callback");
+ smartsnap_config_popup->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
smartsnap_config_popup->set_hide_on_checkable_item_selection(false);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS);
@@ -5627,22 +5607,22 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
lock_button = memnew(ToolButton);
hb->add_child(lock_button);
- lock_button->connect("pressed", this, "_popup_callback", varray(LOCK_SELECTED));
+ lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(LOCK_SELECTED));
lock_button->set_tooltip(TTR("Lock the selected object in place (can't be moved)."));
unlock_button = memnew(ToolButton);
hb->add_child(unlock_button);
- unlock_button->connect("pressed", this, "_popup_callback", varray(UNLOCK_SELECTED));
+ unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNLOCK_SELECTED));
unlock_button->set_tooltip(TTR("Unlock the selected object (can be moved)."));
group_button = memnew(ToolButton);
hb->add_child(group_button);
- group_button->connect("pressed", this, "_popup_callback", varray(GROUP_SELECTED));
+ group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(GROUP_SELECTED));
group_button->set_tooltip(TTR("Makes sure the object's children are not selectable."));
ungroup_button = memnew(ToolButton);
hb->add_child(ungroup_button);
- ungroup_button->connect("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED));
+ ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNGROUP_SELECTED));
ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected."));
hb->add_child(memnew(VSeparator));
@@ -5661,13 +5641,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Custom Bone(s) from Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B), SKELETON_MAKE_BONES);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Custom Bones")), SKELETON_CLEAR_BONES);
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
hb->add_child(memnew(VSeparator));
override_camera_button = memnew(ToolButton);
hb->add_child(override_camera_button);
- override_camera_button->connect("toggled", this, "_button_override_camera");
+ override_camera_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_override_camera));
override_camera_button->set_toggle_mode(true);
override_camera_button->set_disabled(true);
_update_override_camera_button(false);
@@ -5677,7 +5657,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
- view_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ view_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
view_menu->set_switch_on_hover(true);
p = view_menu->get_popup();
@@ -5705,18 +5685,18 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
presets_menu->set_switch_on_hover(true);
p = presets_menu->get_popup();
- p->connect("id_pressed", this, "_popup_callback");
+ p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
anchors_popup = memnew(PopupMenu);
p->add_child(anchors_popup);
anchors_popup->set_name("Anchors");
- anchors_popup->connect("id_pressed", this, "_popup_callback");
+ anchors_popup->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
anchor_mode_button = memnew(ToolButton);
hb->add_child(anchor_mode_button);
anchor_mode_button->set_toggle_mode(true);
anchor_mode_button->hide();
- anchor_mode_button->connect("toggled", this, "_button_toggle_anchor_mode");
+ anchor_mode_button->connect("toggled", callable_mp(this, &CanvasItemEditor::_button_toggle_anchor_mode));
animation_hb = memnew(HBoxContainer);
hb->add_child(animation_hb);
@@ -5728,7 +5708,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_loc_button->set_flat(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
- key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
+ key_loc_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_POS));
key_loc_button->set_tooltip(TTR("Translation mask for inserting keys."));
animation_hb->add_child(key_loc_button);
key_rot_button = memnew(Button);
@@ -5736,20 +5716,20 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot_button->set_flat(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
- key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
+ key_rot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_ROT));
key_rot_button->set_tooltip(TTR("Rotation mask for inserting keys."));
animation_hb->add_child(key_rot_button);
key_scale_button = memnew(Button);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_flat(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
- key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
+ key_scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_SCALE));
key_scale_button->set_tooltip(TTR("Scale mask for inserting keys."));
animation_hb->add_child(key_scale_button);
key_insert_button = memnew(Button);
key_insert_button->set_flat(true);
key_insert_button->set_focus_mode(FOCUS_NONE);
- key_insert_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_KEY));
+ key_insert_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_KEY));
key_insert_button->set_tooltip(TTR("Insert keys (based on mask)."));
key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), KEY_INSERT));
animation_hb->add_child(key_insert_button);
@@ -5765,7 +5745,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_menu = memnew(MenuButton);
animation_menu->set_tooltip(TTR("Animation Key and Pose Options"));
animation_hb->add_child(animation_menu);
- animation_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ animation_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
animation_menu->set_switch_on_hover(true);
p = animation_menu->get_popup();
@@ -5778,7 +5758,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KEY_MASK_SHIFT | KEY_K), ANIM_CLEAR_POSE);
snap_dialog = memnew(SnapDialog);
- snap_dialog->connect("confirmed", this, "_snap_changed");
+ snap_dialog->connect("confirmed", callable_mp(this, &CanvasItemEditor::_snap_changed));
add_child(snap_dialog);
select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture));
@@ -5786,8 +5766,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Vector2(100, 0));
- selection_menu->connect("id_pressed", this, "_selection_result_pressed");
- selection_menu->connect("popup_hide", this, "_selection_menu_hide");
+ selection_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
+ selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide));
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), KEY_KP_MULTIPLY);
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), KEY_KP_DIVIDE);
@@ -5960,9 +5940,9 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
if (parent) {
String new_name = parent->validate_child_name(child);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
}
// handle with different property for texture
@@ -5987,7 +5967,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
if (default_type == "NinePatchRect") {
editor_data->get_undo_redo().add_do_property(child, "rect/size", texture_size);
} else if (default_type == "Polygon2D") {
- PoolVector<Vector2> list;
+ Vector<Vector2> list;
list.push_back(Vector2(0, 0));
list.push_back(Vector2(texture_size.width, 0));
list.push_back(Vector2(texture_size.width, texture_size.height));
@@ -6030,9 +6010,9 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
String new_name = parent->validate_child_name(instanced_scene);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
CanvasItem *parent_ci = Object::cast_to<CanvasItem>(parent);
if (parent_ci) {
@@ -6234,11 +6214,11 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p
void CanvasItemEditorViewport::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("mouse_exited", this, "_on_mouse_exit");
+ connect("mouse_exited", callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
label->add_color_override("font_color", get_color("warning_color", "Editor"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("mouse_exited", this, "_on_mouse_exit");
+ disconnect("mouse_exited", callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
} break;
default: break;
@@ -6246,10 +6226,6 @@ void CanvasItemEditorViewport::_notification(int p_what) {
}
void CanvasItemEditorViewport::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_on_select_type"), &CanvasItemEditorViewport::_on_select_type);
- ClassDB::bind_method(D_METHOD("_on_change_type_confirmed"), &CanvasItemEditorViewport::_on_change_type_confirmed);
- ClassDB::bind_method(D_METHOD("_on_change_type_closed"), &CanvasItemEditorViewport::_on_change_type_closed);
- ClassDB::bind_method(D_METHOD("_on_mouse_exit"), &CanvasItemEditorViewport::_on_mouse_exit);
}
CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas_item_editor) {
@@ -6276,8 +6252,8 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
selector = memnew(AcceptDialog);
editor->get_gui_base()->add_child(selector);
selector->set_title(TTR("Change Default Type"));
- selector->connect("confirmed", this, "_on_change_type_confirmed");
- selector->connect("popup_hide", this, "_on_change_type_closed");
+ selector->connect("confirmed", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed));
+ selector->connect("popup_hide", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed));
VBoxContainer *vbc = memnew(VBoxContainer);
selector->add_child(vbc);
@@ -6294,7 +6270,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
CheckBox *check = memnew(CheckBox);
btn_group->add_child(check);
check->set_text(types[i]);
- check->connect("button_down", this, "_on_select_type", varray(check));
+ check->connect("button_down", callable_mp(this, &CanvasItemEditorViewport::_on_select_type), varray(check));
check->set_button_group(button_group);
}
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index 3de67589ee..1562286073 100644
--- a/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -47,7 +47,7 @@ void Polygon3DEditor::_notification(int p_what) {
button_create->set_icon(get_icon("Edit", "EditorIcons"));
button_edit->set_icon(get_icon("MovePoint", "EditorIcons"));
button_edit->set_pressed(true);
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &Polygon3DEditor::_node_removed));
} break;
case NOTIFICATION_PROCESS: {
@@ -470,11 +470,11 @@ void Polygon3DEditor::_polygon_draw() {
Array a;
a.resize(Mesh::ARRAY_MAX);
- PoolVector<Vector3> va;
+ Vector<Vector3> va;
{
va.resize(poly.size());
- PoolVector<Vector3>::Write w = va.write();
+ Vector3 *w = va.ptrw();
for (int i = 0; i < poly.size(); i++) {
Vector2 p, p2;
@@ -518,9 +518,7 @@ void Polygon3DEditor::edit(Node *p_collision_polygon) {
void Polygon3DEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_menu_option"), &Polygon3DEditor::_menu_option);
ClassDB::bind_method(D_METHOD("_polygon_draw"), &Polygon3DEditor::_polygon_draw);
- ClassDB::bind_method(D_METHOD("_node_removed"), &Polygon3DEditor::_node_removed);
}
Polygon3DEditor::Polygon3DEditor(EditorNode *p_editor) {
@@ -532,12 +530,12 @@ Polygon3DEditor::Polygon3DEditor(EditorNode *p_editor) {
add_child(memnew(VSeparator));
button_create = memnew(ToolButton);
add_child(button_create);
- button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE));
+ button_create->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option), varray(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(ToolButton);
add_child(button_edit);
- button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
+ button_edit->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option), varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
mode = MODE_EDIT;
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index 655048c271..119528dfc8 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -118,8 +118,8 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
int vpc = 0;
{
- PoolVector<uint8_t> data = img->get_data();
- PoolVector<uint8_t>::Read r = data.read();
+ Vector<uint8_t> data = img->get_data();
+ const uint8_t *r = data.ptr();
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
@@ -198,9 +198,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
ERR_FAIL_COND_MSG(valid_positions.size() == 0, "No pixels with transparency > 128 in image...");
if (capture_colors) {
- PoolColorArray pca;
+ PackedColorArray pca;
pca.resize(vpc);
- PoolColorArray::Write pcaw = pca.write();
+ Color *pcaw = pca.ptrw();
for (int i = 0; i < vpc; i += 1) {
Color color;
color.r = valid_colors[i * 4 + 0] / 255.0f;
@@ -214,9 +214,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
if (valid_normals.size()) {
particles->set_emission_shape(CPUParticles2D::EMISSION_SHAPE_DIRECTED_POINTS);
- PoolVector2Array norms;
+ PackedVector2Array norms;
norms.resize(valid_normals.size());
- PoolVector2Array::Write normsw = norms.write();
+ Vector2 *normsw = norms.ptrw();
for (int i = 0; i < valid_normals.size(); i += 1) {
normsw[i] = valid_normals[i];
}
@@ -226,9 +226,9 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
}
{
- PoolVector2Array points;
+ PackedVector2Array points;
points.resize(valid_positions.size());
- PoolVector2Array::Write pointsw = points.write();
+ Vector2 *pointsw = points.ptrw();
for (int i = 0; i < valid_positions.size(); i += 1) {
pointsw[i] = valid_positions[i];
}
@@ -240,17 +240,13 @@ void CPUParticles2DEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- menu->get_popup()->connect("id_pressed", this, "_menu_callback");
+ menu->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons"));
- file->connect("file_selected", this, "_file_selected");
+ file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
}
}
void CPUParticles2DEditorPlugin::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_menu_callback"), &CPUParticles2DEditorPlugin::_menu_callback);
- ClassDB::bind_method(D_METHOD("_file_selected"), &CPUParticles2DEditorPlugin::_file_selected);
- ClassDB::bind_method(D_METHOD("_generate_emission_mask"), &CPUParticles2DEditorPlugin::_generate_emission_mask);
}
CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin(EditorNode *p_node) {
@@ -305,7 +301,7 @@ CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(emission_mask);
- emission_mask->connect("confirmed", this, "_generate_emission_mask");
+ emission_mask->connect("confirmed", callable_mp(this, &CPUParticles2DEditorPlugin::_generate_emission_mask));
}
CPUParticles2DEditorPlugin::~CPUParticles2DEditorPlugin() {
diff --git a/editor/plugins/cpu_particles_editor_plugin.cpp b/editor/plugins/cpu_particles_editor_plugin.cpp
index 2074ba6b99..2161041ee6 100644
--- a/editor/plugins/cpu_particles_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_editor_plugin.cpp
@@ -51,12 +51,6 @@ void CPUParticlesEditor::_menu_option(int p_option) {
switch (p_option) {
- case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: {
-
- emission_file_dialog->popup_centered_ratio();
-
- } break;
-
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
emission_tree_dialog->popup_centered_ratio();
@@ -80,8 +74,8 @@ void CPUParticlesEditor::edit(CPUParticles *p_particles) {
void CPUParticlesEditor::_generate_emission_points() {
/// hacer codigo aca
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
if (!_generate(points, normals)) {
return;
@@ -98,8 +92,6 @@ void CPUParticlesEditor::_generate_emission_points() {
}
void CPUParticlesEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option", &CPUParticlesEditor::_menu_option);
}
CPUParticlesEditor::CPUParticlesEditor() {
@@ -112,11 +104,10 @@ CPUParticlesEditor::CPUParticlesEditor() {
particles_editor_hb->hide();
options->set_text(TTR("CPUParticles"));
- options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticlesEditor::_menu_option));
}
void CPUParticlesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/cpu_particles_editor_plugin.h b/editor/plugins/cpu_particles_editor_plugin.h
index deaced9ad9..4cf143fc0c 100644
--- a/editor/plugins/cpu_particles_editor_plugin.h
+++ b/editor/plugins/cpu_particles_editor_plugin.h
@@ -41,7 +41,6 @@ class CPUParticlesEditor : public ParticlesEditorBase {
enum Menu {
MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE,
- MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH,
MENU_OPTION_CLEAR_EMISSION_VOLUME,
MENU_OPTION_RESTART
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 0af983f780..878787231d 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -49,7 +49,7 @@ CurveEditor::CurveEditor() {
set_clip_contents(true);
_context_menu = memnew(PopupMenu);
- _context_menu->connect("id_pressed", this, "_on_context_menu_item_selected");
+ _context_menu->connect("id_pressed", callable_mp(this, &CurveEditor::on_context_menu_item_selected));
add_child(_context_menu);
_presets_menu = memnew(PopupMenu);
@@ -60,7 +60,7 @@ CurveEditor::CurveEditor() {
_presets_menu->add_item(TTR("Ease In"), PRESET_EASE_IN);
_presets_menu->add_item(TTR("Ease Out"), PRESET_EASE_OUT);
_presets_menu->add_item(TTR("Smoothstep"), PRESET_SMOOTHSTEP);
- _presets_menu->connect("id_pressed", this, "_on_preset_item_selected");
+ _presets_menu->connect("id_pressed", callable_mp(this, &CurveEditor::on_preset_item_selected));
_context_menu->add_child(_presets_menu);
}
@@ -70,15 +70,15 @@ void CurveEditor::set_curve(Ref<Curve> curve) {
return;
if (_curve_ref.is_valid()) {
- _curve_ref->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
- _curve_ref->disconnect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
+ _curve_ref->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveEditor::_curve_changed));
+ _curve_ref->disconnect(Curve::SIGNAL_RANGE_CHANGED, callable_mp(this, &CurveEditor::_curve_changed));
}
_curve_ref = curve;
if (_curve_ref.is_valid()) {
- _curve_ref->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
- _curve_ref->connect(Curve::SIGNAL_RANGE_CHANGED, this, "_curve_changed");
+ _curve_ref->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveEditor::_curve_changed));
+ _curve_ref->connect(Curve::SIGNAL_RANGE_CHANGED, callable_mp(this, &CurveEditor::_curve_changed));
}
_selected_point = -1;
@@ -238,7 +238,7 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
const InputEventKey &key = **key_ref;
if (key.is_pressed() && _selected_point != -1) {
- if (key.get_scancode() == KEY_DELETE)
+ if (key.get_keycode() == KEY_DELETE)
remove_point(_selected_point);
}
}
@@ -749,9 +749,6 @@ void CurveEditor::_draw() {
void CurveEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &CurveEditor::on_gui_input);
- ClassDB::bind_method(D_METHOD("_on_preset_item_selected"), &CurveEditor::on_preset_item_selected);
- ClassDB::bind_method(D_METHOD("_curve_changed"), &CurveEditor::_curve_changed);
- ClassDB::bind_method(D_METHOD("_on_context_menu_item_selected"), &CurveEditor::on_context_menu_item_selected);
}
//---------------
@@ -802,8 +799,6 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
im.create(thumbnail_size, thumbnail_size / 2, 0, Image::FORMAT_RGBA8);
- im.lock();
-
Color bg_color(0.1, 0.1, 0.1, 1.0);
for (int i = 0; i < thumbnail_size; i++) {
for (int j = 0; j < thumbnail_size / 2; j++) {
@@ -844,8 +839,6 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
prev_y = y;
}
- im.unlock();
-
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
ptex->create_from_image(img_ref);
diff --git a/drivers/unix/mutex_posix.cpp b/editor/plugins/debugger_editor_plugin.cpp
index a9fc12fb06..2534a2cc17 100644
--- a/drivers/unix/mutex_posix.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* mutex_posix.cpp */
+/* debugger_editor_plugin.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,46 +28,24 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "mutex_posix.h"
+#include "debugger_editor_plugin.h"
-#include "core/os/memory.h"
+#include "core/os/keyboard.h"
+#include "editor/debugger/editor_debugger_node.h"
-#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
+DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor) {
+ ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11);
+ ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10);
+ ED_SHORTCUT("debugger/break", TTR("Break"));
+ ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12);
+ ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open"));
+ ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor"));
-void MutexPosix::lock() {
-
- pthread_mutex_lock(&mutex);
-}
-void MutexPosix::unlock() {
-
- pthread_mutex_unlock(&mutex);
-}
-Error MutexPosix::try_lock() {
-
- return (pthread_mutex_trylock(&mutex) == 0) ? OK : ERR_BUSY;
-}
-
-Mutex *MutexPosix::create_func_posix(bool p_recursive) {
-
- return memnew(MutexPosix(p_recursive));
+ EditorDebuggerNode *debugger = memnew(EditorDebuggerNode);
+ Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger);
+ debugger->set_tool_button(db);
}
-void MutexPosix::make_default() {
-
- create_func = create_func_posix;
-}
-
-MutexPosix::MutexPosix(bool p_recursive) {
-
- pthread_mutexattr_init(&attr);
- if (p_recursive)
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- pthread_mutex_init(&mutex, &attr);
+DebuggerEditorPlugin::~DebuggerEditorPlugin() {
+ // Should delete debugger?
}
-
-MutexPosix::~MutexPosix() {
-
- pthread_mutex_destroy(&mutex);
-}
-
-#endif
diff --git a/drivers/windows/mutex_windows.h b/editor/plugins/debugger_editor_plugin.h
index 28b97540b7..05d6ece72d 100644
--- a/drivers/windows/mutex_windows.h
+++ b/editor/plugins/debugger_editor_plugin.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* mutex_windows.h */
+/* debugger_editor_plugin.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,36 +28,23 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef MUTEX_WINDOWS_H
-#define MUTEX_WINDOWS_H
+#ifndef DEBUGGER_EDITOR_PLUGIN_H
+#define DEBUGGER_EDITOR_PLUGIN_H
-#ifdef WINDOWS_ENABLED
+#include "editor/debugger/editor_debugger_node.h"
+#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
-#include "core/os/mutex.h"
+class DebuggerEditorPlugin : public EditorPlugin {
-#include <windows.h>
-
-class MutexWindows : public Mutex {
-
-#ifdef WINDOWS_USE_MUTEX
- HANDLE mutex;
-#else
- CRITICAL_SECTION mutex;
-#endif
-
- static Mutex *create_func_windows(bool p_recursive);
+ GDCLASS(DebuggerEditorPlugin, EditorPlugin);
public:
- virtual void lock();
- virtual void unlock();
- virtual Error try_lock();
+ virtual String get_name() const { return "Debugger"; }
+ bool has_main_screen() const { return false; }
- static void make_default();
-
- MutexWindows();
- ~MutexWindows();
+ DebuggerEditorPlugin(EditorNode *p_node);
+ ~DebuggerEditorPlugin();
};
-#endif
-
-#endif
+#endif // DEBUGGER_EDITOR_PLUGIN_H
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 6e8aef0aea..3c173ab783 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -47,8 +47,6 @@ void post_process_preview(Ref<Image> p_image) {
if (p_image->get_format() != Image::FORMAT_RGBA8)
p_image->convert(Image::FORMAT_RGBA8);
- p_image->lock();
-
const int w = p_image->get_width();
const int h = p_image->get_height();
@@ -70,8 +68,6 @@ void post_process_preview(Ref<Image> p_image) {
}
}
}
-
- p_image->unlock();
}
bool EditorTexturePreviewPlugin::handles(const String &p_type) const {
@@ -207,19 +203,19 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size
return Ref<Texture2D>();
}
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(bm->get_size().width * bm->get_size().height);
{
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
for (int i = 0; i < bm->get_size().width; i++) {
for (int j = 0; j < bm->get_size().height; j++) {
if (bm->get_bit(Point2i(i, j))) {
- w[j * bm->get_size().width + i] = 255;
+ w[j * (int)bm->get_size().width + i] = 255;
} else {
- w[j * bm->get_size().width + i] = 0;
+ w[j * (int)bm->get_size().width + i] = 0;
}
}
}
@@ -396,10 +392,10 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
int lons = 32;
float radius = 1.0;
- PoolVector<Vector3> vertices;
- PoolVector<Vector3> normals;
- PoolVector<Vector2> uvs;
- PoolVector<float> tangents;
+ Vector<Vector3> vertices;
+ Vector<Vector3> normals;
+ Vector<Vector2> uvs;
+ Vector<float> tangents;
Basis tt = Basis(Vector3(0, 1, 0), Math_PI * 0.5);
for (int i = 1; i <= lats; i++) {
@@ -522,8 +518,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
- img->lock();
-
if (bg_color.a == 0)
bg_color = Color(0, 0, 0, 0);
bg_color.a = MAX(bg_color.a, 0.2); // some background
@@ -593,8 +587,6 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
col++;
}
- img->unlock();
-
post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
@@ -617,14 +609,14 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
Ref<AudioStream> stream = p_from;
ERR_FAIL_COND_V(stream.is_null(), Ref<Texture2D>());
- PoolVector<uint8_t> img;
+ Vector<uint8_t> img;
int w = p_size.x;
int h = p_size.y;
img.resize(w * h * 3);
- PoolVector<uint8_t>::Write imgdata = img.write();
- uint8_t *imgw = imgdata.ptr();
+ uint8_t *imgdata = img.ptrw();
+ uint8_t *imgw = imgdata;
Ref<AudioStreamPlayback> playback = stream->instance_playback();
ERR_FAIL_COND_V(playback.is_null(), Ref<Texture2D>());
@@ -680,7 +672,6 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
}
}
- imgdata.release();
//post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index fe2c0d33b7..c077c23e8a 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -70,22 +70,33 @@ void GIProbeEditorPlugin::_notification(int p_what) {
return;
}
- String text;
-
- Vector3i size = gi_probe->get_estimated_cell_size();
- text = itos(size.x) + ", " + itos(size.y) + ", " + itos(size.z);
+ const Vector3i size = gi_probe->get_estimated_cell_size();
+ String text = vformat(String::utf8("%d × %d × %d"), size.x, size.y, size.z);
int data_size = 4;
if (GLOBAL_GET("rendering/quality/gi_probes/anisotropic")) {
data_size += 4;
}
- text += " - VRAM Size: " + String::num(size.x * size.y * size.z * data_size / (1024.0 * 1024.0), 2) + " Mb.";
+ const double size_mb = size.x * size.y * size.z * data_size / (1024.0 * 1024.0);
+ text += " - " + vformat(TTR("VRAM Size: %s MB"), String::num(size_mb, 2));
if (bake_info->get_text() == text) {
return;
}
- bake_info->add_color_override("font_color", bake_info->get_color("success_color", "Editor"));
+ // Color the label depending on the estimated performance level.
+ Color color;
+ if (size_mb <= 16.0 + CMP_EPSILON) {
+ // Fast.
+ color = bake_info->get_color("success_color", "Editor");
+ } else if (size_mb <= 64.0 + CMP_EPSILON) {
+ // Medium.
+ color = bake_info->get_color("warning_color", "Editor");
+ } else {
+ // Slow.
+ color = bake_info->get_color("error_color", "Editor");
+ }
+ bake_info->add_color_override("font_color", color);
bake_info->set_text(text);
}
}
@@ -133,9 +144,6 @@ void GIProbeEditorPlugin::_giprobe_save_path_and_bake(const String &p_path) {
}
void GIProbeEditorPlugin::_bind_methods() {
-
- ClassDB::bind_method("_bake", &GIProbeEditorPlugin::_bake);
- ClassDB::bind_method("_giprobe_save_path_and_bake", &GIProbeEditorPlugin::_giprobe_save_path_and_bake);
}
GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
@@ -147,7 +155,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
bake = memnew(ToolButton);
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
bake->set_text(TTR("Bake GI Probe"));
- bake->connect("pressed", this, "_bake");
+ bake->connect("pressed", callable_mp(this, &GIProbeEditorPlugin::_bake));
bake_hb->add_child(bake);
bake_info = memnew(Label);
bake_info->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -159,7 +167,7 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
probe_file = memnew(EditorFileDialog);
probe_file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
probe_file->add_filter("*.res");
- probe_file->connect("file_selected", this, "_giprobe_save_path_and_bake");
+ probe_file->connect("file_selected", callable_mp(this, &GIProbeEditorPlugin::_giprobe_save_path_and_bake));
get_editor_interface()->get_base_control()->add_child(probe_file);
probe_file->set_title(TTR("Select path for GIProbe Data File"));
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 0a3a994eb7..ff03fcf159 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -62,15 +62,12 @@ void GradientEditor::_ramp_changed() {
}
void GradientEditor::_bind_methods() {
-
- ClassDB::bind_method("_gradient_changed", &GradientEditor::_gradient_changed);
- ClassDB::bind_method("_ramp_changed", &GradientEditor::_ramp_changed);
}
void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) {
gradient = p_gradient;
- connect("ramp_changed", this, "_ramp_changed");
- gradient->connect("changed", this, "_gradient_changed");
+ connect("ramp_changed", callable_mp(this, &GradientEditor::_ramp_changed));
+ gradient->connect("changed", callable_mp(this, &GradientEditor::_gradient_changed));
set_points(gradient->get_points());
}
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index b7dfe97081..ba640883c7 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -268,7 +268,7 @@ void ItemListEditor::_notification(int p_notification) {
del_button->set_icon(get_icon("Remove", "EditorIcons"));
} else if (p_notification == NOTIFICATION_READY) {
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &ItemListEditor::_node_removed));
}
}
@@ -344,11 +344,6 @@ bool ItemListEditor::handles(Object *p_object) const {
}
void ItemListEditor::_bind_methods() {
-
- ClassDB::bind_method("_node_removed", &ItemListEditor::_node_removed);
- ClassDB::bind_method("_edit_items", &ItemListEditor::_edit_items);
- ClassDB::bind_method("_add_button", &ItemListEditor::_add_pressed);
- ClassDB::bind_method("_delete_button", &ItemListEditor::_delete_pressed);
}
ItemListEditor::ItemListEditor() {
@@ -359,7 +354,7 @@ ItemListEditor::ItemListEditor() {
toolbar_button = memnew(ToolButton);
toolbar_button->set_text(TTR("Items"));
add_child(toolbar_button);
- toolbar_button->connect("pressed", this, "_edit_items");
+ toolbar_button->connect("pressed", callable_mp(this, &ItemListEditor::_edit_items));
dialog = memnew(AcceptDialog);
dialog->set_title(TTR("Item List Editor"));
@@ -376,14 +371,14 @@ ItemListEditor::ItemListEditor() {
add_button = memnew(Button);
add_button->set_text(TTR("Add"));
hbc->add_child(add_button);
- add_button->connect("pressed", this, "_add_button");
+ add_button->connect("pressed", callable_mp(this, &ItemListEditor::_add_pressed));
hbc->add_spacer();
del_button = memnew(Button);
del_button->set_text(TTR("Delete"));
hbc->add_child(del_button);
- del_button->connect("pressed", this, "_delete_button");
+ del_button->connect("pressed", callable_mp(this, &ItemListEditor::_delete_pressed));
property_editor = memnew(EditorInspector);
vbc->add_child(property_editor);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 4e44082853..b39465f618 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -105,8 +105,6 @@ void MaterialEditor::_button_pressed(Node *p_button) {
}
void MaterialEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_button_pressed"), &MaterialEditor::_button_pressed);
}
MaterialEditor::MaterialEditor() {
@@ -171,13 +169,13 @@ MaterialEditor::MaterialEditor() {
sphere_switch->set_toggle_mode(true);
sphere_switch->set_pressed(true);
vb_shape->add_child(sphere_switch);
- sphere_switch->connect("pressed", this, "_button_pressed", varray(sphere_switch));
+ sphere_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(sphere_switch));
box_switch = memnew(TextureButton);
box_switch->set_toggle_mode(true);
box_switch->set_pressed(false);
vb_shape->add_child(box_switch);
- box_switch->connect("pressed", this, "_button_pressed", varray(box_switch));
+ box_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(box_switch));
hb->add_spacer();
@@ -187,12 +185,12 @@ MaterialEditor::MaterialEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", this, "_button_pressed", varray(light_1_switch));
+ light_1_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", this, "_button_pressed", varray(light_2_switch));
+ light_2_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(light_2_switch));
first_enter = true;
}
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index d06e5b6349..5a17f0d4f1 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -111,7 +111,6 @@ void MeshEditor::_button_pressed(Node *p_button) {
void MeshEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &MeshEditor::_gui_input);
- ClassDB::bind_method(D_METHOD("_button_pressed"), &MeshEditor::_button_pressed);
}
MeshEditor::MeshEditor() {
@@ -157,12 +156,12 @@ MeshEditor::MeshEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", this, "_button_pressed", varray(light_1_switch));
+ light_1_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed), varray(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", this, "_button_pressed", varray(light_2_switch));
+ light_2_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed), varray(light_2_switch));
first_enter = true;
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index aaba6406c7..e5b948aad7 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_scale.h"
#include "scene/3d/collision_shape.h"
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include "scene/3d/physics_body.h"
#include "scene/gui/box_container.h"
#include "spatial_editor_plugin.h"
@@ -233,7 +233,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
return;
nmesh->create_from_mesh(mesh);
- NavigationMeshInstance *nmi = memnew(NavigationMeshInstance);
+ NavigationRegion *nmi = memnew(NavigationRegion);
nmi->set_navigation_mesh(nmesh);
Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner();
@@ -327,24 +327,24 @@ void MeshInstanceEditor::_create_uv_lines(int p_layer) {
continue;
Array a = mesh->surface_get_arrays(i);
- PoolVector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2];
+ Vector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2];
if (uv.size() == 0) {
err_dialog->set_text(TTR("Model has no UV in this layer"));
err_dialog->popup_centered_minsize();
return;
}
- PoolVector<Vector2>::Read r = uv.read();
+ const Vector2 *r = uv.ptr();
- PoolVector<int> indices = a[Mesh::ARRAY_INDEX];
- PoolVector<int>::Read ri;
+ Vector<int> indices = a[Mesh::ARRAY_INDEX];
+ const int *ri;
int ic;
bool use_indices;
if (indices.size()) {
ic = indices.size();
- ri = indices.read();
+ ri = indices.ptr();
use_indices = true;
} else {
ic = uv.size();
@@ -435,10 +435,6 @@ void MeshInstanceEditor::_create_outline_mesh() {
}
void MeshInstanceEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option", &MeshInstanceEditor::_menu_option);
- ClassDB::bind_method("_create_outline_mesh", &MeshInstanceEditor::_create_outline_mesh);
- ClassDB::bind_method("_debug_uv_draw", &MeshInstanceEditor::_debug_uv_draw);
}
MeshInstanceEditor::MeshInstanceEditor() {
@@ -455,7 +451,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Trimesh Collision Sibling"), MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is the most accurate (but slowest) option for collision detection."));
- options->get_popup()->add_item(TTR("Create Single Convex Collision Siblings"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE);
+ options->get_popup()->add_item(TTR("Create Single Convex Collision Sibling"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a single convex collision shape.\nThis is the fastest (but least accurate) option for collision detection."));
options->get_popup()->add_item(TTR("Create Multiple Convex Collision Siblings"), MENU_OPTION_CREATE_MULTIPLE_CONVEX_COLLISION_SHAPES);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is a performance middle-ground between the two above options."));
@@ -469,7 +465,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &MeshInstanceEditor::_menu_option));
outline_dialog = memnew(ConfirmationDialog);
outline_dialog->set_title(TTR("Create Outline Mesh"));
@@ -487,7 +483,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
outline_dialog_vbc->add_margin_child(TTR("Outline Size:"), outline_size);
add_child(outline_dialog);
- outline_dialog->connect("confirmed", this, "_create_outline_mesh");
+ outline_dialog->connect("confirmed", callable_mp(this, &MeshInstanceEditor::_create_outline_mesh));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
@@ -497,7 +493,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
add_child(debug_uv_dialog);
debug_uv = memnew(Control);
debug_uv->set_custom_minimum_size(Size2(600, 600) * EDSCALE);
- debug_uv->connect("draw", this, "_debug_uv_draw");
+ debug_uv->connect("draw", callable_mp(this, &MeshInstanceEditor::_debug_uv_draw));
debug_uv_dialog->add_child(debug_uv);
}
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index b77cb6453f..71976d509b 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -34,7 +34,7 @@
#include "editor/editor_settings.h"
#include "main/main.h"
#include "scene/3d/mesh_instance.h"
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include "scene/3d/physics_body.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
@@ -152,9 +152,9 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Transform navmesh_transform;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
- if (!Object::cast_to<NavigationMeshInstance>(child2))
+ if (!Object::cast_to<NavigationRegion>(child2))
continue;
- NavigationMeshInstance *sb = Object::cast_to<NavigationMeshInstance>(child2);
+ NavigationRegion *sb = Object::cast_to<NavigationRegion>(child2);
navmesh = sb->get_navigation_mesh();
navmesh_transform = sb->get_transform();
if (!navmesh.is_null())
@@ -248,10 +248,6 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
}
void MeshLibraryEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_cbk", &MeshLibraryEditor::_menu_cbk);
- ClassDB::bind_method("_menu_confirm", &MeshLibraryEditor::_menu_confirm);
- ClassDB::bind_method("_import_scene_cbk", &MeshLibraryEditor::_import_scene_cbk);
}
MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
@@ -268,7 +264,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
add_child(file);
- file->connect("file_selected", this, "_import_scene_cbk");
+ file->connect("file_selected", callable_mp(this, &MeshLibraryEditor::_import_scene_cbk));
menu = memnew(MenuButton);
SpatialEditor::get_singleton()->add_control_to_menu_panel(menu);
@@ -281,13 +277,13 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
menu->get_popup()->add_item(TTR("Import from Scene"), MENU_OPTION_IMPORT_FROM_SCENE);
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
- menu->get_popup()->connect("id_pressed", this, "_menu_cbk");
+ menu->get_popup()->connect("id_pressed", callable_mp(this, &MeshLibraryEditor::_menu_cbk));
menu->hide();
editor = p_editor;
cd = memnew(ConfirmationDialog);
add_child(cd);
- cd->get_ok()->connect("pressed", this, "_menu_confirm");
+ cd->get_ok()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_confirm));
}
void MeshLibraryEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index ddd27b5e97..27d400c035 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -124,7 +124,7 @@ void MultiMeshEditor::_populate() {
Transform geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform();
- PoolVector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID);
+ Vector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID);
if (geometry.size() == 0) {
@@ -136,7 +136,7 @@ void MultiMeshEditor::_populate() {
//make all faces local
int gc = geometry.size();
- PoolVector<Face3>::Write w = geometry.write();
+ Face3 *w = geometry.ptrw();
for (int i = 0; i < gc; i++) {
for (int j = 0; j < 3; j++) {
@@ -144,13 +144,11 @@ void MultiMeshEditor::_populate() {
}
}
- w.release();
-
- PoolVector<Face3> faces = geometry;
+ Vector<Face3> faces = geometry;
int facecount = faces.size();
ERR_FAIL_COND_MSG(!facecount, "Parent has no solid faces to populate.");
- PoolVector<Face3>::Read r = faces.read();
+ const Face3 *r = faces.ptr();
float area_accum = 0;
Map<float, int> triangle_area_map;
@@ -280,11 +278,6 @@ void MultiMeshEditor::_browse(bool p_source) {
}
void MultiMeshEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option", &MultiMeshEditor::_menu_option);
- ClassDB::bind_method("_populate", &MultiMeshEditor::_populate);
- ClassDB::bind_method("_browsed", &MultiMeshEditor::_browsed);
- ClassDB::bind_method("_browse", &MultiMeshEditor::_browse);
}
MultiMeshEditor::MultiMeshEditor() {
@@ -297,7 +290,7 @@ MultiMeshEditor::MultiMeshEditor() {
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance", "EditorIcons"));
options->get_popup()->add_item(TTR("Populate Surface"));
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &MultiMeshEditor::_menu_option));
populate_dialog = memnew(ConfirmationDialog);
populate_dialog->set_title(TTR("Populate MultiMesh"));
@@ -315,7 +308,7 @@ MultiMeshEditor::MultiMeshEditor() {
Button *b = memnew(Button);
hbc->add_child(b);
b->set_text("..");
- b->connect("pressed", this, "_browse", make_binds(false));
+ b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse), make_binds(false));
vbc->add_margin_child(TTR("Target Surface:"), hbc);
@@ -327,7 +320,7 @@ MultiMeshEditor::MultiMeshEditor() {
hbc->add_child(b);
b->set_text("..");
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
- b->connect("pressed", this, "_browse", make_binds(true));
+ b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse), make_binds(true));
populate_axis = memnew(OptionButton);
populate_axis->add_item(TTR("X-Axis"));
@@ -373,10 +366,10 @@ MultiMeshEditor::MultiMeshEditor() {
populate_dialog->get_ok()->set_text(TTR("Populate"));
- populate_dialog->get_ok()->connect("pressed", this, "_populate");
+ populate_dialog->get_ok()->connect("pressed", callable_mp(this, &MultiMeshEditor::_populate));
std = memnew(SceneTreeDialog);
populate_dialog->add_child(std);
- std->connect("selected", this, "_browsed");
+ std->connect("selected", callable_mp(this, &MultiMeshEditor::_browsed));
_last_pp_node = NULL;
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index c4e61f2488..6671d0b6b4 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -48,7 +48,7 @@ Node2D *NavigationPolygonEditor::_get_node() const {
void NavigationPolygonEditor::_set_node(Node *p_polygon) {
- node = Object::cast_to<NavigationPolygonInstance>(p_polygon);
+ node = Object::cast_to<NavigationRegion2D>(p_polygon);
}
int NavigationPolygonEditor::_get_polygon_count() const {
@@ -127,5 +127,5 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) :
}
NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node) :
- AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
+ AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationRegion2D") {
}
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 1cab336381..10f8cbc0a5 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -38,7 +38,7 @@ class NavigationPolygonEditor : public AbstractPolygon2DEditor {
GDCLASS(NavigationPolygonEditor, AbstractPolygon2DEditor);
- NavigationPolygonInstance *node;
+ NavigationRegion2D *node;
Ref<NavigationPolygon> _ensure_navpoly() const;
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index 3a48673d8e..812144742f 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -191,8 +191,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
int vpc = 0;
{
- PoolVector<uint8_t> data = img->get_data();
- PoolVector<uint8_t>::Read r = data.read();
+ Vector<uint8_t> data = img->get_data();
+ const uint8_t *r = data.ptr();
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
@@ -270,7 +270,7 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
ERR_FAIL_COND_MSG(valid_positions.size() == 0, "No pixels with transparency > 128 in image...");
- PoolVector<uint8_t> texdata;
+ Vector<uint8_t> texdata;
int w = 2048;
int h = (vpc / 2048) + 1;
@@ -278,8 +278,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
texdata.resize(w * h * 2 * sizeof(float));
{
- PoolVector<uint8_t>::Write tw = texdata.write();
- float *twf = (float *)tw.ptr();
+ uint8_t *tw = texdata.ptrw();
+ float *twf = (float *)tw;
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_positions[i].x;
@@ -299,11 +299,11 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
if (capture_colors) {
- PoolVector<uint8_t> colordata;
+ Vector<uint8_t> colordata;
colordata.resize(w * h * 4); //use RG texture
{
- PoolVector<uint8_t>::Write tw = colordata.write();
+ uint8_t *tw = colordata.ptrw();
for (int i = 0; i < vpc * 4; i++) {
tw[i] = valid_colors[i];
@@ -321,12 +321,12 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
if (valid_normals.size()) {
pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
- PoolVector<uint8_t> normdata;
+ Vector<uint8_t> normdata;
normdata.resize(w * h * 2 * sizeof(float)); //use RG texture
{
- PoolVector<uint8_t>::Write tw = normdata.write();
- float *twf = (float *)tw.ptr();
+ uint8_t *tw = normdata.ptrw();
+ float *twf = (float *)tw;
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_normals[i].x;
twf[i * 2 + 1] = valid_normals[i].y;
@@ -349,18 +349,13 @@ void Particles2DEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- menu->get_popup()->connect("id_pressed", this, "_menu_callback");
+ menu->get_popup()->connect("id_pressed", callable_mp(this, &Particles2DEditorPlugin::_menu_callback));
menu->set_icon(menu->get_popup()->get_icon("Particles2D", "EditorIcons"));
- file->connect("file_selected", this, "_file_selected");
+ file->connect("file_selected", callable_mp(this, &Particles2DEditorPlugin::_file_selected));
}
}
void Particles2DEditorPlugin::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_menu_callback"), &Particles2DEditorPlugin::_menu_callback);
- ClassDB::bind_method(D_METHOD("_file_selected"), &Particles2DEditorPlugin::_file_selected);
- ClassDB::bind_method(D_METHOD("_generate_visibility_rect"), &Particles2DEditorPlugin::_generate_visibility_rect);
- ClassDB::bind_method(D_METHOD("_generate_emission_mask"), &Particles2DEditorPlugin::_generate_emission_mask);
}
Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
@@ -416,7 +411,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(generate_visibility_rect);
- generate_visibility_rect->connect("confirmed", this, "_generate_visibility_rect");
+ generate_visibility_rect->connect("confirmed", callable_mp(this, &Particles2DEditorPlugin::_generate_visibility_rect));
emission_mask = memnew(ConfirmationDialog);
emission_mask->set_title(TTR("Load Emission Mask"));
@@ -433,7 +428,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child(emission_mask);
- emission_mask->connect("confirmed", this, "_generate_emission_mask");
+ emission_mask->connect("confirmed", callable_mp(this, &Particles2DEditorPlugin::_generate_emission_mask));
}
Particles2DEditorPlugin::~Particles2DEditorPlugin() {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index cb29e11b9d..a4d704c6e1 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -35,7 +35,7 @@
#include "scene/3d/cpu_particles.h"
#include "scene/resources/particles_material.h"
-bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vector3> &normals) {
+bool ParticlesEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3> &normals) {
bool use_normals = emission_fill->get_selected() == 1;
@@ -93,7 +93,7 @@ bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vect
return false;
}
- PoolVector<Face3>::Read r = geometry.read();
+ const Face3 *r = geometry.ptr();
AABB aabb;
@@ -191,7 +191,7 @@ void ParticlesEditorBase::_node_selected(const NodePath &p_path) {
Transform geom_xform = base_node->get_global_transform().affine_inverse() * vi->get_global_transform();
int gc = geometry.size();
- PoolVector<Face3>::Write w = geometry.write();
+ Face3 *w = geometry.ptrw();
for (int i = 0; i < gc; i++) {
for (int j = 0; j < 3; j++) {
@@ -199,15 +199,10 @@ void ParticlesEditorBase::_node_selected(const NodePath &p_path) {
}
}
- w.release();
-
emission_dialog->popup_centered(Size2(300, 130));
}
void ParticlesEditorBase::_bind_methods() {
-
- ClassDB::bind_method("_node_selected", &ParticlesEditorBase::_node_selected);
- ClassDB::bind_method("_generate_emission_points", &ParticlesEditorBase::_generate_emission_points);
}
ParticlesEditorBase::ParticlesEditorBase() {
@@ -231,25 +226,11 @@ ParticlesEditorBase::ParticlesEditorBase() {
emd_vb->add_margin_child(TTR("Emission Source: "), emission_fill);
emission_dialog->get_ok()->set_text(TTR("Create"));
- emission_dialog->connect("confirmed", this, "_generate_emission_points");
+ emission_dialog->connect("confirmed", callable_mp(this, &ParticlesEditorBase::_generate_emission_points));
- emission_file_dialog = memnew(EditorFileDialog);
- add_child(emission_file_dialog);
- emission_file_dialog->connect("file_selected", this, "_resource_seleted");
emission_tree_dialog = memnew(SceneTreeDialog);
add_child(emission_tree_dialog);
- emission_tree_dialog->connect("selected", this, "_node_selected");
-
- List<String> extensions;
- ResourceLoader::get_recognized_extensions_for_type("Mesh", &extensions);
-
- emission_file_dialog->clear_filters();
- for (int i = 0; i < extensions.size(); i++) {
-
- emission_file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
- }
-
- emission_file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
+ emission_tree_dialog->connect("selected", callable_mp(this, &ParticlesEditorBase::_node_selected));
}
void ParticlesEditor::_node_removed(Node *p_node) {
@@ -264,7 +245,7 @@ void ParticlesEditor::_notification(int p_notification) {
if (p_notification == NOTIFICATION_ENTER_TREE) {
options->set_icon(options->get_popup()->get_icon("Particles", "EditorIcons"));
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &ParticlesEditor::_node_removed));
}
}
@@ -281,17 +262,6 @@ void ParticlesEditor::_menu_option(int p_option) {
generate_seconds->set_value(trunc(gen_time) + 1.0);
generate_aabb->popup_centered_minsize();
} break;
- case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: {
-
- Ref<ParticlesMaterial> material = node->get_process_material();
- if (material.is_null()) {
- EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required."));
- return;
- }
- emission_file_dialog->popup_centered_ratio();
-
- } break;
-
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
Ref<ParticlesMaterial> material = node->get_process_material();
if (material.is_null()) {
@@ -379,8 +349,8 @@ void ParticlesEditor::edit(Particles *p_particles) {
void ParticlesEditor::_generate_emission_points() {
/// hacer codigo aca
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
if (!_generate(points, normals)) {
return;
@@ -391,14 +361,14 @@ void ParticlesEditor::_generate_emission_points() {
int w = 2048;
int h = (point_count / 2048) + 1;
- PoolVector<uint8_t> point_img;
+ Vector<uint8_t> point_img;
point_img.resize(w * h * 3 * sizeof(float));
{
- PoolVector<uint8_t>::Write iw = point_img.write();
- zeromem(iw.ptr(), w * h * 3 * sizeof(float));
- PoolVector<Vector3>::Read r = points.read();
- float *wf = (float *)iw.ptr();
+ uint8_t *iw = point_img.ptrw();
+ zeromem(iw, w * h * 3 * sizeof(float));
+ const Vector3 *r = points.ptr();
+ float *wf = (float *)iw;
for (int i = 0; i < point_count; i++) {
wf[i * 3 + 0] = r[i].x;
wf[i * 3 + 1] = r[i].y;
@@ -420,14 +390,14 @@ void ParticlesEditor::_generate_emission_points() {
material->set_emission_point_count(point_count);
material->set_emission_point_texture(tex);
- PoolVector<uint8_t> point_img2;
+ Vector<uint8_t> point_img2;
point_img2.resize(w * h * 3 * sizeof(float));
{
- PoolVector<uint8_t>::Write iw = point_img2.write();
- zeromem(iw.ptr(), w * h * 3 * sizeof(float));
- PoolVector<Vector3>::Read r = normals.read();
- float *wf = (float *)iw.ptr();
+ uint8_t *iw = point_img2.ptrw();
+ zeromem(iw, w * h * 3 * sizeof(float));
+ const Vector3 *r = normals.ptr();
+ float *wf = (float *)iw;
for (int i = 0; i < point_count; i++) {
wf[i * 3 + 0] = r[i].x;
wf[i * 3 + 1] = r[i].y;
@@ -450,10 +420,6 @@ void ParticlesEditor::_generate_emission_points() {
}
void ParticlesEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option", &ParticlesEditor::_menu_option);
- ClassDB::bind_method("_generate_aabb", &ParticlesEditor::_generate_aabb);
- ClassDB::bind_method("_node_removed", &ParticlesEditor::_node_removed);
}
ParticlesEditor::ParticlesEditor() {
@@ -469,14 +435,13 @@ ParticlesEditor::ParticlesEditor() {
options->set_text(TTR("Particles"));
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
options->get_popup()->add_separator();
- options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Convert to CPUParticles"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &ParticlesEditor::_menu_option));
generate_aabb = memnew(ConfirmationDialog);
generate_aabb->set_title(TTR("Generate Visibility AABB"));
@@ -490,7 +455,7 @@ ParticlesEditor::ParticlesEditor() {
add_child(generate_aabb);
- generate_aabb->connect("confirmed", this, "_generate_aabb");
+ generate_aabb->connect("confirmed", callable_mp(this, &ParticlesEditor::_generate_aabb));
}
void ParticlesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index 4b20d00670..fb5ce17560 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -46,16 +46,15 @@ protected:
MenuButton *options;
HBoxContainer *particles_editor_hb;
- EditorFileDialog *emission_file_dialog;
SceneTreeDialog *emission_tree_dialog;
ConfirmationDialog *emission_dialog;
SpinBox *emission_amount;
OptionButton *emission_fill;
- PoolVector<Face3> geometry;
+ Vector<Face3> geometry;
- bool _generate(PoolVector<Vector3> &points, PoolVector<Vector3> &normals);
+ bool _generate(Vector<Vector3> &points, Vector<Vector3> &normals);
virtual void _generate_emission_points() = 0;
void _node_selected(const NodePath &p_path);
@@ -77,7 +76,6 @@ class ParticlesEditor : public ParticlesEditorBase {
MENU_OPTION_GENERATE_AABB,
MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE,
- MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH,
MENU_OPTION_CLEAR_EMISSION_VOLUME,
MENU_OPTION_CONVERT_TO_CPU_PARTICLES,
MENU_OPTION_RESTART,
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 383dada590..165df6b500 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -441,14 +441,14 @@ void Path2DEditor::edit(Node *p_path2d) {
if (p_path2d) {
node = Object::cast_to<Path2D>(p_path2d);
- if (!node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- node->connect("visibility_changed", this, "_node_visibility_changed");
+ if (!node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed)))
+ node->connect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
} else {
// node may have been deleted at this point
- if (node && node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- node->disconnect("visibility_changed", this, "_node_visibility_changed");
+ if (node && node->is_connected("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed)))
+ node->disconnect("visibility_changed", callable_mp(this, &Path2DEditor::_node_visibility_changed));
node = NULL;
}
}
@@ -456,9 +456,6 @@ void Path2DEditor::edit(Node *p_path2d) {
void Path2DEditor::_bind_methods() {
//ClassDB::bind_method(D_METHOD("_menu_option"),&Path2DEditor::_menu_option);
- ClassDB::bind_method(D_METHOD("_node_visibility_changed"), &Path2DEditor::_node_visibility_changed);
- ClassDB::bind_method(D_METHOD("_mode_selected"), &Path2DEditor::_mode_selected);
- ClassDB::bind_method(D_METHOD("_handle_option_pressed"), &Path2DEditor::_handle_option_pressed);
}
void Path2DEditor::_mode_selected(int p_mode) {
@@ -555,34 +552,34 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
curve_edit->set_toggle_mode(true);
curve_edit->set_focus_mode(Control::FOCUS_NONE);
curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point"));
- curve_edit->connect("pressed", this, "_mode_selected", varray(MODE_EDIT));
+ curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT));
base_hb->add_child(curve_edit);
curve_edit_curve = memnew(ToolButton);
curve_edit_curve->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCurve", "EditorIcons"));
curve_edit_curve->set_toggle_mode(true);
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
curve_edit_curve->set_tooltip(TTR("Select Control Points (Shift+Drag)"));
- curve_edit_curve->connect("pressed", this, "_mode_selected", varray(MODE_EDIT_CURVE));
+ curve_edit_curve->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT_CURVE));
base_hb->add_child(curve_edit_curve);
curve_create = memnew(ToolButton);
curve_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCreate", "EditorIcons"));
curve_create->set_toggle_mode(true);
curve_create->set_focus_mode(Control::FOCUS_NONE);
curve_create->set_tooltip(TTR("Add Point (in empty space)"));
- curve_create->connect("pressed", this, "_mode_selected", varray(MODE_CREATE));
+ curve_create->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_CREATE));
base_hb->add_child(curve_create);
curve_del = memnew(ToolButton);
curve_del->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons"));
curve_del->set_toggle_mode(true);
curve_del->set_focus_mode(Control::FOCUS_NONE);
curve_del->set_tooltip(TTR("Delete Point"));
- curve_del->connect("pressed", this, "_mode_selected", varray(MODE_DELETE));
+ curve_del->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_DELETE));
base_hb->add_child(curve_del);
curve_close = memnew(ToolButton);
curve_close->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveClose", "EditorIcons"));
curve_close->set_focus_mode(Control::FOCUS_NONE);
curve_close->set_tooltip(TTR("Close Curve"));
- curve_close->connect("pressed", this, "_mode_selected", varray(ACTION_CLOSE));
+ curve_close->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(ACTION_CLOSE));
base_hb->add_child(curve_close);
PopupMenu *menu;
@@ -596,7 +593,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", this, "_handle_option_pressed");
+ menu->connect("id_pressed", callable_mp(this, &Path2DEditor::_handle_option_pressed));
base_hb->hide();
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index 92f21d8428..42b1045666 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -229,14 +229,14 @@ void PathSpatialGizmo::redraw() {
if (c.is_null())
return;
- PoolVector<Vector3> v3a = c->tessellate();
- //PoolVector<Vector3> v3a=c->get_baked_points();
+ Vector<Vector3> v3a = c->tessellate();
+ //Vector<Vector3> v3a=c->get_baked_points();
int v3s = v3a.size();
if (v3s == 0)
return;
Vector<Vector3> v3p;
- PoolVector<Vector3>::Read r = v3a.read();
+ const Vector3 *r = v3a.ptr();
// BUG: the following won't work when v3s, avoid drawing as a temporary workaround.
for (int i = 0; i < v3s - 1; i++) {
@@ -315,7 +315,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->get_control()))) {
//click into curve, break it down
- PoolVector<Vector3> v3a = c->tessellate();
+ Vector<Vector3> v3a = c->tessellate();
int idx = 0;
int rc = v3a.size();
int closest_seg = -1;
@@ -323,7 +323,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp
float closest_d = 1e20;
if (rc >= 2) {
- PoolVector<Vector3>::Read r = v3a.read();
+ const Vector3 *r = v3a.ptr();
if (p_camera->unproject_position(gt.xform(c->get_point_position(0))).distance_to(mbpos) < click_dist)
return false; //nope, existing
@@ -543,18 +543,14 @@ void PathEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- curve_create->connect("pressed", this, "_mode_changed", make_binds(0));
- curve_edit->connect("pressed", this, "_mode_changed", make_binds(1));
- curve_del->connect("pressed", this, "_mode_changed", make_binds(2));
- curve_close->connect("pressed", this, "_close_curve");
+ curve_create->connect("pressed", callable_mp(this, &PathEditorPlugin::_mode_changed), make_binds(0));
+ curve_edit->connect("pressed", callable_mp(this, &PathEditorPlugin::_mode_changed), make_binds(1));
+ curve_del->connect("pressed", callable_mp(this, &PathEditorPlugin::_mode_changed), make_binds(2));
+ curve_close->connect("pressed", callable_mp(this, &PathEditorPlugin::_close_curve));
}
}
void PathEditorPlugin::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_mode_changed"), &PathEditorPlugin::_mode_changed);
- ClassDB::bind_method(D_METHOD("_close_curve"), &PathEditorPlugin::_close_curve);
- ClassDB::bind_method(D_METHOD("_handle_option_pressed"), &PathEditorPlugin::_handle_option_pressed);
}
PathEditorPlugin *PathEditorPlugin::singleton = NULL;
@@ -614,7 +610,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", this, "_handle_option_pressed");
+ menu->connect("id_pressed", callable_mp(this, &PathEditorPlugin::_handle_option_pressed));
curve_edit->set_pressed(true);
/*
diff --git a/editor/plugins/physical_bone_plugin.cpp b/editor/plugins/physical_bone_plugin.cpp
index 28099a927b..e0d48afeef 100644
--- a/editor/plugins/physical_bone_plugin.cpp
+++ b/editor/plugins/physical_bone_plugin.cpp
@@ -33,7 +33,6 @@
#include "scene/3d/physics_body.h"
void PhysicalBoneEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_on_toggle_button_transform_joint", "is_pressed"), &PhysicalBoneEditor::_on_toggle_button_transform_joint);
}
void PhysicalBoneEditor::_on_toggle_button_transform_joint(bool p_is_pressed) {
@@ -64,7 +63,7 @@ PhysicalBoneEditor::PhysicalBoneEditor(EditorNode *p_editor) :
button_transform_joint->set_text(TTR("Move Joint"));
button_transform_joint->set_icon(SpatialEditor::get_singleton()->get_icon("PhysicalBone", "EditorIcons"));
button_transform_joint->set_toggle_mode(true);
- button_transform_joint->connect("toggled", this, "_on_toggle_button_transform_joint");
+ button_transform_joint->connect("toggled", callable_mp(this, &PhysicalBoneEditor::_on_toggle_button_transform_joint));
hide();
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 14e22625d9..8c115586a4 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -125,12 +125,12 @@ void Polygon2DEditor::_sync_bones() {
} else {
for (int i = 0; i < skeleton->get_bone_count(); i++) {
NodePath path = skeleton->get_path_to(skeleton->get_bone(i));
- PoolVector<float> weights;
+ Vector<float> weights;
int wc = node->get_polygon().size();
for (int j = 0; j < prev_bones.size(); j += 2) {
NodePath pvp = prev_bones[j];
- PoolVector<float> pv = prev_bones[j + 1];
+ Vector<float> pv = prev_bones[j + 1];
if (pvp == path && pv.size() == wc) {
weights = pv;
}
@@ -138,7 +138,7 @@ void Polygon2DEditor::_sync_bones() {
if (weights.size() == 0) { //create them
weights.resize(node->get_polygon().size());
- PoolVector<float>::Write w = weights.write();
+ float *w = weights.ptrw();
for (int j = 0; j < wc; j++) {
w[j] = 0.0;
}
@@ -192,7 +192,7 @@ void Polygon2DEditor::_update_bone_list() {
if (np == selected || bone_scroll_vb->get_child_count() < 2)
cb->set_pressed(true);
- cb->connect("pressed", this, "_bone_paint_selected", varray(i));
+ cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected), varray(i));
}
uv_edit_draw->update();
@@ -293,8 +293,8 @@ void Polygon2DEditor::_menu_option(int p_option) {
return;
}
- PoolVector<Vector2> points = node->get_polygon();
- PoolVector<Vector2> uvs = node->get_uv();
+ Vector<Vector2> points = node->get_polygon();
+ Vector<Vector2> uvs = node->get_uv();
if (uvs.size() != points.size()) {
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node, "set_uv", points);
@@ -312,10 +312,10 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_POLYGON_TO_UV: {
- PoolVector<Vector2> points = node->get_polygon();
+ Vector<Vector2> points = node->get_polygon();
if (points.size() == 0)
break;
- PoolVector<Vector2> uvs = node->get_uv();
+ Vector<Vector2> uvs = node->get_uv();
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node, "set_uv", points);
undo_redo->add_undo_method(node, "set_uv", uvs);
@@ -325,8 +325,8 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_UV_TO_POLYGON: {
- PoolVector<Vector2> points = node->get_polygon();
- PoolVector<Vector2> uvs = node->get_uv();
+ Vector<Vector2> points = node->get_polygon();
+ Vector<Vector2> uvs = node->get_uv();
if (uvs.size() == 0)
break;
@@ -339,11 +339,11 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_UV_CLEAR: {
- PoolVector<Vector2> uvs = node->get_uv();
+ Vector<Vector2> uvs = node->get_uv();
if (uvs.size() == 0)
break;
undo_redo->create_action(TTR("Create UV Map"));
- undo_redo->add_do_method(node, "set_uv", PoolVector<Vector2>());
+ undo_redo->add_do_method(node, "set_uv", Vector<Vector2>());
undo_redo->add_undo_method(node, "set_uv", uvs);
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
@@ -567,7 +567,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
undo_redo->add_do_method(node, "set_vertex_colors", uv_create_colors_prev);
undo_redo->add_undo_method(node, "set_vertex_colors", node->get_vertex_colors());
for (int i = 0; i < node->get_bone_count(); i++) {
- PoolVector<float> bonew = node->get_bone_weights(i);
+ Vector<float> bonew = node->get_bone_weights(i);
bonew.push_back(0);
undo_redo->add_do_method(node, "set_bone_weights", i, bonew);
undo_redo->add_undo_method(node, "set_bone_weights", i, node->get_bone_weights(i));
@@ -622,7 +622,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
undo_redo->add_do_method(node, "set_vertex_colors", uv_create_colors_prev);
undo_redo->add_undo_method(node, "set_vertex_colors", node->get_vertex_colors());
for (int i = 0; i < node->get_bone_count(); i++) {
- PoolVector<float> bonew = node->get_bone_weights(i);
+ Vector<float> bonew = node->get_bone_weights(i);
bonew.remove(closest);
undo_redo->add_do_method(node, "set_bone_weights", i, bonew);
undo_redo->add_undo_method(node, "set_bone_weights", i, node->get_bone_weights(i));
@@ -712,7 +712,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
int erase_index = -1;
for (int i = polygons.size() - 1; i >= 0; i--) {
- PoolVector<int> points = polygons[i];
+ Vector<int> points = polygons[i];
Vector<Vector2> polys;
polys.resize(points.size());
for (int j = 0; j < polys.size(); j++) {
@@ -832,7 +832,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
} break;
case UV_MODE_EDIT_POINT: {
- PoolVector<Vector2> uv_new = points_prev;
+ Vector<Vector2> uv_new = points_prev;
uv_new.set(point_drag_index, uv_new[point_drag_index] + drag);
if (uv_edit_mode[0]->is_pressed()) { //edit uv
@@ -843,7 +843,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
} break;
case UV_MODE_MOVE: {
- PoolVector<Vector2> uv_new = points_prev;
+ Vector<Vector2> uv_new = points_prev;
for (int i = 0; i < uv_new.size(); i++)
uv_new.set(i, uv_new[i] + drag);
@@ -856,7 +856,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
case UV_MODE_ROTATE: {
Vector2 center;
- PoolVector<Vector2> uv_new = points_prev;
+ Vector<Vector2> uv_new = points_prev;
for (int i = 0; i < uv_new.size(); i++)
center += points_prev[i];
@@ -879,7 +879,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
case UV_MODE_SCALE: {
Vector2 center;
- PoolVector<Vector2> uv_new = points_prev;
+ Vector<Vector2> uv_new = points_prev;
for (int i = 0; i < uv_new.size(); i++)
center += points_prev[i];
@@ -914,7 +914,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (bone_painting) {
- PoolVector<float> painted_weights = node->get_bone_weights(bone_painting_bone);
+ Vector<float> painted_weights = node->get_bone_weights(bone_painting_bone);
{
int pc = painted_weights.size();
@@ -925,9 +925,9 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
amount = -amount;
}
- PoolVector<float>::Write w = painted_weights.write();
- PoolVector<float>::Read r = prev_weights.read();
- PoolVector<Vector2>::Read rv = points_prev.read();
+ float *w = painted_weights.ptrw();
+ const float *r = prev_weights.ptr();
+ const Vector2 *rv = points_prev.ptr();
for (int i = 0; i < pc; i++) {
if (mtx.xform(rv[i]).distance_to(bone_paint_pos) < radius) {
@@ -1024,14 +1024,14 @@ void Polygon2DEditor::_uv_draw() {
Array polygons = node->get_polygons();
- PoolVector<Vector2> uvs;
+ Vector<Vector2> uvs;
if (uv_edit_mode[0]->is_pressed()) { //edit uv
uvs = node->get_uv();
} else { //edit polygon
uvs = node->get_polygon();
}
- PoolVector<float>::Read weight_r;
+ const float *weight_r;
if (uv_edit_mode[3]->is_pressed()) {
int bone_selected = -1;
@@ -1045,7 +1045,7 @@ void Polygon2DEditor::_uv_draw() {
if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == uvs.size()) {
- weight_r = node->get_bone_weights(bone_selected).read();
+ weight_r = node->get_bone_weights(bone_selected).ptr();
}
}
@@ -1094,7 +1094,7 @@ void Polygon2DEditor::_uv_draw() {
for (int i = 0; i < polygons.size(); i++) {
- PoolVector<int> points = polygons[i];
+ Vector<int> points = polygons[i];
Vector<Vector2> polypoints;
for (int j = 0; j < points.size(); j++) {
int next = (j + 1) % points.size();
@@ -1116,7 +1116,7 @@ void Polygon2DEditor::_uv_draw() {
for (int i = 0; i < uvs.size(); i++) {
- if (weight_r.ptr()) {
+ if (weight_r) {
Vector2 draw_pos = mtx.xform(uvs[i]);
float weight = weight_r[i];
uv_edit_draw->draw_rect(Rect2(draw_pos - Vector2(2, 2) * EDSCALE, Vector2(5, 5) * EDSCALE), Color(weight, weight, weight, 1.0), Math::round(EDSCALE));
@@ -1234,22 +1234,8 @@ void Polygon2DEditor::_uv_draw() {
void Polygon2DEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_uv_mode"), &Polygon2DEditor::_uv_mode);
- ClassDB::bind_method(D_METHOD("_uv_draw"), &Polygon2DEditor::_uv_draw);
- ClassDB::bind_method(D_METHOD("_uv_input"), &Polygon2DEditor::_uv_input);
- ClassDB::bind_method(D_METHOD("_uv_scroll_changed"), &Polygon2DEditor::_uv_scroll_changed);
- ClassDB::bind_method(D_METHOD("_set_use_snap"), &Polygon2DEditor::_set_use_snap);
- ClassDB::bind_method(D_METHOD("_set_show_grid"), &Polygon2DEditor::_set_show_grid);
- ClassDB::bind_method(D_METHOD("_set_snap_off_x"), &Polygon2DEditor::_set_snap_off_x);
- ClassDB::bind_method(D_METHOD("_set_snap_off_y"), &Polygon2DEditor::_set_snap_off_y);
- ClassDB::bind_method(D_METHOD("_set_snap_step_x"), &Polygon2DEditor::_set_snap_step_x);
- ClassDB::bind_method(D_METHOD("_set_snap_step_y"), &Polygon2DEditor::_set_snap_step_y);
- ClassDB::bind_method(D_METHOD("_uv_edit_mode_select"), &Polygon2DEditor::_uv_edit_mode_select);
- ClassDB::bind_method(D_METHOD("_uv_edit_popup_hide"), &Polygon2DEditor::_uv_edit_popup_hide);
- ClassDB::bind_method(D_METHOD("_sync_bones"), &Polygon2DEditor::_sync_bones);
ClassDB::bind_method(D_METHOD("_update_bone_list"), &Polygon2DEditor::_update_bone_list);
ClassDB::bind_method(D_METHOD("_update_polygon_editing_state"), &Polygon2DEditor::_update_polygon_editing_state);
- ClassDB::bind_method(D_METHOD("_bone_paint_selected"), &Polygon2DEditor::_bone_paint_selected);
}
Vector2 Polygon2DEditor::snap_point(Vector2 p_target) const {
@@ -1273,14 +1259,14 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
button_uv = memnew(ToolButton);
add_child(button_uv);
button_uv->set_tooltip(TTR("Open Polygon 2D UV editor."));
- button_uv->connect("pressed", this, "_menu_option", varray(MODE_EDIT_UV));
+ button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option), varray(MODE_EDIT_UV));
uv_mode = UV_MODE_EDIT_POINT;
uv_edit = memnew(AcceptDialog);
add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor"));
uv_edit->set_resizable(true);
- uv_edit->connect("popup_hide", this, "_uv_edit_popup_hide");
+ uv_edit->connect("popup_hide", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
VBoxContainer *uv_main_vb = memnew(VBoxContainer);
uv_edit->add_child(uv_main_vb);
@@ -1312,10 +1298,10 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_edit_mode[2]->set_button_group(uv_edit_group);
uv_edit_mode[3]->set_button_group(uv_edit_group);
- uv_edit_mode[0]->connect("pressed", this, "_uv_edit_mode_select", varray(0));
- uv_edit_mode[1]->connect("pressed", this, "_uv_edit_mode_select", varray(1));
- uv_edit_mode[2]->connect("pressed", this, "_uv_edit_mode_select", varray(2));
- uv_edit_mode[3]->connect("pressed", this, "_uv_edit_mode_select", varray(3));
+ uv_edit_mode[0]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(0));
+ uv_edit_mode[1]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(1));
+ uv_edit_mode[2]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(2));
+ uv_edit_mode[3]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(3));
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1325,7 +1311,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_button[i] = memnew(ToolButton);
uv_button[i]->set_toggle_mode(true);
uv_mode_hb->add_child(uv_button[i]);
- uv_button[i]->connect("pressed", this, "_uv_mode", varray(i));
+ uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode), varray(i));
uv_button[i]->set_focus_mode(FOCUS_NONE);
}
@@ -1388,7 +1374,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
uv_menu->get_popup()->add_separator();
uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS);
- uv_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ uv_menu->get_popup()->connect("id_pressed", callable_mp(this, &Polygon2DEditor::_menu_option));
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1399,7 +1385,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
b_snap_enable->set_toggle_mode(true);
b_snap_enable->set_pressed(use_snap);
b_snap_enable->set_tooltip(TTR("Enable Snap"));
- b_snap_enable->connect("toggled", this, "_set_use_snap");
+ b_snap_enable->connect("toggled", callable_mp(this, &Polygon2DEditor::_set_use_snap));
b_snap_grid = memnew(ToolButton);
uv_mode_hb->add_child(b_snap_grid);
@@ -1408,7 +1394,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
b_snap_grid->set_toggle_mode(true);
b_snap_grid->set_pressed(snap_show_grid);
b_snap_grid->set_tooltip(TTR("Show Grid"));
- b_snap_grid->connect("toggled", this, "_set_show_grid");
+ b_snap_grid->connect("toggled", callable_mp(this, &Polygon2DEditor::_set_show_grid));
grid_settings = memnew(AcceptDialog);
grid_settings->set_title(TTR("Configure Grid:"));
@@ -1422,7 +1408,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_off_x->set_step(1);
sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
- sb_off_x->connect("value_changed", this, "_set_snap_off_x");
+ sb_off_x->connect("value_changed", callable_mp(this, &Polygon2DEditor::_set_snap_off_x));
grid_settings_vb->add_margin_child(TTR("Grid Offset X:"), sb_off_x);
SpinBox *sb_off_y = memnew(SpinBox);
@@ -1431,7 +1417,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_off_y->set_step(1);
sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
- sb_off_y->connect("value_changed", this, "_set_snap_off_y");
+ sb_off_y->connect("value_changed", callable_mp(this, &Polygon2DEditor::_set_snap_off_y));
grid_settings_vb->add_margin_child(TTR("Grid Offset Y:"), sb_off_y);
SpinBox *sb_step_x = memnew(SpinBox);
@@ -1440,7 +1426,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_step_x->set_step(1);
sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
- sb_step_x->connect("value_changed", this, "_set_snap_step_x");
+ sb_step_x->connect("value_changed", callable_mp(this, &Polygon2DEditor::_set_snap_step_x));
grid_settings_vb->add_margin_child(TTR("Grid Step X:"), sb_step_x);
SpinBox *sb_step_y = memnew(SpinBox);
@@ -1449,7 +1435,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sb_step_y->set_step(1);
sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
- sb_step_y->connect("value_changed", this, "_set_snap_step_y");
+ sb_step_y->connect("value_changed", callable_mp(this, &Polygon2DEditor::_set_snap_step_y));
grid_settings_vb->add_margin_child(TTR("Grid Step Y:"), sb_step_y);
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1469,16 +1455,16 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_zoom->share(uv_zoom_value);
uv_zoom_value->set_custom_minimum_size(Size2(50, 0));
uv_mode_hb->add_child(uv_zoom_value);
- uv_zoom->connect("value_changed", this, "_uv_scroll_changed");
+ uv_zoom->connect("value_changed", callable_mp(this, &Polygon2DEditor::_uv_scroll_changed));
uv_vscroll = memnew(VScrollBar);
uv_vscroll->set_step(0.001);
uv_edit_draw->add_child(uv_vscroll);
- uv_vscroll->connect("value_changed", this, "_uv_scroll_changed");
+ uv_vscroll->connect("value_changed", callable_mp(this, &Polygon2DEditor::_uv_scroll_changed));
uv_hscroll = memnew(HScrollBar);
uv_hscroll->set_step(0.001);
uv_edit_draw->add_child(uv_hscroll);
- uv_hscroll->connect("value_changed", this, "_uv_scroll_changed");
+ uv_hscroll->connect("value_changed", callable_mp(this, &Polygon2DEditor::_uv_scroll_changed));
bone_scroll_main_vb = memnew(VBoxContainer);
bone_scroll_main_vb->hide();
@@ -1486,7 +1472,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
sync_bones = memnew(Button(TTR("Sync Bones to Polygon")));
bone_scroll_main_vb->add_child(sync_bones);
sync_bones->set_h_size_flags(0);
- sync_bones->connect("pressed", this, "_sync_bones");
+ sync_bones->connect("pressed", callable_mp(this, &Polygon2DEditor::_sync_bones));
uv_main_hsc->add_child(bone_scroll_main_vb);
bone_scroll = memnew(ScrollContainer);
bone_scroll->set_v_scroll(true);
@@ -1496,8 +1482,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
bone_scroll_vb = memnew(VBoxContainer);
bone_scroll->add_child(bone_scroll_vb);
- uv_edit_draw->connect("draw", this, "_uv_draw");
- uv_edit_draw->connect("gui_input", this, "_uv_input");
+ uv_edit_draw->connect("draw", callable_mp(this, &Polygon2DEditor::_uv_draw));
+ uv_edit_draw->connect("gui_input", callable_mp(this, &Polygon2DEditor::_uv_input));
uv_draw_zoom = 1.0;
point_drag_index = -1;
uv_drag = false;
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 1454a03325..2b00b50e5c 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -88,7 +88,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
Label *bone_paint_radius_label;
bool bone_painting;
int bone_painting_bone;
- PoolVector<float> prev_weights;
+ Vector<float> prev_weights;
Vector2 bone_paint_pos;
AcceptDialog *grid_settings;
@@ -97,10 +97,10 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
Vector2 uv_draw_ofs;
float uv_draw_zoom;
- PoolVector<Vector2> points_prev;
- PoolVector<Vector2> uv_create_uv_prev;
- PoolVector<Vector2> uv_create_poly_prev;
- PoolVector<Color> uv_create_colors_prev;
+ Vector<Vector2> points_prev;
+ Vector<Vector2> uv_create_uv_prev;
+ Vector<Vector2> uv_create_poly_prev;
+ Vector<Color> uv_create_colors_prev;
int uv_create_prev_internal_vertices;
Array uv_create_bones_prev;
Array polygons_prev;
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index fb04f50827..feef505acc 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -347,12 +347,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
void ResourcePreloaderEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &ResourcePreloaderEditor::_gui_input);
- ClassDB::bind_method(D_METHOD("_load_pressed"), &ResourcePreloaderEditor::_load_pressed);
- ClassDB::bind_method(D_METHOD("_item_edited"), &ResourcePreloaderEditor::_item_edited);
- ClassDB::bind_method(D_METHOD("_paste_pressed"), &ResourcePreloaderEditor::_paste_pressed);
- ClassDB::bind_method(D_METHOD("_files_load_request"), &ResourcePreloaderEditor::_files_load_request);
ClassDB::bind_method(D_METHOD("_update_library"), &ResourcePreloaderEditor::_update_library);
- ClassDB::bind_method(D_METHOD("_cell_button_pressed"), &ResourcePreloaderEditor::_cell_button_pressed);
ClassDB::bind_method(D_METHOD("_remove_resource", "to_remove"), &ResourcePreloaderEditor::_remove_resource);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
@@ -382,7 +377,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
add_child(file);
tree = memnew(Tree);
- tree->connect("button_pressed", this, "_cell_button_pressed");
+ tree->connect("button_pressed", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
tree->set_columns(2);
tree->set_column_min_width(0, 2);
tree->set_column_min_width(1, 3);
@@ -396,10 +391,10 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
dialog = memnew(AcceptDialog);
add_child(dialog);
- load->connect("pressed", this, "_load_pressed");
- paste->connect("pressed", this, "_paste_pressed");
- file->connect("files_selected", this, "_files_load_request");
- tree->connect("item_edited", this, "_item_edited");
+ load->connect("pressed", callable_mp(this, &ResourcePreloaderEditor::_load_pressed));
+ paste->connect("pressed", callable_mp(this, &ResourcePreloaderEditor::_paste_pressed));
+ file->connect("files_selected", callable_mp(this, &ResourcePreloaderEditor::_files_load_request));
+ tree->connect("item_edited", callable_mp(this, &ResourcePreloaderEditor::_item_edited));
loading_scene = false;
}
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index 1349de5d8e..d932305c63 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -248,10 +248,6 @@ void EditorPropertyRootMotion::_notification(int p_what) {
}
void EditorPropertyRootMotion::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_confirmed"), &EditorPropertyRootMotion::_confirmed);
- ClassDB::bind_method(D_METHOD("_node_assign"), &EditorPropertyRootMotion::_node_assign);
- ClassDB::bind_method(D_METHOD("_node_clear"), &EditorPropertyRootMotion::_node_clear);
}
EditorPropertyRootMotion::EditorPropertyRootMotion() {
@@ -262,24 +258,24 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
assign->set_flat(true);
assign->set_h_size_flags(SIZE_EXPAND_FILL);
assign->set_clip_text(true);
- assign->connect("pressed", this, "_node_assign");
+ assign->connect("pressed", callable_mp(this, &EditorPropertyRootMotion::_node_assign));
hbc->add_child(assign);
clear = memnew(Button);
clear->set_flat(true);
- clear->connect("pressed", this, "_node_clear");
+ clear->connect("pressed", callable_mp(this, &EditorPropertyRootMotion::_node_clear));
hbc->add_child(clear);
filter_dialog = memnew(ConfirmationDialog);
add_child(filter_dialog);
filter_dialog->set_title(TTR("Edit Filtered Tracks:"));
- filter_dialog->connect("confirmed", this, "_confirmed");
+ filter_dialog->connect("confirmed", callable_mp(this, &EditorPropertyRootMotion::_confirmed));
filters = memnew(Tree);
filter_dialog->add_child(filters);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
- filters->connect("item_activated", this, "_confirmed");
+ filters->connect("item_activated", callable_mp(this, &EditorPropertyRootMotion::_confirmed));
//filters->connect("item_edited", this, "_filter_edited");
}
//////////////////////////
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 76312df20a..60bed10351 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -36,6 +36,8 @@
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/project_settings.h"
+#include "editor/debugger/editor_debugger_node.h"
+#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_node.h"
#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
@@ -44,7 +46,6 @@
#include "editor/find_in_files.h"
#include "editor/node_dock.h"
#include "editor/plugins/shader_editor_plugin.h"
-#include "editor/script_editor_debugger.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
#include "script_text_editor.h"
@@ -165,10 +166,10 @@ void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> k = p_ie;
- if (k.is_valid() && (k->get_scancode() == KEY_UP ||
- k->get_scancode() == KEY_DOWN ||
- k->get_scancode() == KEY_PAGEUP ||
- k->get_scancode() == KEY_PAGEDOWN)) {
+ if (k.is_valid() && (k->get_keycode() == KEY_UP ||
+ k->get_keycode() == KEY_DOWN ||
+ k->get_keycode() == KEY_PAGEUP ||
+ k->get_keycode() == KEY_PAGEDOWN)) {
search_options->call("_gui_input", k);
search_box->accept_event();
@@ -210,26 +211,22 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
search_box->set_clear_button_enabled(true);
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("confirmed", this, "_confirmed");
+ disconnect("confirmed", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
} break;
}
}
void ScriptEditorQuickOpen::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_text_changed"), &ScriptEditorQuickOpen::_text_changed);
- ClassDB::bind_method(D_METHOD("_confirmed"), &ScriptEditorQuickOpen::_confirmed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &ScriptEditorQuickOpen::_sbox_input);
-
ADD_SIGNAL(MethodInfo("goto_line", PropertyInfo(Variant::INT, "line")));
}
@@ -239,15 +236,15 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
add_child(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &ScriptEditorQuickOpen::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &ScriptEditorQuickOpen::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
+ search_options->connect("item_activated", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
search_options->add_constant_override("draw_guides", 1);
@@ -261,7 +258,7 @@ ScriptEditor *ScriptEditor::script_editor = NULL;
String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
- String val = debugger->get_var_value(p_text);
+ String val = EditorDebuggerNode::get_singleton()->get_var_value(p_text);
if (val != String()) {
return p_text + ": " + val;
} else {
@@ -276,11 +273,6 @@ void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {
return;
}
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), !(p_breaked && p_can_debug));
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), !(p_breaked && p_can_debug));
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), p_breaked);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), !p_breaked);
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
@@ -292,11 +284,6 @@ void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {
}
}
-void ScriptEditor::_show_debugger(bool p_show) {
-
- //debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show);
-}
-
void ScriptEditor::_script_created(Ref<Script> p_script) {
editor->push_item(p_script.operator->());
}
@@ -843,7 +830,7 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
void ScriptEditor::_live_auto_reload_running_scripts() {
pending_auto_reload = false;
- debugger->reload_scripts();
+ EditorDebuggerNode::get_singleton()->reload_scripts();
}
bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
@@ -909,7 +896,7 @@ void ScriptEditor::_file_dialog_action(String p_file) {
}
file->close();
memdelete(file);
- FALLTHROUGH;
+ [[fallthrough]];
}
case FILE_OPEN: {
@@ -1123,27 +1110,6 @@ void ScriptEditor::_menu_option(int p_option) {
_sort_list_on_update = true;
_update_script_names();
} break;
- case DEBUG_SHOW: {
- if (debugger) {
- bool visible = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW));
- debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible);
- if (visible)
- debugger->hide();
- else
- debugger->show();
- }
- } break;
- case DEBUG_SHOW_KEEP_OPEN: {
- bool visible = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN));
- if (debugger)
- debugger->set_hide_on_stop(visible);
- debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible);
- } break;
- case DEBUG_WITH_EXTERNAL_EDITOR: {
- bool debug_with_external_editor = !debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR));
- debugger->set_debug_with_external_editor(debug_with_external_editor);
- debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR), debug_with_external_editor);
- } break;
case TOGGLE_SCRIPTS_PANEL: {
if (current) {
ScriptTextEditor *editor = Object::cast_to<ScriptTextEditor>(current);
@@ -1294,29 +1260,6 @@ void ScriptEditor::_menu_option(int p_option) {
case CLOSE_ALL: {
_close_all_tabs();
} break;
- case DEBUG_NEXT: {
-
- if (debugger)
- debugger->debug_next();
- } break;
- case DEBUG_STEP: {
-
- if (debugger)
- debugger->debug_step();
-
- } break;
- case DEBUG_BREAK: {
-
- if (debugger)
- debugger->debug_break();
-
- } break;
- case DEBUG_CONTINUE: {
-
- if (debugger)
- debugger->debug_continue();
-
- } break;
case WINDOW_MOVE_UP: {
if (tab_container->get_current_tab() > 0) {
@@ -1439,19 +1382,17 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- editor->connect("play_pressed", this, "_editor_play");
- editor->connect("pause_pressed", this, "_editor_pause");
- editor->connect("stop_pressed", this, "_editor_stop");
- editor->connect("script_add_function_request", this, "_add_callback");
- editor->connect("resource_saved", this, "_res_saved_callback");
- script_list->connect("item_selected", this, "_script_selected");
+ editor->connect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
+ editor->connect("script_add_function_request", callable_mp(this, &ScriptEditor::_add_callback));
+ editor->connect("resource_saved", callable_mp(this, &ScriptEditor::_res_saved_callback));
+ script_list->connect("item_selected", callable_mp(this, &ScriptEditor::_script_selected));
- members_overview->connect("item_selected", this, "_members_overview_selected");
- help_overview->connect("item_selected", this, "_help_overview_selected");
- script_split->connect("dragged", this, "_script_split_dragged");
+ members_overview->connect("item_selected", callable_mp(this, &ScriptEditor::_members_overview_selected));
+ help_overview->connect("item_selected", callable_mp(this, &ScriptEditor::_help_overview_selected));
+ script_split->connect("dragged", callable_mp(this, &ScriptEditor::_script_split_dragged));
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
- FALLTHROUGH;
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ScriptEditor::_editor_settings_changed));
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
@@ -1474,16 +1415,14 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
- get_tree()->connect("tree_changed", this, "_tree_changed");
- editor->get_inspector_dock()->connect("request_help", this, "_request_help");
- editor->connect("request_help_search", this, "_help_search");
+ get_tree()->connect("tree_changed", callable_mp(this, &ScriptEditor::_tree_changed));
+ editor->get_inspector_dock()->connect("request_help", callable_mp(this, &ScriptEditor::_help_class_open));
+ editor->connect("request_help_search", callable_mp(this, &ScriptEditor::_help_search));
} break;
case NOTIFICATION_EXIT_TREE: {
- editor->disconnect("play_pressed", this, "_editor_play");
- editor->disconnect("pause_pressed", this, "_editor_pause");
- editor->disconnect("stop_pressed", this, "_editor_stop");
+ editor->disconnect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
} break;
case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
@@ -2062,7 +2001,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
return false;
}
- if ((debugger->get_dump_stack_script() != p_resource || debugger->get_debug_with_external_editor()) &&
+ if ((EditorDebuggerNode::get_singleton()->get_dump_stack_script() != p_resource || EditorDebuggerNode::get_singleton()->get_debug_with_external_editor()) &&
p_resource->get_path().is_resource_file() &&
p_resource->get_class_name() != StringName("VisualScript") &&
bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
@@ -2194,14 +2133,14 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
_sort_list_on_update = true;
_update_script_names();
_save_layout();
- se->connect("name_changed", this, "_update_script_names");
- se->connect("edited_script_changed", this, "_script_changed");
- se->connect("request_help", this, "_help_search");
- se->connect("request_open_script_at_line", this, "_goto_script_line");
- se->connect("go_to_help", this, "_help_class_goto");
- se->connect("request_save_history", this, "_save_history");
- se->connect("search_in_files_requested", this, "_on_find_in_files_requested");
- se->connect("replace_in_files_requested", this, "_on_replace_in_files_requested");
+ se->connect("name_changed", callable_mp(this, &ScriptEditor::_update_script_names));
+ se->connect("edited_script_changed", callable_mp(this, &ScriptEditor::_script_changed));
+ se->connect("request_help", callable_mp(this, &ScriptEditor::_help_search));
+ se->connect("request_open_script_at_line", callable_mp(this, &ScriptEditor::_goto_script_line));
+ se->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
+ se->connect("request_save_history", callable_mp(this, &ScriptEditor::_save_history));
+ se->connect("search_in_files_requested", callable_mp(this, &ScriptEditor::_on_find_in_files_requested));
+ se->connect("replace_in_files_requested", callable_mp(this, &ScriptEditor::_on_replace_in_files_requested));
//test for modification, maybe the script was not edited but was loaded
@@ -2277,26 +2216,7 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St
script_create_dialog->config(p_base_name, p_base_path);
}
-void ScriptEditor::_editor_play() {
-
- debugger->start();
- debug_menu->get_popup()->grab_focus();
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), false);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true);
-}
-
-void ScriptEditor::_editor_pause() {
-}
void ScriptEditor::_editor_stop() {
-
- debugger->stop();
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true);
-
for (int i = 0; i < tab_container->get_child_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
@@ -2309,7 +2229,7 @@ void ScriptEditor::_editor_stop() {
}
}
-void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PoolStringArray &p_args) {
+void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args) {
ERR_FAIL_COND(!p_obj);
Ref<Script> script = p_obj->get_script();
@@ -2813,7 +2733,7 @@ void ScriptEditor::_help_class_open(const String &p_class) {
tab_container->add_child(eh);
_go_to_tab(tab_container->get_tab_count() - 1);
eh->go_to_class(p_class, 0);
- eh->connect("go_to_help", this, "_help_class_goto");
+ eh->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
_add_recent_script(p_class);
_sort_list_on_update = true;
_update_script_names();
@@ -2843,7 +2763,7 @@ void ScriptEditor::_help_class_goto(const String &p_desc) {
tab_container->add_child(eh);
_go_to_tab(tab_container->get_tab_count() - 1);
eh->go_to_help(p_desc);
- eh->connect("go_to_help", this, "_help_class_goto");
+ eh->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
_add_recent_script(eh->get_class());
_sort_list_on_update = true;
_update_script_names();
@@ -3099,7 +3019,7 @@ void ScriptEditor::_start_find_in_files(bool with_replace) {
editor->make_bottom_panel_item_visible(find_in_files);
}
-void ScriptEditor::_on_find_in_files_modified_files(PoolStringArray paths) {
+void ScriptEditor::_on_find_in_files_modified_files(PackedStringArray paths) {
_test_script_times_on_disk();
_update_modified_scripts_for_external_editor();
@@ -3115,64 +3035,19 @@ void ScriptEditor::_filter_methods_text_changed(const String &p_newtext) {
void ScriptEditor::_bind_methods() {
- ClassDB::bind_method("_file_dialog_action", &ScriptEditor::_file_dialog_action);
- ClassDB::bind_method("_tab_changed", &ScriptEditor::_tab_changed);
- ClassDB::bind_method("_menu_option", &ScriptEditor::_menu_option);
- ClassDB::bind_method("_close_current_tab", &ScriptEditor::_close_current_tab);
- ClassDB::bind_method("_close_discard_current_tab", &ScriptEditor::_close_discard_current_tab);
ClassDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
ClassDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
ClassDB::bind_method("_close_other_tabs", &ScriptEditor::_close_other_tabs);
- ClassDB::bind_method("_open_recent_script", &ScriptEditor::_open_recent_script);
- ClassDB::bind_method("_theme_option", &ScriptEditor::_theme_option);
- ClassDB::bind_method("_editor_play", &ScriptEditor::_editor_play);
- ClassDB::bind_method("_editor_pause", &ScriptEditor::_editor_pause);
- ClassDB::bind_method("_editor_stop", &ScriptEditor::_editor_stop);
- ClassDB::bind_method("_add_callback", &ScriptEditor::_add_callback);
- ClassDB::bind_method("_reload_scripts", &ScriptEditor::_reload_scripts);
- ClassDB::bind_method("_resave_scripts", &ScriptEditor::_resave_scripts);
- ClassDB::bind_method("_res_saved_callback", &ScriptEditor::_res_saved_callback);
- ClassDB::bind_method("_goto_script_line", &ScriptEditor::_goto_script_line);
ClassDB::bind_method("_goto_script_line2", &ScriptEditor::_goto_script_line2);
- ClassDB::bind_method("_set_execution", &ScriptEditor::_set_execution);
- ClassDB::bind_method("_clear_execution", &ScriptEditor::_clear_execution);
- ClassDB::bind_method("_help_search", &ScriptEditor::_help_search);
- ClassDB::bind_method("_save_history", &ScriptEditor::_save_history);
ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path);
- ClassDB::bind_method("_breaked", &ScriptEditor::_breaked);
- ClassDB::bind_method("_show_debugger", &ScriptEditor::_show_debugger);
ClassDB::bind_method("_get_debug_tooltip", &ScriptEditor::_get_debug_tooltip);
- ClassDB::bind_method("_autosave_scripts", &ScriptEditor::_autosave_scripts);
- ClassDB::bind_method("_update_autosave_timer", &ScriptEditor::_update_autosave_timer);
- ClassDB::bind_method("_editor_settings_changed", &ScriptEditor::_editor_settings_changed);
- ClassDB::bind_method("_update_script_names", &ScriptEditor::_update_script_names);
ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections);
- ClassDB::bind_method("_tree_changed", &ScriptEditor::_tree_changed);
- ClassDB::bind_method("_members_overview_selected", &ScriptEditor::_members_overview_selected);
- ClassDB::bind_method("_help_overview_selected", &ScriptEditor::_help_overview_selected);
- ClassDB::bind_method("_script_selected", &ScriptEditor::_script_selected);
- ClassDB::bind_method("_script_created", &ScriptEditor::_script_created);
- ClassDB::bind_method("_script_split_dragged", &ScriptEditor::_script_split_dragged);
ClassDB::bind_method("_help_class_open", &ScriptEditor::_help_class_open);
- ClassDB::bind_method("_help_class_goto", &ScriptEditor::_help_class_goto);
- ClassDB::bind_method("_request_help", &ScriptEditor::_help_class_open);
- ClassDB::bind_method("_history_forward", &ScriptEditor::_history_forward);
- ClassDB::bind_method("_history_back", &ScriptEditor::_history_back);
ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts);
ClassDB::bind_method("_unhandled_input", &ScriptEditor::_unhandled_input);
- ClassDB::bind_method("_script_list_gui_input", &ScriptEditor::_script_list_gui_input);
- ClassDB::bind_method("_toggle_members_overview_alpha_sort", &ScriptEditor::_toggle_members_overview_alpha_sort);
ClassDB::bind_method("_update_members_overview", &ScriptEditor::_update_members_overview);
- ClassDB::bind_method("_script_changed", &ScriptEditor::_script_changed);
- ClassDB::bind_method("_filter_scripts_text_changed", &ScriptEditor::_filter_scripts_text_changed);
- ClassDB::bind_method("_filter_methods_text_changed", &ScriptEditor::_filter_methods_text_changed);
ClassDB::bind_method("_update_recent_scripts", &ScriptEditor::_update_recent_scripts);
- ClassDB::bind_method("_on_find_in_files_requested", &ScriptEditor::_on_find_in_files_requested);
- ClassDB::bind_method("_on_replace_in_files_requested", &ScriptEditor::_on_replace_in_files_requested);
- ClassDB::bind_method("_start_find_in_files", &ScriptEditor::_start_find_in_files);
- ClassDB::bind_method("_on_find_in_files_result_selected", &ScriptEditor::_on_find_in_files_result_selected);
- ClassDB::bind_method("_on_find_in_files_modified_files", &ScriptEditor::_on_find_in_files_modified_files);
ClassDB::bind_method(D_METHOD("get_drag_data_fw", "point", "from"), &ScriptEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw);
@@ -3221,22 +3096,22 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
filter_scripts = memnew(LineEdit);
filter_scripts->set_placeholder(TTR("Filter scripts"));
filter_scripts->set_clear_button_enabled(true);
- filter_scripts->connect("text_changed", this, "_filter_scripts_text_changed");
+ filter_scripts->connect("text_changed", callable_mp(this, &ScriptEditor::_filter_scripts_text_changed));
scripts_vbox->add_child(filter_scripts);
script_list = memnew(ItemList);
scripts_vbox->add_child(script_list);
script_list->set_custom_minimum_size(Size2(150, 60) * EDSCALE); //need to give a bit of limit to avoid it from disappearing
script_list->set_v_size_flags(SIZE_EXPAND_FILL);
- script_split->set_split_offset(140);
+ script_split->set_split_offset(70 * EDSCALE);
_sort_list_on_update = true;
- script_list->connect("gui_input", this, "_script_list_gui_input", varray(), CONNECT_DEFERRED);
+ script_list->connect("gui_input", callable_mp(this, &ScriptEditor::_script_list_gui_input), varray(), CONNECT_DEFERRED);
script_list->set_allow_rmb_select(true);
script_list->set_drag_forwarding(this);
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_menu_option");
+ context_menu->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
context_menu->set_hide_on_window_lose_focus(true);
overview_vbox = memnew(VBoxContainer);
@@ -3257,14 +3132,14 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list."));
members_overview_alphabeta_sort_button->set_toggle_mode(true);
members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically"));
- members_overview_alphabeta_sort_button->connect("toggled", this, "_toggle_members_overview_alpha_sort");
+ members_overview_alphabeta_sort_button->connect("toggled", callable_mp(this, &ScriptEditor::_toggle_members_overview_alpha_sort));
buttons_hbox->add_child(members_overview_alphabeta_sort_button);
filter_methods = memnew(LineEdit);
filter_methods->set_placeholder(TTR("Filter methods"));
filter_methods->set_clear_button_enabled(true);
- filter_methods->connect("text_changed", this, "_filter_methods_text_changed");
+ filter_methods->connect("text_changed", callable_mp(this, &ScriptEditor::_filter_methods_text_changed));
overview_vbox->add_child(filter_methods);
members_overview = memnew(ItemList);
@@ -3308,7 +3183,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
recent_scripts = memnew(PopupMenu);
recent_scripts->set_name("RecentScripts");
file_menu->get_popup()->add_child(recent_scripts);
- recent_scripts->connect("id_pressed", this, "_open_recent_script");
+ recent_scripts->connect("id_pressed", callable_mp(this, &ScriptEditor::_open_recent_script));
_update_recent_scripts();
file_menu->get_popup()->add_separator();
@@ -3330,7 +3205,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
theme_submenu = memnew(PopupMenu);
theme_submenu->set_name("Theme");
file_menu->get_popup()->add_child(theme_submenu);
- theme_submenu->connect("id_pressed", this, "_theme_option");
+ theme_submenu->connect("id_pressed", callable_mp(this, &ScriptEditor::_theme_option));
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT);
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD);
@@ -3349,35 +3224,25 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL);
- file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
script_search_menu = memnew(MenuButton);
menu_hb->add_child(script_search_menu);
script_search_menu->set_text(TTR("Search"));
script_search_menu->set_switch_on_hover(true);
script_search_menu->get_popup()->set_hide_on_window_lose_focus(true);
- script_search_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ script_search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
- debug_menu = memnew(MenuButton);
+ MenuButton *debug_menu = memnew(MenuButton);
menu_hb->add_child(debug_menu);
- debug_menu->set_text(TTR("Debug"));
- debug_menu->set_switch_on_hover(true);
- debug_menu->get_popup()->set_hide_on_window_lose_focus(true);
- debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP);
- debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10), DEBUG_NEXT);
- debug_menu->get_popup()->add_separator();
- debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/break", TTR("Break")), DEBUG_BREAK);
- debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12), DEBUG_CONTINUE);
- debug_menu->get_popup()->add_separator();
- //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
- debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN);
- debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor")), DEBUG_WITH_EXTERNAL_EDITOR);
- debug_menu->get_popup()->connect("id_pressed", this, "_menu_option");
-
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), true);
- debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true);
+ debug_menu->hide(); // Handled by EditorDebuggerNode below.
+
+ EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
+ debugger->set_script_debug_button(debug_menu);
+ debugger->connect("goto_script_line", callable_mp(this, &ScriptEditor::_goto_script_line));
+ debugger->connect("set_execution", callable_mp(this, &ScriptEditor::_set_execution));
+ debugger->connect("clear_execution", callable_mp(this, &ScriptEditor::_clear_execution));
+ debugger->connect("breaked", callable_mp(this, &ScriptEditor::_breaked));
menu_hb->add_spacer();
@@ -3393,64 +3258,58 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
site_search = memnew(ToolButton);
site_search->set_text(TTR("Online Docs"));
- site_search->connect("pressed", this, "_menu_option", varray(SEARCH_WEBSITE));
+ site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_WEBSITE));
menu_hb->add_child(site_search);
site_search->set_tooltip(TTR("Open Godot online documentation."));
request_docs = memnew(ToolButton);
request_docs->set_text(TTR("Request Docs"));
- request_docs->connect("pressed", this, "_menu_option", varray(REQUEST_DOCS));
+ request_docs->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(REQUEST_DOCS));
menu_hb->add_child(request_docs);
request_docs->set_tooltip(TTR("Help improve the Godot documentation by giving feedback."));
help_search = memnew(ToolButton);
help_search->set_text(TTR("Search Help"));
- help_search->connect("pressed", this, "_menu_option", varray(SEARCH_HELP));
+ help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_HELP));
menu_hb->add_child(help_search);
help_search->set_tooltip(TTR("Search the reference documentation."));
menu_hb->add_child(memnew(VSeparator));
script_back = memnew(ToolButton);
- script_back->connect("pressed", this, "_history_back");
+ script_back->connect("pressed", callable_mp(this, &ScriptEditor::_history_back));
menu_hb->add_child(script_back);
script_back->set_disabled(true);
script_back->set_tooltip(TTR("Go to previous edited document."));
script_forward = memnew(ToolButton);
- script_forward->connect("pressed", this, "_history_forward");
+ script_forward->connect("pressed", callable_mp(this, &ScriptEditor::_history_forward));
menu_hb->add_child(script_forward);
script_forward->set_disabled(true);
script_forward->set_tooltip(TTR("Go to next edited document."));
- tab_container->connect("tab_changed", this, "_tab_changed");
+ tab_container->connect("tab_changed", callable_mp(this, &ScriptEditor::_tab_changed));
erase_tab_confirm = memnew(ConfirmationDialog);
erase_tab_confirm->get_ok()->set_text(TTR("Save"));
erase_tab_confirm->add_button(TTR("Discard"), OS::get_singleton()->get_swap_ok_cancel(), "discard");
- erase_tab_confirm->connect("confirmed", this, "_close_current_tab");
- erase_tab_confirm->connect("custom_action", this, "_close_discard_current_tab");
+ erase_tab_confirm->connect("confirmed", callable_mp(this, &ScriptEditor::_close_current_tab));
+ erase_tab_confirm->connect("custom_action", callable_mp(this, &ScriptEditor::_close_discard_current_tab));
add_child(erase_tab_confirm);
script_create_dialog = memnew(ScriptCreateDialog);
script_create_dialog->set_title(TTR("Create Script"));
add_child(script_create_dialog);
- script_create_dialog->connect("script_created", this, "_script_created");
+ script_create_dialog->connect("script_created", callable_mp(this, &ScriptEditor::_script_created));
file_dialog_option = -1;
file_dialog = memnew(EditorFileDialog);
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_file_dialog_action");
+ file_dialog->connect("file_selected", callable_mp(this, &ScriptEditor::_file_dialog_action));
error_dialog = memnew(AcceptDialog);
add_child(error_dialog);
- debugger = memnew(ScriptEditorDebugger(editor));
- debugger->connect("goto_script_line", this, "_goto_script_line");
- debugger->connect("set_execution", this, "_set_execution");
- debugger->connect("clear_execution", this, "_clear_execution");
- debugger->connect("show_debugger", this, "_show_debugger");
-
disk_changed = memnew(ConfirmationDialog);
{
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -3464,48 +3323,42 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
vbc->add_child(disk_changed_list);
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
- disk_changed->connect("confirmed", this, "_reload_scripts");
+ disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::_reload_scripts));
disk_changed->get_ok()->set_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave");
- disk_changed->connect("custom_action", this, "_resave_scripts");
+ disk_changed->connect("custom_action", callable_mp(this, &ScriptEditor::_resave_scripts));
}
add_child(disk_changed);
script_editor = this;
- Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger);
- debugger->set_tool_button(db);
-
- debugger->connect("breaked", this, "_breaked");
-
autosave_timer = memnew(Timer);
autosave_timer->set_one_shot(false);
- autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, this, "_update_autosave_timer");
- autosave_timer->connect("timeout", this, "_autosave_scripts");
+ autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &ScriptEditor::_update_autosave_timer));
+ autosave_timer->connect("timeout", callable_mp(this, &ScriptEditor::_autosave_scripts));
add_child(autosave_timer);
grab_focus_block = false;
help_search_dialog = memnew(EditorHelpSearch);
add_child(help_search_dialog);
- help_search_dialog->connect("go_to_help", this, "_help_class_goto");
+ help_search_dialog->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
find_in_files_dialog = memnew(FindInFilesDialog);
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, this, "_start_find_in_files", varray(false));
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true));
+ find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files), varray(false));
+ find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files), varray(true));
add_child(find_in_files_dialog);
find_in_files = memnew(FindInFilesPanel);
find_in_files_button = editor->add_bottom_panel_item(TTR("Search Results"), find_in_files);
find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
- find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected");
- find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files");
+ find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, callable_mp(this, &ScriptEditor::_on_find_in_files_result_selected));
+ find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, callable_mp(this, &ScriptEditor::_on_find_in_files_modified_files));
find_in_files->hide();
find_in_files_button->hide();
history_pos = -1;
- //debugger_gui->hide();
edit_pass = 0;
trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save");
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 4087b7cd55..b4b4f33fc5 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -73,7 +73,7 @@ public:
ScriptEditorQuickOpen();
};
-class ScriptEditorDebugger;
+class EditorDebuggerNode;
class ScriptEditorBase : public VBoxContainer {
@@ -107,7 +107,7 @@ public:
virtual void tag_saved_version() = 0;
virtual void reload(bool p_soft) {}
virtual void get_breakpoints(List<int> *p_breakpoints) = 0;
- virtual void add_callback(const String &p_function, PoolStringArray p_args) = 0;
+ virtual void add_callback(const String &p_function, PackedStringArray p_args) = 0;
virtual void update_settings() = 0;
virtual void set_debugger_active(bool p_active) = 0;
virtual bool can_lose_focus_on_node_selection() { return true; }
@@ -155,13 +155,6 @@ class ScriptEditor : public PanelContainer {
FILE_COPY_PATH,
FILE_TOOL_RELOAD,
FILE_TOOL_RELOAD_SOFT,
- DEBUG_NEXT,
- DEBUG_STEP,
- DEBUG_BREAK,
- DEBUG_CONTINUE,
- DEBUG_SHOW,
- DEBUG_SHOW_KEEP_OPEN,
- DEBUG_WITH_EXTERNAL_EDITOR,
SEARCH_IN_FILES,
REPLACE_IN_FILES,
SEARCH_HELP,
@@ -233,7 +226,6 @@ class ScriptEditor : public PanelContainer {
AcceptDialog *error_dialog;
ConfirmationDialog *erase_tab_confirm;
ScriptCreateDialog *script_create_dialog;
- ScriptEditorDebugger *debugger;
ToolButton *scripts_visible;
String current_theme;
@@ -315,13 +307,11 @@ class ScriptEditor : public PanelContainer {
EditorScriptCodeCompletionCache *completion_cache;
- void _editor_play();
- void _editor_pause();
void _editor_stop();
int edit_pass;
- void _add_callback(Object *p_obj, const String &p_function, const PoolStringArray &p_args);
+ void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args);
void _res_saved_callback(const Ref<Resource> &p_res);
bool trim_trailing_whitespace_on_save;
@@ -335,7 +325,6 @@ class ScriptEditor : public PanelContainer {
void _set_execution(REF p_script, int p_line);
void _clear_execution(REF p_script);
void _breaked(bool p_breaked, bool p_can_debug);
- void _show_debugger(bool p_show);
void _update_window_menu();
void _script_created(Ref<Script> p_script);
@@ -408,7 +397,7 @@ class ScriptEditor : public PanelContainer {
void _on_replace_in_files_requested(String text);
void _on_find_in_files_result_selected(String fpath, int line_number, int begin, int end);
void _start_find_in_files(bool with_replace);
- void _on_find_in_files_modified_files(PoolStringArray paths);
+ void _on_find_in_files_modified_files(PackedStringArray paths);
static void _open_script_request(const String &p_path);
@@ -457,7 +446,6 @@ public:
VSplitContainer *get_left_list_split() { return list_split; }
- ScriptEditorDebugger *get_debugger() { return debugger; }
void set_live_auto_reload_running_scripts(bool p_enabled);
static void register_create_syntax_highlighter_function(CreateSyntaxHighlighterFunc p_func);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 1ec425d09d..02168a4c97 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -32,10 +32,10 @@
#include "core/math/expression.h"
#include "core/os/keyboard.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "editor/script_editor_debugger.h"
void ConnectionInfoDialog::ok_pressed() {
}
@@ -53,30 +53,30 @@ void ConnectionInfoDialog::popup_connections(String p_method, Vector<Node *> p_n
for (List<Connection>::Element *E = all_connections.front(); E; E = E->next()) {
Connection connection = E->get();
- if (connection.method != p_method) {
+ if (connection.callable.get_method() != p_method) {
continue;
}
TreeItem *node_item = tree->create_item(root);
- node_item->set_text(0, Object::cast_to<Node>(connection.source)->get_name());
- node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.source, "Node"));
+ node_item->set_text(0, Object::cast_to<Node>(connection.signal.get_object())->get_name());
+ node_item->set_icon(0, EditorNode::get_singleton()->get_object_icon(connection.signal.get_object(), "Node"));
node_item->set_selectable(0, false);
node_item->set_editable(0, false);
- node_item->set_text(1, connection.signal);
+ node_item->set_text(1, connection.signal.get_name());
node_item->set_icon(1, get_parent_control()->get_icon("Slot", "EditorIcons"));
node_item->set_selectable(1, false);
node_item->set_editable(1, false);
- node_item->set_text(2, Object::cast_to<Node>(connection.target)->get_name());
- node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.target, "Node"));
+ node_item->set_text(2, Object::cast_to<Node>(connection.callable.get_object())->get_name());
+ node_item->set_icon(2, EditorNode::get_singleton()->get_object_icon(connection.callable.get_object(), "Node"));
node_item->set_selectable(2, false);
node_item->set_editable(2, false);
}
}
- popup_centered(Size2(400, 300) * EDSCALE);
+ popup_centered(Size2(600, 300) * EDSCALE);
}
ConnectionInfoDialog::ConnectionInfoDialog() {
@@ -292,27 +292,34 @@ void ScriptTextEditor::_set_theme_for_script() {
const Color basetype_color = colors_cache.basetype_color;
text_edit->add_keyword_color("String", basetype_color);
text_edit->add_keyword_color("Vector2", basetype_color);
+ text_edit->add_keyword_color("Vector2i", basetype_color);
text_edit->add_keyword_color("Rect2", basetype_color);
- text_edit->add_keyword_color("Transform2D", basetype_color);
+ text_edit->add_keyword_color("Rect2i", basetype_color);
text_edit->add_keyword_color("Vector3", basetype_color);
+ text_edit->add_keyword_color("Vector3i", basetype_color);
+ text_edit->add_keyword_color("Transform2D", basetype_color);
+ text_edit->add_keyword_color("Plane", basetype_color);
+ text_edit->add_keyword_color("Quat", basetype_color);
text_edit->add_keyword_color("AABB", basetype_color);
text_edit->add_keyword_color("Basis", basetype_color);
- text_edit->add_keyword_color("Plane", basetype_color);
text_edit->add_keyword_color("Transform", basetype_color);
- text_edit->add_keyword_color("Quat", basetype_color);
text_edit->add_keyword_color("Color", basetype_color);
- text_edit->add_keyword_color("Object", basetype_color);
+ text_edit->add_keyword_color("StringName", basetype_color);
text_edit->add_keyword_color("NodePath", basetype_color);
text_edit->add_keyword_color("RID", basetype_color);
+ text_edit->add_keyword_color("Object", basetype_color);
+ text_edit->add_keyword_color("Callable", basetype_color);
text_edit->add_keyword_color("Dictionary", basetype_color);
text_edit->add_keyword_color("Array", basetype_color);
- text_edit->add_keyword_color("PoolByteArray", basetype_color);
- text_edit->add_keyword_color("PoolIntArray", basetype_color);
- text_edit->add_keyword_color("PoolRealArray", basetype_color);
- text_edit->add_keyword_color("PoolStringArray", basetype_color);
- text_edit->add_keyword_color("PoolVector2Array", basetype_color);
- text_edit->add_keyword_color("PoolVector3Array", basetype_color);
- text_edit->add_keyword_color("PoolColorArray", basetype_color);
+ text_edit->add_keyword_color("PackedByteArray", basetype_color);
+ text_edit->add_keyword_color("PackedInt32Array", basetype_color);
+ text_edit->add_keyword_color("PackedInt64Array", basetype_color);
+ text_edit->add_keyword_color("PackedFloat32Array", basetype_color);
+ text_edit->add_keyword_color("PackedFloat64Array", basetype_color);
+ text_edit->add_keyword_color("PackedStringArray", basetype_color);
+ text_edit->add_keyword_color("PackedVector2Array", basetype_color);
+ text_edit->add_keyword_color("PackedVector3Array", basetype_color);
+ text_edit->add_keyword_color("PackedColorArray", basetype_color);
//colorize engine types
List<StringName> types;
@@ -424,7 +431,7 @@ void ScriptTextEditor::_notification(int p_what) {
}
}
-void ScriptTextEditor::add_callback(const String &p_function, PoolStringArray p_args) {
+void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray p_args) {
String code = code_editor->get_text_edit()->get_text();
int pos = script->get_language()->find_function(p_function, code);
@@ -603,12 +610,12 @@ void ScriptTextEditor::_validate_script() {
Connection connection = E->get();
String base_path = base->get_name();
- String source_path = base == connection.source ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.source));
- String target_path = base == connection.target ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.target));
+ String source_path = base == connection.signal.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.signal.get_object()));
+ String target_path = base == connection.callable.get_object() ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.callable.get_object()));
warnings_panel->push_cell();
warnings_panel->push_color(warnings_panel->get_color("warning_color", "Editor"));
- warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.method, connection.signal, source_path, target_path));
+ warnings_panel->add_text(vformat(TTR("Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."), connection.callable.get_method(), connection.signal.get_name(), source_path, target_path));
warnings_panel->pop(); // Color.
warnings_panel->pop(); // Cell.
}
@@ -870,7 +877,7 @@ void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) {
void ScriptTextEditor::_breakpoint_toggled(int p_row) {
- ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row));
+ EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row));
}
void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_column) {
@@ -1006,24 +1013,24 @@ void ScriptTextEditor::_update_connected_methods() {
}
// As deleted nodes are still accessible via the undo/redo system, check if they're still on the tree.
- Node *source = Object::cast_to<Node>(connection.source);
+ Node *source = Object::cast_to<Node>(connection.signal.get_object());
if (source && !source->is_inside_tree()) {
continue;
}
- if (methods_found.has(connection.method)) {
+ if (methods_found.has(connection.callable.get_method())) {
continue;
}
- if (!ClassDB::has_method(script->get_instance_base_type(), connection.method)) {
+ if (!ClassDB::has_method(script->get_instance_base_type(), connection.callable.get_method())) {
int line = -1;
for (int j = 0; j < functions.size(); j++) {
String name = functions[j].get_slice(":", 0);
- if (name == connection.method) {
+ if (name == connection.callable.get_method()) {
line = functions[j].get_slice(":", 1).to_int();
- text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.method);
- methods_found.insert(connection.method);
+ text_edit->set_line_info_icon(line - 1, get_parent_control()->get_icon("Slot", "EditorIcons"), connection.callable.get_method());
+ methods_found.insert(connection.callable.get_method());
break;
}
}
@@ -1036,7 +1043,7 @@ void ScriptTextEditor::_update_connected_methods() {
bool found_inherited_function = false;
Ref<Script> inherited_script = script->get_base_script();
while (!inherited_script.is_null()) {
- if (inherited_script->has_method(connection.method)) {
+ if (inherited_script->has_method(connection.callable.get_method())) {
found_inherited_function = true;
break;
}
@@ -1212,7 +1219,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
Expression expression;
Vector<String> lines = code_editor->get_text_edit()->get_selection_text().split("\n");
- PoolStringArray results;
+ PackedStringArray results;
for (int i = 0; i < lines.size(); i++) {
String line = lines[i];
@@ -1221,17 +1228,17 @@ void ScriptTextEditor::_edit_option(int p_op) {
if (expression.parse(line) == OK) {
Variant result = expression.execute(Array(), Variant(), false);
if (expression.get_error_text() == "") {
- results.append(whitespace + result.get_construct_string());
+ results.push_back(whitespace + result.get_construct_string());
} else {
- results.append(line);
+ results.push_back(line);
}
} else {
- results.append(line);
+ results.push_back(line);
}
}
code_editor->get_text_edit()->begin_complex_operation(); //prevents creating a two-step undo
- code_editor->get_text_edit()->insert_text_at_cursor(results.join("\n"));
+ code_editor->get_text_edit()->insert_text_at_cursor(String("\n").join(results));
code_editor->get_text_edit()->end_complex_operation();
} break;
case SEARCH_FIND: {
@@ -1294,7 +1301,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
int line = tx->cursor_get_line();
bool dobreak = !tx->is_line_set_as_breakpoint(line);
tx->set_line_as_breakpoint(line, dobreak);
- ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
+ EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
} break;
case DEBUG_REMOVE_ALL_BREAKPOINTS: {
@@ -1305,7 +1312,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
int line = E->get();
bool dobreak = !tx->is_line_set_as_breakpoint(line);
tx->set_line_as_breakpoint(line, dobreak);
- ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
+ EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
}
} break;
case DEBUG_GOTO_NEXT_BREAKPOINT: {
@@ -1429,24 +1436,7 @@ void ScriptTextEditor::_change_syntax_highlighter(int p_idx) {
void ScriptTextEditor::_bind_methods() {
- ClassDB::bind_method("_validate_script", &ScriptTextEditor::_validate_script);
- ClassDB::bind_method("_update_bookmark_list", &ScriptTextEditor::_update_bookmark_list);
- ClassDB::bind_method("_bookmark_item_pressed", &ScriptTextEditor::_bookmark_item_pressed);
- ClassDB::bind_method("_load_theme_settings", &ScriptTextEditor::_load_theme_settings);
- ClassDB::bind_method("_update_breakpoint_list", &ScriptTextEditor::_update_breakpoint_list);
- ClassDB::bind_method("_breakpoint_item_pressed", &ScriptTextEditor::_breakpoint_item_pressed);
- ClassDB::bind_method("_breakpoint_toggled", &ScriptTextEditor::_breakpoint_toggled);
- ClassDB::bind_method("_lookup_connections", &ScriptTextEditor::_lookup_connections);
ClassDB::bind_method("_update_connected_methods", &ScriptTextEditor::_update_connected_methods);
- ClassDB::bind_method("_change_syntax_highlighter", &ScriptTextEditor::_change_syntax_highlighter);
- ClassDB::bind_method("_edit_option", &ScriptTextEditor::_edit_option);
- ClassDB::bind_method("_goto_line", &ScriptTextEditor::_goto_line);
- ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol);
- ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
- ClassDB::bind_method("_show_warnings_panel", &ScriptTextEditor::_show_warnings_panel);
- ClassDB::bind_method("_error_pressed", &ScriptTextEditor::_error_pressed);
- ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked);
- ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
ClassDB::bind_method("get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &ScriptTextEditor::can_drop_data_fw);
@@ -1610,7 +1600,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb.is_valid() && mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
local_pos = mb->get_global_position() - tx->get_global_position();
create_menu = true;
- } else if (k.is_valid() && k->get_scancode() == KEY_MENU) {
+ } else if (k.is_valid() && k->get_keycode() == KEY_MENU) {
local_pos = tx->_get_cursor_pixel_pos();
create_menu = true;
}
@@ -1774,12 +1764,12 @@ ScriptTextEditor::ScriptTextEditor() {
editor_box->add_child(code_editor);
code_editor->add_constant_override("separation", 2);
code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- code_editor->connect("validate_script", this, "_validate_script");
- code_editor->connect("load_theme_settings", this, "_load_theme_settings");
+ code_editor->connect("validate_script", callable_mp(this, &ScriptTextEditor::_validate_script));
+ code_editor->connect("load_theme_settings", callable_mp(this, &ScriptTextEditor::_load_theme_settings));
code_editor->set_code_complete_func(_code_complete_scripts, this);
- code_editor->get_text_edit()->connect("breakpoint_toggled", this, "_breakpoint_toggled");
- code_editor->get_text_edit()->connect("symbol_lookup", this, "_lookup_symbol");
- code_editor->get_text_edit()->connect("info_clicked", this, "_lookup_connections");
+ code_editor->get_text_edit()->connect("breakpoint_toggled", callable_mp(this, &ScriptTextEditor::_breakpoint_toggled));
+ code_editor->get_text_edit()->connect("symbol_lookup", callable_mp(this, &ScriptTextEditor::_lookup_symbol));
+ code_editor->get_text_edit()->connect("info_clicked", callable_mp(this, &ScriptTextEditor::_lookup_connections));
code_editor->set_v_size_flags(SIZE_EXPAND_FILL);
code_editor->show_toggle_scripts_button();
@@ -1792,9 +1782,9 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
- code_editor->connect("error_pressed", this, "_error_pressed");
- code_editor->connect("show_warnings_panel", this, "_show_warnings_panel");
- warnings_panel->connect("meta_clicked", this, "_warning_clicked");
+ code_editor->connect("error_pressed", callable_mp(this, &ScriptTextEditor::_error_pressed));
+ code_editor->connect("show_warnings_panel", callable_mp(this, &ScriptTextEditor::_show_warnings_panel));
+ warnings_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_warning_clicked));
update_settings();
@@ -1804,11 +1794,11 @@ ScriptTextEditor::ScriptTextEditor() {
code_editor->get_text_edit()->set_select_identifiers_on_hover(true);
code_editor->get_text_edit()->set_context_menu_enabled(false);
- code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ code_editor->get_text_edit()->connect("gui_input", callable_mp(this, &ScriptTextEditor::_text_edit_gui_input));
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_edit_option");
+ context_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
context_menu->set_hide_on_window_lose_focus(true);
color_panel = memnew(PopupPanel);
@@ -1816,7 +1806,7 @@ ScriptTextEditor::ScriptTextEditor() {
color_picker = memnew(ColorPicker);
color_picker->set_deferred_mode(true);
color_panel->add_child(color_picker);
- color_picker->connect("color_changed", this, "_color_changed");
+ color_picker->connect("color_changed", callable_mp(this, &ScriptTextEditor::_color_changed));
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
@@ -1857,7 +1847,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
- edit_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_separator();
PopupMenu *convert_case = memnew(PopupMenu);
@@ -1867,7 +1857,7 @@ ScriptTextEditor::ScriptTextEditor() {
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KEY_MASK_SHIFT | KEY_F4), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KEY_MASK_SHIFT | KEY_F5), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", this, "_edit_option");
+ convert_case->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
highlighters[TTR("Standard")] = NULL;
highlighter_menu = memnew(PopupMenu);
@@ -1875,7 +1865,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->get_popup()->add_child(highlighter_menu);
edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
highlighter_menu->add_radio_check_item(TTR("Standard"));
- highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter");
+ highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
search_menu = memnew(MenuButton);
edit_hb->add_child(search_menu);
@@ -1891,7 +1881,7 @@ ScriptTextEditor::ScriptTextEditor() {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
search_menu->get_popup()->add_separator();
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
- search_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_hb->add_child(edit_menu);
@@ -1899,7 +1889,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_hb->add_child(goto_menu);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
@@ -1910,20 +1900,20 @@ ScriptTextEditor::ScriptTextEditor() {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect("about_to_show", callable_mp(this, &ScriptTextEditor::_update_bookmark_list));
+ bookmarks_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_bookmark_item_pressed));
breakpoints_menu = memnew(PopupMenu);
breakpoints_menu->set_name("Breakpoints");
goto_menu->get_popup()->add_child(breakpoints_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "Breakpoints");
_update_breakpoint_list();
- breakpoints_menu->connect("about_to_show", this, "_update_breakpoint_list");
- breakpoints_menu->connect("index_pressed", this, "_breakpoint_item_pressed");
+ breakpoints_menu->connect("about_to_show", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list));
+ breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed));
quick_open = memnew(ScriptEditorQuickOpen);
add_child(quick_open);
- quick_open->connect("goto_line", this, "_goto_line");
+ quick_open->connect("goto_line", callable_mp(this, &ScriptTextEditor::_goto_line));
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 359f0b0019..e23160d029 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -220,7 +220,7 @@ public:
virtual void reload(bool p_soft);
virtual void get_breakpoints(List<int> *p_breakpoints);
- virtual void add_callback(const String &p_function, PoolStringArray p_args);
+ virtual void add_callback(const String &p_function, PackedStringArray p_args);
virtual void update_settings();
virtual bool show_members_overview();
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index a19f0b4975..01b1e21153 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -382,24 +382,15 @@ void ShaderEditor::_editor_settings_changed() {
shader_editor->get_text_edit()->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/navigation/v_scroll_speed"));
shader_editor->get_text_edit()->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/navigation/show_minimap"));
shader_editor->get_text_edit()->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/navigation/minimap_width") * EDSCALE);
- shader_editor->get_text_edit()->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guideline"));
- shader_editor->get_text_edit()->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_column"));
+ shader_editor->get_text_edit()->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines"));
+ shader_editor->get_text_edit()->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
+ shader_editor->get_text_edit()->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
shader_editor->get_text_edit()->set_breakpoint_gutter_enabled(false);
}
void ShaderEditor::_bind_methods() {
- ClassDB::bind_method("_reload_shader_from_disk", &ShaderEditor::_reload_shader_from_disk);
- ClassDB::bind_method("_editor_settings_changed", &ShaderEditor::_editor_settings_changed);
- ClassDB::bind_method("_text_edit_gui_input", &ShaderEditor::_text_edit_gui_input);
-
- ClassDB::bind_method("_update_bookmark_list", &ShaderEditor::_update_bookmark_list);
- ClassDB::bind_method("_bookmark_item_pressed", &ShaderEditor::_bookmark_item_pressed);
-
- ClassDB::bind_method("_menu_option", &ShaderEditor::_menu_option);
ClassDB::bind_method("_params_changed", &ShaderEditor::_params_changed);
- ClassDB::bind_method("apply_shaders", &ShaderEditor::apply_shaders);
- ClassDB::bind_method("save_external_data", &ShaderEditor::save_external_data);
}
void ShaderEditor::ensure_select_current() {
@@ -531,7 +522,7 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_MENU) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_MENU) {
TextEdit *tx = shader_editor->get_text_edit();
_make_context_menu(tx->is_selection_active(), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->_get_cursor_pixel_pos()));
context_menu->grab_focus();
@@ -607,8 +598,8 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
shader_editor->add_constant_override("separation", 0);
shader_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- shader_editor->connect("script_changed", this, "apply_shaders");
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
+ shader_editor->connect("script_changed", callable_mp(this, &ShaderEditor::apply_shaders));
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ShaderEditor::_editor_settings_changed));
shader_editor->get_text_edit()->set_callhint_settings(
EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"),
@@ -616,13 +607,13 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
shader_editor->get_text_edit()->set_select_identifiers_on_hover(true);
shader_editor->get_text_edit()->set_context_menu_enabled(false);
- shader_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ shader_editor->get_text_edit()->connect("gui_input", callable_mp(this, &ShaderEditor::_text_edit_gui_input));
shader_editor->update_editor_settings();
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_menu_option");
+ context_menu->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
context_menu->set_hide_on_window_lose_focus(true);
VBoxContainer *main_container = memnew(VBoxContainer);
@@ -650,7 +641,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
- edit_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
search_menu = memnew(MenuButton);
search_menu->set_text(TTR("Search"));
@@ -660,12 +651,12 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
- search_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
MenuButton *goto_menu = memnew(MenuButton);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
@@ -675,14 +666,14 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect("about_to_show", callable_mp(this, &ShaderEditor::_update_bookmark_list));
+ bookmarks_menu->connect("index_pressed", callable_mp(this, &ShaderEditor::_bookmark_item_pressed));
help_menu = memnew(MenuButton);
help_menu->set_text(TTR("Help"));
help_menu->set_switch_on_hover(true);
help_menu->get_popup()->add_icon_item(p_node->get_gui_base()->get_icon("Instance", "EditorIcons"), TTR("Online Docs"), HELP_DOCS);
- help_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ help_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
add_child(main_container);
main_container->add_child(hbc);
@@ -705,11 +696,11 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
dl->set_text(TTR("This shader has been modified on on disk.\nWhat action should be taken?"));
vbc->add_child(dl);
- disk_changed->connect("confirmed", this, "_reload_shader_from_disk");
+ disk_changed->connect("confirmed", callable_mp(this, &ShaderEditor::_reload_shader_from_disk));
disk_changed->get_ok()->set_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !OS::get_singleton()->get_swap_ok_cancel(), "resave");
- disk_changed->connect("custom_action", this, "save_external_data");
+ disk_changed->connect("custom_action", callable_mp(this, &ShaderEditor::save_external_data));
add_child(disk_changed);
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index dbe64f202d..0b77b987bf 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -92,8 +92,6 @@ void Skeleton2DEditor::_menu_option(int p_option) {
}
void Skeleton2DEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option", &Skeleton2DEditor::_menu_option);
}
Skeleton2DEditor::Skeleton2DEditor() {
@@ -110,7 +108,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
options->get_popup()->add_item(TTR("Set Bones to Rest Pose"), MENU_OPTION_SET_REST);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton2DEditor::_menu_option));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
diff --git a/editor/plugins/skeleton_editor_plugin.cpp b/editor/plugins/skeleton_editor_plugin.cpp
index 9101c64eab..07bd6a0e41 100644
--- a/editor/plugins/skeleton_editor_plugin.cpp
+++ b/editor/plugins/skeleton_editor_plugin.cpp
@@ -137,7 +137,7 @@ void SkeletonEditor::edit(Skeleton *p_node) {
void SkeletonEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", callable_mp(this, &SkeletonEditor::_node_removed));
}
}
@@ -150,8 +150,6 @@ void SkeletonEditor::_node_removed(Node *p_node) {
}
void SkeletonEditor::_bind_methods() {
- ClassDB::bind_method("_on_click_option", &SkeletonEditor::_on_click_option);
- ClassDB::bind_method("_node_removed", &SkeletonEditor::_node_removed);
}
SkeletonEditor::SkeletonEditor() {
@@ -164,7 +162,7 @@ SkeletonEditor::SkeletonEditor() {
options->get_popup()->add_item(TTR("Create physical skeleton"), MENU_OPTION_CREATE_PHYSICAL_SKELETON);
- options->get_popup()->connect("id_pressed", this, "_on_click_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &SkeletonEditor::_on_click_option));
options->hide();
}
diff --git a/editor/plugins/skeleton_ik_editor_plugin.cpp b/editor/plugins/skeleton_ik_editor_plugin.cpp
index eb6ad9498d..b031bd71d3 100644
--- a/editor/plugins/skeleton_ik_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_editor_plugin.cpp
@@ -81,8 +81,6 @@ void SkeletonIKEditorPlugin::make_visible(bool p_visible) {
}
void SkeletonIKEditorPlugin::_bind_methods() {
-
- ClassDB::bind_method("_play", &SkeletonIKEditorPlugin::_play);
}
SkeletonIKEditorPlugin::SkeletonIKEditorPlugin(EditorNode *p_node) {
@@ -93,7 +91,7 @@ SkeletonIKEditorPlugin::SkeletonIKEditorPlugin(EditorNode *p_node) {
play_btn->set_text(TTR("Play IK"));
play_btn->set_toggle_mode(true);
play_btn->hide();
- play_btn->connect("pressed", this, "_play");
+ play_btn->connect("pressed", callable_mp(this, &SkeletonIKEditorPlugin::_play));
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, play_btn);
skeleton_ik = NULL;
}
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index e916f6f028..e53ebadbf9 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -36,12 +36,12 @@
#include "core/print_string.h"
#include "core/project_settings.h"
#include "core/sort_array.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "editor/script_editor_debugger.h"
#include "editor/spatial_editor_gizmos.h"
#include "scene/3d/camera.h"
#include "scene/3d/collision_shape.h"
@@ -76,6 +76,176 @@
#define MIN_FOV 0.01
#define MAX_FOV 179
+void ViewportRotationControl::_notification(int p_what) {
+
+ if (p_what == NOTIFICATION_ENTER_TREE) {
+ axis_menu_options.clear();
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_RIGHT);
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_TOP);
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_FRONT);
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_LEFT);
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_BOTTOM);
+ axis_menu_options.push_back(SpatialEditorViewport::VIEW_REAR);
+
+ axis_colors.clear();
+ axis_colors.push_back(get_color("axis_x_color", "Editor"));
+ axis_colors.push_back(get_color("axis_y_color", "Editor"));
+ axis_colors.push_back(get_color("axis_z_color", "Editor"));
+ update();
+
+ if (!is_connected("mouse_exited", callable_mp(this, &ViewportRotationControl::_on_mouse_exited))) {
+ connect("mouse_exited", callable_mp(this, &ViewportRotationControl::_on_mouse_exited));
+ }
+ }
+
+ if (p_what == NOTIFICATION_DRAW && viewport != nullptr) {
+ _draw();
+ }
+}
+
+void ViewportRotationControl::_draw() {
+ Vector2i center = get_size() / 2.0;
+ float radius = get_size().x / 2.0;
+
+ if (focused_axis > -2 || orbiting) {
+ draw_circle(center, radius, Color(0.5, 0.5, 0.5, 0.25));
+ }
+
+ Vector<Axis2D> axis_to_draw;
+ _get_sorted_axis(axis_to_draw);
+ for (int i = 0; i < axis_to_draw.size(); ++i) {
+ _draw_axis(axis_to_draw[i]);
+ }
+}
+
+void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
+ bool focused = focused_axis == p_axis.axis;
+ bool positive = p_axis.axis < 3;
+ bool front = (Math::abs(p_axis.z_axis) <= 0.001 && positive) || p_axis.z_axis > 0.001;
+ int direction = p_axis.axis % 3;
+
+ Color axis_color = axis_colors[direction];
+
+ if (!front) {
+ axis_color = axis_color.darkened(0.4);
+ }
+ Color c = focused ? Color(0.9, 0.9, 0.9) : axis_color;
+
+ if (positive) {
+ Vector2i center = get_size() / 2.0;
+ draw_line(center, p_axis.screen_point, c, 1.5 * EDSCALE);
+ }
+
+ if (front) {
+ String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z");
+ draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS, c);
+ draw_char(get_font("rotation_control", "EditorFonts"), p_axis.screen_point + Vector2i(-4, 5) * EDSCALE, axis_name, "", Color(0.3, 0.3, 0.3));
+ } else {
+ draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS * (0.55 + (0.2 * (1.0 + p_axis.z_axis))), c);
+ }
+}
+
+void ViewportRotationControl::_get_sorted_axis(Vector<Axis2D> &r_axis) {
+ Vector2i center = get_size() / 2.0;
+ float radius = get_size().x / 2.0;
+
+ float axis_radius = radius - AXIS_CIRCLE_RADIUS - 2.0 * EDSCALE;
+ Basis camera_basis = viewport->to_camera_transform(viewport->cursor).get_basis().inverse();
+
+ for (int i = 0; i < 3; ++i) {
+ Vector3 axis_3d = camera_basis.get_axis(i);
+ Vector2i axis_vector = Vector2(axis_3d.x, -axis_3d.y) * axis_radius;
+
+ if (Math::abs(axis_3d.z) < 1.0) {
+ Axis2D pos_axis;
+ pos_axis.axis = i;
+ pos_axis.screen_point = center + axis_vector;
+ pos_axis.z_axis = axis_3d.z;
+ r_axis.push_back(pos_axis);
+
+ Axis2D neg_axis;
+ neg_axis.axis = i + 3;
+ neg_axis.screen_point = center - axis_vector;
+ neg_axis.z_axis = -axis_3d.z;
+ r_axis.push_back(neg_axis);
+ } else {
+ // Special case when the camera is aligned with one axis
+ Axis2D axis;
+ axis.axis = i + (axis_3d.z < 0 ? 0 : 3);
+ axis.screen_point = center;
+ axis.z_axis = 1.0;
+ r_axis.push_back(axis);
+ }
+ }
+
+ r_axis.sort_custom<Axis2DCompare>();
+}
+
+void ViewportRotationControl::_gui_input(Ref<InputEvent> p_event) {
+ const Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT) {
+ Vector2 pos = mb->get_position();
+ if (mb->is_pressed()) {
+ if (pos.distance_to(get_size() / 2.0) < get_size().x / 2.0) {
+ orbiting = true;
+ }
+ } else {
+ if (focused_axis > -1) {
+ viewport->_menu_option(axis_menu_options[focused_axis]);
+ _update_focus();
+ }
+ orbiting = false;
+ }
+ }
+
+ const Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid()) {
+ if (orbiting) {
+ viewport->_nav_orbit(mm, viewport->_get_warped_mouse_motion(mm));
+ focused_axis = -1;
+ } else {
+ _update_focus();
+ }
+ }
+}
+
+void ViewportRotationControl::_update_focus() {
+ int original_focus = focused_axis;
+ focused_axis = -2;
+ Vector2 mouse_pos = get_local_mouse_position();
+
+ if (mouse_pos.distance_to(get_size() / 2.0) < get_size().x / 2.0) {
+ focused_axis = -1;
+ }
+
+ Vector<Axis2D> axes;
+ _get_sorted_axis(axes);
+
+ for (int i = 0; i < axes.size(); i++) {
+ const Axis2D &axis = axes[i];
+ if (mouse_pos.distance_to(axis.screen_point) < AXIS_CIRCLE_RADIUS) {
+ focused_axis = axis.axis;
+ }
+ }
+
+ if (focused_axis != original_focus) {
+ update();
+ }
+}
+
+void ViewportRotationControl::_on_mouse_exited() {
+ focused_axis = -2;
+ update();
+}
+
+void ViewportRotationControl::set_viewport(SpatialEditorViewport *p_viewport) {
+ viewport = p_viewport;
+}
+
+void ViewportRotationControl::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_gui_input"), &ViewportRotationControl::_gui_input);
+}
+
void SpatialEditorViewport::_update_camera(float p_interp_delta) {
bool is_orthogonal = camera->get_projection() == Camera::PROJECTION_ORTHOGONAL;
@@ -104,6 +274,14 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) {
camera_cursor.x_rot = Math::lerp(old_camera_cursor.x_rot, cursor.x_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
camera_cursor.y_rot = Math::lerp(old_camera_cursor.y_rot, cursor.y_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
+ if (Math::abs(camera_cursor.x_rot - cursor.x_rot) < 0.1) {
+ camera_cursor.x_rot = cursor.x_rot;
+ }
+
+ if (Math::abs(camera_cursor.y_rot - cursor.y_rot) < 0.1) {
+ camera_cursor.y_rot = cursor.y_rot;
+ }
+
Vector3 forward = to_camera_transform(camera_cursor).basis.xform(Vector3(0, 0, -1));
camera_cursor.pos = camera_cursor.eye_pos + forward * camera_cursor.distance;
@@ -131,6 +309,14 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) {
camera_cursor.x_rot = Math::lerp(old_camera_cursor.x_rot, cursor.x_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
camera_cursor.y_rot = Math::lerp(old_camera_cursor.y_rot, cursor.y_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
+ if (Math::abs(camera_cursor.x_rot - cursor.x_rot) < 0.1) {
+ camera_cursor.x_rot = cursor.x_rot;
+ }
+
+ if (Math::abs(camera_cursor.y_rot - cursor.y_rot) < 0.1) {
+ camera_cursor.y_rot = cursor.y_rot;
+ }
+
camera_cursor.pos = old_camera_cursor.pos.linear_interpolate(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia)));
camera_cursor.distance = Math::lerp(old_camera_cursor.distance, cursor.distance, MIN(1.f, p_interp_delta * (1 / zoom_inertia)));
}
@@ -157,12 +343,16 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) {
camera->set_global_transform(to_camera_transform(camera_cursor));
- if (orthogonal)
- camera->set_orthogonal(2 * cursor.distance, 0.1, 8192);
- else
+ if (orthogonal) {
+ float half_fov = Math::deg2rad(get_fov()) / 2.0;
+ float height = 2.0 * cursor.distance * Math::tan(half_fov);
+ camera->set_orthogonal(height, 0.1, 8192);
+ } else {
camera->set_perspective(get_fov(), get_znear(), get_zfar());
+ }
update_transform_gizmo_view();
+ rotation_control->update();
}
}
@@ -548,6 +738,10 @@ void SpatialEditorViewport::_update_name() {
String view_mode = orthogonal ? TTR("Orthogonal") : TTR("Perspective");
+ if (auto_orthogonal) {
+ view_mode += " [auto]";
+ }
+
if (name != "")
view_menu->set_text(name + " " + view_mode);
else
@@ -1873,11 +2067,11 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (!orthogonal && ED_IS_SHORTCUT("spatial_editor/freelook_toggle", p_event)) {
set_freelook_active(!is_freelook_active());
- } else if (k->get_scancode() == KEY_ESCAPE) {
+ } else if (k->get_keycode() == KEY_ESCAPE) {
set_freelook_active(false);
}
- if (k->get_scancode() == KEY_SPACE) {
+ if (k->get_keycode() == KEY_SPACE) {
if (!k->is_pressed()) emit_signal("toggle_maximize_view", this);
}
}
@@ -1938,6 +2132,10 @@ void SpatialEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, con
return;
}
+ if (orthogonal && auto_orthogonal) {
+ _menu_option(VIEW_PERSPECTIVE);
+ }
+
real_t degrees_per_pixel = EditorSettings::get_singleton()->get("editors/3d/navigation_feel/orbit_sensitivity");
real_t radians_per_pixel = Math::deg2rad(degrees_per_pixel);
bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
@@ -1963,6 +2161,10 @@ void SpatialEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, cons
return;
}
+ if (orthogonal && auto_orthogonal) {
+ _menu_option(VIEW_PERSPECTIVE);
+ }
+
real_t degrees_per_pixel = EditorSettings::get_singleton()->get("editors/3d/navigation_feel/orbit_sensitivity");
real_t radians_per_pixel = Math::deg2rad(degrees_per_pixel);
bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
@@ -2074,8 +2276,8 @@ static bool is_shortcut_pressed(const String &p_path) {
return false;
}
const Input &input = *Input::get_singleton();
- int scancode = k->get_scancode();
- return input.is_key_pressed(scancode);
+ int keycode = k->get_keycode();
+ return input.is_key_pressed(keycode);
}
void SpatialEditorViewport::_update_freelook(real_t delta) {
@@ -2147,11 +2349,14 @@ void SpatialEditorViewport::_notification(int p_what) {
set_process(visible);
if (visible) {
+ orthogonal = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL));
+ _update_name();
_update_camera(0);
} else {
set_freelook_active(false);
}
call_deferred("update_transform_gizmo_view");
+ rotation_control->set_visible(EditorSettings::get_singleton()->get("editors/3d/navigation/show_viewport_rotation_gizmo"));
}
if (p_what == NOTIFICATION_RESIZED) {
@@ -2185,10 +2390,10 @@ void SpatialEditorViewport::_notification(int p_what) {
if (cam != NULL && cam != previewing) {
//then switch the viewport's camera to the scene's viewport camera
if (previewing != NULL) {
- previewing->disconnect("tree_exited", this, "_preview_exited_scene");
+ previewing->disconnect("tree_exited", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
}
previewing = cam;
- previewing->connect("tree_exited", this, "_preview_exited_scene");
+ previewing->connect("tree_exited", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), cam->get_camera());
surface->update();
}
@@ -2329,12 +2534,12 @@ void SpatialEditorViewport::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- surface->connect("draw", this, "_draw");
- surface->connect("gui_input", this, "_sinput");
- surface->connect("mouse_entered", this, "_surface_mouse_enter");
- surface->connect("mouse_exited", this, "_surface_mouse_exit");
- surface->connect("focus_entered", this, "_surface_focus_enter");
- surface->connect("focus_exited", this, "_surface_focus_exit");
+ surface->connect("draw", callable_mp(this, &SpatialEditorViewport::_draw));
+ surface->connect("gui_input", callable_mp(this, &SpatialEditorViewport::_sinput));
+ surface->connect("mouse_entered", callable_mp(this, &SpatialEditorViewport::_surface_mouse_enter));
+ surface->connect("mouse_exited", callable_mp(this, &SpatialEditorViewport::_surface_mouse_exit));
+ surface->connect("focus_entered", callable_mp(this, &SpatialEditorViewport::_surface_focus_enter));
+ surface->connect("focus_exited", callable_mp(this, &SpatialEditorViewport::_surface_focus_exit));
_init_gizmo_instance(index);
}
@@ -2524,6 +2729,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.x_rot = Math_PI / 2.0;
set_message(TTR("Top View."), 2);
name = TTR("Top");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2533,6 +2739,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.x_rot = -Math_PI / 2.0;
set_message(TTR("Bottom View."), 2);
name = TTR("Bottom");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2542,6 +2749,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot = Math_PI / 2.0;
set_message(TTR("Left View."), 2);
name = TTR("Left");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2551,6 +2759,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot = -Math_PI / 2.0;
set_message(TTR("Right View."), 2);
name = TTR("Right");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2560,6 +2769,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot = 0;
set_message(TTR("Front View."), 2);
name = TTR("Front");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2569,6 +2779,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot = Math_PI;
set_message(TTR("Rear View."), 2);
name = TTR("Rear");
+ _set_auto_orthogonal();
_update_name();
} break;
@@ -2666,6 +2877,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), true);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL), false);
orthogonal = false;
+ auto_orthogonal = false;
call_deferred("update_transform_gizmo_view");
_update_name();
@@ -2675,10 +2887,22 @@ void SpatialEditorViewport::_menu_option(int p_option) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), false);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL), true);
orthogonal = true;
+ auto_orthogonal = false;
call_deferred("update_transform_gizmo_view");
_update_name();
} break;
+ case VIEW_AUTO_ORTHOGONAL: {
+
+ int idx = view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL);
+ bool current = view_menu->get_popup()->is_item_checked(idx);
+ current = !current;
+ view_menu->get_popup()->set_item_checked(idx, current);
+ if (auto_orthogonal) {
+ auto_orthogonal = false;
+ _update_name();
+ }
+ } break;
case VIEW_LOCK_ROTATION: {
int idx = view_menu->get_popup()->get_item_index(VIEW_LOCK_ROTATION);
@@ -2833,12 +3057,19 @@ void SpatialEditorViewport::_menu_option(int p_option) {
}
}
+void SpatialEditorViewport::_set_auto_orthogonal() {
+ if (!orthogonal && view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL))) {
+ _menu_option(VIEW_ORTHOGONAL);
+ auto_orthogonal = true;
+ }
+}
+
void SpatialEditorViewport::_preview_exited_scene() {
- preview_camera->disconnect("toggled", this, "_toggle_camera_preview");
+ preview_camera->disconnect("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview));
preview_camera->set_pressed(false);
_toggle_camera_preview(false);
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview));
view_menu->show();
}
@@ -2901,7 +3132,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
if (!p_activate) {
- previewing->disconnect("tree_exiting", this, "_preview_exited_scene");
+ previewing->disconnect("tree_exiting", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
previewing = NULL;
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
if (!preview)
@@ -2912,7 +3143,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
} else {
previewing = preview;
- previewing->connect("tree_exiting", this, "_preview_exited_scene");
+ previewing->connect("tree_exiting", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace
view_menu->set_disabled(true);
surface->update();
@@ -2923,7 +3154,7 @@ void SpatialEditorViewport::_toggle_cinema_preview(bool p_activate) {
previewing_cinema = p_activate;
if (!previewing_cinema) {
if (previewing != NULL)
- previewing->disconnect("tree_exited", this, "_preview_exited_scene");
+ previewing->disconnect("tree_exited", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
previewing = NULL;
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), camera->get_camera()); //restore
@@ -3041,6 +3272,18 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
else
_menu_option(VIEW_PERSPECTIVE);
}
+ if (p_state.has("view_name")) {
+ name = p_state["view_name"];
+ _update_name();
+ }
+ if (p_state.has("auto_orthogonal")) {
+ auto_orthogonal = p_state["auto_orthogonal"];
+ _update_name();
+ }
+ if (p_state.has("auto_orthogonal_enabled")) {
+ bool enabled = p_state["auto_orthogonal_enabled"];
+ view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL), enabled);
+ }
if (p_state.has("display_mode")) {
int display = p_state["display_mode"];
@@ -3108,14 +3351,14 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
view_menu->get_popup()->set_item_checked(idx, previewing_cinema);
}
- if (preview_camera->is_connected("toggled", this, "_toggle_camera_preview")) {
- preview_camera->disconnect("toggled", this, "_toggle_camera_preview");
+ if (preview_camera->is_connected("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview))) {
+ preview_camera->disconnect("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview));
}
if (p_state.has("previewing")) {
Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]);
if (Object::cast_to<Camera>(pv)) {
previewing = Object::cast_to<Camera>(pv);
- previewing->connect("tree_exiting", this, "_preview_exited_scene");
+ previewing->connect("tree_exiting", callable_mp(this, &SpatialEditorViewport::_preview_exited_scene));
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace
view_menu->set_disabled(true);
surface->update();
@@ -3123,7 +3366,7 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
preview_camera->show();
}
}
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview));
}
Dictionary SpatialEditorViewport::get_state() const {
@@ -3135,6 +3378,9 @@ Dictionary SpatialEditorViewport::get_state() const {
d["distance"] = cursor.distance;
d["use_environment"] = camera->get_environment().is_valid();
d["use_orthogonal"] = camera->get_projection() == Camera::PROJECTION_ORTHOGONAL;
+ d["view_name"] = name;
+ d["auto_orthogonal"] = auto_orthogonal;
+ d["auto_orthogonal_enabled"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL));
if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL)))
d["display_mode"] = VIEW_DISPLAY_NORMAL;
else if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME)))
@@ -3160,19 +3406,7 @@ Dictionary SpatialEditorViewport::get_state() const {
void SpatialEditorViewport::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_draw"), &SpatialEditorViewport::_draw);
-
- ClassDB::bind_method(D_METHOD("_surface_mouse_enter"), &SpatialEditorViewport::_surface_mouse_enter);
- ClassDB::bind_method(D_METHOD("_surface_mouse_exit"), &SpatialEditorViewport::_surface_mouse_exit);
- ClassDB::bind_method(D_METHOD("_surface_focus_enter"), &SpatialEditorViewport::_surface_focus_enter);
- ClassDB::bind_method(D_METHOD("_surface_focus_exit"), &SpatialEditorViewport::_surface_focus_exit);
- ClassDB::bind_method(D_METHOD("_sinput"), &SpatialEditorViewport::_sinput);
- ClassDB::bind_method(D_METHOD("_menu_option"), &SpatialEditorViewport::_menu_option);
- ClassDB::bind_method(D_METHOD("_toggle_camera_preview"), &SpatialEditorViewport::_toggle_camera_preview);
- ClassDB::bind_method(D_METHOD("_preview_exited_scene"), &SpatialEditorViewport::_preview_exited_scene);
- ClassDB::bind_method(D_METHOD("update_transform_gizmo_view"), &SpatialEditorViewport::update_transform_gizmo_view);
- ClassDB::bind_method(D_METHOD("_selection_result_pressed"), &SpatialEditorViewport::_selection_result_pressed);
- ClassDB::bind_method(D_METHOD("_selection_menu_hide"), &SpatialEditorViewport::_selection_menu_hide);
+ ClassDB::bind_method(D_METHOD("update_transform_gizmo_view"), &SpatialEditorViewport::update_transform_gizmo_view); // Used by call_deferred.
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SpatialEditorViewport::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &SpatialEditorViewport::drop_data_fw);
@@ -3183,6 +3417,7 @@ void SpatialEditorViewport::_bind_methods() {
void SpatialEditorViewport::reset() {
orthogonal = false;
+ auto_orthogonal = false;
lock_rotation = false;
message_time = 0;
message = "";
@@ -3419,9 +3654,9 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
String new_name = parent->validate_child_name(instanced_scene);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
Transform global_transform;
Spatial *parent_spatial = Object::cast_to<Spatial>(parent);
@@ -3584,6 +3819,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
clicked_includes_current = false;
orthogonal = false;
+ auto_orthogonal = false;
lock_rotation = false;
message_time = 0;
zoom_indicator_delay = 0.0;
@@ -3636,6 +3872,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu->get_popup()->add_radio_check_item(TTR("Perspective") + " (" + ED_GET_SHORTCUT("spatial_editor/switch_perspective_orthogonal")->get_as_text() + ")", VIEW_PERSPECTIVE);
view_menu->get_popup()->add_radio_check_item(TTR("Orthogonal") + " (" + ED_GET_SHORTCUT("spatial_editor/switch_perspective_orthogonal")->get_as_text() + ")", VIEW_ORTHOGONAL);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), true);
+ view_menu->get_popup()->add_check_item(TTR("Auto Orthogonal Enabled"), VIEW_AUTO_ORTHOGONAL);
+ view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL), true);
view_menu->get_popup()->add_separator();
view_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_lock_rotation", TTR("Lock View Rotation")), VIEW_LOCK_ROTATION);
view_menu->get_popup()->add_separator();
@@ -3682,8 +3920,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
- view_menu->get_popup()->connect("id_pressed", this, "_menu_option");
- display_submenu->connect("id_pressed", this, "_menu_option");
+ view_menu->get_popup()->connect("id_pressed", callable_mp(this, &SpatialEditorViewport::_menu_option));
+ display_submenu->connect("id_pressed", callable_mp(this, &SpatialEditorViewport::_menu_option));
view_menu->set_disable_shortcuts(true);
if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
@@ -3718,7 +3956,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
vbox->add_child(preview_camera);
preview_camera->set_h_size_flags(0);
preview_camera->hide();
- preview_camera->connect("toggled", this, "_toggle_camera_preview");
+ preview_camera->connect("toggled", callable_mp(this, &SpatialEditorViewport::_toggle_camera_preview));
previewing = NULL;
gizmo_scale = 1.0;
@@ -3763,6 +4001,28 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
locked_label->set_text(TTR("View Rotation Locked"));
locked_label->hide();
+ top_right_vbox = memnew(VBoxContainer);
+ top_right_vbox->set_anchors_and_margins_preset(PRESET_TOP_RIGHT, PRESET_MODE_MINSIZE, 2.0 * EDSCALE);
+ top_right_vbox->set_h_grow_direction(GROW_DIRECTION_BEGIN);
+
+ rotation_control = memnew(ViewportRotationControl);
+ rotation_control->set_custom_minimum_size(Size2(80, 80) * EDSCALE);
+ rotation_control->set_h_size_flags(SIZE_SHRINK_END);
+ rotation_control->set_viewport(this);
+ top_right_vbox->add_child(rotation_control);
+
+ fps_label = memnew(Label);
+ fps_label->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE);
+ fps_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
+ fps_label->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -10 * EDSCALE);
+ fps_label->set_h_grow_direction(GROW_DIRECTION_BEGIN);
+ fps_label->set_tooltip(TTR("Note: The FPS value displayed is the editor's framerate.\nIt cannot be used as a reliable indication of in-game performance."));
+ fps_label->set_mouse_filter(MOUSE_FILTER_PASS); // Otherwise tooltip doesn't show.
+ top_right_vbox->add_child(fps_label);
+ fps_label->hide();
+
+ surface->add_child(top_right_vbox);
+
accept = NULL;
freelook_active = false;
@@ -3771,8 +4031,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
- selection_menu->connect("id_pressed", this, "_selection_result_pressed");
- selection_menu->connect("popup_hide", this, "_selection_menu_hide");
+ selection_menu->connect("id_pressed", callable_mp(this, &SpatialEditorViewport::_selection_result_pressed));
+ selection_menu->connect("popup_hide", callable_mp(this, &SpatialEditorViewport::_selection_menu_hide));
if (p_index == 0) {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUDIO_LISTENER), true);
@@ -3782,7 +4042,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
name = "";
_update_name();
- EditorSettings::get_singleton()->connect("settings_changed", this, "update_transform_gizmo_view");
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &SpatialEditorViewport::update_transform_gizmo_view));
}
//////////////////////////////////////////////////////////////
@@ -4495,7 +4755,7 @@ void SpatialEditor::_menu_item_toggled(bool pressed, int p_option) {
} break;
case MENU_TOOL_OVERRIDE_CAMERA: {
- ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *const debugger = EditorDebuggerNode::get_singleton();
if (pressed) {
using Override = ScriptEditorDebugger::CameraOverride;
@@ -4552,7 +4812,7 @@ void SpatialEditor::_update_camera_override_viewport(Object *p_viewport) {
if (!current_viewport)
return;
- ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *const debugger = EditorDebuggerNode::get_singleton();
camera_override_viewport_id = current_viewport->index;
if (debugger->get_camera_override() >= ScriptEditorDebugger::OVERRIDE_3D_1) {
@@ -5181,8 +5441,8 @@ void SpatialEditor::_update_gizmos_menu_theme() {
void SpatialEditor::_init_grid() {
- PoolVector<Color> grid_colors[3];
- PoolVector<Vector3> grid_points[3];
+ Vector<Color> grid_colors[3];
+ Vector<Vector3> grid_points[3];
Color primary_grid_color = EditorSettings::get_singleton()->get("editors/3d/primary_grid_color");
Color secondary_grid_color = EditorSettings::get_singleton()->get("editors/3d/secondary_grid_color");
@@ -5469,12 +5729,12 @@ void SpatialEditor::_notification(int p_what) {
_refresh_menu_icons();
- get_tree()->connect("node_removed", this, "_node_removed");
- EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect("node_changed", this, "_refresh_menu_icons");
- editor_selection->connect("selection_changed", this, "_refresh_menu_icons");
+ get_tree()->connect("node_removed", callable_mp(this, &SpatialEditor::_node_removed));
+ EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect("node_changed", callable_mp(this, &SpatialEditor::_refresh_menu_icons));
+ editor_selection->connect("selection_changed", callable_mp(this, &SpatialEditor::_refresh_menu_icons));
- editor->connect("stop_pressed", this, "_update_camera_override_button", make_binds(false));
- editor->connect("play_pressed", this, "_update_camera_override_button", make_binds(true));
+ editor->connect("stop_pressed", callable_mp(this, &SpatialEditor::_update_camera_override_button), make_binds(false));
+ editor->connect("play_pressed", callable_mp(this, &SpatialEditor::_update_camera_override_button), make_binds(true));
} else if (p_what == NOTIFICATION_ENTER_TREE) {
_register_all_gizmos();
@@ -5511,7 +5771,7 @@ void SpatialEditor::_notification(int p_what) {
_init_grid();
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->is_pressed()) {
- ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_pressed(false);
@@ -5651,17 +5911,8 @@ void SpatialEditor::_register_all_gizmos() {
void SpatialEditor::_bind_methods() {
ClassDB::bind_method("_unhandled_key_input", &SpatialEditor::_unhandled_key_input);
- ClassDB::bind_method("_node_removed", &SpatialEditor::_node_removed);
- ClassDB::bind_method("_menu_item_pressed", &SpatialEditor::_menu_item_pressed);
- ClassDB::bind_method("_menu_gizmo_toggled", &SpatialEditor::_menu_gizmo_toggled);
- ClassDB::bind_method("_menu_item_toggled", &SpatialEditor::_menu_item_toggled);
- ClassDB::bind_method("_xform_dialog_action", &SpatialEditor::_xform_dialog_action);
ClassDB::bind_method("_get_editor_data", &SpatialEditor::_get_editor_data);
ClassDB::bind_method("_request_gizmo", &SpatialEditor::_request_gizmo);
- ClassDB::bind_method("_toggle_maximize_view", &SpatialEditor::_toggle_maximize_view);
- ClassDB::bind_method("_refresh_menu_icons", &SpatialEditor::_refresh_menu_icons);
- ClassDB::bind_method("_update_camera_override_button", &SpatialEditor::_update_camera_override_button);
- ClassDB::bind_method("_update_camera_override_viewport", &SpatialEditor::_update_camera_override_viewport);
ADD_SIGNAL(MethodInfo("transform_key_request"));
ADD_SIGNAL(MethodInfo("item_lock_status_changed"));
@@ -5730,7 +5981,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SELECT]->set_flat(true);
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
button_binds.write[0] = MENU_TOOL_SELECT;
- tool_button[TOOL_MODE_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_SELECT]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), KEY_Q));
tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection"));
@@ -5741,7 +5992,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true);
tool_button[TOOL_MODE_MOVE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_MOVE;
- tool_button[TOOL_MODE_MOVE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), KEY_W));
tool_button[TOOL_MODE_ROTATE] = memnew(ToolButton);
@@ -5749,7 +6000,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true);
tool_button[TOOL_MODE_ROTATE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_ROTATE;
- tool_button[TOOL_MODE_ROTATE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), KEY_E));
tool_button[TOOL_MODE_SCALE] = memnew(ToolButton);
@@ -5757,7 +6008,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
tool_button[TOOL_MODE_SCALE]->set_flat(true);
button_binds.write[0] = MENU_TOOL_SCALE;
- tool_button[TOOL_MODE_SCALE]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_SCALE]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), KEY_R));
hbc_menu->add_child(memnew(VSeparator));
@@ -5767,31 +6018,31 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true);
tool_button[TOOL_MODE_LIST_SELECT]->set_flat(true);
button_binds.write[0] = MENU_TOOL_LIST_SELECT;
- tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
tool_button[TOOL_LOCK_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_LOCK_SELECTED]);
button_binds.write[0] = MENU_LOCK_SELECTED;
- tool_button[TOOL_LOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock the selected object in place (can't be moved)."));
tool_button[TOOL_UNLOCK_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
button_binds.write[0] = MENU_UNLOCK_SELECTED;
- tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock the selected object (can be moved)."));
tool_button[TOOL_GROUP_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_GROUP_SELECTED]);
button_binds.write[0] = MENU_GROUP_SELECTED;
- tool_button[TOOL_GROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable."));
tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton);
hbc_menu->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
button_binds.write[0] = MENU_UNGROUP_SELECTED;
- tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
+ tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed), button_binds);
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected."));
hbc_menu->add_child(memnew(VSeparator));
@@ -5801,7 +6052,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_flat(true);
button_binds.write[0] = MENU_TOOL_LOCAL_COORDS;
- tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", callable_mp(this, &SpatialEditor::_menu_item_toggled), button_binds);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), KEY_T));
tool_option_button[TOOL_OPT_USE_SNAP] = memnew(ToolButton);
@@ -5809,7 +6060,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_USE_SNAP]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_USE_SNAP]->set_flat(true);
button_binds.write[0] = MENU_TOOL_USE_SNAP;
- tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", callable_mp(this, &SpatialEditor::_menu_item_toggled), button_binds);
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), KEY_Y));
hbc_menu->add_child(memnew(VSeparator));
@@ -5820,7 +6071,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_flat(true);
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_disabled(true);
button_binds.write[0] = MENU_TOOL_OVERRIDE_CAMERA;
- tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect("toggled", this, "_menu_item_toggled", button_binds);
+ tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect("toggled", callable_mp(this, &SpatialEditor::_menu_item_toggled), button_binds);
_update_camera_override_button(false);
hbc_menu->add_child(memnew(VSeparator));
@@ -5857,7 +6108,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
- p->connect("id_pressed", this, "_menu_item_pressed");
+ p->connect("id_pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed));
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
@@ -5889,13 +6140,13 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
- p->connect("id_pressed", this, "_menu_item_pressed");
+ p->connect("id_pressed", callable_mp(this, &SpatialEditor::_menu_item_pressed));
gizmos_menu = memnew(PopupMenu);
p->add_child(gizmos_menu);
gizmos_menu->set_name("GizmosMenu");
gizmos_menu->set_hide_on_checkable_item_selection(false);
- gizmos_menu->connect("id_pressed", this, "_menu_gizmo_toggled");
+ gizmos_menu->connect("id_pressed", callable_mp(this, &SpatialEditor::_menu_gizmo_toggled));
/* REST OF MENU */
@@ -5912,8 +6163,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i] = memnew(SpatialEditorViewport(this, editor, i));
- viewports[i]->connect("toggle_maximize_view", this, "_toggle_maximize_view");
- viewports[i]->connect("clicked", this, "_update_camera_override_viewport");
+ viewports[i]->connect("toggle_maximize_view", callable_mp(this, &SpatialEditor::_toggle_maximize_view));
+ viewports[i]->connect("clicked", callable_mp(this, &SpatialEditor::_update_camera_override_viewport));
viewports[i]->assign_pending_data_pointers(preview_node, &preview_bounds, accept);
viewport_base->add_child(viewports[i]);
}
@@ -6028,7 +6279,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
xform_type->add_item(TTR("Post"));
xform_vbc->add_child(xform_type);
- xform_dialog->connect("confirmed", this, "_xform_dialog_action");
+ xform_dialog->connect("confirmed", callable_mp(this, &SpatialEditor::_xform_dialog_action));
scenario_debug = VisualServer::SCENARIO_DEBUG_DISABLED;
@@ -6040,7 +6291,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,1024,1"));
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.4);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
+ EDITOR_DEF("editors/3d/navigation/show_viewport_rotation_gizmo", true);
over_gizmo_handle = -1;
}
@@ -6182,7 +6434,7 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) {
editor->get_viewport()->add_child(spatial_editor);
spatial_editor->hide();
- spatial_editor->connect("transform_key_request", editor->get_inspector_dock(), "_transform_keyed");
+ spatial_editor->connect_compat("transform_key_request", editor->get_inspector_dock(), "_transform_keyed");
}
SpatialEditorPlugin::~SpatialEditorPlugin() {
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index a4d6b13389..8a10ef935c 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -33,6 +33,7 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+#include "editor/editor_scale.h"
#include "scene/3d/immediate_geometry.h"
#include "scene/3d/light.h"
#include "scene/3d/visual_instance.h"
@@ -41,6 +42,7 @@
class Camera;
class SpatialEditor;
class EditorSpatialGizmoPlugin;
+class SpatialEditorViewport;
class ViewportContainer;
class EditorSpatialGizmo : public SpatialGizmo {
@@ -138,10 +140,48 @@ public:
~EditorSpatialGizmo();
};
+class ViewportRotationControl : public Control {
+ GDCLASS(ViewportRotationControl, Control);
+
+ struct Axis2D {
+ Vector2i screen_point;
+ float z_axis = -99.0;
+ int axis = -1;
+ };
+
+ struct Axis2DCompare {
+ _FORCE_INLINE_ bool operator()(const Axis2D &l, const Axis2D &r) const {
+ return l.z_axis < r.z_axis;
+ }
+ };
+
+ SpatialEditorViewport *viewport = nullptr;
+ Vector<Color> axis_colors;
+ Vector<int> axis_menu_options;
+ bool orbiting = false;
+ int focused_axis = -2;
+
+ const float AXIS_CIRCLE_RADIUS = 8.0f * EDSCALE;
+
+protected:
+ static void _bind_methods();
+ void _notification(int p_what);
+ void _gui_input(Ref<InputEvent> p_event);
+ void _draw();
+ void _draw_axis(const Axis2D &p_axis);
+ void _get_sorted_axis(Vector<Axis2D> &r_axis);
+ void _update_focus();
+ void _on_mouse_exited();
+
+public:
+ void set_viewport(SpatialEditorViewport *p_viewport);
+};
+
class SpatialEditorViewport : public Control {
GDCLASS(SpatialEditorViewport, Control);
friend class SpatialEditor;
+ friend class ViewportRotationControl;
enum {
VIEW_TOP,
@@ -179,6 +219,7 @@ class SpatialEditorViewport : public Control {
VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER,
VIEW_LOCK_ROTATION,
VIEW_CINEMATIC_PREVIEW,
+ VIEW_AUTO_ORTHOGONAL,
VIEW_MAX
};
@@ -199,6 +240,7 @@ private:
int index;
String name;
void _menu_option(int p_option);
+ void _set_auto_orthogonal();
Spatial *preview_node;
AABB *preview_bounds;
Vector<String> selected_files;
@@ -223,6 +265,7 @@ private:
Camera *camera;
bool transforming;
bool orthogonal;
+ bool auto_orthogonal;
bool lock_rotation;
float gizmo_scale;
@@ -231,10 +274,13 @@ private:
TextureRect *crosshair;
Label *info_label;
- Label *fps_label;
Label *cinema_label;
Label *locked_label;
+ VBoxContainer *top_right_vbox;
+ ViewportRotationControl *rotation_control;
+ Label *fps_label;
+
struct _RayResult {
Spatial *item;
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index 2736bbfd3a..135807e88c 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -358,13 +358,13 @@ void SpriteEditor::_convert_to_polygon_2d_node() {
for (int i = 0; i < computed_outline_lines.size(); i++)
total_point_count += computed_outline_lines[i].size();
- PoolVector2Array polygon;
+ PackedVector2Array polygon;
polygon.resize(total_point_count);
- PoolVector2Array::Write polygon_write = polygon.write();
+ Vector2 *polygon_write = polygon.ptrw();
- PoolVector2Array uvs;
+ PackedVector2Array uvs;
uvs.resize(total_point_count);
- PoolVector2Array::Write uvs_write = uvs.write();
+ Vector2 *uvs_write = uvs.ptrw();
int current_point_index = 0;
@@ -376,9 +376,9 @@ void SpriteEditor::_convert_to_polygon_2d_node() {
Vector<Vector2> outline = computed_outline_lines[i];
Vector<Vector2> uv_outline = outline_lines[i];
- PoolIntArray pia;
+ PackedInt32Array pia;
pia.resize(outline.size());
- PoolIntArray::Write pia_write = pia.write();
+ int *pia_write = pia.ptrw();
for (int pi = 0; pi < outline.size(); pi++) {
polygon_write[current_point_index] = outline[pi];
@@ -442,9 +442,9 @@ void SpriteEditor::_create_light_occluder_2d_node() {
Ref<OccluderPolygon2D> polygon;
polygon.instance();
- PoolVector2Array a;
+ PackedVector2Array a;
a.resize(outline.size());
- PoolVector2Array::Write aw = a.write();
+ Vector2 *aw = a.ptrw();
for (int io = 0; io < outline.size(); io++) {
aw[io] = outline[io];
}
@@ -504,10 +504,6 @@ void SpriteEditor::_debug_uv_draw() {
void SpriteEditor::_bind_methods() {
- ClassDB::bind_method("_menu_option", &SpriteEditor::_menu_option);
- ClassDB::bind_method("_debug_uv_draw", &SpriteEditor::_debug_uv_draw);
- ClassDB::bind_method("_update_mesh_data", &SpriteEditor::_update_mesh_data);
- ClassDB::bind_method("_create_node", &SpriteEditor::_create_node);
ClassDB::bind_method("_add_as_sibling_or_child", &SpriteEditor::_add_as_sibling_or_child);
}
@@ -526,7 +522,7 @@ SpriteEditor::SpriteEditor() {
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &SpriteEditor::_menu_option));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
@@ -542,9 +538,9 @@ SpriteEditor::SpriteEditor() {
scroll->set_enable_v_scroll(true);
vb->add_margin_child(TTR("Preview:"), scroll, true);
debug_uv = memnew(Control);
- debug_uv->connect("draw", this, "_debug_uv_draw");
+ debug_uv->connect("draw", callable_mp(this, &SpriteEditor::_debug_uv_draw));
scroll->add_child(debug_uv);
- debug_uv_dialog->connect("confirmed", this, "_create_node");
+ debug_uv_dialog->connect("confirmed", callable_mp(this, &SpriteEditor::_create_node));
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_child(memnew(Label(TTR("Simplification: "))));
@@ -573,7 +569,7 @@ SpriteEditor::SpriteEditor() {
hb->add_spacer();
update_preview = memnew(Button);
update_preview->set_text(TTR("Update Preview"));
- update_preview->connect("pressed", this, "_update_mesh_data");
+ update_preview->connect("pressed", callable_mp(this, &SpriteEditor::_update_mesh_data));
hb->add_child(update_preview);
vb->add_margin_child(TTR("Settings:"), hb);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 2d756af213..5d615c7553 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -234,7 +234,7 @@ void SpriteFramesEditor::_notification(int p_what) {
_delete->set_icon(get_icon("Remove", "EditorIcons"));
new_anim->set_icon(get_icon("New", "EditorIcons"));
remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
splite_sheet_scroll->add_style_override("bg", get_stylebox("bg", "Tree"));
@@ -245,7 +245,7 @@ void SpriteFramesEditor::_notification(int p_what) {
}
}
-void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, int p_at_pos) {
+void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_at_pos) {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
@@ -852,7 +852,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
if (String(d["type"]) == "files") {
- PoolVector<String> files = d["files"];
+ Vector<String> files = d["files"];
_file_load_request(files, at_pos);
}
@@ -860,33 +860,10 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
void SpriteFramesEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_load_pressed"), &SpriteFramesEditor::_load_pressed);
- ClassDB::bind_method(D_METHOD("_empty_pressed"), &SpriteFramesEditor::_empty_pressed);
- ClassDB::bind_method(D_METHOD("_empty2_pressed"), &SpriteFramesEditor::_empty2_pressed);
- ClassDB::bind_method(D_METHOD("_delete_pressed"), &SpriteFramesEditor::_delete_pressed);
- ClassDB::bind_method(D_METHOD("_copy_pressed"), &SpriteFramesEditor::_copy_pressed);
- ClassDB::bind_method(D_METHOD("_paste_pressed"), &SpriteFramesEditor::_paste_pressed);
- ClassDB::bind_method(D_METHOD("_file_load_request", "files", "at_position"), &SpriteFramesEditor::_file_load_request, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_up_pressed"), &SpriteFramesEditor::_up_pressed);
- ClassDB::bind_method(D_METHOD("_down_pressed"), &SpriteFramesEditor::_down_pressed);
- ClassDB::bind_method(D_METHOD("_animation_select"), &SpriteFramesEditor::_animation_select);
- ClassDB::bind_method(D_METHOD("_animation_name_edited"), &SpriteFramesEditor::_animation_name_edited);
- ClassDB::bind_method(D_METHOD("_animation_add"), &SpriteFramesEditor::_animation_add);
- ClassDB::bind_method(D_METHOD("_animation_remove"), &SpriteFramesEditor::_animation_remove);
- ClassDB::bind_method(D_METHOD("_animation_remove_confirmed"), &SpriteFramesEditor::_animation_remove_confirmed);
- ClassDB::bind_method(D_METHOD("_animation_loop_changed"), &SpriteFramesEditor::_animation_loop_changed);
- ClassDB::bind_method(D_METHOD("_animation_fps_changed"), &SpriteFramesEditor::_animation_fps_changed);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
- ClassDB::bind_method(D_METHOD("_prepare_sprite_sheet"), &SpriteFramesEditor::_prepare_sprite_sheet);
- ClassDB::bind_method(D_METHOD("_open_sprite_sheet"), &SpriteFramesEditor::_open_sprite_sheet);
- ClassDB::bind_method(D_METHOD("_sheet_preview_draw"), &SpriteFramesEditor::_sheet_preview_draw);
- ClassDB::bind_method(D_METHOD("_sheet_preview_input"), &SpriteFramesEditor::_sheet_preview_input);
- ClassDB::bind_method(D_METHOD("_sheet_spin_changed"), &SpriteFramesEditor::_sheet_spin_changed);
- ClassDB::bind_method(D_METHOD("_sheet_add_frames"), &SpriteFramesEditor::_sheet_add_frames);
- ClassDB::bind_method(D_METHOD("_sheet_select_clear_all_frames"), &SpriteFramesEditor::_sheet_select_clear_all_frames);
}
SpriteFramesEditor::SpriteFramesEditor() {
@@ -905,19 +882,19 @@ SpriteFramesEditor::SpriteFramesEditor() {
new_anim = memnew(ToolButton);
new_anim->set_tooltip(TTR("New Animation"));
hbc_animlist->add_child(new_anim);
- new_anim->connect("pressed", this, "_animation_add");
+ new_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_add));
remove_anim = memnew(ToolButton);
remove_anim->set_tooltip(TTR("Remove Animation"));
hbc_animlist->add_child(remove_anim);
- remove_anim->connect("pressed", this, "_animation_remove");
+ remove_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
animations = memnew(Tree);
sub_vb->add_child(animations);
animations->set_v_size_flags(SIZE_EXPAND_FILL);
animations->set_hide_root(true);
- animations->connect("cell_selected", this, "_animation_select");
- animations->connect("item_edited", this, "_animation_name_edited");
+ animations->connect("cell_selected", callable_mp(this, &SpriteFramesEditor::_animation_select));
+ animations->connect("item_edited", callable_mp(this, &SpriteFramesEditor::_animation_name_edited));
animations->set_allow_reselect(true);
anim_speed = memnew(SpinBox);
@@ -925,12 +902,12 @@ SpriteFramesEditor::SpriteFramesEditor() {
anim_speed->set_min(0);
anim_speed->set_max(100);
anim_speed->set_step(0.01);
- anim_speed->connect("value_changed", this, "_animation_fps_changed");
+ anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_fps_changed));
anim_loop = memnew(CheckButton);
anim_loop->set_text(TTR("Loop"));
vbc_animlist->add_child(anim_loop);
- anim_loop->connect("pressed", this, "_animation_loop_changed");
+ anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
@@ -1004,16 +981,16 @@ SpriteFramesEditor::SpriteFramesEditor() {
dialog = memnew(AcceptDialog);
add_child(dialog);
- load->connect("pressed", this, "_load_pressed");
- load_sheet->connect("pressed", this, "_open_sprite_sheet");
- _delete->connect("pressed", this, "_delete_pressed");
- copy->connect("pressed", this, "_copy_pressed");
- paste->connect("pressed", this, "_paste_pressed");
- empty->connect("pressed", this, "_empty_pressed");
- empty2->connect("pressed", this, "_empty2_pressed");
- move_up->connect("pressed", this, "_up_pressed");
- move_down->connect("pressed", this, "_down_pressed");
- file->connect("files_selected", this, "_file_load_request");
+ load->connect("pressed", callable_mp(this, &SpriteFramesEditor::_load_pressed));
+ load_sheet->connect("pressed", callable_mp(this, &SpriteFramesEditor::_open_sprite_sheet));
+ _delete->connect("pressed", callable_mp(this, &SpriteFramesEditor::_delete_pressed));
+ copy->connect("pressed", callable_mp(this, &SpriteFramesEditor::_copy_pressed));
+ paste->connect("pressed", callable_mp(this, &SpriteFramesEditor::_paste_pressed));
+ empty->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty_pressed));
+ empty2->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty2_pressed));
+ move_up->connect("pressed", callable_mp(this, &SpriteFramesEditor::_up_pressed));
+ move_down->connect("pressed", callable_mp(this, &SpriteFramesEditor::_down_pressed));
+ file->connect("files_selected", callable_mp(this, &SpriteFramesEditor::_file_load_request), make_binds(-1));
loading_scene = false;
sel = -1;
@@ -1023,14 +1000,14 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", this, "_animation_remove_confirmed");
+ delete_dialog->connect("confirmed", callable_mp(this, &SpriteFramesEditor::_animation_remove_confirmed));
split_sheet_dialog = memnew(ConfirmationDialog);
add_child(split_sheet_dialog);
VBoxContainer *split_sheet_vb = memnew(VBoxContainer);
split_sheet_dialog->add_child(split_sheet_vb);
split_sheet_dialog->set_title(TTR("Select Frames"));
- split_sheet_dialog->connect("confirmed", this, "_sheet_add_frames");
+ split_sheet_dialog->connect("confirmed", callable_mp(this, &SpriteFramesEditor::_sheet_add_frames));
HBoxContainer *split_sheet_hb = memnew(HBoxContainer);
@@ -1041,7 +1018,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_h->set_max(128);
split_sheet_h->set_step(1);
split_sheet_hb->add_child(split_sheet_h);
- split_sheet_h->connect("value_changed", this, "_sheet_spin_changed");
+ split_sheet_h->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed));
ss_label = memnew(Label(TTR("Vertical:")));
split_sheet_hb->add_child(ss_label);
@@ -1050,13 +1027,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_v->set_max(128);
split_sheet_v->set_step(1);
split_sheet_hb->add_child(split_sheet_v);
- split_sheet_v->connect("value_changed", this, "_sheet_spin_changed");
+ split_sheet_v->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed));
split_sheet_hb->add_spacer();
Button *select_clear_all = memnew(Button);
select_clear_all->set_text(TTR("Select/Clear All Frames"));
- select_clear_all->connect("pressed", this, "_sheet_select_clear_all_frames");
+ select_clear_all->connect("pressed", callable_mp(this, &SpriteFramesEditor::_sheet_select_clear_all_frames));
split_sheet_hb->add_child(select_clear_all);
split_sheet_vb->add_child(split_sheet_hb);
@@ -1064,8 +1041,8 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_preview = memnew(TextureRect);
split_sheet_preview->set_expand(false);
split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS);
- split_sheet_preview->connect("draw", this, "_sheet_preview_draw");
- split_sheet_preview->connect("gui_input", this, "_sheet_preview_input");
+ split_sheet_preview->connect("draw", callable_mp(this, &SpriteFramesEditor::_sheet_preview_draw));
+ split_sheet_preview->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));
splite_sheet_scroll = memnew(ScrollContainer);
splite_sheet_scroll->set_enable_h_scroll(true);
@@ -1083,7 +1060,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
file_split_sheet->set_title(TTR("Create Frames from Sprite Sheet"));
file_split_sheet->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(file_split_sheet);
- file_split_sheet->connect("file_selected", this, "_prepare_sprite_sheet");
+ file_split_sheet->connect("file_selected", callable_mp(this, &SpriteFramesEditor::_prepare_sprite_sheet));
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index aa683605ed..1fa93b5c47 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -86,7 +86,7 @@ class SpriteFramesEditor : public HSplitContainer {
void _load_pressed();
void _load_scene_pressed();
- void _file_load_request(const PoolVector<String> &p_path, int p_at_pos = -1);
+ void _file_load_request(const Vector<String> &p_path, int p_at_pos = -1);
void _copy_pressed();
void _paste_pressed();
void _empty_pressed();
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index eebcd567a4..a92194da17 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -54,11 +54,11 @@ void EditorInspectorPluginStyleBox::parse_end() {
void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
if (stylebox.is_valid())
- stylebox->disconnect("changed", this, "_sb_changed");
+ stylebox->disconnect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed));
stylebox = p_stylebox;
if (p_stylebox.is_valid()) {
preview->add_style_override("panel", stylebox);
- stylebox->connect("changed", this, "_sb_changed");
+ stylebox->connect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed));
}
_sb_changed();
}
@@ -82,16 +82,13 @@ void StyleBoxPreview::_redraw() {
}
void StyleBoxPreview::_bind_methods() {
-
- ClassDB::bind_method("_sb_changed", &StyleBoxPreview::_sb_changed);
- ClassDB::bind_method("_redraw", &StyleBoxPreview::_redraw);
}
StyleBoxPreview::StyleBoxPreview() {
preview = memnew(Control);
preview->set_custom_minimum_size(Size2(0, 150 * EDSCALE));
preview->set_clip_contents(true);
- preview->connect("draw", this, "_redraw");
+ preview->connect("draw", callable_mp(this, &StyleBoxPreview::_redraw));
add_margin_child(TTR("Preview:"), preview);
}
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 69f1bcfa2e..35f23ccf1d 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -185,7 +185,7 @@ void TextEditor::set_edited_resource(const RES &p_res) {
code_editor->update_line_and_column();
}
-void TextEditor::add_callback(const String &p_function, PoolStringArray p_args) {
+void TextEditor::add_callback(const String &p_function, PackedStringArray p_args) {
}
void TextEditor::set_debugger_active(bool p_active) {
@@ -526,14 +526,6 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) {
}
void TextEditor::_bind_methods() {
-
- ClassDB::bind_method("_validate_script", &TextEditor::_validate_script);
- ClassDB::bind_method("_update_bookmark_list", &TextEditor::_update_bookmark_list);
- ClassDB::bind_method("_bookmark_item_pressed", &TextEditor::_bookmark_item_pressed);
- ClassDB::bind_method("_load_theme_settings", &TextEditor::_load_theme_settings);
- ClassDB::bind_method("_edit_option", &TextEditor::_edit_option);
- ClassDB::bind_method("_change_syntax_highlighter", &TextEditor::_change_syntax_highlighter);
- ClassDB::bind_method("_text_edit_gui_input", &TextEditor::_text_edit_gui_input);
}
static ScriptEditorBase *create_editor(const RES &p_resource) {
@@ -590,7 +582,7 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_MENU) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_MENU) {
TextEdit *tx = code_editor->get_text_edit();
int line = tx->cursor_get_line();
_make_context_menu(tx->is_selection_active(), tx->can_fold(line), tx->is_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->_get_cursor_pixel_pos()));
@@ -633,19 +625,19 @@ TextEditor::TextEditor() {
code_editor = memnew(CodeTextEditor);
add_child(code_editor);
code_editor->add_constant_override("separation", 0);
- code_editor->connect("load_theme_settings", this, "_load_theme_settings");
- code_editor->connect("validate_script", this, "_validate_script");
+ code_editor->connect("load_theme_settings", callable_mp(this, &TextEditor::_load_theme_settings));
+ code_editor->connect("validate_script", callable_mp(this, &TextEditor::_validate_script));
code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
update_settings();
code_editor->get_text_edit()->set_context_menu_enabled(false);
- code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
+ code_editor->get_text_edit()->connect("gui_input", callable_mp(this, &TextEditor::_text_edit_gui_input));
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", this, "_edit_option");
+ context_menu->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
edit_hb = memnew(HBoxContainer);
@@ -653,7 +645,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(search_menu);
search_menu->set_text(TTR("Search"));
search_menu->set_switch_on_hover(true);
- search_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
@@ -667,7 +659,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(edit_menu);
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
- edit_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
@@ -700,7 +692,7 @@ TextEditor::TextEditor() {
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase")), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase")), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize")), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", this, "_edit_option");
+ convert_case->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
highlighters["Standard"] = NULL;
highlighter_menu = memnew(PopupMenu);
@@ -708,13 +700,13 @@ TextEditor::TextEditor() {
edit_menu->get_popup()->add_child(highlighter_menu);
edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
highlighter_menu->add_radio_check_item(TTR("Standard"));
- highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter");
+ highlighter_menu->connect("id_pressed", callable_mp(this, &TextEditor::_change_syntax_highlighter));
MenuButton *goto_menu = memnew(MenuButton);
edit_hb->add_child(goto_menu);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", this, "_edit_option");
+ goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
@@ -724,8 +716,8 @@ TextEditor::TextEditor() {
goto_menu->get_popup()->add_child(bookmarks_menu);
goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
_update_bookmark_list();
- bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list");
- bookmarks_menu->connect("index_pressed", this, "_bookmark_item_pressed");
+ bookmarks_menu->connect("about_to_show", callable_mp(this, &TextEditor::_update_bookmark_list));
+ bookmarks_menu->connect("index_pressed", callable_mp(this, &TextEditor::_bookmark_item_pressed));
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index c976cd87f1..c80052e7ba 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -147,7 +147,7 @@ public:
virtual bool can_lose_focus_on_node_selection() { return true; }
virtual void set_debugger_active(bool p_active);
virtual void set_tooltip_request_func(String p_method, Object *p_obj);
- virtual void add_callback(const String &p_function, PoolStringArray p_args);
+ virtual void add_callback(const String &p_function, PackedStringArray p_args);
virtual Control *get_edit_menu();
virtual void clear_edit_menu();
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 2350c20cb7..2262e12f5d 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -778,21 +778,8 @@ void TextureRegionEditor::_node_removed(Object *p_obj) {
void TextureRegionEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_edit_region"), &TextureRegionEditor::_edit_region);
- ClassDB::bind_method(D_METHOD("_region_draw"), &TextureRegionEditor::_region_draw);
- ClassDB::bind_method(D_METHOD("_region_input"), &TextureRegionEditor::_region_input);
- ClassDB::bind_method(D_METHOD("_scroll_changed"), &TextureRegionEditor::_scroll_changed);
ClassDB::bind_method(D_METHOD("_node_removed"), &TextureRegionEditor::_node_removed);
- ClassDB::bind_method(D_METHOD("_set_snap_mode"), &TextureRegionEditor::_set_snap_mode);
- ClassDB::bind_method(D_METHOD("_set_snap_off_x"), &TextureRegionEditor::_set_snap_off_x);
- ClassDB::bind_method(D_METHOD("_set_snap_off_y"), &TextureRegionEditor::_set_snap_off_y);
- ClassDB::bind_method(D_METHOD("_set_snap_step_x"), &TextureRegionEditor::_set_snap_step_x);
- ClassDB::bind_method(D_METHOD("_set_snap_step_y"), &TextureRegionEditor::_set_snap_step_y);
- ClassDB::bind_method(D_METHOD("_set_snap_sep_x"), &TextureRegionEditor::_set_snap_sep_x);
- ClassDB::bind_method(D_METHOD("_set_snap_sep_y"), &TextureRegionEditor::_set_snap_sep_y);
ClassDB::bind_method(D_METHOD("_zoom_on_position"), &TextureRegionEditor::_zoom_on_position);
- ClassDB::bind_method(D_METHOD("_zoom_in"), &TextureRegionEditor::_zoom_in);
- ClassDB::bind_method(D_METHOD("_zoom_reset"), &TextureRegionEditor::_zoom_reset);
- ClassDB::bind_method(D_METHOD("_zoom_out"), &TextureRegionEditor::_zoom_out);
ClassDB::bind_method(D_METHOD("_update_rect"), &TextureRegionEditor::_update_rect);
}
@@ -935,7 +922,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
snap_mode_button->add_item(TTR("Grid Snap"), 2);
snap_mode_button->add_item(TTR("Auto Slice"), 3);
snap_mode_button->select(0);
- snap_mode_button->connect("item_selected", this, "_set_snap_mode");
+ snap_mode_button->connect("item_selected", callable_mp(this, &TextureRegionEditor::_set_snap_mode));
hb_grid = memnew(HBoxContainer);
hb_tools->add_child(hb_grid);
@@ -949,7 +936,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_off_x->set_step(1);
sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
- sb_off_x->connect("value_changed", this, "_set_snap_off_x");
+ sb_off_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_off_x));
hb_grid->add_child(sb_off_x);
sb_off_y = memnew(SpinBox);
@@ -958,7 +945,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_off_y->set_step(1);
sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
- sb_off_y->connect("value_changed", this, "_set_snap_off_y");
+ sb_off_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_off_y));
hb_grid->add_child(sb_off_y);
hb_grid->add_child(memnew(VSeparator));
@@ -970,7 +957,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_step_x->set_step(1);
sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
- sb_step_x->connect("value_changed", this, "_set_snap_step_x");
+ sb_step_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_step_x));
hb_grid->add_child(sb_step_x);
sb_step_y = memnew(SpinBox);
@@ -979,7 +966,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_step_y->set_step(1);
sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
- sb_step_y->connect("value_changed", this, "_set_snap_step_y");
+ sb_step_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_step_y));
hb_grid->add_child(sb_step_y);
hb_grid->add_child(memnew(VSeparator));
@@ -991,7 +978,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_sep_x->set_step(1);
sb_sep_x->set_value(snap_separation.x);
sb_sep_x->set_suffix("px");
- sb_sep_x->connect("value_changed", this, "_set_snap_sep_x");
+ sb_sep_x->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_sep_x));
hb_grid->add_child(sb_sep_x);
sb_sep_y = memnew(SpinBox);
@@ -1000,7 +987,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
sb_sep_y->set_step(1);
sb_sep_y->set_value(snap_separation.y);
sb_sep_y->set_suffix("px");
- sb_sep_y->connect("value_changed", this, "_set_snap_sep_y");
+ sb_sep_y->connect("value_changed", callable_mp(this, &TextureRegionEditor::_set_snap_sep_y));
hb_grid->add_child(sb_sep_y);
hb_grid->hide();
@@ -1008,8 +995,8 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
edit_draw = memnew(Panel);
add_child(edit_draw);
edit_draw->set_v_size_flags(SIZE_EXPAND_FILL);
- edit_draw->connect("draw", this, "_region_draw");
- edit_draw->connect("gui_input", this, "_region_input");
+ edit_draw->connect("draw", callable_mp(this, &TextureRegionEditor::_region_draw));
+ edit_draw->connect("gui_input", callable_mp(this, &TextureRegionEditor::_region_input));
draw_zoom = 1.0;
edit_draw->set_clip_contents(true);
@@ -1020,27 +1007,27 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
zoom_out = memnew(ToolButton);
zoom_out->set_tooltip(TTR("Zoom Out"));
- zoom_out->connect("pressed", this, "_zoom_out");
+ zoom_out->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_out));
zoom_hb->add_child(zoom_out);
zoom_reset = memnew(ToolButton);
zoom_reset->set_tooltip(TTR("Zoom Reset"));
- zoom_reset->connect("pressed", this, "_zoom_reset");
+ zoom_reset->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_reset));
zoom_hb->add_child(zoom_reset);
zoom_in = memnew(ToolButton);
zoom_in->set_tooltip(TTR("Zoom In"));
- zoom_in->connect("pressed", this, "_zoom_in");
+ zoom_in->connect("pressed", callable_mp(this, &TextureRegionEditor::_zoom_in));
zoom_hb->add_child(zoom_in);
vscroll = memnew(VScrollBar);
vscroll->set_step(0.001);
edit_draw->add_child(vscroll);
- vscroll->connect("value_changed", this, "_scroll_changed");
+ vscroll->connect("value_changed", callable_mp(this, &TextureRegionEditor::_scroll_changed));
hscroll = memnew(HScrollBar);
hscroll->set_step(0.001);
edit_draw->add_child(hscroll);
- hscroll->connect("value_changed", this, "_scroll_changed");
+ hscroll->connect("value_changed", callable_mp(this, &TextureRegionEditor::_scroll_changed));
updating_scroll = false;
}
@@ -1115,7 +1102,6 @@ void TextureRegionEditorPlugin::set_state(const Dictionary &p_state) {
}
void TextureRegionEditorPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_editor_visiblity_changed"), &TextureRegionEditorPlugin::_editor_visiblity_changed);
}
TextureRegionEditorPlugin::TextureRegionEditorPlugin(EditorNode *p_node) {
@@ -1125,7 +1111,7 @@ TextureRegionEditorPlugin::TextureRegionEditorPlugin(EditorNode *p_node) {
region_editor = memnew(TextureRegionEditor(p_node));
region_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
region_editor->hide();
- region_editor->connect("visibility_changed", this, "_editor_visiblity_changed");
+ region_editor->connect("visibility_changed", callable_mp(this, &TextureRegionEditorPlugin::_editor_visiblity_changed));
texture_region_button = p_node->add_bottom_panel_item(TTR("TextureRegion"), region_editor);
texture_region_button->hide();
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 48d80a0017..d5b52e9711 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -598,13 +598,6 @@ void ThemeEditor::_notification(int p_what) {
}
void ThemeEditor::_bind_methods() {
-
- ClassDB::bind_method("_type_menu_cbk", &ThemeEditor::_type_menu_cbk);
- ClassDB::bind_method("_name_menu_about_to_show", &ThemeEditor::_name_menu_about_to_show);
- ClassDB::bind_method("_name_menu_cbk", &ThemeEditor::_name_menu_cbk);
- ClassDB::bind_method("_theme_menu_cbk", &ThemeEditor::_theme_menu_cbk);
- ClassDB::bind_method("_dialog_cbk", &ThemeEditor::_dialog_cbk);
- ClassDB::bind_method("_save_template_cbk", &ThemeEditor::_save_template_cbk);
}
ThemeEditor::ThemeEditor() {
@@ -629,7 +622,7 @@ ThemeEditor::ThemeEditor() {
theme_menu->get_popup()->add_item(TTR("Create Empty Editor Template"), POPUP_CREATE_EDITOR_EMPTY);
theme_menu->get_popup()->add_item(TTR("Create From Current Editor Theme"), POPUP_IMPORT_EDITOR_THEME);
top_menu->add_child(theme_menu);
- theme_menu->get_popup()->connect("id_pressed", this, "_theme_menu_cbk");
+ theme_menu->get_popup()->connect("id_pressed", callable_mp(this, &ThemeEditor::_theme_menu_cbk));
ScrollContainer *scroll = memnew(ScrollContainer);
add_child(scroll);
@@ -835,7 +828,7 @@ ThemeEditor::ThemeEditor() {
type_menu->set_text("..");
type_hbc->add_child(type_menu);
- type_menu->get_popup()->connect("id_pressed", this, "_type_menu_cbk");
+ type_menu->get_popup()->connect("id_pressed", callable_mp(this, &ThemeEditor::_type_menu_cbk));
l = memnew(Label);
l->set_text(TTR("Name:"));
@@ -853,8 +846,8 @@ ThemeEditor::ThemeEditor() {
name_menu->set_text("..");
name_hbc->add_child(name_menu);
- name_menu->get_popup()->connect("about_to_show", this, "_name_menu_about_to_show");
- name_menu->get_popup()->connect("id_pressed", this, "_name_menu_cbk");
+ name_menu->get_popup()->connect("about_to_show", callable_mp(this, &ThemeEditor::_name_menu_about_to_show));
+ name_menu->get_popup()->connect("id_pressed", callable_mp(this, &ThemeEditor::_name_menu_cbk));
type_select_label = memnew(Label);
type_select_label->set_text(TTR("Data Type:"));
@@ -869,12 +862,12 @@ ThemeEditor::ThemeEditor() {
dialog_vbc->add_child(type_select);
- add_del_dialog->get_ok()->connect("pressed", this, "_dialog_cbk");
+ add_del_dialog->get_ok()->connect("pressed", callable_mp(this, &ThemeEditor::_dialog_cbk));
file_dialog = memnew(EditorFileDialog);
file_dialog->add_filter("*.theme ; " + TTR("Theme File"));
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_save_template_cbk");
+ file_dialog->connect("file_selected", callable_mp(this, &ThemeEditor::_save_template_cbk));
}
void ThemeEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 425a759dac..017f986469 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -55,7 +55,7 @@ void TileMapEditor::_notification(int p_what) {
if (is_visible_in_tree()) {
_update_palette();
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_ENTER_TREE: {
@@ -359,10 +359,10 @@ void TileMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> k = p_ie;
- if (k.is_valid() && (k->get_scancode() == KEY_UP ||
- k->get_scancode() == KEY_DOWN ||
- k->get_scancode() == KEY_PAGEUP ||
- k->get_scancode() == KEY_PAGEDOWN)) {
+ if (k.is_valid() && (k->get_keycode() == KEY_UP ||
+ k->get_keycode() == KEY_DOWN ||
+ k->get_keycode() == KEY_PAGEUP ||
+ k->get_keycode() == KEY_PAGEDOWN)) {
palette->call("_gui_input", k);
search_box->accept_event();
@@ -598,7 +598,7 @@ void TileMapEditor::_pick_tile(const Point2 &p_pos) {
CanvasItemEditor::get_singleton()->update_viewport();
}
-PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase, bool preview) {
+Vector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool erase, bool preview) {
int prev_id = node->get_cell(p_start.x, p_start.y);
Vector<int> ids;
@@ -607,14 +607,14 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
ids = get_selected_tiles();
if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL)
- return PoolVector<Vector2>();
+ return Vector<Vector2>();
} else if (prev_id == TileMap::INVALID_CELL) {
- return PoolVector<Vector2>();
+ return Vector<Vector2>();
}
if (ids.size() == 1 && ids[0] == prev_id) {
// Same ID, nothing to change
- return PoolVector<Vector2>();
+ return Vector<Vector2>();
}
Rect2i r = node->get_used_rect();
@@ -640,14 +640,14 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
if (invalidate_cache) {
for (int i = 0; i < area; ++i)
bucket_cache_visited[i] = false;
- bucket_cache = PoolVector<Vector2>();
+ bucket_cache = Vector<Vector2>();
bucket_cache_tile = prev_id;
bucket_cache_rect = r;
bucket_queue.clear();
}
}
- PoolVector<Vector2> points;
+ Vector<Vector2> points;
Vector<Vector2> non_preview_cache;
int count = 0;
int limit = 0;
@@ -698,10 +698,10 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
return preview ? bucket_cache : points;
}
-void TileMapEditor::_fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op) {
+void TileMapEditor::_fill_points(const Vector<Vector2> &p_points, const Dictionary &p_op) {
int len = p_points.size();
- PoolVector<Vector2>::Read pr = p_points.read();
+ const Vector2 *pr = p_points.ptr();
Vector<int> ids = p_op["id"];
bool xf = p_op["flip_h"];
@@ -716,10 +716,10 @@ void TileMapEditor::_fill_points(const PoolVector<Vector2> &p_points, const Dict
node->update_dirty_bitmask();
}
-void TileMapEditor::_erase_points(const PoolVector<Vector2> &p_points) {
+void TileMapEditor::_erase_points(const Vector<Vector2> &p_points) {
int len = p_points.size();
- PoolVector<Vector2>::Read pr = p_points.read();
+ const Vector2 *pr = p_points.ptr();
for (int i = 0; i < len; i++) {
@@ -882,8 +882,8 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p
void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) {
- PoolVector<Vector2> points = _bucket_fill(p_point, false, true);
- PoolVector<Vector2>::Read pr = points.read();
+ Vector<Vector2> points = _bucket_fill(p_point, false, true);
+ const Vector2 *pr = points.ptr();
int len = points.size();
for (int i = 0; i < len; ++i) {
@@ -1109,7 +1109,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else if (tool == TOOL_BUCKET) {
- PoolVector<Vector2> points = _bucket_fill(over_tile);
+ Vector<Vector2> points = _bucket_fill(over_tile);
if (points.size() == 0)
return false;
@@ -1216,7 +1216,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
- PoolVector<Vector2> points = _bucket_fill(over_tile, true);
+ Vector<Vector2> points = _bucket_fill(over_tile, true);
if (points.size() == 0)
return false;
@@ -1377,7 +1377,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (k.is_valid() && k->is_pressed()) {
- if (last_tool == TOOL_NONE && tool == TOOL_PICKING && k->get_scancode() == KEY_SHIFT && k->get_command()) {
+ if (last_tool == TOOL_NONE && tool == TOOL_PICKING && k->get_keycode() == KEY_SHIFT && k->get_command()) {
// trying to draw a rectangle with the painting tool, so change to the correct tool
tool = last_tool;
@@ -1385,7 +1385,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
_update_button_tool();
}
- if (k->get_scancode() == KEY_ESCAPE) {
+ if (k->get_keycode() == KEY_ESCAPE) {
if (tool == TOOL_PASTING)
copydata.clear();
@@ -1506,7 +1506,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (tool == TOOL_NONE) {
- if (k->get_scancode() == KEY_SHIFT && k->get_command()) {
+ if (k->get_keycode() == KEY_SHIFT && k->get_command()) {
tool = TOOL_PICKING;
_update_button_tool();
@@ -1514,9 +1514,9 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
} else if (tool == TOOL_PICKING) {
#ifdef APPLE_STYLE_KEYS
- if (k->get_scancode() == KEY_META) {
+ if (k->get_keycode() == KEY_META) {
#else
- if (k->get_scancode() == KEY_CONTROL) {
+ if (k->get_keycode() == KEY_CONTROL) {
#endif
// Go back to that last tool if KEY_CONTROL was released.
tool = last_tool;
@@ -1761,30 +1761,30 @@ void TileMapEditor::edit(Node *p_tile_map) {
}
if (node)
- node->disconnect("settings_changed", this, "_tileset_settings_changed");
+ node->disconnect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed));
if (p_tile_map) {
node = Object::cast_to<TileMap>(p_tile_map);
- if (!canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter"))
- canvas_item_editor_viewport->connect("mouse_entered", this, "_canvas_mouse_enter");
- if (!canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit"))
- canvas_item_editor_viewport->connect("mouse_exited", this, "_canvas_mouse_exit");
+ if (!canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter)))
+ canvas_item_editor_viewport->connect("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter));
+ if (!canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit)))
+ canvas_item_editor_viewport->connect("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit));
_update_palette();
} else {
node = NULL;
- if (canvas_item_editor_viewport->is_connected("mouse_entered", this, "_canvas_mouse_enter"))
- canvas_item_editor_viewport->disconnect("mouse_entered", this, "_canvas_mouse_enter");
- if (canvas_item_editor_viewport->is_connected("mouse_exited", this, "_canvas_mouse_exit"))
- canvas_item_editor_viewport->disconnect("mouse_exited", this, "_canvas_mouse_exit");
+ if (canvas_item_editor_viewport->is_connected("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter)))
+ canvas_item_editor_viewport->disconnect("mouse_entered", callable_mp(this, &TileMapEditor::_canvas_mouse_enter));
+ if (canvas_item_editor_viewport->is_connected("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit)))
+ canvas_item_editor_viewport->disconnect("mouse_exited", callable_mp(this, &TileMapEditor::_canvas_mouse_exit));
_update_palette();
}
if (node)
- node->connect("settings_changed", this, "_tileset_settings_changed");
+ node->connect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed));
_clear_bucket_cache();
}
@@ -1805,27 +1805,8 @@ void TileMapEditor::_icon_size_changed(float p_value) {
void TileMapEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_manual_toggled"), &TileMapEditor::_manual_toggled);
- ClassDB::bind_method(D_METHOD("_priority_toggled"), &TileMapEditor::_priority_toggled);
- ClassDB::bind_method(D_METHOD("_text_entered"), &TileMapEditor::_text_entered);
- ClassDB::bind_method(D_METHOD("_text_changed"), &TileMapEditor::_text_changed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &TileMapEditor::_sbox_input);
- ClassDB::bind_method(D_METHOD("_button_tool_select"), &TileMapEditor::_button_tool_select);
- ClassDB::bind_method(D_METHOD("_menu_option"), &TileMapEditor::_menu_option);
- ClassDB::bind_method(D_METHOD("_canvas_mouse_enter"), &TileMapEditor::_canvas_mouse_enter);
- ClassDB::bind_method(D_METHOD("_canvas_mouse_exit"), &TileMapEditor::_canvas_mouse_exit);
- ClassDB::bind_method(D_METHOD("_tileset_settings_changed"), &TileMapEditor::_tileset_settings_changed);
- ClassDB::bind_method(D_METHOD("_rotate"), &TileMapEditor::_rotate);
- ClassDB::bind_method(D_METHOD("_flip_horizontal"), &TileMapEditor::_flip_horizontal);
- ClassDB::bind_method(D_METHOD("_flip_vertical"), &TileMapEditor::_flip_vertical);
- ClassDB::bind_method(D_METHOD("_clear_transform"), &TileMapEditor::_clear_transform);
- ClassDB::bind_method(D_METHOD("_palette_selected"), &TileMapEditor::_palette_selected);
- ClassDB::bind_method(D_METHOD("_palette_multi_selected"), &TileMapEditor::_palette_multi_selected);
-
ClassDB::bind_method(D_METHOD("_fill_points"), &TileMapEditor::_fill_points);
ClassDB::bind_method(D_METHOD("_erase_points"), &TileMapEditor::_erase_points);
-
- ClassDB::bind_method(D_METHOD("_icon_size_changed"), &TileMapEditor::_icon_size_changed);
}
TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i &p_pos) {
@@ -1939,20 +1920,20 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
manual_button = memnew(CheckBox);
manual_button->set_text(TTR("Disable Autotile"));
- manual_button->connect("toggled", this, "_manual_toggled");
+ manual_button->connect("toggled", callable_mp(this, &TileMapEditor::_manual_toggled));
add_child(manual_button);
priority_button = memnew(CheckBox);
priority_button->set_text(TTR("Enable Priority"));
- priority_button->connect("toggled", this, "_priority_toggled");
+ priority_button->connect("toggled", callable_mp(this, &TileMapEditor::_priority_toggled));
add_child(priority_button);
search_box = memnew(LineEdit);
search_box->set_placeholder(TTR("Filter tiles"));
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
- search_box->connect("text_entered", this, "_text_entered");
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_entered", callable_mp(this, &TileMapEditor::_text_entered));
+ search_box->connect("text_changed", callable_mp(this, &TileMapEditor::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &TileMapEditor::_sbox_input));
add_child(search_box);
size_slider = memnew(HSlider);
@@ -1961,7 +1942,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
size_slider->set_max(4.0f);
size_slider->set_step(0.1f);
size_slider->set_value(1.0f);
- size_slider->connect("value_changed", this, "_icon_size_changed");
+ size_slider->connect("value_changed", callable_mp(this, &TileMapEditor::_icon_size_changed));
add_child(size_slider);
int mw = EDITOR_DEF("editors/tile_map/palette_min_width", 80);
@@ -1980,8 +1961,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
palette->set_max_text_lines(2);
palette->set_select_mode(ItemList::SELECT_MULTI);
palette->add_constant_override("vseparation", 8 * EDSCALE);
- palette->connect("item_selected", this, "_palette_selected");
- palette->connect("multi_selected", this, "_palette_multi_selected");
+ palette->connect("item_selected", callable_mp(this, &TileMapEditor::_palette_selected));
+ palette->connect("multi_selected", callable_mp(this, &TileMapEditor::_palette_multi_selected));
palette_container->add_child(palette);
// Add message for when no texture is selected.
@@ -2015,25 +1996,25 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
paint_button = memnew(ToolButton);
paint_button->set_shortcut(ED_SHORTCUT("tile_map_editor/paint_tile", TTR("Paint Tile"), KEY_P));
paint_button->set_tooltip(TTR("Shift+LMB: Line Draw\nShift+Ctrl+LMB: Rectangle Paint"));
- paint_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_NONE));
+ paint_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_NONE));
paint_button->set_toggle_mode(true);
toolbar->add_child(paint_button);
bucket_fill_button = memnew(ToolButton);
bucket_fill_button->set_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_G));
- bucket_fill_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_BUCKET));
+ bucket_fill_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_BUCKET));
bucket_fill_button->set_toggle_mode(true);
toolbar->add_child(bucket_fill_button);
picker_button = memnew(ToolButton);
picker_button->set_shortcut(ED_SHORTCUT("tile_map_editor/pick_tile", TTR("Pick Tile"), KEY_I));
- picker_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PICKING));
+ picker_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_PICKING));
picker_button->set_toggle_mode(true);
toolbar->add_child(picker_button);
select_button = memnew(ToolButton);
select_button->set_shortcut(ED_SHORTCUT("tile_map_editor/select", TTR("Select"), KEY_M));
- select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECTING));
+ select_button->connect("pressed", callable_mp(this, &TileMapEditor::_button_tool_select), make_binds(TOOL_SELECTING));
select_button->set_toggle_mode(true);
toolbar->add_child(select_button);
@@ -2068,40 +2049,40 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
p->add_shortcut(ED_GET_SHORTCUT("tile_map_editor/erase_selection"), OPTION_ERASE_SELECTION);
p->add_separator();
p->add_item(TTR("Fix Invalid Tiles"), OPTION_FIX_INVALID);
- p->connect("id_pressed", this, "_menu_option");
+ p->connect("id_pressed", callable_mp(this, &TileMapEditor::_menu_option));
rotate_left_button = memnew(ToolButton);
rotate_left_button->set_tooltip(TTR("Rotate Left"));
rotate_left_button->set_focus_mode(FOCUS_NONE);
- rotate_left_button->connect("pressed", this, "_rotate", varray(-1));
+ rotate_left_button->connect("pressed", callable_mp(this, &TileMapEditor::_rotate), varray(-1));
rotate_left_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_left", TTR("Rotate Left"), KEY_A));
tool_hb->add_child(rotate_left_button);
rotate_right_button = memnew(ToolButton);
rotate_right_button->set_tooltip(TTR("Rotate Right"));
rotate_right_button->set_focus_mode(FOCUS_NONE);
- rotate_right_button->connect("pressed", this, "_rotate", varray(1));
+ rotate_right_button->connect("pressed", callable_mp(this, &TileMapEditor::_rotate), varray(1));
rotate_right_button->set_shortcut(ED_SHORTCUT("tile_map_editor/rotate_right", TTR("Rotate Right"), KEY_S));
tool_hb->add_child(rotate_right_button);
flip_horizontal_button = memnew(ToolButton);
flip_horizontal_button->set_tooltip(TTR("Flip Horizontally"));
flip_horizontal_button->set_focus_mode(FOCUS_NONE);
- flip_horizontal_button->connect("pressed", this, "_flip_horizontal");
+ flip_horizontal_button->connect("pressed", callable_mp(this, &TileMapEditor::_flip_horizontal));
flip_horizontal_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_horizontal", TTR("Flip Horizontally"), KEY_X));
tool_hb->add_child(flip_horizontal_button);
flip_vertical_button = memnew(ToolButton);
flip_vertical_button->set_tooltip(TTR("Flip Vertically"));
flip_vertical_button->set_focus_mode(FOCUS_NONE);
- flip_vertical_button->connect("pressed", this, "_flip_vertical");
+ flip_vertical_button->connect("pressed", callable_mp(this, &TileMapEditor::_flip_vertical));
flip_vertical_button->set_shortcut(ED_SHORTCUT("tile_map_editor/flip_vertical", TTR("Flip Vertically"), KEY_Z));
tool_hb->add_child(flip_vertical_button);
clear_transform_button = memnew(ToolButton);
clear_transform_button->set_tooltip(TTR("Clear Transform"));
clear_transform_button->set_focus_mode(FOCUS_NONE);
- clear_transform_button->connect("pressed", this, "_clear_transform");
+ clear_transform_button->connect("pressed", callable_mp(this, &TileMapEditor::_clear_transform));
clear_transform_button->set_shortcut(ED_SHORTCUT("tile_map_editor/clear_transform", TTR("Clear Transform"), KEY_W));
tool_hb->add_child(clear_transform_button);
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index 927f0887bb..74969d3e64 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -123,7 +123,7 @@ class TileMapEditor : public VBoxContainer {
bool *bucket_cache_visited;
Rect2i bucket_cache_rect;
int bucket_cache_tile;
- PoolVector<Vector2> bucket_cache;
+ Vector<Vector2> bucket_cache;
List<Point2i> bucket_queue;
struct CellOp {
@@ -164,10 +164,10 @@ class TileMapEditor : public VBoxContainer {
void _pick_tile(const Point2 &p_pos);
- PoolVector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false);
+ Vector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false);
- void _fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op);
- void _erase_points(const PoolVector<Vector2> &p_points);
+ void _fill_points(const Vector<Vector2> &p_points, const Dictionary &p_op);
+ void _erase_points(const Vector<Vector2> &p_points);
void _select(const Point2i &p_from, const Point2i &p_to);
void _erase_selection();
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index ce865510b4..d23b037ed4 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -109,8 +109,8 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
Node *child2 = mi->get_child(j);
- if (Object::cast_to<NavigationPolygonInstance>(child2))
- nav_poly = Object::cast_to<NavigationPolygonInstance>(child2)->get_navigation_polygon();
+ if (Object::cast_to<NavigationRegion2D>(child2))
+ nav_poly = Object::cast_to<NavigationRegion2D>(child2)->get_navigation_polygon();
if (Object::cast_to<LightOccluder2D>(child2))
occluder = Object::cast_to<LightOccluder2D>(child2)->get_occluder_polygon();
@@ -251,7 +251,7 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
if (String(d["type"]) == "files") {
- PoolVector<String> files = d["files"];
+ Vector<String> files = d["files"];
_on_textures_added(files);
}
@@ -260,27 +260,11 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
void TileSetEditor::_bind_methods() {
ClassDB::bind_method("_undo_redo_import_scene", &TileSetEditor::_undo_redo_import_scene);
- ClassDB::bind_method("_on_tileset_toolbar_button_pressed", &TileSetEditor::_on_tileset_toolbar_button_pressed);
- ClassDB::bind_method("_on_textures_added", &TileSetEditor::_on_textures_added);
- ClassDB::bind_method("_on_tileset_toolbar_confirm", &TileSetEditor::_on_tileset_toolbar_confirm);
- ClassDB::bind_method("_on_texture_list_selected", &TileSetEditor::_on_texture_list_selected);
- ClassDB::bind_method("_on_edit_mode_changed", &TileSetEditor::_on_edit_mode_changed);
- ClassDB::bind_method("_on_workspace_mode_changed", &TileSetEditor::_on_workspace_mode_changed);
- ClassDB::bind_method("_on_workspace_overlay_draw", &TileSetEditor::_on_workspace_overlay_draw);
- ClassDB::bind_method("_on_workspace_process", &TileSetEditor::_on_workspace_process);
- ClassDB::bind_method("_on_workspace_draw", &TileSetEditor::_on_workspace_draw);
- ClassDB::bind_method("_on_workspace_input", &TileSetEditor::_on_workspace_input);
- ClassDB::bind_method("_on_tool_clicked", &TileSetEditor::_on_tool_clicked);
- ClassDB::bind_method("_on_priority_changed", &TileSetEditor::_on_priority_changed);
- ClassDB::bind_method("_on_z_index_changed", &TileSetEditor::_on_z_index_changed);
- ClassDB::bind_method("_on_grid_snap_toggled", &TileSetEditor::_on_grid_snap_toggled);
+ ClassDB::bind_method("_on_workspace_process", &TileSetEditor::_on_workspace_process); // Still used by some connect_compat.
ClassDB::bind_method("_set_snap_step", &TileSetEditor::_set_snap_step);
ClassDB::bind_method("_set_snap_off", &TileSetEditor::_set_snap_off);
ClassDB::bind_method("_set_snap_sep", &TileSetEditor::_set_snap_sep);
ClassDB::bind_method("_validate_current_tile_id", &TileSetEditor::_validate_current_tile_id);
- ClassDB::bind_method("_zoom_in", &TileSetEditor::_zoom_in);
- ClassDB::bind_method("_zoom_out", &TileSetEditor::_zoom_out);
- ClassDB::bind_method("_zoom_reset", &TileSetEditor::_zoom_reset);
ClassDB::bind_method("_select_edited_shape_coord", &TileSetEditor::_select_edited_shape_coord);
ClassDB::bind_method("_sort_tiles", &TileSetEditor::_sort_tiles);
@@ -358,19 +342,19 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
left_container->add_child(texture_list);
texture_list->set_v_size_flags(SIZE_EXPAND_FILL);
texture_list->set_custom_minimum_size(Size2(200, 0));
- texture_list->connect("item_selected", this, "_on_texture_list_selected");
+ texture_list->connect("item_selected", callable_mp(this, &TileSetEditor::_on_texture_list_selected));
texture_list->set_drag_forwarding(this);
HBoxContainer *tileset_toolbar_container = memnew(HBoxContainer);
left_container->add_child(tileset_toolbar_container);
tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE] = memnew(ToolButton);
- tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_ADD_TEXTURE));
+ tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_button_pressed), varray(TOOL_TILESET_ADD_TEXTURE));
tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]);
tileset_toolbar_buttons[TOOL_TILESET_ADD_TEXTURE]->set_tooltip(TTR("Add Texture(s) to TileSet."));
tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE] = memnew(ToolButton);
- tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect("pressed", this, "_on_tileset_toolbar_button_pressed", varray(TOOL_TILESET_REMOVE_TEXTURE));
+ tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_button_pressed), varray(TOOL_TILESET_REMOVE_TEXTURE));
tileset_toolbar_container->add_child(tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]);
tileset_toolbar_buttons[TOOL_TILESET_REMOVE_TEXTURE]->set_tooltip(TTR("Remove selected Texture from TileSet."));
@@ -383,7 +367,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tileset_toolbar_tools->get_popup()->add_item(TTR("Create from Scene"), TOOL_TILESET_CREATE_SCENE);
tileset_toolbar_tools->get_popup()->add_item(TTR("Merge from Scene"), TOOL_TILESET_MERGE_SCENE);
- tileset_toolbar_tools->get_popup()->connect("id_pressed", this, "_on_tileset_toolbar_button_pressed");
+ tileset_toolbar_tools->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_button_pressed));
tileset_toolbar_container->add_child(tileset_toolbar_tools);
//---------------
@@ -416,7 +400,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_workspacemode[i]->set_text(workspace_label[i]);
tool_workspacemode[i]->set_toggle_mode(true);
tool_workspacemode[i]->set_button_group(g);
- tool_workspacemode[i]->connect("pressed", this, "_on_workspace_mode_changed", varray(i));
+ tool_workspacemode[i]->connect("pressed", callable_mp(this, &TileSetEditor::_on_workspace_mode_changed), varray(i));
tool_hb->add_child(tool_workspacemode[i]);
}
@@ -429,14 +413,14 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_hb->add_child(tools[SELECT_NEXT]);
tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE);
tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN));
- tools[SELECT_NEXT]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT));
+ tools[SELECT_NEXT]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SELECT_NEXT));
tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile."));
tools[SELECT_PREVIOUS] = memnew(ToolButton);
tool_hb->add_child(tools[SELECT_PREVIOUS]);
tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE);
tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP));
tools[SELECT_PREVIOUS]->set_tooltip(TTR("Select the previous shape, subtile, or Tile."));
- tools[SELECT_PREVIOUS]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS));
+ tools[SELECT_PREVIOUS]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SELECT_PREVIOUS));
VSeparator *separator_shape_selection = memnew(VSeparator);
tool_hb->add_child(separator_shape_selection);
@@ -466,7 +450,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_editmode[i]->set_text(label[i]);
tool_editmode[i]->set_toggle_mode(true);
tool_editmode[i]->set_button_group(g);
- tool_editmode[i]->connect("pressed", this, "_on_edit_mode_changed", varray(i));
+ tool_editmode[i]->connect("pressed", callable_mp(this, &TileSetEditor::_on_edit_mode_changed), varray(i));
tool_hb->add_child(tool_editmode[i]);
}
tool_editmode[EDITMODE_COLLISION]->set_pressed(true);
@@ -493,21 +477,21 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[TOOL_SELECT]->set_toggle_mode(true);
tools[TOOL_SELECT]->set_button_group(tg);
tools[TOOL_SELECT]->set_pressed(true);
- tools[TOOL_SELECT]->connect("pressed", this, "_on_tool_clicked", varray(TOOL_SELECT));
+ tools[TOOL_SELECT]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(TOOL_SELECT));
separator_bitmask = memnew(VSeparator);
toolbar->add_child(separator_bitmask);
tools[BITMASK_COPY] = memnew(ToolButton);
tools[BITMASK_COPY]->set_tooltip(TTR("Copy bitmask."));
- tools[BITMASK_COPY]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_COPY));
+ tools[BITMASK_COPY]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_COPY));
toolbar->add_child(tools[BITMASK_COPY]);
tools[BITMASK_PASTE] = memnew(ToolButton);
tools[BITMASK_PASTE]->set_tooltip(TTR("Paste bitmask."));
- tools[BITMASK_PASTE]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_PASTE));
+ tools[BITMASK_PASTE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_PASTE));
toolbar->add_child(tools[BITMASK_PASTE]);
tools[BITMASK_CLEAR] = memnew(ToolButton);
tools[BITMASK_CLEAR]->set_tooltip(TTR("Erase bitmask."));
- tools[BITMASK_CLEAR]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR));
+ tools[BITMASK_CLEAR]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(BITMASK_CLEAR));
toolbar->add_child(tools[BITMASK_CLEAR]);
tools[SHAPE_NEW_RECTANGLE] = memnew(ToolButton);
@@ -525,13 +509,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
separator_shape_toggle = memnew(VSeparator);
toolbar->add_child(separator_shape_toggle);
tools[SHAPE_TOGGLE_TYPE] = memnew(ToolButton);
- tools[SHAPE_TOGGLE_TYPE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE));
+ tools[SHAPE_TOGGLE_TYPE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_TOGGLE_TYPE));
toolbar->add_child(tools[SHAPE_TOGGLE_TYPE]);
separator_delete = memnew(VSeparator);
toolbar->add_child(separator_delete);
tools[SHAPE_DELETE] = memnew(ToolButton);
- tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE));
+ tools[SHAPE_DELETE]->connect("pressed", callable_mp(this, &TileSetEditor::_on_tool_clicked), varray(SHAPE_DELETE));
toolbar->add_child(tools[SHAPE_DELETE]);
spin_priority = memnew(SpinBox);
@@ -539,7 +523,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
spin_priority->set_max(255);
spin_priority->set_step(1);
spin_priority->set_custom_minimum_size(Size2(100, 0));
- spin_priority->connect("value_changed", this, "_on_priority_changed");
+ spin_priority->connect("value_changed", callable_mp(this, &TileSetEditor::_on_priority_changed));
spin_priority->hide();
toolbar->add_child(spin_priority);
@@ -548,7 +532,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
spin_z_index->set_max(VS::CANVAS_ITEM_Z_MAX);
spin_z_index->set_step(1);
spin_z_index->set_custom_minimum_size(Size2(100, 0));
- spin_z_index->connect("value_changed", this, "_on_z_index_changed");
+ spin_z_index->connect("value_changed", callable_mp(this, &TileSetEditor::_on_z_index_changed));
spin_z_index->hide();
toolbar->add_child(spin_z_index);
@@ -562,7 +546,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[TOOL_GRID_SNAP] = memnew(ToolButton);
tools[TOOL_GRID_SNAP]->set_toggle_mode(true);
tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector)."));
- tools[TOOL_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled");
+ tools[TOOL_GRID_SNAP]->connect("toggled", callable_mp(this, &TileSetEditor::_on_grid_snap_toggled));
toolbar->add_child(tools[TOOL_GRID_SNAP]);
Control *separator = memnew(Control);
@@ -570,15 +554,15 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
toolbar->add_child(separator);
tools[ZOOM_OUT] = memnew(ToolButton);
- tools[ZOOM_OUT]->connect("pressed", this, "_zoom_out");
+ tools[ZOOM_OUT]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_out));
toolbar->add_child(tools[ZOOM_OUT]);
tools[ZOOM_OUT]->set_tooltip(TTR("Zoom Out"));
tools[ZOOM_1] = memnew(ToolButton);
- tools[ZOOM_1]->connect("pressed", this, "_zoom_reset");
+ tools[ZOOM_1]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_reset));
toolbar->add_child(tools[ZOOM_1]);
tools[ZOOM_1]->set_tooltip(TTR("Zoom Reset"));
tools[ZOOM_IN] = memnew(ToolButton);
- tools[ZOOM_IN]->connect("pressed", this, "_zoom_in");
+ tools[ZOOM_IN]->connect("pressed", callable_mp(this, &TileSetEditor::_zoom_in));
toolbar->add_child(tools[ZOOM_IN]);
tools[ZOOM_IN]->set_tooltip(TTR("Zoom In"));
@@ -607,13 +591,13 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
scroll->add_child(workspace_container);
workspace_overlay = memnew(Control);
- workspace_overlay->connect("draw", this, "_on_workspace_overlay_draw");
+ workspace_overlay->connect("draw", callable_mp(this, &TileSetEditor::_on_workspace_overlay_draw));
workspace_container->add_child(workspace_overlay);
workspace = memnew(Control);
workspace->set_focus_mode(FOCUS_ALL);
- workspace->connect("draw", this, "_on_workspace_draw");
- workspace->connect("gui_input", this, "_on_workspace_input");
+ workspace->connect("draw", callable_mp(this, &TileSetEditor::_on_workspace_draw));
+ workspace->connect("gui_input", callable_mp(this, &TileSetEditor::_on_workspace_input));
workspace->set_draw_behind_parent(true);
workspace_overlay->add_child(workspace);
@@ -626,7 +610,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
//---------------
cd = memnew(ConfirmationDialog);
add_child(cd);
- cd->connect("confirmed", this, "_on_tileset_toolbar_confirm");
+ cd->connect("confirmed", callable_mp(this, &TileSetEditor::_on_tileset_toolbar_confirm));
//---------------
err_dialog = memnew(AcceptDialog);
@@ -645,7 +629,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
texture_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper());
}
add_child(texture_dialog);
- texture_dialog->connect("files_selected", this, "_on_textures_added");
+ texture_dialog->connect("files_selected", callable_mp(this, &TileSetEditor::_on_textures_added));
//---------------
helper = memnew(TilesetEditorContext(this));
@@ -750,7 +734,7 @@ void TileSetEditor::_on_texture_list_selected(int p_index) {
workspace->update();
}
-void TileSetEditor::_on_textures_added(const PoolStringArray &p_paths) {
+void TileSetEditor::_on_textures_added(const PackedStringArray &p_paths) {
int invalid_count = 0;
for (int i = 0; i < p_paths.size(); i++) {
Ref<Texture2D> t = Ref<Texture2D>(ResourceLoader::load(p_paths[i]));
@@ -1618,16 +1602,14 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
if (dragging_point >= 0) {
dragging_point = -1;
- PoolVector<Vector2> polygon;
+ Vector<Vector2> polygon;
polygon.resize(current_shape.size());
- PoolVector<Vector2>::Write w = polygon.write();
+ Vector2 *w = polygon.ptrw();
for (int i = 0; i < current_shape.size(); i++) {
w[i] = current_shape[i] - shape_anchor;
}
- w.release();
-
undo_redo->create_action(TTR("Edit Occlusion Polygon"));
undo_redo->add_do_method(edited_occlusion_shape.ptr(), "set_polygon", polygon);
undo_redo->add_undo_method(edited_occlusion_shape.ptr(), "set_polygon", edited_occlusion_shape->get_polygon());
@@ -1639,18 +1621,16 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
if (dragging_point >= 0) {
dragging_point = -1;
- PoolVector<Vector2> polygon;
+ Vector<Vector2> polygon;
Vector<int> indices;
polygon.resize(current_shape.size());
- PoolVector<Vector2>::Write w = polygon.write();
+ Vector2 *w = polygon.ptrw();
for (int i = 0; i < current_shape.size(); i++) {
w[i] = current_shape[i] - shape_anchor;
indices.push_back(i);
}
- w.release();
-
undo_redo->create_action(TTR("Edit Navigation Polygon"));
undo_redo->add_do_method(edited_navigation_shape.ptr(), "set_vertices", polygon);
undo_redo->add_undo_method(edited_navigation_shape.ptr(), "set_vertices", edited_navigation_shape->get_vertices());
@@ -1983,7 +1963,7 @@ void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> &points) {
undo_redo->add_do_method(convex.ptr(), "set_points", points);
undo_redo->add_undo_method(convex.ptr(), "set_points", _get_edited_shape_points());
} else if (concave.is_valid()) {
- PoolVector2Array segments;
+ PackedVector2Array segments;
for (int i = 0; i < points.size() - 1; i++) {
segments.push_back(points[i]);
segments.push_back(points[i + 1]);
@@ -2782,7 +2762,7 @@ void TileSetEditor::draw_polygon_shapes() {
colors.push_back(c_bg);
}
} else {
- PoolVector<Vector2> vertices = shape->get_vertices();
+ Vector<Vector2> vertices = shape->get_vertices();
for (int j = 0; j < shape->get_polygon(0).size(); j++) {
polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor);
colors.push_back(c_bg);
@@ -2830,7 +2810,7 @@ void TileSetEditor::draw_polygon_shapes() {
colors.push_back(c_bg);
}
} else {
- PoolVector<Vector2> vertices = shape->get_vertices();
+ Vector<Vector2> vertices = shape->get_vertices();
for (int j = 0; j < shape->get_polygon(0).size(); j++) {
polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor);
colors.push_back(c_bg);
@@ -2917,15 +2897,14 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
} else if (edit_mode == EDITMODE_OCCLUSION) {
Ref<OccluderPolygon2D> shape = memnew(OccluderPolygon2D);
- PoolVector<Vector2> polygon;
+ Vector<Vector2> polygon;
polygon.resize(current_shape.size());
- PoolVector<Vector2>::Write w = polygon.write();
+ Vector2 *w = polygon.ptrw();
for (int i = 0; i < current_shape.size(); i++) {
w[i] = current_shape[i] - shape_anchor;
}
- w.release();
shape->set_polygon(polygon);
undo_redo->create_action(TTR("Create Occlusion Polygon"));
@@ -2943,17 +2922,16 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
} else if (edit_mode == EDITMODE_NAVIGATION) {
Ref<NavigationPolygon> shape = memnew(NavigationPolygon);
- PoolVector<Vector2> polygon;
+ Vector<Vector2> polygon;
Vector<int> indices;
polygon.resize(current_shape.size());
- PoolVector<Vector2>::Write w = polygon.write();
+ Vector2 *w = polygon.ptrw();
for (int i = 0; i < current_shape.size(); i++) {
w[i] = current_shape[i] - shape_anchor;
indices.push_back(i);
}
- w.release();
shape->set_vertices(polygon);
shape->add_polygon(indices);
@@ -2975,7 +2953,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
void TileSetEditor::select_coord(const Vector2 &coord) {
_update_tile_data();
- current_shape = PoolVector2Array();
+ current_shape = PackedVector2Array();
if (get_current_tile() == -1)
return;
Rect2 current_tile_region = tileset->tile_get_region(get_current_tile());
@@ -3006,7 +2984,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
current_shape.resize(0);
if (edited_navigation_shape.is_valid()) {
if (edited_navigation_shape->get_polygon_count() > 0) {
- PoolVector<Vector2> vertices = edited_navigation_shape->get_vertices();
+ Vector<Vector2> vertices = edited_navigation_shape->get_vertices();
for (int i = 0; i < edited_navigation_shape->get_polygon(0).size(); i++) {
current_shape.push_back(vertices[edited_navigation_shape->get_polygon(0)[i]] + current_tile_region.position);
}
@@ -3055,7 +3033,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
current_shape.resize(0);
if (edited_navigation_shape.is_valid()) {
if (edited_navigation_shape->get_polygon_count() > 0) {
- PoolVector<Vector2> vertices = edited_navigation_shape->get_vertices();
+ Vector<Vector2> vertices = edited_navigation_shape->get_vertices();
for (int i = 0; i < edited_navigation_shape->get_polygon(0).size(); i++) {
current_shape.push_back(vertices[edited_navigation_shape->get_polygon(0)[i]] + shape_anchor);
}
@@ -3513,7 +3491,7 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
p_list->push_back(PropertyInfo(Variant::OBJECT, "selected_collision", PROPERTY_HINT_RESOURCE_TYPE, tileset_editor->edited_collision_shape->get_class()));
if (tileset_editor->edited_collision_shape.is_valid()) {
p_list->push_back(PropertyInfo(Variant::BOOL, "selected_collision_one_way", PROPERTY_HINT_NONE));
- p_list->push_back(PropertyInfo(Variant::REAL, "selected_collision_one_way_margin", PROPERTY_HINT_NONE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "selected_collision_one_way_margin", PROPERTY_HINT_NONE));
}
}
if (tileset_editor->edit_mode == TileSetEditor::EDITMODE_NAVIGATION && tileset_editor->edited_navigation_shape.is_valid()) {
@@ -3554,11 +3532,11 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
tileset_editor_button->show();
editor->make_bottom_panel_item_visible(tileset_editor);
- get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process");
+ get_tree()->connect_compat("idle_frame", tileset_editor, "_on_workspace_process");
} else {
editor->hide_bottom_panel();
tileset_editor_button->hide();
- get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process");
+ get_tree()->disconnect_compat("idle_frame", tileset_editor, "_on_workspace_process");
}
}
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 26340824a0..7b49e2ece2 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -123,7 +123,7 @@ class TileSetEditor : public HSplitContainer {
Rect2 edited_region;
bool draw_edited_region;
Vector2 edited_shape_coord;
- PoolVector2Array current_shape;
+ PackedVector2Array current_shape;
Map<Vector2i, SubtileData> current_tile_data;
Map<Vector2, uint32_t> bitmask_map_copy;
@@ -178,7 +178,7 @@ class TileSetEditor : public HSplitContainer {
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
- void _file_load_request(const PoolVector<String> &p_path, int p_at_pos = -1);
+ void _file_load_request(const Vector<String> &p_path, int p_at_pos = -1);
protected:
static void _bind_methods();
@@ -195,7 +195,7 @@ private:
void _on_tileset_toolbar_button_pressed(int p_index);
void _on_tileset_toolbar_confirm();
void _on_texture_list_selected(int p_index);
- void _on_textures_added(const PoolStringArray &p_paths);
+ void _on_textures_added(const PackedStringArray &p_paths);
void _on_edit_mode_changed(int p_edit_mode);
void _on_workspace_mode_changed(int p_workspace_mode);
void _on_workspace_overlay_draw();
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index e17e6a9d16..da80eee253 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -39,14 +39,6 @@ VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = NULL;
void VersionControlEditorPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_selected_a_vcs"), &VersionControlEditorPlugin::_selected_a_vcs);
- ClassDB::bind_method(D_METHOD("_initialize_vcs"), &VersionControlEditorPlugin::_initialize_vcs);
- ClassDB::bind_method(D_METHOD("_send_commit_msg"), &VersionControlEditorPlugin::_send_commit_msg);
- ClassDB::bind_method(D_METHOD("_refresh_stage_area"), &VersionControlEditorPlugin::_refresh_stage_area);
- ClassDB::bind_method(D_METHOD("_stage_all"), &VersionControlEditorPlugin::_stage_all);
- ClassDB::bind_method(D_METHOD("_stage_selected"), &VersionControlEditorPlugin::_stage_selected);
- ClassDB::bind_method(D_METHOD("_view_file_diff"), &VersionControlEditorPlugin::_view_file_diff);
- ClassDB::bind_method(D_METHOD("_refresh_file_diff"), &VersionControlEditorPlugin::_refresh_file_diff);
ClassDB::bind_method(D_METHOD("popup_vcs_set_up_dialog"), &VersionControlEditorPlugin::popup_vcs_set_up_dialog);
// Used to track the status of files in the staging area
@@ -127,7 +119,7 @@ void VersionControlEditorPlugin::_initialize_vcs() {
vcs_interface->set_script_and_instance(script, addon_script_instance);
EditorVCSInterface::set_singleton(vcs_interface);
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_refresh_stage_area");
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
String res_dir = OS::get_singleton()->get_resource_dir();
@@ -388,8 +380,8 @@ void VersionControlEditorPlugin::clear_stage_area() {
void VersionControlEditorPlugin::shut_down() {
if (EditorVCSInterface::get_singleton()) {
- if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "_refresh_stage_area")) {
- EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area");
+ if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area))) {
+ EditorFileSystem::get_singleton()->disconnect("filesystem_changed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
}
EditorVCSInterface::get_singleton()->shut_down();
memdelete(EditorVCSInterface::get_singleton());
@@ -444,14 +436,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_choice = memnew(OptionButton);
set_up_choice->set_h_size_flags(HBoxContainer::SIZE_EXPAND_FILL);
- set_up_choice->connect("item_selected", this, "_selected_a_vcs");
+ set_up_choice->connect("item_selected", callable_mp(this, &VersionControlEditorPlugin::_selected_a_vcs));
set_up_hbc->add_child(set_up_choice);
set_up_init_settings = NULL;
set_up_init_button = memnew(Button);
set_up_init_button->set_text(TTR("Initialize"));
- set_up_init_button->connect("pressed", this, "_initialize_vcs");
+ set_up_init_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_initialize_vcs));
set_up_vbc->add_child(set_up_init_button);
version_control_actions->set_v_size_flags(PopupMenu::SIZE_EXPAND_FILL);
@@ -479,7 +471,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
refresh_button->set_tooltip(TTR("Detect new changes"));
refresh_button->set_text(TTR("Refresh"));
refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
- refresh_button->connect("pressed", this, "_refresh_stage_area");
+ refresh_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
stage_tools->add_child(refresh_button);
stage_files = memnew(Tree);
@@ -492,7 +484,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
stage_files->set_allow_rmb_select(true);
stage_files->set_select_mode(Tree::SelectMode::SELECT_MULTI);
stage_files->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- stage_files->connect("cell_selected", this, "_view_file_diff");
+ stage_files->connect("cell_selected", callable_mp(this, &VersionControlEditorPlugin::_view_file_diff));
stage_files->create_item();
stage_files->set_hide_root(true);
commit_box_vbc->add_child(stage_files);
@@ -516,12 +508,12 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
stage_selected_button = memnew(Button);
stage_selected_button->set_h_size_flags(Button::SIZE_EXPAND_FILL);
stage_selected_button->set_text(TTR("Stage Selected"));
- stage_selected_button->connect("pressed", this, "_stage_selected");
+ stage_selected_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_stage_selected));
stage_buttons->add_child(stage_selected_button);
stage_all_button = memnew(Button);
stage_all_button->set_text(TTR("Stage All"));
- stage_all_button->connect("pressed", this, "_stage_all");
+ stage_all_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_stage_all));
stage_buttons->add_child(stage_all_button);
commit_box_vbc->add_child(memnew(HSeparator));
@@ -537,7 +529,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
commit_button = memnew(Button);
commit_button->set_text(TTR("Commit Changes"));
- commit_button->connect("pressed", this, "_send_commit_msg");
+ commit_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_send_commit_msg));
commit_box_vbc->add_child(commit_button);
commit_status = memnew(Label);
@@ -571,7 +563,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
diff_refresh_button = memnew(Button);
diff_refresh_button->set_tooltip(TTR("Detect changes in file diff"));
diff_refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
- diff_refresh_button->connect("pressed", this, "_refresh_file_diff");
+ diff_refresh_button->connect("pressed", callable_mp(this, &VersionControlEditorPlugin::_refresh_file_diff));
diff_hbc->add_child(diff_refresh_button);
diff = memnew(RichTextLabel);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index ecc140d7d2..9100e28352 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -35,6 +35,7 @@
#include "core/os/input.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
+#include "core/version.h"
#include "editor/editor_log.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
@@ -72,14 +73,20 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
}
}
visual_shader = Ref<VisualShader>(p_visual_shader);
- if (!visual_shader->is_connected("changed", this, "_update_preview")) {
- visual_shader->connect("changed", this, "_update_preview");
+ if (!visual_shader->is_connected("changed", callable_mp(this, &VisualShaderEditor::_update_preview))) {
+ visual_shader->connect("changed", callable_mp(this, &VisualShaderEditor::_update_preview));
}
+#ifndef DISABLE_DEPRECATED
+ String version = VERSION_BRANCH;
+ if (visual_shader->get_version() != version) {
+ visual_shader->update_version(version);
+ }
+#endif
visual_shader->set_graph_offset(graph->get_scroll_ofs() / EDSCALE);
} else {
if (visual_shader.is_valid()) {
- if (visual_shader->is_connected("changed", this, "")) {
- visual_shader->disconnect("changed", this, "_update_preview");
+ if (visual_shader->is_connected("changed", callable_mp(this, &VisualShaderEditor::_update_preview))) {
+ visual_shader->disconnect("changed", callable_mp(this, &VisualShaderEditor::_update_preview));
}
}
visual_shader.unref();
@@ -116,7 +123,7 @@ void VisualShaderEditor::clear_custom_types() {
}
}
-void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, const String &p_subcategory, bool p_highend) {
+void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend) {
ERR_FAIL_COND(!p_name.is_valid_identifier());
ERR_FAIL_COND(!p_script.is_valid());
@@ -134,15 +141,15 @@ void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script>
ao.return_type = p_return_icon_type;
ao.description = p_description;
ao.category = p_category;
- ao.sub_category = p_subcategory;
ao.highend = p_highend;
ao.is_custom = true;
bool begin = false;
+ String root = p_category.split("/")[0];
for (int i = 0; i < add_options.size(); i++) {
if (add_options[i].is_custom) {
- if (add_options[i].category == p_category) {
+ if (add_options[i].category == root) {
if (!begin) {
begin = true;
}
@@ -239,9 +246,6 @@ void VisualShaderEditor::update_custom_nodes() {
if (ref->has_method("_get_category")) {
category = (String)ref->call("_get_category");
}
- if (category == "") {
- category = "Custom";
- }
String subcategory = "";
if (ref->has_method("_get_subcategory")) {
@@ -258,18 +262,19 @@ void VisualShaderEditor::update_custom_nodes() {
dict["script"] = script;
dict["description"] = description;
dict["return_icon_type"] = return_icon_type;
+
+ category = category.rstrip("/");
+ category = category.lstrip("/");
+ category = "Addons/" + category;
+ if (subcategory != "") {
+ category += "/" + subcategory;
+ }
+
dict["category"] = category;
- dict["subcategory"] = subcategory;
dict["highend"] = highend;
String key;
- key = category;
- key += "/";
- if (subcategory != "") {
- key += subcategory;
- key += "/";
- }
- key += name;
+ key = category + "/" + name;
added[key] = dict;
}
@@ -284,7 +289,7 @@ void VisualShaderEditor::update_custom_nodes() {
const Dictionary &value = (Dictionary)added[key];
- add_custom_type(value["name"], value["script"], value["description"], value["return_icon_type"], value["category"], value["subcategory"], value["highend"]);
+ add_custom_type(value["name"], value["script"], value["description"], value["return_icon_type"], value["category"], value["highend"]);
}
_update_options_menu();
@@ -299,22 +304,12 @@ void VisualShaderEditor::_update_options_menu() {
node_desc->set_text("");
members_dialog->get_ok()->set_disabled(true);
- String prev_category;
- String prev_sub_category;
-
members->clear();
TreeItem *root = members->create_item();
- TreeItem *category = NULL;
- TreeItem *sub_category = NULL;
String filter = node_filter->get_text().strip_edges();
bool use_filter = !filter.empty();
- Vector<String> categories;
- Vector<String> sub_categories;
-
- int item_count = 0;
- int item_count2 = 0;
bool is_first_item = true;
Color unsupported_color = get_color("error_color", "Editor");
@@ -322,111 +317,95 @@ void VisualShaderEditor::_update_options_menu() {
static bool low_driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES2";
+ Map<String, TreeItem *> folders;
+
int current_func = -1;
if (!visual_shader.is_null()) {
current_func = visual_shader->get_mode();
}
- for (int i = 0; i < add_options.size() + 1; i++) {
+ Vector<AddOption> custom_options;
+ Vector<AddOption> embedded_options;
- if (i == add_options.size()) {
- if (sub_category != NULL && item_count2 == 0) {
- memdelete(sub_category);
- --item_count;
+ for (int i = 0; i < add_options.size(); i++) {
+ if (!use_filter || add_options[i].name.findn(filter) != -1) {
+ if ((add_options[i].func != current_func && add_options[i].func != -1) || !_is_available(add_options[i].mode)) {
+ continue;
}
- if (category != NULL && item_count == 0) {
- memdelete(category);
+ const_cast<AddOption &>(add_options[i]).temp_idx = i; // save valid id
+ if (add_options[i].is_custom) {
+ custom_options.push_back(add_options[i]);
+ } else {
+ embedded_options.push_back(add_options[i]);
}
- break;
}
+ }
+ Vector<AddOption> options;
+ SortArray<AddOption, _OptionComparator> sorter;
+ sorter.sort(custom_options.ptrw(), custom_options.size());
- if (!use_filter || add_options[i].name.findn(filter) != -1) {
+ options.append_array(custom_options);
+ options.append_array(embedded_options);
- if ((add_options[i].func != current_func && add_options[i].func != -1) || !_is_available(add_options[i].mode))
- continue;
-
- if (prev_category != add_options[i].category) {
- if (category != NULL && item_count == 0) {
- memdelete(category);
- }
+ for (int i = 0; i < options.size(); i++) {
+ String path = options[i].category;
+ Vector<String> subfolders = path.split("/");
+ TreeItem *category = NULL;
- item_count = 0;
- prev_sub_category = "";
- category = members->create_item(root);
- category->set_text(0, add_options[i].category);
- category->set_selectable(0, false);
- if (!use_filter)
- category->set_collapsed(true);
- }
-
- if (add_options[i].sub_category != "") {
- if (prev_sub_category != add_options[i].sub_category) {
- if (category != NULL) {
- if (sub_category != NULL && item_count2 == 0) {
- memdelete(sub_category);
- --item_count;
- }
- ++item_count;
- item_count2 = 0;
- sub_category = members->create_item(category);
- sub_category->set_text(0, add_options[i].sub_category);
- sub_category->set_selectable(0, false);
- if (!use_filter)
- sub_category->set_collapsed(true);
- }
- }
- } else {
- sub_category = NULL;
- }
-
- TreeItem *p_category = NULL;
-
- if (sub_category != NULL) {
- p_category = sub_category;
- ++item_count2;
- } else if (category != NULL) {
- p_category = category;
- ++item_count;
- }
-
- if (p_category != NULL) {
- TreeItem *item = members->create_item(p_category);
- if (add_options[i].highend && low_driver)
- item->set_custom_color(0, unsupported_color);
- else if (add_options[i].highend)
- item->set_custom_color(0, supported_color);
- item->set_text(0, add_options[i].name);
- if (is_first_item && use_filter) {
- item->select(0);
- node_desc->set_text(_get_description(i));
- is_first_item = false;
- }
- switch (add_options[i].return_type) {
- case VisualShaderNode::PORT_TYPE_SCALAR:
- item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"));
- break;
- case VisualShaderNode::PORT_TYPE_VECTOR:
- item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"));
- break;
- case VisualShaderNode::PORT_TYPE_BOOLEAN:
- item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"));
- break;
- case VisualShaderNode::PORT_TYPE_TRANSFORM:
- item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"));
- break;
- case VisualShaderNode::PORT_TYPE_SAMPLER:
- item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("ImageTexture", "EditorIcons"));
- break;
- default:
- break;
+ if (!folders.has(path)) {
+ category = root;
+ String path_temp = "";
+ for (int j = 0; j < subfolders.size(); j++) {
+ path_temp += subfolders[j];
+ if (!folders.has(path_temp)) {
+ category = members->create_item(category);
+ category->set_selectable(0, false);
+ category->set_collapsed(!use_filter);
+ category->set_text(0, subfolders[j]);
+ folders.insert(path_temp, category);
+ } else {
+ category = folders[path_temp];
}
- item->set_meta("id", i);
}
-
- prev_sub_category = add_options[i].sub_category;
- prev_category = add_options[i].category;
+ } else {
+ category = folders[path];
+ }
+
+ TreeItem *item = members->create_item(category);
+ if (options[i].highend && low_driver)
+ item->set_custom_color(0, unsupported_color);
+ else if (options[i].highend)
+ item->set_custom_color(0, supported_color);
+ item->set_text(0, options[i].name);
+ if (is_first_item && use_filter) {
+ item->select(0);
+ node_desc->set_text(options[i].description);
+ is_first_item = false;
+ }
+ switch (options[i].return_type) {
+ case VisualShaderNode::PORT_TYPE_SCALAR:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"));
+ break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons"));
+ break;
+ case VisualShaderNode::PORT_TYPE_VECTOR:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"));
+ break;
+ case VisualShaderNode::PORT_TYPE_BOOLEAN:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"));
+ break;
+ case VisualShaderNode::PORT_TYPE_TRANSFORM:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"));
+ break;
+ case VisualShaderNode::PORT_TYPE_SAMPLER:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("ImageTexture", "EditorIcons"));
+ break;
+ default:
+ break;
}
+ item->set_meta("id", options[i].temp_idx);
}
}
@@ -459,14 +438,22 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) {
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
Ref<StyleBoxFlat> sb = node->get_stylebox("frame", "GraphNode");
Color c = sb->get_border_color();
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
+ Color ic;
+ Color mono_color;
+ if (((c.r + c.g + c.b) / 3) < 0.7) {
+ mono_color = Color(1.0, 1.0, 1.0);
+ ic = Color(0.0, 0.0, 0.0, 0.7);
+ } else {
+ mono_color = Color(0.0, 0.0, 0.0);
+ ic = Color(1.0, 1.0, 1.0, 0.7);
+ }
mono_color.a = 0.85;
c = mono_color;
node->add_color_override("title_color", c);
c.a = 0.7;
node->add_color_override("close_color", c);
- node->add_color_override("resizer_color", c);
+ node->add_color_override("resizer_color", ic);
}
}
@@ -493,12 +480,13 @@ void VisualShaderEditor::_update_graph() {
}
}
- static const Color type_color[5] = {
- Color(0.38, 0.85, 0.96), // scalar
+ static const Color type_color[6] = {
+ Color(0.38, 0.85, 0.96), // scalar (float)
+ Color(0.49, 0.78, 0.94), // scalar (int)
Color(0.84, 0.49, 0.93), // vector
Color(0.55, 0.65, 0.94), // boolean
Color(0.96, 0.66, 0.43), // transform
- Color(1.0, 1.0, 0.0) // sampler
+ Color(1.0, 1.0, 0.0), // sampler
};
List<VisualShader::Connection> connections;
@@ -529,16 +517,12 @@ void VisualShaderEditor::_update_graph() {
size = group_node->get_size();
node->set_resizable(true);
- node->connect("resize_request", this, "_node_resized", varray((int)type, nodes[n_i]));
+ node->connect("resize_request", callable_mp(this, &VisualShaderEditor::_node_resized), varray((int)type, nodes[n_i]));
}
if (is_expression) {
expression = expression_node->get_expression();
}
- /*if (!vsnode->is_connected("changed", this, "_node_changed")) {
- vsnode->connect("changed", this, "_node_changed", varray(vsnode->get_instance_id()), CONNECT_DEFERRED);
- }*/
-
node->set_offset(position);
node->set_title(vsnode->get_caption());
@@ -546,10 +530,10 @@ void VisualShaderEditor::_update_graph() {
if (nodes[n_i] >= 2) {
node->set_show_close_button(true);
- node->connect("close_request", this, "_delete_request", varray(nodes[n_i]), CONNECT_DEFERRED);
+ node->connect("close_request", callable_mp(this, &VisualShaderEditor::_delete_request), varray(nodes[n_i]), CONNECT_DEFERRED);
}
- node->connect("dragged", this, "_node_dragged", varray(nodes[n_i]));
+ node->connect("dragged", callable_mp(this, &VisualShaderEditor::_node_dragged), varray(nodes[n_i]));
Control *custom_editor = NULL;
int port_offset = 0;
@@ -559,7 +543,8 @@ void VisualShaderEditor::_update_graph() {
}
Ref<VisualShaderNodeUniform> uniform = vsnode;
- Ref<VisualShaderNodeScalarUniform> scalar_uniform = vsnode;
+ Ref<VisualShaderNodeFloatUniform> float_uniform = vsnode;
+ Ref<VisualShaderNodeIntUniform> int_uniform = vsnode;
if (uniform.is_valid()) {
graph->add_child(node);
_update_created_node(node);
@@ -567,14 +552,14 @@ void VisualShaderEditor::_update_graph() {
LineEdit *uniform_name = memnew(LineEdit);
uniform_name->set_text(uniform->get_uniform_name());
node->add_child(uniform_name);
- uniform_name->connect("text_entered", this, "_line_edit_changed", varray(uniform_name, nodes[n_i]));
- uniform_name->connect("focus_exited", this, "_line_edit_focus_out", varray(uniform_name, nodes[n_i]));
+ uniform_name->connect("text_entered", callable_mp(this, &VisualShaderEditor::_line_edit_changed), varray(uniform_name, nodes[n_i]));
+ uniform_name->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_line_edit_focus_out), varray(uniform_name, nodes[n_i]));
if (vsnode->get_input_port_count() == 0 && vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") {
//shortcut
VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0);
node->set_slot(0, false, VisualShaderNode::PORT_TYPE_SCALAR, Color(), true, port_right, type_color[port_right]);
- if (!scalar_uniform.is_valid()) {
+ if (!float_uniform.is_valid() && !int_uniform.is_valid()) {
continue;
}
}
@@ -588,13 +573,13 @@ void VisualShaderEditor::_update_graph() {
}
}
- if (custom_editor && !scalar_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
+ if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
//will be embedded in first port
} else if (custom_editor) {
port_offset++;
node->add_child(custom_editor);
- if (scalar_uniform.is_valid()) {
+ if (float_uniform.is_valid() || int_uniform.is_valid()) {
custom_editor->call_deferred("_show_prop_names", true);
continue;
}
@@ -612,14 +597,14 @@ void VisualShaderEditor::_update_graph() {
Button *add_input_btn = memnew(Button);
add_input_btn->set_text(TTR("Add Input"));
- add_input_btn->connect("pressed", this, "_add_input_port", varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), CONNECT_DEFERRED);
+ add_input_btn->connect("pressed", callable_mp(this, &VisualShaderEditor::_add_input_port), varray(nodes[n_i], group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "input" + itos(group_node->get_free_input_port_id())), CONNECT_DEFERRED);
hb2->add_child(add_input_btn);
hb2->add_spacer();
Button *add_output_btn = memnew(Button);
add_output_btn->set_text(TTR("Add Output"));
- add_output_btn->connect("pressed", this, "_add_output_port", varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED);
+ add_output_btn->connect("pressed", callable_mp(this, &VisualShaderEditor::_add_output_port), varray(nodes[n_i], group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR, "output" + itos(group_node->get_free_output_port_id())), CONNECT_DEFERRED);
hb2->add_child(add_output_btn);
node->add_child(hb2);
@@ -667,19 +652,19 @@ void VisualShaderEditor::_update_graph() {
if (default_value.get_type() != Variant::NIL) { // only a label
Button *button = memnew(Button);
hb->add_child(button);
- button->connect("pressed", this, "_edit_port_default_input", varray(button, nodes[n_i], i));
+ button->connect("pressed", callable_mp(this, &VisualShaderEditor::_edit_port_default_input), varray(button, nodes[n_i], i));
switch (default_value.get_type()) {
case Variant::COLOR: {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- button->connect("draw", this, "_draw_color_over_button", varray(button, default_value));
+ button->connect("draw", callable_mp(this, &VisualShaderEditor::_draw_color_over_button), varray(button, default_value));
} break;
case Variant::BOOL: {
button->set_text(((bool)default_value) ? "true" : "false");
} break;
case Variant::INT:
- case Variant::REAL: {
+ case Variant::FLOAT: {
button->set_text(String::num(default_value, 4));
} break;
case Variant::VECTOR3: {
@@ -701,27 +686,28 @@ void VisualShaderEditor::_update_graph() {
if (is_group) {
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
- type_box->add_item(TTR("Scalar"));
+ type_box->add_item(TTR("Float"));
+ type_box->add_item(TTR("Int"));
type_box->add_item(TTR("Vector"));
type_box->add_item(TTR("Boolean"));
type_box->add_item(TTR("Transform"));
type_box->add_item(TTR("Sampler"));
type_box->select(group_node->get_input_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", this, "_change_input_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ type_box->connect("item_selected", callable_mp(this, &VisualShaderEditor::_change_input_port_type), varray(nodes[n_i], i), CONNECT_DEFERRED);
LineEdit *name_box = memnew(LineEdit);
hb->add_child(name_box);
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(SIZE_EXPAND_FILL);
name_box->set_text(name_left);
- name_box->connect("text_entered", this, "_change_input_port_name", varray(name_box, nodes[n_i], i));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, false));
+ name_box->connect("text_entered", callable_mp(this, &VisualShaderEditor::_change_input_port_name), varray(name_box, nodes[n_i], i));
+ name_box->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_port_name_focus_out), varray(name_box, nodes[n_i], i, false));
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", this, "_remove_input_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ remove_btn->connect("pressed", callable_mp(this, &VisualShaderEditor::_remove_input_port), varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
} else {
@@ -750,7 +736,7 @@ void VisualShaderEditor::_update_graph() {
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", this, "_remove_output_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ remove_btn->connect("pressed", callable_mp(this, &VisualShaderEditor::_remove_output_port), varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
LineEdit *name_box = memnew(LineEdit);
@@ -758,18 +744,19 @@ void VisualShaderEditor::_update_graph() {
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(SIZE_EXPAND_FILL);
name_box->set_text(name_right);
- name_box->connect("text_entered", this, "_change_output_port_name", varray(name_box, nodes[n_i], i));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, nodes[n_i], i, true));
+ name_box->connect("text_entered", callable_mp(this, &VisualShaderEditor::_change_output_port_name), varray(name_box, nodes[n_i], i));
+ name_box->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_port_name_focus_out), varray(name_box, nodes[n_i], i, true));
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
- type_box->add_item(TTR("Scalar"));
+ type_box->add_item(TTR("Float"));
+ type_box->add_item(TTR("Int"));
type_box->add_item(TTR("Vector"));
type_box->add_item(TTR("Boolean"));
type_box->add_item(TTR("Transform"));
type_box->select(group_node->get_output_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", this, "_change_output_port_type", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ type_box->connect("item_selected", callable_mp(this, &VisualShaderEditor::_change_output_port_type), varray(nodes[n_i], i), CONNECT_DEFERRED);
} else {
Label *label = memnew(Label);
label->set_text(name_right);
@@ -790,7 +777,7 @@ void VisualShaderEditor::_update_graph() {
preview->set_pressed(true);
}
- preview->connect("pressed", this, "_preview_select_port", varray(nodes[n_i], i), CONNECT_DEFERRED);
+ preview->connect("pressed", callable_mp(this, &VisualShaderEditor::_preview_select_port), varray(nodes[n_i], i), CONNECT_DEFERRED);
hb->add_child(preview);
}
@@ -863,7 +850,7 @@ void VisualShaderEditor::_update_graph() {
expression_box->set_context_menu_enabled(false);
expression_box->set_show_line_numbers(true);
- expression_box->connect("focus_exited", this, "_expression_focus_out", varray(expression_box, nodes[n_i]));
+ expression_box->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_expression_focus_out), varray(expression_box, nodes[n_i]));
}
if (!uniform.is_valid()) {
@@ -1326,7 +1313,7 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(add_options[p_idx].type));
ERR_FAIL_COND_V(!vsn, NULL);
- VisualShaderNodeScalarConstant *constant = Object::cast_to<VisualShaderNodeScalarConstant>(vsn);
+ VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn);
if (constant) {
if ((int)add_options[p_idx].value != -1)
@@ -1365,16 +1352,28 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
colorFunc->set_function((VisualShaderNodeColorFunc::Function)p_op_idx);
}
- VisualShaderNodeScalarOp *scalarOp = Object::cast_to<VisualShaderNodeScalarOp>(vsn);
+ VisualShaderNodeFloatOp *floatOp = Object::cast_to<VisualShaderNodeFloatOp>(vsn);
- if (scalarOp) {
- scalarOp->set_operator((VisualShaderNodeScalarOp::Operator)p_op_idx);
+ if (floatOp) {
+ floatOp->set_operator((VisualShaderNodeFloatOp::Operator)p_op_idx);
}
- VisualShaderNodeScalarFunc *scalarFunc = Object::cast_to<VisualShaderNodeScalarFunc>(vsn);
+ VisualShaderNodeIntOp *intOp = Object::cast_to<VisualShaderNodeIntOp>(vsn);
- if (scalarFunc) {
- scalarFunc->set_function((VisualShaderNodeScalarFunc::Function)p_op_idx);
+ if (intOp) {
+ intOp->set_operator((VisualShaderNodeIntOp::Operator)p_op_idx);
+ }
+
+ VisualShaderNodeFloatFunc *floatFunc = Object::cast_to<VisualShaderNodeFloatFunc>(vsn);
+
+ if (floatFunc) {
+ floatFunc->set_function((VisualShaderNodeFloatFunc::Function)p_op_idx);
+ }
+
+ VisualShaderNodeIntFunc *intFunc = Object::cast_to<VisualShaderNodeIntFunc>(vsn);
+
+ if (intFunc) {
+ intFunc->set_function((VisualShaderNodeIntFunc::Function)p_op_idx);
}
VisualShaderNodeVectorOp *vecOp = Object::cast_to<VisualShaderNodeVectorOp>(vsn);
@@ -1606,8 +1605,29 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT)
- _show_members_dialog(true);
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
+ List<int> to_change;
+ for (int i = 0; i < graph->get_child_count(); i++) {
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
+ if (gn) {
+ if (gn->is_selected() && gn->is_close_button_visible()) {
+ to_change.push_back(gn->get_name().operator String().to_int());
+ }
+ }
+ }
+ if (to_change.empty() && copy_nodes_buffer.empty()) {
+ _show_members_dialog(true);
+ } else {
+ popup_menu->set_item_disabled(NodeMenuOptions::COPY, to_change.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::PASTE, copy_nodes_buffer.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::DELETE, to_change.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::DUPLICATE, to_change.empty());
+ menu_point = graph->get_local_mouse_position();
+ Point2 gpos = Input::get_singleton()->get_mouse_position();
+ popup_menu->set_position(gpos);
+ popup_menu->popup();
+ }
+ }
}
void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) {
@@ -1643,10 +1663,10 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) {
void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> ie = p_ie;
- if (ie.is_valid() && (ie->get_scancode() == KEY_UP ||
- ie->get_scancode() == KEY_DOWN ||
- ie->get_scancode() == KEY_ENTER ||
- ie->get_scancode() == KEY_KP_ENTER)) {
+ if (ie.is_valid() && (ie->get_keycode() == KEY_UP ||
+ ie->get_keycode() == KEY_DOWN ||
+ ie->get_keycode() == KEY_ENTER ||
+ ie->get_keycode() == KEY_KP_ENTER)) {
members->call("_gui_input", ie);
node_filter->accept_event();
@@ -1905,7 +1925,7 @@ void VisualShaderEditor::_copy_nodes() {
_dup_copy_nodes(copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer);
}
-void VisualShaderEditor::_paste_nodes() {
+void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 &p_custom_position) {
if (copy_nodes_buffer.empty())
return;
@@ -1916,12 +1936,19 @@ void VisualShaderEditor::_paste_nodes() {
float scale = graph->get_zoom();
- _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + graph->get_local_mouse_position() / scale - selection_center), false);
+ Vector2 mpos;
+ if (p_use_custom_position) {
+ mpos = p_custom_position;
+ } else {
+ mpos = graph->get_local_mouse_position();
+ }
+
+ _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + mpos / scale - selection_center), false);
_dup_update_excluded(type, copy_nodes_excluded_buffer); // to prevent selection of previous copies at new paste
}
-void VisualShaderEditor::_on_nodes_delete() {
+void VisualShaderEditor::_delete_nodes() {
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
List<int> to_erase;
@@ -2107,6 +2134,26 @@ void VisualShaderEditor::_tools_menu_option(int p_idx) {
}
}
+void VisualShaderEditor::_node_menu_id_pressed(int p_idx) {
+ switch (p_idx) {
+ case NodeMenuOptions::ADD:
+ _show_members_dialog(true);
+ break;
+ case NodeMenuOptions::COPY:
+ _copy_nodes();
+ break;
+ case NodeMenuOptions::PASTE:
+ _paste_nodes(true, menu_point);
+ break;
+ case NodeMenuOptions::DELETE:
+ _delete_nodes();
+ break;
+ case NodeMenuOptions::DUPLICATE:
+ _duplicate_nodes();
+ break;
+ }
+}
+
Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
if (p_from == members) {
@@ -2164,10 +2211,10 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
saved_node_pos_dirty = true;
_add_node(idx, add_options[idx].sub_func);
} else if (d.has("files")) {
- if (d["files"].get_type() == Variant::POOL_STRING_ARRAY) {
+ if (d["files"].get_type() == Variant::PACKED_STRING_ARRAY) {
int j = 0;
- PoolStringArray arr = d["files"];
+ PackedStringArray arr = d["files"];
for (int i = 0; i < arr.size(); i++) {
String type = ResourceLoader::get_resource_type(arr[i]);
@@ -2237,57 +2284,17 @@ void VisualShaderEditor::_bind_methods() {
ClassDB::bind_method("_rebuild", &VisualShaderEditor::_rebuild);
ClassDB::bind_method("_update_graph", &VisualShaderEditor::_update_graph);
ClassDB::bind_method("_update_options_menu", &VisualShaderEditor::_update_options_menu);
- ClassDB::bind_method("_expression_focus_out", &VisualShaderEditor::_expression_focus_out);
ClassDB::bind_method("_add_node", &VisualShaderEditor::_add_node);
- ClassDB::bind_method("_node_dragged", &VisualShaderEditor::_node_dragged);
- ClassDB::bind_method("_connection_request", &VisualShaderEditor::_connection_request);
- ClassDB::bind_method("_disconnection_request", &VisualShaderEditor::_disconnection_request);
- ClassDB::bind_method("_node_selected", &VisualShaderEditor::_node_selected);
- ClassDB::bind_method("_scroll_changed", &VisualShaderEditor::_scroll_changed);
- ClassDB::bind_method("_delete_request", &VisualShaderEditor::_delete_request);
- ClassDB::bind_method("_on_nodes_delete", &VisualShaderEditor::_on_nodes_delete);
ClassDB::bind_method("_node_changed", &VisualShaderEditor::_node_changed);
- ClassDB::bind_method("_edit_port_default_input", &VisualShaderEditor::_edit_port_default_input);
- ClassDB::bind_method("_port_edited", &VisualShaderEditor::_port_edited);
- ClassDB::bind_method("_connection_to_empty", &VisualShaderEditor::_connection_to_empty);
- ClassDB::bind_method("_connection_from_empty", &VisualShaderEditor::_connection_from_empty);
- ClassDB::bind_method("_line_edit_focus_out", &VisualShaderEditor::_line_edit_focus_out);
- ClassDB::bind_method("_line_edit_changed", &VisualShaderEditor::_line_edit_changed);
- ClassDB::bind_method("_port_name_focus_out", &VisualShaderEditor::_port_name_focus_out);
- ClassDB::bind_method("_duplicate_nodes", &VisualShaderEditor::_duplicate_nodes);
- ClassDB::bind_method("_copy_nodes", &VisualShaderEditor::_copy_nodes);
- ClassDB::bind_method("_paste_nodes", &VisualShaderEditor::_paste_nodes);
- ClassDB::bind_method("_mode_selected", &VisualShaderEditor::_mode_selected);
ClassDB::bind_method("_input_select_item", &VisualShaderEditor::_input_select_item);
- ClassDB::bind_method("_preview_select_port", &VisualShaderEditor::_preview_select_port);
- ClassDB::bind_method("_graph_gui_input", &VisualShaderEditor::_graph_gui_input);
- ClassDB::bind_method("_add_input_port", &VisualShaderEditor::_add_input_port);
- ClassDB::bind_method("_change_input_port_type", &VisualShaderEditor::_change_input_port_type);
- ClassDB::bind_method("_change_input_port_name", &VisualShaderEditor::_change_input_port_name);
- ClassDB::bind_method("_remove_input_port", &VisualShaderEditor::_remove_input_port);
- ClassDB::bind_method("_add_output_port", &VisualShaderEditor::_add_output_port);
- ClassDB::bind_method("_change_output_port_type", &VisualShaderEditor::_change_output_port_type);
- ClassDB::bind_method("_change_output_port_name", &VisualShaderEditor::_change_output_port_name);
- ClassDB::bind_method("_remove_output_port", &VisualShaderEditor::_remove_output_port);
- ClassDB::bind_method("_node_resized", &VisualShaderEditor::_node_resized);
ClassDB::bind_method("_set_node_size", &VisualShaderEditor::_set_node_size);
ClassDB::bind_method("_clear_buffer", &VisualShaderEditor::_clear_buffer);
- ClassDB::bind_method("_show_preview_text", &VisualShaderEditor::_show_preview_text);
- ClassDB::bind_method("_update_preview", &VisualShaderEditor::_update_preview);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &VisualShaderEditor::drop_data_fw);
ClassDB::bind_method("_is_available", &VisualShaderEditor::_is_available);
- ClassDB::bind_method("_tools_menu_option", &VisualShaderEditor::_tools_menu_option);
- ClassDB::bind_method("_show_members_dialog", &VisualShaderEditor::_show_members_dialog);
- ClassDB::bind_method("_sbox_input", &VisualShaderEditor::_sbox_input);
- ClassDB::bind_method("_member_filter_changed", &VisualShaderEditor::_member_filter_changed);
- ClassDB::bind_method("_member_selected", &VisualShaderEditor::_member_selected);
- ClassDB::bind_method("_member_unselected", &VisualShaderEditor::_member_unselected);
- ClassDB::bind_method("_member_create", &VisualShaderEditor::_member_create);
- ClassDB::bind_method("_member_cancel", &VisualShaderEditor::_member_cancel);
}
VisualShaderEditor *VisualShaderEditor::singleton = NULL;
@@ -2321,30 +2328,38 @@ VisualShaderEditor::VisualShaderEditor() {
main_box->add_child(graph);
graph->set_drag_forwarding(this);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_TRANSFORM);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SAMPLER);
//graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", this, "_connection_request", varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", this, "_disconnection_request", varray(), CONNECT_DEFERRED);
- graph->connect("node_selected", this, "_node_selected");
- graph->connect("scroll_offset_changed", this, "_scroll_changed");
- graph->connect("duplicate_nodes_request", this, "_duplicate_nodes");
- graph->connect("copy_nodes_request", this, "_copy_nodes");
- graph->connect("paste_nodes_request", this, "_paste_nodes");
- graph->connect("delete_nodes_request", this, "_on_nodes_delete");
- graph->connect("gui_input", this, "_graph_gui_input");
- graph->connect("connection_to_empty", this, "_connection_to_empty");
- graph->connect("connection_from_empty", this, "_connection_from_empty");
+ graph->connect("connection_request", callable_mp(this, &VisualShaderEditor::_connection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("disconnection_request", callable_mp(this, &VisualShaderEditor::_disconnection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("node_selected", callable_mp(this, &VisualShaderEditor::_node_selected));
+ graph->connect("scroll_offset_changed", callable_mp(this, &VisualShaderEditor::_scroll_changed));
+ graph->connect("duplicate_nodes_request", callable_mp(this, &VisualShaderEditor::_duplicate_nodes));
+ graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes));
+ graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes));
+ graph->connect("delete_nodes_request", callable_mp(this, &VisualShaderEditor::_delete_nodes));
+ graph->connect("gui_input", callable_mp(this, &VisualShaderEditor::_graph_gui_input));
+ graph->connect("connection_to_empty", callable_mp(this, &VisualShaderEditor::_connection_to_empty));
+ graph->connect("connection_from_empty", callable_mp(this, &VisualShaderEditor::_connection_from_empty));
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_BOOLEAN);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShaderNode::PORT_TYPE_TRANSFORM);
@@ -2359,7 +2374,7 @@ VisualShaderEditor::VisualShaderEditor() {
edit_type->add_item(TTR("Fragment"));
edit_type->add_item(TTR("Light"));
edit_type->select(1);
- edit_type->connect("item_selected", this, "_mode_selected");
+ edit_type->connect("item_selected", callable_mp(this, &VisualShaderEditor::_mode_selected));
graph->get_zoom_hbox()->add_child(edit_type);
graph->get_zoom_hbox()->move_child(edit_type, 0);
@@ -2367,13 +2382,13 @@ VisualShaderEditor::VisualShaderEditor() {
graph->get_zoom_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->connect("pressed", this, "_show_members_dialog", varray(false));
+ add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog), varray(false));
preview_shader = memnew(ToolButton);
preview_shader->set_toggle_mode(true);
preview_shader->set_tooltip(TTR("Show resulted shader code."));
graph->get_zoom_hbox()->add_child(preview_shader);
- preview_shader->connect("pressed", this, "_show_preview_text");
+ preview_shader->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_preview_text));
///////////////////////////////////////
// PREVIEW PANEL
@@ -2396,6 +2411,20 @@ VisualShaderEditor::VisualShaderEditor() {
error_text->set_visible(false);
///////////////////////////////////////
+ // POPUP MENU
+ ///////////////////////////////////////
+
+ popup_menu = memnew(PopupMenu);
+ add_child(popup_menu);
+ popup_menu->add_item("Add Node", NodeMenuOptions::ADD);
+ popup_menu->add_separator();
+ popup_menu->add_item("Copy", NodeMenuOptions::COPY);
+ popup_menu->add_item("Paste", NodeMenuOptions::PASTE);
+ popup_menu->add_item("Delete", NodeMenuOptions::DELETE);
+ popup_menu->add_item("Duplicate", NodeMenuOptions::DUPLICATE);
+ popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed));
+
+ ///////////////////////////////////////
// SHADER NODES TREE
///////////////////////////////////////
@@ -2407,15 +2436,15 @@ VisualShaderEditor::VisualShaderEditor() {
node_filter = memnew(LineEdit);
filter_hb->add_child(node_filter);
- node_filter->connect("text_changed", this, "_member_filter_changed");
- node_filter->connect("gui_input", this, "_sbox_input");
+ node_filter->connect("text_changed", callable_mp(this, &VisualShaderEditor::_member_filter_changed));
+ node_filter->connect("gui_input", callable_mp(this, &VisualShaderEditor::_sbox_input));
node_filter->set_h_size_flags(SIZE_EXPAND_FILL);
node_filter->set_placeholder(TTR("Search"));
tools = memnew(MenuButton);
filter_hb->add_child(tools);
tools->set_tooltip(TTR("Options"));
- tools->get_popup()->connect("id_pressed", this, "_tools_menu_option");
+ tools->get_popup()->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_tools_menu_option));
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
@@ -2428,9 +2457,9 @@ VisualShaderEditor::VisualShaderEditor() {
members->set_allow_reselect(true);
members->set_hide_folding(false);
members->set_custom_minimum_size(Size2(180 * EDSCALE, 200 * EDSCALE));
- members->connect("item_activated", this, "_member_create");
- members->connect("item_selected", this, "_member_selected");
- members->connect("nothing_selected", this, "_member_unselected");
+ members->connect("item_activated", callable_mp(this, &VisualShaderEditor::_member_create));
+ members->connect("item_selected", callable_mp(this, &VisualShaderEditor::_member_selected));
+ members->connect("nothing_selected", callable_mp(this, &VisualShaderEditor::_member_unselected));
HBoxContainer *desc_hbox = memnew(HBoxContainer);
members_vb->add_child(desc_hbox);
@@ -2458,11 +2487,11 @@ VisualShaderEditor::VisualShaderEditor() {
members_dialog->set_title(TTR("Create Shader Node"));
members_dialog->add_child(members_vb);
members_dialog->get_ok()->set_text(TTR("Create"));
- members_dialog->get_ok()->connect("pressed", this, "_member_create");
+ members_dialog->get_ok()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create));
members_dialog->get_ok()->set_disabled(true);
members_dialog->set_resizable(true);
members_dialog->set_as_minsize();
- members_dialog->connect("hide", this, "_member_cancel");
+ members_dialog->connect("hide", callable_mp(this, &VisualShaderEditor::_member_cancel));
add_child(members_dialog);
alert = memnew(AcceptDialog);
@@ -2633,7 +2662,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("CustomAlpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Delta", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("EmissionTransform", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
- add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("LifeTime", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Restart", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Time", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
@@ -2642,71 +2671,84 @@ VisualShaderEditor::VisualShaderEditor() {
// SCALAR
- add_options.push_back(AddOption("ScalarFunc", "Scalar", "Common", "VisualShaderNodeScalarFunc", TTR("Scalar function."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ScalarOp", "Scalar", "Common", "VisualShaderNodeScalarOp", TTR("Scalar operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("FloatFunc", "Scalar", "Common", "VisualShaderNodeFloatFunc", TTR("Float function."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntFunc", "Scalar", "Common", "VisualShaderNodeIntFunc", TTR("Integer function."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("FloatOp", "Scalar", "Common", "VisualShaderNodeFloatOp", TTR("Float operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntOp", "Scalar", "Common", "VisualShaderNodeIntOp", TTR("Integer operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
//CONSTANTS
- add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E));
- add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON));
- add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f));
- add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4));
- add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2));
- add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI));
- add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU));
- add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2));
+ add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E));
+ add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON));
+ add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f));
+ add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4));
+ add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2));
+ add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI));
+ add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU));
+ add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2));
// FUNCTIONS
- add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeScalarFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeScalarOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeFloatFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeIntFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeFloatOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeScalarClamp", TTR("Constrains a value to lie between two further values."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeScalarFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-e Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeScalarFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Natural logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the greater of two values."), VisualShaderNodeScalarOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the lesser of two values."), VisualShaderNodeScalarOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Constrains a value to lie between two further values."), VisualShaderNodeIntFunc::FUNC_CLAMP, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeFloatFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-e Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeFloatFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Natural logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeScalarFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 - scalar"), VisualShaderNodeScalarFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeScalarOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeScalarFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 / scalar"), VisualShaderNodeScalarFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeScalarFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), VisualShaderNodeFloatFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeFloatOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeFloatFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 / scalar"), VisualShaderNodeFloatFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeFloatFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeIntFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("SmoothStep", "Scalar", "Functions", "VisualShaderNodeScalarSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeScalarOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeScalarFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR));
-
- add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Adds scalar to scalar."), VisualShaderNodeScalarOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Divides scalar by scalar."), VisualShaderNodeScalarOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Multiplies scalar by scalar."), VisualShaderNodeScalarOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Returns the remainder of the two scalars."), VisualShaderNodeScalarOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Subtracts scalar from scalar."), VisualShaderNodeScalarOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR));
-
- add_options.push_back(AddOption("ScalarConstant", "Scalar", "Variables", "VisualShaderNodeScalarConstant", TTR("Scalar constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ScalarUniform", "Scalar", "Variables", "VisualShaderNodeScalarUniform", TTR("Scalar uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeFloatOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeFloatFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR));
+
+ add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Sums two floating-point scalars."), VisualShaderNodeFloatOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Sums two integer scalars."), VisualShaderNodeIntOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Divides two floating-point scalars."), VisualShaderNodeFloatOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Divides two integer scalars."), VisualShaderNodeIntOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Multiplies two floating-point scalars."), VisualShaderNodeFloatOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Multiplies two integer scalars."), VisualShaderNodeIntOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Returns the remainder of the two floating-point scalars."), VisualShaderNodeFloatOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Returns the remainder of the two integer scalars."), VisualShaderNodeIntOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Subtracts two floating-point scalars."), VisualShaderNodeFloatOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Subtracts two integer scalars."), VisualShaderNodeIntOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+
+ add_options.push_back(AddOption("FloatConstant", "Scalar", "Variables", "VisualShaderNodeFloatConstant", TTR("Scalar floating-point constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntConstant", "Scalar", "Variables", "VisualShaderNodeIntConstant", TTR("Scalar integer constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("FloatUniform", "Scalar", "Variables", "VisualShaderNodeFloatUniform", TTR("Scalar floating-point uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntUniform", "Scalar", "Variables", "VisualShaderNodeIntUniform", TTR("Scalar integer uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
// TEXTURES
@@ -2841,7 +2883,7 @@ VisualShaderEditor::VisualShaderEditor() {
property_editor = memnew(CustomPropertyEditor);
add_child(property_editor);
- property_editor->connect("variant_changed", this, "_port_edited");
+ property_editor->connect("variant_changed", callable_mp(this, &VisualShaderEditor::_port_edited));
}
void VisualShaderEditorPlugin::edit(Object *p_object) {
@@ -2894,15 +2936,10 @@ class VisualShaderNodePluginInputEditor : public OptionButton {
Ref<VisualShaderNodeInput> input;
-protected:
- static void _bind_methods() {
- ClassDB::bind_method("_item_selected", &VisualShaderNodePluginInputEditor::_item_selected);
- }
-
public:
void _notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- connect("item_selected", this, "_item_selected");
+ connect("item_selected", callable_mp(this, &VisualShaderNodePluginInputEditor::_item_selected));
}
}
@@ -2912,8 +2949,9 @@ public:
void setup(const Ref<VisualShaderNodeInput> &p_input) {
input = p_input;
- Ref<Texture2D> type_icon[5] = {
+ Ref<Texture2D> type_icon[6] = {
EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"),
+ EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"),
@@ -2940,7 +2978,7 @@ class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
Ref<Resource> parent_resource;
public:
- void _property_changed(const String &prop, const Variant &p_value, const String &p_field, bool p_changing = false) {
+ void _property_changed(const String &p_property, const Variant &p_value, const String &p_field = "", bool p_changing = false) {
if (p_changing)
return;
@@ -2948,13 +2986,13 @@ public:
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
updating = true;
- undo_redo->create_action(TTR("Edit Visual Property") + ": " + prop, UndoRedo::MERGE_ENDS);
- undo_redo->add_do_property(node.ptr(), prop, p_value);
- undo_redo->add_undo_property(node.ptr(), prop, node->get(prop));
+ undo_redo->create_action(TTR("Edit Visual Property") + ": " + p_property, UndoRedo::MERGE_ENDS);
+ undo_redo->add_do_property(node.ptr(), p_property, p_value);
+ undo_redo->add_undo_property(node.ptr(), p_property, node->get(p_property));
if (p_value.get_type() == Variant::OBJECT) {
- RES prev_res = node->get(prop);
+ RES prev_res = node->get(p_property);
RES curr_res = p_value;
if (curr_res.is_null()) {
@@ -3031,25 +3069,22 @@ public:
bool res_prop = Object::cast_to<EditorPropertyResource>(p_properties[i]);
if (res_prop) {
- p_properties[i]->connect("resource_selected", this, "_resource_selected");
+ p_properties[i]->connect("resource_selected", callable_mp(this, &VisualShaderNodePluginDefaultEditor::_resource_selected));
}
- properties[i]->connect("property_changed", this, "_property_changed");
+ properties[i]->connect("property_changed", callable_mp(this, &VisualShaderNodePluginDefaultEditor::_property_changed));
properties[i]->set_object_and_property(node.ptr(), p_names[i]);
properties[i]->update_property();
properties[i]->set_name_split_ratio(0);
}
- node->connect("changed", this, "_node_changed");
- node->connect("editor_refresh_request", this, "_refresh_request", varray(), CONNECT_DEFERRED);
+ node->connect("changed", callable_mp(this, &VisualShaderNodePluginDefaultEditor::_node_changed));
+ node->connect("editor_refresh_request", callable_mp(this, &VisualShaderNodePluginDefaultEditor::_refresh_request), varray(), CONNECT_DEFERRED);
}
static void _bind_methods() {
- ClassDB::bind_method("_property_changed", &VisualShaderNodePluginDefaultEditor::_property_changed, DEFVAL(String()), DEFVAL(false));
- ClassDB::bind_method("_node_changed", &VisualShaderNodePluginDefaultEditor::_node_changed);
- ClassDB::bind_method("_refresh_request", &VisualShaderNodePluginDefaultEditor::_refresh_request);
- ClassDB::bind_method("_resource_selected", &VisualShaderNodePluginDefaultEditor::_resource_selected);
- ClassDB::bind_method("_open_inspector", &VisualShaderNodePluginDefaultEditor::_open_inspector);
- ClassDB::bind_method("_show_prop_names", &VisualShaderNodePluginDefaultEditor::_show_prop_names);
+ ClassDB::bind_method("_refresh_request", &VisualShaderNodePluginDefaultEditor::_refresh_request); // Used by UndoRedo.
+ ClassDB::bind_method("_open_inspector", &VisualShaderNodePluginDefaultEditor::_open_inspector); // Used by UndoRedo.
+ ClassDB::bind_method("_show_prop_names", &VisualShaderNodePluginDefaultEditor::_show_prop_names); // Used with call_deferred.
}
};
@@ -3197,8 +3232,6 @@ void EditorPropertyShaderMode::set_option_button_clip(bool p_enable) {
}
void EditorPropertyShaderMode::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_option_selected"), &EditorPropertyShaderMode::_option_selected);
}
EditorPropertyShaderMode::EditorPropertyShaderMode() {
@@ -3206,7 +3239,7 @@ EditorPropertyShaderMode::EditorPropertyShaderMode() {
options->set_clip_text(true);
add_child(options);
add_focusable(options);
- options->connect("item_selected", this, "_option_selected");
+ options->connect("item_selected", callable_mp(this, &EditorPropertyShaderMode::_option_selected));
}
bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) {
@@ -3279,7 +3312,7 @@ void VisualShaderNodePortPreview::_shader_changed() {
void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port) {
shader = p_shader;
- shader->connect("changed", this, "_shader_changed");
+ shader->connect("changed", callable_mp(this, &VisualShaderNodePortPreview::_shader_changed));
type = p_type;
port = p_port;
node = p_node;
@@ -3314,7 +3347,6 @@ void VisualShaderNodePortPreview::_notification(int p_what) {
}
void VisualShaderNodePortPreview::_bind_methods() {
- ClassDB::bind_method("_shader_changed", &VisualShaderNodePortPreview::_shader_changed);
}
VisualShaderNodePortPreview::VisualShaderNodePortPreview() {
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 150cf16167..8756fe9fe9 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -81,6 +81,7 @@ class VisualShaderEditor : public VBoxContainer {
bool saved_node_pos_dirty;
ConfirmationDialog *members_dialog;
+ PopupMenu *popup_menu;
MenuButton *tools;
bool preview_showed;
@@ -90,6 +91,15 @@ class VisualShaderEditor : public VBoxContainer {
COLLAPSE_ALL
};
+ enum NodeMenuOptions {
+ ADD,
+ SEPARATOR, // ignore
+ COPY,
+ PASTE,
+ DELETE,
+ DUPLICATE,
+ };
+
Tree *members;
AcceptDialog *alert;
LineEdit *node_filter;
@@ -104,7 +114,6 @@ class VisualShaderEditor : public VBoxContainer {
struct AddOption {
String name;
String category;
- String sub_category;
String type;
String description;
int sub_func;
@@ -116,12 +125,12 @@ class VisualShaderEditor : public VBoxContainer {
float value;
bool highend;
bool is_custom;
+ int temp_idx;
AddOption(const String &p_name = String(), const String &p_category = String(), const String &p_sub_category = String(), const String &p_type = String(), const String &p_description = String(), int p_sub_func = -1, int p_return_type = -1, int p_mode = -1, int p_func = -1, float p_value = -1, bool p_highend = false) {
name = p_name;
type = p_type;
- category = p_category;
- sub_category = p_sub_category;
+ category = p_category + "/" + p_sub_category;
description = p_description;
sub_func = p_sub_func;
return_type = p_return_type;
@@ -135,8 +144,7 @@ class VisualShaderEditor : public VBoxContainer {
AddOption(const String &p_name, const String &p_category, const String &p_sub_category, const String &p_type, const String &p_description, const String &p_sub_func, int p_return_type = -1, int p_mode = -1, int p_func = -1, float p_value = -1, bool p_highend = false) {
name = p_name;
type = p_type;
- category = p_category;
- sub_category = p_sub_category;
+ category = p_category + "/" + p_sub_category;
description = p_description;
sub_func = 0;
sub_func_str = p_sub_func;
@@ -148,6 +156,12 @@ class VisualShaderEditor : public VBoxContainer {
is_custom = false;
}
};
+ struct _OptionComparator {
+
+ _FORCE_INLINE_ bool operator()(const AddOption &a, const AddOption &b) const {
+ return a.category.count("/") > b.category.count("/") || (a.category + "/" + a.name).naturalnocasecmp_to(b.category + "/" + b.name) < 0;
+ }
+ };
Vector<AddOption> add_options;
int texture_node_option_idx;
@@ -177,7 +191,7 @@ class VisualShaderEditor : public VBoxContainer {
void _node_selected(Object *p_node);
void _delete_request(int);
- void _on_nodes_delete();
+ void _delete_nodes();
void _removed_from_graph();
@@ -212,7 +226,7 @@ class VisualShaderEditor : public VBoxContainer {
void _clear_buffer();
void _copy_nodes();
- void _paste_nodes();
+ void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2());
Vector<Ref<VisualShaderNodePlugin> > plugins;
@@ -246,6 +260,9 @@ class VisualShaderEditor : public VBoxContainer {
void _member_create();
void _member_cancel();
+ Vector2 menu_point;
+ void _node_menu_id_pressed(int p_idx);
+
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
@@ -265,7 +282,7 @@ public:
static VisualShaderEditor *get_singleton() { return singleton; }
void clear_custom_types();
- void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, const String &p_subcategory, bool p_highend);
+ void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend);
virtual Size2 get_minimum_size() const;
void edit(VisualShader *p_visual_shader);
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 0665b1d013..cdc5255edd 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -245,7 +245,6 @@ void ProgressDialog::_cancel_pressed() {
}
void ProgressDialog::_bind_methods() {
- ClassDB::bind_method("_cancel_pressed", &ProgressDialog::_cancel_pressed);
}
ProgressDialog::ProgressDialog() {
@@ -264,5 +263,5 @@ ProgressDialog::ProgressDialog() {
cancel_hb->add_child(cancel);
cancel->set_text(TTR("Cancel"));
cancel_hb->add_spacer();
- cancel->connect("pressed", this, "_cancel_pressed");
+ cancel->connect("pressed", callable_mp(this, &ProgressDialog::_cancel_pressed));
}
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 3c8fef6233..37b959c78a 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -53,7 +53,7 @@ void ProjectExportDialog::_notification(int p_what) {
case NOTIFICATION_READY: {
duplicate_preset->set_icon(get_icon("Duplicate", "EditorIcons"));
delete_preset->set_icon(get_icon("Remove", "EditorIcons"));
- connect("confirmed", this, "_export_pck_zip");
+ connect("confirmed", callable_mp(this, &ProjectExportDialog::_export_pck_zip));
custom_feature_display->get_parent_control()->add_style_override("panel", get_stylebox("bg", "Tree"));
} break;
case NOTIFICATION_POPUP_HIDE: {
@@ -913,10 +913,10 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) {
if (invalid_path) {
export_project->get_ok()->set_disabled(true);
- export_project->get_line_edit()->disconnect("text_entered", export_project, "_file_entered");
+ export_project->get_line_edit()->disconnect_compat("text_entered", export_project, "_file_entered");
} else {
export_project->get_ok()->set_disabled(false);
- export_project->get_line_edit()->connect("text_entered", export_project, "_file_entered");
+ export_project->get_line_edit()->connect_compat("text_entered", export_project, "_file_entered");
}
}
@@ -945,10 +945,13 @@ void ProjectExportDialog::_export_project() {
}
}
- // Ensure that signal is connected if previous attempt left it disconnected with _validate_export_path
- if (!export_project->get_line_edit()->is_connected("text_entered", export_project, "_file_entered")) {
+ // Ensure that signal is connected if previous attempt left it disconnected
+ // with _validate_export_path.
+ // FIXME: This is a hack, we should instead change EditorFileDialog to allow
+ // disabling validation by the "text_entered" signal.
+ if (!export_project->get_line_edit()->is_connected_compat("text_entered", export_project, "_file_entered")) {
export_project->get_ok()->set_disabled(false);
- export_project->get_line_edit()->connect("text_entered", export_project, "_file_entered");
+ export_project->get_line_edit()->connect_compat("text_entered", export_project, "_file_entered");
}
export_project->set_mode(EditorFileDialog::MODE_SAVE_FILE);
@@ -1022,38 +1025,10 @@ void ProjectExportDialog::_export_all(bool p_debug) {
void ProjectExportDialog::_bind_methods() {
- ClassDB::bind_method("_add_preset", &ProjectExportDialog::_add_preset);
- ClassDB::bind_method("_edit_preset", &ProjectExportDialog::_edit_preset);
- ClassDB::bind_method("_update_parameters", &ProjectExportDialog::_update_parameters);
- ClassDB::bind_method("_runnable_pressed", &ProjectExportDialog::_runnable_pressed);
- ClassDB::bind_method("_name_changed", &ProjectExportDialog::_name_changed);
- ClassDB::bind_method("_duplicate_preset", &ProjectExportDialog::_duplicate_preset);
- ClassDB::bind_method("_delete_preset", &ProjectExportDialog::_delete_preset);
- ClassDB::bind_method("_delete_preset_confirm", &ProjectExportDialog::_delete_preset_confirm);
ClassDB::bind_method("get_drag_data_fw", &ProjectExportDialog::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &ProjectExportDialog::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &ProjectExportDialog::drop_data_fw);
- ClassDB::bind_method("_export_type_changed", &ProjectExportDialog::_export_type_changed);
- ClassDB::bind_method("_filter_changed", &ProjectExportDialog::_filter_changed);
- ClassDB::bind_method("_tree_changed", &ProjectExportDialog::_tree_changed);
- ClassDB::bind_method("_patch_button_pressed", &ProjectExportDialog::_patch_button_pressed);
- ClassDB::bind_method("_patch_selected", &ProjectExportDialog::_patch_selected);
- ClassDB::bind_method("_patch_deleted", &ProjectExportDialog::_patch_deleted);
- ClassDB::bind_method("_patch_edited", &ProjectExportDialog::_patch_edited);
- ClassDB::bind_method("_export_pck_zip", &ProjectExportDialog::_export_pck_zip);
- ClassDB::bind_method("_export_pck_zip_selected", &ProjectExportDialog::_export_pck_zip_selected);
- ClassDB::bind_method("_open_export_template_manager", &ProjectExportDialog::_open_export_template_manager);
- ClassDB::bind_method("_validate_export_path", &ProjectExportDialog::_validate_export_path);
- ClassDB::bind_method("_export_path_changed", &ProjectExportDialog::_export_path_changed);
- ClassDB::bind_method("_script_export_mode_changed", &ProjectExportDialog::_script_export_mode_changed);
- ClassDB::bind_method("_script_encryption_key_changed", &ProjectExportDialog::_script_encryption_key_changed);
- ClassDB::bind_method("_export_project", &ProjectExportDialog::_export_project);
- ClassDB::bind_method("_export_project_to_path", &ProjectExportDialog::_export_project_to_path);
ClassDB::bind_method("_export_all", &ProjectExportDialog::_export_all);
- ClassDB::bind_method("_export_all_dialog", &ProjectExportDialog::_export_all_dialog);
- ClassDB::bind_method("_export_all_dialog_action", &ProjectExportDialog::_export_all_dialog_action);
- ClassDB::bind_method("_custom_features_changed", &ProjectExportDialog::_custom_features_changed);
- ClassDB::bind_method("_tab_changed", &ProjectExportDialog::_tab_changed);
ClassDB::bind_method("set_export_path", &ProjectExportDialog::set_export_path);
ClassDB::bind_method("get_export_path", &ProjectExportDialog::get_export_path);
ClassDB::bind_method("get_current_preset", &ProjectExportDialog::get_current_preset);
@@ -1085,7 +1060,7 @@ ProjectExportDialog::ProjectExportDialog() {
add_preset = memnew(MenuButton);
add_preset->set_text(TTR("Add..."));
- add_preset->get_popup()->connect("index_pressed", this, "_add_preset");
+ add_preset->get_popup()->connect("index_pressed", callable_mp(this, &ProjectExportDialog::_add_preset));
preset_hb->add_child(add_preset);
MarginContainer *mc = memnew(MarginContainer);
preset_vb->add_child(mc);
@@ -1093,13 +1068,13 @@ ProjectExportDialog::ProjectExportDialog() {
presets = memnew(ItemList);
presets->set_drag_forwarding(this);
mc->add_child(presets);
- presets->connect("item_selected", this, "_edit_preset");
+ presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset));
duplicate_preset = memnew(ToolButton);
preset_hb->add_child(duplicate_preset);
- duplicate_preset->connect("pressed", this, "_duplicate_preset");
+ duplicate_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_duplicate_preset));
delete_preset = memnew(ToolButton);
preset_hb->add_child(delete_preset);
- delete_preset->connect("pressed", this, "_delete_preset");
+ delete_preset->connect("pressed", callable_mp(this, &ProjectExportDialog::_delete_preset));
// Preset settings.
@@ -1109,11 +1084,11 @@ ProjectExportDialog::ProjectExportDialog() {
name = memnew(LineEdit);
settings_vb->add_margin_child(TTR("Name:"), name);
- name->connect("text_changed", this, "_name_changed");
+ name->connect("text_changed", callable_mp(this, &ProjectExportDialog::_name_changed));
runnable = memnew(CheckButton);
runnable->set_text(TTR("Runnable"));
runnable->set_tooltip(TTR("If checked, the preset will be available for use in one-click deploy.\nOnly one preset per platform may be marked as runnable."));
- runnable->connect("pressed", this, "_runnable_pressed");
+ runnable->connect("pressed", callable_mp(this, &ProjectExportDialog::_runnable_pressed));
settings_vb->add_child(runnable);
export_path = memnew(EditorPropertyPath);
@@ -1121,7 +1096,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_path->set_label(TTR("Export Path"));
export_path->set_object_and_property(this, "export_path");
export_path->set_save_mode();
- export_path->connect("property_changed", this, "_export_path_changed");
+ export_path->connect("property_changed", callable_mp(this, &ProjectExportDialog::_export_path_changed));
// Subsections.
@@ -1137,7 +1112,7 @@ ProjectExportDialog::ProjectExportDialog() {
sections->add_child(parameters);
parameters->set_name(TTR("Options"));
parameters->set_v_size_flags(SIZE_EXPAND_FILL);
- parameters->connect("property_edited", this, "_update_parameters");
+ parameters->connect("property_edited", callable_mp(this, &ProjectExportDialog::_update_parameters));
// Resources export parameters.
@@ -1150,7 +1125,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_filter->add_item(TTR("Export selected scenes (and dependencies)"));
export_filter->add_item(TTR("Export selected resources (and dependencies)"));
resources_vb->add_margin_child(TTR("Export Mode:"), export_filter);
- export_filter->connect("item_selected", this, "_export_type_changed");
+ export_filter->connect("item_selected", callable_mp(this, &ProjectExportDialog::_export_type_changed));
include_label = memnew(Label);
include_label->set_text(TTR("Resources to export:"));
@@ -1161,19 +1136,19 @@ ProjectExportDialog::ProjectExportDialog() {
include_files = memnew(Tree);
include_margin->add_child(include_files);
- include_files->connect("item_edited", this, "_tree_changed");
+ include_files->connect("item_edited", callable_mp(this, &ProjectExportDialog::_tree_changed));
include_filters = memnew(LineEdit);
resources_vb->add_margin_child(
TTR("Filters to export non-resource files/folders\n(comma-separated, e.g: *.json, *.txt, docs/*)"),
include_filters);
- include_filters->connect("text_changed", this, "_filter_changed");
+ include_filters->connect("text_changed", callable_mp(this, &ProjectExportDialog::_filter_changed));
exclude_filters = memnew(LineEdit);
resources_vb->add_margin_child(
TTR("Filters to exclude files/folders from project\n(comma-separated, e.g: *.json, *.txt, docs/*)"),
exclude_filters);
- exclude_filters->connect("text_changed", this, "_filter_changed");
+ exclude_filters->connect("text_changed", callable_mp(this, &ProjectExportDialog::_filter_changed));
// Patch packages.
@@ -1190,8 +1165,8 @@ ProjectExportDialog::ProjectExportDialog() {
patch_vb->add_child(patches);
patches->set_v_size_flags(SIZE_EXPAND_FILL);
patches->set_hide_root(true);
- patches->connect("button_pressed", this, "_patch_button_pressed");
- patches->connect("item_edited", this, "_patch_edited");
+ patches->connect("button_pressed", callable_mp(this, &ProjectExportDialog::_patch_button_pressed));
+ patches->connect("item_edited", callable_mp(this, &ProjectExportDialog::_patch_edited));
patches->set_drag_forwarding(this);
patches->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
@@ -1206,12 +1181,12 @@ ProjectExportDialog::ProjectExportDialog() {
patch_dialog = memnew(EditorFileDialog);
patch_dialog->add_filter("*.pck ; " + TTR("Pack File"));
patch_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- patch_dialog->connect("file_selected", this, "_patch_selected");
+ patch_dialog->connect("file_selected", callable_mp(this, &ProjectExportDialog::_patch_selected));
add_child(patch_dialog);
patch_erase = memnew(ConfirmationDialog);
patch_erase->get_ok()->set_text(TTR("Delete"));
- patch_erase->connect("confirmed", this, "_patch_deleted");
+ patch_erase->connect("confirmed", callable_mp(this, &ProjectExportDialog::_patch_deleted));
add_child(patch_erase);
// Feature tags.
@@ -1219,7 +1194,7 @@ ProjectExportDialog::ProjectExportDialog() {
VBoxContainer *feature_vb = memnew(VBoxContainer);
feature_vb->set_name(TTR("Features"));
custom_features = memnew(LineEdit);
- custom_features->connect("text_changed", this, "_custom_features_changed");
+ custom_features->connect("text_changed", callable_mp(this, &ProjectExportDialog::_custom_features_changed));
feature_vb->add_margin_child(TTR("Custom (comma-separated):"), custom_features);
Panel *features_panel = memnew(Panel);
custom_feature_display = memnew(RichTextLabel);
@@ -1240,9 +1215,9 @@ ProjectExportDialog::ProjectExportDialog() {
script_mode->add_item(TTR("Text"), (int)EditorExportPreset::MODE_SCRIPT_TEXT);
script_mode->add_item(TTR("Compiled"), (int)EditorExportPreset::MODE_SCRIPT_COMPILED);
script_mode->add_item(TTR("Encrypted (Provide Key Below)"), (int)EditorExportPreset::MODE_SCRIPT_ENCRYPTED);
- script_mode->connect("item_selected", this, "_script_export_mode_changed");
+ script_mode->connect("item_selected", callable_mp(this, &ProjectExportDialog::_script_export_mode_changed));
script_key = memnew(LineEdit);
- script_key->connect("text_changed", this, "_script_encryption_key_changed");
+ script_key->connect("text_changed", callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
script_key_error = memnew(Label);
script_key_error->set_text("- " + TTR("Invalid Encryption Key (must be 64 characters long)"));
script_key_error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
@@ -1250,7 +1225,7 @@ ProjectExportDialog::ProjectExportDialog() {
script_vb->add_child(script_key_error);
sections->add_child(script_vb);
- sections->connect("tab_changed", this, "_tab_changed");
+ sections->connect("tab_changed", callable_mp(this, &ProjectExportDialog::_tab_changed));
// Disable by default.
name->set_editable(false);
@@ -1267,7 +1242,7 @@ ProjectExportDialog::ProjectExportDialog() {
delete_confirm = memnew(ConfirmationDialog);
add_child(delete_confirm);
delete_confirm->get_ok()->set_text(TTR("Delete"));
- delete_confirm->connect("confirmed", this, "_delete_preset_confirm");
+ delete_confirm->connect("confirmed", callable_mp(this, &ProjectExportDialog::_delete_preset_confirm));
// Export buttons, dialogs and errors.
@@ -1276,7 +1251,7 @@ ProjectExportDialog::ProjectExportDialog() {
get_cancel()->set_text(TTR("Close"));
get_ok()->set_text(TTR("Export PCK/Zip"));
export_button = add_button(TTR("Export Project"), !OS::get_singleton()->get_swap_ok_cancel(), "export");
- export_button->connect("pressed", this, "_export_project");
+ export_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_project));
// Disable initially before we select a valid preset
export_button->set_disabled(true);
get_ok()->set_disabled(true);
@@ -1288,10 +1263,10 @@ ProjectExportDialog::ProjectExportDialog() {
export_all_dialog->get_ok()->hide();
export_all_dialog->add_button(TTR("Debug"), true, "debug");
export_all_dialog->add_button(TTR("Release"), true, "release");
- export_all_dialog->connect("custom_action", this, "_export_all_dialog_action");
+ export_all_dialog->connect("custom_action", callable_mp(this, &ProjectExportDialog::_export_all_dialog_action));
export_all_button = add_button(TTR("Export All"), !OS::get_singleton()->get_swap_ok_cancel(), "export");
- export_all_button->connect("pressed", this, "_export_all_dialog");
+ export_all_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_all_dialog));
export_all_button->set_disabled(true);
export_pck_zip = memnew(EditorFileDialog);
@@ -1300,7 +1275,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_pck_zip->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
export_pck_zip->set_mode(EditorFileDialog::MODE_SAVE_FILE);
add_child(export_pck_zip);
- export_pck_zip->connect("file_selected", this, "_export_pck_zip_selected");
+ export_pck_zip->connect("file_selected", callable_mp(this, &ProjectExportDialog::_export_pck_zip_selected));
export_error = memnew(Label);
main_vb->add_child(export_error);
@@ -1326,13 +1301,13 @@ ProjectExportDialog::ProjectExportDialog() {
download_templates->set_text(TTR("Manage Export Templates"));
download_templates->set_v_size_flags(SIZE_SHRINK_CENTER);
export_templates_error->add_child(download_templates);
- download_templates->connect("pressed", this, "_open_export_template_manager");
+ download_templates->connect("pressed", callable_mp(this, &ProjectExportDialog::_open_export_template_manager));
export_project = memnew(EditorFileDialog);
export_project->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
add_child(export_project);
- export_project->connect("file_selected", this, "_export_project_to_path");
- export_project->get_line_edit()->connect("text_changed", this, "_validate_export_path");
+ export_project->connect("file_selected", callable_mp(this, &ProjectExportDialog::_export_project_to_path));
+ export_project->get_line_edit()->connect("text_changed", callable_mp(this, &ProjectExportDialog::_validate_export_path));
export_debug = memnew(CheckBox);
export_debug->set_text(TTR("Export With Debug"));
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index a1032130f8..94f9bf2767 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -811,7 +811,7 @@ public:
create_dir = memnew(Button);
pnhb->add_child(create_dir);
create_dir->set_text(TTR("Create Folder"));
- create_dir->connect("pressed", this, "_create_folder");
+ create_dir->connect("pressed", callable_mp(this, &ProjectDialog::_create_folder));
path_container = memnew(VBoxContainer);
vb->add_child(path_container);
@@ -848,7 +848,7 @@ public:
browse = memnew(Button);
browse->set_text(TTR("Browse"));
- browse->connect("pressed", this, "_browse_path");
+ browse->connect("pressed", callable_mp(this, &ProjectDialog::_browse_path));
pphb->add_child(browse);
// install status icon
@@ -858,7 +858,7 @@ public:
install_browse = memnew(Button);
install_browse->set_text(TTR("Browse"));
- install_browse->connect("pressed", this, "_browse_install_path");
+ install_browse->connect("pressed", callable_mp(this, &ProjectDialog::_browse_install_path));
iphb->add_child(install_browse);
msg = memnew(Label);
@@ -928,13 +928,13 @@ public:
fdialog_install->set_access(FileDialog::ACCESS_FILESYSTEM);
add_child(fdialog);
add_child(fdialog_install);
- project_name->connect("text_changed", this, "_text_changed");
- project_path->connect("text_changed", this, "_path_text_changed");
- install_path->connect("text_changed", this, "_path_text_changed");
- fdialog->connect("dir_selected", this, "_path_selected");
- fdialog->connect("file_selected", this, "_file_selected");
- fdialog_install->connect("dir_selected", this, "_install_path_selected");
- fdialog_install->connect("file_selected", this, "_install_path_selected");
+ project_name->connect("text_changed", callable_mp(this, &ProjectDialog::_text_changed));
+ project_path->connect("text_changed", callable_mp(this, &ProjectDialog::_path_text_changed));
+ install_path->connect("text_changed", callable_mp(this, &ProjectDialog::_path_text_changed));
+ fdialog->connect("dir_selected", callable_mp(this, &ProjectDialog::_path_selected));
+ fdialog->connect("file_selected", callable_mp(this, &ProjectDialog::_file_selected));
+ fdialog_install->connect("dir_selected", callable_mp(this, &ProjectDialog::_install_path_selected));
+ fdialog_install->connect("file_selected", callable_mp(this, &ProjectDialog::_install_path_selected));
set_hide_on_ok(false);
mode = MODE_NEW;
@@ -1320,8 +1320,8 @@ void ProjectList::create_project_item_control(int p_index) {
Color font_color = get_color("font_color", "Tree");
ProjectListItemControl *hb = memnew(ProjectListItemControl);
- hb->connect("draw", this, "_panel_draw", varray(hb));
- hb->connect("gui_input", this, "_panel_input", varray(hb));
+ hb->connect("draw", callable_mp(this, &ProjectList::_panel_draw), varray(hb));
+ hb->connect("gui_input", callable_mp(this, &ProjectList::_panel_input), varray(hb));
hb->add_constant_override("separation", 10 * EDSCALE);
hb->set_tooltip(item.description);
@@ -1332,7 +1332,7 @@ void ProjectList::create_project_item_control(int p_index) {
favorite->set_normal_texture(favorite_icon);
// This makes the project's "hover" style display correctly when hovering the favorite icon
favorite->set_mouse_filter(MOUSE_FILTER_PASS);
- favorite->connect("pressed", this, "_favorite_pressed", varray(hb));
+ favorite->connect("pressed", callable_mp(this, &ProjectList::_favorite_pressed), varray(hb));
favorite_box->add_child(favorite);
favorite_box->set_alignment(BoxContainer::ALIGN_CENTER);
hb->add_child(favorite_box);
@@ -1380,7 +1380,7 @@ void ProjectList::create_project_item_control(int p_index) {
path_hb->add_child(show);
if (!item.missing) {
- show->connect("pressed", this, "_show_project", varray(item.path));
+ show->connect("pressed", callable_mp(this, &ProjectList::_show_project), varray(item.path));
show->set_tooltip(TTR("Show in File Manager"));
} else {
show->set_tooltip(TTR("Error: Project is missing on the filesystem."));
@@ -1813,11 +1813,6 @@ const char *ProjectList::SIGNAL_PROJECT_ASK_OPEN = "project_ask_open";
void ProjectList::_bind_methods() {
- ClassDB::bind_method("_panel_draw", &ProjectList::_panel_draw);
- ClassDB::bind_method("_panel_input", &ProjectList::_panel_input);
- ClassDB::bind_method("_favorite_pressed", &ProjectList::_favorite_pressed);
- ClassDB::bind_method("_show_project", &ProjectList::_show_project);
-
ADD_SIGNAL(MethodInfo(SIGNAL_SELECTION_CHANGED));
ADD_SIGNAL(MethodInfo(SIGNAL_PROJECT_ASK_OPEN));
}
@@ -1904,7 +1899,7 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
// This is handled by the platform implementation on macOS,
// so only define the shortcut on other platforms
#ifndef OSX_ENABLED
- if (k->get_scancode_with_modifiers() == (KEY_MASK_CMD | KEY_Q)) {
+ if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_Q)) {
_dim_window();
get_tree()->quit();
}
@@ -1913,9 +1908,9 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
if (tabs->get_current_tab() != 0)
return;
- bool scancode_handled = true;
+ bool keycode_handled = true;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_ENTER: {
@@ -1972,14 +1967,14 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
if (k->get_command())
this->project_filter->search_box->grab_focus();
else
- scancode_handled = false;
+ keycode_handled = false;
} break;
default: {
- scancode_handled = false;
+ keycode_handled = false;
} break;
}
- if (scancode_handled) {
+ if (keycode_handled) {
accept_event();
}
}
@@ -2327,7 +2322,7 @@ void ProjectManager::_install_project(const String &p_zip_path, const String &p_
npdialog->show_dialog();
}
-void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
+void ProjectManager::_files_dropped(PackedStringArray p_files, int p_screen) {
Set<String> folders_set;
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < p_files.size(); i++) {
@@ -2336,9 +2331,9 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
}
memdelete(da);
if (folders_set.size() > 0) {
- PoolStringArray folders;
+ PackedStringArray folders;
for (Set<String>::Element *E = folders_set.front(); E; E = E->next()) {
- folders.append(E->get());
+ folders.push_back(E->get());
}
bool confirm = true;
@@ -2358,8 +2353,8 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
memdelete(dir);
}
if (confirm) {
- multi_scan_ask->get_ok()->disconnect("pressed", this, "_scan_multiple_folders");
- multi_scan_ask->get_ok()->connect("pressed", this, "_scan_multiple_folders", varray(folders));
+ multi_scan_ask->get_ok()->disconnect("pressed", callable_mp(this, &ProjectManager::_scan_multiple_folders));
+ multi_scan_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_scan_multiple_folders), varray(folders));
multi_scan_ask->set_text(
vformat(TTR("Are you sure to scan %s folders for existing Godot projects?\nThis could take a while."), folders.size()));
multi_scan_ask->popup_centered_minsize();
@@ -2369,7 +2364,7 @@ void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
}
}
-void ProjectManager::_scan_multiple_folders(PoolStringArray p_files) {
+void ProjectManager::_scan_multiple_folders(PackedStringArray p_files) {
for (int i = 0; i < p_files.size(); i++) {
_scan_begin(p_files.get(i));
}
@@ -2393,34 +2388,9 @@ void ProjectManager::_on_filter_option_changed() {
void ProjectManager::_bind_methods() {
- ClassDB::bind_method("_open_selected_projects_ask", &ProjectManager::_open_selected_projects_ask);
- ClassDB::bind_method("_open_selected_projects", &ProjectManager::_open_selected_projects);
- ClassDB::bind_method(D_METHOD("_global_menu_action"), &ProjectManager::_global_menu_action, DEFVAL(Variant()));
- ClassDB::bind_method("_run_project", &ProjectManager::_run_project);
- ClassDB::bind_method("_run_project_confirm", &ProjectManager::_run_project_confirm);
- ClassDB::bind_method("_scan_projects", &ProjectManager::_scan_projects);
- ClassDB::bind_method("_scan_begin", &ProjectManager::_scan_begin);
- ClassDB::bind_method("_import_project", &ProjectManager::_import_project);
- ClassDB::bind_method("_new_project", &ProjectManager::_new_project);
- ClassDB::bind_method("_rename_project", &ProjectManager::_rename_project);
- ClassDB::bind_method("_erase_project", &ProjectManager::_erase_project);
- ClassDB::bind_method("_erase_missing_projects", &ProjectManager::_erase_missing_projects);
- ClassDB::bind_method("_erase_project_confirm", &ProjectManager::_erase_project_confirm);
- ClassDB::bind_method("_erase_missing_projects_confirm", &ProjectManager::_erase_missing_projects_confirm);
- ClassDB::bind_method("_language_selected", &ProjectManager::_language_selected);
- ClassDB::bind_method("_restart_confirm", &ProjectManager::_restart_confirm);
ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog);
- ClassDB::bind_method("_on_order_option_changed", &ProjectManager::_on_order_option_changed);
- ClassDB::bind_method("_on_filter_option_changed", &ProjectManager::_on_filter_option_changed);
- ClassDB::bind_method("_on_projects_updated", &ProjectManager::_on_projects_updated);
- ClassDB::bind_method("_on_project_created", &ProjectManager::_on_project_created);
ClassDB::bind_method("_unhandled_input", &ProjectManager::_unhandled_input);
- ClassDB::bind_method("_install_project", &ProjectManager::_install_project);
- ClassDB::bind_method("_files_dropped", &ProjectManager::_files_dropped);
- ClassDB::bind_method("_open_asset_library", &ProjectManager::_open_asset_library);
- ClassDB::bind_method("_confirm_update_settings", &ProjectManager::_confirm_update_settings);
ClassDB::bind_method("_update_project_buttons", &ProjectManager::_update_project_buttons);
- ClassDB::bind_method(D_METHOD("_scan_multiple_folders", "files"), &ProjectManager::_scan_multiple_folders);
}
void ProjectManager::_open_asset_library() {
@@ -2524,7 +2494,7 @@ ProjectManager::ProjectManager() {
project_order_filter->_setup_filters(sort_filter_titles);
project_order_filter->set_filter_size(150);
sort_filters->add_child(project_order_filter);
- project_order_filter->connect("filter_changed", this, "_on_order_option_changed");
+ project_order_filter->connect("filter_changed", callable_mp(this, &ProjectManager::_on_order_option_changed));
project_order_filter->set_custom_minimum_size(Size2(180, 10) * EDSCALE);
int projects_sorting_order = (int)EditorSettings::get_singleton()->get("project_manager/sorting_order");
@@ -2534,7 +2504,7 @@ ProjectManager::ProjectManager() {
project_filter = memnew(ProjectListFilter);
project_filter->add_search_box();
- project_filter->connect("filter_changed", this, "_on_filter_option_changed");
+ project_filter->connect("filter_changed", callable_mp(this, &ProjectManager::_on_filter_option_changed));
project_filter->set_custom_minimum_size(Size2(280, 10) * EDSCALE);
sort_filters->add_child(project_filter);
@@ -2546,8 +2516,8 @@ ProjectManager::ProjectManager() {
pc->set_v_size_flags(SIZE_EXPAND_FILL);
_project_list = memnew(ProjectList);
- _project_list->connect(ProjectList::SIGNAL_SELECTION_CHANGED, this, "_update_project_buttons");
- _project_list->connect(ProjectList::SIGNAL_PROJECT_ASK_OPEN, this, "_open_selected_projects_ask");
+ _project_list->connect(ProjectList::SIGNAL_SELECTION_CHANGED, callable_mp(this, &ProjectManager::_update_project_buttons));
+ _project_list->connect(ProjectList::SIGNAL_PROJECT_ASK_OPEN, callable_mp(this, &ProjectManager::_open_selected_projects_ask));
pc->add_child(_project_list);
_project_list->set_enable_h_scroll(false);
@@ -2557,13 +2527,13 @@ ProjectManager::ProjectManager() {
Button *open = memnew(Button);
open->set_text(TTR("Edit"));
tree_vb->add_child(open);
- open->connect("pressed", this, "_open_selected_projects_ask");
+ open->connect("pressed", callable_mp(this, &ProjectManager::_open_selected_projects_ask));
open_btn = open;
Button *run = memnew(Button);
run->set_text(TTR("Run"));
tree_vb->add_child(run);
- run->connect("pressed", this, "_run_project");
+ run->connect("pressed", callable_mp(this, &ProjectManager::_run_project));
run_btn = run;
tree_vb->add_child(memnew(HSeparator));
@@ -2571,7 +2541,7 @@ ProjectManager::ProjectManager() {
Button *scan = memnew(Button);
scan->set_text(TTR("Scan"));
tree_vb->add_child(scan);
- scan->connect("pressed", this, "_scan_projects");
+ scan->connect("pressed", callable_mp(this, &ProjectManager::_scan_projects));
tree_vb->add_child(memnew(HSeparator));
@@ -2581,34 +2551,34 @@ ProjectManager::ProjectManager() {
scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden
scan_dir->set_current_dir(EditorSettings::get_singleton()->get("filesystem/directories/default_project_path"));
gui_base->add_child(scan_dir);
- scan_dir->connect("dir_selected", this, "_scan_begin");
+ scan_dir->connect("dir_selected", callable_mp(this, &ProjectManager::_scan_begin));
Button *create = memnew(Button);
create->set_text(TTR("New Project"));
tree_vb->add_child(create);
- create->connect("pressed", this, "_new_project");
+ create->connect("pressed", callable_mp(this, &ProjectManager::_new_project));
Button *import = memnew(Button);
import->set_text(TTR("Import"));
tree_vb->add_child(import);
- import->connect("pressed", this, "_import_project");
+ import->connect("pressed", callable_mp(this, &ProjectManager::_import_project));
Button *rename = memnew(Button);
rename->set_text(TTR("Rename"));
tree_vb->add_child(rename);
- rename->connect("pressed", this, "_rename_project");
+ rename->connect("pressed", callable_mp(this, &ProjectManager::_rename_project));
rename_btn = rename;
Button *erase = memnew(Button);
erase->set_text(TTR("Remove"));
tree_vb->add_child(erase);
- erase->connect("pressed", this, "_erase_project");
+ erase->connect("pressed", callable_mp(this, &ProjectManager::_erase_project));
erase_btn = erase;
Button *erase_missing = memnew(Button);
erase_missing->set_text(TTR("Remove Missing"));
tree_vb->add_child(erase_missing);
- erase_missing->connect("pressed", this, "_erase_missing_projects");
+ erase_missing->connect("pressed", callable_mp(this, &ProjectManager::_erase_missing_projects));
erase_missing_btn = erase_missing;
tree_vb->add_spacer();
@@ -2617,7 +2587,7 @@ ProjectManager::ProjectManager() {
asset_library = memnew(EditorAssetLibrary(true));
asset_library->set_name(TTR("Templates"));
tabs->add_child(asset_library);
- asset_library->connect("install_asset", this, "_install_project");
+ asset_library->connect("install_asset", callable_mp(this, &ProjectManager::_install_project));
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
@@ -2664,7 +2634,7 @@ ProjectManager::ProjectManager() {
language_btn->set_icon(get_icon("Environment", "EditorIcons"));
settings_hb->add_child(language_btn);
- language_btn->connect("item_selected", this, "_language_selected");
+ language_btn->connect("item_selected", callable_mp(this, &ProjectManager::_language_selected));
center_box->add_child(settings_hb);
settings_hb->set_anchors_and_margins_preset(Control::PRESET_TOP_RIGHT);
@@ -2673,28 +2643,28 @@ ProjectManager::ProjectManager() {
language_restart_ask = memnew(ConfirmationDialog);
language_restart_ask->get_ok()->set_text(TTR("Restart Now"));
- language_restart_ask->get_ok()->connect("pressed", this, "_restart_confirm");
+ language_restart_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_restart_confirm));
language_restart_ask->get_cancel()->set_text(TTR("Continue"));
gui_base->add_child(language_restart_ask);
erase_missing_ask = memnew(ConfirmationDialog);
erase_missing_ask->get_ok()->set_text(TTR("Remove All"));
- erase_missing_ask->get_ok()->connect("pressed", this, "_erase_missing_projects_confirm");
+ erase_missing_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_erase_missing_projects_confirm));
gui_base->add_child(erase_missing_ask);
erase_ask = memnew(ConfirmationDialog);
erase_ask->get_ok()->set_text(TTR("Remove"));
- erase_ask->get_ok()->connect("pressed", this, "_erase_project_confirm");
+ erase_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_erase_project_confirm));
gui_base->add_child(erase_ask);
multi_open_ask = memnew(ConfirmationDialog);
multi_open_ask->get_ok()->set_text(TTR("Edit"));
- multi_open_ask->get_ok()->connect("pressed", this, "_open_selected_projects");
+ multi_open_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_open_selected_projects));
gui_base->add_child(multi_open_ask);
multi_run_ask = memnew(ConfirmationDialog);
multi_run_ask->get_ok()->set_text(TTR("Run"));
- multi_run_ask->get_ok()->connect("pressed", this, "_run_project_confirm");
+ multi_run_ask->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_run_project_confirm));
gui_base->add_child(multi_run_ask);
multi_scan_ask = memnew(ConfirmationDialog);
@@ -2702,7 +2672,7 @@ ProjectManager::ProjectManager() {
gui_base->add_child(multi_scan_ask);
ask_update_settings = memnew(ConfirmationDialog);
- ask_update_settings->get_ok()->connect("pressed", this, "_confirm_update_settings");
+ ask_update_settings->get_ok()->connect("pressed", callable_mp(this, &ProjectManager::_confirm_update_settings));
gui_base->add_child(ask_update_settings);
OS::get_singleton()->set_low_processor_usage_mode(true);
@@ -2710,8 +2680,8 @@ ProjectManager::ProjectManager() {
npdialog = memnew(ProjectDialog);
gui_base->add_child(npdialog);
- npdialog->connect("projects_updated", this, "_on_projects_updated");
- npdialog->connect("project_created", this, "_on_project_created");
+ npdialog->connect("projects_updated", callable_mp(this, &ProjectManager::_on_projects_updated));
+ npdialog->connect("project_created", callable_mp(this, &ProjectManager::_on_project_created));
_load_recent_projects();
@@ -2719,8 +2689,8 @@ ProjectManager::ProjectManager() {
_scan_begin(EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path"));
}
- SceneTree::get_singleton()->connect("files_dropped", this, "_files_dropped");
- SceneTree::get_singleton()->connect("global_menu_action", this, "_global_menu_action");
+ SceneTree::get_singleton()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
+ SceneTree::get_singleton()->connect("global_menu_action", callable_mp(this, &ProjectManager::_global_menu_action));
run_error_diag = memnew(AcceptDialog);
gui_base->add_child(run_error_diag);
@@ -2732,7 +2702,7 @@ ProjectManager::ProjectManager() {
open_templates = memnew(ConfirmationDialog);
open_templates->set_text(TTR("You currently don't have any projects.\nWould you like to explore official example projects in the Asset Library?"));
open_templates->get_ok()->set_text(TTR("Open Asset Library"));
- open_templates->connect("confirmed", this, "_open_asset_library");
+ open_templates->connect("confirmed", callable_mp(this, &ProjectManager::_open_asset_library));
add_child(open_templates);
}
@@ -2770,7 +2740,8 @@ void ProjectListFilter::_filter_option_selected(int p_idx) {
FilterOption selected = (FilterOption)(filter_option->get_selected());
if (_current_filter != selected) {
_current_filter = selected;
- emit_signal("filter_changed");
+ if (is_inside_tree())
+ emit_signal("filter_changed");
}
}
@@ -2784,23 +2755,20 @@ void ProjectListFilter::_notification(int p_what) {
void ProjectListFilter::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_search_text_changed"), &ProjectListFilter::_search_text_changed);
- ClassDB::bind_method(D_METHOD("_filter_option_selected"), &ProjectListFilter::_filter_option_selected);
-
ADD_SIGNAL(MethodInfo("filter_changed"));
}
void ProjectListFilter::add_filter_option() {
filter_option = memnew(OptionButton);
filter_option->set_clip_text(true);
- filter_option->connect("item_selected", this, "_filter_option_selected");
+ filter_option->connect("item_selected", callable_mp(this, &ProjectListFilter::_filter_option_selected));
add_child(filter_option);
}
void ProjectListFilter::add_search_box() {
search_box = memnew(LineEdit);
search_box->set_placeholder(TTR("Search"));
- search_box->connect("text_changed", this, "_search_text_changed");
+ search_box->connect("text_changed", callable_mp(this, &ProjectListFilter::_search_text_changed));
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
add_child(search_box);
diff --git a/editor/project_manager.h b/editor/project_manager.h
index feeea9695d..8b9c769c59 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -111,8 +111,8 @@ class ProjectManager : public Control {
void _dim_window();
void _unhandled_input(const Ref<InputEvent> &p_ev);
- void _files_dropped(PoolStringArray p_files, int p_screen);
- void _scan_multiple_folders(PoolStringArray p_files);
+ void _files_dropped(PackedStringArray p_files, int p_screen);
+ void _scan_multiple_folders(PackedStringArray p_files);
void _on_order_option_changed();
void _on_filter_option_changed();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 6635f5cb47..7d8a4a733d 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -82,7 +82,7 @@ void ProjectSettingsEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
if (k.is_valid() && is_window_modal_on_top() && k->is_pressed()) {
- if (k->get_scancode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) {
+ if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) {
if (search_button->is_pressed()) {
search_box->grab_focus();
search_box->select_all();
@@ -108,9 +108,10 @@ void ProjectSettingsEditor::_notification(int p_what) {
action_add_error->add_color_override("font_color", get_color("error_color", "Editor"));
- translation_list->connect("button_pressed", this, "_translation_delete");
+ translation_list->connect("button_pressed", callable_mp(this, &ProjectSettingsEditor::_translation_delete));
_update_actions();
- popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key "), INPUT_KEY); //"Key " - because the word 'key' has already been used as a key animation
+ popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key"), INPUT_KEY); //"Key " - because the word 'key' has already been used as a key animation
+ popup_add->add_icon_item(get_icon("KeyboardPhysical", "EditorIcons"), TTR("Physical Key"), INPUT_KEY_PHYSICAL);
popup_add->add_icon_item(get_icon("JoyButton", "EditorIcons"), TTR("Joy Button"), INPUT_JOY_BUTTON);
popup_add->add_icon_item(get_icon("JoyAxis", "EditorIcons"), TTR("Joy Axis"), INPUT_JOY_MOTION);
popup_add->add_icon_item(get_icon("Mouse", "EditorIcons"), TTR("Mouse Button"), INPUT_MOUSE_BUTTON);
@@ -146,6 +147,7 @@ void ProjectSettingsEditor::_notification(int p_what) {
search_box->set_clear_button_enabled(true);
action_add_error->add_color_override("font_color", get_color("error_color", "Editor"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_KEY), get_icon("Keyboard", "EditorIcons"));
+ popup_add->set_item_icon(popup_add->get_item_index(INPUT_KEY_PHYSICAL), get_icon("KeyboardPhysical", "EditorIcons"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_JOY_BUTTON), get_icon("JoyButton", "EditorIcons"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_JOY_MOTION), get_icon("JoyAxis", "EditorIcons"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_MOUSE_BUTTON), get_icon("Mouse", "EditorIcons"));
@@ -361,7 +363,13 @@ void ProjectSettingsEditor::_press_a_key_confirm() {
Ref<InputEventKey> ie;
ie.instance();
- ie->set_scancode(last_wait_for_key->get_scancode());
+ if (press_a_key_physical) {
+ ie->set_physical_keycode(last_wait_for_key->get_physical_keycode());
+ ie->set_keycode(0);
+ } else {
+ ie->set_physical_keycode(0);
+ ie->set_keycode(last_wait_for_key->get_keycode());
+ }
ie->set_shift(last_wait_for_key->get_shift());
ie->set_alt(last_wait_for_key->get_alt());
ie->set_control(last_wait_for_key->get_control());
@@ -379,8 +387,14 @@ void ProjectSettingsEditor::_press_a_key_confirm() {
Ref<InputEventKey> aie = events[i];
if (aie.is_null())
continue;
- if (aie->get_scancode_with_modifiers() == ie->get_scancode_with_modifiers()) {
- return;
+ if (!press_a_key_physical) {
+ if (aie->get_keycode_with_modifiers() == ie->get_keycode_with_modifiers()) {
+ return;
+ }
+ } else {
+ if (aie->get_physical_keycode_with_modifiers() == ie->get_physical_keycode_with_modifiers()) {
+ return;
+ }
}
}
@@ -441,10 +455,10 @@ void ProjectSettingsEditor::_wait_for_key(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() != 0) {
last_wait_for_key = p_event;
- const String str = keycode_get_string(k->get_scancode_with_modifiers());
+ const String str = (press_a_key_physical) ? keycode_get_string(k->get_physical_keycode_with_modifiers()) + TTR(" (Physical)") : keycode_get_string(k->get_keycode_with_modifiers());
press_a_key_label->set_text(str);
press_a_key->get_ok()->set_disabled(false);
@@ -460,6 +474,7 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
case INPUT_KEY: {
+ press_a_key_physical = false;
press_a_key_label->set_text(TTR("Press a Key..."));
press_a_key->get_ok()->set_disabled(true);
last_wait_for_key = Ref<InputEvent>();
@@ -467,6 +482,16 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
press_a_key->grab_focus();
} break;
+ case INPUT_KEY_PHYSICAL: {
+
+ press_a_key_physical = true;
+ press_a_key_label->set_text(TTR("Press a Key..."));
+
+ last_wait_for_key = Ref<InputEvent>();
+ press_a_key->popup_centered(Size2(250, 80) * EDSCALE);
+ press_a_key->grab_focus();
+
+ } break;
case INPUT_MOUSE_BUTTON: {
device_index_label->set_text(TTR("Mouse Button Index:"));
@@ -547,7 +572,11 @@ void ProjectSettingsEditor::_edit_item(Ref<InputEvent> p_exiting_event) {
InputType ie_type;
if ((Ref<InputEventKey>(p_exiting_event)).is_valid()) {
- ie_type = INPUT_KEY;
+ if ((Ref<InputEventKey>(p_exiting_event))->get_keycode() != 0) {
+ ie_type = INPUT_KEY;
+ } else {
+ ie_type = INPUT_KEY_PHYSICAL;
+ }
} else if ((Ref<InputEventJoypadButton>(p_exiting_event)).is_valid()) {
ie_type = INPUT_JOY_BUTTON;
@@ -745,10 +774,14 @@ void ProjectSettingsEditor::_update_actions() {
Ref<InputEventKey> k = event;
if (k.is_valid()) {
- const String str = keycode_get_string(k->get_scancode_with_modifiers());
+ const String str = (k->get_keycode() == 0) ? keycode_get_string(k->get_physical_keycode_with_modifiers()) + TTR(" (Physical)") : keycode_get_string(k->get_keycode_with_modifiers());
action2->set_text(0, str);
- action2->set_icon(0, get_icon("Keyboard", "EditorIcons"));
+ if ((k->get_keycode() != 0)) {
+ action2->set_icon(0, get_icon("Keyboard", "EditorIcons"));
+ } else {
+ action2->set_icon(0, get_icon("KeyboardPhysical", "EditorIcons"));
+ }
}
Ref<InputEventJoypadButton> jb = event;
@@ -847,7 +880,7 @@ void ProjectSettingsEditor::_item_add() {
// Initialize the property with the default value for the given type.
// The type list starts at 1 (as we exclude Nil), so add 1 to the selected value.
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant value = Variant::construct(Variant::Type(type->get_selected() + 1), NULL, 0, ce);
String catname = category->get_text().strip_edges();
@@ -1188,7 +1221,7 @@ void ProjectSettingsEditor::add_translation(const String &p_translation) {
void ProjectSettingsEditor::_translation_add(const String &p_path) {
- PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
for (int i = 0; i < translations.size(); i++) {
@@ -1219,7 +1252,7 @@ void ProjectSettingsEditor::_translation_delete(Object *p_item, int p_column, in
int idx = ti->get_metadata(0);
- PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
ERR_FAIL_INDEX(idx, translations.size());
@@ -1253,7 +1286,7 @@ void ProjectSettingsEditor::_translation_res_add(const String &p_path) {
if (remaps.has(p_path))
return; //pointless already has it
- remaps[p_path] = PoolStringArray();
+ remaps[p_path] = PackedStringArray();
undo_redo->create_action(TTR("Add Remapped Path"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
@@ -1281,7 +1314,7 @@ void ProjectSettingsEditor::_translation_res_option_add(const String &p_path) {
String key = k->get_metadata(0);
ERR_FAIL_COND(!remaps.has(key));
- PoolStringArray r = remaps[key];
+ PackedStringArray r = remaps[key];
r.push_back(p_path + ":" + "en");
remaps[key] = r;
@@ -1328,7 +1361,7 @@ void ProjectSettingsEditor::_translation_res_option_changed() {
ERR_FAIL_INDEX(which, langs.size());
ERR_FAIL_COND(!remaps.has(key));
- PoolStringArray r = remaps[key];
+ PackedStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
if (translation_locales_idxs_remap.size() > which) {
r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]);
@@ -1395,7 +1428,7 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p
int idx = ed->get_metadata(0);
ERR_FAIL_COND(!remaps.has(key));
- PoolStringArray r = remaps[key];
+ PackedStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
r.remove(idx);
remaps[key] = r;
@@ -1506,7 +1539,7 @@ void ProjectSettingsEditor::_update_translations() {
translation_list->set_hide_root(true);
if (ProjectSettings::get_singleton()->has_setting("locale/translations")) {
- PoolStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
for (int i = 0; i < translations.size(); i++) {
TreeItem *t = translation_list->create_item(root);
@@ -1642,7 +1675,7 @@ void ProjectSettingsEditor::_update_translations() {
t->select(0);
translation_res_option_add_button->set_disabled(false);
- PoolStringArray selected = remaps[keys[i]];
+ PackedStringArray selected = remaps[keys[i]];
for (int j = 0; j < selected.size(); j++) {
String s2 = selected[j];
@@ -1724,51 +1757,11 @@ void ProjectSettingsEditor::_editor_restart_close() {
void ProjectSettingsEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &ProjectSettingsEditor::_unhandled_input);
- ClassDB::bind_method(D_METHOD("_item_selected"), &ProjectSettingsEditor::_item_selected);
- ClassDB::bind_method(D_METHOD("_item_add"), &ProjectSettingsEditor::_item_add);
- ClassDB::bind_method(D_METHOD("_item_adds"), &ProjectSettingsEditor::_item_adds);
- ClassDB::bind_method(D_METHOD("_item_del"), &ProjectSettingsEditor::_item_del);
ClassDB::bind_method(D_METHOD("_item_checked"), &ProjectSettingsEditor::_item_checked);
ClassDB::bind_method(D_METHOD("_save"), &ProjectSettingsEditor::_save);
- ClassDB::bind_method(D_METHOD("_action_add"), &ProjectSettingsEditor::_action_add);
- ClassDB::bind_method(D_METHOD("_action_adds"), &ProjectSettingsEditor::_action_adds);
- ClassDB::bind_method(D_METHOD("_action_check"), &ProjectSettingsEditor::_action_check);
- ClassDB::bind_method(D_METHOD("_action_selected"), &ProjectSettingsEditor::_action_selected);
- ClassDB::bind_method(D_METHOD("_action_edited"), &ProjectSettingsEditor::_action_edited);
- ClassDB::bind_method(D_METHOD("_action_activated"), &ProjectSettingsEditor::_action_activated);
- ClassDB::bind_method(D_METHOD("_action_button_pressed"), &ProjectSettingsEditor::_action_button_pressed);
ClassDB::bind_method(D_METHOD("_update_actions"), &ProjectSettingsEditor::_update_actions);
- ClassDB::bind_method(D_METHOD("_wait_for_key"), &ProjectSettingsEditor::_wait_for_key);
- ClassDB::bind_method(D_METHOD("_add_item"), &ProjectSettingsEditor::_add_item, DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("_device_input_add"), &ProjectSettingsEditor::_device_input_add);
- ClassDB::bind_method(D_METHOD("_press_a_key_confirm"), &ProjectSettingsEditor::_press_a_key_confirm);
- ClassDB::bind_method(D_METHOD("_settings_prop_edited"), &ProjectSettingsEditor::_settings_prop_edited);
- ClassDB::bind_method(D_METHOD("_copy_to_platform"), &ProjectSettingsEditor::_copy_to_platform);
- ClassDB::bind_method(D_METHOD("_update_translations"), &ProjectSettingsEditor::_update_translations);
- ClassDB::bind_method(D_METHOD("_translation_delete"), &ProjectSettingsEditor::_translation_delete);
- ClassDB::bind_method(D_METHOD("_settings_changed"), &ProjectSettingsEditor::_settings_changed);
- ClassDB::bind_method(D_METHOD("_translation_add"), &ProjectSettingsEditor::_translation_add);
- ClassDB::bind_method(D_METHOD("_translation_file_open"), &ProjectSettingsEditor::_translation_file_open);
- ClassDB::bind_method(D_METHOD("_translation_res_add"), &ProjectSettingsEditor::_translation_res_add);
- ClassDB::bind_method(D_METHOD("_translation_res_file_open"), &ProjectSettingsEditor::_translation_res_file_open);
- ClassDB::bind_method(D_METHOD("_translation_res_option_add"), &ProjectSettingsEditor::_translation_res_option_add);
- ClassDB::bind_method(D_METHOD("_translation_res_option_file_open"), &ProjectSettingsEditor::_translation_res_option_file_open);
- ClassDB::bind_method(D_METHOD("_translation_res_select"), &ProjectSettingsEditor::_translation_res_select);
- ClassDB::bind_method(D_METHOD("_translation_res_option_changed"), &ProjectSettingsEditor::_translation_res_option_changed);
- ClassDB::bind_method(D_METHOD("_translation_res_delete"), &ProjectSettingsEditor::_translation_res_delete);
- ClassDB::bind_method(D_METHOD("_translation_res_option_delete"), &ProjectSettingsEditor::_translation_res_option_delete);
-
- ClassDB::bind_method(D_METHOD("_translation_filter_option_changed"), &ProjectSettingsEditor::_translation_filter_option_changed);
- ClassDB::bind_method(D_METHOD("_translation_filter_mode_changed"), &ProjectSettingsEditor::_translation_filter_mode_changed);
-
- ClassDB::bind_method(D_METHOD("_toggle_search_bar"), &ProjectSettingsEditor::_toggle_search_bar);
-
- ClassDB::bind_method(D_METHOD("_copy_to_platform_about_to_show"), &ProjectSettingsEditor::_copy_to_platform_about_to_show);
-
- ClassDB::bind_method(D_METHOD("_editor_restart_request"), &ProjectSettingsEditor::_editor_restart_request);
- ClassDB::bind_method(D_METHOD("_editor_restart"), &ProjectSettingsEditor::_editor_restart);
- ClassDB::bind_method(D_METHOD("_editor_restart_close"), &ProjectSettingsEditor::_editor_restart_close);
+ ClassDB::bind_method(D_METHOD("_update_translations"), &ProjectSettingsEditor::_update_translations);
ClassDB::bind_method(D_METHOD("get_tabs"), &ProjectSettingsEditor::get_tabs);
@@ -1805,7 +1798,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
search_button->set_pressed(false);
search_button->set_text(TTR("Search"));
hbc->add_child(search_button);
- search_button->connect("toggled", this, "_toggle_search_bar");
+ search_button->connect("toggled", callable_mp(this, &ProjectSettingsEditor::_toggle_search_bar));
hbc->add_child(memnew(VSeparator));
@@ -1820,7 +1813,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
category = memnew(LineEdit);
category->set_h_size_flags(Control::SIZE_EXPAND_FILL);
add_prop_bar->add_child(category);
- category->connect("text_entered", this, "_item_adds");
+ category->connect("text_entered", callable_mp(this, &ProjectSettingsEditor::_item_adds));
l = memnew(Label);
add_prop_bar->add_child(l);
@@ -1829,7 +1822,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
property = memnew(LineEdit);
property->set_h_size_flags(Control::SIZE_EXPAND_FILL);
add_prop_bar->add_child(property);
- property->connect("text_entered", this, "_item_adds");
+ property->connect("text_entered", callable_mp(this, &ProjectSettingsEditor::_item_adds));
l = memnew(Label);
add_prop_bar->add_child(l);
@@ -1847,7 +1840,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
Button *add = memnew(Button);
add_prop_bar->add_child(add);
add->set_text(TTR("Add"));
- add->connect("pressed", this, "_item_add");
+ add->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_item_add));
search_bar = memnew(HBoxContainer);
search_bar->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1863,14 +1856,14 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
globals_editor->get_inspector()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo());
globals_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
globals_editor->register_search_box(search_box);
- globals_editor->get_inspector()->connect("property_selected", this, "_item_selected");
- globals_editor->get_inspector()->connect("property_edited", this, "_settings_prop_edited");
- globals_editor->get_inspector()->connect("restart_requested", this, "_editor_restart_request");
+ globals_editor->get_inspector()->connect("property_selected", callable_mp(this, &ProjectSettingsEditor::_item_selected));
+ globals_editor->get_inspector()->connect("property_edited", callable_mp(this, &ProjectSettingsEditor::_settings_prop_edited));
+ globals_editor->get_inspector()->connect("restart_requested", callable_mp(this, &ProjectSettingsEditor::_editor_restart_request));
Button *del = memnew(Button);
hbc->add_child(del);
del->set_text(TTR("Delete"));
- del->connect("pressed", this, "_item_del");
+ del->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_item_del));
add_prop_bar->add_child(memnew(VSeparator));
@@ -1879,8 +1872,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
popup_copy_to_feature->set_disabled(true);
add_prop_bar->add_child(popup_copy_to_feature);
- popup_copy_to_feature->get_popup()->connect("id_pressed", this, "_copy_to_platform");
- popup_copy_to_feature->get_popup()->connect("about_to_show", this, "_copy_to_platform_about_to_show");
+ popup_copy_to_feature->get_popup()->connect("id_pressed", callable_mp(this, &ProjectSettingsEditor::_copy_to_platform));
+ popup_copy_to_feature->get_popup()->connect("about_to_show", callable_mp(this, &ProjectSettingsEditor::_copy_to_platform_about_to_show));
get_ok()->set_text(TTR("Close"));
set_hide_on_ok(true);
@@ -1897,11 +1890,11 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
restart_hb->add_child(restart_label);
restart_hb->add_spacer();
Button *restart_button = memnew(Button);
- restart_button->connect("pressed", this, "_editor_restart");
+ restart_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart));
restart_hb->add_child(restart_button);
restart_button->set_text(TTR("Save & Restart"));
restart_close_button = memnew(ToolButton);
- restart_close_button->connect("pressed", this, "_editor_restart_close");
+ restart_close_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart_close));
restart_hb->add_child(restart_close_button);
restart_container->hide();
@@ -1929,8 +1922,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
action_name = memnew(LineEdit);
action_name->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(action_name);
- action_name->connect("text_entered", this, "_action_adds");
- action_name->connect("text_changed", this, "_action_check");
+ action_name->connect("text_entered", callable_mp(this, &ProjectSettingsEditor::_action_adds));
+ action_name->connect("text_changed", callable_mp(this, &ProjectSettingsEditor::_action_check));
action_add_error = memnew(Label);
hbc->add_child(action_add_error);
@@ -1940,7 +1933,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
hbc->add_child(add);
add->set_text(TTR("Add"));
add->set_disabled(true);
- add->connect("pressed", this, "_action_add");
+ add->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_action_add));
action_add = add;
input_editor = memnew(Tree);
@@ -1954,15 +1947,17 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
input_editor->set_column_min_width(1, 80 * EDSCALE);
input_editor->set_column_expand(2, false);
input_editor->set_column_min_width(2, 50 * EDSCALE);
- input_editor->connect("item_edited", this, "_action_edited");
- input_editor->connect("item_activated", this, "_action_activated");
- input_editor->connect("cell_selected", this, "_action_selected");
- input_editor->connect("button_pressed", this, "_action_button_pressed");
+ input_editor->connect("item_edited", callable_mp(this, &ProjectSettingsEditor::_action_edited));
+ input_editor->connect("item_activated", callable_mp(this, &ProjectSettingsEditor::_action_activated));
+ input_editor->connect("cell_selected", callable_mp(this, &ProjectSettingsEditor::_action_selected));
+ input_editor->connect("button_pressed", callable_mp(this, &ProjectSettingsEditor::_action_button_pressed));
input_editor->set_drag_forwarding(this);
popup_add = memnew(PopupMenu);
add_child(popup_add);
- popup_add->connect("id_pressed", this, "_add_item");
+ popup_add->connect("id_pressed", callable_mp(this, &ProjectSettingsEditor::_add_item), make_binds(Ref<InputEvent>()));
+
+ press_a_key_physical = false;
press_a_key = memnew(ConfirmationDialog);
press_a_key->set_focus_mode(FOCUS_ALL);
@@ -1977,13 +1972,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
press_a_key->get_ok()->set_disabled(true);
press_a_key_label = l;
press_a_key->add_child(l);
- press_a_key->connect("gui_input", this, "_wait_for_key");
- press_a_key->connect("confirmed", this, "_press_a_key_confirm");
+ press_a_key->connect("gui_input", callable_mp(this, &ProjectSettingsEditor::_wait_for_key));
+ press_a_key->connect("confirmed", callable_mp(this, &ProjectSettingsEditor::_press_a_key_confirm));
device_input = memnew(ConfirmationDialog);
add_child(device_input);
device_input->get_ok()->set_text(TTR("Add"));
- device_input->connect("confirmed", this, "_device_input_add");
+ device_input->connect("confirmed", callable_mp(this, &ProjectSettingsEditor::_device_input_add));
hbc = memnew(HBoxContainer);
device_input->add_child(hbc);
@@ -2034,7 +2029,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
thb->add_child(memnew(Label(TTR("Translations:"))));
thb->add_spacer();
Button *addtr = memnew(Button(TTR("Add...")));
- addtr->connect("pressed", this, "_translation_file_open");
+ addtr->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_translation_file_open));
thb->add_child(addtr);
VBoxContainer *tmc = memnew(VBoxContainer);
tvb->add_child(tmc);
@@ -2046,7 +2041,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
translation_file_open = memnew(EditorFileDialog);
add_child(translation_file_open);
translation_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- translation_file_open->connect("file_selected", this, "_translation_add");
+ translation_file_open->connect("file_selected", callable_mp(this, &ProjectSettingsEditor::_translation_add));
}
{
@@ -2058,28 +2053,28 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
thb->add_child(memnew(Label(TTR("Resources:"))));
thb->add_spacer();
Button *addtr = memnew(Button(TTR("Add...")));
- addtr->connect("pressed", this, "_translation_res_file_open");
+ addtr->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_translation_res_file_open));
thb->add_child(addtr);
VBoxContainer *tmc = memnew(VBoxContainer);
tvb->add_child(tmc);
tmc->set_v_size_flags(SIZE_EXPAND_FILL);
translation_remap = memnew(Tree);
translation_remap->set_v_size_flags(SIZE_EXPAND_FILL);
- translation_remap->connect("cell_selected", this, "_translation_res_select");
+ translation_remap->connect("cell_selected", callable_mp(this, &ProjectSettingsEditor::_translation_res_select));
tmc->add_child(translation_remap);
- translation_remap->connect("button_pressed", this, "_translation_res_delete");
+ translation_remap->connect("button_pressed", callable_mp(this, &ProjectSettingsEditor::_translation_res_delete));
translation_res_file_open = memnew(EditorFileDialog);
add_child(translation_res_file_open);
translation_res_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- translation_res_file_open->connect("file_selected", this, "_translation_res_add");
+ translation_res_file_open->connect("file_selected", callable_mp(this, &ProjectSettingsEditor::_translation_res_add));
thb = memnew(HBoxContainer);
tvb->add_child(thb);
thb->add_child(memnew(Label(TTR("Remaps by Locale:"))));
thb->add_spacer();
addtr = memnew(Button(TTR("Add...")));
- addtr->connect("pressed", this, "_translation_res_option_file_open");
+ addtr->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_translation_res_option_file_open));
translation_res_option_add_button = addtr;
thb->add_child(addtr);
tmc = memnew(VBoxContainer);
@@ -2096,13 +2091,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
translation_remap_options->set_column_expand(0, true);
translation_remap_options->set_column_expand(1, false);
translation_remap_options->set_column_min_width(1, 200);
- translation_remap_options->connect("item_edited", this, "_translation_res_option_changed");
- translation_remap_options->connect("button_pressed", this, "_translation_res_option_delete");
+ translation_remap_options->connect("item_edited", callable_mp(this, &ProjectSettingsEditor::_translation_res_option_changed));
+ translation_remap_options->connect("button_pressed", callable_mp(this, &ProjectSettingsEditor::_translation_res_option_delete));
translation_res_option_file_open = memnew(EditorFileDialog);
add_child(translation_res_option_file_open);
translation_res_option_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- translation_res_option_file_open->connect("file_selected", this, "_translation_res_option_add");
+ translation_res_option_file_open->connect("file_selected", callable_mp(this, &ProjectSettingsEditor::_translation_res_option_add));
}
{
@@ -2118,20 +2113,20 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
translation_locale_filter_mode->add_item(TTR("Show Selected Locales Only"), SHOW_ONLY_SELECTED_LOCALES);
translation_locale_filter_mode->select(0);
tmc->add_margin_child(TTR("Filter mode:"), translation_locale_filter_mode);
- translation_locale_filter_mode->connect("item_selected", this, "_translation_filter_mode_changed");
+ translation_locale_filter_mode->connect("item_selected", callable_mp(this, &ProjectSettingsEditor::_translation_filter_mode_changed));
translation_filter = memnew(Tree);
translation_filter->set_v_size_flags(SIZE_EXPAND_FILL);
translation_filter->set_columns(1);
tmc->add_child(memnew(Label(TTR("Locales:"))));
tmc->add_child(translation_filter);
- translation_filter->connect("item_edited", this, "_translation_filter_option_changed");
+ translation_filter->connect("item_edited", callable_mp(this, &ProjectSettingsEditor::_translation_filter_option_changed));
}
autoload_settings = memnew(EditorAutoloadSettings);
autoload_settings->set_name(TTR("AutoLoad"));
tab_container->add_child(autoload_settings);
- autoload_settings->connect("autoload_changed", this, "_settings_changed");
+ autoload_settings->connect("autoload_changed", callable_mp(this, &ProjectSettingsEditor::_settings_changed));
plugin_settings = memnew(EditorPluginSettings);
plugin_settings->set_name(TTR("Plugins"));
@@ -2139,7 +2134,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
timer = memnew(Timer);
timer->set_wait_time(1.5);
- timer->connect("timeout", ProjectSettings::get_singleton(), "save");
+ timer->connect("timeout", callable_mp(ProjectSettings::get_singleton(), &ProjectSettings::save));
timer->set_one_shot(true);
add_child(timer);
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 5755b258c3..52e7612acd 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -45,6 +45,7 @@ class ProjectSettingsEditor : public AcceptDialog {
enum InputType {
INPUT_KEY,
+ INPUT_KEY_PHYSICAL,
INPUT_JOY_BUTTON,
INPUT_JOY_MOTION,
INPUT_MOUSE_BUTTON
@@ -77,6 +78,7 @@ class ProjectSettingsEditor : public AcceptDialog {
OptionButton *type;
PopupMenu *popup_add;
ConfirmationDialog *press_a_key;
+ bool press_a_key_physical;
Label *press_a_key_label;
ConfirmationDialog *device_input;
OptionButton *device_id;
@@ -117,7 +119,7 @@ class ProjectSettingsEditor : public AcceptDialog {
void _item_del();
void _update_actions();
void _save();
- void _add_item(int p_item, Ref<InputEvent> p_exiting_event = NULL);
+ void _add_item(int p_item, Ref<InputEvent> p_exiting_event = Ref<InputEvent>());
void _edit_item(Ref<InputEvent> p_exiting_event);
void _action_check(String p_action);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index e6128f255d..f4af50eb81 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -393,12 +393,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::INT:
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (hint == PROPERTY_HINT_RANGE) {
int c = hint_text.get_slice_count(",");
- float min = 0, max = 100, step = type == Variant::REAL ? .01 : 1;
+ float min = 0, max = 100, step = type == Variant::FLOAT ? .01 : 1;
if (c >= 1) {
if (!hint_text.get_slice(",", 0).empty())
@@ -589,7 +589,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
if (!create_dialog) {
create_dialog = memnew(CreateDialog);
- create_dialog->connect("create", this, "_create_dialog_callback");
+ create_dialog->connect("create", callable_mp(this, &CustomPropertyEditor::_create_dialog_callback));
add_child(create_dialog);
}
@@ -605,12 +605,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} else if (hint == PROPERTY_HINT_METHOD_OF_VARIANT_TYPE) {
-#define MAKE_PROPSELECT \
- if (!property_select) { \
- property_select = memnew(PropertySelector); \
- property_select->connect("selected", this, "_create_selected_property"); \
- add_child(property_select); \
- } \
+#define MAKE_PROPSELECT \
+ if (!property_select) { \
+ property_select = memnew(PropertySelector); \
+ property_select->connect("selected", callable_mp(this, &CustomPropertyEditor::_create_selected_property)); \
+ add_child(property_select); \
+ } \
hide();
MAKE_PROPSELECT;
@@ -865,7 +865,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
color_picker->set_deferred_mode(true);
add_child(color_picker);
color_picker->hide();
- color_picker->connect("color_changed", this, "_color_changed");
+ color_picker->connect("color_changed", callable_mp(this, &CustomPropertyEditor::_color_changed));
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
@@ -1045,22 +1045,28 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
case Variant::DICTIONARY: {
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_STRING_ARRAY: {
+
+ } break;
+ case Variant::PACKED_VECTOR3_ARRAY: {
+
+ } break;
+ case Variant::PACKED_COLOR_ARRAY: {
} break;
default: {
@@ -1113,7 +1119,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
void CustomPropertyEditor::_type_create_selected(int p_idx) {
- if (type == Variant::INT || type == Variant::REAL) {
+ if (type == Variant::INT || type == Variant::FLOAT) {
float newval = 0;
switch (p_idx) {
@@ -1563,7 +1569,7 @@ void CustomPropertyEditor::_modified(String p_string) {
emit_signal("variant_changed");
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (hint != PROPERTY_HINT_EXP_EASING) {
String text = value_editor[0]->get_text();
@@ -1697,22 +1703,22 @@ void CustomPropertyEditor::_modified(String p_string) {
case Variant::DICTIONARY: {
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_STRING_ARRAY: {
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_VECTOR3_ARRAY: {
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
} break;
default: {
@@ -1751,7 +1757,7 @@ void CustomPropertyEditor::_range_modified(double p_value) {
void CustomPropertyEditor::_focus_enter() {
switch (type) {
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::STRING:
case Variant::VECTOR2:
case Variant::RECT2:
@@ -1777,7 +1783,7 @@ void CustomPropertyEditor::_focus_enter() {
void CustomPropertyEditor::_focus_exit() {
switch (type) {
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::STRING:
case Variant::VECTOR2:
case Variant::RECT2:
@@ -1868,22 +1874,6 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int
void CustomPropertyEditor::_bind_methods() {
- ClassDB::bind_method("_focus_enter", &CustomPropertyEditor::_focus_enter);
- ClassDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
- ClassDB::bind_method("_modified", &CustomPropertyEditor::_modified);
- ClassDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
- ClassDB::bind_method("_action_pressed", &CustomPropertyEditor::_action_pressed);
- ClassDB::bind_method("_file_selected", &CustomPropertyEditor::_file_selected);
- ClassDB::bind_method("_type_create_selected", &CustomPropertyEditor::_type_create_selected);
- ClassDB::bind_method("_node_path_selected", &CustomPropertyEditor::_node_path_selected);
- ClassDB::bind_method("_color_changed", &CustomPropertyEditor::_color_changed);
- ClassDB::bind_method("_draw_easing", &CustomPropertyEditor::_draw_easing);
- ClassDB::bind_method("_drag_easing", &CustomPropertyEditor::_drag_easing);
- ClassDB::bind_method("_text_edit_changed", &CustomPropertyEditor::_text_edit_changed);
- ClassDB::bind_method("_menu_option", &CustomPropertyEditor::_menu_option);
- ClassDB::bind_method("_create_dialog_callback", &CustomPropertyEditor::_create_dialog_callback);
- ClassDB::bind_method("_create_selected_property", &CustomPropertyEditor::_create_selected_property);
-
ADD_SIGNAL(MethodInfo("variant_changed"));
ADD_SIGNAL(MethodInfo("variant_field_changed", PropertyInfo(Variant::STRING, "field")));
ADD_SIGNAL(MethodInfo("resource_edit_request"));
@@ -1902,9 +1892,9 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(value_label[i]);
value_editor[i]->hide();
value_label[i]->hide();
- value_editor[i]->connect("text_entered", this, "_modified");
- value_editor[i]->connect("focus_entered", this, "_focus_enter");
- value_editor[i]->connect("focus_exited", this, "_focus_exit");
+ value_editor[i]->connect("text_entered", callable_mp(this, &CustomPropertyEditor::_modified));
+ value_editor[i]->connect("focus_entered", callable_mp(this, &CustomPropertyEditor::_focus_enter));
+ value_editor[i]->connect("focus_exited", callable_mp(this, &CustomPropertyEditor::_focus_exit));
}
focused_value_editor = -1;
@@ -1934,7 +1924,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
checks20[i]->set_focus_mode(FOCUS_NONE);
checks20gc->add_child(checks20[i]);
checks20[i]->hide();
- checks20[i]->connect("pressed", this, "_action_pressed", make_binds(i));
+ checks20[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), make_binds(i));
checks20[i]->set_tooltip(vformat(TTR("Bit %d, val %d."), i, 1 << i));
}
@@ -1944,7 +1934,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
text_edit->set_margin(MARGIN_BOTTOM, -30);
text_edit->hide();
- text_edit->connect("text_changed", this, "_text_edit_changed");
+ text_edit->connect("text_changed", callable_mp(this, &CustomPropertyEditor::_text_edit_changed));
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
@@ -1953,7 +1943,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(action_buttons[i]);
Vector<Variant> binds;
binds.push_back(i);
- action_buttons[i]->connect("pressed", this, "_action_pressed", binds);
+ action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds);
action_buttons[i]->set_flat(true);
}
@@ -1964,8 +1954,8 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(file);
file->hide();
- file->connect("file_selected", this, "_file_selected");
- file->connect("dir_selected", this, "_file_selected");
+ file->connect("file_selected", callable_mp(this, &CustomPropertyEditor::_file_selected));
+ file->connect("dir_selected", callable_mp(this, &CustomPropertyEditor::_file_selected));
error = memnew(ConfirmationDialog);
error->set_title(TTR("Error!"));
@@ -1973,7 +1963,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
scene_tree = memnew(SceneTreeDialog);
add_child(scene_tree);
- scene_tree->connect("selected", this, "_node_path_selected");
+ scene_tree->connect("selected", callable_mp(this, &CustomPropertyEditor::_node_path_selected));
scene_tree->get_scene_tree()->set_show_enabled_subscene(true);
texture_preview = memnew(TextureRect);
@@ -1983,31 +1973,31 @@ CustomPropertyEditor::CustomPropertyEditor() {
easing_draw = memnew(Control);
add_child(easing_draw);
easing_draw->hide();
- easing_draw->connect("draw", this, "_draw_easing");
- easing_draw->connect("gui_input", this, "_drag_easing");
+ easing_draw->connect("draw", callable_mp(this, &CustomPropertyEditor::_draw_easing));
+ easing_draw->connect("gui_input", callable_mp(this, &CustomPropertyEditor::_drag_easing));
easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE);
type_button = memnew(MenuButton);
add_child(type_button);
type_button->hide();
- type_button->get_popup()->connect("id_pressed", this, "_type_create_selected");
+ type_button->get_popup()->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_type_create_selected));
menu = memnew(PopupMenu);
menu->set_pass_on_modal_close_click(false);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_option");
+ menu->connect("id_pressed", callable_mp(this, &CustomPropertyEditor::_menu_option));
evaluator = NULL;
spinbox = memnew(SpinBox);
add_child(spinbox);
spinbox->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
- spinbox->connect("value_changed", this, "_range_modified");
+ spinbox->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified));
slider = memnew(HSlider);
add_child(slider);
slider->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
- slider->connect("value_changed", this, "_range_modified");
+ slider->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified));
create_dialog = NULL;
property_select = NULL;
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 1de5099c4a..ede7b860d6 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -45,7 +45,7 @@ void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
if (k.is_valid()) {
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
@@ -95,7 +95,7 @@ void PropertySelector::_update_search() {
instance->get_property_list(&props, true);
} else if (type != Variant::NIL) {
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(type, NULL, 0, ce);
v.get_property_list(&props);
@@ -141,13 +141,13 @@ void PropertySelector::_update_search() {
Control::get_icon("Object", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
@@ -200,7 +200,7 @@ void PropertySelector::_update_search() {
if (type != Variant::NIL) {
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(type, NULL, 0, ce);
v.get_method_list(&methods);
} else {
@@ -389,13 +389,17 @@ void PropertySelector::_item_selected() {
help_bit->set_text(text);
}
+void PropertySelector::_hide_requested() {
+ _closed(); // From WindowDialog.
+}
+
void PropertySelector::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
} else if (p_what == NOTIFICATION_EXIT_TREE) {
- disconnect("confirmed", this, "_confirmed");
+ disconnect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
}
}
@@ -542,11 +546,6 @@ void PropertySelector::set_type_filter(const Vector<Variant::Type> &p_type_filte
void PropertySelector::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_text_changed"), &PropertySelector::_text_changed);
- ClassDB::bind_method(D_METHOD("_confirmed"), &PropertySelector::_confirmed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &PropertySelector::_sbox_input);
- ClassDB::bind_method(D_METHOD("_item_selected"), &PropertySelector::_item_selected);
-
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "name")));
}
@@ -557,21 +556,21 @@ PropertySelector::PropertySelector() {
//set_child_rect(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &PropertySelector::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &PropertySelector::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
- search_options->connect("cell_selected", this, "_item_selected");
+ search_options->connect("item_activated", callable_mp(this, &PropertySelector::_confirmed));
+ search_options->connect("cell_selected", callable_mp(this, &PropertySelector::_item_selected));
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
virtuals_only = false;
help_bit = memnew(EditorHelpBit);
vbc->add_margin_child(TTR("Description:"), help_bit);
- help_bit->connect("request_hide", this, "_closed");
+ help_bit->connect("request_hide", callable_mp(this, &PropertySelector::_hide_requested));
}
diff --git a/editor/property_selector.h b/editor/property_selector.h
index 8a190189ff..f579c0404c 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -41,12 +41,12 @@ class PropertySelector : public ConfirmationDialog {
LineEdit *search_box;
Tree *search_options;
- void _update_search();
-
+ void _text_changed(const String &p_newtext);
void _sbox_input(const Ref<InputEvent> &p_ie);
-
+ void _update_search();
void _confirmed();
- void _text_changed(const String &p_newtext);
+ void _item_selected();
+ void _hide_requested();
EditorHelpBit *help_bit;
@@ -58,8 +58,6 @@ class PropertySelector : public ConfirmationDialog {
Object *instance;
bool virtuals_only;
- void _item_selected();
-
Vector<Variant::Type> type_filter;
protected:
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index ea92e6407c..8a5fad269f 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -83,7 +83,7 @@ void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> k = p_ie;
if (k.is_valid()) {
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
@@ -257,16 +257,16 @@ void EditorQuickOpen::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed));
search_box->set_clear_button_enabled(true);
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("confirmed", this, "_confirmed");
+ disconnect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed));
} break;
}
}
@@ -278,10 +278,6 @@ StringName EditorQuickOpen::get_base_type() const {
void EditorQuickOpen::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_text_changed"), &EditorQuickOpen::_text_changed);
- ClassDB::bind_method(D_METHOD("_confirmed"), &EditorQuickOpen::_confirmed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &EditorQuickOpen::_sbox_input);
-
ADD_SIGNAL(MethodInfo("quick_open"));
}
@@ -291,15 +287,15 @@ EditorQuickOpen::EditorQuickOpen() {
add_child(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &EditorQuickOpen::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &EditorQuickOpen::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
+ search_options->connect("item_activated", callable_mp(this, &EditorQuickOpen::_confirmed));
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
search_options->add_constant_override("draw_guides", 1);
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 317be309a3..2d7b7027c8 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -144,7 +144,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_name->set_text("NAME");
but_insert_name->set_tooltip(String("${NAME}\n") + TTR("Node name"));
but_insert_name->set_focus_mode(FOCUS_NONE);
- but_insert_name->connect("pressed", this, "_insert_text", make_binds("${NAME}"));
+ but_insert_name->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${NAME}"));
but_insert_name->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_name);
@@ -154,7 +154,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_parent->set_text("PARENT");
but_insert_parent->set_tooltip(String("${PARENT}\n") + TTR("Node's parent name, if available"));
but_insert_parent->set_focus_mode(FOCUS_NONE);
- but_insert_parent->connect("pressed", this, "_insert_text", make_binds("${PARENT}"));
+ but_insert_parent->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${PARENT}"));
but_insert_parent->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_parent);
@@ -164,7 +164,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_type->set_text("TYPE");
but_insert_type->set_tooltip(String("${TYPE}\n") + TTR("Node type"));
but_insert_type->set_focus_mode(FOCUS_NONE);
- but_insert_type->connect("pressed", this, "_insert_text", make_binds("${TYPE}"));
+ but_insert_type->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${TYPE}"));
but_insert_type->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_type);
@@ -174,7 +174,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_scene->set_text("SCENE");
but_insert_scene->set_tooltip(String("${SCENE}\n") + TTR("Current scene name"));
but_insert_scene->set_focus_mode(FOCUS_NONE);
- but_insert_scene->connect("pressed", this, "_insert_text", make_binds("${SCENE}"));
+ but_insert_scene->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${SCENE}"));
but_insert_scene->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_scene);
@@ -184,7 +184,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_root->set_text("ROOT");
but_insert_root->set_tooltip(String("${ROOT}\n") + TTR("Root node name"));
but_insert_root->set_focus_mode(FOCUS_NONE);
- but_insert_root->connect("pressed", this, "_insert_text", make_binds("${ROOT}"));
+ but_insert_root->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${ROOT}"));
but_insert_root->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_root);
@@ -194,7 +194,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_count->set_text("COUNTER");
but_insert_count->set_tooltip(String("${COUNTER}\n") + TTR("Sequential integer counter.\nCompare counter options."));
but_insert_count->set_focus_mode(FOCUS_NONE);
- but_insert_count->connect("pressed", this, "_insert_text", make_binds("${COUNTER}"));
+ but_insert_count->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${COUNTER}"));
but_insert_count->set_h_size_flags(SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_count);
@@ -306,35 +306,35 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
// ---- Connections
- cbut_collapse_features->connect("toggled", this, "_features_toggled");
+ cbut_collapse_features->connect("toggled", callable_mp(this, &RenameDialog::_features_toggled));
// Substitite Buttons
- lne_search->connect("focus_entered", this, "_update_substitute");
- lne_search->connect("focus_exited", this, "_update_substitute");
- lne_replace->connect("focus_entered", this, "_update_substitute");
- lne_replace->connect("focus_exited", this, "_update_substitute");
- lne_prefix->connect("focus_entered", this, "_update_substitute");
- lne_prefix->connect("focus_exited", this, "_update_substitute");
- lne_suffix->connect("focus_entered", this, "_update_substitute");
- lne_suffix->connect("focus_exited", this, "_update_substitute");
+ lne_search->connect("focus_entered", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_search->connect("focus_exited", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_replace->connect("focus_entered", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_replace->connect("focus_exited", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_prefix->connect("focus_entered", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_prefix->connect("focus_exited", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_suffix->connect("focus_entered", callable_mp(this, &RenameDialog::_update_substitute));
+ lne_suffix->connect("focus_exited", callable_mp(this, &RenameDialog::_update_substitute));
// Preview
- lne_prefix->connect("text_changed", this, "_update_preview");
- lne_suffix->connect("text_changed", this, "_update_preview");
- lne_search->connect("text_changed", this, "_update_preview");
- lne_replace->connect("text_changed", this, "_update_preview");
- spn_count_start->connect("value_changed", this, "_update_preview_int");
- spn_count_step->connect("value_changed", this, "_update_preview_int");
- spn_count_padding->connect("value_changed", this, "_update_preview_int");
- opt_style->connect("item_selected", this, "_update_preview_int");
- opt_case->connect("item_selected", this, "_update_preview_int");
- cbut_substitute->connect("pressed", this, "_update_preview", varray(""));
- cbut_regex->connect("pressed", this, "_update_preview", varray(""));
- cbut_process->connect("pressed", this, "_update_preview", varray(""));
-
- but_reset->connect("pressed", this, "reset");
+ lne_prefix->connect("text_changed", callable_mp(this, &RenameDialog::_update_preview));
+ lne_suffix->connect("text_changed", callable_mp(this, &RenameDialog::_update_preview));
+ lne_search->connect("text_changed", callable_mp(this, &RenameDialog::_update_preview));
+ lne_replace->connect("text_changed", callable_mp(this, &RenameDialog::_update_preview));
+ spn_count_start->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
+ spn_count_step->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
+ spn_count_padding->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
+ opt_style->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
+ opt_case->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
+ cbut_substitute->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
+ cbut_regex->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
+ cbut_process->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
+
+ but_reset->connect("pressed", callable_mp(this, &RenameDialog::reset));
reset();
_features_toggled(false);
@@ -342,12 +342,6 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
void RenameDialog::_bind_methods() {
- ClassDB::bind_method("_features_toggled", &RenameDialog::_features_toggled);
- ClassDB::bind_method("_update_preview", &RenameDialog::_update_preview);
- ClassDB::bind_method("_update_preview_int", &RenameDialog::_update_preview_int);
- ClassDB::bind_method("_insert_text", &RenameDialog::_insert_text);
- ClassDB::bind_method("_update_substitute", &RenameDialog::_update_substitute);
- ClassDB::bind_method("reset", &RenameDialog::reset);
ClassDB::bind_method("rename", &RenameDialog::rename);
}
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index dd35f41b7a..551d20eddb 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -38,12 +38,12 @@ void ReparentDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("confirmed", this, "_reparent");
+ connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- disconnect("confirmed", this, "_reparent");
+ disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
}
if (p_what == NOTIFICATION_DRAW) {
@@ -74,7 +74,6 @@ void ReparentDialog::set_current(const Set<Node *> &p_selection) {
void ReparentDialog::_bind_methods() {
- ClassDB::bind_method("_reparent", &ReparentDialog::_reparent);
ClassDB::bind_method("_cancel", &ReparentDialog::_cancel);
ADD_SIGNAL(MethodInfo("reparent", PropertyInfo(Variant::NODE_PATH, "path"), PropertyInfo(Variant::BOOL, "keep_global_xform")));
@@ -93,7 +92,7 @@ ReparentDialog::ReparentDialog() {
vbc->add_margin_child(TTR("Reparent Location (Select new Parent):"), tree, true);
- tree->get_scene_tree()->connect("item_activated", this, "_reparent");
+ tree->get_scene_tree()->connect("item_activated", callable_mp(this, &ReparentDialog::_reparent));
//Label *label = memnew( Label );
//label->set_position( Point2( 15,8) );
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index 3a8d17b54e..a5ae1fd8a6 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -46,7 +46,6 @@ String RunSettingsDialog::get_custom_arguments() const {
void RunSettingsDialog::_bind_methods() {
- ClassDB::bind_method("_run_mode_changed", &RunSettingsDialog::_run_mode_changed);
//ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
}
@@ -81,7 +80,7 @@ RunSettingsDialog::RunSettingsDialog() {
vbc->add_margin_child(TTR("Run Mode:"), run_mode);
run_mode->add_item(TTR("Current Scene"));
run_mode->add_item(TTR("Main Scene"));
- run_mode->connect("item_selected", this, "_run_mode_changed");
+ run_mode->connect("item_selected", callable_mp(this, &RunSettingsDialog::_run_mode_changed));
arguments = memnew(LineEdit);
vbc->add_margin_child(TTR("Main Scene Arguments:"), arguments);
arguments->set_editable(false);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 784791d40c..c5ebf40482 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -34,7 +34,7 @@
#include "core/os/input.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
-
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
@@ -44,7 +44,6 @@
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/plugins/spatial_editor_plugin.h"
-#include "editor/script_editor_debugger.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
@@ -229,9 +228,9 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
String new_name = parent->validate_child_name(instanced_scene);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name)));
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name)));
}
editor_data->get_undo_redo().commit_action();
@@ -591,10 +590,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", dup);
editor_data->get_undo_redo().add_do_reference(dup);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
}
editor_data->get_undo_redo().commit_action();
@@ -1046,18 +1045,18 @@ void SceneTreeDock::_notification(int p_what) {
break;
first_enter = false;
- EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", this, "_feature_profile_changed");
+ EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &SceneTreeDock::_feature_profile_changed));
CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
if (canvas_item_plugin) {
- canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", scene_tree, "_update_tree");
- canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", scene_tree, "_update_tree");
- scene_tree->connect("node_changed", canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), "update");
+ canvas_item_plugin->get_canvas_item_editor()->connect_compat("item_lock_status_changed", scene_tree, "_update_tree");
+ canvas_item_plugin->get_canvas_item_editor()->connect_compat("item_group_status_changed", scene_tree, "_update_tree");
+ scene_tree->connect("node_changed", callable_mp((CanvasItem *)canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), &CanvasItem::update));
}
SpatialEditorPlugin *spatial_editor_plugin = Object::cast_to<SpatialEditorPlugin>(editor_data->get_editor("3D"));
- spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", scene_tree, "_update_tree");
- spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", scene_tree, "_update_tree");
+ spatial_editor_plugin->get_spatial_editor()->connect_compat("item_lock_status_changed", scene_tree, "_update_tree");
+ spatial_editor_plugin->get_spatial_editor()->connect_compat("item_group_status_changed", scene_tree, "_update_tree");
button_add->set_icon(get_icon("Add", "EditorIcons"));
button_instance->set_icon(get_icon("Instance", "EditorIcons"));
@@ -1067,8 +1066,8 @@ void SceneTreeDock::_notification(int p_what) {
filter->set_right_icon(get_icon("Search", "EditorIcons"));
filter->set_clear_button_enabled(true);
- EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", this, "_selection_changed");
- scene_tree->get_scene_tree()->connect("item_collapsed", this, "_node_collapsed");
+ EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &SceneTreeDock::_selection_changed));
+ scene_tree->get_scene_tree()->connect("item_collapsed", callable_mp(this, &SceneTreeDock::_node_collapsed));
// create_root_dialog
HBoxContainer *top_row = memnew(HBoxContainer);
@@ -1083,7 +1082,7 @@ void SceneTreeDock::_notification(int p_what) {
node_shortcuts_toggle->set_toggle_mode(true);
node_shortcuts_toggle->set_pressed(EDITOR_GET("_use_favorites_root_selection"));
node_shortcuts_toggle->set_anchors_and_margins_preset(Control::PRESET_CENTER_RIGHT);
- node_shortcuts_toggle->connect("pressed", this, "_update_create_root_dialog");
+ node_shortcuts_toggle->connect("pressed", callable_mp(this, &SceneTreeDock::_update_create_root_dialog));
top_row->add_child(node_shortcuts_toggle);
create_root_dialog->add_child(top_row);
@@ -1099,18 +1098,18 @@ void SceneTreeDock::_notification(int p_what) {
beginner_node_shortcuts->add_child(button_2d);
button_2d->set_text(TTR("2D Scene"));
button_2d->set_icon(get_icon("Node2D", "EditorIcons"));
- button_2d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_2D_SCENE, false));
+ button_2d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_2D_SCENE, false));
button_3d = memnew(Button);
beginner_node_shortcuts->add_child(button_3d);
button_3d->set_text(TTR("3D Scene"));
button_3d->set_icon(get_icon("Spatial", "EditorIcons"));
- button_3d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_3D_SCENE, false));
+ button_3d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_3D_SCENE, false));
Button *button_ui = memnew(Button);
beginner_node_shortcuts->add_child(button_ui);
button_ui->set_text(TTR("User Interface"));
button_ui->set_icon(get_icon("Control", "EditorIcons"));
- button_ui->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_USER_INTERFACE, false));
+ button_ui->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_USER_INTERFACE, false));
VBoxContainer *favorite_node_shortcuts = memnew(VBoxContainer);
favorite_node_shortcuts->set_name("FavoriteNodeShortcuts");
@@ -1120,7 +1119,7 @@ void SceneTreeDock::_notification(int p_what) {
node_shortcuts->add_child(button_custom);
button_custom->set_text(TTR("Other Node"));
button_custom->set_icon(get_icon("Add", "EditorIcons"));
- button_custom->connect("pressed", this, "_tool_selected", make_binds(TOOL_NEW, false));
+ button_custom->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_NEW, false));
node_shortcuts->add_spacer();
create_root_dialog->add_child(node_shortcuts);
@@ -1128,11 +1127,11 @@ void SceneTreeDock::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- clear_inherit_confirm->connect("confirmed", this, "_tool_selected", varray(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM));
+ clear_inherit_confirm->connect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false));
} break;
case NOTIFICATION_EXIT_TREE: {
- clear_inherit_confirm->disconnect("confirmed", this, "_tool_selected");
+ clear_inherit_confirm->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected));
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
button_add->set_icon(get_icon("Add", "EditorIcons"));
@@ -1584,7 +1583,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
if (p_position_in_parent >= 0)
editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
String old_name = former_names[ni];
String new_name = new_parent->validate_child_name(node);
@@ -1609,8 +1608,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
path_renames[ni].second = fixed_node_path;
}
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
if (p_keep_global_xform) {
if (Object::cast_to<Node2D>(node))
@@ -1738,7 +1737,7 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
}
void SceneTreeDock::_script_creation_closed() {
- script_create_dialog->disconnect("script_created", this, "_script_created");
+ script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
}
void SceneTreeDock::_toggle_editable_children_from_selection() {
@@ -1849,9 +1848,9 @@ void SceneTreeDock::_delete_confirm() {
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
editor_data->get_undo_redo().add_undo_reference(n);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
}
}
editor_data->get_undo_redo().commit_action();
@@ -1950,9 +1949,9 @@ void SceneTreeDock::_do_create(Node *p_parent) {
editor_data->get_undo_redo().add_undo_method(p_parent, "remove_child", child);
String new_name = p_parent->validate_child_name(child);
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
- editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
+ editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
} else {
@@ -2113,7 +2112,7 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
Object::Connection &c = F->get();
if (!(c.flags & Object::CONNECT_PERSIST))
continue;
- newnode->connect(c.signal, c.target, c.method, c.binds, Object::CONNECT_PERSIST);
+ newnode->connect(c.signal.get_name(), c.callable, c.binds, Object::CONNECT_PERSIST);
}
}
@@ -2410,7 +2409,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->clear();
Ref<Script> existing_script;
- bool exisiting_script_removable = true;
+ bool existing_script_removable = true;
if (selection.size() == 1) {
Node *selected = selection[0];
@@ -2432,7 +2431,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
existing_script = selected->get_script();
if (EditorNode::get_singleton()->get_object_custom_type_base(selected) == existing_script) {
- exisiting_script_removable = false;
+ existing_script_removable = false;
}
}
@@ -2446,7 +2445,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("ScriptExtend", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/extend_script"), TOOL_EXTEND_SCRIPT);
}
}
- if (existing_script.is_valid() && exisiting_script_removable) {
+ if (existing_script.is_valid() && existing_script_removable) {
add_separator = true;
menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
} else if (full_selection.size() > 1) {
@@ -2616,8 +2615,8 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
}
}
- script_create_dialog->connect("script_created", this, "_script_created");
- script_create_dialog->connect("popup_hide", this, "_script_creation_closed", varray(), CONNECT_ONESHOT);
+ script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
+ script_create_dialog->connect("popup_hide", callable_mp(this, &SceneTreeDock::_script_creation_closed), varray(), CONNECT_ONESHOT);
script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path);
script_create_dialog->popup_centered();
@@ -2719,7 +2718,7 @@ void SceneTreeDock::_update_create_root_dialog() {
if (ScriptServer::is_global_class(name))
name = ScriptServer::get_global_class_native_base(name);
button->set_icon(EditorNode::get_singleton()->get_class_icon(name));
- button->connect("pressed", this, "_favorite_root_selected", make_binds(l));
+ button->connect("pressed", callable_mp(this, &SceneTreeDock::_favorite_root_selected), make_binds(l));
}
}
@@ -2740,7 +2739,7 @@ void SceneTreeDock::_update_create_root_dialog() {
void SceneTreeDock::_favorite_root_selected(const String &p_class) {
selected_favorite_root = p_class;
- _tool_selected(TOOL_CREATE_FAVORITE, false);
+ _tool_selected(TOOL_CREATE_FAVORITE);
}
void SceneTreeDock::_feature_profile_changed() {
@@ -2772,40 +2771,10 @@ void SceneTreeDock::_feature_profile_changed() {
void SceneTreeDock::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_tool_selected"), &SceneTreeDock::_tool_selected, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_create"), &SceneTreeDock::_create);
- ClassDB::bind_method(D_METHOD("_node_reparent"), &SceneTreeDock::_node_reparent);
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
- ClassDB::bind_method(D_METHOD("_node_selected"), &SceneTreeDock::_node_selected);
- ClassDB::bind_method(D_METHOD("_node_renamed"), &SceneTreeDock::_node_renamed);
- ClassDB::bind_method(D_METHOD("_script_created"), &SceneTreeDock::_script_created);
- ClassDB::bind_method(D_METHOD("_script_creation_closed"), &SceneTreeDock::_script_creation_closed);
- ClassDB::bind_method(D_METHOD("_load_request"), &SceneTreeDock::_load_request);
- ClassDB::bind_method(D_METHOD("_script_open_request"), &SceneTreeDock::_script_open_request);
ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &SceneTreeDock::_unhandled_key_input);
ClassDB::bind_method(D_METHOD("_input"), &SceneTreeDock::_input);
- ClassDB::bind_method(D_METHOD("_nodes_drag_begin"), &SceneTreeDock::_nodes_drag_begin);
- ClassDB::bind_method(D_METHOD("_delete_confirm"), &SceneTreeDock::_delete_confirm);
- ClassDB::bind_method(D_METHOD("_toggle_editable_children_from_selection"), &SceneTreeDock::_toggle_editable_children_from_selection);
- ClassDB::bind_method(D_METHOD("_toggle_placeholder_from_selection"), &SceneTreeDock::_toggle_placeholder_from_selection);
- ClassDB::bind_method(D_METHOD("_node_prerenamed"), &SceneTreeDock::_node_prerenamed);
- ClassDB::bind_method(D_METHOD("_import_subscene"), &SceneTreeDock::_import_subscene);
- ClassDB::bind_method(D_METHOD("_selection_changed"), &SceneTreeDock::_selection_changed);
- ClassDB::bind_method(D_METHOD("_node_collapsed"), &SceneTreeDock::_node_collapsed);
- ClassDB::bind_method(D_METHOD("_new_scene_from"), &SceneTreeDock::_new_scene_from);
- ClassDB::bind_method(D_METHOD("_nodes_dragged"), &SceneTreeDock::_nodes_dragged);
- ClassDB::bind_method(D_METHOD("_files_dropped"), &SceneTreeDock::_files_dropped);
- ClassDB::bind_method(D_METHOD("_quick_open"), &SceneTreeDock::_quick_open);
- ClassDB::bind_method(D_METHOD("_script_dropped"), &SceneTreeDock::_script_dropped);
- ClassDB::bind_method(D_METHOD("_tree_rmb"), &SceneTreeDock::_tree_rmb);
- ClassDB::bind_method(D_METHOD("_filter_changed"), &SceneTreeDock::_filter_changed);
- ClassDB::bind_method(D_METHOD("_focus_node"), &SceneTreeDock::_focus_node);
- ClassDB::bind_method(D_METHOD("_remote_tree_selected"), &SceneTreeDock::_remote_tree_selected);
- ClassDB::bind_method(D_METHOD("_local_tree_selected"), &SceneTreeDock::_local_tree_selected);
ClassDB::bind_method(D_METHOD("_update_script_button"), &SceneTreeDock::_update_script_button);
- ClassDB::bind_method(D_METHOD("_favorite_root_selected"), &SceneTreeDock::_favorite_root_selected);
- ClassDB::bind_method(D_METHOD("_update_create_root_dialog"), &SceneTreeDock::_update_create_root_dialog);
- ClassDB::bind_method(D_METHOD("_feature_profile_changed"), &SceneTreeDock::_feature_profile_changed);
ClassDB::bind_method(D_METHOD("instance"), &SceneTreeDock::instance);
ClassDB::bind_method(D_METHOD("get_tree_editor"), &SceneTreeDock::get_tree_editor);
@@ -2850,13 +2819,13 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
ED_SHORTCUT("scene_tree/delete", TTR("Delete"), KEY_DELETE);
button_add = memnew(ToolButton);
- button_add->connect("pressed", this, "_tool_selected", make_binds(TOOL_NEW, false));
+ button_add->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_NEW, false));
button_add->set_tooltip(TTR("Add/Create a New Node."));
button_add->set_shortcut(ED_GET_SHORTCUT("scene_tree/add_child_node"));
filter_hbc->add_child(button_add);
button_instance = memnew(ToolButton);
- button_instance->connect("pressed", this, "_tool_selected", make_binds(TOOL_INSTANCE, false));
+ button_instance->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_INSTANCE, false));
button_instance->set_tooltip(TTR("Instance a scene file as a Node. Creates an inherited scene if no root node exists."));
button_instance->set_shortcut(ED_GET_SHORTCUT("scene_tree/instance_scene"));
filter_hbc->add_child(button_instance);
@@ -2867,17 +2836,17 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
filter->set_placeholder(TTR("Filter nodes"));
filter_hbc->add_child(filter);
filter->add_constant_override("minimum_spaces", 0);
- filter->connect("text_changed", this, "_filter_changed");
+ filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
button_create_script = memnew(ToolButton);
- button_create_script->connect("pressed", this, "_tool_selected", make_binds(TOOL_ATTACH_SCRIPT, false));
+ button_create_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_ATTACH_SCRIPT, false));
button_create_script->set_tooltip(TTR("Attach a new or existing script for the selected node."));
button_create_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/attach_script"));
filter_hbc->add_child(button_create_script);
button_create_script->hide();
button_clear_script = memnew(ToolButton);
- button_clear_script->connect("pressed", this, "_tool_selected", make_binds(TOOL_CLEAR_SCRIPT, false));
+ button_clear_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CLEAR_SCRIPT, false));
button_clear_script->set_tooltip(TTR("Clear a script for the selected node."));
button_clear_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/clear_script"));
filter_hbc->add_child(button_clear_script);
@@ -2891,14 +2860,14 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
edit_remote->set_h_size_flags(SIZE_EXPAND_FILL);
edit_remote->set_text(TTR("Remote"));
edit_remote->set_toggle_mode(true);
- edit_remote->connect("pressed", this, "_remote_tree_selected");
+ edit_remote->connect("pressed", callable_mp(this, &SceneTreeDock::_remote_tree_selected));
edit_local = memnew(ToolButton);
button_hb->add_child(edit_local);
edit_local->set_h_size_flags(SIZE_EXPAND_FILL);
edit_local->set_text(TTR("Local"));
edit_local->set_toggle_mode(true);
- edit_local->connect("pressed", this, "_local_tree_selected");
+ edit_local->connect("pressed", callable_mp(this, &SceneTreeDock::_local_tree_selected));
remote_tree = NULL;
button_hb->hide();
@@ -2911,19 +2880,19 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
vbc->add_child(scene_tree);
scene_tree->set_v_size_flags(SIZE_EXPAND | SIZE_FILL);
- scene_tree->connect("rmb_pressed", this, "_tree_rmb");
+ scene_tree->connect("rmb_pressed", callable_mp(this, &SceneTreeDock::_tree_rmb));
- scene_tree->connect("node_selected", this, "_node_selected", varray(), CONNECT_DEFERRED);
- scene_tree->connect("node_renamed", this, "_node_renamed", varray(), CONNECT_DEFERRED);
- scene_tree->connect("node_prerename", this, "_node_prerenamed");
- scene_tree->connect("open", this, "_load_request");
- scene_tree->connect("open_script", this, "_script_open_request");
- scene_tree->connect("nodes_rearranged", this, "_nodes_dragged");
- scene_tree->connect("files_dropped", this, "_files_dropped");
- scene_tree->connect("script_dropped", this, "_script_dropped");
- scene_tree->connect("nodes_dragged", this, "_nodes_drag_begin");
+ scene_tree->connect("node_selected", callable_mp(this, &SceneTreeDock::_node_selected), varray(), CONNECT_DEFERRED);
+ scene_tree->connect("node_renamed", callable_mp(this, &SceneTreeDock::_node_renamed), varray(), CONNECT_DEFERRED);
+ scene_tree->connect("node_prerename", callable_mp(this, &SceneTreeDock::_node_prerenamed));
+ scene_tree->connect("open", callable_mp(this, &SceneTreeDock::_load_request));
+ scene_tree->connect("open_script", callable_mp(this, &SceneTreeDock::_script_open_request));
+ scene_tree->connect("nodes_rearranged", callable_mp(this, &SceneTreeDock::_nodes_dragged));
+ scene_tree->connect("files_dropped", callable_mp(this, &SceneTreeDock::_files_dropped));
+ scene_tree->connect("script_dropped", callable_mp(this, &SceneTreeDock::_script_dropped));
+ scene_tree->connect("nodes_dragged", callable_mp(this, &SceneTreeDock::_nodes_drag_begin));
- scene_tree->get_scene_tree()->connect("item_double_clicked", this, "_focus_node");
+ scene_tree->get_scene_tree()->connect("item_double_clicked", callable_mp(this, &SceneTreeDock::_focus_node));
scene_tree->set_undo_redo(&editor_data->get_undo_redo());
scene_tree->set_editor_selection(editor_selection);
@@ -2931,8 +2900,8 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
create_dialog = memnew(CreateDialog);
create_dialog->set_base_type("Node");
add_child(create_dialog);
- create_dialog->connect("create", this, "_create");
- create_dialog->connect("favorites_updated", this, "_update_create_root_dialog");
+ create_dialog->connect("create", callable_mp(this, &SceneTreeDock::_create));
+ create_dialog->connect("favorites_updated", callable_mp(this, &SceneTreeDock::_update_create_root_dialog));
rename_dialog = memnew(RenameDialog(scene_tree, &editor_data->get_undo_redo()));
add_child(rename_dialog);
@@ -2943,44 +2912,44 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
reparent_dialog = memnew(ReparentDialog);
add_child(reparent_dialog);
- reparent_dialog->connect("reparent", this, "_node_reparent");
+ reparent_dialog->connect("reparent", callable_mp(this, &SceneTreeDock::_node_reparent));
accept = memnew(AcceptDialog);
add_child(accept);
quick_open = memnew(EditorQuickOpen);
add_child(quick_open);
- quick_open->connect("quick_open", this, "_quick_open");
+ quick_open->connect("quick_open", callable_mp(this, &SceneTreeDock::_quick_open));
set_process_unhandled_key_input(true);
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", this, "_delete_confirm");
+ delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm));
editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(editable_instance_remove_dialog);
- editable_instance_remove_dialog->connect("confirmed", this, "_toggle_editable_children_from_selection");
+ editable_instance_remove_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_toggle_editable_children_from_selection));
placeholder_editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(placeholder_editable_instance_remove_dialog);
- placeholder_editable_instance_remove_dialog->connect("confirmed", this, "_toggle_placeholder_from_selection");
+ placeholder_editable_instance_remove_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_toggle_placeholder_from_selection));
import_subscene_dialog = memnew(EditorSubScene);
add_child(import_subscene_dialog);
- import_subscene_dialog->connect("subscene_selected", this, "_import_subscene");
+ import_subscene_dialog->connect("subscene_selected", callable_mp(this, &SceneTreeDock::_import_subscene));
new_scene_from_dialog = memnew(EditorFileDialog);
new_scene_from_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
add_child(new_scene_from_dialog);
- new_scene_from_dialog->connect("file_selected", this, "_new_scene_from");
+ new_scene_from_dialog->connect("file_selected", callable_mp(this, &SceneTreeDock::_new_scene_from));
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_tool_selected");
+ menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(false));
menu->set_hide_on_window_lose_focus(true);
menu_subresources = memnew(PopupMenu);
menu_subresources->set_name("Sub-Resources");
- menu_subresources->connect("id_pressed", this, "_tool_selected");
+ menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(false));
menu->add_child(menu_subresources);
first_enter = true;
restore_script_editor_on_drag = false;
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 0e8a9146e1..e4e642e368 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -323,8 +323,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (can_open_instance && undo_redo) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes
- if (!p_node->is_connected("script_changed", this, "_node_script_changed"))
- p_node->connect("script_changed", this, "_node_script_changed", varray(p_node));
+ if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed)))
+ p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed), varray(p_node));
Ref<Script> script = p_node->get_script();
if (!script.is_null()) {
@@ -350,8 +350,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
else
item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
- if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node));
+ if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
_update_visibility_color(p_node, item);
} else if (p_node->is_class("Spatial")) {
@@ -370,8 +370,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
else
item->add_button(0, get_icon("GuiVisibilityHidden", "EditorIcons"), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
- if (!p_node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- p_node->connect("visibility_changed", this, "_node_visibility_changed", varray(p_node));
+ if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
_update_visibility_color(p_node, item);
} else if (p_node->is_class("AnimationPlayer")) {
@@ -495,12 +495,12 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
if (EditorNode::get_singleton()->is_exiting())
return; //speed up exit
- if (p_node->is_connected("script_changed", this, "_node_script_changed"))
- p_node->disconnect("script_changed", this, "_node_script_changed");
+ if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed)))
+ p_node->disconnect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed));
if (p_node->is_class("Spatial") || p_node->is_class("CanvasItem")) {
- if (p_node->is_connected("visibility_changed", this, "_node_visibility_changed"))
- p_node->disconnect("visibility_changed", this, "_node_visibility_changed");
+ if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)))
+ p_node->disconnect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed));
}
if (p_node == selected) {
@@ -640,22 +640,22 @@ void SceneTreeEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- get_tree()->connect("tree_changed", this, "_tree_changed");
- get_tree()->connect("node_removed", this, "_node_removed");
- get_tree()->connect("node_renamed", this, "_node_renamed");
- get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed");
+ get_tree()->connect("tree_changed", callable_mp(this, &SceneTreeEditor::_tree_changed));
+ get_tree()->connect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
+ get_tree()->connect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
+ get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
- tree->connect("item_collapsed", this, "_cell_collapsed");
+ tree->connect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
_update_tree();
} break;
case NOTIFICATION_EXIT_TREE: {
- get_tree()->disconnect("tree_changed", this, "_tree_changed");
- get_tree()->disconnect("node_removed", this, "_node_removed");
- get_tree()->disconnect("node_renamed", this, "_node_renamed");
- tree->disconnect("item_collapsed", this, "_cell_collapsed");
- get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed");
+ get_tree()->disconnect("tree_changed", callable_mp(this, &SceneTreeEditor::_tree_changed));
+ get_tree()->disconnect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
+ get_tree()->disconnect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
+ tree->disconnect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
+ get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
} break;
case NOTIFICATION_THEME_CHANGED: {
@@ -836,7 +836,7 @@ void SceneTreeEditor::set_editor_selection(EditorSelection *p_selection) {
editor_selection = p_selection;
tree->set_select_mode(Tree::SELECT_MULTI);
tree->set_cursor_can_exit_tree(false);
- editor_selection->connect("selection_changed", this, "_selection_changed");
+ editor_selection->connect("selection_changed", callable_mp(this, &SceneTreeEditor::_selection_changed));
}
void SceneTreeEditor::_update_selection(TreeItem *item) {
@@ -1089,24 +1089,9 @@ void SceneTreeEditor::set_connecting_signal(bool p_enable) {
void SceneTreeEditor::_bind_methods() {
- ClassDB::bind_method("_tree_changed", &SceneTreeEditor::_tree_changed);
- ClassDB::bind_method("_update_tree", &SceneTreeEditor::_update_tree);
- ClassDB::bind_method("_node_removed", &SceneTreeEditor::_node_removed);
- ClassDB::bind_method("_node_renamed", &SceneTreeEditor::_node_renamed);
- ClassDB::bind_method("_selected_changed", &SceneTreeEditor::_selected_changed);
- ClassDB::bind_method("_deselect_items", &SceneTreeEditor::_deselect_items);
- ClassDB::bind_method("_renamed", &SceneTreeEditor::_renamed);
+ ClassDB::bind_method("_update_tree", &SceneTreeEditor::_update_tree); // Still used by some connect_compat.
ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
- ClassDB::bind_method("_cell_multi_selected", &SceneTreeEditor::_cell_multi_selected);
- ClassDB::bind_method("_selection_changed", &SceneTreeEditor::_selection_changed);
- ClassDB::bind_method("_cell_button_pressed", &SceneTreeEditor::_cell_button_pressed);
- ClassDB::bind_method("_cell_collapsed", &SceneTreeEditor::_cell_collapsed);
- ClassDB::bind_method("_rmb_select", &SceneTreeEditor::_rmb_select);
- ClassDB::bind_method("_warning_changed", &SceneTreeEditor::_warning_changed);
-
- ClassDB::bind_method("_node_script_changed", &SceneTreeEditor::_node_script_changed);
- ClassDB::bind_method("_node_visibility_changed", &SceneTreeEditor::_node_visibility_changed);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
@@ -1120,7 +1105,7 @@ void SceneTreeEditor::_bind_methods() {
ADD_SIGNAL(MethodInfo("node_changed"));
ADD_SIGNAL(MethodInfo("nodes_dragged"));
ADD_SIGNAL(MethodInfo("nodes_rearranged", PropertyInfo(Variant::ARRAY, "paths"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type")));
- ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type")));
+ ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::NODE_PATH, "to_path"), PropertyInfo(Variant::INT, "type")));
ADD_SIGNAL(MethodInfo("script_dropped", PropertyInfo(Variant::STRING, "file"), PropertyInfo(Variant::NODE_PATH, "to_path")));
ADD_SIGNAL(MethodInfo("rmb_pressed", PropertyInfo(Variant::VECTOR2, "position")));
@@ -1163,15 +1148,15 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
tree->set_drag_forwarding(this);
if (p_can_rename) {
tree->set_allow_rmb_select(true);
- tree->connect("item_rmb_selected", this, "_rmb_select");
- tree->connect("empty_tree_rmb_selected", this, "_rmb_select");
+ tree->connect("item_rmb_selected", callable_mp(this, &SceneTreeEditor::_rmb_select));
+ tree->connect("empty_tree_rmb_selected", callable_mp(this, &SceneTreeEditor::_rmb_select));
}
- tree->connect("cell_selected", this, "_selected_changed");
- tree->connect("item_edited", this, "_renamed", varray(), CONNECT_DEFERRED);
- tree->connect("multi_selected", this, "_cell_multi_selected");
- tree->connect("button_pressed", this, "_cell_button_pressed");
- tree->connect("nothing_selected", this, "_deselect_items");
+ tree->connect("cell_selected", callable_mp(this, &SceneTreeEditor::_selected_changed));
+ tree->connect("item_edited", callable_mp(this, &SceneTreeEditor::_renamed), varray(), CONNECT_DEFERRED);
+ tree->connect("multi_selected", callable_mp(this, &SceneTreeEditor::_cell_multi_selected));
+ tree->connect("button_pressed", callable_mp(this, &SceneTreeEditor::_cell_button_pressed));
+ tree->connect("nothing_selected", callable_mp(this, &SceneTreeEditor::_deselect_items));
//tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true);
error = memnew(AcceptDialog);
@@ -1189,7 +1174,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
blocked = 0;
update_timer = memnew(Timer);
- update_timer->connect("timeout", this, "_update_tree");
+ update_timer->connect("timeout", callable_mp(this, &SceneTreeEditor::_update_tree));
update_timer->set_one_shot(true);
update_timer->set_wait_time(0.5);
add_child(update_timer);
@@ -1209,12 +1194,12 @@ void SceneTreeDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- connect("confirmed", this, "_select");
+ connect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
filter->set_right_icon(get_icon("Search", "EditorIcons"));
filter->set_clear_button_enabled(true);
} break;
case NOTIFICATION_EXIT_TREE: {
- disconnect("confirmed", this, "_select");
+ disconnect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible_in_tree())
@@ -1242,9 +1227,7 @@ void SceneTreeDialog::_filter_changed(const String &p_filter) {
void SceneTreeDialog::_bind_methods() {
- ClassDB::bind_method("_select", &SceneTreeDialog::_select);
ClassDB::bind_method("_cancel", &SceneTreeDialog::_cancel);
- ClassDB::bind_method(D_METHOD("_filter_changed"), &SceneTreeDialog::_filter_changed);
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::NODE_PATH, "path")));
}
@@ -1259,12 +1242,12 @@ SceneTreeDialog::SceneTreeDialog() {
filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_placeholder(TTR("Filter nodes"));
filter->add_constant_override("minimum_spaces", 0);
- filter->connect("text_changed", this, "_filter_changed");
+ filter->connect("text_changed", callable_mp(this, &SceneTreeDialog::_filter_changed));
vbc->add_child(filter);
tree = memnew(SceneTreeEditor(false, false, true));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- tree->get_scene_tree()->connect("item_activated", this, "_select");
+ tree->get_scene_tree()->connect("item_activated", callable_mp(this, &SceneTreeDialog::_select));
vbc->add_child(tree);
}
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 959bb67e12..eb133abcd5 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -728,19 +728,6 @@ void ScriptCreateDialog::_update_dialog() {
void ScriptCreateDialog::_bind_methods() {
- ClassDB::bind_method("_path_hbox_sorted", &ScriptCreateDialog::_path_hbox_sorted);
- ClassDB::bind_method("_class_name_changed", &ScriptCreateDialog::_class_name_changed);
- ClassDB::bind_method("_parent_name_changed", &ScriptCreateDialog::_parent_name_changed);
- ClassDB::bind_method("_lang_changed", &ScriptCreateDialog::_lang_changed);
- ClassDB::bind_method("_built_in_pressed", &ScriptCreateDialog::_built_in_pressed);
- ClassDB::bind_method("_browse_path", &ScriptCreateDialog::_browse_path);
- ClassDB::bind_method("_file_selected", &ScriptCreateDialog::_file_selected);
- ClassDB::bind_method("_path_changed", &ScriptCreateDialog::_path_changed);
- ClassDB::bind_method("_path_entered", &ScriptCreateDialog::_path_entered);
- ClassDB::bind_method("_template_changed", &ScriptCreateDialog::_template_changed);
- ClassDB::bind_method("_create", &ScriptCreateDialog::_create);
- ClassDB::bind_method("_browse_class_in_tree", &ScriptCreateDialog::_browse_class_in_tree);
-
ClassDB::bind_method(D_METHOD("config", "inherits", "path", "built_in_enabled", "load_enabled"), &ScriptCreateDialog::config, DEFVAL(true), DEFVAL(true));
ADD_SIGNAL(MethodInfo("script_created", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
@@ -804,7 +791,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
language_menu->select(default_language);
current_language = default_language;
- language_menu->connect("item_selected", this, "_lang_changed");
+ language_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_lang_changed));
/* Inherits */
@@ -813,16 +800,16 @@ ScriptCreateDialog::ScriptCreateDialog() {
hb = memnew(HBoxContainer);
hb->set_h_size_flags(SIZE_EXPAND_FILL);
parent_name = memnew(LineEdit);
- parent_name->connect("text_changed", this, "_parent_name_changed");
+ parent_name->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_parent_name_changed));
parent_name->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(parent_name);
parent_search_button = memnew(Button);
parent_search_button->set_flat(true);
- parent_search_button->connect("pressed", this, "_browse_class_in_tree");
+ parent_search_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_class_in_tree));
hb->add_child(parent_search_button);
parent_browse_button = memnew(Button);
parent_browse_button->set_flat(true);
- parent_browse_button->connect("pressed", this, "_browse_path", varray(true, false));
+ parent_browse_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path), varray(true, false));
hb->add_child(parent_browse_button);
gc->add_child(memnew(Label(TTR("Inherits:"))));
gc->add_child(hb);
@@ -831,7 +818,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
/* Class Name */
class_name = memnew(LineEdit);
- class_name->connect("text_changed", this, "_class_name_changed");
+ class_name->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_class_name_changed));
class_name->set_h_size_flags(SIZE_EXPAND_FILL);
gc->add_child(memnew(Label(TTR("Class Name:"))));
gc->add_child(class_name);
@@ -841,28 +828,28 @@ ScriptCreateDialog::ScriptCreateDialog() {
template_menu = memnew(OptionButton);
gc->add_child(memnew(Label(TTR("Template:"))));
gc->add_child(template_menu);
- template_menu->connect("item_selected", this, "_template_changed");
+ template_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_template_changed));
/* Built-in Script */
internal = memnew(CheckBox);
internal->set_text(TTR("On"));
- internal->connect("pressed", this, "_built_in_pressed");
+ internal->connect("pressed", callable_mp(this, &ScriptCreateDialog::_built_in_pressed));
gc->add_child(memnew(Label(TTR("Built-in Script:"))));
gc->add_child(internal);
/* Path */
hb = memnew(HBoxContainer);
- hb->connect("sort_children", this, "_path_hbox_sorted");
+ hb->connect("sort_children", callable_mp(this, &ScriptCreateDialog::_path_hbox_sorted));
file_path = memnew(LineEdit);
- file_path->connect("text_changed", this, "_path_changed");
- file_path->connect("text_entered", this, "_path_entered");
+ file_path->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_path_changed));
+ file_path->connect("text_entered", callable_mp(this, &ScriptCreateDialog::_path_entered));
file_path->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(file_path);
path_button = memnew(Button);
path_button->set_flat(true);
- path_button->connect("pressed", this, "_browse_path", varray(false, true));
+ path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path), varray(false, true));
hb->add_child(path_button);
gc->add_child(memnew(Label(TTR("Path:"))));
gc->add_child(hb);
@@ -871,11 +858,11 @@ ScriptCreateDialog::ScriptCreateDialog() {
/* Dialog Setup */
select_class = memnew(CreateDialog);
- select_class->connect("create", this, "_create");
+ select_class->connect("create", callable_mp(this, &ScriptCreateDialog::_create));
add_child(select_class);
file_browse = memnew(EditorFileDialog);
- file_browse->connect("file_selected", this, "_file_selected");
+ file_browse->connect("file_selected", callable_mp(this, &ScriptCreateDialog::_file_selected));
file_browse->set_mode(EditorFileDialog::MODE_OPEN_FILE);
add_child(file_browse);
get_ok()->set_text(TTR("Create"));
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
deleted file mode 100644
index 88d45d5dde..0000000000
--- a/editor/script_editor_debugger.cpp
+++ /dev/null
@@ -1,2697 +0,0 @@
-/*************************************************************************/
-/* script_editor_debugger.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 "script_editor_debugger.h"
-
-#include "core/io/marshalls.h"
-#include "core/project_settings.h"
-#include "core/ustring.h"
-#include "editor/editor_log.h"
-#include "editor/editor_network_profiler.h"
-#include "editor/editor_visual_profiler.h"
-#include "editor/plugins/canvas_item_editor_plugin.h"
-#include "editor/plugins/spatial_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_profiler.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
-#include "main/performance.h"
-#include "property_editor.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/label.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/margin_container.h"
-#include "scene/gui/rich_text_label.h"
-#include "scene/gui/separator.h"
-#include "scene/gui/split_container.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/texture_button.h"
-#include "scene/gui/tree.h"
-#include "scene/resources/packed_scene.h"
-
-class ScriptEditorDebuggerVariables : public Object {
-
- GDCLASS(ScriptEditorDebuggerVariables, Object);
-
- List<PropertyInfo> props;
- Map<StringName, Variant> values;
-
-protected:
- bool _set(const StringName &p_name, const Variant &p_value) {
-
- return false;
- }
-
- bool _get(const StringName &p_name, Variant &r_ret) const {
-
- if (!values.has(p_name))
- return false;
- r_ret = values[p_name];
- return true;
- }
- void _get_property_list(List<PropertyInfo> *p_list) const {
-
- for (const List<PropertyInfo>::Element *E = props.front(); E; E = E->next())
- p_list->push_back(E->get());
- }
-
-public:
- void clear() {
-
- props.clear();
- values.clear();
- }
-
- String get_var_value(const String &p_var) const {
-
- for (Map<StringName, Variant>::Element *E = values.front(); E; E = E->next()) {
- String v = E->key().operator String().get_slice("/", 1);
- if (v == p_var)
- return E->get();
- }
-
- return "";
- }
-
- void add_property(const String &p_name, const Variant &p_value, const PropertyHint &p_hint, const String p_hint_string) {
-
- PropertyInfo pinfo;
- pinfo.name = p_name;
- pinfo.type = p_value.get_type();
- pinfo.hint = p_hint;
- pinfo.hint_string = p_hint_string;
- props.push_back(pinfo);
- values[p_name] = p_value;
- }
-
- void update() {
- _change_notify();
- }
-
- ScriptEditorDebuggerVariables() {
- }
-};
-
-class ScriptEditorDebuggerInspectedObject : public Object {
-
- GDCLASS(ScriptEditorDebuggerInspectedObject, Object);
-
-protected:
- bool _set(const StringName &p_name, const Variant &p_value) {
-
- if (!prop_values.has(p_name) || String(p_name).begins_with("Constants/"))
- return false;
-
- prop_values[p_name] = p_value;
- emit_signal("value_edited", p_name, p_value);
- return true;
- }
-
- bool _get(const StringName &p_name, Variant &r_ret) const {
-
- if (!prop_values.has(p_name))
- return false;
-
- r_ret = prop_values[p_name];
- return true;
- }
-
- void _get_property_list(List<PropertyInfo> *p_list) const {
-
- p_list->clear(); //sorry, no want category
- for (const List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) {
- p_list->push_back(E->get());
- }
- }
-
- static void _bind_methods() {
-
- ClassDB::bind_method(D_METHOD("get_title"), &ScriptEditorDebuggerInspectedObject::get_title);
- ClassDB::bind_method(D_METHOD("get_variant"), &ScriptEditorDebuggerInspectedObject::get_variant);
- ClassDB::bind_method(D_METHOD("clear"), &ScriptEditorDebuggerInspectedObject::clear);
- ClassDB::bind_method(D_METHOD("get_remote_object_id"), &ScriptEditorDebuggerInspectedObject::get_remote_object_id);
-
- ADD_SIGNAL(MethodInfo("value_edited"));
- }
-
-public:
- String type_name;
- ObjectID remote_object_id;
- List<PropertyInfo> prop_list;
- Map<StringName, Variant> prop_values;
-
- ObjectID get_remote_object_id() {
- return remote_object_id;
- }
-
- String get_title() {
- if (remote_object_id.is_valid())
- return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id);
- else
- return "<null>";
- }
- Variant get_variant(const StringName &p_name) {
-
- Variant var;
- _get(p_name, var);
- return var;
- }
-
- void clear() {
-
- prop_list.clear();
- prop_values.clear();
- }
- void update() {
- _change_notify();
- }
- void update_single(const char *p_prop) {
- _change_notify(p_prop);
- }
-
- ScriptEditorDebuggerInspectedObject() {
- }
-};
-
-void ScriptEditorDebugger::debug_copy() {
- String msg = reason->get_text();
- if (msg == "") return;
- OS::get_singleton()->set_clipboard(msg);
-}
-
-void ScriptEditorDebugger::debug_skip_breakpoints() {
- skip_breakpoints_value = !skip_breakpoints_value;
- if (skip_breakpoints_value)
- skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOn", "EditorIcons"));
- else
- skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
-
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("set_skip_breakpoints");
- msg.push_back(skip_breakpoints_value);
- ppeer->put_var(msg);
- }
-}
-
-void ScriptEditorDebugger::debug_next() {
-
- ERR_FAIL_COND(!breaked);
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
- Array msg;
- msg.push_back("next");
- ppeer->put_var(msg);
- _clear_execution();
- stack_dump->clear();
-}
-void ScriptEditorDebugger::debug_step() {
-
- ERR_FAIL_COND(!breaked);
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
-
- Array msg;
- msg.push_back("step");
- ppeer->put_var(msg);
- _clear_execution();
- stack_dump->clear();
-}
-
-void ScriptEditorDebugger::debug_break() {
-
- ERR_FAIL_COND(breaked);
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
-
- Array msg;
- msg.push_back("break");
- ppeer->put_var(msg);
-}
-
-void ScriptEditorDebugger::debug_continue() {
-
- ERR_FAIL_COND(!breaked);
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
-
- OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id());
-
- Array msg;
- _clear_execution();
- msg.push_back("continue");
- ppeer->put_var(msg);
-}
-
-void ScriptEditorDebugger::_scene_tree_folded(Object *obj) {
-
- if (updating_scene_tree) {
-
- return;
- }
- TreeItem *item = Object::cast_to<TreeItem>(obj);
-
- if (!item)
- return;
-
- ObjectID id = item->get_metadata(0);
- if (unfold_cache.has(id)) {
- unfold_cache.erase(id);
- } else {
- unfold_cache.insert(id);
- }
-}
-
-void ScriptEditorDebugger::_scene_tree_selected() {
-
- if (updating_scene_tree) {
-
- return;
- }
- TreeItem *item = inspect_scene_tree->get_selected();
- if (!item) {
-
- return;
- }
-
- inspected_object_id = item->get_metadata(0).operator ObjectID();
-
- Array msg;
- msg.push_back("inspect_object");
- msg.push_back(inspected_object_id);
- ppeer->put_var(msg);
-}
-
-void ScriptEditorDebugger::_scene_tree_rmb_selected(const Vector2 &p_position) {
-
- TreeItem *item = inspect_scene_tree->get_item_at_position(p_position);
- if (!item)
- return;
-
- item->select(0);
-
- item_menu->clear();
- item_menu->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE);
- item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH);
- item_menu->set_global_position(get_global_mouse_position());
- item_menu->popup();
-}
-
-void ScriptEditorDebugger::_file_selected(const String &p_file) {
- switch (file_dialog_mode) {
- case SAVE_NODE: {
- Array msg;
- msg.push_back("save_node");
- msg.push_back(inspected_object_id);
- msg.push_back(p_file);
- ppeer->put_var(msg);
- } break;
- case SAVE_CSV: {
- Error err;
- FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
-
- if (err != OK) {
- ERR_PRINT("Failed to open " + p_file);
- return;
- }
- Vector<String> line;
- line.resize(Performance::MONITOR_MAX);
-
- // signatures
- for (int i = 0; i < Performance::MONITOR_MAX; i++) {
- line.write[i] = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
- }
- file->store_csv_line(line);
-
- // values
- List<Vector<float> >::Element *E = perf_history.back();
- while (E) {
-
- Vector<float> &perf_data = E->get();
- for (int i = 0; i < perf_data.size(); i++) {
-
- line.write[i] = String::num_real(perf_data[i]);
- }
- file->store_csv_line(line);
- E = E->prev();
- }
- file->store_string("\n");
-
- Vector<Vector<String> > profiler_data = profiler->get_data_as_csv();
- for (int i = 0; i < profiler_data.size(); i++) {
- file->store_csv_line(profiler_data[i]);
- }
-
- } break;
- }
-}
-
-void ScriptEditorDebugger::_scene_tree_property_value_edited(const String &p_prop, const Variant &p_value) {
-
- Array msg;
- msg.push_back("set_object_property");
- msg.push_back(inspected_object_id);
- msg.push_back(p_prop);
- msg.push_back(p_value);
- ppeer->put_var(msg);
- inspect_edited_object_timeout = 0.7; //avoid annoyance, don't request soon after editing
-}
-
-void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object) {
-
- inspected_object_id = p_object;
- Array msg;
- msg.push_back("inspect_object");
- msg.push_back(inspected_object_id);
- ppeer->put_var(msg);
-}
-
-void ScriptEditorDebugger::_scene_tree_request() {
-
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
-
- Array msg;
- msg.push_back("request_scene_tree");
- ppeer->put_var(msg);
-}
-
-/// Populates inspect_scene_tree recursively given data in nodes.
-/// Nodes is an array containing 4 elements for each node, it follows this pattern:
-/// nodes[i] == number of direct children of this node
-/// nodes[i + 1] == node name
-/// nodes[i + 2] == node class
-/// nodes[i + 3] == node instance id
-///
-/// Returns the number of items parsed in nodes from current_index.
-///
-/// Given a nodes array like [R,A,B,C,D,E] the following Tree will be generated, assuming
-/// filter is an empty String, R and A child count are 2, B is 1 and C, D and E are 0.
-///
-/// R
-/// |-A
-/// | |-B
-/// | | |-C
-/// | |
-/// | |-D
-/// |
-/// |-E
-///
-int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &nodes, int current_index) {
- String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
- String item_text = nodes[current_index + 1];
- String item_type = nodes[current_index + 2];
- bool keep = filter.is_subsequence_ofi(item_text);
-
- TreeItem *item = inspect_scene_tree->create_item(parent);
- item->set_text(0, item_text);
- item->set_tooltip(0, TTR("Type:") + " " + item_type);
- ObjectID id = nodes[current_index + 3].operator ObjectID();
- Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(nodes[current_index + 2], "");
- if (icon.is_valid()) {
- item->set_icon(0, icon);
- }
- item->set_metadata(0, id);
-
- if (id == inspected_object_id) {
- TreeItem *cti = item->get_parent();
- while (cti) {
- cti->set_collapsed(false);
- cti = cti->get_parent();
- }
- item->select(0);
- }
-
- // Set current item as collapsed if necessary
- if (parent) {
- if (!unfold_cache.has(id)) {
- item->set_collapsed(true);
- }
- }
-
- int children_count = nodes[current_index];
- // Tracks the total number of items parsed in nodes, this is used to skips nodes that
- // are not direct children of the current node since we can't know in advance the total
- // number of children, direct and not, of a node without traversing the nodes array previously.
- // Keeping track of this allows us to build our remote scene tree by traversing the node
- // array just once.
- int items_count = 1;
- for (int i = 0; i < children_count; i++) {
- // Called for each direct child of item.
- // Direct children of current item might not be adjacent so items_count must
- // be incremented by the number of items parsed until now, otherwise we would not
- // be able to access the next child of the current item.
- // items_count is multiplied by 4 since that's the number of elements in the nodes
- // array needed to represent a single node.
- items_count += _update_scene_tree(item, nodes, current_index + items_count * 4);
- }
-
- // If item has not children and should not be kept delete it
- if (!keep && !item->get_children() && parent) {
- parent->remove_child(item);
- memdelete(item);
- }
-
- return items_count;
-}
-
-void ScriptEditorDebugger::_video_mem_request() {
-
- if (connection.is_null() || !connection->is_connected_to_host()) {
- // Video RAM usage is only available while a project is being debugged.
- return;
- }
-
- Array msg;
- msg.push_back("request_video_mem");
- ppeer->put_var(msg);
-}
-
-Size2 ScriptEditorDebugger::get_minimum_size() const {
-
- Size2 ms = MarginContainer::get_minimum_size();
- ms.y = MAX(ms.y, 250 * EDSCALE);
- return ms;
-}
-
-void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
-
- if (p_msg == "debug_enter") {
- Array msg;
- msg.push_back("get_stack_dump");
- ppeer->put_var(msg);
- ERR_FAIL_COND(p_data.size() != 2);
- bool can_continue = p_data[0];
- String error = p_data[1];
- step->set_disabled(!can_continue);
- next->set_disabled(!can_continue);
- _set_reason_text(error, MESSAGE_ERROR);
- copy->set_disabled(false);
- breaked = true;
- dobreak->set_disabled(true);
- docontinue->set_disabled(false);
- emit_signal("breaked", true, can_continue);
- OS::get_singleton()->move_window_to_foreground();
- if (error != "") {
- tabs->set_current_tab(0);
- }
- profiler->set_enabled(false);
- EditorNode::get_singleton()->get_pause_button()->set_pressed(true);
- EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- _clear_remote_objects();
-
- } else if (p_msg == "debug_exit") {
-
- breaked = false;
- _clear_execution();
- copy->set_disabled(true);
- step->set_disabled(true);
- next->set_disabled(true);
- reason->set_text("");
- reason->set_tooltip("");
- back->set_disabled(true);
- forward->set_disabled(true);
- dobreak->set_disabled(false);
- docontinue->set_disabled(true);
- emit_signal("breaked", false, false, Variant());
- profiler->set_enabled(true);
- profiler->disable_seeking();
- EditorNode::get_singleton()->get_pause_button()->set_pressed(false);
- } else if (p_msg == "message:click_ctrl") {
-
- clicked_ctrl->set_text(p_data[0]);
- clicked_ctrl_type->set_text(p_data[1]);
-
- } else if (p_msg == "message:scene_tree") {
-
- inspect_scene_tree->clear();
- Map<int, TreeItem *> lv;
-
- updating_scene_tree = true;
-
- _update_scene_tree(NULL, p_data, 0);
-
- updating_scene_tree = false;
-
- le_clear->set_disabled(false);
- le_set->set_disabled(false);
- } else if (p_msg == "message:inspect_object") {
-
- ScriptEditorDebuggerInspectedObject *debugObj = NULL;
-
- ObjectID id = p_data[0];
- String type = p_data[1];
- Array properties = p_data[2];
-
- if (remote_objects.has(id)) {
- debugObj = remote_objects[id];
- } else {
- debugObj = memnew(ScriptEditorDebuggerInspectedObject);
- debugObj->remote_object_id = id;
- debugObj->type_name = type;
- remote_objects[id] = debugObj;
- debugObj->connect("value_edited", this, "_scene_tree_property_value_edited");
- }
-
- int old_prop_size = debugObj->prop_list.size();
-
- debugObj->prop_list.clear();
- int new_props_added = 0;
- Set<String> changed;
- for (int i = 0; i < properties.size(); i++) {
-
- Array prop = properties[i];
- if (prop.size() != 6)
- continue;
-
- PropertyInfo pinfo;
- pinfo.name = prop[0];
- pinfo.type = Variant::Type(int(prop[1]));
- pinfo.hint = PropertyHint(int(prop[2]));
- pinfo.hint_string = prop[3];
- pinfo.usage = PropertyUsageFlags(int(prop[4]));
- Variant var = prop[5];
-
- if (pinfo.type == Variant::OBJECT) {
- if (var.is_zero()) {
- var = RES();
- } else if (var.get_type() == Variant::STRING) {
- String path = var;
- if (path.find("::") != -1) {
- // built-in resource
- String base_path = path.get_slice("::", 0);
- if (ResourceLoader::get_resource_type(base_path) == "PackedScene") {
- if (!EditorNode::get_singleton()->is_scene_open(base_path)) {
- EditorNode::get_singleton()->load_scene(base_path);
- }
- } else {
- EditorNode::get_singleton()->load_resource(base_path);
- }
- }
- var = ResourceLoader::load(path);
-
- if (pinfo.hint_string == "Script") {
- if (debugObj->get_script() != var) {
- debugObj->set_script(REF());
- Ref<Script> script(var);
- if (!script.is_null()) {
- ScriptInstance *script_instance = script->placeholder_instance_create(debugObj);
- debugObj->set_script_and_instance(var, script_instance);
- }
- }
- }
- } else if (var.get_type() == Variant::OBJECT) {
- if (((Object *)var)->is_class("EncodedObjectAsID")) {
- var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id();
- pinfo.type = var.get_type();
- pinfo.hint = PROPERTY_HINT_OBJECT_ID;
- pinfo.hint_string = "Object";
- }
- }
- }
-
- //always add the property, since props may have been added or removed
- debugObj->prop_list.push_back(pinfo);
-
- if (!debugObj->prop_values.has(pinfo.name)) {
- new_props_added++;
- debugObj->prop_values[pinfo.name] = var;
- } else {
-
- if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) {
- debugObj->prop_values[pinfo.name] = var;
- changed.insert(pinfo.name);
- }
- }
- }
-
- if (editor->get_editor_history()->get_current() != debugObj->get_instance_id()) {
- editor->push_item(debugObj, "");
- } else {
-
- if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) {
- //only some may have changed, if so, then update those, if exist
- for (Set<String>::Element *E = changed.front(); E; E = E->next()) {
- EditorNode::get_singleton()->get_inspector()->update_property(E->get());
- }
- } else {
- //full update, because props were added or removed
- debugObj->update();
- }
- }
- } else if (p_msg == "message:video_mem") {
-
- vmem_tree->clear();
- TreeItem *root = vmem_tree->create_item();
-
- int total = 0;
-
- for (int i = 0; i < p_data.size(); i += 4) {
-
- TreeItem *it = vmem_tree->create_item(root);
- String type = p_data[i + 1];
- int bytes = p_data[i + 3].operator int();
- it->set_text(0, p_data[i + 0]); //path
- it->set_text(1, type); //type
- it->set_text(2, p_data[i + 2]); //type
- it->set_text(3, String::humanize_size(bytes)); //type
- total += bytes;
-
- if (has_icon(type, "EditorIcons"))
- it->set_icon(0, get_icon(type, "EditorIcons"));
- }
-
- vmem_total->set_tooltip(TTR("Bytes:") + " " + itos(total));
- vmem_total->set_text(String::humanize_size(total));
-
- } else if (p_msg == "stack_dump") {
-
- stack_dump->clear();
- TreeItem *r = stack_dump->create_item();
-
- for (int i = 0; i < p_data.size(); i++) {
-
- Dictionary d = p_data[i];
- ERR_CONTINUE(!d.has("function"));
- ERR_CONTINUE(!d.has("file"));
- ERR_CONTINUE(!d.has("line"));
- ERR_CONTINUE(!d.has("id"));
- TreeItem *s = stack_dump->create_item(r);
- d["frame"] = i;
- s->set_metadata(0, d);
-
- String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + d["function"];
- s->set_text(0, line);
-
- if (i == 0)
- s->select(0);
- }
- } else if (p_msg == "stack_frame_vars") {
-
- variables->clear();
-
- int ofs = 0;
- int mcount = p_data[ofs];
- ofs++;
- for (int i = 0; i < mcount; i++) {
-
- String n = p_data[ofs + i * 2 + 0];
- Variant v = p_data[ofs + i * 2 + 1];
-
- PropertyHint h = PROPERTY_HINT_NONE;
- String hs = String();
-
- if (v.get_type() == Variant::OBJECT) {
- v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
- h = PROPERTY_HINT_OBJECT_ID;
- hs = "Object";
- }
-
- variables->add_property("Locals/" + n, v, h, hs);
- }
-
- ofs += mcount * 2;
- mcount = p_data[ofs];
- ofs++;
- for (int i = 0; i < mcount; i++) {
-
- String n = p_data[ofs + i * 2 + 0];
- Variant v = p_data[ofs + i * 2 + 1];
- PropertyHint h = PROPERTY_HINT_NONE;
- String hs = String();
-
- if (v.get_type() == Variant::OBJECT) {
- v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
- h = PROPERTY_HINT_OBJECT_ID;
- hs = "Object";
- }
-
- variables->add_property("Members/" + n, v, h, hs);
-
- if (n == "self") {
- _scene_tree_property_select_object(v);
- }
- }
-
- ofs += mcount * 2;
- mcount = p_data[ofs];
- ofs++;
- for (int i = 0; i < mcount; i++) {
-
- String n = p_data[ofs + i * 2 + 0];
- Variant v = p_data[ofs + i * 2 + 1];
- PropertyHint h = PROPERTY_HINT_NONE;
- String hs = String();
-
- if (v.get_type() == Variant::OBJECT) {
- v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
- h = PROPERTY_HINT_OBJECT_ID;
- hs = "Object";
- }
-
- variables->add_property("Globals/" + n, v, h, hs);
- }
-
- variables->update();
- inspector->edit(variables);
-
- } else if (p_msg == "output") {
-
- //OUT
- for (int i = 0; i < p_data.size(); i++) {
-
- String t = p_data[i];
- //LOG
-
- if (!EditorNode::get_log()->is_visible()) {
- if (EditorNode::get_singleton()->are_bottom_panels_hidden()) {
- if (EDITOR_GET("run/output/always_open_output_on_play")) {
- EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
- }
- }
- }
- EditorNode::get_log()->add_message(t);
- }
-
- } else if (p_msg == "performance") {
- Array arr = p_data[0];
- Vector<float> p;
- p.resize(arr.size());
- for (int i = 0; i < arr.size(); i++) {
- p.write[i] = arr[i];
- if (i < perf_items.size()) {
-
- const float value = p[i];
- String label = rtos(value);
- String tooltip = label;
- switch (Performance::MonitorType((int)perf_items[i]->get_metadata(1))) {
- case Performance::MONITOR_TYPE_MEMORY: {
- label = String::humanize_size(value);
- tooltip = label;
- } break;
- case Performance::MONITOR_TYPE_TIME: {
- label = rtos(value * 1000).pad_decimals(2) + " ms";
- tooltip = label;
- } break;
- default: {
- tooltip += " " + perf_items[i]->get_text(0);
- } break;
- }
-
- perf_items[i]->set_text(1, label);
- perf_items[i]->set_tooltip(1, tooltip);
- if (p[i] > perf_max[i])
- perf_max.write[i] = p[i];
- }
- }
- perf_history.push_front(p);
- perf_draw->update();
- } else if (p_msg == "visual_profile") {
- uint64_t frame = p_data[0];
- PoolVector<String> names = p_data[1];
- PoolVector<real_t> values = p_data[2];
-
- EditorVisualProfiler::Metric metric;
- metric.areas.resize(names.size());
- metric.frame_number = frame;
- metric.valid = true;
-
- {
- EditorVisualProfiler::Metric::Area *areas_ptr = metric.areas.ptrw();
- int metric_count = names.size();
-
- PoolVector<String>::Read rs = names.read();
- PoolVector<real_t>::Read rr = values.read();
-
- for (int i = 0; i < metric_count; i++) {
-
- areas_ptr[i].name = rs[i];
- areas_ptr[i].cpu_time = rr[i * 2 + 0];
- areas_ptr[i].gpu_time = rr[i * 2 + 1];
- }
- }
-
- visual_profiler->add_frame_metric(metric);
-
- } else if (p_msg == "error") {
-
- // Should have at least two elements, error array and stack items count.
- ERR_FAIL_COND_MSG(p_data.size() < 2, "Malformed error message from script debugger.");
-
- // Error or warning data.
- Array err = p_data[0];
- ERR_FAIL_COND_MSG(err.size() < 10, "Malformed error message from script debugger.");
-
- // Format time.
- Array time_vals;
- time_vals.push_back(err[0]);
- time_vals.push_back(err[1]);
- time_vals.push_back(err[2]);
- time_vals.push_back(err[3]);
- bool e;
- String time = String("%d:%02d:%02d.%03d").sprintf(time_vals, &e);
-
- // Rest of the error data.
- String method = err[4];
- String source_file = err[5];
- String source_line = err[6];
- String error_cond = err[7];
- String error_msg = err[8];
- bool is_warning = err[9];
- bool has_method = !method.empty();
- bool has_error_msg = !error_msg.empty();
- bool source_is_project_file = source_file.begins_with("res://");
-
- // Metadata to highlight error line in scripts.
- Array source_meta;
- source_meta.push_back(source_file);
- source_meta.push_back(source_line);
-
- // Create error tree to display above error or warning details.
- TreeItem *r = error_tree->get_root();
- if (!r) {
- r = error_tree->create_item();
- }
-
- // Also provide the relevant details as tooltip to quickly check without
- // uncollapsing the tree.
- String tooltip = is_warning ? TTR("Warning:") : TTR("Error:");
-
- TreeItem *error = error_tree->create_item(r);
- error->set_collapsed(true);
-
- error->set_icon(0, get_icon(is_warning ? "Warning" : "Error", "EditorIcons"));
- error->set_text(0, time);
- error->set_text_align(0, TreeItem::ALIGN_LEFT);
-
- String error_title;
- // Include method name, when given, in error title.
- if (has_method)
- error_title += method + ": ";
- // If we have a (custom) error message, use it as title, and add a C++ Error
- // item with the original error condition.
- error_title += error_msg.empty() ? error_cond : error_msg;
- error->set_text(1, error_title);
- tooltip += " " + error_title + "\n";
-
- if (has_error_msg) {
- // Add item for C++ error condition.
- TreeItem *cpp_cond = error_tree->create_item(error);
- cpp_cond->set_text(0, "<" + TTR("C++ Error") + ">");
- cpp_cond->set_text(1, error_cond);
- cpp_cond->set_text_align(0, TreeItem::ALIGN_LEFT);
- tooltip += TTR("C++ Error:") + " " + error_cond + "\n";
- if (source_is_project_file)
- cpp_cond->set_metadata(0, source_meta);
- }
-
- // Source of the error.
- String source_txt = (source_is_project_file ? source_file.get_file() : source_file) + ":" + source_line;
- if (has_method)
- source_txt += " @ " + method + "()";
-
- TreeItem *cpp_source = error_tree->create_item(error);
- cpp_source->set_text(0, "<" + (source_is_project_file ? TTR("Source") : TTR("C++ Source")) + ">");
- cpp_source->set_text(1, source_txt);
- cpp_source->set_text_align(0, TreeItem::ALIGN_LEFT);
- tooltip += (source_is_project_file ? TTR("Source:") : TTR("C++ Source:")) + " " + source_txt + "\n";
-
- // Set metadata to highlight error line in scripts.
- if (source_is_project_file) {
- error->set_metadata(0, source_meta);
- cpp_source->set_metadata(0, source_meta);
- }
-
- error->set_tooltip(0, tooltip);
- error->set_tooltip(1, tooltip);
-
- // Format stack trace.
- // stack_items_count is the number of elements to parse, with 3 items per frame
- // of the stack trace (script, method, line).
- int stack_items_count = p_data[1];
-
- for (int i = 0; i < stack_items_count; i += 3) {
- String script = p_data[2 + i];
- String method2 = p_data[3 + i];
- int line = p_data[4 + i];
- TreeItem *stack_trace = error_tree->create_item(error);
-
- Array meta;
- meta.push_back(script);
- meta.push_back(line);
- stack_trace->set_metadata(0, meta);
-
- if (i == 0) {
- stack_trace->set_text(0, "<" + TTR("Stack Trace") + ">");
- stack_trace->set_text_align(0, TreeItem::ALIGN_LEFT);
- error->set_metadata(0, meta);
- }
- stack_trace->set_text(1, script.get_file() + ":" + itos(line) + " @ " + method2 + "()");
- }
-
- if (is_warning)
- warning_count++;
- else
- error_count++;
-
- } else if (p_msg == "profile_sig") {
- //cache a signature
- profiler_signature[p_data[1]] = p_data[0];
-
- } else if (p_msg == "profile_frame" || p_msg == "profile_total") {
-
- EditorProfiler::Metric metric;
- metric.valid = true;
- metric.frame_number = p_data[0];
- metric.frame_time = p_data[1];
- metric.idle_time = p_data[2];
- metric.physics_time = p_data[3];
- metric.physics_frame_time = p_data[4];
- int frame_data_amount = p_data[6];
- int frame_function_amount = p_data[7];
-
- if (frame_data_amount) {
- EditorProfiler::Metric::Category frame_time;
- frame_time.signature = "category_frame_time";
- frame_time.name = "Frame Time";
- frame_time.total_time = metric.frame_time;
-
- EditorProfiler::Metric::Category::Item item;
- item.calls = 1;
- item.line = 0;
-
- item.name = "Physics Time";
- item.total = metric.physics_time;
- item.self = item.total;
- item.signature = "physics_time";
-
- frame_time.items.push_back(item);
-
- item.name = "Idle Time";
- item.total = metric.idle_time;
- item.self = item.total;
- item.signature = "idle_time";
-
- frame_time.items.push_back(item);
-
- item.name = "Physics Frame Time";
- item.total = metric.physics_frame_time;
- item.self = item.total;
- item.signature = "physics_frame_time";
-
- frame_time.items.push_back(item);
-
- metric.categories.push_back(frame_time);
- }
-
- int idx = 8;
- for (int i = 0; i < frame_data_amount; i++) {
-
- EditorProfiler::Metric::Category c;
- String name = p_data[idx++];
- Array values = p_data[idx++];
- c.name = name.capitalize();
- c.items.resize(values.size() / 2);
- c.total_time = 0;
- c.signature = "categ::" + name;
- for (int j = 0; j < values.size(); j += 2) {
-
- EditorProfiler::Metric::Category::Item item;
- item.calls = 1;
- item.line = 0;
- item.name = values[j];
- item.self = values[j + 1];
- item.total = item.self;
- item.signature = "categ::" + name + "::" + item.name;
- item.name = item.name.capitalize();
- c.total_time += item.total;
- c.items.write[j / 2] = item;
- }
- metric.categories.push_back(c);
- }
-
- EditorProfiler::Metric::Category funcs;
- funcs.total_time = p_data[5]; //script time
- funcs.items.resize(frame_function_amount);
- funcs.name = "Script Functions";
- funcs.signature = "script_functions";
- for (int i = 0; i < frame_function_amount; i++) {
-
- int signature = p_data[idx++];
- int calls = p_data[idx++];
- float total = p_data[idx++];
- float self = p_data[idx++];
-
- EditorProfiler::Metric::Category::Item item;
- if (profiler_signature.has(signature)) {
-
- item.signature = profiler_signature[signature];
-
- String name = profiler_signature[signature];
- Vector<String> strings = name.split("::");
- if (strings.size() == 3) {
- item.name = strings[2];
- item.script = strings[0];
- item.line = strings[1].to_int();
- } else if (strings.size() == 4) { //Built-in scripts have an :: in their name
- item.name = strings[3];
- item.script = strings[0] + "::" + strings[1];
- item.line = strings[2].to_int();
- }
-
- } else {
- item.name = "SigErr " + itos(signature);
- }
-
- item.calls = calls;
- item.self = self;
- item.total = total;
- funcs.items.write[i] = item;
- }
-
- metric.categories.push_back(funcs);
-
- if (p_msg == "profile_frame")
- profiler->add_frame_metric(metric, false);
- else
- profiler->add_frame_metric(metric, true);
- } else if (p_msg == "network_profile") {
- int frame_size = 6;
- for (int i = 0; i < p_data.size(); i += frame_size) {
- MultiplayerAPI::ProfilingInfo pi;
- pi.node = p_data[i + 0].operator ObjectID();
- pi.node_path = p_data[i + 1];
- pi.incoming_rpc = p_data[i + 2];
- pi.incoming_rset = p_data[i + 3];
- pi.outgoing_rpc = p_data[i + 4];
- pi.outgoing_rset = p_data[i + 5];
- network_profiler->add_node_frame_data(pi);
- }
- } else if (p_msg == "network_bandwidth") {
- network_profiler->set_bandwidth(p_data[0], p_data[1]);
- } else if (p_msg == "kill_me") {
-
- editor->call_deferred("stop_child_process");
- }
-}
-
-void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType p_type) {
- switch (p_type) {
- case MESSAGE_ERROR:
- reason->add_color_override("font_color", get_color("error_color", "Editor"));
- break;
- case MESSAGE_WARNING:
- reason->add_color_override("font_color", get_color("warning_color", "Editor"));
- break;
- default:
- reason->add_color_override("font_color", get_color("success_color", "Editor"));
- }
- reason->set_text(p_reason);
- reason->set_tooltip(p_reason.word_wrap(80));
-}
-
-void ScriptEditorDebugger::_performance_select() {
-
- perf_draw->update();
-}
-
-void ScriptEditorDebugger::_performance_draw() {
-
- Vector<int> which;
- for (int i = 0; i < perf_items.size(); i++) {
-
- if (perf_items[i]->is_checked(0))
- which.push_back(i);
- }
-
- if (which.empty()) {
- info_message->show();
- return;
- }
-
- info_message->hide();
-
- Ref<StyleBox> graph_sb = get_stylebox("normal", "TextEdit");
- Ref<Font> graph_font = get_font("font", "TextEdit");
-
- int cols = Math::ceil(Math::sqrt((float)which.size()));
- int rows = Math::ceil((float)which.size() / cols);
- if (which.size() == 1)
- rows = 1;
-
- int margin = 3;
- int point_sep = 5;
- Size2i s = Size2i(perf_draw->get_size()) / Size2i(cols, rows);
- for (int i = 0; i < which.size(); i++) {
-
- Point2i p(i % cols, i / cols);
- Rect2i r(p * s, s);
- r.position += Point2(margin, margin);
- r.size -= Point2(margin, margin) * 2.0;
- perf_draw->draw_style_box(graph_sb, r);
- r.position += graph_sb->get_offset();
- r.size -= graph_sb->get_minimum_size();
- int pi = which[i];
- Color c = get_color("accent_color", "Editor");
- float h = (float)which[i] / (float)(perf_items.size());
- // Use a darker color on light backgrounds for better visibility
- float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55;
- c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * value_multiplier);
-
- c.a = 0.6;
- perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
- c.a = 0.9;
- perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
-
- float spacing = point_sep / float(cols);
- float from = r.size.width;
-
- List<Vector<float> >::Element *E = perf_history.front();
- float prev = -1;
- while (from >= 0 && E) {
-
- float m = perf_max[pi];
- if (m == 0)
- m = 0.00001;
- float h2 = E->get()[pi] / m;
- h2 = (1.0 - h2) * r.size.y;
-
- if (E != perf_history.front())
- perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE));
- prev = h2;
- E = E->next();
- from -= spacing;
- }
- }
-}
-
-void ScriptEditorDebugger::_notification(int p_what) {
-
- switch (p_what) {
-
- case NOTIFICATION_ENTER_TREE: {
-
- inspector->edit(variables);
- skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
- copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
-
- step->set_icon(get_icon("DebugStep", "EditorIcons"));
- next->set_icon(get_icon("DebugNext", "EditorIcons"));
- back->set_icon(get_icon("Back", "EditorIcons"));
- forward->set_icon(get_icon("Forward", "EditorIcons"));
- dobreak->set_icon(get_icon("Pause", "EditorIcons"));
- docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
- le_set->connect("pressed", this, "_live_edit_set");
- le_clear->connect("pressed", this, "_live_edit_clear");
- error_tree->connect("item_selected", this, "_error_selected");
- error_tree->connect("item_activated", this, "_error_activated");
- vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
-
- reason->add_color_override("font_color", get_color("error_color", "Editor"));
-
- } break;
- case NOTIFICATION_PROCESS: {
-
- if (connection.is_valid()) {
-
- inspect_scene_tree_timeout -= get_process_delta_time();
- if (inspect_scene_tree_timeout < 0) {
- inspect_scene_tree_timeout = EditorSettings::get_singleton()->get("debugger/remote_scene_tree_refresh_interval");
- if (inspect_scene_tree->is_visible_in_tree()) {
- _scene_tree_request();
- }
- }
-
- inspect_edited_object_timeout -= get_process_delta_time();
- if (inspect_edited_object_timeout < 0) {
- inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
- if (inspected_object_id.is_valid()) {
- if (ScriptEditorDebuggerInspectedObject *obj = Object::cast_to<ScriptEditorDebuggerInspectedObject>(ObjectDB::get_instance(editor->get_editor_history()->get_current()))) {
- if (obj->remote_object_id == inspected_object_id) {
- //take the chance and re-inspect selected object
- Array msg;
- msg.push_back("inspect_object");
- msg.push_back(inspected_object_id);
- ppeer->put_var(msg);
- }
- }
- }
- }
-
- if (camera_override == OVERRIDE_2D) {
- CanvasItemEditor *editor = CanvasItemEditor::get_singleton();
-
- Dictionary state = editor->get_state();
- float zoom = state["zoom"];
- Point2 offset = state["ofs"];
- Transform2D transform;
-
- transform.scale_basis(Size2(zoom, zoom));
- transform.elements[2] = -offset * zoom;
-
- Array msg;
- msg.push_back("override_camera_2D:transform");
- msg.push_back(transform);
- ppeer->put_var(msg);
-
- } else if (camera_override >= OVERRIDE_3D_1) {
- int viewport_idx = camera_override - OVERRIDE_3D_1;
- SpatialEditorViewport *viewport = SpatialEditor::get_singleton()->get_editor_viewport(viewport_idx);
- Camera *const cam = viewport->get_camera();
-
- Array msg;
- msg.push_back("override_camera_3D:transform");
- msg.push_back(cam->get_camera_transform());
- if (cam->get_projection() == Camera::PROJECTION_ORTHOGONAL) {
- msg.push_back(false);
- msg.push_back(cam->get_size());
- } else {
- msg.push_back(true);
- msg.push_back(cam->get_fov());
- }
- msg.push_back(cam->get_znear());
- msg.push_back(cam->get_zfar());
- ppeer->put_var(msg);
- }
- }
-
- if (error_count != last_error_count || warning_count != last_warning_count) {
-
- if (error_count == 0 && warning_count == 0) {
- errors_tab->set_name(TTR("Errors"));
- debugger_button->set_text(TTR("Debugger"));
- debugger_button->set_icon(Ref<Texture2D>());
- tabs->set_tab_icon(errors_tab->get_index(), Ref<Texture2D>());
- } else {
- errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
- debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
- if (error_count == 0) {
- debugger_button->set_icon(get_icon("Warning", "EditorIcons"));
- tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons"));
- } else {
- debugger_button->set_icon(get_icon("Error", "EditorIcons"));
- tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons"));
- }
- }
- last_error_count = error_count;
- last_warning_count = warning_count;
- }
-
- if (server->is_connection_available()) {
- if (connection.is_valid()) {
- // We already have a valid connection. Disconnecting any new connecting client to prevent it from hanging.
- // (If we don't keep a reference to the connection it will be destroyed and disconnect_from_host will be called internally)
- server->take_connection();
- } else {
- // We just got the first connection.
- connection = server->take_connection();
- if (connection.is_null())
- break;
-
- EditorNode::get_log()->add_message("--- Debugging process started ---", EditorLog::MSG_TYPE_EDITOR);
-
- ppeer->set_stream_peer(connection);
-
- //EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- //emit_signal("show_debugger",true);
-
- dobreak->set_disabled(false);
- tabs->set_current_tab(0);
-
- _set_reason_text(TTR("Child process connected."), MESSAGE_SUCCESS);
- profiler->clear();
-
- inspect_scene_tree->clear();
- le_set->set_disabled(true);
- le_clear->set_disabled(false);
- vmem_refresh->set_disabled(false);
- error_tree->clear();
- error_count = 0;
- warning_count = 0;
- profiler_signature.clear();
- //live_edit_root->set_text("/root");
-
- EditorNode::get_singleton()->get_pause_button()->set_pressed(false);
- EditorNode::get_singleton()->get_pause_button()->set_disabled(false);
-
- update_live_edit_root();
- if (profiler->is_profiling()) {
- _profiler_activate(true);
- }
-
- if (network_profiler->is_profiling()) {
- _network_profiler_activate(true);
- }
- }
- }
-
- if (connection.is_null())
- break;
-
- if (!connection->is_connected_to_host()) {
- stop();
- editor->notify_child_process_exited(); //somehow, exited
- break;
- };
-
- if (ppeer->get_available_packet_count() <= 0) {
- break;
- };
-
- const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20;
-
- while (ppeer->get_available_packet_count() > 0) {
-
- if (pending_in_queue) {
-
- int todo = MIN(ppeer->get_available_packet_count(), pending_in_queue);
-
- for (int i = 0; i < todo; i++) {
-
- Variant cmd;
- Error ret = ppeer->get_var(cmd);
- if (ret != OK) {
- stop();
- ERR_FAIL_COND(ret != OK);
- }
-
- message.push_back(cmd);
- pending_in_queue--;
- }
-
- if (pending_in_queue == 0) {
- _parse_message(message_type, message);
- message.clear();
- }
-
- } else {
-
- if (ppeer->get_available_packet_count() >= 2) {
-
- Variant cmd;
- Error ret = ppeer->get_var(cmd);
- if (ret != OK) {
- stop();
- ERR_FAIL_COND(ret != OK);
- }
- if (cmd.get_type() != Variant::STRING) {
- stop();
- ERR_FAIL_COND(cmd.get_type() != Variant::STRING);
- }
-
- message_type = cmd;
-
- ret = ppeer->get_var(cmd);
- if (ret != OK) {
- stop();
- ERR_FAIL_COND(ret != OK);
- }
- if (cmd.get_type() != Variant::INT) {
- stop();
- ERR_FAIL_COND(cmd.get_type() != Variant::INT);
- }
-
- pending_in_queue = cmd;
-
- if (pending_in_queue == 0) {
- _parse_message(message_type, Array());
- message.clear();
- }
-
- } else {
-
- break;
- }
- }
-
- if (OS::get_singleton()->get_ticks_msec() > until)
- break;
- }
- } break;
- case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
-
- add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
- add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
-
- tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
- tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
- tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
-
- copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
- step->set_icon(get_icon("DebugStep", "EditorIcons"));
- next->set_icon(get_icon("DebugNext", "EditorIcons"));
- back->set_icon(get_icon("Back", "EditorIcons"));
- forward->set_icon(get_icon("Forward", "EditorIcons"));
- dobreak->set_icon(get_icon("Pause", "EditorIcons"));
- docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
- vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
- } break;
- }
-}
-
-void ScriptEditorDebugger::_clear_execution() {
- TreeItem *ti = stack_dump->get_selected();
- if (!ti)
- return;
-
- Dictionary d = ti->get_metadata(0);
-
- stack_script = ResourceLoader::load(d["file"]);
- emit_signal("clear_execution", stack_script);
- stack_script.unref();
-}
-
-void ScriptEditorDebugger::start() {
-
- stop();
-
- if (is_visible_in_tree()) {
- EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- }
-
- perf_history.clear();
- for (int i = 0; i < Performance::MONITOR_MAX; i++) {
-
- perf_max.write[i] = 0;
- }
-
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
- if (server->listen(remote_port) != OK) {
- EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), EditorLog::MSG_TYPE_ERROR);
- return;
- }
-
- EditorNode::get_singleton()->get_scene_tree_dock()->show_tab_buttons();
- auto_switch_remote_scene_tree = (bool)EditorSettings::get_singleton()->get("debugger/auto_switch_to_remote_scene_tree");
- if (auto_switch_remote_scene_tree) {
- EditorNode::get_singleton()->get_scene_tree_dock()->show_remote_tree();
- }
-
- set_process(true);
- breaked = false;
- camera_override = OVERRIDE_NONE;
-}
-
-void ScriptEditorDebugger::pause() {
-}
-
-void ScriptEditorDebugger::unpause() {
-}
-
-void ScriptEditorDebugger::stop() {
-
- set_process(false);
- breaked = false;
- _clear_execution();
-
- server->stop();
- _clear_remote_objects();
- ppeer->set_stream_peer(Ref<StreamPeer>());
-
- if (connection.is_valid()) {
- EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR);
- connection.unref();
-
- reason->set_text("");
- reason->set_tooltip("");
- }
-
- pending_in_queue = 0;
- message.clear();
-
- node_path_cache.clear();
- res_path_cache.clear();
- profiler_signature.clear();
- le_clear->set_disabled(false);
- le_set->set_disabled(true);
- profiler->set_enabled(true);
- vmem_refresh->set_disabled(true);
-
- inspect_scene_tree->clear();
- inspector->edit(NULL);
- EditorNode::get_singleton()->get_pause_button()->set_pressed(false);
- EditorNode::get_singleton()->get_pause_button()->set_disabled(true);
- EditorNode::get_singleton()->get_scene_tree_dock()->hide_remote_tree();
- EditorNode::get_singleton()->get_scene_tree_dock()->hide_tab_buttons();
-
- if (hide_on_stop) {
- if (is_visible_in_tree())
- EditorNode::get_singleton()->hide_bottom_panel();
- emit_signal("show_debugger", false);
- }
-}
-
-void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
-
- if (!connection.is_valid())
- return;
-
- if (p_enable) {
- profiler_signature.clear();
- Array msg;
- msg.push_back("start_profiling");
- int max_funcs = EditorSettings::get_singleton()->get("debugger/profiler_frame_max_functions");
- max_funcs = CLAMP(max_funcs, 16, 512);
- msg.push_back(max_funcs);
- ppeer->put_var(msg);
- print_verbose("Starting profiling.");
-
- } else {
- Array msg;
- msg.push_back("stop_profiling");
- ppeer->put_var(msg);
- print_verbose("Ending profiling.");
- }
-}
-
-void ScriptEditorDebugger::_visual_profiler_activate(bool p_enable) {
-
- if (!connection.is_valid())
- return;
-
- if (p_enable) {
- profiler_signature.clear();
- Array msg;
- msg.push_back("start_visual_profiling");
- ppeer->put_var(msg);
- print_verbose("Starting visual profiling.");
-
- } else {
- Array msg;
- msg.push_back("stop_visual_profiling");
- ppeer->put_var(msg);
- print_verbose("Ending visual profiling.");
- }
-}
-
-void ScriptEditorDebugger::_network_profiler_activate(bool p_enable) {
-
- if (!connection.is_valid())
- return;
-
- if (p_enable) {
- profiler_signature.clear();
- Array msg;
- msg.push_back("start_network_profiling");
- ppeer->put_var(msg);
- print_verbose("Starting network profiling.");
-
- } else {
- Array msg;
- msg.push_back("stop_network_profiling");
- ppeer->put_var(msg);
- print_verbose("Ending network profiling.");
- }
-}
-
-void ScriptEditorDebugger::_profiler_seeked() {
-
- if (!connection.is_valid() || !connection->is_connected_to_host())
- return;
-
- if (breaked)
- return;
- debug_break();
-}
-
-void ScriptEditorDebugger::_stack_dump_frame_selected() {
-
- TreeItem *ti = stack_dump->get_selected();
- if (!ti)
- return;
-
- Dictionary d = ti->get_metadata(0);
-
- stack_script = ResourceLoader::load(d["file"]);
- emit_signal("goto_script_line", stack_script, int(d["line"]) - 1);
- emit_signal("set_execution", stack_script, int(d["line"]) - 1);
- stack_script.unref();
-
- if (connection.is_valid() && connection->is_connected_to_host()) {
- Array msg;
- msg.push_back("get_stack_frame_vars");
- msg.push_back(d["frame"]);
- ppeer->put_var(msg);
- } else {
- inspector->edit(NULL);
- }
-}
-
-void ScriptEditorDebugger::_output_clear() {
-
- //output->clear();
- //output->push_color(Color(0,0,0));
-}
-
-void ScriptEditorDebugger::_export_csv() {
-
- file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- file_dialog_mode = SAVE_CSV;
- file_dialog->popup_centered_ratio();
-}
-
-String ScriptEditorDebugger::get_var_value(const String &p_var) const {
- if (!breaked)
- return String();
- return variables->get_var_value(p_var);
-}
-
-int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
-
- const int *r = node_path_cache.getptr(p_path);
- if (r)
- return *r;
-
- last_path_id++;
-
- node_path_cache[p_path] = last_path_id;
- Array msg;
- msg.push_back("live_node_path");
- msg.push_back(p_path);
- msg.push_back(last_path_id);
- ppeer->put_var(msg);
-
- return last_path_id;
-}
-
-int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
-
- Map<String, int>::Element *E = res_path_cache.find(p_path);
-
- if (E)
- return E->get();
-
- last_path_id++;
-
- res_path_cache[p_path] = last_path_id;
- Array msg;
- msg.push_back("live_res_path");
- msg.push_back(p_path);
- msg.push_back(last_path_id);
- ppeer->put_var(msg);
-
- return last_path_id;
-}
-
-void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
-
- if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene())
- return;
-
- Node *node = Object::cast_to<Node>(p_base);
-
- VARIANT_ARGPTRS
-
- for (int i = 0; i < VARIANT_ARG_MAX; i++) {
- //no pointers, sorry
- if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::_RID))
- return;
- }
-
- if (node) {
-
- NodePath path = editor->get_edited_scene()->get_path_to(node);
- int pathid = _get_node_path_cache(path);
-
- Array msg;
- msg.push_back("live_node_call");
- msg.push_back(pathid);
- msg.push_back(p_name);
- for (int i = 0; i < VARIANT_ARG_MAX; i++) {
- //no pointers, sorry
- msg.push_back(*argptr[i]);
- }
- ppeer->put_var(msg);
-
- return;
- }
-
- Resource *res = Object::cast_to<Resource>(p_base);
-
- if (res && res->get_path() != String()) {
-
- String respath = res->get_path();
- int pathid = _get_res_path_cache(respath);
-
- Array msg;
- msg.push_back("live_res_call");
- msg.push_back(pathid);
- msg.push_back(p_name);
- for (int i = 0; i < VARIANT_ARG_MAX; i++) {
- //no pointers, sorry
- msg.push_back(*argptr[i]);
- }
- ppeer->put_var(msg);
-
- return;
- }
-}
-
-void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
-
- if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene())
- return;
-
- Node *node = Object::cast_to<Node>(p_base);
-
- if (node) {
-
- NodePath path = editor->get_edited_scene()->get_path_to(node);
- int pathid = _get_node_path_cache(path);
-
- if (p_value.is_ref()) {
- Ref<Resource> res = p_value;
- if (res.is_valid() && res->get_path() != String()) {
-
- Array msg;
- msg.push_back("live_node_prop_res");
- msg.push_back(pathid);
- msg.push_back(p_property);
- msg.push_back(res->get_path());
- ppeer->put_var(msg);
- }
- } else {
-
- Array msg;
- msg.push_back("live_node_prop");
- msg.push_back(pathid);
- msg.push_back(p_property);
- msg.push_back(p_value);
- ppeer->put_var(msg);
- }
-
- return;
- }
-
- Resource *res = Object::cast_to<Resource>(p_base);
-
- if (res && res->get_path() != String()) {
-
- String respath = res->get_path();
- int pathid = _get_res_path_cache(respath);
-
- if (p_value.is_ref()) {
- Ref<Resource> res2 = p_value;
- if (res2.is_valid() && res2->get_path() != String()) {
-
- Array msg;
- msg.push_back("live_res_prop_res");
- msg.push_back(pathid);
- msg.push_back(p_property);
- msg.push_back(res2->get_path());
- ppeer->put_var(msg);
- }
- } else {
-
- Array msg;
- msg.push_back("live_res_prop");
- msg.push_back(pathid);
- msg.push_back(p_property);
- msg.push_back(p_value);
- ppeer->put_var(msg);
- }
-
- return;
- }
-}
-
-void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
-
- ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud;
- sed->_method_changed(p_base, p_name, VARIANT_ARG_PASS);
-}
-
-void ScriptEditorDebugger::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) {
-
- ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud;
- sed->_property_changed(p_base, p_property, p_value);
-}
-
-void ScriptEditorDebugger::set_live_debugging(bool p_enable) {
-
- live_debug = p_enable;
-}
-
-void ScriptEditorDebugger::_live_edit_set() {
-
- if (!connection.is_valid())
- return;
-
- TreeItem *ti = inspect_scene_tree->get_selected();
- if (!ti)
- return;
- String path;
-
- while (ti) {
- String lp = ti->get_text(0);
- path = "/" + lp + path;
- ti = ti->get_parent();
- }
-
- NodePath np = path;
-
- editor->get_editor_data().set_edited_scene_live_edit_root(np);
-
- update_live_edit_root();
-}
-
-void ScriptEditorDebugger::_live_edit_clear() {
-
- NodePath np = NodePath("/root");
- editor->get_editor_data().set_edited_scene_live_edit_root(np);
-
- update_live_edit_root();
-}
-
-void ScriptEditorDebugger::update_live_edit_root() {
-
- NodePath np = editor->get_editor_data().get_edited_scene_live_edit_root();
-
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("live_set_root");
- msg.push_back(np);
- if (editor->get_edited_scene())
- msg.push_back(editor->get_edited_scene()->get_filename());
- else
- msg.push_back("");
- ppeer->put_var(msg);
- }
- live_edit_root->set_text(np);
-}
-
-void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_create_node");
- msg.push_back(p_parent);
- msg.push_back(p_type);
- msg.push_back(p_name);
- ppeer->put_var(msg);
- }
-}
-
-void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_instance_node");
- msg.push_back(p_parent);
- msg.push_back(p_path);
- msg.push_back(p_name);
- ppeer->put_var(msg);
- }
-}
-void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_remove_node");
- msg.push_back(p_at);
- ppeer->put_var(msg);
- }
-}
-void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_remove_and_keep_node");
- msg.push_back(p_at);
- msg.push_back(p_keep_id);
- ppeer->put_var(msg);
- }
-}
-void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_restore_node");
- msg.push_back(p_id);
- msg.push_back(p_at);
- msg.push_back(p_at_pos);
- ppeer->put_var(msg);
- }
-}
-void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_duplicate_node");
- msg.push_back(p_at);
- msg.push_back(p_new_name);
- ppeer->put_var(msg);
- }
-}
-void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
-
- if (live_debug && connection.is_valid()) {
- Array msg;
- msg.push_back("live_reparent_node");
- msg.push_back(p_at);
- msg.push_back(p_new_place);
- msg.push_back(p_new_name);
- msg.push_back(p_at_pos);
- ppeer->put_var(msg);
- }
-}
-
-ScriptEditorDebugger::CameraOverride ScriptEditorDebugger::get_camera_override() const {
- return camera_override;
-}
-
-void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
-
- if (p_override == OVERRIDE_2D && camera_override != OVERRIDE_2D) {
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("override_camera_2D:set");
- msg.push_back(true);
- ppeer->put_var(msg);
- }
- } else if (p_override != OVERRIDE_2D && camera_override == OVERRIDE_2D) {
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("override_camera_2D:set");
- msg.push_back(false);
- ppeer->put_var(msg);
- }
- } else if (p_override >= OVERRIDE_3D_1 && camera_override < OVERRIDE_3D_1) {
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("override_camera_3D:set");
- msg.push_back(true);
- ppeer->put_var(msg);
- }
- } else if (p_override < OVERRIDE_3D_1 && camera_override >= OVERRIDE_3D_1) {
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("override_camera_3D:set");
- msg.push_back(false);
- ppeer->put_var(msg);
- }
- }
-
- camera_override = p_override;
-}
-
-void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
-
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("breakpoint");
- msg.push_back(p_path);
- msg.push_back(p_line);
- msg.push_back(p_enabled);
- ppeer->put_var(msg);
- }
-}
-
-void ScriptEditorDebugger::reload_scripts() {
-
- if (connection.is_valid()) {
- Array msg;
- msg.push_back("reload_scripts");
- ppeer->put_var(msg);
- }
-}
-
-bool ScriptEditorDebugger::is_skip_breakpoints() {
- return skip_breakpoints_value;
-}
-
-void ScriptEditorDebugger::_error_activated() {
- TreeItem *selected = error_tree->get_selected();
-
- TreeItem *ci = selected->get_children();
- if (ci) {
- selected->set_collapsed(!selected->is_collapsed());
- }
-}
-
-void ScriptEditorDebugger::_error_selected() {
- TreeItem *selected = error_tree->get_selected();
-
- Array meta = selected->get_metadata(0);
-
- if (meta.size() == 0) {
- return;
- }
-
- Ref<Script> s = ResourceLoader::load(meta[0]);
- emit_signal("goto_script_line", s, int(meta[1]) - 1);
-}
-
-void ScriptEditorDebugger::_expand_errors_list() {
-
- TreeItem *root = error_tree->get_root();
- if (!root)
- return;
-
- TreeItem *item = root->get_children();
- while (item) {
- item->set_collapsed(false);
- item = item->get_next();
- }
-}
-
-void ScriptEditorDebugger::_collapse_errors_list() {
-
- TreeItem *root = error_tree->get_root();
- if (!root)
- return;
-
- TreeItem *item = root->get_children();
- while (item) {
- item->set_collapsed(true);
- item = item->get_next();
- }
-}
-
-void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) {
-
- hide_on_stop = p_hide;
-}
-
-bool ScriptEditorDebugger::get_debug_with_external_editor() const {
-
- return enable_external_editor;
-}
-
-void ScriptEditorDebugger::set_debug_with_external_editor(bool p_enabled) {
-
- enable_external_editor = p_enabled;
-}
-
-Ref<Script> ScriptEditorDebugger::get_dump_stack_script() const {
-
- return stack_script;
-}
-
-void ScriptEditorDebugger::_paused() {
-
- ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected_to_host());
-
- if (!breaked && EditorNode::get_singleton()->get_pause_button()->is_pressed()) {
- debug_break();
- }
-
- if (breaked && !EditorNode::get_singleton()->get_pause_button()->is_pressed()) {
- debug_continue();
- }
-}
-
-void ScriptEditorDebugger::_set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj) {
-
- if (remote_objects.has(p_id))
- memdelete(remote_objects[p_id]);
- remote_objects[p_id] = p_obj;
-}
-
-void ScriptEditorDebugger::_clear_remote_objects() {
-
- for (Map<ObjectID, ScriptEditorDebuggerInspectedObject *>::Element *E = remote_objects.front(); E; E = E->next()) {
- if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) {
- editor->push_item(NULL);
- }
- memdelete(E->value());
- }
- remote_objects.clear();
-}
-
-void ScriptEditorDebugger::_clear_errors_list() {
-
- error_tree->clear();
- error_count = 0;
- warning_count = 0;
- _notification(NOTIFICATION_PROCESS);
-}
-
-// Right click on specific file(s) or folder(s).
-void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
-
- item_menu->clear();
- item_menu->set_size(Size2(1, 1));
-
- if (error_tree->is_anything_selected()) {
- item_menu->add_icon_item(get_icon("ActionCopy", "EditorIcons"), TTR("Copy Error"), ITEM_MENU_COPY_ERROR);
- }
-
- if (item_menu->get_item_count() > 0) {
- item_menu->set_position(error_tree->get_global_position() + p_pos);
- item_menu->popup();
- }
-}
-
-void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
-
- switch (p_option) {
-
- case ITEM_MENU_COPY_ERROR: {
- TreeItem *ti = error_tree->get_selected();
- while (ti->get_parent() != error_tree->get_root())
- ti = ti->get_parent();
-
- String type;
-
- if (ti->get_icon(0) == get_icon("Warning", "EditorIcons")) {
- type = "W ";
- } else if (ti->get_icon(0) == get_icon("Error", "EditorIcons")) {
- type = "E ";
- }
-
- String text = ti->get_text(0) + " ";
- int rpad_len = text.length();
-
- text = type + text + ti->get_text(1) + "\n";
- TreeItem *ci = ti->get_children();
- while (ci) {
- text += " " + ci->get_text(0).rpad(rpad_len) + ci->get_text(1) + "\n";
- ci = ci->get_next();
- }
-
- OS::get_singleton()->set_clipboard(text);
-
- } break;
- case ITEM_MENU_SAVE_REMOTE_NODE: {
-
- file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES);
- file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- file_dialog_mode = SAVE_NODE;
-
- List<String> extensions;
- Ref<PackedScene> sd = memnew(PackedScene);
- ResourceSaver::get_recognized_extensions(sd, &extensions);
- file_dialog->clear_filters();
- for (int i = 0; i < extensions.size(); i++) {
- file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
- }
-
- file_dialog->popup_centered_ratio();
- } break;
- case ITEM_MENU_COPY_NODE_PATH: {
-
- TreeItem *ti = inspect_scene_tree->get_selected();
- String text = ti->get_text(0);
-
- if (ti->get_parent() == NULL) {
- text = ".";
- } else if (ti->get_parent()->get_parent() == NULL) {
- text = ".";
- } else {
- while (ti->get_parent()->get_parent() != inspect_scene_tree->get_root()) {
- ti = ti->get_parent();
- text = ti->get_text(0) + "/" + text;
- }
- }
-
- OS::get_singleton()->set_clipboard(text);
- } break;
- }
-}
-
-void ScriptEditorDebugger::_tab_changed(int p_tab) {
- if (tabs->get_tab_title(p_tab) == TTR("Video RAM")) {
- // "Video RAM" tab was clicked, refresh the data it's dislaying when entering the tab.
- _video_mem_request();
- }
-}
-
-void ScriptEditorDebugger::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &ScriptEditorDebugger::_stack_dump_frame_selected);
-
- ClassDB::bind_method(D_METHOD("debug_skip_breakpoints"), &ScriptEditorDebugger::debug_skip_breakpoints);
- ClassDB::bind_method(D_METHOD("debug_copy"), &ScriptEditorDebugger::debug_copy);
-
- ClassDB::bind_method(D_METHOD("debug_next"), &ScriptEditorDebugger::debug_next);
- ClassDB::bind_method(D_METHOD("debug_step"), &ScriptEditorDebugger::debug_step);
- ClassDB::bind_method(D_METHOD("debug_break"), &ScriptEditorDebugger::debug_break);
- ClassDB::bind_method(D_METHOD("debug_continue"), &ScriptEditorDebugger::debug_continue);
- ClassDB::bind_method(D_METHOD("_output_clear"), &ScriptEditorDebugger::_output_clear);
- ClassDB::bind_method(D_METHOD("_export_csv"), &ScriptEditorDebugger::_export_csv);
- ClassDB::bind_method(D_METHOD("_performance_draw"), &ScriptEditorDebugger::_performance_draw);
- ClassDB::bind_method(D_METHOD("_performance_select"), &ScriptEditorDebugger::_performance_select);
- ClassDB::bind_method(D_METHOD("_scene_tree_request"), &ScriptEditorDebugger::_scene_tree_request);
- ClassDB::bind_method(D_METHOD("_video_mem_request"), &ScriptEditorDebugger::_video_mem_request);
- ClassDB::bind_method(D_METHOD("_live_edit_set"), &ScriptEditorDebugger::_live_edit_set);
- ClassDB::bind_method(D_METHOD("_live_edit_clear"), &ScriptEditorDebugger::_live_edit_clear);
-
- ClassDB::bind_method(D_METHOD("_error_selected"), &ScriptEditorDebugger::_error_selected);
- ClassDB::bind_method(D_METHOD("_error_activated"), &ScriptEditorDebugger::_error_activated);
- ClassDB::bind_method(D_METHOD("_expand_errors_list"), &ScriptEditorDebugger::_expand_errors_list);
- ClassDB::bind_method(D_METHOD("_collapse_errors_list"), &ScriptEditorDebugger::_collapse_errors_list);
- ClassDB::bind_method(D_METHOD("_profiler_activate"), &ScriptEditorDebugger::_profiler_activate);
- ClassDB::bind_method(D_METHOD("_visual_profiler_activate"), &ScriptEditorDebugger::_visual_profiler_activate);
- ClassDB::bind_method(D_METHOD("_network_profiler_activate"), &ScriptEditorDebugger::_network_profiler_activate);
- ClassDB::bind_method(D_METHOD("_profiler_seeked"), &ScriptEditorDebugger::_profiler_seeked);
- ClassDB::bind_method(D_METHOD("_clear_errors_list"), &ScriptEditorDebugger::_clear_errors_list);
-
- ClassDB::bind_method(D_METHOD("_error_tree_item_rmb_selected"), &ScriptEditorDebugger::_error_tree_item_rmb_selected);
- ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &ScriptEditorDebugger::_item_menu_id_pressed);
- ClassDB::bind_method(D_METHOD("_tab_changed"), &ScriptEditorDebugger::_tab_changed);
-
- ClassDB::bind_method(D_METHOD("_paused"), &ScriptEditorDebugger::_paused);
-
- ClassDB::bind_method(D_METHOD("_scene_tree_selected"), &ScriptEditorDebugger::_scene_tree_selected);
- ClassDB::bind_method(D_METHOD("_scene_tree_folded"), &ScriptEditorDebugger::_scene_tree_folded);
- ClassDB::bind_method(D_METHOD("_scene_tree_rmb_selected"), &ScriptEditorDebugger::_scene_tree_rmb_selected);
- ClassDB::bind_method(D_METHOD("_file_selected"), &ScriptEditorDebugger::_file_selected);
-
- ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node);
- ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node);
- ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &ScriptEditorDebugger::live_debug_remove_node);
- ClassDB::bind_method(D_METHOD("live_debug_remove_and_keep_node"), &ScriptEditorDebugger::live_debug_remove_and_keep_node);
- ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &ScriptEditorDebugger::live_debug_restore_node);
- ClassDB::bind_method(D_METHOD("live_debug_duplicate_node"), &ScriptEditorDebugger::live_debug_duplicate_node);
- ClassDB::bind_method(D_METHOD("live_debug_reparent_node"), &ScriptEditorDebugger::live_debug_reparent_node);
- ClassDB::bind_method(D_METHOD("_scene_tree_property_select_object"), &ScriptEditorDebugger::_scene_tree_property_select_object);
- ClassDB::bind_method(D_METHOD("_scene_tree_property_value_edited"), &ScriptEditorDebugger::_scene_tree_property_value_edited);
-
- ADD_SIGNAL(MethodInfo("goto_script_line"));
- ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
- ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script")));
- ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug")));
- ADD_SIGNAL(MethodInfo("show_debugger", PropertyInfo(Variant::BOOL, "reallydid")));
-}
-
-ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
-
- add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
- add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
-
- ppeer = Ref<PacketPeerStream>(memnew(PacketPeerStream));
- ppeer->set_input_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be enough, minus 4 bytes for separator.
- editor = p_editor;
- editor->get_inspector()->connect("object_id_selected", this, "_scene_tree_property_select_object");
-
- tabs = memnew(TabContainer);
- tabs->set_tab_align(TabContainer::ALIGN_LEFT);
- tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
- tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
- tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
- tabs->connect("tab_changed", this, "_tab_changed");
-
- add_child(tabs);
-
- { //debugger
- VBoxContainer *vbc = memnew(VBoxContainer);
- vbc->set_name(TTR("Debugger"));
- Control *dbg = vbc;
-
- HBoxContainer *hbc = memnew(HBoxContainer);
- vbc->add_child(hbc);
-
- reason = memnew(Label);
- reason->set_text("");
- hbc->add_child(reason);
- reason->set_h_size_flags(SIZE_EXPAND_FILL);
- reason->set_autowrap(true);
- reason->set_max_lines_visible(3);
- reason->set_mouse_filter(Control::MOUSE_FILTER_PASS);
-
- hbc->add_child(memnew(VSeparator));
-
- skip_breakpoints = memnew(ToolButton);
- hbc->add_child(skip_breakpoints);
- skip_breakpoints->set_tooltip(TTR("Skip Breakpoints"));
- skip_breakpoints->connect("pressed", this, "debug_skip_breakpoints");
-
- hbc->add_child(memnew(VSeparator));
-
- copy = memnew(ToolButton);
- hbc->add_child(copy);
- copy->set_tooltip(TTR("Copy Error"));
- copy->connect("pressed", this, "debug_copy");
-
- hbc->add_child(memnew(VSeparator));
-
- step = memnew(ToolButton);
- hbc->add_child(step);
- step->set_tooltip(TTR("Step Into"));
- step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into"));
- step->connect("pressed", this, "debug_step");
-
- next = memnew(ToolButton);
- hbc->add_child(next);
- next->set_tooltip(TTR("Step Over"));
- next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over"));
- next->connect("pressed", this, "debug_next");
-
- hbc->add_child(memnew(VSeparator));
-
- dobreak = memnew(ToolButton);
- hbc->add_child(dobreak);
- dobreak->set_tooltip(TTR("Break"));
- dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break"));
- dobreak->connect("pressed", this, "debug_break");
-
- docontinue = memnew(ToolButton);
- hbc->add_child(docontinue);
- docontinue->set_tooltip(TTR("Continue"));
- docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue"));
- docontinue->connect("pressed", this, "debug_continue");
-
- back = memnew(Button);
- hbc->add_child(back);
- back->set_tooltip(TTR("Inspect Previous Instance"));
- back->hide();
-
- forward = memnew(Button);
- hbc->add_child(forward);
- forward->set_tooltip(TTR("Inspect Next Instance"));
- forward->hide();
-
- HSplitContainer *sc = memnew(HSplitContainer);
- vbc->add_child(sc);
- sc->set_v_size_flags(SIZE_EXPAND_FILL);
-
- stack_dump = memnew(Tree);
- stack_dump->set_allow_reselect(true);
- stack_dump->set_columns(1);
- stack_dump->set_column_titles_visible(true);
- stack_dump->set_column_title(0, TTR("Stack Frames"));
- stack_dump->set_h_size_flags(SIZE_EXPAND_FILL);
- stack_dump->set_hide_root(true);
- stack_dump->connect("cell_selected", this, "_stack_dump_frame_selected");
- sc->add_child(stack_dump);
-
- inspector = memnew(EditorInspector);
- inspector->set_h_size_flags(SIZE_EXPAND_FILL);
- inspector->set_enable_capitalize_paths(false);
- inspector->set_read_only(true);
- inspector->connect("object_id_selected", this, "_scene_tree_property_select_object");
- sc->add_child(inspector);
-
- server.instance();
-
- pending_in_queue = 0;
-
- variables = memnew(ScriptEditorDebuggerVariables);
-
- breaked = false;
-
- tabs->add_child(dbg);
- }
-
- { //errors
- errors_tab = memnew(VBoxContainer);
- errors_tab->set_name(TTR("Errors"));
-
- HBoxContainer *errhb = memnew(HBoxContainer);
- errors_tab->add_child(errhb);
-
- Button *expand_all = memnew(Button);
- expand_all->set_text(TTR("Expand All"));
- expand_all->connect("pressed", this, "_expand_errors_list");
- errhb->add_child(expand_all);
-
- Button *collapse_all = memnew(Button);
- collapse_all->set_text(TTR("Collapse All"));
- collapse_all->connect("pressed", this, "_collapse_errors_list");
- errhb->add_child(collapse_all);
-
- Control *space = memnew(Control);
- space->set_h_size_flags(SIZE_EXPAND_FILL);
- errhb->add_child(space);
-
- clearbutton = memnew(Button);
- clearbutton->set_text(TTR("Clear"));
- clearbutton->set_h_size_flags(0);
- clearbutton->connect("pressed", this, "_clear_errors_list");
- errhb->add_child(clearbutton);
-
- error_tree = memnew(Tree);
- error_tree->set_columns(2);
-
- error_tree->set_column_expand(0, false);
- error_tree->set_column_min_width(0, 140);
-
- error_tree->set_column_expand(1, true);
-
- error_tree->set_select_mode(Tree::SELECT_ROW);
- error_tree->set_hide_root(true);
- error_tree->set_v_size_flags(SIZE_EXPAND_FILL);
- error_tree->set_allow_rmb_select(true);
- error_tree->connect("item_rmb_selected", this, "_error_tree_item_rmb_selected");
- errors_tab->add_child(error_tree);
-
- item_menu = memnew(PopupMenu);
- item_menu->connect("id_pressed", this, "_item_menu_id_pressed");
- error_tree->add_child(item_menu);
-
- tabs->add_child(errors_tab);
- }
-
- { // remote scene tree
-
- inspect_scene_tree = memnew(Tree);
- EditorNode::get_singleton()->get_scene_tree_dock()->add_remote_tree_editor(inspect_scene_tree);
- EditorNode::get_singleton()->get_scene_tree_dock()->connect("remote_tree_selected", this, "_scene_tree_selected");
- inspect_scene_tree->set_v_size_flags(SIZE_EXPAND_FILL);
- inspect_scene_tree->connect("cell_selected", this, "_scene_tree_selected");
- inspect_scene_tree->connect("item_collapsed", this, "_scene_tree_folded");
- inspect_scene_tree->set_allow_rmb_select(true);
- inspect_scene_tree->connect("item_rmb_selected", this, "_scene_tree_rmb_selected");
- auto_switch_remote_scene_tree = EDITOR_DEF("debugger/auto_switch_to_remote_scene_tree", false);
- inspect_scene_tree_timeout = EDITOR_DEF("debugger/remote_scene_tree_refresh_interval", 1.0);
- inspect_edited_object_timeout = EDITOR_DEF("debugger/remote_inspect_refresh_interval", 0.2);
- inspected_object_id = ObjectID();
- updating_scene_tree = false;
- }
-
- { // File dialog
- file_dialog = memnew(EditorFileDialog);
- file_dialog->connect("file_selected", this, "_file_selected");
- add_child(file_dialog);
- }
-
- { //profiler
- profiler = memnew(EditorProfiler);
- profiler->set_name(TTR("Profiler"));
- tabs->add_child(profiler);
- profiler->connect("enable_profiling", this, "_profiler_activate");
- profiler->connect("break_request", this, "_profiler_seeked");
- }
-
- { //frame profiler
- visual_profiler = memnew(EditorVisualProfiler);
- visual_profiler->set_name(TTR("Visual Profiler"));
- tabs->add_child(visual_profiler);
- visual_profiler->connect("enable_profiling", this, "_visual_profiler_activate");
- visual_profiler->connect("break_request", this, "_profiler_seeked");
- }
-
- { //network profiler
- network_profiler = memnew(EditorNetworkProfiler);
- network_profiler->set_name(TTR("Network Profiler"));
- tabs->add_child(network_profiler);
- network_profiler->connect("enable_profiling", this, "_network_profiler_activate");
- network_profiler->connect("break_request", this, "_profiler_seeked");
- }
-
- { //monitors
-
- HSplitContainer *hsp = memnew(HSplitContainer);
-
- perf_monitors = memnew(Tree);
- perf_monitors->set_columns(2);
- perf_monitors->set_column_title(0, TTR("Monitor"));
- perf_monitors->set_column_title(1, TTR("Value"));
- perf_monitors->set_column_titles_visible(true);
- perf_monitors->connect("item_edited", this, "_performance_select");
- hsp->add_child(perf_monitors);
-
- perf_draw = memnew(Control);
- perf_draw->set_clip_contents(true);
- perf_draw->connect("draw", this, "_performance_draw");
- hsp->add_child(perf_draw);
-
- hsp->set_name(TTR("Monitors"));
- hsp->set_split_offset(340 * EDSCALE);
- tabs->add_child(hsp);
- perf_max.resize(Performance::MONITOR_MAX);
-
- Map<String, TreeItem *> bases;
- TreeItem *root = perf_monitors->create_item();
- perf_monitors->set_hide_root(true);
- for (int i = 0; i < Performance::MONITOR_MAX; i++) {
-
- String n = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
- Performance::MonitorType mtype = Performance::get_singleton()->get_monitor_type(Performance::Monitor(i));
- String base = n.get_slice("/", 0);
- String name = n.get_slice("/", 1);
- if (!bases.has(base)) {
- TreeItem *b = perf_monitors->create_item(root);
- b->set_text(0, base.capitalize());
- b->set_editable(0, false);
- b->set_selectable(0, false);
- b->set_expand_right(0, true);
- bases[base] = b;
- }
-
- TreeItem *it = perf_monitors->create_item(bases[base]);
- it->set_metadata(1, mtype);
- it->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- it->set_editable(0, true);
- it->set_selectable(0, false);
- it->set_selectable(1, false);
- it->set_text(0, name.capitalize());
- perf_items.push_back(it);
- perf_max.write[i] = 0;
- }
-
- info_message = memnew(Label);
- info_message->set_text(TTR("Pick one or more items from the list to display the graph."));
- info_message->set_valign(Label::VALIGN_CENTER);
- info_message->set_align(Label::ALIGN_CENTER);
- info_message->set_autowrap(true);
- info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- info_message->set_anchors_and_margins_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
- perf_draw->add_child(info_message);
- }
-
- { //vmem inspect
- VBoxContainer *vmem_vb = memnew(VBoxContainer);
- HBoxContainer *vmem_hb = memnew(HBoxContainer);
- Label *vmlb = memnew(Label(TTR("List of Video Memory Usage by Resource:") + " "));
- vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
- vmem_hb->add_child(vmlb);
- vmem_hb->add_child(memnew(Label(TTR("Total:") + " ")));
- vmem_total = memnew(LineEdit);
- vmem_total->set_editable(false);
- vmem_total->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
- vmem_hb->add_child(vmem_total);
- vmem_refresh = memnew(ToolButton);
- vmem_refresh->set_disabled(true);
- vmem_hb->add_child(vmem_refresh);
- vmem_vb->add_child(vmem_hb);
- vmem_refresh->connect("pressed", this, "_video_mem_request");
-
- VBoxContainer *vmmc = memnew(VBoxContainer);
- vmem_tree = memnew(Tree);
- vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL);
- vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL);
- vmmc->add_child(vmem_tree);
- vmmc->set_v_size_flags(SIZE_EXPAND_FILL);
- vmem_vb->add_child(vmmc);
-
- vmem_vb->set_name(TTR("Video RAM"));
- vmem_tree->set_columns(4);
- vmem_tree->set_column_titles_visible(true);
- vmem_tree->set_column_title(0, TTR("Resource Path"));
- vmem_tree->set_column_expand(0, true);
- vmem_tree->set_column_expand(1, false);
- vmem_tree->set_column_title(1, TTR("Type"));
- vmem_tree->set_column_min_width(1, 100 * EDSCALE);
- vmem_tree->set_column_expand(2, false);
- vmem_tree->set_column_title(2, TTR("Format"));
- vmem_tree->set_column_min_width(2, 150 * EDSCALE);
- vmem_tree->set_column_expand(3, false);
- vmem_tree->set_column_title(3, TTR("Usage"));
- vmem_tree->set_column_min_width(3, 80 * EDSCALE);
- vmem_tree->set_hide_root(true);
-
- tabs->add_child(vmem_vb);
- }
-
- { // misc
- VBoxContainer *misc = memnew(VBoxContainer);
- misc->set_name(TTR("Misc"));
- tabs->add_child(misc);
-
- GridContainer *info_left = memnew(GridContainer);
- info_left->set_columns(2);
- misc->add_child(info_left);
- clicked_ctrl = memnew(LineEdit);
- clicked_ctrl->set_h_size_flags(SIZE_EXPAND_FILL);
- info_left->add_child(memnew(Label(TTR("Clicked Control:"))));
- info_left->add_child(clicked_ctrl);
- clicked_ctrl_type = memnew(LineEdit);
- info_left->add_child(memnew(Label(TTR("Clicked Control Type:"))));
- info_left->add_child(clicked_ctrl_type);
-
- live_edit_root = memnew(LineEdit);
- live_edit_root->set_h_size_flags(SIZE_EXPAND_FILL);
-
- {
- HBoxContainer *lehb = memnew(HBoxContainer);
- Label *l = memnew(Label(TTR("Live Edit Root:")));
- info_left->add_child(l);
- lehb->add_child(live_edit_root);
- le_set = memnew(Button(TTR("Set From Tree")));
- lehb->add_child(le_set);
- le_clear = memnew(Button(TTR("Clear")));
- lehb->add_child(le_clear);
- info_left->add_child(lehb);
- le_set->set_disabled(true);
- le_clear->set_disabled(true);
- }
-
- misc->add_child(memnew(VSeparator));
-
- HBoxContainer *buttons = memnew(HBoxContainer);
-
- export_csv = memnew(Button(TTR("Export measures as CSV")));
- export_csv->connect("pressed", this, "_export_csv");
- buttons->add_child(export_csv);
-
- misc->add_child(buttons);
- }
-
- msgdialog = memnew(AcceptDialog);
- add_child(msgdialog);
-
- p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds, this);
- p_editor->get_undo_redo()->set_property_notify_callback(_property_changeds, this);
- live_debug = true;
- camera_override = OVERRIDE_NONE;
- last_path_id = false;
- error_count = 0;
- warning_count = 0;
- hide_on_stop = true;
- enable_external_editor = false;
- last_error_count = 0;
- last_warning_count = 0;
-
- EditorNode::get_singleton()->get_pause_button()->connect("pressed", this, "_paused");
-}
-
-ScriptEditorDebugger::~ScriptEditorDebugger() {
-
- memdelete(variables);
-
- ppeer->set_stream_peer(Ref<StreamPeer>());
-
- server->stop();
- _clear_remote_objects();
-}
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 44962323e5..cf93fab9a8 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -32,13 +32,13 @@
#include "core/os/keyboard.h"
#include "core/project_settings.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor_file_system.h"
#include "editor_log.h"
#include "editor_node.h"
#include "editor_scale.h"
#include "editor_settings.h"
#include "scene/gui/margin_container.h"
-#include "script_editor_debugger.h"
void EditorSettingsDialog::ok_pressed() {
@@ -119,9 +119,8 @@ void EditorSettingsDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- undo_redo->set_method_notify_callback(sed->_method_changeds, sed);
- undo_redo->set_property_notify_callback(sed->_property_changeds, sed);
+ undo_redo->set_method_notify_callback(EditorDebuggerNode::_method_changeds, NULL);
+ undo_redo->set_property_notify_callback(EditorDebuggerNode::_property_changeds, NULL);
undo_redo->set_commit_notify_callback(_undo_redo_callback, this);
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -164,7 +163,7 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
handled = true;
}
- if (k->get_scancode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) {
+ if (k->get_keycode_with_modifiers() == (KEY_MASK_CMD | KEY_F)) {
_focus_current_search_box();
handled = true;
}
@@ -318,10 +317,10 @@ void EditorSettingsDialog::_wait_for_key(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() != 0) {
last_wait_for_key = k;
- const String str = keycode_get_string(k->get_scancode_with_modifiers());
+ const String str = keycode_get_string(k->get_keycode_with_modifiers());
press_a_key_label->set_text(str);
press_a_key->accept_event();
@@ -335,7 +334,7 @@ void EditorSettingsDialog::_press_a_key_confirm() {
Ref<InputEventKey> ie;
ie.instance();
- ie->set_scancode(last_wait_for_key->get_scancode());
+ ie->set_keycode(last_wait_for_key->get_keycode());
ie->set_shift(last_wait_for_key->get_shift());
ie->set_control(last_wait_for_key->get_control());
ie->set_alt(last_wait_for_key->get_alt());
@@ -389,19 +388,7 @@ void EditorSettingsDialog::_editor_restart_close() {
void EditorSettingsDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorSettingsDialog::_unhandled_input);
- ClassDB::bind_method(D_METHOD("_settings_save"), &EditorSettingsDialog::_settings_save);
- ClassDB::bind_method(D_METHOD("_settings_changed"), &EditorSettingsDialog::_settings_changed);
- ClassDB::bind_method(D_METHOD("_settings_property_edited"), &EditorSettingsDialog::_settings_property_edited);
- ClassDB::bind_method(D_METHOD("_shortcut_button_pressed"), &EditorSettingsDialog::_shortcut_button_pressed);
- ClassDB::bind_method(D_METHOD("_filter_shortcuts"), &EditorSettingsDialog::_filter_shortcuts);
ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts);
- ClassDB::bind_method(D_METHOD("_press_a_key_confirm"), &EditorSettingsDialog::_press_a_key_confirm);
- ClassDB::bind_method(D_METHOD("_wait_for_key"), &EditorSettingsDialog::_wait_for_key);
- ClassDB::bind_method(D_METHOD("_tabs_tab_changed"), &EditorSettingsDialog::_tabs_tab_changed);
-
- ClassDB::bind_method(D_METHOD("_editor_restart_request"), &EditorSettingsDialog::_editor_restart_request);
- ClassDB::bind_method(D_METHOD("_editor_restart"), &EditorSettingsDialog::_editor_restart);
- ClassDB::bind_method(D_METHOD("_editor_restart_close"), &EditorSettingsDialog::_editor_restart_close);
}
EditorSettingsDialog::EditorSettingsDialog() {
@@ -412,7 +399,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
tabs = memnew(TabContainer);
tabs->set_tab_align(TabContainer::ALIGN_LEFT);
- tabs->connect("tab_changed", this, "_tabs_tab_changed");
+ tabs->connect("tab_changed", callable_mp(this, &EditorSettingsDialog::_tabs_tab_changed));
add_child(tabs);
// General Tab
@@ -435,8 +422,8 @@ EditorSettingsDialog::EditorSettingsDialog() {
inspector->set_v_size_flags(Control::SIZE_EXPAND_FILL);
inspector->get_inspector()->set_undo_redo(undo_redo);
tab_general->add_child(inspector);
- inspector->get_inspector()->connect("property_edited", this, "_settings_property_edited");
- inspector->get_inspector()->connect("restart_requested", this, "_editor_restart_request");
+ inspector->get_inspector()->connect("property_edited", callable_mp(this, &EditorSettingsDialog::_settings_property_edited));
+ inspector->get_inspector()->connect("restart_requested", callable_mp(this, &EditorSettingsDialog::_editor_restart_request));
restart_container = memnew(PanelContainer);
tab_general->add_child(restart_container);
@@ -450,11 +437,11 @@ EditorSettingsDialog::EditorSettingsDialog() {
restart_hb->add_child(restart_label);
restart_hb->add_spacer();
Button *restart_button = memnew(Button);
- restart_button->connect("pressed", this, "_editor_restart");
+ restart_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart));
restart_hb->add_child(restart_button);
restart_button->set_text(TTR("Save & Restart"));
restart_close_button = memnew(ToolButton);
- restart_close_button->connect("pressed", this, "_editor_restart_close");
+ restart_close_button->connect("pressed", callable_mp(this, &EditorSettingsDialog::_editor_restart_close));
restart_hb->add_child(restart_close_button);
restart_container->hide();
@@ -471,7 +458,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcut_search_box = memnew(LineEdit);
shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hbc->add_child(shortcut_search_box);
- shortcut_search_box->connect("text_changed", this, "_filter_shortcuts");
+ shortcut_search_box->connect("text_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts));
shortcuts = memnew(Tree);
tab_shortcuts->add_child(shortcuts, true);
@@ -481,7 +468,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcuts->set_column_titles_visible(true);
shortcuts->set_column_title(0, TTR("Name"));
shortcuts->set_column_title(1, TTR("Binding"));
- shortcuts->connect("button_pressed", this, "_shortcut_button_pressed");
+ shortcuts->connect("button_pressed", callable_mp(this, &EditorSettingsDialog::_shortcut_button_pressed));
press_a_key = memnew(ConfirmationDialog);
press_a_key->set_focus_mode(FOCUS_ALL);
@@ -495,17 +482,17 @@ EditorSettingsDialog::EditorSettingsDialog() {
l->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_BEGIN, 30);
press_a_key_label = l;
press_a_key->add_child(l);
- press_a_key->connect("gui_input", this, "_wait_for_key");
- press_a_key->connect("confirmed", this, "_press_a_key_confirm");
+ press_a_key->connect("gui_input", callable_mp(this, &EditorSettingsDialog::_wait_for_key));
+ press_a_key->connect("confirmed", callable_mp(this, &EditorSettingsDialog::_press_a_key_confirm));
set_hide_on_ok(true);
timer = memnew(Timer);
timer->set_wait_time(1.5);
- timer->connect("timeout", this, "_settings_save");
+ timer->connect("timeout", callable_mp(this, &EditorSettingsDialog::_settings_save));
timer->set_one_shot(true);
add_child(timer);
- EditorSettings::get_singleton()->connect("settings_changed", this, "_settings_changed");
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &EditorSettingsDialog::_settings_changed));
get_ok()->set_text(TTR("Close"));
updating = false;
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 1163621815..d6e443ec14 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -41,7 +41,7 @@
#include "scene/3d/light.h"
#include "scene/3d/listener.h"
#include "scene/3d/mesh_instance.h"
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include "scene/3d/particles.h"
#include "scene/3d/physics_joint.h"
#include "scene/3d/position_3d.h"
@@ -58,11 +58,11 @@
#include "scene/resources/convex_polygon_shape.h"
#include "scene/resources/cylinder_shape.h"
#include "scene/resources/height_map_shape.h"
-#include "scene/resources/plane_shape.h"
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/sphere_shape.h"
#include "scene/resources/surface_tool.h"
+#include "scene/resources/world_margin_shape.h"
#define HANDLE_HALF_SIZE 9.5
@@ -214,10 +214,10 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat
a[Mesh::ARRAY_VERTEX] = p_lines;
- PoolVector<Color> color;
+ Vector<Color> color;
color.resize(p_lines.size());
{
- PoolVector<Color>::Write w = color.write();
+ Color *w = color.ptrw();
for (int i = 0; i < p_lines.size(); i++) {
if (is_selected())
w[i] = Color(1, 1, 1, 0.8) * p_modulate;
@@ -348,10 +348,10 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref
Array a;
a.resize(VS::ARRAY_MAX);
a[VS::ARRAY_VERTEX] = p_handles;
- PoolVector<Color> colors;
+ Vector<Color> colors;
{
colors.resize(p_handles.size());
- PoolVector<Color>::Write w = colors.write();
+ Color *w = colors.ptrw();
for (int i = 0; i < p_handles.size(); i++) {
Color col(1, 1, 1, 1);
@@ -410,8 +410,8 @@ void EditorSpatialGizmo::add_solid_box(Ref<Material> &p_material, Vector3 p_size
cubem.set_size(p_size);
Array arrays = cubem.surface_get_arrays(0);
- PoolVector3Array vertex = arrays[VS::ARRAY_VERTEX];
- PoolVector3Array::Write w = vertex.write();
+ PackedVector3Array vertex = arrays[VS::ARRAY_VERTEX];
+ Vector3 *w = vertex.ptrw();
for (int i = 0; i < vertex.size(); ++i) {
w[i] += p_position;
@@ -1238,7 +1238,6 @@ CameraSpatialGizmoPlugin::CameraSpatialGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
create_material("camera_material", gizmo_color);
- create_icon_material("camera_icon", SpatialEditor::get_singleton()->get_icon("GizmoCamera", "EditorIcons"));
create_handle_material("handles");
}
@@ -1350,7 +1349,6 @@ void CameraSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Vector<Vector3> handles;
Ref<Material> material = get_material("camera_material", p_gizmo);
- Ref<Material> icon = get_material("camera_icon", p_gizmo);
#define ADD_TRIANGLE(m_a, m_b, m_c) \
{ \
@@ -1445,7 +1443,6 @@ void CameraSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
#undef ADD_QUAD
p_gizmo->add_lines(lines, material);
- p_gizmo->add_unscaled_billboard(icon, 0.05);
p_gizmo->add_handles(handles, get_material("handles"));
ClippedCamera *clipcam = Object::cast_to<ClippedCamera>(camera);
@@ -1566,7 +1563,7 @@ Position3DSpatialGizmoPlugin::Position3DSpatialGizmoPlugin() {
pos3d_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
cursor_points = Vector<Vector3>();
- PoolVector<Color> cursor_colors;
+ Vector<Color> cursor_colors;
float cs = 0.25;
cursor_points.push_back(Vector3(+cs, 0, 0));
cursor_points.push_back(Vector3(-cs, 0, 0));
@@ -2727,10 +2724,11 @@ GIProbeGizmoPlugin::GIProbeGizmoPlugin() {
create_material("gi_probe_material", gizmo_color);
- gizmo_color.a = 0.5;
+ // This gizmo draws a lot of lines. Use a low opacity to make it not too intrusive.
+ gizmo_color.a = 0.1;
create_material("gi_probe_internal_material", gizmo_color);
- gizmo_color.a = 0.1;
+ gizmo_color.a = 0.05;
create_material("gi_probe_solid_material", gizmo_color);
create_icon_material("gi_probe_icon", SpatialEditor::get_singleton()->get_icon("GizmoGIProbe", "EditorIcons"));
@@ -3450,7 +3448,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Vector<Vector3> points;
- Vector3 d(0, 0, height * 0.5);
+ Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
float ra = Math::deg2rad((float)i);
@@ -3458,24 +3456,24 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(b.x, b.y, 0) + d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(b.x, 0, b.y) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
- points.push_back(Vector3(b.x, b.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
+ points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 180 ? d : -d;
- points.push_back(Vector3(0, a.y, a.x) + dud);
- points.push_back(Vector3(0, b.y, b.x) + dud);
- points.push_back(Vector3(a.y, 0, a.x) + dud);
- points.push_back(Vector3(b.y, 0, b.x) + dud);
+ points.push_back(Vector3(0, a.x, a.y) + dud);
+ points.push_back(Vector3(0, b.x, b.y) + dud);
+ points.push_back(Vector3(a.y, a.x, 0) + dud);
+ points.push_back(Vector3(b.y, b.x, 0) + dud);
}
p_gizmo->add_lines(points, material);
@@ -3489,31 +3487,31 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- collision_segments.push_back(Vector3(a.x, a.y, 0) + d);
- collision_segments.push_back(Vector3(b.x, b.y, 0) + d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
+ collision_segments.push_back(Vector3(b.x, 0, b.y) + d);
- collision_segments.push_back(Vector3(a.x, a.y, 0) - d);
- collision_segments.push_back(Vector3(b.x, b.y, 0) - d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
+ collision_segments.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 16 == 0) {
- collision_segments.push_back(Vector3(a.x, a.y, 0) + d);
- collision_segments.push_back(Vector3(a.x, a.y, 0) - d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 32 ? d : -d;
- collision_segments.push_back(Vector3(0, a.y, a.x) + dud);
- collision_segments.push_back(Vector3(0, b.y, b.x) + dud);
- collision_segments.push_back(Vector3(a.y, 0, a.x) + dud);
- collision_segments.push_back(Vector3(b.y, 0, b.x) + dud);
+ collision_segments.push_back(Vector3(0, a.x, a.y) + dud);
+ collision_segments.push_back(Vector3(0, b.x, b.y) + dud);
+ collision_segments.push_back(Vector3(a.y, a.x, 0) + dud);
+ collision_segments.push_back(Vector3(b.y, b.x, 0) + dud);
}
p_gizmo->add_collision_segments(collision_segments);
Vector<Vector3> handles;
handles.push_back(Vector3(cs2->get_radius(), 0, 0));
- handles.push_back(Vector3(0, 0, cs2->get_height() * 0.5 + cs2->get_radius()));
+ handles.push_back(Vector3(0, cs2->get_height() * 0.5 + cs2->get_radius(), 0));
p_gizmo->add_handles(handles, handles_material);
}
@@ -3578,9 +3576,9 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
p_gizmo->add_handles(handles, handles_material);
}
- if (Object::cast_to<PlaneShape>(*s)) {
+ if (Object::cast_to<WorldMarginShape>(*s)) {
- Ref<PlaneShape> ps = s;
+ Ref<WorldMarginShape> ps = s;
Plane p = ps->get_plane();
Vector<Vector3> points;
@@ -3611,7 +3609,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
if (Object::cast_to<ConvexPolygonShape>(*s)) {
- PoolVector<Vector3> points = Object::cast_to<ConvexPolygonShape>(*s)->get_points();
+ Vector<Vector3> points = Object::cast_to<ConvexPolygonShape>(*s)->get_points();
if (points.size() > 3) {
@@ -3723,11 +3721,11 @@ NavigationMeshSpatialGizmoPlugin::NavigationMeshSpatialGizmoPlugin() {
}
bool NavigationMeshSpatialGizmoPlugin::has_gizmo(Spatial *p_spatial) {
- return Object::cast_to<NavigationMeshInstance>(p_spatial) != NULL;
+ return Object::cast_to<NavigationRegion>(p_spatial) != NULL;
}
String NavigationMeshSpatialGizmoPlugin::get_name() const {
- return "NavigationMeshInstance";
+ return "NavigationRegion";
}
int NavigationMeshSpatialGizmoPlugin::get_priority() const {
@@ -3736,7 +3734,7 @@ int NavigationMeshSpatialGizmoPlugin::get_priority() const {
void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
- NavigationMeshInstance *navmesh = Object::cast_to<NavigationMeshInstance>(p_gizmo->get_spatial_node());
+ NavigationRegion *navmesh = Object::cast_to<NavigationRegion>(p_gizmo->get_spatial_node());
Ref<Material> edge_material = get_material("navigation_edge_material", p_gizmo);
Ref<Material> edge_material_disabled = get_material("navigation_edge_material_disabled", p_gizmo);
@@ -3748,8 +3746,8 @@ void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
if (navmeshie.is_null())
return;
- PoolVector<Vector3> vertices = navmeshie->get_vertices();
- PoolVector<Vector3>::Read vr = vertices.read();
+ Vector<Vector3> vertices = navmeshie->get_vertices();
+ const Vector3 *vr = vertices.ptr();
List<Face3> faces;
for (int i = 0; i < navmeshie->get_polygon_count(); i++) {
Vector<int> p = navmeshie->get_polygon(i);
@@ -3768,11 +3766,11 @@ void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
return;
Map<_EdgeKey, bool> edge_map;
- PoolVector<Vector3> tmeshfaces;
+ Vector<Vector3> tmeshfaces;
tmeshfaces.resize(faces.size() * 3);
{
- PoolVector<Vector3>::Write tw = tmeshfaces.write();
+ Vector3 *tw = tmeshfaces.ptrw();
int tidx = 0;
for (List<Face3>::Element *E = faces.front(); E; E = E->next()) {
diff --git a/editor/translations/af.po b/editor/translations/af.po
index a08a21a49a..23afeb2e55 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -1551,6 +1551,10 @@ msgstr "Naam"
msgid "Singleton"
msgstr "EnkelHouer"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Toneel word Opgedateer"
@@ -1850,7 +1854,7 @@ msgstr "Open 'n Lêer"
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Verfris"
@@ -4010,15 +4014,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Vind"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -4071,10 +4076,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Hulpbron"
@@ -6041,7 +6042,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Skep Intekening"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12343,6 +12344,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 292dadc047..2cd523ec69 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -1515,6 +1515,10 @@ msgstr "الأسم"
msgid "Singleton"
msgstr "الÙردية"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "لصق المÙعامل"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "ÙŠÙحدث المشهد"
@@ -1824,7 +1828,7 @@ msgstr "أظهر ÙÙŠ مدير الملÙات"
msgid "New Folder..."
msgstr "مجلد جديد..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "تحديث"
@@ -4070,6 +4074,11 @@ msgid "Saving..."
msgstr "جاري الحÙظ..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " ملÙات"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "حدد كإÙتراضي من أجل '%s'"
@@ -4078,10 +4087,6 @@ msgid "Clear Default for '%s'"
msgstr "إخلاء الإÙتراضي لـ '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " ملÙات"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "إستيراد كـ:"
@@ -4131,10 +4136,6 @@ msgid "Copy Params"
msgstr "إنسخ المÙعامل"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "لصق المÙعامل"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "خطأ: لا مصدر حركة علي الحاÙظة!"
@@ -6173,7 +6174,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "إنشاء متصادم محدب قريب"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12605,6 +12606,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 977652e70e..651776b6ab 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-14 03:19+0000\n"
+"PO-Revision-Date: 2020-02-28 13:33+0000\n"
"Last-Translator: Любомир ВаÑилев <lyubomirv@abv.bg>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
@@ -21,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -70,31 +70,31 @@ msgstr ""
#: core/ustring.cpp
msgid "B"
-msgstr ""
+msgstr "Б"
#: core/ustring.cpp
msgid "KiB"
-msgstr ""
+msgstr "КиБ"
#: core/ustring.cpp
msgid "MiB"
-msgstr ""
+msgstr "МиБ"
#: core/ustring.cpp
msgid "GiB"
-msgstr ""
+msgstr "ГиБ"
#: core/ustring.cpp
msgid "TiB"
-msgstr ""
+msgstr "ТиБ"
#: core/ustring.cpp
msgid "PiB"
-msgstr ""
+msgstr "ПиБ"
#: core/ustring.cpp
msgid "EiB"
-msgstr ""
+msgstr "ЕиБ"
#: editor/animation_bezier_editor.cpp
msgid "Free"
@@ -110,7 +110,7 @@ msgstr "Огледално"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
-msgstr ""
+msgstr "Време:"
#: editor/animation_bezier_editor.cpp
msgid "Value:"
@@ -130,7 +130,7 @@ msgstr ""
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr ""
+msgstr "ДобавÑне на точка на Безие"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
@@ -1462,6 +1462,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "ОбновÑване на Ñцената"
@@ -1738,7 +1742,7 @@ msgstr "Показване във Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð¼ÐµÐ½Ð¸Ð´Ð¶ÑŠÑ€"
msgid "New Folder..."
msgstr "Ðова папка..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3816,6 +3820,10 @@ msgid "Saving..."
msgstr "Запазване..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Файлове"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Задаване по подразбиране за „%s“"
@@ -3824,10 +3832,6 @@ msgid "Clear Default for '%s'"
msgstr "ИзчиÑтване на подразбирането за „%s“"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Файлове"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "ВнаÑÑне като:"
@@ -3874,10 +3878,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5277,23 +5277,20 @@ msgid "Pan Mode"
msgstr "Панорамен режим"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Ruler Mode"
-msgstr "Режим на Селектиране"
+msgstr "Режим на линиÑта"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle smart snapping."
-msgstr "Добави Breakpoint"
+msgstr "Превключване на умното прилепване."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Smart Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle grid snapping."
-msgstr "Добави Breakpoint"
+msgstr "Превключване на прилепването към решетката."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Grid Snap"
@@ -5337,23 +5334,20 @@ msgid "Snap to Node Anchor"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Sides"
-msgstr "Избиране на вÑичко"
+msgstr "Прилепване към Ñтраните на възела"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Node Center"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Other Nodes"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "Прилепване към другите възли"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Guides"
-msgstr "Избиране на вÑичко"
+msgstr "Прилепване към водачите"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5376,9 +5370,8 @@ msgid "Restores the object's children's ability to be selected."
msgstr "ВъзÑтановÑва на ÑпоÑобноÑтта да Ñе избират децата на обекта."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Skeleton Options"
-msgstr "Само СелекциÑта"
+msgstr "Опции на Ñкелета"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Bones"
@@ -5389,9 +5382,8 @@ msgid "Make Custom Bone(s) from Node(s)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Custom Bones"
-msgstr "Възпроизвеждане на Ñцена по избор"
+msgstr "ИзчиÑтване на перÑонализираните коÑти"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5530,9 +5522,8 @@ msgid ""
msgstr ""
#: editor/plugins/collision_polygon_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon3D"
-msgstr "Създаване на папка"
+msgstr "Създаване на Polygon3D"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly"
@@ -5555,9 +5546,8 @@ msgstr ""
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Restart"
-msgstr "Ðвтоматично РеÑтартиране:"
+msgstr "РеÑтартиране"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5653,14 +5643,12 @@ msgid "Load Curve Preset"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Add Point"
-msgstr "Добави Възел..."
+msgstr "ДобавÑне на точка"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point"
-msgstr "LMB: ПремеÑти Точка."
+msgstr "Премахване на точката"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
@@ -5755,9 +5743,8 @@ msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "ÐеуÑпешно Ñъздаване на папка."
+msgstr "Ðе могат да бъдат Ñъздадени никакви форми за колизии."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -5831,7 +5818,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Създаване на папка"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -5892,11 +5879,12 @@ msgid "Remove item %d?"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid ""
"Update from existing scene?:\n"
"%s"
-msgstr "ОбновÑване от Cцена"
+msgstr ""
+"ОбновÑване от ÑъщеÑтвуващата Ñцена?:\n"
+"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
#, fuzzy
@@ -6053,9 +6041,8 @@ msgid "\"%s\" doesn't inherit from Spatial."
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "\"%s\" doesn't contain geometry."
-msgstr "Възелът не Ñъдържа геометриÑ."
+msgstr "„%s“ не Ñъдържа геометриÑ."
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
@@ -6231,9 +6218,8 @@ msgid "Split Segment (in curve)"
msgstr ""
#: editor/plugins/physical_bone_plugin.cpp
-#, fuzzy
msgid "Move Joint"
-msgstr "LMB: ПремеÑти Точка."
+msgstr "ПремеÑтване на Ñтавата"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
@@ -6265,28 +6251,24 @@ msgid "Create Polygon & UV"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Internal Vertex"
-msgstr "Създай нова хоризонтална помощна линиÑ"
+msgstr "Създаване на вътрешен вертекÑ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Internal Vertex"
-msgstr "Премахни вертикална помощна линиÑ"
+msgstr "Премахване на Ð²ÑŠÑ‚Ñ€ÐµÑˆÐ½Ð¸Ñ Ð²ÐµÑ€Ñ‚ÐµÐºÑ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Custom Polygon"
-msgstr "ПриÑтавки"
+msgstr "ДобавÑне на перÑонализиран полигон"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "ПремеÑтване на Полигон"
+msgstr "Премахване на перÑÐ¾Ð½Ð°Ð»Ð¸Ð·Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
@@ -6314,23 +6296,20 @@ msgid "UV"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Points"
-msgstr "LMB: ПремеÑти Точка."
+msgstr "Точки"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "Полигон->UV"
+msgstr "Полигони"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Bones"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Move Points"
-msgstr "LMB: ПремеÑти Точка."
+msgstr "ПремеÑтване на точките"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Ctrl: Rotate"
@@ -6391,9 +6370,8 @@ msgid "Clear UV"
msgstr "ИзчиÑтване на UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Grid Settings"
-msgstr "ÐаÑтройки"
+msgstr "ÐаÑтройки на решетката"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Snap"
@@ -6506,38 +6484,32 @@ msgid "Error writing TextFile:"
msgstr "Грешка при запиÑването:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Could not load file at:"
-msgstr "Грешка, не можа да Ñе зареди файла."
+msgstr "Файлът не може да бъде зареден:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
msgstr "Грешка при запиÑването на файла!"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error while saving theme."
-msgstr "Грешка при запиÑване."
+msgstr "Грешка при запазването на темата."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Saving"
msgstr "Грешка при запазване"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error importing theme."
-msgstr "Грешка при внаÑÑне на темата"
+msgstr "Грешка при внаÑÑнето на темата."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Importing"
-msgstr "Имаше грешка при внаÑÑнето"
+msgstr "Грешка при внаÑÑнето"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Text File..."
-msgstr "Ðов TextFile..."
+msgstr "Ðов текÑтов файл…"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open File"
@@ -6595,23 +6567,20 @@ msgid "Find Previous"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter scripts"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "Филтриране на Ñкриптовете"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter methods"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "Филтриране на методите"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort"
-msgstr "Подреждане:"
+msgstr "Сортиране"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
@@ -6638,14 +6607,12 @@ msgid "File"
msgstr "Файл"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open..."
-msgstr "Отвори"
+msgstr "ОтварÑне…"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Reopen Closed Script"
-msgstr "Ðова Ñцена"
+msgstr "Повторно отварÑне на Ð·Ð°Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð¸Ñ Ñкрипт"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
@@ -6674,9 +6641,8 @@ msgid "Theme"
msgstr "Тема"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Import Theme..."
-msgstr "ВнаÑÑне на тема"
+msgstr "ВнаÑÑне на тема…"
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
@@ -6724,9 +6690,8 @@ msgid "Debug with External Editor"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation."
-msgstr "Отвори документациÑта на Godot онлайн"
+msgstr "ОтварÑне на документациÑта на Godot в Интернет."
#: editor/plugins/script_editor_plugin.cpp
msgid "Request Docs"
@@ -6775,18 +6740,16 @@ msgid "Debugger"
msgstr "Дебъгер"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Search Results"
-msgstr "ТърÑене"
+msgstr "Резултати от Ñ‚ÑŠÑ€Ñенето"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
msgstr "ИзчиÑтване на поÑледните Ñкриптове"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Connections to method:"
-msgstr "Свързване..."
+msgstr "Връзки към метода:"
#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
msgid "Source"
@@ -6810,9 +6773,8 @@ msgid "(ignore)"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Function"
-msgstr "Отиди на Ред"
+msgstr "Към функциÑ"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
@@ -6862,9 +6824,8 @@ msgid "Bookmarks"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Breakpoints"
-msgstr "Създай точки."
+msgstr "Точки на прекъÑване"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
@@ -6913,9 +6874,8 @@ msgid "Complete Symbol"
msgstr "Знак за авт. довършване"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Evaluate Selection"
-msgstr "Центрирай върху СелекциÑта"
+msgstr "ИзчиÑлÑване на избраното"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
@@ -6934,42 +6894,36 @@ msgid "Auto Indent"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Find in Files..."
-msgstr "Ðамери във файлове"
+msgstr "ТърÑене във файловете…"
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Toggle Bookmark"
-msgstr "Добави Breakpoint"
+msgstr "Превключване на отметка"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Next Bookmark"
-msgstr "Отиди на ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Breakpoint"
+msgstr "Към Ñледващата отметка"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Previous Bookmark"
-msgstr "Отиди на ÐŸÑ€ÐµÐ´Ð¸ÑˆÐ½Ð¸Ñ Breakpoint"
+msgstr "Към предходната отметка"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Remove All Bookmarks"
-msgstr "Премахни Ð’Ñички Breakpoint-ове"
+msgstr "Премахване на вÑички отметки"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Line..."
-msgstr "Отиди на Ред"
+msgstr "Към ред…"
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -6981,23 +6935,20 @@ msgid "Remove All Breakpoints"
msgstr "Премахване на вÑички точки на прекъÑване"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Next Breakpoint"
-msgstr "Отиди на ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Breakpoint"
+msgstr "Към Ñледващата точка на прекъÑване"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Go to Previous Breakpoint"
-msgstr "Отиди на ÐŸÑ€ÐµÐ´Ð¸ÑˆÐ½Ð¸Ñ Breakpoint"
+msgstr "Към предходната точка на прекъÑване"
#: editor/plugins/shader_editor_plugin.cpp
-#, fuzzy
msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
-"Следните файлове Ñа по-нови на диÑка.\n"
-"Кое дейÑтвие Ñ‚Ñ€Ñбва да Ñе предприеме?:"
+"Този шеъдър е бил променен на диÑка.\n"
+"Какво да Ñе предприеме?"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
@@ -8496,42 +8447,36 @@ msgid "Change output port name"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Remove input port"
-msgstr "ЗатварÑне на вÑичко"
+msgstr "Премахване на Ð²Ñ…Ð¾Ð´Ð½Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Remove output port"
-msgstr "ВнаÑÑне на текÑтури"
+msgstr "Премахване на Ð¸Ð·Ñ…Ð¾Ð´Ð½Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Set expression"
-msgstr "Двуизмерна текÑтура"
+msgstr "Задаване на израз"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Resize VisualShader node"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "ПреоразмерÑване на възела VisualShader"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Set Input Default Port"
-msgstr "Задай по Подразбиране за '%s'"
+msgstr "Задаване на входен порт по подразбиране"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node to Visual Shader"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Duplicate Nodes"
-msgstr "Ðаправи дупликат на Key(s)"
+msgstr "Дублиране на възлите"
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -8539,9 +8484,8 @@ msgid "Paste Nodes"
msgstr "ПоÑтавÑне на възлите"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Delete Nodes"
-msgstr "Избиране на вÑичко"
+msgstr "Изтриване на възлите"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Input Type Changed"
@@ -8560,19 +8504,16 @@ msgid "Light"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Show resulted shader code."
-msgstr "Създай Възел"
+msgstr "Показване на Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ ÐºÐ¾Ð´ на шейдъра."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Create Shader Node"
-msgstr "Създай Възел"
+msgstr "Създаване на възел Ñ ÑˆÐµÐ¹Ð´ÑŠÑ€"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color function."
-msgstr "Отиди на Ред"
+msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð° цвÑÑ‚."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
@@ -8631,14 +8572,12 @@ msgid "SoftLight operator."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color constant."
-msgstr "ПоÑтоÑнно"
+msgstr "КонÑтанта за цвÑÑ‚."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color uniform."
-msgstr "ИзнаÑÑне към платформа"
+msgstr "Uniform за цвÑÑ‚."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the %s comparison between two parameters."
@@ -9260,9 +9199,8 @@ msgid "VisualShader"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property"
-msgstr "Промени Филтрите"
+msgstr "Редактиране на визуалното ÑвойÑтво"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
@@ -9307,9 +9245,8 @@ msgid "Release"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Exporting All"
-msgstr "ИзнаÑÑне за %s"
+msgstr "ИзнаÑÑне на вÑичко"
#: editor/project_export.cpp
msgid "The given export path doesn't exist:"
@@ -9334,9 +9271,8 @@ msgid ""
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Path"
-msgstr "ИзнаÑÑне на проекта"
+msgstr "Път за изнаÑÑне"
#: editor/project_export.cpp
msgid "Resources"
@@ -9383,9 +9319,8 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Pack File"
-msgstr "Файл:"
+msgstr "Пакетен файл"
#: editor/project_export.cpp
msgid "Features"
@@ -9400,14 +9335,12 @@ msgid "Feature List:"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Script"
-msgstr "Ðов Ñкрипт"
+msgstr "Скрипт"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script Export Mode:"
-msgstr "Режим на изнаÑÑне:"
+msgstr "Режим на изнаÑÑне на Ñкриптове:"
#: editor/project_export.cpp
msgid "Text"
@@ -9430,28 +9363,24 @@ msgid "Script Encryption Key (256-bits as hex):"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip"
-msgstr "ИзнаÑÑне"
+msgstr "ИзнаÑÑне на PCK/Zip"
#: editor/project_export.cpp
msgid "Export Project"
msgstr "ИзнаÑÑне на проекта"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export mode?"
-msgstr "Режим на изнаÑÑне:"
+msgstr "Режим на изнаÑÑне?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All"
-msgstr "ИзнаÑÑне"
+msgstr "ИзнаÑÑне на вÑичко"
#: editor/project_export.cpp editor/project_manager.cpp
-#, fuzzy
msgid "ZIP File"
-msgstr "Файл:"
+msgstr "Файл ZIP"
#: editor/project_export.cpp
msgid "Godot Game Pack"
@@ -9483,14 +9412,12 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose an empty folder."
-msgstr "МолÑ, изнеÑете извън папката на проекта!"
+msgstr "МолÑ, изберете празна папка."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "МолÑ, изнеÑете извън папката на проекта!"
+msgstr "МолÑ, изберете файл от тип „project.godot“ или „.zip“."
#: editor/project_manager.cpp
msgid "This directory already contains a Godot project."
@@ -9505,14 +9432,12 @@ msgid "Imported Project"
msgstr "ВнеÑен проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid Project Name."
-msgstr "Име:"
+msgstr "Ðеправилно име на проект."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create folder."
-msgstr "ÐеуÑпешно Ñъздаване на папка."
+msgstr "Папката не може да бъде Ñъздадена."
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
@@ -9541,36 +9466,32 @@ msgid "Couldn't create project.godot in project path."
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "Ðов проект"
+msgstr "Преименуване на проекта"
#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "ВнаÑÑне на ÑъщеÑтвуващ проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import & Edit"
-msgstr "ВнаÑÑне и отварÑне"
+msgstr "ВнаÑÑне и редактиране"
#: editor/project_manager.cpp
msgid "Create New Project"
msgstr "Създаване на нов проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create & Edit"
-msgstr "Създаване"
+msgstr "Създаване и редактиране"
#: editor/project_manager.cpp
msgid "Install Project:"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Install & Edit"
-msgstr "ИнÑталиране"
+msgstr "ИнÑталиране и редактиране"
#: editor/project_manager.cpp
msgid "Project Name:"
@@ -9581,9 +9502,8 @@ msgid "Project Path:"
msgstr "Път до проекта:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Project Installation Path:"
-msgstr "Път:"
+msgstr "Път на инÑÑ‚Ð°Ð»Ð°Ñ†Ð¸Ñ Ð½Ð° проекта:"
#: editor/project_manager.cpp
msgid "Renderer:"
@@ -9622,18 +9542,16 @@ msgid "Unnamed Project"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Missing Project"
-msgstr "ВнаÑÑне на ÑъщеÑтвуващ проект"
+msgstr "Проектът липÑва"
#: editor/project_manager.cpp
msgid "Error: Project is missing on the filesystem."
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project at '%s'."
-msgstr "Създаване на нов проект"
+msgstr "Ðе може да бъде отворен проектът в „%s“."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -9722,9 +9640,8 @@ msgid "Project Manager"
msgstr "Управление на проектите"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Projects"
-msgstr "Проект"
+msgstr "Проекти"
#: editor/project_manager.cpp
msgid "Last Modified"
@@ -9743,9 +9660,8 @@ msgid "New Project"
msgstr "Ðов проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Missing"
-msgstr "ЗатварÑне на вÑичко"
+msgstr "Премахване на липÑващите"
#: editor/project_manager.cpp
msgid "Templates"
@@ -9756,9 +9672,8 @@ msgid "Restart Now"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't run project"
-msgstr "Създаване на нов проект"
+msgstr "Проектът не може да бъде пуÑнат"
#: editor/project_manager.cpp
msgid ""
@@ -9789,9 +9704,8 @@ msgid ""
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "An action with the name '%s' already exists."
-msgstr "Вече ÑъщеÑтвува файл или папка Ñ Ñ‚Ð¾Ð²Ð° име."
+msgstr "Вече ÑъщеÑтвува дейÑтвие Ñ Ð¸Ð¼ÐµÑ‚Ð¾ „%s“."
#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
@@ -9806,9 +9720,8 @@ msgid "Add Input Action Event"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "All Devices"
-msgstr "УÑтройÑтво"
+msgstr "Ð’Ñички уÑтройÑтва"
#: editor/project_settings_editor.cpp
msgid "Device"
@@ -9843,24 +9756,20 @@ msgid "Wheel Down Button"
msgstr "Колелце надолу"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Wheel Left Button"
-msgstr "Колелце нагоре"
+msgstr "ЛÑв бутон на колелцето"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Wheel Right Button"
-msgstr "ДÑÑно копче"
+msgstr "ДеÑен бутон на колелцето"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "X Button 1"
-msgstr "Копче 6"
+msgstr "Бутон X 1"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "X Button 2"
-msgstr "Копче 6"
+msgstr "Бутон X 2"
#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
@@ -10017,9 +9926,8 @@ msgid "Action:"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Action"
-msgstr "ОпиÑание:"
+msgstr "ДейÑтвие"
#: editor/project_settings_editor.cpp
msgid "Deadzone"
@@ -10066,19 +9974,16 @@ msgid "Locales Filter"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show All Locales"
-msgstr "Събери вÑички Редове"
+msgstr "Показване на вÑички езици"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Show Selected Locales Only"
-msgstr "Само СелекциÑта"
+msgstr "Показване Ñамо на избраните езици"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Filter mode:"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "Режим на филтриране:"
#: editor/project_settings_editor.cpp
msgid "Locales:"
@@ -10121,18 +10026,16 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
-#, fuzzy
msgid "Select Node"
-msgstr "Избиране на вÑичко"
+msgstr "Избиране на възел"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
-#, fuzzy
msgid "Pick a Node"
-msgstr "ПоÑтавÑне"
+msgstr "Изберете възел"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
@@ -10143,9 +10046,8 @@ msgid "Select Property"
msgstr "Избиране на ÑвойÑтво"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Virtual Method"
-msgstr "Изберете метод"
+msgstr "Избиране на виртуален метод"
#: editor/property_selector.cpp
msgid "Select Method"
@@ -10164,9 +10066,8 @@ msgid "Suffix"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Двуизмерна текÑтура"
+msgstr "Използване на регулÑрни изрази"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10177,18 +10078,16 @@ msgid "Substitute"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Node name"
-msgstr "Възел"
+msgstr "Име на възела"
#: editor/rename_dialog.cpp
msgid "Node's parent name, if available"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Node type"
-msgstr "Възел"
+msgstr "Тип на възела"
#: editor/rename_dialog.cpp
msgid "Current scene name"
@@ -10217,9 +10116,8 @@ msgid "Initial value for the counter"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Step"
-msgstr "Стъпка (Ñек.):"
+msgstr "Стъпка"
#: editor/rename_dialog.cpp
msgid "Amount by which counter is incremented for each node"
@@ -10338,9 +10236,8 @@ msgid "Instance Child Scene"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Clear Script"
-msgstr "Ðова Ñцена"
+msgstr "Премахване на Ñкрипта"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on the tree root."
@@ -10371,14 +10268,12 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Make node as Root"
-msgstr "Запазване на Ñцената"
+msgstr "Превръщане на възела в корен"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete %d nodes?"
-msgstr "Избиране на вÑичко"
+msgstr "Изтриване на %d възела?"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
@@ -10389,9 +10284,8 @@ msgid "Delete node \"%s\" and its children?"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Delete node \"%s\"?"
-msgstr "Избиране на вÑичко"
+msgstr "Изтриване на възела „%s“?"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
@@ -10422,33 +10316,28 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "New Scene Root"
-msgstr "Запазване на Ñцената"
+msgstr "Ðов корен на Ñцената"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Create Root Node:"
-msgstr "Създаване на папка"
+msgstr "Създаване на коренен възел:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "2D Scene"
-msgstr "Сцена"
+msgstr "2-измерна Ñцена"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "3D Scene"
-msgstr "Сцена"
+msgstr "3-измерна Ñцена"
#: editor/scene_tree_dock.cpp
msgid "User Interface"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Other Node"
-msgstr "Избиране на вÑичко"
+msgstr "Друг възел"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
@@ -10459,9 +10348,8 @@ msgid "Can't operate on nodes the current scene inherits from!"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Attach Script"
-msgstr "Ðова Ñцена"
+msgstr "Закачане на Ñкрипт"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
@@ -10502,9 +10390,8 @@ msgid "Load As Placeholder"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Open Documentation"
-msgstr "Отвори документациÑта на Godot онлайн"
+msgstr "ОтварÑне на документациÑта"
#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
@@ -10843,18 +10730,16 @@ msgid "Child process connected."
msgstr "Разкачи"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Copy Error"
-msgstr "Грешки"
+msgstr "Копиране на грешката"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
msgstr ""
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Skip Breakpoints"
-msgstr "Създай точки."
+msgstr "ПропуÑкане на точките на прекъÑване"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -11046,9 +10931,8 @@ msgid "Select dependencies of the library for this entry"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Remove current entry"
-msgstr "ПремеÑтване на пътечката нагоре."
+msgstr "Премахване на Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
@@ -11059,14 +10943,12 @@ msgid "Platform:"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Platform"
-msgstr "ИзнаÑÑне към платформа"
+msgstr "Платформа"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Dynamic Library"
-msgstr "ИзнаÑÑне на библиотеката"
+msgstr "Динамична библиотека"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Add an architecture entry"
@@ -11086,9 +10968,8 @@ msgid "Disabled GDNative Singleton"
msgstr ""
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Library"
-msgstr "ИзнаÑÑне на библиотеката"
+msgstr "Библиотека"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Libraries: "
@@ -11099,9 +10980,8 @@ msgid "GDNative"
msgstr ""
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Step argument is zero!"
-msgstr "Стъпката на range() е нула!"
+msgstr "Ðргументът за Ñтъпката е нула!"
#: modules/gdscript/gdscript_functions.cpp
#, fuzzy
@@ -12244,6 +12124,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index d07fe4caef..77ff28a113 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -1583,6 +1583,10 @@ msgstr "নাম"
msgid "Singleton"
msgstr "à¦à¦•à¦•-বসà§à¦¤à§/সিঙà§à¦—েলটোন"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "দৃশà§à¦¯ হাল নাগাদ হচà§à¦›à§‡"
@@ -1899,7 +1903,7 @@ msgstr "ফাইল-মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦°à§‡ দেখà§à¦¨"
msgid "New Folder..."
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরি করà§à¦¨"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "রিফà§à¦°à§‡à¦¸ করà§à¦¨"
@@ -4259,6 +4263,11 @@ msgid "Saving..."
msgstr "সংরকà§à¦·à¦¿à¦¤ হচà§à¦›à§‡..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr "ফাইল"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "'%s' à¦à¦° জনà§à¦¯ ডিফলà§à¦Ÿ হিসাবে সেট করà§à¦¨"
@@ -4268,11 +4277,6 @@ msgstr "'%s' à¦à¦° জনà§à¦¯ ডিফলà§à¦Ÿ কà§à¦²à¦¿à§Ÿà¦¾à¦° কà¦
#: editor/import_dock.cpp
#, fuzzy
-msgid " Files"
-msgstr "ফাইল"
-
-#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ"
@@ -4323,10 +4327,6 @@ msgid "Copy Params"
msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "রিসোরà§à¦¸à§‡à¦° কà§à¦²à§€à¦ªà¦¬à§‹à¦°à§à¦¡ খালি!"
@@ -6414,7 +6414,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "কনভেকà§à¦¸ কলিশ়ন সহোদর তৈরি করà§à¦¨"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -13163,6 +13163,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 95643d82df..15d4265ef4 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -1497,6 +1497,10 @@ msgstr "Nom"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Enganxa els Paràmetres"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Actualitzant l'Escena"
@@ -1784,7 +1788,7 @@ msgstr "Mostrar en el Gestor de Fitxers"
msgid "New Folder..."
msgstr "Nou Directori..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Refresca"
@@ -3999,6 +4003,10 @@ msgid "Saving..."
msgstr "Desant..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Fitxers"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Establir com a valor Predeterminat per a '%s'"
@@ -4007,10 +4015,6 @@ msgid "Clear Default for '%s'"
msgstr "Neteja el valor Predeterminat de '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Fitxers"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importar com a:"
@@ -4060,10 +4064,6 @@ msgid "Copy Params"
msgstr "Copia els Paràmetres"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Enganxa els Paràmetres"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Edita el Porta-retalls de Recursos"
@@ -6062,7 +6062,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Crea col·lisions convexes entre nodes germans"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12763,6 +12763,11 @@ msgstr ""
"Les formes de tipus pla no funcionen bé i se suprimiran en futures versions. "
"Si us plau, no els utilitzeu."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Res és visible perquè no s'ha assignat cap malla."
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index 5dfe84f0f0..f3ae992410 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-14 03:19+0000\n"
+"PO-Revision-Date: 2020-03-01 05:50+0000\n"
"Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
@@ -31,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -702,9 +702,8 @@ msgid "Line Number:"
msgstr "Číslo řádku:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Nahradit..."
+msgstr "%d nahrazeno."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1501,6 +1500,10 @@ msgstr "Název"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Vložit parametry"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Aktualizuji scénu"
@@ -1788,7 +1791,7 @@ msgstr "Zobrazit ve správci souborů"
msgid "New Folder..."
msgstr "Nová složka..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Obnovit"
@@ -2297,7 +2300,6 @@ msgstr ""
"pochopili tento proces."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it won't be kept when saving the current scene."
@@ -2314,7 +2316,6 @@ msgstr ""
"panelu Import a znovu ho importujte."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This scene was imported, so changes to it won't be kept.\n"
"Instancing it or inheriting will allow making changes to it.\n"
@@ -2327,7 +2328,6 @@ msgstr ""
"pochopili tento proces."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This is a remote object, so changes to it won't be kept.\n"
"Please read the documentation relevant to debugging to better understand "
@@ -2733,17 +2733,16 @@ msgid "Project Settings..."
msgstr "Nastavení projektu..."
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Version Control"
-msgstr "Verze:"
+msgstr "Správa verzí"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Set Up Version Control"
-msgstr ""
+msgstr "Nastavit správu verzí"
#: editor/editor_node.cpp
msgid "Shut Down Version Control"
-msgstr ""
+msgstr "Vypnout správu verzí"
#: editor/editor_node.cpp
msgid "Export..."
@@ -2873,9 +2872,8 @@ msgid "Editor Layout"
msgstr "Rozložení editoru"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Take Screenshot"
-msgstr "Dává smysl!"
+msgstr "Vytvořit snímek obrazovky"
#: editor/editor_node.cpp
#, fuzzy
@@ -2932,7 +2930,7 @@ msgstr "Online dokumentace"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr "Q&A"
+msgstr "Otázky a odpovědi"
#: editor/editor_node.cpp
msgid "Issue Tracker"
@@ -2996,19 +2994,16 @@ msgid "Spins when the editor window redraws."
msgstr "ToÄí se, když se okno editoru pÅ™ekresluje."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Continuously"
-msgstr "Spojité"
+msgstr "Aktualizovat průběžně"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update When Changed"
-msgstr "Akualizovat změny"
+msgstr "Akualizovat při změně"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Hide Update Spinner"
-msgstr "Vypnout aktualizaÄní koleÄko"
+msgstr "Schovat aktualizaÄní koleÄko"
#: editor/editor_node.cpp
msgid "FileSystem"
@@ -3118,9 +3113,8 @@ msgid "Warning!"
msgstr "Varování!"
#: editor/editor_path.cpp
-#, fuzzy
msgid "No sub-resources found."
-msgstr "DílÄí zdroje"
+msgstr "Nebyly nalezeny žádné dílÄí zdroje."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3372,7 +3366,6 @@ msgid "Import From Node:"
msgstr "Import z uzlu:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Redownload"
msgstr "Stáhnout znovu"
@@ -3434,9 +3427,8 @@ msgid "Importing:"
msgstr "Importování:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error getting the list of mirrors."
-msgstr "Chyba při vytváření podpisového objektu."
+msgstr "Chyba při získávání seznamu zrcadel."
#: editor/export_template_manager.cpp
msgid "Error parsing JSON of mirror list. Please report this issue!"
@@ -3483,22 +3475,20 @@ msgid "Download Complete."
msgstr "Stahování dokonÄeno."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cannot remove temporary file:"
-msgstr "Nelze uložit motiv do souboru:"
+msgstr "Nelze odstranit doÄasný soubor:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid ""
"Templates installation failed.\n"
"The problematic templates archives can be found at '%s'."
msgstr ""
-"Instalace šablon selhala. Problémové archivy šablon lze nalézt na '%s'."
+"Instalace Å¡ablon selhala.\n"
+"Problémové archivy šablon lze nalézt na '%s'."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error requesting URL:"
-msgstr "Chyba požadavku o url: "
+msgstr "Chyba žádosti o URL:"
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -3568,14 +3558,12 @@ msgid "Remove Template"
msgstr "Odstranit Å¡ablonu"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select Template File"
msgstr "Vybrat soubor Å¡ablony"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Godot Export Templates"
-msgstr "Spravovat exportní šablony"
+msgstr "Exportní šablony Godotu"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
@@ -3624,9 +3612,8 @@ msgid "No name provided."
msgstr "Nebylo poskytnuto žádné jméno."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Provided name contains invalid characters."
-msgstr "Poskytnuté jméno obsahuje neplatné znaky"
+msgstr "Poskytnuté jméno obsahuje neplatné znaky."
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
@@ -3653,31 +3640,26 @@ msgid "Duplicating folder:"
msgstr "Duplikace složky:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Inherited Scene"
-msgstr "Nová odvozená scéna..."
+msgstr "Nová odvozená scéna"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Set As Main Scene"
-msgstr "Hlavní scéna"
+msgstr "Nastavit jako hlavní scénu"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open Scenes"
-msgstr "Otevřít scénu"
+msgstr "Otevřít scény"
#: editor/filesystem_dock.cpp
msgid "Instance"
msgstr "Instance"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Add to Favorites"
msgstr "Přidat do oblíbených"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Remove from Favorites"
msgstr "Odebrat z oblíbených"
@@ -3702,9 +3684,8 @@ msgid "Move To..."
msgstr "Přesunout do..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Scene..."
-msgstr "Nová scéna"
+msgstr "Nová scéna..."
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "New Script..."
@@ -3732,21 +3713,18 @@ msgid "Rename"
msgstr "Přejmenovat"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Previous Folder/File"
-msgstr "Předchozí složka"
+msgstr "Předchozí složka/soubor"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Next Folder/File"
-msgstr "Další složka"
+msgstr "Další složka/soubor"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
msgstr "Znovu skenovat souborový systém"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Toggle Split Mode"
msgstr "Přepnout režim rozdělení"
@@ -3775,9 +3753,8 @@ msgid "Overwrite"
msgstr "Přepsat"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Create Scene"
-msgstr "Vytvořit ze scény"
+msgstr "Vytvořit scénu"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
@@ -3855,14 +3832,12 @@ msgid "Invalid group name."
msgstr "Neplatný název skupiny."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Rename Group"
-msgstr "Spravovat skupiny"
+msgstr "Přejmenovat skupinu"
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Delete Group"
-msgstr "Odstranit rozložení"
+msgstr "Odstranit skupinu"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
@@ -3887,9 +3862,8 @@ msgid "Empty groups will be automatically removed."
msgstr ""
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Group Editor"
-msgstr "Otevřít editor skriptů"
+msgstr "Editor skupin"
#: editor/groups_editor.cpp
msgid "Manage Groups"
@@ -3973,6 +3947,10 @@ msgid "Saving..."
msgstr "Ukládání..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d souborů"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Nastavit jako výchozí pro '%s'"
@@ -3981,10 +3959,6 @@ msgid "Clear Default for '%s'"
msgstr "VyÄistit výchozí pro '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Soubory"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importovat jako:"
@@ -4033,10 +4007,6 @@ msgid "Copy Params"
msgstr "Kopírovat parametry"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Vložit parametry"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Schránka zdroje je prázdná!"
@@ -4098,9 +4068,8 @@ msgid "MultiNode Set"
msgstr ""
#: editor/node_dock.cpp
-#, fuzzy
msgid "Select a single node to edit its signals and groups."
-msgstr "Zvolit uzel pro editaci signálů a skupin."
+msgstr "Zvolte vybraný uzel pro editaci jeho signálů a skupin."
#: editor/plugin_config_dialog.cpp
msgid "Edit a Plugin"
@@ -4377,9 +4346,8 @@ msgid "Delete Node(s)"
msgstr "Odstranit uzel/uzly"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Filter On/Off"
-msgstr "Aktivovat/Deaktivovat tuto stopu."
+msgstr "Aktivovat/Deaktivovat filtr"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Change Filter"
@@ -4997,11 +4965,11 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (A-Z)"
-msgstr ""
+msgstr "Název (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (Z-A)"
-msgstr ""
+msgstr "Název (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "License (A-Z)"
@@ -5137,7 +5105,6 @@ msgid "Scale Step:"
msgstr "Zvětšení:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move Vertical Guide"
msgstr "Přesunout svislé vodítko"
@@ -5799,12 +5766,10 @@ msgid "Load Curve Preset"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Add Point"
msgstr "Přidat bod"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point"
msgstr "Odstranit bod"
@@ -5980,7 +5945,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "VytvoÅ™it navigaÄní polygon"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -6654,9 +6619,8 @@ msgid "Error writing TextFile:"
msgstr "Chyba při zápisu textového souboru:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Could not load file at:"
-msgstr "Chyba: nelze naÄíst soubor."
+msgstr "Nelze naÄíst soubor:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
@@ -6679,7 +6643,6 @@ msgid "Error Importing"
msgstr "Chyba importu"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "New Text File..."
msgstr "Nový textový soubor..."
@@ -6725,9 +6688,8 @@ msgid "Save Theme As..."
msgstr "Uložit motiv jako..."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "%s Class Reference"
-msgstr " Reference třídy"
+msgstr "Reference třídy %s"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -6740,18 +6702,16 @@ msgid "Find Previous"
msgstr "Najít předchozí"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter scripts"
-msgstr "Filtrovat vlastnosti"
+msgstr "Filtrovat skripty"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
msgstr "Přepnout abecední řazení seznamu metod."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Filter methods"
-msgstr "Režim filtru:"
+msgstr "Filtrovat metody"
#: editor/plugins/script_editor_plugin.cpp
msgid "Sort"
@@ -6786,9 +6746,8 @@ msgid "Open..."
msgstr "Otevřít..."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Reopen Closed Script"
-msgstr "Otevřít skript"
+msgstr "Znovu otevřít zavřený skript"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
@@ -6803,7 +6762,6 @@ msgid "Copy Script Path"
msgstr "Zkopírovat cestu ke skriptu"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "History Previous"
msgstr "Historie předchozí"
@@ -6841,9 +6799,8 @@ msgid "Run"
msgstr "Spustit"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Step Into"
-msgstr "Vstoupit"
+msgstr "Vstoupit do"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
@@ -6867,13 +6824,12 @@ msgid "Debug with External Editor"
msgstr "Debugovat v externím editoru"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation."
-msgstr "Otevřít Godot online dokumentaci"
+msgstr "Otevřít online dokumentaci Godotu."
#: editor/plugins/script_editor_plugin.cpp
msgid "Request Docs"
-msgstr ""
+msgstr "Požádat o dokumentaci"
#: editor/plugins/script_editor_plugin.cpp
msgid "Help improve the Godot documentation by giving feedback."
@@ -6922,9 +6878,8 @@ msgid "Search Results"
msgstr "Výsledky hledání"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Scripts"
-msgstr "Vymazat nedávné scény"
+msgstr "Vymazat nedávné skripty"
#: editor/plugins/script_text_editor.cpp
#, fuzzy
@@ -6932,9 +6887,8 @@ msgid "Connections to method:"
msgstr "Připojit k uzlu:"
#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Source"
-msgstr "Zdroj:"
+msgstr "Zdroj"
#: editor/plugins/script_text_editor.cpp
msgid "Target"
@@ -8481,9 +8435,8 @@ msgid "Make Concave"
msgstr "Přesunout polygon"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Collision Polygon"
-msgstr "VytvoÅ™it navigaÄní polygon"
+msgstr "Vytvořit kolizní polygon"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -8605,17 +8558,15 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(GLES3 only)"
-msgstr ""
+msgstr "(Pouze GLES3)"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add Output"
-msgstr "Přidat vstup"
+msgstr "Přidat výstup"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Scalar"
-msgstr "Zvětšení:"
+msgstr "Skalár"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector"
@@ -8623,7 +8574,7 @@ msgstr "Vektor"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean"
-msgstr ""
+msgstr "Boolean"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Sampler"
@@ -9120,9 +9071,8 @@ msgid "Returns the tangent of the parameter."
msgstr "Vrátí tangens parametru."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Returns the hyperbolic tangent of the parameter."
-msgstr "(Pouze GLES3) Vrátí hyperbolický tangens parametru."
+msgstr "Vrátí hyperbolický tangens parametru."
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
@@ -9921,9 +9871,8 @@ msgid "Project Manager"
msgstr "Správce projektů"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Projects"
-msgstr "Projekt"
+msgstr "Projekty"
#: editor/project_manager.cpp
msgid "Last Modified"
@@ -9942,9 +9891,8 @@ msgid "New Project"
msgstr "Nový projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Missing"
-msgstr "Odstranit bod"
+msgstr "Odstranit nenalezené"
#: editor/project_manager.cpp
msgid "Templates"
@@ -10447,14 +10395,12 @@ msgid "Keep"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase na under_scored"
+msgstr "PascalCase na snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored na CamelCase"
+msgstr "snake_case na PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10473,14 +10419,12 @@ msgid "Reset"
msgstr "Resetovat"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Regulární výrazy"
+msgstr "Chyba regulárního výrazu"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Platné znaky:"
+msgstr "Na znaku %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10650,9 +10594,8 @@ msgid "User Interface"
msgstr "Uživatelské rozhraní"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Other Node"
-msgstr "Smazat uzel"
+msgstr "Jiný uzel"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
@@ -11521,7 +11464,7 @@ msgstr ""
#: modules/recast/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "Hotovo!"
#: modules/visual_script/visual_script.cpp
#, fuzzy
@@ -11827,24 +11770,20 @@ msgid "Members:"
msgstr "Členové:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Base Type:"
-msgstr "Změnit základní typ"
+msgstr "Změnit základní typ:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Nodes..."
-msgstr "Přidat uzel..."
+msgstr "Přidat uzly..."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Function..."
-msgstr "Přidat funkci"
+msgstr "Přidat funkci..."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "function_name"
-msgstr "Funkce:"
+msgstr "název_funkce"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11868,19 +11807,16 @@ msgid "Cut Nodes"
msgstr "Vyjmout uzly"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Make Function"
-msgstr "Přejmenovat funkci"
+msgstr "Vytvořit funkci"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Refresh Graph"
-msgstr "Obnovit"
+msgstr "Obnovit graf"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Edit Member"
-msgstr "Členové"
+msgstr "Upravit Äleny"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
@@ -12436,6 +12372,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/da.po b/editor/translations/da.po
index bfd4d71cdc..3d2c4cb48b 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -1554,6 +1554,10 @@ msgstr "Navn"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Indsæt Parametre"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Opdatere Scene"
@@ -1858,7 +1862,7 @@ msgstr "Vis i Filhåndtering"
msgid "New Folder..."
msgstr "Opret mappe..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Opdater"
@@ -4103,6 +4107,10 @@ msgid "Saving..."
msgstr "Gemmer..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Filer"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Sæt som Standard for '%s'"
@@ -4111,10 +4119,6 @@ msgid "Clear Default for '%s'"
msgstr "Fjern Standard for '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Filer"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importer Som:"
@@ -4164,10 +4168,6 @@ msgid "Copy Params"
msgstr "Kopier Parametre"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Indsæt Parametre"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "FEJL: Ingen animationsressource i udklipsholder!"
@@ -6173,7 +6173,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Opret Poly"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12648,6 +12648,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/de.po b/editor/translations/de.po
index c0ac945e57..14d9926ecb 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -48,12 +48,13 @@
# David May <wasser@gmail.com>, 2019.
# Draco Drache <jan.holger.te@gmail.com>, 2019.
# Jonas <dotchucknorris@gmx.de>, 2019.
+# PagDev <pag.develop@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-28 07:51+0000\n"
-"Last-Translator: So Wieso <sowieso@dukun.de>\n"
+"PO-Revision-Date: 2020-03-08 22:32+0000\n"
+"Last-Translator: PagDev <pag.develop@gmail.com>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -61,7 +62,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -734,9 +735,8 @@ msgid "Line Number:"
msgstr "Zeilennummer:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Ersetzen..."
+msgstr "%d ersetzt."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1539,6 +1539,10 @@ msgstr "Name"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Parameter einfügen"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Aktualisiere Szene"
@@ -1826,7 +1830,7 @@ msgstr "Im Dateimanager anzeigen"
msgid "New Folder..."
msgstr "Neuer Ordner..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Aktualisieren"
@@ -2993,7 +2997,7 @@ msgstr "Problem-Melder"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
-msgstr "Internetgemeinschaft"
+msgstr "Community"
#: editor/editor_node.cpp
msgid "About"
@@ -4023,6 +4027,10 @@ msgid "Saving..."
msgstr "Speichere..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Dateien"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Als Standard für ‚%s‘ setzen"
@@ -4031,10 +4039,6 @@ msgid "Clear Default for '%s'"
msgstr "Standard für ‚%s‘ löschen"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Dateien"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importiere als:"
@@ -4085,10 +4089,6 @@ msgid "Copy Params"
msgstr "Parameter kopieren"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Parameter einfügen"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Ressourcen-Zwischenablage bearbeiten"
@@ -5914,9 +5914,8 @@ msgid "Mesh is empty!"
msgstr "Mesh ist leer!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Trimesh-Kollisionselement erzeugen"
+msgstr "Trimesh-Kollisions-Shape konnte nicht erstellt werden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5933,29 +5932,30 @@ msgstr "Trimesh-Statische-Form erzeugen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Aus der Szenenwurzel kann ein einzelnes konvexes Kollisionselement nicht "
+"erzeugt werden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Ein einzelnes konvexes Kollisionselement konnte nicht erzeugt werden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Konvexe Form(en) erstellen"
+msgstr "Einzelne konvexe Form erstellen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Aus der Szenenwurzel konnten mehrere konvexe Kollisionselemente nicht "
+"erzeugt werden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Ordner konnte nicht erstellt werden."
+msgstr "Konnte kein einziges Kollisionselement erzeugen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Konvexe Form(en) erstellen"
+msgstr "Mehrere konvexe Formen erstellen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6012,6 +6012,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Erstellt einen StaticBody und weist ein polygon-basiertes Kollisionselement "
+"automatisch zu.\n"
+"Dies ist die präziseste (aber langsamste) Methode für Kollisionsberechnungen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6022,28 +6025,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Erstellt ein polygon-basiertes Kollisionselement.\n"
+"Dies ist die präziseste (aber langsamste) Methode für Kollisionsberechnungen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Konvexe(s) Kollisionselement(e) erzeugen"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Ein einzelnes konvexes Kollisionsunterelement erzeugen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Erstellt ein einzelnes konvexes Kollisionselement.\n"
+"Dies ist die schnellste (aber ungenauste) Methode für Kollisionsberechnungen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Konvexe(s) Kollisionselement(e) erzeugen"
+msgstr "Mehrere konvexe Kollisionsunterelemente erzeugen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Erstellt ein polygon-basiertes Kollisionselement.\n"
+"Dies liegt von der Geschwindigkeit in der Mitte der beiden anderen Methoden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6056,6 +6064,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Erstellt ein statisches Outline-Mesh. Outline-Meshes haben ihre "
+"Normalenvektoren automatisch invertiert.\n"
+"Dies kann als Ersatz für die SpatialMaterial-Grow-Eigenschaft genutzt werden "
+"wenn sie nicht verfügbar ist."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9651,34 +9663,29 @@ msgid "Export With Debug"
msgstr "Exportiere mit Debuginformationen"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Dieser Pfad existiert nicht."
+msgstr "Der angegebene Pfad existiert nicht."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Fehler beim Öffnen der Paketdatei, kein ZIP-Format."
+msgstr "Fehler beim Öffnen der Paketdatei (kein ZIP-Format)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr "Ungültige Projekt-Zipdatei, enthält keine ‚project.godot‘-Datei."
+msgstr "Ungültige „.zip“-Projektdatei, enthält keine „project.godot“-Datei."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Bitte einen leeren Ordner auswählen."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Eine ‚project.godot‘-Datei oder Zipdatei auswählen."
+msgstr "Eine „project.godot†oder „.zip“-Datei auswählen."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Das Verzeichnis beinhaltet bereits ein Godot-Projekt."
+msgstr "Dieses Verzeichnis beinhaltet bereits ein Godot-Projekt."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10109,7 +10116,7 @@ msgstr "Ereignis hinzufügen"
#: editor/project_settings_editor.cpp
msgid "Button"
-msgstr "Knopf"
+msgstr "\"Button\""
#: editor/project_settings_editor.cpp
msgid "Left Button."
@@ -10381,9 +10388,8 @@ msgid "Suffix"
msgstr "Suffix"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Reguläre Ausdrücke"
+msgstr "Reguläre Ausdrücke verwenden"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10422,7 +10428,6 @@ msgstr ""
"Zahleroptionen vergleichen."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Pro-Ebene-Zähler"
@@ -10464,12 +10469,10 @@ msgid "Keep"
msgstr "Behalten"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
msgstr "CamelCase zu unter_strich"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
msgstr "unter_strich zu CamelCase"
@@ -10490,14 +10493,12 @@ msgid "Reset"
msgstr "Zurücksetzen"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Reguläre Ausdrücke"
+msgstr "Fehler in regulärem Ausdruck"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Gültige Zeichen:"
+msgstr "Bei Zeichen %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10965,9 +10966,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Ungültiger geerbter Name oder Pfad."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Skript ist gültig."
+msgstr "Skript-Pfad oder -Name ist gültig."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11058,9 +11058,8 @@ msgid "Copy Error"
msgstr "Fehlermeldung kopieren"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Grafikspeicher"
+msgstr "Video RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12123,7 +12122,7 @@ msgstr "Verwende Standard-Startbildschirm-Bilddatei."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
-msgstr "Ungültiger Paketekurzname."
+msgstr "Ungültiger Paket-Kurzname."
#: platform/uwp/export/export.cpp
msgid "Invalid package unique name."
@@ -12481,6 +12480,11 @@ msgstr ""
"Plane-Shapes funktionieren nicht gut und werden in einer zukünftigen Version "
"entfernt. Von der Nutzung wird abgeraten."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nichts ist sichtbar da kein Mesh zugewiesen wurden."
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index 3579069f14..84e1dd1599 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -4,35 +4,38 @@
# This file is distributed under the same license as the Godot source code.
# Christian Fisch <christian.fiesel@gmail.com>, 2016.
# Nils <nfa106008@iet-gibb.ch>, 2020.
+# anonymous <noreply@weblate.org>, 2020.
+# PagDev <pag.develop@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-20 11:39+0000\n"
-"Last-Translator: Nils <nfa106008@iet-gibb.ch>\n"
-"Language-Team: German (Swiss High) <https://hosted.weblate.org/projects/"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
+"Last-Translator: PagDev <pag.develop@gmail.com>\n"
+"Language-Team: German (Switzerland) <https://hosted.weblate.org/projects/"
"godot-engine/godot/de_CH/>\n"
"Language: de_CH\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
msgstr ""
+"Ungültiger Argument-Typ in convert()-Aufruf, TYPE_*-Konstanten benötigt."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "Es wurde eine Zeichenfolge der Länge 1 (a character) erwartet."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr ""
+msgstr "Nicht genügend Bytes zum Decodieren von Bytes oder ungültiges Format."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -1501,6 +1504,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1796,7 +1803,7 @@ msgstr "Datei öffnen"
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3961,6 +3968,10 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Dateien"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr ""
@@ -3969,11 +3980,6 @@ msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
-msgid " Files"
-msgstr "Datei(en) öffnen"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr ""
@@ -4021,10 +4027,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -6016,7 +6018,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Node erstellen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12413,6 +12415,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index a8bde3c192..232f6eb087 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -1446,6 +1446,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1722,7 +1726,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3797,15 +3801,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3855,10 +3859,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5739,7 +5739,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11825,6 +11825,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index b82c0fbff8..fb9029a861 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-02 08:51+0000\n"
+"PO-Revision-Date: 2020-03-08 22:32+0000\n"
"Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
@@ -20,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -693,9 +693,8 @@ msgid "Line Number:"
msgstr "ΑÏ. γÏαμμής:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Αντικατάσταση..."
+msgstr "%d αντικαταστάθηκαν."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1497,6 +1496,10 @@ msgstr "Όνομα"
msgid "Singleton"
msgstr "ΜονοσÏνολο"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Επικόλληση παÏαμέτÏων"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "ΕνημέÏωση σκηνής"
@@ -1783,7 +1786,7 @@ msgstr "Εμφάνιση στη διαχείÏιση αÏχείων"
msgid "New Folder..."
msgstr "Îέος φάκελος..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Αναναίωση"
@@ -3986,6 +3989,10 @@ msgid "Saving..."
msgstr "Αποθήκευση..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d αÏχεία"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "ΟÏισμός ως Ï€Ïοεπιλογής για '%s'"
@@ -3994,10 +4001,6 @@ msgid "Clear Default for '%s'"
msgstr "ΕκκαθάÏιση Ï€Ïοεπιλογής για '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " ΑÏχεία"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Εισαγωγή ώς:"
@@ -4045,10 +4048,6 @@ msgid "Copy Params"
msgstr "ΑντιγÏαφή παÏαμέτÏων"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Επικόλληση παÏαμέτÏων"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "ΕπεξεÏγασία Ï€ÏοχείÏου πόÏων"
@@ -5879,9 +5878,8 @@ msgid "Mesh is empty!"
msgstr "Το πλέγμα είναι άδειο!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "ΔημιουÏγία Î±Î´ÎµÎ»Ï†Î¿Ï ÏƒÏγκÏουσης πλέγατος Ï„Ïιγώνων"
+msgstr "Αδυναμία δημιουÏγίας σχήματος σÏγκÏουσης Ï„Ïιγώνων."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5898,29 +5896,30 @@ msgstr "ΔημιουÏγία Î£Ï„Î±Ï„Î¹ÎºÎ¿Ï Î£Ï‡Î®Î¼Î±Ï„Î¿Ï‚ ΠλέγματοÏ
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Αδυναμια δημιουÏγίας Î¼Î¿Î½Î±Î´Î¹ÎºÎ¿Ï ÎºÏ…ÏÏ„Î¿Ï ÏƒÏ‡Î®Î¼Î±Ï„Î¿Ï‚ σÏγκÏουσης για την Ïίζα "
+"σκηνής."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Αδυναμία δημιουÏγίας Î¼Î¿Î½Î±Î´Î¹ÎºÎ¿Ï ÎºÏ…ÏÏ„Î¿Ï ÏƒÏ‡Î®Î¼Î±Ï„Î¿Ï‚ σÏγκÏουσης."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "ΔημιουÏγία ΚυÏτών Σχημάτων"
+msgstr "ΔημιουÏγία ÎœÎ¿Î½Î±Î´Î¹ÎºÎ¿Ï ÎšÏ…ÏÏ„Î¿Ï Î£Ï‡Î®Î¼Î±Ï„Î¿Ï‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Αδυναμία δημιουÏγίας πολλαπλών κυÏτών σχημάτων σÏγκÏουσης για την Ïίζα "
+"σκηνής."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "ΑδÏνατη η δημιουÏγία φακέλου."
+msgstr "Αδυναμία δημιουÏγίας σχημάτων σÏγκÏουσης."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "ΔημιουÏγία ΚυÏτών Σχημάτων"
+msgstr "ΔημιουÏγία Πολλαπλών ΚυÏτών Σχημάτων"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5976,6 +5975,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"ΔημιουÏγεί ένα StaticBody και του αναθέτει αυτόματα ένα σχήμα σÏγκÏουσης "
+"βασισμένο σε πολÏγωνα.\n"
+"Είναι η πιο ακÏιβής (αλλά αÏγότεÏη) επιλογή για εντοπισμό σÏγκÏουσης."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5986,28 +5988,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"ΔημιουÏγεί ένα σχήμα σÏγκÏουσης βασισμένο σε πολÏγωνα.\n"
+"Είναι η πιο ακÏιβής (αλλά αÏγότεÏη) επιλογή για εντοπισμό σÏγκÏουσης."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "ΔημιουÏγία ΚυÏÏ„Î¿Ï Î‘Î´ÎµÎ»Ï†Î¿Ï Î£ÏγκÏουσης"
+msgid "Create Single Convex Collision Sibling"
+msgstr "ΔημιουÏγία Μοναδικών ΚυÏτών Αδελφών ΣÏγκÏουσης"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"ΔημιουÏγεί ένα μοναδικό κυÏÏ„ÏŒ σχήμα σÏγκÏουσης.\n"
+"Είναι η γÏηγοÏότεÏη (αλλά πιο ανακÏιβής) επιλογή για εντοπισμό σÏγκÏουσης."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "ΔημιουÏγία ΚυÏÏ„Î¿Ï Î‘Î´ÎµÎ»Ï†Î¿Ï Î£ÏγκÏουσης"
+msgstr "ΔημιουÏγία Πολλαπλών ΚυÏτών Αδελφών ΣÏγκÏουσης"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"ΔημιουÏγεί ένα σχήμα σÏγκÏουσης βασισμένο σε πολÏγωνα.\n"
+"Είναι μια επιλογή μέσης απόδοσης σχετικά με τις παÏαπάνω επιλογές."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6020,6 +6027,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"ΔημιουÏγεί ένα στατικό πλέγμα πεÏιγÏάμματος με αντίστÏοφα κανονικά "
+"διανÏσματα.\n"
+"Είναι εναλλακτική της ιδιότητας Grow του SpatialMaterial, για όταν η "
+"τελευταία δεν είναι διαθέσιμη."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9613,34 +9624,29 @@ msgid "Export With Debug"
msgstr "Εξαγωγή με αποσφαλμάτωση"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Η διαδÏομή δεν υπάÏχει."
+msgstr "Η οÏισμένη διαδÏομή δεν υπάÏχει."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Σφάλμα ανοίγματος αÏχείου πακέτου, δεν είναι σε μοÏφή ZIP."
+msgstr "Σφάλμα ανοίγματος αÏχείου πακέτου (δεν είναι σε μοÏφή ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr "ΆκυÏο αÏχείο έÏγου «.zip», δεν πεÏιέχει αÏχείο «project.godot»."
+msgstr "ΆκυÏο αÏχείο έÏγου «.zip»: Δεν πεÏιέχει αÏχείο «project.godot»."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "ΠαÏακαλοÏμε επιλέξτε έναν άδειο φάκελο."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
msgstr "ΠαÏακαλοÏμε επιλέξτε ένα αÏχείο «project.godot» ή «.zip»."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Ο κατάλογος πεÏιέχει ήδη ένα έÏγο της Godot."
+msgstr "Ο κατάλογος αυτός πεÏιέχει ήδη ένα έÏγο της Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10339,9 +10345,8 @@ msgid "Suffix"
msgstr "Επίθεμα"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Κανονικές ΕκφÏάσεις"
+msgstr "ΧÏήση Κανονικών ΕκφÏάσεων"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10380,7 +10385,6 @@ msgstr ""
"ΣÏγκÏιση επιλογών μετÏητή."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "ΜετÏητής Ανά Επίπεδο"
@@ -10421,14 +10425,12 @@ msgid "Keep"
msgstr "ΔιατήÏηση"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase σε under_scored"
+msgstr "PascalCase σε snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored σε CamelCase"
+msgstr "snake_case σε PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10447,14 +10449,12 @@ msgid "Reset"
msgstr "ΕπαναφοÏά"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Κανονικές ΕκφÏάσεις"
+msgstr "Σφάλμα Κανονικής ΕκφÏάσεως"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "ΈγκυÏοι χαÏακτήÏες:"
+msgstr "Στον χαÏακτήÏα %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10925,9 +10925,8 @@ msgid "Invalid inherited parent name or path."
msgstr "ΆκυÏο όνομα κληÏονομημένου γονέα ή διαδÏομή."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "ΈγκυÏη δέσμη ενεÏγειών."
+msgstr "ΆκυÏη διαδÏομή/όνομα δέσμης ενεÏγειών."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11018,9 +11017,8 @@ msgid "Copy Error"
msgstr "ΑντιγÏαφή σφάλματος"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Βίντεο μνήμη"
+msgstr "Βίντεο RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12444,6 +12442,11 @@ msgstr ""
"Τα επίπεδα σχήματα δεν λειτουÏγοÏν καλά και θα αφαιÏεθοÏν σε μελλοντικές "
"εκδόσεις. ΠαÏακαλώ μην τα χÏησιμοποιήσετε."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Τίποτα δεν είναι οÏατό, επειδή δεν έχει οÏιστεί κανένα πλέγματα."
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index 96ee7aea8d..cd84f54a40 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -1484,6 +1484,10 @@ msgstr "Nomo"
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
#, fuzzy
msgid "Updating Scene"
@@ -1767,7 +1771,7 @@ msgstr "Montri en dosiermastrumilo"
msgid "New Folder..."
msgstr "Nova dosierujo..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Aktualigi"
@@ -3900,15 +3904,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Trovi en dosierojn"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3958,10 +3963,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5855,7 +5856,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11992,6 +11993,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 6bf8a88ad6..ed82e80658 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -47,7 +47,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-04 21:53+0000\n"
+"PO-Revision-Date: 2020-02-27 07:01+0000\n"
"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
@@ -56,7 +56,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -730,9 +730,8 @@ msgid "Line Number:"
msgstr "Número de Línea:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Reemplazar..."
+msgstr "%d reemplazado."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1534,6 +1533,10 @@ msgstr "Nombre"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Pegar Parámetros"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Actualizando Escena"
@@ -1824,7 +1827,7 @@ msgstr "Mostrar en Explorador de Archivos"
msgid "New Folder..."
msgstr "Nueva Carpeta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Recargar"
@@ -1968,7 +1971,7 @@ msgstr "(Re)Importando Assets"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr "Cima"
+msgstr "Superior"
#: editor/editor_help.cpp
msgid "Class:"
@@ -2447,7 +2450,7 @@ msgstr "Esta operación no puede realizarse sin una escena."
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr "Exportar Librería de Meshes"
+msgstr "Exportar Librería de Mallas"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
@@ -2867,8 +2870,8 @@ msgid ""
"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
"running game if this option is turned on."
msgstr ""
-"Los Collision shapes y nodos raycast (para 2D y 3D) serán visibles durante "
-"la ejecución del juego cuando esta opción queda activada."
+"Las formas de colisión y los nodos raycast (para 2D y 3D) serán visibles "
+"durante la ejecución del juego si esta opción está activada."
#: editor/editor_node.cpp
msgid "Visible Navigation"
@@ -2879,8 +2882,8 @@ msgid ""
"Navigation meshes and polygons will be visible on the running game if this "
"option is turned on."
msgstr ""
-"Si activas esta opción podrás ver las mallas y polígonos de navegación "
-"durante la ejecución del juego."
+"Las mallas de navegación y los polígonos serán visibles durante la ejecución "
+"del juego si esta opción está activada."
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
@@ -3184,7 +3187,7 @@ msgstr "No se encontró ningún sub-recurso."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
-msgstr "Creando Vistas Previas de Mesh/es"
+msgstr "Creando Previsualización de Mallas"
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
@@ -4000,7 +4003,7 @@ msgstr "Generando Lightmaps"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr "Generando para Mesh: "
+msgstr "Generando para la Malla: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -4024,6 +4027,10 @@ msgid "Saving..."
msgstr "Guardando..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d archivos"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Establecer como predeterminado para '%s'"
@@ -4032,10 +4039,6 @@ msgid "Clear Default for '%s'"
msgstr "Restablecer Predeterminado para '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Archivos"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importar como:"
@@ -4084,10 +4087,6 @@ msgid "Copy Params"
msgstr "Copiar Parámetros"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Pegar Parámetros"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Editar Portapapeles de Recursos"
@@ -5146,8 +5145,8 @@ msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
-"No hay meshes para hacer bake. Asegúrate que contienen un canal UV2 y que el "
-"flag 'Bake Light' esta activado."
+"No hay mallas para hacer bake. Asegúrate que contengan un canal UV2 y que la "
+"opción de 'Bake Light' está activada."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -5265,8 +5264,8 @@ msgid ""
"When active, moving Control nodes changes their anchors instead of their "
"margins."
msgstr ""
-"Cuando está activo, el movimiento de los nodos de Control cambian sus "
-"anclajes en lugar de sus márgenes."
+"Cuando esté activo, los nodos de Control en movimiento cambian sus anclas en "
+"lugar de sus márgenes."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Top Left"
@@ -5810,7 +5809,7 @@ msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Mesh"
-msgstr "Crear Puntos de Emisión Desde Mesh"
+msgstr "Crear Puntos de Emisión desde la Malla"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -5911,12 +5910,11 @@ msgstr "Crear Polígono Oclusor"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh is empty!"
-msgstr "¡El Mesh está vacío!"
+msgstr "¡La malla está vacía!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Crear Collider Triangular Hermano"
+msgstr "No se pudo crear una forma de colisión Triangular."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5928,50 +5926,51 @@ msgstr "¡No puedes hacer esto en una escena raíz!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Shape"
-msgstr "Crear Shape Estático Triangular"
+msgstr "Crear Forma Estática Triangular"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"No se pudo crear una única forma de colisión convexa para la raíz de la "
+"escena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "No pudo crear una única forma de colisión convexa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Crear Shape(s) Convexo(s)"
+msgstr "Crear una Única Forma Convexa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"No se pudieron crear múltiples formas de colisión convexas para la raíz de "
+"la escena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "No se pudo crear la carpeta."
+msgstr "No pudo crear ninguna forma de colisión."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Crear Shape(s) Convexo(s)"
+msgstr "Crear Múltiples Formas Convexas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
-msgstr "Crear Navigation Mesh"
+msgstr "Crear Malla de Navegación"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Contained Mesh is not of type ArrayMesh."
-msgstr "El Mesh contenedor no es del tipo ArrayMesh."
+msgstr "La Malla contenedora no es del tipo ArrayMesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr "Fallo el UV Unwrap ¿el mesh podría no ser manifold?"
+msgstr "Fallo del UV Unwrap ¿la malla podría no ser múltiple?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
-msgstr "No hay meshes para depurar."
+msgstr "No hay mallas para depurar."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Model has no UV in this layer"
@@ -5979,15 +5978,15 @@ msgstr "El modelo no tiene UV en esta capa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
-msgstr "¡MeshInstance le falta un Mesh!"
+msgstr "¡MeshInstance carece de una Malla!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr "¡El mesh no tiene una superficie de donde crear contornos!"
+msgstr "¡La malla no tiene una superficie para crear contornos!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr "¡El tipo primitivo de mesh no es PRIMITIVE_TRIANGLES!"
+msgstr "¡El tipo primitivo de malla no es PRIMITIVE_TRIANGLES!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
@@ -5999,7 +5998,7 @@ msgstr "Crear Outline"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
-msgstr "Mesh"
+msgstr "Malla"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
@@ -6011,6 +6010,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea un StaticBody y le asigna automáticamente una forma de colisión basada "
+"en polígonos.\n"
+"Es la opción más precisa (pero la más lenta) para la detección de colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6021,32 +6023,37 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea una forma de colisión basada en polígonos.\n"
+"Es la opción más precisa (pero la más lenta) para la detección de colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Crear Collider Convexo Hermano(s)"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Crear una Única Colisión Convexa Hermana"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Crea una única forma de colisión convexa.\n"
+"Es la opción más rápida (pero menos precisa) para la detección de colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Crear Collider Convexo Hermano(s)"
+msgstr "Crear Múltiples Colisiones Convexas Hermanas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Crea una forma de colisión basada en polígonos.\n"
+"Este es un punto medio de rendimiento entre las dos opciones anteriores."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
-msgstr "Crear Outline Mesh..."
+msgstr "Crear Malla de Contorno..."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6055,6 +6062,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Crea una malla de contorno estático. La malla de contorno tendrá sus "
+"normales invertidas automáticamente.\n"
+"Esto puede ser usado en lugar de la propiedad Grow de SpatialMaterial cuando "
+"el uso de esa propiedad no sea posible."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6070,7 +6081,7 @@ msgstr "Desenvuelva UV2 para Lightmap/AO"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr "Crear Outline Mesh"
+msgstr "Crear Malla de Contorno"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Outline Size:"
@@ -6094,7 +6105,7 @@ msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Mesh Library"
-msgstr "Librería de Meshes"
+msgstr "Librería de Mallas"
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -6116,23 +6127,27 @@ msgstr "Actualizar desde escena"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
msgstr ""
-"No se especificó mesh de origen (y no hay MultiMesh establecido en el nodo)."
+"No se ha especificado una malla de origen (y no se ha establecido un "
+"MultiMesh en el nodo)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
-msgstr "No se especificó mesh de origen (y MultiMesh no contiene ningún Mesh)."
+msgstr ""
+"No se ha especificado una malla de origen (y MultiMesh no contiene ninguna "
+"Malla)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
-msgstr "Mesh de origen inválido (ruta inválida)."
+msgstr "El origen de la malla es inválido (ruta inválida)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (not a MeshInstance)."
-msgstr "Mesh de origen inválido (no es un MeshInstance)."
+msgstr "El origen de la malla es inválido (no es un MeshInstance)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (contains no Mesh resource)."
-msgstr "Mesh de origen inválido (no contiene ningún recurso Mesh)."
+msgstr ""
+"El origen de la malla es inválido (no contiene ningún recurso de Malla)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No surface source specified."
@@ -6152,7 +6167,7 @@ msgstr "El origen de la superficie no es correcto (sin caras)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr "Selecciona una Mesh de Origen:"
+msgstr "Selecciona una Malla de Origen:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
@@ -6164,7 +6179,7 @@ msgstr "Llenar superficie"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate MultiMesh"
-msgstr "Llenar MultiMesh"
+msgstr "Rellenar MultiMesh"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Target Surface:"
@@ -6172,7 +6187,7 @@ msgstr "Superficie objetivo:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Source Mesh:"
-msgstr "Mesh de Origen:"
+msgstr "Malla de Origen:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
@@ -6188,7 +6203,7 @@ msgstr "Eje-Z"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh Up Axis:"
-msgstr "Eje Superior del Mesh:"
+msgstr "Eje Superior de la Malla:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Rotation:"
@@ -7680,11 +7695,12 @@ msgstr "¡El sprite esta vacío!"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr "No se puede convertir a mesh un sprite que usa frames de animación."
+msgstr ""
+"No se puede convertir en malla un sprite usando fotogramas de animación."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
-msgstr "Geometría inválida, no se puede reemplazar por mesh."
+msgstr "Geometría inválida, no puede ser reemplazada por una malla."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Mesh2D"
@@ -9639,33 +9655,29 @@ msgid "Export With Debug"
msgstr "Exportar Con Depuración"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "La ruta no existe."
+msgstr "La ruta especificada no existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Error al abrir el archivo comprimido, no está en formato ZIP."
+msgstr "Error al abrir el archivo del paquete (no está en formato ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Archivo de projecto '.zip' inválido, no contiene un archivo 'project.godot'."
+"Archivo de proyecto \".zip\" inválido; no contiene un archivo \"project.godot"
+"\"."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Por favor elija una carpeta vacía."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Por favor selecciona un archivo 'project.godot' o '.zip'."
+msgstr "Por favor, elige un archivo \"project.godot\" o \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
msgstr "El directorio ya contiene un proyecto de Godot."
@@ -10366,9 +10378,8 @@ msgid "Suffix"
msgstr "Sufijo"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Expresiones regulares"
+msgstr "Usa Expresiones Regulares"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10407,9 +10418,8 @@ msgstr ""
"Comparar opciones de contador."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
-msgstr "Contador por Nivel"
+msgstr "Contador Por Nivel"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10448,14 +10458,12 @@ msgid "Keep"
msgstr "Conservar"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase a under_scored"
+msgstr "PascalCase a snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored a CamelCase"
+msgstr "snake_case a PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10474,14 +10482,12 @@ msgid "Reset"
msgstr "Resetear"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Expresiones regulares"
+msgstr "Error de Expresión Regular"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Caracteres válidos:"
+msgstr "En el carácter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10948,9 +10954,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nombre o ruta del padre heredado inválido."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "El script es válido."
+msgstr "La ruta/nombre del script es correcta."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11041,9 +11046,8 @@ msgid "Copy Error"
msgstr "Copiar Error"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Memoria de Vídeo"
+msgstr "Vídeo RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -11187,31 +11191,31 @@ msgstr "Cambiar Alcance de la Sonda"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
-msgstr "Cambiar Radio de Sphere Shape"
+msgstr "Cambiar Radio de la Forma Esférica"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
-msgstr "Cambiar Radio de Box Shape"
+msgstr "Cambiar Extensión de la Forma de la Caja"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr "Cambiar Radio de Capsule Shape"
+msgstr "Cambiar Radio de la Forma de la Cápsula"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr "Cambiar Altura de Capsule Shape"
+msgstr "Cambiar Altura de la Forma de la Cápsula"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Radius"
-msgstr "Cambiar Radio de Cylinder Shape"
+msgstr "Cambiar Radio de la Forma del Cilindro"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Height"
-msgstr "Cambiar Altura de Cylinder Shape"
+msgstr "Cambiar Altura de la Forma del Cilindro"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Ray Shape Length"
-msgstr "Cambiar Longitud de Ray Shape"
+msgstr "Cambiar Longitud de la Forma del Rayo"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -11339,15 +11343,15 @@ msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
-msgstr "Siguiente Suelo"
+msgstr "Siguiente Plano"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Previous Floor"
-msgstr "Anterior Suelo"
+msgstr "Anterior Plano"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Floor:"
-msgstr "Suelo:"
+msgstr "Plano:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Delete Selection"
@@ -11447,11 +11451,12 @@ msgstr "Seleccionar Distancia:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Filter meshes"
-msgstr "Filtrar meshes"
+msgstr "Filtrar mallas"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr "Asignar un recurso MeshLibrary a este GridMap para usar sus meshes."
+msgstr ""
+"Proporciona un recurso MeshLibrary a este GridMap para usar sus mallas."
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -11467,7 +11472,7 @@ msgstr "Bake NavMesh"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
-msgstr "Limpiar el navigation mesh."
+msgstr "Limpiar la malla de navegación."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
@@ -11507,11 +11512,11 @@ msgstr "Creando polymesh..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
-msgstr "Convertir a navigation mesh nativo..."
+msgstr "Convertir a malla de navegación nativa..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr "Configuración del Generador de Navigation Mesh:"
+msgstr "Configuración del Generador de Mallas de Navegación:"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
@@ -12230,8 +12235,8 @@ msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
msgstr ""
-"Para que CollisionShape2D funcione, se debe proporcionar un shape. Por "
-"favor, ¡crea un recurso shape para ello!"
+"Para que funcione CollisionShape2D se debe proporcionar una forma. Por "
+"favor, ¡crea un recurso de forma para ello!"
#: scene/2d/cpu_particles_2d.cpp
msgid ""
@@ -12323,10 +12328,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Los cambios en el tamaño del RigidBody2D (en los modos \"character\" o "
-"\"rigid\") serán sobre-escritos por el motor de físicas cuando éste se "
-"ejecute.\n"
-"En lugar de esto, cambie el tamaño en las formas de colisión hijas."
+"Los cambios en el tamaño de RigidBody2D (en los modos character o rigid) "
+"serán anulados por el motor de la física cuando esté ejecutándose.\n"
+"En su lugar, cambia el tamaño en las formas de colisión de los hijos."
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -12408,7 +12412,7 @@ msgstr "(Tiempo restante: %d:%02d s)"
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Meshes: "
-msgstr "Trazando Meshes: "
+msgstr "Trazando Mallas: "
#: scene/3d/baked_lightmap.cpp
msgid "Plotting Lights:"
@@ -12420,7 +12424,7 @@ msgstr "Finalizar Trazado"
#: scene/3d/baked_lightmap.cpp
msgid "Lighting Meshes: "
-msgstr "Iluminando Meshes: "
+msgstr "Iluminación de Mallas: "
#: scene/3d/collision_object.cpp
msgid ""
@@ -12462,8 +12466,8 @@ msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
msgstr ""
-"Se debe proporcionar un shape para que CollisionShape funcione. Por favor, "
-"crea un recurso shape para ello."
+"Se debe proporcionar una forma para que CollisionShape funcione. Por favor, "
+"crea un recurso de forma para ello."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12473,9 +12477,14 @@ msgstr ""
"Las formas tipo plano no funcionan bien y se eliminarán en futuras "
"versiones. Por favor, no las uses."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
-msgstr "Nada visible ya que no se asignó ningún mesh."
+msgstr "No hay nada visible porque no se ha asignado ninguna malla."
#: scene/3d/cpu_particles.cpp
msgid ""
@@ -12487,7 +12496,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr "Trazando Meshes"
+msgstr "Trazando Mallas"
#: scene/3d/gi_probe.cpp
msgid ""
@@ -12531,7 +12540,8 @@ msgstr ""
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
-"Nada es visible porque las mallas no se han asignado a los pases de dibujo."
+"No hay nada visible porque no se han asignado mallas para los pases de "
+"dibujo."
#: scene/3d/particles.cpp
msgid ""
@@ -12560,9 +12570,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Los cambios en el tamaño del RigidBody (en los modos \"character\" o \"rigid"
-"\") serán sobre-escritos por el motor de físicas cuando se ejecute.\n"
-"En lugar de esto, cambie el tamaño en las formas de colisión hijas."
+"Cualquier cambio en el tamaño de RigidBody (en modo character o rigid) será "
+"anulado por el motor de la física cuando esté ejecutándose.\n"
+"En su lugar, cambia el tamaño en las formas de colisión de los hijos."
#: scene/3d/remote_transform.cpp
msgid ""
@@ -12574,7 +12584,7 @@ msgstr ""
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
-msgstr "Este cuerpo será ignorado hasta que se establezca un mesh."
+msgstr "Este cuerpo será ignorado hasta que se establezca una malla."
#: scene/3d/soft_body.cpp
msgid ""
@@ -12582,9 +12592,9 @@ msgid ""
"running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Los cambios de tamaño a un SoftBody serán sobrescritos por el motor de "
-"física al ejecutar.\n"
-"En su lugar, cambia el tamaño de los collision shapes hijos."
+"Los cambios de tamaño de SoftBody serán anulados por el motor de física "
+"cuando esté ejecutándose.\n"
+"En su lugar, cambia el tamaño en las formas de colisión de los hijos."
#: scene/3d/sprite_3d.cpp
msgid ""
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 5a9515ee87..dce0d89b7e 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -18,8 +18,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-02 08:52+0000\n"
-"Last-Translator: roger <616steam@gmail.com>\n"
+"PO-Revision-Date: 2020-02-27 07:01+0000\n"
+"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -681,7 +681,7 @@ msgstr "Cambiar Offset Final de Clip de Pista de Audio"
#: editor/array_property_edit.cpp
msgid "Resize Array"
-msgstr "Redimencionar Array"
+msgstr "Redimensionar Array"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
@@ -700,9 +700,8 @@ msgid "Line Number:"
msgstr "Numero de Línea:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Reemplazar..."
+msgstr "%d reemplazadas."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1503,6 +1502,10 @@ msgstr "Nombre"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Pegar Parámetros"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Actualizando Escena"
@@ -1792,7 +1795,7 @@ msgstr "Mostrar en Explorador de Archivos"
msgid "New Folder..."
msgstr "Nueva Carpeta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Refrescar"
@@ -3988,6 +3991,10 @@ msgid "Saving..."
msgstr "Guardando..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Archivos"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Asignar como Predeterminado para '%s'"
@@ -3996,10 +4003,6 @@ msgid "Clear Default for '%s'"
msgstr "Restablecer Predeterminados para '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Archivos"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importar Como:"
@@ -4050,10 +4053,6 @@ msgid "Copy Params"
msgstr "Copiar Parámetros"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Pegar Parámetros"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Editar Portapapeles de Recursos"
@@ -5879,9 +5878,8 @@ msgid "Mesh is empty!"
msgstr "¡El Mesh está vacío!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Crear Collider Triangular Hermano"
+msgstr "No se pudo crear una forma de colisión Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5898,29 +5896,29 @@ msgstr "Crear Trimesh Static Shape"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"No se pudo crear una única forma de colisión convexa para la raíz de escena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "No se pudo crear una forma de colisión única."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Crear Shape(s) Convexo(s)"
+msgstr "Crear Forma Convexa Única"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"No se pudo crear múltiples formas de colisión convexas para la raíz de "
+"escena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "No se pudo crear la carpeta."
+msgstr "No se pudo crear ninguna forma de colisión."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Crear Shape(s) Convexo(s)"
+msgstr "Crear Múltiples Formas Convexas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5976,6 +5974,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea un StaticBody y le asigna automáticamente una forma de colisión basada "
+"en polígonos .\n"
+"Esta es la opción mas exacta (pero más lenta) de detección de colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5986,28 +5987,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea una forma de colisión basada en polígonos.\n"
+"Esta es la opción mas exacta (pero más lenta) de detección de colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Crear Collider Convexo Hermano(s)"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Crear Colisión Convexa Unica como Nodo Hermano"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Crear forma de colisión convexa única.\n"
+"Esta es la opción mas rápida (pero menos exacta) para detectar colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Crear Collider Convexo Hermano(s)"
+msgstr "Crear Múltiples Colisiones Convexas como Nodos Hermanos"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Crea una forma de colisión basada en polígonos.\n"
+"Esto está en un punto medio de rendimiento entre las dos opciones de arriba."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6020,6 +6026,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Crea un mesh de contorno estático. Este mesh de contorno tendrá sus normales "
+"invertidas automáticamente.\n"
+"Esto puede ser usado en vez de la propiedad Grow del SpatialMaterial cuando "
+"no sea posible usar dicha propiedad."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9603,33 +9613,29 @@ msgid "Export With Debug"
msgstr "Exportar Con Depuración"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "La ruta no existe."
+msgstr "La ruta especificada no existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Error al abrir el archivo comprimido, no está en formato ZIP."
+msgstr "Error al abrir el archivo de paquete (no esta en formato ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Archivo de projecto '.zip' inválido, no contiene un archivo 'project.godot'."
+"Archivo de projecto \".zip\" inválido; no contiene un archivo \"project.godot"
+"\"."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Por favor elegí una carpeta vacía."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Por favor elegí un archivo 'project.godot' o '.zip'."
+msgstr "Por favor elegí un archivo \"project.godot\" o \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
msgstr "El directorio ya contiene un proyecto de Godot."
@@ -10331,9 +10337,8 @@ msgid "Suffix"
msgstr "Sufijo"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Expresiones Regulares"
+msgstr "Usar Expresiones Regulares"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10372,9 +10377,8 @@ msgstr ""
"Comparar opciones de contador."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
-msgstr "Contador por nivel"
+msgstr "Contador Por Nivel"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10413,14 +10417,12 @@ msgid "Keep"
msgstr "Conservar"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase a under_scored"
+msgstr "PascalCase a snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored a CamelCase"
+msgstr "snake_case a PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10439,14 +10441,12 @@ msgid "Reset"
msgstr "Resetear"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Expresiones Regulares"
+msgstr "Error de Expresión Regular"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Caracteres válidos:"
+msgstr "En el carácter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10914,9 +10914,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Ruta o nombre del padre heredado inválido."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "El script es válido."
+msgstr "La ruta/nombre del script es correcta."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11007,7 +11006,6 @@ msgid "Copy Error"
msgstr "Copiar Error"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "Mem. de Video"
@@ -12433,6 +12431,11 @@ msgstr ""
"Las formas tipo plano no funcionan bien y serán removidas en versiones "
"futuras. Evitá usarlas."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada visible ya que no se asignó ningún mesh."
diff --git a/editor/translations/et.po b/editor/translations/et.po
index ff0a3d9535..9b9d9b9137 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -1454,6 +1454,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1730,7 +1734,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3810,15 +3814,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3868,10 +3872,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5758,7 +5758,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11856,6 +11856,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index bf4634ba8d..1075a4a046 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -1451,6 +1451,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1727,7 +1731,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3802,15 +3806,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3860,10 +3864,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5744,7 +5744,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11830,6 +11830,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 295a94d322..caee80995e 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -12,12 +12,14 @@
# Mahdi <sadisticwarlock@gmail.com>, 2018.
# hpn33 <hamed.hpn332@gmail.com>, 2019.
# Focus <saeeddashticlash@gmail.com>, 2019.
+# anonymous <noreply@weblate.org>, 2020.
+# mohamad por <mohamad24xx@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-09-26 11:50+0000\n"
-"Last-Translator: Focus <saeeddashticlash@gmail.com>\n"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
+"Last-Translator: mohamad por <mohamad24xx@gmail.com>\n"
"Language-Team: Persian <https://hosted.weblate.org/projects/godot-engine/"
"godot/fa/>\n"
"Language: fa\n"
@@ -25,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.9-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -37,14 +39,14 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "یک رشته (string) در اندازه 1 (کاراکتر) انتظار می رود."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr ""
-"تعداد بایت های مورد نظر برای رمزگشایی بایت ها کاÙÛŒ نیست ،‌ Ùˆ یا Ùرمت نامعتبر "
+"تعداد بایت های مورد نظر برای رمزگشایی بایت ها کاÙÛŒ نیست،‌ Ùˆ یا Ùرمت نامعتبر "
"است ."
#: core/math/expression.cpp
@@ -127,24 +129,23 @@ msgstr "ارزش:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "کلید را وارد کن"
+msgstr "کلید را اینجا وارد کن"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "کلید تکراری درست کن"
+msgstr "کلیدهای انتخاب شده تکراری درست کن"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "کلید‌ها را پاک کن"
+msgstr "کلید‌های انخاب شده را پاک کن"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr "Bezier Point را اضاÙÙ‡ کنید"
+msgstr "Bezier Point را اضاÙÙ‡ Ú©Ù†"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Move Bezier Points"
-msgstr "برداشتن نقطه"
+msgstr "Bezier Points را جابجا کن"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -292,7 +293,7 @@ msgstr "زمان(s): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr "Toggle Track Enabled"
+msgstr "ضامن ترک Ùعال است"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -337,8 +338,9 @@ msgid "Insert Key"
msgstr "درج کلید"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Duplicate Key(s)"
-msgstr "کپی کردن (Duplicate ) کلید(key)"
+msgstr "نسخه همانند (Duplicate ) کلید(key)"
#: editor/animation_track_editor.cpp
msgid "Delete Key(s)"
@@ -434,16 +436,15 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "بدون ریشه اضاÙÙ‡ کردن مسیر امکان پذیر نیست"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Bezier Track"
-msgstr "ترک را اضاÙÙ‡ Ú©Ù†"
+msgstr "ترک Bezier را اضاÙÙ‡ Ú©Ù†"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
@@ -1542,6 +1543,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1849,7 +1854,7 @@ msgstr "باز شدن مدیر پروژه؟"
msgid "New Folder..."
msgstr "ساختن پوشه..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -4040,6 +4045,11 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " پوشه ها"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr ""
@@ -4048,10 +4058,6 @@ msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " پوشه ها"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr ""
@@ -4101,10 +4107,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "منبع"
@@ -6103,7 +6105,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "انتخاب شده را تغییر مقیاس بده"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12629,6 +12631,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 644271f3ec..d590546571 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-02 08:51+0000\n"
+"PO-Revision-Date: 2020-02-21 23:33+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -23,7 +23,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 3.11.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -687,9 +687,8 @@ msgid "Line Number:"
msgstr "Rivinumero:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Korvaa..."
+msgstr "%d korvattu."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1490,6 +1489,10 @@ msgstr "Nimi"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Liitä parametrit"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Päivitetään skeneä"
@@ -1778,7 +1781,7 @@ msgstr "Näytä tiedostonhallinnassa"
msgid "New Folder..."
msgstr "Uusi kansio..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Päivitä"
@@ -3949,6 +3952,10 @@ msgid "Saving..."
msgstr "Tallennetaan..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d tiedostoa"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Aseta oletus valinnalle '%s'"
@@ -3957,10 +3964,6 @@ msgid "Clear Default for '%s'"
msgstr "Poista oletus valinnalta '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Tiedostot"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Tuo nimellä:"
@@ -4011,10 +4014,6 @@ msgid "Copy Params"
msgstr "Kopioi parametrit"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Liitä parametrit"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Muokkaa resurssien leikepöytää"
@@ -5836,9 +5835,8 @@ msgid "Mesh is empty!"
msgstr "Mesh on tyhjä!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Luo konkaavi törmäysmuoto sisareksi"
+msgstr "Ei voitu luoda konkaavia törmäysmuotoa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5854,30 +5852,27 @@ msgstr "Luo staattinen konkaavi muoto"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Ei voida luoda yksittäistä konveksia törmäysmuotoa skenen juurelle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Ei voitu luoda yksittäistä konveksia törmäysmuotoa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Luo konvekseja muotoja"
+msgstr "Luo yksittäinen konveksi muoto"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "Ei voi luoda useata konveksia törmäysmuotoa skenen juurelle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Kansiota ei voitu luoda."
+msgstr "Yhtään törmäysmuotoa ei voitu luoda."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Luo konvekseja muotoja"
+msgstr "Luo useita konvekseja muotoja"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5933,6 +5928,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Luo StaticBody solmun ja asettaa sille automaattisesti polygonipohjaisen "
+"törmäysmuodon.\n"
+"Tämä on tarkin (mutta hitain) vaihtoehto törmäystunnistukselle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5943,28 +5941,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Luo polygonipohjaisen törmäysmuodon.\n"
+"Tämä on tarkin (mutta hitain) vaihtoehto törmäystunnistukselle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Luo konvekseja törmäysmuotoja sisariksi"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Luo yksittäisen konveksin törmäysmuodon sisaret"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Luo yksittäisen konveksin törmäysmuodon.\n"
+"Tämä on nopein (mutta epätarkin) vaihtoehto törmäystunnistukselle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Luo konvekseja törmäysmuotoja sisariksi"
+msgstr "Luo useita konvekseja törmäysmuotojen sisaria"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Luo polygonipohjaisen törmäysmuodon.\n"
+"Tämä on suorituskyvyltään välimaastoa kahdelle yllä olevalle vaihtoehdolle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5977,6 +5980,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Luo staattisen ääriviiva-meshin. Ääriviiva-meshin normaalit on käännetty "
+"automaattisesti.\n"
+"Tätä voidaan käyttää SpatialMaterial Grow ominaisuuden sijaan silloin, kun "
+"tuon ominaisuuden käyttäminen ei ole mahdollista."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9556,21 +9563,18 @@ msgid "Export With Debug"
msgstr "Vie debugaten"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Polkua ei ole olemassa."
+msgstr "Määritelty polku ei ole olemassa."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Virhe avattaessa pakettitiedostoa, ei ZIP-muodossa."
+msgstr "Virhe avattaessa pakettitiedostoa (se ei ole ZIP-muodossa)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Virheellinen '.zip' projektitiedosto; se ei sisällä 'project.godot' "
+"Virheellinen \".zip\" projektitiedosto; se ei sisällä \"project.godot\" "
"tiedostoa."
#: editor/project_manager.cpp
@@ -9578,14 +9582,12 @@ msgid "Please choose an empty folder."
msgstr "Ole hyvä ja valitse tyhjä kansio."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Ole hyvä ja valitse 'project.godot' tai '.zip' tiedosto."
+msgstr "Ole hyvä ja valitse \"project.godot\"- tai \".zip\"-tiedosto."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Hakemisto sisältää jo Godot-projektin."
+msgstr "Tämä hakemisto sisältää jo Godot-projektin."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10280,9 +10282,8 @@ msgid "Suffix"
msgstr "Pääte"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Säännölliset lausekkeet"
+msgstr "Käytä säännöllisiä lausekkeita"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10321,7 +10322,6 @@ msgstr ""
"Vertaa laskurin valintoja."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Per taso -laskuri"
@@ -10362,14 +10362,12 @@ msgid "Keep"
msgstr "Pidä"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase ala_viivoiksi"
+msgstr "PascalCase ala_viivoiksi"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "ala_viivat CamelCaseksi"
+msgstr "ala_viivat PascalCaseksi"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10388,14 +10386,12 @@ msgid "Reset"
msgstr "Palauta"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Säännölliset lausekkeet"
+msgstr "Säännöllisen lausekkeen virhe"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Kelvolliset merkit:"
+msgstr "Merkissä %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10863,9 +10859,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Virheellinen peritty isännän nimi tai polku."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Skripti kelpaa."
+msgstr "Skriptin polku/nimi kelpaa."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10956,7 +10951,6 @@ msgid "Copy Error"
msgstr "Kopioi virhe"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "Näyttömuisti"
@@ -12364,6 +12358,11 @@ msgstr ""
"Tasomuodot eivät toimi hyvin ja ne tullaan poistaamaan tulevissa versioissa. "
"Ole hyvä ja älä käytä niitä."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Mitään ei näy, koska meshiä ei ole asetettu."
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index 89cd86eefd..60445be723 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -1459,6 +1459,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1735,7 +1739,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3813,15 +3817,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3871,10 +3875,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5759,7 +5759,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11854,6 +11854,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index 9e930d28d3..2c53fcb8e2 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -74,7 +74,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-09 19:05+0000\n"
+"PO-Revision-Date: 2020-02-27 07:01+0000\n"
"Last-Translator: Pierre Caye <pierrecaye@laposte.net>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
@@ -83,7 +83,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -760,9 +760,8 @@ msgid "Line Number:"
msgstr "Numéro de ligne :"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Remplacer…"
+msgstr "%d remplacé."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1564,6 +1563,10 @@ msgstr "Nom"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Coller les paramètres"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Mise à jour de la scène"
@@ -1851,7 +1854,7 @@ msgstr "Montrer dans le gestionnaire de fichiers"
msgid "New Folder..."
msgstr "Nouveau dossier..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Rafraîchir"
@@ -4058,6 +4061,10 @@ msgid "Saving..."
msgstr "Enregistrement…"
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d fichiers"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Définir comme défaut pour « %s »"
@@ -4066,10 +4073,6 @@ msgid "Clear Default for '%s'"
msgstr "Effacer le préréglage par défaut pour « %s »"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Fichiers"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importer comme :"
@@ -4119,10 +4122,6 @@ msgid "Copy Params"
msgstr "Copier paramètres"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Coller les paramètres"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Modifier le Presse-papiers de la ressource"
@@ -5953,9 +5952,8 @@ msgid "Mesh is empty!"
msgstr "Le maillage est vide !"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Créer une collision Trimesh"
+msgstr "Impossible de créer une forme de collision Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5972,29 +5970,30 @@ msgstr "Créer une forme Trimesh statique"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Impossible de créer une forme de collision convexe unique pour la racine de "
+"la scène."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Impossible de créer une forme de collision convexe unique."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Créer une(des) forme(s) convexe(s)"
+msgstr "Créer une forme convexe unique"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Impossible de créer des formes de collision convexes multiples pour la "
+"racine de la scène."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Impossible de créer le dossier."
+msgstr "Impossible de créer des formes de collision."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Créer une(des) forme(s) convexe(s)"
+msgstr "Créer des formes convexes multiples"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6053,6 +6052,10 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crée un StaticBody et lui attribue automatiquement une forme de collision "
+"basée sur les polygones.\n"
+"C'est l'option la plus précise (mais la plus lente) pour la détection des "
+"collisions."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6063,28 +6066,34 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crée une forme de collision basée sur les polygones.\n"
+"C'est l'option la plus précise (mais la plus lente) pour la détection des "
+"collisions."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Créer une(des) collision(s) convexe(s) sœur(s)"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Créer une unique collision convexe sœur"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Crée une forme de collision convexe unique.\n"
+"C'est l'option la plus rapide (mais la moins précise) pour la détection des "
+"collisions."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Créer une(des) collision(s) convexe(s) sœur(s)"
+msgstr "Créer une collision convexe multiple sœur(s)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Crée une forme de collision basée sur les polygones.\n"
+"Il s'agit d'une performance à mi-chemin entre les deux options ci-dessus."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6097,6 +6106,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Crée un maillage de contour statique. Le maillage de contour verra ses "
+"normales inversées automatiquement.\n"
+"Cela peut être utilisé à la place de la propriété SpatialMaterial Grow "
+"lorsque l'utilisation de cette propriété n'est pas possible."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9696,36 +9709,32 @@ msgid "Export With Debug"
msgstr "Exporter avec debug"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Le chemin vers ce fichier n'existe pas."
+msgstr "Le chemin spécifié n'existe pas."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Erreur d'ouverture de paquetage, pas au format ZIP."
+msgstr ""
+"Erreur lors de l'ouverture du fichier package (il n'est pas au format ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Fichier de projet « .zip » invalide, il ne contient pas de fichier « project."
-"godot »."
+"Fichier de projet \".zip\" invalide ; il ne contient pas de fichier \"projet."
+"godot\"."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Veuillez choisir un dossier vide."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Veuillez choisir un fichier « project.godot » ou « .zip »."
+msgstr "Veuillez choisir un fichier \"project.godot\" ou \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Le répertoire contient déjà un projet Godot."
+msgstr "Ce répertoire contient déjà un projet Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10426,9 +10435,8 @@ msgid "Suffix"
msgstr "Suffixe"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Expressions régulières"
+msgstr "Utiliser des expressions régulières"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10467,7 +10475,6 @@ msgstr ""
"Comparez les options du compteur."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Compteur par niveau"
@@ -10508,14 +10515,12 @@ msgid "Keep"
msgstr "Conserver"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase vers sous_ligné"
+msgstr "PascalCase vers snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "sous_ligné vers CamelCase"
+msgstr "snake_case vers PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10534,14 +10539,12 @@ msgid "Reset"
msgstr "Réinitialiser"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Expressions régulières"
+msgstr "Erreur d'expression régulière"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Caractères valides :"
+msgstr "À caractère %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -11007,9 +11010,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nom ou chemin parent hérité invalide."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Script valide."
+msgstr "Le chemin/nom du script est valide."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11100,9 +11102,8 @@ msgid "Copy Error"
msgstr "Copier l'erreur"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Mémoire vidéo"
+msgstr "Vidéo RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12538,6 +12539,11 @@ msgstr ""
"Les formes planes ne fonctionnent pas bien et seront supprimées dans les "
"versions futures. S'il vous plaît, ne les utilisez pas."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Rien n'est visible car aucun maillage n'a été assigné."
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 7920e0513b..e4e77fffc1 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -1453,6 +1453,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1729,7 +1733,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3807,15 +3811,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Amharc ar Chomhaid"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3865,10 +3870,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5752,7 +5753,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11850,6 +11851,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/he.po b/editor/translations/he.po
index 0509e77e01..17e04827a0 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -10,12 +10,13 @@
# Ido Dana <idodana01@gmail.com>, 2019.
# Daniel Dovgun <daniel.dovgun@gmail.com>, 2019.
# MordechaiHadad <Mordechai.hadad01@gmail.com>, 2019.
+# Daniel <danielharush5252@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-09-07 13:51+0000\n"
-"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
+"PO-Revision-Date: 2020-02-25 09:41+0000\n"
+"Last-Translator: Daniel <danielharush5252@gmail.com>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/godot-engine/"
"godot/he/>\n"
"Language: he\n"
@@ -24,7 +25,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && "
"n % 10 == 0) ? 2 : 3));\n"
-"X-Generator: Weblate 3.9-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -33,7 +34,7 @@ msgstr "משתנה סוג ×œ× ×—×•×§×™ לפונקציית convert()‎, יש ל
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr ""
+msgstr "צופה מחרוזת ב×ורך 1 (תו)"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -1534,6 +1535,10 @@ msgstr "ש×"
msgid "Singleton"
msgstr "יחידני"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "הדבקת משתני×"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "הסצנה מתעדכנת"
@@ -1839,7 +1844,7 @@ msgstr "הצגה במנהל הקבצי×"
msgid "New Folder..."
msgstr "תיקייה חדשה…"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "רענון"
@@ -4034,6 +4039,11 @@ msgid "Saving..."
msgstr "שמירה…"
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " קבצי×"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "הגדרה כבררת מחדל עבור ‚%s’"
@@ -4042,10 +4052,6 @@ msgid "Clear Default for '%s'"
msgstr "מחיקת בררת מחדל עבור ‚%s’"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " קבצי×"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "×™×™×‘×•× ×‘×ª×•×¨:"
@@ -4095,10 +4101,6 @@ msgid "Copy Params"
msgstr "העתקת משתני×"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "הדבקת משתני×"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "לוח גזירי המש××‘×™× ×¨×™×§!"
@@ -6104,7 +6106,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "יצירת מצולע"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12507,6 +12509,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index f26820b011..d043407257 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -1483,6 +1483,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1765,7 +1769,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3862,15 +3866,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3920,10 +3924,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "à¤à¤¡à¤¿à¤Ÿ रिसोरà¥à¤¸ कà¥à¤²à¤¿à¤ªà¤¬à¥‹à¤°à¥à¤¡"
@@ -5808,7 +5808,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12034,6 +12034,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 280116550f..ce8191c638 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -1468,6 +1468,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1744,7 +1748,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3826,15 +3830,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Datoteka:"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3884,10 +3889,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5784,7 +5785,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11909,6 +11910,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 754f297fec..cbe475b022 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -1553,6 +1553,10 @@ msgstr "Név"
msgid "Singleton"
msgstr "Egyke"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Paraméterek Beillesztése"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Scene Frissítése"
@@ -1859,7 +1863,7 @@ msgstr "Mutat Fájlkezelőben"
msgid "New Folder..."
msgstr "Új Mappa..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Frissítés"
@@ -4137,6 +4141,11 @@ msgid "Saving..."
msgstr "Mentés..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Fájlok"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Beállítás Alapértelmezettként '%s'-hez"
@@ -4145,10 +4154,6 @@ msgid "Clear Default for '%s'"
msgstr "Alapértelmezett Törlése '%s'-nél"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Fájlok"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importálás Mint:"
@@ -4198,10 +4203,6 @@ msgid "Copy Params"
msgstr "Paraméterek Másolása"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Paraméterek Beillesztése"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Az erőforrás vágólap üres!"
@@ -6257,7 +6258,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Konvex Ütközési Testvér Létrehozása"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12698,6 +12699,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 3cd3ae4624..c4ead514c6 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -29,8 +29,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-14 03:19+0000\n"
-"Last-Translator: zephyroths <ridho.hikaru@gmail.com>\n"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
+"Last-Translator: Sofyan Sugianto <sofyanartem@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -38,7 +38,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -708,9 +708,8 @@ msgid "Line Number:"
msgstr "Nomor Baris:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Gantikan..."
+msgstr "%d telah diganti."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1508,6 +1507,10 @@ msgstr "Nama"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Tempel Parameter"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Memperbarui Skena"
@@ -1794,7 +1797,7 @@ msgstr "Tampilkan di Manajer Berkas"
msgid "New Folder..."
msgstr "Buat Direktori..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Segarkan"
@@ -3973,6 +3976,10 @@ msgid "Saving..."
msgstr "Menyimpan..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Berkas"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Jadikan Baku untuk '%s'"
@@ -3981,10 +3988,6 @@ msgid "Clear Default for '%s'"
msgstr "Bersihkan Baku untuk '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Berkas"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Impor sebagai:"
@@ -4033,10 +4036,6 @@ msgid "Copy Params"
msgstr "Salin Parameter"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Tempel Parameter"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Sunting Papan Klip Resource"
@@ -5851,9 +5850,8 @@ msgid "Mesh is empty!"
msgstr "Mesh kosong!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Buat Trimesh Collision Sibling"
+msgstr "Tidak dapat membuat bentuk collision Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5869,11 +5867,11 @@ msgstr "Buat Bentuk Trimesh Statis"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Tidak dapat membuat convex collision shape tunggal untuk skena root."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Tidak dapat membuat convex collision shape tunggal."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -5882,17 +5880,16 @@ msgstr "Buat Bentuk Cembung"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "Tidak dapat membuat beberapa convex collision shape untuk skena root."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Tidak dapat membuat folder."
+msgstr "Tidak dapat membuat bentuk collision."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Buat Bentuk Cembung"
+msgstr "Buat Beberapa Bentuk Cembung"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5948,6 +5945,10 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Buat StaticBody dan tetapkan collision shape berbasis poligon untuknya "
+"secara otomatis.\n"
+"Opsi ini merupakan yang paling akurat (tapi paling lambat) untuk deteksi "
+"collision."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5958,28 +5959,35 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Buat collision shape berbasis poligon.\n"
+"Opsi ini merupakan yang paling akurat (tapi paling lambat) untuk deteksi "
+"collision."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Buat Convex Collision Sibling"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Buat Saudara Tunggal Convex Collision"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Buat convex collision shape tunggal.\n"
+"Opsi ini merupakan yang paling cepat (tapi paling tidak akurat) untuk "
+"deteksi collision."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Buat Convex Collision Sibling"
+msgstr "Buat Beberapa Saudara Convex Collision"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Buat collision shape berbasis poligon.\n"
+"Opsi ini kinerjanya berada di antara dua opsi di atas."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5992,6 +6000,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Buat outline mesh statis. Outline mesh akan memiliki garis normal yang akan "
+"dibalik otomatis.\n"
+"Ini dapat digunakan sebagai pengganti properti Grow dari SpatialMaterial "
+"ketika tidak dapat menggunakan properti itu."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9581,32 +9593,29 @@ msgid "Export With Debug"
msgstr "Ekspor dengan Awakutu"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Lokasi ini tidak ada."
+msgstr "Lokasi yang ditentukan tidak ada."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Gagal saat membuka paket, tidak dalam bentuk zip."
+msgstr "Galat saat membuka berkas paket (tidak dalam format ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr "Berkas proyek '.zip' tidak valid, tidak berisi berkas 'project.godot'."
+msgstr ""
+"Berkas proyek \".zip\" tidak valid; tidak terdapat berkas \"project.godot\" "
+"di dalamnya."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Silakan pilih direktori kosong."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Silakan pilih berkas 'project.godot' atau '.zip'."
+msgstr "Silakan pilih berkas \"project.godot\" atau \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
msgstr "Direktori ini sudah berisi proyek Godot."
@@ -10304,9 +10313,8 @@ msgid "Suffix"
msgstr "Akhiran"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Ekspresi Reguler"
+msgstr "Gunakan Ekspresi Reguler"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10345,7 +10353,6 @@ msgstr ""
"Bandingkan opsi penghitung."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Penghitung per Level"
@@ -10386,14 +10393,12 @@ msgid "Keep"
msgstr "Pertahankan"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase ke under_score"
+msgstr "PascalCase ke snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_score ke CamelCase"
+msgstr "snake_case ke PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10412,14 +10417,12 @@ msgid "Reset"
msgstr "Reset"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Ekspresi Reguler"
+msgstr "Kesalahan Ekspresi Reguler"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Karakter sah:"
+msgstr "Pada karakter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10598,11 +10601,13 @@ msgstr "Node Lainnya"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
+msgstr "Tidak dapat bekerja pada node dari skena luar!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
msgstr ""
+"Tidak dapat mengoperasikan perintah ini pada node skena saat ini yang "
+"mewarisi skena lain!"
#: editor/scene_tree_dock.cpp
msgid "Attach Script"
@@ -10885,9 +10890,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nama atau lokasi parent yang diwariskan tidak valid."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Skrip valid."
+msgstr "Lokasi/nama skrip valid."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10978,9 +10982,8 @@ msgid "Copy Error"
msgstr "Salin Galat"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Memori Video"
+msgstr "RAM Video"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -11295,8 +11298,9 @@ msgid "GridMap Paste Selection"
msgstr "Rekat(Paste) Seleksi GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "GridMap Paint"
-msgstr ""
+msgstr "Cat GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -11642,6 +11646,9 @@ msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
+"Tidak dapat drop properti karena skrip '%s' sedang tidak digunakan dalam "
+"skena ini.\n"
+"Drop dengan menekan 'Shift' untuk hanya menyalin tanda tangan (signature)."
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Getter Property"
@@ -11713,11 +11720,11 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Select at least one node with sequence port."
-msgstr ""
+msgstr "Pilih setidaknya satu node dengan port urutan."
#: modules/visual_script/visual_script_editor.cpp
msgid "Try to only have one sequence input in selection."
-msgstr ""
+msgstr "Usahakan hanya memiliki satu input urutan dalam pemilihan."
#: modules/visual_script/visual_script_editor.cpp
msgid "Create Function"
@@ -11745,7 +11752,7 @@ msgstr "Mengedit Sinyal:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Make Tool:"
-msgstr ""
+msgstr "Buat Alat:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Members:"
@@ -11785,7 +11792,7 @@ msgstr "Salin Node"
#: modules/visual_script/visual_script_editor.cpp
msgid "Cut Nodes"
-msgstr ""
+msgstr "Potong Node"
#: modules/visual_script/visual_script_editor.cpp
msgid "Make Function"
@@ -11862,15 +11869,15 @@ msgstr "Cari VisualScript"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Get %s"
-msgstr ""
+msgstr "Dapatkan %s"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Set %s"
-msgstr ""
+msgstr "Setel %s"
#: platform/android/export/export.cpp
msgid "Package name is missing."
-msgstr ""
+msgstr "Nama paket tidak ada."
#: platform/android/export/export.cpp
msgid "Package segments must be of non-zero length."
@@ -12348,6 +12355,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/is.po b/editor/translations/is.po
index d55e21cafa..213e7d239b 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -1486,6 +1486,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1765,7 +1769,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3850,15 +3854,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3908,10 +3912,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5816,7 +5816,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Breyta Viðbót"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11971,6 +11971,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 8c912c4b59..738718a0fa 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -43,11 +43,12 @@
# Katia Piazza <gydey@ridiculousglitch.com>, 2019.
# nickfla1 <lanterniniflavio@gmail.com>, 2019.
# Fabio Iotti <fabiogiopla@gmail.com>, 2020.
+# Douglas Fiedler <dognew@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-27 07:09+0000\n"
+"PO-Revision-Date: 2020-02-27 07:01+0000\n"
"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
@@ -56,7 +57,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -726,9 +727,8 @@ msgid "Line Number:"
msgstr "Numero linea:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Rimpiazza..."
+msgstr "%d rimpiazzato."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1529,6 +1529,10 @@ msgstr "Nome"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Incolla Parametri"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Aggiornamento scena"
@@ -1816,7 +1820,7 @@ msgstr "Mostra nel gestore file"
msgid "New Folder..."
msgstr "Nuova cartella..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Aggiorna"
@@ -4015,6 +4019,10 @@ msgid "Saving..."
msgstr "Salvataggio..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d File"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Imposta come Default per '%s'"
@@ -4023,10 +4031,6 @@ msgid "Clear Default for '%s'"
msgstr "Elimina Default per '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Files"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importa Come:"
@@ -4075,10 +4079,6 @@ msgid "Copy Params"
msgstr "Copia parametri"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Incolla Parametri"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Modifica Appunti Risorse"
@@ -5906,9 +5906,8 @@ msgid "Mesh is empty!"
msgstr "La mesh è vuota!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Crea Fratello di Collisione Trimesh"
+msgstr "Non poteva creare una forma di collisione Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5925,29 +5924,30 @@ msgstr "Crea Forma Statica Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Impossibile creare una singola forma di collisione convessa per la radice "
+"della scena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Impossibile creare una singola forma di collisione convessa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Crea una o più forme Convesse"
+msgstr "Crea Singola Forma di Collisione Convessa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Impossibile creare più forme di collisione convesse per la radice della "
+"scena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Impossibile creare la cartella."
+msgstr "Impossibile creare alcuna forma di collisione."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Crea una o più forme Convesse"
+msgstr "Crea Multiple Forme Covesse"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6004,6 +6004,10 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea una StaticBody e le assegna automaticamente una forma di collisione "
+"basata sui poligoni.\n"
+"Questa é l'opzione piú accurata (anche se piú lenta) per il calcolo delle "
+"collisioni."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6014,28 +6018,36 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Crea una forma di collisione basata sui poligoni.\n"
+"Questa é l'opzione piú accurata (anche se piú lenta) per il calcolo delle "
+"collisioni."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Crea Fratello(i) di Collisione Convessa"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Crea Singolo Fratello di Collisione Convessa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Crea una singola forma di collisione convessa.\n"
+"Questa é l'opzione piú veloce (anche se meno accurata) per il calcolo delle "
+"collisioni."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Crea Fratello(i) di Collisione Convessa"
+msgstr "Crea Multipli Fratelli di Collsione Convessa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Crea una forma di collisione basata sui poligoni.\n"
+"Questa opzione é, in termini di perfomance, un compromesso tra le due "
+"opzioni prima di questa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6048,6 +6060,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Crea intorno una mesh statica. Questa mesh avrà le suoe normali invertite "
+"automaticamente.\n"
+"Questo puó essere usato come sostitutivo per la proprietà Grow (ingrandisci) "
+"delle SpatialMaterial quando questa non é disponibile."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -7238,7 +7254,7 @@ msgstr "Scalatura: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translating: "
-msgstr "Traducendo: "
+msgstr "Spostamento: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -9637,35 +9653,31 @@ msgid "Export With Debug"
msgstr "Esporta Con Debug"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Percorso non esistente."
+msgstr "Il percorso specificato non é esistente."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Errore nell'apertura del file package: non è in formato ZIP."
+msgstr "Errore nell'apertura del file package (non è in formato ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"File di progetto '.zip' non valido, non contiene un file 'project.godot'."
+"File progetto '.zip' non valido; non contiene un file denominato 'project."
+"godot'."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Si prega di scegliere una cartella vuota."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Si prega di scegliere un file 'project.godot' o '.zip'."
+msgstr "Perfavore, scegli un file 'project.godot' o '.zip'."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "La Cartella contiene già un progetto di Godot."
+msgstr "Questa cartella contiene già un progetto Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10364,9 +10376,8 @@ msgid "Suffix"
msgstr "Suffisso"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Espressioni Regolari"
+msgstr "Usa Espressioni Regolari"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10405,7 +10416,6 @@ msgstr ""
"Confronta le opzioni del contatore."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Contatore per Livello"
@@ -10446,14 +10456,12 @@ msgid "Keep"
msgstr "Mantieni"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase a under_score"
+msgstr "PascalCase a snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_score a CamelCase"
+msgstr "snake_case a PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10472,14 +10480,12 @@ msgid "Reset"
msgstr "Reset"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Espressioni Regolari"
+msgstr "Errore Espressione Regolare"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Caratteri validi:"
+msgstr "Al carattere %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10945,9 +10951,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nome o percorso genitore ereditato non valido."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Lo script è valido."
+msgstr "Il nome e la path dello script sono validi."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11038,9 +11043,8 @@ msgid "Copy Error"
msgstr "Errore di Copia"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Mem Video"
+msgstr "RAM Video"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12469,6 +12473,11 @@ msgstr ""
"Le forme planari non funzionano bene e verranno rimosse nelle versioni "
"future. Per favore, non usarle."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Niente è visibile perché non è stata assegnata alcuna mesh."
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 43bca13c13..3c14b17b53 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -35,7 +35,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-14 16:48+0000\n"
+"PO-Revision-Date: 2020-03-05 08:33+0000\n"
"Last-Translator: Akihiro Ogoshi <technical@palsystem-game.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
@@ -44,7 +44,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -716,9 +716,8 @@ msgid "Line Number:"
msgstr "行番å·:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "ç½®æ›..."
+msgstr "%d ã‚’ç½®æ›ã—ã¾ã—ãŸã€‚"
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1514,6 +1513,10 @@ msgstr "åå‰"
msgid "Singleton"
msgstr "シングルトン"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "パラメーターを貼り付ã‘"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "シーンを更新"
@@ -1671,11 +1674,11 @@ msgstr "(エディタ無効ã€ãƒ—ロパティ無効)"
#: editor/editor_feature_profile.cpp
msgid "(Properties Disabled)"
-msgstr "(プロパティ無効)"
+msgstr "(プロパティ無効)"
#: editor/editor_feature_profile.cpp
msgid "(Editor Disabled)"
-msgstr "(エディタ無効)"
+msgstr "(エディタ無効)"
#: editor/editor_feature_profile.cpp
msgid "Class Options:"
@@ -1801,7 +1804,7 @@ msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã§è¡¨ç¤º"
msgid "New Folder..."
msgstr "æ–°è¦ãƒ•ã‚©ãƒ«ãƒ€..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "å†èª­è¾¼"
@@ -2099,7 +2102,7 @@ msgstr "プロパティ:"
#: editor/editor_inspector.cpp
msgid "Set"
-msgstr "設定"
+msgstr "Set"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
@@ -2204,7 +2207,7 @@ msgstr "書込むファイルを開ã‘ã¾ã›ã‚“:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
-msgstr "ファイル形å¼ãŒä¸æ˜Ž:"
+msgstr "è¦æ±‚ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã¯ä¸æ˜Žã§ã™:"
#: editor/editor_node.cpp
msgid "Error while saving."
@@ -3976,6 +3979,10 @@ msgid "Saving..."
msgstr "ä¿å­˜ä¸­..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d ファイル"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "'%s' ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦è¨­å®š"
@@ -3984,10 +3991,6 @@ msgid "Clear Default for '%s'"
msgstr "'%s' ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’クリア"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " ファイル"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "åå‰ã‚’付ã‘ã¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆ:"
@@ -4036,10 +4039,6 @@ msgid "Copy Params"
msgstr "パラメーターをコピー"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "パラメーターを貼り付ã‘"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "リソースã®ã‚¯ãƒªãƒƒãƒ—ボードを編集"
@@ -4292,7 +4291,7 @@ msgstr "BlendSpace2Dã®ãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Remove BlendSpace2D Triangle"
-msgstr "BlendSpace2D三角形を削除ã™ã‚‹"
+msgstr "BlendSpace2Dã®ä¸‰è§’形を削除ã™ã‚‹"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
@@ -5066,7 +5065,7 @@ msgstr "å…¬å¼"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Testing"
-msgstr "テスト中"
+msgstr "テストã™ã‚‹"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Loading..."
@@ -5827,7 +5826,7 @@ msgstr "å³ã‚¯ãƒªãƒƒã‚¯ã§ç‚¹ã‚’追加"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
-msgstr "グローãƒãƒ«ã‚¤ãƒ«ãƒŸãƒãƒ¼ã‚·ãƒ§ãƒ³ã®äº‹å‰è¨ˆç®—"
+msgstr "GIプローブã®ç„¼ãè¾¼ã¿"
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Gradient Edited"
@@ -5854,9 +5853,8 @@ msgid "Mesh is empty!"
msgstr "メッシュãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "三角形メッシュ兄弟コリジョンを生æˆ"
+msgstr "トライメッシュコリジョンシェイプを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5864,7 +5862,7 @@ msgstr "三角形メッシュé™çš„ボディを作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
-msgstr "シーンã®ãƒ«ãƒ¼ãƒˆã§ã¯ç„¡åŠ¹ã§ã™!"
+msgstr "ã“ã‚Œã¯ã‚·ãƒ¼ãƒ³ã®ãƒ«ãƒ¼ãƒˆã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Shape"
@@ -5873,29 +5871,28 @@ msgstr "三角形メッシュé™çš„シェイプを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"シーンã®ãƒ«ãƒ¼ãƒˆã«å˜ä¸€ã®å‡¸åž‹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "凸状シェイプを作æˆ"
+msgstr "å˜ä¸€ã®å‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"シーンã®ãƒ«ãƒ¼ãƒˆã«è¤‡æ•°ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "コリジョンシェイプを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "凸状シェイプを作æˆ"
+msgstr "複数ã®å‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5919,7 +5916,7 @@ msgstr "モデルã«ã¯ã“ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«UVãŒã‚ã‚Šã¾ã›ã‚“"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
-msgstr "メッシュインスタンスã«ãƒ¡ãƒƒã‚·ãƒ¥ãŒä¸è¶³ã—ã¦ã„ã¾ã™!"
+msgstr "MeshInstanceã«ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚ã‚Šã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
@@ -5951,6 +5948,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"StaticBodyを作æˆã—ã€ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を自動的ã«å‰²ã‚Šå½“ã¦ã¾"
+"ã™ã€‚\n"
+"ã“ã‚Œã¯ã€è¡çªæ¤œå‡ºã®æœ€ã‚‚正確ãª(ãŸã ã—最もé…ã„)オプションã§ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5961,28 +5961,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n"
+"ã“ã‚Œã¯ã€è¡çªæ¤œå‡ºã®æœ€ã‚‚正確ãª(ãŸã ã—最もé…ã„)オプションã§ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "凸型兄弟関係コリジョンを生æˆ"
+msgid "Create Single Convex Collision Sibling"
+msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n"
+"ã“ã‚Œã¯ã€è¡çªæ¤œå‡ºã®æœ€é€Ÿã®(ãŸã ã—精度ãŒæœ€ã‚‚低ã„)オプションã§ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "凸型兄弟関係コリジョンを生æˆ"
+msgstr "複数ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆã™ã‚‹"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"ãƒãƒªã‚´ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n"
+"ã“ã‚Œã¯ã€ä¸Šè¨˜ã®2ã¤ã®ã‚ªãƒ—ションã®ä¸­é–“çš„ãªãƒ‘フォーマンスã§ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5995,6 +6000,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"é™çš„ãªã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ãƒ¡ãƒƒã‚·ãƒ¥ã‚’作æˆã—ã¾ã™ã€‚アウトラインメッシュã®æ³•ç·šã¯è‡ªå‹•çš„ã«"
+"å転ã—ã¾ã™ã€‚\n"
+"ã“ã®ãƒ—ロパティを使用ã§ããªã„å ´åˆã¯ã€SpatialMaterialã®Growプロパティを代ã‚ã‚Šã«"
+"使用ã§ãã¾ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6230,11 +6239,11 @@ msgstr "AABBを生æˆä¸­"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
-msgstr "軸平行境界ボックスã®å¯è¦–性を生æˆã™ã‚‹"
+msgstr "å¯è¦–性ã®AABBを生æˆ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate AABB"
-msgstr "軸平行境界ボックス(AABB)を生æˆ"
+msgstr "AABBを生æˆ"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
@@ -6337,14 +6346,12 @@ msgid "Set Curve Point Position"
msgstr "カーブãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’設定"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve In Position"
-msgstr "曲線ã®ä½ç½®ã‚’設定"
+msgstr "曲線ã®In-Controlã®ä½ç½®ã‚’指定"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Out Position"
-msgstr "曲線ã®Out-ãƒãƒ³ãƒ‰ãƒ«ã®ä½ç½®ã‚’指定"
+msgstr "曲線ã®Out-Controlã®ä½ç½®ã‚’指定"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
@@ -6613,7 +6620,7 @@ msgstr "リソースを読ã¿è¾¼ã‚€"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ResourcePreloader"
-msgstr "リソースプリローダー"
+msgstr "ResourcePreloader"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7018,11 +7025,11 @@ msgstr "行を折りãŸãŸã‚€/展開ã™ã‚‹"
#: editor/plugins/script_text_editor.cpp
msgid "Fold All Lines"
-msgstr "ã™ã¹ã¦ã®è¡Œã‚’折りãŸãŸã‚€"
+msgstr "å…¨ã¦ã®è¡Œã‚’折りãŸãŸã‚€"
#: editor/plugins/script_text_editor.cpp
msgid "Unfold All Lines"
-msgstr "ã™ã¹ã¦ã®è¡Œã‚’展開ã™ã‚‹"
+msgstr "å…¨ã¦ã®è¡Œã‚’展開ã™ã‚‹"
#: editor/plugins/script_text_editor.cpp
msgid "Clone Down"
@@ -7127,7 +7134,7 @@ msgstr "ボーンã¸ãƒ¬ã‚¹ãƒˆãƒ»ãƒãƒ¼ã‚ºã‚’設定ã™ã‚‹"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
-msgstr "スケルトン2D"
+msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Make Rest Pose (From Bones)"
@@ -7163,7 +7170,7 @@ msgstr "é€è¦–投影"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
-msgstr "変æ›ã¯ä¸­æ­¢ã•ã‚Œã¾ã—ãŸ."
+msgstr "トランスフォームã¯ä¸­æ­¢ã•ã‚Œã¾ã—ãŸã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "X-Axis Transform."
@@ -7287,7 +7294,7 @@ msgstr "回転をビューã«åˆã‚ã›ã‚‹"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr "å­ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’生æˆã™ã‚‹ãŸã‚ã®è¦ªãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
+msgstr "å­ã‚’インスタンス化ã™ã‚‹ãŸã‚ã®è¦ªãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
@@ -7378,9 +7385,8 @@ msgid "Freelook Speed Modifier"
msgstr "フリールックã®é€Ÿåº¦ã‚’調整"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Slow Modifier"
-msgstr "フリールックã®é€Ÿåº¦ã‚’調整"
+msgstr "フリールックã®æ¸›é€Ÿã‚’調整"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -7400,7 +7406,7 @@ msgstr "Xformダイアログ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes To Floor"
-msgstr "ノードを底é¢ã«ã‚¹ãƒŠãƒƒãƒ—ã•ã›ã‚‹"
+msgstr "ノードをフロアã«ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
@@ -7475,7 +7481,7 @@ msgstr "トランスフォーム"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Object to Floor"
-msgstr "オブジェクトを底é¢ã«ã‚¹ãƒŠãƒƒãƒ—"
+msgstr "オブジェクトをフロアã«ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
@@ -8213,7 +8219,7 @@ msgstr "æ–°è¦ãƒãƒªã‚´ãƒ³ã‚’生æˆã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
-msgstr "領域Rect内ã«ãƒãƒªã‚´ãƒ³ã‚’ä¿æŒã—ã¾ã™ã€‚"
+msgstr "領域Rect内ã®ãƒãƒªã‚´ãƒ³ã‚’ä¿æŒã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Enable snap and show grid (configurable via the Inspector)."
@@ -8262,8 +8268,8 @@ msgid ""
"Drag handles to edit Rect.\n"
"Click on another Tile to edit it."
msgstr ""
-"四角形を編集ã™ã‚‹ãŸã‚ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¾ã™ã€‚編集ã®ãŸã‚別ã®ã‚¿ã‚¤ãƒ«ã‚’クリック"
-"ã—ã¾ã™ã€‚"
+"ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ã¦çŸ©å½¢ã‚’編集ã—ã¾ã™ã€‚\n"
+"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete selected Rect."
@@ -8275,7 +8281,7 @@ msgid ""
"Click on another Tile to edit it."
msgstr ""
"ç¾åœ¨ç·¨é›†ä¸­ã®ã‚µãƒ–タイルをé¸æŠžã—ã¾ã™ã€‚\n"
-"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚"
+"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete polygon."
@@ -8288,10 +8294,10 @@ msgid ""
"Shift+LMB: Set wildcard bit.\n"
"Click on another Tile to edit it."
msgstr ""
-"左クリック:ビットをオンã«è¨­å®šã—ã¾ã™ã€‚\n"
+"左クリック:ビットをオンã«ã—ã¾ã™ã€‚\n"
"å³ã‚¯ãƒªãƒƒã‚¯:ビットをオフã«ã—ã¾ã™ã€‚\n"
"Shift+左クリック:ワイルドカード・ビットを設定ã—ã¾ã™ã€‚\n"
-"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚"
+"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -8316,8 +8322,8 @@ msgid ""
"Select sub-tile to change its z index.\n"
"Click on another Tile to edit it."
msgstr ""
-"Zインデックスを変更ã™ã‚‹ã«ã¯ã€ã‚µãƒ–タイルをé¸æŠžã—ã¾ã™ã€‚\n"
-"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ç·¨é›†ã—ã¾ã™ã€‚"
+"サブタイルをé¸æŠžã—ã¦ã€zインデックスを変更ã—ã¾ã™ã€‚\n"
+"別ã®ã‚¿ã‚¤ãƒ«ã‚’クリックã—ã¦ãれを編集ã—ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Region"
@@ -8514,19 +8520,19 @@ msgstr "出力を追加"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar"
-msgstr "スカラー"
+msgstr "Scalar"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector"
-msgstr "ベクター(Vector)"
+msgstr "Vector"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean"
-msgstr "ブール"
+msgstr "Boolean"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Sampler"
-msgstr "サンプラー"
+msgstr "Sampler"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add input port"
@@ -8566,7 +8572,7 @@ msgstr "å¼ã®è¨­å®š"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Resize VisualShader node"
-msgstr "ビジュアルシェーダーノードã®ã‚µã‚¤ã‚ºã‚’変更ã™ã‚‹"
+msgstr "VisualShaderノードã®ã‚µã‚¤ã‚ºã‚’変更"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
@@ -8619,7 +8625,7 @@ msgstr "シェーダーノードã®ä½œæˆ"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color function."
-msgstr "カラー関数。"
+msgstr "Color関数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
@@ -8679,11 +8685,11 @@ msgstr "SoftLight演算å­ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color constant."
-msgstr "カラー定数。"
+msgstr "Color定数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color uniform."
-msgstr "色ã®uniform。"
+msgstr "Colorã®uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the %s comparison between two parameters."
@@ -8811,7 +8817,7 @@ msgstr "ãƒã‚¤ãƒ”ア数(2.718282)。自然対数ã®ãƒ™ãƒ¼ã‚¹ã‚’表ã—ã¾ã™ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Epsilon constant (0.00001). Smallest possible scalar number."
-msgstr "Î¥(イプシロン)定数(0.00001)。å¯èƒ½ãªæœ€å°ã®ã‚¹ã‚«ãƒ©ãƒ¼æ•°ã€‚"
+msgstr "Î¥(イプシロン)定数(0.00001)。使用å¯èƒ½ãªæœ€å°ã®ã‚¹ã‚«ãƒ©ãƒ¼æ•°ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Phi constant (1.618034). Golden ratio."
@@ -9041,7 +9047,7 @@ msgstr "スカラー定数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar uniform."
-msgstr "スカラã®uniform。"
+msgstr "Scalarã®uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the cubic texture lookup."
@@ -9113,14 +9119,12 @@ msgid "Multiplies vector by transform."
msgstr "トランスフォームã§ãƒ™ã‚¯ãƒˆãƒ«ã‚’ä¹—ç®—ã—ã¾ã™ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform constant."
-msgstr "トランスフォームã¯ä¸­æ­¢ã•ã‚Œã¾ã—ãŸ."
+msgstr "トランスフォーム定数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Transform uniform."
-msgstr "トランスフォームã¯ä¸­æ­¢ã•ã‚Œã¾ã—ãŸ."
+msgstr "トランスフォーム用uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector function."
@@ -9270,9 +9274,8 @@ msgid "Vector constant."
msgstr "ベクトル定数。"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Vector uniform."
-msgstr "uniform ã¸ã®å‰²ã‚Šå½“ã¦ã€‚"
+msgstr "ベクトルuniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9359,7 +9362,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "VisualShader"
-msgstr "ビジュアルシェーダー"
+msgstr "VisualShader"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Edit Visual Property"
@@ -9524,7 +9527,7 @@ msgstr "テキスト"
#: editor/project_export.cpp
msgid "Compiled"
-msgstr "コンパイル"
+msgstr "コンパイル済ã¿"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
@@ -9575,21 +9578,19 @@ msgid "Export With Debug"
msgstr "デãƒãƒƒã‚°ä»˜ãエクスãƒãƒ¼ãƒˆ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "存在ã—ãªã„パスã§ã™ã€‚"
+msgstr "指定ã•ã‚ŒãŸãƒ‘スã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "パッケージファイルを開ã‘ã¾ã›ã‚“ã§ã—ãŸã€zip å½¢å¼ã§ã¯ã‚ã‚Šã¾ã›ã‚“。"
+msgstr ""
+"パッケージ ファイルを開ãã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠(ZIPå½¢å¼ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"無効㪠'.zip' プロジェクトファイルã§ã™ã€‚'project.godot' ファイルãŒå«ã¾ã‚Œã¦ã„"
+"無効ãª\".zip\"プロジェクトファイルã§ã™ã€‚\"project.godot\"ファイルãŒå«ã¾ã‚Œã¦ã„"
"ã¾ã›ã‚“。"
#: editor/project_manager.cpp
@@ -9597,14 +9598,12 @@ msgid "Please choose an empty folder."
msgstr "空ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¦ãã ã•ã„。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "'project.godot' ã‚‚ã—ã㯠'.zip' ファイルをé¸æŠžã—ã¦ãã ã•ã„."
+msgstr "\"project.godot\"ã¾ãŸã¯\".zip\"ファイルをé¸æŠžã—ã¦ãã ã•ã„。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "ディレクトリã«ã¯GodotプロジェクトãŒã™ã§ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
+msgstr "ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã¯ã™ã§ã«GodotプロジェクトãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10090,9 +10089,8 @@ msgid "Settings saved OK."
msgstr "設定ã®ä¿å­˜ã«æˆåŠŸã—ã¾ã—ãŸ."
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Moved Input Action Event"
-msgstr "入力アクションイベントを追加"
+msgstr "入力アクションイベントを移動"
#: editor/project_settings_editor.cpp
msgid "Override for Feature"
@@ -10299,9 +10297,8 @@ msgid "Suffix"
msgstr "サフィックス"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "æ­£è¦è¡¨ç¾"
+msgstr "æ­£è¦è¡¨ç¾ã‚’使用ã™ã‚‹"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10340,9 +10337,8 @@ msgstr ""
"カウンタオプションを比較ã—ã¾ã™ã€‚"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
-msgstr "レベルã”ã¨ã®ã‚«ã‚¦ãƒ³ã‚¿"
+msgstr "レベルã”ã¨ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10381,14 +10377,12 @@ msgid "Keep"
msgstr "ä¿æŒ"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "キャメルケースをアンダースコアã«"
+msgstr "PascalCaseã‹ã‚‰snake_caseã¸"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "アンダースコアをキャメルケースã«"
+msgstr "snake_caseã‚’PascalCaseã¸"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10407,14 +10401,12 @@ msgid "Reset"
msgstr "リセット"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "æ­£è¦è¡¨ç¾"
+msgstr "æ­£è¦è¡¨ç¾ã‚¨ãƒ©ãƒ¼"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "有効ãªæ–‡å­—:"
+msgstr "文字 %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10774,7 +10766,7 @@ msgid ""
"Children are not selectable.\n"
"Click to make selectable."
msgstr ""
-"å­ã‚’é¸æŠžã§ãã¾ã›ã‚“.\n"
+"å­ã‚’é¸æŠžã§ãã¾ã›ã‚“。\n"
"クリックã—ã¦é¸æŠžå¯èƒ½ã«ã—ã¦ãã ã•ã„。"
#: editor/scene_tree_editor.cpp
@@ -10867,20 +10859,19 @@ msgstr "スクリプトを開ã"
#: editor/script_create_dialog.cpp
msgid "File exists, it will be reused."
-msgstr "ファイルã¯å­˜åœ¨ã—ã¾ã™ã€‚å†åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚"
+msgstr "ファイルãŒæ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚ãã¡ã‚‰ã‚’å†åˆ©ç”¨ã—ã¾ã™ã€‚"
#: editor/script_create_dialog.cpp
msgid "Invalid class name."
-msgstr "クラスåãŒç„¡åŠ¹ã§ã™ã€‚"
+msgstr "無効ãªã‚¯ãƒ©ã‚¹å。"
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
msgstr "継承ã•ã‚ŒãŸè¦ªã®åå‰ã¾ãŸã¯ãƒ‘スãŒç„¡åŠ¹ã§ã™ã€‚"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "スクリプトã¯æœ‰åŠ¹ã§ã™ã€‚"
+msgstr "スクリプトã®ãƒ‘ス/åå‰ã¯æœ‰åŠ¹ã§ã™ã€‚"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10916,7 +10907,7 @@ msgstr "組ã¿è¾¼ã¿ã‚¹ã‚¯ãƒªãƒ—ト:"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
-msgstr "ノードスクリプトを添付ã™ã‚‹"
+msgstr "ノードã«ã‚¹ã‚¯ãƒªãƒ—トをアタッãƒã™ã‚‹"
#: editor/script_editor_debugger.cpp
msgid "Remote "
@@ -10971,9 +10962,8 @@ msgid "Copy Error"
msgstr "エラーをコピー"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "ビデオメモリー"
+msgstr "ビデオRAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -11101,12 +11091,11 @@ msgstr "カメラã®FOVを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
-msgstr "カメラã®ã‚µã‚¤ã‚ºã‚’変更"
+msgstr "カメラサイズを変更"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Change Notifier AABB"
-msgstr "パーティクルã®è»¸å¹³è¡Œå¢ƒç•Œãƒœãƒƒã‚¯ã‚¹ã‚’変更"
+msgstr "Notifierã®AABBを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
@@ -11122,7 +11111,7 @@ msgstr "çƒå½¢ã®åŠå¾„を変更"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
-msgstr "ボックスシェイプ範囲ã®å¤‰æ›´"
+msgstr "ボックスシェイプã®ç¯„囲を変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
@@ -11130,7 +11119,7 @@ msgstr "カプセルシェイプã®åŠå¾„を変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr "カプセル形状ã®é«˜ã•ã‚’変更ã™ã‚‹"
+msgstr "カプセルシェイプã®é«˜ã•ã‚’変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Radius"
@@ -11297,14 +11286,12 @@ msgid "Grid Map"
msgstr "グリッドマップ"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Snap View"
-msgstr "上é¢å›³"
+msgstr "スナップビュー"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Disabled"
-msgstr "無効"
+msgstr "クリップ無効"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
@@ -11363,9 +11350,8 @@ msgid "Clear Selection"
msgstr "é¸æŠžã‚’クリア"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Fill Selection"
-msgstr "ã™ã¹ã¦é¸æŠž"
+msgstr "é¸æŠžéƒ¨ã®å¡—ã‚Šæ½°ã—"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Settings"
@@ -11376,9 +11362,8 @@ msgid "Pick Distance:"
msgstr "è·é›¢ã‚’å–å¾—:"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Filter meshes"
-msgstr "フィルタメッシュ"
+msgstr "メッシュを絞り込む"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
@@ -11428,7 +11413,7 @@ msgstr "移動å¯èƒ½ãªé ˜åŸŸã‚’作æˆä¸­..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Partitioning..."
-msgstr "パーティションを作æˆã—ã¦ã„ã¾ã™..."
+msgstr "分割中..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating contours..."
@@ -11505,7 +11490,7 @@ msgstr "引数åã®å¤‰æ›´"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Default Value"
-msgstr "変数ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定ã™ã‚‹"
+msgstr "変数ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定"
#: modules/visual_script/visual_script_editor.cpp
msgid "Set Variable Type"
@@ -11513,7 +11498,7 @@ msgstr "変数ã®åž‹ã‚’設定"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Input Port"
-msgstr "入力ãƒãƒ¼ãƒˆã®è¿½åŠ "
+msgstr "入力ãƒãƒ¼ãƒˆã‚’追加"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Output Port"
@@ -11640,15 +11625,13 @@ msgid "Add Node(s) From Tree"
msgstr "ツリーã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’追加"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
-"スクリプト '%s' ã¯ã“ã®ã‚·ãƒ¼ãƒ³ã§ä½¿ã‚ã‚Œã¦ã„ãªã„ãŸã‚ã€ãƒŽãƒ¼ãƒ‰ã‚’è½ã¨ã™ã“ã¨ãŒã§ãã¾"
+"ã“ã®ã‚·ãƒ¼ãƒ³ã§ã¯ã‚¹ã‚¯ãƒªãƒ—ト 'ï¼…s'ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ãƒ—ロパティを削除ã§ãã¾"
"ã›ã‚“。\n"
-"'shift' キーを押ã—ãªãŒã‚‰ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ã“ã¨ã§ã‚·ã‚°ãƒãƒãƒ£ã‚’コピーã™ã‚‹ã“ã¨ãŒã§ãã¾"
-"ã™ã€‚"
+"「Shiftã€ã‚’押ã—ãªãŒã‚‰ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ã¨ã€ç½²åãŒã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Getter Property"
@@ -11832,7 +11815,7 @@ msgstr "パスãŒãƒŽãƒ¼ãƒ‰ã«é”ã—ã¾ã›ã‚“ï¼"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr "ノード%sã®ä¸æ­£ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—ロパティå'%s' ."
+msgstr "ノード%sã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—ロパティå'%s'ã¯ç„¡åŠ¹ã§ã™ã€‚"
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
@@ -12022,7 +12005,7 @@ msgstr "無効ãªã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ テンプレート:"
#: platform/javascript/export/export.cpp
msgid "Could not read custom HTML shell:"
-msgstr "カスタムHTMLシェルを読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "カスタムHTMLシェルを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: platform/javascript/export/export.cpp
msgid "Could not read boot splash image file:"
@@ -12062,37 +12045,39 @@ msgstr "Storeロゴã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横50x50ã§ãªã„ã¨ã„ã
#: platform/uwp/export/export.cpp
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "無効ãª44X44四角ロゴイメージ(縦横44x44ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+msgstr "44X44ã®æ­£æ–¹å½¢ãƒ­ã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横44x44ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "無効ãª71x71四角ロゴイメージ(縦横71x71ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+msgstr "71x71ã®æ­£æ–¹å½¢ãƒ­ã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横71x71ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "無効ãª150X150四角ロゴイメージ(縦横150x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+msgstr ""
+"150X150ã®æ­£æ–¹å½¢ãƒ­ã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横150x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: platform/uwp/export/export.cpp
msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "無効ãª310X310四角ロゴイメージ(縦横310x310ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+msgstr ""
+"310X310ã®æ­£æ–¹å½¢ãƒ­ã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横310x310ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: platform/uwp/export/export.cpp
msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "無効ãª310X150ワイドロゴイメージ(縦横310x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+msgstr ""
+"310X150ã®ãƒ¯ã‚¤ãƒ‰ãƒ­ã‚´ã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横310x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: platform/uwp/export/export.cpp
msgid "Invalid splash screen image dimensions (should be 620x300)."
msgstr ""
-"無効ãªã‚¹ãƒ—ラッシュスクリーンイメージ(縦横620x300ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
+"スプラッシュスクリーンã®ç”»åƒã‚µã‚¤ã‚ºãŒç„¡åŠ¹ã§ã™(縦横620x300ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)。"
#: scene/2d/animated_sprite.cpp
-#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite to display frames."
msgstr ""
-"SpriteFrames リソースを作æˆã¾ãŸã¯ AnimatedSprite フレームを表示ã™ã‚‹ãŸã‚ã«ã¯ "
-"'Frames' プロパティã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
+"AnimatedSpriteã§ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’表示ã™ã‚‹ã«ã¯ã€\"Frames\"プロパティã§SpriteFramesリ"
+"ソースを作æˆã¾ãŸã¯è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: scene/2d/canvas_modulate.cpp
msgid ""
@@ -12120,10 +12105,9 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionPolygon2D ã¯ã€CollisionObject2D 派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹ãŸ"
-"ã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚2Dã®å½¢çŠ¶ï¼ˆã‚·ã‚§ã‚¤ãƒ—)を付与ã™ã‚‹ãŸã‚ã«ã¯ Area2Dã€"
-"StaticBody2Dã€RigidBody2Dã€KinematicBody2D ãªã©ã®å­ã‚ªãƒ–ジェクトã¨ã—ã¦åˆ©ç”¨ã—ã¦"
-"ãã ã•ã„。"
+"CollisionPolygon2Dã¯ã€CollisionObject2D派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™"
+"ã‚‹ãŸã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚シェイプを追加ã™ã‚‹å ´åˆã¯ã€Area2Dã€StaticBody2Dã€"
+"RigidBody2Dã€KinematicBody2Dãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。"
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
@@ -12135,9 +12119,9 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D ã¯ã€CollisionObject2D派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆ"
-"ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚Area2Dã€staticBody2Dã€RigidBody2Dã€KinematicBody2Dãªã©ã®å­"
-"ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。"
+"CollisionShape2Dã¯ã€CollisionObject2D派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹"
+"å ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚シェイプを追加ã™ã‚‹å ´åˆã¯ã€Area2Dã€staticBody2Dã€"
+"RigidBody2Dã€KinematicBody2Dãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。"
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -12295,7 +12279,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr "ARVRAnchorã¯ARVROriginを親ã«æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
+msgstr "ARVRAnchorã¯ARVROriginノードを親ã«æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: scene/3d/arvr_nodes.cpp
msgid ""
@@ -12307,7 +12291,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp
msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr "ARVROriginã¯ARVRCameraå­ãƒŽãƒ¼ãƒ‰ãŒå¿…è¦ã§ã™ã€‚"
+msgstr "ARVROriginã¯å­ãƒŽãƒ¼ãƒ‰ã«ARVRCameraãŒå¿…è¦ã§ã™ã€‚"
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
@@ -12350,9 +12334,9 @@ msgid ""
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionPolygonã¯ã€CollisionObject派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆã«ã®"
-"ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚Areaã€StaticBodyã€RigidBodyã€KinematicBodyãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—"
-"ã¦ãã ã•ã„。"
+"CollisionPolygonã¯ã€CollisionObject派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´"
+"åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚シェイプを追加ã™ã‚‹å ´åˆã¯ã€Areaã€StaticBodyã€RigidBodyã€"
+"KinematicBodyãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。"
#: scene/3d/collision_polygon.cpp
msgid "An empty CollisionPolygon has no effect on collision."
@@ -12364,9 +12348,9 @@ msgid ""
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionShapeã¯ã€CollisionObject派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆã«ã®ã¿"
-"機能ã—ã¾ã™ã€‚Areaã€StaticBodyã€RigidBodyã€KinematicBodyãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦"
-"ãã ã•ã„。"
+"CollisionShapeã¯ã€CollisionObject派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹å ´åˆ"
+"ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚シェイプを追加ã™ã‚‹å ´åˆã¯ã€Areaã€StaticBodyã€RigidBodyã€"
+"KinematicBodyãªã©ã®å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。"
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12384,6 +12368,11 @@ msgstr ""
"å¹³é¢ã‚·ã‚§ã‚¤ãƒ—ã¯ã†ã¾ã機能ã›ãšã€å°†æ¥ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯å‰Šé™¤ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚使ã‚ãª"
"ã„ã§ãã ã•ã„。"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "メッシュãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãªã„ãŸã‚ã€ä½•ã‚‚表示ã•ã‚Œã¾ã›ã‚“。"
@@ -12454,13 +12443,12 @@ msgid "PathFollow only works when set as a child of a Path node."
msgstr "PathFollow ã¯ã€Path ノードã®å­ã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã®ã¿å‹•ä½œã—ã¾ã™ã€‚"
#: scene/3d/path.cpp
-#, fuzzy
msgid ""
"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
"parent Path's Curve resource."
msgstr ""
-"PathFollow ROTATION_ORIENTEDã§ã¯ã€è¦ªãƒ‘スã®Curveリソース㧠\"Up Vector\"を有効"
-"ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
+"PathFollowã®ROTATION_ORIENTEDã§ã¯ã€è¦ªã®Pathã®Curveリソースã§\"Up Vector\"を有"
+"効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: scene/3d/physics_body.cpp
msgid ""
@@ -12666,21 +12654,20 @@ msgid ""
"Default Environment as specified in Project Settings (Rendering -> "
"Environment -> Default Environment) could not be loaded."
msgstr ""
-"プロジェクト設定ã§æŒ‡å®šã•ã‚Œã¦ã„る既定ã®ç’°å¢ƒ (レンダリング -> 環境 -> 既定ã®ç’°"
-"境) を読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚"
+"プロジェクト設定ã§æŒ‡å®šã•ã‚Œã¦ã„る既定ã®ç’°å¢ƒ (Rendering -> Environment -> "
+"Default Environment) を読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚"
#: scene/main/viewport.cpp
-#, fuzzy
msgid ""
"This viewport is not set as render target. If you intend for it to display "
"its contents directly to the screen, make it a child of a Control so it can "
"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
"texture to some node for display."
msgstr ""
-"ã“ã®ãƒ“ューãƒãƒ¼ãƒˆã¯ã€ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。ãã®å†…容を画"
-"é¢ã«ç›´æŽ¥è¡¨ç¤ºã™ã‚‹å ´åˆã¯ã€ã‚µã‚¤ã‚ºã‚’å¾—ã‚‹ã“ã¨ãŒã§ãるよã†ã«ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã®å­ã‚’ã¤"
-"ãã‚Šã¾ã™ã€‚ãれ以外ã®å ´åˆã€ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã—ã€ãã®å†…部ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£è¡¨ç¤ºã®ã„"
-"ãã¤ã‹ã®ãƒŽãƒ¼ãƒ‰ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚"
+"ã“ã®ãƒ“ューãƒãƒ¼ãƒˆã¯ãƒ¬ãƒ³ãƒ€ãƒ¼ ターゲットã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。コンテンツを画"
+"é¢ã«ç›´æŽ¥è¡¨ç¤ºã™ã‚‹å ´åˆã¯ã€ã‚µã‚¤ã‚ºã‚’å–å¾—ã§ãるよã†ã«ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã®å­ã«ã—ã¾ã™ã€‚ã"
+"れ以外ã®å ´åˆã¯ã€RenderTarget ã«ã—ã¦ã€ãã®å†…部テクスãƒãƒ£ã‚’表示ã™ã‚‹ãƒŽãƒ¼ãƒ‰ã«å‰²ã‚Š"
+"当ã¦ã¾ã™ã€‚"
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index 16a2628500..1aaa12d6a0 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -1541,6 +1541,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1828,7 +1832,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3950,15 +3954,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -4009,10 +4013,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5955,7 +5955,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "შექმნáƒ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12204,6 +12204,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index 55bee75d3b..37c950097b 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-02 08:52+0000\n"
+"PO-Revision-Date: 2020-03-05 08:33+0000\n"
"Last-Translator: Ch. <ccwpc@hanmail.net>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
@@ -28,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -696,9 +696,8 @@ msgid "Line Number:"
msgstr "행 번호:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "바꾸기..."
+msgstr "%d개가 바뀌었습니다."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1495,6 +1494,10 @@ msgstr "ì´ë¦„"
msgid "Singleton"
msgstr "싱글톤"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "매개변수 붙여넣기"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "씬 ì—…ë°ì´íŠ¸ 중"
@@ -1780,7 +1783,7 @@ msgstr "íŒŒì¼ íƒìƒ‰ê¸°ì—ì„œ 보기"
msgid "New Folder..."
msgstr "새 í´ë”..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "새로고침"
@@ -3256,7 +3259,7 @@ msgstr "새 스í¬ë¦½íŠ¸"
#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
msgid "Extend Script"
-msgstr "스í¬ë¦½íŠ¸ 펼치기"
+msgstr "스í¬ë¦½íŠ¸ ìƒì†"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3943,6 +3946,10 @@ msgid "Saving..."
msgstr "저장 중..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "íŒŒì¼ %dê°œ"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "'%s'ì„(를) 기본으로 설정"
@@ -3951,10 +3958,6 @@ msgid "Clear Default for '%s'"
msgstr "'%s'ì„(를) 기본ì—ì„œ 지우기"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " 파ì¼"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "ë‹¤ìŒ í˜•ì‹ìœ¼ë¡œ 가져오기:"
@@ -4003,10 +4006,6 @@ msgid "Copy Params"
msgstr "매개변수 복사"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "매개변수 붙여넣기"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "리소스 í´ë¦½ë³´ë“œ 편집"
@@ -5813,9 +5812,8 @@ msgid "Mesh is empty!"
msgstr "메시가 없습니다!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Trimesh ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "Trimesh ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5831,30 +5829,28 @@ msgstr "Trimesh Static Shape 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "씬 루트ì—ì„œ ë‹¨ì¼ convex ì¶©ëŒ Shape를 만들 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "ë‹¨ì¼ convex ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Convex Shape 만들기"
+msgstr "Convex 모양 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "씬 ë£¨íŠ¸ì— ë‹¤ì¤‘ convex ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "í´ë”를 만들 수 없습니다."
+msgstr "ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Convex Shape 만들기"
+msgstr "다중 Convex Shape 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5910,6 +5906,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"StaticBody를 하나 만들고 ê±°ê¸°ì— í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ ìžë™ìœ¼ë¡œ 만들어 "
+"붙입니다.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) ì¶©ëŒ íƒì§€ 방법입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5920,10 +5919,12 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) ì¶©ëŒ íƒì§€ 방법입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Convex ì¶©ëŒ í˜•ì œ 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -5931,17 +5932,21 @@ msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"convex ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 빠른 (하지만 ëœ ì •í™•í•œ) ì¶©ëŒ íƒì§€ 방법입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Convex ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "다중 Convex ì¶©ëŒ í˜•ì œ 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
+"ì´ ë°©ë²•ì€ ìœ„ ë‘ ê°€ì§€ ì˜µì…˜ì˜ ì¤‘ê°„ ì •ë„ ì„±ëŠ¥ìž…ë‹ˆë‹¤."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5954,6 +5959,8 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"ì •ì  ì™¸ê³½ì„  메시를 만듭니다. 외곽선 ë©”ì‹œì˜ ë²•ì„  벡터는 ìžë™ìœ¼ë¡œ 반전ë©ë‹ˆë‹¤.\n"
+"SpatialMaterialì˜ Grow ì†ì„±ì„ 사용할 수 ì—†ì„ ë•Œ 대신 사용할 수 있습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9500,30 +9507,27 @@ msgid "Export With Debug"
msgstr "디버그와 함께 내보내기"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "경로가 없습니다."
+msgstr "지정한 경로가 없습니다."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "패키지 파ì¼ì„ 여는 중 오류. ZIP 형ì‹ì´ 아닙니다."
+msgstr "패키지 파ì¼ì„ 여는 중 오류 (ZIP 형ì‹ì´ 아닙니다)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"ìž˜ëª»ëœ '.zip' 프로ì íŠ¸ 파ì¼ìž…니다. 'project.godot' 파ì¼ì„ ê°–ê³  있지 않습니다."
+"ìž˜ëª»ëœ \".zip\" 프로ì íŠ¸ 파ì¼ìž…니다. \"project.godot\" 파ì¼ì´ 들어있지 않습니"
+"다."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "비어있는 í´ë”를 ì„ íƒí•´ì£¼ì„¸ìš”."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "'project.godot' íŒŒì¼ ë˜ëŠ” '.zip' 파ì¼ì„ ì„ íƒí•´ì£¼ì„¸ìš”."
+msgstr "\"project.godot\" íŒŒì¼ ë˜ëŠ” \".zip\" 파ì¼ì„ ì„ íƒí•´ì£¼ì„¸ìš”."
#: editor/project_manager.cpp
#, fuzzy
@@ -10219,9 +10223,8 @@ msgid "Suffix"
msgstr "접미사"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "ì •ê·œ 표현ì‹"
+msgstr "ì •ê·œ í‘œí˜„ì‹ ì‚¬ìš©"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10262,7 +10265,7 @@ msgstr ""
#: editor/rename_dialog.cpp
#, fuzzy
msgid "Per-level Counter"
-msgstr "단계 별 카운터"
+msgstr "단계별 카운터"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10301,14 +10304,12 @@ msgid "Keep"
msgstr "유지"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase를 under_scored로"
+msgstr "PascalCase를 snake_case로"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored를 CamelCase로"
+msgstr "snake_case를 PascalCase로"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10327,14 +10328,12 @@ msgid "Reset"
msgstr "ë˜ëŒë¦¬ê¸°"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "ì •ê·œ 표현ì‹"
+msgstr "ì •ê·œ í‘œí˜„ì‹ ì˜¤ë¥˜"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "올바른 문ìž:"
+msgstr "(ë¬¸ìž %s 위치)"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10794,9 +10793,8 @@ msgid "Invalid inherited parent name or path."
msgstr "ìž˜ëª»ëœ ìƒì†ëœ 부모 ì´ë¦„ ë˜ëŠ” 경로."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "스í¬ë¦½íŠ¸ê°€ 올바릅니다."
+msgstr "스í¬ë¦½íŠ¸ì˜ 경로/ì´ë¦„ì´ ì˜¬ë°”ë¦…ë‹ˆë‹¤."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10887,9 +10885,8 @@ msgid "Copy Error"
msgstr "복사 오류"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "비디오 메모리"
+msgstr "비디오 RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12270,6 +12267,11 @@ msgstr ""
"í‰ë©´ Shape는 잘 ìž‘ë™í•˜ì§€ 않으며 ì´í›„ 버전ì—ì„œ ì œê±°ë  ì˜ˆì •ìž…ë‹ˆë‹¤. 사용하지 ë§"
"아주세요."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "지정한 메시가 없어서 아무 ê²ƒë„ ë³´ì´ì§€ 않습니다."
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 5f8d87a7a5..1f58c4a658 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -1503,6 +1503,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1795,7 +1799,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3923,15 +3927,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Redaguoti Filtrus"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3982,10 +3987,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5929,7 +5930,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Keisti Poligono SkalÄ™"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12187,6 +12188,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 84c4a0e584..dc0a5aa151 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -1512,6 +1512,10 @@ msgstr "Nosaukums"
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Atjaunina Ainu"
@@ -1798,7 +1802,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3916,15 +3920,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Nederīgs nosaukums."
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3975,10 +3980,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5915,7 +5916,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Izveidot"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12158,6 +12159,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/mi.po b/editor/translations/mi.po
index de68081972..5ec6cc28e0 100644
--- a/editor/translations/mi.po
+++ b/editor/translations/mi.po
@@ -1444,6 +1444,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1720,7 +1724,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3795,15 +3799,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3853,10 +3857,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5737,7 +5737,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11823,6 +11823,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index b3deb29090..7e7149e05e 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -1454,6 +1454,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1730,7 +1734,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3807,15 +3811,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3865,10 +3869,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5753,7 +5753,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11840,6 +11840,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 3803ad7731..4ae3df9f99 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -1450,6 +1450,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1726,7 +1730,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3802,15 +3806,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3860,10 +3864,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5744,7 +5744,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11830,6 +11830,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index ed332284c9..bdb52e4845 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -1474,6 +1474,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1751,7 +1755,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3830,15 +3834,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3888,10 +3892,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5791,7 +5791,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11910,6 +11910,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 09bec2c4aa..90df4e7b4f 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -1570,6 +1570,10 @@ msgstr "Navn"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Lim inn Parametre"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Oppdaterer Scene"
@@ -1886,7 +1890,7 @@ msgstr "Vis I Filutforsker"
msgid "New Folder..."
msgstr "Ny Mappe..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Oppdater"
@@ -4196,6 +4200,10 @@ msgid "Saving..."
msgstr "Lagrer..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Filer"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Sett som Standard for '%s'"
@@ -4204,10 +4212,6 @@ msgid "Clear Default for '%s'"
msgstr "Fjern Standard for '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Filer"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importer Som:"
@@ -4260,10 +4264,6 @@ msgid "Copy Params"
msgstr "Kopier Parametre"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Lim inn Parametre"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Ressurs-utklippstavle er tom!"
@@ -6332,7 +6332,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Lag Poly"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12835,6 +12835,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 2f79bf52d9..458ff0b5b8 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -44,7 +44,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-27 07:09+0000\n"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
@@ -53,7 +53,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -721,9 +721,8 @@ msgid "Line Number:"
msgstr "Regelnummer:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Vervang..."
+msgstr "%d vervangen."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1526,6 +1525,10 @@ msgstr "Naam"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Plak Parameters"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Scène aan het bijwerken"
@@ -1812,7 +1815,7 @@ msgstr "Weergeven in Bestandsbeheer"
msgid "New Folder..."
msgstr "Nieuwe map..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Verversen"
@@ -2714,7 +2717,7 @@ msgstr "Scène openen..."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
-msgstr "Recente Scenes Openen"
+msgstr "Onlangs geopend"
#: editor/editor_node.cpp
msgid "Save Scene"
@@ -2938,7 +2941,7 @@ msgstr "Editor-functionaliteiten Beheren..."
#: editor/editor_node.cpp
msgid "Manage Export Templates..."
-msgstr "Export Sjablonen Beheren..."
+msgstr "Exportsjablonen beheren..."
#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
msgid "Help"
@@ -3771,7 +3774,7 @@ msgstr "Volgend(e) map/bestand"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
-msgstr "Bestandssysteem Opnieuw Scannen"
+msgstr "Bestandssysteem opnieuw inlezen"
#: editor/filesystem_dock.cpp
msgid "Toggle Split Mode"
@@ -3786,8 +3789,8 @@ msgid ""
"Scanning Files,\n"
"Please Wait..."
msgstr ""
-"Bestanden Scannen,\n"
-"Wacht Alstublieft..."
+"Bestanden aan het doornemen,\n"
+"Wacht alstublieft..."
#: editor/filesystem_dock.cpp
msgid "Move"
@@ -3997,6 +4000,10 @@ msgid "Saving..."
msgstr "Opslaan..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Bestanden"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Stel in als Standaard voor '%s'"
@@ -4005,10 +4012,6 @@ msgid "Clear Default for '%s'"
msgstr "Wis Standaard voor '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Bestanden"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importeer als:"
@@ -4059,10 +4062,6 @@ msgid "Copy Params"
msgstr "Kopieer Parameters"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Plak Parameters"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Bron in klembord bewerken"
@@ -5069,7 +5068,7 @@ msgstr "Plugins..."
#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
msgid "Sort:"
-msgstr "Sorteren:"
+msgstr "Sorteren op:"
#: editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_settings_editor.cpp
@@ -5885,9 +5884,8 @@ msgid "Mesh is empty!"
msgstr "Mesh is leeg!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Creëer Trimesh Botsing Broer"
+msgstr "Kon geen Trimesh-botsingsvorm maken."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5904,29 +5902,29 @@ msgstr "Creëer Trimesh Static Shape"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Uit de scènewortel kan geen enkele convexe botsingsvorm gemaakt worden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Kon geen enkelvoudige convexe botsingsvorm maken."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Creëer Convex Shape(s)"
+msgstr "Enkele convexe vorm maken"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Uit de scènewortel kunnen niet meerdere convexe botsingsvormen gemaakt "
+"worden."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Kon map niet aanmaken."
+msgstr "Kon geen enkele botsingsvormen maken."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Creëer Convex Shape(s)"
+msgstr "Meerdere convexe vormen maken"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5982,6 +5980,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Maakt een StaticBody en wijst automatisch een botsingsvorm toe op basis van "
+"polygonen.\n"
+"Dit is de meest preciese (maar langzaamste) optie voor botsingsberekeningen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5992,28 +5993,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Maakt een polygoon-gebaseerde botsingsvorm.\n"
+"Dit is de meest preciese (maar langzaamste) optie voor botsingsberekeningen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Creëer Convex Collision Sibling(s)"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Een enkele convexe botsingsonderelement aanmaken"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Maakt een enkele convexe botsingsvorm.\n"
+"Dit is de snelste (maar minst precieze) optie voor botsingsberekeningen."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Creëer Convex Collision Sibling(s)"
+msgstr "Meerdere convexe botsingsonderelementen aanmaken"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Maakt een polygoon-gebaseerde botsingsvorm.\n"
+"Deze optie ligt qua prestaties tussen de twee opties hierboven."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6026,6 +6032,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Maakt een statische omlijningsmesh. De normaalvectoren van de omlijningsmesh "
+"worden automatisch omgekeerd.\n"
+"Dit kan gebruikt worden wanneer de Grow eigenschap van SpatialMaterial niet "
+"beschikbaar is."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6692,7 +6702,7 @@ msgstr "Fout bij importeren"
#: editor/plugins/script_editor_plugin.cpp
msgid "New Text File..."
-msgstr "Nieuw Tekst Bestand..."
+msgstr "Nieuw tekstbestand..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Open File"
@@ -6757,7 +6767,7 @@ msgstr "Filter scripts"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
-msgstr "Schakel het alfabetisch sorteren van de methode lijst in of uit."
+msgstr "Alfabetisch sorteren van de methodelijst omschakelen."
#: editor/plugins/script_editor_plugin.cpp
msgid "Filter methods"
@@ -6846,7 +6856,7 @@ msgstr "Sluit Docs"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
msgid "Run"
-msgstr "Opstarten"
+msgstr "Uitvoeren"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
@@ -6858,7 +6868,7 @@ msgstr "Stap Over"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
-msgstr "Breek"
+msgstr "Onderbreken"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
@@ -7113,11 +7123,11 @@ msgstr "Ga Naar Regel..."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr "Breekpunt Aan- of Uitschakelen"
+msgstr "Breekpunt instellen"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "Verwijder Alle Breekpunten"
+msgstr "Alle breekpunten verwijderen"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Breakpoint"
@@ -9619,17 +9629,14 @@ msgid "Export With Debug"
msgstr "Exporteer Met Debug"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
msgstr "Dit pad bestaat niet."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
msgstr "Fout bij het openen van het pakketbestand, geen zip-formaat."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr "Ongeldig '.zip' projectbestand, bevat geen 'project.godot' bestand."
@@ -9639,14 +9646,12 @@ msgid "Please choose an empty folder."
msgstr "Kies alstublieft een lege map."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Kies alstublieft een 'project.godot' of '.zip' bestand."
+msgstr "Kies alstublieft een \"project.godot\" of \".zip\" bestand."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Map bevat al een Godot project."
+msgstr "In deze map staat al een Godot project."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -9895,8 +9900,8 @@ msgid ""
"Language changed.\n"
"The interface will update after restarting the editor or project manager."
msgstr ""
-"Taal veranderd. \n"
-"De gebruikersinterface wordt bij het herstarten van de editor of "
+"De taal is veranderd. \n"
+"De gebruikersomgeving wordt bij het herstarten van de editor of "
"projectbeheer bijgewerkt."
#: editor/project_manager.cpp
@@ -9921,7 +9926,7 @@ msgstr "Laatst bewerkt"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr "Scannen"
+msgstr "Inlezen"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -9937,11 +9942,11 @@ msgstr "Lijst opruimen"
#: editor/project_manager.cpp
msgid "Templates"
-msgstr "Templates"
+msgstr "Sjablonen"
#: editor/project_manager.cpp
msgid "Restart Now"
-msgstr "Herstart Nu"
+msgstr "Nu herstarten"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -10344,9 +10349,8 @@ msgid "Suffix"
msgstr "Achtervoegsel"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Reguliere Expressie"
+msgstr "Reguliere expressies gebruiken"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10385,9 +10389,8 @@ msgstr ""
"Vergelijk tellersopties."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
-msgstr "Per Niveau teller"
+msgstr "Per niveau teller"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10428,14 +10431,12 @@ msgid "Keep"
msgstr "Houd"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase naar under_scored"
+msgstr "PascalCase naar onder_streep"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored naar CamelCase"
+msgstr "onder_streep naar PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10454,14 +10455,12 @@ msgid "Reset"
msgstr "Resetten"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Reguliere Expressie"
+msgstr "Fout in reguliere expressie"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Geldige karakters:"
+msgstr "Bij teken %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10927,9 +10926,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Ongeldige overgenomen oudernaam of pad."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Script is geldig."
+msgstr "Scriptpad/-naam is geldig."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11020,7 +11018,6 @@ msgid "Copy Error"
msgstr "Kopieer Fout"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "Videogeheugen"
@@ -12434,6 +12431,11 @@ msgstr ""
"Een vlak als vorm werkt niet goed en zal verwijderd worden in toekomstige "
"versies. Gebruik wordt afgeraden."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Niets is zichtbaar want geen mesh is toegewezen."
diff --git a/editor/translations/or.po b/editor/translations/or.po
index 8645103d62..6819e53f38 100644
--- a/editor/translations/or.po
+++ b/editor/translations/or.po
@@ -1450,6 +1450,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1726,7 +1730,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3801,15 +3805,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3859,10 +3863,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5743,7 +5743,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11829,6 +11829,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 19ed399df1..14bbb799aa 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -42,7 +42,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-27 07:10+0000\n"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -52,7 +52,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -706,7 +706,7 @@ msgstr "Zmień rozmiar Tablicy"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
-msgstr "Zmień Typ Tablicy"
+msgstr "Zmień typ wartości tablicy"
#: editor/array_property_edit.cpp
msgid "Change Array Value"
@@ -721,9 +721,8 @@ msgid "Line Number:"
msgstr "Numer linii:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Zamień..."
+msgstr "%d zamieniono."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1520,6 +1519,10 @@ msgstr "Nazwa"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Wklej parametry"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Aktualizowanie Sceny"
@@ -1805,7 +1808,7 @@ msgstr "Pokaż w menedżerze plików"
msgid "New Folder..."
msgstr "Utwórz katalog..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Odśwież"
@@ -3981,6 +3984,10 @@ msgid "Saving..."
msgstr "Zapisywanie..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d plików"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Ustaw jako domyślne dla \"%s\""
@@ -3989,10 +3996,6 @@ msgid "Clear Default for '%s'"
msgstr "Usuń domyślne dla \"%s\""
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Pliki"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importuj jako:"
@@ -4041,10 +4044,6 @@ msgid "Copy Params"
msgstr "Kopiuj parametry"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Wklej parametry"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Edytuj schowek zasobów"
@@ -5869,9 +5868,8 @@ msgid "Mesh is empty!"
msgstr "Siatka jest pusta!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Utwórz sąsiadującą trójsiatkę kolizji"
+msgstr "Nie udało się utworzyć kształtu trójsiatki."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5888,29 +5886,29 @@ msgstr "Utwórz statyczny kształt trójsiatki"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
msgstr ""
+"Nie można utworzyć pojedynczego wypukłego kształtu kolizji dla korzenia "
+"sceny."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Nie udało się utworzyć pojedynczego wypukłego kształtu kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Utwórz kształt wypukły"
+msgstr "Utwórz pojedynczy wypukły kształt"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Nie można utworzyć wielu wypukłych kształtów kolizji dla korzenia sceny."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Nie można utworzyć katalogu."
+msgstr "Nie udało się utworzyć żadnego kształtu kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Utwórz kształt wypukły"
+msgstr "Utwórz wiele wypukłych kształtów"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5966,6 +5964,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Tworzy węzeł StaticBody i automatycznie przypisuje mu kształt kolizji oparty "
+"na wielokÄ…tach.\n"
+"To jest najdokładniejsza (ale najwolniejsza) opcja do detekcji kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5976,28 +5977,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Tworzy kształt kolizji oparty na wielokątach.\n"
+"To jest najdokładniejsza (ale najwolniejsza) opcja do detekcji kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Utwórz wypukłego sąsiada kolizji"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Utwórz pojedynczego wypukłego sąsiada kolizji"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Tworzy pojedynczy wypukły kształt kolizji.\n"
+"To jest najszybsza (ale najmniej dokładna) opcja dla detekcji kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Utwórz wypukłego sąsiada kolizji"
+msgstr "Utwórz wiele wypukłych sąsiadów kolizji"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Tworzy kształt kolizji oparty o wielokąty.\n"
+"To jest złoty środek względem wydajności powyższych dwóch opcji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6010,6 +6016,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Tworzy statyczną siatkę obwódki. Siatka obwódki ma automatycznie odwrócone "
+"normalne.\n"
+"To może zostać użyte zamiast właściwości Grow w SpatialMaterial kiedy "
+"używanie tej właściwości jest niemożliwe."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9586,35 +9596,30 @@ msgid "Export With Debug"
msgstr "Eksport z debugowaniem"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "Ścieżka nie istnieje."
+msgstr "Podana ścieżka nie istnieje."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "BÅ‚Ä…d otwierania pliku pakietu, nie jest w formacie ZIP."
+msgstr "BÅ‚Ä…d otwierania pliku pakietu (nie jest w formacie ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Niewłaściwy projekt pliku \".zip\", nie zawiera pliku \"project.godot\"."
+"Niewłaściwy plik \".zip\" projektu; nie zawiera pliku \"project.godot\"."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Proszę wybrać pusty folder."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
msgstr "Proszę wybrać plik \"project.godot\" lub \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "Folder już zawiera projekt Godota."
+msgstr "Ten folder już zawiera projekt Godota."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10312,9 +10317,8 @@ msgid "Suffix"
msgstr "Przyrostek"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Wyrażenia regularne"
+msgstr "Użyj wyrażeń regularnych"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10353,9 +10357,8 @@ msgstr ""
"Porównaj opcje licznika."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
-msgstr "Poziomowy licznik"
+msgstr "Oddzielny licznik na poziom"
#: editor/rename_dialog.cpp
msgid "If set the counter restarts for each group of child nodes"
@@ -10394,14 +10397,12 @@ msgid "Keep"
msgstr "Bez zmian"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase na under_scored"
+msgstr "PascalCase na snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored na CamelCase"
+msgstr "snake_case na PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10420,14 +10421,12 @@ msgid "Reset"
msgstr "Resetuj"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Wyrażenia regularne"
+msgstr "Błąd wyrażenia regularnego"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Dopuszczalne znaki:"
+msgstr "Przy znaku %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10892,9 +10891,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nieprawidłowa nazwa lub ścieżka klasy bazowej."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Skrypt jest prawidłowy."
+msgstr "Ścieżka/nazwa skryptu jest prawidłowa."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10985,9 +10983,8 @@ msgid "Copy Error"
msgstr "Kopiuj błąd"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Pamięć wideo"
+msgstr "Wideo RAM"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12399,6 +12396,11 @@ msgstr ""
"Kształty płaszczyzny nie działają dobrze i zostaną usunięte w przyszłych "
"wersjach. Nie używaj ich."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nie została przypisana żadna siatka, więc nic się nie pojawi."
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 8baec6f376..873a2d506b 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -1499,6 +1499,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1793,7 +1797,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3927,15 +3931,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Edit yer Variable:"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3987,10 +3992,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5932,7 +5933,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Yar, Blow th' Selected Down!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12255,6 +12256,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index e8e94eced4..a96186e434 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -48,12 +48,12 @@
# joel silva <joelgbsilva@gmail.com>, 2019.
# Heitor Novais Pereira <heitornovais394@outlook.com>, 2019.
# Joel Landgraf Filho <joel.landgraf@gmail.com>, 2019.
-# Alan Valmorbida <alanvalmorbida@gmail.com>, 2019.
+# Alan Valmorbida <alanvalmorbida@gmail.com>, 2019, 2020.
# João Vitor Ferreira Cavalcante <jvfecav@gmail.com>, 2019.
# Thiago Amendola <amendolathiago@gmail.com>, 2019.
# Raphael Nogueira Campos <raphaelncampos@gmail.com>, 2019.
# Dimenicius <vinicius.costa.92@gmail.com>, 2019.
-# Davi <wokep.ma.wavid@gmail.com>, 2019.
+# Davi <wokep.ma.wavid@gmail.com>, 2019, 2020.
# Endrick Gustavo <endrickgb@hotmail.com>, 2019.
# Hans M. Boron <hansmateusboron@gmail.com>, 2019.
# Gustavo Bolanho <jdmapas@gmail.com>, 2019.
@@ -61,7 +61,7 @@
# Ivo Nascimento <iannsp@gmail.com>, 2019.
# Klaus Dellano <klausdell@hotmail.com>, 2019.
# Esdras Tarsis <esdrastarsis@gmail.com>, 2019.
-# Douglas Fiedler <dognew@gmail.com>, 2019.
+# Douglas Fiedler <dognew@gmail.com>, 2019, 2020.
# Rarysson Guilherme <r_guilherme12@hotmail.com>, 2019.
# Gustavo da Silva Santos <gustavo94.rb@gmail.com>, 2019.
# Rafael Roque <rafael.roquec@gmail.com>, 2019.
@@ -82,12 +82,14 @@
# Michael Leocádio <aeronmike@gmail.com>, 2020.
# Z <rainromes@gmail.com>, 2020.
# Leonardo Dimano <leodimano@live.com>, 2020.
+# anonymous <noreply@weblate.org>, 2020.
+# Guilherme Souza Reis de Melo Lopes <gsrmlopes@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2020-02-06 09:45+0000\n"
-"Last-Translator: Leonardo Dimano <leodimano@live.com>\n"
+"PO-Revision-Date: 2020-03-08 22:32+0000\n"
+"Last-Translator: Guilherme Souza Reis de Melo Lopes <gsrmlopes@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -95,7 +97,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -118,7 +120,7 @@ msgstr "Entrada inválida %i (não passou) na expressão"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self não pode ser usado porque a instancia é nula (não passou)"
+msgstr "self não pode ser usado porque a instância é nula (não passou)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -134,7 +136,7 @@ msgstr "Nome inválido de índice '%s' para base tipo %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "Argumento inválido do tipo '%s'"
+msgstr "Argumento inválido para construir '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
@@ -242,11 +244,11 @@ msgstr "Alterar Tempo de Quadro-Chave da Anim Multi"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transition"
-msgstr "Transição de Animação com Múltiplas Mudanças"
+msgstr "Alterar Transição da Animação"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transform"
-msgstr "Transformação de Animação com Múltiplas Mudanças"
+msgstr "Alterar Transformação da Anim"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Value"
@@ -299,7 +301,7 @@ msgstr "Duração da Animação (em segundos)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
-msgstr "Adicionar Trilha"
+msgstr "Adicionar Faixa"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
@@ -324,7 +326,7 @@ msgstr "Alterar Valor do Trajeto"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr "Ligar/desligar esta trilha."
+msgstr "Ligar/desligar esta faixa."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
@@ -340,7 +342,7 @@ msgstr "Modo Loop Enrolado (Interpolar fim com início no loop)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
-msgstr "Remover esta trilha."
+msgstr "Remover esta faixa."
#: editor/animation_track_editor.cpp
msgid "Time (s): "
@@ -348,7 +350,7 @@ msgstr "Tempo (s): "
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr "Habilitar Trilha"
+msgstr "Habilitar Faixa"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -418,11 +420,11 @@ msgstr "Remover Trilha da Anim"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "Criar NOVA trilha para %s e inserir chave?"
+msgstr "Criar NOVA faixa para %s e inserir chave?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
-msgstr "Criar %d NOVAS trilhas e inserir chaves?"
+msgstr "Criar %d NOVAS faixas e inserir chaves?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
@@ -462,7 +464,7 @@ msgstr "Alterar FPS da Animação"
#: editor/animation_track_editor.cpp
msgid "Rearrange Tracks"
-msgstr "Reordenar Trilhas"
+msgstr "Reordenar Faixas"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
@@ -504,11 +506,11 @@ msgstr "Adicionar Trilha Bezier"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr "Caminho da trilha é inválido,então não pode adicionar uma chave."
+msgstr "Caminho da faixa é inválido, então não pode adicionar uma chave."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr "Trilha não é do tipo Espacial,não pode inserir chave"
+msgstr "Faixa não é do tipo Espacial, não pode inserir chave"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
@@ -732,11 +734,11 @@ msgstr "Selecionar Todos/Nenhum"
#: editor/animation_track_editor_plugins.cpp
msgid "Add Audio Track Clip"
-msgstr "Adicionar Clipe de Trilha de Ãudio"
+msgstr "Adicionar Amostra de uma Trilha de Ãudio"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip Start Offset"
-msgstr "Alterar Offset de Início do Clipe da Trilha de Ãudio"
+msgstr "Mudar Deslocamento de Início da Amostra da Trilha de Ãudio"
#: editor/animation_track_editor_plugins.cpp
msgid "Change Audio Track Clip End Offset"
@@ -763,9 +765,8 @@ msgid "Line Number:"
msgstr "Número da Linha:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Substituir..."
+msgstr "%d substituído."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1442,7 +1443,7 @@ msgstr "Adicionar Canal"
#: editor/editor_audio_buses.cpp
msgid "Add a new Audio Bus to this layout."
-msgstr "Adicionar novo Canal de Ãudio a este layout."
+msgstr "Adicionar um novo Canal de Ãudio a este layout."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1563,6 +1564,10 @@ msgstr "Nome"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Colar Parâmetros"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Atualizando Cena"
@@ -1848,7 +1853,7 @@ msgstr "Mostrar no Gerenciador de Arquivos"
msgid "New Folder..."
msgstr "Nova Pasta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Atualizar"
@@ -4036,6 +4041,10 @@ msgid "Saving..."
msgstr "Salvando..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Arquivos"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Definir como Padrão para '%s'"
@@ -4044,10 +4053,6 @@ msgid "Clear Default for '%s'"
msgstr "Limpar Padrão para '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Arquivos"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importar como:"
@@ -4097,10 +4102,6 @@ msgid "Copy Params"
msgstr "Copiar Parâmetros"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Colar Parâmetros"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Editar Ãrea de Transferência de Recursos"
@@ -5927,9 +5928,8 @@ msgid "Mesh is empty!"
msgstr "Mesh está vazia!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Criar Colisão Trimesh Irmã"
+msgstr "Não foi possível criar uma forma de colisão Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5945,30 +5945,27 @@ msgstr "Criar Forma Estática Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Não foi possível criar forma de colisão convexa para a cena raiz."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Não foi possível criar uma forma de colisão convexa simples."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Criar Forma(s) Convexa(s)"
+msgstr "Criar Forma(s) Convexa(s) Simples"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "Não foi possível criar uma forma de colisão convexa para a cena raiz."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Impossível criar a pasta."
+msgstr "Não foi possível criar nenhuma forma de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Criar Forma(s) Convexa(s)"
+msgstr "Criar Múltiplas Forma(s) Convexa(s)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6024,6 +6021,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Criar um Staticbody e atribuir uma forma de colisão baseado em polígono para "
+"isto automaticamente.\n"
+"Esta é a opção mais precisa (mas lenta) para detecção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6034,28 +6034,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Criar uma forma de colisão baseada em polígono.\n"
+"Este é a opção mais precisa (mas lenta) para detecção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Criar Colisão Convexa Irmã(s)"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Criar Simples Colisão Convexa Irmã(s)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Criar uma simples forma convexa de colisão.\n"
+"Esta é a opção mais rápida (mas menos precisa) para detecção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Criar Colisão Convexa Irmã(s)"
+msgstr "Criar Múltipla Colisão Convexa Irmã(s)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Cria um polígono base de colisão forma.\n"
+"Este é um meio-termo entre as duas opções acima."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6068,6 +6073,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Cria uma malha de contorno estática. A malha de contorno pode ter suas "
+"normals viradas automaticamente.\n"
+"Isso pode ser usado em vez da propriedade SpatialMaterial Grow quando o uso "
+"dessa propriedade não for possível."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9645,33 +9654,27 @@ msgid "Export With Debug"
msgstr "Exportar Com Depuração"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "O caminho não existe."
+msgstr "O caminho especificado não existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Erro ao abrir arquivo compactado, não está no formato ZIP."
+msgstr "Erro ao abrir arquivo compactado (não está em formato ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr ""
-"Projeto '.zip' inválido, o projeto não contém um arquivo 'project.godot'."
+msgstr "Projeto '.zip' inválido; não contém um arquivo 'project.godot'."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Por favor, escolha uma pasta vazia."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Por favor, escolha um arquivo 'project.godot' ou '.zip'."
+msgstr "Por favor, escolha um arquivo 'project.godot' ou arquivo '.zip'."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
msgstr "O diretório já contém um projeto Godot."
@@ -10371,9 +10374,8 @@ msgid "Suffix"
msgstr "Sufixo"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Expressões regulares"
+msgstr "Utilize Expressões Regulares"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10412,7 +10414,6 @@ msgstr ""
"Compare as opções do contador."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Contador de nível"
@@ -10453,14 +10454,12 @@ msgid "Keep"
msgstr "Manter"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase para under_scored"
+msgstr "PascalCase para snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored para CamelCase"
+msgstr "snake_case para PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10479,14 +10478,12 @@ msgid "Reset"
msgstr "Recompor"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Expressões regulares"
+msgstr "Erro de Expressão Regular"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Caracteres válidos:"
+msgstr "Para caractere %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10951,9 +10948,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nome ou caminho do pai herdado inválido."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Script válido."
+msgstr "O caminho/nome do script é válido."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -11044,9 +11040,8 @@ msgid "Copy Error"
msgstr "Copiar Erro"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
-msgstr "Mem. de Vídeo"
+msgstr "Memória de Vídeo"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
@@ -12455,6 +12450,11 @@ msgstr ""
"Formas planas não funcionam bem e serão removidas em versões futuras. Por "
"favor não as use."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada é visível porque nenhuma malha foi atribuída."
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index 8f8c1476fb..60009b3171 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-27 07:10+0000\n"
+"PO-Revision-Date: 2020-02-18 15:09+0000\n"
"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
@@ -28,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 3.11\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -37,7 +37,7 @@ msgstr "Tipo de argumento inválido para convert(), use constantes TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Esperado um string de comprimento 1 (um caráter)."
+msgstr "Esperado um string de comprimento 1 (um carácter)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -428,7 +428,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr "Não é possível adicionar nova pista sem uma raíz"
+msgstr "Não é possível adicionar nova pista sem uma raiz"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
@@ -444,7 +444,7 @@ msgstr "Caminho da pista é inválido, não se consegue adicionar uma chave."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr "Pista não do tipo Spatial, impossível inserir chave"
+msgstr "Pista não é do tipo Spatial, não consigo inserir chave"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
@@ -456,7 +456,7 @@ msgstr "Adicionar Chave da Pista"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr "Caminho da pista é inválido, impossível adicionar uma chave método."
+msgstr "Caminho da pista é inválido, não consigo adicionar uma chave método."
#: editor/animation_track_editor.cpp
msgid "Add Method Track Key"
@@ -698,9 +698,8 @@ msgid "Line Number:"
msgstr "Numero da linha:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Substituir..."
+msgstr "%d substituído."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -765,7 +764,7 @@ msgstr "Números de Linha e Coluna."
#: editor/connections_dialog.cpp
msgid "Method in target node must be specified."
-msgstr "Método no Nó alvo deve ser especificado."
+msgstr "Método no nó alvo deve ser especificado."
#: editor/connections_dialog.cpp
msgid ""
@@ -773,7 +772,7 @@ msgid ""
"target node."
msgstr ""
"Método alvo não encontrado. Especifique um método válido ou anexe um script "
-"ao Nó de destino."
+"ao nó de destino."
#: editor/connections_dialog.cpp
msgid "Connect to Node:"
@@ -789,7 +788,7 @@ msgstr "Do Sinal:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr "A Cena não contém qualquer script."
+msgstr "A cena não contém qualquer script."
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
@@ -845,7 +844,7 @@ msgstr "Desconecta o sinal após a primeira emissão."
#: editor/connections_dialog.cpp
msgid "Cannot connect signal"
-msgstr "Impossível conectar sinal"
+msgstr "Não consigo conectar sinal"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
@@ -977,7 +976,7 @@ msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will only take effect when reloaded."
msgstr ""
-"A Cena '%s' está a ser editada.\n"
+"A cena '%s' está a ser editada.\n"
"As alterações só terão efeito quando recarregar."
#: editor/dependency_editor.cpp
@@ -1048,7 +1047,7 @@ msgstr ""
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr "Impossível remover:"
+msgstr "Não consigo remover:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -1208,7 +1207,7 @@ msgstr "%s (Já Existe)"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr "A descompactar Ativos"
+msgstr "A Descomprimir Ativos"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "The following files failed extraction from package:"
@@ -1416,7 +1415,7 @@ msgstr "Nome inválido."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
-msgstr "Carateres válidos:"
+msgstr "Caracteres válidos:"
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing engine class name."
@@ -1500,9 +1499,13 @@ msgstr "Nome"
msgid "Singleton"
msgstr "Instância única"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Colar Parâmetros"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
-msgstr "Atualizando a Cena"
+msgstr "A atualizar Cena"
#: editor/editor_data.cpp
msgid "Storing local changes..."
@@ -1510,7 +1513,7 @@ msgstr "Armazenando alterações locais..."
#: editor/editor_data.cpp
msgid "Updating scene..."
-msgstr "Atualizando a Cena..."
+msgstr "A atualizar cena..."
#: editor/editor_data.cpp editor/editor_properties.cpp
msgid "[empty]"
@@ -1544,7 +1547,7 @@ msgstr "Nome:"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
msgid "Could not create folder."
-msgstr "Não foi possível criar pasta."
+msgstr "Não consegui criar pasta."
#: editor/editor_dir_dialog.cpp
msgid "Choose"
@@ -1633,7 +1636,7 @@ msgstr "Importar Doca"
#: editor/editor_feature_profile.cpp
msgid "Node Dock"
-msgstr "Nó Doca"
+msgstr "Doca de Nó"
#: editor/editor_feature_profile.cpp
msgid "FileSystem and Import Docks"
@@ -1786,7 +1789,7 @@ msgstr "Mostrar no Gestor de Ficheiros"
msgid "New Folder..."
msgstr "Nova Diretoria..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Atualizar"
@@ -2185,7 +2188,7 @@ msgstr "Guardar Recurso Como..."
#: editor/editor_node.cpp
msgid "Can't open file for writing:"
-msgstr "Impossível abrir o Ficheiro para escrita:"
+msgstr "Não consigo abrir o ficheiro para escrita:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
@@ -2197,7 +2200,7 @@ msgstr "Erro ao guardar."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "Impossível abrir '%s'. O ficheiro pode ter sido movido ou apagado."
+msgstr "Não consigo abrir '%s'. O ficheiro pode ter sido movido ou apagado."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2217,7 +2220,7 @@ msgstr "Erro ao carregar '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
-msgstr "A guardar a Cena"
+msgstr "A guardar Cena"
#: editor/editor_node.cpp
msgid "Analyzing"
@@ -2245,7 +2248,7 @@ msgid ""
"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
"be satisfied."
msgstr ""
-"Impossível guardar Cena. Provavelmente, as dependências (instâncias ou "
+"Não consigo guardar cena. Provavelmente, as dependências (instâncias ou "
"heranças) não puderam ser satisfeitas."
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
@@ -2254,7 +2257,7 @@ msgstr "Não se consegue sobrescrever cena ainda aberta!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
-msgstr "Impossível carregar MeshLibrary para fundir!"
+msgstr "Não consigo carregar MeshLibrary para combinar!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
@@ -2262,7 +2265,7 @@ msgstr "Erro ao guardar MeshLibrary!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr "Impossível carregar TileSet para fundir!"
+msgstr "Não consigo carregar TileSet para combinar!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
@@ -2290,9 +2293,8 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
-"Este recurso pertence a uma Cena que foi importado, portanto, não é "
-"editável.\n"
-"Por favor, leia a documentação relevante sobre importação de Cenas, para um "
+"Este recurso pertence a uma cena que foi importado, não sendo editável.\n"
+"Por favor, leia a documentação relevante sobre importação de cenas, para um "
"melhor entendimento deste fluxo de trabalho."
#: editor/editor_node.cpp
@@ -2337,15 +2339,15 @@ msgstr ""
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr "Não existe nenhuma Cena definida para executar."
+msgstr "Não existe cena definida para execução."
#: editor/editor_node.cpp
msgid "Current scene was never saved, please save it prior to running."
-msgstr "A Cena atual nunca foi guardada, por favor guarde-a antes de executar."
+msgstr "A cena atual nunca foi guardada, por favor guarde-a antes de executar."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
-msgstr "Não foi possível iniciar o subprocesso!"
+msgstr "Não consegui iniciar o subprocesso!"
#: editor/editor_node.cpp editor/filesystem_dock.cpp
msgid "Open Scene"
@@ -2361,7 +2363,7 @@ msgstr "Abertura rápida..."
#: editor/editor_node.cpp
msgid "Quick Open Scene..."
-msgstr "Abrir Cena de forma rápida..."
+msgstr "Abrir Cena Rapidamente..."
#: editor/editor_node.cpp
msgid "Quick Open Script..."
@@ -2381,11 +2383,11 @@ msgstr "Guardado(s) %s recurso(s) modificado(s)."
#: editor/editor_node.cpp
msgid "A root node is required to save the scene."
-msgstr "É necessário um Nó Raiz para guardar a cena."
+msgstr "É necessário um nó raiz para guardar a cena."
#: editor/editor_node.cpp
msgid "Save Scene As..."
-msgstr "Guardar Cena como..."
+msgstr "Guardar Cena Como..."
#: editor/editor_node.cpp
msgid "No"
@@ -2397,11 +2399,11 @@ msgstr "Sim"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
-msgstr "Esta Cena nunca foi guardada. Guardar antes de executar?"
+msgstr "Esta cena nunca foi guardada. Guardar antes de executar?"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "This operation can't be done without a scene."
-msgstr "Esta operação não pode ser efetuada sem uma Cena."
+msgstr "Esta operação não pode ser efetuada sem uma cena."
#: editor/editor_node.cpp
msgid "Export Mesh Library"
@@ -2409,7 +2411,7 @@ msgstr "Exportar Biblioteca de Malhas"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
-msgstr "Esta operação não pode ser efetuada sem um Nó raiz."
+msgstr "Esta operação não pode ser efetuada sem um nó raiz."
#: editor/editor_node.cpp
msgid "Export Tile Set"
@@ -2417,15 +2419,15 @@ msgstr "Exportar conjunto de Tiles"
#: editor/editor_node.cpp
msgid "This operation can't be done without a selected node."
-msgstr "Esta operação não pode ser efetuada sem um Nó selecionado."
+msgstr "Esta operação não pode ser efetuada sem um nó selecionado."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
-msgstr "A Cena atual não foi guardada. Abrir na mesma?"
+msgstr "A cena atual não foi guardada. Abrir na mesma?"
#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
-msgstr "Impossível recarregar uma Cena que nunca foi guardada."
+msgstr "Não consigo recarregar uma cena que nunca foi guardada."
#: editor/editor_node.cpp
msgid "Revert"
@@ -2437,7 +2439,7 @@ msgstr "Esta acção não pode ser desfeita. Reverter na mesma?"
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
-msgstr "Executar Cena de forma rápida..."
+msgstr "Executar Cena Rapidamente..."
#: editor/editor_node.cpp
msgid "Quit"
@@ -2457,12 +2459,12 @@ msgstr "Guardar & Sair"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
-msgstr "Guardar alterações da(s) seguinte(s) Cena(s) antes de sair?"
+msgstr "Guardar alterações da(s) seguinte(s) cena(s) antes de sair?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
msgstr ""
-"Guardar alterações da(s) seguinte(s) Cena(s) antes de abrir o Gestor de "
+"Guardar alterações da(s) seguinte(s) cena(s) antes de abrir o Gestor de "
"Projeto?"
#: editor/editor_node.cpp
@@ -2524,19 +2526,19 @@ msgid ""
"To make changes to it, a new inherited scene can be created."
msgstr ""
"Cena '%s' foi importada automaticamente, não podendo ser alterada.\n"
-"Para fazer alterações, pode ser criada uma nova Cena herdada."
+"Para fazer alterações, pode ser criada uma nova cena herdada."
#: editor/editor_node.cpp
msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
-"Erro ao carregar a Cena, tem de estar no Caminho do Projeto. Use 'Importar' "
-"para abrir a Cena, e guarde-a dentro do Caminho do Projeto."
+"Erro ao carregar cena, tem de estar no caminho do projeto. Use 'Importar' "
+"para abrir a cena, e guarde-a dentro do caminho do projeto."
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr "A Cena '%s' tem dependências não satisfeitas:"
+msgstr "Cena '%s' tem dependências não satisfeitas:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
@@ -2548,7 +2550,7 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"Não foi definida nenhuma Cena principal. Selecionar uma?\n"
+"Não foi definida nenhuma cena principal. Selecionar uma?\n"
"Poderá alterá-la depois nas \"Definições do Projeto\", na categoria "
"'aplicação'."
@@ -2558,8 +2560,8 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"A Cena selecionada '%s' não existe, selecionar uma válida?\n"
-"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria de "
+"A cena selecionada '%s' não existe, selecionar uma válida?\n"
+"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria "
"'aplicação'."
#: editor/editor_node.cpp
@@ -2568,7 +2570,7 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"A Cena selecionada '%s' não é um Ficheiro de Cena, selecione um Ficheiro "
+"A cena selecionada '%s' não é um ficheiro de cena, selecione um ficheiro "
"válido?\n"
"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria "
"'aplicação'."
@@ -2593,7 +2595,7 @@ msgstr "Mostrar no Sistema de Ficheiros"
#: editor/editor_node.cpp
msgid "Play This Scene"
-msgstr "Executar esta Cena"
+msgstr "Executar Esta Cena"
#: editor/editor_node.cpp
msgid "Close Tab"
@@ -2617,7 +2619,7 @@ msgstr "Fechar Todos os Separadores"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
-msgstr "Trocar Tab de Cena"
+msgstr "Trocar Aba de Cena"
#: editor/editor_node.cpp
msgid "%d more files or folders"
@@ -2645,7 +2647,7 @@ msgstr "Alternar modo livre de distrações."
#: editor/editor_node.cpp
msgid "Add a new scene."
-msgstr "Adicionar nova Cena."
+msgstr "Adicionar nova cena."
#: editor/editor_node.cpp
msgid "Scene"
@@ -2653,7 +2655,7 @@ msgstr "Cena"
#: editor/editor_node.cpp
msgid "Go to previously opened scene."
-msgstr "Ir para Cena aberta anteriormente."
+msgstr "Ir para cena aberta anteriormente."
#: editor/editor_node.cpp
msgid "Copy Text"
@@ -2673,7 +2675,7 @@ msgstr "Filtrar Ficheiro..."
#: editor/editor_node.cpp
msgid "Operations with scene files."
-msgstr "Operações com Ficheiros de Cena."
+msgstr "Operações com ficheiros de cena."
#: editor/editor_node.cpp
msgid "New Scene"
@@ -2727,7 +2729,7 @@ msgstr "Reverter Cena"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
-msgstr "Ferramentas diversas de Projeto ou Cena."
+msgstr "Ferramentas diversas de projeto ou cena."
#: editor/editor_node.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
@@ -2819,7 +2821,7 @@ msgid ""
"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
"running game if this option is turned on."
msgstr ""
-"Com esta opção ativa, formas de colisão e Nós raycast (para 2D e 3D) serão "
+"Com esta opção ativa, formas de colisão e nós raycast (para 2D e 3D) serão "
"visíveis no jogo em execução."
#: editor/editor_node.cpp
@@ -2844,10 +2846,10 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
-"Com esta opção ativa, alterações da Cena no Editor serão replicadas no jogo "
+"Com esta opção ativa, alterações da cena no editor serão replicadas no jogo "
"em execução.\n"
-"Quando usada num dispositivo remoto, é mais eficiente com um Sistema de "
-"Ficheiros em rede."
+"Quando usada num dispositivo remoto, é mais eficiente com um sistema de "
+"ficheiros em rede."
#: editor/editor_node.cpp
msgid "Sync Script Changes"
@@ -2962,11 +2964,11 @@ msgstr "Pausar a execução da cena para depuração."
#: editor/editor_node.cpp
msgid "Pause Scene"
-msgstr "Pausar a Cena"
+msgstr "Pausar Cena"
#: editor/editor_node.cpp
msgid "Stop the scene."
-msgstr "Para a Cena."
+msgstr "Para a cena."
#: editor/editor_node.cpp
msgid "Play the edited scene."
@@ -2974,11 +2976,11 @@ msgstr "Executa a cena editada."
#: editor/editor_node.cpp
msgid "Play Scene"
-msgstr "Executar a Cena"
+msgstr "Executar Cena"
#: editor/editor_node.cpp
msgid "Play custom scene"
-msgstr "Executa a cena personalizada"
+msgstr "Executa cena personalizada"
#: editor/editor_node.cpp
msgid "Play Custom Scene"
@@ -3081,7 +3083,7 @@ msgstr "Exportar Biblioteca"
#: editor/editor_node.cpp
msgid "Merge With Existing"
-msgstr "Fundir com o Existente"
+msgstr "Combinar com o Existente"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
@@ -3266,7 +3268,7 @@ msgstr ""
"Não se consegue criar Textura Viewport neste recurso porque não está "
"definido na cena como local.\n"
"Ative a sua propriedade 'local to scene' (e em todos os recursos que o "
-"contêm até a um Nó)."
+"contêm até a um nó)."
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Pick a Viewport"
@@ -3349,11 +3351,11 @@ msgstr "Escreva a sua lógica no Método _run()."
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
-msgstr "Já existe uma Cena editada."
+msgstr "Já existe uma cena editada."
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr "Não foi possível instanciar o Script:"
+msgstr "Não consegui instanciar o script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
@@ -3361,7 +3363,7 @@ msgstr "Esqueceu-se da palavra chave 'tool'?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
-msgstr "Não foi possível executar o Script:"
+msgstr "Não consegui executar o script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
@@ -3369,7 +3371,7 @@ msgstr "Esqueceu-se do médodo '_run'?"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
-msgstr "Selecionar Nó(s) para importar"
+msgstr "Selecionar Nó(s) para Importar"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
@@ -3424,7 +3426,7 @@ msgstr "Remover versão '%s' do Modelo?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
-msgstr "Impossível abrir o zip de Modelos."
+msgstr "Não consigo abrir zip de modelos de exportação."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates: %s."
@@ -3466,12 +3468,12 @@ msgstr ""
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr "Impossível resolver."
+msgstr "Não consigo resolver."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect."
-msgstr "Impossível conectar."
+msgstr "Não consigo conectar."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3497,7 +3499,7 @@ msgstr "Download Completo."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
-msgstr "Impossível remover ficheiro temporário:"
+msgstr "Não consigo remover ficheiro temporário:"
#: editor/export_template_manager.cpp
msgid ""
@@ -3525,7 +3527,7 @@ msgstr "A resolver"
#: editor/export_template_manager.cpp
msgid "Can't Resolve"
-msgstr "Impossível resolver"
+msgstr "Não consigo Resolver"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3534,7 +3536,7 @@ msgstr "A ligar..."
#: editor/export_template_manager.cpp
msgid "Can't Connect"
-msgstr "Impossível conetar"
+msgstr "Não consigo Conectar"
#: editor/export_template_manager.cpp
msgid "Connected"
@@ -3609,7 +3611,7 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
-msgstr "Não foi possível mover/renomear raíz dos recursos."
+msgstr "Não consegui mover/renomear raiz dos recursos."
#: editor/filesystem_dock.cpp
msgid "Cannot move a folder into itself."
@@ -3633,7 +3635,7 @@ msgstr "Nome não fornecido."
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters."
-msgstr "O nome fornecido contém carateres inválidos."
+msgstr "O nome fornecido contém caracteres inválidos."
#: editor/filesystem_dock.cpp
msgid "A file or folder with this name already exists."
@@ -3641,7 +3643,7 @@ msgstr "Um Ficheiro ou diretoria já existe com este nome."
#: editor/filesystem_dock.cpp
msgid "Name contains invalid characters."
-msgstr "O nome contém carateres inválidos."
+msgstr "O nome contém caracteres inválidos."
#: editor/filesystem_dock.cpp
msgid "Renaming file:"
@@ -3872,7 +3874,7 @@ msgstr "Nós fora do Grupo"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
msgid "Filter nodes"
-msgstr "Filtrar Nós"
+msgstr "Filtrar nós"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
@@ -3892,7 +3894,7 @@ msgstr "Gerir Grupos"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
-msgstr "Importar como Cena única"
+msgstr "Importar como Cena Única"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Animations"
@@ -3928,7 +3930,7 @@ msgstr "Importar como Cenas Múltiplas"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr "Importar como Cenas e Materiais Múltiplos"
+msgstr "Importar como Cenas Múltiplas + Materiais"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -3968,6 +3970,10 @@ msgid "Saving..."
msgstr "A guardar..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Ficheiros"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Definir como Padrão para '%s'"
@@ -3976,10 +3982,6 @@ msgid "Clear Default for '%s'"
msgstr "Limpar Padrão para '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Ficheiros"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importar Como:"
@@ -4028,10 +4030,6 @@ msgid "Copy Params"
msgstr "Copiar Parâmetros"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Colar Parâmetros"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Editar Ãrea de Transferência de Recursos"
@@ -4089,7 +4087,7 @@ msgstr "As alterações podem ser perdidas!"
#: editor/multi_node_edit.cpp
msgid "MultiNode Set"
-msgstr "Conjunto MultiNode"
+msgstr "Conjunto MultiNó"
#: editor/node_dock.cpp
msgid "Select a single node to edit its signals and groups."
@@ -4527,7 +4525,7 @@ msgstr "Posição da Animação (em segundos)."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
-msgstr "Escalar globalmente a reprodução da Animação para o Nó."
+msgstr "Escalar globalmente a reprodução da animação para o nó."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -4671,7 +4669,7 @@ msgstr "Viagem"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Start and end nodes are needed for a sub-transition."
-msgstr "Nodos de início e fim são necessários para uma sub-transição."
+msgstr "Nós de início e fim são necessários para uma sub-transição."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "No playback resource set at path: %s."
@@ -4863,7 +4861,7 @@ msgstr "Importar Animações..."
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Node Filters"
-msgstr "Editar filtros de Nó"
+msgstr "Editar Filtros de Nó"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Filters..."
@@ -4883,7 +4881,7 @@ msgstr "Erro de ligação, tente novamente."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
-msgstr "Impossível ligar ao host:"
+msgstr "Não consigo ligar ao host:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
@@ -4891,7 +4889,7 @@ msgstr "Sem resposta do host:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr "Impossível resolver hostname:"
+msgstr "Não consigo resolver hostname:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
@@ -4903,7 +4901,7 @@ msgstr "Pedido falhado."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Cannot save response to:"
-msgstr "Impossível guardar resposta para:"
+msgstr "Não consigo guardar resposta para:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Write error."
@@ -5076,8 +5074,8 @@ msgid ""
"Save your scene (for images to be saved in the same dir), or pick a save "
"path from the BakedLightmap properties."
msgstr ""
-"Impossível determinar um caminho para guardar imagens lightmap.\n"
-"Guarde a sua Cena (para as imagens serem guardadas na mesma diretoria), ou "
+"Não consigo determinar um caminho para guardar imagens lightmap.\n"
+"Guarde a sua cena (para as imagens serem guardadas na mesma diretoria), ou "
"escolha um caminho nas propriedades BakedLightmap."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -5195,7 +5193,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Presets for the anchors and margins values of a Control node."
-msgstr "Pré-definições para âncoras e margens de um Nó Control."
+msgstr "Pré-definições para âncoras e margens de um nó Control."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -5491,7 +5489,7 @@ msgstr "Ajustar às Guias"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr "Bloquear a posição do Objeto selecionado (não pode ser movido)."
+msgstr "Bloquear a posição do objeto selecionado (não pode ser movido)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5640,7 +5638,7 @@ msgstr "A adicionar %s..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Cannot instantiate multiple nodes without root."
-msgstr "Impossível instanciar nós múltiplos sem raiz."
+msgstr "Não consigo instanciar nós múltiplos sem raiz."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5650,7 +5648,7 @@ msgstr "Criar Nó"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Error instancing scene from %s"
-msgstr "Erro a instanciar Cena de %s"
+msgstr "Erro a instanciar cena de %s"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Default Type"
@@ -5661,8 +5659,8 @@ msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
-"Arrastar & largar + Shift : Adiciona Nó como irmão\n"
-"Arrastar & largar + Alt : Altera o tipo de Nó"
+"Arrastar & largar + Shift : Adiciona nó como irmão\n"
+"Arrastar & largar + Alt : Altera o tipo de nó"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Polygon3D"
@@ -5849,9 +5847,8 @@ msgid "Mesh is empty!"
msgstr "A Malha está vazia!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Criar irmão de colisão Trimesh"
+msgstr "Não consegui criar uma forma de colisão Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5859,7 +5856,7 @@ msgstr "Criar corpo estático Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
-msgstr "Não funciona na raiz da Cena!"
+msgstr "Isto não funciona na raiz da cena!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Shape"
@@ -5867,30 +5864,28 @@ msgstr "Criar Forma Estática Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Não consigo criar uma única forma convexa para a raiz da cena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Não consegui criar uma forma única de colisão convexa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Criar Forma(s) Convexa(s)"
+msgstr "Criar Forma Convexa Simples"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Não consigo criar múltiplas formas de colisão convexas para a raiz da cena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Impossível criar pasta."
+msgstr "Não consegui criar qualquer forma de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Criar Forma(s) Convexa(s)"
+msgstr "Criar Múltiplas Formas Convexas"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5946,38 +5941,46 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Cria um StaticBody e atribui-lhe automaticamente uma forma de colisão "
+"baseada em polígonos.\n"
+"Esta é a mais precisa (mas mais lenta) opção para deteção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
-msgstr "Criar irmão de colisão Trimesh"
+msgstr "Criar Irmão de Colisão Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Cria uma forma de colisão baseada em polígonos.\n"
+"Esta é a mais precisa (mas mais lenta) opção para deteção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Criar Irmão(s) de Colisão Convexa"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Criar Irmãos Únicos de Colisão Convexa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Cria uma única forma de colisão convexa.\n"
+"Esta é a mais rápida (mas menos precisa) opção para deteção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Criar Irmão(s) de Colisão Convexa"
+msgstr "Criar Vários Irmãos de Colisão Convexa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Cria uma forma de colisão baseada em polígonos.\n"
+"Esta uma opção de desempenho intermédio entre as duas opções acima."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5990,6 +5993,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Cria uma malha de contorno estática. A malha de contorno terá as suas "
+"normais automaticamente invertidas.\n"
+"Pode ser usada no lugar da propriedade Aumentar de SpatialMaterial quando "
+"não é possível usar essa propriedade."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -6046,11 +6053,11 @@ msgstr "Importar da Cena"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Update from Scene"
-msgstr "Atualizar da Cena"
+msgstr "Atualizar a partir da Cena"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
-msgstr "Fonte da Malha não especificada (nem MultiMesh no Nó)."
+msgstr "Fonte da Malha não especificada (nem MultiMesh no nó)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
@@ -6558,7 +6565,7 @@ msgstr "Sincronizar Ossos com Polígono"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
-msgstr "ERRO: Não foi possível carregar recurso!"
+msgstr "ERRO: Não consegui carregar recurso!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
@@ -6628,7 +6635,7 @@ msgstr "Erro ao escrever TextFile:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Could not load file at:"
-msgstr "Impossível carregar ficheiro em:"
+msgstr "Não consigo carregar ficheiro em:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
@@ -6664,7 +6671,7 @@ msgstr "Guardar Ficheiro Como..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Can't obtain the script for running."
-msgstr "Não é possível obter o script para executar."
+msgstr "Não consigo obter o script para executar."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script failed reloading, check console for errors."
@@ -6927,7 +6934,7 @@ msgstr "Só podem ser largados recursos do Sistema de Ficheiros ."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't drop nodes because script '%s' is not used in this scene."
-msgstr "Impossível largar nós porque o script '%s' não é usado neste cena."
+msgstr "Não consigo largar nós porque o script '%s' não é usado neste cena."
#: editor/plugins/script_text_editor.cpp
msgid "Lookup Symbol"
@@ -7100,7 +7107,7 @@ msgstr "Shader"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "This skeleton has no bones, create some children Bone2D nodes."
-msgstr "Este esqueleto não tem ossos, crie alguns nós Bone2D filhos."
+msgstr "Este esqueleto não tem ossos, crie alguns nós filhos Bone2D."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Create Rest Pose from Bones"
@@ -7276,7 +7283,7 @@ msgstr "Sem parente para criar instância de filho."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
-msgstr "Esta operação requer um único Nó selecionado."
+msgstr "Esta operação requer um único nó selecionado."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -7608,7 +7615,7 @@ msgstr "Sprite está vazia!"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr "Impossível converter sprite com frames de animação para malha."
+msgstr "Não consigo converter sprite com frames de animação para malha."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
@@ -7620,7 +7627,7 @@ msgstr "Converter para Mesh2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
-msgstr "Geometria inválida, impossível criar polígono."
+msgstr "Geometria inválida, não consigo criar polígono."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
@@ -7628,19 +7635,19 @@ msgstr "Converter para Polygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
-msgstr "Geometria inválida, impossível criar polígono de colisão."
+msgstr "Geometria inválida, não consigo criar polígono de colisão."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D Sibling"
-msgstr "Criar irmão de CollisionPolygon2D"
+msgstr "Criar Irmão de CollisionPolygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create light occluder."
-msgstr "Geometria inválida, impossível criar oclusor de luz."
+msgstr "Geometria inválida, não consigo criar oclusor de luz."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D Sibling"
-msgstr "Criar irmão de LightOccluder2D"
+msgstr "Criar Irmão de LightOccluder2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite"
@@ -8083,7 +8090,7 @@ msgstr "Criar a partir da Cena"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from Scene"
-msgstr "Fundir a partir da Cena"
+msgstr "Combinar a partir da Cena"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "New Single Tile"
@@ -8223,11 +8230,11 @@ msgstr "Não selecionou uma textura para remover."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
-msgstr "Criar a partir de cena? Irá substituir todos os Tiles atuais."
+msgstr "Criar a partir de cena? Irá substituir todos os tiles atuais."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
-msgstr "Fundir a partir da Cena?"
+msgstr "Combinar a partir da cena?"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Texture"
@@ -9437,7 +9444,7 @@ msgstr "Exportar todos os recursos do Projeto"
#: editor/project_export.cpp
msgid "Export selected scenes (and dependencies)"
-msgstr "Exportar Cenas (e dependências) selecionadas"
+msgstr "Exportar cenas (e dependências) selecionadas"
#: editor/project_export.cpp
msgid "Export selected resources (and dependencies)"
@@ -9489,7 +9496,7 @@ msgstr "Personalizado (separados por vírgula):"
#: editor/project_export.cpp
msgid "Feature List:"
-msgstr "Lista de características:"
+msgstr "Lista de Características:"
#: editor/project_export.cpp
msgid "Script"
@@ -9556,35 +9563,31 @@ msgid "Export With Debug"
msgstr "Exportar com Depuração"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "O Caminho não existe."
+msgstr "O caminho especificado não existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Erro ao abrir ficheiro comprimido, não está no formato ZIP."
+msgstr "Erro ao abrir ficheiro comprimido (não está no formato ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
-"Ficheiro de projeto '.zip' inválido, não contém um ficheiro 'project.godot'."
+"Ficheiro de projeto \".zip\" inválido, não contém um ficheiro \"project.godot"
+"\"."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "Por favor escolha uma pasta vazia."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "Escolha um ficheiro 'project.godot' ou '.zip'."
+msgstr "Escolha um ficheiro \"project.godot\" ou \".zip\"."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "A pasta já contém um projeto Godot."
+msgstr "Esta diretoria já contém um projeto Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -9600,7 +9603,7 @@ msgstr "Nome do Projeto Inválido."
#: editor/project_manager.cpp
msgid "Couldn't create folder."
-msgstr "Impossível criar pasta."
+msgstr "Não consigo criar pasta."
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
@@ -9619,16 +9622,16 @@ msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
msgstr ""
-"Não foi possível carregar o project.godot no caminho do projeto (erro %d). "
+"Não consegui carregar o project.godot no caminho do projeto (erro %d). "
"Poderá estar em falta ou corrompido."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
-msgstr "Impossível editar project.godot no Caminho do Projeto."
+msgstr "Não consigo editar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
-msgstr "Impossível criar project.godot no Caminho do Projeto."
+msgstr "Não consigo criar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "Rename Project"
@@ -9709,7 +9712,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
-"O Renderizador pode ser alterado mais tarde, mas as cenas poderão ter de ser "
+"O renderizador pode ser alterado mais tarde, mas as cenas poderão ter de ser "
"ajustadas."
#: editor/project_manager.cpp
@@ -9726,7 +9729,7 @@ msgstr "Erro: Projeto inexistente no sistema de ficheiros."
#: editor/project_manager.cpp
msgid "Can't open project at '%s'."
-msgstr "Impossível abrir Projeto em '%s'."
+msgstr "Não consigo abrir projeto em '%s'."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -9788,8 +9791,8 @@ msgid ""
"Please edit the project and set the main scene in the Project Settings under "
"the \"Application\" category."
msgstr ""
-"Impossível executar o Projeto: Cena principal não definida.\n"
-"Edite o Projeto e defina a Cena principal em Definições do Projeto dentro da "
+"Não consigo executar o projeto: cena principal não definida.\n"
+"Edite o projeto e defina a cena principal em Definições do Projeto dentro da "
"categoria \"Aplicação\"."
#: editor/project_manager.cpp
@@ -9797,8 +9800,8 @@ msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
-"Impossível executar o Projeto: Ativos têm de ser importados.\n"
-"Edite o Projeto para desencadear a importação inicial."
+"Não consigo executar o projeto: Ativos têm de ser importados.\n"
+"Edite o projeto para desencadear a importação inicial."
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
@@ -9883,7 +9886,7 @@ msgstr "Reiniciar agora"
#: editor/project_manager.cpp
msgid "Can't run project"
-msgstr "Impossível executar o Projeto"
+msgstr "Não consigo executar o Projeto"
#: editor/project_manager.cpp
msgid ""
@@ -10282,9 +10285,8 @@ msgid "Suffix"
msgstr "Sufixo"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Expressões Regulares"
+msgstr "Usar Expressões Regulares"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10296,15 +10298,15 @@ msgstr "Substituto"
#: editor/rename_dialog.cpp
msgid "Node name"
-msgstr "Nome do Nó"
+msgstr "Nome do nó"
#: editor/rename_dialog.cpp
msgid "Node's parent name, if available"
-msgstr "Nome do parente do Nó, se disponível"
+msgstr "Nome do parente do nó, se disponível"
#: editor/rename_dialog.cpp
msgid "Node type"
-msgstr "Tipo de Nó"
+msgstr "Tipo de nó"
#: editor/rename_dialog.cpp
msgid "Current scene name"
@@ -10312,7 +10314,7 @@ msgstr "Nome da cena atual"
#: editor/rename_dialog.cpp
msgid "Root node name"
-msgstr "Nome do Nó raiz"
+msgstr "Nome do nó raiz"
#: editor/rename_dialog.cpp
msgid ""
@@ -10323,7 +10325,6 @@ msgstr ""
"Comparar opções do contador."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Contador por nível"
@@ -10364,14 +10365,12 @@ msgid "Keep"
msgstr "Manter"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
-msgstr "CamelCase para under_scored"
+msgstr "PascalCase para snake_case"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
-msgstr "under_scored para CamelCase"
+msgstr "snake_case para PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
@@ -10390,14 +10389,12 @@ msgid "Reset"
msgstr "Repor"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Expressões Regulares"
+msgstr "Erro em Expressão Regular"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "Carateres válidos:"
+msgstr "No carácter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10421,35 +10418,35 @@ msgstr "Modo Execução:"
#: editor/run_settings_dialog.cpp
msgid "Current Scene"
-msgstr "Cena atual"
+msgstr "Cena Atual"
#: editor/run_settings_dialog.cpp
msgid "Main Scene"
-msgstr "Cena principal"
+msgstr "Cena Principal"
#: editor/run_settings_dialog.cpp
msgid "Main Scene Arguments:"
-msgstr "Argumentos da Cena principal:"
+msgstr "Argumentos da Cena Principal:"
#: editor/run_settings_dialog.cpp
msgid "Scene Run Settings"
-msgstr "Configurações de execução da Cena"
+msgstr "Configurações de Execução da Cena"
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
-msgstr "Nenhum parente para instanciar a Cena."
+msgstr "Nenhum parente para instância das cenas."
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
-msgstr "Erro ao carregar a Cena de %s"
+msgstr "Erro ao carregar a cena de %s"
#: editor/scene_tree_dock.cpp
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
msgstr ""
-"Impossível instanciar a Cena '%s' porque a Cena atual existe dentro de um "
-"dos seus Nós."
+"Não consigo instanciar a cena '%s' porque a cena atual existe dentro de um "
+"dos seus nós."
#: editor/scene_tree_dock.cpp
msgid "Instance Scene(s)"
@@ -10461,7 +10458,7 @@ msgstr "Substituir com Cena-Ramo"
#: editor/scene_tree_dock.cpp
msgid "Instance Child Scene"
-msgstr "Instanciar Cena filha"
+msgstr "Instanciar Cena Filha"
#: editor/scene_tree_dock.cpp
msgid "Clear Script"
@@ -10485,15 +10482,16 @@ msgstr "Duplicar Nó(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr "Impossível mudar nó em cenas herdadas, a ordem dos nós não pode mudar."
+msgstr ""
+"Não consigo mudar nó em cenas herdadas, a ordem dos nós não pode mudar."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
-msgstr "O nó deve pertencer à cena editada para se tornar root."
+msgstr "O nó deve pertencer à cena editada para se tornar raiz."
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
-msgstr "Cenas instantâneas não se podem tornar root"
+msgstr "Cenas instanciadas não se podem tornar raízes"
#: editor/scene_tree_dock.cpp
msgid "Make node as Root"
@@ -10501,38 +10499,38 @@ msgstr "Tornar Nó Raiz"
#: editor/scene_tree_dock.cpp
msgid "Delete %d nodes?"
-msgstr "Apagar %d Nós?"
+msgstr "Apagar %d nós?"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
-msgstr "Apagar Nó raiz \"%s\"?"
+msgstr "Apagar nó raiz \"%s\"?"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\" and its children?"
-msgstr "Apagar Nó \"%s\" e filhos?"
+msgstr "Apagar nó \"%s\" e filhos?"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\"?"
-msgstr "Apagar Nó \"%s\"?"
+msgstr "Apagar nó \"%s\"?"
#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
-msgstr "Impossível executar com o Nó raiz."
+msgstr "Não consigo executar com o nó raiz."
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
-msgstr "Esta operação não pode ser feita numa Cena instanciada."
+msgstr "Esta operação não pode ser feita numa cena instanciada."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
-msgstr "Guardar nova Cena como..."
+msgstr "Guardar Nova Cena Como..."
#: editor/scene_tree_dock.cpp
msgid ""
"Disabling \"editable_instance\" will cause all properties of the node to be "
"reverted to their default."
msgstr ""
-"Desativar \"editable_instance\" irá reverter todas as propriedades do Nó "
+"Desativar \"editable_instance\" irá reverter todas as propriedades do nó "
"para os seus valores padrão."
#: editor/scene_tree_dock.cpp
@@ -10549,7 +10547,7 @@ msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
-msgstr "Nova Raiz de Cena"
+msgstr "Nova Raiz da Cena"
#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
@@ -10573,11 +10571,11 @@ msgstr "Outro Nó"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr "Impossível operar em Nós de uma Cena externa!"
+msgstr "Não consigo operar em nós de uma cena externa!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr "Impossível operar em Nós herdados pela Cena atual!"
+msgstr "Não consigo operar em nós herdados pela cena atual!"
#: editor/scene_tree_dock.cpp
msgid "Attach Script"
@@ -10596,16 +10594,16 @@ msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
msgstr ""
-"Impossível guardar nova Cena. Provavelmente dependências (instâncias) não "
+"Não consigo guardar nova cena. Provavelmente dependências (instâncias) não "
"foram satisfeitas."
#: editor/scene_tree_dock.cpp
msgid "Error saving scene."
-msgstr "Erro ao guardar Cena."
+msgstr "Erro ao guardar cena."
#: editor/scene_tree_dock.cpp
msgid "Error duplicating scene to save it."
-msgstr "Erro ao duplicar Cena para guardar."
+msgstr "Erro ao duplicar cena para guardar."
#: editor/scene_tree_dock.cpp
msgid "Sub-Resources"
@@ -10629,7 +10627,7 @@ msgstr "Abrir documentação"
#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
-msgstr "Adicionar Nó filho"
+msgstr "Adicionar Nó Filho"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
@@ -10645,15 +10643,15 @@ msgstr "Recolocar o Novo Nó"
#: editor/scene_tree_dock.cpp
msgid "Make Scene Root"
-msgstr "Tornar Nó Raiz"
+msgstr "Tornar Raiz da Cena"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
-msgstr "Fundir a partir da Cena"
+msgstr "Combinar a partir da Cena"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Save Branch as Scene"
-msgstr "Guardar ramo como Cena"
+msgstr "Guardar Ramo como Cena"
#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
msgid "Copy Node Path"
@@ -10672,16 +10670,16 @@ msgid ""
"Instance a scene file as a Node. Creates an inherited scene if no root node "
"exists."
msgstr ""
-"Instanciar Ficheiro de Cena como Nó. Cria uma Cena herdada se não existir Nó "
-"raiz."
+"Instanciar um ficheiro de cena como um Nó. Cria uma cena herdada se não "
+"existir nó raiz."
#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
-msgstr "Anexar Script novo ou existente ao Nó selecionado."
+msgstr "Anexar script novo ou existente ao nó selecionado."
#: editor/scene_tree_dock.cpp
msgid "Clear a script for the selected node."
-msgstr "Limpar Script do Nó selecionado."
+msgstr "Limpar script do nó selecionado."
#: editor/scene_tree_dock.cpp
msgid "Remote"
@@ -10713,7 +10711,7 @@ msgstr "(A Ligar de)"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr "Aviso de configuração do Nó:"
+msgstr "Aviso de configuração do nó:"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -10773,7 +10771,7 @@ msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
-msgstr "Nome de Nó inválido, os carateres seguintes não são permitidos:"
+msgstr "Nome de nó inválido, os caracteres seguintes não são permitidos:"
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
@@ -10785,7 +10783,7 @@ msgstr "Ãrvore de Cena (Nós):"
#: editor/scene_tree_editor.cpp
msgid "Node Configuration Warning!"
-msgstr "Aviso de configuração de Nó!"
+msgstr "Aviso de Configuração de Nó!"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -10825,7 +10823,7 @@ msgstr "Erro ao carregar Modelo '%s'"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Erro - Impossível criar Script no Sistema de Ficheiros."
+msgstr "Erro - Não consigo criar script no sistema de ficheiros."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
@@ -10860,9 +10858,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Nome ou Caminho de parente herdado inválido."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Script é válido."
+msgstr "Caminho/nome de Script é válido."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10953,7 +10950,6 @@ msgid "Copy Error"
msgstr "Copiar Erro"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "Memória Vídeo"
@@ -11035,7 +11031,7 @@ msgstr "Tipo de controlo clicado:"
#: editor/script_editor_debugger.cpp
msgid "Live Edit Root:"
-msgstr "Raiz de edição ao vivo:"
+msgstr "Raiz de Edição ao Vivo:"
#: editor/script_editor_debugger.cpp
msgid "Set From Tree"
@@ -11220,8 +11216,8 @@ msgstr "Formato de dicionário de instância inválido (falta @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (can't load script at @path)"
msgstr ""
-"Formato de dicionário de instância inválido (não foi possível carregar o "
-"Script em @path)"
+"Formato de dicionário de instância inválido (não consigo carregar o script "
+"em @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (invalid script at @path)"
@@ -11436,7 +11432,7 @@ msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
msgstr ""
-"Um Nó fez yield sem memória para usar, por favor leia os documentos para "
+"Um nó fez yield sem memória para usar, por favor leia os documentos para "
"saber como fazer yield corretamente!"
#: modules/visual_script/visual_script.cpp
@@ -11444,7 +11440,7 @@ msgid ""
"Node yielded, but did not return a function state in the first working "
"memory."
msgstr ""
-"O Nó fez yield, mas não retornou um estado de Função na primeira memória de "
+"O nó fez yield, mas não retornou um estado de função na primeira memória de "
"trabalho."
#: modules/visual_script/visual_script.cpp
@@ -11453,15 +11449,15 @@ msgid ""
"your node please."
msgstr ""
"O valor de retorno deve ser atribuído ao primeiro elemento da memória de "
-"trabalho de Nós! Corrija o seu Nó por favor."
+"trabalho de nós! Corrija o seu nó por favor."
#: modules/visual_script/visual_script.cpp
msgid "Node returned an invalid sequence output: "
-msgstr "O Nó retornou uma sequência de saída (output) incorreta: "
+msgstr "O nó retornou uma sequência de saída (output) incorreta: "
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr "Foi encontrada o bit da sequência mas não o Nó na pilha, relate o bug!"
+msgstr "Foi encontrada o bit da sequência mas não o nó na pilha, relate o bug!"
#: modules/visual_script/visual_script.cpp
msgid "Stack overflow with stack depth: "
@@ -11589,11 +11585,11 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a simple reference to the node."
-msgstr "Pressione %s para largar uma referência simples no Nó."
+msgstr "Pressione %s para largar uma referência simples no nó."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr "Pressione Ctrl para largar uma referência simples no Nó."
+msgstr "Pressione Ctrl para largar uma referência simples no nó."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
@@ -11601,7 +11597,7 @@ msgstr "Pressione %s para largar um Setter variável."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Variable Setter."
-msgstr "Pressione Ctrl para largar um Setter variável."
+msgstr "Pressione Ctrl para largar um Setter Variável."
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Preload Node"
@@ -11609,14 +11605,15 @@ msgstr "Adicionar Nó de Pré-carregamento"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
-msgstr "Adicionar Nó da Ãrvore"
+msgstr "Adicionar Nó(s) da Ãrvore"
#: modules/visual_script/visual_script_editor.cpp
msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
-"Impossível largar propriedades porque o script '%s' não é usado neste cena.\n"
+"Não consigo largar propriedades porque o script '%s' não é usado neste "
+"cena.\n"
"Largue com 'Shift' para copiar apenas a assinatura."
#: modules/visual_script/visual_script_editor.cpp
@@ -11649,11 +11646,11 @@ msgstr "Desconectar Nós"
#: modules/visual_script/visual_script_editor.cpp
msgid "Connect Node Data"
-msgstr "Conectar Dados de Nó"
+msgstr "Conectar Dados do Nó"
#: modules/visual_script/visual_script_editor.cpp
msgid "Connect Node Sequence"
-msgstr "Conectar Sequência de Nós"
+msgstr "Conectar Sequência do Nó"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
@@ -11669,7 +11666,7 @@ msgstr "Redimensionar Comentário"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
-msgstr "Impossível copiar o Nó Função."
+msgstr "Não consigo copiar o nó função."
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
@@ -11681,11 +11678,11 @@ msgstr "Colar Nós VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
-msgstr "Impossível criar função com um nó função."
+msgstr "Não consigo criar função com um nó função."
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function of nodes from nodes of multiple functions."
-msgstr "Impossível criar função de nós com nós de várias funções."
+msgstr "Não consigo criar função de nós a partir de nós de várias funções."
#: modules/visual_script/visual_script_editor.cpp
msgid "Select at least one node with sequence port."
@@ -11801,7 +11798,7 @@ msgstr "Caminho não conduz Nó!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr "Nome de Propriedade índice '%s' inválido em Nó %s."
+msgstr "Nome de propriedade índice '%s' inválido no nó %s."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
@@ -11821,15 +11818,16 @@ msgstr "VariableSet não encontrado no script: "
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
-msgstr "Impossível processar gráfico, Nó personalizado sem método _step()."
+msgstr ""
+"Nó personalizado não tem método _step(), não podendo processar um gráfico."
#: modules/visual_script/visual_script_nodes.cpp
msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
msgstr ""
-"Valor de retorno de _step() inválido, tem de ser inteiro (seq out), ou "
-"string (error)."
+"Retorno de valor inválido a partir do _step(), tem de ser inteiro (seq out), "
+"ou string (error)."
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search VisualScript"
@@ -11854,15 +11852,16 @@ msgstr "Os segmentos de pacote devem ser de comprimento diferente de zero."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-"O caráter '%s' não é permitido em nomes de pacotes de aplicações Android."
+"O carácter '%s' não é permitido em nomes de pacotes de aplicações Android."
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
-msgstr "Um dígito não pode ser o primeiro caráter num segmento de pacote."
+msgstr "Um dígito não pode ser o primeiro carácter num segmento de pacote."
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr "O caráter '%s' não pode ser o primeiro caráter num segmento de pacote."
+msgstr ""
+"O carácter '%s' não pode ser o primeiro carácter num segmento de pacote."
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
@@ -11957,13 +11956,13 @@ msgstr "Falta o identificador."
#: platform/iphone/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
-msgstr "O caráter \"%s\" não é permitido no Identificador."
+msgstr "O carácter \"%s\" não é permitido no Identificador."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
msgstr ""
-"ID da equipa da App Store não especificado - não é possível configurar o "
-"projecto."
+"ID da equipa da App Store não especificado - não consigo configurar o "
+"projeto."
#: platform/iphone/export/export.cpp
msgid "Invalid Identifier:"
@@ -11987,11 +11986,11 @@ msgstr "Executar HTML exportado no Navegador padrão do sistema."
#: platform/javascript/export/export.cpp
msgid "Could not write file:"
-msgstr "Impossível escrever Ficheiro:"
+msgstr "Não consigo escrever ficheiro:"
#: platform/javascript/export/export.cpp
msgid "Could not open template for export:"
-msgstr "Impossível abrir Modelo para exportar:"
+msgstr "Não consigo abrir modelo para exportação:"
#: platform/javascript/export/export.cpp
msgid "Invalid export template:"
@@ -11999,11 +11998,11 @@ msgstr "Modelo de exportação inválido:"
#: platform/javascript/export/export.cpp
msgid "Could not read custom HTML shell:"
-msgstr "Impossível ler Shell HTML personalizado:"
+msgstr "Não consigo ler shell HTML personalizado:"
#: platform/javascript/export/export.cpp
msgid "Could not read boot splash image file:"
-msgstr "Impossível ler Ficheiro de imagem do ecrã de inicialização:"
+msgstr "Não consigo ler ficheiro de imagem do ecrã de inicialização:"
#: platform/javascript/export/export.cpp
msgid "Using default boot splash image."
@@ -12090,8 +12089,7 @@ msgid ""
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
-"Este nó não tem forma, não conseguindo assim colidir ou interagir com outros "
-"objetos.\n"
+"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n"
"Considere adicionar nós CollisionShape2D ou CollisionPolygon2D como filhos "
"para definir a sua forma."
@@ -12101,7 +12099,7 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionPolygon2D serve apenas para fornecer uma forma de colisão a um Nó "
+"CollisionPolygon2D serve apenas para fornecer uma forma de colisão a um nó "
"derivado de CollisionObject2D. Use-o apenas como um filho de Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma."
@@ -12115,7 +12113,7 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D serve apenas para fornecer uma forma de colisão a um Nó "
+"CollisionShape2D serve apenas para fornecer uma forma de colisão a um nó "
"derivado de CollisionObject2D. Use-o apenas como um filho de Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma."
@@ -12159,22 +12157,22 @@ msgid ""
"A NavigationPolygon resource must be set or created for this node to work. "
"Please set a property or draw a polygon."
msgstr ""
-"Um recurso NavigationPolygon tem de ser definido ou criado para este Nó "
-"funcionar. Defina a Propriedade ou desenhe o Polígono."
+"Um recurso NavigationPolygon tem de ser definido ou criado para este nó "
+"funcionar. Defina a propriedade ou desenhe o polígono."
#: scene/2d/navigation_polygon.cpp
msgid ""
"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
"node. It only provides navigation data."
msgstr ""
-"NavigationPolygonInstance tem de ser filho ou neto de um Nó Navigation2D. "
+"NavigationPolygonInstance tem de ser filho ou neto de um nó Navigation2D. "
"Apenas fornece dados de navegação."
#: scene/2d/parallax_layer.cpp
msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
-"O Nó ParallaxLayer só funciona quando definido como filho de um Nó "
+"O nó ParallaxLayer só funciona quando definido como filho de um nó "
"ParallaxBackground."
#: scene/2d/particles_2d.cpp
@@ -12184,7 +12182,7 @@ msgid ""
"CPUParticles\" option for this purpose."
msgstr ""
"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
-"Use o Nó CPUParticles2D. Pode usar a opção \"Converter em CPUParticles\" "
+"Use o nó CPUParticles2D. Pode usar a opção \"Converter em CPUParticles\" "
"para este efeito."
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
@@ -12206,7 +12204,7 @@ msgstr ""
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
-"PathFollow2D apenas funciona quando definido como filho de um Nó Path2D."
+"PathFollow2D apenas funciona quando definido como filho de um nó Path2D."
#: scene/2d/physics_body_2d.cpp
msgid ""
@@ -12214,14 +12212,14 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Mudanças no tamanho do RigidBody2D (em modos caráter ou rígido) serão "
+"Mudanças no tamanho do RigidBody2D (em modos carácter ou rígido) serão "
"reescritas pelo motor de física na execução.\n"
"Mude antes o tamanho das formas de colisão filhas."
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
msgstr ""
-"Para funcionar, a Propriedade Caminho tem de apontar para um Nó Node2D "
+"Para funcionar, a Propriedade Caminho tem de apontar para um nó Node2D "
"válido."
#: scene/2d/skeleton_2d.cpp
@@ -12253,15 +12251,15 @@ msgid ""
"as parent."
msgstr ""
"VisibilityEnabler2D funciona melhor quando usado diretamente como parente na "
-"Cena raiz editada."
+"cena raiz editada."
#: scene/3d/arvr_nodes.cpp
msgid "ARVRCamera must have an ARVROrigin node as its parent."
-msgstr "ARVRCamera precisa de um Nó ARVROrigin como parente."
+msgstr "ARVRCamera precisa de um nó ARVROrigin como parente."
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
-msgstr "ARVRController precisa de um Nó ARVROrigin como parente."
+msgstr "ARVRController precisa de um nó ARVROrigin como parente."
#: scene/3d/arvr_nodes.cpp
msgid ""
@@ -12273,7 +12271,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr "ARVRAnchor precisa de um Nó ARVROrigin como parente."
+msgstr "ARVRAnchor precisa de um nó ARVROrigin como parente."
#: scene/3d/arvr_nodes.cpp
msgid ""
@@ -12285,7 +12283,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp
msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr "ARVROrigin exige um Nó filho ARVRCamera."
+msgstr "ARVROrigin exige um nó filho ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "%d%%"
@@ -12317,8 +12315,7 @@ msgid ""
"Consider adding a CollisionShape or CollisionPolygon as a child to define "
"its shape."
msgstr ""
-"Este nó não tem forma, não conseguindo assim colidir ou interagir com outros "
-"objetos.\n"
+"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n"
"Considere adicionar nós CollisionShape ou CollisionPolygon como filhos para "
"definir a sua forma."
@@ -12328,7 +12325,7 @@ msgid ""
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionPolygon serve apenas para fornecer uma forma de colisão a um Nó "
+"CollisionPolygon serve apenas para fornecer uma forma de colisão a um nó "
"derivado de CollisionObject. Use-o apenas como um filho de Area, StaticBody, "
"RigidBody, KinematicBody, etc. para lhes dar uma forma."
@@ -12342,7 +12339,7 @@ msgid ""
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionShape serve apenas para fornecer uma forma de colisão a um Nó "
+"CollisionShape serve apenas para fornecer uma forma de colisão a um nó "
"derivado de CollisionObject. Use-o apenas como um filho de Area, StaticBody, "
"RigidBody, KinematicBody, etc. para lhes dar uma forma."
@@ -12362,6 +12359,11 @@ msgstr ""
"Formas planas não funcionam bem e serão removidas em futuras versões. Não as "
"use por favor."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada é visível porque nenhuma Malha foi atribuída."
@@ -12393,7 +12395,7 @@ msgstr "Uma SpotLight com ângulo superior a 90 graus não cria sombras."
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
-"Um recurso NavigationMesh tem de ser definido ou criado para este Nó "
+"Um recurso NavigationMesh tem de ser definido ou criado para este nó "
"funcionar."
#: scene/3d/navigation_mesh.cpp
@@ -12401,7 +12403,7 @@ msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
-"NavigationMeshInstance tem de ser filho ou neto de um Nó Navigation. Apenas "
+"NavigationMeshInstance tem de ser filho ou neto de um nó Navigation. Apenas "
"fornece dados de navegação."
#: scene/3d/particles.cpp
@@ -12411,7 +12413,7 @@ msgid ""
"\" option for this purpose."
msgstr ""
"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
-"Use o Nó CPUParticles. Pode usar a opção \"Converter em CPUParticles\" para "
+"Use o nó CPUParticles. Pode usar a opção \"Converter em CPUParticles\" para "
"este efeito."
#: scene/3d/particles.cpp
@@ -12430,7 +12432,7 @@ msgstr ""
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
-msgstr "PathFollow apenas funciona quando definido como filho de um Nó Path."
+msgstr "PathFollow apenas funciona quando definido como filho de um nó Path."
#: scene/3d/path.cpp
msgid ""
@@ -12446,7 +12448,7 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Mudanças no tamanho do RigidBody (em modos caráter ou rígido) serão "
+"Mudanças no tamanho do RigidBody (em modos carácter ou rígido) serão "
"reescritas pelo motor de física na execução.\n"
"Mude antes o tamanho das formas de colisão filhas."
@@ -12455,7 +12457,7 @@ msgid ""
"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
"derived node to work."
msgstr ""
-"Para funcionar, a Propriedade \"Caminho Remoto\" tem de apontar para um Nó "
+"Para funcionar, a Propriedade \"Caminho Remoto\" tem de apontar para um nó "
"Spatial válido ou seu derivado."
#: scene/3d/soft_body.cpp
@@ -12500,7 +12502,7 @@ msgstr ""
msgid ""
"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
msgstr ""
-"Apenas um WorldEnvironment é permitido por Cena (ou grupo de cenas "
+"Apenas um WorldEnvironment é permitido por cena (ou grupo de cenas "
"instanciadas)."
#: scene/3d/world_environment.cpp
@@ -12533,7 +12535,7 @@ msgstr "Nada conectado à entrada '%s' do nó '%s'."
#: scene/animation/animation_tree.cpp
msgid "No root AnimationNode for the graph is set."
-msgstr "Não foi definida uma raíz AnimationNode para o gráfico."
+msgstr "Não foi definida uma raiz AnimationNode para o gráfico."
#: scene/animation/animation_tree.cpp
msgid "Path to an AnimationPlayer node containing animations is not set."
@@ -12547,11 +12549,11 @@ msgstr ""
#: scene/animation/animation_tree.cpp
msgid "The AnimationPlayer root node is not a valid node."
-msgstr "O Nó raiz de AnimationPlayer não é um Nó válido."
+msgstr "O nó raiz de AnimationPlayer não é um nó válido."
#: scene/animation/animation_tree_player.cpp
msgid "This node has been deprecated. Use AnimationTree instead."
-msgstr "Este nó foi depreciado. Use AnimationTree em vez disso."
+msgstr "Este nó foi descontinuado. Use antes AnimationTree."
#: scene/gui/color_picker.cpp
msgid ""
@@ -12591,7 +12593,7 @@ msgid ""
msgstr ""
"Por si só um Contentor não tem utilidade, a não ser que um script configure "
"a disposição dos seu filhos.\n"
-"Se não pretende adicionar um script, use antes um simples Nó Control."
+"Se não pretende adicionar um script, use antes um simples nó Control."
#: scene/gui/control.cpp
msgid ""
@@ -12656,7 +12658,7 @@ msgstr ""
"Esta vista não está definida como alvo de Renderização. Se pretende "
"apresentar o seu conteúdo diretamente no ecrã, torne-a um filho de um "
"Control de modo a que obtenha um tamanho. Caso contrário, torne-a um "
-"RenderTarget e atribua a sua textura interna a outro Nó para visualizar."
+"RenderTarget e atribua a sua textura interna a outro nó para visualizar."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 464f5ba57a..d52127fd95 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -1482,6 +1482,10 @@ msgstr "Nume"
msgid "Singleton"
msgstr "Singleton (Unicat)"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Lipiţi Parametrii"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Scena se Actualizează"
@@ -1758,7 +1762,7 @@ msgstr "Arătați în Administratorul de Fișiere"
msgid "New Folder..."
msgstr "Director Nou..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Reîmprospătați"
@@ -3996,6 +4000,11 @@ msgid "Saving..."
msgstr "Se Salvează..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Fișiere"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Setează ca Implicit pentru '%s'"
@@ -4004,10 +4013,6 @@ msgid "Clear Default for '%s'"
msgstr "Curăță setarea Implicită pentru '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Fișiere"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importă Ca:"
@@ -4058,10 +4063,6 @@ msgid "Copy Params"
msgstr "Copie Parametrii"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Lipiţi Parametrii"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Clip-board de resurse gol !"
@@ -6111,7 +6112,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Creează un Frate de Coliziune Convex"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12529,6 +12530,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index f21dc93c64..b05077637a 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -32,7 +32,7 @@
# Vadim Vergasov <vadim.vergasov2003@gmail.com>, 2018, 2019.
# ÐÑлан Снупов <aslan170505@gmail.com>, 2018.
# Alexandr Eremeev <ae125529@gmail.com>, 2019.
-# Ruaguzov Michael <miha890r@gmail.com>, 2019.
+# Ruaguzov Michael <miha890r@gmail.com>, 2019, 2020.
# Alexander Danilov <modos189@protonmail.com>, 2019.
# Sergey Nakhov <true.stalin.exe@gmail.com>, 2019.
# Bumerang <it.bumerang@gmail.com>, 2019.
@@ -41,7 +41,7 @@
# Nikita <iron-nikita@yandex.ru>, 2019.
# LeLuCh B0й <alekx@alumni.nottingham.ac.uk>, 2019.
# ÐÑ€Ñений Солодков <arsen332211@gmail.com>, 2019.
-# Nikita <yakrobat@protonmail.com>, 2019.
+# Nikita <yakrobat@protonmail.com>, 2019, 2020.
# LAT_Rio <AlSenya@yandex.ru>, 2019.
# devnp <dev.necropan@gmail.com>, 2019.
# Виктор <victor8632@bk.ru>, 2019.
@@ -53,7 +53,7 @@
# Sergey <www.window1@mail.ru>, 2019.
# Vladislav <onion.ring@mail.ru>, 2019, 2020.
# knightpp <kotteam99@gmail.com>, 2019.
-# КонÑтантин Рин <email.to.rean@gmail.com>, 2019.
+# КонÑтантин Рин <email.to.rean@gmail.com>, 2019, 2020.
# Maxim Samburskiy <alpacones@outlook.com>, 2019.
# Dima Koshel <form.eater@gmail.com>, 2019.
# Danil Alexeev <danil@alexeev.xyz>, 2019, 2020.
@@ -64,12 +64,14 @@
# Andy <8ofproject@gmail.com>, 2020.
# Ðндрей БелÑков <andbelandantrus@gmail.com>, 2020.
# Artur Tretiak <stikyt@protonmail.com>, 2020.
+# Smadjavul <o1985af@gmail.com>, 2020.
+# anonymous <noreply@weblate.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-02-14 03:18+0000\n"
-"Last-Translator: Artur Tretiak <stikyt@protonmail.com>\n"
+"PO-Revision-Date: 2020-03-07 21:18+0000\n"
+"Last-Translator: Smadjavul <o1985af@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -78,7 +80,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -96,8 +98,9 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "ÐедоÑтаточно байтов Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð°Ð¹Ñ‚Ð¾Ð² или неверный формат."
#: core/math/expression.cpp
+#, fuzzy
msgid "Invalid input %i (not passed) in expression"
-msgstr "Ðеправильный ввод %i (не был передан) в выражении"
+msgstr "Ðекорректный ввод %i (не был передан) в выражении"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -388,11 +391,11 @@ msgstr "Удалить ключ(и)"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr "Изменить ÑпоÑоб Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸"
+msgstr "Изменить режим Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸"
#: editor/animation_track_editor.cpp
msgid "Change Animation Interpolation Mode"
-msgstr "Изменить метод интерполÑции анимации"
+msgstr "Изменить режим интерполÑции анимации"
#: editor/animation_track_editor.cpp
msgid "Change Animation Loop Mode"
@@ -748,9 +751,8 @@ msgid "Line Number:"
msgstr "Ðомер Ñтроки:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Заменить..."
+msgstr "%d заменено."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1548,6 +1550,10 @@ msgstr "Ðазвание"
msgid "Singleton"
msgstr "Синглтон"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Ð’Ñтавить параметры"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Обновление Ñцены"
@@ -1835,7 +1841,7 @@ msgstr "ПроÑмотреть в проводнике"
msgid "New Folder..."
msgstr "ÐÐ¾Ð²Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Обновить"
@@ -1929,7 +1935,7 @@ msgstr "Обновить файлы."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
-msgstr "Добавить или удалить текущую папку из избранных."
+msgstr "Добавить/убрать текущую папку в избранное."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Toggle the visibility of hidden files."
@@ -3285,7 +3291,7 @@ msgstr "ÐазначаетÑÑ..."
#: editor/editor_properties.cpp
msgid "Invalid RID"
-msgstr "Ðеверный путь"
+msgstr "Ðеверный RID"
#: editor/editor_properties.cpp
msgid ""
@@ -3400,7 +3406,7 @@ msgstr "Уже ÑущеÑтвует Ð¾Ñ‚Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð°Ñ ÑценÐ
#: editor/editor_run_script.cpp
msgid "Couldn't instance script:"
-msgstr "Скрипт не ÑоответÑтвует требованиÑм:"
+msgstr "Ðе удалоÑÑŒ Ñоздать ÑкземплÑÑ€ Ñкрипта:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
@@ -3477,7 +3483,7 @@ msgstr "Ðеверный формат version.txt файла внутри шаб
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
-msgstr "Ðе найден version.txt файл в шаблонах."
+msgstr "Файл version.txt не найден в шаблонах."
#: editor/export_template_manager.cpp
msgid "Error creating path for templates:"
@@ -4013,6 +4019,10 @@ msgid "Saving..."
msgstr "Сохранение..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d файлов"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "УÑтановить по умолчанию Ð´Ð»Ñ '%s'"
@@ -4021,10 +4031,6 @@ msgid "Clear Default for '%s'"
msgstr "ОчиÑтить по умолчанию Ð´Ð»Ñ '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Файлы"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Импортировать как:"
@@ -4038,7 +4044,7 @@ msgstr "Переимпортировать"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr "Сохранить Ñцены, импортировать заново и перезапуÑтить"
+msgstr "Сохранить Ñцены, переимпортировать и перезапуÑтить"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
@@ -4073,10 +4079,6 @@ msgid "Copy Params"
msgstr "Копировать параметры"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Ð’Ñтавить параметры"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Редактировать реÑÑƒÑ€Ñ Ð² буфере обмена"
@@ -5246,7 +5248,9 @@ msgstr "ПредуÑтановки Ð´Ð»Ñ Ñкорей и Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ñ
msgid ""
"When active, moving Control nodes changes their anchors instead of their "
"margins."
-msgstr "При активном движении узлы Control менÑÑŽÑ‚ Ñвои ÑÐºÐ¾Ñ€Ñ Ð²Ð¼ÐµÑто полей."
+msgstr ""
+"Когда активно, у перемещаемых узлов Control будут изменÑÑ‚ÑŒÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñкорей "
+"вмеÑто отÑтупов."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Top Left"
@@ -5896,9 +5900,8 @@ msgid "Mesh is empty!"
msgstr "ПолиÑетка пуÑта!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Создать вогнутую облаÑÑ‚ÑŒ ÑтолкновениÑ"
+msgstr "Ðевозможно Ñоздать треугольную Ñетку Ð´Ð»Ñ Ñ„Ð¾Ñ€Ð¼Ñ‹ Ñтолкновений."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5929,6 +5932,7 @@ msgstr "Создать выпуклую форму(ы)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
+"Ðевозможно Ñоздать неÑколько выпуклых форм ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€Ð½Ñ Ñцены."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -5994,6 +5998,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Создает StaticBody и автоматичеÑки приÑваивает ему форму ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð½Ð° "
+"оÑнове полигона.\n"
+"Это Ñамый точный (но Ñамый медленный) ÑпоÑоб Ð¾Ð±Ð½Ð°Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñтолкновений."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -6004,10 +6011,12 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Создает форму ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð½Ð° оÑнове полигона.\n"
+"Это Ñамый точный (но Ñамый медленный) ÑпоÑоб Ð¾Ð±Ð½Ð°Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñтолкновений."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Создать выпуклую облаÑÑ‚ÑŒ ÑтолкновениÑ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -6015,6 +6024,8 @@ msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Создаёт выпуклую форму ÑтолкновениÑ.\n"
+"Это Ñамый быÑтрый (но наименее точный) ÑпоÑоб Ð¾Ð±Ð½Ð°Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñтолкновений."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -6026,6 +6037,8 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Создает форму ÑÑ‚Ð¾Ð»ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð½Ð° оÑнове полигона.\n"
+"Это Ñредний по производительноÑти вариант между Ð´Ð²ÑƒÐ¼Ñ Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð¸Ð¼Ð¸."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -9314,7 +9327,7 @@ msgstr "Вычитает вектор из вектора."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector constant."
-msgstr "Векторную конÑтанта."
+msgstr "Ð’ÐµÐºÑ‚Ð¾Ñ€Ð½Ð°Ñ ÐºÐ¾Ð½Ñтанта."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector uniform."
@@ -9754,7 +9767,7 @@ msgid ""
"Not recommended for web games"
msgstr ""
"Более выÑокое качеÑтво графики\n"
-"Ð’Ñе функции доÑтупны\n"
+"ДоÑтупны вÑе функции\n"
"ÐеÑовмеÑтимо Ñо Ñтарым оборудованием\n"
"Ðе рекомендуетÑÑ Ð´Ð»Ñ Ð²ÐµÐ±-игр"
@@ -10466,7 +10479,7 @@ msgstr "РегулÑрное выражение"
#: editor/rename_dialog.cpp
#, fuzzy
msgid "At character %s"
-msgstr "ДопуÑтимые Ñимволы:"
+msgstr "Ðа Ñимволе %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -11744,7 +11757,7 @@ msgstr "Изменить размер комментариÑ"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
-msgstr "Ðе удаётÑÑ Ñкопировать узел функцию."
+msgstr "Ðе удаётÑÑ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ узел функции."
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
@@ -12436,6 +12449,11 @@ msgstr ""
"Формы плоÑкоÑтей не очень хорошо работают и будут удалены в поÑледующих "
"верÑиÑÑ…. ПожалуйÑта, не иÑпользуйте их."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Ðичто не видно, потому что не назначена Ñетка."
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 98432aea62..119818e11f 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -1473,6 +1473,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1749,7 +1753,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3828,15 +3832,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3886,10 +3890,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5794,7 +5794,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11921,6 +11921,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 995ab69e47..50cf59efdc 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -1511,6 +1511,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1801,7 +1805,7 @@ msgstr "Otvoriť súbor"
msgid "New Folder..."
msgstr "Vytvoriť adresár"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3942,6 +3946,11 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr "Súbor:"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr ""
@@ -3950,11 +3959,6 @@ msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
-msgid " Files"
-msgstr "Súbor:"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr ""
@@ -4003,10 +4007,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5964,7 +5964,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Vytvoriť adresár"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12297,6 +12297,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index b2f7a70afa..e8a0b4c2a1 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -1561,6 +1561,10 @@ msgstr "Ime"
msgid "Singleton"
msgstr "Posameznik"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Prilepi Parametre"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Posodabljanje Scene"
@@ -1867,7 +1871,7 @@ msgstr "Pokaži V Upravitelju Datotek"
msgid "New Folder..."
msgstr "Nova Mapa..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Osveži"
@@ -4125,6 +4129,11 @@ msgid "Saving..."
msgstr "Shranjevanje..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Datoteke"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Nastavi kot Privzeto za '%s'"
@@ -4133,10 +4142,6 @@ msgid "Clear Default for '%s'"
msgstr "PoÄisti privzeto za '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Datoteke"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Uvozi Kot:"
@@ -4186,10 +4191,6 @@ msgid "Copy Params"
msgstr "Kopiraj Parametre"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Prilepi Parametre"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "NAPAKA: Ni animacije virov na odložiÅ¡Äu!"
@@ -6232,7 +6233,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Ustvarite Poligon"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12667,6 +12668,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index 07f9b1dc46..60ac25f6f4 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -1498,6 +1498,10 @@ msgstr "Emri"
msgid "Singleton"
msgstr "Vetmitar"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Ngjit Parametrat"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Duke Përditësuar Skenën"
@@ -1805,7 +1809,7 @@ msgstr "Shfaq në Menaxherin e Skedarëve"
msgid "New Folder..."
msgstr "Folder i Ri..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Rifresko"
@@ -4036,6 +4040,11 @@ msgid "Saving..."
msgstr "Duke Ruajtur..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Skedarët"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Vendos si të Parazgjedhur për '%s'"
@@ -4044,10 +4053,6 @@ msgid "Clear Default for '%s'"
msgstr "Pastro të Parazgjedhurat për '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Skedarët"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importo Si:"
@@ -4099,10 +4104,6 @@ msgid "Copy Params"
msgstr "Kopjo Parametrat"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Ngjit Parametrat"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Modifiko Resursin 'Clipboard'"
@@ -6020,7 +6021,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Krijo një Poligon"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12236,6 +12237,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index ecc96cf02e..5f5f3786a7 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -1562,6 +1562,10 @@ msgstr "Име"
msgid "Singleton"
msgstr "Синглетон"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Ðалепи параметре"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Ðжурирање Ñцене"
@@ -1871,7 +1875,7 @@ msgstr "Покажи у менаџеру датотека"
msgid "New Folder..."
msgstr "Ðови директоријум..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "ОÑвежи"
@@ -4151,6 +4155,11 @@ msgid "Saving..."
msgstr "Чување..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Датотеке"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "ПоÑтави као уобичајено за „%s“"
@@ -4159,10 +4168,6 @@ msgid "Clear Default for '%s'"
msgstr "Обриши уобичајено за „%s“"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Датотеке"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Увези као:"
@@ -4212,10 +4217,6 @@ msgid "Copy Params"
msgstr "Копирај параметре"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Ðалепи параметре"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Ðема реÑурÑа за копирање!"
@@ -6264,7 +6265,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Ðаправи конвекÑног Ñударног брата"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12781,6 +12782,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index ecccf23b27..c36e64d459 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -1482,6 +1482,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1759,7 +1763,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3845,15 +3849,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3903,10 +3907,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5824,7 +5824,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Napravi"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12009,6 +12009,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 6166371e03..3f7fee23b7 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -1553,6 +1553,10 @@ msgstr "Namn"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Klistra in Params"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Uppdaterar Scen"
@@ -1859,7 +1863,7 @@ msgstr "Visa I Filhanteraren"
msgid "New Folder..."
msgstr "Ny Mapp..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Uppdatera"
@@ -4110,6 +4114,10 @@ msgid "Saving..."
msgstr "Sparar..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Filer"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Ange som Standard för '%s'"
@@ -4118,10 +4126,6 @@ msgid "Clear Default for '%s'"
msgstr "Rensa Standarden för '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr ""
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Importera Som:"
@@ -4171,10 +4175,6 @@ msgid "Copy Params"
msgstr "Kopiera Params"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Klistra in Params"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "Resurs"
@@ -6180,7 +6180,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Skapa Prenumeration"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12618,6 +12618,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index f4c9950079..5300f984bb 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -1474,6 +1474,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1751,7 +1755,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3832,15 +3836,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3890,10 +3894,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5793,7 +5793,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11916,6 +11916,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/te.po b/editor/translations/te.po
index 5306a32fb5..d76be13ec1 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -1452,6 +1452,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1728,7 +1732,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3803,15 +3807,15 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
+msgid "%d Files"
msgstr ""
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3861,10 +3865,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5745,7 +5745,7 @@ msgid ""
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -11832,6 +11832,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index e1553b1bb0..a56f6338ab 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -1557,6 +1557,10 @@ msgstr "ชื่อ"
msgid "Singleton"
msgstr "ซิงเà¸à¸´à¸¥à¸•à¸±à¸™"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "วางตัวà¹à¸›à¸£"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "อัพเดทฉาà¸"
@@ -1869,7 +1873,7 @@ msgstr "à¹à¸ªà¸”งในตัวจัดà¸à¸²à¸£à¹„ฟล์"
msgid "New Folder..."
msgstr "สร้างโฟลเดอร์..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "รีเฟรช"
@@ -4080,6 +4084,11 @@ msgid "Saving..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸šà¸±à¸™à¸—ึà¸..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " ไฟล์"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "à¸à¸³à¸«à¸™à¸”เป็นค่าเริ่มต้นของ '%s'"
@@ -4088,10 +4097,6 @@ msgid "Clear Default for '%s'"
msgstr "ลบค่าเริ่มต้นของ '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " ไฟล์"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "นำเข้าเป็น:"
@@ -4141,10 +4146,6 @@ msgid "Copy Params"
msgstr "คัดลอà¸à¸•à¸±à¸§à¹à¸›à¸£"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "วางตัวà¹à¸›à¸£"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "คลิปบอร์ดไม่มีรีซอร์ส!"
@@ -6186,7 +6187,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "สร้างรูปทรงตันà¸à¸²à¸¢à¸ à¸²à¸žà¹€à¸›à¹‡à¸™à¹‚หนดà¸à¸²à¸•à¸´"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12760,6 +12761,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 2573383f5e..c73724c7b7 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -1526,6 +1526,10 @@ msgstr "Ä°sim"
msgid "Singleton"
msgstr "Tekil"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Parametreleri Yapıştır"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Sahne Güncelleniyor"
@@ -1811,7 +1815,7 @@ msgstr "Dosya Yöneticisinde Göster"
msgid "New Folder..."
msgstr "Yeni Klasör..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Yenile"
@@ -3985,6 +3989,11 @@ msgid "Saving..."
msgstr "Kaydediliyor..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Dosyalar"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "'%s' için Varsayılanı Ayarla"
@@ -3993,10 +4002,6 @@ msgid "Clear Default for '%s'"
msgstr "'%s' İçin Varsayılanı Temizle"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Dosyalar"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Şu Şekilde İçe Aktar:"
@@ -4047,10 +4052,6 @@ msgid "Copy Params"
msgstr "Değişkenleri Tıpkıla"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Parametreleri Yapıştır"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Kaynak Panosunu Düzenle"
@@ -5979,7 +5980,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Dışbükey Çarpışma Komşusu Oluştur"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12380,6 +12381,11 @@ msgstr ""
"Düzlem şekli iyi çalışmıyor ve gelecek versiyonlarda çıkarılacak. Lütfen "
"kullanmayın."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Hiçbirşey görünebilir değil çünkü hiçbir model atanmış değil."
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 944a73ea67..bfb614f493 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -17,7 +17,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-27 07:10+0000\n"
+"PO-Revision-Date: 2020-02-21 23:32+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 3.11.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -702,9 +702,8 @@ msgid "Line Number:"
msgstr "Ðомер Ñ€Ñдка:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "Замінити..."
+msgstr "%d замінено."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1504,6 +1503,10 @@ msgstr "Ðазва"
msgid "Singleton"
msgstr "Одинак (шаблон проєктуваннÑ)"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Ð’Ñтавити параметри"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "ÐžÐ½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñцени"
@@ -1791,7 +1794,7 @@ msgstr "Показати у менеджері файлів"
msgid "New Folder..."
msgstr "Створити теку..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Оновити"
@@ -3974,6 +3977,10 @@ msgid "Saving..."
msgstr "ЗбереженнÑ..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d файлів"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Ð’Ñтановити Ñк типове Ð´Ð»Ñ '%s'"
@@ -3982,10 +3989,6 @@ msgid "Clear Default for '%s'"
msgstr "ОчиÑтити типове Ð´Ð»Ñ '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Файли"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Імпортувати Ñк:"
@@ -4034,10 +4037,6 @@ msgid "Copy Params"
msgstr "Копіювати параметри"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Ð’Ñтавити параметри"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Редагувати буфер реÑурÑів"
@@ -5865,9 +5864,8 @@ msgid "Mesh is empty!"
msgstr "Сітка порожнÑ!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Створити увігнуту облаÑÑ‚ÑŒ зіткненнÑ"
+msgstr "Ðе вдалоÑÑ Ñтворити форму Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5883,30 +5881,27 @@ msgstr "Створити триÑіткову Ñтатичну форму"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "Ðе вдалоÑÑ Ñтворити єдину опуклу форму Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€ÐµÐ½Ñ Ñцени."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "Ðе вдалоÑÑ Ñтворити єдину опуклу форму зіткненнÑ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "Створити вигнуті форми"
+msgstr "Створити єдину опуклу форму"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "Ðе вдалоÑÑ Ñтворити декілька опуклих форм Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€ÐµÐ½Ñ Ñцени."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "Ðеможливо Ñтворити теку."
+msgstr "Ðе вдалоÑÑ Ñтворити жодних форм зіткненнÑ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "Створити вигнуті форми"
+msgstr "Створити декілька опуклих форм"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5962,6 +5957,9 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Створює StaticBody Ñ– автоматично пов'Ñзує з ним заÑновану на багатокутниках "
+"форму зіткненнÑ.\n"
+"Це найточніший (але найповільніший) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5972,28 +5970,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"Створює заÑновану на багатокутниках форму зіткненнÑ.\n"
+"Цей найточніший (але найповільніший) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½ÑŒ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "Створити опуклу облаÑÑ‚Ñ– зіткненнÑ"
+msgid "Create Single Convex Collision Sibling"
+msgstr "Створити єдині опуклі облаÑÑ‚Ñ– зіткненнÑ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"Створює єдину опуклу форму зіткненнÑ.\n"
+"Цей найшвидший (але найменш точний) варіант Ð´Ð»Ñ Ð²Ð¸ÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½ÑŒ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "Створити опуклу облаÑÑ‚Ñ– зіткненнÑ"
+msgstr "Створити декілька опуклих облаÑтей зіткненнÑ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"Створює заÑновану на багатокутниках форму зіткненнÑ.\n"
+"Цей проміжний за швидкіÑÑ‚ÑŽ варіант між наведеними вище двома варіантами."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6006,6 +6009,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Створює Ñтатичну контурну Ñітку. Ðормалі контурної Ñітки "
+"віддзеркалюватимутьÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾.\n"
+"Цим можна ÑкориÑтатиÑÑ Ð·Ð°Ð¼Ñ–ÑÑ‚ÑŒ влаÑтивоÑÑ‚Ñ– Grow SpatialMaterial, Ñкщо "
+"викориÑÑ‚Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñ” неможливим."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9594,17 +9601,14 @@ msgid "Export With Debug"
msgstr "ЕкÑпортувати із діагноÑтикою"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "ШлÑху не Ñ–Ñнує."
+msgstr "Вказаного шлÑху не Ñ–Ñнує."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби відкрити файл пакунка — дані не у форматі zip."
+msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби відкрити файл пакунка (дані не у форматі ZIP)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr "Ðекоректний файл проєкту «.zip»: у ньому немає файла «project.godot»."
@@ -9614,14 +9618,12 @@ msgid "Please choose an empty folder."
msgstr "Будь лаÑка, виберіть порожню теку."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
msgstr "Будь лаÑка, виберіть файл «project.godot» або «.zip»."
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "У каталозі вже міÑтитьÑÑ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚ Godot."
+msgstr "У цьому каталозі вже міÑтитьÑÑ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚ Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10319,9 +10321,8 @@ msgid "Suffix"
msgstr "СуфікÑ"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "Формальні вирази"
+msgstr "ВикориÑтовувати формальні вирази"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10360,7 +10361,6 @@ msgstr ""
"ПорівнÑйте параметри лічильника."
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "Лічильник на рівень"
@@ -10403,12 +10403,10 @@ msgid "Keep"
msgstr "Ðе змінювати"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
msgstr "ГорбатийРегіÑÑ‚Ñ€ у під_креÑлюваннÑ"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
msgstr "під_креÑÐ»ÑŽÐ²Ð°Ð½Ð½Ñ Ñƒ ГорбатийРегіÑÑ‚Ñ€"
@@ -10429,14 +10427,12 @@ msgid "Reset"
msgstr "Скинути"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "Формальні вирази"
+msgstr "Помилка у формальному виразі"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "ПрипуÑтимі Ñимволи:"
+msgstr "Ðа Ñимволі %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10901,9 +10897,8 @@ msgid "Invalid inherited parent name or path."
msgstr "Ðекоректна назва або шлÑÑ… до уÑпадкованого батьківÑького елемента."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "Скрипт є коректним."
+msgstr "ШлÑÑ… до Ñкрипту Ñ– назва Ñкрипту Ñ” коректними."
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10994,7 +10989,6 @@ msgid "Copy Error"
msgstr "Помилка копіюваннÑ"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "Відеопам'ÑÑ‚ÑŒ"
@@ -12417,6 +12411,11 @@ msgstr ""
"Форми площин не працюють Ñк Ñлід, Ñ—Ñ… буде вилучено у наÑтупних верÑÑ–ÑÑ…. Будь "
"лаÑка, не викориÑтовуйте Ñ—Ñ…."
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Ðічого не видно, оÑкільки не призначено Ñітки."
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 13e42dc0d1..815f92af6a 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -1475,6 +1475,10 @@ msgstr ""
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr ""
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr ""
@@ -1761,7 +1765,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr ""
@@ -3878,15 +3882,16 @@ msgid "Saving..."
msgstr ""
#: editor/import_dock.cpp
-msgid "Set as Default for '%s'"
-msgstr ""
+#, fuzzy
+msgid "%d Files"
+msgstr "Ø§Ø«Ø§Ø«Û Ú©ÛŒ زپ Ùائل"
#: editor/import_dock.cpp
-msgid "Clear Default for '%s'"
+msgid "Set as Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
-msgid " Files"
+msgid "Clear Default for '%s'"
msgstr ""
#: editor/import_dock.cpp
@@ -3936,10 +3941,6 @@ msgid "Copy Params"
msgstr ""
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr ""
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr ""
@@ -5875,7 +5876,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "سب سکریپشن بنائیں"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12125,6 +12126,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 868a2f2ad8..31b7f3ceb7 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -1501,6 +1501,10 @@ msgstr "Tên"
msgid "Singleton"
msgstr "Singleton"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Dán các đối số"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "Cập nhật Cảnh"
@@ -1782,7 +1786,7 @@ msgstr "Xem trong trình quản lý tệp"
msgid "New Folder..."
msgstr "Thư mục mới ..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "Làm mới"
@@ -3944,6 +3948,11 @@ msgid "Saving..."
msgstr "Äang lÆ°u ..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " Tệp tin"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "Gán Mặc định cho '%s'"
@@ -3952,10 +3961,6 @@ msgid "Clear Default for '%s'"
msgstr "Dá»n Mặc định cho '%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " Tệp tin"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "Nhập vào với:"
@@ -4003,10 +4008,6 @@ msgid "Copy Params"
msgstr "Sao chép các đối số"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "Dán các đối số"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "Chỉnh sửa Tài nguyên trên Clipboard"
@@ -5955,7 +5956,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "Tạo"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12270,6 +12271,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index a2c33ea918..e7108c6e61 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -64,8 +64,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2020-02-14 03:19+0000\n"
-"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
+"PO-Revision-Date: 2020-03-08 22:33+0000\n"
+"Last-Translator: Revan Ji <jiruifancr@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -73,7 +73,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -733,9 +733,8 @@ msgid "Line Number:"
msgstr "è¡Œå·:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "替æ¢..."
+msgstr "已替æ¢%d处。"
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
@@ -1527,6 +1526,10 @@ msgstr "å称"
msgid "Singleton"
msgstr "å•ä¾‹"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "粘贴å‚æ•°"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "更新场景"
@@ -1805,7 +1808,7 @@ msgstr "在文件管ç†å™¨ä¸­æ˜¾ç¤º"
msgid "New Folder..."
msgstr "新建文件夹..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "刷新"
@@ -3930,6 +3933,10 @@ msgid "Saving..."
msgstr "ä¿å­˜ä¸­..."
#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d个文件"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "设置为“%sâ€çš„默认值"
@@ -3938,10 +3945,6 @@ msgid "Clear Default for '%s'"
msgstr "清除默认'%s'"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " 文件"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "导入为:"
@@ -3988,10 +3991,6 @@ msgid "Copy Params"
msgstr "å¤åˆ¶å‚æ•°"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "粘贴å‚æ•°"
-
-#: editor/inspector_dock.cpp
msgid "Edit Resource Clipboard"
msgstr "编辑资æºå‰ªè´´æ¿"
@@ -4527,7 +4526,7 @@ msgstr "未æ¥"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Depth"
-msgstr "深度"
+msgstr "Depth(深度)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
@@ -5789,9 +5788,8 @@ msgid "Mesh is empty!"
msgstr "网格为空ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "创建三角网格碰撞åŒçº§"
+msgstr "无法创建Trimesh碰撞形状。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -5807,30 +5805,27 @@ msgstr "创建三维网格é™æ€å½¢çŠ¶"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr ""
+msgstr "无法为场景根节点创建å•ä¸€å‡¸ç¢°æ’žå½¢çŠ¶ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr ""
+msgstr "无法创建å•ä¸€å‡¸ç¢°æ’žå½¢çŠ¶ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Single Convex Shape"
-msgstr "创建凸形"
+msgstr "创建å•ä¸€å‡¸å½¢çŠ¶"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr ""
+msgstr "无法为场景根节点创建多个凸碰撞形状。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create any collision shapes."
-msgstr "无法创建文件夹。"
+msgstr "无法创建碰撞形状。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Shapes"
-msgstr "创建凸形"
+msgstr "创建多个凸形状"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -5886,6 +5881,8 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"创建StaticBody并自动为其分é…基于多边形的碰撞形状。\n"
+"这是最准确(但是最慢)的碰撞检测手段。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
@@ -5896,28 +5893,33 @@ msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
+"创建基于多边形的碰撞形状。\n"
+"这是最准确(但是最慢)的碰撞检测手段。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
-msgstr "创建凸型碰撞åŒçº§"
+msgid "Create Single Convex Collision Sibling"
+msgstr "创建å•ä¸€å‡¸ç¢°æ’žåŒçº§"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
+"创建å•ä¸€å‡¸ç¢°æ’žå½¢çŠ¶ã€‚\n"
+"这是最快(但是最ä¸ç²¾ç¡®ï¼‰çš„碰撞检测手段。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Multiple Convex Collision Siblings"
-msgstr "创建凸型碰撞åŒçº§"
+msgstr "创建多个凸碰撞åŒçº§"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between the two above options."
msgstr ""
+"创建基于多边形的碰撞形状。\n"
+"这是性能ä½äºŽä¸Šè¿°ä¸¤ç§ä¹‹é—´çš„碰撞检测手段。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -5930,6 +5932,8 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"创建一个é™æ€è½®å»“网格。轮廓网格会自动翻转法线。\n"
+"å¯ä»¥ç”¨æ¥åœ¨å¿…è¦æ—¶ä»£æ›¿SpatialMaterialçš„Grow属性。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -9446,34 +9450,29 @@ msgid "Export With Debug"
msgstr "使用调试导出"
#: editor/project_manager.cpp
-#, fuzzy
msgid "The path specified doesn't exist."
-msgstr "该路径ä¸å­˜åœ¨ã€‚"
+msgstr "指定的路径ä¸å­˜åœ¨ã€‚"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Error opening package file (it's not in ZIP format)."
-msgstr "打开压缩文件时出错,éžzipæ ¼å¼ã€‚"
+msgstr "打开包文件时出错(éžZIPæ ¼å¼ï¼‰ã€‚"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
-msgstr "无效的“.zipâ€é¡¹ç›®æ–‡ä»¶ï¼Œæ²¡æœ‰åŒ…å«ä¸€ä¸ªâ€œproject.godotâ€æ–‡ä»¶ã€‚"
+msgstr "无效的“.zipâ€é¡¹ç›®æ–‡ä»¶ï¼›æ²¡æœ‰åŒ…å«â€œproject.godotâ€æ–‡ä»¶ã€‚"
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
msgstr "请选择空文件夹。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a \"project.godot\" or \".zip\" file."
-msgstr "请选择一个“project.godotâ€æˆ–者“.zipâ€æ–‡ä»¶ã€‚"
+msgstr "请选择“project.godotâ€æˆ–“.zipâ€æ–‡ä»¶ã€‚"
#: editor/project_manager.cpp
-#, fuzzy
msgid "This directory already contains a Godot project."
-msgstr "文件夹已ç»åŒ…å«äº†ä¸€ä¸ªGodot项目。"
+msgstr "该目录已ç»åŒ…å«Godot项目。"
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -10154,9 +10153,8 @@ msgid "Suffix"
msgstr "åŽç¼€"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Use Regular Expressions"
-msgstr "正则表达å¼"
+msgstr "使用正则表达å¼"
#: editor/rename_dialog.cpp
msgid "Advanced Options"
@@ -10195,7 +10193,6 @@ msgstr ""
"比较计数器的选项。"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Per-level Counter"
msgstr "å„级å•ç‹¬è®¡æ•°"
@@ -10236,12 +10233,10 @@ msgid "Keep"
msgstr "ä¿æŒ"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "PascalCase to snake_case"
msgstr "驼峰å¼è½¬ä¸ºä¸‹åˆ’线å¼"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "snake_case to PascalCase"
msgstr "下划线å¼è½¬ä¸ºé©¼å³°å¼"
@@ -10262,14 +10257,12 @@ msgid "Reset"
msgstr "é‡ç½®"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error"
-msgstr "正则表达å¼"
+msgstr "正则表达å¼å‡ºé”™"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "At character %s"
-msgstr "有效字符:"
+msgstr "ä½äºŽå­—符%s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
@@ -10723,9 +10716,8 @@ msgid "Invalid inherited parent name or path."
msgstr "所继承父类的å称或路径无效。"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script path/name is valid."
-msgstr "脚本有效。"
+msgstr "脚本路径/å称有效。"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9, _ and ."
@@ -10816,7 +10808,6 @@ msgid "Copy Error"
msgstr "å¤åˆ¶é”™è¯¯ä¿¡æ¯"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Video RAM"
msgstr "显存"
@@ -12158,6 +12149,11 @@ msgid ""
"don't use them."
msgstr "å¹³é¢å½¢çŠ¶æ— æ³•æ­£å¸¸å·¥ä½œï¼Œæœªæ¥ç‰ˆæœ¬å°†è¢«åˆ é™¤ã€‚请勿使用。"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "无物å¯è§ï¼Œå› ä¸ºæ²¡æœ‰æŒ‡å®šç½‘格。"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 1264617142..a228d6ee60 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -1583,6 +1583,11 @@ msgstr "å稱"
msgid "Singleton"
msgstr ""
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+#, fuzzy
+msgid "Paste Params"
+msgstr "貼上åƒæ•¸"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "更新場景"
@@ -1891,7 +1896,7 @@ msgstr "é–‹å•Ÿ Project Manager?"
msgid "New Folder..."
msgstr "新增資料夾"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "é‡æ–°æ•´ç†"
@@ -4149,6 +4154,11 @@ msgid "Saving..."
msgstr "儲存中..."
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr "檔案"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr ""
@@ -4158,11 +4168,6 @@ msgstr ""
#: editor/import_dock.cpp
#, fuzzy
-msgid " Files"
-msgstr "檔案"
-
-#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
msgstr "å°Žå…¥"
@@ -4214,11 +4219,6 @@ msgstr "複製åƒæ•¸"
#: editor/inspector_dock.cpp
#, fuzzy
-msgid "Paste Params"
-msgstr "貼上åƒæ•¸"
-
-#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "錯誤:剪貼簿沒有動畫ï¼"
@@ -6231,7 +6231,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "縮放selection"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -12698,6 +12698,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index eaea30d310..466e8db554 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -19,12 +19,13 @@
# Kenneth Lo <closer.tw@gmail.com>, 2019.
# SIYU FU <1002492607@qq.com>, 2019.
# 鄭惟中 <biglionlion06@gmail.com>, 2020.
+# Alexander Wang <zxcvb22217@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-01-30 03:56+0000\n"
-"Last-Translator: 鄭惟中 <biglionlion06@gmail.com>\n"
+"PO-Revision-Date: 2020-03-01 19:57+0000\n"
+"Last-Translator: Alexander Wang <zxcvb22217@gmail.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
"Language: zh_TW\n"
@@ -32,7 +33,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.11-dev\n"
+"X-Generator: Weblate 4.0-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1568,6 +1569,10 @@ msgstr "å稱"
msgid "Singleton"
msgstr "單例"
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "貼上åƒæ•¸"
+
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "更新場景"
@@ -1885,7 +1890,7 @@ msgstr "在檔案管ç†å“¡å…§é¡¯ç¤º"
msgid "New Folder..."
msgstr "新增資料夾..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Refresh"
msgstr "é‡æ–°æ•´ç†"
@@ -4124,6 +4129,11 @@ msgid "Saving..."
msgstr "儲存中……"
#: editor/import_dock.cpp
+#, fuzzy
+msgid "%d Files"
+msgstr " 資料夾"
+
+#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
msgstr "設定為“%sâ€çš„é è¨­å€¼"
@@ -4132,10 +4142,6 @@ msgid "Clear Default for '%s'"
msgstr "清除“%sâ€çš„é è¨­å€¼"
#: editor/import_dock.cpp
-msgid " Files"
-msgstr " 資料夾"
-
-#: editor/import_dock.cpp
msgid "Import As:"
msgstr "導入為:"
@@ -4185,10 +4191,6 @@ msgid "Copy Params"
msgstr "複製åƒæ•¸"
#: editor/inspector_dock.cpp
-msgid "Paste Params"
-msgstr "貼上åƒæ•¸"
-
-#: editor/inspector_dock.cpp
#, fuzzy
msgid "Edit Resource Clipboard"
msgstr "資æºè·¯å¾‘"
@@ -6213,7 +6215,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
-msgid "Create Single Convex Collision Siblings"
+msgid "Create Single Convex Collision Sibling"
msgstr "創建碰撞多邊形"
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -10177,15 +10179,15 @@ msgstr "專案"
#: editor/project_manager.cpp
msgid "Last Modified"
-msgstr ""
+msgstr "最後修改時間"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr ""
+msgstr "掃æ"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
-msgstr ""
+msgstr "é¸æ“‡ä¸€å€‹è³‡æ–™å¤¾ä¾†æŽƒæ"
#: editor/project_manager.cpp
msgid "New Project"
@@ -10198,7 +10200,7 @@ msgstr "刪除點"
#: editor/project_manager.cpp
msgid "Templates"
-msgstr ""
+msgstr "模æ¿"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -12700,6 +12702,11 @@ msgid ""
"don't use them."
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
diff --git a/main/input_default.cpp b/main/input_default.cpp
index a13ddeb2b6..aa9e772a38 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -73,10 +73,10 @@ InputDefault::SpeedTrack::SpeedTrack() {
reset();
}
-bool InputDefault::is_key_pressed(int p_scancode) const {
+bool InputDefault::is_key_pressed(int p_keycode) const {
_THREAD_SAFE_METHOD_
- return keys_pressed.has(p_scancode);
+ return keys_pressed.has(p_keycode);
}
bool InputDefault::is_mouse_button_pressed(int p_button) const {
@@ -271,11 +271,11 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
_THREAD_SAFE_METHOD_
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) {
+ if (k.is_valid() && !k->is_echo() && k->get_keycode() != 0) {
if (k->is_pressed())
- keys_pressed.insert(k->get_scancode());
+ keys_pressed.insert(k->get_keycode());
else
- keys_pressed.erase(k->get_scancode());
+ keys_pressed.erase(k->get_keycode());
}
Ref<InputEventMouseButton> mb = p_event;
diff --git a/main/input_default.h b/main/input_default.h
index 02ce5c1e82..549093955d 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -187,7 +187,7 @@ private:
bool use_accumulated_input;
public:
- virtual bool is_key_pressed(int p_scancode) const;
+ virtual bool is_key_pressed(int p_keycode) const;
virtual bool is_mouse_button_pressed(int p_button) const;
virtual bool is_joy_button_pressed(int p_device, int p_button) const;
virtual bool is_action_pressed(const StringName &p_action) const;
diff --git a/main/main.cpp b/main/main.cpp
index 9f1d9ce5fe..d8a9cc87a7 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -44,6 +44,7 @@
#include "core/project_settings.h"
#include "core/register_core_types.h"
#include "core/script_debugger_local.h"
+#include "core/script_debugger_remote.h"
#include "core/script_language.h"
#include "core/translation.h"
#include "core/version.h"
@@ -58,7 +59,6 @@
#include "main/tests/test_main.h"
#include "modules/register_module_types.h"
#include "platform/register_platform_apis.h"
-#include "scene/debugger/script_debugger_remote.h"
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"
#include "scene/register_scene_types.h"
@@ -203,6 +203,7 @@ void finalize_physics() {
void initialize_navigation_server() {
ERR_FAIL_COND(navigation_server != NULL);
+
navigation_server = NavigationServerManager::new_default_server();
navigation_2d_server = memnew(Navigation2DServer);
}
@@ -210,6 +211,7 @@ void initialize_navigation_server() {
void finalize_navigation_server() {
memdelete(navigation_server);
navigation_server = NULL;
+
memdelete(navigation_2d_server);
navigation_2d_server = NULL;
}
@@ -1657,12 +1659,6 @@ bool Main::start() {
if (!project_manager && !editor) { // game
if (game_path != "" || script != "") {
- if (script_debugger && script_debugger->is_remote()) {
- ScriptDebuggerRemote *remote_debugger = static_cast<ScriptDebuggerRemote *>(script_debugger);
-
- remote_debugger->set_scene_tree(sml);
- }
-
//autoload
List<PropertyInfo> props;
ProjectSettings::get_singleton()->get_property_list(&props);
@@ -1823,7 +1819,7 @@ bool Main::start() {
GLOBAL_DEF("display/window/stretch/aspect", "ignore");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"));
GLOBAL_DEF("display/window/stretch/shrink", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::REAL, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1"));
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::FLOAT, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
@@ -2043,9 +2039,9 @@ bool Main::iteration() {
break;
}
- message_queue->flush();
+ NavigationServer::get_singleton_mut()->process(frame_slice * time_scale);
- NavigationServer::get_singleton_mut()->step(frame_slice * time_scale);
+ message_queue->flush();
PhysicsServer::get_singleton()->step(frame_slice * time_scale);
diff --git a/main/performance.cpp b/main/performance.cpp
index d829c6dfdc..c7e3a41aa6 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -49,9 +49,7 @@ void Performance::_bind_methods() {
BIND_ENUM_CONSTANT(TIME_PROCESS);
BIND_ENUM_CONSTANT(TIME_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(MEMORY_STATIC);
- BIND_ENUM_CONSTANT(MEMORY_DYNAMIC);
BIND_ENUM_CONSTANT(MEMORY_STATIC_MAX);
- BIND_ENUM_CONSTANT(MEMORY_DYNAMIC_MAX);
BIND_ENUM_CONSTANT(MEMORY_MESSAGE_BUFFER_MAX);
BIND_ENUM_CONSTANT(OBJECT_COUNT);
BIND_ENUM_CONSTANT(OBJECT_RESOURCE_COUNT);
@@ -95,9 +93,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
"time/process",
"time/physics_process",
"memory/static",
- "memory/dynamic",
"memory/static_max",
- "memory/dynamic_max",
"memory/msg_buf_max",
"object/objects",
"object/resources",
@@ -133,9 +129,7 @@ float Performance::get_monitor(Monitor p_monitor) const {
case TIME_PROCESS: return _process_time;
case TIME_PHYSICS_PROCESS: return _physics_process_time;
case MEMORY_STATIC: return Memory::get_mem_usage();
- case MEMORY_DYNAMIC: return MemoryPool::total_memory;
case MEMORY_STATIC_MAX: return Memory::get_mem_max_usage();
- case MEMORY_DYNAMIC_MAX: return MemoryPool::max_memory;
case MEMORY_MESSAGE_BUFFER_MAX: return MessageQueue::get_singleton()->get_max_buffer_usage();
case OBJECT_COUNT: return ObjectDB::get_object_count();
case OBJECT_RESOURCE_COUNT: return ResourceCache::get_cached_resource_count();
@@ -177,8 +171,6 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const
MONITOR_TYPE_MEMORY,
MONITOR_TYPE_MEMORY,
MONITOR_TYPE_MEMORY,
- MONITOR_TYPE_MEMORY,
- MONITOR_TYPE_MEMORY,
MONITOR_TYPE_QUANTITY,
MONITOR_TYPE_QUANTITY,
MONITOR_TYPE_QUANTITY,
diff --git a/main/performance.h b/main/performance.h
index 638ddbe993..c0f6044ea0 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -55,9 +55,7 @@ public:
TIME_PROCESS,
TIME_PHYSICS_PROCESS,
MEMORY_STATIC,
- MEMORY_DYNAMIC,
MEMORY_STATIC_MAX,
- MEMORY_DYNAMIC_MAX,
MEMORY_MESSAGE_BUFFER_MAX,
OBJECT_COUNT,
OBJECT_RESOURCE_COUNT,
diff --git a/main/tests/test_astar.cpp b/main/tests/test_astar.cpp
index dee107f0af..e82d885af2 100644
--- a/main/tests/test_astar.cpp
+++ b/main/tests/test_astar.cpp
@@ -68,7 +68,7 @@ public:
bool test_abc() {
ABCX abcx;
- PoolVector<int> path = abcx.get_id_path(ABCX::A, ABCX::C);
+ Vector<int> path = abcx.get_id_path(ABCX::A, ABCX::C);
bool ok = path.size() == 3;
int i = 0;
ok = ok && path[i++] == ABCX::A;
@@ -79,7 +79,7 @@ bool test_abc() {
bool test_abcx() {
ABCX abcx;
- PoolVector<int> path = abcx.get_id_path(ABCX::X, ABCX::C);
+ Vector<int> path = abcx.get_id_path(ABCX::X, ABCX::C);
bool ok = path.size() == 4;
int i = 0;
ok = ok && path[i++] == ABCX::X;
@@ -304,7 +304,7 @@ bool test_solutions() {
for (int u = 0; u < N; u++)
for (int v = 0; v < N; v++)
if (u != v) {
- PoolVector<int> route = a.get_id_path(u, v);
+ Vector<int> route = a.get_id_path(u, v);
if (!Math::is_inf(d[u][v])) {
// Reachable
if (route.size() == 0) {
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index a2891de8ff..0e7c45f603 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -128,7 +128,7 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) {
case GDScriptParser::OperatorNode::OP_PARENT_CALL:
txt += ".";
- FALLTHROUGH;
+ [[fallthrough]];
case GDScriptParser::OperatorNode::OP_CALL: {
ERR_FAIL_COND_V(c_node->arguments.size() < 1, "");
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index 2c4ba08c6d..d91503501d 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -451,34 +451,26 @@ MainLoop *test() {
print_line("RGBE: " + Color(rd, gd, bd));
}
- print_line("Dvectors: " + itos(MemoryPool::allocs_used));
- print_line("Mem used: " + itos(MemoryPool::total_memory));
- print_line("MAx mem used: " + itos(MemoryPool::max_memory));
-
- PoolVector<int> ints;
+ Vector<int> ints;
ints.resize(20);
{
- PoolVector<int>::Write w;
- w = ints.write();
+ int *w;
+ w = ints.ptrw();
for (int i = 0; i < ints.size(); i++) {
w[i] = i;
}
}
- PoolVector<int> posho = ints;
+ Vector<int> posho = ints;
{
- PoolVector<int>::Read r = posho.read();
+ const int *r = posho.ptr();
for (int i = 0; i < posho.size(); i++) {
print_line(itos(i) + " : " + itos(r[i]));
}
}
- print_line("later Dvectors: " + itos(MemoryPool::allocs_used));
- print_line("later Mem used: " + itos(MemoryPool::total_memory));
- print_line("Mlater Ax mem used: " + itos(MemoryPool::max_memory));
-
List<String> cmdlargs = OS::get_singleton()->get_cmdline_args();
if (cmdlargs.empty()) {
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index 3f4f91f8f4..0304e8f6dd 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -110,13 +110,13 @@ protected:
PhysicsServer *ps = PhysicsServer::get_singleton();
- RID plane_shape = ps->shape_create(PhysicsServer::SHAPE_PLANE);
- ps->shape_set_data(plane_shape, p_plane);
+ RID world_margin_shape = ps->shape_create(PhysicsServer::SHAPE_PLANE);
+ ps->shape_set_data(world_margin_shape, p_plane);
RID b = ps->body_create(PhysicsServer::BODY_MODE_STATIC);
ps->body_set_space(b, space);
//todo set space
- ps->body_add_shape(b, plane_shape);
+ ps->body_add_shape(b, world_margin_shape);
return b;
}
@@ -143,7 +143,7 @@ protected:
/* BOX SHAPE */
- PoolVector<Plane> box_planes = Geometry::build_box_planes(Vector3(0.5, 0.5, 0.5));
+ Vector<Plane> box_planes = Geometry::build_box_planes(Vector3(0.5, 0.5, 0.5));
RID box_mesh = vs->mesh_create();
Geometry::MeshData box_data = Geometry::build_convex_mesh(box_planes);
vs->mesh_add_surface_from_mesh_data(box_mesh, box_data);
@@ -155,7 +155,7 @@ protected:
/* CAPSULE SHAPE */
- PoolVector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 0.7, 12, Vector3::AXIS_Z);
+ Vector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 0.7, 12, Vector3::AXIS_Z);
RID capsule_mesh = vs->mesh_create();
Geometry::MeshData capsule_data = Geometry::build_convex_mesh(capsule_planes);
@@ -172,7 +172,7 @@ protected:
/* CONVEX SHAPE */
- PoolVector<Plane> convex_planes = Geometry::build_cylinder_planes(0.5, 0.7, 5, Vector3::AXIS_Z);
+ Vector<Plane> convex_planes = Geometry::build_cylinder_planes(0.5, 0.7, 5, Vector3::AXIS_Z);
RID convex_mesh = vs->mesh_create();
Geometry::MeshData convex_data = Geometry::build_convex_mesh(convex_planes);
@@ -363,7 +363,7 @@ public:
VisualServer *vs = VisualServer::get_singleton();
PhysicsServer *ps = PhysicsServer::get_singleton();
- PoolVector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 1, 12, 5, Vector3::AXIS_Y);
+ Vector<Plane> capsule_planes = Geometry::build_capsule_planes(0.5, 1, 12, 5, Vector3::AXIS_Y);
RID capsule_mesh = vs->mesh_create();
Geometry::MeshData capsule_data = Geometry::build_convex_mesh(capsule_planes);
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 9c10fcbd56..160c25f43a 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -72,7 +72,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- PoolVector<uint8_t> pixels;
+ Vector<uint8_t> pixels;
pixels.resize(32 * 2 * 2);
for (int i = 0; i < 2; i++) {
@@ -97,7 +97,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- PoolVector<uint8_t> pixels;
+ Vector<uint8_t> pixels;
pixels.resize(32 * 32 * 2);
for (int i = 0; i < 32; i++) {
@@ -124,7 +124,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- PoolVector<uint8_t> pixels;
+ Vector<uint8_t> pixels;
pixels.resize(32 * 32 * 2);
for (int i = 0; i < 32; i++) {
@@ -151,7 +151,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- PoolVector<uint8_t> pixels;
+ Vector<uint8_t> pixels;
pixels.resize(32 * 64 * 2);
for (int i = 0; i < 64; i++) {
@@ -185,7 +185,7 @@ class TestPhysics2DMainLoop : public MainLoop {
RID convex_polygon_shape = ps->convex_polygon_shape_create();
- PoolVector<Vector2> arr;
+ Vector<Vector2> arr;
Point2 sb(32, 32);
arr.push_back(Point2(20, 3) - sb);
arr.push_back(Point2(58, 23) - sb);
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index 0e101fb566..62239a5cb5 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -81,7 +81,7 @@ public:
Vector<Vector3> vts;
/*
- PoolVector<Plane> sp = Geometry::build_sphere_planes(2,5,5);
+ Vector<Plane> sp = Geometry::build_sphere_planes(2,5,5);
Geometry::MeshData md2 = Geometry::build_convex_mesh(sp);
vts=md2.vertices;
*/
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index eef3d9b84c..84731746fa 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -1172,7 +1172,7 @@ MainLoop *test() {
/** A character length != wchar_t may be forced, so the tests won't work */
- ERR_FAIL_COND_V(sizeof(CharType) != sizeof(wchar_t), NULL);
+ static_assert(sizeof(CharType) == sizeof(wchar_t));
int count = 0;
int passed = 0;
diff --git a/methods.py b/methods.py
index f6c9e939c6..28c6d0c097 100644
--- a/methods.py
+++ b/methods.py
@@ -1,5 +1,4 @@
import os
-import os.path
import re
import glob
import subprocess
@@ -549,15 +548,31 @@ def detect_darwin_sdk_path(platform, env):
print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name))
raise
+def is_vanilla_clang(env):
+ if not using_clang(env):
+ return False
+ version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
+ return not version.startswith("Apple")
+
+
def get_compiler_version(env):
- # Not using this method on clang because it returns 4.2.1 # https://reviews.llvm.org/D56803
- if using_gcc(env):
- version = decode_utf8(subprocess.check_output([env['CXX'], '-dumpversion']).strip())
- else:
- version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
- match = re.search('[0-9][0-9.]*', version)
+ """
+ Returns an array of version numbers as ints: [major, minor, patch].
+ The return array should have at least two values (major, minor).
+ """
+ if not env.msvc:
+ # Not using -dumpversion as some GCC distros only return major, and
+ # Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803
+ try:
+ version = decode_utf8(subprocess.check_output([env.subst(env['CXX']), '--version']).strip())
+ except (subprocess.CalledProcessError, OSError):
+ print("Couldn't parse CXX environment variable to infer compiler version.")
+ return None
+ else: # TODO: Implement for MSVC
+ return None
+ match = re.search('[0-9]+\.[0-9.]+', version)
if match is not None:
- return match.group().split('.')
+ return list(map(int, match.group().split('.')))
else:
return None
diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/osx_template.app/Contents/Info.plist
index 696c825594..3b765e6bb8 100755
--- a/misc/dist/osx_template.app/Contents/Info.plist
+++ b/misc/dist/osx_template.app/Contents/Info.plist
@@ -31,13 +31,13 @@
<key>NSHumanReadableCopyright</key>
<string>$copyright</string>
<key>LSMinimumSystemVersion</key>
- <string>10.9.0</string>
+ <string>10.12.0</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
- <string>10.9.0</string>
+ <string>10.12.0</string>
</dict>
<key>NSHighResolutionCapable</key>
$highres
</dict>
-</plist> \ No newline at end of file
+</plist>
diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist
index 46550ba6c7..c519a232c4 100755
--- a/misc/dist/osx_tools.app/Contents/Info.plist
+++ b/misc/dist/osx_tools.app/Contents/Info.plist
@@ -33,11 +33,11 @@
<key>NSHumanReadableCopyright</key>
<string>© 2007-2020 Juan Linietsky, Ariel Manzur &amp; Godot Engine contributors</string>
<key>LSMinimumSystemVersion</key>
- <string>10.9.0</string>
+ <string>10.12.0</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
- <string>10.9.0</string>
+ <string>10.12.0</string>
</dict>
<key>NSHighResolutionCapable</key>
<true/>
diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish
new file mode 100644
index 0000000000..3cffcfa3b8
--- /dev/null
+++ b/misc/dist/shell/godot.fish
@@ -0,0 +1,91 @@
+# Fish completion for the Godot editor
+# To use it, install this file in `~/.config/fish/completions` then restart your shell.
+# You can also `source` this file directly in your shell startup file.
+#
+# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+#
+# 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.
+
+function godot_video_driver_args
+ # Use a function instead of a fixed string to customize the argument descriptions.
+ echo -e "Vulkan\tVulkan renderer"
+ echo -e "GLES2\tOpenGL ES 2.0 renderer"
+end
+
+# Erase existing completions for Godot.
+complete -c godot -e
+
+# General options:
+complete -c godot -s h -l help -d "Display the full help message"
+complete -c godot -l version -d "Display the version string"
+complete -c godot -s v -l verbose -d "Use verbose stdout mode"
+complete -c godot -l quiet -d "Quiet mode, silences stdout messages (errors are still displayed)"
+
+# Run options:
+complete -c godot -s e -l editor -d "Start the editor instead of running the scene"
+complete -c godot -s p -l project-manager -d "Start the project manager, even if a project is auto-detected"
+complete -c godot -s q -l quit -d "Quit after the first iteration"
+complete -c godot -s l -l language -d "Use a specific locale (<locale> being a two-letter code)" -x
+complete -c godot -l path -d "Path to a project (<directory> must contain a 'project.godot' file)" -r
+complete -c godot -s u -l upwards -d "Scan folders upwards for project.godot file"
+complete -c godot -l main-pack -d "Path to a pack (.pck) file to load" -r
+complete -c godot -l render-thread -d "Set the render thread mode" -x -a "unsafe safe separate"
+complete -c godot -l remote-fs -d "Use a remote filesystem (<host/IP>[:<port>] address)" -x
+complete -c godot -l remote-fs-password -d "Password for remote filesystem" -x
+complete -c godot -l audio-driver -d "Set the audio driver" -x
+complete -c godot -l video-driver -d "Set the video driver" -x -a "(godot_video_driver_args)"
+
+# Display options:
+complete -c godot -s f -l fullscreen -d "Request fullscreen mode"
+complete -c godot -s m -l maximized -d "Request a maximized window"
+complete -c godot -s w -l windowed -d "Request windowed mode"
+complete -c godot -s t -l always-on-top -d "Request an always-on-top window"
+complete -c godot -l resolution -d "Request window resolution" -x
+complete -c godot -l position -d "Request window position" -x
+complete -c godot -l low-dpi -d "Force low-DPI mode (macOS and Windows only)"
+complete -c godot -l no-window -d "Disable window creation (Windows only), useful together with --script"
+complete -c godot -l enable-vsync-via-compositor -d "When Vsync is enabled, Vsync via the OS' window compositor (Windows only)"
+complete -c godot -l disable-vsync-via-compositor -d "Disable Vsync via the OS' window compositor (Windows only)"
+
+# Debug options:
+complete -c godot -s d -l debug -d "Debug (local stdout debugger)"
+complete -c godot -s b -l breakpoints -d "Specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)" -x
+complete -c godot -l profiling -d "Enable profiling in the script debugger"
+complete -c godot -l remote-debug -d "Enable remote debugging"
+complete -c godot -l debug-collisions -d "Show collision shapes when running the scene"
+complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene"
+complete -c godot -l frame-delay -d "Simulate high CPU load (delay each frame by the given number of milliseconds)" -x
+complete -c godot -l time-scale -d "Force time scale (higher values are faster, 1.0 is normal speed)" -x
+complete -c godot -l disable-render-loop -d "Disable render loop so rendering only occurs when called explicitly from script"
+complete -c godot -l disable-crash-handler -d "Disable crash handler when supported by the platform code"
+complete -c godot -l fixed-fps -d "Force a fixed number of frames per second (this setting disables real-time synchronization)" -x
+complete -c godot -l print-fps -d "Print the frames per second to the stdout"
+
+# Standalone tools:
+complete -c godot -s s -l script -d "Run a script" -r
+complete -c godot -l check-only -d "Only parse for errors and quit (use with --script)"
+complete -c godot -l export -d "Export the project using the given preset and matching release template" -x
+complete -c godot -l export-debug -d "Same as --export, but using the debug template" -x
+complete -c godot -l export-pack -d "Same as --export, but only export the game pack for the given preset" -x
+complete -c godot -l doctool -d "Dump the engine API reference to the given path in XML format, merging if existing files are found" -r
+complete -c godot -l no-docbase -d "Disallow dumping the base types (used with --doctool)"
+complete -c godot -l build-solutions -d "Build the scripting solutions (e.g. for C# projects)"
+complete -c godot -l gdnative-generate-json-api -d "Generate JSON dump of the Godot API for GDNative bindings"
+complete -c godot -l test -d "Run a unit test" -x
diff --git a/misc/travis/clang-format.sh b/misc/travis/clang-format.sh
index 097b2a9378..a6585578e1 100755
--- a/misc/travis/clang-format.sh
+++ b/misc/travis/clang-format.sh
@@ -3,11 +3,17 @@
CLANG_FORMAT=clang-format-8
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
- # Check the whole commit range against $TRAVIS_BRANCH, the base merge branch
- # We could use $TRAVIS_COMMIT_RANGE but it doesn't play well with force pushes
- RANGE="$(git rev-parse $TRAVIS_BRANCH) HEAD"
+ # Travis only clones the PR branch and uses its HEAD commit as detached HEAD,
+ # so it's problematic when we want an exact commit range for format checks.
+ # We fetch upstream to ensure that we have the proper references to resolve.
+ # Ideally we would use $TRAVIS_COMMIT_RANGE but it doesn't play well with PR
+ # updates, as it only includes changes since the previous state of the PR.
+ git remote add upstream https://github.com/godotengine/godot \
+ --no-tags -f -t $TRAVIS_BRANCH
+ RANGE="upstream/$TRAVIS_BRANCH HEAD"
else
- # Test only the last commit
+ # Test only the last commit, since $TRAVIS_COMMIT_RANGE wouldn't support
+ # force pushes.
RANGE=HEAD
fi
diff --git a/modules/arkit/arkit_interface.h b/modules/arkit/arkit_interface.h
index cb18350409..4f8f726816 100644
--- a/modules/arkit/arkit_interface.h
+++ b/modules/arkit/arkit_interface.h
@@ -62,7 +62,7 @@ private:
Ref<CameraFeed> feed;
int image_width[2];
int image_height[2];
- PoolVector<uint8_t> img_data[2];
+ Vector<uint8_t> img_data[2];
struct anchor_map {
ARVRPositionalTracker *tracker;
diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm
index 1896a34e46..39447e8dab 100644
--- a/modules/arkit/arkit_interface.mm
+++ b/modules/arkit/arkit_interface.mm
@@ -488,7 +488,7 @@ void ARKitInterface::process() {
img_data[0].resize(new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[0].write();
+ uint8_t *w = img_data[0].write();
if (new_width == bytes_per_row) {
memcpy(w.ptr(), dataY, new_width * new_height);
} else {
@@ -519,7 +519,7 @@ void ARKitInterface::process() {
img_data[1].resize(2 * new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[1].write();
+ uint8_t *w = img_data[1].write();
if ((2 * new_width) == bytes_per_row) {
memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height);
} else {
diff --git a/modules/assimp/SCsub b/modules/assimp/SCsub
index 5e66b50de3..90cdd7f5fc 100644
--- a/modules/assimp/SCsub
+++ b/modules/assimp/SCsub
@@ -4,97 +4,91 @@ Import('env')
Import('env_modules')
env_assimp = env_modules.Clone()
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/include'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code/Importer/IFC'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/misc'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/common'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/irrXML/'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/unzip/'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code/Importer/STEPParser'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/zlib/'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/openddlparser/include'])
-env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/rapidjson/include'])
-env_assimp.Prepend(CPPPATH=['.'])
-#env_assimp.Append(CPPDEFINES=['ASSIMP_DOUBLE_PRECISION']) # TODO default to what godot is compiled with for future double support
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_BOOST_WORKAROUND'])
-env_assimp.Append(CPPDEFINES=['OPENDDLPARSER_BUILD'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OWN_ZLIB'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_EXPORT'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AMF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3DS_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD3_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDL_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD2_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_PLY_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASE_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OBJ_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_HMP_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SMD_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDC_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STL_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWO_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_DXF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NFF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_RAW_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SIB_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OFF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AC_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BVH_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRRMESH_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRR_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_B3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COLLADA_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_TERRAGEN_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_CSM_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWS_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OGRE_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OPENGEX_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MS3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COB_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BLEND_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3BSP_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NDO_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STEP_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IFC_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_XGL_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASSBIN_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_C4D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3MF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_GLTF_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_GLTF2_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_SINGLETHREADED'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_M3D_IMPORTER'])
-env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MMD_IMPORTER'])
+# Force bundled version for now, there's no released version of Assimp with
+# support for ArmaturePopulate which we use from their master branch.
+if True: # env['builtin_assimp']:
+ thirdparty_dir = "#thirdparty/assimp"
-if(env['platform'] == 'windows'):
- env_assimp.Append(CPPDEFINES=['PLATFORM_WINDOWS'])
- env_assimp.Append(CPPDEFINES=[('PLATFORM', 'WINDOWS')])
-elif(env['platform'] == 'x11'):
- env_assimp.Append(CPPDEFINES=['PLATFORM_LINUX'])
- env_assimp.Append(CPPDEFINES=[('PLATFORM', 'LINUX')])
-elif(env['platform'] == 'osx'):
- env_assimp.Append(CPPDEFINES=['PLATFORM_DARWIN'])
- env_assimp.Append(CPPDEFINES=[('PLATFORM', 'DARWIN')])
+ env_assimp.Prepend(CPPPATH=['#thirdparty/assimp'])
+ env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/code'])
+ env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/include'])
+
+ #env_assimp.Append(CPPDEFINES=['ASSIMP_DOUBLE_PRECISION']) # TODO default to what godot is compiled with for future double support
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_SINGLETHREADED'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_BOOST_WORKAROUND'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OWN_ZLIB'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_EXPORT'])
+
+ # Importers we don't need
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3DS_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3MF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AC_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AMF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASE_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASSBIN_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_B3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BLEND_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BVH_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_C4D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COB_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COLLADA_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_CSM_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_DXF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_GLTF2_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_GLTF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_HMP_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IFC_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRR_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRRMESH_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWO_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWS_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_M3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD2_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD3_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDC_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDL_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MMD_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MS3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NDO_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NFF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OBJ_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OFF_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OGRE_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OPENGEX_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_PLY_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3BSP_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_RAW_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SIB_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SMD_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STEP_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STL_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_TERRAGEN_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X3D_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_XGL_IMPORTER'])
+ env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X_IMPORTER'])
+
+ if(env['platform'] == 'windows'):
+ env_assimp.Append(CPPDEFINES=['PLATFORM_WINDOWS'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'WINDOWS')])
+ elif(env['platform'] == 'x11'):
+ env_assimp.Append(CPPDEFINES=['PLATFORM_LINUX'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'LINUX')])
+ elif(env['platform'] == 'osx'):
+ env_assimp.Append(CPPDEFINES=['PLATFORM_DARWIN'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'DARWIN')])
-env_thirdparty = env_assimp.Clone()
-env_thirdparty.disable_warnings()
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/Common/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/PostProcessing/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/Material/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/FBX/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/MMD/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/glTF/*.cpp'))
-env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/glTF2/*.cpp'))
+ env_thirdparty = env_assimp.Clone()
+ env_thirdparty.disable_warnings()
+ env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/CApi/*.cpp'))
+ env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/Common/*.cpp'))
+ env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/PostProcessing/*.cpp'))
+ env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/Material/*.cpp'))
+ env_thirdparty.add_source_files(env.modules_sources, Glob('#thirdparty/assimp/code/FBX/*.cpp'))
# Godot's own source files
env_assimp.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index 2e653f4c5d..1881d0db33 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -1217,17 +1217,17 @@ EditorSceneImporterAssimp::_generate_mesh_from_surface_indices(ImportState &stat
const size_t num_vertices = ai_mesh->mAnimMeshes[j]->mNumVertices;
array_copy[Mesh::ARRAY_INDEX] = Variant();
if (ai_mesh->mAnimMeshes[j]->HasPositions()) {
- PoolVector3Array vertices;
+ PackedVector3Array vertices;
vertices.resize(num_vertices);
for (size_t l = 0; l < num_vertices; l++) {
const aiVector3D ai_pos = ai_mesh->mAnimMeshes[j]->mVertices[l];
Vector3 position = Vector3(ai_pos.x, ai_pos.y, ai_pos.z);
- vertices.write()[l] = position;
+ vertices.ptrw()[l] = position;
}
- PoolVector3Array new_vertices = array_copy[VisualServer::ARRAY_VERTEX].duplicate(true);
+ PackedVector3Array new_vertices = array_copy[VisualServer::ARRAY_VERTEX].duplicate(true);
ERR_CONTINUE(vertices.size() != new_vertices.size());
for (int32_t l = 0; l < new_vertices.size(); l++) {
- PoolVector3Array::Write w = new_vertices.write();
+ Vector3 *w = new_vertices.ptrw();
w[l] = vertices[l];
}
array_copy[VisualServer::ARRAY_VERTEX] = new_vertices;
@@ -1235,53 +1235,53 @@ EditorSceneImporterAssimp::_generate_mesh_from_surface_indices(ImportState &stat
int32_t color_set = 0;
if (ai_mesh->mAnimMeshes[j]->HasVertexColors(color_set)) {
- PoolColorArray colors;
+ PackedColorArray colors;
colors.resize(num_vertices);
for (size_t l = 0; l < num_vertices; l++) {
const aiColor4D ai_color = ai_mesh->mAnimMeshes[j]->mColors[color_set][l];
Color color = Color(ai_color.r, ai_color.g, ai_color.b, ai_color.a);
- colors.write()[l] = color;
+ colors.ptrw()[l] = color;
}
- PoolColorArray new_colors = array_copy[VisualServer::ARRAY_COLOR].duplicate(true);
+ PackedColorArray new_colors = array_copy[VisualServer::ARRAY_COLOR].duplicate(true);
ERR_CONTINUE(colors.size() != new_colors.size());
for (int32_t l = 0; l < colors.size(); l++) {
- PoolColorArray::Write w = new_colors.write();
+ Color *w = new_colors.ptrw();
w[l] = colors[l];
}
array_copy[VisualServer::ARRAY_COLOR] = new_colors;
}
if (ai_mesh->mAnimMeshes[j]->HasNormals()) {
- PoolVector3Array normals;
+ PackedVector3Array normals;
normals.resize(num_vertices);
for (size_t l = 0; l < num_vertices; l++) {
const aiVector3D ai_normal = ai_mesh->mAnimMeshes[j]->mNormals[l];
Vector3 normal = Vector3(ai_normal.x, ai_normal.y, ai_normal.z);
- normals.write()[l] = normal;
+ normals.ptrw()[l] = normal;
}
- PoolVector3Array new_normals = array_copy[VisualServer::ARRAY_NORMAL].duplicate(true);
+ PackedVector3Array new_normals = array_copy[VisualServer::ARRAY_NORMAL].duplicate(true);
ERR_CONTINUE(normals.size() != new_normals.size());
for (int l = 0; l < normals.size(); l++) {
- PoolVector3Array::Write w = new_normals.write();
+ Vector3 *w = new_normals.ptrw();
w[l] = normals[l];
}
array_copy[VisualServer::ARRAY_NORMAL] = new_normals;
}
if (ai_mesh->mAnimMeshes[j]->HasTangentsAndBitangents()) {
- PoolColorArray tangents;
+ PackedColorArray tangents;
tangents.resize(num_vertices);
- PoolColorArray::Write w = tangents.write();
+ Color *w = tangents.ptrw();
for (size_t l = 0; l < num_vertices; l++) {
AssimpUtils::calc_tangent_from_mesh(ai_mesh, j, l, l, w);
}
- PoolRealArray new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true);
+ PackedFloat32Array new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true);
ERR_CONTINUE(new_tangents.size() != tangents.size() * 4);
for (int32_t l = 0; l < tangents.size(); l++) {
- new_tangents.write()[l + 0] = tangents[l].r;
- new_tangents.write()[l + 1] = tangents[l].g;
- new_tangents.write()[l + 2] = tangents[l].b;
- new_tangents.write()[l + 3] = tangents[l].a;
+ new_tangents.ptrw()[l + 0] = tangents[l].r;
+ new_tangents.ptrw()[l + 1] = tangents[l].g;
+ new_tangents.ptrw()[l + 2] = tangents[l].b;
+ new_tangents.ptrw()[l + 3] = tangents[l].a;
}
array_copy[VisualServer::ARRAY_TANGENT] = new_tangents;
}
diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h
index d037efce21..80b67b5453 100644
--- a/modules/assimp/import_utils.h
+++ b/modules/assimp/import_utils.h
@@ -98,7 +98,7 @@ public:
/**
* calculate tangents for mesh data from assimp data
*/
- static void calc_tangent_from_mesh(const aiMesh *ai_mesh, int i, int tri_index, int index, PoolColorArray::Write &w) {
+ static void calc_tangent_from_mesh(const aiMesh *ai_mesh, int i, int tri_index, int index, Color *w) {
const aiVector3D normals = ai_mesh->mAnimMeshes[i]->mNormals[tri_index];
const Vector3 godot_normal = Vector3(normals.x, normals.y, normals.z);
const aiVector3D tangent = ai_mesh->mAnimMeshes[i]->mTangents[tri_index];
@@ -375,17 +375,17 @@ public:
} else {
Ref<Image> img;
img.instance();
- PoolByteArray arr;
+ PackedByteArray arr;
uint32_t size = tex->mWidth * tex->mHeight;
arr.resize(size);
- memcpy(arr.write().ptr(), tex->pcData, size);
+ memcpy(arr.ptrw(), tex->pcData, size);
ERR_FAIL_COND_V(arr.size() % 4 != 0, Ref<Image>());
//ARGB8888 to RGBA8888
for (int32_t i = 0; i < arr.size() / 4; i++) {
- arr.write().ptr()[(4 * i) + 3] = arr[(4 * i) + 0];
- arr.write().ptr()[(4 * i) + 0] = arr[(4 * i) + 1];
- arr.write().ptr()[(4 * i) + 1] = arr[(4 * i) + 2];
- arr.write().ptr()[(4 * i) + 2] = arr[(4 * i) + 3];
+ arr.ptrw()[(4 * i) + 3] = arr[(4 * i) + 0];
+ arr.ptrw()[(4 * i) + 0] = arr[(4 * i) + 1];
+ arr.ptrw()[(4 * i) + 1] = arr[(4 * i) + 2];
+ arr.ptrw()[(4 * i) + 2] = arr[(4 * i) + 3];
}
img->create(tex->mWidth, tex->mHeight, true, Image::FORMAT_RGBA8, arr);
ERR_FAIL_COND_V(img.is_null(), Ref<Image>());
diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp
index f5ae424b56..062b5b59f8 100644
--- a/modules/basis_universal/register_types.cpp
+++ b/modules/basis_universal/register_types.cpp
@@ -52,11 +52,10 @@ enum BasisDecompressFormat {
basist::etc1_global_selector_codebook *sel_codebook = nullptr;
-static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedChannels p_channels) {
-
- PoolVector<uint8_t> budata;
-
#ifdef TOOLS_ENABLED
+static Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedChannels p_channels) {
+
+ Vector<uint8_t> budata;
{
Ref<Image> image = p_image->duplicate();
@@ -74,10 +73,10 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima
basisu::image buimg(image->get_width(), image->get_height());
{
- PoolVector<uint8_t> vec = image->get_data();
- PoolVector<uint8_t>::Read r = vec.read();
+ Vector<uint8_t> vec = image->get_data();
+ const uint8_t *r = vec.ptr();
- memcpy(buimg.get_ptr(), r.ptr(), vec.size());
+ memcpy(buimg.get_ptr(), r, vec.size());
}
//image->save_png("pepeche.png");
@@ -117,14 +116,10 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima
#ifdef USE_RG_AS_RGBA
image->convert_rg_to_ra_rgba8();
decompress_format = BASIS_DECOMPRESS_RG_AS_RA;
-
#else
-
params.m_seperate_rg_to_color_alpha = true;
decompress_format = BASIS_DECOMPRESS_RG;
-
#endif
-
} break;
case Image::USED_CHANNELS_RGB: {
decompress_format = BASIS_DECOMPRESS_RGB;
@@ -145,22 +140,22 @@ static PoolVector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Ima
budata.resize(buvec.size() + 4);
{
- PoolVector<uint8_t>::Write w = budata.write();
- uint32_t *decf = (uint32_t *)w.ptr();
+ uint8_t *w = budata.ptrw();
+ uint32_t *decf = (uint32_t *)w;
*decf = decompress_format;
- memcpy(w.ptr() + 4, &buvec[0], buvec.size());
+ memcpy(w + 4, &buvec[0], buvec.size());
}
}
-#endif
return budata;
}
+#endif // TOOLS_ENABLED
-static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer) {
+static Ref<Image> basis_universal_unpacker(const Vector<uint8_t> &p_buffer) {
Ref<Image> image;
- PoolVector<uint8_t>::Read r = p_buffer.read();
- const uint8_t *ptr = r.ptr();
+ const uint8_t *r = p_buffer.ptr();
+ const uint8_t *ptr = r;
int size = p_buffer.size();
basist::transcoder_texture_format format;
@@ -241,12 +236,12 @@ static Ref<Image> basis_universal_unpacker(const PoolVector<uint8_t> &p_buffer)
tr.get_image_info(ptr, size, info, 0);
int block_size = basist::basis_get_bytes_per_block(format);
- PoolVector<uint8_t> gpudata;
+ Vector<uint8_t> gpudata;
gpudata.resize(info.m_total_blocks * block_size);
{
- PoolVector<uint8_t>::Write w = gpudata.write();
- uint8_t *dst = w.ptr();
+ uint8_t *w = gpudata.ptrw();
+ uint8_t *dst = w;
for (int i = 0; i < gpudata.size(); i++)
dst[i] = 0x00;
@@ -286,7 +281,7 @@ void unregister_basis_universal_types() {
#ifdef TOOLS_ENABLED
delete sel_codebook;
-#endif
Image::basis_universal_packer = NULL;
+#endif
Image::basis_universal_unpacker = NULL;
}
diff --git a/modules/basis_universal/texture_basisu.cpp b/modules/basis_universal/texture_basisu.cpp
index 3b3805157b..12f3241c98 100644
--- a/modules/basis_universal/texture_basisu.cpp
+++ b/modules/basis_universal/texture_basisu.cpp
@@ -44,7 +44,7 @@ void TextureBasisU::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_basisu_data"), &TextureBasisU::get_data);
ClassDB::bind_method(D_METHOD("import"), &TextureBasisU::import);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "basisu_data"), "set_basisu_data", "get_basisu_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "basisu_data"), "set_basisu_data", "get_basisu_data");
};
@@ -81,13 +81,13 @@ uint32_t TextureBasisU::get_flags() const {
};
-void TextureBasisU::set_basisu_data(const PoolVector<uint8_t>& p_data) {
+void TextureBasisU::set_basisu_data(const Vector<uint8_t>& p_data) {
#ifdef TOOLS_ENABLED
data = p_data;
#endif
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t* r = p_data.ptr();
const void* ptr = r.ptr();
int size = p_data.size();
@@ -114,11 +114,11 @@ void TextureBasisU::set_basisu_data(const PoolVector<uint8_t>& p_data) {
tex_size = Size2(info.m_width, info.m_height);
int block_size = basist::basis_get_bytes_per_block(format);
- PoolVector<uint8_t> gpudata;
+ Vector<uint8_t> gpudata;
gpudata.resize(info.m_total_blocks * block_size);
{
- PoolVector<uint8_t>::Write w = gpudata.write();
+ uint8_t* w = gpudata.ptrw();
uint8_t* dst = w.ptr();
for (int i=0; i<gpudata.size(); i++)
dst[i] = 0x00;
@@ -152,7 +152,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) {
#ifdef TOOLS_ENABLED
- PoolVector<uint8_t> budata;
+ Vector<uint8_t> budata;
{
Image::Format format = p_img->get_format();
@@ -168,9 +168,9 @@ Error TextureBasisU::import(const Ref<Image>& p_img) {
basisu::image buimg(p_img->get_width(), p_img->get_height());
int size = p_img->get_width() * p_img->get_height() * 4;
- PoolVector<uint8_t> vec = copy->get_data();
+ Vector<uint8_t> vec = copy->get_data();
{
- PoolVector<uint8_t>::Read r = vec.read();
+ const uint8_t* r = vec.ptr();
memcpy(buimg.get_ptr(), r.ptr(), size);
};
@@ -198,7 +198,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) {
budata.resize(buvec.size());
{
- PoolVector<uint8_t>::Write w = budata.write();
+ uint8_t* w = budata.ptrw();
memcpy(w.ptr(), &buvec[0], budata.size());
};
};
@@ -213,7 +213,7 @@ Error TextureBasisU::import(const Ref<Image>& p_img) {
};
-PoolVector<uint8_t> TextureBasisU::get_basisu_data() const {
+Vector<uint8_t> TextureBasisU::get_basisu_data() const {
return data;
};
diff --git a/modules/basis_universal/texture_basisu.h b/modules/basis_universal/texture_basisu.h
index 8474a63258..8de151ede0 100644
--- a/modules/basis_universal/texture_basisu.h
+++ b/modules/basis_universal/texture_basisu.h
@@ -47,7 +47,7 @@ class TextureBasisU : public Texture {
uint32_t flags;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
static void _bind_methods();
@@ -64,9 +64,9 @@ public:
Error import(const Ref<Image> &p_img);
- void set_basisu_data(const PoolVector<uint8_t>& p_data);
+ void set_basisu_data(const Vector<uint8_t>& p_data);
- PoolVector<uint8_t> get_basisu_data() const;
+ Vector<uint8_t> get_basisu_data() const;
String get_img_path() const;
TextureBasisU();
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index 5ce6d59daa..71e5076e78 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -65,7 +65,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
}
// Image data (might be indexed)
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int data_len = 0;
if (bits_per_pixel <= 8) { // indexed
@@ -76,8 +76,8 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
ERR_FAIL_COND_V(data_len == 0, ERR_BUG);
err = data.resize(data_len);
- PoolVector<uint8_t>::Write data_w = data.write();
- uint8_t *write_buffer = data_w.ptr();
+ uint8_t *data_w = data.ptrw();
+ uint8_t *write_buffer = data_w;
const uint32_t width_bytes = width * bits_per_pixel / 8;
const uint32_t line_width = (width_bytes + 3) & ~3;
@@ -158,11 +158,11 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
} else { // data is in indexed format, extend it
// Palette data
- PoolVector<uint8_t> palette_data;
+ Vector<uint8_t> palette_data;
palette_data.resize(color_table_size * 4);
- PoolVector<uint8_t>::Write palette_data_w = palette_data.write();
- uint8_t *pal = palette_data_w.ptr();
+ uint8_t *palette_data_w = palette_data.ptrw();
+ uint8_t *pal = palette_data_w;
const uint8_t *cb = p_color_buffer;
@@ -177,11 +177,11 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
cb += 4;
}
// Extend palette to image
- PoolVector<uint8_t> extended_data;
+ Vector<uint8_t> extended_data;
extended_data.resize(data.size() * 4);
- PoolVector<uint8_t>::Write ex_w = extended_data.write();
- uint8_t *dest = ex_w.ptr();
+ uint8_t *ex_w = extended_data.ptrw();
+ uint8_t *dest = ex_w;
const int num_pixels = width * height;
@@ -260,27 +260,27 @@ Error ImageLoaderBMP::load_image(Ref<Image> p_image, FileAccess *f,
ERR_FAIL_COND_V(color_table_size == 0, ERR_BUG);
}
- PoolVector<uint8_t> bmp_color_table;
+ Vector<uint8_t> bmp_color_table;
// Color table is usually 4 bytes per color -> [B][G][R][0]
bmp_color_table.resize(color_table_size * 4);
- PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write();
- f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4);
+ uint8_t *bmp_color_table_w = bmp_color_table.ptrw();
+ f->get_buffer(bmp_color_table_w, color_table_size * 4);
f->seek(bmp_header.bmp_file_header.bmp_file_offset);
uint32_t bmp_buffer_size = (bmp_header.bmp_file_header.bmp_file_size -
bmp_header.bmp_file_header.bmp_file_offset);
- PoolVector<uint8_t> bmp_buffer;
+ Vector<uint8_t> bmp_buffer;
err = bmp_buffer.resize(bmp_buffer_size);
if (err == OK) {
- PoolVector<uint8_t>::Write bmp_buffer_w = bmp_buffer.write();
- f->get_buffer(bmp_buffer_w.ptr(), bmp_buffer_size);
+ uint8_t *bmp_buffer_w = bmp_buffer.ptrw();
+ f->get_buffer(bmp_buffer_w, bmp_buffer_size);
- PoolVector<uint8_t>::Read bmp_buffer_r = bmp_buffer.read();
- PoolVector<uint8_t>::Read bmp_color_table_r = bmp_color_table.read();
- err = convert_to_image(p_image, bmp_buffer_r.ptr(),
- bmp_color_table_r.ptr(), color_table_size, bmp_header);
+ const uint8_t *bmp_buffer_r = bmp_buffer.ptr();
+ const uint8_t *bmp_color_table_r = bmp_color_table.ptr();
+ err = convert_to_image(p_image, bmp_buffer_r,
+ bmp_color_table_r, color_table_size, bmp_header);
}
f->close();
}
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 7806145390..e8a5c1475a 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/modules/bullet/area_bullet.cpp
@@ -117,7 +117,7 @@ void AreaBullet::call_event(CollisionObjectBullet *p_otherObject, PhysicsServer:
call_event_res[3] = 0; // other_body_shape ID
call_event_res[4] = 0; // self_shape ID
- Variant::CallError outResp;
+ Callable::CallError outResp;
areaGodoObject->call(event.event_callback_method, (const Variant **)call_event_res_ptr, 5, outResp);
}
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index e5804fbde8..d33c3a748c 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -370,7 +370,7 @@ void RigidBodyBullet::dispatch_callbacks() {
} else {
const Variant *vp[2] = { &variantBodyDirect, &force_integration_callback->udata };
- Variant::CallError responseCallError;
+ Callable::CallError responseCallError;
int argc = (force_integration_callback->udata.get_type() == Variant::NIL) ? 1 : 2;
obj->call(force_integration_callback->method, vp, argc, responseCallError);
}
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index f46db09e4a..6780f89d9e 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -122,8 +122,8 @@ btBoxShape *ShapeBullet::create_shape_box(const btVector3 &boxHalfExtents) {
return bulletnew(btBoxShape(boxHalfExtents));
}
-btCapsuleShapeZ *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) {
- return bulletnew(btCapsuleShapeZ(radius, height));
+btCapsuleShape *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) {
+ return bulletnew(btCapsuleShape(radius, height));
}
btCylinderShape *ShapeBullet::create_shape_cylinder(btScalar radius, btScalar height) {
@@ -142,11 +142,11 @@ btScaledBvhTriangleMeshShape *ShapeBullet::create_shape_concave(btBvhTriangleMes
}
}
-btHeightfieldTerrainShape *ShapeBullet::create_shape_height_field(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) {
+btHeightfieldTerrainShape *ShapeBullet::create_shape_height_field(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) {
const btScalar ignoredHeightScale(1);
const int YAxis = 1; // 0=X, 1=Y, 2=Z
const bool flipQuadEdges = false;
- const void *heightsPtr = p_heights.read().ptr();
+ const void *heightsPtr = p_heights.ptr();
btHeightfieldTerrainShape *heightfield = bulletnew(btHeightfieldTerrainShape(p_width, p_depth, heightsPtr, ignoredHeightScale, p_min_height, p_max_height, YAxis, PHY_FLOAT, flipQuadEdges));
@@ -370,7 +370,7 @@ ConcavePolygonShapeBullet::~ConcavePolygonShapeBullet() {
delete meshShape->getTriangleInfoMap();
bulletdelete(meshShape);
}
- faces = PoolVector<Vector3>();
+ faces = Vector<Vector3>();
}
void ConcavePolygonShapeBullet::set_data(const Variant &p_data) {
@@ -385,7 +385,7 @@ PhysicsServer::ShapeType ConcavePolygonShapeBullet::get_type() const {
return PhysicsServer::SHAPE_CONCAVE_POLYGON;
}
-void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) {
+void ConcavePolygonShapeBullet::setup(Vector<Vector3> p_faces) {
faces = p_faces;
if (meshShape) {
/// Clear previous created shape
@@ -401,8 +401,8 @@ void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) {
btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh);
src_face_count /= 3;
- PoolVector<Vector3>::Read r = p_faces.read();
- const Vector3 *facesr = r.ptr();
+ const Vector3 *r = p_faces.ptr();
+ const Vector3 *facesr = r;
btVector3 supVec_0;
btVector3 supVec_1;
@@ -471,10 +471,10 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
// TODO This code will need adjustments if real_t is set to `double`,
// because that precision is unnecessary for a heightmap and Bullet doesn't support it...
- PoolVector<real_t> l_heights;
+ Vector<real_t> l_heights;
Variant l_heights_v = d["heights"];
- if (l_heights_v.get_type() == Variant::POOL_REAL_ARRAY) {
+ if (l_heights_v.get_type() == Variant::PACKED_FLOAT32_ARRAY) {
// Ready-to-use heights can be passed
l_heights = l_heights_v;
@@ -491,13 +491,13 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
// We could convert here automatically but it's better to not be intrusive and let the caller do it if necessary.
ERR_FAIL_COND(l_image->get_format() != Image::FORMAT_RF);
- PoolByteArray im_data = l_image->get_data();
+ PackedByteArray im_data = l_image->get_data();
l_heights.resize(l_image->get_width() * l_image->get_height());
- PoolRealArray::Write w = l_heights.write();
- PoolByteArray::Read r = im_data.read();
- float *rp = (float *)r.ptr();
+ real_t *w = l_heights.ptrw();
+ const uint8_t *r = im_data.ptr();
+ float *rp = (float *)r;
// At this point, `rp` could be used directly for Bullet, but I don't know how safe it would be.
for (int i = 0; i < l_heights.size(); ++i) {
@@ -505,7 +505,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
}
} else {
- ERR_FAIL_MSG("Expected PoolRealArray or float Image.");
+ ERR_FAIL_MSG("Expected PackedFloat32Array or float Image.");
}
ERR_FAIL_COND(l_width <= 0);
@@ -515,7 +515,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
// Compute min and max heights if not specified.
if (!d.has("min_height") && !d.has("max_height")) {
- PoolVector<real_t>::Read r = l_heights.read();
+ const real_t *r = l_heights.ptr();
int heights_size = l_heights.size();
for (int i = 0; i < heights_size; ++i) {
@@ -540,7 +540,7 @@ PhysicsServer::ShapeType HeightMapShapeBullet::get_type() const {
return PhysicsServer::SHAPE_HEIGHTMAP;
}
-void HeightMapShapeBullet::setup(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) {
+void HeightMapShapeBullet::setup(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) {
// TODO cell size must be tweaked using localScaling, which is a shared property for all Bullet shapes
// If this array is resized outside of here, it should be preserved due to CoW
diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h
index 8d3512cab4..c8b5ca102a 100644
--- a/modules/bullet/shape_bullet.h
+++ b/modules/bullet/shape_bullet.h
@@ -85,12 +85,12 @@ public:
static class btStaticPlaneShape *create_shape_plane(const btVector3 &planeNormal, btScalar planeConstant);
static class btSphereShape *create_shape_sphere(btScalar radius);
static class btBoxShape *create_shape_box(const btVector3 &boxHalfExtents);
- static class btCapsuleShapeZ *create_shape_capsule(btScalar radius, btScalar height);
+ static class btCapsuleShape *create_shape_capsule(btScalar radius, btScalar height);
static class btCylinderShape *create_shape_cylinder(btScalar radius, btScalar height);
/// IMPORTANT: Remember to delete the shape interface by calling: delete my_shape->getMeshInterface();
static class btConvexPointCloudShape *create_shape_convex(btAlignedObjectArray<btVector3> &p_vertices, const btVector3 &p_local_scaling = btVector3(1, 1, 1));
static class btScaledBvhTriangleMeshShape *create_shape_concave(btBvhTriangleMeshShape *p_mesh_shape, const btVector3 &p_local_scaling = btVector3(1, 1, 1));
- static class btHeightfieldTerrainShape *create_shape_height_field(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height);
+ static class btHeightfieldTerrainShape *create_shape_height_field(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height);
static class btRayShape *create_shape_ray(real_t p_length, bool p_slips_on_slope);
};
@@ -203,7 +203,7 @@ class ConcavePolygonShapeBullet : public ShapeBullet {
class btBvhTriangleMeshShape *meshShape;
public:
- PoolVector<Vector3> faces;
+ Vector<Vector3> faces;
ConcavePolygonShapeBullet();
virtual ~ConcavePolygonShapeBullet();
@@ -214,13 +214,13 @@ public:
virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge = 0);
private:
- void setup(PoolVector<Vector3> p_faces);
+ void setup(Vector<Vector3> p_faces);
};
class HeightMapShapeBullet : public ShapeBullet {
public:
- PoolVector<real_t> heights;
+ Vector<real_t> heights;
int width;
int depth;
real_t min_height;
@@ -234,7 +234,7 @@ public:
virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge = 0);
private:
- void setup(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height);
+ void setup(Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height);
};
class RayShapeBullet : public ShapeBullet {
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index a7988279c0..f21206dd0d 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -184,7 +184,7 @@ void SoftBodyBullet::get_node_offset(int p_node_index, Vector3 &r_offset) const
return;
Array arrays = soft_mesh->surface_get_arrays(0);
- PoolVector<Vector3> vertices(arrays[VS::ARRAY_VERTEX]);
+ Vector<Vector3> vertices(arrays[VS::ARRAY_VERTEX]);
if (0 <= p_node_index && vertices.size() > p_node_index) {
r_offset = vertices[p_node_index];
@@ -230,8 +230,8 @@ void SoftBodyBullet::reset_all_node_positions() {
return;
Array arrays = soft_mesh->surface_get_arrays(0);
- PoolVector<Vector3> vs_vertices(arrays[VS::ARRAY_VERTEX]);
- PoolVector<Vector3>::Read vs_vertices_read = vs_vertices.read();
+ Vector<Vector3> vs_vertices(arrays[VS::ARRAY_VERTEX]);
+ const Vector3 *vs_vertices_read = vs_vertices.ptr();
for (int vertex_index = bt_soft_body->m_nodes.size() - 1; 0 <= vertex_index; --vertex_index) {
@@ -320,7 +320,7 @@ void SoftBodyBullet::set_drag_coefficient(real_t p_val) {
}
}
-void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVector<Vector3> p_vertices) {
+void SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector3> p_vertices) {
/// Assert the current soft body is destroyed
destroy_soft_body();
@@ -339,7 +339,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
const int vs_vertices_size(p_vertices.size());
- PoolVector<Vector3>::Read p_vertices_read = p_vertices.read();
+ const Vector3 *p_vertices_read = p_vertices.ptr();
for (int vs_vertex_index = 0; vs_vertex_index < vs_vertices_size; ++vs_vertex_index) {
@@ -366,7 +366,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
{ // Parse vertices to bullet
bt_vertices.resize(indices_map_size * 3);
- PoolVector<Vector3>::Read p_vertices_read = p_vertices.read();
+ const Vector3 *p_vertices_read = p_vertices.ptr();
for (int i = 0; i < indices_map_size; ++i) {
bt_vertices.write[3 * i + 0] = p_vertices_read[indices_table[i][0]].x;
@@ -382,7 +382,7 @@ void SoftBodyBullet::set_trimesh_body_shape(PoolVector<int> p_indices, PoolVecto
bt_triangles.resize(triangles_size * 3);
- PoolVector<int>::Read p_indices_read = p_indices.read();
+ const int *p_indices_read = p_indices.ptr();
for (int i = 0; i < triangles_size; ++i) {
bt_triangles.write[3 * i + 0] = vs_indices_to_physics_table[p_indices_read[3 * i + 2]];
diff --git a/modules/bullet/soft_body_bullet.h b/modules/bullet/soft_body_bullet.h
index b98116b073..2df8ce074f 100644
--- a/modules/bullet/soft_body_bullet.h
+++ b/modules/bullet/soft_body_bullet.h
@@ -152,7 +152,7 @@ public:
_FORCE_INLINE_ real_t get_drag_coefficient() const { return drag_coefficient; }
private:
- void set_trimesh_body_shape(PoolVector<int> p_indices, PoolVector<Vector3> p_vertices);
+ void set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector3> p_vertices);
void setup_soft_body();
void pin_node(int p_node_index);
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 0e4c4b4731..f6df97f11d 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -726,9 +726,6 @@ void SpaceBullet::check_ghost_overlaps() {
other_body_shape = static_cast<btCollisionShape *>(otherObject->get_bt_shape(z));
- if (other_body_shape->isConcave())
- continue;
-
btTransform other_shape_transform(otherObject->get_bt_shape_transform(z));
other_shape_transform.getOrigin() *= other_body_scale;
diff --git a/modules/camera/camera_ios.mm b/modules/camera/camera_ios.mm
index 8059277503..f01135f251 100644
--- a/modules/camera/camera_ios.mm
+++ b/modules/camera/camera_ios.mm
@@ -44,7 +44,7 @@
Ref<CameraFeed> feed;
size_t width[2];
size_t height[2];
- PoolVector<uint8_t> img_data[2];
+ Vector<uint8_t> img_data[2];
AVCaptureDeviceInput *input;
AVCaptureVideoDataOutput *output;
@@ -175,7 +175,7 @@
img_data[0].resize(new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[0].write();
+ uint8_t *w = img_data[0].ptrw();
memcpy(w.ptr(), dataY, new_width * new_height);
img[0].instance();
@@ -196,7 +196,7 @@
img_data[1].resize(2 * new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[1].write();
+ uint8_t *w = img_data[1].ptrw();
memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height);
///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion
diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_osx.mm
index 658ddb728b..9a72174723 100644
--- a/modules/camera/camera_osx.mm
+++ b/modules/camera/camera_osx.mm
@@ -42,7 +42,7 @@
Ref<CameraFeed> feed;
size_t width[2];
size_t height[2];
- PoolVector<uint8_t> img_data[2];
+ Vector<uint8_t> img_data[2];
AVCaptureDeviceInput *input;
AVCaptureVideoDataOutput *output;
@@ -159,8 +159,8 @@
img_data[0].resize(new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[0].write();
- memcpy(w.ptr(), dataY, new_width * new_height);
+ uint8_t *w = img_data[0].ptrw();
+ memcpy(w, dataY, new_width * new_height);
img[0].instance();
img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]);
@@ -177,8 +177,8 @@
img_data[1].resize(2 * new_width * new_height);
}
- PoolVector<uint8_t>::Write w = img_data[1].write();
- memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height);
+ uint8_t *w = img_data[1].ptrw();
+ memcpy(w, dataCbCr, 2 * new_width * new_height);
///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion
img[1].instance();
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index cc3bbed27f..e9ca1d3e5b 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -29,70 +29,215 @@
/*************************************************************************/
#include "csg.h"
-#include "core/math/face3.h"
+
#include "core/math/geometry.h"
-#include "core/os/os.h"
+#include "core/math/math_funcs.h"
#include "core/sort_array.h"
-#include "thirdparty/misc/triangulator.h"
-void CSGBrush::clear() {
- faces.clear();
+// Static helper functions.
+
+inline static bool is_snapable(const Vector3 &p_point1, const Vector3 &p_point2, real_t p_distance) {
+
+ return (p_point1 - p_point2).length_squared() < p_distance * p_distance;
+}
+
+inline static Vector2 interpolate_segment_uv(const Vector2 p_segement_points[2], const Vector2 p_uvs[2], const Vector2 &p_interpolation_point) {
+
+ float segment_length = (p_segement_points[1] - p_segement_points[0]).length();
+ if (segment_length < CMP_EPSILON)
+ return p_uvs[0];
+
+ float distance = (p_interpolation_point - p_segement_points[0]).length();
+ float fraction = distance / segment_length;
+
+ return p_uvs[0].linear_interpolate(p_uvs[1], fraction);
+}
+
+inline static Vector2 interpolate_triangle_uv(const Vector2 p_vertices[3], const Vector2 p_uvs[3], const Vector2 &p_interpolation_point) {
+
+ if (p_interpolation_point.distance_squared_to(p_vertices[0]) < CMP_EPSILON2)
+ return p_uvs[0];
+ if (p_interpolation_point.distance_squared_to(p_vertices[1]) < CMP_EPSILON2)
+ return p_uvs[1];
+ if (p_interpolation_point.distance_squared_to(p_vertices[2]) < CMP_EPSILON2)
+ return p_uvs[2];
+
+ Vector2 edge1 = p_vertices[1] - p_vertices[0];
+ Vector2 edge2 = p_vertices[2] - p_vertices[0];
+ Vector2 interpolation = p_interpolation_point - p_vertices[0];
+
+ float edge1_on_edge1 = edge1.dot(edge1);
+ float edge1_on_edge2 = edge1.dot(edge2);
+ float edge2_on_edge2 = edge2.dot(edge2);
+ float inter_on_edge1 = interpolation.dot(edge1);
+ float inter_on_edge2 = interpolation.dot(edge2);
+ float scale = (edge1_on_edge1 * edge2_on_edge2 - edge1_on_edge2 * edge1_on_edge2);
+ if (scale == 0)
+ return p_uvs[0];
+
+ float v = (edge2_on_edge2 * inter_on_edge1 - edge1_on_edge2 * inter_on_edge2) / scale;
+ float w = (edge1_on_edge1 * inter_on_edge2 - edge1_on_edge2 * inter_on_edge1) / scale;
+ float u = 1.0f - v - w;
+
+ return p_uvs[0] * u + p_uvs[1] * v + p_uvs[2] * w;
+}
+
+static inline bool ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 p_vertices[3], float p_tolerance, Vector3 &r_intersection_point) {
+
+ Vector3 edge1 = p_vertices[1] - p_vertices[0];
+ Vector3 edge2 = p_vertices[2] - p_vertices[0];
+ Vector3 h = p_dir.cross(edge2);
+ real_t a = edge1.dot(h);
+ // Check if ray is parrallel to triangle.
+ if (Math::is_zero_approx(a))
+ return false;
+ real_t f = 1.0 / a;
+
+ Vector3 s = p_from - p_vertices[0];
+ real_t u = f * s.dot(h);
+ if (u < 0.0 - p_tolerance || u > 1.0 + p_tolerance)
+ return false;
+
+ Vector3 q = s.cross(edge1);
+ real_t v = f * p_dir.dot(q);
+ if (v < 0.0 - p_tolerance || u + v > 1.0 + p_tolerance)
+ return false;
+
+ // Ray intersects triangle.
+ // Calculate distance.
+ real_t t = f * edge2.dot(q);
+ // Confirm triangle is in front of ray.
+ if (t >= p_tolerance) {
+ r_intersection_point = p_from + p_dir * t;
+ return true;
+ } else
+ return false;
+}
+
+inline bool is_point_in_triangle(const Vector3 &p_point, const Vector3 p_vertices[3], int p_shifted = 0) {
+
+ real_t det = p_vertices[0].dot(p_vertices[1].cross(p_vertices[2]));
+
+ // If determinant is, zero try shift the triangle and the point.
+ if (Math::is_zero_approx(det)) {
+ if (p_shifted > 2) {
+ // Triangle appears degenerate, so ignore it.
+ return false;
+ }
+ Vector3 shift_by;
+ shift_by[p_shifted] = 1;
+ Vector3 shifted_point = p_point + shift_by;
+ Vector3 shifted_vertices[3] = { p_vertices[0] + shift_by, p_vertices[1] + shift_by, p_vertices[2] + shift_by };
+ return is_point_in_triangle(shifted_point, shifted_vertices, p_shifted + 1);
+ }
+
+ // Find the barycentric coordinates of the point with respect to the vertices.
+ real_t lambda[3];
+ lambda[0] = p_vertices[1].cross(p_vertices[2]).dot(p_point) / det;
+ lambda[1] = p_vertices[2].cross(p_vertices[0]).dot(p_point) / det;
+ lambda[2] = p_vertices[0].cross(p_vertices[1]).dot(p_point) / det;
+
+ // Point is in the plane if all lambdas sum to 1.
+ if (!Math::is_equal_approx(lambda[0] + lambda[1] + lambda[2], 1)) return false;
+
+ // Point is inside the triangle if all lambdas are positive.
+ if (lambda[0] < 0 || lambda[1] < 0 || lambda[2] < 0) return false;
+
+ return true;
}
-void CSGBrush::build_from_faces(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uvs, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials, const PoolVector<bool> &p_invert_faces) {
+inline static bool are_segements_parallel(const Vector2 p_segment1_points[2], const Vector2 p_segment2_points[2], float p_vertex_snap2) {
+
+ Vector2 segment1 = p_segment1_points[1] - p_segment1_points[0];
+ Vector2 segment2 = p_segment2_points[1] - p_segment2_points[0];
+ real_t segment1_length2 = segment1.dot(segment1);
+ real_t segment2_length2 = segment2.dot(segment2);
+ real_t segment_onto_segment = segment2.dot(segment1);
+
+ if (segment1_length2 < p_vertex_snap2 || segment2_length2 < p_vertex_snap2)
+ return true;
+
+ real_t max_separation2;
+ if (segment1_length2 > segment2_length2) {
+ max_separation2 = segment2_length2 - segment_onto_segment * segment_onto_segment / segment1_length2;
+ } else {
+ max_separation2 = segment1_length2 - segment_onto_segment * segment_onto_segment / segment2_length2;
+ }
+
+ return max_separation2 < p_vertex_snap2;
+}
+
+// CSGBrush
+
+void CSGBrush::_regen_face_aabbs() {
+
+ for (int i = 0; i < faces.size(); i++) {
+ faces.write[i].aabb = AABB();
+ faces.write[i].aabb.position = faces[i].vertices[0];
+ faces.write[i].aabb.expand_to(faces[i].vertices[1]);
+ faces.write[i].aabb.expand_to(faces[i].vertices[2]);
+ }
+}
- clear();
+void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials, const Vector<bool> &p_invert_faces) {
+
+ faces.clear();
int vc = p_vertices.size();
ERR_FAIL_COND((vc % 3) != 0);
- PoolVector<Vector3>::Read rv = p_vertices.read();
+ const Vector3 *rv = p_vertices.ptr();
int uvc = p_uvs.size();
- PoolVector<Vector2>::Read ruv = p_uvs.read();
+ const Vector2 *ruv = p_uvs.ptr();
int sc = p_smooth.size();
- PoolVector<bool>::Read rs = p_smooth.read();
+ const bool *rs = p_smooth.ptr();
int mc = p_materials.size();
- PoolVector<Ref<Material> >::Read rm = p_materials.read();
+ const Ref<Material> *rm = p_materials.ptr();
int ic = p_invert_faces.size();
- PoolVector<bool>::Read ri = p_invert_faces.read();
+ const bool *ri = p_invert_faces.ptr();
Map<Ref<Material>, int> material_map;
faces.resize(p_vertices.size() / 3);
for (int i = 0; i < faces.size(); i++) {
+
Face &f = faces.write[i];
f.vertices[0] = rv[i * 3 + 0];
f.vertices[1] = rv[i * 3 + 1];
f.vertices[2] = rv[i * 3 + 2];
+
if (uvc == vc) {
f.uvs[0] = ruv[i * 3 + 0];
f.uvs[1] = ruv[i * 3 + 1];
f.uvs[2] = ruv[i * 3 + 2];
}
- if (sc == vc / 3) {
+
+ if (sc == vc / 3)
f.smooth = rs[i];
- } else {
+ else
f.smooth = false;
- }
- if (ic == vc / 3) {
+ if (ic == vc / 3)
f.invert = ri[i];
- } else {
+ else
f.invert = false;
- }
if (mc == vc / 3) {
+
Ref<Material> mat = rm[i];
if (mat.is_valid()) {
+
const Map<Ref<Material>, int>::Element *E = material_map.find(mat);
+
if (E) {
f.material = E->get();
} else {
f.material = material_map.size();
material_map[mat] = f.material;
}
+
} else {
f.material = -1;
}
@@ -107,17 +252,6 @@ void CSGBrush::build_from_faces(const PoolVector<Vector3> &p_vertices, const Poo
_regen_face_aabbs();
}
-void CSGBrush::_regen_face_aabbs() {
-
- for (int i = 0; i < faces.size(); i++) {
-
- faces.write[i].aabb.position = faces[i].vertices[0];
- faces.write[i].aabb.expand_to(faces[i].vertices[1]);
- faces.write[i].aabb.expand_to(faces[i].vertices[2]);
- faces.write[i].aabb.grow_by(faces[i].aabb.get_longest_axis_size() * 0.001); //make it a tad bigger to avoid num precision errors
- }
-}
-
void CSGBrush::copy_from(const CSGBrush &p_brush, const Transform &p_xform) {
faces = p_brush.faces;
@@ -132,908 +266,218 @@ void CSGBrush::copy_from(const CSGBrush &p_brush, const Transform &p_xform) {
_regen_face_aabbs();
}
-////////////////////////
-
-void CSGBrushOperation::BuildPoly::create(const CSGBrush *p_brush, int p_face, MeshMerge &mesh_merge, bool p_for_B) {
-
- //creates the initial face that will be used for clipping against the other faces
-
- Vector3 va[3] = {
- p_brush->faces[p_face].vertices[0],
- p_brush->faces[p_face].vertices[1],
- p_brush->faces[p_face].vertices[2],
- };
-
- plane = Plane(va[0], va[1], va[2]);
-
- to_world.origin = va[0];
-
- to_world.basis.set_axis(2, plane.normal);
- to_world.basis.set_axis(0, (va[1] - va[2]).normalized());
- to_world.basis.set_axis(1, to_world.basis.get_axis(0).cross(to_world.basis.get_axis(2)).normalized());
-
- to_poly = to_world.affine_inverse();
-
- face_index = p_face;
-
- for (int i = 0; i < 3; i++) {
-
- Point p;
- Vector3 localp = to_poly.xform(va[i]);
- p.point.x = localp.x;
- p.point.y = localp.y;
- p.uv = p_brush->faces[p_face].uvs[i];
-
- points.push_back(p);
-
- ///edge
-
- Edge e;
- e.points[0] = i;
- e.points[1] = (i + 1) % 3;
- e.outer = true;
- edges.push_back(e);
- }
-
- smooth = p_brush->faces[p_face].smooth;
- invert = p_brush->faces[p_face].invert;
-
- if (p_brush->faces[p_face].material != -1) {
- material = p_brush->materials[p_brush->faces[p_face].material];
- }
-
- base_edges = 3;
-}
-
-static Vector2 interpolate_uv(const Vector2 &p_vertex_a, const Vector2 &p_vertex_b, const Vector2 &p_vertex_c, const Vector2 &p_uv_a, const Vector2 &p_uv_c) {
-
- float len_a_c = (p_vertex_c - p_vertex_a).length();
- if (len_a_c < CMP_EPSILON) {
- return p_uv_a;
- }
-
- float len_a_b = (p_vertex_b - p_vertex_a).length();
-
- float c = len_a_b / len_a_c;
-
- return p_uv_a.linear_interpolate(p_uv_c, c);
-}
-
-static Vector2 interpolate_triangle_uv(const Vector2 &p_pos, const Vector2 *p_vtx, const Vector2 *p_uv) {
-
- if (p_pos.distance_squared_to(p_vtx[0]) < CMP_EPSILON2) {
- return p_uv[0];
- }
- if (p_pos.distance_squared_to(p_vtx[1]) < CMP_EPSILON2) {
- return p_uv[1];
- }
- if (p_pos.distance_squared_to(p_vtx[2]) < CMP_EPSILON2) {
- return p_uv[2];
- }
-
- Vector2 v0 = p_vtx[1] - p_vtx[0];
- Vector2 v1 = p_vtx[2] - p_vtx[0];
- Vector2 v2 = p_pos - p_vtx[0];
-
- float d00 = v0.dot(v0);
- float d01 = v0.dot(v1);
- float d11 = v1.dot(v1);
- float d20 = v2.dot(v0);
- float d21 = v2.dot(v1);
- float denom = (d00 * d11 - d01 * d01);
- if (denom == 0) {
- return p_uv[0];
- }
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
-
- return p_uv[0] * u + p_uv[1] * v + p_uv[2] * w;
-}
-
-void CSGBrushOperation::BuildPoly::_clip_segment(const CSGBrush *p_brush, int p_face, const Vector2 *segment, MeshMerge &mesh_merge, bool p_for_B) {
+// CSGBrushOperation
- //keep track of what was inserted
- Vector<int> inserted_points;
+void CSGBrushOperation::merge_brushes(Operation p_operation, const CSGBrush &p_brush_a, const CSGBrush &p_brush_b, CSGBrush &r_merged_brush, float p_vertex_snap) {
- //keep track of point indices for what was inserted, allowing reuse of points.
- int segment_idx[2] = { -1, -1 };
-
- //check if edge and poly share a vertex, of so, assign it to segment_idx
- for (int i = 0; i < points.size(); i++) {
- for (int j = 0; j < 2; j++) {
- if (segment[j].is_equal_approx(points[i].point)) {
- segment_idx[j] = i;
- inserted_points.push_back(i);
- break;
+ // Check for face collisions and add necessary faces.
+ Build2DFaceCollection build2DFaceCollection;
+ for (int i = 0; i < p_brush_a.faces.size(); i++) {
+ for (int j = 0; j < p_brush_b.faces.size(); j++) {
+ if (p_brush_a.faces[i].aabb.intersects_inclusive(p_brush_b.faces[j].aabb)) {
+ update_faces(p_brush_a, i, p_brush_b, j, build2DFaceCollection, p_vertex_snap);
}
}
}
- //check if both segment points are shared with other vertices
- if (segment_idx[0] != -1 && segment_idx[1] != -1) {
-
- if (segment_idx[0] == segment_idx[1]) {
- return; //segment was too tiny, both mapped to same point
- }
-
- bool found = false;
-
- //check if the segment already exists
- for (int i = 0; i < edges.size(); i++) {
-
- if (
- (edges[i].points[0] == segment_idx[0] && edges[i].points[1] == segment_idx[1]) ||
- (edges[i].points[0] == segment_idx[1] && edges[i].points[1] == segment_idx[0])) {
- found = true;
- break;
- }
- }
-
- if (found) {
- //it does already exist, do nothing
- return;
- }
-
- //directly add the new segment
- Edge new_edge;
- new_edge.points[0] = segment_idx[0];
- new_edge.points[1] = segment_idx[1];
- edges.push_back(new_edge);
- return;
- }
-
- //check edge by edge against the segment points to see if intersects
-
- for (int i = 0; i < base_edges; i++) {
-
- //if a point is shared with one of the edge points, then this edge must not be tested, as it will result in a numerical precision error.
- bool edge_valid = true;
- for (int j = 0; j < 2; j++) {
-
- if (edges[i].points[0] == segment_idx[0] || edges[i].points[1] == segment_idx[1] || edges[i].points[0] == segment_idx[1] || edges[i].points[1] == segment_idx[0]) {
- edge_valid = false; //segment has this point, can't check against this
- break;
- }
- }
-
- if (!edge_valid) //already hit a point in this edge, so don't test it
- continue;
-
- //see if either points are within the edge isntead of crossing it
- Vector2 res;
- bool found = false;
- int assign_segment_id = -1;
-
- for (int j = 0; j < 2; j++) {
+ // Add faces to MeshMerge.
+ MeshMerge mesh_merge;
+ mesh_merge.vertex_snap = p_vertex_snap;
- Vector2 edgeseg[2] = { points[edges[i].points[0]].point, points[edges[i].points[1]].point };
- Vector2 closest = Geometry::get_closest_point_to_segment_2d(segment[j], edgeseg);
+ for (int i = 0; i < p_brush_a.faces.size(); i++) {
- if (closest.is_equal_approx(segment[j])) {
- //point rest of this edge
- res = closest;
- found = true;
- assign_segment_id = j;
- }
- }
-
- //test if the point crosses the edge
- if (!found && Geometry::segment_intersects_segment_2d(segment[0], segment[1], points[edges[i].points[0]].point, points[edges[i].points[1]].point, &res)) {
- //point does cross the edge
- found = true;
+ Ref<Material> material;
+ if (p_brush_a.faces[i].material != -1) {
+ material = p_brush_a.materials[p_brush_a.faces[i].material];
}
- //check whether an intersection against the segment happened
- if (found) {
-
- //It did! so first, must slice the segment
- Point new_point;
- new_point.point = res;
- //make sure to interpolate UV too
- new_point.uv = interpolate_uv(points[edges[i].points[0]].point, new_point.point, points[edges[i].points[1]].point, points[edges[i].points[0]].uv, points[edges[i].points[1]].uv);
-
- int point_idx = points.size();
- points.push_back(new_point);
-
- //split the edge in 2
- Edge new_edge;
- new_edge.points[0] = edges[i].points[0];
- new_edge.points[1] = point_idx;
- new_edge.outer = edges[i].outer;
- edges.write[i].points[0] = point_idx;
- edges.insert(i, new_edge);
- i++; //skip newly inserted edge
- base_edges++; //will need an extra one in the base triangle
- if (assign_segment_id >= 0) {
- //point did split a segment, so make sure to remember this
- segment_idx[assign_segment_id] = point_idx;
+ if (build2DFaceCollection.build2DFacesA.has(i)) {
+ build2DFaceCollection.build2DFacesA[i].addFacesToMesh(mesh_merge, p_brush_a.faces[i].smooth, p_brush_a.faces[i].invert, material, false);
+ } else {
+ Vector3 points[3];
+ Vector2 uvs[3];
+ for (int j = 0; j < 3; j++) {
+ points[j] = p_brush_a.faces[i].vertices[j];
+ uvs[j] = p_brush_a.faces[i].uvs[j];
}
- inserted_points.push_back(point_idx);
+ mesh_merge.add_face(points, uvs, p_brush_a.faces[i].smooth, p_brush_a.faces[i].invert, material, false);
}
}
- //final step: after cutting the original triangle, try to see if we can still insert
- //this segment
-
- //if already inserted two points, just use them for a segment
-
- if (inserted_points.size() >= 2) { //should never be >2 on non-manifold geometry, but cope with error
- //two points were inserted, create the new edge
- Edge new_edge;
- new_edge.points[0] = inserted_points[0];
- new_edge.points[1] = inserted_points[1];
- edges.push_back(new_edge);
- return;
- }
-
- // One or no points were inserted (besides splitting), so try to see if extra points can be placed inside the triangle.
- // This needs to be done here, after the previous tests were exhausted
- for (int i = 0; i < 2; i++) {
-
- if (segment_idx[i] != -1)
- continue; //already assigned to something, so skip
-
- //check whether one of the segment endpoints is inside the triangle. If it is, this points needs to be inserted
- if (Geometry::is_point_in_triangle(segment[i], points[0].point, points[1].point, points[2].point)) {
-
- Point new_point;
- new_point.point = segment[i];
+ for (int i = 0; i < p_brush_b.faces.size(); i++) {
- Vector2 point3[3] = { points[0].point, points[1].point, points[2].point };
- Vector2 uv3[3] = { points[0].uv, points[1].uv, points[2].uv };
-
- new_point.uv = interpolate_triangle_uv(new_point.point, point3, uv3);
-
- int point_idx = points.size();
- points.push_back(new_point);
- inserted_points.push_back(point_idx);
+ Ref<Material> material;
+ if (p_brush_b.faces[i].material != -1) {
+ material = p_brush_b.materials[p_brush_b.faces[i].material];
}
- }
-
- //check again whether two points were inserted, if so then create the new edge
- if (inserted_points.size() >= 2) { //should never be >2 on non-manifold geometry, but cope with error
- Edge new_edge;
- new_edge.points[0] = inserted_points[0];
- new_edge.points[1] = inserted_points[1];
- edges.push_back(new_edge);
- }
-}
-
-void CSGBrushOperation::BuildPoly::clip(const CSGBrush *p_brush, int p_face, MeshMerge &mesh_merge, bool p_for_B) {
-
- //Clip function.. find triangle points that will be mapped to the plane and form a segment
-
- Vector2 segment[3]; //2D
- int src_points = 0;
-
- for (int i = 0; i < 3; i++) {
- Vector3 p = p_brush->faces[p_face].vertices[i];
- if (plane.has_point(p)) {
- Vector3 pp = plane.project(p);
- pp = to_poly.xform(pp);
- segment[src_points++] = Vector2(pp.x, pp.y);
+ if (build2DFaceCollection.build2DFacesB.has(i)) {
+ build2DFaceCollection.build2DFacesB[i].addFacesToMesh(mesh_merge, p_brush_b.faces[i].smooth, p_brush_b.faces[i].invert, material, true);
} else {
- Vector3 q = p_brush->faces[p_face].vertices[(i + 1) % 3];
- if (plane.has_point(q))
- continue; //next point is in plane, will be added eventually
- if (plane.is_point_over(p) == plane.is_point_over(q))
- continue; // both on same side of the plane, don't add
-
- Vector3 res;
- if (plane.intersects_segment(p, q, &res)) {
- res = to_poly.xform(res);
- segment[src_points++] = Vector2(res.x, res.y);
- }
- }
- }
-
- //all above or all below, nothing to do. Should not happen though since a precheck was done before.
- if (src_points == 0)
- return;
-
- //just one point in plane is not worth doing anything
- if (src_points == 1)
- return;
-
- //transform A points to 2D
-
- if (segment[0].is_equal_approx(segment[1]))
- return; //too small
-
- _clip_segment(p_brush, p_face, segment, mesh_merge, p_for_B);
-}
-
-void CSGBrushOperation::_collision_callback(const CSGBrush *A, int p_face_a, Map<int, BuildPoly> &build_polys_a, const CSGBrush *B, int p_face_b, Map<int, BuildPoly> &build_polys_b, MeshMerge &mesh_merge) {
-
- //construct a frame of reference for both transforms, in order to do intersection test
- Vector3 va[3] = {
- A->faces[p_face_a].vertices[0],
- A->faces[p_face_a].vertices[1],
- A->faces[p_face_a].vertices[2],
- };
- Vector3 vb[3] = {
- B->faces[p_face_b].vertices[0],
- B->faces[p_face_b].vertices[1],
- B->faces[p_face_b].vertices[2],
- };
-
- {
- //check if either is a degenerate
- if (va[0].is_equal_approx(va[1]) || va[0].is_equal_approx(va[2]) || va[1].is_equal_approx(va[2]))
- return;
-
- if (vb[0].is_equal_approx(vb[1]) || vb[0].is_equal_approx(vb[2]) || vb[1].is_equal_approx(vb[2]))
- return;
- }
-
- {
- //check if points are the same
- int equal_count = 0;
-
- for (int i = 0; i < 3; i++) {
-
+ Vector3 points[3];
+ Vector2 uvs[3];
for (int j = 0; j < 3; j++) {
- if (va[i].distance_to(vb[j]) < mesh_merge.vertex_snap) {
- equal_count++;
- break;
- }
+ points[j] = p_brush_b.faces[i].vertices[j];
+ uvs[j] = p_brush_b.faces[i].uvs[j];
}
- }
-
- //if 2 or 3 points are the same, there is no point in doing anything. They can't
- //be clipped either, so add both.
- if (equal_count == 2 || equal_count == 3) {
- return;
+ mesh_merge.add_face(points, uvs, p_brush_b.faces[i].smooth, p_brush_b.faces[i].invert, material, true);
}
}
- // do a quick pre-check for no-intersection using the SAT theorem
-
- {
-
- //b under or over a plane
- int over_count = 0, in_plane_count = 0, under_count = 0;
- Plane plane_a(va[0], va[1], va[2]);
- if (plane_a.normal == Vector3()) {
- return; //degenerate
- }
-
- for (int i = 0; i < 3; i++) {
- if (plane_a.has_point(vb[i]))
- in_plane_count++;
- else if (plane_a.is_point_over(vb[i]))
- over_count++;
- else
- under_count++;
- }
-
- if (over_count == 0 || under_count == 0)
- return; //no intersection, something needs to be under AND over
-
- //a under or over b plane
- over_count = 0;
- under_count = 0;
- in_plane_count = 0;
-
- Plane plane_b(vb[0], vb[1], vb[2]);
- if (plane_b.normal == Vector3())
- return; //degenerate
+ // Mark faces that ended up inside the intersection.
+ mesh_merge.mark_inside_faces();
- for (int i = 0; i < 3; i++) {
- if (plane_b.has_point(va[i]))
- in_plane_count++;
- else if (plane_b.is_point_over(va[i]))
- over_count++;
- else
- under_count++;
- }
+ // Create new brush and fill with new faces.
+ r_merged_brush.faces.clear();
- if (over_count == 0 || under_count == 0)
- return; //no intersection, something needs to be under AND over
+ switch (p_operation) {
- //edge pairs (cross product combinations), see SAT theorem
+ case OPERATION_UNION: {
- for (int i = 0; i < 3; i++) {
+ int outside_count = 0;
- Vector3 axis_a = (va[i] - va[(i + 1) % 3]).normalized();
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
+ if (mesh_merge.faces[i].inside)
+ continue;
+ outside_count++;
+ }
- for (int j = 0; j < 3; j++) {
+ r_merged_brush.faces.resize(outside_count);
- Vector3 axis_b = (vb[j] - vb[(j + 1) % 3]).normalized();
+ outside_count = 0;
- Vector3 sep_axis = axis_a.cross(axis_b);
- if (sep_axis == Vector3())
- continue; //colineal
- sep_axis.normalize();
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
- real_t min_a = 1e20, max_a = -1e20;
- real_t min_b = 1e20, max_b = -1e20;
+ if (mesh_merge.faces[i].inside)
+ continue;
- for (int k = 0; k < 3; k++) {
- real_t d = sep_axis.dot(va[k]);
- min_a = MIN(min_a, d);
- max_a = MAX(max_a, d);
- d = sep_axis.dot(vb[k]);
- min_b = MIN(min_b, d);
- max_b = MAX(max_b, d);
+ for (int j = 0; j < 3; j++) {
+ r_merged_brush.faces.write[outside_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
+ r_merged_brush.faces.write[outside_count].uvs[j] = mesh_merge.faces[i].uvs[j];
}
- min_b -= (max_a - min_a) * 0.5;
- max_b += (max_a - min_a) * 0.5;
-
- real_t dmin = min_b - (min_a + max_a) * 0.5;
- real_t dmax = max_b - (min_a + max_a) * 0.5;
-
- if (dmin > CMP_EPSILON || dmax < -CMP_EPSILON) {
- return; //does not contain zero, so they don't overlap
- }
+ r_merged_brush.faces.write[outside_count].smooth = mesh_merge.faces[i].smooth;
+ r_merged_brush.faces.write[outside_count].invert = mesh_merge.faces[i].invert;
+ r_merged_brush.faces.write[outside_count].material = mesh_merge.faces[i].material_idx;
+ outside_count++;
}
- }
- }
-
- //if we are still here, it means they most likely intersect, so create BuildPolys if they don't exist
-
- BuildPoly *poly_a = NULL;
-
- if (!build_polys_a.has(p_face_a)) {
- BuildPoly bp;
- bp.create(A, p_face_a, mesh_merge, false);
- build_polys_a[p_face_a] = bp;
- }
-
- poly_a = &build_polys_a[p_face_a];
-
- BuildPoly *poly_b = NULL;
+ r_merged_brush._regen_face_aabbs();
- if (!build_polys_b.has(p_face_b)) {
-
- BuildPoly bp;
- bp.create(B, p_face_b, mesh_merge, true);
- build_polys_b[p_face_b] = bp;
- }
-
- poly_b = &build_polys_b[p_face_b];
-
- //clip each other, this could be improved by using vertex unique IDs (more vertices may be shared instead of using snap)
- poly_a->clip(B, p_face_b, mesh_merge, false);
- poly_b->clip(A, p_face_a, mesh_merge, true);
-}
-
-void CSGBrushOperation::_add_poly_points(const BuildPoly &p_poly, int p_edge, int p_from_point, int p_to_point, const Vector<Vector<int> > &vertex_process, Vector<bool> &edge_process, Vector<PolyPoints> &r_poly) {
-
- //this function follows the polygon points counter clockwise and adds them. It creates lists of unique polygons
- //every time an unused edge is found, it's pushed to a stack and continues from there.
-
- List<EdgeSort> edge_stack;
-
- {
- EdgeSort es;
- es.angle = 0; //won't be checked here
- es.edge = p_edge;
- es.prev_point = p_from_point;
- es.edge_point = p_to_point;
-
- edge_stack.push_back(es);
- }
-
- //attempt to empty the stack.
- while (edge_stack.size()) {
-
- EdgeSort e = edge_stack.front()->get();
- edge_stack.pop_front();
-
- if (edge_process[e.edge]) {
- //nothing to do here
- continue;
- }
-
- Vector<int> points;
- points.push_back(e.prev_point);
-
- int prev_point = e.prev_point;
- int to_point = e.edge_point;
- int current_edge = e.edge;
-
- edge_process.write[e.edge] = true; //mark as processed
-
- int limit = p_poly.points.size() * 4; //avoid infinite recursion
-
- while (to_point != e.prev_point && limit) {
-
- Vector2 segment[2] = { p_poly.points[prev_point].point, p_poly.points[to_point].point };
-
- //construct a basis transform from the segment, which will be used to check the angle
- Transform2D t2d;
- t2d[0] = (segment[1] - segment[0]).normalized(); //use as Y
- t2d[1] = Vector2(-t2d[0].y, t2d[0].x); // use as tangent
- t2d[2] = segment[1]; //origin
-
- if (t2d.basis_determinant() == 0)
- break; //abort poly
-
- t2d.affine_invert();
-
- //push all edges found here, they will be sorted by minimum angle later.
- Vector<EdgeSort> next_edges;
-
- for (int i = 0; i < vertex_process[to_point].size(); i++) {
+ } break;
- int edge = vertex_process[to_point][i];
- int opposite_point = p_poly.edges[edge].points[0] == to_point ? p_poly.edges[edge].points[1] : p_poly.edges[edge].points[0];
- if (opposite_point == prev_point)
- continue; //not going back
+ case OPERATION_INTERSECTION: {
- EdgeSort e2;
- Vector2 local_vec = t2d.xform(p_poly.points[opposite_point].point);
- e2.angle = -local_vec.angle(); //negate so we can sort by minimum angle
- e2.edge = edge;
- e2.edge_point = opposite_point;
- e2.prev_point = to_point;
+ int inside_count = 0;
- next_edges.push_back(e2);
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
+ if (!mesh_merge.faces[i].inside)
+ continue;
+ inside_count++;
}
- //finally, sort by minimum angle
- next_edges.sort();
+ r_merged_brush.faces.resize(inside_count);
- int next_point = -1;
- int next_edge = -1;
+ inside_count = 0;
- for (int i = 0; i < next_edges.size(); i++) {
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (i == 0) {
- //minimum angle found is the next point
- next_point = next_edges[i].edge_point;
- next_edge = next_edges[i].edge;
+ if (!mesh_merge.faces[i].inside)
+ continue;
- } else {
- //the rest are pushed to the stack IF they were not processed yet.
- if (!edge_process[next_edges[i].edge]) {
- edge_stack.push_back(next_edges[i]);
- }
+ for (int j = 0; j < 3; j++) {
+ r_merged_brush.faces.write[inside_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
+ r_merged_brush.faces.write[inside_count].uvs[j] = mesh_merge.faces[i].uvs[j];
}
- }
- if (next_edge == -1) {
- //did not find anything, may be a dead-end edge (this should normally not happen)
- //just flip the direction and go back
- next_point = prev_point;
- next_edge = current_edge;
+ r_merged_brush.faces.write[inside_count].smooth = mesh_merge.faces[i].smooth;
+ r_merged_brush.faces.write[inside_count].invert = mesh_merge.faces[i].invert;
+ r_merged_brush.faces.write[inside_count].material = mesh_merge.faces[i].material_idx;
+ inside_count++;
}
- points.push_back(to_point);
-
- prev_point = to_point;
- to_point = next_point;
- edge_process.write[next_edge] = true; //mark this edge as processed
- current_edge = next_edge;
-
- limit--;
- }
-
- //if more than 2 points were added to the polygon, add it to the list of polygons.
- if (points.size() > 2) {
- PolyPoints pp;
- pp.points = points;
- r_poly.push_back(pp);
- }
- }
-}
-
-void CSGBrushOperation::_add_poly_outline(const BuildPoly &p_poly, int p_from_point, int p_to_point, const Vector<Vector<int> > &vertex_process, Vector<int> &r_outline) {
-
- //this is the opposite of the function above. It adds polygon outlines instead.
- //this is used for triangulating holes.
- //no stack is used here because only the bigger outline is interesting.
-
- r_outline.push_back(p_from_point);
+ r_merged_brush._regen_face_aabbs();
- int prev_point = p_from_point;
- int to_point = p_to_point;
-
- int limit = p_poly.points.size() * 4; //avoid infinite recursion
-
- while (to_point != p_from_point && limit) {
-
- Vector2 segment[2] = { p_poly.points[prev_point].point, p_poly.points[to_point].point };
- //again create a transform to compute the angle.
- Transform2D t2d;
- t2d[0] = (segment[1] - segment[0]).normalized(); //use as Y
- t2d[1] = Vector2(-t2d[0].y, t2d[0].x); // use as tangent
- t2d[2] = segment[1]; //origin
-
- if (t2d.basis_determinant() == 0)
- break; //abort poly
-
- t2d.affine_invert();
-
- float max_angle = 0;
- int next_point_angle = -1;
+ } break;
- for (int i = 0; i < vertex_process[to_point].size(); i++) {
+ case OPERATION_SUBSTRACTION: {
- int edge = vertex_process[to_point][i];
- int opposite_point = p_poly.edges[edge].points[0] == to_point ? p_poly.edges[edge].points[1] : p_poly.edges[edge].points[0];
- if (opposite_point == prev_point)
- continue; //not going back
+ int face_count = 0;
- float angle = -t2d.xform(p_poly.points[opposite_point].point).angle();
- if (next_point_angle == -1 || angle > max_angle) { //same as before but use greater to check.
- max_angle = angle;
- next_point_angle = opposite_point;
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
+ if (mesh_merge.faces[i].from_b && !mesh_merge.faces[i].inside)
+ continue;
+ if (!mesh_merge.faces[i].from_b && mesh_merge.faces[i].inside)
+ continue;
+ face_count++;
}
- }
-
- if (next_point_angle == -1) {
- //go back because no route found
- next_point_angle = prev_point;
- }
-
- r_outline.push_back(to_point);
- prev_point = to_point;
- to_point = next_point_angle;
-
- limit--;
- }
-}
-
-void CSGBrushOperation::_merge_poly(MeshMerge &mesh, int p_face_idx, const BuildPoly &p_poly, bool p_from_b) {
-
- //finally, merge the 2D polygon back to 3D
-
- Vector<Vector<int> > vertex_process;
- Vector<bool> edge_process;
-
- vertex_process.resize(p_poly.points.size());
- edge_process.resize(p_poly.edges.size());
-
- //none processed by default
- for (int i = 0; i < edge_process.size(); i++) {
- edge_process.write[i] = false;
- }
-
- //put edges in points, so points can go through them
- for (int i = 0; i < p_poly.edges.size(); i++) {
- vertex_process.write[p_poly.edges[i].points[0]].push_back(i);
- vertex_process.write[p_poly.edges[i].points[1]].push_back(i);
- }
- Vector<PolyPoints> polys;
+ r_merged_brush.faces.resize(face_count);
- //process points that were not processed
- for (int i = 0; i < edge_process.size(); i++) {
- if (edge_process[i])
- continue; //already processed
-
- int intersect_poly = -1;
-
- if (i > 0) {
- //this is disconnected, so it's clearly a hole. lets find where it belongs
- Vector2 ref_point = p_poly.points[p_poly.edges[i].points[0]].point;
-
- for (int j = 0; j < polys.size(); j++) {
-
- //find a point outside poly
- Vector2 out_point(-1e20, -1e20);
-
- const PolyPoints &pp = polys[j];
-
- for (int k = 0; k < pp.points.size(); k++) {
- Vector2 p = p_poly.points[pp.points[k]].point;
- out_point.x = MAX(out_point.x, p.x);
- out_point.y = MAX(out_point.y, p.y);
- }
-
- out_point += Vector2(0.12341234, 0.4123412); // move to a random place to avoid direct edge-point chances
+ face_count = 0;
- int intersections = 0;
+ for (int i = 0; i < mesh_merge.faces.size(); i++) {
- for (int k = 0; k < pp.points.size(); k++) {
- Vector2 p1 = p_poly.points[pp.points[k]].point;
- Vector2 p2 = p_poly.points[pp.points[(k + 1) % pp.points.size()]].point;
+ if (mesh_merge.faces[i].from_b && !mesh_merge.faces[i].inside)
+ continue;
+ if (!mesh_merge.faces[i].from_b && mesh_merge.faces[i].inside)
+ continue;
- if (Geometry::segment_intersects_segment_2d(ref_point, out_point, p1, p2, NULL)) {
- intersections++;
- }
+ for (int j = 0; j < 3; j++) {
+ r_merged_brush.faces.write[face_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
+ r_merged_brush.faces.write[face_count].uvs[j] = mesh_merge.faces[i].uvs[j];
}
- if (intersections % 2 == 1) {
- //hole is inside this poly
- intersect_poly = j;
- break;
+ if (mesh_merge.faces[i].from_b) {
+ //invert facing of insides of B
+ SWAP(r_merged_brush.faces.write[face_count].vertices[1], r_merged_brush.faces.write[face_count].vertices[2]);
+ SWAP(r_merged_brush.faces.write[face_count].uvs[1], r_merged_brush.faces.write[face_count].uvs[2]);
}
- }
- }
- if (intersect_poly != -1) {
- //must add this as a hole
- Vector<int> outline;
- _add_poly_outline(p_poly, p_poly.edges[i].points[0], p_poly.edges[i].points[1], vertex_process, outline);
-
- if (outline.size() > 1) {
- polys.write[intersect_poly].holes.push_back(outline);
+ r_merged_brush.faces.write[face_count].smooth = mesh_merge.faces[i].smooth;
+ r_merged_brush.faces.write[face_count].invert = mesh_merge.faces[i].invert;
+ r_merged_brush.faces.write[face_count].material = mesh_merge.faces[i].material_idx;
+ face_count++;
}
- }
- _add_poly_points(p_poly, i, p_poly.edges[i].points[0], p_poly.edges[i].points[1], vertex_process, edge_process, polys);
- }
-
- //get rid of holes, not the most optiomal way, but also not a common case at all to be inoptimal
- for (int i = 0; i < polys.size(); i++) {
-
- if (!polys[i].holes.size())
- continue;
-
- //repeat until no more holes are left to be merged
- while (polys[i].holes.size()) {
-
- //try to merge a hole with the outline
- bool added_hole = false;
-
- for (int j = 0; j < polys[i].holes.size(); j++) {
-
- //try hole vertices
- int with_outline_vertex = -1;
- int from_hole_vertex = -1;
-
- bool found = false;
-
- for (int k = 0; k < polys[i].holes[j].size(); k++) {
-
- int from_idx = polys[i].holes[j][k];
- Vector2 from = p_poly.points[from_idx].point;
-
- //try a segment from hole vertex to outline vertices
- from_hole_vertex = k;
-
- bool valid = true;
-
- for (int l = 0; l < polys[i].points.size(); l++) {
-
- int to_idx = polys[i].points[l];
- Vector2 to = p_poly.points[to_idx].point;
- with_outline_vertex = l;
-
- //try against outline (other points) first
-
- valid = true;
-
- for (int m = 0; m < polys[i].points.size(); m++) {
- int m_next = (m + 1) % polys[i].points.size();
- if (m == with_outline_vertex || m_next == with_outline_vertex) //do not test with edges that share this point
- continue;
+ r_merged_brush._regen_face_aabbs();
- if (Geometry::segment_intersects_segment_2d(from, to, p_poly.points[polys[i].points[m]].point, p_poly.points[polys[i].points[m_next]].point, NULL)) {
- valid = false;
- break;
- }
- }
-
- if (!valid)
- continue;
-
- //try against all holes including self
-
- for (int m = 0; m < polys[i].holes.size(); m++) {
-
- for (int n = 0; n < polys[i].holes[m].size(); n++) {
-
- int n_next = (n + 1) % polys[i].holes[m].size();
- if (m == j && (n == from_hole_vertex || n_next == from_hole_vertex)) //contains vertex being tested from current hole, skip
- continue;
-
- if (Geometry::segment_intersects_segment_2d(from, to, p_poly.points[polys[i].holes[m][n]].point, p_poly.points[polys[i].holes[m][n_next]].point, NULL)) {
- valid = false;
- break;
- }
- }
-
- if (!valid)
- break;
- }
-
- if (valid) //all passed! exit loop
- break;
- else
- continue; //something went wrong, go on.
- }
-
- if (valid) {
- found = true; //if in the end this was valid, use it
- break;
- }
- }
-
- if (found) {
-
- //hook this hole with outline, and remove from list of holes
-
- //duplicate point
- int insert_at = with_outline_vertex;
- int point = polys[i].points[insert_at];
- polys.write[i].points.insert(insert_at, point);
- insert_at++;
- //insert all others, outline should be backwards (must check)
- int holesize = polys[i].holes[j].size();
- for (int k = 0; k <= holesize; k++) {
- int idx = (from_hole_vertex + k) % holesize;
- int point2 = polys[i].holes[j][idx];
- polys.write[i].points.insert(insert_at, point2);
- insert_at++;
- }
-
- added_hole = true;
- polys.write[i].holes.remove(j);
- break; //got rid of hole, break and continue
- }
- }
-
- ERR_BREAK(!added_hole);
- }
+ } break;
}
- //triangulate polygons
-
- for (int i = 0; i < polys.size(); i++) {
-
- Vector<Vector2> vertices;
- vertices.resize(polys[i].points.size());
- for (int j = 0; j < vertices.size(); j++) {
- vertices.write[j] = p_poly.points[polys[i].points[j]].point;
- }
-
- Vector<int> indices = Geometry::triangulate_polygon(vertices);
-
- for (int j = 0; j < indices.size(); j += 3) {
-
- //obtain the vertex
-
- Vector3 face[3];
- Vector2 uv[3];
- float cp = Geometry::vec2_cross(p_poly.points[polys[i].points[indices[j + 0]]].point, p_poly.points[polys[i].points[indices[j + 1]]].point, p_poly.points[polys[i].points[indices[j + 2]]].point);
- if (Math::abs(cp) < CMP_EPSILON)
- continue;
-
- for (int k = 0; k < 3; k++) {
-
- Vector2 p = p_poly.points[polys[i].points[indices[j + k]]].point;
- face[k] = p_poly.to_world.xform(Vector3(p.x, p.y, 0));
- uv[k] = p_poly.points[polys[i].points[indices[j + k]]].uv;
- }
-
- mesh.add_face(face[0], face[1], face[2], uv[0], uv[1], uv[2], p_poly.smooth, p_poly.invert, p_poly.material, p_from_b);
- }
+ // Update the list of materials.
+ r_merged_brush.materials.resize(mesh_merge.materials.size());
+ for (const Map<Ref<Material>, int>::Element *E = mesh_merge.materials.front(); E; E = E->next()) {
+ r_merged_brush.materials.write[E->get()] = E->key();
}
}
-//use a limit to speed up bvh and limit the depth
+// CSGBrushOperation::MeshMerge
+
+// Use a limit to speed up bvh and limit the depth.
#define BVH_LIMIT 8
-int CSGBrushOperation::MeshMerge::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc) {
+int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc) {
- if (p_depth > max_depth) {
- max_depth = p_depth;
+ if (p_depth > r_max_depth) {
+ r_max_depth = p_depth;
}
if (p_size == 0) {
-
return -1;
- } else if (p_size <= BVH_LIMIT) {
+ }
+ if (p_size <= BVH_LIMIT) {
for (int i = 0; i < p_size - 1; i++) {
- p_bb[p_from + i]->next = p_bb[p_from + i + 1] - p_bvh;
+ facebvhptrptr[p_from + i]->next = facebvhptrptr[p_from + i + 1] - facebvhptr;
}
- return p_bb[p_from] - p_bvh;
+ return facebvhptrptr[p_from] - facebvhptr;
}
AABB aabb;
- aabb = p_bb[p_from]->aabb;
+ aabb = facebvhptrptr[p_from]->aabb;
for (int i = 1; i < p_size; i++) {
-
- aabb.merge_with(p_bb[p_from + i]->aabb);
+ aabb.merge_with(facebvhptrptr[p_from + i]->aabb);
}
int li = aabb.get_longest_axis_index();
@@ -1041,28 +485,29 @@ int CSGBrushOperation::MeshMerge::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from
switch (li) {
case Vector3::AXIS_X: {
- SortArray<BVH *, BVHCmpX> sort_x;
- sort_x.nth_element(0, p_size, p_size / 2, &p_bb[p_from]);
+ SortArray<FaceBVH *, FaceBVHCmpX> sort_x;
+ sort_x.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]);
//sort_x.sort(&p_bb[p_from],p_size);
} break;
+
case Vector3::AXIS_Y: {
- SortArray<BVH *, BVHCmpY> sort_y;
- sort_y.nth_element(0, p_size, p_size / 2, &p_bb[p_from]);
+ SortArray<FaceBVH *, FaceBVHCmpY> sort_y;
+ sort_y.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]);
//sort_y.sort(&p_bb[p_from],p_size);
} break;
+
case Vector3::AXIS_Z: {
- SortArray<BVH *, BVHCmpZ> sort_z;
- sort_z.nth_element(0, p_size, p_size / 2, &p_bb[p_from]);
+ SortArray<FaceBVH *, FaceBVHCmpZ> sort_z;
+ sort_z.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]);
//sort_z.sort(&p_bb[p_from],p_size);
-
} break;
}
- int left = _create_bvh(p_bvh, p_bb, p_from, p_size / 2, p_depth + 1, max_depth, max_alloc);
- int right = _create_bvh(p_bvh, p_bb, p_from + p_size / 2, p_size - p_size / 2, p_depth + 1, max_depth, max_alloc);
+ int left = _create_bvh(facebvhptr, facebvhptrptr, p_from, p_size / 2, p_depth + 1, r_max_depth, r_max_alloc);
+ int right = _create_bvh(facebvhptr, facebvhptrptr, p_from + p_size / 2, p_size - p_size / 2, p_depth + 1, r_max_depth, r_max_alloc);
- int index = max_alloc++;
- BVH *_new = &p_bvh[index];
+ int index = r_max_alloc++;
+ FaceBVH *_new = &facebvhptr[index];
_new->aabb = aabb;
_new->center = aabb.position + aabb.size * 0.5;
_new->face = -1;
@@ -1073,7 +518,27 @@ int CSGBrushOperation::MeshMerge::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from
return index;
}
-int CSGBrushOperation::MeshMerge::_bvh_count_intersections(BVH *bvhptr, int p_max_depth, int p_bvh_first, const Vector3 &p_begin, const Vector3 &p_end, int p_exclude) const {
+void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA, List<real_t> &r_intersectionsB, bool p_from_B, real_t p_distance) const {
+
+ List<real_t> &intersections = p_from_B ? r_intersectionsB : r_intersectionsA;
+
+ // Check if distance exists.
+ for (const List<real_t>::Element *E = intersections.front(); E; E = E->next())
+ if (Math::abs(**E - p_distance) < vertex_snap) return;
+
+ intersections.push_back(p_distance);
+}
+
+bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const {
+
+ Face face = faces[p_face_idx];
+ Vector3 face_points[3] = {
+ points[face.points[0]],
+ points[face.points[1]],
+ points[face.points[2]]
+ };
+ Vector3 face_center = (face_points[0] + face_points[1] + face_points[2]) / 3.0;
+ Vector3 face_normal = Plane(face_points[0], face_points[1], face_points[2]).normal;
uint32_t *stack = (uint32_t *)alloca(sizeof(int) * p_max_depth);
@@ -1084,54 +549,58 @@ int CSGBrushOperation::MeshMerge::_bvh_count_intersections(BVH *bvhptr, int p_ma
VISIT_DONE_BIT = 3,
VISITED_BIT_SHIFT = 29,
NODE_IDX_MASK = (1 << VISITED_BIT_SHIFT) - 1,
- VISITED_BIT_MASK = ~NODE_IDX_MASK,
-
+ VISITED_BIT_MASK = ~NODE_IDX_MASK
};
- int intersections = 0;
+ List<real_t> intersectionsA;
+ List<real_t> intersectionsB;
int level = 0;
-
- const Vector3 *vertexptr = points.ptr();
- const Face *facesptr = faces.ptr();
- AABB segment_aabb;
- segment_aabb.position = p_begin;
- segment_aabb.expand_to(p_end);
-
int pos = p_bvh_first;
-
stack[0] = pos;
+
while (true) {
uint32_t node = stack[level] & NODE_IDX_MASK;
- const BVH &b = bvhptr[node];
+ const FaceBVH *current_facebvhptr = &(facebvhptr[node]);
bool done = false;
switch (stack[level] >> VISITED_BIT_SHIFT) {
- case TEST_AABB_BIT: {
-
- if (b.face >= 0) {
-
- const BVH *bp = &b;
- while (bp) {
-
- bool valid = segment_aabb.intersects(bp->aabb) && bp->aabb.intersects_segment(p_begin, p_end);
-
- if (valid && p_exclude != bp->face) {
- const Face &s = facesptr[bp->face];
- Face3 f3(vertexptr[s.points[0]], vertexptr[s.points[1]], vertexptr[s.points[2]]);
-
- Vector3 res;
+ case TEST_AABB_BIT: {
- if (f3.intersects_segment(p_begin, p_end, &res)) {
- intersections++;
+ if (current_facebvhptr->face >= 0) {
+
+ while (current_facebvhptr) {
+
+ if (p_face_idx != current_facebvhptr->face &&
+ current_facebvhptr->aabb.intersects_ray(face_center, face_normal)) {
+
+ const Face &current_face = faces[current_facebvhptr->face];
+ Vector3 current_points[3] = {
+ points[current_face.points[0]],
+ points[current_face.points[1]],
+ points[current_face.points[2]]
+ };
+ Vector3 current_normal = Plane(current_points[0], current_points[1], current_points[2]).normal;
+ Vector3 intersection_point;
+
+ // Check if faces are co-planar.
+ if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
+ is_point_in_triangle(face_center, current_points)) {
+ // Only add an intersection if checking a B face.
+ if (face.from_b)
+ _add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
+ } else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {
+ real_t distance = (intersection_point - face_center).length();
+ _add_distance(intersectionsA, intersectionsB, current_face.from_b, distance);
}
}
- if (bp->next != -1) {
- bp = &bvhptr[bp->next];
+
+ if (current_facebvhptr->next != -1) {
+ current_facebvhptr = &facebvhptr[current_facebvhptr->next];
} else {
- bp = NULL;
+ current_facebvhptr = nullptr;
}
}
@@ -1139,32 +608,33 @@ int CSGBrushOperation::MeshMerge::_bvh_count_intersections(BVH *bvhptr, int p_ma
} else {
- bool valid = segment_aabb.intersects(b.aabb) && b.aabb.intersects_segment(p_begin, p_end);
+ bool valid = current_facebvhptr->aabb.intersects_ray(face_center, face_normal);
if (!valid) {
-
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
-
} else {
stack[level] = (VISIT_LEFT_BIT << VISITED_BIT_SHIFT) | node;
}
}
continue;
}
+
case VISIT_LEFT_BIT: {
stack[level] = (VISIT_RIGHT_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.left | TEST_AABB_BIT;
+ stack[level + 1] = current_facebvhptr->left | TEST_AABB_BIT;
level++;
continue;
}
+
case VISIT_RIGHT_BIT: {
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.right | TEST_AABB_BIT;
+ stack[level + 1] = current_facebvhptr->right | TEST_AABB_BIT;
level++;
continue;
}
+
case VISIT_DONE_BIT: {
if (level == 0) {
@@ -1180,130 +650,112 @@ int CSGBrushOperation::MeshMerge::_bvh_count_intersections(BVH *bvhptr, int p_ma
break;
}
- return intersections;
+ // Inside if face normal intersects other faces an odd number of times.
+ return (intersectionsA.size() + intersectionsB.size()) & 1;
}
void CSGBrushOperation::MeshMerge::mark_inside_faces() {
- // mark faces that are inside. This helps later do the boolean ops when merging.
- // this approach is very brute force (with a bunch of optimizatios, such as BVH and pre AABB intersection test)
+ // Mark faces that are inside. This helps later do the boolean ops when merging.
+ // This approach is very brute force with a bunch of optimizations,
+ // such as BVH and pre AABB intersection test.
- AABB aabb;
+ Vector<FaceBVH> bvhvec;
+ bvhvec.resize(faces.size() * 3); // Will never be larger than this (TODO: Make better)
+ FaceBVH *facebvh = bvhvec.ptrw();
- for (int i = 0; i < points.size(); i++) {
- if (i == 0) {
- aabb.position = points[i];
- } else {
- aabb.expand_to(points[i]);
- }
- }
-
- float max_distance = aabb.size.length() * 1.2;
-
- Vector<BVH> bvhvec;
- bvhvec.resize(faces.size() * 3); //will never be larger than this (todo make better)
- BVH *bvh = bvhvec.ptrw();
-
- AABB faces_a;
- AABB faces_b;
+ AABB aabb_a;
+ AABB aabb_b;
bool first_a = true;
bool first_b = true;
for (int i = 0; i < faces.size(); i++) {
- bvh[i].left = -1;
- bvh[i].right = -1;
- bvh[i].face = i;
- bvh[i].aabb.position = points[faces[i].points[0]];
- bvh[i].aabb.expand_to(points[faces[i].points[1]]);
- bvh[i].aabb.expand_to(points[faces[i].points[2]]);
- bvh[i].center = bvh[i].aabb.position + bvh[i].aabb.size * 0.5;
- bvh[i].next = -1;
+ facebvh[i].left = -1;
+ facebvh[i].right = -1;
+ facebvh[i].face = i;
+ facebvh[i].aabb.position = points[faces[i].points[0]];
+ facebvh[i].aabb.expand_to(points[faces[i].points[1]]);
+ facebvh[i].aabb.expand_to(points[faces[i].points[2]]);
+ facebvh[i].center = facebvh[i].aabb.position + facebvh[i].aabb.size * 0.5;
+ facebvh[i].aabb.grow_by(vertex_snap);
+ facebvh[i].next = -1;
+
if (faces[i].from_b) {
if (first_b) {
- faces_b = bvh[i].aabb;
+ aabb_b = facebvh[i].aabb;
first_b = false;
} else {
- faces_b.merge_with(bvh[i].aabb);
+ aabb_b.merge_with(facebvh[i].aabb);
}
} else {
if (first_a) {
- faces_a = bvh[i].aabb;
+ aabb_a = facebvh[i].aabb;
first_a = false;
} else {
- faces_a.merge_with(bvh[i].aabb);
+ aabb_a.merge_with(facebvh[i].aabb);
}
}
}
- AABB intersection_aabb = faces_a.intersection(faces_b);
- intersection_aabb.grow_by(intersection_aabb.get_longest_axis_size() * 0.01); //grow a little, avoid numerical error
+ AABB intersection_aabb = aabb_a.intersection(aabb_b);
- if (intersection_aabb.size == Vector3()) //AABB do not intersect, so neither do shapes.
+ // Check if shape AABBs intersect.
+ if (intersection_aabb.size == Vector3())
return;
- Vector<BVH *> bvhtrvec;
+ Vector<FaceBVH *> bvhtrvec;
bvhtrvec.resize(faces.size());
- BVH **bvhptr = bvhtrvec.ptrw();
+ FaceBVH **bvhptr = bvhtrvec.ptrw();
for (int i = 0; i < faces.size(); i++) {
-
- bvhptr[i] = &bvh[i];
+ bvhptr[i] = &facebvh[i];
}
int max_depth = 0;
int max_alloc = faces.size();
- _create_bvh(bvh, bvhptr, 0, faces.size(), 1, max_depth, max_alloc);
+ _create_bvh(facebvh, bvhptr, 0, faces.size(), 1, max_depth, max_alloc);
for (int i = 0; i < faces.size(); i++) {
- if (!intersection_aabb.intersects(bvh[i].aabb))
- continue; //not in AABB intersection, so not in face intersection
- Vector3 center = points[faces[i].points[0]];
- center += points[faces[i].points[1]];
- center += points[faces[i].points[2]];
- center /= 3.0;
-
- Plane plane(points[faces[i].points[0]], points[faces[i].points[1]], points[faces[i].points[2]]);
- Vector3 target = center + plane.normal * max_distance + Vector3(0.0001234, 0.000512, 0.00013423); //reduce chance of edge hits by doing a small increment
-
- int intersections = _bvh_count_intersections(bvh, max_depth, max_alloc - 1, center, target, i);
+ // Check if face AABB intersects the intersection AABB.
+ if (!intersection_aabb.intersects_inclusive(facebvh[i].aabb))
+ continue;
- if (intersections & 1) {
+ if (_bvh_inside(facebvh, max_depth, max_alloc - 1, i))
faces.write[i].inside = true;
- }
}
}
-void CSGBrushOperation::MeshMerge::add_face(const Vector3 &p_a, const Vector3 &p_b, const Vector3 &p_c, const Vector2 &p_uv_a, const Vector2 &p_uv_b, const Vector2 &p_uv_c, bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b) {
+void CSGBrushOperation::MeshMerge::add_face(const Vector3 p_points[], const Vector2 p_uvs[], bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b) {
- Vector3 src_points[3] = { p_a, p_b, p_c };
- Vector2 src_uvs[3] = { p_uv_a, p_uv_b, p_uv_c };
int indices[3];
for (int i = 0; i < 3; i++) {
VertexKey vk;
- vk.x = int((double(src_points[i].x) + double(vertex_snap) * 0.31234) / double(vertex_snap));
- vk.y = int((double(src_points[i].y) + double(vertex_snap) * 0.31234) / double(vertex_snap));
- vk.z = int((double(src_points[i].z) + double(vertex_snap) * 0.31234) / double(vertex_snap));
+ vk.x = int((double(p_points[i].x) + double(vertex_snap) * 0.31234) / double(vertex_snap));
+ vk.y = int((double(p_points[i].y) + double(vertex_snap) * 0.31234) / double(vertex_snap));
+ vk.z = int((double(p_points[i].z) + double(vertex_snap) * 0.31234) / double(vertex_snap));
int res;
if (snap_cache.lookup(vk, res)) {
indices[i] = res;
} else {
indices[i] = points.size();
- points.push_back(src_points[i]);
+ points.push_back(p_points[i]);
snap_cache.set(vk, indices[i]);
}
}
+ // Don't add degenerate faces.
if (indices[0] == indices[2] || indices[0] == indices[1] || indices[1] == indices[2])
- return; //not adding degenerate
+ return;
MeshMerge::Face face;
face.from_b = p_from_b;
face.inside = false;
face.smooth = p_smooth;
face.invert = p_invert;
+
if (p_material.is_valid()) {
if (!materials.has(p_material)) {
face.material_idx = materials.size();
@@ -1316,205 +768,708 @@ void CSGBrushOperation::MeshMerge::add_face(const Vector3 &p_a, const Vector3 &p
}
for (int k = 0; k < 3; k++) {
-
face.points[k] = indices[k];
- face.uvs[k] = src_uvs[k];
- ;
+ face.uvs[k] = p_uvs[k];
}
faces.push_back(face);
}
-void CSGBrushOperation::merge_brushes(Operation p_operation, const CSGBrush &p_A, const CSGBrush &p_B, CSGBrush &result, float p_snap) {
+// CSGBrushOperation::Build2DFaces
- CallbackData cd;
- cd.self = this;
- cd.A = &p_A;
- cd.B = &p_B;
+int CSGBrushOperation::Build2DFaces::_get_point_idx(const Vector2 &p_point) {
- MeshMerge mesh_merge;
- mesh_merge.vertex_snap = p_snap;
-
- //check intersections between faces. Use AABB to speed up precheck
- //this generates list of buildpolys and clips them.
- //this was originally BVH optimized, but its not really worth it.
- for (int i = 0; i < p_A.faces.size(); i++) {
- cd.face_a = i;
- for (int j = 0; j < p_B.faces.size(); j++) {
- if (p_A.faces[i].aabb.intersects(p_B.faces[j].aabb)) {
- _collision_callback(&p_A, i, cd.build_polys_A, &p_B, j, cd.build_polys_B, mesh_merge);
- }
- }
+ for (int vertex_idx = 0; vertex_idx < vertices.size(); ++vertex_idx) {
+ if ((p_point - vertices[vertex_idx].point).length_squared() < vertex_snap2)
+ return vertex_idx;
}
+ return -1;
+}
- //merge the already cliped polys back to 3D
- for (Map<int, BuildPoly>::Element *E = cd.build_polys_A.front(); E; E = E->next()) {
- _merge_poly(mesh_merge, E->key(), E->get(), false);
- }
+int CSGBrushOperation::Build2DFaces::_add_vertex(const Vertex2D &p_vertex) {
- for (Map<int, BuildPoly>::Element *E = cd.build_polys_B.front(); E; E = E->next()) {
- _merge_poly(mesh_merge, E->key(), E->get(), true);
- }
+ // Check if vertex exists.
+ int vertex_id = _get_point_idx(p_vertex.point);
+ if (vertex_id != -1) return vertex_id;
- //merge the non clipped faces back
+ vertices.push_back(p_vertex);
+ return vertices.size() - 1;
+}
- for (int i = 0; i < p_A.faces.size(); i++) {
+void CSGBrushOperation::Build2DFaces::_add_vertex_idx_sorted(Vector<int> &r_vertex_indices, int p_new_vertex_index) {
- if (cd.build_polys_A.has(i))
- continue; //made from buildpoly, skipping
+ if (p_new_vertex_index >= 0 && r_vertex_indices.find(p_new_vertex_index) == -1) {
+ ERR_FAIL_COND_MSG(p_new_vertex_index >= vertices.size(), "Invalid vertex index.");
- Vector3 points[3];
- Vector2 uvs[3];
- for (int j = 0; j < 3; j++) {
- points[j] = p_A.faces[i].vertices[j];
- uvs[j] = p_A.faces[i].uvs[j];
- }
- Ref<Material> material;
- if (p_A.faces[i].material != -1) {
- material = p_A.materials[p_A.faces[i].material];
+ // The first vertex.
+ if (r_vertex_indices.size() == 0) {
+ // Simply add it.
+ r_vertex_indices.push_back(p_new_vertex_index);
+ return;
}
- mesh_merge.add_face(points[0], points[1], points[2], uvs[0], uvs[1], uvs[2], p_A.faces[i].smooth, p_A.faces[i].invert, material, false);
- }
- for (int i = 0; i < p_B.faces.size(); i++) {
+ // The second vertex.
+ if (r_vertex_indices.size() == 1) {
- if (cd.build_polys_B.has(i))
- continue; //made from buildpoly, skipping
+ Vector2 first_point = vertices[r_vertex_indices[0]].point;
+ Vector2 new_point = vertices[p_new_vertex_index].point;
- Vector3 points[3];
- Vector2 uvs[3];
- for (int j = 0; j < 3; j++) {
- points[j] = p_B.faces[i].vertices[j];
- uvs[j] = p_B.faces[i].uvs[j];
+ // Sort along the axis with the greatest difference.
+ int axis = 0;
+ if (Math::abs(new_point.x - first_point.x) < Math::abs(new_point.y - first_point.y)) axis = 1;
+
+ // Add it to the beginnig or the end appropriately.
+ if (new_point[axis] < first_point[axis])
+ r_vertex_indices.insert(0, p_new_vertex_index);
+ else
+ r_vertex_indices.push_back(p_new_vertex_index);
+
+ return;
}
- Ref<Material> material;
- if (p_B.faces[i].material != -1) {
- material = p_B.materials[p_B.faces[i].material];
+
+ // Third or later vertices.
+ Vector2 first_point = vertices[r_vertex_indices[0]].point;
+ Vector2 last_point = vertices[r_vertex_indices[r_vertex_indices.size() - 1]].point;
+ Vector2 new_point = vertices[p_new_vertex_index].point;
+
+ // Determine axis being sorted against i.e. the axis with the greatest difference.
+ int axis = 0;
+ if (Math::abs(last_point.x - first_point.x) < Math::abs(last_point.y - first_point.y)) axis = 1;
+
+ // Insert the point at the appropriate index.
+ for (int insert_idx = 0; insert_idx < r_vertex_indices.size(); ++insert_idx) {
+ Vector2 insert_point = vertices[r_vertex_indices[insert_idx]].point;
+ if (new_point[axis] < insert_point[axis]) {
+ r_vertex_indices.insert(insert_idx, p_new_vertex_index);
+ return;
+ }
}
- mesh_merge.add_face(points[0], points[1], points[2], uvs[0], uvs[1], uvs[2], p_B.faces[i].smooth, p_B.faces[i].invert, material, true);
+
+ // New largest, add it to the end.
+ r_vertex_indices.push_back(p_new_vertex_index);
}
+}
- //mark faces that ended up inside the intersection
- mesh_merge.mark_inside_faces();
+void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_indices) {
- //regen new brush to start filling it again
- result.clear();
+ int segments = p_segment_indices.size() - 1;
+ if (segments < 2) return;
- switch (p_operation) {
+ // Faces around an inner vertex are merged by moving the inner vertex to the first vertex.
+ for (int sorted_idx = 1; sorted_idx < segments; ++sorted_idx) {
- case OPERATION_UNION: {
+ int closest_idx = 0;
+ int inner_idx = p_segment_indices[sorted_idx];
- int outside_count = 0;
+ if (sorted_idx > segments / 2) {
+ // Merge to other segment end.
+ closest_idx = segments;
+ // Reverse the merge order.
+ inner_idx = p_segment_indices[segments + segments / 2 - sorted_idx];
+ }
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (mesh_merge.faces[i].inside)
- continue;
+ // Find the mergable faces.
+ Vector<int> merge_faces_idx;
+ Vector<Face2D> merge_faces;
+ Vector<int> merge_faces_inner_vertex_idx;
+ for (int face_idx = 0; face_idx < faces.size(); ++face_idx) {
+ for (int face_vertex_idx = 0; face_vertex_idx < 3; ++face_vertex_idx) {
+ if (faces[face_idx].vertex_idx[face_vertex_idx] == inner_idx) {
+ merge_faces_idx.push_back(face_idx);
+ merge_faces.push_back(faces[face_idx]);
+ merge_faces_inner_vertex_idx.push_back(face_vertex_idx);
+ }
+ }
+ }
- outside_count++;
+ Vector<int> degenerate_points;
+
+ // Create the new faces.
+ for (int merge_idx = 0; merge_idx < merge_faces.size(); ++merge_idx) {
+
+ int outer_edge_idx[2];
+ outer_edge_idx[0] = merge_faces[merge_idx].vertex_idx[(merge_faces_inner_vertex_idx[merge_idx] + 1) % 3];
+ outer_edge_idx[1] = merge_faces[merge_idx].vertex_idx[(merge_faces_inner_vertex_idx[merge_idx] + 2) % 3];
+
+ // Skip flattened faces.
+ if (outer_edge_idx[0] == p_segment_indices[closest_idx] ||
+ outer_edge_idx[1] == p_segment_indices[closest_idx]) continue;
+
+ //Don't create degenerate triangles.
+ Vector2 edge1[2] = {
+ vertices[outer_edge_idx[0]].point,
+ vertices[p_segment_indices[closest_idx]].point
+ };
+ Vector2 edge2[2] = {
+ vertices[outer_edge_idx[1]].point,
+ vertices[p_segment_indices[closest_idx]].point
+ };
+ if (are_segements_parallel(edge1, edge2, vertex_snap2)) {
+ degenerate_points.push_back(outer_edge_idx[0]);
+ degenerate_points.push_back(outer_edge_idx[1]);
+ continue;
}
- result.faces.resize(outside_count);
+ // Create new faces.
+ Face2D new_face;
+ new_face.vertex_idx[0] = p_segment_indices[closest_idx];
+ new_face.vertex_idx[1] = outer_edge_idx[0];
+ new_face.vertex_idx[2] = outer_edge_idx[1];
+ faces.push_back(new_face);
+ }
- outside_count = 0;
+ // Delete the old faces in reverse index order.
+ merge_faces_idx.sort();
+ merge_faces_idx.invert();
+ for (int i = 0; i < merge_faces_idx.size(); ++i)
+ faces.remove(merge_faces_idx[i]);
+
+ if (degenerate_points.size() == 0) continue;
+
+ // Split faces using degenerate points.
+ for (int face_idx = 0; face_idx < faces.size(); ++face_idx) {
+
+ Face2D face = faces[face_idx];
+ Vertex2D face_vertices[3] = {
+ vertices[face.vertex_idx[0]],
+ vertices[face.vertex_idx[1]],
+ vertices[face.vertex_idx[2]]
+ };
+ Vector2 face_points[3] = {
+ face_vertices[0].point,
+ face_vertices[1].point,
+ face_vertices[2].point
+ };
+
+ for (int point_idx = 0; point_idx < degenerate_points.size(); ++point_idx) {
+
+ int degenerate_idx = degenerate_points[point_idx];
+ Vector2 point_2D = vertices[degenerate_idx].point;
+
+ // Check if point is existing face vertex.
+ bool existing = false;
+ for (int i = 0; i < 3; ++i) {
+ if ((point_2D - face_vertices[i].point).length_squared() < vertex_snap2) {
+ existing = true;
+ break;
+ }
+ }
+ if (existing) continue;
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (mesh_merge.faces[i].inside)
- continue;
- for (int j = 0; j < 3; j++) {
- result.faces.write[outside_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
- result.faces.write[outside_count].uvs[j] = mesh_merge.faces[i].uvs[j];
+ // Check if point is on an each edge.
+ for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) {
+
+ Vector2 edge_points[2] = {
+ face_points[face_edge_idx],
+ face_points[(face_edge_idx + 1) % 3]
+ };
+ Vector2 closest_point = Geometry::get_closest_point_to_segment_2d(point_2D, edge_points);
+
+ if ((closest_point - point_2D).length_squared() < vertex_snap2) {
+
+ int opposite_vertex_idx = face.vertex_idx[(face_edge_idx + 2) % 3];
+
+ // If new vertex snaps to degenerate vertex, just delete this face.
+ if (degenerate_idx == opposite_vertex_idx) {
+ faces.remove(face_idx);
+ // Update index.
+ --face_idx;
+ break;
+ }
+
+ // Create two new faces around the new edge and remove this face.
+ // The new edge is the last edge.
+ Face2D left_face;
+ left_face.vertex_idx[0] = degenerate_idx;
+ left_face.vertex_idx[1] = face.vertex_idx[(face_edge_idx + 1) % 3];
+ left_face.vertex_idx[2] = opposite_vertex_idx;
+ Face2D right_face;
+ right_face.vertex_idx[0] = opposite_vertex_idx;
+ right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
+ right_face.vertex_idx[2] = degenerate_idx;
+ faces.remove(face_idx);
+ faces.insert(face_idx, right_face);
+ faces.insert(face_idx, left_face);
+
+ // Don't check against the new faces.
+ ++face_idx;
+
+ // No need to check other edges.
+ break;
+ }
}
+ }
+ }
+ }
+}
- result.faces.write[outside_count].smooth = mesh_merge.faces[i].smooth;
- result.faces.write[outside_count].invert = mesh_merge.faces[i].invert;
- result.faces.write[outside_count].material = mesh_merge.faces[i].material_idx;
- outside_count++;
+void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_segment_points[2], Vector<int> &r_segment_indices) {
+
+ // For each face.
+ for (int face_idx = 0; face_idx < faces.size(); ++face_idx) {
+
+ Face2D face = faces[face_idx];
+ Vertex2D face_vertices[3] = {
+ vertices[face.vertex_idx[0]],
+ vertices[face.vertex_idx[1]],
+ vertices[face.vertex_idx[2]]
+ };
+
+ // Check each edge.
+ for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) {
+
+ Vector2 edge_points[2] = {
+ face_vertices[face_edge_idx].point,
+ face_vertices[(face_edge_idx + 1) % 3].point
+ };
+ Vector2 edge_uvs[2] = {
+ face_vertices[face_edge_idx].uv,
+ face_vertices[(face_edge_idx + 1) % 3].uv
+ };
+ Vector2 intersection_point;
+
+ // First check if the ends of the segment are on the edge.
+ bool on_edge = false;
+ for (int edge_point_idx = 0; edge_point_idx < 2; ++edge_point_idx) {
+ intersection_point = Geometry::get_closest_point_to_segment_2d(p_segment_points[edge_point_idx], edge_points);
+ if ((intersection_point - p_segment_points[edge_point_idx]).length_squared() < vertex_snap2) {
+ on_edge = true;
+ break;
+ }
}
- result._regen_face_aabbs();
+ // Else check if the segment intersects the edge.
+ if (on_edge || Geometry::segment_intersects_segment_2d(p_segment_points[0], p_segment_points[1], edge_points[0], edge_points[1], &intersection_point)) {
+
+ // Check if intersection point is an edge point.
+ if ((intersection_point - edge_points[0]).length_squared() < vertex_snap2 ||
+ (intersection_point - edge_points[1]).length_squared() < vertex_snap2) continue;
+
+ // Check if edge exists, by checking if the intersecting segment is parallel to the edge.
+ if (are_segements_parallel(p_segment_points, edge_points, vertex_snap2)) continue;
+
+ // Add the intersection point as a new vertex.
+ Vertex2D new_vertex;
+ new_vertex.point = intersection_point;
+ new_vertex.uv = interpolate_segment_uv(edge_points, edge_uvs, intersection_point);
+ int new_vertex_idx = _add_vertex(new_vertex);
+ int opposite_vertex_idx = face.vertex_idx[(face_edge_idx + 2) % 3];
+ _add_vertex_idx_sorted(r_segment_indices, new_vertex_idx);
+
+ // If new vertex snaps to opposite vertex, just delete this face.
+ if (new_vertex_idx == opposite_vertex_idx) {
+ faces.remove(face_idx);
+ // Update index.
+ --face_idx;
+ break;
+ }
- } break;
- case OPERATION_INTERSECTION: {
+ // Don't create degenerate triangles.
+ Vector2 split_edge1[2] = { vertices[new_vertex_idx].point, edge_points[0] };
+ Vector2 split_edge2[2] = { vertices[new_vertex_idx].point, edge_points[1] };
+ Vector2 new_edge[2] = { vertices[new_vertex_idx].point, vertices[opposite_vertex_idx].point };
+ if (are_segements_parallel(split_edge1, new_edge, vertex_snap2) &&
+ are_segements_parallel(split_edge2, new_edge, vertex_snap2)) {
+ break;
+ }
- int inside_count = 0;
+ // If opposite point is on the segemnt, add its index to segment indices too.
+ Vector2 closest_point = Geometry::get_closest_point_to_segment_2d(vertices[opposite_vertex_idx].point, p_segment_points);
+ if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2)
+ _add_vertex_idx_sorted(r_segment_indices, opposite_vertex_idx);
+
+ // Create two new faces around the new edge and remove this face.
+ // The new edge is the last edge.
+ Face2D left_face;
+ left_face.vertex_idx[0] = new_vertex_idx;
+ left_face.vertex_idx[1] = face.vertex_idx[(face_edge_idx + 1) % 3];
+ left_face.vertex_idx[2] = opposite_vertex_idx;
+ Face2D right_face;
+ right_face.vertex_idx[0] = opposite_vertex_idx;
+ right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
+ right_face.vertex_idx[2] = new_vertex_idx;
+ faces.remove(face_idx);
+ faces.insert(face_idx, right_face);
+ faces.insert(face_idx, left_face);
+
+ // Check against the new faces.
+ --face_idx;
+ break;
+ }
+ }
+ }
+}
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (!mesh_merge.faces[i].inside)
- continue;
+int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
+
+ int new_vertex_idx = -1;
+
+ for (int face_idx = 0; face_idx < faces.size(); ++face_idx) {
+
+ Face2D face = faces[face_idx];
+ Vertex2D face_vertices[3] = {
+ vertices[face.vertex_idx[0]],
+ vertices[face.vertex_idx[1]],
+ vertices[face.vertex_idx[2]]
+ };
+ Vector2 points[3] = {
+ face_vertices[0].point,
+ face_vertices[1].point,
+ face_vertices[2].point
+ };
+ Vector2 uvs[3] = {
+ face_vertices[0].uv,
+ face_vertices[1].uv,
+ face_vertices[2].uv
+ };
+
+ // Check if point is existing face vertex.
+ for (int i = 0; i < 3; ++i) {
+ if ((p_point - face_vertices[i].point).length_squared() < vertex_snap2)
+ return face.vertex_idx[i];
+ }
- inside_count++;
- }
+ // Check if point is on an each edge.
+ bool on_edge = false;
+ for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) {
+
+ Vector2 edge_points[2] = {
+ points[face_edge_idx],
+ points[(face_edge_idx + 1) % 3]
+ };
+ Vector2 edge_uvs[2] = {
+ uvs[face_edge_idx],
+ uvs[(face_edge_idx + 1) % 3]
+ };
+
+ Vector2 closest_point = Geometry::get_closest_point_to_segment_2d(p_point, edge_points);
+ if ((closest_point - p_point).length_squared() < vertex_snap2) {
+ on_edge = true;
+
+ // Add the point as a new vertex.
+ Vertex2D new_vertex;
+ new_vertex.point = p_point;
+ new_vertex.uv = interpolate_segment_uv(edge_points, edge_uvs, p_point);
+ new_vertex_idx = _add_vertex(new_vertex);
+ int opposite_vertex_idx = face.vertex_idx[(face_edge_idx + 2) % 3];
+
+ // If new vertex snaps to opposite vertex, just delete this face.
+ if (new_vertex_idx == opposite_vertex_idx) {
+ faces.remove(face_idx);
+ // Update index.
+ --face_idx;
+ break;
+ }
- result.faces.resize(inside_count);
+ // Don't create degenerate triangles.
+ Vector2 split_edge1[2] = { vertices[new_vertex_idx].point, edge_points[0] };
+ Vector2 split_edge2[2] = { vertices[new_vertex_idx].point, edge_points[1] };
+ Vector2 new_edge[2] = { vertices[new_vertex_idx].point, vertices[opposite_vertex_idx].point };
+ if (are_segements_parallel(split_edge1, new_edge, vertex_snap2) &&
+ are_segements_parallel(split_edge2, new_edge, vertex_snap2)) {
+ break;
+ }
- inside_count = 0;
+ // Create two new faces around the new edge and remove this face.
+ // The new edge is the last edge.
+ Face2D left_face;
+ left_face.vertex_idx[0] = new_vertex_idx;
+ left_face.vertex_idx[1] = face.vertex_idx[(face_edge_idx + 1) % 3];
+ left_face.vertex_idx[2] = opposite_vertex_idx;
+ Face2D right_face;
+ right_face.vertex_idx[0] = opposite_vertex_idx;
+ right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
+ right_face.vertex_idx[2] = new_vertex_idx;
+ faces.remove(face_idx);
+ faces.insert(face_idx, right_face);
+ faces.insert(face_idx, left_face);
+
+ // Don't check against the new faces.
+ ++face_idx;
+
+ // No need to check other edges.
+ break;
+ }
+ }
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (!mesh_merge.faces[i].inside)
+ // If not on an edge, check if the point is inside the face.
+ if (!on_edge && Geometry::is_point_in_triangle(p_point, face_vertices[0].point, face_vertices[1].point, face_vertices[2].point)) {
+
+ // Add the point as a new vertex.
+ Vertex2D new_vertex;
+ new_vertex.point = p_point;
+ new_vertex.uv = interpolate_triangle_uv(points, uvs, p_point);
+ new_vertex_idx = _add_vertex(new_vertex);
+
+ // Create three new faces around this point and remove this face.
+ // The new vertex is the last vertex.
+ for (int i = 0; i < 3; ++i) {
+
+ // Don't create degenerate triangles.
+ Vector2 edge[2] = { points[i], points[(i + 1) % 3] };
+ Vector2 new_edge1[2] = { vertices[new_vertex_idx].point, points[i] };
+ Vector2 new_edge2[2] = { vertices[new_vertex_idx].point, points[(i + 1) % 3] };
+ if (are_segements_parallel(edge, new_edge1, vertex_snap2) &&
+ are_segements_parallel(edge, new_edge2, vertex_snap2)) {
continue;
- for (int j = 0; j < 3; j++) {
- result.faces.write[inside_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
- result.faces.write[inside_count].uvs[j] = mesh_merge.faces[i].uvs[j];
}
- result.faces.write[inside_count].smooth = mesh_merge.faces[i].smooth;
- result.faces.write[inside_count].invert = mesh_merge.faces[i].invert;
- result.faces.write[inside_count].material = mesh_merge.faces[i].material_idx;
- inside_count++;
+ Face2D new_face;
+ new_face.vertex_idx[0] = face.vertex_idx[i];
+ new_face.vertex_idx[1] = face.vertex_idx[(i + 1) % 3];
+ new_face.vertex_idx[2] = new_vertex_idx;
+ faces.push_back(new_face);
}
+ faces.remove(face_idx);
- result._regen_face_aabbs();
+ // No need to check other faces.
+ break;
+ }
+ }
- } break;
- case OPERATION_SUBSTRACTION: {
+ return new_vertex_idx;
+}
- int face_count = 0;
+void CSGBrushOperation::Build2DFaces::insert(const CSGBrush &p_brush, int p_face_idx) {
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
- if (mesh_merge.faces[i].from_b && !mesh_merge.faces[i].inside)
- continue;
- if (!mesh_merge.faces[i].from_b && mesh_merge.faces[i].inside)
- continue;
+ // Find edge points that cross the plane and face points that are in the plane.
+ // Map those points to 2D.
+ // Create new faces from those points.
- face_count++;
+ Vector2 points_2D[3];
+ int points_count = 0;
+
+ for (int i = 0; i < 3; i++) {
+
+ Vector3 point_3D = p_brush.faces[p_face_idx].vertices[i];
+
+ if (plane.has_point(point_3D)) {
+ // Point is in the plane, add it.
+ Vector3 point_2D = plane.project(point_3D);
+ point_2D = to_2D.xform(point_2D);
+ points_2D[points_count++] = Vector2(point_2D.x, point_2D.y);
+
+ } else {
+
+ Vector3 next_point_3D = p_brush.faces[p_face_idx].vertices[(i + 1) % 3];
+
+ if (plane.has_point(next_point_3D))
+ continue; // Next point is in plane, it will be added separately.
+ if (plane.is_point_over(point_3D) == plane.is_point_over(next_point_3D))
+ continue; // Both points on the same side of the plane, ignore.
+
+ // Edge crosses the plane, find and add the intersection point.
+ Vector3 point_2D;
+ if (plane.intersects_segment(point_3D, next_point_3D, &point_2D)) {
+ point_2D = to_2D.xform(point_2D);
+ points_2D[points_count++] = Vector2(point_2D.x, point_2D.y);
}
+ }
+ }
- result.faces.resize(face_count);
+ Vector<int> segment_indices;
+ Vector2 segment[2];
+ int inserted_index[3] = { -1, -1, -1 };
- face_count = 0;
+ // Insert points.
+ for (int i = 0; i < points_count; ++i) {
+ inserted_index[i] = _insert_point(points_2D[i]);
+ }
- for (int i = 0; i < mesh_merge.faces.size(); i++) {
+ if (points_count == 2) {
+ // Insert a single segment.
+ segment[0] = points_2D[0];
+ segment[1] = points_2D[1];
+ _find_edge_intersections(segment, segment_indices);
+ for (int i = 0; i < 2; ++i) {
+ _add_vertex_idx_sorted(segment_indices, inserted_index[i]);
+ }
+ _merge_faces(segment_indices);
+ }
- if (mesh_merge.faces[i].from_b && !mesh_merge.faces[i].inside)
- continue;
- if (!mesh_merge.faces[i].from_b && mesh_merge.faces[i].inside)
- continue;
+ if (points_count == 3) {
+ // Insert three segments.
+ for (int edge_idx = 0; edge_idx < 3; ++edge_idx) {
+ segment[0] = points_2D[edge_idx];
+ segment[1] = points_2D[(edge_idx + 1) % 3];
+ _find_edge_intersections(segment, segment_indices);
+ for (int i = 0; i < 2; ++i) {
+ _add_vertex_idx_sorted(segment_indices, inserted_index[(edge_idx + i) % 3]);
+ }
+ _merge_faces(segment_indices);
+ segment_indices.clear();
+ }
+ }
+}
- for (int j = 0; j < 3; j++) {
- result.faces.write[face_count].vertices[j] = mesh_merge.points[mesh_merge.faces[i].points[j]];
- result.faces.write[face_count].uvs[j] = mesh_merge.faces[i].uvs[j];
- }
+void CSGBrushOperation::Build2DFaces::addFacesToMesh(MeshMerge &r_mesh_merge, bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b) {
- if (mesh_merge.faces[i].from_b) {
- //invert facing of insides of B
- SWAP(result.faces.write[face_count].vertices[1], result.faces.write[face_count].vertices[2]);
- SWAP(result.faces.write[face_count].uvs[1], result.faces.write[face_count].uvs[2]);
+ for (int face_idx = 0; face_idx < faces.size(); ++face_idx) {
+ Face2D face = faces[face_idx];
+ Vertex2D fv[3] = {
+ vertices[face.vertex_idx[0]],
+ vertices[face.vertex_idx[1]],
+ vertices[face.vertex_idx[2]]
+ };
+
+ // Convert 2D vertex points to 3D.
+ Vector3 points_3D[3];
+ Vector2 uvs[3];
+ for (int i = 0; i < 3; ++i) {
+ Vector3 point_2D(fv[i].point.x, fv[i].point.y, 0);
+ points_3D[i] = to_3D.xform(point_2D);
+ uvs[i] = fv[i].uv;
+ }
+
+ r_mesh_merge.add_face(points_3D, uvs, p_smooth, p_invert, p_material, p_from_b);
+ }
+}
+
+CSGBrushOperation::Build2DFaces::Build2DFaces(const CSGBrush &p_brush, int p_face_idx, float p_vertex_snap2) :
+ vertex_snap2(p_vertex_snap2 * p_vertex_snap2) {
+
+ // Convert 3D vertex points to 2D.
+ Vector3 points_3D[3] = {
+ p_brush.faces[p_face_idx].vertices[0],
+ p_brush.faces[p_face_idx].vertices[1],
+ p_brush.faces[p_face_idx].vertices[2],
+ };
+
+ plane = Plane(points_3D[0], points_3D[1], points_3D[2]);
+ to_3D.origin = points_3D[0];
+ to_3D.basis.set_axis(2, plane.normal);
+ to_3D.basis.set_axis(0, (points_3D[1] - points_3D[2]).normalized());
+ to_3D.basis.set_axis(1, to_3D.basis.get_axis(0).cross(to_3D.basis.get_axis(2)).normalized());
+ to_2D = to_3D.affine_inverse();
+
+ Face2D face;
+ for (int i = 0; i < 3; i++) {
+ Vertex2D vertex;
+ Vector3 point_2D = to_2D.xform(points_3D[i]);
+ vertex.point.x = point_2D.x;
+ vertex.point.y = point_2D.y;
+ vertex.uv = p_brush.faces[p_face_idx].uvs[i];
+ vertices.push_back(vertex);
+ face.vertex_idx[i] = i;
+ }
+ faces.push_back(face);
+}
+
+void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face_idx_a, const CSGBrush &p_brush_b, const int p_face_idx_b, Build2DFaceCollection &p_collection, float p_vertex_snap) {
+
+ Vector3 vertices_a[3] = {
+ p_brush_a.faces[p_face_idx_a].vertices[0],
+ p_brush_a.faces[p_face_idx_a].vertices[1],
+ p_brush_a.faces[p_face_idx_a].vertices[2],
+ };
+
+ Vector3 vertices_b[3] = {
+ p_brush_b.faces[p_face_idx_b].vertices[0],
+ p_brush_b.faces[p_face_idx_b].vertices[1],
+ p_brush_b.faces[p_face_idx_b].vertices[2],
+ };
+
+ // Don't use degenerate faces.
+ bool has_degenerate = false;
+ if (is_snapable(vertices_a[0], vertices_a[1], p_vertex_snap) ||
+ is_snapable(vertices_a[0], vertices_a[2], p_vertex_snap) ||
+ is_snapable(vertices_a[1], vertices_a[2], p_vertex_snap)) {
+ p_collection.build2DFacesA[p_face_idx_a] = Build2DFaces();
+ has_degenerate = true;
+ }
+
+ if (is_snapable(vertices_b[0], vertices_b[1], p_vertex_snap) ||
+ is_snapable(vertices_b[0], vertices_b[2], p_vertex_snap) ||
+ is_snapable(vertices_b[1], vertices_b[2], p_vertex_snap)) {
+ p_collection.build2DFacesB[p_face_idx_b] = Build2DFaces();
+ has_degenerate = true;
+ }
+ if (has_degenerate) return;
+
+ // Ensure B has points either side of or in the plane of A.
+ int in_plane_count = 0, over_count = 0, under_count = 0;
+ Plane plane_a(vertices_a[0], vertices_a[1], vertices_a[2]);
+ ERR_FAIL_COND_MSG(plane_a.normal == Vector3(), "Couldn't form plane from Brush A face.");
+
+ for (int i = 0; i < 3; i++) {
+ if (plane_a.has_point(vertices_b[i]))
+ in_plane_count++;
+ else if (plane_a.is_point_over(vertices_b[i]))
+ over_count++;
+ else
+ under_count++;
+ }
+ // If all points under or over the plane, there is no intesection.
+ if (over_count == 3 || under_count == 3) return;
+
+ // Ensure A has points either side of or in the plane of B.
+ in_plane_count = 0;
+ over_count = 0;
+ under_count = 0;
+ Plane plane_b(vertices_b[0], vertices_b[1], vertices_b[2]);
+ ERR_FAIL_COND_MSG(plane_b.normal == Vector3(), "Couldn't form plane from Brush B face.");
+
+ for (int i = 0; i < 3; i++) {
+ if (plane_b.has_point(vertices_a[i]))
+ in_plane_count++;
+ else if (plane_b.is_point_over(vertices_a[i]))
+ over_count++;
+ else
+ under_count++;
+ }
+ // If all points under or over the plane, there is no intesection.
+ if (over_count == 3 || under_count == 3) return;
+
+ // Check for intersection using the SAT theorem.
+ {
+
+ // Edge pair cross product combinations.
+ for (int i = 0; i < 3; i++) {
+
+ Vector3 axis_a = (vertices_a[i] - vertices_a[(i + 1) % 3]).normalized();
+
+ for (int j = 0; j < 3; j++) {
+
+ Vector3 axis_b = (vertices_b[j] - vertices_b[(j + 1) % 3]).normalized();
+
+ Vector3 sep_axis = axis_a.cross(axis_b);
+ if (sep_axis == Vector3())
+ continue; //colineal
+ sep_axis.normalize();
+
+ real_t min_a = 1e20, max_a = -1e20;
+ real_t min_b = 1e20, max_b = -1e20;
+
+ for (int k = 0; k < 3; k++) {
+ real_t d = sep_axis.dot(vertices_a[k]);
+ min_a = MIN(min_a, d);
+ max_a = MAX(max_a, d);
+ d = sep_axis.dot(vertices_b[k]);
+ min_b = MIN(min_b, d);
+ max_b = MAX(max_b, d);
}
- result.faces.write[face_count].smooth = mesh_merge.faces[i].smooth;
- result.faces.write[face_count].invert = mesh_merge.faces[i].invert;
- result.faces.write[face_count].material = mesh_merge.faces[i].material_idx;
- face_count++;
- }
+ min_b -= (max_a - min_a) * 0.5;
+ max_b += (max_a - min_a) * 0.5;
- result._regen_face_aabbs();
+ real_t dmin = min_b - (min_a + max_a) * 0.5;
+ real_t dmax = max_b - (min_a + max_a) * 0.5;
- } break;
+ if (dmin > CMP_EPSILON || dmax < -CMP_EPSILON) {
+ return; // Does not contain zero, so they don't overlap.
+ }
+ }
+ }
}
- //updatelist of materials
- result.materials.resize(mesh_merge.materials.size());
- for (const Map<Ref<Material>, int>::Element *E = mesh_merge.materials.front(); E; E = E->next()) {
- result.materials.write[E->get()] = E->key();
+ // If we're still here, the faces probably intersect, so add new faces.
+ if (!p_collection.build2DFacesA.has(p_face_idx_a)) {
+ p_collection.build2DFacesA[p_face_idx_a] = Build2DFaces(p_brush_a, p_face_idx_a, p_vertex_snap);
+ }
+ p_collection.build2DFacesA[p_face_idx_a].insert(p_brush_b, p_face_idx_b);
+
+ if (!p_collection.build2DFacesB.has(p_face_idx_b)) {
+ p_collection.build2DFacesB[p_face_idx_b] = Build2DFaces(p_brush_b, p_face_idx_b, p_vertex_snap);
}
+ p_collection.build2DFacesB[p_face_idx_b].insert(p_brush_a, p_face_idx_a);
}
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index a11e55c72a..bb83c84cb5 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -31,20 +31,21 @@
#ifndef CSG_H
#define CSG_H
+#include "core/list.h"
#include "core/map.h"
#include "core/math/aabb.h"
#include "core/math/plane.h"
-#include "core/math/rect2.h"
#include "core/math/transform.h"
+#include "core/math/vector2.h"
#include "core/math/vector3.h"
#include "core/oa_hash_map.h"
-#include "core/pool_vector.h"
+#include "core/reference.h"
+#include "core/vector.h"
#include "scene/resources/material.h"
struct CSGBrush {
struct Face {
-
Vector3 vertices[3];
Vector2 uvs[3];
AABB aabb;
@@ -56,12 +57,11 @@ struct CSGBrush {
Vector<Face> faces;
Vector<Ref<Material> > materials;
- void _regen_face_aabbs();
- //create a brush from faces
- void build_from_faces(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uvs, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials, const PoolVector<bool> &p_invert_faces);
- void copy_from(const CSGBrush &p_brush, const Transform &p_xform);
+ inline void _regen_face_aabbs();
- void clear();
+ // Create a brush from faces.
+ void build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials, const Vector<bool> &p_invert_faces);
+ void copy_from(const CSGBrush &p_brush, const Transform &p_xform);
};
struct CSGBrushOperation {
@@ -70,12 +70,23 @@ struct CSGBrushOperation {
OPERATION_UNION,
OPERATION_INTERSECTION,
OPERATION_SUBSTRACTION,
-
};
+ void merge_brushes(Operation p_operation, const CSGBrush &p_brush_a, const CSGBrush &p_brush_b, CSGBrush &r_merged_brush, float p_vertex_snap);
+
struct MeshMerge {
- struct BVH {
+ struct Face {
+ bool from_b;
+ bool inside;
+ int points[3];
+ Vector2 uvs[3];
+ bool smooth;
+ bool invert;
+ int material_idx;
+ };
+
+ struct FaceBVH {
int face;
int left;
int right;
@@ -84,32 +95,23 @@ struct CSGBrushOperation {
AABB aabb;
};
- struct BVHCmpX {
-
- bool operator()(const BVH *p_left, const BVH *p_right) const {
-
+ struct FaceBVHCmpX {
+ _FORCE_INLINE_ bool operator()(const FaceBVH *p_left, const FaceBVH *p_right) const {
return p_left->center.x < p_right->center.x;
}
};
- struct BVHCmpY {
-
- bool operator()(const BVH *p_left, const BVH *p_right) const {
-
+ struct FaceBVHCmpY {
+ _FORCE_INLINE_ bool operator()(const FaceBVH *p_left, const FaceBVH *p_right) const {
return p_left->center.y < p_right->center.y;
}
};
- struct BVHCmpZ {
-
- bool operator()(const BVH *p_left, const BVH *p_right) const {
-
+ struct FaceBVHCmpZ {
+ _FORCE_INLINE_ bool operator()(const FaceBVH *p_left, const FaceBVH *p_right) const {
return p_left->center.z < p_right->center.z;
}
};
- int _bvh_count_intersections(BVH *bvhptr, int p_max_depth, int p_bvh_first, const Vector3 &p_begin, const Vector3 &p_end, int p_exclude) const;
- int _create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc);
-
struct VertexKey {
int32_t x, y, z;
_FORCE_INLINE_ bool operator<(const VertexKey &p_key) const {
@@ -138,99 +140,59 @@ struct CSGBrushOperation {
}
};
- OAHashMap<VertexKey, int, VertexKeyHash> snap_cache;
-
Vector<Vector3> points;
-
- struct Face {
- bool from_b;
- bool inside;
- int points[3];
- Vector2 uvs[3];
- bool smooth;
- bool invert;
- int material_idx;
- };
-
Vector<Face> faces;
-
Map<Ref<Material>, int> materials;
-
Map<Vector3, int> vertex_map;
- void add_face(const Vector3 &p_a, const Vector3 &p_b, const Vector3 &p_c, const Vector2 &p_uv_a, const Vector2 &p_uv_b, const Vector2 &p_uv_c, bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b);
- // void add_face(const Vector3 &p_a, const Vector3 &p_b, const Vector3 &p_c, bool p_from_b);
-
+ OAHashMap<VertexKey, int, VertexKeyHash> snap_cache;
float vertex_snap;
+
+ inline void _add_distance(List<real_t> &r_intersectionsA, List<real_t> &r_intersectionsB, bool p_from_B, real_t p_distance) const;
+ inline bool _bvh_inside(FaceBVH *facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const;
+ inline int _create_bvh(FaceBVH *facebvhptr, FaceBVH **facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc);
+
+ void add_face(const Vector3 p_points[3], const Vector2 p_uvs[3], bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b);
void mark_inside_faces();
};
- struct BuildPoly {
+ struct Build2DFaces {
- Plane plane;
- Transform to_poly;
- Transform to_world;
- int face_index;
-
- struct Point {
+ struct Vertex2D {
Vector2 point;
Vector2 uv;
};
- Vector<Point> points;
-
- struct Edge {
- bool outer;
- int points[2];
- Edge() {
- outer = false;
- }
+ struct Face2D {
+ int vertex_idx[3];
};
- Vector<Edge> edges;
- Ref<Material> material;
- bool smooth;
- bool invert;
-
- int base_edges; //edges from original triangle, even if split
-
- void _clip_segment(const CSGBrush *p_brush, int p_face, const Vector2 *segment, MeshMerge &mesh_merge, bool p_for_B);
-
- void create(const CSGBrush *p_brush, int p_face, MeshMerge &mesh_merge, bool p_for_B);
- void clip(const CSGBrush *p_brush, int p_face, MeshMerge &mesh_merge, bool p_for_B);
- };
-
- struct PolyPoints {
-
- Vector<int> points;
-
- Vector<Vector<int> > holes;
- };
-
- struct EdgeSort {
- int edge;
- int prev_point;
- int edge_point;
- float angle;
- bool operator<(const EdgeSort &p_edge) const { return angle < p_edge.angle; }
+ Vector<Vertex2D> vertices;
+ Vector<Face2D> faces;
+ Plane plane;
+ Transform to_2D;
+ Transform to_3D;
+ float vertex_snap2;
+
+ inline int _get_point_idx(const Vector2 &p_point);
+ inline int _add_vertex(const Vertex2D &p_vertex);
+ inline void _add_vertex_idx_sorted(Vector<int> &r_vertex_indices, int p_new_vertex_index);
+ inline void _merge_faces(const Vector<int> &p_segment_indices);
+ inline void _find_edge_intersections(const Vector2 p_segment_points[2], Vector<int> &r_segment_indices);
+ inline int _insert_point(const Vector2 &p_point);
+
+ void insert(const CSGBrush &p_brush, int p_brush_face);
+ void addFacesToMesh(MeshMerge &r_mesh_merge, bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b);
+
+ Build2DFaces() {}
+ Build2DFaces(const CSGBrush &p_brush, int p_brush_face, float p_vertex_snap2);
};
- struct CallbackData {
- const CSGBrush *A;
- const CSGBrush *B;
- int face_a;
- CSGBrushOperation *self;
- Map<int, BuildPoly> build_polys_A;
- Map<int, BuildPoly> build_polys_B;
+ struct Build2DFaceCollection {
+ Map<int, Build2DFaces> build2DFacesA;
+ Map<int, Build2DFaces> build2DFacesB;
};
- void _add_poly_points(const BuildPoly &p_poly, int p_edge, int p_from_point, int p_to_point, const Vector<Vector<int> > &vertex_process, Vector<bool> &edge_process, Vector<PolyPoints> &r_poly);
- void _add_poly_outline(const BuildPoly &p_poly, int p_from_point, int p_to_point, const Vector<Vector<int> > &vertex_process, Vector<int> &r_outline);
- void _merge_poly(MeshMerge &mesh, int p_face_idx, const BuildPoly &p_poly, bool p_from_b);
-
- void _collision_callback(const CSGBrush *A, int p_face_a, Map<int, BuildPoly> &build_polys_a, const CSGBrush *B, int p_face_b, Map<int, BuildPoly> &build_polys_b, MeshMerge &mesh_merge);
-
- static void _collision_callbacks(void *ud, int p_face_b);
- void merge_brushes(Operation p_operation, const CSGBrush &p_A, const CSGBrush &p_B, CSGBrush &result, float p_snap = 0.001);
+ void update_faces(const CSGBrush &p_brush_a, const int p_face_idx_a, const CSGBrush &p_brush_b, const int p_face_idx_b, Build2DFaceCollection &p_collection, float p_vertex_snap);
};
#endif // CSG_H
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 49387606f3..1b63bccb06 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -336,12 +336,12 @@ void CSGShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Ref<Material> handles_material = get_material("handles");
- PoolVector<Vector3> faces = cs->get_brush_faces();
+ Vector<Vector3> faces = cs->get_brush_faces();
Vector<Vector3> lines;
lines.resize(faces.size() * 2);
{
- PoolVector<Vector3>::Read r = faces.read();
+ const Vector3 *r = faces.ptr();
for (int i = 0; i < lines.size(); i += 6) {
int f = i / 6;
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 33e4e9748c..a227d49892 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -334,16 +334,16 @@ void CSGShape::_update_shape() {
surfaces.write[i].material = n->materials[i];
}
- surfaces.write[i].verticesw = surfaces.write[i].vertices.write();
- surfaces.write[i].normalsw = surfaces.write[i].normals.write();
- surfaces.write[i].uvsw = surfaces.write[i].uvs.write();
+ surfaces.write[i].verticesw = surfaces.write[i].vertices.ptrw();
+ surfaces.write[i].normalsw = surfaces.write[i].normals.ptrw();
+ surfaces.write[i].uvsw = surfaces.write[i].uvs.ptrw();
if (calculate_tangents) {
- surfaces.write[i].tansw = surfaces.write[i].tans.write();
+ surfaces.write[i].tansw = surfaces.write[i].tans.ptrw();
}
}
//fill arrays
- PoolVector<Vector3> physics_faces;
+ Vector<Vector3> physics_faces;
bool fill_physics_faces = false;
if (root_collision_shape.is_valid()) {
physics_faces.resize(n->faces.size() * 3);
@@ -351,10 +351,10 @@ void CSGShape::_update_shape() {
}
{
- PoolVector<Vector3>::Write physicsw;
+ Vector3 *physicsw;
if (fill_physics_faces) {
- physicsw = physics_faces.write();
+ physicsw = physics_faces.ptrw();
}
for (int i = 0; i < n->faces.size(); i++) {
@@ -435,12 +435,6 @@ void CSGShape::_update_shape() {
have_tangents = genTangSpaceDefault(&msc);
}
- // unset write access
- surfaces.write[i].verticesw.release();
- surfaces.write[i].normalsw.release();
- surfaces.write[i].uvsw.release();
- surfaces.write[i].tansw.release();
-
if (surfaces[i].last_added == 0)
continue;
@@ -470,18 +464,18 @@ AABB CSGShape::get_aabb() const {
return node_aabb;
}
-PoolVector<Vector3> CSGShape::get_brush_faces() {
- ERR_FAIL_COND_V(!is_inside_tree(), PoolVector<Vector3>());
+Vector<Vector3> CSGShape::get_brush_faces() {
+ ERR_FAIL_COND_V(!is_inside_tree(), Vector<Vector3>());
CSGBrush *b = _get_brush();
if (!b) {
- return PoolVector<Vector3>();
+ return Vector<Vector3>();
}
- PoolVector<Vector3> faces;
+ Vector<Vector3> faces;
int fc = b->faces.size();
faces.resize(fc * 3);
{
- PoolVector<Vector3>::Write w = faces.write();
+ Vector3 *w = faces.ptrw();
for (int i = 0; i < fc; i++) {
w[i * 3 + 0] = b->faces[i].vertices[0];
w[i * 3 + 1] = b->faces[i].vertices[1];
@@ -492,9 +486,9 @@ PoolVector<Vector3> CSGShape::get_brush_faces() {
return faces;
}
-PoolVector<Face3> CSGShape::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> CSGShape::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void CSGShape::_notification(int p_what) {
@@ -627,7 +621,7 @@ void CSGShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_meshes"), &CSGShape::get_meshes);
ADD_PROPERTY(PropertyInfo(Variant::INT, "operation", PROPERTY_HINT_ENUM, "Union,Intersection,Subtraction"), "set_operation", "get_operation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "calculate_tangents"), "set_calculate_tangents", "is_calculating_tangents");
ADD_GROUP("Collision", "collision_");
@@ -671,15 +665,15 @@ CSGCombiner::CSGCombiner() {
/////////////////////
-CSGBrush *CSGPrimitive::_create_brush_from_arrays(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uv, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials) {
+CSGBrush *CSGPrimitive::_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials) {
CSGBrush *brush = memnew(CSGBrush);
- PoolVector<bool> invert;
+ Vector<bool> invert;
invert.resize(p_vertices.size() / 3);
{
int ic = invert.size();
- PoolVector<bool>::Write w = invert.write();
+ bool *w = invert.ptrw();
for (int i = 0; i < ic; i++) {
w[i] = invert_faces;
}
@@ -721,10 +715,10 @@ CSGBrush *CSGMesh::_build_brush() {
if (!mesh.is_valid())
return NULL;
- PoolVector<Vector3> vertices;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<Vector2> uvs;
+ Vector<Vector3> vertices;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<Vector2> uvs;
Ref<Material> material = get_material();
for (int i = 0; i < mesh->get_surface_count(); i++) {
@@ -740,25 +734,25 @@ CSGBrush *CSGMesh::_build_brush() {
ERR_FAIL_COND_V(arrays.size() == 0, NULL);
}
- PoolVector<Vector3> avertices = arrays[Mesh::ARRAY_VERTEX];
+ Vector<Vector3> avertices = arrays[Mesh::ARRAY_VERTEX];
if (avertices.size() == 0)
continue;
- PoolVector<Vector3>::Read vr = avertices.read();
+ const Vector3 *vr = avertices.ptr();
- PoolVector<Vector3> anormals = arrays[Mesh::ARRAY_NORMAL];
- PoolVector<Vector3>::Read nr;
+ Vector<Vector3> anormals = arrays[Mesh::ARRAY_NORMAL];
+ const Vector3 *nr;
bool nr_used = false;
if (anormals.size()) {
- nr = anormals.read();
+ nr = anormals.ptr();
nr_used = true;
}
- PoolVector<Vector2> auvs = arrays[Mesh::ARRAY_TEX_UV];
- PoolVector<Vector2>::Read uvr;
+ Vector<Vector2> auvs = arrays[Mesh::ARRAY_TEX_UV];
+ const Vector2 *uvr;
bool uvr_used = false;
if (auvs.size()) {
- uvr = auvs.read();
+ uvr = auvs.ptr();
uvr_used = true;
}
@@ -769,7 +763,7 @@ CSGBrush *CSGMesh::_build_brush() {
mat = mesh->surface_get_material(i);
}
- PoolVector<int> aindices = arrays[Mesh::ARRAY_INDEX];
+ Vector<int> aindices = arrays[Mesh::ARRAY_INDEX];
if (aindices.size()) {
int as = vertices.size();
int is = aindices.size();
@@ -779,12 +773,12 @@ CSGBrush *CSGMesh::_build_brush() {
materials.resize((as + is) / 3);
uvs.resize(as + is);
- PoolVector<Vector3>::Write vw = vertices.write();
- PoolVector<bool>::Write sw = smooth.write();
- PoolVector<Vector2>::Write uvw = uvs.write();
- PoolVector<Ref<Material> >::Write mw = materials.write();
+ Vector3 *vw = vertices.ptrw();
+ bool *sw = smooth.ptrw();
+ Vector2 *uvw = uvs.ptrw();
+ Ref<Material> *mw = materials.ptrw();
- PoolVector<int>::Read ir = aindices.read();
+ const int *ir = aindices.ptr();
for (int j = 0; j < is; j += 3) {
@@ -825,10 +819,10 @@ CSGBrush *CSGMesh::_build_brush() {
uvs.resize(as + is);
materials.resize((as + is) / 3);
- PoolVector<Vector3>::Write vw = vertices.write();
- PoolVector<bool>::Write sw = smooth.write();
- PoolVector<Vector2>::Write uvw = uvs.write();
- PoolVector<Ref<Material> >::Write mw = materials.write();
+ Vector3 *vw = vertices.ptrw();
+ bool *sw = smooth.ptrw();
+ Vector2 *uvw = uvs.ptrw();
+ Ref<Material> *mw = materials.ptrw();
for (int j = 0; j < is; j += 3) {
@@ -890,8 +884,6 @@ void CSGMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_mesh", "mesh"), &CSGMesh::set_mesh);
ClassDB::bind_method(D_METHOD("get_mesh"), &CSGMesh::get_mesh);
- ClassDB::bind_method(D_METHOD("_mesh_changed"), &CSGMesh::_mesh_changed);
-
ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGMesh::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &CSGMesh::get_material);
@@ -904,12 +896,12 @@ void CSGMesh::set_mesh(const Ref<Mesh> &p_mesh) {
if (mesh == p_mesh)
return;
if (mesh.is_valid()) {
- mesh->disconnect("changed", this, "_mesh_changed");
+ mesh->disconnect("changed", callable_mp(this, &CSGMesh::_mesh_changed));
}
mesh = p_mesh;
if (mesh.is_valid()) {
- mesh->connect("changed", this, "_mesh_changed");
+ mesh->connect("changed", callable_mp(this, &CSGMesh::_mesh_changed));
}
_make_dirty();
@@ -932,11 +924,11 @@ CSGBrush *CSGSphere::_build_brush() {
bool invert_val = is_inverting_faces();
Ref<Material> material = get_material();
- PoolVector<Vector3> faces;
- PoolVector<Vector2> uvs;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<bool> invert;
+ Vector<Vector3> faces;
+ Vector<Vector2> uvs;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<bool> invert;
faces.resize(face_count * 3);
uvs.resize(face_count * 3);
@@ -947,11 +939,11 @@ CSGBrush *CSGSphere::_build_brush() {
{
- PoolVector<Vector3>::Write facesw = faces.write();
- PoolVector<Vector2>::Write uvsw = uvs.write();
- PoolVector<bool>::Write smoothw = smooth.write();
- PoolVector<Ref<Material> >::Write materialsw = materials.write();
- PoolVector<bool>::Write invertw = invert.write();
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
int face = 0;
@@ -1055,7 +1047,7 @@ void CSGSphere::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGSphere::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &CSGSphere::get_material);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -1135,11 +1127,11 @@ CSGBrush *CSGBox::_build_brush() {
bool invert_val = is_inverting_faces();
Ref<Material> material = get_material();
- PoolVector<Vector3> faces;
- PoolVector<Vector2> uvs;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<bool> invert;
+ Vector<Vector3> faces;
+ Vector<Vector2> uvs;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<bool> invert;
faces.resize(face_count * 3);
uvs.resize(face_count * 3);
@@ -1150,11 +1142,11 @@ CSGBrush *CSGBox::_build_brush() {
{
- PoolVector<Vector3>::Write facesw = faces.write();
- PoolVector<Vector2>::Write uvsw = uvs.write();
- PoolVector<bool>::Write smoothw = smooth.write();
- PoolVector<Ref<Material> >::Write materialsw = materials.write();
- PoolVector<bool>::Write invertw = invert.write();
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
int face = 0;
@@ -1242,9 +1234,9 @@ void CSGBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGBox::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &CSGBox::get_material);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "StandardMaterial3D,ShaderMaterial"), "set_material", "get_material");
}
@@ -1313,11 +1305,11 @@ CSGBrush *CSGCylinder::_build_brush() {
bool invert_val = is_inverting_faces();
Ref<Material> material = get_material();
- PoolVector<Vector3> faces;
- PoolVector<Vector2> uvs;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<bool> invert;
+ Vector<Vector3> faces;
+ Vector<Vector2> uvs;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<bool> invert;
faces.resize(face_count * 3);
uvs.resize(face_count * 3);
@@ -1328,11 +1320,11 @@ CSGBrush *CSGCylinder::_build_brush() {
{
- PoolVector<Vector3>::Write facesw = faces.write();
- PoolVector<Vector2>::Write uvsw = uvs.write();
- PoolVector<bool>::Write smoothw = smooth.write();
- PoolVector<Ref<Material> >::Write materialsw = materials.write();
- PoolVector<bool>::Write invertw = invert.write();
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
int face = 0;
@@ -1457,8 +1449,8 @@ void CSGCylinder::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGCylinder::set_smooth_faces);
ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGCylinder::get_smooth_faces);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cone"), "set_cone", "is_cone");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -1562,11 +1554,11 @@ CSGBrush *CSGTorus::_build_brush() {
bool invert_val = is_inverting_faces();
Ref<Material> material = get_material();
- PoolVector<Vector3> faces;
- PoolVector<Vector2> uvs;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<bool> invert;
+ Vector<Vector3> faces;
+ Vector<Vector2> uvs;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<bool> invert;
faces.resize(face_count * 3);
uvs.resize(face_count * 3);
@@ -1577,11 +1569,11 @@ CSGBrush *CSGTorus::_build_brush() {
{
- PoolVector<Vector3>::Write facesw = faces.write();
- PoolVector<Vector2>::Write uvsw = uvs.write();
- PoolVector<bool>::Write smoothw = smooth.write();
- PoolVector<Ref<Material> >::Write materialsw = materials.write();
- PoolVector<bool>::Write invertw = invert.write();
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
int face = 0;
@@ -1684,8 +1676,8 @@ void CSGTorus::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGTorus::set_smooth_faces);
ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGTorus::get_smooth_faces);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ring_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_ring_sides", "get_ring_sides");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -1818,15 +1810,15 @@ CSGBrush *CSGPolygon::_build_brush() {
if (path != path_cache) {
if (path_cache) {
- path_cache->disconnect("tree_exited", this, "_path_exited");
- path_cache->disconnect("curve_changed", this, "_path_changed");
+ path_cache->disconnect("tree_exited", callable_mp(this, &CSGPolygon::_path_exited));
+ path_cache->disconnect("curve_changed", callable_mp(this, &CSGPolygon::_path_changed));
path_cache = NULL;
}
path_cache = path;
- path_cache->connect("tree_exited", this, "_path_exited");
- path_cache->connect("curve_changed", this, "_path_changed");
+ path_cache->connect("tree_exited", callable_mp(this, &CSGPolygon::_path_exited));
+ path_cache->connect("curve_changed", callable_mp(this, &CSGPolygon::_path_changed));
path_cache = NULL;
}
curve = path->get_curve();
@@ -1856,11 +1848,11 @@ CSGBrush *CSGPolygon::_build_brush() {
bool invert_val = is_inverting_faces();
Ref<Material> material = get_material();
- PoolVector<Vector3> faces;
- PoolVector<Vector2> uvs;
- PoolVector<bool> smooth;
- PoolVector<Ref<Material> > materials;
- PoolVector<bool> invert;
+ Vector<Vector3> faces;
+ Vector<Vector2> uvs;
+ Vector<bool> smooth;
+ Vector<Ref<Material> > materials;
+ Vector<bool> invert;
faces.resize(face_count * 3);
uvs.resize(face_count * 3);
@@ -1872,11 +1864,11 @@ CSGBrush *CSGPolygon::_build_brush() {
AABB aabb; //must be computed
{
- PoolVector<Vector3>::Write facesw = faces.write();
- PoolVector<Vector2>::Write uvsw = uvs.write();
- PoolVector<bool>::Write smoothw = smooth.write();
- PoolVector<Ref<Material> >::Write materialsw = materials.write();
- PoolVector<bool>::Write invertw = invert.write();
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
int face = 0;
@@ -2242,8 +2234,8 @@ CSGBrush *CSGPolygon::_build_brush() {
void CSGPolygon::_notification(int p_what) {
if (p_what == NOTIFICATION_EXIT_TREE) {
if (path_cache) {
- path_cache->disconnect("tree_exited", this, "_path_exited");
- path_cache->disconnect("curve_changed", this, "_path_changed");
+ path_cache->disconnect("tree_exited", callable_mp(this, &CSGPolygon::_path_exited));
+ path_cache->disconnect("curve_changed", callable_mp(this, &CSGPolygon::_path_changed));
path_cache = NULL;
}
}
@@ -2315,16 +2307,13 @@ void CSGPolygon::_bind_methods() {
ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CSGPolygon::_is_editable_3d_polygon);
ClassDB::bind_method(D_METHOD("_has_editable_3d_polygon_no_depth"), &CSGPolygon::_has_editable_3d_polygon_no_depth);
- ClassDB::bind_method(D_METHOD("_path_exited"), &CSGPolygon::_path_exited);
- ClassDB::bind_method(D_METHOD("_path_changed"), &CSGPolygon::_path_changed);
-
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Depth,Spin,Path"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
ADD_PROPERTY(PropertyInfo(Variant::INT, "spin_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_spin_sides", "get_spin_sides");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path"), "set_path_node", "get_path_node");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "path_rotation", PROPERTY_HINT_ENUM, "Polygon,Path,PathFollow"), "set_path_rotation", "get_path_rotation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_local"), "set_path_local", "is_path_local");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_continuous_u"), "set_path_continuous_u", "is_path_continuous_u");
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 1098feea51..909437e39b 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -80,17 +80,17 @@ private:
};
struct ShapeUpdateSurface {
- PoolVector<Vector3> vertices;
- PoolVector<Vector3> normals;
- PoolVector<Vector2> uvs;
- PoolVector<float> tans;
+ Vector<Vector3> vertices;
+ Vector<Vector3> normals;
+ Vector<Vector2> uvs;
+ Vector<float> tans;
Ref<Material> material;
int last_added;
- PoolVector<Vector3>::Write verticesw;
- PoolVector<Vector3>::Write normalsw;
- PoolVector<Vector2>::Write uvsw;
- PoolVector<float>::Write tansw;
+ Vector3 *verticesw;
+ Vector3 *normalsw;
+ Vector2 *uvsw;
+ float *tansw;
};
//mikktspace callbacks
@@ -122,10 +122,10 @@ public:
void set_operation(Operation p_operation);
Operation get_operation() const;
- virtual PoolVector<Vector3> get_brush_faces();
+ virtual Vector<Vector3> get_brush_faces();
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
void set_use_collision(bool p_enable);
bool is_using_collision() const;
@@ -172,7 +172,7 @@ private:
bool invert_faces;
protected:
- CSGBrush *_create_brush_from_arrays(const PoolVector<Vector3> &p_vertices, const PoolVector<Vector2> &p_uv, const PoolVector<bool> &p_smooth, const PoolVector<Ref<Material> > &p_materials);
+ CSGBrush *_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material> > &p_materials);
static void _bind_methods();
public:
diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml
index 64ae46c69a..02b2e8b03f 100644
--- a/modules/csg/doc_classes/CSGPolygon.xml
+++ b/modules/csg/doc_classes/CSGPolygon.xml
@@ -38,7 +38,7 @@
<member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon.PathRotation">
The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH].
</member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )">
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )">
Point array that defines the shape that we'll extrude.
</member>
<member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="false">
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp
index 4d762b7a7b..9dbaa88202 100644
--- a/modules/cvtt/image_compress_cvtt.cpp
+++ b/modules/cvtt/image_compress_cvtt.cpp
@@ -179,7 +179,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
p_image->convert(Image::FORMAT_RGBH);
}
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
+ const uint8_t *rb = p_image->get_data().ptr();
const uint16_t *source_data = reinterpret_cast<const uint16_t *>(&rb[0]);
int pixel_element_count = w * h * 3;
@@ -195,15 +195,15 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
p_image->convert(Image::FORMAT_RGBA8); //still uses RGBA to convert
}
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
+ const uint8_t *rb = p_image->get_data().ptr();
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0;
data.resize(target_size);
int shift = Image::get_format_pixel_rshift(target_format);
- PoolVector<uint8_t>::Write wb = data.write();
+ uint8_t *wb = data.ptrw();
int dst_ofs = 0;
@@ -219,7 +219,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
int num_job_threads = OS::get_singleton()->can_use_threads() ? (OS::get_singleton()->get_processor_count() - 1) : 0;
#endif
- PoolVector<CVTTCompressionRowTask> tasks;
+ Vector<CVTTCompressionRowTask> tasks;
for (int i = 0; i <= mm_count; i++) {
@@ -254,12 +254,12 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
}
if (num_job_threads > 0) {
- PoolVector<Thread *> threads;
+ Vector<Thread *> threads;
threads.resize(num_job_threads);
- PoolVector<Thread *>::Write threads_wb = threads.write();
+ Thread **threads_wb = threads.ptrw();
- PoolVector<CVTTCompressionRowTask>::Read tasks_rb = tasks.read();
+ const CVTTCompressionRowTask *tasks_rb = tasks.ptr();
job_queue.job_tasks = &tasks_rb[0];
job_queue.current_task = 0;
@@ -304,14 +304,14 @@ void image_decompress_cvtt(Image *p_image) {
int w = p_image->get_width();
int h = p_image->get_height();
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
+ const uint8_t *rb = p_image->get_data().ptr();
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->get_mipmap_count();
data.resize(target_size);
- PoolVector<uint8_t>::Write wb = data.write();
+ uint8_t *wb = data.ptrw();
int bytes_per_pixel = is_hdr ? 6 : 4;
@@ -388,8 +388,5 @@ void image_decompress_cvtt(Image *p_image) {
h >>= 1;
}
- rb.release();
- wb.release();
-
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 5494744c48..ae21156b8b 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -94,7 +94,7 @@ static const DDSFormatInfo dds_format_info[DDS_MAX] = {
{ "GRAYSCALE_ALPHA", false, false, 1, 2, Image::FORMAT_LA8 }
};
-RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_CANT_OPEN;
@@ -222,7 +222,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
if (!(flags & DDSD_MIPMAPCOUNT))
mipmaps = 1;
- PoolVector<uint8_t> src_data;
+ Vector<uint8_t> src_data;
const DDSFormatInfo &info = dds_format_info[dds_format];
uint32_t w = width;
@@ -245,8 +245,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
}
src_data.resize(size);
- PoolVector<uint8_t>::Write wb = src_data.write();
- f->get_buffer(wb.ptr(), size);
+ uint8_t *wb = src_data.ptrw();
+ f->get_buffer(wb, size);
} else if (info.palette) {
@@ -278,8 +278,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
}
src_data.resize(size + 256 * colsize);
- PoolVector<uint8_t>::Write wb = src_data.write();
- f->get_buffer(wb.ptr(), size);
+ uint8_t *wb = src_data.ptrw();
+ f->get_buffer(wb, size);
for (int i = 0; i < 256; i++) {
@@ -309,8 +309,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
size = size * 2;
src_data.resize(size);
- PoolVector<uint8_t>::Write wb = src_data.write();
- f->get_buffer(wb.ptr(), size);
+ uint8_t *wb = src_data.ptrw();
+ f->get_buffer(wb, size);
switch (dds_format) {
diff --git a/modules/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h
index 34f4e9b548..de8088af90 100644
--- a/modules/dds/texture_loader_dds.h
+++ b/modules/dds/texture_loader_dds.h
@@ -36,7 +36,7 @@
class ResourceFormatDDS : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 76b3710e96..456bf649d2 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -104,6 +104,24 @@
The IP used when creating a server. This is set to the wildcard [code]"*"[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]"192.168.1.1"[/code].
</description>
</method>
+ <method name="set_dtls_certificate">
+ <return type="void">
+ </return>
+ <argument index="0" name="certificate" type="X509Certificate">
+ </argument>
+ <description>
+ Configure the [X509Certificate] to use when [member use_dtls] is [code]true[/code]. For servers, you must also setup the [CryptoKey] via [method set_dtls_key].
+ </description>
+ </method>
+ <method name="set_dtls_key">
+ <return type="void">
+ </return>
+ <argument index="0" name="key" type="CryptoKey">
+ </argument>
+ <description>
+ Configure the [CryptoKey] to use when [member use_dtls] is [code]true[/code]. Remember to also call [method set_dtls_certificate] to setup your [X509Certificate].
+ </description>
+ </method>
</methods>
<members>
<member name="always_ordered" type="bool" setter="set_always_ordered" getter="is_always_ordered" default="false">
@@ -115,6 +133,9 @@
<member name="compression_mode" type="int" setter="set_compression_mode" getter="get_compression_mode" enum="NetworkedMultiplayerENet.CompressionMode" default="0">
The compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all.
</member>
+ <member name="dtls_verify" type="bool" setter="set_dtls_verify_enabled" getter="is_dtls_verify_enabled" default="true">
+ Enable or disable certiticate verification when [member use_dtls] [code]true[/code].
+ </member>
<member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" override="true" default="false" />
<member name="server_relay" type="bool" setter="set_server_relay_enabled" getter="is_server_relay_enabled" default="true">
Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is [code]false[/code], clients won't be automatically notified of other peers and won't be able to send them packets through the server.
@@ -123,6 +144,10 @@
Set the default channel to be used to transfer data. By default, this value is [code]-1[/code] which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel [code]0[/code] is reserved, and cannot be used. Setting this member to any value between [code]0[/code] and [member channel_count] (excluded) will force ENet to use that channel for sending data.
</member>
<member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="NetworkedMultiplayerPeer.TransferMode" default="2" />
+ <member name="use_dtls" type="bool" setter="set_dtls_enabled" getter="is_dtls_enabled" default="false">
+ When enabled, the client or server created by this peer, will use [PacketPeerDTLS] instead of raw UDP sockets for communicating with the remote peer. This will make the communication encrypted with DTLS at the cost of higher resource usage and potentially larger packet size.
+ Note: When creating a DTLS server, make sure you setup the key/certificate pair via [method set_dtls_key] and [method set_dtls_certificate]. For DTLS clients, have a look at the [member dtls_verify] option, and configure the certificate accordingly via [method set_dtls_certificate].
+ </member>
</members>
<constants>
<constant name="COMPRESS_NONE" value="0" enum="CompressionMode">
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index ca134824f7..406eb467f0 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -78,6 +78,7 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int
ERR_FAIL_COND_V_MSG(p_max_clients < 1 || p_max_clients > 4095, ERR_INVALID_PARAMETER, "The number of clients must be set between 1 and 4095 (inclusive).");
ERR_FAIL_COND_V_MSG(p_in_bandwidth < 0, ERR_INVALID_PARAMETER, "The incoming bandwidth limit must be greater than or equal to 0 (0 disables the limit).");
ERR_FAIL_COND_V_MSG(p_out_bandwidth < 0, ERR_INVALID_PARAMETER, "The outgoing bandwidth limit must be greater than or equal to 0 (0 disables the limit).");
+ ERR_FAIL_COND_V(dtls_enabled && (dtls_key.is_null() || dtls_cert.is_null()), ERR_INVALID_PARAMETER);
ENetAddress address;
memset(&address, 0, sizeof(address));
@@ -105,6 +106,11 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int
p_out_bandwidth /* limit outgoing bandwidth if > 0 */);
ERR_FAIL_COND_V_MSG(!host, ERR_CANT_CREATE, "Couldn't create an ENet multiplayer server.");
+#ifdef GODOT_ENET
+ if (dtls_enabled) {
+ enet_host_dtls_server_setup(host, dtls_key.ptr(), dtls_cert.ptr());
+ }
+#endif
_setup_compressor();
active = true;
@@ -156,6 +162,11 @@ Error NetworkedMultiplayerENet::create_client(const String &p_address, int p_por
}
ERR_FAIL_COND_V_MSG(!host, ERR_CANT_CREATE, "Couldn't create the ENet client host.");
+#ifdef GODOT_ENET
+ if (dtls_enabled) {
+ enet_host_dtls_client_setup(host, dtls_cert.ptr(), dtls_verify, p_address.utf8().get_data());
+ }
+#endif
_setup_compressor();
@@ -856,6 +867,12 @@ void NetworkedMultiplayerENet::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_compression_mode", "mode"), &NetworkedMultiplayerENet::set_compression_mode);
ClassDB::bind_method(D_METHOD("get_compression_mode"), &NetworkedMultiplayerENet::get_compression_mode);
ClassDB::bind_method(D_METHOD("set_bind_ip", "ip"), &NetworkedMultiplayerENet::set_bind_ip);
+ ClassDB::bind_method(D_METHOD("set_dtls_enabled", "enabled"), &NetworkedMultiplayerENet::set_dtls_enabled);
+ ClassDB::bind_method(D_METHOD("is_dtls_enabled"), &NetworkedMultiplayerENet::is_dtls_enabled);
+ ClassDB::bind_method(D_METHOD("set_dtls_key", "key"), &NetworkedMultiplayerENet::set_dtls_key);
+ ClassDB::bind_method(D_METHOD("set_dtls_certificate", "certificate"), &NetworkedMultiplayerENet::set_dtls_certificate);
+ ClassDB::bind_method(D_METHOD("set_dtls_verify_enabled", "enabled"), &NetworkedMultiplayerENet::set_dtls_verify_enabled);
+ ClassDB::bind_method(D_METHOD("is_dtls_verify_enabled"), &NetworkedMultiplayerENet::is_dtls_verify_enabled);
ClassDB::bind_method(D_METHOD("get_peer_address", "id"), &NetworkedMultiplayerENet::get_peer_address);
ClassDB::bind_method(D_METHOD("get_peer_port", "id"), &NetworkedMultiplayerENet::get_peer_port);
@@ -875,6 +892,8 @@ void NetworkedMultiplayerENet::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "channel_count"), "set_channel_count", "get_channel_count");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "always_ordered"), "set_always_ordered", "is_always_ordered");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "server_relay"), "set_server_relay_enabled", "is_server_relay_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dtls_verify"), "set_dtls_verify_enabled", "is_dtls_verify_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_dtls"), "set_dtls_enabled", "is_dtls_enabled");
BIND_ENUM_CONSTANT(COMPRESS_NONE);
BIND_ENUM_CONSTANT(COMPRESS_RANGE_CODER);
@@ -904,6 +923,9 @@ NetworkedMultiplayerENet::NetworkedMultiplayerENet() {
enet_compressor.destroy = enet_compressor_destroy;
bind_ip = IP_Address("*");
+
+ dtls_enabled = false;
+ dtls_verify = true;
}
NetworkedMultiplayerENet::~NetworkedMultiplayerENet() {
@@ -920,3 +942,31 @@ void NetworkedMultiplayerENet::set_bind_ip(const IP_Address &p_ip) {
bind_ip = p_ip;
}
+
+void NetworkedMultiplayerENet::set_dtls_enabled(bool p_enabled) {
+ ERR_FAIL_COND(active);
+ dtls_enabled = p_enabled;
+}
+
+bool NetworkedMultiplayerENet::is_dtls_enabled() const {
+ return dtls_enabled;
+}
+
+void NetworkedMultiplayerENet::set_dtls_verify_enabled(bool p_enabled) {
+ ERR_FAIL_COND(active);
+ dtls_verify = p_enabled;
+}
+
+bool NetworkedMultiplayerENet::is_dtls_verify_enabled() const {
+ return dtls_verify;
+}
+
+void NetworkedMultiplayerENet::set_dtls_key(Ref<CryptoKey> p_key) {
+ ERR_FAIL_COND(active);
+ dtls_key = p_key;
+}
+
+void NetworkedMultiplayerENet::set_dtls_certificate(Ref<X509Certificate> p_cert) {
+ ERR_FAIL_COND(active);
+ dtls_cert = p_cert;
+}
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index 11487b99a5..ff436ce2c0 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -31,6 +31,7 @@
#ifndef NETWORKED_MULTIPLAYER_ENET_H
#define NETWORKED_MULTIPLAYER_ENET_H
+#include "core/crypto/crypto.h"
#include "core/io/compression.h"
#include "core/io/networked_multiplayer_peer.h"
@@ -111,6 +112,11 @@ private:
IP_Address bind_ip;
+ bool dtls_enabled;
+ Ref<CryptoKey> dtls_key;
+ Ref<X509Certificate> dtls_cert;
+ bool dtls_verify;
+
protected:
static void _bind_methods();
@@ -166,6 +172,12 @@ public:
~NetworkedMultiplayerENet();
void set_bind_ip(const IP_Address &p_ip);
+ void set_dtls_enabled(bool p_enabled);
+ bool is_dtls_enabled() const;
+ void set_dtls_verify_enabled(bool p_enabled);
+ bool is_dtls_verify_enabled() const;
+ void set_dtls_key(Ref<CryptoKey> p_key);
+ void set_dtls_certificate(Ref<X509Certificate> p_cert);
};
VARIANT_ENUM_CAST(NetworkedMultiplayerENet::CompressionMode);
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp
index 24ee8e458e..b3f7b1d94f 100644
--- a/modules/etc/image_etc.cpp
+++ b/modules/etc/image_etc.cpp
@@ -106,9 +106,15 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
// If VRAM compression is using ETC, but image has alpha, convert to RGBA4444 or LA8
// This saves space while maintaining the alpha channel
if (detected_channels == Image::USED_CHANNELS_RGBA) {
+
+ if (p_img->has_mipmaps()) {
+ // Image doesn't support mipmaps with RGBA4444 textures
+ p_img->clear_mipmaps();
+ }
p_img->convert(Image::FORMAT_RGBA4444);
return;
} else if (detected_channels == Image::USE_CHANNELS_LA) {
+
p_img->convert(Image::FORMAT_LA8);
return;
}
@@ -143,16 +149,16 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
}
}
- PoolVector<uint8_t>::Read r = img->get_data().read();
- ERR_FAIL_COND(!r.ptr());
+ const uint8_t *r = img->get_data().ptr();
+ ERR_FAIL_COND(!r);
unsigned int target_size = Image::get_image_data_size(imgw, imgh, etc_format, p_img->has_mipmaps());
int mmc = 1 + (p_img->has_mipmaps() ? Image::get_image_required_mipmaps(imgw, imgh, etc_format) : 0);
- PoolVector<uint8_t> dst_data;
+ Vector<uint8_t> dst_data;
dst_data.resize(target_size);
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
// prepare parameters to be passed to etc2comp
int num_cpus = OS::get_singleton()->get_processor_count();
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index facdc2e473..ad0cc91c96 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -42,7 +42,7 @@ struct ETC1Header {
uint16_t origHeight;
};
-RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_CANT_OPEN;
@@ -71,13 +71,12 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
h.origWidth = f->get_16();
h.origHeight = f->get_16();
- PoolVector<uint8_t> src_data;
+ Vector<uint8_t> src_data;
uint32_t size = h.texWidth * h.texHeight / 2;
src_data.resize(size);
- PoolVector<uint8_t>::Write wb = src_data.write();
- f->get_buffer(wb.ptr(), size);
- wb.release();
+ uint8_t *wb = src_data.ptrw();
+ f->get_buffer(wb, size);
int mipmaps = h.format;
int width = h.origWidth;
diff --git a/modules/etc/texture_loader_pkm.h b/modules/etc/texture_loader_pkm.h
index 3d52a9ea95..d6011993e3 100644
--- a/modules/etc/texture_loader_pkm.h
+++ b/modules/etc/texture_loader_pkm.h
@@ -36,7 +36,7 @@
class ResourceFormatPKM : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h
index 1077bef994..e38eb435c6 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.h
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.h
@@ -75,8 +75,8 @@ public:
virtual bool is_stereo();
virtual Transform get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform);
- // we expose a PoolVector<float> version of this function to GDNative
- PoolVector<float> _get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far);
+ // we expose a Vector<float> version of this function to GDNative
+ Vector<float> _get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far);
// and a CameraMatrix version to ARVRServer
virtual CameraMatrix get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far);
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index b4b63bf04a..44d9e32ed8 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -10,9 +10,9 @@
<method name="call_native">
<return type="Variant">
</return>
- <argument index="0" name="calling_type" type="String">
+ <argument index="0" name="calling_type" type="StringName">
</argument>
- <argument index="1" name="procedure_name" type="String">
+ <argument index="1" name="procedure_name" type="StringName">
</argument>
<argument index="2" name="arguments" type="Array">
</argument>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index 820f126dd1..601e132d42 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="get_current_dependencies" qualifiers="const">
- <return type="PoolStringArray">
+ <return type="PackedStringArray">
</return>
<description>
Returns paths to all dependency libraries for the current platform and architecture.
diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml
index b21d16a6fd..f2e9cac6dc 100644
--- a/modules/gdnative/doc_classes/NativeScript.xml
+++ b/modules/gdnative/doc_classes/NativeScript.xml
@@ -17,7 +17,7 @@
<method name="get_method_documentation" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="method" type="String">
+ <argument index="0" name="method" type="StringName">
</argument>
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_method_documentation[/code].
@@ -26,7 +26,7 @@
<method name="get_property_documentation" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="path" type="String">
+ <argument index="0" name="path" type="StringName">
</argument>
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_property_documentation[/code].
@@ -35,7 +35,7 @@
<method name="get_signal_documentation" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="signal_name" type="String">
+ <argument index="0" name="signal_name" type="StringName">
</argument>
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_signal_documentation[/code].
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 1571b821a5..33b734f672 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -493,7 +493,7 @@ Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle, bool p_
return result;
}
-RES GDNativeLibraryResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES GDNativeLibraryResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
Ref<GDNativeLibrary> lib;
lib.instance();
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index c0c2cdf24c..b4c5ec9d00 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -166,7 +166,7 @@ public:
class GDNativeLibraryResourceLoader : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path, Error *r_error);
+ virtual RES load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp
index 4a0308edec..0c764ab8fd 100644
--- a/modules/gdnative/gdnative/array.cpp
+++ b/modules/gdnative/gdnative/array.cpp
@@ -34,7 +34,6 @@
#include "core/os/memory.h"
#include "core/color.h"
-#include "core/pool_vector.h"
#include "core/variant.h"
@@ -53,9 +52,9 @@ void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src) {
memnew_placement(dest, Array(*src));
}
-void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_pool_color_array *p_pca) {
+void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca) {
Array *dest = (Array *)r_dest;
- PoolVector<Color> *pca = (PoolVector<Color> *)p_pca;
+ Vector<Color> *pca = (Vector<Color> *)p_pca;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -65,9 +64,9 @@ void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_poo
}
}
-void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_pool_vector3_array *p_pv3a) {
+void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a) {
Array *dest = (Array *)r_dest;
- PoolVector<Vector3> *pca = (PoolVector<Vector3> *)p_pv3a;
+ Vector<Vector3> *pca = (Vector<Vector3> *)p_pv3a;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -77,9 +76,9 @@ void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_p
}
}
-void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_pool_vector2_array *p_pv2a) {
+void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a) {
Array *dest = (Array *)r_dest;
- PoolVector<Vector2> *pca = (PoolVector<Vector2> *)p_pv2a;
+ Vector<Vector2> *pca = (Vector<Vector2> *)p_pv2a;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -89,9 +88,9 @@ void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_p
}
}
-void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_pool_string_array *p_psa) {
+void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa) {
Array *dest = (Array *)r_dest;
- PoolVector<String> *pca = (PoolVector<String> *)p_psa;
+ Vector<String> *pca = (Vector<String> *)p_psa;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -101,9 +100,9 @@ void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_po
}
}
-void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool_real_array *p_pra) {
+void GDAPI godot_array_new_packed_real_array(godot_array *r_dest, const godot_packed_real_array *p_pra) {
Array *dest = (Array *)r_dest;
- PoolVector<godot_real> *pca = (PoolVector<godot_real> *)p_pra;
+ Vector<godot_real> *pca = (Vector<godot_real> *)p_pra;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -113,9 +112,9 @@ void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool
}
}
-void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_int_array *p_pia) {
+void GDAPI godot_array_new_packed_int_array(godot_array *r_dest, const godot_packed_int_array *p_pia) {
Array *dest = (Array *)r_dest;
- PoolVector<godot_int> *pca = (PoolVector<godot_int> *)p_pia;
+ Vector<godot_int> *pca = (Vector<godot_int> *)p_pia;
memnew_placement(dest, Array);
dest->resize(pca->size());
@@ -125,9 +124,9 @@ void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_
}
}
-void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool_byte_array *p_pba) {
+void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba) {
Array *dest = (Array *)r_dest;
- PoolVector<uint8_t> *pca = (PoolVector<uint8_t> *)p_pba;
+ Vector<uint8_t> *pca = (Vector<uint8_t> *)p_pba;
memnew_placement(dest, Array);
dest->resize(pca->size());
diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp
index 018a613724..d996b006a5 100644
--- a/modules/gdnative/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative/gdnative.cpp
@@ -79,7 +79,7 @@ godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, god
Variant *ret_val = (Variant *)&ret;
- Variant::CallError r_error;
+ Callable::CallError r_error;
*ret_val = mb->call(o, args, p_arg_count, r_error);
if (p_call_error) {
diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp
index bae1290d59..589b4d4dfe 100644
--- a/modules/gdnative/gdnative/pool_arrays.cpp
+++ b/modules/gdnative/gdnative/pool_arrays.cpp
@@ -31,7 +31,7 @@
#include "gdnative/pool_arrays.h"
#include "core/array.h"
-#include "core/pool_vector.h"
+
#include "core/variant.h"
#include "core/color.h"
@@ -46,21 +46,21 @@ extern "C" {
// byte
-void GDAPI godot_pool_byte_array_new(godot_pool_byte_array *r_dest) {
- PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest;
- memnew_placement(dest, PoolVector<uint8_t>);
+void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest) {
+ Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
+ memnew_placement(dest, Vector<uint8_t>);
}
-void GDAPI godot_pool_byte_array_new_copy(godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src) {
- PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest;
- const PoolVector<uint8_t> *src = (const PoolVector<uint8_t> *)p_src;
- memnew_placement(dest, PoolVector<uint8_t>(*src));
+void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src) {
+ Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
+ const Vector<uint8_t> *src = (const Vector<uint8_t> *)p_src;
+ memnew_placement(dest, Vector<uint8_t>(*src));
}
-void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, const godot_array *p_a) {
- PoolVector<uint8_t> *dest = (PoolVector<uint8_t> *)r_dest;
+void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a) {
+ Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<uint8_t>);
+ memnew_placement(dest, Vector<uint8_t>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -68,93 +68,83 @@ void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, c
}
}
-void GDAPI godot_pool_byte_array_append(godot_pool_byte_array *p_self, const uint8_t p_data) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
- self->append(p_data);
+void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
+ self->push_back(p_data);
}
-void GDAPI godot_pool_byte_array_append_array(godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
- PoolVector<uint8_t> *array = (PoolVector<uint8_t> *)p_array;
+void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
+ Vector<uint8_t> *array = (Vector<uint8_t> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_byte_array_insert(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
return (godot_error)self->insert(p_idx, p_data);
}
-void GDAPI godot_pool_byte_array_invert(godot_pool_byte_array *p_self) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
self->invert();
}
-void GDAPI godot_pool_byte_array_push_back(godot_pool_byte_array *p_self, const uint8_t p_data) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
self->push_back(p_data);
}
-void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_self, const godot_int p_idx) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_self, const godot_int p_size) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
self->resize(p_size);
}
-godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read(const godot_pool_byte_array *p_self) {
- const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self;
- return (godot_pool_byte_array_read_access *)memnew(PoolVector<uint8_t>::Read(self->read()));
-}
-
-godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write(godot_pool_byte_array *p_self) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
- return (godot_pool_byte_array_write_access *)memnew(PoolVector<uint8_t>::Write(self->write()));
-}
-
-void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
- PoolVector<uint8_t> *self = (PoolVector<uint8_t> *)p_self;
+void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
+ Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
self->set(p_idx, p_data);
}
-uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, const godot_int p_idx) {
- const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self;
+uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx) {
+ const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
return self->get(p_idx);
}
-godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_self) {
- const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self;
+godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self) {
+ const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_byte_array_empty(const godot_pool_byte_array *p_self) {
- const PoolVector<uint8_t> *self = (const PoolVector<uint8_t> *)p_self;
+godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self) {
+ const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self) {
- ((PoolVector<uint8_t> *)p_self)->~PoolVector();
+void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) {
+ ((Vector<uint8_t> *)p_self)->~Vector();
}
// int
-void GDAPI godot_pool_int_array_new(godot_pool_int_array *r_dest) {
- PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest;
- memnew_placement(dest, PoolVector<godot_int>);
+void GDAPI godot_packed_int_array_new(godot_packed_int_array *r_dest) {
+ Vector<godot_int> *dest = (Vector<godot_int> *)r_dest;
+ memnew_placement(dest, Vector<godot_int>);
}
-void GDAPI godot_pool_int_array_new_copy(godot_pool_int_array *r_dest, const godot_pool_int_array *p_src) {
- PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest;
- const PoolVector<godot_int> *src = (const PoolVector<godot_int> *)p_src;
- memnew_placement(dest, PoolVector<godot_int>(*src));
+void GDAPI godot_packed_int_array_new_copy(godot_packed_int_array *r_dest, const godot_packed_int_array *p_src) {
+ Vector<godot_int> *dest = (Vector<godot_int> *)r_dest;
+ const Vector<godot_int> *src = (const Vector<godot_int> *)p_src;
+ memnew_placement(dest, Vector<godot_int>(*src));
}
-void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, const godot_array *p_a) {
- PoolVector<godot_int> *dest = (PoolVector<godot_int> *)r_dest;
+void GDAPI godot_packed_int_array_new_with_array(godot_packed_int_array *r_dest, const godot_array *p_a) {
+ Vector<godot_int> *dest = (Vector<godot_int> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<godot_int>);
+ memnew_placement(dest, Vector<godot_int>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -162,93 +152,83 @@ void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, con
}
}
-void GDAPI godot_pool_int_array_append(godot_pool_int_array *p_self, const godot_int p_data) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
- self->append(p_data);
+void GDAPI godot_packed_int_array_append(godot_packed_int_array *p_self, const godot_int p_data) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
+ self->push_back(p_data);
}
-void GDAPI godot_pool_int_array_append_array(godot_pool_int_array *p_self, const godot_pool_int_array *p_array) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
- PoolVector<godot_int> *array = (PoolVector<godot_int> *)p_array;
+void GDAPI godot_packed_int_array_append_array(godot_packed_int_array *p_self, const godot_packed_int_array *p_array) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
+ Vector<godot_int> *array = (Vector<godot_int> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_int_array_insert(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+godot_error GDAPI godot_packed_int_array_insert(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
return (godot_error)self->insert(p_idx, p_data);
}
-void GDAPI godot_pool_int_array_invert(godot_pool_int_array *p_self) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+void GDAPI godot_packed_int_array_invert(godot_packed_int_array *p_self) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
self->invert();
}
-void GDAPI godot_pool_int_array_push_back(godot_pool_int_array *p_self, const godot_int p_data) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+void GDAPI godot_packed_int_array_push_back(godot_packed_int_array *p_self, const godot_int p_data) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
self->push_back(p_data);
}
-void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_self, const godot_int p_idx) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+void GDAPI godot_packed_int_array_remove(godot_packed_int_array *p_self, const godot_int p_idx) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_self, const godot_int p_size) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+void GDAPI godot_packed_int_array_resize(godot_packed_int_array *p_self, const godot_int p_size) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
self->resize(p_size);
}
-godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read(const godot_pool_int_array *p_self) {
- const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self;
- return (godot_pool_int_array_read_access *)memnew(PoolVector<godot_int>::Read(self->read()));
-}
-
-godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write(godot_pool_int_array *p_self) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
- return (godot_pool_int_array_write_access *)memnew(PoolVector<godot_int>::Write(self->write()));
-}
-
-void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) {
- PoolVector<godot_int> *self = (PoolVector<godot_int> *)p_self;
+void GDAPI godot_packed_int_array_set(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data) {
+ Vector<godot_int> *self = (Vector<godot_int> *)p_self;
self->set(p_idx, p_data);
}
-godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, const godot_int p_idx) {
- const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self;
+godot_int GDAPI godot_packed_int_array_get(const godot_packed_int_array *p_self, const godot_int p_idx) {
+ const Vector<godot_int> *self = (const Vector<godot_int> *)p_self;
return self->get(p_idx);
}
-godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_self) {
- const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self;
+godot_int GDAPI godot_packed_int_array_size(const godot_packed_int_array *p_self) {
+ const Vector<godot_int> *self = (const Vector<godot_int> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_int_array_empty(const godot_pool_int_array *p_self) {
- const PoolVector<godot_int> *self = (const PoolVector<godot_int> *)p_self;
+godot_bool GDAPI godot_packed_int_array_empty(const godot_packed_int_array *p_self) {
+ const Vector<godot_int> *self = (const Vector<godot_int> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self) {
- ((PoolVector<godot_int> *)p_self)->~PoolVector();
+void GDAPI godot_packed_int_array_destroy(godot_packed_int_array *p_self) {
+ ((Vector<godot_int> *)p_self)->~Vector();
}
// real
-void GDAPI godot_pool_real_array_new(godot_pool_real_array *r_dest) {
- PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest;
- memnew_placement(dest, PoolVector<godot_real>);
+void GDAPI godot_packed_real_array_new(godot_packed_real_array *r_dest) {
+ Vector<godot_real> *dest = (Vector<godot_real> *)r_dest;
+ memnew_placement(dest, Vector<godot_real>);
}
-void GDAPI godot_pool_real_array_new_copy(godot_pool_real_array *r_dest, const godot_pool_real_array *p_src) {
- PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest;
- const PoolVector<godot_real> *src = (const PoolVector<godot_real> *)p_src;
- memnew_placement(dest, PoolVector<godot_real>(*src));
+void GDAPI godot_packed_real_array_new_copy(godot_packed_real_array *r_dest, const godot_packed_real_array *p_src) {
+ Vector<godot_real> *dest = (Vector<godot_real> *)r_dest;
+ const Vector<godot_real> *src = (const Vector<godot_real> *)p_src;
+ memnew_placement(dest, Vector<godot_real>(*src));
}
-void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, const godot_array *p_a) {
- PoolVector<godot_real> *dest = (PoolVector<godot_real> *)r_dest;
+void GDAPI godot_packed_real_array_new_with_array(godot_packed_real_array *r_dest, const godot_array *p_a) {
+ Vector<godot_real> *dest = (Vector<godot_real> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<godot_real>);
+ memnew_placement(dest, Vector<godot_real>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -256,93 +236,83 @@ void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, c
}
}
-void GDAPI godot_pool_real_array_append(godot_pool_real_array *p_self, const godot_real p_data) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
- self->append(p_data);
+void GDAPI godot_packed_real_array_append(godot_packed_real_array *p_self, const godot_real p_data) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
+ self->push_back(p_data);
}
-void GDAPI godot_pool_real_array_append_array(godot_pool_real_array *p_self, const godot_pool_real_array *p_array) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
- PoolVector<godot_real> *array = (PoolVector<godot_real> *)p_array;
+void GDAPI godot_packed_real_array_append_array(godot_packed_real_array *p_self, const godot_packed_real_array *p_array) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
+ Vector<godot_real> *array = (Vector<godot_real> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_real_array_insert(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+godot_error GDAPI godot_packed_real_array_insert(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
return (godot_error)self->insert(p_idx, p_data);
}
-void GDAPI godot_pool_real_array_invert(godot_pool_real_array *p_self) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+void GDAPI godot_packed_real_array_invert(godot_packed_real_array *p_self) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
self->invert();
}
-void GDAPI godot_pool_real_array_push_back(godot_pool_real_array *p_self, const godot_real p_data) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+void GDAPI godot_packed_real_array_push_back(godot_packed_real_array *p_self, const godot_real p_data) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
self->push_back(p_data);
}
-void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_self, const godot_int p_idx) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+void GDAPI godot_packed_real_array_remove(godot_packed_real_array *p_self, const godot_int p_idx) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_self, const godot_int p_size) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+void GDAPI godot_packed_real_array_resize(godot_packed_real_array *p_self, const godot_int p_size) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
self->resize(p_size);
}
-godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read(const godot_pool_real_array *p_self) {
- const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self;
- return (godot_pool_real_array_read_access *)memnew(PoolVector<godot_real>::Read(self->read()));
-}
-
-godot_pool_int_array_write_access GDAPI *godot_pool_real_array_write(godot_pool_real_array *p_self) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
- return (godot_pool_real_array_write_access *)memnew(PoolVector<godot_real>::Write(self->write()));
-}
-
-void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) {
- PoolVector<godot_real> *self = (PoolVector<godot_real> *)p_self;
+void GDAPI godot_packed_real_array_set(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data) {
+ Vector<godot_real> *self = (Vector<godot_real> *)p_self;
self->set(p_idx, p_data);
}
-godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self, const godot_int p_idx) {
- const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self;
+godot_real GDAPI godot_packed_real_array_get(const godot_packed_real_array *p_self, const godot_int p_idx) {
+ const Vector<godot_real> *self = (const Vector<godot_real> *)p_self;
return self->get(p_idx);
}
-godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_self) {
- const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self;
+godot_int GDAPI godot_packed_real_array_size(const godot_packed_real_array *p_self) {
+ const Vector<godot_real> *self = (const Vector<godot_real> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_real_array_empty(const godot_pool_real_array *p_self) {
- const PoolVector<godot_real> *self = (const PoolVector<godot_real> *)p_self;
+godot_bool GDAPI godot_packed_real_array_empty(const godot_packed_real_array *p_self) {
+ const Vector<godot_real> *self = (const Vector<godot_real> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self) {
- ((PoolVector<godot_real> *)p_self)->~PoolVector();
+void GDAPI godot_packed_real_array_destroy(godot_packed_real_array *p_self) {
+ ((Vector<godot_real> *)p_self)->~Vector();
}
// string
-void GDAPI godot_pool_string_array_new(godot_pool_string_array *r_dest) {
- PoolVector<String> *dest = (PoolVector<String> *)r_dest;
- memnew_placement(dest, PoolVector<String>);
+void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest) {
+ Vector<String> *dest = (Vector<String> *)r_dest;
+ memnew_placement(dest, Vector<String>);
}
-void GDAPI godot_pool_string_array_new_copy(godot_pool_string_array *r_dest, const godot_pool_string_array *p_src) {
- PoolVector<String> *dest = (PoolVector<String> *)r_dest;
- const PoolVector<String> *src = (const PoolVector<String> *)p_src;
- memnew_placement(dest, PoolVector<String>(*src));
+void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src) {
+ Vector<String> *dest = (Vector<String> *)r_dest;
+ const Vector<String> *src = (const Vector<String> *)p_src;
+ memnew_placement(dest, Vector<String>(*src));
}
-void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_dest, const godot_array *p_a) {
- PoolVector<String> *dest = (PoolVector<String> *)r_dest;
+void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a) {
+ Vector<String> *dest = (Vector<String> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<String>);
+ memnew_placement(dest, Vector<String>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -350,63 +320,53 @@ void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_des
}
}
-void GDAPI godot_pool_string_array_append(godot_pool_string_array *p_self, const godot_string *p_data) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data) {
+ Vector<String> *self = (Vector<String> *)p_self;
String &s = *(String *)p_data;
- self->append(s);
+ self->push_back(s);
}
-void GDAPI godot_pool_string_array_append_array(godot_pool_string_array *p_self, const godot_pool_string_array *p_array) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
- PoolVector<String> *array = (PoolVector<String> *)p_array;
+void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array) {
+ Vector<String> *self = (Vector<String> *)p_self;
+ Vector<String> *array = (Vector<String> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
+ Vector<String> *self = (Vector<String> *)p_self;
String &s = *(String *)p_data;
return (godot_error)self->insert(p_idx, s);
}
-void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self) {
+ Vector<String> *self = (Vector<String> *)p_self;
self->invert();
}
-void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data) {
+ Vector<String> *self = (Vector<String> *)p_self;
String &s = *(String *)p_data;
self->push_back(s);
}
-void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx) {
+ Vector<String> *self = (Vector<String> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size) {
+ Vector<String> *self = (Vector<String> *)p_self;
self->resize(p_size);
}
-godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read(const godot_pool_string_array *p_self) {
- const PoolVector<String> *self = (const PoolVector<String> *)p_self;
- return (godot_pool_string_array_read_access *)memnew(PoolVector<String>::Read(self->read()));
-}
-
-godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write(godot_pool_string_array *p_self) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
- return (godot_pool_string_array_write_access *)memnew(PoolVector<String>::Write(self->write()));
-}
-
-void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
- PoolVector<String> *self = (PoolVector<String> *)p_self;
+void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
+ Vector<String> *self = (Vector<String> *)p_self;
String &s = *(String *)p_data;
self->set(p_idx, s);
}
-godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_self, const godot_int p_idx) {
- const PoolVector<String> *self = (const PoolVector<String> *)p_self;
+godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx) {
+ const Vector<String> *self = (const Vector<String> *)p_self;
godot_string str;
String *s = (String *)&str;
memnew_placement(s, String);
@@ -414,37 +374,37 @@ godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_
return str;
}
-godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_self) {
- const PoolVector<String> *self = (const PoolVector<String> *)p_self;
+godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self) {
+ const Vector<String> *self = (const Vector<String> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_string_array_empty(const godot_pool_string_array *p_self) {
- const PoolVector<String> *self = (const PoolVector<String> *)p_self;
+godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self) {
+ const Vector<String> *self = (const Vector<String> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self) {
- ((PoolVector<String> *)p_self)->~PoolVector();
+void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) {
+ ((Vector<String> *)p_self)->~Vector();
}
// vector2
-void GDAPI godot_pool_vector2_array_new(godot_pool_vector2_array *r_dest) {
- PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest;
- memnew_placement(dest, PoolVector<Vector2>);
+void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest) {
+ Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
+ memnew_placement(dest, Vector<Vector2>);
}
-void GDAPI godot_pool_vector2_array_new_copy(godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src) {
- PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest;
- const PoolVector<Vector2> *src = (const PoolVector<Vector2> *)p_src;
- memnew_placement(dest, PoolVector<Vector2>(*src));
+void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src) {
+ Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
+ const Vector<Vector2> *src = (const Vector<Vector2> *)p_src;
+ memnew_placement(dest, Vector<Vector2>(*src));
}
-void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_dest, const godot_array *p_a) {
- PoolVector<Vector2> *dest = (PoolVector<Vector2> *)r_dest;
+void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a) {
+ Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<Vector2>);
+ memnew_placement(dest, Vector<Vector2>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -452,100 +412,90 @@ void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_d
}
}
-void GDAPI godot_pool_vector2_array_append(godot_pool_vector2_array *p_self, const godot_vector2 *p_data) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
Vector2 &s = *(Vector2 *)p_data;
- self->append(s);
+ self->push_back(s);
}
-void GDAPI godot_pool_vector2_array_append_array(godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
- PoolVector<Vector2> *array = (PoolVector<Vector2> *)p_array;
+void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
+ Vector<Vector2> *array = (Vector<Vector2> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_vector2_array_insert(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
Vector2 &s = *(Vector2 *)p_data;
return (godot_error)self->insert(p_idx, s);
}
-void GDAPI godot_pool_vector2_array_invert(godot_pool_vector2_array *p_self) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
self->invert();
}
-void GDAPI godot_pool_vector2_array_push_back(godot_pool_vector2_array *p_self, const godot_vector2 *p_data) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
Vector2 &s = *(Vector2 *)p_data;
self->push_back(s);
}
-void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_self, const godot_int p_idx) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_self, const godot_int p_size) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
self->resize(p_size);
}
-godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read(const godot_pool_vector2_array *p_self) {
- const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self;
- return (godot_pool_vector2_array_read_access *)memnew(PoolVector<Vector2>::Read(self->read()));
-}
-
-godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write(godot_pool_vector2_array *p_self) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
- return (godot_pool_vector2_array_write_access *)memnew(PoolVector<Vector2>::Write(self->write()));
-}
-
-void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
- PoolVector<Vector2> *self = (PoolVector<Vector2> *)p_self;
+void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
+ Vector<Vector2> *self = (Vector<Vector2> *)p_self;
Vector2 &s = *(Vector2 *)p_data;
self->set(p_idx, s);
}
-godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_self, const godot_int p_idx) {
- const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self;
+godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx) {
+ const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
godot_vector2 v;
Vector2 *s = (Vector2 *)&v;
*s = self->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_self) {
- const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self;
+godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self) {
+ const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_vector2_array_empty(const godot_pool_vector2_array *p_self) {
- const PoolVector<Vector2> *self = (const PoolVector<Vector2> *)p_self;
+godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self) {
+ const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self) {
- ((PoolVector<Vector2> *)p_self)->~PoolVector();
+void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) {
+ ((Vector<Vector2> *)p_self)->~Vector();
}
// vector3
-void GDAPI godot_pool_vector3_array_new(godot_pool_vector3_array *r_dest) {
- PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest;
- memnew_placement(dest, PoolVector<Vector3>);
+void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest) {
+ Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
+ memnew_placement(dest, Vector<Vector3>);
}
-void GDAPI godot_pool_vector3_array_new_copy(godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src) {
- PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest;
- const PoolVector<Vector3> *src = (const PoolVector<Vector3> *)p_src;
- memnew_placement(dest, PoolVector<Vector3>(*src));
+void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src) {
+ Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
+ const Vector<Vector3> *src = (const Vector<Vector3> *)p_src;
+ memnew_placement(dest, Vector<Vector3>(*src));
}
-void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_dest, const godot_array *p_a) {
- PoolVector<Vector3> *dest = (PoolVector<Vector3> *)r_dest;
+void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a) {
+ Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<Vector3>);
+ memnew_placement(dest, Vector<Vector3>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -553,100 +503,90 @@ void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_d
}
}
-void GDAPI godot_pool_vector3_array_append(godot_pool_vector3_array *p_self, const godot_vector3 *p_data) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
Vector3 &s = *(Vector3 *)p_data;
- self->append(s);
+ self->push_back(s);
}
-void GDAPI godot_pool_vector3_array_append_array(godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
- PoolVector<Vector3> *array = (PoolVector<Vector3> *)p_array;
+void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
+ Vector<Vector3> *array = (Vector<Vector3> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_vector3_array_insert(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
Vector3 &s = *(Vector3 *)p_data;
return (godot_error)self->insert(p_idx, s);
}
-void GDAPI godot_pool_vector3_array_invert(godot_pool_vector3_array *p_self) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
self->invert();
}
-void GDAPI godot_pool_vector3_array_push_back(godot_pool_vector3_array *p_self, const godot_vector3 *p_data) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
Vector3 &s = *(Vector3 *)p_data;
self->push_back(s);
}
-void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_self, const godot_int p_idx) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_self, const godot_int p_size) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
self->resize(p_size);
}
-godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read(const godot_pool_vector3_array *p_self) {
- const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self;
- return (godot_pool_vector3_array_read_access *)memnew(PoolVector<Vector3>::Read(self->read()));
-}
-
-godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write(godot_pool_vector3_array *p_self) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
- return (godot_pool_vector3_array_write_access *)memnew(PoolVector<Vector3>::Write(self->write()));
-}
-
-void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
- PoolVector<Vector3> *self = (PoolVector<Vector3> *)p_self;
+void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
+ Vector<Vector3> *self = (Vector<Vector3> *)p_self;
Vector3 &s = *(Vector3 *)p_data;
self->set(p_idx, s);
}
-godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_self, const godot_int p_idx) {
- const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self;
+godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx) {
+ const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
godot_vector3 v;
Vector3 *s = (Vector3 *)&v;
*s = self->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_self) {
- const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self;
+godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self) {
+ const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_vector3_array_empty(const godot_pool_vector3_array *p_self) {
- const PoolVector<Vector3> *self = (const PoolVector<Vector3> *)p_self;
+godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self) {
+ const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self) {
- ((PoolVector<Vector3> *)p_self)->~PoolVector();
+void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) {
+ ((Vector<Vector3> *)p_self)->~Vector();
}
// color
-void GDAPI godot_pool_color_array_new(godot_pool_color_array *r_dest) {
- PoolVector<Color> *dest = (PoolVector<Color> *)r_dest;
- memnew_placement(dest, PoolVector<Color>);
+void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest) {
+ Vector<Color> *dest = (Vector<Color> *)r_dest;
+ memnew_placement(dest, Vector<Color>);
}
-void GDAPI godot_pool_color_array_new_copy(godot_pool_color_array *r_dest, const godot_pool_color_array *p_src) {
- PoolVector<Color> *dest = (PoolVector<Color> *)r_dest;
- const PoolVector<Color> *src = (const PoolVector<Color> *)p_src;
- memnew_placement(dest, PoolVector<Color>(*src));
+void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src) {
+ Vector<Color> *dest = (Vector<Color> *)r_dest;
+ const Vector<Color> *src = (const Vector<Color> *)p_src;
+ memnew_placement(dest, Vector<Color>(*src));
}
-void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, const godot_array *p_a) {
- PoolVector<Color> *dest = (PoolVector<Color> *)r_dest;
+void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a) {
+ Vector<Color> *dest = (Vector<Color> *)r_dest;
Array *a = (Array *)p_a;
- memnew_placement(dest, PoolVector<Color>);
+ memnew_placement(dest, Vector<Color>);
dest->resize(a->size());
for (int i = 0; i < a->size(); i++) {
@@ -654,327 +594,71 @@ void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest,
}
}
-void GDAPI godot_pool_color_array_append(godot_pool_color_array *p_self, const godot_color *p_data) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
Color &s = *(Color *)p_data;
- self->append(s);
+ self->push_back(s);
}
-void GDAPI godot_pool_color_array_append_array(godot_pool_color_array *p_self, const godot_pool_color_array *p_array) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
- PoolVector<Color> *array = (PoolVector<Color> *)p_array;
+void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
+ Vector<Color> *array = (Vector<Color> *)p_array;
self->append_array(*array);
}
-godot_error GDAPI godot_pool_color_array_insert(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
Color &s = *(Color *)p_data;
return (godot_error)self->insert(p_idx, s);
}
-void GDAPI godot_pool_color_array_invert(godot_pool_color_array *p_self) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
self->invert();
}
-void GDAPI godot_pool_color_array_push_back(godot_pool_color_array *p_self, const godot_color *p_data) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
Color &s = *(Color *)p_data;
self->push_back(s);
}
-void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_self, const godot_int p_idx) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
self->remove(p_idx);
}
-void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_self, const godot_int p_size) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
self->resize(p_size);
}
-godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read(const godot_pool_color_array *p_self) {
- const PoolVector<Color> *self = (const PoolVector<Color> *)p_self;
- return (godot_pool_color_array_read_access *)memnew(PoolVector<Color>::Read(self->read()));
-}
-
-godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write(godot_pool_color_array *p_self) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
- return (godot_pool_color_array_write_access *)memnew(PoolVector<Color>::Write(self->write()));
-}
-
-void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
- PoolVector<Color> *self = (PoolVector<Color> *)p_self;
+void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
+ Vector<Color> *self = (Vector<Color> *)p_self;
Color &s = *(Color *)p_data;
self->set(p_idx, s);
}
-godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_self, const godot_int p_idx) {
- const PoolVector<Color> *self = (const PoolVector<Color> *)p_self;
+godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx) {
+ const Vector<Color> *self = (const Vector<Color> *)p_self;
godot_color v;
Color *s = (Color *)&v;
*s = self->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self) {
- const PoolVector<Color> *self = (const PoolVector<Color> *)p_self;
+godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self) {
+ const Vector<Color> *self = (const Vector<Color> *)p_self;
return self->size();
}
-godot_bool GDAPI godot_pool_color_array_empty(const godot_pool_color_array *p_self) {
- const PoolVector<Color> *self = (const PoolVector<Color> *)p_self;
+godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self) {
+ const Vector<Color> *self = (const Vector<Color> *)p_self;
return self->empty();
}
-void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self) {
- ((PoolVector<Color> *)p_self)->~PoolVector();
-}
-
-//
-// read accessor functions
-//
-
-godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other) {
- PoolVector<uint8_t>::Read *other = (PoolVector<uint8_t>::Read *)p_other;
- return (godot_pool_byte_array_read_access *)memnew(PoolVector<uint8_t>::Read(*other));
-}
-const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read) {
- const PoolVector<uint8_t>::Read *read = (const PoolVector<uint8_t>::Read *)p_read;
- return read->ptr();
-}
-void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other) {
- PoolVector<uint8_t>::Read *read = (PoolVector<uint8_t>::Read *)p_read;
- PoolVector<uint8_t>::Read *other = (PoolVector<uint8_t>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read) {
- memdelete((PoolVector<uint8_t>::Read *)p_read);
-}
-
-godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other) {
- PoolVector<godot_int>::Read *other = (PoolVector<godot_int>::Read *)p_other;
- return (godot_pool_int_array_read_access *)memnew(PoolVector<godot_int>::Read(*other));
-}
-const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read) {
- const PoolVector<godot_int>::Read *read = (const PoolVector<godot_int>::Read *)p_read;
- return read->ptr();
-}
-void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other) {
- PoolVector<godot_int>::Read *read = (PoolVector<godot_int>::Read *)p_read;
- PoolVector<godot_int>::Read *other = (PoolVector<godot_int>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read) {
- memdelete((PoolVector<godot_int>::Read *)p_read);
-}
-
-godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other) {
- PoolVector<godot_real>::Read *other = (PoolVector<godot_real>::Read *)p_other;
- return (godot_pool_real_array_read_access *)memnew(PoolVector<godot_real>::Read(*other));
-}
-const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read) {
- const PoolVector<godot_real>::Read *read = (const PoolVector<godot_real>::Read *)p_read;
- return read->ptr();
-}
-void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other) {
- PoolVector<godot_real>::Read *read = (PoolVector<godot_real>::Read *)p_read;
- PoolVector<godot_real>::Read *other = (PoolVector<godot_real>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read) {
- memdelete((PoolVector<godot_real>::Read *)p_read);
-}
-
-godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other) {
- PoolVector<String>::Read *other = (PoolVector<String>::Read *)p_other;
- return (godot_pool_string_array_read_access *)memnew(PoolVector<String>::Read(*other));
-}
-const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read) {
- const PoolVector<String>::Read *read = (const PoolVector<String>::Read *)p_read;
- return (const godot_string *)read->ptr();
-}
-void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other) {
- PoolVector<String>::Read *read = (PoolVector<String>::Read *)p_read;
- PoolVector<String>::Read *other = (PoolVector<String>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read) {
- memdelete((PoolVector<String>::Read *)p_read);
-}
-
-godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other) {
- PoolVector<Vector2>::Read *other = (PoolVector<Vector2>::Read *)p_other;
- return (godot_pool_vector2_array_read_access *)memnew(PoolVector<Vector2>::Read(*other));
-}
-const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read) {
- const PoolVector<Vector2>::Read *read = (const PoolVector<Vector2>::Read *)p_read;
- return (const godot_vector2 *)read->ptr();
-}
-void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other) {
- PoolVector<Vector2>::Read *read = (PoolVector<Vector2>::Read *)p_read;
- PoolVector<Vector2>::Read *other = (PoolVector<Vector2>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read) {
- memdelete((PoolVector<Vector2>::Read *)p_read);
-}
-
-godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other) {
- PoolVector<Vector3>::Read *other = (PoolVector<Vector3>::Read *)p_other;
- return (godot_pool_vector3_array_read_access *)memnew(PoolVector<Vector3>::Read(*other));
-}
-const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read) {
- const PoolVector<Vector3>::Read *read = (const PoolVector<Vector3>::Read *)p_read;
- return (const godot_vector3 *)read->ptr();
-}
-void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other) {
- PoolVector<Vector3>::Read *read = (PoolVector<Vector3>::Read *)p_read;
- PoolVector<Vector3>::Read *other = (PoolVector<Vector3>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read) {
- memdelete((PoolVector<Vector2>::Read *)p_read);
-}
-
-godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other) {
- PoolVector<Color>::Read *other = (PoolVector<Color>::Read *)p_other;
- return (godot_pool_color_array_read_access *)memnew(PoolVector<Color>::Read(*other));
-}
-const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read) {
- const PoolVector<Color>::Read *read = (const PoolVector<Color>::Read *)p_read;
- return (const godot_color *)read->ptr();
-}
-void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other) {
- PoolVector<Color>::Read *read = (PoolVector<Color>::Read *)p_read;
- PoolVector<Color>::Read *other = (PoolVector<Color>::Read *)p_other;
- read->operator=(*other);
-}
-void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read) {
- memdelete((PoolVector<Color>::Read *)p_read);
-}
-
-//
-// write accessor functions
-//
-
-godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other) {
- PoolVector<uint8_t>::Write *other = (PoolVector<uint8_t>::Write *)p_other;
- return (godot_pool_byte_array_write_access *)memnew(PoolVector<uint8_t>::Write(*other));
-}
-uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write) {
- PoolVector<uint8_t>::Write *write = (PoolVector<uint8_t>::Write *)p_write;
- return write->ptr();
-}
-void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other) {
- PoolVector<uint8_t>::Write *write = (PoolVector<uint8_t>::Write *)p_write;
- PoolVector<uint8_t>::Write *other = (PoolVector<uint8_t>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write) {
- memdelete((PoolVector<uint8_t>::Write *)p_write);
-}
-
-godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other) {
- PoolVector<godot_int>::Write *other = (PoolVector<godot_int>::Write *)p_other;
- return (godot_pool_int_array_write_access *)memnew(PoolVector<godot_int>::Write(*other));
-}
-godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write) {
- PoolVector<godot_int>::Write *write = (PoolVector<godot_int>::Write *)p_write;
- return write->ptr();
-}
-void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other) {
- PoolVector<godot_int>::Write *write = (PoolVector<godot_int>::Write *)p_write;
- PoolVector<godot_int>::Write *other = (PoolVector<godot_int>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write) {
- memdelete((PoolVector<godot_int>::Write *)p_write);
-}
-
-godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other) {
- PoolVector<godot_real>::Write *other = (PoolVector<godot_real>::Write *)p_other;
- return (godot_pool_real_array_write_access *)memnew(PoolVector<godot_real>::Write(*other));
-}
-godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write) {
- PoolVector<godot_real>::Write *write = (PoolVector<godot_real>::Write *)p_write;
- return write->ptr();
-}
-void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other) {
- PoolVector<godot_real>::Write *write = (PoolVector<godot_real>::Write *)p_write;
- PoolVector<godot_real>::Write *other = (PoolVector<godot_real>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write) {
- memdelete((PoolVector<godot_real>::Write *)p_write);
-}
-
-godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other) {
- PoolVector<String>::Write *other = (PoolVector<String>::Write *)p_other;
- return (godot_pool_string_array_write_access *)memnew(PoolVector<String>::Write(*other));
-}
-godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write) {
- PoolVector<String>::Write *write = (PoolVector<String>::Write *)p_write;
- return (godot_string *)write->ptr();
-}
-void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other) {
- PoolVector<String>::Write *write = (PoolVector<String>::Write *)p_write;
- PoolVector<String>::Write *other = (PoolVector<String>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write) {
- memdelete((PoolVector<String>::Write *)p_write);
-}
-
-godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other) {
- PoolVector<Vector2>::Write *other = (PoolVector<Vector2>::Write *)p_other;
- return (godot_pool_vector2_array_write_access *)memnew(PoolVector<Vector2>::Write(*other));
-}
-godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write) {
- PoolVector<Vector2>::Write *write = (PoolVector<Vector2>::Write *)p_write;
- return (godot_vector2 *)write->ptr();
-}
-void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other) {
- PoolVector<Vector2>::Write *write = (PoolVector<Vector2>::Write *)p_write;
- PoolVector<Vector2>::Write *other = (PoolVector<Vector2>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write) {
- memdelete((PoolVector<Vector2>::Write *)p_write);
-}
-
-godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other) {
- PoolVector<Vector3>::Write *other = (PoolVector<Vector3>::Write *)p_other;
- return (godot_pool_vector3_array_write_access *)memnew(PoolVector<Vector3>::Write(*other));
-}
-godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write) {
- PoolVector<Vector3>::Write *write = (PoolVector<Vector3>::Write *)p_write;
- return (godot_vector3 *)write->ptr();
-}
-void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other) {
- PoolVector<Vector3>::Write *write = (PoolVector<Vector3>::Write *)p_write;
- PoolVector<Vector3>::Write *other = (PoolVector<Vector3>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write) {
- memdelete((PoolVector<Vector3>::Write *)p_write);
-}
-
-godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other) {
- PoolVector<Color>::Write *other = (PoolVector<Color>::Write *)p_other;
- return (godot_pool_color_array_write_access *)memnew(PoolVector<Color>::Write(*other));
-}
-godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write) {
- PoolVector<Color>::Write *write = (PoolVector<Color>::Write *)p_write;
- return (godot_color *)write->ptr();
-}
-void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other) {
- PoolVector<Color>::Write *write = (PoolVector<Color>::Write *)p_write;
- PoolVector<Color>::Write *other = (PoolVector<Color>::Write *)p_other;
- write->operator=(*other);
-}
-void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write) {
- memdelete((PoolVector<Color>::Write *)p_write);
+void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) {
+ ((Vector<Color> *)p_self)->~Vector();
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp
index 59901f6139..4cb55900b0 100644
--- a/modules/gdnative/gdnative/string.cpp
+++ b/modules/gdnative/gdnative/string.cpp
@@ -1030,14 +1030,14 @@ uint32_t GDAPI godot_string_hash_utf8_chars_with_len(const wchar_t *p_str, godot
return String::hash(p_str, p_len);
}
-godot_pool_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self) {
+godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self) {
const String *self = (const String *)p_self;
Vector<uint8_t> tmp_result = self->md5_buffer();
- godot_pool_byte_array result;
- memnew_placement(&result, PoolByteArray);
- PoolByteArray *proxy = (PoolByteArray *)&result;
- PoolByteArray::Write proxy_writer = proxy->write();
+ godot_packed_byte_array result;
+ memnew_placement(&result, PackedByteArray);
+ PackedByteArray *proxy = (PackedByteArray *)&result;
+ uint8_t *proxy_writer = proxy->ptrw();
proxy->resize(tmp_result.size());
for (int i = 0; i < tmp_result.size(); i++) {
@@ -1055,14 +1055,14 @@ godot_string GDAPI godot_string_md5_text(const godot_string *p_self) {
return result;
}
-godot_pool_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self) {
+godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self) {
const String *self = (const String *)p_self;
Vector<uint8_t> tmp_result = self->sha256_buffer();
- godot_pool_byte_array result;
- memnew_placement(&result, PoolByteArray);
- PoolByteArray *proxy = (PoolByteArray *)&result;
- PoolByteArray::Write proxy_writer = proxy->write();
+ godot_packed_byte_array result;
+ memnew_placement(&result, PackedByteArray);
+ PackedByteArray *proxy = (PackedByteArray *)&result;
+ uint8_t *proxy_writer = proxy->ptrw();
proxy->resize(tmp_result.size());
for (int i = 0; i < tmp_result.size(); i++) {
@@ -1343,15 +1343,15 @@ godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_s
return result;
}
-godot_pool_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor,
+godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor,
const godot_bool p_allow_empty, const godot_int p_maxsplit) {
const String *self = (const String *)p_self;
String *divisor = (String *)p_divisor;
- godot_pool_string_array result;
- memnew_placement(&result, PoolStringArray);
- PoolStringArray *proxy = (PoolStringArray *)&result;
- PoolStringArray::Write proxy_writer = proxy->write();
+ godot_packed_string_array result;
+ memnew_placement(&result, PackedStringArray);
+ PackedStringArray *proxy = (PackedStringArray *)&result;
+ String *proxy_writer = proxy->ptrw();
Vector<String> tmp_result = self->rsplit(*divisor, p_allow_empty, p_maxsplit);
proxy->resize(tmp_result.size());
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 33b378d9cc..f0fc44ae8a 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -201,45 +201,45 @@ void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_a
memnew_placement_custom(dest, Variant, Variant(*arr));
}
-void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba) {
+void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba) {
Variant *dest = (Variant *)r_dest;
- PoolByteArray *pba = (PoolByteArray *)p_pba;
+ PackedByteArray *pba = (PackedByteArray *)p_pba;
memnew_placement_custom(dest, Variant, Variant(*pba));
}
-void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia) {
+void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia) {
Variant *dest = (Variant *)r_dest;
- PoolIntArray *pia = (PoolIntArray *)p_pia;
+ PackedInt32Array *pia = (PackedInt32Array *)p_pia;
memnew_placement_custom(dest, Variant, Variant(*pia));
}
-void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra) {
+void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra) {
Variant *dest = (Variant *)r_dest;
- PoolRealArray *pra = (PoolRealArray *)p_pra;
+ PackedFloat32Array *pra = (PackedFloat32Array *)p_pra;
memnew_placement_custom(dest, Variant, Variant(*pra));
}
-void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa) {
+void GDAPI godot_variant_new_packed_string_array(godot_variant *r_dest, const godot_packed_string_array *p_psa) {
Variant *dest = (Variant *)r_dest;
- PoolStringArray *psa = (PoolStringArray *)p_psa;
+ PackedStringArray *psa = (PackedStringArray *)p_psa;
memnew_placement_custom(dest, Variant, Variant(*psa));
}
-void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) {
+void GDAPI godot_variant_new_packed_vector2_array(godot_variant *r_dest, const godot_packed_vector2_array *p_pv2a) {
Variant *dest = (Variant *)r_dest;
- PoolVector2Array *pv2a = (PoolVector2Array *)p_pv2a;
+ PackedVector2Array *pv2a = (PackedVector2Array *)p_pv2a;
memnew_placement_custom(dest, Variant, Variant(*pv2a));
}
-void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) {
+void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const godot_packed_vector3_array *p_pv3a) {
Variant *dest = (Variant *)r_dest;
- PoolVector3Array *pv3a = (PoolVector3Array *)p_pv3a;
+ PackedVector3Array *pv3a = (PackedVector3Array *)p_pv3a;
memnew_placement_custom(dest, Variant, Variant(*pv3a));
}
-void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca) {
+void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca) {
Variant *dest = (Variant *)r_dest;
- PoolColorArray *pca = (PoolColorArray *)p_pca;
+ PackedColorArray *pca = (PackedColorArray *)p_pca;
memnew_placement_custom(dest, Variant, Variant(*pca));
}
@@ -390,65 +390,65 @@ godot_array GDAPI godot_variant_as_array(const godot_variant *p_self) {
return raw_dest;
}
-godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self) {
- godot_pool_byte_array raw_dest;
+godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_variant *p_self) {
+ godot_packed_byte_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolByteArray *dest = (PoolByteArray *)&raw_dest;
- memnew_placement(dest, PoolByteArray(self->operator PoolByteArray())); // operator = is overloaded by PoolByteArray
+ PackedByteArray *dest = (PackedByteArray *)&raw_dest;
+ memnew_placement(dest, PackedByteArray(self->operator PackedByteArray())); // operator = is overloaded by PackedByteArray
*dest = *self;
return raw_dest;
}
-godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self) {
- godot_pool_int_array raw_dest;
+godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self) {
+ godot_packed_int_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolIntArray *dest = (PoolIntArray *)&raw_dest;
- memnew_placement(dest, PoolIntArray(self->operator PoolIntArray())); // operator = is overloaded by PoolIntArray
+ PackedInt32Array *dest = (PackedInt32Array *)&raw_dest;
+ memnew_placement(dest, PackedInt32Array(self->operator PackedInt32Array())); // operator = is overloaded by PackedInt32Array
*dest = *self;
return raw_dest;
}
-godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self) {
- godot_pool_real_array raw_dest;
+godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self) {
+ godot_packed_real_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolRealArray *dest = (PoolRealArray *)&raw_dest;
- memnew_placement(dest, PoolRealArray(self->operator PoolRealArray())); // operator = is overloaded by PoolRealArray
+ PackedFloat32Array *dest = (PackedFloat32Array *)&raw_dest;
+ memnew_placement(dest, PackedFloat32Array(self->operator PackedFloat32Array())); // operator = is overloaded by PackedFloat32Array
*dest = *self;
return raw_dest;
}
-godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self) {
- godot_pool_string_array raw_dest;
+godot_packed_string_array GDAPI godot_variant_as_packed_string_array(const godot_variant *p_self) {
+ godot_packed_string_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolStringArray *dest = (PoolStringArray *)&raw_dest;
- memnew_placement(dest, PoolStringArray(self->operator PoolStringArray())); // operator = is overloaded by PoolStringArray
+ PackedStringArray *dest = (PackedStringArray *)&raw_dest;
+ memnew_placement(dest, PackedStringArray(self->operator PackedStringArray())); // operator = is overloaded by PackedStringArray
*dest = *self;
return raw_dest;
}
-godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self) {
- godot_pool_vector2_array raw_dest;
+godot_packed_vector2_array GDAPI godot_variant_as_packed_vector2_array(const godot_variant *p_self) {
+ godot_packed_vector2_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolVector2Array *dest = (PoolVector2Array *)&raw_dest;
- memnew_placement(dest, PoolVector2Array(self->operator PoolVector2Array())); // operator = is overloaded by PoolVector2Array
+ PackedVector2Array *dest = (PackedVector2Array *)&raw_dest;
+ memnew_placement(dest, PackedVector2Array(self->operator PackedVector2Array())); // operator = is overloaded by PackedVector2Array
*dest = *self;
return raw_dest;
}
-godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self) {
- godot_pool_vector3_array raw_dest;
+godot_packed_vector3_array GDAPI godot_variant_as_packed_vector3_array(const godot_variant *p_self) {
+ godot_packed_vector3_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolVector3Array *dest = (PoolVector3Array *)&raw_dest;
- memnew_placement(dest, PoolVector3Array(self->operator PoolVector3Array())); // operator = is overloaded by PoolVector3Array
+ PackedVector3Array *dest = (PackedVector3Array *)&raw_dest;
+ memnew_placement(dest, PackedVector3Array(self->operator PackedVector3Array())); // operator = is overloaded by PackedVector3Array
*dest = *self;
return raw_dest;
}
-godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self) {
- godot_pool_color_array raw_dest;
+godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_variant *p_self) {
+ godot_packed_color_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PoolColorArray *dest = (PoolColorArray *)&raw_dest;
- memnew_placement(dest, PoolColorArray(self->operator PoolColorArray())); // operator = is overloaded by PoolColorArray
+ PackedColorArray *dest = (PackedColorArray *)&raw_dest;
+ memnew_placement(dest, PackedColorArray(self->operator PackedColorArray())); // operator = is overloaded by PackedColorArray
*dest = *self;
return raw_dest;
}
@@ -459,7 +459,7 @@ godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string
const Variant **args = (const Variant **)p_args;
godot_variant raw_dest;
Variant *dest = (Variant *)&raw_dest;
- Variant::CallError error;
+ Callable::CallError error;
memnew_placement_custom(dest, Variant, Variant(self->call(*method, args, p_argcount, error)));
if (r_error) {
r_error->error = (godot_variant_call_error_error)error.error;
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 6004b07965..e1d6c0c867 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -93,52 +93,52 @@
]
},
{
- "name": "godot_pool_byte_array_empty",
+ "name": "godot_packed_byte_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_byte_array *", "p_self"]
+ ["const godot_packed_byte_array *", "p_self"]
]
},
{
- "name": "godot_pool_int_array_empty",
+ "name": "godot_packed_int_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_int_array *", "p_self"]
+ ["const godot_packed_int_array *", "p_self"]
]
},
{
- "name": "godot_pool_real_array_empty",
+ "name": "godot_packed_real_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_real_array *", "p_self"]
+ ["const godot_packed_real_array *", "p_self"]
]
},
{
- "name": "godot_pool_string_array_empty",
+ "name": "godot_packed_string_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_string_array *", "p_self"]
+ ["const godot_packed_string_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector2_array_empty",
+ "name": "godot_packed_vector2_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_vector2_array *", "p_self"]
+ ["const godot_packed_vector2_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector3_array_empty",
+ "name": "godot_packed_vector3_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_vector3_array *", "p_self"]
+ ["const godot_packed_vector3_array *", "p_self"]
]
},
{
- "name": "godot_pool_color_array_empty",
+ "name": "godot_packed_color_array_empty",
"return_type": "godot_bool",
"arguments": [
- ["const godot_pool_color_array *", "p_self"]
+ ["const godot_packed_color_array *", "p_self"]
]
},
{
@@ -352,7 +352,7 @@
},
{
"name": "godot_string_rsplit",
- "return_type": "godot_pool_string_array",
+ "return_type": "godot_packed_string_array",
"arguments": [
["const godot_string *", "p_self"],
["const godot_string *", "p_divisor"],
@@ -1657,1277 +1657,773 @@
]
},
{
- "name": "godot_pool_byte_array_new",
+ "name": "godot_packed_byte_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "r_dest"]
+ ["godot_packed_byte_array *", "r_dest"]
]
},
{
- "name": "godot_pool_byte_array_new_copy",
+ "name": "godot_packed_byte_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "r_dest"],
- ["const godot_pool_byte_array *", "p_src"]
+ ["godot_packed_byte_array *", "r_dest"],
+ ["const godot_packed_byte_array *", "p_src"]
]
},
{
- "name": "godot_pool_byte_array_new_with_array",
+ "name": "godot_packed_byte_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "r_dest"],
+ ["godot_packed_byte_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_byte_array_append",
+ "name": "godot_packed_byte_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const uint8_t", "p_data"]
]
},
{
- "name": "godot_pool_byte_array_append_array",
+ "name": "godot_packed_byte_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
- ["const godot_pool_byte_array *", "p_array"]
+ ["godot_packed_byte_array *", "p_self"],
+ ["const godot_packed_byte_array *", "p_array"]
]
},
{
- "name": "godot_pool_byte_array_insert",
+ "name": "godot_packed_byte_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const godot_int", "p_idx"],
["const uint8_t", "p_data"]
]
},
{
- "name": "godot_pool_byte_array_invert",
+ "name": "godot_packed_byte_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"]
+ ["godot_packed_byte_array *", "p_self"]
]
},
{
- "name": "godot_pool_byte_array_push_back",
+ "name": "godot_packed_byte_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const uint8_t", "p_data"]
]
},
{
- "name": "godot_pool_byte_array_remove",
+ "name": "godot_packed_byte_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_byte_array_resize",
+ "name": "godot_packed_byte_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_byte_array_read",
- "return_type": "godot_pool_byte_array_read_access *",
- "arguments": [
- ["const godot_pool_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_byte_array_write",
- "return_type": "godot_pool_byte_array_write_access *",
- "arguments": [
- ["godot_pool_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_byte_array_set",
+ "name": "godot_packed_byte_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"],
+ ["godot_packed_byte_array *", "p_self"],
["const godot_int", "p_idx"],
["const uint8_t", "p_data"]
]
},
{
- "name": "godot_pool_byte_array_get",
+ "name": "godot_packed_byte_array_get",
"return_type": "uint8_t",
"arguments": [
- ["const godot_pool_byte_array *", "p_self"],
+ ["const godot_packed_byte_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_byte_array_size",
+ "name": "godot_packed_byte_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_byte_array *", "p_self"]
+ ["const godot_packed_byte_array *", "p_self"]
]
},
{
- "name": "godot_pool_byte_array_destroy",
+ "name": "godot_packed_byte_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_byte_array *", "p_self"]
+ ["godot_packed_byte_array *", "p_self"]
]
},
{
- "name": "godot_pool_int_array_new",
+ "name": "godot_packed_int_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "r_dest"]
+ ["godot_packed_int_array *", "r_dest"]
]
},
{
- "name": "godot_pool_int_array_new_copy",
+ "name": "godot_packed_int_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "r_dest"],
- ["const godot_pool_int_array *", "p_src"]
+ ["godot_packed_int_array *", "r_dest"],
+ ["const godot_packed_int_array *", "p_src"]
]
},
{
- "name": "godot_pool_int_array_new_with_array",
+ "name": "godot_packed_int_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "r_dest"],
+ ["godot_packed_int_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_int_array_append",
+ "name": "godot_packed_int_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_data"]
]
},
{
- "name": "godot_pool_int_array_append_array",
+ "name": "godot_packed_int_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
- ["const godot_pool_int_array *", "p_array"]
+ ["godot_packed_int_array *", "p_self"],
+ ["const godot_packed_int_array *", "p_array"]
]
},
{
- "name": "godot_pool_int_array_insert",
+ "name": "godot_packed_int_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_int", "p_data"]
]
},
{
- "name": "godot_pool_int_array_invert",
+ "name": "godot_packed_int_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"]
+ ["godot_packed_int_array *", "p_self"]
]
},
{
- "name": "godot_pool_int_array_push_back",
+ "name": "godot_packed_int_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_data"]
]
},
{
- "name": "godot_pool_int_array_remove",
+ "name": "godot_packed_int_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_int_array_resize",
+ "name": "godot_packed_int_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_int_array_read",
- "return_type": "godot_pool_int_array_read_access *",
- "arguments": [
- ["const godot_pool_int_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_int_array_write",
- "return_type": "godot_pool_int_array_write_access *",
- "arguments": [
- ["godot_pool_int_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_int_array_set",
+ "name": "godot_packed_int_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"],
+ ["godot_packed_int_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_int", "p_data"]
]
},
{
- "name": "godot_pool_int_array_get",
+ "name": "godot_packed_int_array_get",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_int_array *", "p_self"],
+ ["const godot_packed_int_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_int_array_size",
+ "name": "godot_packed_int_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_int_array *", "p_self"]
+ ["const godot_packed_int_array *", "p_self"]
]
},
{
- "name": "godot_pool_int_array_destroy",
+ "name": "godot_packed_int_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_int_array *", "p_self"]
+ ["godot_packed_int_array *", "p_self"]
]
},
{
- "name": "godot_pool_real_array_new",
+ "name": "godot_packed_real_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "r_dest"]
+ ["godot_packed_real_array *", "r_dest"]
]
},
{
- "name": "godot_pool_real_array_new_copy",
+ "name": "godot_packed_real_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "r_dest"],
- ["const godot_pool_real_array *", "p_src"]
+ ["godot_packed_real_array *", "r_dest"],
+ ["const godot_packed_real_array *", "p_src"]
]
},
{
- "name": "godot_pool_real_array_new_with_array",
+ "name": "godot_packed_real_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "r_dest"],
+ ["godot_packed_real_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_real_array_append",
+ "name": "godot_packed_real_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_real", "p_data"]
]
},
{
- "name": "godot_pool_real_array_append_array",
+ "name": "godot_packed_real_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
- ["const godot_pool_real_array *", "p_array"]
+ ["godot_packed_real_array *", "p_self"],
+ ["const godot_packed_real_array *", "p_array"]
]
},
{
- "name": "godot_pool_real_array_insert",
+ "name": "godot_packed_real_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_real", "p_data"]
]
},
{
- "name": "godot_pool_real_array_invert",
+ "name": "godot_packed_real_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"]
+ ["godot_packed_real_array *", "p_self"]
]
},
{
- "name": "godot_pool_real_array_push_back",
+ "name": "godot_packed_real_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_real", "p_data"]
]
},
{
- "name": "godot_pool_real_array_remove",
+ "name": "godot_packed_real_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_real_array_resize",
+ "name": "godot_packed_real_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_real_array_read",
- "return_type": "godot_pool_real_array_read_access *",
- "arguments": [
- ["const godot_pool_real_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_real_array_write",
- "return_type": "godot_pool_real_array_write_access *",
- "arguments": [
- ["godot_pool_real_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_real_array_set",
+ "name": "godot_packed_real_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"],
+ ["godot_packed_real_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_real", "p_data"]
]
},
{
- "name": "godot_pool_real_array_get",
+ "name": "godot_packed_real_array_get",
"return_type": "godot_real",
"arguments": [
- ["const godot_pool_real_array *", "p_self"],
+ ["const godot_packed_real_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_real_array_size",
+ "name": "godot_packed_real_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_real_array *", "p_self"]
+ ["const godot_packed_real_array *", "p_self"]
]
},
{
- "name": "godot_pool_real_array_destroy",
+ "name": "godot_packed_real_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_real_array *", "p_self"]
+ ["godot_packed_real_array *", "p_self"]
]
},
{
- "name": "godot_pool_string_array_new",
+ "name": "godot_packed_string_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "r_dest"]
+ ["godot_packed_string_array *", "r_dest"]
]
},
{
- "name": "godot_pool_string_array_new_copy",
+ "name": "godot_packed_string_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "r_dest"],
- ["const godot_pool_string_array *", "p_src"]
+ ["godot_packed_string_array *", "r_dest"],
+ ["const godot_packed_string_array *", "p_src"]
]
},
{
- "name": "godot_pool_string_array_new_with_array",
+ "name": "godot_packed_string_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "r_dest"],
+ ["godot_packed_string_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_string_array_append",
+ "name": "godot_packed_string_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_string *", "p_data"]
]
},
{
- "name": "godot_pool_string_array_append_array",
+ "name": "godot_packed_string_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
- ["const godot_pool_string_array *", "p_array"]
+ ["godot_packed_string_array *", "p_self"],
+ ["const godot_packed_string_array *", "p_array"]
]
},
{
- "name": "godot_pool_string_array_insert",
+ "name": "godot_packed_string_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_string *", "p_data"]
]
},
{
- "name": "godot_pool_string_array_invert",
+ "name": "godot_packed_string_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"]
+ ["godot_packed_string_array *", "p_self"]
]
},
{
- "name": "godot_pool_string_array_push_back",
+ "name": "godot_packed_string_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_string *", "p_data"]
]
},
{
- "name": "godot_pool_string_array_remove",
+ "name": "godot_packed_string_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_string_array_resize",
+ "name": "godot_packed_string_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_string_array_read",
- "return_type": "godot_pool_string_array_read_access *",
- "arguments": [
- ["const godot_pool_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_string_array_write",
- "return_type": "godot_pool_string_array_write_access *",
- "arguments": [
- ["godot_pool_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_string_array_set",
+ "name": "godot_packed_string_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"],
+ ["godot_packed_string_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_string *", "p_data"]
]
},
{
- "name": "godot_pool_string_array_get",
+ "name": "godot_packed_string_array_get",
"return_type": "godot_string",
"arguments": [
- ["const godot_pool_string_array *", "p_self"],
+ ["const godot_packed_string_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_string_array_size",
+ "name": "godot_packed_string_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_string_array *", "p_self"]
+ ["const godot_packed_string_array *", "p_self"]
]
},
{
- "name": "godot_pool_string_array_destroy",
+ "name": "godot_packed_string_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_string_array *", "p_self"]
+ ["godot_packed_string_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector2_array_new",
+ "name": "godot_packed_vector2_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "r_dest"]
+ ["godot_packed_vector2_array *", "r_dest"]
]
},
{
- "name": "godot_pool_vector2_array_new_copy",
+ "name": "godot_packed_vector2_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "r_dest"],
- ["const godot_pool_vector2_array *", "p_src"]
+ ["godot_packed_vector2_array *", "r_dest"],
+ ["const godot_packed_vector2_array *", "p_src"]
]
},
{
- "name": "godot_pool_vector2_array_new_with_array",
+ "name": "godot_packed_vector2_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "r_dest"],
+ ["godot_packed_vector2_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_vector2_array_append",
+ "name": "godot_packed_vector2_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_vector2 *", "p_data"]
]
},
{
- "name": "godot_pool_vector2_array_append_array",
+ "name": "godot_packed_vector2_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
- ["const godot_pool_vector2_array *", "p_array"]
+ ["godot_packed_vector2_array *", "p_self"],
+ ["const godot_packed_vector2_array *", "p_array"]
]
},
{
- "name": "godot_pool_vector2_array_insert",
+ "name": "godot_packed_vector2_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_vector2 *", "p_data"]
]
},
{
- "name": "godot_pool_vector2_array_invert",
+ "name": "godot_packed_vector2_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"]
+ ["godot_packed_vector2_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector2_array_push_back",
+ "name": "godot_packed_vector2_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_vector2 *", "p_data"]
]
},
{
- "name": "godot_pool_vector2_array_remove",
+ "name": "godot_packed_vector2_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_vector2_array_resize",
+ "name": "godot_packed_vector2_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_vector2_array_read",
- "return_type": "godot_pool_vector2_array_read_access *",
- "arguments": [
- ["const godot_pool_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_write",
- "return_type": "godot_pool_vector2_array_write_access *",
- "arguments": [
- ["godot_pool_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_set",
+ "name": "godot_packed_vector2_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"],
+ ["godot_packed_vector2_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_vector2 *", "p_data"]
]
},
{
- "name": "godot_pool_vector2_array_get",
+ "name": "godot_packed_vector2_array_get",
"return_type": "godot_vector2",
"arguments": [
- ["const godot_pool_vector2_array *", "p_self"],
+ ["const godot_packed_vector2_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_vector2_array_size",
+ "name": "godot_packed_vector2_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_vector2_array *", "p_self"]
+ ["const godot_packed_vector2_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector2_array_destroy",
+ "name": "godot_packed_vector2_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_vector2_array *", "p_self"]
+ ["godot_packed_vector2_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector3_array_new",
+ "name": "godot_packed_vector3_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "r_dest"]
+ ["godot_packed_vector3_array *", "r_dest"]
]
},
{
- "name": "godot_pool_vector3_array_new_copy",
+ "name": "godot_packed_vector3_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "r_dest"],
- ["const godot_pool_vector3_array *", "p_src"]
+ ["godot_packed_vector3_array *", "r_dest"],
+ ["const godot_packed_vector3_array *", "p_src"]
]
},
{
- "name": "godot_pool_vector3_array_new_with_array",
+ "name": "godot_packed_vector3_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "r_dest"],
+ ["godot_packed_vector3_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_vector3_array_append",
+ "name": "godot_packed_vector3_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_vector3 *", "p_data"]
]
},
{
- "name": "godot_pool_vector3_array_append_array",
+ "name": "godot_packed_vector3_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
- ["const godot_pool_vector3_array *", "p_array"]
+ ["godot_packed_vector3_array *", "p_self"],
+ ["const godot_packed_vector3_array *", "p_array"]
]
},
{
- "name": "godot_pool_vector3_array_insert",
+ "name": "godot_packed_vector3_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_vector3 *", "p_data"]
]
},
{
- "name": "godot_pool_vector3_array_invert",
+ "name": "godot_packed_vector3_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"]
+ ["godot_packed_vector3_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector3_array_push_back",
+ "name": "godot_packed_vector3_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_vector3 *", "p_data"]
]
},
{
- "name": "godot_pool_vector3_array_remove",
+ "name": "godot_packed_vector3_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_vector3_array_resize",
+ "name": "godot_packed_vector3_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_vector3_array_read",
- "return_type": "godot_pool_vector3_array_read_access *",
- "arguments": [
- ["const godot_pool_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_write",
- "return_type": "godot_pool_vector3_array_write_access *",
- "arguments": [
- ["godot_pool_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_set",
+ "name": "godot_packed_vector3_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"],
+ ["godot_packed_vector3_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_vector3 *", "p_data"]
]
},
{
- "name": "godot_pool_vector3_array_get",
+ "name": "godot_packed_vector3_array_get",
"return_type": "godot_vector3",
"arguments": [
- ["const godot_pool_vector3_array *", "p_self"],
+ ["const godot_packed_vector3_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_vector3_array_size",
+ "name": "godot_packed_vector3_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_vector3_array *", "p_self"]
+ ["const godot_packed_vector3_array *", "p_self"]
]
},
{
- "name": "godot_pool_vector3_array_destroy",
+ "name": "godot_packed_vector3_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_vector3_array *", "p_self"]
+ ["godot_packed_vector3_array *", "p_self"]
]
},
{
- "name": "godot_pool_color_array_new",
+ "name": "godot_packed_color_array_new",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "r_dest"]
+ ["godot_packed_color_array *", "r_dest"]
]
},
{
- "name": "godot_pool_color_array_new_copy",
+ "name": "godot_packed_color_array_new_copy",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "r_dest"],
- ["const godot_pool_color_array *", "p_src"]
+ ["godot_packed_color_array *", "r_dest"],
+ ["const godot_packed_color_array *", "p_src"]
]
},
{
- "name": "godot_pool_color_array_new_with_array",
+ "name": "godot_packed_color_array_new_with_array",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "r_dest"],
+ ["godot_packed_color_array *", "r_dest"],
["const godot_array *", "p_a"]
]
},
{
- "name": "godot_pool_color_array_append",
+ "name": "godot_packed_color_array_append",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_color *", "p_data"]
]
},
{
- "name": "godot_pool_color_array_append_array",
+ "name": "godot_packed_color_array_append_array",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
- ["const godot_pool_color_array *", "p_array"]
+ ["godot_packed_color_array *", "p_self"],
+ ["const godot_packed_color_array *", "p_array"]
]
},
{
- "name": "godot_pool_color_array_insert",
+ "name": "godot_packed_color_array_insert",
"return_type": "godot_error",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_color *", "p_data"]
]
},
{
- "name": "godot_pool_color_array_invert",
+ "name": "godot_packed_color_array_invert",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"]
+ ["godot_packed_color_array *", "p_self"]
]
},
{
- "name": "godot_pool_color_array_push_back",
+ "name": "godot_packed_color_array_push_back",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_color *", "p_data"]
]
},
{
- "name": "godot_pool_color_array_remove",
+ "name": "godot_packed_color_array_remove",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_color_array_resize",
+ "name": "godot_packed_color_array_resize",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_int", "p_size"]
]
},
{
- "name": "godot_pool_color_array_read",
- "return_type": "godot_pool_color_array_read_access *",
- "arguments": [
- ["const godot_pool_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_color_array_write",
- "return_type": "godot_pool_color_array_write_access *",
- "arguments": [
- ["godot_pool_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_color_array_set",
+ "name": "godot_packed_color_array_set",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array *", "p_self"],
+ ["godot_packed_color_array *", "p_self"],
["const godot_int", "p_idx"],
["const godot_color *", "p_data"]
]
},
{
- "name": "godot_pool_color_array_get",
+ "name": "godot_packed_color_array_get",
"return_type": "godot_color",
"arguments": [
- ["const godot_pool_color_array *", "p_self"],
+ ["const godot_packed_color_array *", "p_self"],
["const godot_int", "p_idx"]
]
},
{
- "name": "godot_pool_color_array_size",
+ "name": "godot_packed_color_array_size",
"return_type": "godot_int",
"arguments": [
- ["const godot_pool_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_color_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_pool_byte_array_read_access_copy",
- "return_type": "godot_pool_byte_array_read_access *",
- "arguments": [
- ["const godot_pool_byte_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_byte_array_read_access_ptr",
- "return_type": "const uint8_t *",
- "arguments": [
- ["const godot_pool_byte_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_byte_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_byte_array_read_access *", "p_read"],
- ["godot_pool_byte_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_byte_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_byte_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_int_array_read_access_copy",
- "return_type": "godot_pool_int_array_read_access *",
- "arguments": [
- ["const godot_pool_int_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_int_array_read_access_ptr",
- "return_type": "const godot_int *",
- "arguments": [
- ["const godot_pool_int_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_int_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_int_array_read_access *", "p_read"],
- ["godot_pool_int_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_int_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_int_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_real_array_read_access_copy",
- "return_type": "godot_pool_real_array_read_access *",
- "arguments": [
- ["const godot_pool_real_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_real_array_read_access_ptr",
- "return_type": "const godot_real *",
- "arguments": [
- ["const godot_pool_real_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_real_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_real_array_read_access *", "p_read"],
- ["godot_pool_real_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_real_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_real_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_string_array_read_access_copy",
- "return_type": "godot_pool_string_array_read_access *",
- "arguments": [
- ["const godot_pool_string_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_string_array_read_access_ptr",
- "return_type": "const godot_string *",
- "arguments": [
- ["const godot_pool_string_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_string_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_string_array_read_access *", "p_read"],
- ["godot_pool_string_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_string_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_string_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_read_access_copy",
- "return_type": "godot_pool_vector2_array_read_access *",
- "arguments": [
- ["const godot_pool_vector2_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_read_access_ptr",
- "return_type": "const godot_vector2 *",
- "arguments": [
- ["const godot_pool_vector2_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector2_array_read_access *", "p_read"],
- ["godot_pool_vector2_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector2_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_read_access_copy",
- "return_type": "godot_pool_vector3_array_read_access *",
- "arguments": [
- ["const godot_pool_vector3_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_read_access_ptr",
- "return_type": "const godot_vector3 *",
- "arguments": [
- ["const godot_pool_vector3_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector3_array_read_access *", "p_read"],
- ["godot_pool_vector3_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector3_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_color_array_read_access_copy",
- "return_type": "godot_pool_color_array_read_access *",
- "arguments": [
- ["const godot_pool_color_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_color_array_read_access_ptr",
- "return_type": "const godot_color *",
- "arguments": [
- ["const godot_pool_color_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_color_array_read_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_color_array_read_access *", "p_read"],
- ["godot_pool_color_array_read_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_color_array_read_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_color_array_read_access *", "p_read"]
- ]
- },
- {
- "name": "godot_pool_byte_array_write_access_copy",
- "return_type": "godot_pool_byte_array_write_access *",
- "arguments": [
- ["const godot_pool_byte_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_byte_array_write_access_ptr",
- "return_type": "uint8_t *",
- "arguments": [
- ["const godot_pool_byte_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_byte_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_byte_array_write_access *", "p_write"],
- ["godot_pool_byte_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_byte_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_byte_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_int_array_write_access_copy",
- "return_type": "godot_pool_int_array_write_access *",
- "arguments": [
- ["const godot_pool_int_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_int_array_write_access_ptr",
- "return_type": "godot_int *",
- "arguments": [
- ["const godot_pool_int_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_int_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_int_array_write_access *", "p_write"],
- ["godot_pool_int_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_int_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_int_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_real_array_write_access_copy",
- "return_type": "godot_pool_real_array_write_access *",
- "arguments": [
- ["const godot_pool_real_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_real_array_write_access_ptr",
- "return_type": "godot_real *",
- "arguments": [
- ["const godot_pool_real_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_real_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_real_array_write_access *", "p_write"],
- ["godot_pool_real_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_real_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_real_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_string_array_write_access_copy",
- "return_type": "godot_pool_string_array_write_access *",
- "arguments": [
- ["const godot_pool_string_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_string_array_write_access_ptr",
- "return_type": "godot_string *",
- "arguments": [
- ["const godot_pool_string_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_string_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_string_array_write_access *", "p_write"],
- ["godot_pool_string_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_string_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_string_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_write_access_copy",
- "return_type": "godot_pool_vector2_array_write_access *",
- "arguments": [
- ["const godot_pool_vector2_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_write_access_ptr",
- "return_type": "godot_vector2 *",
- "arguments": [
- ["const godot_pool_vector2_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector2_array_write_access *", "p_write"],
- ["godot_pool_vector2_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_vector2_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector2_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_write_access_copy",
- "return_type": "godot_pool_vector3_array_write_access *",
- "arguments": [
- ["const godot_pool_vector3_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_write_access_ptr",
- "return_type": "godot_vector3 *",
- "arguments": [
- ["const godot_pool_vector3_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector3_array_write_access *", "p_write"],
- ["godot_pool_vector3_array_write_access *", "p_other"]
- ]
- },
- {
- "name": "godot_pool_vector3_array_write_access_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_pool_vector3_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_color_array_write_access_copy",
- "return_type": "godot_pool_color_array_write_access *",
- "arguments": [
- ["const godot_pool_color_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_color_array_write_access_ptr",
- "return_type": "godot_color *",
- "arguments": [
- ["const godot_pool_color_array_write_access *", "p_write"]
- ]
- },
- {
- "name": "godot_pool_color_array_write_access_operator_assign",
- "return_type": "void",
- "arguments": [
- ["godot_pool_color_array_write_access *", "p_write"],
- ["godot_pool_color_array_write_access *", "p_other"]
+ ["const godot_packed_color_array *", "p_self"]
]
},
{
- "name": "godot_pool_color_array_write_access_destroy",
+ "name": "godot_packed_color_array_destroy",
"return_type": "void",
"arguments": [
- ["godot_pool_color_array_write_access *", "p_write"]
+ ["godot_packed_color_array *", "p_self"]
]
},
{
@@ -2946,59 +2442,59 @@
]
},
{
- "name": "godot_array_new_pool_color_array",
+ "name": "godot_array_new_packed_color_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_color_array *", "p_pca"]
+ ["const godot_packed_color_array *", "p_pca"]
]
},
{
- "name": "godot_array_new_pool_vector3_array",
+ "name": "godot_array_new_packed_vector3_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_vector3_array *", "p_pv3a"]
+ ["const godot_packed_vector3_array *", "p_pv3a"]
]
},
{
- "name": "godot_array_new_pool_vector2_array",
+ "name": "godot_array_new_packed_vector2_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_vector2_array *", "p_pv2a"]
+ ["const godot_packed_vector2_array *", "p_pv2a"]
]
},
{
- "name": "godot_array_new_pool_string_array",
+ "name": "godot_array_new_packed_string_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_string_array *", "p_psa"]
+ ["const godot_packed_string_array *", "p_psa"]
]
},
{
- "name": "godot_array_new_pool_real_array",
+ "name": "godot_array_new_packed_real_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_real_array *", "p_pra"]
+ ["const godot_packed_real_array *", "p_pra"]
]
},
{
- "name": "godot_array_new_pool_int_array",
+ "name": "godot_array_new_packed_int_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_int_array *", "p_pia"]
+ ["const godot_packed_int_array *", "p_pia"]
]
},
{
- "name": "godot_array_new_pool_byte_array",
+ "name": "godot_array_new_packed_byte_array",
"return_type": "void",
"arguments": [
["godot_array *", "r_dest"],
- ["const godot_pool_byte_array *", "p_pba"]
+ ["const godot_packed_byte_array *", "p_pba"]
]
},
{
@@ -4555,59 +4051,59 @@
]
},
{
- "name": "godot_variant_new_pool_byte_array",
+ "name": "godot_variant_new_packed_byte_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_byte_array *", "p_pba"]
+ ["const godot_packed_byte_array *", "p_pba"]
]
},
{
- "name": "godot_variant_new_pool_int_array",
+ "name": "godot_variant_new_packed_int_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_int_array *", "p_pia"]
+ ["const godot_packed_int_array *", "p_pia"]
]
},
{
- "name": "godot_variant_new_pool_real_array",
+ "name": "godot_variant_new_packed_real_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_real_array *", "p_pra"]
+ ["const godot_packed_real_array *", "p_pra"]
]
},
{
- "name": "godot_variant_new_pool_string_array",
+ "name": "godot_variant_new_packed_string_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_string_array *", "p_psa"]
+ ["const godot_packed_string_array *", "p_psa"]
]
},
{
- "name": "godot_variant_new_pool_vector2_array",
+ "name": "godot_variant_new_packed_vector2_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_vector2_array *", "p_pv2a"]
+ ["const godot_packed_vector2_array *", "p_pv2a"]
]
},
{
- "name": "godot_variant_new_pool_vector3_array",
+ "name": "godot_variant_new_packed_vector3_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_vector3_array *", "p_pv3a"]
+ ["const godot_packed_vector3_array *", "p_pv3a"]
]
},
{
- "name": "godot_variant_new_pool_color_array",
+ "name": "godot_variant_new_packed_color_array",
"return_type": "void",
"arguments": [
["godot_variant *", "r_dest"],
- ["const godot_pool_color_array *", "p_pca"]
+ ["const godot_packed_color_array *", "p_pca"]
]
},
{
@@ -4751,50 +4247,50 @@
]
},
{
- "name": "godot_variant_as_pool_byte_array",
- "return_type": "godot_pool_byte_array",
+ "name": "godot_variant_as_packed_byte_array",
+ "return_type": "godot_packed_byte_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_int_array",
- "return_type": "godot_pool_int_array",
+ "name": "godot_variant_as_packed_int_array",
+ "return_type": "godot_packed_int_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_real_array",
- "return_type": "godot_pool_real_array",
+ "name": "godot_variant_as_packed_real_array",
+ "return_type": "godot_packed_real_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_string_array",
- "return_type": "godot_pool_string_array",
+ "name": "godot_variant_as_packed_string_array",
+ "return_type": "godot_packed_string_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_vector2_array",
- "return_type": "godot_pool_vector2_array",
+ "name": "godot_variant_as_packed_vector2_array",
+ "return_type": "godot_packed_vector2_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_vector3_array",
- "return_type": "godot_pool_vector3_array",
+ "name": "godot_variant_as_packed_vector3_array",
+ "return_type": "godot_packed_vector3_array",
"arguments": [
["const godot_variant *", "p_self"]
]
},
{
- "name": "godot_variant_as_pool_color_array",
- "return_type": "godot_pool_color_array",
+ "name": "godot_variant_as_packed_color_array",
+ "return_type": "godot_packed_color_array",
"arguments": [
["const godot_variant *", "p_self"]
]
@@ -5782,7 +5278,7 @@
},
{
"name": "godot_string_md5_buffer",
- "return_type": "godot_pool_byte_array",
+ "return_type": "godot_packed_byte_array",
"arguments": [
["const godot_string *", "p_self"]
]
@@ -5796,7 +5292,7 @@
},
{
"name": "godot_string_sha256_buffer",
- "return_type": "godot_pool_byte_array",
+ "return_type": "godot_packed_byte_array",
"arguments": [
["const godot_string *", "p_self"]
]
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp
index 5ffab0f80e..db90199e63 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.cpp
+++ b/modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -53,14 +53,6 @@ void GDNativeLibraryEditor::edit(Ref<GDNativeLibrary> p_library) {
}
void GDNativeLibraryEditor::_bind_methods() {
-
- ClassDB::bind_method("_on_item_button", &GDNativeLibraryEditor::_on_item_button);
- ClassDB::bind_method("_on_library_selected", &GDNativeLibraryEditor::_on_library_selected);
- ClassDB::bind_method("_on_dependencies_selected", &GDNativeLibraryEditor::_on_dependencies_selected);
- ClassDB::bind_method("_on_filter_selected", &GDNativeLibraryEditor::_on_filter_selected);
- ClassDB::bind_method("_on_item_collapsed", &GDNativeLibraryEditor::_on_item_collapsed);
- ClassDB::bind_method("_on_item_activated", &GDNativeLibraryEditor::_on_item_activated);
- ClassDB::bind_method("_on_create_new_entry", &GDNativeLibraryEditor::_on_create_new_entry);
}
void GDNativeLibraryEditor::_update_tree() {
@@ -168,7 +160,7 @@ void GDNativeLibraryEditor::_on_library_selected(const String &file) {
_set_target_value(file_dialog->get_meta("section"), file_dialog->get_meta("target"), file);
}
-void GDNativeLibraryEditor::_on_dependencies_selected(const PoolStringArray &files) {
+void GDNativeLibraryEditor::_on_dependencies_selected(const PackedStringArray &files) {
_set_target_value(file_dialog->get_meta("section"), file_dialog->get_meta("target"), files);
}
@@ -359,7 +351,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
filter_list->set_item_checked(idx, true);
idx += 1;
}
- filter_list->connect("index_pressed", this, "_on_filter_selected");
+ filter_list->connect("index_pressed", callable_mp(this, &GDNativeLibraryEditor::_on_filter_selected));
tree = memnew(Tree);
container->add_child(tree);
@@ -374,16 +366,16 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
tree->set_column_title(2, TTR("Dependencies"));
tree->set_column_expand(3, false);
tree->set_column_min_width(3, int(110 * EDSCALE));
- tree->connect("button_pressed", this, "_on_item_button");
- tree->connect("item_collapsed", this, "_on_item_collapsed");
- tree->connect("item_activated", this, "_on_item_activated");
+ tree->connect("button_pressed", callable_mp(this, &GDNativeLibraryEditor::_on_item_button));
+ tree->connect("item_collapsed", callable_mp(this, &GDNativeLibraryEditor::_on_item_collapsed));
+ tree->connect("item_activated", callable_mp(this, &GDNativeLibraryEditor::_on_item_activated));
file_dialog = memnew(EditorFileDialog);
file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES);
file_dialog->set_resizable(true);
add_child(file_dialog);
- file_dialog->connect("file_selected", this, "_on_library_selected");
- file_dialog->connect("files_selected", this, "_on_dependencies_selected");
+ file_dialog->connect("file_selected", callable_mp(this, &GDNativeLibraryEditor::_on_library_selected));
+ file_dialog->connect("files_selected", callable_mp(this, &GDNativeLibraryEditor::_on_dependencies_selected));
new_architecture_dialog = memnew(ConfirmationDialog);
add_child(new_architecture_dialog);
@@ -392,7 +384,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
new_architecture_dialog->add_child(new_architecture_input);
new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE);
new_architecture_input->set_anchors_and_margins_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE);
- new_architecture_dialog->get_ok()->connect("pressed", this, "_on_create_new_entry");
+ new_architecture_dialog->get_ok()->connect("pressed", callable_mp(this, &GDNativeLibraryEditor::_on_create_new_entry));
}
void GDNativeLibraryEditorPlugin::edit(Object *p_node) {
diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h
index 7b59aaac38..b1274d08b3 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.h
+++ b/modules/gdnative/gdnative_library_editor_plugin.h
@@ -77,7 +77,7 @@ protected:
void _update_tree();
void _on_item_button(Object *item, int column, int id);
void _on_library_selected(const String &file);
- void _on_dependencies_selected(const PoolStringArray &files);
+ void _on_dependencies_selected(const PackedStringArray &files);
void _on_filter_selected(int id);
void _on_item_collapsed(Object *p_item);
void _on_item_activated();
diff --git a/modules/gdnative/gdnative_library_singleton_editor.cpp b/modules/gdnative/gdnative_library_singleton_editor.cpp
index 17a7d5492a..378339ecea 100644
--- a/modules/gdnative/gdnative_library_singleton_editor.cpp
+++ b/modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -192,8 +192,6 @@ void GDNativeLibrarySingletonEditor::_notification(int p_what) {
void GDNativeLibrarySingletonEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_item_edited"), &GDNativeLibrarySingletonEditor::_item_edited);
- ClassDB::bind_method(D_METHOD("_discover_singletons"), &GDNativeLibrarySingletonEditor::_discover_singletons);
ClassDB::bind_method(D_METHOD("_update_libraries"), &GDNativeLibrarySingletonEditor::_update_libraries);
}
@@ -207,8 +205,8 @@ GDNativeLibrarySingletonEditor::GDNativeLibrarySingletonEditor() {
libraries->set_hide_root(true);
add_margin_child(TTR("Libraries: "), libraries, true);
updating = false;
- libraries->connect("item_edited", this, "_item_edited");
- EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_discover_singletons");
+ libraries->connect("item_edited", callable_mp(this, &GDNativeLibrarySingletonEditor::_item_edited));
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &GDNativeLibrarySingletonEditor::_discover_singletons));
}
#endif // TOOLS_ENABLED
diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h
index 36b5c77875..e3114e9348 100644
--- a/modules/gdnative/include/gdnative/array.h
+++ b/modules/gdnative/include/gdnative/array.h
@@ -62,13 +62,13 @@ extern "C" {
void GDAPI godot_array_new(godot_array *r_dest);
void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);
-void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_pool_color_array *p_pca);
-void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_pool_vector3_array *p_pv3a);
-void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_pool_vector2_array *p_pv2a);
-void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_pool_string_array *p_psa);
-void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool_real_array *p_pra);
-void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_int_array *p_pia);
-void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool_byte_array *p_pba);
+void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca);
+void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a);
+void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a);
+void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa);
+void GDAPI godot_array_new_packed_real_array(godot_array *r_dest, const godot_packed_real_array *p_pra);
+void GDAPI godot_array_new_packed_int_array(godot_array *r_dest, const godot_packed_int_array *p_pia);
+void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba);
void GDAPI godot_array_set(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value);
diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h
index 7d51b3cd5c..c610377f54 100644
--- a/modules/gdnative/include/gdnative/pool_arrays.h
+++ b/modules/gdnative/include/gdnative/pool_arrays.h
@@ -37,113 +37,81 @@ extern "C" {
#include <stdint.h>
-/////// Read Access
+/////// PackedByteArray
-#define GODOT_POOL_ARRAY_READ_ACCESS_SIZE 1
+#define GODOT_PACKED_BYTE_ARRAY_SIZE sizeof(void *)
+#ifndef GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_ARRAY_READ_ACCESS_SIZE];
-} godot_pool_array_read_access;
-
-typedef godot_pool_array_read_access godot_pool_byte_array_read_access;
-typedef godot_pool_array_read_access godot_pool_int_array_read_access;
-typedef godot_pool_array_read_access godot_pool_real_array_read_access;
-typedef godot_pool_array_read_access godot_pool_string_array_read_access;
-typedef godot_pool_array_read_access godot_pool_vector2_array_read_access;
-typedef godot_pool_array_read_access godot_pool_vector3_array_read_access;
-typedef godot_pool_array_read_access godot_pool_color_array_read_access;
-
-/////// Write Access
-
-#define GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE 1
-
-typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_ARRAY_WRITE_ACCESS_SIZE];
-} godot_pool_array_write_access;
-
-typedef godot_pool_array_write_access godot_pool_byte_array_write_access;
-typedef godot_pool_array_write_access godot_pool_int_array_write_access;
-typedef godot_pool_array_write_access godot_pool_real_array_write_access;
-typedef godot_pool_array_write_access godot_pool_string_array_write_access;
-typedef godot_pool_array_write_access godot_pool_vector2_array_write_access;
-typedef godot_pool_array_write_access godot_pool_vector3_array_write_access;
-typedef godot_pool_array_write_access godot_pool_color_array_write_access;
-
-/////// PoolByteArray
-
-#define GODOT_POOL_BYTE_ARRAY_SIZE sizeof(void *)
-
-#ifndef GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED
-typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_BYTE_ARRAY_SIZE];
-} godot_pool_byte_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_BYTE_ARRAY_SIZE];
+} godot_packed_byte_array;
#endif
-/////// PoolIntArray
+/////// PackedInt32Array
-#define GODOT_POOL_INT_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_INT_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_INT_ARRAY_SIZE];
-} godot_pool_int_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_INT_ARRAY_SIZE];
+} godot_packed_int_array;
#endif
-/////// PoolRealArray
+/////// PackedFloat32Array
-#define GODOT_POOL_REAL_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_REAL_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_REAL_ARRAY_SIZE];
-} godot_pool_real_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_REAL_ARRAY_SIZE];
+} godot_packed_real_array;
#endif
-/////// PoolStringArray
+/////// PackedStringArray
-#define GODOT_POOL_STRING_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_STRING_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_STRING_ARRAY_SIZE];
-} godot_pool_string_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_STRING_ARRAY_SIZE];
+} godot_packed_string_array;
#endif
-/////// PoolVector2Array
+/////// PackedVector2Array
-#define GODOT_POOL_VECTOR2_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_VECTOR2_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_VECTOR2_ARRAY_SIZE];
-} godot_pool_vector2_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_VECTOR2_ARRAY_SIZE];
+} godot_packed_vector2_array;
#endif
-/////// PoolVector3Array
+/////// PackedVector3Array
-#define GODOT_POOL_VECTOR3_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_VECTOR3_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_VECTOR3_ARRAY_SIZE];
-} godot_pool_vector3_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_VECTOR3_ARRAY_SIZE];
+} godot_packed_vector3_array;
#endif
-/////// PoolColorArray
+/////// PackedColorArray
-#define GODOT_POOL_COLOR_ARRAY_SIZE sizeof(void *)
+#define GODOT_PACKED_COLOR_ARRAY_SIZE sizeof(void *)
-#ifndef GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_POOL_COLOR_ARRAY_SIZE];
-} godot_pool_color_array;
+ uint8_t _dont_touch_that[GODOT_PACKED_COLOR_ARRAY_SIZE];
+} godot_packed_color_array;
#endif
// reduce extern "C" nesting for VS2013
@@ -164,312 +132,206 @@ extern "C" {
// byte
-void GDAPI godot_pool_byte_array_new(godot_pool_byte_array *r_dest);
-void GDAPI godot_pool_byte_array_new_copy(godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src);
-void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, const godot_array *p_a);
+void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest);
+void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src);
+void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a);
-void GDAPI godot_pool_byte_array_append(godot_pool_byte_array *p_self, const uint8_t p_data);
+void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data);
-void GDAPI godot_pool_byte_array_append_array(godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array);
+void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array);
-godot_error GDAPI godot_pool_byte_array_insert(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
+godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
-void GDAPI godot_pool_byte_array_invert(godot_pool_byte_array *p_self);
+void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self);
-void GDAPI godot_pool_byte_array_push_back(godot_pool_byte_array *p_self, const uint8_t p_data);
+void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data);
-void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx);
-void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size);
-godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read(const godot_pool_byte_array *p_self);
+void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
+uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx);
-godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write(godot_pool_byte_array *p_self);
+godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self);
-void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
-uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_self, const godot_int p_idx);
+godot_bool GDAPI godot_packed_byte_array_empty(const godot_packed_byte_array *p_self);
-godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_self);
-
-godot_bool GDAPI godot_pool_byte_array_empty(const godot_pool_byte_array *p_self);
-
-void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_self);
+void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self);
// int
-void GDAPI godot_pool_int_array_new(godot_pool_int_array *r_dest);
-void GDAPI godot_pool_int_array_new_copy(godot_pool_int_array *r_dest, const godot_pool_int_array *p_src);
-void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, const godot_array *p_a);
-
-void GDAPI godot_pool_int_array_append(godot_pool_int_array *p_self, const godot_int p_data);
+void GDAPI godot_packed_int_array_new(godot_packed_int_array *r_dest);
+void GDAPI godot_packed_int_array_new_copy(godot_packed_int_array *r_dest, const godot_packed_int_array *p_src);
+void GDAPI godot_packed_int_array_new_with_array(godot_packed_int_array *r_dest, const godot_array *p_a);
-void GDAPI godot_pool_int_array_append_array(godot_pool_int_array *p_self, const godot_pool_int_array *p_array);
+void GDAPI godot_packed_int_array_append(godot_packed_int_array *p_self, const godot_int p_data);
-godot_error GDAPI godot_pool_int_array_insert(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data);
+void GDAPI godot_packed_int_array_append_array(godot_packed_int_array *p_self, const godot_packed_int_array *p_array);
-void GDAPI godot_pool_int_array_invert(godot_pool_int_array *p_self);
+godot_error GDAPI godot_packed_int_array_insert(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data);
-void GDAPI godot_pool_int_array_push_back(godot_pool_int_array *p_self, const godot_int p_data);
+void GDAPI godot_packed_int_array_invert(godot_packed_int_array *p_self);
-void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_int_array_push_back(godot_packed_int_array *p_self, const godot_int p_data);
-void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_int_array_remove(godot_packed_int_array *p_self, const godot_int p_idx);
-godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read(const godot_pool_int_array *p_self);
+void GDAPI godot_packed_int_array_resize(godot_packed_int_array *p_self, const godot_int p_size);
-godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write(godot_pool_int_array *p_self);
+void GDAPI godot_packed_int_array_set(godot_packed_int_array *p_self, const godot_int p_idx, const godot_int p_data);
+godot_int GDAPI godot_packed_int_array_get(const godot_packed_int_array *p_self, const godot_int p_idx);
-void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data);
-godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_self, const godot_int p_idx);
+godot_int GDAPI godot_packed_int_array_size(const godot_packed_int_array *p_self);
-godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_self);
+godot_bool GDAPI godot_packed_int_array_empty(const godot_packed_int_array *p_self);
-godot_bool GDAPI godot_pool_int_array_empty(const godot_pool_int_array *p_self);
-
-void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_self);
+void GDAPI godot_packed_int_array_destroy(godot_packed_int_array *p_self);
// real
-void GDAPI godot_pool_real_array_new(godot_pool_real_array *r_dest);
-void GDAPI godot_pool_real_array_new_copy(godot_pool_real_array *r_dest, const godot_pool_real_array *p_src);
-void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, const godot_array *p_a);
-
-void GDAPI godot_pool_real_array_append(godot_pool_real_array *p_self, const godot_real p_data);
+void GDAPI godot_packed_real_array_new(godot_packed_real_array *r_dest);
+void GDAPI godot_packed_real_array_new_copy(godot_packed_real_array *r_dest, const godot_packed_real_array *p_src);
+void GDAPI godot_packed_real_array_new_with_array(godot_packed_real_array *r_dest, const godot_array *p_a);
-void GDAPI godot_pool_real_array_append_array(godot_pool_real_array *p_self, const godot_pool_real_array *p_array);
+void GDAPI godot_packed_real_array_append(godot_packed_real_array *p_self, const godot_real p_data);
-godot_error GDAPI godot_pool_real_array_insert(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data);
+void GDAPI godot_packed_real_array_append_array(godot_packed_real_array *p_self, const godot_packed_real_array *p_array);
-void GDAPI godot_pool_real_array_invert(godot_pool_real_array *p_self);
+godot_error GDAPI godot_packed_real_array_insert(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data);
-void GDAPI godot_pool_real_array_push_back(godot_pool_real_array *p_self, const godot_real p_data);
+void GDAPI godot_packed_real_array_invert(godot_packed_real_array *p_self);
-void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_real_array_push_back(godot_packed_real_array *p_self, const godot_real p_data);
-void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_real_array_remove(godot_packed_real_array *p_self, const godot_int p_idx);
-godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read(const godot_pool_real_array *p_self);
+void GDAPI godot_packed_real_array_resize(godot_packed_real_array *p_self, const godot_int p_size);
-godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write(godot_pool_real_array *p_self);
+void GDAPI godot_packed_real_array_set(godot_packed_real_array *p_self, const godot_int p_idx, const godot_real p_data);
+godot_real GDAPI godot_packed_real_array_get(const godot_packed_real_array *p_self, const godot_int p_idx);
-void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data);
-godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_self, const godot_int p_idx);
+godot_int GDAPI godot_packed_real_array_size(const godot_packed_real_array *p_self);
-godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_self);
+godot_bool GDAPI godot_packed_real_array_empty(const godot_packed_real_array *p_self);
-godot_bool GDAPI godot_pool_real_array_empty(const godot_pool_real_array *p_self);
-
-void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_self);
+void GDAPI godot_packed_real_array_destroy(godot_packed_real_array *p_self);
// string
-void GDAPI godot_pool_string_array_new(godot_pool_string_array *r_dest);
-void GDAPI godot_pool_string_array_new_copy(godot_pool_string_array *r_dest, const godot_pool_string_array *p_src);
-void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_dest, const godot_array *p_a);
-
-void GDAPI godot_pool_string_array_append(godot_pool_string_array *p_self, const godot_string *p_data);
-
-void GDAPI godot_pool_string_array_append_array(godot_pool_string_array *p_self, const godot_pool_string_array *p_array);
+void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest);
+void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src);
+void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a);
-godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
+void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data);
-void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self);
+void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array);
-void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data);
+godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
-void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self);
-void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data);
-godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read(const godot_pool_string_array *p_self);
+void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx);
-godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write(godot_pool_string_array *p_self);
+void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size);
-void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
-godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
+godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx);
-godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_self);
+godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self);
-godot_bool GDAPI godot_pool_string_array_empty(const godot_pool_string_array *p_self);
+godot_bool GDAPI godot_packed_string_array_empty(const godot_packed_string_array *p_self);
-void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_self);
+void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self);
// vector2
-void GDAPI godot_pool_vector2_array_new(godot_pool_vector2_array *r_dest);
-void GDAPI godot_pool_vector2_array_new_copy(godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src);
-void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_dest, const godot_array *p_a);
-
-void GDAPI godot_pool_vector2_array_append(godot_pool_vector2_array *p_self, const godot_vector2 *p_data);
-
-void GDAPI godot_pool_vector2_array_append_array(godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array);
+void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest);
+void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src);
+void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a);
-godot_error GDAPI godot_pool_vector2_array_insert(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
+void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data);
-void GDAPI godot_pool_vector2_array_invert(godot_pool_vector2_array *p_self);
+void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array);
-void GDAPI godot_pool_vector2_array_push_back(godot_pool_vector2_array *p_self, const godot_vector2 *p_data);
+godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
-void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self);
-void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data);
-godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read(const godot_pool_vector2_array *p_self);
+void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx);
-godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write(godot_pool_vector2_array *p_self);
+void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size);
-void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
-godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
+godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx);
-godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_self);
+godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self);
-godot_bool GDAPI godot_pool_vector2_array_empty(const godot_pool_vector2_array *p_self);
+godot_bool GDAPI godot_packed_vector2_array_empty(const godot_packed_vector2_array *p_self);
-void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_self);
+void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self);
// vector3
-void GDAPI godot_pool_vector3_array_new(godot_pool_vector3_array *r_dest);
-void GDAPI godot_pool_vector3_array_new_copy(godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src);
-void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_dest, const godot_array *p_a);
+void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest);
+void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src);
+void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a);
-void GDAPI godot_pool_vector3_array_append(godot_pool_vector3_array *p_self, const godot_vector3 *p_data);
+void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data);
-void GDAPI godot_pool_vector3_array_append_array(godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array);
+void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array);
-godot_error GDAPI godot_pool_vector3_array_insert(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
+godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
-void GDAPI godot_pool_vector3_array_invert(godot_pool_vector3_array *p_self);
+void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self);
-void GDAPI godot_pool_vector3_array_push_back(godot_pool_vector3_array *p_self, const godot_vector3 *p_data);
+void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data);
-void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_self, const godot_int p_idx);
+void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx);
-void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_self, const godot_int p_size);
+void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size);
-godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read(const godot_pool_vector3_array *p_self);
+void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
+godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx);
-godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write(godot_pool_vector3_array *p_self);
+godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self);
-void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
-godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_self, const godot_int p_idx);
+godot_bool GDAPI godot_packed_vector3_array_empty(const godot_packed_vector3_array *p_self);
-godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_self);
-
-godot_bool GDAPI godot_pool_vector3_array_empty(const godot_pool_vector3_array *p_self);
-
-void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_self);
+void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self);
// color
-void GDAPI godot_pool_color_array_new(godot_pool_color_array *r_dest);
-void GDAPI godot_pool_color_array_new_copy(godot_pool_color_array *r_dest, const godot_pool_color_array *p_src);
-void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, const godot_array *p_a);
-
-void GDAPI godot_pool_color_array_append(godot_pool_color_array *p_self, const godot_color *p_data);
-
-void GDAPI godot_pool_color_array_append_array(godot_pool_color_array *p_self, const godot_pool_color_array *p_array);
-
-godot_error GDAPI godot_pool_color_array_insert(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
-
-void GDAPI godot_pool_color_array_invert(godot_pool_color_array *p_self);
-
-void GDAPI godot_pool_color_array_push_back(godot_pool_color_array *p_self, const godot_color *p_data);
-
-void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_self, const godot_int p_size);
-
-godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read(const godot_pool_color_array *p_self);
-
-godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write(godot_pool_color_array *p_self);
-
-void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
-godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_self);
-
-godot_bool GDAPI godot_pool_color_array_empty(const godot_pool_color_array *p_self);
-
-void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self);
-
-//
-// read accessor functions
-//
-
-godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other);
-const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read);
-void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other);
-void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read);
-
-godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other);
-const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read);
-void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other);
-void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read);
-
-godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other);
-const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read);
-void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other);
-void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read);
-
-godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other);
-const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read);
-void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other);
-void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read);
+void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest);
+void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src);
+void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a);
-godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other);
-const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read);
-void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other);
-void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read);
+void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data);
-godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other);
-const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read);
-void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other);
-void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read);
+void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array);
-godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other);
-const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read);
-void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other);
-void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read);
+godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
-//
-// write accessor functions
-//
+void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self);
-godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other);
-uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write);
-void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other);
-void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write);
+void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data);
-godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other);
-godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write);
-void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other);
-void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write);
+void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx);
-godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other);
-godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write);
-void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other);
-void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write);
+void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size);
-godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other);
-godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write);
-void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other);
-void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write);
+void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
+godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx);
-godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other);
-godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write);
-void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other);
-void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write);
+godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self);
-godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other);
-godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write);
-void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other);
-void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write);
+godot_bool GDAPI godot_packed_color_array_empty(const godot_packed_color_array *p_self);
-godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other);
-godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write);
-void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other);
-void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write);
+void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h
index b676d21fb2..608978db76 100644
--- a/modules/gdnative/include/gdnative/string.h
+++ b/modules/gdnative/include/gdnative/string.h
@@ -209,9 +209,9 @@ uint32_t GDAPI godot_string_hash_chars(const char *p_cstr);
uint32_t GDAPI godot_string_hash_chars_with_len(const char *p_cstr, godot_int p_len);
uint32_t GDAPI godot_string_hash_utf8_chars(const wchar_t *p_str);
uint32_t GDAPI godot_string_hash_utf8_chars_with_len(const wchar_t *p_str, godot_int p_len);
-godot_pool_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self);
+godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self);
godot_string GDAPI godot_string_md5_text(const godot_string *p_self);
-godot_pool_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self);
+godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self);
godot_string GDAPI godot_string_sha256_text(const godot_string *p_self);
godot_bool godot_string_empty(const godot_string *p_self);
@@ -252,7 +252,7 @@ godot_string GDAPI godot_string_dedent(const godot_string *p_self);
godot_string GDAPI godot_string_trim_prefix(const godot_string *p_self, const godot_string *p_prefix);
godot_string GDAPI godot_string_trim_suffix(const godot_string *p_self, const godot_string *p_suffix);
godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_string *p_chars);
-godot_pool_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit);
+godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_divisor, const godot_bool p_allow_empty, const godot_int p_maxsplit);
void GDAPI godot_string_destroy(godot_string *p_self);
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index c65f7a28d2..934e856fbf 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -56,33 +56,35 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_STRING,
// math types
-
- GODOT_VARIANT_TYPE_VECTOR2, // 5
+ GODOT_VARIANT_TYPE_VECTOR2,
+ GODOT_VARIANT_TYPE_VECTOR2I,
GODOT_VARIANT_TYPE_RECT2,
+ GODOT_VARIANT_TYPE_RECT2I,
GODOT_VARIANT_TYPE_VECTOR3,
+ GODOT_VARIANT_TYPE_VECTOR3I,
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
- GODOT_VARIANT_TYPE_QUAT, // 10
+ GODOT_VARIANT_TYPE_QUAT,
GODOT_VARIANT_TYPE_AABB,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM,
// misc types
GODOT_VARIANT_TYPE_COLOR,
- GODOT_VARIANT_TYPE_NODE_PATH, // 15
+ GODOT_VARIANT_TYPE_NODE_PATH,
GODOT_VARIANT_TYPE_RID,
GODOT_VARIANT_TYPE_OBJECT,
GODOT_VARIANT_TYPE_DICTIONARY,
- GODOT_VARIANT_TYPE_ARRAY, // 20
+ GODOT_VARIANT_TYPE_ARRAY,
// arrays
- GODOT_VARIANT_TYPE_POOL_BYTE_ARRAY,
- GODOT_VARIANT_TYPE_POOL_INT_ARRAY,
- GODOT_VARIANT_TYPE_POOL_REAL_ARRAY,
- GODOT_VARIANT_TYPE_POOL_STRING_ARRAY,
- GODOT_VARIANT_TYPE_POOL_VECTOR2_ARRAY, // 25
- GODOT_VARIANT_TYPE_POOL_VECTOR3_ARRAY,
- GODOT_VARIANT_TYPE_POOL_COLOR_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_BYTE_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_INT_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_REAL_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_STRING_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_VECTOR3_ARRAY,
+ GODOT_VARIANT_TYPE_PACKED_COLOR_ARRAY,
} godot_variant_type;
typedef enum godot_variant_call_error_error {
@@ -194,13 +196,13 @@ void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid);
void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj);
void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict);
void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr);
-void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba);
-void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia);
-void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra);
-void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa);
-void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a);
-void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a);
-void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca);
+void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba);
+void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia);
+void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra);
+void GDAPI godot_variant_new_packed_string_array(godot_variant *r_dest, const godot_packed_string_array *p_psa);
+void GDAPI godot_variant_new_packed_vector2_array(godot_variant *r_dest, const godot_packed_vector2_array *p_pv2a);
+void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const godot_packed_vector3_array *p_pv3a);
+void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca);
godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self);
uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self);
@@ -222,13 +224,13 @@ godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_self);
godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self);
godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_self);
godot_array GDAPI godot_variant_as_array(const godot_variant *p_self);
-godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self);
-godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self);
-godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self);
-godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self);
-godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self);
-godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self);
-godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self);
+godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_variant *p_self);
+godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self);
+godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self);
+godot_packed_string_array GDAPI godot_variant_as_packed_string_array(const godot_variant *p_self);
+godot_packed_vector2_array GDAPI godot_variant_as_packed_vector2_array(const godot_variant *p_self);
+godot_packed_vector3_array GDAPI godot_variant_as_packed_vector3_array(const godot_variant *p_self);
+godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_variant *p_self);
godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error);
diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h
index 210d3f7756..341e7f9e2b 100644
--- a/modules/gdnative/include/pluginscript/godot_pluginscript.h
+++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h
@@ -129,9 +129,9 @@ typedef struct {
godot_bool supports_builtin_mode;
godot_string (*get_template_source_code)(godot_pluginscript_language_data *p_data, const godot_string *p_class_name, const godot_string *p_base_class_name);
- godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_pool_string_array *r_functions);
+ godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_packed_string_array *r_functions);
int (*find_function)(godot_pluginscript_language_data *p_data, const godot_string *p_function, const godot_string *p_code); // Can be NULL
- godot_string (*make_function)(godot_pluginscript_language_data *p_data, const godot_string *p_class, const godot_string *p_name, const godot_pool_string_array *p_args);
+ godot_string (*make_function)(godot_pluginscript_language_data *p_data, const godot_string *p_class, const godot_string *p_name, const godot_packed_string_array *p_args);
godot_error (*complete_code)(godot_pluginscript_language_data *p_data, const godot_string *p_code, const godot_string *p_path, godot_object *p_owner, godot_array *r_options, godot_bool *r_force, godot_string *r_call_hint);
void (*auto_indent_code)(godot_pluginscript_language_data *p_data, godot_string *p_code, int p_from_line, int p_to_line);
@@ -141,9 +141,9 @@ typedef struct {
int (*debug_get_stack_level_line)(godot_pluginscript_language_data *p_data, int p_level);
godot_string (*debug_get_stack_level_function)(godot_pluginscript_language_data *p_data, int p_level);
godot_string (*debug_get_stack_level_source)(godot_pluginscript_language_data *p_data, int p_level);
- void (*debug_get_stack_level_locals)(godot_pluginscript_language_data *p_data, int p_level, godot_pool_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth);
- void (*debug_get_stack_level_members)(godot_pluginscript_language_data *p_data, int p_level, godot_pool_string_array *p_members, godot_array *p_values, int p_max_subitems, int p_max_depth);
- void (*debug_get_globals)(godot_pluginscript_language_data *p_data, godot_pool_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth);
+ void (*debug_get_stack_level_locals)(godot_pluginscript_language_data *p_data, int p_level, godot_packed_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth);
+ void (*debug_get_stack_level_members)(godot_pluginscript_language_data *p_data, int p_level, godot_packed_string_array *p_members, godot_array *p_values, int p_max_subitems, int p_max_depth);
+ void (*debug_get_globals)(godot_pluginscript_language_data *p_data, godot_packed_string_array *p_locals, godot_array *p_values, int p_max_subitems, int p_max_depth);
godot_string (*debug_parse_stack_level_expression)(godot_pluginscript_language_data *p_data, int p_level, const godot_string *p_expression, int p_max_subitems, int p_max_depth);
// TODO: could this stuff be moved to the godot_pluginscript_language_desc ?
diff --git a/modules/gdnative/include/videodecoder/godot_videodecoder.h b/modules/gdnative/include/videodecoder/godot_videodecoder.h
index 714991ca72..3e91a2e9ac 100644
--- a/modules/gdnative/include/videodecoder/godot_videodecoder.h
+++ b/modules/gdnative/include/videodecoder/godot_videodecoder.h
@@ -54,7 +54,7 @@ typedef struct
void (*seek)(void *, godot_real);
void (*set_audio_track)(void *, godot_int);
void (*update)(void *, godot_real);
- godot_pool_byte_array *(*get_videoframe)(void *);
+ godot_packed_byte_array *(*get_videoframe)(void *);
godot_int (*get_audioframe)(void *, float *, int);
godot_int (*get_channels)(const void *);
godot_int (*get_mix_rate)(const void *);
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index df85155ff5..d0e196b3e6 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -222,15 +222,11 @@ ScriptInstance *NativeScript::instance_create(Object *p_this) {
nsi->userdata = script_data->create_func.create_func((godot_object *)p_this, script_data->create_func.method_data);
#endif
-#ifndef NO_THREADS
- owners_lock->lock();
-#endif
-
- instance_owners.insert(p_this);
+ {
+ MutexLock lock(owners_lock);
-#ifndef NO_THREADS
- owners_lock->unlock();
-#endif
+ instance_owners.insert(p_this);
+ }
return nsi;
}
@@ -725,21 +721,21 @@ String NativeScript::get_property_documentation(const StringName &p_path) const
ERR_FAIL_V_MSG("", "Attempt to get property documentation for non-existent signal.");
}
-Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (lib_path.empty() || class_name.empty() || library.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
NativeScriptDesc *script_data = get_script_desc();
if (!script_data) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
REF ref;
Object *owner = NULL;
@@ -751,7 +747,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::Call
}
if (!owner) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
@@ -782,17 +778,10 @@ NativeScript::NativeScript() {
library = Ref<GDNative>();
lib_path = "";
class_name = "";
-#ifndef NO_THREADS
- owners_lock = Mutex::create();
-#endif
}
NativeScript::~NativeScript() {
NSL->unregister_script(this);
-
-#ifndef NO_THREADS
- memdelete(owners_lock);
-#endif
}
#define GET_SCRIPT_DESC() script->get_script_desc()
@@ -964,7 +953,7 @@ bool NativeScriptInstance::has_method(const StringName &p_method) const {
return script->has_method(p_method);
}
-Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
NativeScriptDesc *script_data = GET_SCRIPT_DESC();
@@ -989,14 +978,14 @@ Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p
Variant res = *(Variant *)&result;
godot_variant_destroy(&result);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return res;
}
script_data = script_data->base_data;
}
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -1017,9 +1006,9 @@ void NativeScriptInstance::notification(int p_notification) {
String NativeScriptInstance::to_string(bool *r_valid) {
if (has_method(CoreStringNames::get_singleton()->_to_string)) {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce);
- if (ce.error == Variant::CallError::CALL_OK) {
+ if (ce.error == Callable::CallError::CALL_OK) {
if (ret.get_type() != Variant::STRING) {
if (r_valid)
*r_valid = false;
@@ -1036,21 +1025,21 @@ String NativeScriptInstance::to_string(bool *r_valid) {
}
void NativeScriptInstance::refcount_incremented() {
- Variant::CallError err;
+ Callable::CallError err;
call("_refcount_incremented", NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK && err.error != Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ if (err.error != Callable::CallError::CALL_OK && err.error != Callable::CallError::CALL_ERROR_INVALID_METHOD) {
ERR_PRINT("Failed to invoke _refcount_incremented - should not happen");
}
}
bool NativeScriptInstance::refcount_decremented() {
- Variant::CallError err;
+ Callable::CallError err;
Variant ret = call("_refcount_decremented", NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK && err.error != Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ if (err.error != Callable::CallError::CALL_OK && err.error != Callable::CallError::CALL_ERROR_INVALID_METHOD) {
ERR_PRINT("Failed to invoke _refcount_decremented - should not happen");
return true; // assume we can destroy the object
}
- if (err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ if (err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
// the method does not exist, default is true
return true;
}
@@ -1140,16 +1129,9 @@ NativeScriptInstance::~NativeScriptInstance() {
script_data->destroy_func.destroy_func((godot_object *)owner, script_data->destroy_func.method_data, userdata);
if (owner) {
-
-#ifndef NO_THREADS
- script->owners_lock->lock();
-#endif
+ MutexLock lock(script->owners_lock);
script->instance_owners.erase(owner);
-
-#ifndef NO_THREADS
- script->owners_lock->unlock();
-#endif
}
}
@@ -1246,7 +1228,6 @@ NativeScriptLanguage::NativeScriptLanguage() {
NativeScriptLanguage::singleton = this;
#ifndef NO_THREADS
has_objects_to_register = false;
- mutex = Mutex::create();
#endif
#ifdef DEBUG_ENABLED
@@ -1283,10 +1264,6 @@ NativeScriptLanguage::~NativeScriptLanguage() {
NSL->library_classes.clear();
NSL->library_gdnatives.clear();
NSL->library_script_users.clear();
-
-#ifndef NO_THREADS
- memdelete(mutex);
-#endif
}
String NativeScriptLanguage::get_name() const {
@@ -1361,7 +1338,7 @@ bool NativeScriptLanguage::supports_builtin_mode() const {
int NativeScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
}
-String NativeScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const {
+String NativeScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
return "";
}
void NativeScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {
@@ -1413,9 +1390,7 @@ void NativeScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_
void NativeScriptLanguage::profiling_start() {
#ifdef DEBUG_ENABLED
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
profile_data.clear();
profiling = true;
@@ -1424,9 +1399,7 @@ void NativeScriptLanguage::profiling_start() {
void NativeScriptLanguage::profiling_stop() {
#ifdef DEBUG_ENABLED
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
profiling = false;
#endif
@@ -1434,9 +1407,8 @@ void NativeScriptLanguage::profiling_stop() {
int NativeScriptLanguage::profiling_get_accumulated_data(ProfilingInfo *p_info_arr, int p_info_max) {
#ifdef DEBUG_ENABLED
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
+
int current = 0;
for (Map<StringName, ProfileData>::Element *d = profile_data.front(); d; d = d->next()) {
@@ -1458,9 +1430,8 @@ int NativeScriptLanguage::profiling_get_accumulated_data(ProfilingInfo *p_info_a
int NativeScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_info_max) {
#ifdef DEBUG_ENABLED
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
+
int current = 0;
for (Map<StringName, ProfileData>::Element *d = profile_data.front(); d; d = d->next()) {
@@ -1484,9 +1455,7 @@ int NativeScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, in
void NativeScriptLanguage::profiling_add_data(StringName p_signature, uint64_t p_time) {
#ifdef DEBUG_ENABLED
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
Map<StringName, ProfileData>::Element *d = profile_data.find(p_signature);
if (d) {
@@ -1705,9 +1674,8 @@ void NativeScriptLanguage::defer_init_library(Ref<GDNativeLibrary> lib, NativeSc
#endif
void NativeScriptLanguage::init_library(const Ref<GDNativeLibrary> &lib) {
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
+
// See if this library was "registered" already.
const String &lib_path = lib->get_current_library_path();
ERR_FAIL_COND_MSG(lib_path.length() == 0, lib->get_name() + " does not have a library for the current platform.");
@@ -1743,16 +1711,14 @@ void NativeScriptLanguage::init_library(const Ref<GDNativeLibrary> &lib) {
}
void NativeScriptLanguage::register_script(NativeScript *script) {
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
+
library_script_users[script->lib_path].insert(script);
}
void NativeScriptLanguage::unregister_script(NativeScript *script) {
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
+
Map<String, Set<NativeScript *> >::Element *S = library_script_users.find(script->lib_path);
if (S) {
S->get().erase(script);
@@ -1803,9 +1769,7 @@ void NativeScriptLanguage::frame() {
#ifdef DEBUG_ENABLED
{
-#ifndef NO_THREADS
MutexLock lock(mutex);
-#endif
for (Map<StringName, ProfileData>::Element *d = profile_data.front(); d; d = d->next()) {
d->get().last_frame_call_count = d->get().frame_call_count;
@@ -1867,9 +1831,7 @@ void NativeReloadNode::_notification(int p_what) {
if (unloaded)
break;
-#ifndef NO_THREADS
MutexLock lock(NSL->mutex);
-#endif
NSL->_unload_stuff(true);
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
@@ -1904,9 +1866,8 @@ void NativeReloadNode::_notification(int p_what) {
if (!unloaded)
break;
-#ifndef NO_THREADS
MutexLock lock(NSL->mutex);
-#endif
+
Set<StringName> libs_to_remove;
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
@@ -1970,7 +1931,7 @@ void NativeReloadNode::_notification(int p_what) {
#endif
}
-RES ResourceFormatLoaderNativeScript::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderNativeScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
return ResourceFormatLoaderText::singleton->load(p_path, p_original_path, r_error);
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index 2ff08e32cd..90542c96b7 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -35,6 +35,7 @@
#include "core/io/resource_saver.h"
#include "core/oa_hash_map.h"
#include "core/ordered_hash_map.h"
+#include "core/os/mutex.h"
#include "core/os/thread_safe.h"
#include "core/resource.h"
#include "core/script_language.h"
@@ -44,10 +45,6 @@
#include "modules/gdnative/gdnative.h"
#include <nativescript/godot_nativescript.h>
-#ifndef NO_THREADS
-#include "core/os/mutex.h"
-#endif
-
struct NativeScriptDesc {
struct Method {
@@ -127,9 +124,7 @@ class NativeScript : public Script {
String script_class_name;
String script_class_icon_path;
-#ifndef NO_THREADS
- Mutex *owners_lock;
-#endif
+ Mutex owners_lock;
Set<Object *> instance_owners;
protected:
@@ -197,7 +192,7 @@ public:
String get_signal_documentation(const StringName &p_signal_name) const;
String get_property_documentation(const StringName &p_path) const;
- Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
NativeScript();
~NativeScript();
@@ -224,7 +219,7 @@ public:
virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid) const;
virtual void get_method_list(List<MethodInfo> *p_list) const;
virtual bool has_method(const StringName &p_method) const;
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void notification(int p_notification);
String to_string(bool *r_valid);
virtual Ref<Script> get_script() const;
@@ -266,9 +261,8 @@ private:
void _unload_stuff(bool p_reload = false);
+ Mutex mutex;
#ifndef NO_THREADS
- Mutex *mutex;
-
Set<Ref<GDNativeLibrary> > libs_to_init;
Set<NativeScript *> scripts_to_register;
volatile bool has_objects_to_register; // so that we don't lock mutex every frame - it's rarely needed
@@ -352,7 +346,7 @@ public:
virtual bool has_named_classes() const;
virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
virtual void add_global_constant(const StringName &p_variable, const Variant &p_value);
virtual String debug_get_error() const;
@@ -412,7 +406,7 @@ public:
class ResourceFormatLoaderNativeScript : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index 26a1d5f47a..22e8372130 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -79,7 +79,7 @@ bool PluginScriptInstance::has_method(const StringName &p_method) const {
return _script->has_method(p_method);
}
-Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
// TODO: optimize when calling a Godot method from Godot to avoid param conversion ?
godot_variant ret = _desc->call_method(
_data, (godot_string_name *)&p_method, (const godot_variant **)p_args,
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h
index 154bebd72a..c91ad643a7 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.h
+++ b/modules/gdnative/pluginscript/pluginscript_instance.h
@@ -60,7 +60,7 @@ public:
virtual void get_method_list(List<MethodInfo> *p_list) const;
virtual bool has_method(const StringName &p_method) const;
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
// Rely on default implementations provided by ScriptInstance for the moment.
// Note that multilevel call could be removed in 3.0 release, so stay tuned
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index 421d6e0a89..a40b59bb2e 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -109,7 +109,7 @@ Ref<Script> PluginScriptLanguage::get_template(const String &p_class_name, const
}
bool PluginScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const {
- PoolStringArray functions;
+ PackedStringArray functions;
if (_desc.validate) {
bool ret = _desc.validate(
_data,
@@ -118,7 +118,7 @@ bool PluginScriptLanguage::validate(const String &p_script, int &r_line_error, i
&r_col_error,
(godot_string *)&r_test_error,
(godot_string *)&p_path,
- (godot_pool_string_array *)&functions);
+ (godot_packed_string_array *)&functions);
for (int i = 0; i < functions.size(); i++) {
r_functions->push_back(functions[i]);
}
@@ -149,9 +149,9 @@ int PluginScriptLanguage::find_function(const String &p_function, const String &
return -1;
}
-String PluginScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const {
+String PluginScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
if (_desc.make_function) {
- godot_string tmp = _desc.make_function(_data, (godot_string *)&p_class, (godot_string *)&p_name, (godot_pool_string_array *)&p_args);
+ godot_string tmp = _desc.make_function(_data, (godot_string *)&p_class, (godot_string *)&p_name, (godot_packed_string_array *)&p_args);
String ret = *(String *)&tmp;
godot_string_destroy(&tmp);
return ret;
@@ -336,9 +336,9 @@ String PluginScriptLanguage::debug_get_stack_level_source(int p_level) const {
void PluginScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_desc.debug_get_stack_level_locals) {
- PoolStringArray locals;
+ PackedStringArray locals;
Array values;
- _desc.debug_get_stack_level_locals(_data, p_level, (godot_pool_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth);
+ _desc.debug_get_stack_level_locals(_data, p_level, (godot_packed_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth);
for (int i = 0; i < locals.size(); i++) {
p_locals->push_back(locals[i]);
}
@@ -350,9 +350,9 @@ void PluginScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
void PluginScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_desc.debug_get_stack_level_members) {
- PoolStringArray members;
+ PackedStringArray members;
Array values;
- _desc.debug_get_stack_level_members(_data, p_level, (godot_pool_string_array *)&members, (godot_array *)&values, p_max_subitems, p_max_depth);
+ _desc.debug_get_stack_level_members(_data, p_level, (godot_packed_string_array *)&members, (godot_array *)&values, p_max_subitems, p_max_depth);
for (int i = 0; i < members.size(); i++) {
p_members->push_back(members[i]);
}
@@ -364,9 +364,9 @@ void PluginScriptLanguage::debug_get_stack_level_members(int p_level, List<Strin
void PluginScriptLanguage::debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
if (_desc.debug_get_globals) {
- PoolStringArray locals;
+ PackedStringArray locals;
Array values;
- _desc.debug_get_globals(_data, (godot_pool_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth);
+ _desc.debug_get_globals(_data, (godot_packed_string_array *)&locals, (godot_array *)&values, p_max_subitems, p_max_depth);
for (int i = 0; i < locals.size(); i++) {
p_locals->push_back(locals[i]);
}
@@ -399,39 +399,18 @@ void PluginScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool
}
void PluginScriptLanguage::lock() {
-#ifndef NO_THREADS
- if (_lock) {
- _lock->lock();
- }
-#endif
+ _lock.lock();
}
void PluginScriptLanguage::unlock() {
-#ifndef NO_THREADS
- if (_lock) {
- _lock->unlock();
- }
-#endif
+ _lock.unlock();
}
PluginScriptLanguage::PluginScriptLanguage(const godot_pluginscript_language_desc *desc) :
_desc(*desc) {
_resource_loader = Ref<ResourceFormatLoaderPluginScript>(memnew(ResourceFormatLoaderPluginScript(this)));
_resource_saver = Ref<ResourceFormatSaverPluginScript>(memnew(ResourceFormatSaverPluginScript(this)));
-
-// TODO: totally remove _lock attribute if NO_THREADS is set
-#ifdef NO_THREADS
- _lock = NULL;
-#else
- _lock = Mutex::create();
-#endif
}
PluginScriptLanguage::~PluginScriptLanguage() {
-#ifndef NO_THREADS
- if (_lock) {
- memdelete(_lock);
- _lock = NULL;
- }
-#endif
}
diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h
index 145ab5599c..3f0d2b8d3d 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.h
+++ b/modules/gdnative/pluginscript/pluginscript_language.h
@@ -53,7 +53,7 @@ class PluginScriptLanguage : public ScriptLanguage {
const godot_pluginscript_language_desc _desc;
godot_pluginscript_language_data *_data;
- Mutex *_lock;
+ Mutex _lock;
SelfList<PluginScript>::List _script_list;
public:
@@ -80,7 +80,7 @@ public:
virtual bool supports_builtin_mode() const;
virtual bool can_inherit_from_file() { return true; }
virtual int find_function(const String &p_function, const String &p_code) const;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptCodeCompletionOption> *r_options, bool &r_force, String &r_call_hint);
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
virtual void add_global_constant(const StringName &p_variable, const Variant &p_value);
diff --git a/modules/gdnative/pluginscript/pluginscript_loader.cpp b/modules/gdnative/pluginscript/pluginscript_loader.cpp
index fe1cc83c69..46db20b6c2 100644
--- a/modules/gdnative/pluginscript/pluginscript_loader.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_loader.cpp
@@ -39,7 +39,7 @@ ResourceFormatLoaderPluginScript::ResourceFormatLoaderPluginScript(PluginScriptL
_language = language;
}
-RES ResourceFormatLoaderPluginScript::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderPluginScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/modules/gdnative/pluginscript/pluginscript_loader.h b/modules/gdnative/pluginscript/pluginscript_loader.h
index ede31c027e..a039072fdc 100644
--- a/modules/gdnative/pluginscript/pluginscript_loader.h
+++ b/modules/gdnative/pluginscript/pluginscript_loader.h
@@ -44,7 +44,7 @@ class ResourceFormatLoaderPluginScript : public ResourceFormatLoader {
public:
ResourceFormatLoaderPluginScript(PluginScriptLanguage *language);
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index c370062262..fe1f63f6da 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -55,9 +55,9 @@ void PluginScript::_bind_methods() {
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &PluginScript::_new, MethodInfo("new"));
}
-PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Variant::CallError &r_error) {
+PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
// Create instance
PluginScriptInstance *instance = memnew(PluginScriptInstance());
@@ -67,7 +67,7 @@ PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int
_instances.insert(instance->get_owner());
_language->unlock();
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
memdelete(instance);
ERR_FAIL_V(NULL);
}
@@ -83,12 +83,12 @@ PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int
return instance;
}
-Variant PluginScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant PluginScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
if (!_valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -102,7 +102,7 @@ Variant PluginScript::_new(const Variant **p_args, int p_argcount, Variant::Call
}
if (!owner) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
@@ -201,7 +201,7 @@ ScriptInstance *PluginScript::instance_create(Object *p_this) {
}
}
- Variant::CallError unchecked_error;
+ Callable::CallError unchecked_error;
return _create_instance(NULL, 0, p_this, unchecked_error);
}
@@ -428,22 +428,22 @@ ScriptLanguage *PluginScript::get_language() const {
Error PluginScript::load_source_code(const String &p_path) {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + p_path + "'.");
int len = f->get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
w[len] = 0;
String s;
- if (s.parse_utf8((const char *)w.ptr())) {
+ if (s.parse_utf8((const char *)w)) {
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index f6bca8a9cb..5c93ae38f5 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -72,8 +72,8 @@ private:
protected:
static void _bind_methods();
- PluginScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Variant::CallError &r_error);
- Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ PluginScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Callable::CallError &r_error);
+ Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
#ifdef TOOLS_ENABLED
Set<PlaceHolderScriptInstance *> placeholders;
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index 4142f60ba6..e5d688afd4 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -325,7 +325,7 @@ void unregister_gdnative_types() {
print_line(String("dict:\t" ) + itos(sizeof(Dictionary)));
print_line(String("node_path:\t") + itos(sizeof(NodePath)));
print_line(String("plane:\t") + itos(sizeof(Plane)));
- print_line(String("poolarray:\t") + itos(sizeof(PoolByteArray)));
+ print_line(String("poolarray:\t") + itos(sizeof(PackedByteArray)));
print_line(String("quat:\t") + itos(sizeof(Quat)));
print_line(String("rect2:\t") + itos(sizeof(Rect2)));
print_line(String("aabb:\t") + itos(sizeof(AABB)));
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
index 8dcafc1987..f6e2bad739 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
@@ -187,7 +187,7 @@ void VideoStreamPlaybackGDNative::update(float p_delta) {
}
void VideoStreamPlaybackGDNative::update_texture() {
- PoolByteArray *pba = (PoolByteArray *)interface->get_videoframe(data_struct);
+ PackedByteArray *pba = (PackedByteArray *)interface->get_videoframe(data_struct);
if (pba == NULL) {
playing = false;
@@ -373,7 +373,7 @@ void VideoStreamGDNative::set_audio_track(int p_track) {
/* --- NOTE ResourceFormatLoaderVideoStreamGDNative starts here. ----- */
-RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
if (r_error) {
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h
index 024cdec196..21b5245a16 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.h
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.h
@@ -199,7 +199,7 @@ public:
class ResourceFormatLoaderVideoStreamGDNative : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdnavigation/gd_navigation_server.cpp b/modules/gdnavigation/gd_navigation_server.cpp
index 5bafa5507c..4db10cda78 100644
--- a/modules/gdnavigation/gd_navigation_server.cpp
+++ b/modules/gdnavigation/gd_navigation_server.cpp
@@ -115,30 +115,27 @@
GdNavigationServer::GdNavigationServer() :
NavigationServer(),
- commands_mutex(Mutex::create()),
- operations_mutex(Mutex::create()),
active(true) {
}
GdNavigationServer::~GdNavigationServer() {
- memdelete(operations_mutex);
- memdelete(commands_mutex);
+ flush_queries();
}
void GdNavigationServer::add_command(SetCommand *command) const {
auto mut_this = const_cast<GdNavigationServer *>(this);
- commands_mutex->lock();
- mut_this->commands.push_back(command);
- commands_mutex->unlock();
+ {
+ MutexLock lock(commands_mutex);
+ mut_this->commands.push_back(command);
+ }
}
RID GdNavigationServer::map_create() const {
auto mut_this = const_cast<GdNavigationServer *>(this);
- mut_this->operations_mutex->lock();
+ MutexLock lock(mut_this->operations_mutex);
NavMap *space = memnew(NavMap);
RID rid = map_owner.make_rid(space);
space->set_self(rid);
- mut_this->operations_mutex->unlock();
return rid;
}
@@ -170,7 +167,7 @@ COMMAND_2(map_set_up, RID, p_map, Vector3, p_up) {
}
Vector3 GdNavigationServer::map_get_up(RID p_map) const {
- NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.getornull(p_map);
ERR_FAIL_COND_V(map == NULL, Vector3());
return map->get_up();
@@ -184,7 +181,7 @@ COMMAND_2(map_set_cell_size, RID, p_map, real_t, p_cell_size) {
}
real_t GdNavigationServer::map_get_cell_size(RID p_map) const {
- NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.getornull(p_map);
ERR_FAIL_COND_V(map == NULL, 0);
return map->get_cell_size();
@@ -198,26 +195,53 @@ COMMAND_2(map_set_edge_connection_margin, RID, p_map, real_t, p_connection_margi
}
real_t GdNavigationServer::map_get_edge_connection_margin(RID p_map) const {
- NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.getornull(p_map);
ERR_FAIL_COND_V(map == NULL, 0);
return map->get_edge_connection_margin();
}
Vector<Vector3> GdNavigationServer::map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const {
- NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.getornull(p_map);
ERR_FAIL_COND_V(map == NULL, Vector<Vector3>());
return map->get_path(p_origin, p_destination, p_optimize);
}
+Vector3 GdNavigationServer::map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const {
+ const NavMap *map = map_owner.getornull(p_map);
+ ERR_FAIL_COND_V(map == NULL, Vector3());
+
+ return map->get_closest_point_to_segment(p_from, p_to, p_use_collision);
+}
+
+Vector3 GdNavigationServer::map_get_closest_point(RID p_map, const Vector3 &p_point) const {
+ const NavMap *map = map_owner.getornull(p_map);
+ ERR_FAIL_COND_V(map == NULL, Vector3());
+
+ return map->get_closest_point(p_point);
+}
+
+Vector3 GdNavigationServer::map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const {
+ const NavMap *map = map_owner.getornull(p_map);
+ ERR_FAIL_COND_V(map == NULL, Vector3());
+
+ return map->get_closest_point_normal(p_point);
+}
+
+RID GdNavigationServer::map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const {
+ const NavMap *map = map_owner.getornull(p_map);
+ ERR_FAIL_COND_V(map == NULL, RID());
+
+ return map->get_closest_point_owner(p_point);
+}
+
RID GdNavigationServer::region_create() const {
auto mut_this = const_cast<GdNavigationServer *>(this);
- mut_this->operations_mutex->lock();
+ MutexLock lock(mut_this->operations_mutex);
NavRegion *reg = memnew(NavRegion);
RID rid = region_owner.make_rid(reg);
reg->set_self(rid);
- mut_this->operations_mutex->unlock();
return rid;
}
@@ -269,11 +293,10 @@ void GdNavigationServer::region_bake_navmesh(Ref<NavigationMesh> r_mesh, Node *p
RID GdNavigationServer::agent_create() const {
auto mut_this = const_cast<GdNavigationServer *>(this);
- mut_this->operations_mutex->lock();
+ MutexLock lock(mut_this->operations_mutex);
RvoAgent *agent = memnew(RvoAgent());
RID rid = agent_owner.make_rid(agent);
agent->set_self(rid);
- mut_this->operations_mutex->unlock();
return rid;
}
@@ -441,28 +464,32 @@ COMMAND_1(free, RID, p_object) {
void GdNavigationServer::set_active(bool p_active) const {
auto mut_this = const_cast<GdNavigationServer *>(this);
- mut_this->operations_mutex->lock();
+ MutexLock lock(mut_this->operations_mutex);
mut_this->active = p_active;
- mut_this->operations_mutex->unlock();
}
-void GdNavigationServer::step(real_t p_delta_time) {
- if (!active) {
- return;
- }
-
- // With c++ we can't be 100% sure this is called in single thread so use the mutex.
- commands_mutex->lock();
- operations_mutex->lock();
+void GdNavigationServer::flush_queries() {
+ // In c++ we can't be sure that this is performed in the main thread
+ // even with mutable functions.
+ MutexLock lock(commands_mutex);
+ MutexLock lock2(operations_mutex);
for (size_t i(0); i < commands.size(); i++) {
commands[i]->exec(this);
memdelete(commands[i]);
}
commands.clear();
- operations_mutex->unlock();
- commands_mutex->unlock();
+}
+
+void GdNavigationServer::process(real_t p_delta_time) {
+ flush_queries();
+
+ if (!active) {
+ return;
+ }
- // These are internal operations so don't need to be shielded.
+ // In c++ we can't be sure that this is performed in the main thread
+ // even with mutable functions.
+ MutexLock lock(operations_mutex);
for (int i(0); i < active_maps.size(); i++) {
active_maps[i]->sync();
active_maps[i]->step(p_delta_time);
diff --git a/modules/gdnavigation/gd_navigation_server.h b/modules/gdnavigation/gd_navigation_server.h
index 564e9870a0..e9f5c1ffe6 100644
--- a/modules/gdnavigation/gd_navigation_server.h
+++ b/modules/gdnavigation/gd_navigation_server.h
@@ -61,7 +61,6 @@
void MERGE(_cmd_, F_NAME)(T_0 D_0, T_1 D_1, T_2 D_2, T_3 D_3)
class GdNavigationServer;
-class Mutex;
struct SetCommand {
virtual ~SetCommand() {}
@@ -69,9 +68,9 @@ struct SetCommand {
};
class GdNavigationServer : public NavigationServer {
- Mutex *commands_mutex;
+ Mutex commands_mutex;
/// Mutex used to make any operation threadsafe.
- Mutex *operations_mutex;
+ Mutex operations_mutex;
std::vector<SetCommand *> commands;
@@ -103,6 +102,11 @@ public:
virtual Vector<Vector3> map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const;
+ virtual Vector3 map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision = false) const;
+ virtual Vector3 map_get_closest_point(RID p_map, const Vector3 &p_point) const;
+ virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const;
+ virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const;
+
virtual RID region_create() const;
COMMAND_2(region_set_map, RID, p_region, RID, p_map);
COMMAND_2(region_set_transform, RID, p_region, Transform, p_transform);
@@ -126,7 +130,9 @@ public:
COMMAND_1(free, RID, p_object);
virtual void set_active(bool p_active) const;
- virtual void step(real_t p_delta_time);
+
+ void flush_queries();
+ virtual void process(real_t p_delta_time);
};
#undef COMMAND_1
diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp
index d1765f4da9..00a1901c48 100644
--- a/modules/gdnavigation/nav_map.cpp
+++ b/modules/gdnavigation/nav_map.cpp
@@ -401,14 +401,155 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
return Vector<Vector3>();
}
+Vector3 NavMap::get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const {
+
+ bool use_collision = p_use_collision;
+ Vector3 closest_point;
+ real_t closest_point_d = 1e20;
+
+ // Find the initial poly and the end poly on this map.
+ for (size_t i(0); i < polygons.size(); i++) {
+ const gd::Polygon &p = polygons[i];
+
+ // For each point cast a face and check the distance to the segment
+ for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) {
+
+ const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
+ Vector3 inters;
+ if (f.intersects_segment(p_from, p_to, &inters)) {
+ const real_t d = closest_point_d = p_from.distance_to(inters);
+ if (use_collision == false) {
+ closest_point = inters;
+ use_collision = true;
+ closest_point_d = d;
+ } else if (closest_point_d > d) {
+
+ closest_point = inters;
+ closest_point_d = d;
+ }
+ }
+ }
+
+ if (use_collision == false) {
+
+ for (size_t point_id = 0; point_id < p.points.size(); point_id += 1) {
+
+ Vector3 a, b;
+
+ Geometry::get_closest_points_between_segments(
+ p_from,
+ p_to,
+ p.points[point_id].pos,
+ p.points[(point_id + 1) % p.points.size()].pos,
+ a,
+ b);
+
+ const real_t d = a.distance_to(b);
+ if (d < closest_point_d) {
+
+ closest_point_d = d;
+ closest_point = b;
+ }
+ }
+ }
+ }
+
+ return closest_point;
+}
+
+Vector3 NavMap::get_closest_point(const Vector3 &p_point) const {
+ // TODO this is really not optimal, please redesign the API to directly return all this data
+
+ Vector3 closest_point;
+ real_t closest_point_d = 1e20;
+
+ // Find the initial poly and the end poly on this map.
+ for (size_t i(0); i < polygons.size(); i++) {
+ const gd::Polygon &p = polygons[i];
+
+ // For each point cast a face and check the distance to the point
+ for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) {
+
+ const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
+ const Vector3 inters = f.get_closest_point_to(p_point);
+ const real_t d = inters.distance_to(p_point);
+ if (d < closest_point_d) {
+ closest_point = inters;
+ closest_point_d = d;
+ }
+ }
+ }
+
+ return closest_point;
+}
+
+Vector3 NavMap::get_closest_point_normal(const Vector3 &p_point) const {
+ // TODO this is really not optimal, please redesign the API to directly return all this data
+
+ Vector3 closest_point;
+ Vector3 closest_point_normal;
+ real_t closest_point_d = 1e20;
+
+ // Find the initial poly and the end poly on this map.
+ for (size_t i(0); i < polygons.size(); i++) {
+ const gd::Polygon &p = polygons[i];
+
+ // For each point cast a face and check the distance to the point
+ for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) {
+
+ const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
+ const Vector3 inters = f.get_closest_point_to(p_point);
+ const real_t d = inters.distance_to(p_point);
+ if (d < closest_point_d) {
+ closest_point = inters;
+ closest_point_normal = f.get_plane().normal;
+ closest_point_d = d;
+ }
+ }
+ }
+
+ return closest_point_normal;
+}
+
+RID NavMap::get_closest_point_owner(const Vector3 &p_point) const {
+ // TODO this is really not optimal, please redesign the API to directly return all this data
+
+ Vector3 closest_point;
+ RID closest_point_owner;
+ real_t closest_point_d = 1e20;
+
+ // Find the initial poly and the end poly on this map.
+ for (size_t i(0); i < polygons.size(); i++) {
+ const gd::Polygon &p = polygons[i];
+
+ // For each point cast a face and check the distance to the point
+ for (size_t point_id = 2; point_id < p.points.size(); point_id += 1) {
+
+ const Face3 f(p.points[point_id - 2].pos, p.points[point_id - 1].pos, p.points[point_id].pos);
+ const Vector3 inters = f.get_closest_point_to(p_point);
+ const real_t d = inters.distance_to(p_point);
+ if (d < closest_point_d) {
+ closest_point = inters;
+ closest_point_owner = p.owner->get_self();
+ closest_point_d = d;
+ }
+ }
+ }
+
+ return closest_point_owner;
+}
+
void NavMap::add_region(NavRegion *p_region) {
regions.push_back(p_region);
regenerate_links = true;
}
void NavMap::remove_region(NavRegion *p_region) {
- regions.push_back(p_region);
- regenerate_links = true;
+ std::vector<NavRegion *>::iterator it = std::find(regions.begin(), regions.end(), p_region);
+ if (it != regions.end()) {
+ regions.erase(it);
+ regenerate_links = true;
+ }
}
bool NavMap::has_agent(RvoAgent *agent) const {
@@ -516,6 +657,7 @@ void NavMap::sync() {
connection->get().B->edges[connection->get().B_edge].other_edge = connection->get().A_edge;
} else {
// The edge is already connected with another edge, skip.
+ ERR_PRINT("Attempted to merge a navigation mesh triangle edge with another already-merged edge. This happens when the Navigation's `cell_size` is different from the one used to generate the navigation mesh. This will cause navigation problem.");
}
}
}
diff --git a/modules/gdnavigation/nav_map.h b/modules/gdnavigation/nav_map.h
index 128a82580c..4543f00926 100644
--- a/modules/gdnavigation/nav_map.h
+++ b/modules/gdnavigation/nav_map.h
@@ -104,6 +104,10 @@ public:
gd::PointKey get_point_key(const Vector3 &p_pos) const;
Vector<Vector3> get_path(Vector3 p_origin, Vector3 p_destination, bool p_optimize) const;
+ Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const;
+ Vector3 get_closest_point(const Vector3 &p_point) const;
+ Vector3 get_closest_point_normal(const Vector3 &p_point) const;
+ RID get_closest_point_owner(const Vector3 &p_point) const;
void add_region(NavRegion *p_region);
void remove_region(NavRegion *p_region);
diff --git a/modules/gdnavigation/nav_region.cpp b/modules/gdnavigation/nav_region.cpp
index d2d9d8b517..0215821305 100644
--- a/modules/gdnavigation/nav_region.cpp
+++ b/modules/gdnavigation/nav_region.cpp
@@ -78,12 +78,12 @@ void NavRegion::update_polygons() {
if (mesh.is_null())
return;
- PoolVector<Vector3> vertices = mesh->get_vertices();
+ Vector<Vector3> vertices = mesh->get_vertices();
int len = vertices.size();
if (len == 0)
return;
- PoolVector<Vector3>::Read vertices_r = vertices.read();
+ const Vector3 *vertices_r = vertices.ptr();
polygons.resize(mesh->get_polygon_count());
diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp
index 13c74d5706..5c298ae9e4 100644
--- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp
+++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp
@@ -84,7 +84,7 @@ void NavigationMeshEditor::_clear_pressed() {
}
}
-void NavigationMeshEditor::edit(NavigationMeshInstance *p_nav_mesh_instance) {
+void NavigationMeshEditor::edit(NavigationRegion *p_nav_mesh_instance) {
if (p_nav_mesh_instance == NULL || node == p_nav_mesh_instance) {
return;
@@ -94,9 +94,6 @@ void NavigationMeshEditor::edit(NavigationMeshInstance *p_nav_mesh_instance) {
}
void NavigationMeshEditor::_bind_methods() {
-
- ClassDB::bind_method("_bake_pressed", &NavigationMeshEditor::_bake_pressed);
- ClassDB::bind_method("_clear_pressed", &NavigationMeshEditor::_clear_pressed);
}
NavigationMeshEditor::NavigationMeshEditor() {
@@ -107,13 +104,13 @@ NavigationMeshEditor::NavigationMeshEditor() {
bake_hbox->add_child(button_bake);
button_bake->set_toggle_mode(true);
button_bake->set_text(TTR("Bake NavMesh"));
- button_bake->connect("pressed", this, "_bake_pressed");
+ button_bake->connect("pressed", callable_mp(this, &NavigationMeshEditor::_bake_pressed));
button_reset = memnew(ToolButton);
bake_hbox->add_child(button_reset);
// No button text, we only use a revert icon which is set when entering the tree.
button_reset->set_tooltip(TTR("Clear the navigation mesh."));
- button_reset->connect("pressed", this, "_clear_pressed");
+ button_reset->connect("pressed", callable_mp(this, &NavigationMeshEditor::_clear_pressed));
bake_info = memnew(Label);
bake_hbox->add_child(bake_info);
@@ -128,12 +125,12 @@ NavigationMeshEditor::~NavigationMeshEditor() {
void NavigationMeshEditorPlugin::edit(Object *p_object) {
- navigation_mesh_editor->edit(Object::cast_to<NavigationMeshInstance>(p_object));
+ navigation_mesh_editor->edit(Object::cast_to<NavigationRegion>(p_object));
}
bool NavigationMeshEditorPlugin::handles(Object *p_object) const {
- return p_object->is_class("NavigationMeshInstance");
+ return p_object->is_class("NavigationRegion");
}
void NavigationMeshEditorPlugin::make_visible(bool p_visible) {
diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.h b/modules/gdnavigation/navigation_mesh_editor_plugin.h
index f5833f3d7f..7c3faebf57 100644
--- a/modules/gdnavigation/navigation_mesh_editor_plugin.h
+++ b/modules/gdnavigation/navigation_mesh_editor_plugin.h
@@ -36,7 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
-class NavigationMeshInstance;
+class NavigationRegion;
class NavigationMeshEditor : public Control {
friend class NavigationMeshEditorPlugin;
@@ -50,7 +50,7 @@ class NavigationMeshEditor : public Control {
ToolButton *button_reset;
Label *bake_info;
- NavigationMeshInstance *node;
+ NavigationRegion *node;
void _bake_pressed();
void _clear_pressed();
@@ -61,7 +61,7 @@ protected:
void _notification(int p_option);
public:
- void edit(NavigationMeshInstance *p_nav_mesh_instance);
+ void edit(NavigationRegion *p_nav_mesh_instance);
NavigationMeshEditor();
~NavigationMeshEditor();
};
diff --git a/modules/gdnavigation/navigation_mesh_generator.cpp b/modules/gdnavigation/navigation_mesh_generator.cpp
index 04b86fabc5..e7038b38a2 100644
--- a/modules/gdnavigation/navigation_mesh_generator.cpp
+++ b/modules/gdnavigation/navigation_mesh_generator.cpp
@@ -42,10 +42,10 @@
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/convex_polygon_shape.h"
#include "scene/resources/cylinder_shape.h"
-#include "scene/resources/plane_shape.h"
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/shape.h"
#include "scene/resources/sphere_shape.h"
+#include "scene/resources/world_margin_shape.h"
#include "modules/modules_enabled.gen.h"
#ifdef TOOLS_ENABLED
@@ -90,13 +90,13 @@ void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform
Array a = p_mesh->surface_get_arrays(i);
- PoolVector<Vector3> mesh_vertices = a[Mesh::ARRAY_VERTEX];
- PoolVector<Vector3>::Read vr = mesh_vertices.read();
+ Vector<Vector3> mesh_vertices = a[Mesh::ARRAY_VERTEX];
+ const Vector3 *vr = mesh_vertices.ptr();
if (p_mesh->surface_get_format(i) & Mesh::ARRAY_FORMAT_INDEX) {
- PoolVector<int> mesh_indices = a[Mesh::ARRAY_INDEX];
- PoolVector<int>::Read ir = mesh_indices.read();
+ Vector<int> mesh_indices = a[Mesh::ARRAY_INDEX];
+ const int *ir = mesh_indices.ptr();
for (int j = 0; j < mesh_vertices.size(); j++) {
_add_vertex(p_xform.xform(vr[j]), p_verticies);
@@ -123,7 +123,7 @@ void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform
}
}
-void NavigationMeshGenerator::_add_faces(const PoolVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices) {
+void NavigationMeshGenerator::_add_faces(const PackedVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices) {
int face_count = p_faces.size() / 3;
int current_vertex_count = p_verticies.size() / 3;
@@ -227,7 +227,7 @@ void NavigationMeshGenerator::_parse_geometry(Transform p_accumulated_transform,
Error err = QuickHull::build(varr, md);
if (err == OK) {
- PoolVector3Array faces;
+ PackedVector3Array faces;
for (int j = 0; j < md.faces.size(); ++j) {
Geometry::MeshData::Face face = md.faces[j];
@@ -279,11 +279,11 @@ void NavigationMeshGenerator::_parse_geometry(Transform p_accumulated_transform,
void NavigationMeshGenerator::_convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh) {
- PoolVector<Vector3> nav_vertices;
+ Vector<Vector3> nav_vertices;
for (int i = 0; i < p_detail_mesh->nverts; i++) {
const float *v = &p_detail_mesh->verts[i * 3];
- nav_vertices.append(Vector3(v[0], v[1], v[2]));
+ nav_vertices.push_back(Vector3(v[0], v[1], v[2]));
}
p_nav_mesh->set_vertices(nav_vertices);
@@ -562,7 +562,7 @@ void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node)
void NavigationMeshGenerator::clear(Ref<NavigationMesh> p_nav_mesh) {
if (p_nav_mesh.is_valid()) {
p_nav_mesh->clear_polygons();
- p_nav_mesh->set_vertices(PoolVector<Vector3>());
+ p_nav_mesh->set_vertices(Vector<Vector3>());
}
}
diff --git a/modules/gdnavigation/navigation_mesh_generator.h b/modules/gdnavigation/navigation_mesh_generator.h
index 107dee75e2..d1f2e4b56f 100644
--- a/modules/gdnavigation/navigation_mesh_generator.h
+++ b/modules/gdnavigation/navigation_mesh_generator.h
@@ -33,7 +33,7 @@
#ifndef _3D_DISABLED
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include <Recast.h>
@@ -51,7 +51,7 @@ protected:
static void _add_vertex(const Vector3 &p_vec3, Vector<float> &p_verticies);
static void _add_mesh(const Ref<Mesh> &p_mesh, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices);
- static void _add_faces(const PoolVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices);
+ static void _add_faces(const PackedVector3Array &p_faces, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices);
static void _parse_geometry(Transform p_accumulated_transform, Node *p_node, Vector<float> &p_verticies, Vector<int> &p_indices, int p_generate_from, uint32_t p_collision_mask, bool p_recurse_children);
static void _convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh);
diff --git a/modules/gdnavigation/rvo_agent.cpp b/modules/gdnavigation/rvo_agent.cpp
index 4d19bc15af..677e525bbf 100644
--- a/modules/gdnavigation/rvo_agent.cpp
+++ b/modules/gdnavigation/rvo_agent.cpp
@@ -74,7 +74,7 @@ void RvoAgent::dispatch_callback() {
callback.id = ObjectID();
}
- Variant::CallError responseCallError;
+ Callable::CallError responseCallError;
callback.new_velocity = Vector3(agent.newVelocity_.x(), agent.newVelocity_.y(), agent.newVelocity_.z());
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 9fc8ad5573..2f6f9f30a4 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -131,7 +131,7 @@
<method name="bytes2var">
<return type="Variant">
</return>
- <argument index="0" name="bytes" type="PoolByteArray">
+ <argument index="0" name="bytes" type="PackedByteArray">
</argument>
<argument index="1" name="allow_objects" type="bool" default="false">
</argument>
@@ -481,9 +481,13 @@
<argument index="2" name="weight" type="float">
</argument>
<description>
- Returns a normalized value considering the given range.
+ Returns a normalized value considering the given range. This is the opposite of [method lerp].
[codeblock]
- inverse_lerp(3, 5, 4) # Returns 0.5
+ var middle = lerp(20, 30, 0.75)
+ # `middle` is now 27.5.
+ # Now, we pretend to have forgotten the original ratio and want to get it back.
+ var ratio = inverse_lerp(20, 30, 27.5)
+ # `ratio` is now 0.75.
[/codeblock]
</description>
</method>
@@ -558,7 +562,7 @@
<argument index="2" name="weight" type="float">
</argument>
<description>
- Linearly interpolates between two values by a normalized value.
+ Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp].
If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float].
If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method).
[codeblock]
@@ -578,7 +582,7 @@
</argument>
<description>
Linearly interpolates between two angles (in radians) by a normalized value.
- Similar to [method lerp] but interpolate correctly when the angles wrap around [constant @GDScript.TAU].
+ Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
[codeblock]
extends Sprite
var elapsed = 0.0
@@ -596,7 +600,13 @@
<argument index="0" name="nrg" type="float">
</argument>
<description>
- Converts from linear energy to decibels (audio).
+ Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example:
+ [codeblock]
+ # "Slider" refers to a node that inherits Range such as HSlider or VSlider.
+ # Its range must be configured to go from 0 to 1.
+ # Change the bus name if you'd like to change the volume of a specific bus only.
+ AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear2db($Slider.value))
+ [/codeblock]
</description>
</method>
<method name="load">
@@ -1245,7 +1255,7 @@
</description>
</method>
<method name="var2bytes">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<argument index="0" name="var" type="Variant">
</argument>
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 5d0e93e117..62ccb93901 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="get_as_byte_code" qualifiers="const">
- <return type="PoolByteArray">
+ <return type="PackedByteArray">
</return>
<description>
Returns byte code for the script source code.
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 07c74a2e26..c641ce37c5 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -84,7 +84,7 @@ Object *GDScriptNativeClass::instance() {
return ClassDB::instance(name);
}
-GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error) {
+GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) {
/* STEP 1, CREATE */
@@ -104,46 +104,39 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco
/* STEP 2, INITIALIZE AND CONSTRUCT */
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->lock();
-#endif
-
- instances.insert(instance->owner);
+ {
+ MutexLock lock(GDScriptLanguage::singleton->lock);
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->unlock();
-#endif
+ instances.insert(instance->owner);
+ }
initializer->call(instance, p_args, p_argcount, r_error);
- if (r_error.error != Variant::CallError::CALL_OK) {
+ if (r_error.error != Callable::CallError::CALL_OK) {
instance->script = Ref<GDScript>();
instance->owner->set_script_instance(NULL);
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->lock();
-#endif
- instances.erase(p_owner);
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->unlock();
-#endif
+ {
+ MutexLock lock(GDScriptLanguage::singleton->lock);
+ instances.erase(p_owner);
+ }
- ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing
+ ERR_FAIL_COND_V(r_error.error != Callable::CallError::CALL_OK, NULL); //error constructing
}
//@TODO make thread safe
return instance;
}
-Variant GDScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant GDScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
/* STEP 1, CREATE */
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
REF ref;
Object *owner = NULL;
@@ -329,7 +322,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
}
}
- Variant::CallError unchecked_error;
+ Callable::CallError unchecked_error;
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error);
}
@@ -346,16 +339,9 @@ PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this)
bool GDScript::instance_has(const Object *p_this) const {
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->lock();
-#endif
- bool hasit = instances.has((Object *)p_this);
-
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->unlock();
-#endif
+ MutexLock lock(GDScriptLanguage::singleton->lock);
- return hasit;
+ return instances.has((Object *)p_this);
}
bool GDScript::has_source_code() const {
@@ -544,14 +530,12 @@ void GDScript::_set_subclass_path(Ref<GDScript> &p_sc, const String &p_path) {
Error GDScript::reload(bool p_keep_state) {
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->lock();
-#endif
- bool has_instances = instances.size();
+ bool has_instances;
+ {
+ MutexLock lock(GDScriptLanguage::singleton->lock);
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->unlock();
-#endif
+ has_instances = instances.size();
+ }
ERR_FAIL_COND_V(!p_keep_state && has_instances, ERR_ALREADY_IN_USE);
@@ -739,7 +723,7 @@ MultiplayerAPI::RPCMode GDScript::get_rset_mode(const StringName &p_variable) co
return get_rset_mode_by_id(get_rset_property_id(p_variable));
}
-Variant GDScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant GDScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
GDScript *top = this;
while (top) {
@@ -902,7 +886,7 @@ Error GDScript::load_byte_code(const String &p_path) {
Error GDScript::load_source_code(const String &p_path) {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
if (err) {
@@ -912,15 +896,15 @@ Error GDScript::load_source_code(const String &p_path) {
int len = f->get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
w[len] = 0;
String s;
- if (s.parse_utf8((const char *)w.ptr())) {
+ if (s.parse_utf8((const char *)w)) {
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
}
@@ -995,7 +979,6 @@ void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
GDScript::GDScript() :
script_list(this) {
- _static_ref = this;
valid = false;
subclass_count = 0;
initializer = NULL;
@@ -1008,13 +991,10 @@ GDScript::GDScript() :
#endif
#ifdef DEBUG_ENABLED
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->lock();
- }
- GDScriptLanguage::get_singleton()->script_list.add(&script_list);
+ {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->unlock();
+ GDScriptLanguage::get_singleton()->script_list.add(&script_list);
}
#endif
}
@@ -1058,13 +1038,10 @@ GDScript::~GDScript() {
_save_orphaned_subclasses();
#ifdef DEBUG_ENABLED
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->lock();
- }
- GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
+ {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->unlock();
+ GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
}
#endif
}
@@ -1082,18 +1059,18 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {
const GDScript::MemberInfo *member = &E->get();
if (member->setter) {
const Variant *val = &p_value;
- Variant::CallError err;
+ Callable::CallError err;
call(member->setter, &val, 1, err);
- if (err.error == Variant::CallError::CALL_OK) {
+ if (err.error == Callable::CallError::CALL_OK) {
return true; //function exists, call was successful
}
} else {
if (!member->data_type.is_type(p_value)) {
// Try conversion
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *value = &p_value;
Variant converted = Variant::construct(member->data_type.builtin_type, &value, 1, ce);
- if (ce.error == Variant::CallError::CALL_OK) {
+ if (ce.error == Callable::CallError::CALL_OK) {
members.write[member->index] = converted;
return true;
} else {
@@ -1116,9 +1093,9 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {
Variant name = p_name;
const Variant *args[2] = { &name, &p_value };
- Variant::CallError err;
+ Callable::CallError err;
Variant ret = E->get()->call(this, (const Variant **)args, 2, err);
- if (err.error == Variant::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool())
+ if (err.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool())
return true;
}
sptr = sptr->_base;
@@ -1136,9 +1113,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name);
if (E) {
if (E->get().getter) {
- Variant::CallError err;
+ Callable::CallError err;
r_ret = const_cast<GDScriptInstance *>(this)->call(E->get().getter, NULL, 0, err);
- if (err.error == Variant::CallError::CALL_OK) {
+ if (err.error == Callable::CallError::CALL_OK) {
return true;
}
}
@@ -1167,9 +1144,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
Variant name = p_name;
const Variant *args[1] = { &name };
- Variant::CallError err;
+ Callable::CallError err;
Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err);
- if (err.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
+ if (err.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
r_ret = ret;
return true;
}
@@ -1210,9 +1187,9 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const
const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list);
if (E) {
- Variant::CallError err;
+ Callable::CallError err;
Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), NULL, 0, err);
- if (err.error == Variant::CallError::CALL_OK) {
+ if (err.error == Callable::CallError::CALL_OK) {
ERR_FAIL_COND_MSG(ret.get_type() != Variant::ARRAY, "Wrong type for _get_property_list, must be an array of dictionaries.");
@@ -1297,7 +1274,7 @@ bool GDScriptInstance::has_method(const StringName &p_method) const {
return false;
}
-Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
GDScript *sptr = script.ptr();
while (sptr) {
@@ -1307,14 +1284,14 @@ Variant GDScriptInstance::call(const StringName &p_method, const Variant **p_arg
}
sptr = sptr->_base;
}
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
void GDScriptInstance::call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) {
GDScript *sptr = script.ptr();
- Variant::CallError ce;
+ Callable::CallError ce;
while (sptr) {
Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method);
@@ -1330,7 +1307,7 @@ void GDScriptInstance::_ml_call_reversed(GDScript *sptr, const StringName &p_met
if (sptr->_base)
_ml_call_reversed(sptr->_base, p_method, p_args, p_argcount);
- Variant::CallError ce;
+ Callable::CallError ce;
Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method);
if (E) {
@@ -1355,9 +1332,9 @@ void GDScriptInstance::notification(int p_notification) {
while (sptr) {
Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification);
if (E) {
- Variant::CallError err;
+ Callable::CallError err;
E->get()->call(this, args, 1, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
//print error about notification call
}
}
@@ -1367,9 +1344,9 @@ void GDScriptInstance::notification(int p_notification) {
String GDScriptInstance::to_string(bool *r_valid) {
if (has_method(CoreStringNames::get_singleton()->_to_string)) {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce);
- if (ce.error == Variant::CallError::CALL_OK) {
+ if (ce.error == Callable::CallError::CALL_OK) {
if (ret.get_type() != Variant::STRING) {
if (r_valid)
*r_valid = false;
@@ -1473,14 +1450,9 @@ GDScriptInstance::GDScriptInstance() {
GDScriptInstance::~GDScriptInstance() {
if (script.is_valid() && owner) {
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->lock();
-#endif
+ MutexLock lock(GDScriptLanguage::singleton->lock);
script->instances.erase(owner);
-#ifndef NO_THREADS
- GDScriptLanguage::singleton->lock->unlock();
-#endif
}
}
@@ -1581,9 +1553,7 @@ void GDScriptLanguage::finish() {
void GDScriptLanguage::profiling_start() {
#ifdef DEBUG_ENABLED
- if (lock) {
- lock->lock();
- }
+ MutexLock lock(this->lock);
SelfList<GDScriptFunction> *elem = function_list.first();
while (elem) {
@@ -1600,25 +1570,15 @@ void GDScriptLanguage::profiling_start() {
}
profiling = true;
- if (lock) {
- lock->unlock();
- }
-
#endif
}
void GDScriptLanguage::profiling_stop() {
#ifdef DEBUG_ENABLED
- if (lock) {
- lock->lock();
- }
+ MutexLock lock(this->lock);
profiling = false;
- if (lock) {
- lock->unlock();
- }
-
#endif
}
@@ -1626,9 +1586,8 @@ int GDScriptLanguage::profiling_get_accumulated_data(ProfilingInfo *p_info_arr,
int current = 0;
#ifdef DEBUG_ENABLED
- if (lock) {
- lock->lock();
- }
+
+ MutexLock lock(this->lock);
SelfList<GDScriptFunction> *elem = function_list.first();
while (elem) {
@@ -1641,11 +1600,6 @@ int GDScriptLanguage::profiling_get_accumulated_data(ProfilingInfo *p_info_arr,
elem = elem->next();
current++;
}
-
- if (lock) {
- lock->unlock();
- }
-
#endif
return current;
@@ -1656,9 +1610,7 @@ int GDScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_
int current = 0;
#ifdef DEBUG_ENABLED
- if (lock) {
- lock->lock();
- }
+ MutexLock lock(this->lock);
SelfList<GDScriptFunction> *elem = function_list.first();
while (elem) {
@@ -1673,11 +1625,6 @@ int GDScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_
}
elem = elem->next();
}
-
- if (lock) {
- lock->unlock();
- }
-
#endif
return current;
@@ -1708,23 +1655,18 @@ void GDScriptLanguage::reload_all_scripts() {
#ifdef DEBUG_ENABLED
print_verbose("GDScript: Reloading all scripts");
- if (lock) {
- lock->lock();
- }
-
List<Ref<GDScript> > scripts;
+ {
+ MutexLock lock(this->lock);
- SelfList<GDScript> *elem = script_list.first();
- while (elem) {
- if (elem->self()->get_path().is_resource_file()) {
- print_verbose("GDScript: Found: " + elem->self()->get_path());
- scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
+ SelfList<GDScript> *elem = script_list.first();
+ while (elem) {
+ if (elem->self()->get_path().is_resource_file()) {
+ print_verbose("GDScript: Found: " + elem->self()->get_path());
+ scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
+ }
+ elem = elem->next();
}
- elem = elem->next();
- }
-
- if (lock) {
- lock->unlock();
}
//as scripts are going to be reloaded, must proceed without locking here
@@ -1744,23 +1686,18 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so
#ifdef DEBUG_ENABLED
- if (lock) {
- lock->lock();
- }
-
List<Ref<GDScript> > scripts;
+ {
+ MutexLock lock(this->lock);
- SelfList<GDScript> *elem = script_list.first();
- while (elem) {
- if (elem->self()->get_path().is_resource_file()) {
+ SelfList<GDScript> *elem = script_list.first();
+ while (elem) {
+ if (elem->self()->get_path().is_resource_file()) {
- scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
+ scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
+ }
+ elem = elem->next();
}
- elem = elem->next();
- }
-
- if (lock) {
- lock->unlock();
}
//when someone asks you why dynamically typed languages are easier to write....
@@ -1880,9 +1817,7 @@ void GDScriptLanguage::frame() {
#ifdef DEBUG_ENABLED
if (profiling) {
- if (lock) {
- lock->lock();
- }
+ MutexLock lock(this->lock);
SelfList<GDScriptFunction> *elem = function_list.first();
while (elem) {
@@ -1894,10 +1829,6 @@ void GDScriptLanguage::frame() {
elem->self()->profile.frame_total_time = 0;
elem = elem->next();
}
-
- if (lock) {
- lock->unlock();
- }
}
#endif
@@ -1986,7 +1917,7 @@ bool GDScriptLanguage::handles_global_class_type(const String &p_type) const {
String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err);
if (err) {
@@ -2263,11 +2194,6 @@ GDScriptLanguage::GDScriptLanguage() {
_debug_parse_err_line = -1;
_debug_parse_err_file = "";
-#ifdef NO_THREADS
- lock = NULL;
-#else
- lock = Mutex::create();
-#endif
profiling = false;
script_frame_time = 0;
@@ -2301,10 +2227,6 @@ GDScriptLanguage::GDScriptLanguage() {
GDScriptLanguage::~GDScriptLanguage() {
- if (lock) {
- memdelete(lock);
- lock = NULL;
- }
if (_call_stack) {
memdelete_arr(_call_stack);
}
@@ -2329,7 +2251,7 @@ Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_na
/*************** RESOURCE ***************/
-RES ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 3d24f9b3f5..3a90f0fc20 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -73,7 +73,6 @@ class GDScript : public Script {
friend class GDScriptFunctions;
friend class GDScriptLanguage;
- Variant _static_ref; //used for static call
Ref<GDScriptNativeClass> native;
Ref<GDScript> base;
GDScript *_base; //fast pointer access
@@ -116,7 +115,7 @@ class GDScript : public Script {
String fully_qualified_name;
SelfList<GDScript> script_list;
- GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error);
+ GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error);
void _set_subclass_path(Ref<GDScript> &p_sc, const String &p_path);
@@ -141,7 +140,7 @@ protected:
bool _set(const StringName &p_name, const Variant &p_value);
void _get_property_list(List<PropertyInfo> *p_properties) const;
- Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
//void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount);
static void _bind_methods();
@@ -170,7 +169,7 @@ public:
const Map<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only
StringName debug_get_member_by_index(int p_idx) const;
- Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual bool can_instance() const;
virtual Ref<Script> get_base_script() const;
@@ -262,7 +261,7 @@ public:
virtual void get_method_list(List<MethodInfo> *p_list) const;
virtual bool has_method(const StringName &p_method) const;
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount);
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
@@ -370,7 +369,7 @@ class GDScriptLanguage : public ScriptLanguage {
friend class GDScriptInstance;
- Mutex *lock;
+ Mutex lock;
friend class GDScript;
@@ -487,7 +486,7 @@ public:
virtual bool supports_builtin_mode() const;
virtual bool can_inherit_from_file() { return true; }
virtual int find_function(const String &p_function, const String &p_code) const;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List<ScriptCodeCompletionOption> *r_options, bool &r_forced, String &r_call_hint);
#ifdef TOOLS_ENABLED
virtual Error lookup_code(const String &p_code, const String &p_symbol, const String &p_path, Object *p_owner, LookupResult &r_result);
@@ -543,7 +542,7 @@ public:
class ResourceFormatLoaderGDScript : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index fba1b992ec..4bd425f999 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2076,10 +2076,10 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa
/* STEP 2, INITIALIZE AND CONSTRUCT */
- Variant::CallError ce;
+ Callable::CallError ce;
p_script->initializer->call(instance, NULL, 0, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
//well, tough luck, not goinna do anything here
}
}
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index c2c8ff5b99..1bc1aae0d2 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -457,7 +457,7 @@ void GDScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_cons
p_constants->push_back(nan);
}
-String GDScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const {
+String GDScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
#ifdef TOOLS_ENABLED
bool th = EditorSettings::get_singleton()->get_setting("text_editor/completion/add_type_hints");
@@ -905,10 +905,10 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
argptr.push_back(&args[i]);
}
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = mb->call(baseptr, (const Variant **)argptr.ptr(), argptr.size(), ce);
- if (ce.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
+ if (ce.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
if (ret.get_type() != Variant::OBJECT || ret.operator Object *() != NULL) {
r_type = _type_from_variant(ret);
found = true;
@@ -1060,7 +1060,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
StringName id = index.value;
found = _guess_identifier_type_from_base(c, base, id, r_type);
} else if (!found && index.type.kind == GDScriptParser::DataType::BUILTIN) {
- Variant::CallError err;
+ Callable::CallError err;
Variant base_val = Variant::construct(base.type.builtin_type, NULL, 0, err);
bool valid = false;
Variant res = base_val.get(index.value, &valid);
@@ -1114,7 +1114,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
break;
}
- Variant::CallError ce;
+ Callable::CallError ce;
bool v1_use_value = p1.value.get_type() != Variant::NIL && p1.value.get_type() != Variant::OBJECT;
Variant v1 = (v1_use_value) ? p1.value : Variant::construct(p1.type.builtin_type, NULL, 0, ce);
bool v2_use_value = p2.value.get_type() != Variant::NIL && p2.value.get_type() != Variant::OBJECT;
@@ -1124,7 +1124,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
v2 = 1;
v2_use_value = false;
}
- if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::REAL) {
+ if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::FLOAT) {
v2 = 1.0;
v2_use_value = false;
}
@@ -1533,10 +1533,10 @@ static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_contex
return false;
} break;
case GDScriptParser::DataType::BUILTIN: {
- Variant::CallError err;
+ Callable::CallError err;
Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
return false;
}
bool valid = false;
@@ -1703,9 +1703,9 @@ static bool _guess_method_return_type_from_base(GDScriptCompletionContext &p_con
return false;
} break;
case GDScriptParser::DataType::BUILTIN: {
- Variant::CallError err;
+ Callable::CallError err;
Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
return false;
}
@@ -2088,9 +2088,9 @@ static void _find_identifiers_in_base(const GDScriptCompletionContext &p_context
return;
} break;
case GDScriptParser::DataType::BUILTIN: {
- Variant::CallError err;
+ Callable::CallError err;
Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
return;
}
@@ -2172,9 +2172,9 @@ static void _find_identifiers(const GDScriptCompletionContext &p_context, bool p
}
static const char *_type_names[Variant::VARIANT_MAX] = {
- "null", "bool", "int", "float", "String", "Vector2", "Rect2", "Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform",
- "Color", "NodePath", "RID", "Object", "Dictionary", "Array", "PoolByteArray", "PoolIntArray", "PoolRealArray", "PoolStringArray",
- "PoolVector2Array", "PoolVector3Array", "PoolColorArray"
+ "null", "bool", "int", "float", "String", "Vector2", "Vector2i", "Rect2", "Rect2i", "Vector3", "Vector3i", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform",
+ "Color", "StringName", "NodePath", "RID", "Object", "Callable", "Signal", "Dictionary", "Array", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "PackedFloat32Array", "PackedFloat64Array", "PackedStringArray",
+ "PackedVector2Array", "PackedVector3Array", "PackedColorArray"
};
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
@@ -2372,9 +2372,9 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
} break;
case GDScriptParser::DataType::BUILTIN: {
if (base.get_type() == Variant::NIL) {
- Variant::CallError err;
+ Callable::CallError err;
base = Variant::construct(base_type.builtin_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
return;
}
}
@@ -2565,7 +2565,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
} break;
case GDScriptParser::COMPLETION_FUNCTION: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_IDENTIFIER: {
_find_identifiers(context, is_function, options);
@@ -2608,7 +2608,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
} break;
case GDScriptParser::COMPLETION_METHOD: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_INDEX: {
const GDScriptParser::Node *node = parser.get_completion_node();
@@ -3219,9 +3219,9 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
v_ref.instance();
v = v_ref;
} else {
- Variant::CallError err;
+ Callable::CallError err;
v = Variant::construct(base_type.builtin_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
break;
}
}
@@ -3330,7 +3330,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
case GDScriptParser::COMPLETION_PARENT_FUNCTION:
case GDScriptParser::COMPLETION_FUNCTION: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_IDENTIFIER: {
@@ -3462,7 +3462,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
} break;
case GDScriptParser::COMPLETION_METHOD: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_INDEX: {
const GDScriptParser::Node *node = parser.get_completion_node();
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index cbf7d81a61..79c550c81c 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -34,7 +34,7 @@
#include "gdscript.h"
#include "gdscript_functions.h"
-Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant *p_stack, String &r_error) const {
+Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant &static_ref, Variant *p_stack, String &r_error) const {
int address = p_address & ADDR_MASK;
@@ -52,7 +52,7 @@ Variant *GDScriptFunction::_get_variant(int p_address, GDScriptInstance *p_insta
} break;
case ADDR_TYPE_CLASS: {
- return &p_script->_static_ref;
+ return &static_ref;
} break;
case ADDR_TYPE_MEMBER: {
#ifdef DEBUG_ENABLED
@@ -160,11 +160,11 @@ static String _get_var_type(const Variant *p_var) {
}
#endif // DEBUG_ENABLED
-String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const {
+String GDScriptFunction::_get_call_error(const Callable::CallError &p_err, const String &p_where, const Variant **argptrs) const {
String err_text;
- if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ if (p_err.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) {
int errorarg = p_err.argument;
// Handle the Object to Object case separately as we don't have further class details.
#ifdef DEBUG_ENABLED
@@ -173,15 +173,15 @@ String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const
} else
#endif // DEBUG_ENABLED
{
- err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(p_err.expected) + ".";
+ err_text = "Invalid type in " + p_where + ". Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(p_err.expected)) + ".";
}
- } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
+ } else if (p_err.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
+ } else if (p_err.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
err_text = "Invalid call to " + p_where + ". Expected " + itos(p_err.argument) + " arguments.";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ } else if (p_err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
err_text = "Invalid call. Nonexistent " + p_where + ".";
- } else if (p_err.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
+ } else if (p_err.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
err_text = "Attempt to call " + p_where + " on a null instance.";
} else {
err_text = "Bug, call error: #" + itos(p_err.error);
@@ -258,7 +258,7 @@ String GDScriptFunction::_get_call_error(const Variant::CallError &p_err, const
#define OPCODE_OUT break
#endif
-Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Variant::CallError &r_err, CallState *p_state) {
+Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state) {
OPCODES_TABLE;
@@ -267,9 +267,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
return Variant();
}
- r_err.error = Variant::CallError::CALL_OK;
+ r_err.error = Callable::CallError::CALL_OK;
Variant self;
+ Variant static_ref;
Variant retvalue;
Variant *stack = NULL;
Variant **call_args;
@@ -305,13 +306,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
if (p_argcount > _argument_count) {
- r_err.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_err.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_err.argument = _argument_count;
return Variant();
} else if (p_argcount < _argument_count - _default_arg_count) {
- r_err.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_err.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_err.argument = _argument_count - _default_arg_count;
return Variant();
} else {
@@ -340,7 +341,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
memnew_placement(&stack[i], Variant);
continue;
} else {
- r_err.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_err.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_err.argument = i;
r_err.expected = argument_types[i].kind == GDScriptDataType::BUILTIN ? argument_types[i].builtin_type : Variant::OBJECT;
return Variant();
@@ -404,10 +405,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
#define CHECK_SPACE(m_space) \
GD_ERR_BREAK((ip + m_space) > _code_size)
-#define GET_VARIANT_PTR(m_v, m_code_ofs) \
- Variant *m_v; \
- m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, stack, err_text); \
- if (unlikely(!m_v)) \
+#define GET_VARIANT_PTR(m_v, m_code_ofs) \
+ Variant *m_v; \
+ m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, static_ref, stack, err_text); \
+ if (unlikely(!m_v)) \
OPCODE_BREAK;
#else
@@ -415,7 +416,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
#define CHECK_SPACE(m_space)
#define GET_VARIANT_PTR(m_v, m_code_ofs) \
Variant *m_v; \
- m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, stack, err_text);
+ m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, script, self, static_ref, stack, err_text);
#endif
@@ -791,7 +792,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
#ifdef DEBUG_ENABLED
if (Variant::can_convert_strict(src->get_type(), var_type)) {
#endif // DEBUG_ENABLED
- Variant::CallError ce;
+ Callable::CallError ce;
*dst = Variant::construct(var_type, const_cast<const Variant **>(&src), 1, ce);
} else {
#ifdef DEBUG_ENABLED
@@ -897,11 +898,11 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
GD_ERR_BREAK(to_type < 0 || to_type >= Variant::VARIANT_MAX);
- Variant::CallError err;
+ Callable::CallError err;
*dst = Variant::construct(to_type, (const Variant **)&src, 1, err);
#ifdef DEBUG_ENABLED
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
err_text = "Invalid cast: could not convert value to '" + Variant::get_type_name(to_type) + "'.";
OPCODE_BREAK;
}
@@ -1000,11 +1001,11 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
}
GET_VARIANT_PTR(dst, 3 + argc);
- Variant::CallError err;
+ Callable::CallError err;
*dst = Variant::construct(t, (const Variant **)argptrs, argc, err);
#ifdef DEBUG_ENABLED
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
err_text = _get_call_error(err, "'" + Variant::get_type_name(t) + "' constructor", (const Variant **)argptrs);
OPCODE_BREAK;
@@ -1091,7 +1092,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
}
#endif
- Variant::CallError err;
+ Callable::CallError err;
if (call_ret) {
GET_VARIANT_PTR(ret, argc);
@@ -1105,7 +1106,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
function_call_time += OS::get_singleton()->get_ticks_usec() - call_time;
}
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
String methodstr = *methodname;
String basestr = _get_var_type(base);
@@ -1113,13 +1114,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
if (methodstr == "call") {
if (argc >= 1) {
methodstr = String(*argptrs[0]) + " (via call)";
- if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ if (err.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) {
err.argument += 1;
}
}
} else if (methodstr == "free") {
- if (err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ if (err.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
if (base->is_ref()) {
err_text = "Attempted to free a reference.";
@@ -1160,12 +1161,12 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
GET_VARIANT_PTR(dst, argc);
- Variant::CallError err;
+ Callable::CallError err;
GDScriptFunctions::call(func, (const Variant **)argptrs, argc, *dst, err);
#ifdef DEBUG_ENABLED
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
String methodstr = GDScriptFunctions::get_func_name(func);
if (dst->get_type() == Variant::STRING) {
@@ -1223,7 +1224,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
break;
}
- Variant::CallError err;
+ Callable::CallError err;
if (E) {
@@ -1234,23 +1235,23 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
MethodBind *mb = ClassDB::get_method(gds->native->get_name(), *methodname);
if (!mb) {
- err.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ err.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
} else {
*dst = mb->call(p_instance->owner, (const Variant **)argptrs, argc, err);
}
} else {
- err.error = Variant::CallError::CALL_OK;
+ err.error = Callable::CallError::CALL_OK;
}
} else {
if (*methodname != GDScriptLanguage::get_singleton()->strings._init) {
- err.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ err.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
} else {
- err.error = Variant::CallError::CALL_OK;
+ err.error = Callable::CallError::CALL_OK;
}
}
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
String methodstr = *methodname;
err_text = _get_call_error(err, "function '" + methodstr + "'", (const Variant **)argptrs);
@@ -1331,7 +1332,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
OPCODE_BREAK;
}
- Error err = obj->connect(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT);
+ Error err = obj->connect_compat(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT);
if (err != OK) {
err_text = "Error connecting to signal: " + signal + " during yield().";
OPCODE_BREAK;
@@ -1340,7 +1341,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
Object *obj = argobj->operator Object *();
String signal = argname->operator String();
- obj->connect(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT);
+ obj->connect_compat(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT);
#endif
}
@@ -1768,13 +1769,10 @@ GDScriptFunction::GDScriptFunction() :
#ifdef DEBUG_ENABLED
_func_cname = NULL;
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->lock();
- }
- GDScriptLanguage::get_singleton()->function_list.add(&function_list);
+ {
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->unlock();
+ GDScriptLanguage::get_singleton()->function_list.add(&function_list);
}
profile.call_count = 0;
@@ -1792,26 +1790,22 @@ GDScriptFunction::GDScriptFunction() :
GDScriptFunction::~GDScriptFunction() {
#ifdef DEBUG_ENABLED
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->lock();
- }
- GDScriptLanguage::get_singleton()->function_list.remove(&function_list);
- if (GDScriptLanguage::get_singleton()->lock) {
- GDScriptLanguage::get_singleton()->lock->unlock();
- }
+ MutexLock lock(GDScriptLanguage::get_singleton()->lock);
+
+ GDScriptLanguage::get_singleton()->function_list.remove(&function_list);
#endif
}
/////////////////////
-Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
Variant arg;
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
if (p_argcount == 0) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
return Variant();
} else if (p_argcount == 1) {
@@ -1829,7 +1823,7 @@ Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_ar
Ref<GDScriptFunctionState> self = *p_args[p_argcount - 1];
if (self.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_argcount - 1;
r_error.expected = Variant::OBJECT;
return Variant();
@@ -1864,7 +1858,7 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) {
}
state.result = p_arg;
- Variant::CallError err;
+ Callable::CallError err;
Variant ret = function->call(NULL, NULL, 0, err, &state);
bool completed = true;
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index 7b7bcbaac9..34019e563d 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -265,8 +265,8 @@ private:
List<StackDebug> stack_debug;
- _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant *p_stack, String &r_error) const;
- _FORCE_INLINE_ String _get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const;
+ _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant &static_ref, Variant *p_stack, String &r_error) const;
+ _FORCE_INLINE_ String _get_call_error(const Callable::CallError &p_err, const String &p_where, const Variant **argptrs) const;
friend class GDScriptLanguage;
@@ -339,7 +339,7 @@ public:
return default_arguments[p_idx];
}
- Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Variant::CallError &r_err, CallState *p_state = NULL);
+ Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state = NULL);
_FORCE_INLINE_ MultiplayerAPI::RPCMode get_rpc_mode() const { return rpc_mode; }
GDScriptFunction();
@@ -352,7 +352,7 @@ class GDScriptFunctionState : public Reference {
friend class GDScriptFunction;
GDScriptFunction *function;
GDScriptFunction::CallState state;
- Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Ref<GDScriptFunctionState> first_state;
protected:
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index a46337d7dd..aaa308f40f 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -139,32 +139,32 @@ const char *GDScriptFunctions::get_func_name(Function p_func) {
return _names[p_func];
}
-void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Variant::CallError &r_error) {
+void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
#ifdef DEBUG_ENABLED
-#define VALIDATE_ARG_COUNT(m_count) \
- if (p_arg_count < m_count) { \
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; \
- r_error.argument = m_count; \
- r_ret = Variant(); \
- return; \
- } \
- if (p_arg_count > m_count) { \
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; \
- r_error.argument = m_count; \
- r_ret = Variant(); \
- return; \
+#define VALIDATE_ARG_COUNT(m_count) \
+ if (p_arg_count < m_count) { \
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; \
+ r_error.argument = m_count; \
+ r_ret = Variant(); \
+ return; \
+ } \
+ if (p_arg_count > m_count) { \
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; \
+ r_error.argument = m_count; \
+ r_ret = Variant(); \
+ return; \
}
-#define VALIDATE_ARG_NUM(m_arg) \
- if (!p_args[m_arg]->is_num()) { \
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \
- r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
- r_ret = Variant(); \
- return; \
+#define VALIDATE_ARG_NUM(m_arg) \
+ if (!p_args[m_arg]->is_num()) { \
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
+ r_error.argument = m_arg; \
+ r_error.expected = Variant::FLOAT; \
+ r_ret = Variant(); \
+ return; \
}
#else
@@ -272,15 +272,15 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
int64_t i = *p_args[0];
r_ret = ABS(i);
- } else if (p_args[0]->get_type() == Variant::REAL) {
+ } else if (p_args[0]->get_type() == Variant::FLOAT) {
double r = *p_args[0];
r_ret = Math::abs(r);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
r_ret = Variant();
}
} break;
@@ -290,15 +290,15 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
int64_t i = *p_args[0];
r_ret = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_args[0]->get_type() == Variant::REAL) {
+ } else if (p_args[0]->get_type() == Variant::FLOAT) {
real_t r = *p_args[0];
r_ret = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
r_ret = Variant();
}
} break;
@@ -360,12 +360,12 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_COUNT(3);
VALIDATE_ARG_NUM(2);
const double t = (double)*p_args[2];
- switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::REAL) {
+ switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::FLOAT) {
case Variant::VECTOR2: {
r_ret = ((Vector2)*p_args[0]).linear_interpolate((Vector2)*p_args[1], t);
} break;
case Variant::VECTOR3: {
- r_ret = ((Vector3)*p_args[0]).linear_interpolate((Vector3)*p_args[1], t);
+ r_ret = (p_args[0]->operator Vector3()).linear_interpolate(p_args[1]->operator Vector3(), t);
} break;
case Variant::COLOR: {
r_ret = ((Color)*p_args[0]).linear_interpolate((Color)*p_args[1], t);
@@ -585,7 +585,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Ref<WeakRef> wref = memnew(WeakRef);
r_ret = wref;
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = Variant();
@@ -596,7 +596,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_COUNT(2);
if (p_args[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = Variant();
@@ -604,7 +604,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
if (p_args[1]->get_type() != Variant::STRING && p_args[1]->get_type() != Variant::NODE_PATH) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -626,7 +626,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (type < 0 || type >= Variant::VARIANT_MAX) {
r_ret = RTR("Invalid type argument to convert(), use TYPE_* constants.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
return;
@@ -660,7 +660,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -671,7 +671,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (str.length() != 1) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = RTR("Expected a string of length 1 (a character).");
@@ -683,7 +683,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
} break;
case TEXT_STR: {
if (p_arg_count < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
r_ret = Variant();
@@ -785,7 +785,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case PUSH_ERROR: {
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -799,7 +799,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case PUSH_WARNING: {
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -819,7 +819,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case STR_TO_VAR: {
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -837,17 +837,17 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case VAR_TO_BYTES: {
bool full_objects = false;
if (p_arg_count < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
r_ret = Variant();
return;
} else if (p_arg_count > 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = 2;
r_ret = Variant();
} else if (p_arg_count == 2) {
if (p_args[1]->get_type() != Variant::BOOL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::BOOL;
r_ret = Variant();
@@ -856,11 +856,11 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
full_objects = *p_args[1];
}
- PoolByteArray barr;
+ PackedByteArray barr;
int len;
Error err = encode_variant(*p_args[0], NULL, len, full_objects);
if (err) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::NIL;
r_ret = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).";
@@ -869,25 +869,25 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
barr.resize(len);
{
- PoolByteArray::Write w = barr.write();
- encode_variant(*p_args[0], w.ptr(), len, full_objects);
+ uint8_t *w = barr.ptrw();
+ encode_variant(*p_args[0], w, len, full_objects);
}
r_ret = barr;
} break;
case BYTES_TO_VAR: {
bool allow_objects = false;
if (p_arg_count < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
r_ret = Variant();
return;
} else if (p_arg_count > 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = 2;
r_ret = Variant();
} else if (p_arg_count == 2) {
if (p_args[1]->get_type() != Variant::BOOL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::BOOL;
r_ret = Variant();
@@ -896,24 +896,24 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
allow_objects = *p_args[1];
}
- if (p_args[0]->get_type() != Variant::POOL_BYTE_ARRAY) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::PACKED_BYTE_ARRAY) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
r_ret = Variant();
return;
}
- PoolByteArray varr = *p_args[0];
+ PackedByteArray varr = *p_args[0];
Variant ret;
{
- PoolByteArray::Read r = varr.read();
- Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects);
+ const uint8_t *r = varr.ptr();
+ Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects);
if (err != OK) {
r_ret = RTR("Not enough bytes for decoding bytes, or invalid format.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
}
@@ -927,7 +927,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case 0: {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
r_ret = Variant();
@@ -943,7 +943,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
Error err = arr.resize(count);
if (err != OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_ret = Variant();
return;
}
@@ -969,7 +969,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
Error err = arr.resize(to - from);
if (err != OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_ret = Variant();
return;
}
@@ -989,7 +989,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (incr == 0) {
r_ret = RTR("Step argument is zero!");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return;
}
@@ -1016,7 +1016,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Error err = arr.resize(count);
if (err != OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_ret = Variant();
return;
}
@@ -1038,7 +1038,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
} break;
default: {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = 3;
r_ret = Variant();
@@ -1049,7 +1049,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case RESOURCE_LOAD: {
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -1065,7 +1065,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (p_args[0]->get_type() == Variant::NIL) {
r_ret = Variant();
} else if (p_args[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_ret = Variant();
} else {
@@ -1076,7 +1076,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
} else if (!obj->get_script_instance() || obj->get_script_instance()->get_language() != GDScriptLanguage::get_singleton()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::DICTIONARY;
r_ret = RTR("Not a script with an instance");
@@ -1087,7 +1087,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Ref<GDScript> base = ins->get_script();
if (base.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::DICTIONARY;
r_ret = RTR("Not based on a script");
@@ -1105,7 +1105,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
sname.invert();
if (!p->path.is_resource_file()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::DICTIONARY;
r_ret = Variant();
@@ -1137,7 +1137,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (p_args[0]->get_type() != Variant::DICTIONARY) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::DICTIONARY;
r_ret = Variant();
@@ -1149,7 +1149,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (!d.has("@path")) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = RTR("Invalid instance dictionary format (missing @path)");
@@ -1160,7 +1160,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Ref<Script> scr = ResourceLoader::load(d["@path"]);
if (!scr.is_valid()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = RTR("Invalid instance dictionary format (can't load script at @path)");
@@ -1171,7 +1171,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (!gdscr.is_valid()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = Variant();
@@ -1189,7 +1189,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
gdscr = gdscr->subclasses[sub.get_name(i)];
if (!gdscr.is_valid()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = Variant();
@@ -1215,7 +1215,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -1239,7 +1239,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_COUNT(1);
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
r_ret = Variant();
@@ -1271,14 +1271,14 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case COLOR8: {
if (p_arg_count < 3) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 3;
r_ret = Variant();
return;
}
if (p_arg_count > 4) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = 4;
r_ret = Variant();
@@ -1302,21 +1302,21 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case COLORN: {
if (p_arg_count < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
r_ret = Variant();
return;
}
if (p_arg_count > 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = 2;
r_ret = Variant();
return;
}
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_ret = Variant();
} else {
@@ -1359,8 +1359,8 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case INSTANCE_FROM_ID: {
VALIDATE_ARG_COUNT(1);
- if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::REAL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::FLOAT) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
r_ret = Variant();
@@ -1390,43 +1390,53 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Array d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_BYTE_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY: {
- PoolVector<uint8_t> d = *p_args[0];
+ Vector<uint8_t> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- PoolVector<int> d = *p_args[0];
+ Vector<int32_t> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
- PoolVector<real_t> d = *p_args[0];
+ Vector<int64_t> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_STRING_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
- PoolVector<String> d = *p_args[0];
+ Vector<float> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
- PoolVector<Vector2> d = *p_args[0];
+ Vector<double> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_STRING_ARRAY: {
- PoolVector<Vector3> d = *p_args[0];
+ Vector<String> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_VECTOR2_ARRAY: {
- PoolVector<Color> d = *p_args[0];
+ Vector<Vector2> d = *p_args[0];
+ r_ret = d.size();
+ } break;
+ case Variant::PACKED_VECTOR3_ARRAY: {
+
+ Vector<Vector3> d = *p_args[0];
+ r_ret = d.size();
+ } break;
+ case Variant::PACKED_COLOR_ARRAY: {
+
+ Vector<Color> d = *p_args[0];
r_ret = d.size();
} break;
default: {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
r_ret = Variant();
@@ -1530,69 +1540,69 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
switch (p_func) {
case MATH_SIN: {
- MethodInfo mi("sin", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sin", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_COS: {
- MethodInfo mi("cos", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("cos", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_TAN: {
- MethodInfo mi("tan", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("tan", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SINH: {
- MethodInfo mi("sinh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sinh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_COSH: {
- MethodInfo mi("cosh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("cosh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_TANH: {
- MethodInfo mi("tanh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("tanh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ASIN: {
- MethodInfo mi("asin", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("asin", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ACOS: {
- MethodInfo mi("acos", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("acos", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ATAN: {
- MethodInfo mi("atan", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("atan", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ATAN2: {
- MethodInfo mi("atan2", PropertyInfo(Variant::REAL, "y"), PropertyInfo(Variant::REAL, "x"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("atan2", PropertyInfo(Variant::FLOAT, "y"), PropertyInfo(Variant::FLOAT, "x"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SQRT: {
- MethodInfo mi("sqrt", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sqrt", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_FMOD: {
- MethodInfo mi("fmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("fmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_FPOSMOD: {
- MethodInfo mi("fposmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("fposmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POSMOD: {
@@ -1601,114 +1611,114 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_FLOOR: {
- MethodInfo mi("floor", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("floor", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_CEIL: {
- MethodInfo mi("ceil", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("ceil", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ROUND: {
- MethodInfo mi("round", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("round", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ABS: {
- MethodInfo mi("abs", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("abs", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SIGN: {
- MethodInfo mi("sign", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sign", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POW: {
- MethodInfo mi("pow", PropertyInfo(Variant::REAL, "base"), PropertyInfo(Variant::REAL, "exp"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("pow", PropertyInfo(Variant::FLOAT, "base"), PropertyInfo(Variant::FLOAT, "exp"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LOG: {
- MethodInfo mi("log", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("log", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_EXP: {
- MethodInfo mi("exp", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("exp", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ISNAN: {
- MethodInfo mi("is_nan", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_nan", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISINF: {
- MethodInfo mi("is_inf", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_inf", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISEQUALAPPROX: {
- MethodInfo mi("is_equal_approx", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
+ MethodInfo mi("is_equal_approx", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISZEROAPPROX: {
- MethodInfo mi("is_zero_approx", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_zero_approx", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_EASE: {
- MethodInfo mi("ease", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "curve"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("ease", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "curve"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_STEP_DECIMALS: {
- MethodInfo mi("step_decimals", PropertyInfo(Variant::REAL, "step"));
+ MethodInfo mi("step_decimals", PropertyInfo(Variant::FLOAT, "step"));
mi.return_val.type = Variant::INT;
return mi;
} break;
case MATH_STEPIFY: {
- MethodInfo mi("stepify", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "step"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("stepify", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "step"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LERP: {
- MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::REAL, "weight"));
+ MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::FLOAT, "weight"));
mi.return_val.type = Variant::NIL;
mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
} break;
case MATH_LERP_ANGLE: {
- MethodInfo mi("lerp_angle", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("lerp_angle", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_INVERSE_LERP: {
- MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("inverse_lerp", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANGE_LERP: {
- MethodInfo mi("range_lerp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "istart"), PropertyInfo(Variant::REAL, "istop"), PropertyInfo(Variant::REAL, "ostart"), PropertyInfo(Variant::REAL, "ostop"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("range_lerp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "istart"), PropertyInfo(Variant::FLOAT, "istop"), PropertyInfo(Variant::FLOAT, "ostart"), PropertyInfo(Variant::FLOAT, "ostop"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SMOOTHSTEP: {
- MethodInfo mi("smoothstep", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("smoothstep", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_MOVE_TOWARD: {
- MethodInfo mi("move_toward", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "delta"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("move_toward", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "delta"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_DECTIME: {
- MethodInfo mi("dectime", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "amount"), PropertyInfo(Variant::REAL, "step"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("dectime", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "amount"), PropertyInfo(Variant::FLOAT, "step"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANDOMIZE: {
@@ -1723,12 +1733,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
} break;
case MATH_RANDF: {
MethodInfo mi("randf");
- mi.return_val.type = Variant::REAL;
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANDOM: {
- MethodInfo mi("rand_range", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("rand_range", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SEED: {
@@ -1742,32 +1752,32 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_DEG2RAD: {
- MethodInfo mi("deg2rad", PropertyInfo(Variant::REAL, "deg"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("deg2rad", PropertyInfo(Variant::FLOAT, "deg"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RAD2DEG: {
- MethodInfo mi("rad2deg", PropertyInfo(Variant::REAL, "rad"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("rad2deg", PropertyInfo(Variant::FLOAT, "rad"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LINEAR2DB: {
- MethodInfo mi("linear2db", PropertyInfo(Variant::REAL, "nrg"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("linear2db", PropertyInfo(Variant::FLOAT, "nrg"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_DB2LINEAR: {
- MethodInfo mi("db2linear", PropertyInfo(Variant::REAL, "db"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("db2linear", PropertyInfo(Variant::FLOAT, "db"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POLAR2CARTESIAN: {
- MethodInfo mi("polar2cartesian", PropertyInfo(Variant::REAL, "r"), PropertyInfo(Variant::REAL, "th"));
+ MethodInfo mi("polar2cartesian", PropertyInfo(Variant::FLOAT, "r"), PropertyInfo(Variant::FLOAT, "th"));
mi.return_val.type = Variant::VECTOR2;
return mi;
} break;
case MATH_CARTESIAN2POLAR: {
- MethodInfo mi("cartesian2polar", PropertyInfo(Variant::REAL, "x"), PropertyInfo(Variant::REAL, "y"));
+ MethodInfo mi("cartesian2polar", PropertyInfo(Variant::FLOAT, "x"), PropertyInfo(Variant::FLOAT, "y"));
mi.return_val.type = Variant::VECTOR2;
return mi;
} break;
@@ -1777,24 +1787,24 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_WRAPF: {
- MethodInfo mi("wrapf", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("wrapf", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_MAX: {
- MethodInfo mi("max", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("max", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_MIN: {
- MethodInfo mi("min", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("min", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_CLAMP: {
- MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("clamp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_NEAREST_PO2: {
@@ -1941,12 +1951,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
MethodInfo mi("var2bytes", PropertyInfo(Variant::NIL, "var", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::BOOL, "full_objects"));
mi.default_arguments.push_back(false);
- mi.return_val.type = Variant::POOL_BYTE_ARRAY;
+ mi.return_val.type = Variant::PACKED_BYTE_ARRAY;
return mi;
} break;
case BYTES_TO_VAR: {
- MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes"), PropertyInfo(Variant::BOOL, "allow_objects"));
+ MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::PACKED_BYTE_ARRAY, "bytes"), PropertyInfo(Variant::BOOL, "allow_objects"));
mi.default_arguments.push_back(false);
mi.return_val.type = Variant::NIL;
mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
@@ -2012,7 +2022,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
} break;
case COLORN: {
- MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::REAL, "alpha"));
+ MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "alpha"));
mi.default_arguments.push_back(1.0f);
mi.return_val.type = Variant::COLOR;
return mi;
diff --git a/modules/gdscript/gdscript_functions.h b/modules/gdscript/gdscript_functions.h
index 8b97194ed6..2c6dc02913 100644
--- a/modules/gdscript/gdscript_functions.h
+++ b/modules/gdscript/gdscript_functions.h
@@ -129,7 +129,7 @@ public:
};
static const char *get_func_name(Function p_func);
- static void call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Variant::CallError &r_error);
+ static void call(Function p_func, const Variant **p_args, int p_arg_count, Variant &r_ret, Callable::CallError &r_error);
static bool is_deterministic(Function p_func);
static MethodInfo get_info(Function p_func);
};
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index fae6fbbb0c..0382944efd 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -793,7 +793,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
}
_add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String());
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptTokenizer::TK_OP_ASSIGN: {
lv->assignments += 1;
@@ -1739,7 +1739,7 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
vptr = (const Variant **)&ptrs[0];
}
- Variant::CallError ce;
+ Callable::CallError ce;
Variant v;
if (op->arguments[0]->type == Node::TYPE_TYPE) {
@@ -1751,7 +1751,7 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
GDScriptFunctions::call(func, vptr, ptrs.size(), v, ce);
}
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String errwhere;
if (op->arguments[0]->type == Node::TYPE_TYPE) {
@@ -1765,16 +1765,16 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
switch (ce.error) {
- case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: {
+ case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: {
_set_error("Invalid argument (#" + itos(ce.argument + 1) + ") for " + errwhere + ".");
} break;
- case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
_set_error("Too many arguments for " + errwhere + ".");
} break;
- case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
+ case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
_set_error("Too few arguments for " + errwhere + ".");
} break;
@@ -2766,13 +2766,12 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
}
#endif // DEBUG_ENABLED
switch (token) {
- case GDScriptTokenizer::TK_EOF:
+ case GDScriptTokenizer::TK_EOF: {
p_block->end_line = tokenizer->get_token_line();
+ return; // End of file!
+ } break;
case GDScriptTokenizer::TK_ERROR: {
- return; //go back
-
- //end of file!
-
+ return;
} break;
case GDScriptTokenizer::TK_NEWLINE: {
@@ -3109,7 +3108,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
args.push_back(op->arguments[i]);
if (constant && op->arguments[i]->type == Node::TYPE_CONSTANT) {
ConstantNode *c = static_cast<ConstantNode *>(op->arguments[i]);
- if (c->value.get_type() == Variant::REAL || c->value.get_type() == Variant::INT) {
+ if (c->value.get_type() == Variant::FLOAT || c->value.get_type() == Variant::INT) {
constants.push_back(c->value);
constant = true;
}
@@ -3525,11 +3524,12 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
case GDScriptTokenizer::TK_CURSOR: {
tokenizer->advance();
} break;
- case GDScriptTokenizer::TK_EOF:
+ case GDScriptTokenizer::TK_EOF: {
p_class->end_line = tokenizer->get_token_line();
+ return; // End of file!
+ } break;
case GDScriptTokenizer::TK_ERROR: {
- return; //go back
- //end of file!
+ return; // Go back.
} break;
case GDScriptTokenizer::TK_NEWLINE: {
if (!_parse_newline()) {
@@ -3719,7 +3719,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
return;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptTokenizer::TK_PR_FUNCTION: {
@@ -4220,9 +4220,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "EASE") {
current_export.hint = PROPERTY_HINT_EXP_EASING;
@@ -4809,7 +4809,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
}
#ifdef TOOLS_ENABLED
- Variant::CallError ce;
+ Callable::CallError ce;
member.default_value = Variant::construct(member._export.type, NULL, 0, ce);
#endif
@@ -4878,7 +4878,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
if (cn->value.get_type() != Variant::NIL) {
if (member._export.type != Variant::NIL && cn->value.get_type() != member._export.type) {
if (Variant::can_convert(cn->value.get_type(), member._export.type)) {
- Variant::CallError err;
+ Callable::CallError err;
const Variant *args = &cn->value;
cn->value = Variant::construct(member._export.type, &args, 1, err);
} else {
@@ -5489,7 +5489,7 @@ String GDScriptParser::DataType::to_string() const {
if (!gds_class.empty()) {
return gds_class;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case SCRIPT: {
if (is_meta_type) {
@@ -5933,9 +5933,9 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper
a_ref.instance();
a = a_ref;
} else {
- Variant::CallError err;
+ Callable::CallError err;
a = Variant::construct(a_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
r_valid = false;
return DataType();
}
@@ -5946,19 +5946,19 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper
b_ref.instance();
b = b_ref;
} else {
- Variant::CallError err;
+ Callable::CallError err;
b = Variant::construct(b_type, NULL, 0, err);
- if (err.error != Variant::CallError::CALL_OK) {
+ if (err.error != Callable::CallError::CALL_OK) {
r_valid = false;
return DataType();
}
}
// Avoid division by zero
- if (a_type == Variant::INT || a_type == Variant::REAL) {
+ if (a_type == Variant::INT || a_type == Variant::FLOAT) {
Variant::evaluate(Variant::OP_ADD, a, 1, a, r_valid);
}
- if (b_type == Variant::INT || b_type == Variant::REAL) {
+ if (b_type == Variant::INT || b_type == Variant::FLOAT) {
Variant::evaluate(Variant::OP_ADD, b, 1, b, r_valid);
}
if (a_type == Variant::STRING && b_type != Variant::ARRAY) {
@@ -6218,7 +6218,7 @@ GDScriptParser::Node *GDScriptParser::_get_default_value_for_type(const DataType
result = alloc_node<DictionaryNode>();
} else {
ConstantNode *c = alloc_node<ConstantNode>();
- Variant::CallError err;
+ Callable::CallError err;
c->value = Variant::construct(p_type.builtin_type, NULL, 0, err);
result = c;
}
@@ -6531,7 +6531,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
result.has_type = false;
} break;
default: {
- Variant::CallError err;
+ Callable::CallError err;
Variant temp = Variant::construct(base_type.builtin_type, NULL, 0, err);
bool valid = false;
@@ -6596,16 +6596,18 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
if (!error) {
switch (base_type.builtin_type) {
// Expect int or real as index
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR2_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY:
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
case Variant::ARRAY:
case Variant::STRING: {
- error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL;
+ error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT;
} break;
// Expect String only
case Variant::RECT2:
@@ -6621,7 +6623,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::TRANSFORM2D:
case Variant::BASIS:
case Variant::TRANSFORM: {
- error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL &&
+ error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT &&
index_type.builtin_type != Variant::STRING;
} break;
// Expect String or int
@@ -6646,17 +6648,19 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::STRING:
case Variant::ARRAY:
case Variant::DICTIONARY:
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR2_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY: {
break;
}
default: {
- Variant::CallError err;
+ Callable::CallError err;
Variant temp = Variant::construct(base_type.builtin_type, NULL, 0, err);
bool valid = false;
@@ -6691,41 +6695,43 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::NIL:
case Variant::BOOL:
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::NODE_PATH:
case Variant::_RID: {
_set_error("Can't index on a value of type \"" + base_type.to_string() + "\".", op->line);
return DataType();
} break;
// Return int
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_INT_ARRAY: {
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY: {
result.builtin_type = Variant::INT;
} break;
// Return real
- case Variant::POOL_REAL_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::VECTOR2:
case Variant::VECTOR3:
case Variant::QUAT: {
- result.builtin_type = Variant::REAL;
+ result.builtin_type = Variant::FLOAT;
} break;
// Return color
- case Variant::POOL_COLOR_ARRAY: {
+ case Variant::PACKED_COLOR_ARRAY: {
result.builtin_type = Variant::COLOR;
} break;
// Return string
- case Variant::POOL_STRING_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
case Variant::STRING: {
result.builtin_type = Variant::STRING;
} break;
// Return Vector2
- case Variant::POOL_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
case Variant::TRANSFORM2D:
case Variant::RECT2: {
result.builtin_type = Variant::VECTOR2;
} break;
// Return Vector3
- case Variant::POOL_VECTOR3_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
case Variant::AABB:
case Variant::BASIS: {
result.builtin_type = Variant::VECTOR3;
@@ -7002,7 +7008,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
break;
} else {
#ifdef DEBUG_ENABLED
- if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::REAL) {
+ if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, Variant::get_type_name(tn->vtype));
}
if (par_types[i].may_yield && p_call->arguments[i + 1]->type == Node::TYPE_OPERATOR) {
@@ -7095,7 +7101,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
}
if (base_type.kind == DataType::BUILTIN) {
- Variant::CallError err;
+ Callable::CallError err;
Variant tmp = Variant::construct(base_type.builtin_type, NULL, 0, err);
if (check_types) {
@@ -7245,7 +7251,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
_mark_line_as_unsafe(p_call->line);
}
} else {
- if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::REAL) {
+ if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, callee_name);
}
}
@@ -8103,7 +8109,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
lv->assign = convert_call;
lv->assign_op->arguments.write[1] = convert_call;
#ifdef DEBUG_ENABLED
- if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::REAL) {
+ if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, lv->line);
}
#endif // DEBUG_ENABLED
@@ -8240,7 +8246,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
type_match = true; // Since we are converting, the type is matching
}
#ifdef DEBUG_ENABLED
- if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::REAL) {
+ if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, op->line);
}
#endif // DEBUG_ENABLED
@@ -8345,7 +8351,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
if (cn->value.get_type() == Variant::STRING) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
default: {
_mark_line_as_safe(statement->line);
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index a0e0811c1f..9064998d32 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -146,12 +146,15 @@ static const _bit _type_list[] = {
//types
{ Variant::BOOL, "bool" },
{ Variant::INT, "int" },
- { Variant::REAL, "float" },
+ { Variant::FLOAT, "float" },
{ Variant::STRING, "String" },
{ Variant::VECTOR2, "Vector2" },
+ { Variant::VECTOR2I, "Vector2i" },
{ Variant::RECT2, "Rect2" },
+ { Variant::RECT2I, "Rect2i" },
{ Variant::TRANSFORM2D, "Transform2D" },
{ Variant::VECTOR3, "Vector3" },
+ { Variant::VECTOR3I, "Vector3i" },
{ Variant::AABB, "AABB" },
{ Variant::PLANE, "Plane" },
{ Variant::QUAT, "Quat" },
@@ -160,16 +163,21 @@ static const _bit _type_list[] = {
{ Variant::COLOR, "Color" },
{ Variant::_RID, "RID" },
{ Variant::OBJECT, "Object" },
+ { Variant::STRING_NAME, "StringName" },
{ Variant::NODE_PATH, "NodePath" },
{ Variant::DICTIONARY, "Dictionary" },
+ { Variant::CALLABLE, "Callable" },
+ { Variant::SIGNAL, "Signal" },
{ Variant::ARRAY, "Array" },
- { Variant::POOL_BYTE_ARRAY, "PoolByteArray" },
- { Variant::POOL_INT_ARRAY, "PoolIntArray" },
- { Variant::POOL_REAL_ARRAY, "PoolRealArray" },
- { Variant::POOL_STRING_ARRAY, "PoolStringArray" },
- { Variant::POOL_VECTOR2_ARRAY, "PoolVector2Array" },
- { Variant::POOL_VECTOR3_ARRAY, "PoolVector3Array" },
- { Variant::POOL_COLOR_ARRAY, "PoolColorArray" },
+ { Variant::PACKED_BYTE_ARRAY, "PackedByteArray" },
+ { Variant::PACKED_INT32_ARRAY, "PackedInt32Array" },
+ { Variant::PACKED_INT64_ARRAY, "PackedInt64Array" },
+ { Variant::PACKED_FLOAT32_ARRAY, "PackedFloat32Array" },
+ { Variant::PACKED_FLOAT64_ARRAY, "PackedFloat64Array" },
+ { Variant::PACKED_STRING_ARRAY, "PackedStringArray" },
+ { Variant::PACKED_VECTOR2_ARRAY, "PackedVector2Array" },
+ { Variant::PACKED_VECTOR3_ARRAY, "PackedVector3Array" },
+ { Variant::PACKED_COLOR_ARRAY, "PackedColorArray" },
{ Variant::VARIANT_MAX, NULL },
};
@@ -337,7 +345,7 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const {
default: {
}
}
- }
+ } break;
case TK_OP_AND:
case TK_OP_OR:
break; // Don't get into default, since they can be non-literal
@@ -475,7 +483,7 @@ void GDScriptTokenizerText::_advance() {
}
while (true) {
- bool is_node_path = false;
+ bool is_string_name = false;
StringMode string_mode = STRING_DOUBLE_QUOTE;
switch (GETCHAR(0)) {
@@ -533,7 +541,7 @@ void GDScriptTokenizerText::_advance() {
ignore_warnings = true;
}
#endif // DEBUG_ENABLED
- FALLTHROUGH;
+ [[fallthrough]];
}
case '\n': {
line++;
@@ -749,8 +757,8 @@ void GDScriptTokenizerText::_advance() {
return;
}
INCPOS(1);
- is_node_path = true;
- FALLTHROUGH;
+ is_string_name = true;
+ [[fallthrough]];
case '\'':
case '"': {
@@ -860,8 +868,8 @@ void GDScriptTokenizerText::_advance() {
}
INCPOS(i);
- if (is_node_path) {
- _make_constant(NodePath(str));
+ if (is_string_name) {
+ _make_constant(StringName(str));
} else {
_make_constant(str);
}
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 7133c6b4be..2243a7b81d 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -32,32 +32,107 @@
#include "core/io/json.h"
#include "core/os/copymem.h"
#include "core/project_settings.h"
+#include "editor/editor_log.h"
#include "editor/editor_node.h"
GDScriptLanguageProtocol *GDScriptLanguageProtocol::singleton = NULL;
-void GDScriptLanguageProtocol::on_data_received(int p_id) {
- lastest_client_id = p_id;
- Ref<WebSocketPeer> peer = server->get_peer(p_id);
- PoolByteArray data;
- if (OK == peer->get_packet_buffer(data)) {
- String message;
- message.parse_utf8((const char *)data.read().ptr(), data.size());
- if (message.begins_with("Content-Length:")) return;
- String output = process_message(message);
+Error GDScriptLanguageProtocol::LSPeer::handle_data() {
+ int read = 0;
+ // Read headers
+ if (!has_header) {
+ while (true) {
+ if (req_pos >= LSP_MAX_BUFFER_SIZE) {
+ req_pos = 0;
+ ERR_FAIL_COND_V_MSG(true, ERR_OUT_OF_MEMORY, "Response header too big");
+ }
+ Error err = connection->get_partial_data(&req_buf[req_pos], 1, read);
+ if (err != OK)
+ return FAILED;
+ else if (read != 1) // Busy, wait until next poll
+ return ERR_BUSY;
+ char *r = (char *)req_buf;
+ int l = req_pos;
+
+ // End of headers
+ if (l > 3 && r[l] == '\n' && r[l - 1] == '\r' && r[l - 2] == '\n' && r[l - 3] == '\r') {
+ r[l - 3] = '\0'; // Null terminate to read string
+ String header;
+ header.parse_utf8(r);
+ content_length = header.substr(16).to_int();
+ has_header = true;
+ req_pos = 0;
+ break;
+ }
+ req_pos++;
+ }
+ }
+ if (has_header) {
+ while (req_pos < content_length) {
+ if (req_pos >= LSP_MAX_BUFFER_SIZE) {
+ req_pos = 0;
+ has_header = false;
+ ERR_FAIL_COND_V_MSG(req_pos >= LSP_MAX_BUFFER_SIZE, ERR_OUT_OF_MEMORY, "Response content too big");
+ }
+ Error err = connection->get_partial_data(&req_buf[req_pos], 1, read);
+ if (err != OK)
+ return FAILED;
+ else if (read != 1)
+ return ERR_BUSY;
+ req_pos++;
+ }
+
+ // Parse data
+ String msg;
+ msg.parse_utf8((const char *)req_buf, req_pos);
+
+ // Reset to read again
+ req_pos = 0;
+ has_header = false;
+
+ // Response
+ String output = GDScriptLanguageProtocol::get_singleton()->process_message(msg);
if (!output.empty()) {
- CharString charstr = output.utf8();
- peer->put_packet((const uint8_t *)charstr.ptr(), charstr.length());
+ res_queue.push_back(output.utf8());
}
}
+ return OK;
}
-void GDScriptLanguageProtocol::on_client_connected(int p_id, const String &p_protocal) {
- clients.set(p_id, server->get_peer(p_id));
+Error GDScriptLanguageProtocol::LSPeer::send_data() {
+ int sent = 0;
+ if (!res_queue.empty()) {
+ CharString c_res = res_queue[0];
+ if (res_sent < c_res.size()) {
+ Error err = connection->put_partial_data((const uint8_t *)c_res.get_data() + res_sent, c_res.size() - res_sent - 1, sent);
+ if (err != OK) {
+ return err;
+ }
+ res_sent += sent;
+ }
+ // Response sent
+ if (res_sent >= c_res.size() - 1) {
+ res_sent = 0;
+ res_queue.remove(0);
+ }
+ }
+ return OK;
+}
+
+Error GDScriptLanguageProtocol::on_client_connected() {
+ Ref<StreamPeerTCP> tcp_peer = server->take_connection();
+ ERR_FAIL_COND_V_MSG(clients.size() >= LSP_MAX_CLIENTS, FAILED, "Max client limits reached");
+ Ref<LSPeer> peer = memnew(LSPeer);
+ peer->connection = tcp_peer;
+ clients.set(next_client_id, peer);
+ next_client_id++;
+ EditorNode::get_log()->add_message("Connection Taken", EditorLog::MSG_TYPE_EDITOR);
+ return OK;
}
-void GDScriptLanguageProtocol::on_client_disconnected(int p_id, bool p_was_clean_close) {
- clients.erase(p_id);
+void GDScriptLanguageProtocol::on_client_disconnected(const int &p_client_id) {
+ clients.erase(p_client_id);
+ EditorNode::get_log()->add_message("Disconnected", EditorLog::MSG_TYPE_EDITOR);
}
String GDScriptLanguageProtocol::process_message(const String &p_text) {
@@ -83,11 +158,9 @@ String GDScriptLanguageProtocol::format_output(const String &p_text) {
void GDScriptLanguageProtocol::_bind_methods() {
ClassDB::bind_method(D_METHOD("initialize", "params"), &GDScriptLanguageProtocol::initialize);
ClassDB::bind_method(D_METHOD("initialized", "params"), &GDScriptLanguageProtocol::initialized);
- ClassDB::bind_method(D_METHOD("on_data_received"), &GDScriptLanguageProtocol::on_data_received);
ClassDB::bind_method(D_METHOD("on_client_connected"), &GDScriptLanguageProtocol::on_client_connected);
ClassDB::bind_method(D_METHOD("on_client_disconnected"), &GDScriptLanguageProtocol::on_client_disconnected);
- ClassDB::bind_method(D_METHOD("notify_all_clients", "p_method", "p_params"), &GDScriptLanguageProtocol::notify_all_clients, DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("notify_client", "p_method", "p_params", "p_client"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("notify_client", "p_method", "p_params"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("is_smart_resolve_enabled"), &GDScriptLanguageProtocol::is_smart_resolve_enabled);
ClassDB::bind_method(D_METHOD("get_text_document"), &GDScriptLanguageProtocol::get_text_document);
ClassDB::bind_method(D_METHOD("get_workspace"), &GDScriptLanguageProtocol::get_workspace);
@@ -116,11 +189,12 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) {
Dictionary params;
params["path"] = workspace->root;
Dictionary request = make_notification("gdscrip_client/changeWorkspace", params);
- if (Ref<WebSocketPeer> *peer = clients.getptr(lastest_client_id)) {
+
+ Ref<LSPeer> peer = clients.get(latest_client_id);
+ if (peer != NULL) {
String msg = JSON::print(request);
msg = format_output(msg);
- CharString charstr = msg.utf8();
- (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length());
+ (*peer)->res_queue.push_back(msg.utf8());
}
}
@@ -153,61 +227,59 @@ void GDScriptLanguageProtocol::initialized(const Variant &p_params) {
}
void GDScriptLanguageProtocol::poll() {
- server->poll();
+ if (server->is_connection_available()) {
+ on_client_connected();
+ }
+ const int *id = NULL;
+ while ((id = clients.next(id))) {
+ Ref<LSPeer> peer = clients.get(*id);
+ StreamPeerTCP::Status status = peer->connection->get_status();
+ if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) {
+ on_client_disconnected(*id);
+ id = NULL;
+ } else {
+ if (peer->connection->get_available_bytes() > 0) {
+ latest_client_id = *id;
+ Error err = peer->handle_data();
+ if (err != OK && err != ERR_BUSY) {
+ on_client_disconnected(*id);
+ id = NULL;
+ }
+ }
+ Error err = peer->send_data();
+ if (err != OK && err != ERR_BUSY) {
+ on_client_disconnected(*id);
+ id = NULL;
+ }
+ }
+ }
}
Error GDScriptLanguageProtocol::start(int p_port, const IP_Address &p_bind_ip) {
- if (server == NULL) {
- server = dynamic_cast<WebSocketServer *>(ClassDB::instance("WebSocketServer"));
- ERR_FAIL_COND_V(!server, FAILED);
- server->set_buffers(8192, 1024, 8192, 1024); // 8mb should be way more than enough
- server->connect("data_received", this, "on_data_received");
- server->connect("client_connected", this, "on_client_connected");
- server->connect("client_disconnected", this, "on_client_disconnected");
- }
- server->set_bind_ip(p_bind_ip);
- return server->listen(p_port);
+ return server->listen(p_port, p_bind_ip);
}
void GDScriptLanguageProtocol::stop() {
- const int *ptr = clients.next(NULL);
- while (ptr) {
- clients.get(*ptr)->close();
- ptr = clients.next(ptr);
+ const int *id = NULL;
+ while ((id = clients.next(id))) {
+ Ref<LSPeer> peer = clients.get(*id);
+ peer->connection->disconnect_from_host();
}
- server->stop();
- clients.clear();
-}
-
-void GDScriptLanguageProtocol::notify_all_clients(const String &p_method, const Variant &p_params) {
- Dictionary message = make_notification(p_method, p_params);
- String msg = JSON::print(message);
- msg = format_output(msg);
- CharString charstr = msg.utf8();
- const int *p_id = clients.next(NULL);
- while (p_id != NULL) {
- Ref<WebSocketPeer> peer = clients.get(*p_id);
- (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length());
- p_id = clients.next(p_id);
- }
+ server->stop();
}
-void GDScriptLanguageProtocol::notify_client(const String &p_method, const Variant &p_params, int p_client) {
-
- if (p_client == -1) {
- p_client = lastest_client_id;
+void GDScriptLanguageProtocol::notify_client(const String &p_method, const Variant &p_params, int p_client_id) {
+ if (p_client_id == -1) {
+ p_client_id = latest_client_id;
}
-
- Ref<WebSocketPeer> *peer = clients.getptr(p_client);
+ Ref<LSPeer> peer = clients.get(p_client_id);
ERR_FAIL_COND(peer == NULL);
Dictionary message = make_notification(p_method, p_params);
String msg = JSON::print(message);
msg = format_output(msg);
- CharString charstr = msg.utf8();
-
- (*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length());
+ peer->res_queue.push_back(msg.utf8());
}
bool GDScriptLanguageProtocol::is_smart_resolve_enabled() const {
@@ -219,7 +291,7 @@ bool GDScriptLanguageProtocol::is_goto_native_symbols_enabled() const {
}
GDScriptLanguageProtocol::GDScriptLanguageProtocol() {
- server = NULL;
+ server.instance();
singleton = this;
_initialized = false;
workspace.instance();
@@ -228,9 +300,6 @@ GDScriptLanguageProtocol::GDScriptLanguageProtocol() {
set_scope("completionItem", text_document.ptr());
set_scope("workspace", workspace.ptr());
workspace->root = ProjectSettings::get_singleton()->get_resource_path();
-}
-
-GDScriptLanguageProtocol::~GDScriptLanguageProtocol() {
- memdelete(server);
- server = NULL;
+ latest_client_id = 0;
+ next_client_id = 0;
}
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h
index 52c680ab19..3f0ae36af2 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.h
+++ b/modules/gdscript/language_server/gdscript_language_protocol.h
@@ -31,16 +31,36 @@
#ifndef GDSCRIPT_PROTOCAL_SERVER_H
#define GDSCRIPT_PROTOCAL_SERVER_H
+#include "core/io/stream_peer.h"
+#include "core/io/stream_peer_tcp.h"
+#include "core/io/tcp_server.h"
#include "gdscript_text_document.h"
#include "gdscript_workspace.h"
#include "lsp.hpp"
#include "modules/jsonrpc/jsonrpc.h"
-#include "modules/websocket/websocket_peer.h"
-#include "modules/websocket/websocket_server.h"
+
+#define LSP_MAX_BUFFER_SIZE 4194304
+#define LSP_MAX_CLIENTS 8
class GDScriptLanguageProtocol : public JSONRPC {
GDCLASS(GDScriptLanguageProtocol, JSONRPC)
+private:
+ struct LSPeer : Reference {
+ Ref<StreamPeerTCP> connection;
+
+ uint8_t req_buf[LSP_MAX_BUFFER_SIZE];
+ int req_pos = 0;
+ bool has_header = false;
+ bool has_content = false;
+ int content_length = 0;
+ Vector<CharString> res_queue;
+ int res_sent = 0;
+
+ Error handle_data();
+ Error send_data();
+ };
+
enum LSPErrorCode {
RequestCancelled = -32800,
ContentModified = -32801,
@@ -48,16 +68,16 @@ class GDScriptLanguageProtocol : public JSONRPC {
static GDScriptLanguageProtocol *singleton;
- HashMap<int, Ref<WebSocketPeer> > clients;
- WebSocketServer *server;
- int lastest_client_id;
+ HashMap<int, Ref<LSPeer> > clients;
+ Ref<TCP_Server> server;
+ int latest_client_id;
+ int next_client_id;
Ref<GDScriptTextDocument> text_document;
Ref<GDScriptWorkspace> workspace;
- void on_data_received(int p_id);
- void on_client_connected(int p_id, const String &p_protocal);
- void on_client_disconnected(int p_id, bool p_was_clean_close);
+ Error on_client_connected();
+ void on_client_disconnected(const int &p_client_id);
String process_message(const String &p_text);
String format_output(const String &p_text);
@@ -80,14 +100,12 @@ public:
Error start(int p_port, const IP_Address &p_bind_ip);
void stop();
- void notify_all_clients(const String &p_method, const Variant &p_params = Variant());
- void notify_client(const String &p_method, const Variant &p_params = Variant(), int p_client = -1);
+ void notify_client(const String &p_method, const Variant &p_params = Variant(), int p_client_id = -1);
bool is_smart_resolve_enabled() const;
bool is_goto_native_symbols_enabled() const;
GDScriptLanguageProtocol();
- ~GDScriptLanguageProtocol();
};
#endif
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 1c0590cff1..205257b8f2 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -33,8 +33,11 @@
#include "../gdscript_parser.h"
#include "core/project_settings.h"
#include "core/script_language.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_help.h"
+#include "editor/editor_node.h"
#include "gdscript_language_protocol.h"
+#include "scene/resources/packed_scene.h"
void GDScriptWorkspace::_bind_methods() {
ClassDB::bind_method(D_METHOD("symbol"), &GDScriptWorkspace::symbol);
@@ -50,7 +53,7 @@ void GDScriptWorkspace::remove_cache_parser(const String &p_path) {
Map<String, ExtendGDScriptParser *>::Element *parser = parse_results.find(p_path);
Map<String, ExtendGDScriptParser *>::Element *script = scripts.find(p_path);
if (parser && script) {
- if (script->get() && script->get() == script->get()) {
+ if (script->get() && script->get() == parser->get()) {
memdelete(script->get());
} else {
memdelete(script->get());
@@ -373,6 +376,50 @@ void GDScriptWorkspace::publish_diagnostics(const String &p_path) {
GDScriptLanguageProtocol::get_singleton()->notify_client("textDocument/publishDiagnostics", params);
}
+void GDScriptWorkspace::_get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners) {
+ if (!efsd)
+ return;
+
+ for (int i = 0; i < efsd->get_subdir_count(); i++) {
+ _get_owners(efsd->get_subdir(i), p_path, owners);
+ }
+
+ for (int i = 0; i < efsd->get_file_count(); i++) {
+
+ Vector<String> deps = efsd->get_file_deps(i);
+ bool found = false;
+ for (int j = 0; j < deps.size(); j++) {
+ if (deps[j] == p_path) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ continue;
+
+ owners.push_back(efsd->get_file_path(i));
+ }
+}
+
+Node *GDScriptWorkspace::_get_owner_scene_node(String p_path) {
+ Node *owner_scene_node = NULL;
+ List<String> owners;
+
+ _get_owners(EditorFileSystem::get_singleton()->get_filesystem(), p_path, owners);
+
+ for (int i = 0; i < owners.size(); i++) {
+ NodePath owner_path = owners[i];
+ RES owner_res = ResourceLoader::load(owner_path);
+ if (Object::cast_to<PackedScene>(owner_res.ptr())) {
+ Ref<PackedScene> owner_packed_scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*owner_res));
+ owner_scene_node = owner_packed_scene->instance();
+ break;
+ }
+ }
+
+ return owner_scene_node;
+}
+
void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options) {
String path = get_file_path(p_params.textDocument.uri);
@@ -380,8 +427,12 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
bool forced = false;
if (const ExtendGDScriptParser *parser = get_parse_result(path)) {
+ Node *owner_scene_node = _get_owner_scene_node(path);
String code = parser->get_text_for_completion(p_params.position);
- GDScriptLanguage::get_singleton()->complete_code(code, path, NULL, r_options, forced, call_hint);
+ GDScriptLanguage::get_singleton()->complete_code(code, path, owner_scene_node, r_options, forced, call_hint);
+ if (owner_scene_node) {
+ memdelete(owner_scene_node);
+ }
}
}
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index 146a5cb7c9..e45b06747d 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -33,12 +33,17 @@
#include "../gdscript_parser.h"
#include "core/variant.h"
+#include "editor/editor_file_system.h"
#include "gdscript_extend_parser.h"
#include "lsp.hpp"
class GDScriptWorkspace : public Reference {
GDCLASS(GDScriptWorkspace, Reference);
+private:
+ void _get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners);
+ Node *_get_owner_scene_node(String p_path);
+
protected:
static void _bind_methods();
void remove_cache_parser(const String &p_path);
diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub
index 8c9445436e..ae102238f2 100644
--- a/modules/glslang/SCsub
+++ b/modules/glslang/SCsub
@@ -58,7 +58,11 @@ if env['builtin_glslang']:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env_glslang.Prepend(CPPPATH=[thirdparty_dir])
+ # Treat glslang headers as system headers to avoid raising warnings. Not supported on MSVC.
+ if not env.msvc:
+ env_glslang.Append(CPPFLAGS=['-isystem', Dir(thirdparty_dir).path])
+ else:
+ env_glslang.Prepend(CPPPATH=[thirdparty_dir])
env_thirdparty = env_glslang.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp
index 1e4481a6a0..d2b4a18fc7 100644
--- a/modules/glslang/register_types.cpp
+++ b/modules/glslang/register_types.cpp
@@ -142,9 +142,9 @@ static const TBuiltInResource default_builtin_resource = {
}
};
-static PoolVector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error) {
+static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error) {
- PoolVector<uint8_t> ret;
+ Vector<uint8_t> ret;
ERR_FAIL_COND_V(p_language == RenderingDevice::SHADER_LANGUAGE_HLSL, ret);
@@ -224,8 +224,8 @@ static PoolVector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_s
ret.resize(SpirV.size() * sizeof(uint32_t));
{
- PoolVector<uint8_t>::Write w = ret.write();
- copymem(w.ptr(), &SpirV[0], SpirV.size() * sizeof(uint32_t));
+ uint8_t *w = ret.ptrw();
+ copymem(w, &SpirV[0], SpirV.size() * sizeof(uint32_t));
}
return ret;
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 7fe58f8ce7..84075f76fd 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -49,9 +49,9 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
if (d.has("cells")) {
- PoolVector<int> cells = d["cells"];
+ Vector<int> cells = d["cells"];
int amount = cells.size();
- PoolVector<int>::Read r = cells.read();
+ const int *r = cells.ptr();
ERR_FAIL_COND_V(amount % 3, false); // not even
cell_map.clear();
for (int i = 0; i < amount / 3; i++) {
@@ -103,10 +103,10 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<int> cells;
+ Vector<int> cells;
cells.resize(cell_map.size() * 3);
{
- PoolVector<int>::Write w = cells.write();
+ int *w = cells.ptrw();
int i = 0;
for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next(), i++) {
@@ -439,7 +439,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
return true;
}
- PoolVector<Vector3> col_debug;
+ Vector<Vector3> col_debug;
/*
* foreach item in this octant,
@@ -874,7 +874,7 @@ void GridMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_x"), "set_center_x", "get_center_x");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_y"), "set_center_y", "get_center_y");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_z"), "set_center_z", "get_center_z");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_scale"), "set_cell_scale", "get_cell_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_scale"), "set_cell_scale", "get_cell_scale");
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 2144ff264f..a656ee8b63 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -752,7 +752,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
if (k.is_valid()) {
if (k->is_pressed()) {
- if (k->get_scancode() == KEY_ESCAPE) {
+ if (k->get_keycode() == KEY_ESCAPE) {
if (input_action == INPUT_PASTE) {
_clear_clipboard_data();
@@ -773,12 +773,12 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
if (k->get_shift() && selection.active && input_action != INPUT_PASTE) {
- if (k->get_scancode() == options->get_popup()->get_item_accelerator(options->get_popup()->get_item_index(MENU_OPTION_PREV_LEVEL))) {
+ if (k->get_keycode() == options->get_popup()->get_item_accelerator(options->get_popup()->get_item_index(MENU_OPTION_PREV_LEVEL))) {
selection.click[edit_axis]--;
_validate_selection();
return true;
}
- if (k->get_scancode() == options->get_popup()->get_item_accelerator(options->get_popup()->get_item_index(MENU_OPTION_NEXT_LEVEL))) {
+ if (k->get_keycode() == options->get_popup()->get_item_accelerator(options->get_popup()->get_item_index(MENU_OPTION_NEXT_LEVEL))) {
selection.click[edit_axis]++;
_validate_selection();
return true;
@@ -842,7 +842,7 @@ void GridMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
const Ref<InputEventKey> k = p_ie;
- if (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_PAGEUP || k->get_scancode() == KEY_PAGEDOWN)) {
+ if (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_PAGEUP || k->get_keycode() == KEY_PAGEDOWN)) {
// Forward the key input to the ItemList so it can be scrolled
mesh_library_palette->call("_gui_input", k);
@@ -954,7 +954,7 @@ void GridMapEditor::update_palette() {
void GridMapEditor::edit(GridMap *p_gridmap) {
if (!p_gridmap && node)
- node->disconnect("cell_size_changed", this, "_draw_grids");
+ node->disconnect("cell_size_changed", callable_mp(this, &GridMapEditor::_draw_grids));
node = p_gridmap;
@@ -988,7 +988,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
update_grid();
_update_clip();
- node->connect("cell_size_changed", this, "_draw_grids");
+ node->connect("cell_size_changed", callable_mp(this, &GridMapEditor::_draw_grids));
}
void GridMapEditor::_update_clip() {
@@ -1077,8 +1077,8 @@ void GridMapEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- get_tree()->connect("node_removed", this, "_node_removed");
- mesh_library_palette->connect("item_selected", this, "_item_selected_cbk");
+ get_tree()->connect("node_removed", callable_mp(this, &GridMapEditor::_node_removed));
+ mesh_library_palette->connect("item_selected", callable_mp(this, &GridMapEditor::_item_selected_cbk));
for (int i = 0; i < 3; i++) {
grid[i] = VS::get_singleton()->mesh_create();
@@ -1094,7 +1094,7 @@ void GridMapEditor::_notification(int p_what) {
} break;
case NOTIFICATION_EXIT_TREE: {
- get_tree()->disconnect("node_removed", this, "_node_removed");
+ get_tree()->disconnect("node_removed", callable_mp(this, &GridMapEditor::_node_removed));
_clear_clipboard_data();
for (int i = 0; i < 3; i++) {
@@ -1198,20 +1198,8 @@ void GridMapEditor::_floor_mouse_exited() {
void GridMapEditor::_bind_methods() {
- ClassDB::bind_method("_text_changed", &GridMapEditor::_text_changed);
- ClassDB::bind_method("_sbox_input", &GridMapEditor::_sbox_input);
- ClassDB::bind_method("_mesh_library_palette_input", &GridMapEditor::_mesh_library_palette_input);
- ClassDB::bind_method("_icon_size_changed", &GridMapEditor::_icon_size_changed);
- ClassDB::bind_method("_menu_option", &GridMapEditor::_menu_option);
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
- ClassDB::bind_method("_item_selected_cbk", &GridMapEditor::_item_selected_cbk);
- ClassDB::bind_method("_floor_changed", &GridMapEditor::_floor_changed);
- ClassDB::bind_method("_floor_mouse_exited", &GridMapEditor::_floor_mouse_exited);
ClassDB::bind_method("_set_selection", &GridMapEditor::_set_selection);
- ClassDB::bind_method("_node_removed", &GridMapEditor::_node_removed);
-
- ClassDB::bind_method(D_METHOD("_set_display_mode", "mode"), &GridMapEditor::_set_display_mode);
- ClassDB::bind_method("_draw_grids", &GridMapEditor::_draw_grids);
}
GridMapEditor::GridMapEditor(EditorNode *p_editor) {
@@ -1241,9 +1229,9 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
floor->get_line_edit()->add_constant_override("minimum_spaces", 16);
spatial_editor_hb->add_child(floor);
- floor->connect("value_changed", this, "_floor_changed");
- floor->connect("mouse_exited", this, "_floor_mouse_exited");
- floor->get_line_edit()->connect("mouse_exited", this, "_floor_mouse_exited");
+ floor->connect("value_changed", callable_mp(this, &GridMapEditor::_floor_changed));
+ floor->connect("mouse_exited", callable_mp(this, &GridMapEditor::_floor_mouse_exited));
+ floor->get_line_edit()->connect("mouse_exited", callable_mp(this, &GridMapEditor::_floor_mouse_exited));
spatial_editor_hb->add_child(memnew(VSeparator));
@@ -1300,7 +1288,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
clip_mode = CLIP_DISABLED;
- options->get_popup()->connect("id_pressed", this, "_menu_option");
+ options->get_popup()->connect("id_pressed", callable_mp(this, &GridMapEditor::_menu_option));
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
@@ -1310,22 +1298,22 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
search_box->set_placeholder(TTR("Filter meshes"));
hb->add_child(search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &GridMapEditor::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &GridMapEditor::_sbox_input));
mode_thumbnail = memnew(ToolButton);
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
mode_thumbnail->set_icon(p_editor->get_gui_base()->get_icon("FileThumbnail", "EditorIcons"));
hb->add_child(mode_thumbnail);
- mode_thumbnail->connect("pressed", this, "_set_display_mode", varray(DISPLAY_THUMBNAIL));
+ mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_THUMBNAIL));
mode_list = memnew(ToolButton);
mode_list->set_toggle_mode(true);
mode_list->set_pressed(false);
mode_list->set_icon(p_editor->get_gui_base()->get_icon("FileList", "EditorIcons"));
hb->add_child(mode_list);
- mode_list->connect("pressed", this, "_set_display_mode", varray(DISPLAY_LIST));
+ mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_LIST));
size_slider = memnew(HSlider);
size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1333,7 +1321,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
size_slider->set_max(4.0f);
size_slider->set_step(0.1f);
size_slider->set_value(1.0f);
- size_slider->connect("value_changed", this, "_icon_size_changed");
+ size_slider->connect("value_changed", callable_mp(this, &GridMapEditor::_icon_size_changed));
add_child(size_slider);
EDITOR_DEF("editors/grid_map/preview_size", 64);
@@ -1343,7 +1331,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
mesh_library_palette = memnew(ItemList);
add_child(mesh_library_palette);
mesh_library_palette->set_v_size_flags(SIZE_EXPAND_FILL);
- mesh_library_palette->connect("gui_input", this, "_mesh_library_palette_input");
+ mesh_library_palette->connect("gui_input", callable_mp(this, &GridMapEditor::_mesh_library_palette_input));
info_message = memnew(Label);
info_message->set_text(TTR("Give a MeshLibrary resource to this GridMap to use its meshes."));
@@ -1370,9 +1358,9 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
{
// Selection mesh create.
- PoolVector<Vector3> lines;
- PoolVector<Vector3> triangles;
- PoolVector<Vector3> square[3];
+ Vector<Vector3> lines;
+ Vector<Vector3> triangles;
+ Vector<Vector3> square[3];
for (int i = 0; i < 6; i++) {
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index 3fa7266f1a..c03ae4ab1f 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -63,15 +63,15 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
int width = f->get_line().to_int();
- PoolVector<uint8_t> imgdata;
+ Vector<uint8_t> imgdata;
imgdata.resize(height * width * sizeof(uint32_t));
{
- PoolVector<uint8_t>::Write w = imgdata.write();
+ uint8_t *w = imgdata.ptrw();
- uint8_t *ptr = (uint8_t *)w.ptr();
+ uint8_t *ptr = (uint8_t *)w;
if (width < 8 || width >= 32768) {
// Read flat data
diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp
index a1f0f0ef6a..9e87d11ac1 100644
--- a/modules/jpg/image_loader_jpegd.cpp
+++ b/modules/jpg/image_loader_jpegd.cpp
@@ -57,13 +57,13 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
const int dst_bpl = image_width * comps;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(dst_bpl * image_height);
- PoolVector<uint8_t>::Write dw = data.write();
+ uint8_t *dw = data.ptrw();
- jpgd::uint8 *pImage_data = (jpgd::uint8 *)dw.ptr();
+ jpgd::uint8 *pImage_data = (jpgd::uint8 *)dw;
for (int y = 0; y < image_height; y++) {
const jpgd::uint8 *pScan_line;
@@ -96,7 +96,6 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
else
fmt = Image::FORMAT_RGB8;
- dw.release();
p_image->create(image_width, image_height, 0, fmt, data);
return OK;
@@ -104,18 +103,18 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
Error ImageLoaderJPG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
- PoolVector<uint8_t> src_image;
+ Vector<uint8_t> src_image;
int src_image_len = f->get_len();
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
src_image.resize(src_image_len);
- PoolVector<uint8_t>::Write w = src_image.write();
+ uint8_t *w = src_image.ptrw();
f->get_buffer(&w[0], src_image_len);
f->close();
- Error err = jpeg_load_image_from_buffer(p_image.ptr(), w.ptr(), src_image_len);
+ Error err = jpeg_load_image_from_buffer(p_image.ptr(), w, src_image_len);
return err;
}
diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp
index 2bd80064e3..ee3c78aeb3 100644
--- a/modules/mbedtls/crypto_mbedtls.cpp
+++ b/modules/mbedtls/crypto_mbedtls.cpp
@@ -53,22 +53,22 @@ CryptoKey *CryptoKeyMbedTLS::create() {
Error CryptoKeyMbedTLS::load(String p_path) {
ERR_FAIL_COND_V_MSG(locks, ERR_ALREADY_IN_USE, "Key is in use");
- PoolByteArray out;
+ PackedByteArray out;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, ERR_INVALID_PARAMETER, "Cannot open CryptoKeyMbedTLS file '" + p_path + "'.");
int flen = f->get_len();
out.resize(flen + 1);
{
- PoolByteArray::Write w = out.write();
- f->get_buffer(w.ptr(), flen);
+ uint8_t *w = out.ptrw();
+ f->get_buffer(w, flen);
w[flen] = 0; //end f string
}
memdelete(f);
- int ret = mbedtls_pk_parse_key(&pkey, out.read().ptr(), out.size(), NULL, 0);
+ int ret = mbedtls_pk_parse_key(&pkey, out.ptr(), out.size(), NULL, 0);
// We MUST zeroize the memory for safety!
- mbedtls_platform_zeroize(out.write().ptr(), out.size());
+ mbedtls_platform_zeroize(out.ptrw(), out.size());
ERR_FAIL_COND_V_MSG(ret, FAILED, "Error parsing private key '" + itos(ret) + "'.");
return OK;
@@ -102,20 +102,20 @@ X509Certificate *X509CertificateMbedTLS::create() {
Error X509CertificateMbedTLS::load(String p_path) {
ERR_FAIL_COND_V_MSG(locks, ERR_ALREADY_IN_USE, "Certificate is in use");
- PoolByteArray out;
+ PackedByteArray out;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(!f, ERR_INVALID_PARAMETER, "Cannot open X509CertificateMbedTLS file '" + p_path + "'.");
int flen = f->get_len();
out.resize(flen + 1);
{
- PoolByteArray::Write w = out.write();
- f->get_buffer(w.ptr(), flen);
+ uint8_t *w = out.ptrw();
+ f->get_buffer(w, flen);
w[flen] = 0; //end f string
}
memdelete(f);
- int ret = mbedtls_x509_crt_parse(&cert, out.read().ptr(), out.size());
+ int ret = mbedtls_x509_crt_parse(&cert, out.ptr(), out.size());
ERR_FAIL_COND_V_MSG(ret, FAILED, "Error parsing some certificates: " + itos(ret));
return OK;
@@ -210,15 +210,15 @@ void CryptoMbedTLS::load_default_certificates(String p_path) {
#ifdef BUILTIN_CERTS_ENABLED
else {
// Use builtin certs only if user did not override it in project settings.
- PoolByteArray out;
+ PackedByteArray out;
out.resize(_certs_uncompressed_size + 1);
- PoolByteArray::Write w = out.write();
- Compression::decompress(w.ptr(), _certs_uncompressed_size, _certs_compressed, _certs_compressed_size, Compression::MODE_DEFLATE);
+ uint8_t *w = out.ptrw();
+ Compression::decompress(w, _certs_uncompressed_size, _certs_compressed, _certs_compressed_size, Compression::MODE_DEFLATE);
w[_certs_uncompressed_size] = 0; // Make sure it ends with string terminator
#ifdef DEBUG_ENABLED
print_verbose("Loaded builtin certs");
#endif
- default_certs->load_from_memory(out.read().ptr(), out.size());
+ default_certs->load_from_memory(out.ptr(), out.size());
}
#endif
}
@@ -276,9 +276,9 @@ Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoK
return out;
}
-PoolByteArray CryptoMbedTLS::generate_random_bytes(int p_bytes) {
- PoolByteArray out;
+PackedByteArray CryptoMbedTLS::generate_random_bytes(int p_bytes) {
+ PackedByteArray out;
out.resize(p_bytes);
- mbedtls_ctr_drbg_random(&ctr_drbg, out.write().ptr(), p_bytes);
+ mbedtls_ctr_drbg_random(&ctr_drbg, out.ptrw(), p_bytes);
return out;
}
diff --git a/modules/mbedtls/crypto_mbedtls.h b/modules/mbedtls/crypto_mbedtls.h
index edb5841761..6c1c0e255d 100644
--- a/modules/mbedtls/crypto_mbedtls.h
+++ b/modules/mbedtls/crypto_mbedtls.h
@@ -113,7 +113,7 @@ public:
static X509CertificateMbedTLS *get_default_certificates();
static void load_default_certificates(String p_path);
- virtual PoolByteArray generate_random_bytes(int p_bytes);
+ virtual PackedByteArray generate_random_bytes(int p_bytes);
virtual Ref<CryptoKey> generate_rsa(int p_bytes);
virtual Ref<X509Certificate> generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after);
diff --git a/core/pool_vector.cpp b/modules/mbedtls/dtls_server_mbedtls.cpp
index d8d53f07e9..215b511758 100644
--- a/core/pool_vector.cpp
+++ b/modules/mbedtls/dtls_server_mbedtls.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* pool_vector.cpp */
+/* dtls_server_mbedtls.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,43 +28,51 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "pool_vector.h"
+#include "dtls_server_mbedtls.h"
+#include "packet_peer_mbed_dtls.h"
-Mutex *pool_vector_lock = NULL;
-
-PoolAllocator *MemoryPool::memory_pool = NULL;
-uint8_t *MemoryPool::pool_memory = NULL;
-size_t *MemoryPool::pool_size = NULL;
-
-MemoryPool::Alloc *MemoryPool::allocs = NULL;
-MemoryPool::Alloc *MemoryPool::free_list = NULL;
-uint32_t MemoryPool::alloc_count = 0;
-uint32_t MemoryPool::allocs_used = 0;
-Mutex *MemoryPool::alloc_mutex = NULL;
+Error DTLSServerMbedTLS::setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain) {
+ ERR_FAIL_COND_V(_cookies->setup() != OK, ERR_ALREADY_IN_USE);
+ _key = p_key;
+ _cert = p_cert;
+ _ca_chain = p_ca_chain;
+ return OK;
+}
-size_t MemoryPool::total_memory = 0;
-size_t MemoryPool::max_memory = 0;
+void DTLSServerMbedTLS::stop() {
+ _cookies->clear();
+}
-void MemoryPool::setup(uint32_t p_max_allocs) {
+Ref<PacketPeerDTLS> DTLSServerMbedTLS::take_connection(Ref<PacketPeerUDP> p_udp_peer) {
+ Ref<PacketPeerMbedDTLS> out;
+ out.instance();
- allocs = memnew_arr(Alloc, p_max_allocs);
- alloc_count = p_max_allocs;
- allocs_used = 0;
+ ERR_FAIL_COND_V(!out.is_valid(), out);
+ ERR_FAIL_COND_V(!p_udp_peer.is_valid(), out);
+ out->accept_peer(p_udp_peer, _key, _cert, _ca_chain, _cookies);
+ return out;
+}
- for (uint32_t i = 0; i < alloc_count - 1; i++) {
+DTLSServer *DTLSServerMbedTLS::_create_func() {
- allocs[i].free_list = &allocs[i + 1];
- }
+ return memnew(DTLSServerMbedTLS);
+}
- free_list = &allocs[0];
+void DTLSServerMbedTLS::initialize() {
- alloc_mutex = Mutex::create();
+ _create = _create_func;
+ available = true;
}
-void MemoryPool::cleanup() {
+void DTLSServerMbedTLS::finalize() {
+ _create = NULL;
+ available = false;
+}
- memdelete_arr(allocs);
- memdelete(alloc_mutex);
+DTLSServerMbedTLS::DTLSServerMbedTLS() {
+ _cookies.instance();
+}
- ERR_FAIL_COND_MSG(allocs_used > 0, "There are still MemoryPool allocs in use at exit!");
+DTLSServerMbedTLS::~DTLSServerMbedTLS() {
+ stop();
}
diff --git a/modules/mbedtls/dtls_server_mbedtls.h b/modules/mbedtls/dtls_server_mbedtls.h
new file mode 100644
index 0000000000..d61ab3179e
--- /dev/null
+++ b/modules/mbedtls/dtls_server_mbedtls.h
@@ -0,0 +1,58 @@
+/*************************************************************************/
+/* dtls_server_mbedtls.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 MBED_DTLS_SERVER_H
+#define MBED_DTLS_SERVER_H
+
+#include "core/io/dtls_server.h"
+#include "ssl_context_mbedtls.h"
+
+class DTLSServerMbedTLS : public DTLSServer {
+
+private:
+ static DTLSServer *_create_func();
+ Ref<CryptoKey> _key;
+ Ref<X509Certificate> _cert;
+ Ref<X509Certificate> _ca_chain;
+ Ref<CookieContextMbedTLS> _cookies;
+
+public:
+ static void initialize();
+ static void finalize();
+
+ virtual Error setup(Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>());
+ virtual void stop();
+ virtual Ref<PacketPeerDTLS> take_connection(Ref<PacketPeerUDP> p_peer);
+
+ DTLSServerMbedTLS();
+ ~DTLSServerMbedTLS();
+};
+
+#endif // MBED_DTLS_SERVER_H
diff --git a/modules/mbedtls/packet_peer_mbed_dtls.cpp b/modules/mbedtls/packet_peer_mbed_dtls.cpp
new file mode 100755
index 0000000000..bdf36ad1b1
--- /dev/null
+++ b/modules/mbedtls/packet_peer_mbed_dtls.cpp
@@ -0,0 +1,297 @@
+/*************************************************************************/
+/* packet_peer_mbed_dtls.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "packet_peer_mbed_dtls.h"
+#include "mbedtls/platform_util.h"
+
+#include "core/io/stream_peer_ssl.h"
+#include "core/os/file_access.h"
+
+int PacketPeerMbedDTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) {
+
+ if (buf == NULL || len <= 0) return 0;
+
+ PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx;
+
+ ERR_FAIL_COND_V(sp == NULL, 0);
+
+ Error err = sp->base->put_packet((const uint8_t *)buf, len);
+ if (err == ERR_BUSY) {
+ return MBEDTLS_ERR_SSL_WANT_WRITE;
+ } else if (err != OK) {
+ ERR_FAIL_V(MBEDTLS_ERR_SSL_INTERNAL_ERROR);
+ }
+ return len;
+}
+
+int PacketPeerMbedDTLS::bio_recv(void *ctx, unsigned char *buf, size_t len) {
+
+ if (buf == NULL || len <= 0) return 0;
+
+ PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx;
+
+ ERR_FAIL_COND_V(sp == NULL, 0);
+
+ int pc = sp->base->get_available_packet_count();
+ if (pc == 0) {
+ return MBEDTLS_ERR_SSL_WANT_READ;
+ } else if (pc < 0) {
+ ERR_FAIL_V(MBEDTLS_ERR_SSL_INTERNAL_ERROR);
+ }
+
+ const uint8_t *buffer;
+ int buffer_size = 0;
+ Error err = sp->base->get_packet(&buffer, buffer_size);
+ if (err != OK) {
+ return MBEDTLS_ERR_SSL_INTERNAL_ERROR;
+ }
+ copymem(buf, buffer, buffer_size);
+ return buffer_size;
+}
+
+void PacketPeerMbedDTLS::_cleanup() {
+
+ ssl_ctx->clear();
+ base = Ref<PacketPeer>();
+ status = STATUS_DISCONNECTED;
+}
+
+int PacketPeerMbedDTLS::_set_cookie() {
+ // Setup DTLS session cookie for this client
+ uint8_t client_id[18];
+ IP_Address addr = base->get_packet_address();
+ uint16_t port = base->get_packet_port();
+ copymem(client_id, addr.get_ipv6(), 16);
+ copymem(&client_id[16], (uint8_t *)&port, 2);
+ return mbedtls_ssl_set_client_transport_id(ssl_ctx->get_context(), client_id, 18);
+}
+
+Error PacketPeerMbedDTLS::_do_handshake() {
+ int ret = 0;
+ while ((ret = mbedtls_ssl_handshake(ssl_ctx->get_context())) != 0) {
+ if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
+ if (ret != MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED) {
+ ERR_PRINT("TLS handshake error: " + itos(ret));
+ SSLContextMbedTLS::print_mbedtls_error(ret);
+ }
+ _cleanup();
+ status = STATUS_ERROR;
+ return FAILED;
+ }
+ // Will retry via poll later
+ return OK;
+ }
+
+ status = STATUS_CONNECTED;
+ return OK;
+}
+
+Error PacketPeerMbedDTLS::connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs, const String &p_for_hostname, Ref<X509Certificate> p_ca_certs) {
+
+ ERR_FAIL_COND_V(!p_base.is_valid() || !p_base->is_connected_to_host(), ERR_INVALID_PARAMETER);
+
+ base = p_base;
+ int ret = 0;
+ int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE;
+
+ Error err = ssl_ctx->init_client(MBEDTLS_SSL_TRANSPORT_DATAGRAM, authmode, p_ca_certs);
+ ERR_FAIL_COND_V(err != OK, err);
+
+ mbedtls_ssl_set_hostname(ssl_ctx->get_context(), p_for_hostname.utf8().get_data());
+ mbedtls_ssl_set_bio(ssl_ctx->get_context(), this, bio_send, bio_recv, NULL);
+ mbedtls_ssl_set_timer_cb(ssl_ctx->get_context(), &timer, mbedtls_timing_set_delay, mbedtls_timing_get_delay);
+
+ status = STATUS_HANDSHAKING;
+
+ if ((ret = _do_handshake()) != OK) {
+ status = STATUS_ERROR_HOSTNAME_MISMATCH;
+ return FAILED;
+ }
+
+ return OK;
+}
+
+Error PacketPeerMbedDTLS::accept_peer(Ref<PacketPeerUDP> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain, Ref<CookieContextMbedTLS> p_cookies) {
+
+ Error err = ssl_ctx->init_server(MBEDTLS_SSL_TRANSPORT_DATAGRAM, MBEDTLS_SSL_VERIFY_NONE, p_key, p_cert, p_cookies);
+ ERR_FAIL_COND_V(err != OK, err);
+
+ base = p_base;
+ base->set_blocking_mode(false);
+
+ mbedtls_ssl_session_reset(ssl_ctx->get_context());
+
+ int ret = _set_cookie();
+ if (ret != 0) {
+ _cleanup();
+ ERR_FAIL_V_MSG(FAILED, "Error setting DTLS client cookie");
+ }
+
+ mbedtls_ssl_set_bio(ssl_ctx->get_context(), this, bio_send, bio_recv, NULL);
+ mbedtls_ssl_set_timer_cb(ssl_ctx->get_context(), &timer, mbedtls_timing_set_delay, mbedtls_timing_get_delay);
+
+ status = STATUS_HANDSHAKING;
+
+ if ((ret = _do_handshake()) != OK) {
+ status = STATUS_ERROR;
+ return FAILED;
+ }
+
+ return OK;
+}
+
+Error PacketPeerMbedDTLS::put_packet(const uint8_t *p_buffer, int p_bytes) {
+
+ ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_UNCONFIGURED);
+
+ if (p_bytes == 0)
+ return OK;
+
+ int ret = mbedtls_ssl_write(ssl_ctx->get_context(), p_buffer, p_bytes);
+ if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
+ ret = 0; // non blocking io
+ } else if (ret <= 0) {
+ SSLContextMbedTLS::print_mbedtls_error(ret);
+ _cleanup();
+ return ERR_CONNECTION_ERROR;
+ }
+
+ return OK;
+}
+
+Error PacketPeerMbedDTLS::get_packet(const uint8_t **r_buffer, int &r_bytes) {
+
+ ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_UNCONFIGURED);
+
+ r_bytes = 0;
+
+ int ret = mbedtls_ssl_read(ssl_ctx->get_context(), packet_buffer, PACKET_BUFFER_SIZE);
+ if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
+ ret = 0; // non blocking io
+ } else if (ret <= 0) {
+ if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) {
+ // Also send close notify back
+ disconnect_from_peer();
+ } else {
+ _cleanup();
+ status = STATUS_ERROR;
+ SSLContextMbedTLS::print_mbedtls_error(ret);
+ }
+ return ERR_CONNECTION_ERROR;
+ }
+ *r_buffer = packet_buffer;
+ r_bytes = ret;
+
+ return OK;
+}
+
+void PacketPeerMbedDTLS::poll() {
+
+ if (status == STATUS_HANDSHAKING) {
+ _do_handshake();
+ return;
+ } else if (status != STATUS_CONNECTED) {
+ return;
+ }
+
+ ERR_FAIL_COND(!base.is_valid());
+
+ int ret = mbedtls_ssl_read(ssl_ctx->get_context(), NULL, 0);
+
+ if (ret < 0 && ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
+ if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) {
+ // Also send close notify back
+ disconnect_from_peer();
+ } else {
+ _cleanup();
+ status = STATUS_ERROR;
+ SSLContextMbedTLS::print_mbedtls_error(ret);
+ }
+ }
+}
+
+int PacketPeerMbedDTLS::get_available_packet_count() const {
+
+ ERR_FAIL_COND_V(status != STATUS_CONNECTED, 0);
+
+ return mbedtls_ssl_get_bytes_avail(&(ssl_ctx->ssl)) > 0 ? 1 : 0;
+}
+
+int PacketPeerMbedDTLS::get_max_packet_size() const {
+
+ return 488; // 512 (UDP in Godot) - 24 (DTLS header)
+}
+
+PacketPeerMbedDTLS::PacketPeerMbedDTLS() {
+
+ ssl_ctx.instance();
+ status = STATUS_DISCONNECTED;
+}
+
+PacketPeerMbedDTLS::~PacketPeerMbedDTLS() {
+ disconnect_from_peer();
+}
+
+void PacketPeerMbedDTLS::disconnect_from_peer() {
+
+ if (status != STATUS_CONNECTED && status != STATUS_HANDSHAKING)
+ return;
+
+ if (status == STATUS_CONNECTED) {
+ int ret = 0;
+ // Send SSL close notification, blocking, but ignore other errors.
+ do
+ ret = mbedtls_ssl_close_notify(ssl_ctx->get_context());
+ while (ret == MBEDTLS_ERR_SSL_WANT_WRITE);
+ }
+
+ _cleanup();
+}
+
+PacketPeerMbedDTLS::Status PacketPeerMbedDTLS::get_status() const {
+
+ return status;
+}
+
+PacketPeerDTLS *PacketPeerMbedDTLS::_create_func() {
+
+ return memnew(PacketPeerMbedDTLS);
+}
+
+void PacketPeerMbedDTLS::initialize_dtls() {
+
+ _create = _create_func;
+ available = true;
+}
+
+void PacketPeerMbedDTLS::finalize_dtls() {
+ _create = NULL;
+ available = false;
+}
diff --git a/modules/mbedtls/packet_peer_mbed_dtls.h b/modules/mbedtls/packet_peer_mbed_dtls.h
new file mode 100755
index 0000000000..26c4543785
--- /dev/null
+++ b/modules/mbedtls/packet_peer_mbed_dtls.h
@@ -0,0 +1,88 @@
+/*************************************************************************/
+/* packet_peer_mbed_dtls.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 PACKET_PEER_MBED_DTLS_H
+#define PACKET_PEER_MBED_DTLS_H
+
+#include "core/io/packet_peer_dtls.h"
+#include "ssl_context_mbedtls.h"
+
+#include <mbedtls/timing.h>
+
+class PacketPeerMbedDTLS : public PacketPeerDTLS {
+private:
+ enum {
+ PACKET_BUFFER_SIZE = 65536
+ };
+
+ uint8_t packet_buffer[PACKET_BUFFER_SIZE];
+
+ Status status;
+ String hostname;
+
+ Ref<PacketPeerUDP> base;
+
+ static PacketPeerDTLS *_create_func();
+
+ static int bio_recv(void *ctx, unsigned char *buf, size_t len);
+ static int bio_send(void *ctx, const unsigned char *buf, size_t len);
+ void _cleanup();
+
+protected:
+ Ref<SSLContextMbedTLS> ssl_ctx;
+ mbedtls_timing_delay_context timer;
+
+ static void _bind_methods();
+
+ Error _do_handshake();
+ int _set_cookie();
+
+public:
+ virtual void poll();
+ virtual Error accept_peer(Ref<PacketPeerUDP> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert = Ref<X509Certificate>(), Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>(), Ref<CookieContextMbedTLS> p_cookies = Ref<CookieContextMbedTLS>());
+ virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = false, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>());
+ virtual Status get_status() const;
+
+ virtual void disconnect_from_peer();
+
+ virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size);
+ virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size);
+
+ virtual int get_available_packet_count() const;
+ virtual int get_max_packet_size() const;
+
+ static void initialize_dtls();
+ static void finalize_dtls();
+
+ PacketPeerMbedDTLS();
+ ~PacketPeerMbedDTLS();
+};
+
+#endif // PACKET_PEER_MBED_DTLS_H
diff --git a/modules/mbedtls/register_types.cpp b/modules/mbedtls/register_types.cpp
index 8f9e2c370b..d39af7fe87 100755
--- a/modules/mbedtls/register_types.cpp
+++ b/modules/mbedtls/register_types.cpp
@@ -31,16 +31,22 @@
#include "register_types.h"
#include "crypto_mbedtls.h"
+#include "dtls_server_mbedtls.h"
+#include "packet_peer_mbed_dtls.h"
#include "stream_peer_mbedtls.h"
void register_mbedtls_types() {
CryptoMbedTLS::initialize_crypto();
StreamPeerMbedTLS::initialize_ssl();
+ PacketPeerMbedDTLS::initialize_dtls();
+ DTLSServerMbedTLS::initialize();
}
void unregister_mbedtls_types() {
+ DTLSServerMbedTLS::finalize();
+ PacketPeerMbedDTLS::finalize_dtls();
StreamPeerMbedTLS::finalize_ssl();
CryptoMbedTLS::finalize_crypto();
}
diff --git a/modules/mbedtls/ssl_context_mbedtls.cpp b/modules/mbedtls/ssl_context_mbedtls.cpp
index 82584e3494..52630bd98c 100644
--- a/modules/mbedtls/ssl_context_mbedtls.cpp
+++ b/modules/mbedtls/ssl_context_mbedtls.cpp
@@ -38,6 +38,53 @@ static void my_debug(void *ctx, int level,
fflush(stdout);
}
+void SSLContextMbedTLS::print_mbedtls_error(int p_ret) {
+ printf("mbedtls error: returned -0x%x\n\n", -p_ret);
+ fflush(stdout);
+}
+
+/// CookieContextMbedTLS
+
+Error CookieContextMbedTLS::setup() {
+ ERR_FAIL_COND_V_MSG(inited, ERR_ALREADY_IN_USE, "This cookie context is already in use");
+
+ mbedtls_ctr_drbg_init(&ctr_drbg);
+ mbedtls_entropy_init(&entropy);
+ mbedtls_ssl_cookie_init(&cookie_ctx);
+ inited = true;
+
+ int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);
+ if (ret != 0) {
+ clear(); // Never leave unusable resources around.
+ ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error " + itos(ret));
+ }
+
+ ret = mbedtls_ssl_cookie_setup(&cookie_ctx, mbedtls_ctr_drbg_random, &ctr_drbg);
+ if (ret != 0) {
+ clear();
+ ERR_FAIL_V_MSG(FAILED, "mbedtls_ssl_cookie_setup returned an error " + itos(ret));
+ }
+ return OK;
+}
+
+void CookieContextMbedTLS::clear() {
+ if (!inited)
+ return;
+ mbedtls_ctr_drbg_free(&ctr_drbg);
+ mbedtls_entropy_free(&entropy);
+ mbedtls_ssl_cookie_free(&cookie_ctx);
+}
+
+CookieContextMbedTLS::CookieContextMbedTLS() {
+ inited = false;
+}
+
+CookieContextMbedTLS::~CookieContextMbedTLS() {
+ clear();
+}
+
+/// SSLContextMbedTLS
+
Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode) {
ERR_FAIL_COND_V_MSG(inited, ERR_ALREADY_IN_USE, "This SSL context is already active");
@@ -50,7 +97,7 @@ Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode)
int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);
if (ret != 0) {
clear(); // Never leave unusable resources around.
- ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error" + itos(ret));
+ ERR_FAIL_V_MSG(FAILED, "mbedtls_ctr_drbg_seed returned an error " + itos(ret));
}
ret = mbedtls_ssl_config_defaults(&conf, p_endpoint, p_transport, MBEDTLS_SSL_PRESET_DEFAULT);
@@ -64,7 +111,7 @@ Error SSLContextMbedTLS::_setup(int p_endpoint, int p_transport, int p_authmode)
return OK;
}
-Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert) {
+Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert, Ref<CookieContextMbedTLS> p_cookies) {
ERR_FAIL_COND_V(!p_pkey.is_valid(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(!p_cert.is_valid(), ERR_INVALID_PARAMETER);
@@ -89,6 +136,15 @@ Error SSLContextMbedTLS::init_server(int p_transport, int p_authmode, Ref<Crypto
if (certs->cert.next) {
mbedtls_ssl_conf_ca_chain(&conf, certs->cert.next, NULL);
}
+ // DTLS Cookies
+ if (p_transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) {
+ if (p_cookies.is_null() || !p_cookies->inited) {
+ clear();
+ ERR_FAIL_V(ERR_BUG);
+ }
+ cookies = p_cookies;
+ mbedtls_ssl_conf_dtls_cookies(&conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &(cookies->cookie_ctx));
+ }
mbedtls_ssl_setup(&ssl, &conf);
return OK;
}
@@ -134,6 +190,7 @@ void SSLContextMbedTLS::clear() {
if (pkey.is_valid())
pkey->unlock();
pkey = Ref<CryptoKeyMbedTLS>();
+ cookies = Ref<CookieContextMbedTLS>();
inited = false;
}
diff --git a/modules/mbedtls/ssl_context_mbedtls.h b/modules/mbedtls/ssl_context_mbedtls.h
index 9145e0fd72..d3e1f87a8e 100644
--- a/modules/mbedtls/ssl_context_mbedtls.h
+++ b/modules/mbedtls/ssl_context_mbedtls.h
@@ -34,7 +34,7 @@
#include "crypto_mbedtls.h"
#include "core/os/file_access.h"
-#include "core/pool_vector.h"
+
#include "core/reference.h"
#include <mbedtls/config.h>
@@ -42,25 +42,49 @@
#include <mbedtls/debug.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ssl.h>
+#include <mbedtls/ssl_cookie.h>
+
+class SSLContextMbedTLS;
+
+class CookieContextMbedTLS : public Reference {
+
+ friend class SSLContextMbedTLS;
+
+protected:
+ bool inited;
+ mbedtls_entropy_context entropy;
+ mbedtls_ctr_drbg_context ctr_drbg;
+ mbedtls_ssl_cookie_ctx cookie_ctx;
+
+public:
+ Error setup();
+ void clear();
+
+ CookieContextMbedTLS();
+ ~CookieContextMbedTLS();
+};
class SSLContextMbedTLS : public Reference {
protected:
bool inited;
- static PoolByteArray _read_file(String p_path);
+ static PackedByteArray _read_file(String p_path);
public:
+ static void print_mbedtls_error(int p_ret);
+
Ref<X509CertificateMbedTLS> certs;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
+ Ref<CookieContextMbedTLS> cookies;
Ref<CryptoKeyMbedTLS> pkey;
Error _setup(int p_endpoint, int p_transport, int p_authmode);
- Error init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert);
+ Error init_server(int p_transport, int p_authmode, Ref<CryptoKeyMbedTLS> p_pkey, Ref<X509CertificateMbedTLS> p_cert, Ref<CookieContextMbedTLS> p_cookies = Ref<CookieContextMbedTLS>());
Error init_client(int p_transport, int p_authmode, Ref<X509CertificateMbedTLS> p_valid_cas);
void clear();
diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp
index f06327e0d5..03c5922267 100755
--- a/modules/mbedtls/stream_peer_mbedtls.cpp
+++ b/modules/mbedtls/stream_peer_mbedtls.cpp
@@ -33,11 +33,6 @@
#include "core/io/stream_peer_tcp.h"
#include "core/os/file_access.h"
-void _print_error(int ret) {
- printf("mbedtls error: returned -0x%x\n\n", -ret);
- fflush(stdout);
-}
-
int StreamPeerMbedTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) {
if (buf == NULL || len <= 0) return 0;
@@ -89,7 +84,7 @@ Error StreamPeerMbedTLS::_do_handshake() {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
// An error occurred.
ERR_PRINT("TLS handshake error: " + itos(ret));
- _print_error(ret);
+ SSLContextMbedTLS::print_mbedtls_error(ret);
disconnect_from_stream();
status = STATUS_ERROR;
return FAILED;
@@ -188,7 +183,7 @@ Error StreamPeerMbedTLS::put_partial_data(const uint8_t *p_data, int p_bytes, in
disconnect_from_stream();
return ERR_FILE_EOF;
} else if (ret <= 0) {
- _print_error(ret);
+ SSLContextMbedTLS::print_mbedtls_error(ret);
disconnect_from_stream();
return ERR_CONNECTION_ERROR;
}
@@ -233,7 +228,7 @@ Error StreamPeerMbedTLS::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r
disconnect_from_stream();
return ERR_FILE_EOF;
} else if (ret <= 0) {
- _print_error(ret);
+ SSLContextMbedTLS::print_mbedtls_error(ret);
disconnect_from_stream();
return ERR_CONNECTION_ERROR;
}
@@ -264,7 +259,7 @@ void StreamPeerMbedTLS::poll() {
disconnect_from_stream();
return;
} else if (ret < 0) {
- _print_error(ret);
+ SSLContextMbedTLS::print_mbedtls_error(ret);
disconnect_from_stream();
return;
}
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index afa8766bce..2f1d95cd42 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -221,13 +221,13 @@ void MobileVRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_k2", "k"), &MobileVRInterface::set_k2);
ClassDB::bind_method(D_METHOD("get_k2"), &MobileVRInterface::get_k2);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2");
}
void MobileVRInterface::set_eye_height(const real_t p_eye_height) {
diff --git a/modules/mono/build_scripts/make_android_mono_config.py b/modules/mono/build_scripts/make_android_mono_config.py
index 8cad204d7b..0afd939c57 100644
--- a/modules/mono/build_scripts/make_android_mono_config.py
+++ b/modules/mono/build_scripts/make_android_mono_config.py
@@ -24,7 +24,7 @@ def generate_compressed_config(config_src, output_dir):
#ifdef ANDROID_ENABLED
#include "core/io/compression.h"
-#include "core/pool_vector.h"
+
namespace {
@@ -36,9 +36,9 @@ static const unsigned char config_compressed_data[] = { %s };
} // namespace
String get_godot_android_mono_config() {
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(config_uncompressed_size);
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t* w = data.ptrw();
Compression::decompress(w.ptr(), config_uncompressed_size, config_compressed_data,
config_compressed_size, Compression::MODE_DEFLATE);
String s;
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py
index 033c467da9..9a6198f13a 100644
--- a/modules/mono/build_scripts/mono_configure.py
+++ b/modules/mono/build_scripts/mono_configure.py
@@ -163,7 +163,7 @@ def configure(env, env_mono):
copy_file(mono_bin_path, '#bin', mono_dll_name + '.dll')
else:
- is_apple = (sys.platform == 'darwin' or "osxcross" in env)
+ is_apple = env['platform'] in ['osx', 'iphone']
sharedlib_ext = '.dylib' if is_apple else '.so'
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index c722076fe2..6809cbdff9 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -35,6 +35,7 @@
#include "core/io/json.h"
#include "core/os/file_access.h"
+#include "core/os/mutex.h"
#include "core/os/os.h"
#include "core/os/thread.h"
#include "core/project_settings.h"
@@ -58,7 +59,6 @@
#include "mono_gd/gd_mono_utils.h"
#include "signal_awaiter_utils.h"
#include "utils/macros.h"
-#include "utils/mutex_utils.h"
#include "utils/string_utils.h"
#include "utils/thread_local.h"
@@ -411,7 +411,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
if (p_var_type_name == Variant::get_type_name(Variant::OBJECT))
return "Godot.Object";
- if (p_var_type_name == Variant::get_type_name(Variant::REAL)) {
+ if (p_var_type_name == Variant::get_type_name(Variant::FLOAT)) {
#ifdef REAL_T_IS_DOUBLE
return "double";
#else
@@ -428,24 +428,24 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
if (p_var_type_name == Variant::get_type_name(Variant::ARRAY))
return "Collections.Array";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_BYTE_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_BYTE_ARRAY))
return "byte[]";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_INT_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_INT32_ARRAY))
return "int[]";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_REAL_ARRAY)) {
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_FLOAT32_ARRAY)) {
#ifdef REAL_T_IS_DOUBLE
return "double[]";
#else
return "float[]";
#endif
}
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_STRING_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_STRING_ARRAY))
return "string[]";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_VECTOR2_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_VECTOR2_ARRAY))
return "Vector2[]";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_VECTOR3_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_VECTOR3_ARRAY))
return "Vector3[]";
- if (p_var_type_name == Variant::get_type_name(Variant::POOL_COLOR_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_COLOR_ARRAY))
return "Color[]";
Variant::Type var_types[] = {
@@ -473,7 +473,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
return "object";
}
-String CSharpLanguage::make_function(const String &, const String &p_name, const PoolStringArray &p_args) const {
+String CSharpLanguage::make_function(const String &, const String &p_name, const PackedStringArray &p_args) const {
// FIXME
// - Due to Godot's API limitation this just appends the function to the end of the file
// - Use fully qualified name if there is ambiguity
@@ -491,7 +491,7 @@ String CSharpLanguage::make_function(const String &, const String &p_name, const
return s;
}
#else
-String CSharpLanguage::make_function(const String &, const String &, const PoolStringArray &) const {
+String CSharpLanguage::make_function(const String &, const String &, const PackedStringArray &) const {
return String();
}
#endif
@@ -633,7 +633,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::stack_trace_get_info(MonoObjec
void CSharpLanguage::post_unsafe_reference(Object *p_obj) {
#ifdef DEBUG_ENABLED
- SCOPED_MUTEX_LOCK(unsafe_object_references_lock);
+ MutexLock lock(unsafe_object_references_lock);
ObjectID id = p_obj->get_instance_id();
unsafe_object_references[id]++;
#endif
@@ -641,7 +641,7 @@ void CSharpLanguage::post_unsafe_reference(Object *p_obj) {
void CSharpLanguage::pre_unsafe_unreference(Object *p_obj) {
#ifdef DEBUG_ENABLED
- SCOPED_MUTEX_LOCK(unsafe_object_references_lock);
+ MutexLock lock(unsafe_object_references_lock);
ObjectID id = p_obj->get_instance_id();
Map<ObjectID, int>::Element *elem = unsafe_object_references.find(id);
ERR_FAIL_NULL(elem);
@@ -764,7 +764,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
List<Ref<CSharpScript> > scripts;
{
- SCOPED_MUTEX_LOCK(script_instances_mutex);
+ MutexLock lock(script_instances_mutex);
for (SelfList<CSharpScript> *elem = script_list.first(); elem; elem = elem->next()) {
// Cast to CSharpScript to avoid being erased by accident
@@ -1204,7 +1204,7 @@ void CSharpLanguage::set_language_index(int p_idx) {
void CSharpLanguage::release_script_gchandle(Ref<MonoGCHandle> &p_gchandle) {
if (!p_gchandle->is_released()) { // Do not lock unnecessarily
- SCOPED_MUTEX_LOCK(get_singleton()->script_gchandle_release_mutex);
+ MutexLock lock(get_singleton()->script_gchandle_release_mutex);
p_gchandle->release();
}
}
@@ -1214,7 +1214,7 @@ void CSharpLanguage::release_script_gchandle(MonoObject *p_expected_obj, Ref<Mon
uint32_t pinned_gchandle = MonoGCHandle::new_strong_handle_pinned(p_expected_obj); // We might lock after this, so pin it
if (!p_gchandle->is_released()) { // Do not lock unnecessarily
- SCOPED_MUTEX_LOCK(get_singleton()->script_gchandle_release_mutex);
+ MutexLock lock(get_singleton()->script_gchandle_release_mutex);
MonoObject *target = p_gchandle->get_target();
@@ -1239,24 +1239,6 @@ CSharpLanguage::CSharpLanguage() {
gdmono = NULL;
-#ifdef NO_THREADS
- script_instances_mutex = NULL;
- script_gchandle_release_mutex = NULL;
- language_bind_mutex = NULL;
-#else
- script_instances_mutex = Mutex::create();
- script_gchandle_release_mutex = Mutex::create();
- language_bind_mutex = Mutex::create();
-#endif
-
-#ifdef DEBUG_ENABLED
-#ifdef NO_THREADS
- unsafe_object_references_lock = NULL;
-#else
- unsafe_object_references_lock = Mutex::create();
-#endif
-#endif
-
lang_idx = -1;
scripts_metadata_invalidated = true;
@@ -1269,29 +1251,6 @@ CSharpLanguage::CSharpLanguage() {
CSharpLanguage::~CSharpLanguage() {
finish();
-
- if (script_instances_mutex) {
- memdelete(script_instances_mutex);
- script_instances_mutex = NULL;
- }
-
- if (language_bind_mutex) {
- memdelete(language_bind_mutex);
- language_bind_mutex = NULL;
- }
-
- if (script_gchandle_release_mutex) {
- memdelete(script_gchandle_release_mutex);
- script_gchandle_release_mutex = NULL;
- }
-
-#ifdef DEBUG_ENABLED
- if (unsafe_object_references_lock) {
- memdelete(unsafe_object_references_lock);
- unsafe_object_references_lock = NULL;
- }
-#endif
-
singleton = NULL;
}
@@ -1346,7 +1305,7 @@ bool CSharpLanguage::setup_csharp_script_binding(CSharpScriptBinding &r_script_b
void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) {
- SCOPED_MUTEX_LOCK(language_bind_mutex);
+ MutexLock lock(language_bind_mutex);
Map<Object *, CSharpScriptBinding>::Element *match = script_bindings.find(p_object);
if (match)
@@ -1381,7 +1340,7 @@ void CSharpLanguage::free_instance_binding_data(void *p_data) {
GD_MONO_ASSERT_THREAD_ATTACHED;
{
- SCOPED_MUTEX_LOCK(language_bind_mutex);
+ MutexLock lock(language_bind_mutex);
Map<Object *, CSharpScriptBinding>::Element *data = (Map<Object *, CSharpScriptBinding>::Element *)p_data;
@@ -1720,7 +1679,7 @@ bool CSharpInstance::has_method(const StringName &p_method) const {
return false;
}
-Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
ERR_FAIL_COND_V(!script.is_valid(), Variant());
@@ -1729,7 +1688,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
MonoObject *mono_object = get_mono_object();
if (!mono_object) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
ERR_FAIL_V(Variant());
}
@@ -1741,7 +1700,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
if (method) {
MonoObject *return_value = method->invoke(mono_object, p_args);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
if (return_value) {
return GDMonoMarshal::mono_object_to_variant(return_value);
@@ -1753,7 +1712,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
top = top->get_parent_class();
}
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -2187,7 +2146,7 @@ CSharpInstance::~CSharpInstance() {
CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
if (!script_binding.inited) {
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->get_language_bind_mutex());
+ MutexLock lock(CSharpLanguage::get_singleton()->get_language_bind_mutex());
if (!script_binding.inited) { // Other thread may have set it up
// Already had a binding that needs to be setup
@@ -2203,7 +2162,7 @@ CSharpInstance::~CSharpInstance() {
}
if (script.is_valid() && owner) {
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
#ifdef DEBUG_ENABLED
// CSharpInstance must not be created unless it's going to be added to the list for sure
@@ -2704,11 +2663,11 @@ void CSharpScript::_clear() {
script_class = NULL;
}
-Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (unlikely(GDMono::get_singleton() == NULL)) {
// Probably not the best error but eh.
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
@@ -2904,7 +2863,7 @@ StringName CSharpScript::get_instance_base_type() const {
return StringName();
}
-CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error) {
+CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) {
GD_MONO_ASSERT_THREAD_ATTACHED;
@@ -2968,7 +2927,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
CRASH_COND(die == true);
p_owner->set_script_instance(NULL);
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
ERR_FAIL_V_MSG(NULL, "Failed to allocate memory for the object.");
}
@@ -2979,7 +2938,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
instance->_reference_owner_unsafe(); // Here, after assigning the gchandle (for the refcount_incremented callback)
{
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
instances.insert(instance->owner);
}
@@ -2994,14 +2953,14 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
return instance;
}
-Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
ERR_FAIL_NULL_V(native, Variant());
@@ -3049,7 +3008,7 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) {
GD_MONO_SCOPE_THREAD_ATTACH;
- Variant::CallError unchecked_error;
+ Callable::CallError unchecked_error;
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error);
}
@@ -3067,7 +3026,7 @@ PlaceHolderScriptInstance *CSharpScript::placeholder_instance_create(Object *p_t
bool CSharpScript::instance_has(const Object *p_this) const {
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
return instances.has((Object *)p_this);
}
@@ -3140,7 +3099,7 @@ Error CSharpScript::reload(bool p_keep_state) {
bool has_instances;
{
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
has_instances = instances.size();
}
@@ -3476,7 +3435,7 @@ CSharpScript::CSharpScript() :
#ifdef DEBUG_ENABLED
{
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
CSharpLanguage::get_singleton()->script_list.add(&this->script_list);
}
#endif
@@ -3485,14 +3444,14 @@ CSharpScript::CSharpScript() :
CSharpScript::~CSharpScript() {
#ifdef DEBUG_ENABLED
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
+ MutexLock lock(CSharpLanguage::get_singleton()->script_instances_mutex);
CSharpLanguage::get_singleton()->script_list.remove(&this->script_list);
#endif
}
/*************** RESOURCE ***************/
-RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 32a5b30c18..18c53aab52 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -141,8 +141,8 @@ class CSharpScript : public Script {
static int _try_get_member_export_hint(IMonoClassMember *p_member, ManagedType p_type, Variant::Type p_variant_type, bool p_allow_generics, PropertyHint &r_hint, String &r_hint_string);
#endif
- CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error);
- Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error);
+ Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
// Do not use unless you know what you are doing
friend void GDMonoInternals::tie_managed_to_unmanaged(MonoObject *, Object *);
@@ -154,7 +154,7 @@ class CSharpScript : public Script {
protected:
static void _bind_methods();
- Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void _resource_path_changed();
bool _get(const StringName &p_name, Variant &r_ret) const;
bool _set(const StringName &p_name, const Variant &p_value);
@@ -265,7 +265,7 @@ public:
/* TODO */ virtual void get_method_list(List<MethodInfo> *p_list) const {}
virtual bool has_method(const StringName &p_method) const;
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount);
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
@@ -325,16 +325,16 @@ class CSharpLanguage : public ScriptLanguage {
GDMono *gdmono;
SelfList<CSharpScript>::List script_list;
- Mutex *script_instances_mutex;
- Mutex *script_gchandle_release_mutex;
- Mutex *language_bind_mutex;
+ Mutex script_instances_mutex;
+ Mutex script_gchandle_release_mutex;
+ Mutex language_bind_mutex;
Map<Object *, CSharpScriptBinding> script_bindings;
#ifdef DEBUG_ENABLED
// List of unsafe object references
Map<ObjectID, int> unsafe_object_references;
- Mutex *unsafe_object_references_lock;
+ Mutex unsafe_object_references_lock;
#endif
struct StringNameCache {
@@ -376,7 +376,7 @@ class CSharpLanguage : public ScriptLanguage {
public:
StringNameCache string_names;
- Mutex *get_language_bind_mutex() { return language_bind_mutex; }
+ const Mutex &get_language_bind_mutex() { return language_bind_mutex; }
_FORCE_INLINE_ int get_language_index() { return lang_idx; }
void set_language_index(int p_idx);
@@ -432,7 +432,7 @@ public:
virtual bool has_named_classes() const;
virtual bool supports_builtin_mode() const;
/* TODO? */ virtual int find_function(const String &p_function, const String &p_code) const { return -1; }
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual String _get_indentation() const;
/* TODO? */ virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {}
/* TODO */ virtual void add_global_constant(const StringName &p_variable, const Variant &p_value) {}
@@ -497,7 +497,7 @@ public:
class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml
index 826c106d7e..83a7fbf02c 100644
--- a/modules/mono/doc_classes/@C#.xml
+++ b/modules/mono/doc_classes/@C#.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@C#" category="Core" version="3.2">
+<class name="@C#" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml
index de2e246ea9..1eb3404f9e 100644
--- a/modules/mono/doc_classes/CSharpScript.xml
+++ b/modules/mono/doc_classes/CSharpScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSharpScript" inherits="Script" category="Core" version="3.2">
+<class name="CSharpScript" inherits="Script" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -8,7 +8,7 @@
</tutorials>
<methods>
<method name="new" qualifiers="vararg">
- <return type="Object">
+ <return type="Variant">
</return>
<description>
</description>
diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml
index 18556a84ba..19a08d2036 100644
--- a/modules/mono/doc_classes/GodotSharp.xml
+++ b/modules/mono/doc_classes/GodotSharp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GodotSharp" inherits="Object" category="Core" version="3.2">
+<class name="GodotSharp" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs
index 4c76d2abf1..bd7eb59913 100644
--- a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs
@@ -172,7 +172,7 @@ namespace GodotTools
return;
// Notify running game for hot-reload
- Internal.ScriptEditorDebuggerReloadScripts();
+ Internal.EditorDebuggerNodeReloadScripts();
// Hot-reload in the editor
GodotSharpEditor.Instance.GetNode<HotReloadAssemblyWatcher>("HotReloadAssemblyWatcher").RestartTimer();
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
index c3db52aa9e..af8d070cbd 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using Godot;
+using GodotTools.Ides.Rider;
using GodotTools.Internals;
using Directory = System.IO.Directory;
using Environment = System.Environment;
@@ -54,6 +55,12 @@ namespace GodotTools.Build
return msbuildPath;
}
+ case BuildManager.BuildTool.JetBrainsMsBuild:
+ var editorPath = (string)editorSettings.GetSetting(RiderPathManager.EditorPathSettingName);
+ if (!File.Exists(editorPath))
+ throw new FileNotFoundException($"Cannot find Rider executable. Tried with path: {editorPath}");
+ var riderDir = new FileInfo(editorPath).Directory.Parent;
+ return Path.Combine(riderDir.FullName, @"tools\MSBuild\Current\Bin\MSBuild.exe");
default:
throw new IndexOutOfRangeException("Invalid build tool in editor settings");
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs
index fa6bf4dafd..69a8c9cf4a 100644
--- a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using GodotTools.Build;
+using GodotTools.Ides.Rider;
using GodotTools.Internals;
using GodotTools.Utils;
using static GodotTools.Internals.Globals;
@@ -16,6 +17,7 @@ namespace GodotTools
public const string PropNameMsbuildMono = "MSBuild (Mono)";
public const string PropNameMsbuildVs = "MSBuild (VS Build Tools)";
+ public const string PropNameMsbuildJetBrains = "MSBuild (JetBrains Rider)";
public const string MsBuildIssuesFileName = "msbuild_issues.csv";
public const string MsBuildLogFileName = "msbuild_log.txt";
@@ -23,7 +25,8 @@ namespace GodotTools
public enum BuildTool
{
MsBuildMono,
- MsBuildVs
+ MsBuildVs,
+ JetBrainsMsBuild
}
private static void RemoveOldIssuesFile(BuildInfo buildInfo)
@@ -181,7 +184,7 @@ namespace GodotTools
var buildInfo = new BuildInfo(GodotSharpDirs.ProjectSlnPath, config);
// Add Godot defines
- string constants = buildTool == BuildTool.MsBuildVs ? "GodotDefineConstants=\"" : "GodotDefineConstants=\\\"";
+ string constants = buildTool != BuildTool.MsBuildMono ? "GodotDefineConstants=\"" : "GodotDefineConstants=\\\"";
foreach (var godotDefine in godotDefines)
constants += $"GODOT_{godotDefine.ToUpper().Replace("-", "_").Replace(" ", "_").Replace(";", "_")};";
@@ -189,7 +192,7 @@ namespace GodotTools
if (Internal.GodotIsRealTDouble())
constants += "GODOT_REAL_T_IS_DOUBLE;";
- constants += buildTool == BuildTool.MsBuildVs ? "\"" : "\\\"";
+ constants += buildTool != BuildTool.MsBuildMono ? "\"" : "\\\"";
buildInfo.CustomProperties.Add(constants);
@@ -245,18 +248,22 @@ namespace GodotTools
public static void Initialize()
{
// Build tool settings
-
- EditorDef("mono/builds/build_tool", OS.IsWindows ? BuildTool.MsBuildVs : BuildTool.MsBuildMono);
-
var editorSettings = GodotSharpEditor.Instance.GetEditorInterface().GetEditorSettings();
-
+ var msbuild = BuildTool.MsBuildMono;
+ if (OS.IsWindows)
+ msbuild = RiderPathManager.IsRider((string) editorSettings.GetSetting(RiderPathManager.EditorPathSettingName))
+ ? BuildTool.JetBrainsMsBuild
+ : BuildTool.MsBuildVs;
+
+ EditorDef("mono/builds/build_tool", msbuild);
+
editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
{
["type"] = Godot.Variant.Type.Int,
["name"] = "mono/builds/build_tool",
["hint"] = Godot.PropertyHint.Enum,
["hint_string"] = OS.IsWindows ?
- $"{PropNameMsbuildMono},{PropNameMsbuildVs}" :
+ $"{PropNameMsbuildMono},{PropNameMsbuildVs},{PropNameMsbuildJetBrains}" :
$"{PropNameMsbuildMono}"
});
diff --git a/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs b/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs
index 727581daab..f75fe239e3 100644
--- a/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/BuildTab.cs
@@ -41,7 +41,7 @@ namespace GodotTools
public bool ErrorsVisible { get; set; } = true;
public bool WarningsVisible { get; set; } = true;
- public Texture IconTexture
+ public Texture2D IconTexture
{
get
{
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
index 9038333d38..77740f0e53 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
@@ -11,6 +11,10 @@ using Environment = System.Environment;
using File = System.IO.File;
using Path = System.IO.Path;
using OS = GodotTools.Utils.OS;
+// ReSharper disable UnassignedField.Local
+// ReSharper disable InconsistentNaming
+// ReSharper disable UnassignedField.Global
+// ReSharper disable MemberHidesStaticFromOuterClass
namespace GodotTools.Ides.Rider
{
@@ -131,28 +135,45 @@ namespace GodotTools.Ides.Rider
if (OS.IsWindows)
{
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
- return Path.Combine(localAppData, @"JetBrains\Toolbox\apps\Rider");
+ return GetToolboxRiderRootPath(localAppData);
}
if (OS.IsOSX)
{
var home = Environment.GetEnvironmentVariable("HOME");
- if (!string.IsNullOrEmpty(home))
- {
- return Path.Combine(home, @"Library/Application Support/JetBrains/Toolbox/apps/Rider");
- }
+ if (string.IsNullOrEmpty(home))
+ return string.Empty;
+ var localAppData = Path.Combine(home, @"Library/Application Support");
+ return GetToolboxRiderRootPath(localAppData);
}
if (OS.IsUnixLike())
{
var home = Environment.GetEnvironmentVariable("HOME");
- if (!string.IsNullOrEmpty(home))
- {
- return Path.Combine(home, @".local/share/JetBrains/Toolbox/apps/Rider");
- }
+ if (string.IsNullOrEmpty(home))
+ return string.Empty;
+ var localAppData = Path.Combine(home, @".local/share");
+ return GetToolboxRiderRootPath(localAppData);
}
- throw new Exception("Unexpected OS.");
+ return string.Empty;
+ }
+
+
+ private static string GetToolboxRiderRootPath(string localAppData)
+ {
+ var toolboxPath = Path.Combine(localAppData, @"JetBrains\Toolbox");
+ var settingsJson = Path.Combine(toolboxPath, ".settings.json");
+
+ if (File.Exists(settingsJson))
+ {
+ var path = SettingsJson.GetInstallLocationFromJson(File.ReadAllText(settingsJson));
+ if (!string.IsNullOrEmpty(path))
+ toolboxPath = path;
+ }
+
+ var toolboxRiderRootPath = Path.Combine(toolboxPath, @"apps\Rider");
+ return toolboxRiderRootPath;
}
internal static ProductInfo GetBuildVersion(string path)
@@ -197,20 +218,29 @@ namespace GodotTools.Ides.Rider
private static void CollectPathsFromRegistry(string registryKey, List<string> installPaths)
{
+ using (var key = Registry.CurrentUser.OpenSubKey(registryKey))
+ {
+ CollectPathsFromRegistry(installPaths, key);
+ }
using (var key = Registry.LocalMachine.OpenSubKey(registryKey))
{
- if (key == null) return;
- foreach (var subkeyName in key.GetSubKeyNames().Where(a => a.Contains("Rider")))
+ CollectPathsFromRegistry(installPaths, key);
+ }
+ }
+
+ private static void CollectPathsFromRegistry(List<string> installPaths, RegistryKey key)
+ {
+ if (key == null) return;
+ foreach (var subkeyName in key.GetSubKeyNames().Where(a => a.Contains("Rider")))
+ {
+ using (var subkey = key.OpenSubKey(subkeyName))
{
- using (var subkey = key.OpenSubKey(subkeyName))
- {
- var folderObject = subkey?.GetValue("InstallLocation");
- if (folderObject == null) continue;
- var folder = folderObject.ToString();
- var possiblePath = Path.Combine(folder, @"bin\rider64.exe");
- if (File.Exists(possiblePath))
- installPaths.Add(possiblePath);
- }
+ var folderObject = subkey?.GetValue("InstallLocation");
+ if (folderObject == null) continue;
+ var folder = folderObject.ToString();
+ var possiblePath = Path.Combine(folder, @"bin\rider64.exe");
+ if (File.Exists(possiblePath))
+ installPaths.Add(possiblePath);
}
}
}
@@ -226,8 +256,8 @@ namespace GodotTools.Ides.Rider
{
try
{
- // use history.json - last entry stands for the active build https://jetbrains.slack.com/archives/C07KNP99D/p1547807024066500?thread_ts=1547731708.057700&cid=C07KNP99D
- var historyFile = Path.Combine(channelDir, ".history.json");
+ // use history.json - last entry stands for the active build https://jetbrains.slack.com/archives/C07KNP99D/p1547807024066500?thread_ts=1547731708.057700&cid=C07KNP99D
+ var historyFile = Path.Combine(channelDir, ".history.json");
if (File.Exists(historyFile))
{
var json = File.ReadAllText(historyFile);
@@ -255,14 +285,14 @@ namespace GodotTools.Ides.Rider
}
}
- // changes in toolbox json files format may brake the logic above, so return all found Rider installations
- return Directory.GetDirectories(channelDir)
- .SelectMany(buildDir => GetExecutablePaths(dirName, searchPattern, isMac, buildDir));
+ // changes in toolbox json files format may brake the logic above, so return all found Rider installations
+ return Directory.GetDirectories(channelDir)
+ .SelectMany(buildDir => GetExecutablePaths(dirName, searchPattern, isMac, buildDir));
}
catch (Exception e)
{
- // do not write to Debug.Log, just log it.
- Logger.Warn($"Failed to get RiderPath from {channelDir}", e);
+ // do not write to Debug.Log, just log it.
+ Logger.Warn($"Failed to get RiderPath from {channelDir}", e);
}
return new string[0];
@@ -289,6 +319,27 @@ namespace GodotTools.Ides.Rider
#pragma warning disable 0649
[Serializable]
+ class SettingsJson
+ {
+ public string install_location;
+
+ [CanBeNull]
+ public static string GetInstallLocationFromJson(string json)
+ {
+ try
+ {
+ return JsonConvert.DeserializeObject<SettingsJson>(json).install_location;
+ }
+ catch (Exception)
+ {
+ Logger.Warn($"Failed to get install_location from json {json}");
+ }
+
+ return null;
+ }
+ }
+
+ [Serializable]
class ToolboxHistory
{
public List<ItemNode> history;
@@ -372,7 +423,6 @@ namespace GodotTools.Ides.Rider
[Serializable]
class ActiveApplication
{
- // ReSharper disable once InconsistentNaming
public List<string> builds;
}
@@ -380,6 +430,7 @@ namespace GodotTools.Ides.Rider
public struct RiderInfo
{
+ // ReSharper disable once NotAccessedField.Global
public bool IsToolbox;
public string Presentation;
public Version BuildNumber;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
index 558a242bf9..ee5677a6a8 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
@@ -9,13 +9,13 @@ namespace GodotTools.Ides.Rider
{
public static class RiderPathManager
{
- private static readonly string editorPathSettingName = "mono/editor/editor_path_optional";
+ public static readonly string EditorPathSettingName = "mono/editor/editor_path_optional";
private static string GetRiderPathFromSettings()
{
var editorSettings = GodotSharpEditor.Instance.GetEditorInterface().GetEditorSettings();
- if (editorSettings.HasSetting(editorPathSettingName))
- return (string)editorSettings.GetSetting(editorPathSettingName);
+ if (editorSettings.HasSetting(EditorPathSettingName))
+ return (string)editorSettings.GetSetting(EditorPathSettingName);
return null;
}
@@ -25,22 +25,22 @@ namespace GodotTools.Ides.Rider
var editor = (ExternalEditorId)editorSettings.GetSetting("mono/editor/external_editor");
if (editor == ExternalEditorId.Rider)
{
- if (!editorSettings.HasSetting(editorPathSettingName))
+ if (!editorSettings.HasSetting(EditorPathSettingName))
{
- Globals.EditorDef(editorPathSettingName, "Optional");
+ Globals.EditorDef(EditorPathSettingName, "Optional");
editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
{
["type"] = Variant.Type.String,
- ["name"] = editorPathSettingName,
+ ["name"] = EditorPathSettingName,
["hint"] = PropertyHint.File,
["hint_string"] = ""
});
}
- var riderPath = (string)editorSettings.GetSetting(editorPathSettingName);
+ var riderPath = (string)editorSettings.GetSetting(EditorPathSettingName);
if (IsRiderAndExists(riderPath))
{
- Globals.EditorDef(editorPathSettingName, riderPath);
+ Globals.EditorDef(EditorPathSettingName, riderPath);
return;
}
@@ -50,17 +50,15 @@ namespace GodotTools.Ides.Rider
return;
var newPath = paths.Last().Path;
- Globals.EditorDef(editorPathSettingName, newPath);
- editorSettings.SetSetting(editorPathSettingName, newPath);
+ Globals.EditorDef(EditorPathSettingName, newPath);
+ editorSettings.SetSetting(EditorPathSettingName, newPath);
}
}
- private static bool IsRider(string path)
+ public static bool IsRider(string path)
{
if (string.IsNullOrEmpty(path))
- {
return false;
- }
var fileInfo = new FileInfo(path);
var filename = fileInfo.Name.ToLowerInvariant();
@@ -81,8 +79,8 @@ namespace GodotTools.Ides.Rider
return null;
var newPath = paths.Last().Path;
- editorSettings.SetSetting(editorPathSettingName, newPath);
- Globals.EditorDef(editorPathSettingName, newPath);
+ editorSettings.SetSetting(EditorPathSettingName, newPath);
+ Globals.EditorDef(EditorPathSettingName, newPath);
return newPath;
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
index de361ba844..2e121ba879 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
@@ -34,7 +34,7 @@ namespace GodotTools.Internals
public static void ReloadAssemblies(bool softReload) => internal_ReloadAssemblies(softReload);
- public static void ScriptEditorDebuggerReloadScripts() => internal_ScriptEditorDebuggerReloadScripts();
+ public static void EditorDebuggerNodeReloadScripts() => internal_EditorDebuggerNodeReloadScripts();
public static bool ScriptEditorEdit(Resource resource, int line, int col, bool grabFocus = true) =>
internal_ScriptEditorEdit(resource, line, col, grabFocus);
@@ -88,7 +88,7 @@ namespace GodotTools.Internals
private static extern void internal_ReloadAssemblies(bool softReload);
[MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void internal_ScriptEditorDebuggerReloadScripts();
+ private static extern void internal_EditorDebuggerNodeReloadScripts();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool internal_ScriptEditorEdit(Resource resource, int line, int col, bool grabFocus);
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 34f01ce3c6..908c72c591 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -503,23 +503,23 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append("<c>");
xml_output.append(tag);
xml_output.append("</c>");
- } else if (tag == "PoolByteArray") {
+ } else if (tag == "PackedByteArray") {
xml_output.append("<see cref=\"byte\"/>");
- } else if (tag == "PoolIntArray") {
+ } else if (tag == "PackedInt32Array") {
xml_output.append("<see cref=\"int\"/>");
- } else if (tag == "PoolRealArray") {
+ } else if (tag == "PackedFloat32Array") {
#ifdef REAL_T_IS_DOUBLE
xml_output.append("<see cref=\"double\"/>");
#else
xml_output.append("<see cref=\"float\"/>");
#endif
- } else if (tag == "PoolStringArray") {
+ } else if (tag == "PackedStringArray") {
xml_output.append("<see cref=\"string\"/>");
- } else if (tag == "PoolVector2Array") {
+ } else if (tag == "PackedVector2Array") {
xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Vector2\"/>");
- } else if (tag == "PoolVector3Array") {
+ } else if (tag == "PackedVector3Array") {
xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Vector3\"/>");
- } else if (tag == "PoolColorArray") {
+ } else if (tag == "PackedColorArray") {
xml_output.append("<see cref=\"" BINDINGS_NAMESPACE ".Color\"/>");
} else {
const TypeInterface *target_itype = _get_type_or_null(TypeReference(tag));
@@ -2054,7 +2054,7 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte
}
if (p_imethod.is_vararg) {
- p_output.append("\tVariant::CallError vcall_error;\n\t");
+ p_output.append("\tCallable::CallError vcall_error;\n\t");
if (!ret_void) {
// See the comment on the C_LOCAL_VARARG_RET declaration
@@ -2383,7 +2383,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
} else {
if (return_info.type == Variant::INT) {
imethod.return_type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE);
- } else if (return_info.type == Variant::REAL) {
+ } else if (return_info.type == Variant::FLOAT) {
imethod.return_type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE);
} else {
imethod.return_type.cname = Variant::get_type_name(return_info.type);
@@ -2410,7 +2410,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
} else {
if (arginfo.type == Variant::INT) {
iarg.type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE);
- } else if (arginfo.type == Variant::REAL) {
+ } else if (arginfo.type == Variant::FLOAT) {
iarg.type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE);
} else {
iarg.type.cname = Variant::get_type_name(arginfo.type);
@@ -2581,7 +2581,7 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar
r_iarg.default_argument = "(%s)" + r_iarg.default_argument;
}
break;
- case Variant::REAL:
+ case Variant::FLOAT:
#ifndef REAL_T_IS_DOUBLE
r_iarg.default_argument += "f";
#endif
@@ -2628,13 +2628,15 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar
r_iarg.default_argument = "null";
break;
case Variant::ARRAY:
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR2_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
r_iarg.default_argument = "new %s {}";
r_iarg.def_param_mode = ArgumentInterface::NULLABLE_REF;
break;
@@ -2914,20 +2916,20 @@ void BindingsGenerator::_populate_builtin_type_interfaces() {
#define INSERT_ARRAY(m_type, m_proxy_t) INSERT_ARRAY_FULL(m_type, m_type, m_proxy_t)
- INSERT_ARRAY(PoolIntArray, int);
- INSERT_ARRAY_FULL(PoolByteArray, PoolByteArray, byte);
+ INSERT_ARRAY(PackedInt32Array, int);
+ INSERT_ARRAY_FULL(PackedByteArray, PackedByteArray, byte);
#ifdef REAL_T_IS_DOUBLE
- INSERT_ARRAY(PoolRealArray, double);
+ INSERT_ARRAY(PackedFloat32Array, double);
#else
- INSERT_ARRAY(PoolRealArray, float);
+ INSERT_ARRAY(PackedFloat32Array, float);
#endif
- INSERT_ARRAY(PoolStringArray, string);
+ INSERT_ARRAY(PackedStringArray, string);
- INSERT_ARRAY(PoolColorArray, Color);
- INSERT_ARRAY(PoolVector2Array, Vector2);
- INSERT_ARRAY(PoolVector3Array, Vector3);
+ INSERT_ARRAY(PackedColorArray, Color);
+ INSERT_ARRAY(PackedVector2Array, Vector2);
+ INSERT_ARRAY(PackedVector3Array, Vector3);
#undef INSERT_ARRAY
diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp
index c8d20e80be..31996a03d0 100644
--- a/modules/mono/editor/editor_internal_calls.cpp
+++ b/modules/mono/editor/editor_internal_calls.cpp
@@ -36,10 +36,10 @@
#include "core/os/os.h"
#include "core/version.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "editor/script_editor_debugger.h"
#include "main/main.h"
#include "../csharp_script.h"
@@ -305,8 +305,8 @@ void godot_icall_Internal_ReloadAssemblies(MonoBoolean p_soft_reload) {
#endif
}
-void godot_icall_Internal_ScriptEditorDebuggerReloadScripts() {
- ScriptEditor::get_singleton()->get_debugger()->reload_scripts();
+void godot_icall_Internal_EditorDebuggerNodeReloadScripts() {
+ EditorDebuggerNode::get_singleton()->reload_scripts();
}
MonoBoolean godot_icall_Internal_ScriptEditorEdit(MonoObject *p_resource, int32_t p_line, int32_t p_col, MonoBoolean p_grab_focus) {
@@ -348,9 +348,9 @@ void godot_icall_Internal_EditorRunStop() {
}
void godot_icall_Internal_ScriptEditorDebugger_ReloadScripts() {
- ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- if (sed) {
- sed->reload_scripts();
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ if (ed) {
+ ed->reload_scripts();
}
}
@@ -446,7 +446,7 @@ void register_editor_internal_calls() {
mono_add_internal_call("GodotTools.Internals.Internal::internal_GetEditorApiHash", (void *)godot_icall_Internal_GetEditorApiHash);
mono_add_internal_call("GodotTools.Internals.Internal::internal_IsAssembliesReloadingNeeded", (void *)godot_icall_Internal_IsAssembliesReloadingNeeded);
mono_add_internal_call("GodotTools.Internals.Internal::internal_ReloadAssemblies", (void *)godot_icall_Internal_ReloadAssemblies);
- mono_add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorDebuggerReloadScripts", (void *)godot_icall_Internal_ScriptEditorDebuggerReloadScripts);
+ mono_add_internal_call("GodotTools.Internals.Internal::internal_EditorDebuggerNodeReloadScripts", (void *)godot_icall_Internal_EditorDebuggerNodeReloadScripts);
mono_add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorEdit", (void *)godot_icall_Internal_ScriptEditorEdit);
mono_add_internal_call("GodotTools.Internals.Internal::internal_EditorNodeShowScriptScreen", (void *)godot_icall_Internal_EditorNodeShowScriptScreen);
mono_add_internal_call("GodotTools.Internals.Internal::internal_GetScriptsMetadataOrNothing", (void *)godot_icall_Internal_GetScriptsMetadataOrNothing);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
index 684d160b57..5f64c09a89 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
@@ -2,9 +2,9 @@ namespace Godot
{
public static partial class ResourceLoader
{
- public static T Load<T>(string path) where T : class
+ public static T Load<T>(string path, string typeHint = null, bool noCache = false) where T : class
{
- return (T)(object)Load(path);
+ return (T)(object)Load(path, typeHint, noCache);
}
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
index 19962d418a..2a9c2d73b1 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
@@ -83,7 +83,7 @@ namespace Godot
public static void Print(params object[] what)
{
- godot_icall_GD_print(Array.ConvertAll(what, x => x.ToString()));
+ godot_icall_GD_print(Array.ConvertAll(what, x => x?.ToString()));
}
public static void PrintStack()
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index b85a00d869..099eacd7dd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -981,7 +981,7 @@ namespace Godot
}
// <summary>
- // Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
+ // Convert the String (which is a character array) to PackedByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
// </summary>
public static byte[] ToAscii(this string instance)
{
@@ -1021,7 +1021,7 @@ namespace Godot
}
// <summary>
- // Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
+ // Convert the String (which is an array of characters) to PackedByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
// </summary>
public static byte[] ToUTF8(this string instance)
{
diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp
index 02246b2f2f..8c77220b85 100644
--- a/modules/mono/glue/base_object_glue.cpp
+++ b/modules/mono/glue/base_object_glue.cpp
@@ -189,12 +189,12 @@ MonoBoolean godot_icall_DynamicGodotObject_InvokeMember(Object *p_ptr, MonoStrin
args.set(i, &arg_store.get(i));
}
- Variant::CallError error;
+ Callable::CallError error;
Variant result = p_ptr->call(StringName(name), args.ptr(), argc, error);
*r_result = GDMonoMarshal::variant_to_mono_object(result);
- return error.error == Variant::CallError::CALL_OK;
+ return error.error == Callable::CallError::CALL_OK;
}
MonoBoolean godot_icall_DynamicGodotObject_GetMember(Object *p_ptr, MonoString *p_name, MonoObject **r_result) {
@@ -224,14 +224,9 @@ MonoString *godot_icall_Object_ToString(Object *p_ptr) {
#ifdef DEBUG_ENABLED
// Cannot happen in C#; would get an ObjectDisposedException instead.
CRASH_COND(p_ptr == NULL);
-
- if (ScriptDebugger::get_singleton() && !Object::cast_to<Reference>(p_ptr)) { // Only if debugging!
- // Cannot happen either in C#; the handle is nullified when the object is destroyed
- CRASH_COND(!ObjectDB::instance_validate(p_ptr));
- }
#endif
- String result = "[" + p_ptr->get_class() + ":" + itos(p_ptr->get_instance_id()) + "]";
+ String result = p_ptr->to_string();
return GDMonoMarshal::mono_string_from_godot(result);
}
diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp
index 17483c4457..cdacd90538 100644
--- a/modules/mono/glue/gd_glue.cpp
+++ b/modules/mono/glue/gd_glue.cpp
@@ -44,9 +44,8 @@
MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes, MonoBoolean p_allow_objects) {
Variant ret;
- PoolByteArray varr = GDMonoMarshal::mono_array_to_PoolByteArray(p_bytes);
- PoolByteArray::Read r = varr.read();
- Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, p_allow_objects);
+ PackedByteArray varr = GDMonoMarshal::mono_array_to_PackedByteArray(p_bytes);
+ Error err = decode_variant(ret, varr.ptr(), varr.size(), NULL, p_allow_objects);
if (err != OK) {
ret = RTR("Not enough bytes for decoding bytes, or invalid format.");
}
@@ -56,9 +55,9 @@ MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes, MonoBoolean p_allow_obj
MonoObject *godot_icall_GD_convert(MonoObject *p_what, int32_t p_type) {
Variant what = GDMonoMarshal::mono_object_to_variant(p_what);
const Variant *args[1] = { &what };
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = Variant::construct(Variant::Type(p_type), args, 1, ce);
- ERR_FAIL_COND_V(ce.error != Variant::CallError::CALL_OK, NULL);
+ ERR_FAIL_COND_V(ce.error != Callable::CallError::CALL_OK, NULL);
return GDMonoMarshal::variant_to_mono_object(ret);
}
@@ -67,7 +66,7 @@ int godot_icall_GD_hash(MonoObject *p_var) {
}
MonoObject *godot_icall_GD_instance_from_id(uint64_t p_instance_id) {
- return GDMonoUtils::unmanaged_get_managed(ObjectDB::get_instance(p_instance_id));
+ return GDMonoUtils::unmanaged_get_managed(ObjectDB::get_instance(ObjectID(p_instance_id)));
}
void godot_icall_GD_print(MonoArray *p_what) {
@@ -257,18 +256,15 @@ void godot_icall_GD_pushwarning(MonoString *p_str) {
MonoArray *godot_icall_GD_var2bytes(MonoObject *p_var, MonoBoolean p_full_objects) {
Variant var = GDMonoMarshal::mono_object_to_variant(p_var);
- PoolByteArray barr;
+ PackedByteArray barr;
int len;
Error err = encode_variant(var, NULL, len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, NULL, "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).");
barr.resize(len);
- {
- PoolByteArray::Write w = barr.write();
- encode_variant(var, w.ptr(), len, p_full_objects);
- }
+ encode_variant(var, barr.ptrw(), len, p_full_objects);
- return GDMonoMarshal::PoolByteArray_to_mono_array(barr);
+ return GDMonoMarshal::PackedByteArray_to_mono_array(barr);
}
MonoString *godot_icall_GD_var2str(MonoObject *p_var) {
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 178647b968..03b56c9949 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -247,37 +247,37 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
}
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) {
- SET_FROM_ARRAY(PoolByteArray);
+ SET_FROM_ARRAY(PackedByteArray);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) {
- SET_FROM_ARRAY(PoolIntArray);
+ SET_FROM_ARRAY(PackedInt32Array);
break;
}
if (array_type->eklass == REAL_T_MONOCLASS) {
- SET_FROM_ARRAY(PoolRealArray);
+ SET_FROM_ARRAY(PackedFloat32Array);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(String)) {
- SET_FROM_ARRAY(PoolStringArray);
+ SET_FROM_ARRAY(PackedStringArray);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) {
- SET_FROM_ARRAY(PoolVector2Array);
+ SET_FROM_ARRAY(PackedVector2Array);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) {
- SET_FROM_ARRAY(PoolVector3Array);
+ SET_FROM_ARRAY(PackedVector3Array);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Color)) {
- SET_FROM_ARRAY(PoolColorArray);
+ SET_FROM_ARRAY(PackedColorArray);
break;
}
@@ -370,7 +370,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
int32_t val = p_value.operator signed int();
mono_field_set_value(p_object, mono_field, &val);
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
#ifdef REAL_T_IS_DOUBLE
double val = p_value.operator double();
mono_field_set_value(p_object, mono_field, &val);
@@ -434,26 +434,26 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator Array(), CACHED_CLASS(Array));
mono_field_set_value(p_object, mono_field, managed);
} break;
- case Variant::POOL_BYTE_ARRAY: {
- SET_FROM_ARRAY(PoolByteArray);
+ case Variant::PACKED_BYTE_ARRAY: {
+ SET_FROM_ARRAY(PackedByteArray);
} break;
- case Variant::POOL_INT_ARRAY: {
- SET_FROM_ARRAY(PoolIntArray);
+ case Variant::PACKED_INT32_ARRAY: {
+ SET_FROM_ARRAY(PackedInt32Array);
} break;
- case Variant::POOL_REAL_ARRAY: {
- SET_FROM_ARRAY(PoolRealArray);
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ SET_FROM_ARRAY(PackedFloat32Array);
} break;
- case Variant::POOL_STRING_ARRAY: {
- SET_FROM_ARRAY(PoolStringArray);
+ case Variant::PACKED_STRING_ARRAY: {
+ SET_FROM_ARRAY(PackedStringArray);
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
- SET_FROM_ARRAY(PoolVector2Array);
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ SET_FROM_ARRAY(PackedVector2Array);
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
- SET_FROM_ARRAY(PoolVector3Array);
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ SET_FROM_ARRAY(PackedVector3Array);
} break;
- case Variant::POOL_COLOR_ARRAY: {
- SET_FROM_ARRAY(PoolColorArray);
+ case Variant::PACKED_COLOR_ARRAY: {
+ SET_FROM_ARRAY(PackedColorArray);
} break;
default: break;
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 19d627218e..695be64d6e 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -60,9 +60,9 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
return Variant::INT;
case MONO_TYPE_R4:
- return Variant::REAL;
+ return Variant::FLOAT;
case MONO_TYPE_R8:
- return Variant::REAL;
+ return Variant::FLOAT;
case MONO_TYPE_STRING: {
return Variant::STRING;
@@ -113,25 +113,25 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
return Variant::ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return Variant::POOL_BYTE_ARRAY;
+ return Variant::PACKED_BYTE_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return Variant::POOL_INT_ARRAY;
+ return Variant::PACKED_INT32_ARRAY;
if (array_type->eklass == REAL_T_MONOCLASS)
- return Variant::POOL_REAL_ARRAY;
+ return Variant::PACKED_FLOAT32_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return Variant::POOL_STRING_ARRAY;
+ return Variant::PACKED_STRING_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return Variant::POOL_VECTOR2_ARRAY;
+ return Variant::PACKED_VECTOR2_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return Variant::POOL_VECTOR3_ARRAY;
+ return Variant::PACKED_VECTOR3_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return Variant::POOL_COLOR_ARRAY;
+ return Variant::PACKED_COLOR_ARRAY;
} break;
case MONO_TYPE_CLASS: {
@@ -491,25 +491,25 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return (MonoObject *)Array_to_mono_array(p_var->operator Array());
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray());
+ return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray());
+ return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array());
if (array_type->eklass == REAL_T_MONOCLASS)
- return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray());
+ return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array());
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray());
+ return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array());
+ return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array());
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array());
+ return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array());
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray());
+ return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray());
ERR_FAIL_V_MSG(NULL, "Attempted to convert Variant to a managed array of unmarshallable element type.");
} break;
@@ -577,7 +577,7 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
int32_t val = p_var->operator signed int();
return BOX_INT32(val);
}
- case Variant::REAL: {
+ case Variant::FLOAT: {
#ifdef REAL_T_IS_DOUBLE
double val = p_var->operator double();
return BOX_DOUBLE(val);
@@ -638,20 +638,20 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return GDMonoUtils::create_managed_from(p_var->operator Dictionary(), CACHED_CLASS(Dictionary));
case Variant::ARRAY:
return GDMonoUtils::create_managed_from(p_var->operator Array(), CACHED_CLASS(Array));
- case Variant::POOL_BYTE_ARRAY:
- return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray());
- case Variant::POOL_INT_ARRAY:
- return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray());
- case Variant::POOL_REAL_ARRAY:
- return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray());
- case Variant::POOL_STRING_ARRAY:
- return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray());
- case Variant::POOL_VECTOR2_ARRAY:
- return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array());
- case Variant::POOL_VECTOR3_ARRAY:
- return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array());
- case Variant::POOL_COLOR_ARRAY:
- return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray());
+ case Variant::PACKED_BYTE_ARRAY:
+ return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
+ case Variant::PACKED_INT32_ARRAY:
+ return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array());
+ case Variant::PACKED_FLOAT32_ARRAY:
+ return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array());
+ case Variant::PACKED_STRING_ARRAY:
+ return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
+ case Variant::PACKED_VECTOR2_ARRAY:
+ return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array());
+ case Variant::PACKED_VECTOR3_ARRAY:
+ return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array());
+ case Variant::PACKED_COLOR_ARRAY:
+ return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray());
default:
return NULL;
}
@@ -785,25 +785,25 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type
return mono_array_to_Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return mono_array_to_PoolByteArray((MonoArray *)p_obj);
+ return mono_array_to_PackedByteArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return mono_array_to_PoolIntArray((MonoArray *)p_obj);
+ return mono_array_to_PackedInt32Array((MonoArray *)p_obj);
if (array_type->eklass == REAL_T_MONOCLASS)
- return mono_array_to_PoolRealArray((MonoArray *)p_obj);
+ return mono_array_to_PackedFloat32Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return mono_array_to_PoolStringArray((MonoArray *)p_obj);
+ return mono_array_to_PackedStringArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return mono_array_to_PoolVector2Array((MonoArray *)p_obj);
+ return mono_array_to_PackedVector2Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return mono_array_to_PoolVector3Array((MonoArray *)p_obj);
+ return mono_array_to_PackedVector3Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return mono_array_to_PoolColorArray((MonoArray *)p_obj);
+ return mono_array_to_PackedColorArray((MonoArray *)p_obj);
if (p_fail_with_err) {
ERR_FAIL_V_MSG(Variant(), "Attempted to convert a managed array of unmarshallable element type to Variant.");
@@ -987,8 +987,8 @@ Array mono_array_to_Array(MonoArray *p_array) {
// TODO: Use memcpy where possible
-MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) {
- PoolIntArray::Read r = p_array.read();
+MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array) {
+ const int *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(int32_t), p_array.size());
@@ -999,13 +999,13 @@ MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) {
return ret;
}
-PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) {
- PoolIntArray ret;
+PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array) {
+ PackedInt32Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolIntArray::Write w = ret.write();
+ int *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, int32_t, i);
@@ -1014,8 +1014,8 @@ PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) {
- PoolByteArray::Read r = p_array.read();
+MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array) {
+ const uint8_t *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(uint8_t), p_array.size());
@@ -1026,13 +1026,13 @@ MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) {
return ret;
}
-PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) {
- PoolByteArray ret;
+PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array) {
+ PackedByteArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolByteArray::Write w = ret.write();
+ uint8_t *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, uint8_t, i);
@@ -1041,8 +1041,8 @@ PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) {
- PoolRealArray::Read r = p_array.read();
+MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array) {
+ const real_t *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), REAL_T_MONOCLASS, p_array.size());
@@ -1053,13 +1053,13 @@ MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) {
return ret;
}
-PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) {
- PoolRealArray ret;
+PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array) {
+ PackedFloat32Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolRealArray::Write w = ret.write();
+ real_t *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, real_t, i);
@@ -1068,8 +1068,8 @@ PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) {
- PoolStringArray::Read r = p_array.read();
+MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array) {
+ const String *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(String), p_array.size());
@@ -1081,13 +1081,13 @@ MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) {
return ret;
}
-PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) {
- PoolStringArray ret;
+PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array) {
+ PackedStringArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolStringArray::Write w = ret.write();
+ String *w = ret.ptrw();
for (int i = 0; i < length; i++) {
MonoString *elem = mono_array_get(p_array, MonoString *, i);
@@ -1097,8 +1097,8 @@ PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) {
- PoolColorArray::Read r = p_array.read();
+MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array) {
+ const Color *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Color), p_array.size());
@@ -1110,13 +1110,13 @@ MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) {
return ret;
}
-PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) {
- PoolColorArray ret;
+PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array) {
+ PackedColorArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolColorArray::Write w = ret.write();
+ Color *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Color, (M_Color *)mono_array_addr_with_size(p_array, sizeof(M_Color), i));
@@ -1125,8 +1125,8 @@ PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) {
- PoolVector2Array::Read r = p_array.read();
+MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array) {
+ const Vector2 *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector2), p_array.size());
@@ -1138,13 +1138,13 @@ MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) {
return ret;
}
-PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) {
- PoolVector2Array ret;
+PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array) {
+ PackedVector2Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolVector2Array::Write w = ret.write();
+ Vector2 *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Vector2, (M_Vector2 *)mono_array_addr_with_size(p_array, sizeof(M_Vector2), i));
@@ -1153,8 +1153,8 @@ PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) {
- PoolVector3Array::Read r = p_array.read();
+MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array) {
+ const Vector3 *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector3), p_array.size());
@@ -1166,13 +1166,13 @@ MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) {
return ret;
}
-PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array) {
- PoolVector3Array ret;
+PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array) {
+ PackedVector3Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolVector3Array::Write w = ret.write();
+ Vector3 *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Vector3, (M_Vector3 *)mono_array_addr_with_size(p_array, sizeof(M_Vector3), i));
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index e662e7814e..5db59522ce 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -127,40 +127,40 @@ String mono_object_to_variant_string(MonoObject *p_obj, MonoException **r_exc);
MonoArray *Array_to_mono_array(const Array &p_array);
Array mono_array_to_Array(MonoArray *p_array);
-// PoolIntArray
+// PackedInt32Array
-MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array);
-PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array);
+MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array);
+PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array);
-// PoolByteArray
+// PackedByteArray
-MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array);
-PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array);
+MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array);
+PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array);
-// PoolRealArray
+// PackedFloat32Array
-MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array);
-PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array);
+MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array);
+PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array);
-// PoolStringArray
+// PackedStringArray
-MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array);
-PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array);
+MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array);
+PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array);
-// PoolColorArray
+// PackedColorArray
-MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array);
-PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array);
+MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array);
+PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array);
-// PoolVector2Array
+// PackedVector2Array
-MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array);
-PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array);
+MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array);
+PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array);
-// PoolVector3Array
+// PackedVector3Array
-MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array);
-PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array);
+MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array);
+PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array);
// Structures
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 05077a00c4..41f49d8ac9 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -33,17 +33,17 @@
#include <mono/metadata/exception.h>
#include "core/os/dir_access.h"
+#include "core/os/mutex.h"
#include "core/os/os.h"
#include "core/project_settings.h"
#include "core/reference.h"
#ifdef TOOLS_ENABLED
-#include "editor/script_editor_debugger.h"
+#include "editor/debugger/script_editor_debugger.h"
#endif
#include "../csharp_script.h"
#include "../utils/macros.h"
-#include "../utils/mutex_utils.h"
#include "gd_mono.h"
#include "gd_mono_cache.h"
#include "gd_mono_class.h"
@@ -74,7 +74,7 @@ MonoObject *unmanaged_get_managed(Object *unmanaged) {
CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->value();
if (!script_binding.inited) {
- SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->get_language_bind_mutex());
+ MutexLock lock(CSharpLanguage::get_singleton()->get_language_bind_mutex());
if (!script_binding.inited) { // Other thread may have set it up
// Already had a binding that needs to be setup
diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp
index b85d5f2fd9..718bc2bb93 100644
--- a/modules/mono/signal_awaiter_utils.cpp
+++ b/modules/mono/signal_awaiter_utils.cpp
@@ -51,7 +51,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p
Vector<Variant> binds;
binds.push_back(sa_con);
- Error err = p_source->connect(p_signal, sa_con.ptr(),
+ Error err = p_source->connect_compat(p_signal, sa_con.ptr(),
CSharpLanguage::get_singleton()->get_string_names()._signal_callback,
binds, Object::CONNECT_ONESHOT);
@@ -65,7 +65,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p
}
} // namespace SignalAwaiterUtils
-Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_V_MSG(conn_target_id.is_valid() && !ObjectDB::get_instance(conn_target_id), Variant(),
@@ -73,7 +73,7 @@ Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argc
#endif
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
return Variant();
}
@@ -81,7 +81,7 @@ Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argc
Ref<SignalAwaiterHandle> self = *p_args[p_argcount - 1];
if (self.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_argcount - 1;
r_error.expected = Variant::OBJECT;
return Variant();
diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h
index a9956ad5ba..012f6e5bb3 100644
--- a/modules/mono/signal_awaiter_utils.h
+++ b/modules/mono/signal_awaiter_utils.h
@@ -49,7 +49,7 @@ class SignalAwaiterHandle : public MonoGCHandle {
ObjectID conn_target_id;
#endif
- Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
protected:
static void _bind_methods();
diff --git a/modules/mono/utils/mutex_utils.h b/modules/mono/utils/mutex_utils.h
deleted file mode 100644
index bafd875395..0000000000
--- a/modules/mono/utils/mutex_utils.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************/
-/* mutex_utils.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 MUTEX_UTILS_H
-#define MUTEX_UTILS_H
-
-#include "core/error_macros.h"
-#include "core/os/mutex.h"
-
-#include "macros.h"
-
-class ScopedMutexLock {
- Mutex *mutex;
-
-public:
- ScopedMutexLock(Mutex *mutex) {
- this->mutex = mutex;
-#ifndef NO_THREADS
-#ifdef DEBUG_ENABLED
- CRASH_COND(!mutex);
-#endif
- this->mutex->lock();
-#endif
- }
-
- ~ScopedMutexLock() {
-#ifndef NO_THREADS
-#ifdef DEBUG_ENABLED
- CRASH_COND(!mutex);
-#endif
- mutex->unlock();
-#endif
- }
-};
-
-#define SCOPED_MUTEX_LOCK(m_mutex) ScopedMutexLock GD_UNIQUE_NAME(__scoped_mutex_lock__)(m_mutex);
-
-// TODO: Add version that receives a lambda instead, once C++11 is allowed
-
-#endif // MUTEX_UTILS_H
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index 911ac5c4a3..49c4fb3f73 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -162,22 +162,22 @@ String escape_csharp_keyword(const String &p_name) {
#endif
Error read_all_file_utf8(const String &p_path, String &r_content) {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + p_path + "'.");
int len = f->get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
w[len] = 0;
String source;
- if (source.parse_utf8((const char *)w.ptr())) {
+ if (source.parse_utf8((const char *)w)) {
ERR_FAIL_V(ERR_INVALID_DATA);
}
diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp
index 19aa281a72..8e5b04f995 100644
--- a/modules/opensimplex/noise_texture.cpp
+++ b/modules/opensimplex/noise_texture.cpp
@@ -76,7 +76,6 @@ void NoiseTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_bump_strength"), &NoiseTexture::get_bump_strength);
ClassDB::bind_method(D_METHOD("_update_texture"), &NoiseTexture::_update_texture);
- ClassDB::bind_method(D_METHOD("_queue_update"), &NoiseTexture::_queue_update);
ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture::_generate_texture);
ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture::_thread_done);
@@ -84,7 +83,7 @@ void NoiseTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "seamless"), "set_seamless", "get_seamless");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise");
}
@@ -184,11 +183,11 @@ void NoiseTexture::set_noise(Ref<OpenSimplexNoise> p_noise) {
if (p_noise == noise)
return;
if (noise.is_valid()) {
- noise->disconnect(CoreStringNames::get_singleton()->changed, this, "_queue_update");
+ noise->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &NoiseTexture::_queue_update));
}
noise = p_noise;
if (noise.is_valid()) {
- noise->connect(CoreStringNames::get_singleton()->changed, this, "_queue_update");
+ noise->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &NoiseTexture::_queue_update));
}
_queue_update();
}
diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp
index bd187e6b5b..238faa4130 100644
--- a/modules/opensimplex/open_simplex_noise.cpp
+++ b/modules/opensimplex/open_simplex_noise.cpp
@@ -98,10 +98,10 @@ void OpenSimplexNoise::set_lacunarity(float p_lacunarity) {
Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) {
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(p_width * p_height * 4);
- PoolVector<uint8_t>::Write wd8 = data.write();
+ uint8_t *wd8 = data.ptrw();
for (int i = 0; i < p_height; i++) {
for (int j = 0; j < p_width; j++) {
@@ -121,10 +121,10 @@ Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) {
Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) {
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(p_size * p_size * 4);
- PoolVector<uint8_t>::Write wd8 = data.write();
+ uint8_t *wd8 = data.ptrw();
for (int i = 0; i < p_size; i++) {
for (int j = 0; j < p_size; j++) {
@@ -186,9 +186,9 @@ void OpenSimplexNoise::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, vformat("1,%d,1", MAX_OCTAVES)), "set_octaves", "get_octaves");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
}
float OpenSimplexNoise::get_noise_1d(float x) {
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index 67a07628d9..a983edee91 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -354,7 +354,7 @@ AudioStreamPlaybackOpus::~AudioStreamPlaybackOpus() {
_clear_stream();
}
-RES ResourceFormatLoaderAudioStreamOpus::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderAudioStreamOpus::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = OK;
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index 5c0a02a9d0..343cbc6b83 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -133,7 +133,7 @@ public:
class ResourceFormatLoaderAudioStreamOpus : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 36f2fe1ba1..179c6f692b 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -51,7 +51,7 @@ enum PVRFLags {
};
-RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_CANT_OPEN;
@@ -96,12 +96,12 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
print_line("surfcount: "+itos(surfcount));
*/
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(surfsize);
ERR_FAIL_COND_V(data.size() == 0, RES());
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
f->get_buffer(&w[0], surfsize);
err = f->get_error();
ERR_FAIL_COND_V(err != OK, RES());
@@ -152,8 +152,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
ERR_FAIL_V_MSG(RES(), "Unsupported format in PVR texture: " + itos(flags & 0xFF) + ".");
}
- w.release();
-
Ref<Image> image = memnew(Image(width, height, mipmaps, format, data));
ERR_FAIL_COND_V(image->empty(), RES());
@@ -200,10 +198,10 @@ static void _compress_pvrtc4(Image *p_img) {
new_img.instance();
new_img->create(img->get_width(), img->get_height(), img->has_mipmaps(), use_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4);
- PoolVector<uint8_t> data = new_img->get_data();
+ Vector<uint8_t> data = new_img->get_data();
{
- PoolVector<uint8_t>::Write wr = data.write();
- PoolVector<uint8_t>::Read r = img->get_data().read();
+ uint8_t *wr = data.ptrw();
+ const uint8_t *r = img->get_data().ptr();
for (int i = 0; i <= new_img->get_mipmap_count(); i++) {
@@ -640,17 +638,14 @@ static void _pvrtc_decompress(Image *p_img) {
bool _2bit = (p_img->get_format() == Image::FORMAT_PVRTC2 || p_img->get_format() == Image::FORMAT_PVRTC2A);
- PoolVector<uint8_t> data = p_img->get_data();
- PoolVector<uint8_t>::Read r = data.read();
+ Vector<uint8_t> data = p_img->get_data();
+ const uint8_t *r = data.ptr();
- PoolVector<uint8_t> newdata;
+ Vector<uint8_t> newdata;
newdata.resize(p_img->get_width() * p_img->get_height() * 4);
- PoolVector<uint8_t>::Write w = newdata.write();
-
- decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr());
+ uint8_t *w = newdata.ptrw();
- w.release();
- r.release();
+ decompress_pvrtc((PVRTCBlock *)r, _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w);
bool make_mipmaps = p_img->has_mipmaps();
p_img->create(p_img->get_width(), p_img->get_height(), false, Image::FORMAT_RGBA8, newdata);
diff --git a/modules/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h
index e384ed2b4c..c990c3612b 100644
--- a/modules/pvr/texture_loader_pvr.h
+++ b/modules/pvr/texture_loader_pvr.h
@@ -36,7 +36,7 @@
class ResourceFormatPVR : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path, Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path, Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index e9f46b9853..3130c53331 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -10,7 +10,7 @@
var regex = RegEx.new()
regex.compile("\\w-(\\d+)")
[/codeblock]
- The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, [code]compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code]. Similarly, [code]compile("\"(?:\\\\.|[^\"])*\"")[/code] would be read as [code]"(?:\\.|[^"])*"[/code].
+ The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, [code]compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code]. Similarly, [code]compile("\"(?:\\\\.|[^\"])*\"")[/code] would be read as [code]"(?:\\.|[^"])*"[/code].
Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using functions such as [method RegExMatch.get_string] and [method RegExMatch.get_start].
[codeblock]
var regex = RegEx.new()
@@ -35,6 +35,8 @@
# Would print 01 03 3f 42
# Note that d0c would not match
[/codeblock]
+ [b]Note:[/b] Godot's regex implementation is based on the [url=https://www.pcre.org/]PCRE2[/url] library. You can view the full pattern reference [url=https://www.pcre.org/current/doc/html/pcre2pattern.html]here[/url].
+ [b]Tip:[/b] You can use [url=https://regexr.com/]Regexr[/url] to test regular expressions online.
</description>
<tutorials>
</tutorials>
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index 2f680fd3d0..bb77f68590 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -37,13 +37,13 @@ void image_decompress_squish(Image *p_image) {
int h = p_image->get_height();
Image::Format target_format = Image::FORMAT_RGBA8;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->get_mipmap_count();
data.resize(target_size);
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
- PoolVector<uint8_t>::Write wb = data.write();
+ const uint8_t *rb = p_image->get_data().ptr();
+ uint8_t *wb = data.ptrw();
int squish_flags = Image::FORMAT_MAX;
if (p_image->get_format() == Image::FORMAT_DXT1) {
@@ -137,14 +137,14 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
}
}
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0;
data.resize(target_size);
int shift = Image::get_format_pixel_rshift(target_format);
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
- PoolVector<uint8_t>::Write wb = data.write();
+ const uint8_t *rb = p_image->get_data().ptr();
+ uint8_t *wb = data.ptrw();
int dst_ofs = 0;
@@ -160,9 +160,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
h = MAX(h / 2, 1);
}
- rb.release();
- wb.release();
-
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
}
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index f2d0f5c9a6..42f341cef7 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -57,7 +57,8 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
if (todo) {
//end of file!
- if (vorbis_stream->loop && mixed > 0) {
+ bool is_not_empty = mixed > 0 || stb_vorbis_stream_length_in_samples(ogg_stream) > 0;
+ if (vorbis_stream->loop && is_not_empty) {
//loop
seek(vorbis_stream->loop_offset);
loops++;
@@ -163,32 +164,32 @@ void AudioStreamOGGVorbis::clear_data() {
}
}
-void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) {
+void AudioStreamOGGVorbis::set_data(const Vector<uint8_t> &p_data) {
int src_data_len = p_data.size();
#define MAX_TEST_MEM (1 << 20)
uint32_t alloc_try = 1024;
- PoolVector<char> alloc_mem;
- PoolVector<char>::Write w;
+ Vector<char> alloc_mem;
+ char *w;
stb_vorbis *ogg_stream = NULL;
stb_vorbis_alloc ogg_alloc;
while (alloc_try < MAX_TEST_MEM) {
alloc_mem.resize(alloc_try);
- w = alloc_mem.write();
+ w = alloc_mem.ptrw();
- ogg_alloc.alloc_buffer = w.ptr();
+ ogg_alloc.alloc_buffer = w;
ogg_alloc.alloc_buffer_length_in_bytes = alloc_try;
- PoolVector<uint8_t>::Read src_datar = p_data.read();
+ const uint8_t *src_datar = p_data.ptr();
int error;
- ogg_stream = stb_vorbis_open_memory((const unsigned char *)src_datar.ptr(), src_data_len, &error, &ogg_alloc);
+ ogg_stream = stb_vorbis_open_memory((const unsigned char *)src_datar, src_data_len, &error, &ogg_alloc);
if (!ogg_stream && error == VORBIS_outofmem) {
- w.release();
+
alloc_try *= 2;
} else {
@@ -209,7 +210,7 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) {
// free any existing data
clear_data();
- data = AudioServer::get_singleton()->audio_data_alloc(src_data_len, src_datar.ptr());
+ data = AudioServer::get_singleton()->audio_data_alloc(src_data_len, src_datar);
data_len = src_data_len;
break;
@@ -217,15 +218,15 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) {
}
}
-PoolVector<uint8_t> AudioStreamOGGVorbis::get_data() const {
+Vector<uint8_t> AudioStreamOGGVorbis::get_data() const {
- PoolVector<uint8_t> vdata;
+ Vector<uint8_t> vdata;
if (data_len && data) {
vdata.resize(data_len);
{
- PoolVector<uint8_t>::Write w = vdata.write();
- copymem(w.ptr(), data, data_len);
+ uint8_t *w = vdata.ptrw();
+ copymem(w, data, data_len);
}
}
@@ -265,9 +266,9 @@ void AudioStreamOGGVorbis::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOGGVorbis::set_loop_offset);
ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOGGVorbis::get_loop_offset);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "loop_offset"), "set_loop_offset", "get_loop_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
}
AudioStreamOGGVorbis::AudioStreamOGGVorbis() {
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index e909759acb..f296e8c19f 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -102,8 +102,8 @@ public:
virtual Ref<AudioStreamPlayback> instance_playback();
virtual String get_stream_name() const;
- void set_data(const PoolVector<uint8_t> &p_data);
- PoolVector<uint8_t> get_data() const;
+ void set_data(const Vector<uint8_t> &p_data);
+ Vector<uint8_t> get_data() const;
virtual float get_length() const; //if supported, otherwise return 0
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
index 38d3bd5468..8a1bb62e24 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )">
+ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray( )">
Contains the audio data in bytes.
</member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 06399f4005..13d96541e3 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -73,7 +73,7 @@ String ResourceImporterOGGVorbis::get_preset_name(int p_idx) const {
void ResourceImporterOGGVorbis::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "loop"), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "loop_offset"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0));
}
Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
@@ -87,11 +87,11 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
size_t len = f->get_len();
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(len);
- PoolVector<uint8_t>::Write w = data.write();
+ uint8_t *w = data.ptrw();
- f->get_buffer(w.ptr(), len);
+ f->get_buffer(w, len);
memdelete(f);
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index 7f91908a33..e9d30d015a 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -94,10 +94,10 @@ void ImageLoaderSVG::set_convert_colors(Dictionary *p_replace_color) {
}
}
-Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors) {
+Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const Vector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors) {
NSVGimage *svg_image;
- PoolVector<uint8_t>::Read src_r = p_data->read();
- svg_image = nsvgParse((char *)src_r.ptr(), "px", 96);
+ const uint8_t *src_r = p_data->ptr();
+ svg_image = nsvgParse((char *)src_r, "px", 96);
if (svg_image == NULL) {
ERR_PRINT("SVG Corrupted");
return ERR_FILE_CORRUPT;
@@ -115,14 +115,13 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
const int h = (int)(svg_image->height * p_scale * upscale);
ERR_FAIL_COND_V_MSG(h > Image::MAX_HEIGHT, ERR_PARAMETER_RANGE_ERROR, vformat("Can't create image from SVG with scale %s, the resulting image size exceeds max height.", rtos(p_scale)));
- PoolVector<uint8_t> dst_image;
+ Vector<uint8_t> dst_image;
dst_image.resize(w * h * 4);
- PoolVector<uint8_t>::Write dw = dst_image.write();
+ uint8_t *dw = dst_image.ptrw();
- rasterizer.rasterize(svg_image, 0, 0, p_scale * upscale, (unsigned char *)dw.ptr(), w, h, w * 4);
+ rasterizer.rasterize(svg_image, 0, 0, p_scale * upscale, (unsigned char *)dw, w, h, w * 4);
- dw.release();
p_image->create(w, h, false, Image::FORMAT_RGBA8, dst_image);
if (upsample) {
p_image->shrink_x2();
@@ -136,10 +135,10 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors) {
size_t str_len = strlen(p_svg_str);
- PoolVector<uint8_t> src_data;
+ Vector<uint8_t> src_data;
src_data.resize(str_len + 1);
- PoolVector<uint8_t>::Write src_w = src_data.write();
- memcpy(src_w.ptr(), p_svg_str, str_len + 1);
+ uint8_t *src_w = src_data.ptrw();
+ memcpy(src_w, p_svg_str, str_len + 1);
return _create_image(p_image, &src_data, p_scale, upsample, convert_colors);
}
@@ -147,11 +146,11 @@ Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p
Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
uint32_t size = f->get_len();
- PoolVector<uint8_t> src_image;
+ Vector<uint8_t> src_image;
src_image.resize(size + 1);
- PoolVector<uint8_t>::Write src_w = src_image.write();
- f->get_buffer(src_w.ptr(), size);
- src_w.ptr()[size] = '\0';
+ uint8_t *src_w = src_image.ptrw();
+ f->get_buffer(src_w, size);
+ src_w[size] = '\0';
return _create_image(p_image, &src_image, p_scale, 1.0);
}
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h
index 24cee82480..def2885199 100644
--- a/modules/svg/image_loader_svg.h
+++ b/modules/svg/image_loader_svg.h
@@ -60,7 +60,7 @@ class ImageLoaderSVG : public ImageFormatLoader {
} replace_colors;
static SVGRasterizer rasterizer;
static void _convert_colors(NSVGimage *p_svg_image);
- static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false);
+ static Error _create_image(Ref<Image> p_image, const Vector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false);
public:
static void set_convert_colors(Dictionary *p_replace_color = NULL);
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp
index 480016eb97..0e904fdd76 100644
--- a/modules/tga/image_loader_tga.cpp
+++ b/modules/tga/image_loader_tga.cpp
@@ -36,12 +36,12 @@
Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size) {
Error error;
- PoolVector<uint8_t> pixels;
+ Vector<uint8_t> pixels;
error = pixels.resize(p_pixel_size);
if (error != OK)
return error;
- PoolVector<uint8_t>::Write pixels_w = pixels.write();
+ uint8_t *pixels_w = pixels.ptrw();
size_t compressed_pos = 0;
size_t output_pos = 0;
@@ -55,12 +55,12 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t
if (c & 0x80) {
for (size_t i = 0; i < p_pixel_size; i++) {
- pixels_w.ptr()[i] = p_compressed_buffer[compressed_pos];
+ pixels_w[i] = p_compressed_buffer[compressed_pos];
compressed_pos += 1;
}
for (size_t i = 0; i < count; i++) {
for (size_t j = 0; j < p_pixel_size; j++) {
- p_uncompressed_buffer[output_pos + j] = pixels_w.ptr()[j];
+ p_uncompressed_buffer[output_pos + j] = pixels_w[j];
}
output_pos += p_pixel_size;
}
@@ -116,9 +116,9 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
x_end = -1;
}
- PoolVector<uint8_t> image_data;
+ Vector<uint8_t> image_data;
image_data.resize(width * height * sizeof(uint32_t));
- PoolVector<uint8_t>::Write image_data_w = image_data.write();
+ uint8_t *image_data_w = image_data.ptrw();
size_t i = 0;
uint32_t x = x_start;
@@ -199,8 +199,6 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
}
}
- image_data_w.release();
-
p_image->create(width, height, 0, Image::FORMAT_RGBA8, image_data);
return OK;
@@ -208,7 +206,7 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
- PoolVector<uint8_t> src_image;
+ Vector<uint8_t> src_image;
int src_image_len = f->get_len();
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
ERR_FAIL_COND_V(src_image_len < (int)sizeof(tga_header_s), ERR_FILE_CORRUPT);
@@ -259,49 +257,49 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
if (err == OK) {
f->seek(f->get_position() + tga_header.id_length);
- PoolVector<uint8_t> palette;
+ Vector<uint8_t> palette;
if (has_color_map) {
size_t color_map_size = tga_header.color_map_length * (tga_header.color_map_depth >> 3);
err = palette.resize(color_map_size);
if (err == OK) {
- PoolVector<uint8_t>::Write palette_w = palette.write();
+ uint8_t *palette_w = palette.ptrw();
f->get_buffer(&palette_w[0], color_map_size);
} else {
return OK;
}
}
- PoolVector<uint8_t>::Write src_image_w = src_image.write();
+ uint8_t *src_image_w = src_image.ptrw();
f->get_buffer(&src_image_w[0], src_image_len - f->get_position());
- PoolVector<uint8_t>::Read src_image_r = src_image.read();
+ const uint8_t *src_image_r = src_image.ptr();
const size_t pixel_size = tga_header.pixel_depth >> 3;
const size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size;
- PoolVector<uint8_t> uncompressed_buffer;
+ Vector<uint8_t> uncompressed_buffer;
uncompressed_buffer.resize(buffer_size);
- PoolVector<uint8_t>::Write uncompressed_buffer_w = uncompressed_buffer.write();
- PoolVector<uint8_t>::Read uncompressed_buffer_r;
+ uint8_t *uncompressed_buffer_w = uncompressed_buffer.ptrw();
+ const uint8_t *uncompressed_buffer_r;
const uint8_t *buffer = NULL;
if (is_encoded) {
- err = decode_tga_rle(src_image_r.ptr(), pixel_size, uncompressed_buffer_w.ptr(), buffer_size);
+ err = decode_tga_rle(src_image_r, pixel_size, uncompressed_buffer_w, buffer_size);
if (err == OK) {
- uncompressed_buffer_r = uncompressed_buffer.read();
- buffer = uncompressed_buffer_r.ptr();
+ uncompressed_buffer_r = uncompressed_buffer.ptr();
+ buffer = uncompressed_buffer_r;
}
} else {
- buffer = src_image_r.ptr();
+ buffer = src_image_r;
};
if (err == OK) {
- PoolVector<uint8_t>::Read palette_r = palette.read();
- err = convert_to_image(p_image, buffer, tga_header, palette_r.ptr(), is_monochrome);
+ const uint8_t *palette_r = palette.ptr();
+ err = convert_to_image(p_image, buffer, tga_header, palette_r, is_monochrome);
}
}
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index de229745f5..ee44c6bf05 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -87,8 +87,8 @@ void VideoStreamPlaybackTheora::video_write(void) {
int pitch = 4;
frame_data.resize(size.x * size.y * pitch);
{
- PoolVector<uint8_t>::Write w = frame_data.write();
- char *dst = (char *)w.ptr();
+ uint8_t *w = frame_data.ptrw();
+ char *dst = (char *)w;
//uv_offset=(ti.pic_x/2)+(yuv[1].stride)*(ti.pic_y/2);
@@ -725,7 +725,7 @@ void VideoStreamTheora::_bind_methods() {
////////////
-RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index c0a0faec4b..da3558ce34 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -54,7 +54,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
//Image frames[MAX_FRAMES];
Image::Format format;
- PoolVector<uint8_t> frame_data;
+ Vector<uint8_t> frame_data;
int frames_pending;
FileAccess *file;
String file_name;
@@ -187,7 +187,7 @@ public:
class ResourceFormatLoaderTheora : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp
index 79cb135abb..41938f5b42 100644
--- a/modules/tinyexr/image_loader_tinyexr.cpp
+++ b/modules/tinyexr/image_loader_tinyexr.cpp
@@ -37,12 +37,12 @@
Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
- PoolVector<uint8_t> src_image;
+ Vector<uint8_t> src_image;
int src_image_len = f->get_len();
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
src_image.resize(src_image_len);
- PoolVector<uint8_t>::Write w = src_image.write();
+ uint8_t *w = src_image.ptrw();
f->get_buffer(&w[0], src_image_len);
@@ -60,13 +60,13 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
InitEXRHeader(&exr_header);
- int ret = ParseEXRVersionFromMemory(&exr_version, w.ptr(), src_image_len);
+ int ret = ParseEXRVersionFromMemory(&exr_version, w, src_image_len);
if (ret != TINYEXR_SUCCESS) {
return ERR_FILE_CORRUPT;
}
- ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, w.ptr(), src_image_len, &err);
+ ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, w, src_image_len, &err);
if (ret != TINYEXR_SUCCESS) {
if (err) {
ERR_PRINT(String(err));
@@ -82,7 +82,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
}
InitEXRImage(&exr_image);
- ret = LoadEXRImageFromMemory(&exr_image, &exr_header, w.ptr(), src_image_len, &err);
+ ret = LoadEXRImageFromMemory(&exr_image, &exr_header, w, src_image_len, &err);
if (ret != TINYEXR_SUCCESS) {
if (err) {
ERR_PRINT(String(err));
@@ -136,7 +136,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
// EXR image data loaded, now parse it into Godot-friendly image data
- PoolVector<uint8_t> imgdata;
+ Vector<uint8_t> imgdata;
Image::Format format;
int output_channels = 0;
@@ -180,8 +180,8 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
}
{
- PoolVector<uint8_t>::Write wd = imgdata.write();
- uint16_t *iw = (uint16_t *)wd.ptr();
+ uint8_t *wd = imgdata.ptrw();
+ uint16_t *iw = (uint16_t *)wd;
// Assume `out_rgba` have enough memory allocated.
for (int tile_index = 0; tile_index < num_tiles; tile_index++) {
@@ -235,8 +235,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
p_image->create(exr_image.width, exr_image.height, false, format, imgdata);
- w.release();
-
FreeEXRHeader(&exr_header);
FreeEXRImage(&exr_image);
diff --git a/modules/tinyexr/image_saver_tinyexr.cpp b/modules/tinyexr/image_saver_tinyexr.cpp
index a0c01f7e65..05080289bd 100644
--- a/modules/tinyexr/image_saver_tinyexr.cpp
+++ b/modules/tinyexr/image_saver_tinyexr.cpp
@@ -159,7 +159,7 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale)
// Godot does not support more than 4 channels,
// so we can preallocate header infos on the stack and use only the subset we need
- PoolByteArray channels[max_channels];
+ PackedByteArray channels[max_channels];
unsigned char *channels_ptrs[max_channels];
EXRChannelInfo channel_infos[max_channels];
int pixel_types[max_channels];
@@ -188,25 +188,25 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale)
const int *channel_mapping = channel_mappings[channel_count - 1];
{
- PoolByteArray src_data = p_img->get_data();
- PoolByteArray::Read src_r = src_data.read();
+ PackedByteArray src_data = p_img->get_data();
+ const uint8_t *src_r = src_data.ptr();
for (int channel_index = 0; channel_index < channel_count; ++channel_index) {
// De-interleave channels
- PoolByteArray &dst = channels[channel_index];
+ PackedByteArray &dst = channels[channel_index];
dst.resize(pixel_count * target_pixel_type_size);
- PoolByteArray::Write dst_w = dst.write();
+ uint8_t *dst_w = dst.ptrw();
if (src_pixel_type == SRC_FLOAT && target_pixel_type == TINYEXR_PIXELTYPE_FLOAT) {
// Note: we don't save mipmaps
CRASH_COND(src_data.size() < pixel_count * channel_count * target_pixel_type_size);
- const float *src_rp = (float *)src_r.ptr();
- float *dst_wp = (float *)dst_w.ptr();
+ const float *src_rp = (float *)src_r;
+ float *dst_wp = (float *)dst_w;
for (int i = 0; i < pixel_count; ++i) {
dst_wp[i] = src_rp[channel_index + i * channel_count];
@@ -216,8 +216,8 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale)
CRASH_COND(src_data.size() < pixel_count * channel_count * target_pixel_type_size);
- const uint16_t *src_rp = (uint16_t *)src_r.ptr();
- uint16_t *dst_wp = (uint16_t *)dst_w.ptr();
+ const uint16_t *src_rp = (uint16_t *)src_r;
+ uint16_t *dst_wp = (uint16_t *)dst_w;
for (int i = 0; i < pixel_count; ++i) {
dst_wp[i] = src_rp[channel_index + i * channel_count];
@@ -227,8 +227,8 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale)
CRASH_COND(src_data.size() < pixel_count * channel_count);
- const uint8_t *src_rp = (uint8_t *)src_r.ptr();
- uint16_t *dst_wp = (uint16_t *)dst_w.ptr();
+ const uint8_t *src_rp = (uint8_t *)src_r;
+ uint16_t *dst_wp = (uint16_t *)dst_w;
for (int i = 0; i < pixel_count; ++i) {
dst_wp[i] = Math::make_half_float(src_rp[channel_index + i * channel_count] / 255.f);
@@ -240,7 +240,7 @@ Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale)
int remapped_index = channel_mapping[channel_index];
- channels_ptrs[remapped_index] = dst_w.ptr();
+ channels_ptrs[remapped_index] = dst_w;
// No conversion
pixel_types[remapped_index] = target_pixel_type;
diff --git a/modules/upnp/doc_classes/UPNP.xml b/modules/upnp/doc_classes/UPNP.xml
index 8549c173db..785c8dad50 100644
--- a/modules/upnp/doc_classes/UPNP.xml
+++ b/modules/upnp/doc_classes/UPNP.xml
@@ -45,7 +45,7 @@
<description>
Adds a mapping to forward the external [code]port[/code] (between 1 and 65535) on the default gateway (see [method get_gateway]) to the [code]internal_port[/code] on the local machine for the given protocol [code]proto[/code] (either [code]TCP[/code] or [code]UDP[/code], with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with [method get_gateway] and call [method add_port_mapping] on it, if any.
If [code]internal_port[/code] is [code]0[/code] (the default), the same port number is used for both the external and the internal port (the [code]port[/code] value).
- The description ([code]desc[/code]) is shown in some router UIs and can be used to point out which application added the mapping, and the lifetime of the mapping can be limited by [code]duration[/code]. However, some routers are incompatible with one or both of these, so use with caution and add fallback logic in case of errors to retry without them if in doubt.
+ The description ([code]desc[/code]) is shown in some router UIs and can be used to point out which application added the mapping. The mapping's lease duration can be limited by specifying a [code]duration[/code] (in seconds). However, some routers are incompatible with one or both of these, so use with caution and add fallback logic in case of errors to retry without them if in doubt.
See [enum UPNPResult] for possible return values.
</description>
</method>
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 9cd79aa781..db1ef2adc6 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -15,7 +15,7 @@
<method name="add_custom_signal">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Add a custom signal with the specified name to the VisualScript.
@@ -24,7 +24,7 @@
<method name="add_function">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Add a function with the specified name to the VisualScript.
@@ -33,7 +33,7 @@
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -48,7 +48,7 @@
<method name="add_variable">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="default_value" type="Variant" default="null">
</argument>
@@ -61,7 +61,7 @@
<method name="custom_signal_add_argument">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="type" type="int" enum="Variant.Type">
</argument>
@@ -76,7 +76,7 @@
<method name="custom_signal_get_argument_count" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Get the count of a custom signal's arguments.
@@ -85,7 +85,7 @@
<method name="custom_signal_get_argument_name" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -96,7 +96,7 @@
<method name="custom_signal_get_argument_type" qualifiers="const">
<return type="int" enum="Variant.Type">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -107,7 +107,7 @@
<method name="custom_signal_remove_argument">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -118,7 +118,7 @@
<method name="custom_signal_set_argument_name">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -131,7 +131,7 @@
<method name="custom_signal_set_argument_type">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -144,7 +144,7 @@
<method name="custom_signal_swap_argument">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
@@ -157,7 +157,7 @@
<method name="data_connect">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -174,7 +174,7 @@
<method name="data_disconnect">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -191,7 +191,7 @@
<method name="get_function_node_id" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the id of a function's entry point node.
@@ -200,7 +200,7 @@
<method name="get_function_scroll" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the position of the center of the screen for a given function.
@@ -209,7 +209,7 @@
<method name="get_node" qualifiers="const">
<return type="VisualScriptNode">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -220,7 +220,7 @@
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -231,7 +231,7 @@
<method name="get_variable_default_value" qualifiers="const">
<return type="Variant">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the default (initial) value of a variable.
@@ -240,7 +240,7 @@
<method name="get_variable_export" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns whether a variable is exported.
@@ -249,7 +249,7 @@
<method name="get_variable_info" qualifiers="const">
<return type="Dictionary">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage.
@@ -258,7 +258,7 @@
<method name="has_custom_signal" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns whether a signal exists with the specified name.
@@ -267,7 +267,7 @@
<method name="has_data_connection" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -284,7 +284,7 @@
<method name="has_function" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns whether a function exists with the specified name.
@@ -293,7 +293,7 @@
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -304,7 +304,7 @@
<method name="has_sequence_connection" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -319,7 +319,7 @@
<method name="has_variable" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Returns whether a variable exists with the specified name.
@@ -328,7 +328,7 @@
<method name="remove_custom_signal">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Remove a custom signal with the given name.
@@ -337,7 +337,7 @@
<method name="remove_function">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Remove a specific function and its nodes from the script.
@@ -346,7 +346,7 @@
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -357,7 +357,7 @@
<method name="remove_variable">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<description>
Remove a variable with the given name.
@@ -366,9 +366,9 @@
<method name="rename_custom_signal">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
Change the name of a custom signal.
@@ -377,9 +377,9 @@
<method name="rename_function">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
Change the name of a function.
@@ -388,9 +388,9 @@
<method name="rename_variable">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="new_name" type="String">
+ <argument index="1" name="new_name" type="StringName">
</argument>
<description>
Change the name of a variable.
@@ -399,7 +399,7 @@
<method name="sequence_connect">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -415,7 +415,7 @@
<method name="sequence_disconnect">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="from_node" type="int">
</argument>
@@ -430,7 +430,7 @@
<method name="set_function_scroll">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="ofs" type="Vector2">
</argument>
@@ -441,7 +441,7 @@
<method name="set_instance_base_type">
<return type="void">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="type" type="StringName">
</argument>
<description>
Set the base type of the script.
@@ -450,7 +450,7 @@
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="func" type="String">
+ <argument index="0" name="func" type="StringName">
</argument>
<argument index="1" name="id" type="int">
</argument>
@@ -463,7 +463,7 @@
<method name="set_variable_default_value">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Variant">
</argument>
@@ -474,7 +474,7 @@
<method name="set_variable_export">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
@@ -485,7 +485,7 @@
<method name="set_variable_info">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="name" type="StringName">
</argument>
<argument index="1" name="value" type="Dictionary">
</argument>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index c8e391c4a1..4d07f878a2 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -14,7 +14,7 @@
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type" default="0">
The type to get the constant from.
</member>
- <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant">
+ <member name="constant" type="StringName" setter="set_basic_type_constant" getter="get_basic_type_constant">
The name of the constant to return.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 9f4846ee1f..ef4183e6f6 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -197,10 +197,10 @@
Deserialize a [Variant] from a string serialized using [constant VAR_TO_STR].
</constant>
<constant name="VAR_TO_BYTES" value="61" enum="BuiltinFunc">
- Serialize a [Variant] to a [PoolByteArray].
+ Serialize a [Variant] to a [PackedByteArray].
</constant>
<constant name="BYTES_TO_VAR" value="62" enum="BuiltinFunc">
- Deserialize a [Variant] from a [PoolByteArray] serialized using [constant VAR_TO_BYTES].
+ Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES].
</constant>
<constant name="COLORN" value="63" enum="BuiltinFunc">
Return the [Color] with the given name and alpha ranging from 0 to 1.
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index cf35808823..de5d731cc0 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -15,10 +15,10 @@
<methods>
</methods>
<members>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
The constant's parent class.
</member>
- <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant" default="&quot;&quot;">
+ <member name="constant" type="StringName" setter="set_class_constant" getter="get_class_constant" default="@&quot;&quot;">
The constant to return. See the given class for its available constants.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index 60a19ac7a7..5c9c8d3eca 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -15,7 +15,7 @@
<methods>
</methods>
<members>
- <member name="signal" type="String" setter="set_signal" getter="get_signal" default="&quot;&quot;">
+ <member name="signal" type="StringName" setter="set_signal" getter="get_signal" default="@&quot;&quot;">
The signal to emit.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index 16c3af7ab2..2d0fac1fa0 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -11,19 +11,19 @@
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
</member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
</member>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
</member>
<member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode" default="0">
</member>
- <member name="function" type="String" setter="set_function" getter="get_function" default="&quot;&quot;">
+ <member name="function" type="StringName" setter="set_function" getter="get_function" default="@&quot;&quot;">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
</member>
<member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode" default="0">
</member>
- <member name="singleton" type="String" setter="set_singleton" getter="get_singleton">
+ <member name="singleton" type="StringName" setter="set_singleton" getter="get_singleton">
</member>
<member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args">
</member>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index 0b6325bf0a..6c296fdb4b 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -9,7 +9,7 @@
<methods>
</methods>
<members>
- <member name="action" type="String" setter="set_action_name" getter="get_action_name" default="&quot;&quot;">
+ <member name="action" type="StringName" setter="set_action_name" getter="get_action_name" default="@&quot;&quot;">
</member>
<member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="VisualScriptInputAction.Mode" default="0">
</member>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index 6c31ae1a30..c3741eea89 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -18,7 +18,7 @@
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0">
The local variable's type.
</member>
- <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default="&quot;new_local&quot;">
+ <member name="var_name" type="StringName" setter="set_var_name" getter="get_var_name" default="@&quot;new_local&quot;">
The local variable's name.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index 0a9a509958..619bbb90ca 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -20,7 +20,7 @@
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0">
The local variable's type.
</member>
- <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default="&quot;new_local&quot;">
+ <member name="var_name" type="StringName" setter="set_var_name" getter="get_var_name" default="@&quot;new_local&quot;">
The local variable's name.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index cf436116b8..f13d449064 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -11,15 +11,15 @@
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
</member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
</member>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
</member>
- <member name="index" type="String" setter="set_index" getter="get_index">
+ <member name="index" type="StringName" setter="set_index" getter="get_index">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
</member>
- <member name="property" type="String" setter="set_property" getter="get_property" default="&quot;&quot;">
+ <member name="property" type="StringName" setter="set_property" getter="get_property" default="@&quot;&quot;">
</member>
<member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode" default="0">
</member>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index 357b4b9f5c..629576e261 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -13,15 +13,15 @@
</member>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
</member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
</member>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
</member>
- <member name="index" type="String" setter="set_index" getter="get_index">
+ <member name="index" type="StringName" setter="set_index" getter="get_index">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
</member>
- <member name="property" type="String" setter="set_property" getter="get_property" default="&quot;&quot;">
+ <member name="property" type="StringName" setter="set_property" getter="get_property" default="@&quot;&quot;">
</member>
<member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode" default="0">
</member>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index 43fe9d16ea..80a8d31041 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -11,7 +11,7 @@
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script" default="&quot;&quot;">
</member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
</member>
</members>
<constants>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index 0746ab293e..d182e14e4d 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -15,7 +15,7 @@
<methods>
</methods>
<members>
- <member name="var_name" type="String" setter="set_variable" getter="get_variable" default="&quot;&quot;">
+ <member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="@&quot;&quot;">
The variable's name.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index e7d83e60ab..3bd392dd85 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -16,7 +16,7 @@
<methods>
</methods>
<members>
- <member name="var_name" type="String" setter="set_variable" getter="get_variable" default="&quot;&quot;">
+ <member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="@&quot;&quot;">
The variable's name.
</member>
</members>
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index 8f6941ce1e..483cdfeaf8 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -9,13 +9,13 @@
<methods>
</methods>
<members>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
+ <member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="@&quot;Object&quot;">
</member>
<member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptYieldSignal.CallMode" default="0">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
</member>
- <member name="signal" type="String" setter="set_signal" getter="get_signal" default="&quot;&quot;">
+ <member name="signal" type="StringName" setter="set_signal" getter="get_signal" default="@&quot;&quot;">
</member>
</members>
<constants>
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index e712190344..471f43cadd 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -30,14 +30,14 @@
#include "visual_script.h"
-#include <stdint.h>
-
#include "core/core_string_names.h"
#include "core/os/os.h"
#include "core/project_settings.h"
#include "scene/main/node.h"
#include "visual_script_nodes.h"
+#include <stdint.h>
+
//used by editor, this is not really saved
void VisualScriptNode::set_breakpoint(bool p_breakpoint) {
breakpoint = p_breakpoint;
@@ -88,11 +88,11 @@ void VisualScriptNode::validate_input_default_values() {
continue;
} else {
//not the same, reconvert
- Variant::CallError ce;
+ Callable::CallError ce;
Variant existing = default_input_values[i];
const Variant *existingp = &existing;
default_input_values[i] = Variant::construct(expected, &existingp, 1, ce, false);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
//could not convert? force..
default_input_values[i] = Variant::construct(expected, NULL, 0, ce, false);
}
@@ -198,7 +198,7 @@ void VisualScript::remove_function(const StringName &p_name) {
for (Map<int, Function::NodeData>::Element *E = functions[p_name].nodes.front(); E; E = E->next()) {
- E->get().node->disconnect("ports_changed", this, "_node_ports_changed");
+ E->get().node->disconnect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed));
E->get().node->scripts_used.erase(this);
}
@@ -340,7 +340,7 @@ void VisualScript::add_node(const StringName &p_func, int p_id, const Ref<Visual
nd.pos = p_pos;
Ref<VisualScriptNode> vsn = p_node;
- vsn->connect("ports_changed", this, "_node_ports_changed", varray(p_id));
+ vsn->connect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed), varray(p_id));
vsn->scripts_used.insert(this);
vsn->validate_input_default_values(); // Validate when fully loaded
@@ -389,7 +389,7 @@ void VisualScript::remove_node(const StringName &p_func, int p_id) {
func.function_id = -1; //revert to invalid
}
- func.nodes[p_id].node->disconnect("ports_changed", this, "_node_ports_changed");
+ func.nodes[p_id].node->disconnect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed));
func.nodes[p_id].node->scripts_used.erase(this);
func.nodes.erase(p_id);
@@ -928,13 +928,11 @@ ScriptInstance *VisualScript::instance_create(Object *p_this) {
VisualScriptInstance *instance = memnew(VisualScriptInstance);
instance->create(Ref<VisualScript>(this), p_this);
- if (VisualScriptLanguage::singleton->lock)
- VisualScriptLanguage::singleton->lock->lock();
-
- instances[p_this] = instance;
+ {
+ MutexLock lock(VisualScriptLanguage::singleton->lock);
- if (VisualScriptLanguage::singleton->lock)
- VisualScriptLanguage::singleton->lock->unlock();
+ instances[p_this] = instance;
+ }
return instance;
}
@@ -1375,8 +1373,6 @@ Dictionary VisualScript::_get_data() const {
void VisualScript::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_node_ports_changed"), &VisualScript::_node_ports_changed);
-
ClassDB::bind_method(D_METHOD("add_function", "name"), &VisualScript::add_function);
ClassDB::bind_method(D_METHOD("has_function", "name"), &VisualScript::has_function);
ClassDB::bind_method(D_METHOD("remove_function", "name"), &VisualScript::remove_function);
@@ -1560,7 +1556,7 @@ bool VisualScriptInstance::has_method(const StringName &p_method) const {
//#define VSDEBUG(m_text) print_line(m_text)
#define VSDEBUG(m_text)
-void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Variant::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node) {
+void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Callable::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node) {
ERR_FAIL_COND(node->pass_idx == -1);
@@ -1577,7 +1573,7 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int
for (int i = 0; i < dc; i++) {
_dependency_step(deps[i], p_pass, pass_stack, input_args, output_args, variant_stack, r_error, error_str, r_error_node);
- if (r_error.error != Variant::CallError::CALL_OK)
+ if (r_error.error != Callable::CallError::CALL_OK)
return;
}
}
@@ -1602,12 +1598,12 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int
node->step(input_args, output_args, VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE, working_mem, r_error, error_str);
//ignore return
- if (r_error.error != Variant::CallError::CALL_OK) {
+ if (r_error.error != Callable::CallError::CALL_OK) {
*r_error_node = node;
}
}
-Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError &r_error) {
+Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error) {
Map<StringName, Function>::Element *F = functions.find(p_method);
ERR_FAIL_COND_V(!F, Variant());
@@ -1669,7 +1665,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
for (int i = 0; i < dc; i++) {
_dependency_step(deps[i], p_pass, pass_stack, input_args, output_args, variant_stack, r_error, error_str, &node);
- if (r_error.error != Variant::CallError::CALL_OK) {
+ if (r_error.error != Callable::CallError::CALL_OK) {
error = true;
current_node_id = node->id;
break;
@@ -1729,7 +1725,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
int ret = node->step(input_args, output_args, start_mode, working_mem, r_error, error_str);
- if (r_error.error != Variant::CallError::CALL_OK) {
+ if (r_error.error != Callable::CallError::CALL_OK) {
//use error from step
error = true;
break;
@@ -1738,7 +1734,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if (ret & VisualScriptNodeInstance::STEP_YIELD_BIT) {
//yielded!
if (node->get_working_memory_size() == 0) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("A node yielded without working memory, please read the docs on how to yield properly!");
error = true;
break;
@@ -1747,7 +1743,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
Ref<VisualScriptFunctionState> state = *working_mem;
if (!state.is_valid()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Node yielded, but did not return a function state in the first working memory.");
error = true;
break;
@@ -1766,7 +1762,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
state->pass = p_pass;
copymem(state->stack.ptrw(), p_stack, p_stack_size);
//step 2, run away, return directly
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
#ifdef DEBUG_ENABLED
//will re-enter later, so exiting
@@ -1809,7 +1805,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if (ret & VisualScriptNodeInstance::STEP_EXIT_FUNCTION_BIT) {
if (node->get_working_memory_size() == 0) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Return value must be assigned to first element of node working memory! Fix your node please.");
error = true;
} else {
@@ -1826,7 +1822,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if ((ret == output || ret & VisualScriptNodeInstance::STEP_FLAG_PUSH_STACK_BIT) && node->sequence_output_count) {
//if no exit bit was set, and has sequence outputs, guess next node
if (output >= node->sequence_output_count) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Node returned an invalid sequence output: ") + itos(output);
error = true;
break;
@@ -1888,7 +1884,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
}
if (!found) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Found sequence bit but not the node in the stack, report bug!");
error = true;
break;
@@ -1900,7 +1896,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
} else {
// check for stack overflow
if (flow_stack_pos + 1 >= flow_max) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Stack overflow with stack depth: ") + itos(output);
error = true;
break;
@@ -1952,22 +1948,22 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
String err_func = p_method;
int err_line = current_node_id; //not a line but it works as one
- if (node && (r_error.error != Variant::CallError::CALL_ERROR_INVALID_METHOD || error_str == String())) {
+ if (node && (r_error.error != Callable::CallError::CALL_ERROR_INVALID_METHOD || error_str == String())) {
if (error_str != String()) {
error_str += " ";
}
- if (r_error.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
+ if (r_error.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) {
int errorarg = r_error.argument;
- error_str += "Cannot convert argument " + itos(errorarg + 1) + " to " + Variant::get_type_name(r_error.expected) + ".";
- } else if (r_error.error == Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
+ error_str += "Cannot convert argument " + itos(errorarg + 1) + " to " + Variant::get_type_name(Variant::Type(r_error.expected)) + ".";
+ } else if (r_error.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
error_str += "Expected " + itos(r_error.argument) + " arguments.";
- } else if (r_error.error == Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
+ } else if (r_error.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
error_str += "Expected " + itos(r_error.argument) + " arguments.";
- } else if (r_error.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) {
+ } else if (r_error.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
error_str += "Invalid Call.";
- } else if (r_error.error == Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
+ } else if (r_error.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
error_str += "Base Instance is null";
}
}
@@ -2000,13 +1996,13 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
return return_value;
}
-Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK; //ok by default
+ r_error.error = Callable::CallError::CALL_OK; //ok by default
Map<StringName, Function>::Element *F = functions.find(p_method);
if (!F) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -2048,7 +2044,7 @@ Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p
Map<int, VisualScriptNodeInstance *>::Element *E = instances.find(f->node);
if (!E) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_V_MSG(Variant(), "No VisualScriptFunction node in function.");
}
@@ -2062,14 +2058,14 @@ Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p
VSDEBUG("ARGUMENTS: " + itos(f->argument_count) = " RECEIVED: " + itos(p_argcount));
if (p_argcount < f->argument_count) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = node->get_input_port_count();
return Variant();
}
if (p_argcount > f->argument_count) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = node->get_input_port_count();
return Variant();
@@ -2094,15 +2090,15 @@ void VisualScriptInstance::notification(int p_notification) {
Variant what = p_notification;
const Variant *whatp = &what;
- Variant::CallError ce;
+ Callable::CallError ce;
call(VisualScriptLanguage::singleton->notification, &whatp, 1, ce); //do as call
}
String VisualScriptInstance::to_string(bool *r_valid) {
if (has_method(CoreStringNames::get_singleton()->_to_string)) {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = call(CoreStringNames::get_singleton()->_to_string, NULL, 0, ce);
- if (ce.error == Variant::CallError::CALL_OK) {
+ if (ce.error == Callable::CallError::CALL_OK) {
if (ret.get_type() != Variant::STRING) {
if (r_valid)
*r_valid = false;
@@ -2391,13 +2387,11 @@ VisualScriptInstance::VisualScriptInstance() {
VisualScriptInstance::~VisualScriptInstance() {
- if (VisualScriptLanguage::singleton->lock)
- VisualScriptLanguage::singleton->lock->lock();
-
- script->instances.erase(owner);
+ {
+ MutexLock lock(VisualScriptLanguage::singleton->lock);
- if (VisualScriptLanguage::singleton->lock)
- VisualScriptLanguage::singleton->lock->unlock();
+ script->instances.erase(owner);
+ }
for (Map<int, VisualScriptNodeInstance *>::Element *E = instances.front(); E; E = E->next()) {
memdelete(E->get());
@@ -2408,7 +2402,7 @@ VisualScriptInstance::~VisualScriptInstance() {
/////////////////////
-Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
ERR_FAIL_COND_V(function == StringName(), Variant());
@@ -2419,12 +2413,12 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int
#endif
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
Array args;
if (p_argcount == 0) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
return Variant();
} else if (p_argcount == 1) {
@@ -2439,13 +2433,13 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int
Ref<VisualScriptFunctionState> self = *p_args[p_argcount - 1]; //hi, I'm myself, needed this to remain alive.
if (self.is_null()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_argcount - 1;
r_error.expected = Variant::OBJECT;
return Variant();
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
Variant *working_mem = ((Variant *)stack.ptr()) + working_mem_index;
@@ -2463,7 +2457,7 @@ void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p
binds.push_back(p_binds[i]);
}
binds.push_back(Ref<VisualScriptFunctionState>(this)); //add myself on the back to avoid dying from unreferencing
- p_obj->connect(p_signal, this, "_signal_callback", binds, CONNECT_ONESHOT);
+ p_obj->connect_compat(p_signal, this, "_signal_callback", binds, CONNECT_ONESHOT);
}
bool VisualScriptFunctionState::is_valid() const {
@@ -2481,8 +2475,8 @@ Variant VisualScriptFunctionState::resume(Array p_args) {
#endif
- Variant::CallError r_error;
- r_error.error = Variant::CallError::CALL_OK;
+ Callable::CallError r_error;
+ r_error.error = Callable::CallError::CALL_OK;
Variant *working_mem = ((Variant *)stack.ptr()) + working_mem_index;
@@ -2584,7 +2578,7 @@ int VisualScriptLanguage::find_function(const String &p_function, const String &
return -1;
}
-String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const {
+String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
return String();
}
@@ -2836,9 +2830,6 @@ VisualScriptLanguage::VisualScriptLanguage() {
_step = "_step";
_subcall = "_subcall";
singleton = this;
-#ifndef NO_THREADS
- lock = Mutex::create();
-#endif
_debug_parse_err_node = -1;
_debug_parse_err_file = "";
@@ -2859,9 +2850,6 @@ VisualScriptLanguage::VisualScriptLanguage() {
VisualScriptLanguage::~VisualScriptLanguage() {
- if (lock)
- memdelete(lock);
-
if (_call_stack) {
memdelete_arr(_call_stack);
}
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index d3569bb040..0a6daba64f 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -155,7 +155,7 @@ public:
virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) = 0; //do a step, return which sequence port to go out
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) = 0; //do a step, return which sequence port to go out
Ref<VisualScriptNode> get_base_node() { return Ref<VisualScriptNode>(base); }
@@ -408,8 +408,8 @@ class VisualScriptInstance : public ScriptInstance {
StringName source;
- void _dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Variant::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node);
- Variant _call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError &r_error);
+ void _dependency_step(VisualScriptNodeInstance *node, int p_pass, int *pass_stack, const Variant **input_args, Variant **output_args, Variant *variant_stack, Callable::CallError &r_error, String &error_str, VisualScriptNodeInstance **r_error_node);
+ Variant _call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error);
//Map<StringName,Function> functions;
friend class VisualScriptFunctionState; //for yield
@@ -422,7 +422,7 @@ public:
virtual void get_method_list(List<MethodInfo> *p_list) const;
virtual bool has_method(const StringName &p_method) const;
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
virtual void notification(int p_notification);
String to_string(bool *r_valid);
@@ -487,7 +487,7 @@ class VisualScriptFunctionState : public Reference {
int flow_stack_pos;
int pass;
- Variant _signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
protected:
static void _bind_methods();
@@ -530,7 +530,7 @@ public:
static VisualScriptLanguage *singleton;
- Mutex *lock;
+ Mutex lock;
bool debug_break(const String &p_error, bool p_allow_continue = true);
bool debug_break_parse(const String &p_file, int p_node, const String &p_error);
@@ -599,7 +599,7 @@ public:
virtual bool has_named_classes() const;
virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
virtual void add_global_constant(const StringName &p_variable, const Variant &p_value);
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 832c4c2cc4..07f152efd4 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -277,22 +277,22 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_EXP:
case MATH_ISNAN:
case MATH_ISINF: {
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
} break;
case MATH_ATAN2: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "y");
+ return PropertyInfo(Variant::FLOAT, "y");
else
- return PropertyInfo(Variant::REAL, "x");
+ return PropertyInfo(Variant::FLOAT, "x");
} break;
case MATH_FMOD:
case MATH_FPOSMOD:
case LOGIC_MAX:
case LOGIC_MIN: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "a");
+ return PropertyInfo(Variant::FLOAT, "a");
else
- return PropertyInfo(Variant::REAL, "b");
+ return PropertyInfo(Variant::FLOAT, "b");
} break;
case MATH_POSMOD: {
if (p_idx == 0)
@@ -302,63 +302,63 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
} break;
case MATH_POW: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "base");
+ return PropertyInfo(Variant::FLOAT, "base");
else
- return PropertyInfo(Variant::REAL, "exp");
+ return PropertyInfo(Variant::FLOAT, "exp");
} break;
case MATH_EASE: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
else
- return PropertyInfo(Variant::REAL, "curve");
+ return PropertyInfo(Variant::FLOAT, "curve");
} break;
case MATH_STEP_DECIMALS: {
- return PropertyInfo(Variant::REAL, "step");
+ return PropertyInfo(Variant::FLOAT, "step");
} break;
case MATH_STEPIFY: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
else
- return PropertyInfo(Variant::REAL, "steps");
+ return PropertyInfo(Variant::FLOAT, "steps");
} break;
case MATH_LERP:
case MATH_LERP_ANGLE:
case MATH_INVERSE_LERP:
case MATH_SMOOTHSTEP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
else
- return PropertyInfo(Variant::REAL, "weight");
+ return PropertyInfo(Variant::FLOAT, "weight");
} break;
case MATH_RANGE_LERP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "istart");
+ return PropertyInfo(Variant::FLOAT, "istart");
else if (p_idx == 2)
- return PropertyInfo(Variant::REAL, "istop");
+ return PropertyInfo(Variant::FLOAT, "istop");
else if (p_idx == 3)
- return PropertyInfo(Variant::REAL, "ostart");
+ return PropertyInfo(Variant::FLOAT, "ostart");
else
- return PropertyInfo(Variant::REAL, "ostop");
+ return PropertyInfo(Variant::FLOAT, "ostop");
} break;
case MATH_MOVE_TOWARD: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
else
- return PropertyInfo(Variant::REAL, "delta");
+ return PropertyInfo(Variant::FLOAT, "delta");
} break;
case MATH_DECTIME: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "amount");
+ return PropertyInfo(Variant::FLOAT, "amount");
else
- return PropertyInfo(Variant::REAL, "step");
+ return PropertyInfo(Variant::FLOAT, "step");
} break;
case MATH_RANDOMIZE:
case MATH_RAND:
@@ -367,37 +367,37 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
} break;
case MATH_RANDOM: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
} break;
case MATH_SEED:
case MATH_RANDSEED: {
return PropertyInfo(Variant::INT, "seed");
} break;
case MATH_DEG2RAD: {
- return PropertyInfo(Variant::REAL, "deg");
+ return PropertyInfo(Variant::FLOAT, "deg");
} break;
case MATH_RAD2DEG: {
- return PropertyInfo(Variant::REAL, "rad");
+ return PropertyInfo(Variant::FLOAT, "rad");
} break;
case MATH_LINEAR2DB: {
- return PropertyInfo(Variant::REAL, "nrg");
+ return PropertyInfo(Variant::FLOAT, "nrg");
} break;
case MATH_DB2LINEAR: {
- return PropertyInfo(Variant::REAL, "db");
+ return PropertyInfo(Variant::FLOAT, "db");
} break;
case MATH_POLAR2CARTESIAN: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "r");
+ return PropertyInfo(Variant::FLOAT, "r");
else
- return PropertyInfo(Variant::REAL, "th");
+ return PropertyInfo(Variant::FLOAT, "th");
} break;
case MATH_CARTESIAN2POLAR: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "x");
+ return PropertyInfo(Variant::FLOAT, "x");
else
- return PropertyInfo(Variant::REAL, "y");
+ return PropertyInfo(Variant::FLOAT, "y");
} break;
case MATH_WRAP: {
if (p_idx == 0)
@@ -410,11 +410,11 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_WRAPF:
case LOGIC_CLAMP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "min");
+ return PropertyInfo(Variant::FLOAT, "min");
else
- return PropertyInfo(Variant::REAL, "max");
+ return PropertyInfo(Variant::FLOAT, "max");
} break;
case LOGIC_NEAREST_PO2: {
return PropertyInfo(Variant::INT, "value");
@@ -467,7 +467,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case BYTES_TO_VAR: {
if (p_idx == 0)
- return PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes");
+ return PropertyInfo(Variant::PACKED_BYTE_ARRAY, "bytes");
else
return PropertyInfo(Variant::BOOL, "allow_objects");
} break;
@@ -475,7 +475,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
if (p_idx == 0)
return PropertyInfo(Variant::STRING, "name");
else
- return PropertyInfo(Variant::REAL, "alpha");
+ return PropertyInfo(Variant::FLOAT, "alpha");
} break;
case FUNC_MAX: {
}
@@ -504,7 +504,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_FPOSMOD:
case MATH_FLOOR:
case MATH_CEIL: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_POSMOD:
case MATH_ROUND: {
@@ -519,14 +519,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_POW:
case MATH_LOG:
case MATH_EXP: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_ISNAN:
case MATH_ISINF: {
t = Variant::BOOL;
} break;
case MATH_EASE: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_STEP_DECIMALS: {
t = Variant::INT;
@@ -539,7 +539,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_SMOOTHSTEP:
case MATH_MOVE_TOWARD:
case MATH_DECTIME: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_RANDOMIZE: {
@@ -551,7 +551,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
} break;
case MATH_RANDF:
case MATH_RANDOM: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_SEED: {
@@ -568,7 +568,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_LINEAR2DB:
case MATH_WRAPF:
case MATH_DB2LINEAR: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_POLAR2CARTESIAN:
case MATH_CARTESIAN2POLAR: {
@@ -632,7 +632,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
} break;
case VAR_TO_BYTES: {
if (p_idx == 0)
- t = Variant::POOL_BYTE_ARRAY;
+ t = Variant::PACKED_BYTE_ARRAY;
else
t = Variant::BOOL;
@@ -675,15 +675,15 @@ VisualScriptBuiltinFunc::BuiltinFunc VisualScriptBuiltinFunc::get_func() {
return func;
}
-#define VALIDATE_ARG_NUM(m_arg) \
- if (!p_inputs[m_arg]->is_num()) { \
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \
- r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
- return; \
+#define VALIDATE_ARG_NUM(m_arg) \
+ if (!p_inputs[m_arg]->is_num()) { \
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
+ r_error.argument = m_arg; \
+ r_error.expected = Variant::FLOAT; \
+ return; \
}
-void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str) {
+void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str) {
switch (p_func) {
case VisualScriptBuiltinFunc::MATH_SIN: {
@@ -781,15 +781,15 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
int64_t i = *p_inputs[0];
*r_return = ABS(i);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = Math::abs(r);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case VisualScriptBuiltinFunc::MATH_SIGN: {
@@ -798,15 +798,15 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
int64_t i = *p_inputs[0];
*r_return = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case VisualScriptBuiltinFunc::MATH_POW: {
@@ -1047,7 +1047,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
if (p_inputs[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
@@ -1081,7 +1081,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
if (p_inputs[0]->get_type() != Variant::OBJECT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
@@ -1089,7 +1089,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
}
if (p_inputs[1]->get_type() != Variant::STRING && p_inputs[1]->get_type() != Variant::NODE_PATH) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
@@ -1111,7 +1111,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
if (type < 0 || type >= Variant::VARIANT_MAX) {
r_error_str = RTR("Invalid type argument to convert(), use TYPE_* constants.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
return;
@@ -1141,7 +1141,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
case VisualScriptBuiltinFunc::TEXT_ORD: {
if (p_inputs[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -1151,7 +1151,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
String str = p_inputs[0]->operator String();
if (str.length() != 1) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
*r_return = "Expected a string of length 1 (a character).";
@@ -1197,7 +1197,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
case VisualScriptBuiltinFunc::STR_TO_VAR: {
if (p_inputs[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -1212,7 +1212,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
Error err = VariantParser::parse(&ss, *r_return, errs, line);
if (err != OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
*r_return = "Parse error at line " + itos(line) + ": " + errs;
@@ -1223,17 +1223,17 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
case VisualScriptBuiltinFunc::VAR_TO_BYTES: {
if (p_inputs[1]->get_type() != Variant::BOOL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::BOOL;
return;
}
- PoolByteArray barr;
+ PackedByteArray barr;
int len;
bool full_objects = *p_inputs[1];
Error err = encode_variant(*p_inputs[0], NULL, len, full_objects);
if (err) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::NIL;
r_error_str = "Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).";
@@ -1242,37 +1242,37 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
barr.resize(len);
{
- PoolByteArray::Write w = barr.write();
- encode_variant(*p_inputs[0], w.ptr(), len, full_objects);
+ uint8_t *w = barr.ptrw();
+ encode_variant(*p_inputs[0], w, len, full_objects);
}
*r_return = barr;
} break;
case VisualScriptBuiltinFunc::BYTES_TO_VAR: {
- if (p_inputs[0]->get_type() != Variant::POOL_BYTE_ARRAY) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_inputs[0]->get_type() != Variant::PACKED_BYTE_ARRAY) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
if (p_inputs[1]->get_type() != Variant::BOOL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::BOOL;
return;
}
- PoolByteArray varr = *p_inputs[0];
+ PackedByteArray varr = *p_inputs[0];
bool allow_objects = *p_inputs[1];
Variant ret;
{
- PoolByteArray::Read r = varr.read();
- Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects);
+ const uint8_t *r = varr.ptr();
+ Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects);
if (err != OK) {
r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
}
@@ -1306,7 +1306,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
VisualScriptBuiltinFunc::exec_func(func, p_inputs, p_outputs[0], r_error, r_error_str);
return 0;
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index d0787b3dd3..d950f858d4 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -112,7 +112,7 @@ public:
static int get_func_argument_count(BuiltinFunc p_func);
static String get_func_name(BuiltinFunc p_func);
- static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str);
+ static void exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Callable::CallError &r_error, String &r_error_str);
static BuiltinFunc find_function(const String &p_string);
private:
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 9a1125c375..8840b9f7cf 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -346,7 +346,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::BOOL: color = Color(0.55, 0.65, 0.94); break;
case Variant::INT: color = Color(0.49, 0.78, 0.94); break;
- case Variant::REAL: color = Color(0.38, 0.85, 0.96); break;
+ case Variant::FLOAT: color = Color(0.38, 0.85, 0.96); break;
case Variant::STRING: color = Color(0.42, 0.65, 0.93); break;
case Variant::VECTOR2: color = Color(0.74, 0.57, 0.95); break;
@@ -366,13 +366,15 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::DICTIONARY: color = Color(0.47, 0.93, 0.69); break;
case Variant::ARRAY: color = Color(0.88, 0.88, 0.88); break;
- case Variant::POOL_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break;
- case Variant::POOL_INT_ARRAY: color = Color(0.69, 0.86, 0.96); break;
- case Variant::POOL_REAL_ARRAY: color = Color(0.59, 0.91, 0.97); break;
- case Variant::POOL_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break;
- case Variant::POOL_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break;
+ case Variant::PACKED_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break;
+ case Variant::PACKED_INT32_ARRAY: color = Color(0.69, 0.86, 0.96); break;
+ case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.59, 0.91, 0.97); break;
+ case Variant::PACKED_INT64_ARRAY: color = Color(0.69, 0.86, 0.96); break;
+ case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.59, 0.91, 0.97); break;
+ case Variant::PACKED_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break;
+ case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break;
+ case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break;
+ case Variant::PACKED_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break;
default:
color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
@@ -383,7 +385,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::BOOL: color = Color(0.43, 0.56, 0.92); break;
case Variant::INT: color = Color(0.31, 0.7, 0.91); break;
- case Variant::REAL: color = Color(0.15, 0.8, 0.94); break;
+ case Variant::FLOAT: color = Color(0.15, 0.8, 0.94); break;
case Variant::STRING: color = Color(0.27, 0.56, 0.91); break;
case Variant::VECTOR2: color = Color(0.68, 0.46, 0.93); break;
@@ -403,13 +405,15 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::DICTIONARY: color = Color(0.34, 0.91, 0.62); break;
case Variant::ARRAY: color = Color(0.45, 0.45, 0.45); break;
- case Variant::POOL_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break;
- case Variant::POOL_INT_ARRAY: color = Color(0.38, 0.73, 0.92); break;
- case Variant::POOL_REAL_ARRAY: color = Color(0.25, 0.83, 0.95); break;
- case Variant::POOL_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break;
- case Variant::POOL_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break;
+ case Variant::PACKED_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break;
+ case Variant::PACKED_INT32_ARRAY: color = Color(0.38, 0.73, 0.92); break;
+ case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.25, 0.83, 0.95); break;
+ case Variant::PACKED_INT64_ARRAY: color = Color(0.38, 0.73, 0.92); break;
+ case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.25, 0.83, 0.95); break;
+ case Variant::PACKED_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break;
+ case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break;
+ case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break;
+ case Variant::PACKED_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break;
default:
color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.3, 0.3);
@@ -520,13 +524,13 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("MiniObject", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
Ref<Texture2D> seq_port = Control::get_icon("VisualShaderPort", "EditorIcons");
@@ -556,8 +560,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_meta("__vnode", node);
gnode->set_name(itos(E->get()));
- gnode->connect("dragged", this, "_node_moved", varray(E->get()));
- gnode->connect("close_request", this, "_remove_node", varray(E->get()), CONNECT_DEFERRED);
+ gnode->connect("dragged", callable_mp(this, &VisualScriptEditor::_node_moved), varray(E->get()));
+ gnode->connect("close_request", callable_mp(this, &VisualScriptEditor::_remove_node), varray(E->get()), CONNECT_DEFERRED);
if (E->get() != script->get_function_node_id(F->get())) {
//function can't be erased
@@ -575,7 +579,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *btn = memnew(Button);
btn->set_text(TTR("Add Input Port"));
hbnc->add_child(btn);
- btn->connect("pressed", this, "_add_input_port", varray(E->get()), CONNECT_DEFERRED);
+ btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_input_port), varray(E->get()), CONNECT_DEFERRED);
}
if (nd_list->is_output_port_editable()) {
if (nd_list->is_input_port_editable())
@@ -584,7 +588,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *btn = memnew(Button);
btn->set_text(TTR("Add Output Port"));
hbnc->add_child(btn);
- btn->connect("pressed", this, "_add_output_port", varray(E->get()), CONNECT_DEFERRED);
+ btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_output_port), varray(E->get()), CONNECT_DEFERRED);
}
gnode->add_child(hbnc);
} else if (Object::cast_to<VisualScriptExpression>(node.ptr())) {
@@ -594,7 +598,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
line_edit->set_expand_to_text_length(true);
line_edit->add_font_override("font", get_font("source", "EditorFonts"));
gnode->add_child(line_edit);
- line_edit->connect("text_changed", this, "_expression_text_changed", varray(E->get()));
+ line_edit->connect("text_changed", callable_mp(this, &VisualScriptEditor::_expression_text_changed), varray(E->get()));
} else {
String text = node->get_text();
if (!text.empty()) {
@@ -610,7 +614,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_comment(true);
gnode->set_resizable(true);
gnode->set_custom_minimum_size(vsc->get_size() * EDSCALE);
- gnode->connect("resize_request", this, "_comment_node_resized", varray(E->get()));
+ gnode->connect("resize_request", callable_mp(this, &VisualScriptEditor::_comment_node_resized), varray(E->get()));
}
if (node_styles.has(node->get_category())) {
@@ -619,16 +623,24 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
sbf = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("comment", "GraphNode");
Color c = sbf->get_border_color();
+ Color ic = c;
c.a = 1;
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
+ Color mono_color;
+ if (((c.r + c.g + c.b) / 3) < 0.7) {
+ mono_color = Color(1.0, 1.0, 1.0);
+ ic = Color(0.0, 0.0, 0.0, 0.7);
+ } else {
+ mono_color = Color(0.0, 0.0, 0.0);
+ ic = Color(1.0, 1.0, 1.0, 0.7);
+ }
mono_color.a = 0.85;
c = mono_color;
}
gnode->add_color_override("title_color", c);
c.a = 0.7;
gnode->add_color_override("close_color", c);
- gnode->add_color_override("resizer_color", c);
+ gnode->add_color_override("resizer_color", ic);
gnode->add_style_override("frame", sbf);
}
@@ -720,8 +732,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
name_box->set_custom_minimum_size(Size2(60 * EDSCALE, 0));
name_box->set_text(left_name);
name_box->set_expand_to_text_length(true);
- name_box->connect("resized", this, "_update_node_size", varray(E->get()));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, true));
+ name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size), varray(E->get()));
+ name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out), varray(name_box, E->get(), i, true));
} else {
hbc->add_child(memnew(Label(left_name)));
}
@@ -734,13 +746,13 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
opbtn->select(left_type);
opbtn->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
hbc->add_child(opbtn);
- opbtn->connect("item_selected", this, "_change_port_type", varray(E->get(), i, true), CONNECT_DEFERRED);
+ opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type), varray(E->get(), i, true), CONNECT_DEFERRED);
}
Button *rmbtn = memnew(Button);
rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
hbc->add_child(rmbtn);
- rmbtn->connect("pressed", this, "_remove_input_port", varray(E->get(), i), CONNECT_DEFERRED);
+ rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_input_port), varray(E->get(), i), CONNECT_DEFERRED);
} else {
hbc->add_child(memnew(Label(left_name)));
}
@@ -753,14 +765,14 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
if (value.get_type() != left_type) {
//different type? for now convert
//not the same, reconvert
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *existingp = &value;
value = Variant::construct(left_type, &existingp, 1, ce, false);
}
if (left_type == Variant::COLOR) {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- button->connect("draw", this, "_draw_color_over_button", varray(button, value));
+ button->connect("draw", callable_mp(this, &VisualScriptEditor::_draw_color_over_button), varray(button, value));
} else if (left_type == Variant::OBJECT && Ref<Resource>(value).is_valid()) {
Ref<Resource> res = value;
@@ -776,7 +788,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
button->set_text(value);
}
- button->connect("pressed", this, "_default_value_edited", varray(button, E->get(), i));
+ button->connect("pressed", callable_mp(this, &VisualScriptEditor::_default_value_edited), varray(button, E->get(), i));
hbc2->add_child(button);
}
} else {
@@ -802,7 +814,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *rmbtn = memnew(Button);
rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons"));
hbc->add_child(rmbtn);
- rmbtn->connect("pressed", this, "_remove_output_port", varray(E->get(), i), CONNECT_DEFERRED);
+ rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_output_port), varray(E->get(), i), CONNECT_DEFERRED);
if (nd_list->is_output_port_type_editable()) {
OptionButton *opbtn = memnew(OptionButton);
@@ -812,7 +824,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
opbtn->select(right_type);
opbtn->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
hbc->add_child(opbtn);
- opbtn->connect("item_selected", this, "_change_port_type", varray(E->get(), i, false), CONNECT_DEFERRED);
+ opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type), varray(E->get(), i, false), CONNECT_DEFERRED);
}
if (nd_list->is_output_port_name_editable()) {
@@ -821,8 +833,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
name_box->set_custom_minimum_size(Size2(60 * EDSCALE, 0));
name_box->set_text(right_name);
name_box->set_expand_to_text_length(true);
- name_box->connect("resized", this, "_update_node_size", varray(E->get()));
- name_box->connect("focus_exited", this, "_port_name_focus_out", varray(name_box, E->get(), i, false));
+ name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size), varray(E->get()));
+ name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out), varray(name_box, E->get(), i, false));
} else {
hbc->add_child(memnew(Label(right_name)));
}
@@ -976,13 +988,13 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("MiniObject", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
List<StringName> var_names;
@@ -1225,7 +1237,7 @@ void VisualScriptEditor::_add_func_input() {
LineEdit *name_box = memnew(LineEdit);
name_box->set_h_size_flags(SIZE_EXPAND_FILL);
name_box->set_text("input");
- name_box->connect("focus_entered", this, "_deselect_input_names");
+ name_box->connect("focus_entered", callable_mp(this, &VisualScriptEditor::_deselect_input_names));
hbox->add_child(name_box);
Label *type_label = memnew(Label);
@@ -1252,7 +1264,7 @@ void VisualScriptEditor::_add_func_input() {
func_input_vbox->add_child(hbox);
hbox->set_meta("id", hbox->get_position_in_parent());
- delete_button->connect("pressed", this, "_remove_func_input", varray(hbox));
+ delete_button->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_func_input), varray(hbox));
name_box->select_all();
name_box->grab_focus();
@@ -1820,7 +1832,7 @@ void VisualScriptEditor::_fn_name_box_input(const Ref<InputEvent> &p_event) {
return;
Ref<InputEventKey> key = p_event;
- if (key.is_valid() && key->is_pressed() && key->get_scancode() == KEY_ENTER) {
+ if (key.is_valid() && key->is_pressed() && key->get_keycode() == KEY_ENTER) {
function_name_edit->hide();
_rename_function(selected, function_name_box->get_text());
function_name_box->clear();
@@ -2408,7 +2420,7 @@ void VisualScriptEditor::set_edited_resource(const RES &p_res) {
variable_editor->script = script;
variable_editor->undo_redo = undo_redo;
- script->connect("node_ports_changed", this, "_node_ports_changed");
+ script->connect("node_ports_changed", callable_mp(this, &VisualScriptEditor::_node_ports_changed));
default_func = script->get_default_func();
@@ -2585,7 +2597,7 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) {
}
}
-void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray p_args) {
+void VisualScriptEditor::add_callback(const String &p_function, PackedStringArray p_args) {
if (script->has_function(p_function)) {
_update_members();
@@ -2910,8 +2922,8 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
if (to_type != Variant::NIL && from_type != Variant::NIL && to_type != from_type) {
// add a constructor node between the ports
bool exceptions = false; // true if there are any exceptions
- exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::REAL);
- exceptions = exceptions || (to_type == Variant::REAL && from_type == Variant::INT);
+ exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::FLOAT);
+ exceptions = exceptions || (to_type == Variant::FLOAT && from_type == Variant::INT);
if (Variant::can_convert(from_type, to_type) && !exceptions) {
MethodInfo mi;
mi.name = Variant::get_type_name(to_type);
@@ -3851,7 +3863,7 @@ void VisualScriptEditor::_default_value_edited(Node *p_button, int p_id, int p_i
Variant existing = vsn->get_default_input_value(p_input_port);
if (pinfo.type != Variant::NIL && existing.get_type() != pinfo.type) {
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *existingp = &existing;
existing = Variant::construct(pinfo.type, &existingp, 1, ce, false);
}
@@ -3904,9 +3916,9 @@ void VisualScriptEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- variable_editor->connect("changed", this, "_update_members");
- signal_editor->connect("changed", this, "_update_members");
- FALLTHROUGH;
+ variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_members));
+ signal_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_members));
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
if (p_what != NOTIFICATION_READY && !is_visible_in_tree()) {
@@ -4601,77 +4613,23 @@ void VisualScriptEditor::set_syntax_highlighter(SyntaxHighlighter *p_highlighter
void VisualScriptEditor::_bind_methods() {
- ClassDB::bind_method("_member_button", &VisualScriptEditor::_member_button);
- ClassDB::bind_method("_member_edited", &VisualScriptEditor::_member_edited);
- ClassDB::bind_method("_member_selected", &VisualScriptEditor::_member_selected);
- ClassDB::bind_method("_update_members", &VisualScriptEditor::_update_members);
- ClassDB::bind_method("_members_gui_input", &VisualScriptEditor::_members_gui_input);
- ClassDB::bind_method("_member_rmb_selected", &VisualScriptEditor::_member_rmb_selected);
- ClassDB::bind_method("_member_option", &VisualScriptEditor::_member_option);
- ClassDB::bind_method("_fn_name_box_input", &VisualScriptEditor::_fn_name_box_input);
-
- ClassDB::bind_method("_change_base_type", &VisualScriptEditor::_change_base_type);
- ClassDB::bind_method("_change_base_type_callback", &VisualScriptEditor::_change_base_type_callback);
- ClassDB::bind_method("_toggle_tool_script", &VisualScriptEditor::_toggle_tool_script);
- ClassDB::bind_method("_node_selected", &VisualScriptEditor::_node_selected);
- ClassDB::bind_method("_node_moved", &VisualScriptEditor::_node_moved);
ClassDB::bind_method("_move_node", &VisualScriptEditor::_move_node);
- ClassDB::bind_method("_begin_node_move", &VisualScriptEditor::_begin_node_move);
- ClassDB::bind_method("_end_node_move", &VisualScriptEditor::_end_node_move);
- ClassDB::bind_method("_remove_node", &VisualScriptEditor::_remove_node);
ClassDB::bind_method("_update_graph", &VisualScriptEditor::_update_graph, DEFVAL(-1));
- ClassDB::bind_method("_node_ports_changed", &VisualScriptEditor::_node_ports_changed);
-
- ClassDB::bind_method("_create_function_dialog", &VisualScriptEditor::_create_function_dialog);
- ClassDB::bind_method("_create_function", &VisualScriptEditor::_create_function);
- ClassDB::bind_method("_add_node_dialog", &VisualScriptEditor::_add_node_dialog);
- ClassDB::bind_method("_add_func_input", &VisualScriptEditor::_add_func_input);
- ClassDB::bind_method("_remove_func_input", &VisualScriptEditor::_remove_func_input);
- ClassDB::bind_method("_deselect_input_names", &VisualScriptEditor::_deselect_input_names);
-
- ClassDB::bind_method("_default_value_edited", &VisualScriptEditor::_default_value_edited);
- ClassDB::bind_method("_default_value_changed", &VisualScriptEditor::_default_value_changed);
- ClassDB::bind_method("_menu_option", &VisualScriptEditor::_menu_option);
- ClassDB::bind_method("_graph_ofs_changed", &VisualScriptEditor::_graph_ofs_changed);
+
ClassDB::bind_method("_center_on_node", &VisualScriptEditor::_center_on_node);
- ClassDB::bind_method("_comment_node_resized", &VisualScriptEditor::_comment_node_resized);
ClassDB::bind_method("_button_resource_previewed", &VisualScriptEditor::_button_resource_previewed);
ClassDB::bind_method("_port_action_menu", &VisualScriptEditor::_port_action_menu);
- ClassDB::bind_method("_selected_connect_node", &VisualScriptEditor::_selected_connect_node);
- ClassDB::bind_method("_selected_new_virtual_method", &VisualScriptEditor::_selected_new_virtual_method);
- ClassDB::bind_method("_cancel_connect_node", &VisualScriptEditor::_cancel_connect_node);
ClassDB::bind_method("_create_new_node_from_name", &VisualScriptEditor::_create_new_node_from_name);
- ClassDB::bind_method("_expression_text_changed", &VisualScriptEditor::_expression_text_changed);
- ClassDB::bind_method("_add_input_port", &VisualScriptEditor::_add_input_port);
- ClassDB::bind_method("_add_output_port", &VisualScriptEditor::_add_output_port);
- ClassDB::bind_method("_remove_input_port", &VisualScriptEditor::_remove_input_port);
- ClassDB::bind_method("_remove_output_port", &VisualScriptEditor::_remove_output_port);
- ClassDB::bind_method("_change_port_type", &VisualScriptEditor::_change_port_type);
- ClassDB::bind_method("_update_node_size", &VisualScriptEditor::_update_node_size);
- ClassDB::bind_method("_port_name_focus_out", &VisualScriptEditor::_port_name_focus_out);
ClassDB::bind_method("get_drag_data_fw", &VisualScriptEditor::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &VisualScriptEditor::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &VisualScriptEditor::drop_data_fw);
ClassDB::bind_method("_input", &VisualScriptEditor::_input);
- ClassDB::bind_method("_graph_gui_input", &VisualScriptEditor::_graph_gui_input);
-
- ClassDB::bind_method("_on_nodes_delete", &VisualScriptEditor::_on_nodes_delete);
- ClassDB::bind_method("_on_nodes_duplicate", &VisualScriptEditor::_on_nodes_duplicate);
-
- ClassDB::bind_method("_hide_timer", &VisualScriptEditor::_hide_timer);
-
- ClassDB::bind_method("_graph_connected", &VisualScriptEditor::_graph_connected);
- ClassDB::bind_method("_graph_disconnected", &VisualScriptEditor::_graph_disconnected);
- ClassDB::bind_method("_graph_connect_to_empty", &VisualScriptEditor::_graph_connect_to_empty);
ClassDB::bind_method("_update_graph_connections", &VisualScriptEditor::_update_graph_connections);
- ClassDB::bind_method("_selected_method", &VisualScriptEditor::_selected_method);
- ClassDB::bind_method("_draw_color_over_button", &VisualScriptEditor::_draw_color_over_button);
-
ClassDB::bind_method("_generic_search", &VisualScriptEditor::_generic_search);
}
@@ -4697,7 +4655,7 @@ VisualScriptEditor::VisualScriptEditor() {
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/create_function"), EDIT_CREATE_FUNCTION);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/refresh_nodes"), REFRESH_GRAPH);
- edit_menu->get_popup()->connect("id_pressed", this, "_menu_option");
+ edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &VisualScriptEditor::_menu_option));
members_section = memnew(VBoxContainer);
// Add but wait until done setting up this.
@@ -4707,7 +4665,7 @@ VisualScriptEditor::VisualScriptEditor() {
CheckButton *tool_script_check = memnew(CheckButton);
tool_script_check->set_text(TTR("Make Tool:"));
members_section->add_child(tool_script_check);
- tool_script_check->connect("pressed", this, "_toggle_tool_script");
+ tool_script_check->connect("pressed", callable_mp(this, &VisualScriptEditor::_toggle_tool_script));
/// Members ///
@@ -4715,11 +4673,11 @@ VisualScriptEditor::VisualScriptEditor() {
members_section->add_margin_child(TTR("Members:"), members, true);
members->set_custom_minimum_size(Size2(0, 50 * EDSCALE));
members->set_hide_root(true);
- members->connect("button_pressed", this, "_member_button");
- members->connect("item_edited", this, "_member_edited");
- members->connect("cell_selected", this, "_member_selected", varray(), CONNECT_DEFERRED);
- members->connect("gui_input", this, "_members_gui_input");
- members->connect("item_rmb_selected", this, "_member_rmb_selected");
+ members->connect("button_pressed", callable_mp(this, &VisualScriptEditor::_member_button));
+ members->connect("item_edited", callable_mp(this, &VisualScriptEditor::_member_edited));
+ members->connect("cell_selected", callable_mp(this, &VisualScriptEditor::_member_selected), varray(), CONNECT_DEFERRED);
+ members->connect("gui_input", callable_mp(this, &VisualScriptEditor::_members_gui_input));
+ members->connect("item_rmb_selected", callable_mp(this, &VisualScriptEditor::_member_rmb_selected));
members->set_allow_rmb_select(true);
members->set_allow_reselect(true);
members->set_hide_folding(true);
@@ -4727,13 +4685,13 @@ VisualScriptEditor::VisualScriptEditor() {
member_popup = memnew(PopupMenu);
add_child(member_popup);
- member_popup->connect("id_pressed", this, "_member_option");
+ member_popup->connect("id_pressed", callable_mp(this, &VisualScriptEditor::_member_option));
function_name_edit = memnew(PopupDialog);
function_name_box = memnew(LineEdit);
function_name_edit->add_child(function_name_box);
function_name_edit->set_h_size_flags(SIZE_EXPAND);
- function_name_box->connect("gui_input", this, "_fn_name_box_input");
+ function_name_box->connect("gui_input", callable_mp(this, &VisualScriptEditor::_fn_name_box_input));
function_name_box->set_expand_to_text_length(true);
add_child(function_name_edit);
@@ -4743,15 +4701,15 @@ VisualScriptEditor::VisualScriptEditor() {
add_child(graph);
graph->set_v_size_flags(Control::SIZE_EXPAND_FILL);
graph->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- graph->connect("node_selected", this, "_node_selected");
- graph->connect("_begin_node_move", this, "_begin_node_move");
- graph->connect("_end_node_move", this, "_end_node_move");
- graph->connect("delete_nodes_request", this, "_on_nodes_delete");
- graph->connect("duplicate_nodes_request", this, "_on_nodes_duplicate");
- graph->connect("gui_input", this, "_graph_gui_input");
+ graph->connect("node_selected", callable_mp(this, &VisualScriptEditor::_node_selected));
+ graph->connect("_begin_node_move", callable_mp(this, &VisualScriptEditor::_begin_node_move));
+ graph->connect("_end_node_move", callable_mp(this, &VisualScriptEditor::_end_node_move));
+ graph->connect("delete_nodes_request", callable_mp(this, &VisualScriptEditor::_on_nodes_delete));
+ graph->connect("duplicate_nodes_request", callable_mp(this, &VisualScriptEditor::_on_nodes_duplicate));
+ graph->connect("gui_input", callable_mp(this, &VisualScriptEditor::_graph_gui_input));
graph->set_drag_forwarding(this);
graph->hide();
- graph->connect("scroll_offset_changed", this, "_graph_ofs_changed");
+ graph->connect("scroll_offset_changed", callable_mp(this, &VisualScriptEditor::_graph_ofs_changed));
/// Add Buttons to Top Bar/Zoom bar.
HBoxContainer *graph_hbc = graph->get_zoom_hbox();
@@ -4761,18 +4719,18 @@ VisualScriptEditor::VisualScriptEditor() {
graph_hbc->add_child(base_lbl);
base_type_select = memnew(Button);
- base_type_select->connect("pressed", this, "_change_base_type");
+ base_type_select->connect("pressed", callable_mp(this, &VisualScriptEditor::_change_base_type));
graph_hbc->add_child(base_type_select);
Button *add_nds = memnew(Button);
add_nds->set_text(TTR("Add Nodes..."));
graph_hbc->add_child(add_nds);
- add_nds->connect("pressed", this, "_add_node_dialog");
+ add_nds->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_node_dialog));
Button *fn_btn = memnew(Button);
fn_btn->set_text(TTR("Add Function..."));
graph_hbc->add_child(fn_btn);
- fn_btn->connect("pressed", this, "_create_function_dialog");
+ fn_btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_create_function_dialog));
// Add Function Dialog.
VBoxContainer *function_vb = memnew(VBoxContainer);
@@ -4790,7 +4748,7 @@ VisualScriptEditor::VisualScriptEditor() {
func_name_box->set_h_size_flags(SIZE_EXPAND_FILL);
func_name_box->set_placeholder(TTR("function_name"));
func_name_box->set_text("");
- func_name_box->connect("focus_entered", this, "_deselect_input_names");
+ func_name_box->connect("focus_entered", callable_mp(this, &VisualScriptEditor::_deselect_input_names));
func_name_hbox->add_child(func_name_box);
// Add minor setting for function if needed, here!
@@ -4800,7 +4758,7 @@ VisualScriptEditor::VisualScriptEditor() {
Button *add_input_button = memnew(Button);
add_input_button->set_h_size_flags(SIZE_EXPAND_FILL);
add_input_button->set_text(TTR("Add Input"));
- add_input_button->connect("pressed", this, "_add_func_input");
+ add_input_button->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_func_input));
function_vb->add_child(add_input_button);
func_input_scroll = memnew(ScrollContainer);
@@ -4816,7 +4774,7 @@ VisualScriptEditor::VisualScriptEditor() {
function_create_dialog->set_title(TTR("Create Function"));
function_create_dialog->add_child(function_vb);
function_create_dialog->get_ok()->set_text(TTR("Create"));
- function_create_dialog->get_ok()->connect("pressed", this, "_create_function");
+ function_create_dialog->get_ok()->connect("pressed", callable_mp(this, &VisualScriptEditor::_create_function));
add_child(function_create_dialog);
select_func_text = memnew(Label);
@@ -4836,7 +4794,7 @@ VisualScriptEditor::VisualScriptEditor() {
hint_text_timer = memnew(Timer);
hint_text_timer->set_wait_time(4);
- hint_text_timer->connect("timeout", this, "_hide_timer");
+ hint_text_timer->connect("timeout", callable_mp(this, &VisualScriptEditor::_hide_timer));
add_child(hint_text_timer);
// Allowed casts (connections).
@@ -4854,9 +4812,9 @@ VisualScriptEditor::VisualScriptEditor() {
graph->add_valid_left_disconnect_type(TYPE_SEQUENCE);
- graph->connect("connection_request", this, "_graph_connected");
- graph->connect("disconnection_request", this, "_graph_disconnected");
- graph->connect("connection_to_empty", this, "_graph_connect_to_empty");
+ graph->connect("connection_request", callable_mp(this, &VisualScriptEditor::_graph_connected));
+ graph->connect("disconnection_request", callable_mp(this, &VisualScriptEditor::_graph_disconnected));
+ graph->connect("connection_to_empty", callable_mp(this, &VisualScriptEditor::_graph_connect_to_empty));
edit_signal_dialog = memnew(AcceptDialog);
edit_signal_dialog->get_ok()->set_text(TTR("Close"));
@@ -4880,7 +4838,7 @@ VisualScriptEditor::VisualScriptEditor() {
select_base_type = memnew(CreateDialog);
select_base_type->set_base_type("Object"); // Anything goes.
- select_base_type->connect("create", this, "_change_base_type_callback");
+ select_base_type->connect("create", callable_mp(this, &VisualScriptEditor::_change_base_type_callback));
add_child(select_base_type);
undo_redo = EditorNode::get_singleton()->get_undo_redo();
@@ -4892,22 +4850,22 @@ VisualScriptEditor::VisualScriptEditor() {
default_value_edit = memnew(CustomPropertyEditor);
add_child(default_value_edit);
- default_value_edit->connect("variant_changed", this, "_default_value_changed");
+ default_value_edit->connect("variant_changed", callable_mp(this, &VisualScriptEditor::_default_value_changed));
method_select = memnew(VisualScriptPropertySelector);
add_child(method_select);
- method_select->connect("selected", this, "_selected_method");
+ method_select->connect("selected", callable_mp(this, &VisualScriptEditor::_selected_method));
error_line = -1;
new_connect_node_select = memnew(VisualScriptPropertySelector);
add_child(new_connect_node_select);
new_connect_node_select->set_resizable(true);
- new_connect_node_select->connect("selected", this, "_selected_connect_node");
- new_connect_node_select->get_cancel()->connect("pressed", this, "_cancel_connect_node");
+ new_connect_node_select->connect("selected", callable_mp(this, &VisualScriptEditor::_selected_connect_node));
+ new_connect_node_select->get_cancel()->connect("pressed", callable_mp(this, &VisualScriptEditor::_cancel_connect_node));
new_virtual_method_select = memnew(VisualScriptPropertySelector);
add_child(new_virtual_method_select);
- new_virtual_method_select->connect("selected", this, "_selected_new_virtual_method");
+ new_virtual_method_select->connect("selected", callable_mp(this, &VisualScriptEditor::_selected_new_virtual_method));
}
VisualScriptEditor::~VisualScriptEditor() {
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 9f52d87b6a..9a2a42b160 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -313,7 +313,7 @@ public:
virtual void tag_saved_version();
virtual void reload(bool p_soft);
virtual void get_breakpoints(List<int> *p_breakpoints);
- virtual void add_callback(const String &p_function, PoolStringArray p_args);
+ virtual void add_callback(const String &p_function, PackedStringArray p_args);
virtual void update_settings();
virtual bool show_members_overview();
virtual void set_debugger_active(bool p_active);
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 63880df21d..23d1c8ccc0 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -1229,7 +1229,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
//execute by parsing the tree directly
- virtual bool _execute(const Variant **p_inputs, VisualScriptExpression::ENode *p_node, Variant &r_ret, String &r_error_str, Variant::CallError &ce) {
+ virtual bool _execute(const Variant **p_inputs, VisualScriptExpression::ENode *p_node, Variant &r_ret, String &r_error_str, Callable::CallError &ce) {
switch (p_node->type) {
case VisualScriptExpression::ENode::TYPE_INPUT: {
@@ -1371,7 +1371,7 @@ public:
r_ret = Variant::construct(constructor->data_type, (const Variant **)argp.ptr(), argp.size(), ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = "Invalid arguments to construct '" + Variant::get_type_name(constructor->data_type) + "'.";
return true;
}
@@ -1398,7 +1398,7 @@ public:
VisualScriptBuiltinFunc::exec_func(bifunc->func, (const Variant **)argp.ptr(), &r_ret, ce, r_error_str);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = "Builtin Call Failed. " + r_error_str;
return true;
}
@@ -1430,7 +1430,7 @@ public:
r_ret = base.call(call->method, (const Variant **)argp.ptr(), argp.size(), ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = "On call to '" + String(call->method) + "':";
return true;
}
@@ -1440,24 +1440,24 @@ public:
return false;
}
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!expression->root || expression->error_set) {
r_error_str = expression->error_str;
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
bool error = _execute(p_inputs, expression->root, *p_outputs[0], r_error_str, r_error);
- if (error && r_error.error == Variant::CallError::CALL_OK) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ if (error && r_error.error == Callable::CallError::CALL_OK) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
#ifdef DEBUG_ENABLED
if (!error && expression->output_type != Variant::NIL && !Variant::can_convert_strict(p_outputs[0]->get_type(), expression->output_type)) {
r_error_str += "Can't convert expression result from " + Variant::get_type_name(p_outputs[0]->get_type()) + " to " + Variant::get_type_name(expression->output_type) + ".";
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
#endif
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 213dc897af..475893e86d 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -135,7 +135,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (with_value) {
*p_working_mem = *p_inputs[0];
@@ -237,7 +237,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_CONTINUE_SEQUENCE)
return 2;
@@ -323,7 +323,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool keep_going = p_inputs[0]->operator bool();
@@ -410,7 +410,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_BEGIN_SEQUENCE) {
p_working_mem[0] = *p_inputs[0];
@@ -418,7 +418,7 @@ public:
bool can_iter = p_inputs[0]->iter_init(p_working_mem[1], valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Input type not iterable: ") + Variant::get_type_name(p_inputs[0]->get_type());
return 0;
}
@@ -429,7 +429,7 @@ public:
*p_outputs[0] = p_working_mem[0].iter_get(p_working_mem[1], valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Iterator became invalid");
return 0;
}
@@ -440,7 +440,7 @@ public:
bool can_iter = p_working_mem[0].iter_next(p_working_mem[1], valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Iterator became invalid: ") + Variant::get_type_name(p_inputs[0]->get_type());
return 0;
}
@@ -451,7 +451,7 @@ public:
*p_outputs[0] = p_working_mem[0].iter_get(p_working_mem[1], valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Iterator became invalid");
return 0;
}
@@ -549,7 +549,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_BEGIN_SEQUENCE) {
@@ -645,7 +645,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_CONTINUE_SEQUENCE) {
return case_count; //exit
@@ -836,14 +836,14 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
Object *obj = *p_inputs[0];
*p_outputs[0] = Variant();
if (!obj) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Instance is null";
return 0;
}
@@ -861,7 +861,7 @@ public:
}
Ref<Script> cast_script = Ref<Resource>(ResourceCache::get(script));
if (!cast_script.is_valid()) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Script path is not a script: " + script;
return 1;
}
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 63c36ae431..011432ef39 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -788,7 +788,7 @@ public:
return true;
}
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
switch (call_mode) {
@@ -808,14 +808,14 @@ public:
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
return 0;
}
Node *another = node->get_node(node_path);
if (!another) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
}
@@ -846,7 +846,7 @@ public:
} else if (returns == 1) {
v.call(function, p_inputs + 1, input_args, r_error);
} else {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid returns count for call_mode == CALL_MODE_INSTANCE";
return 0;
}
@@ -866,7 +866,7 @@ public:
Object *object = Engine::get_singleton()->get_singleton_object(singleton);
if (!object) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid singleton name: '" + String(singleton) + "'";
return 0;
}
@@ -884,7 +884,7 @@ public:
if (!validate) {
//ignore call errors if validation is disabled
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
r_error_str = String();
}
@@ -1020,7 +1020,7 @@ void VisualScriptPropertySet::_adjust_input_index(PropertyInfo &pinfo) const {
if (index != StringName()) {
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(pinfo.type, NULL, 0, ce);
Variant i = v.get(index);
pinfo.type = i.get_type();
@@ -1167,7 +1167,7 @@ void VisualScriptPropertySet::_update_cache() {
//not super efficient..
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(basic_type, NULL, 0, ce);
List<PropertyInfo> pinfo;
@@ -1409,7 +1409,7 @@ void VisualScriptPropertySet::_validate_property(PropertyInfo &property) const {
if (property.name == "index") {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant v = Variant::construct(type_cache.type, NULL, 0, ce);
List<PropertyInfo> plist;
v.get_property_list(&plist);
@@ -1578,7 +1578,7 @@ public:
}
}
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
switch (call_mode) {
@@ -1597,7 +1597,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid set value '" + String(*p_inputs[0]) + "' on property '" + String(property) + "' of type " + object->get_class();
}
} break;
@@ -1605,14 +1605,14 @@ public:
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
return 0;
}
Node *another = node->get_node(node_path);
if (!another) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
}
@@ -1629,7 +1629,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid set value '" + String(*p_inputs[0]) + "' on property '" + String(property) + "' of type " + another->get_class();
}
@@ -1651,7 +1651,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid set value '" + String(*p_inputs[1]) + "' (" + Variant::get_type_name(p_inputs[1]->get_type()) + ") on property '" + String(property) + "' of type " + Variant::get_type_name(v.get_type());
}
@@ -1875,7 +1875,7 @@ void VisualScriptPropertyGet::_update_cache() {
//not super efficient..
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(basic_type, NULL, 0, ce);
List<PropertyInfo> pinfo;
@@ -2124,7 +2124,7 @@ void VisualScriptPropertyGet::_validate_property(PropertyInfo &property) const {
if (property.name == "index") {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant v = Variant::construct(type_cache, NULL, 0, ce);
List<PropertyInfo> plist;
v.get_property_list(&plist);
@@ -2211,7 +2211,7 @@ public:
VisualScriptPropertyGet *node;
VisualScriptInstance *instance;
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
switch (call_mode) {
@@ -2228,7 +2228,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Invalid index property name.");
return 0;
}
@@ -2237,14 +2237,14 @@ public:
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Base object is not a Node!");
return 0;
}
Node *another = node->get_node(node_path);
if (!another) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Path does not lead Node!");
return 0;
}
@@ -2258,7 +2258,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = vformat(RTR("Invalid index property name '%s' in node %s."), String(property), another->get_name());
return 0;
}
@@ -2275,7 +2275,7 @@ public:
}
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Invalid index property name.");
}
};
@@ -2434,7 +2434,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
Object *obj = instance->get_owner_ptr();
@@ -2500,7 +2500,7 @@ void register_visual_script_func_nodes() {
Variant::Type t = Variant::Type(i);
String type_name = Variant::get_type_name(t);
- Variant::CallError ce;
+ Callable::CallError ce;
Variant vt = Variant::construct(t, NULL, 0, ce);
List<MethodInfo> ml;
vt.get_method_list(&ml);
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index dc49ed72d0..ea09c82013 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -285,7 +285,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
int ac = node->get_argument_count();
@@ -294,7 +294,7 @@ public:
Variant::Type expected = node->get_argument_type(i);
if (expected != Variant::NIL) {
if (!Variant::can_convert_strict(p_inputs[i]->get_type(), expected)) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.expected = expected;
r_error.argument = i;
return 0;
@@ -762,7 +762,7 @@ public:
int input_count = 0;
virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (input_count > 0) {
Array arr;
@@ -1031,7 +1031,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool valid;
if (unary) {
@@ -1043,7 +1043,7 @@ public:
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
if (p_outputs[0]->get_type() == Variant::STRING) {
r_error_str = *p_outputs[0];
} else {
@@ -1165,7 +1165,7 @@ class VisualScriptNodeInstanceSelect : public VisualScriptNodeInstance {
public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool cond = *p_inputs[0];
if (cond)
@@ -1285,10 +1285,10 @@ public:
VisualScriptInstance *instance;
StringName variable;
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!instance->get_variable(variable, p_outputs[0])) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("VariableGet not found in script: ") + "'" + String(variable) + "'";
return 0;
}
@@ -1407,11 +1407,11 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!instance->set_variable(variable, *p_inputs[0])) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("VariableSet not found in script: ") + "'" + String(variable) + "'";
}
@@ -1482,7 +1482,7 @@ void VisualScriptConstant::set_constant_type(Variant::Type p_type) {
return;
type = p_type;
- Variant::CallError ce;
+ Callable::CallError ce;
value = Variant::construct(type, NULL, 0, ce);
ports_changed_notify();
_change_notify();
@@ -1537,7 +1537,7 @@ public:
Variant constant;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = constant;
return 0;
@@ -1642,7 +1642,7 @@ public:
Ref<Resource> preload;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = preload;
return 0;
@@ -1710,13 +1710,13 @@ class VisualScriptNodeInstanceIndexGet : public VisualScriptNodeInstance {
public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool valid;
*p_outputs[0] = p_inputs[0]->get(*p_inputs[1], &valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid get: " + p_inputs[0]->get_construct_string();
}
return 0;
@@ -1785,14 +1785,14 @@ class VisualScriptNodeInstanceIndexSet : public VisualScriptNodeInstance {
public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool valid;
*p_outputs[0] = *p_inputs[0];
p_outputs[0]->set(*p_inputs[1], *p_inputs[2], &valid);
if (!valid) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Invalid set: " + p_inputs[1]->get_construct_string();
}
return 0;
@@ -1866,7 +1866,7 @@ public:
int index;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = GlobalConstants::get_global_constant_value(index);
return 0;
@@ -1991,11 +1991,11 @@ public:
bool valid;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!valid) {
r_error_str = "Invalid constant name, pick a valid class constant.";
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
*p_outputs[0] = value;
@@ -2140,11 +2140,11 @@ public:
bool valid;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!valid) {
r_error_str = "Invalid constant name, pick a valid basic type constant.";
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
*p_outputs[0] = value;
@@ -2259,7 +2259,7 @@ PropertyInfo VisualScriptMathConstant::get_input_value_port_info(int p_idx) cons
PropertyInfo VisualScriptMathConstant::get_output_value_port_info(int p_idx) const {
- return PropertyInfo(Variant::REAL, const_name[constant]);
+ return PropertyInfo(Variant::FLOAT, const_name[constant]);
}
String VisualScriptMathConstant::get_caption() const {
@@ -2283,7 +2283,7 @@ public:
float value;
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = value;
return 0;
@@ -2389,7 +2389,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = singleton;
return 0;
@@ -2512,18 +2512,18 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
return 0;
}
Node *another = node->get_node(path);
if (!another) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
}
@@ -2696,18 +2696,18 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
return 0;
}
SceneTree *tree = node->get_tree();
if (!tree) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Attempt to get SceneTree while node is not in the active tree.";
return 0;
}
@@ -2803,7 +2803,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = path;
return 0;
@@ -2885,7 +2885,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = instance->get_owner_ptr();
return 0;
@@ -3022,13 +3022,13 @@ public:
int work_mem_size;
virtual int get_working_memory_size() const { return work_mem_size; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (node->get_script_instance()) {
#ifdef DEBUG_ENABLED
if (!node->get_script_instance()->has_method(VisualScriptLanguage::singleton->_step)) {
r_error_str = RTR("Custom node has no _step() method, can't process graph.");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
#endif
@@ -3055,13 +3055,13 @@ public:
Variant ret = node->get_script_instance()->call(VisualScriptLanguage::singleton->_step, in_values, out_values, p_start_mode, work_mem);
if (ret.get_type() == Variant::STRING) {
r_error_str = ret;
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
} else if (ret.is_num()) {
ret_out = ret;
} else {
r_error_str = RTR("Invalid return value from _step(), must be integer (seq out), or string (error).");
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
@@ -3130,8 +3130,6 @@ void VisualScriptCustomNode::_bind_methods() {
stepmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
BIND_VMETHOD(stepmi);
- ClassDB::bind_method(D_METHOD("_script_changed"), &VisualScriptCustomNode::_script_changed);
-
BIND_ENUM_CONSTANT(START_MODE_BEGIN_SEQUENCE);
BIND_ENUM_CONSTANT(START_MODE_CONTINUE_SEQUENCE);
BIND_ENUM_CONSTANT(START_MODE_RESUME_YIELD);
@@ -3144,7 +3142,7 @@ void VisualScriptCustomNode::_bind_methods() {
}
VisualScriptCustomNode::VisualScriptCustomNode() {
- connect("script_changed", this, "_script_changed");
+ connect("script_changed", callable_mp(this, &VisualScriptCustomNode::_script_changed));
}
//////////////////////////////////////////
@@ -3237,11 +3235,11 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (!valid) {
r_error_str = "Node requires a script with a _subcall(<args>) method to work.";
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
*p_outputs[0] = subcall->call(VisualScriptLanguage::singleton->_subcall, p_inputs, input_args, r_error);
@@ -3368,7 +3366,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
return 0;
}
@@ -3483,11 +3481,11 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
- Variant::CallError ce;
+ Callable::CallError ce;
*p_outputs[0] = Variant::construct(type, p_inputs, argcount, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
r_error_str = "Invalid arguments for constructor";
}
@@ -3612,7 +3610,7 @@ public:
StringName name;
virtual int get_working_memory_size() const { return 1; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_outputs[0] = *p_working_mem;
return 0;
@@ -3733,7 +3731,7 @@ public:
StringName name;
virtual int get_working_memory_size() const { return 1; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
*p_working_mem = *p_inputs[0];
*p_outputs[0] = *p_working_mem;
@@ -3868,7 +3866,7 @@ public:
StringName action;
VisualScriptInputAction::Mode mode;
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
switch (mode) {
case VisualScriptInputAction::MODE_PRESSED: {
@@ -4007,7 +4005,7 @@ void VisualScriptDeconstruct::_update_elements() {
elements.clear();
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(type, NULL, 0, ce);
List<PropertyInfo> pinfo;
@@ -4065,7 +4063,7 @@ public:
//virtual int get_working_memory_size() const { return 0; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
Variant in = *p_inputs[0];
@@ -4074,7 +4072,7 @@ public:
*p_outputs[i] = in.get(outputs[i], &valid);
if (!valid) {
r_error_str = "Can't obtain element '" + String(outputs[i]) + "' from " + Variant::get_type_name(in.get_type());
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
}
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index e8c02a41c4..d799f19143 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -51,7 +51,7 @@ void VisualScriptPropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
if (k.is_valid()) {
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
@@ -119,13 +119,15 @@ void VisualScriptPropertySelector::_update_search() {
Control::get_icon("Object", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
+ Control::get_icon("PackedInt64Array", "EditorIcons"),
+ Control::get_icon("PackedFloat64Array", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
{
String b = String(E->get());
@@ -193,7 +195,7 @@ void VisualScriptPropertySelector::_update_search() {
{
if (type != Variant::NIL) {
Variant v;
- Variant::CallError ce;
+ Callable::CallError ce;
v = Variant::construct(type, NULL, 0, ce);
v.get_method_list(&methods);
} else {
@@ -279,7 +281,7 @@ void VisualScriptPropertySelector::_update_search() {
if (type == Variant::BOOL) {
get_visual_node_names("operators/logic/", Set<String>(), found, root, search_box);
}
- if (type == Variant::BOOL || type == Variant::INT || type == Variant::REAL || type == Variant::VECTOR2 || type == Variant::VECTOR3) {
+ if (type == Variant::BOOL || type == Variant::INT || type == Variant::FLOAT || type == Variant::VECTOR2 || type == Variant::VECTOR3) {
get_visual_node_names("operators/math/", Set<String>(), found, root, search_box);
}
}
@@ -355,7 +357,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt
continue;
}
- bool in_modifier = false | p_modifiers.empty();
+ bool in_modifier = p_modifiers.empty();
for (Set<String>::Element *F = p_modifiers.front(); F && in_modifier; F = F->next()) {
if (E->get().findn(F->get()) != -1)
in_modifier = true;
@@ -516,11 +518,15 @@ void VisualScriptPropertySelector::_item_selected() {
help_bit->set_text(text);
}
+void VisualScriptPropertySelector::_hide_requested() {
+ _closed(); // From WindowDialog.
+}
+
void VisualScriptPropertySelector::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("confirmed", this, "_confirmed");
+ connect("confirmed", callable_mp(this, &VisualScriptPropertySelector::_confirmed));
}
}
@@ -688,11 +694,6 @@ void VisualScriptPropertySelector::show_window(float p_screen_ratio) {
void VisualScriptPropertySelector::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_text_changed"), &VisualScriptPropertySelector::_text_changed);
- ClassDB::bind_method(D_METHOD("_confirmed"), &VisualScriptPropertySelector::_confirmed);
- ClassDB::bind_method(D_METHOD("_sbox_input"), &VisualScriptPropertySelector::_sbox_input);
- ClassDB::bind_method(D_METHOD("_item_selected"), &VisualScriptPropertySelector::_item_selected);
-
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::STRING, "category"), PropertyInfo(Variant::BOOL, "connecting")));
}
@@ -703,23 +704,23 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() {
//set_child_rect(vbc);
search_box = memnew(LineEdit);
vbc->add_margin_child(TTR("Search:"), search_box);
- search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("gui_input", this, "_sbox_input");
+ search_box->connect("text_changed", callable_mp(this, &VisualScriptPropertySelector::_text_changed));
+ search_box->connect("gui_input", callable_mp(this, &VisualScriptPropertySelector::_sbox_input));
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
get_ok()->set_text(TTR("Open"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
- search_options->connect("item_activated", this, "_confirmed");
- search_options->connect("cell_selected", this, "_item_selected");
+ search_options->connect("item_activated", callable_mp(this, &VisualScriptPropertySelector::_confirmed));
+ search_options->connect("cell_selected", callable_mp(this, &VisualScriptPropertySelector::_item_selected));
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
virtuals_only = false;
seq_connect = false;
help_bit = memnew(EditorHelpBit);
vbc->add_margin_child(TTR("Description:"), help_bit);
- help_bit->connect("request_hide", this, "_closed");
+ help_bit->connect("request_hide", callable_mp(this, &VisualScriptPropertySelector::_hide_requested));
search_options->set_columns(3);
search_options->set_column_expand(1, false);
search_options->set_column_expand(2, false);
diff --git a/modules/visual_script/visual_script_property_selector.h b/modules/visual_script/visual_script_property_selector.h
index a1eb0b842c..f438ca1f5b 100644
--- a/modules/visual_script/visual_script_property_selector.h
+++ b/modules/visual_script/visual_script_property_selector.h
@@ -41,16 +41,16 @@ class VisualScriptPropertySelector : public ConfirmationDialog {
LineEdit *search_box;
Tree *search_options;
+ void _text_changed(const String &p_newtext);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _update_search();
void create_visualscript_item(const String &name, TreeItem *const root, const String &search_input, const String &text);
-
void get_visual_node_names(const String &root_filter, const Set<String> &p_modifiers, bool &found, TreeItem *const root, LineEdit *const search_box);
- void _sbox_input(const Ref<InputEvent> &p_ie);
-
void _confirmed();
- void _text_changed(const String &p_newtext);
+ void _item_selected();
+ void _hide_requested();
EditorHelpBit *help_bit;
@@ -65,8 +65,6 @@ class VisualScriptPropertySelector : public ConfirmationDialog {
bool virtuals_only;
bool seq_connect;
- void _item_selected();
-
Vector<Variant::Type> type_filter;
protected:
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index 877d5836d2..858074742e 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -99,7 +99,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_RESUME_YIELD) {
return 0; //resuming yield
@@ -109,7 +109,7 @@ public:
SceneTree *tree = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop());
if (!tree) {
r_error_str = "Main Loop is not SceneTree";
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
return 0;
}
@@ -188,7 +188,7 @@ void VisualScriptYield::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_wait_time"), &VisualScriptYield::get_wait_time);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Frame,Physics Frame,Time", PROPERTY_USAGE_NOEDITOR), "set_yield_mode", "get_yield_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time"), "set_wait_time", "get_wait_time");
BIND_ENUM_CONSTANT(YIELD_FRAME);
BIND_ENUM_CONSTANT(YIELD_PHYSICS_FRAME);
@@ -509,7 +509,7 @@ public:
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }
- virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
+ virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
if (p_start_mode == START_MODE_RESUME_YIELD) {
return 0; //resuming yield
@@ -529,14 +529,14 @@ public:
Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
return 0;
}
Node *another = node->get_node(node_path);
if (!another) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
}
@@ -548,7 +548,7 @@ public:
object = *p_inputs[0];
if (!object) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Supplied instance input is null.";
return 0;
}
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 87067faf8e..1e8ee9b17e 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -381,7 +381,7 @@ AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
_clear_stream();
}
-RES ResourceFormatLoaderAudioStreamOGGVorbis::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderAudioStreamOGGVorbis::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = OK;
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 739765a12f..db621f88d2 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -128,7 +128,7 @@ public:
class ResourceFormatLoaderAudioStreamOGGVorbis : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 54d34a48c5..265383831e 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -315,12 +315,12 @@ void VideoStreamPlaybackWebm::update(float p_delta) {
if (err == VPXDecoder::NO_ERROR && image.w == webm->getWidth() && image.h == webm->getHeight()) {
- PoolVector<uint8_t>::Write w = frame_data.write();
+ uint8_t *w = frame_data.ptrw();
bool converted = false;
if (image.chromaShiftW == 0 && image.chromaShiftH == 0 && image.cs == VPX_CS_SRGB) {
- uint8_t *wp = w.ptr();
+ uint8_t *wp = w;
unsigned char *rRow = image.planes[2];
unsigned char *gRow = image.planes[0];
unsigned char *bRow = image.planes[1];
@@ -338,17 +338,17 @@ void VideoStreamPlaybackWebm::update(float p_delta) {
converted = true;
} else if (image.chromaShiftW == 1 && image.chromaShiftH == 1) {
- yuv420_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
+ yuv420_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
//libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 1 && image.chromaShiftH == 0) {
- yuv422_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
+ yuv422_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
//libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 0 && image.chromaShiftH == 0) {
- yuv444_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
+ yuv444_2_rgb8888(w, image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
//libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 2 && image.chromaShiftH == 0) {
@@ -474,7 +474,7 @@ void VideoStreamWebm::set_audio_track(int p_track) {
////////////
-RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index f2a68dd701..3feaa1278f 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -61,7 +61,7 @@ class VideoStreamPlaybackWebm : public VideoStreamPlayback {
double delay_compensation;
double time, video_frame_delay, video_pos;
- PoolVector<uint8_t> frame_data;
+ Vector<uint8_t> frame_data;
Ref<ImageTexture> texture;
float *pcm;
@@ -128,7 +128,7 @@ public:
class ResourceFormatLoaderWebm : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp
index 7f4afa9a08..09a8985472 100644
--- a/modules/webp/image_loader_webp.cpp
+++ b/modules/webp/image_loader_webp.cpp
@@ -38,9 +38,9 @@
#include <webp/decode.h>
#include <webp/encode.h>
-static PoolVector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) {
+static Vector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) {
- ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), Vector<uint8_t>());
Ref<Image> img = p_image->duplicate();
if (img->detect_alpha())
@@ -49,37 +49,37 @@ static PoolVector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_q
img->convert(Image::FORMAT_RGB8);
Size2 s(img->get_width(), img->get_height());
- PoolVector<uint8_t> data = img->get_data();
- PoolVector<uint8_t>::Read r = data.read();
+ Vector<uint8_t> data = img->get_data();
+ const uint8_t *r = data.ptr();
uint8_t *dst_buff = NULL;
size_t dst_size = 0;
if (img->get_format() == Image::FORMAT_RGB8) {
- dst_size = WebPEncodeRGB(r.ptr(), s.width, s.height, 3 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff);
+ dst_size = WebPEncodeRGB(r, s.width, s.height, 3 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff);
} else {
- dst_size = WebPEncodeRGBA(r.ptr(), s.width, s.height, 4 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff);
+ dst_size = WebPEncodeRGBA(r, s.width, s.height, 4 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff);
}
- ERR_FAIL_COND_V(dst_size == 0, PoolVector<uint8_t>());
- PoolVector<uint8_t> dst;
+ ERR_FAIL_COND_V(dst_size == 0, Vector<uint8_t>());
+ Vector<uint8_t> dst;
dst.resize(4 + dst_size);
- PoolVector<uint8_t>::Write w = dst.write();
+ uint8_t *w = dst.ptrw();
w[0] = 'W';
w[1] = 'E';
w[2] = 'B';
w[3] = 'P';
copymem(&w[4], dst_buff, dst_size);
free(dst_buff);
- w.release();
+
return dst;
}
-static Ref<Image> _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) {
+static Ref<Image> _webp_lossy_unpack(const Vector<uint8_t> &p_buffer) {
int size = p_buffer.size() - 4;
ERR_FAIL_COND_V(size <= 0, Ref<Image>());
- PoolVector<uint8_t>::Read r = p_buffer.read();
+ const uint8_t *r = p_buffer.ptr();
ERR_FAIL_COND_V(r[0] != 'W' || r[1] != 'E' || r[2] != 'B' || r[3] != 'P', Ref<Image>());
WebPBitstreamFeatures features;
@@ -93,23 +93,21 @@ static Ref<Image> _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) {
print_line("alpha: "+itos(features.has_alpha));
*/
- PoolVector<uint8_t> dst_image;
+ Vector<uint8_t> dst_image;
int datasize = features.width * features.height * (features.has_alpha ? 4 : 3);
dst_image.resize(datasize);
- PoolVector<uint8_t>::Write dst_w = dst_image.write();
+ uint8_t *dst_w = dst_image.ptrw();
bool errdec = false;
if (features.has_alpha) {
- errdec = WebPDecodeRGBAInto(&r[4], size, dst_w.ptr(), datasize, 4 * features.width) == NULL;
+ errdec = WebPDecodeRGBAInto(&r[4], size, dst_w, datasize, 4 * features.width) == NULL;
} else {
- errdec = WebPDecodeRGBInto(&r[4], size, dst_w.ptr(), datasize, 3 * features.width) == NULL;
+ errdec = WebPDecodeRGBInto(&r[4], size, dst_w, datasize, 3 * features.width) == NULL;
}
ERR_FAIL_COND_V_MSG(errdec, Ref<Image>(), "Failed decoding WebP image.");
- dst_w.release();
-
Ref<Image> img = memnew(Image(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image));
return img;
}
@@ -123,18 +121,17 @@ Error webp_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
- PoolVector<uint8_t> dst_image;
+ Vector<uint8_t> dst_image;
int datasize = features.width * features.height * (features.has_alpha ? 4 : 3);
dst_image.resize(datasize);
- PoolVector<uint8_t>::Write dst_w = dst_image.write();
+ uint8_t *dst_w = dst_image.ptrw();
bool errdec = false;
if (features.has_alpha) {
- errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w.ptr(), datasize, 4 * features.width) == NULL;
+ errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w, datasize, 4 * features.width) == NULL;
} else {
- errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w.ptr(), datasize, 3 * features.width) == NULL;
+ errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w, datasize, 3 * features.width) == NULL;
}
- dst_w.release();
ERR_FAIL_COND_V_MSG(errdec, ERR_FILE_CORRUPT, "Failed decoding WebP image.");
@@ -154,18 +151,18 @@ static Ref<Image> _webp_mem_loader_func(const uint8_t *p_png, int p_size) {
Error ImageLoaderWEBP::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
- PoolVector<uint8_t> src_image;
+ Vector<uint8_t> src_image;
int src_image_len = f->get_len();
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
src_image.resize(src_image_len);
- PoolVector<uint8_t>::Write w = src_image.write();
+ uint8_t *w = src_image.ptrw();
f->get_buffer(&w[0], src_image_len);
f->close();
- Error err = webp_load_image_from_buffer(p_image.ptr(), w.ptr(), src_image_len);
+ Error err = webp_load_image_from_buffer(p_image.ptr(), w, src_image_len);
return err;
}
diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml
index 2549321db3..45db49c913 100644
--- a/modules/websocket/doc_classes/WebSocketClient.xml
+++ b/modules/websocket/doc_classes/WebSocketClient.xml
@@ -17,11 +17,11 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="protocols" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<argument index="2" name="gd_mp_api" type="bool" default="false">
</argument>
- <argument index="3" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="3" name="custom_headers" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<description>
Connects to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. If the list empty (default), no sub-protocol will be requested.
diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml
index f66e1bf54b..f7805209e2 100644
--- a/modules/websocket/doc_classes/WebSocketServer.xml
+++ b/modules/websocket/doc_classes/WebSocketServer.xml
@@ -63,7 +63,7 @@
</return>
<argument index="0" name="port" type="int">
</argument>
- <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )">
+ <argument index="1" name="protocols" type="PackedStringArray" default="PackedStringArray( )">
</argument>
<argument index="2" name="gd_mp_api" type="bool" default="false">
</argument>
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp
index 588f38cffd..f396a1c812 100644
--- a/modules/websocket/emws_peer.cpp
+++ b/modules/websocket/emws_peer.cpp
@@ -90,7 +90,7 @@ Error EMWSPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
if (_in_buffer.packets_left() == 0)
return ERR_UNAVAILABLE;
- PoolVector<uint8_t>::Write rw = _packet_buffer.write();
+ uint8_t *rw = _packet_buffer.ptrw();
int read = 0;
Error err = _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read);
ERR_FAIL_COND_V(err != OK, err);
diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h
index 43b42f9be6..6308ebe490 100644
--- a/modules/websocket/emws_peer.h
+++ b/modules/websocket/emws_peer.h
@@ -48,7 +48,7 @@ private:
int peer_sock;
WriteMode write_mode;
- PoolVector<uint8_t> _packet_buffer;
+ Vector<uint8_t> _packet_buffer;
PacketBuffer<uint8_t> _in_buffer;
uint8_t _is_string;
diff --git a/modules/websocket/emws_server.cpp b/modules/websocket/emws_server.cpp
index 23faa05365..8ceefa42b6 100644
--- a/modules/websocket/emws_server.cpp
+++ b/modules/websocket/emws_server.cpp
@@ -53,8 +53,8 @@ Ref<WebSocketPeer> EMWSServer::get_peer(int p_id) const {
return NULL;
}
-PoolVector<String> EMWSServer::get_protocols() const {
- PoolVector<String> out;
+Vector<String> EMWSServer::get_protocols() const {
+ Vector<String> out;
return out;
}
diff --git a/modules/websocket/emws_server.h b/modules/websocket/emws_server.h
index 869e59fe03..f273fd078f 100644
--- a/modules/websocket/emws_server.h
+++ b/modules/websocket/emws_server.h
@@ -53,7 +53,7 @@ public:
void disconnect_peer(int p_peer_id, int p_code = 1000, String p_reason = "");
int get_max_packet_size() const;
virtual void poll();
- virtual PoolVector<String> get_protocols() const;
+ virtual Vector<String> get_protocols() const;
EMWSServer();
~EMWSServer();
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 27ea50b524..5c01d44ede 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -127,12 +127,12 @@ Error WebSocketMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer
ERR_FAIL_COND_V_MSG(!_is_multiplayer, ERR_UNCONFIGURED, "Please use get_peer(ID).put_packet/var to communicate with peers when not using the MultiplayerAPI.");
- PoolVector<uint8_t> buffer = _make_pkt(SYS_NONE, get_unique_id(), _target_peer, p_buffer, p_buffer_size);
+ Vector<uint8_t> buffer = _make_pkt(SYS_NONE, get_unique_id(), _target_peer, p_buffer, p_buffer_size);
if (is_server()) {
- return _server_relay(1, _target_peer, &(buffer.read()[0]), buffer.size());
+ return _server_relay(1, _target_peer, &(buffer.ptr()[0]), buffer.size());
} else {
- return get_peer(1)->put_packet(&(buffer.read()[0]), buffer.size());
+ return get_peer(1)->put_packet(&(buffer.ptr()[0]), buffer.size());
}
}
@@ -183,16 +183,16 @@ void WebSocketMultiplayerPeer::_send_sys(Ref<WebSocketPeer> p_peer, uint8_t p_ty
ERR_FAIL_COND(!p_peer.is_valid());
ERR_FAIL_COND(!p_peer->is_connected_to_host());
- PoolVector<uint8_t> message = _make_pkt(p_type, 1, 0, (uint8_t *)&p_peer_id, 4);
- p_peer->put_packet(&(message.read()[0]), message.size());
+ Vector<uint8_t> message = _make_pkt(p_type, 1, 0, (uint8_t *)&p_peer_id, 4);
+ p_peer->put_packet(&(message.ptr()[0]), message.size());
}
-PoolVector<uint8_t> WebSocketMultiplayerPeer::_make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size) {
+Vector<uint8_t> WebSocketMultiplayerPeer::_make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size) {
- PoolVector<uint8_t> out;
+ Vector<uint8_t> out;
out.resize(PROTO_SIZE + p_data_size);
- PoolVector<uint8_t>::Write w = out.write();
+ uint8_t *w = out.ptrw();
copymem(&w[0], &p_type, 1);
copymem(&w[1], &p_from, 4);
copymem(&w[5], &p_to, 4);
diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h
index 27cb6e4eb7..579972ada2 100644
--- a/modules/websocket/websocket_multiplayer_peer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -41,7 +41,7 @@ class WebSocketMultiplayerPeer : public NetworkedMultiplayerPeer {
GDCLASS(WebSocketMultiplayerPeer, NetworkedMultiplayerPeer);
private:
- PoolVector<uint8_t> _make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size);
+ Vector<uint8_t> _make_pkt(uint8_t p_type, int32_t p_from, int32_t p_to, const uint8_t *p_data, uint32_t p_data_size);
void _store_pkt(int32_t p_source, int32_t p_dest, const uint8_t *p_data, uint32_t p_data_size);
Error _server_relay(int32_t p_from, int32_t p_to, const uint8_t *p_buffer, uint32_t p_buffer_size);
diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp
index 08079145e4..ff32e83dc1 100644
--- a/modules/websocket/wsl_peer.cpp
+++ b/modules/websocket/wsl_peer.cpp
@@ -43,10 +43,10 @@ String WSLPeer::generate_key() {
// Random key
RandomNumberGenerator rng;
rng.set_seed(OS::get_singleton()->get_unix_time());
- PoolVector<uint8_t> bkey;
+ Vector<uint8_t> bkey;
int len = 16; // 16 bytes, as per RFC
bkey.resize(len);
- PoolVector<uint8_t>::Write w = bkey.write();
+ uint8_t *w = bkey.ptrw();
for (int i = 0; i < len; i++) {
w[i] = (uint8_t)rng.randi_range(0, 255);
}
@@ -260,10 +260,10 @@ Error WSLPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
return ERR_UNAVAILABLE;
int read = 0;
- PoolVector<uint8_t>::Write rw = _packet_buffer.write();
- _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read);
+ uint8_t *rw = _packet_buffer.ptrw();
+ _in_buffer.read_packet(rw, _packet_buffer.size(), &_is_string, read);
- *r_buffer = rw.ptr();
+ *r_buffer = rw;
r_buffer_size = read;
return OK;
diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h
index f1c45ee859..00549cd9bc 100644
--- a/modules/websocket/wsl_peer.h
+++ b/modules/websocket/wsl_peer.h
@@ -86,7 +86,7 @@ private:
// Our packet info is just a boolean (is_string), using uint8_t for it.
PacketBuffer<uint8_t> _in_buffer;
- PoolVector<uint8_t> _packet_buffer;
+ Vector<uint8_t> _packet_buffer;
WriteMode write_mode;
diff --git a/platform/android/SCsub b/platform/android/SCsub
index fd2a774c71..46f0703a65 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -18,6 +18,10 @@ android_files = [
'java_class_wrapper.cpp',
'java_godot_wrapper.cpp',
'java_godot_io_wrapper.cpp',
+ 'jni_utils.cpp',
+ 'android_keys_utils.cpp',
+ 'vulkan/vk_renderer_jni.cpp',
+ 'plugin/godot_plugin_jni.cpp'
]
env_android = env.Clone()
diff --git a/core/os/thread_safe.cpp b/platform/android/android_keys_utils.cpp
index d8d783ae16..88874ba2c7 100644
--- a/core/os/thread_safe.cpp
+++ b/platform/android/android_keys_utils.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* thread_safe.cpp */
+/* android_keys_utils.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,22 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "thread_safe.h"
+#include "android_keys_utils.h"
-#include "core/error_macros.h"
-#include "core/os/memory.h"
+unsigned int android_get_keysym(unsigned int p_code) {
+ for (int i = 0; _ak_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
-ThreadSafe::ThreadSafe() {
+ if (_ak_to_keycode[i].keycode == p_code) {
- mutex = Mutex::create();
- if (!mutex) {
-
- WARN_PRINT("THREAD_SAFE defined, but no default mutex type");
+ return _ak_to_keycode[i].keysym;
+ }
}
-}
-
-ThreadSafe::~ThreadSafe() {
- if (mutex)
- memdelete(mutex);
+ return KEY_UNKNOWN;
}
diff --git a/platform/android/android_keys_utils.h b/platform/android/android_keys_utils.h
new file mode 100644
index 0000000000..f076688ac8
--- /dev/null
+++ b/platform/android/android_keys_utils.h
@@ -0,0 +1,280 @@
+/*************************************************************************/
+/* android_keys_utils.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 ANDROID_KEYS_UTILS_H
+#define ANDROID_KEYS_UTILS_H
+
+#include <core/os/keyboard.h>
+
+/*
+ * Android Key codes.
+ */
+enum {
+ AKEYCODE_UNKNOWN = 0,
+ AKEYCODE_SOFT_LEFT = 1,
+ AKEYCODE_SOFT_RIGHT = 2,
+ AKEYCODE_HOME = 3,
+ AKEYCODE_BACK = 4,
+ AKEYCODE_CALL = 5,
+ AKEYCODE_ENDCALL = 6,
+ AKEYCODE_0 = 7,
+ AKEYCODE_1 = 8,
+ AKEYCODE_2 = 9,
+ AKEYCODE_3 = 10,
+ AKEYCODE_4 = 11,
+ AKEYCODE_5 = 12,
+ AKEYCODE_6 = 13,
+ AKEYCODE_7 = 14,
+ AKEYCODE_8 = 15,
+ AKEYCODE_9 = 16,
+ AKEYCODE_STAR = 17,
+ AKEYCODE_POUND = 18,
+ AKEYCODE_DPAD_UP = 19,
+ AKEYCODE_DPAD_DOWN = 20,
+ AKEYCODE_DPAD_LEFT = 21,
+ AKEYCODE_DPAD_RIGHT = 22,
+ AKEYCODE_DPAD_CENTER = 23,
+ AKEYCODE_VOLUME_UP = 24,
+ AKEYCODE_VOLUME_DOWN = 25,
+ AKEYCODE_POWER = 26,
+ AKEYCODE_CAMERA = 27,
+ AKEYCODE_CLEAR = 28,
+ AKEYCODE_A = 29,
+ AKEYCODE_B = 30,
+ AKEYCODE_C = 31,
+ AKEYCODE_D = 32,
+ AKEYCODE_E = 33,
+ AKEYCODE_F = 34,
+ AKEYCODE_G = 35,
+ AKEYCODE_H = 36,
+ AKEYCODE_I = 37,
+ AKEYCODE_J = 38,
+ AKEYCODE_K = 39,
+ AKEYCODE_L = 40,
+ AKEYCODE_M = 41,
+ AKEYCODE_N = 42,
+ AKEYCODE_O = 43,
+ AKEYCODE_P = 44,
+ AKEYCODE_Q = 45,
+ AKEYCODE_R = 46,
+ AKEYCODE_S = 47,
+ AKEYCODE_T = 48,
+ AKEYCODE_U = 49,
+ AKEYCODE_V = 50,
+ AKEYCODE_W = 51,
+ AKEYCODE_X = 52,
+ AKEYCODE_Y = 53,
+ AKEYCODE_Z = 54,
+ AKEYCODE_COMMA = 55,
+ AKEYCODE_PERIOD = 56,
+ AKEYCODE_ALT_LEFT = 57,
+ AKEYCODE_ALT_RIGHT = 58,
+ AKEYCODE_SHIFT_LEFT = 59,
+ AKEYCODE_SHIFT_RIGHT = 60,
+ AKEYCODE_TAB = 61,
+ AKEYCODE_SPACE = 62,
+ AKEYCODE_SYM = 63,
+ AKEYCODE_EXPLORER = 64,
+ AKEYCODE_ENVELOPE = 65,
+ AKEYCODE_ENTER = 66,
+ AKEYCODE_DEL = 67,
+ AKEYCODE_GRAVE = 68,
+ AKEYCODE_MINUS = 69,
+ AKEYCODE_EQUALS = 70,
+ AKEYCODE_LEFT_BRACKET = 71,
+ AKEYCODE_RIGHT_BRACKET = 72,
+ AKEYCODE_BACKSLASH = 73,
+ AKEYCODE_SEMICOLON = 74,
+ AKEYCODE_APOSTROPHE = 75,
+ AKEYCODE_SLASH = 76,
+ AKEYCODE_AT = 77,
+ AKEYCODE_NUM = 78,
+ AKEYCODE_HEADSETHOOK = 79,
+ AKEYCODE_FOCUS = 80, // *Camera* focus
+ AKEYCODE_PLUS = 81,
+ AKEYCODE_MENU = 82,
+ AKEYCODE_NOTIFICATION = 83,
+ AKEYCODE_SEARCH = 84,
+ AKEYCODE_MEDIA_PLAY_PAUSE = 85,
+ AKEYCODE_MEDIA_STOP = 86,
+ AKEYCODE_MEDIA_NEXT = 87,
+ AKEYCODE_MEDIA_PREVIOUS = 88,
+ AKEYCODE_MEDIA_REWIND = 89,
+ AKEYCODE_MEDIA_FAST_FORWARD = 90,
+ AKEYCODE_MUTE = 91,
+ AKEYCODE_PAGE_UP = 92,
+ AKEYCODE_PAGE_DOWN = 93,
+ AKEYCODE_PICTSYMBOLS = 94,
+ AKEYCODE_SWITCH_CHARSET = 95,
+ AKEYCODE_BUTTON_A = 96,
+ AKEYCODE_BUTTON_B = 97,
+ AKEYCODE_BUTTON_C = 98,
+ AKEYCODE_BUTTON_X = 99,
+ AKEYCODE_BUTTON_Y = 100,
+ AKEYCODE_BUTTON_Z = 101,
+ AKEYCODE_BUTTON_L1 = 102,
+ AKEYCODE_BUTTON_R1 = 103,
+ AKEYCODE_BUTTON_L2 = 104,
+ AKEYCODE_BUTTON_R2 = 105,
+ AKEYCODE_BUTTON_THUMBL = 106,
+ AKEYCODE_BUTTON_THUMBR = 107,
+ AKEYCODE_BUTTON_START = 108,
+ AKEYCODE_BUTTON_SELECT = 109,
+ AKEYCODE_BUTTON_MODE = 110,
+
+ // NOTE: If you add a new keycode here you must also add it to several other files.
+ // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+};
+
+struct _WinTranslatePair {
+
+ unsigned int keysym;
+ unsigned int keycode;
+};
+
+static _WinTranslatePair _ak_to_keycode[] = {
+ { KEY_TAB, AKEYCODE_TAB },
+ { KEY_ENTER, AKEYCODE_ENTER },
+ { KEY_SHIFT, AKEYCODE_SHIFT_LEFT },
+ { KEY_SHIFT, AKEYCODE_SHIFT_RIGHT },
+ { KEY_ALT, AKEYCODE_ALT_LEFT },
+ { KEY_ALT, AKEYCODE_ALT_RIGHT },
+ { KEY_MENU, AKEYCODE_MENU },
+ { KEY_PAUSE, AKEYCODE_MEDIA_PLAY_PAUSE },
+ { KEY_ESCAPE, AKEYCODE_BACK },
+ { KEY_SPACE, AKEYCODE_SPACE },
+ { KEY_PAGEUP, AKEYCODE_PAGE_UP },
+ { KEY_PAGEDOWN, AKEYCODE_PAGE_DOWN },
+ { KEY_HOME, AKEYCODE_HOME }, //(0x24)
+ { KEY_LEFT, AKEYCODE_DPAD_LEFT },
+ { KEY_UP, AKEYCODE_DPAD_UP },
+ { KEY_RIGHT, AKEYCODE_DPAD_RIGHT },
+ { KEY_DOWN, AKEYCODE_DPAD_DOWN },
+ { KEY_PERIODCENTERED, AKEYCODE_DPAD_CENTER },
+ { KEY_BACKSPACE, AKEYCODE_DEL },
+ { KEY_0, AKEYCODE_0 }, ////0 key
+ { KEY_1, AKEYCODE_1 }, ////1 key
+ { KEY_2, AKEYCODE_2 }, ////2 key
+ { KEY_3, AKEYCODE_3 }, ////3 key
+ { KEY_4, AKEYCODE_4 }, ////4 key
+ { KEY_5, AKEYCODE_5 }, ////5 key
+ { KEY_6, AKEYCODE_6 }, ////6 key
+ { KEY_7, AKEYCODE_7 }, ////7 key
+ { KEY_8, AKEYCODE_8 }, ////8 key
+ { KEY_9, AKEYCODE_9 }, ////9 key
+ { KEY_A, AKEYCODE_A }, ////A key
+ { KEY_B, AKEYCODE_B }, ////B key
+ { KEY_C, AKEYCODE_C }, ////C key
+ { KEY_D, AKEYCODE_D }, ////D key
+ { KEY_E, AKEYCODE_E }, ////E key
+ { KEY_F, AKEYCODE_F }, ////F key
+ { KEY_G, AKEYCODE_G }, ////G key
+ { KEY_H, AKEYCODE_H }, ////H key
+ { KEY_I, AKEYCODE_I }, ////I key
+ { KEY_J, AKEYCODE_J }, ////J key
+ { KEY_K, AKEYCODE_K }, ////K key
+ { KEY_L, AKEYCODE_L }, ////L key
+ { KEY_M, AKEYCODE_M }, ////M key
+ { KEY_N, AKEYCODE_N }, ////N key
+ { KEY_O, AKEYCODE_O }, ////O key
+ { KEY_P, AKEYCODE_P }, ////P key
+ { KEY_Q, AKEYCODE_Q }, ////Q key
+ { KEY_R, AKEYCODE_R }, ////R key
+ { KEY_S, AKEYCODE_S }, ////S key
+ { KEY_T, AKEYCODE_T }, ////T key
+ { KEY_U, AKEYCODE_U }, ////U key
+ { KEY_V, AKEYCODE_V }, ////V key
+ { KEY_W, AKEYCODE_W }, ////W key
+ { KEY_X, AKEYCODE_X }, ////X key
+ { KEY_Y, AKEYCODE_Y }, ////Y key
+ { KEY_Z, AKEYCODE_Z }, ////Z key
+ { KEY_HOMEPAGE, AKEYCODE_EXPLORER },
+ { KEY_LAUNCH0, AKEYCODE_BUTTON_A },
+ { KEY_LAUNCH1, AKEYCODE_BUTTON_B },
+ { KEY_LAUNCH2, AKEYCODE_BUTTON_C },
+ { KEY_LAUNCH3, AKEYCODE_BUTTON_X },
+ { KEY_LAUNCH4, AKEYCODE_BUTTON_Y },
+ { KEY_LAUNCH5, AKEYCODE_BUTTON_Z },
+ { KEY_LAUNCH6, AKEYCODE_BUTTON_L1 },
+ { KEY_LAUNCH7, AKEYCODE_BUTTON_R1 },
+ { KEY_LAUNCH8, AKEYCODE_BUTTON_L2 },
+ { KEY_LAUNCH9, AKEYCODE_BUTTON_R2 },
+ { KEY_LAUNCHA, AKEYCODE_BUTTON_THUMBL },
+ { KEY_LAUNCHB, AKEYCODE_BUTTON_THUMBR },
+ { KEY_LAUNCHC, AKEYCODE_BUTTON_START },
+ { KEY_LAUNCHD, AKEYCODE_BUTTON_SELECT },
+ { KEY_LAUNCHE, AKEYCODE_BUTTON_MODE },
+ { KEY_VOLUMEMUTE, AKEYCODE_MUTE },
+ { KEY_VOLUMEDOWN, AKEYCODE_VOLUME_DOWN },
+ { KEY_VOLUMEUP, AKEYCODE_VOLUME_UP },
+ { KEY_BACK, AKEYCODE_MEDIA_REWIND },
+ { KEY_FORWARD, AKEYCODE_MEDIA_FAST_FORWARD },
+ { KEY_MEDIANEXT, AKEYCODE_MEDIA_NEXT },
+ { KEY_MEDIAPREVIOUS, AKEYCODE_MEDIA_PREVIOUS },
+ { KEY_MEDIASTOP, AKEYCODE_MEDIA_STOP },
+ { KEY_PLUS, AKEYCODE_PLUS },
+ { KEY_EQUAL, AKEYCODE_EQUALS }, // the '+' key
+ { KEY_COMMA, AKEYCODE_COMMA }, // the ',' key
+ { KEY_MINUS, AKEYCODE_MINUS }, // the '-' key
+ { KEY_SLASH, AKEYCODE_SLASH }, // the '/?' key
+ { KEY_BACKSLASH, AKEYCODE_BACKSLASH },
+ { KEY_BRACKETLEFT, AKEYCODE_LEFT_BRACKET },
+ { KEY_BRACKETRIGHT, AKEYCODE_RIGHT_BRACKET },
+ { KEY_UNKNOWN, 0 }
+};
+/*
+TODO: map these android key:
+ AKEYCODE_SOFT_LEFT = 1,
+ AKEYCODE_SOFT_RIGHT = 2,
+ AKEYCODE_CALL = 5,
+ AKEYCODE_ENDCALL = 6,
+ AKEYCODE_STAR = 17,
+ AKEYCODE_POUND = 18,
+ AKEYCODE_POWER = 26,
+ AKEYCODE_CAMERA = 27,
+ AKEYCODE_CLEAR = 28,
+ AKEYCODE_SYM = 63,
+ AKEYCODE_ENVELOPE = 65,
+ AKEYCODE_GRAVE = 68,
+ AKEYCODE_SEMICOLON = 74,
+ AKEYCODE_APOSTROPHE = 75,
+ AKEYCODE_AT = 77,
+ AKEYCODE_NUM = 78,
+ AKEYCODE_HEADSETHOOK = 79,
+ AKEYCODE_FOCUS = 80, // *Camera* focus
+ AKEYCODE_NOTIFICATION = 83,
+ AKEYCODE_SEARCH = 84,
+ AKEYCODE_PICTSYMBOLS = 94,
+ AKEYCODE_SWITCH_CHARSET = 95,
+*/
+
+unsigned int android_get_keysym(unsigned int p_code);
+
+#endif // ANDROID_KEYS_UTILS_H
diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp
index 2146c5409b..7efb545524 100644
--- a/platform/android/api/api.cpp
+++ b/platform/android/api/api.cpp
@@ -62,14 +62,14 @@ void JavaClassWrapper::_bind_methods() {
#if !defined(ANDROID_ENABLED)
-Variant JavaClass::call(const StringName &, const Variant **, int, Variant::CallError &) {
+Variant JavaClass::call(const StringName &, const Variant **, int, Callable::CallError &) {
return Variant();
}
JavaClass::JavaClass() {
}
-Variant JavaObject::call(const StringName &, const Variant **, int, Variant::CallError &) {
+Variant JavaObject::call(const StringName &, const Variant **, int, Callable::CallError &) {
return Variant();
}
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index 6c06d57ac1..48b581958b 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -113,12 +113,12 @@ class JavaClass : public Reference {
break;
case ARG_TYPE_FLOAT | ARG_NUMBER_CLASS_BIT:
case ARG_TYPE_FLOAT:
- r_type = Variant::REAL;
+ r_type = Variant::FLOAT;
likelihood = 1.0;
break;
case ARG_TYPE_DOUBLE | ARG_NUMBER_CLASS_BIT:
case ARG_TYPE_DOUBLE:
- r_type = Variant::REAL;
+ r_type = Variant::FLOAT;
likelihood = 0.5;
break;
case ARG_TYPE_STRING: r_type = Variant::STRING; break;
@@ -126,41 +126,41 @@ class JavaClass : public Reference {
case ARG_ARRAY_BIT | ARG_TYPE_VOID: r_type = Variant::NIL; break;
case ARG_ARRAY_BIT | ARG_TYPE_BOOLEAN: r_type = Variant::ARRAY; break;
case ARG_ARRAY_BIT | ARG_TYPE_BYTE:
- r_type = Variant::POOL_BYTE_ARRAY;
+ r_type = Variant::PACKED_BYTE_ARRAY;
likelihood = 1.0;
break;
case ARG_ARRAY_BIT | ARG_TYPE_CHAR:
- r_type = Variant::POOL_BYTE_ARRAY;
+ r_type = Variant::PACKED_BYTE_ARRAY;
likelihood = 0.5;
break;
case ARG_ARRAY_BIT | ARG_TYPE_SHORT:
- r_type = Variant::POOL_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 0.3;
break;
case ARG_ARRAY_BIT | ARG_TYPE_INT:
- r_type = Variant::POOL_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 1.0;
break;
case ARG_ARRAY_BIT | ARG_TYPE_LONG:
- r_type = Variant::POOL_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 0.5;
break;
case ARG_ARRAY_BIT | ARG_TYPE_FLOAT:
- r_type = Variant::POOL_REAL_ARRAY;
+ r_type = Variant::PACKED_FLOAT32_ARRAY;
likelihood = 1.0;
break;
case ARG_ARRAY_BIT | ARG_TYPE_DOUBLE:
- r_type = Variant::POOL_REAL_ARRAY;
+ r_type = Variant::PACKED_FLOAT32_ARRAY;
likelihood = 0.5;
break;
- case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::POOL_STRING_ARRAY; break;
+ case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::PACKED_STRING_ARRAY; break;
case ARG_ARRAY_BIT | ARG_TYPE_CLASS: r_type = Variant::ARRAY; break;
}
}
_FORCE_INLINE_ static bool _convert_object_to_variant(JNIEnv *env, jobject obj, Variant &var, uint32_t p_sig);
- bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error, Variant &ret);
+ bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret);
friend class JavaClassWrapper;
Map<StringName, List<MethodInfo> > methods;
@@ -168,7 +168,7 @@ class JavaClass : public Reference {
#endif
public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
JavaClass();
};
@@ -185,7 +185,7 @@ class JavaObject : public Reference {
#endif
public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
#ifdef ANDROID_ENABLED
JavaObject(const Ref<JavaClass> &p_base, jobject *p_instance);
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index 5a8e3b94da..e94dad9ac6 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -48,7 +48,7 @@ int AudioDriverAndroid::mix_rate = 44100;
bool AudioDriverAndroid::quit = false;
jobject AudioDriverAndroid::audioBuffer = NULL;
void *AudioDriverAndroid::audioBufferPinned = NULL;
-Mutex *AudioDriverAndroid::mutex = NULL;
+Mutex AudioDriverAndroid::mutex;
int32_t *AudioDriverAndroid::audioBuffer32 = NULL;
const char *AudioDriverAndroid::get_name() const {
@@ -58,7 +58,6 @@ const char *AudioDriverAndroid::get_name() const {
Error AudioDriverAndroid::init() {
- mutex = Mutex::create();
/*
// TODO: pass in/return a (Java) device ID, also whether we're opening for input or output
this->spec.samples = Android_JNI_OpenAudioDevice(this->spec.freq, this->spec.format == AUDIO_U8 ? 0 : 1, this->spec.channels, this->spec.samples);
@@ -133,7 +132,7 @@ void AudioDriverAndroid::thread_func(JNIEnv *env) {
int16_t *ptr = (int16_t *)audioBufferPinned;
int fc = audioBufferFrames;
- if (!s_ad->active || mutex->try_lock() != OK) {
+ if (!s_ad->active || mutex.try_lock() != OK) {
for (int i = 0; i < fc; i++) {
ptr[i] = 0;
@@ -143,7 +142,7 @@ void AudioDriverAndroid::thread_func(JNIEnv *env) {
s_ad->audio_server_process(fc / 2, audioBuffer32);
- mutex->unlock();
+ mutex.unlock();
for (int i = 0; i < fc; i++) {
@@ -167,14 +166,12 @@ AudioDriver::SpeakerMode AudioDriverAndroid::get_speaker_mode() const {
void AudioDriverAndroid::lock() {
- if (mutex)
- mutex->lock();
+ mutex.lock();
}
void AudioDriverAndroid::unlock() {
- if (mutex)
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverAndroid::finish() {
diff --git a/platform/android/audio_driver_jandroid.h b/platform/android/audio_driver_jandroid.h
index d3d1641c20..b1cc3f9aa0 100644
--- a/platform/android/audio_driver_jandroid.h
+++ b/platform/android/audio_driver_jandroid.h
@@ -37,7 +37,7 @@
class AudioDriverAndroid : public AudioDriver {
- static Mutex *mutex;
+ static Mutex mutex;
static AudioDriverAndroid *s_ad;
static jobject io;
static jmethodID _init_audio;
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index 6e9864c803..222120f81f 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -44,8 +44,8 @@ void AudioDriverOpenSL::_buffer_callback(
if (pause) {
mix = false;
- } else if (mutex) {
- mix = mutex->try_lock() == OK;
+ } else {
+ mix = mutex.try_lock() == OK;
}
if (mix) {
@@ -58,8 +58,8 @@ void AudioDriverOpenSL::_buffer_callback(
}
}
- if (mutex && mix)
- mutex->unlock();
+ if (mix)
+ mutex.unlock();
const int32_t *src_buff = mixdown_buffer;
@@ -107,7 +107,6 @@ Error AudioDriverOpenSL::init() {
void AudioDriverOpenSL::start() {
- mutex = Mutex::create();
active = false;
SLresult res;
@@ -329,14 +328,14 @@ AudioDriver::SpeakerMode AudioDriverOpenSL::get_speaker_mode() const {
void AudioDriverOpenSL::lock() {
- if (active && mutex)
- mutex->lock();
+ if (active)
+ mutex.lock();
}
void AudioDriverOpenSL::unlock() {
- if (active && mutex)
- mutex->unlock();
+ if (active)
+ mutex.unlock();
}
void AudioDriverOpenSL::finish() {
@@ -359,7 +358,6 @@ void AudioDriverOpenSL::set_pause(bool p_pause) {
AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
- mutex = Mutex::create(); //NULL;
pause = false;
active = false;
}
diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h
index 57d9b30af6..569e2aa54b 100644
--- a/platform/android/audio_driver_opensl.h
+++ b/platform/android/audio_driver_opensl.h
@@ -40,7 +40,7 @@
class AudioDriverOpenSL : public AudioDriver {
bool active;
- Mutex *mutex;
+ Mutex mutex;
enum {
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 8b62360888..8f74ae0ef0 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -205,7 +205,6 @@ def configure(env):
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"])
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
- env.Append(CXXFLAGS=["-std=gnu++14"])
# Disable exceptions and rtti on non-tools (template) builds
if env['tools']:
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index f52b511522..ebcac884db 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -144,7 +144,7 @@ Error DirAccessJAndroid::change_dir(String p_dir) {
return OK;
}
-String DirAccessJAndroid::get_current_dir() {
+String DirAccessJAndroid::get_current_dir(bool p_include_drive) {
return "res://" + current_dir;
}
diff --git a/platform/android/dir_access_jandroid.h b/platform/android/dir_access_jandroid.h
index caeb4b58b9..8dab3e50ce 100644
--- a/platform/android/dir_access_jandroid.h
+++ b/platform/android/dir_access_jandroid.h
@@ -65,7 +65,7 @@ public:
virtual String get_drive(int p_drive);
virtual Error change_dir(String p_dir); ///< can be relative or absolute, return false on success
- virtual String get_current_dir(); ///< return current dir location
+ virtual String get_current_dir(bool p_include_drive = true); ///< return current dir location
virtual bool file_exists(String p_file);
virtual bool dir_exists(String p_dir);
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 952bc3d28f..e7d4bc6c51 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -257,7 +257,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
Vector<Device> devices;
volatile bool devices_changed;
- Mutex *device_lock;
+ Mutex device_lock;
Thread *device_thread;
volatile bool quit_request;
@@ -288,7 +288,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
ldevices.push_back(d);
}
- ea->device_lock->lock();
+ MutexLock lock(ea->device_lock);
bool different = false;
@@ -337,7 +337,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
Vector<String> props = dp.split("\n");
String vendor;
String device;
- d.description + "Device ID: " + d.id + "\n";
+ d.description = "Device ID: " + d.id + "\n";
d.api_level = 0;
for (int j = 0; j < props.size(); j++) {
@@ -381,8 +381,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
ea->devices = ndevices;
ea->devices_changed = true;
}
-
- ea->device_lock->unlock();
}
uint64_t sleep = 200;
@@ -690,6 +688,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
int xr_mode_index = p_preset->get("xr_features/xr_mode");
+ String plugins = p_preset->get("custom_template/plugins");
+
Vector<String> perms;
const char **aperms = android_perms;
@@ -701,7 +701,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
aperms++;
}
- PoolStringArray user_perms = p_preset->get("permissions/custom_permissions");
+ PackedStringArray user_perms = p_preset->get("permissions/custom_permissions");
for (int i = 0; i < user_perms.size(); i++) {
String user_perm = user_perms[i].strip_edges();
@@ -853,6 +853,11 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
}
+ if (tname == "meta-data" && attrname == "value" && value == "custom_template_plugins_value") {
+ // Update the meta-data 'android:value' attribute with the list of enabled plugins.
+ string_table.write[attr_value] = plugins;
+ }
+
iofs += 20;
}
@@ -1310,11 +1315,11 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
working_image->resize(p_icon.dimensions, p_icon.dimensions, Image::Interpolation::INTERPOLATE_LANCZOS);
}
- PoolVector<uint8_t> png_buffer;
+ Vector<uint8_t> png_buffer;
Error err = PNGDriverCommon::image_to_png(working_image, png_buffer);
if (err == OK) {
p_data.resize(png_buffer.size());
- memcpy(p_data.ptrw(), png_buffer.read().ptr(), p_data.size());
+ memcpy(p_data.ptrw(), png_buffer.ptr(), p_data.size());
} else {
String err_str = String("Failed to convert resized icon (") + p_processing_file_name + ") to png.";
WARN_PRINT(err_str.utf8().get_data());
@@ -1365,6 +1370,7 @@ public:
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.apk"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.apk"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "custom_template/use_custom_build"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/plugins", PROPERTY_HINT_PLACEHOLDER_TEXT, "Plugin1,Plugin2,..."), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "command_line/extra_args"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "version/code", PROPERTY_HINT_RANGE, "1,4096,1,or_greater"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "version/name"), "1.0"));
@@ -1398,7 +1404,7 @@ public:
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + abi), is_default));
}
- r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "permissions/custom_permissions"), PoolStringArray()));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "permissions/custom_permissions"), PackedStringArray()));
const char **perms = android_perms;
while (*perms) {
@@ -1432,11 +1438,8 @@ public:
virtual int get_options_count() const {
- device_lock->lock();
- int dc = devices.size();
- device_lock->unlock();
-
- return dc;
+ MutexLock lock(device_lock);
+ return devices.size();
}
virtual String get_options_tooltip() const {
@@ -1447,16 +1450,14 @@ public:
virtual String get_option_label(int p_index) const {
ERR_FAIL_INDEX_V(p_index, devices.size(), "");
- device_lock->lock();
- String s = devices[p_index].name;
- device_lock->unlock();
- return s;
+ MutexLock lock(device_lock);
+ return devices[p_index].name;
}
virtual String get_option_tooltip(int p_index) const {
ERR_FAIL_INDEX_V(p_index, devices.size(), "");
- device_lock->lock();
+ MutexLock lock(device_lock);
String s = devices[p_index].description;
if (devices.size() == 1) {
// Tooltip will be:
@@ -1464,7 +1465,6 @@ public:
// Description
s = devices[p_index].name + "\n\n" + s;
}
- device_lock->unlock();
return s;
}
@@ -1479,7 +1479,7 @@ public:
return ERR_UNCONFIGURED;
}
- device_lock->lock();
+ MutexLock lock(device_lock);
EditorProgress ep("run", "Running on " + devices[p_device].name, 3);
@@ -1487,7 +1487,6 @@ public:
// Export_temp APK.
if (ep.step("Exporting APK...", 0)) {
- device_lock->unlock();
return ERR_SKIP;
}
@@ -1502,7 +1501,6 @@ public:
#define CLEANUP_AND_RETURN(m_err) \
{ \
DirAccess::remove_file_or_error(tmp_export_path); \
- device_lock->unlock(); \
return m_err; \
}
@@ -1753,260 +1751,6 @@ public:
return list;
}
- void _update_custom_build_project() {
-
- DirAccessRef da = DirAccess::open("res://android");
-
- ERR_FAIL_COND_MSG(!da, "Cannot open directory 'res://android'.");
- Map<String, List<String> > directory_paths;
- Map<String, List<String> > manifest_sections;
- Map<String, List<String> > gradle_sections;
- da->list_dir_begin();
- String d = da->get_next();
- while (d != String()) {
-
- if (!d.begins_with(".") && d != "build" && da->current_is_dir()) { //a dir and not the build dir
- //add directories found
- DirAccessRef ds = DirAccess::open(String("res://android").plus_file(d));
- if (ds) {
- ds->list_dir_begin();
- String sd = ds->get_next();
- while (sd != String()) {
-
- if (!sd.begins_with(".") && ds->current_is_dir()) {
- String key = sd.to_upper();
- if (!directory_paths.has(key)) {
- directory_paths[key] = List<String>();
- }
- String path = ProjectSettings::get_singleton()->get_resource_path().plus_file("android").plus_file(d).plus_file(sd);
- directory_paths[key].push_back(path);
- print_line("Add: " + sd + ":" + path);
- }
-
- sd = ds->get_next();
- }
- ds->list_dir_end();
- }
- //parse manifest
- {
- FileAccessRef f = FileAccess::open(String("res://android").plus_file(d).plus_file("AndroidManifest.conf"), FileAccess::READ);
- if (f) {
-
- String section;
- while (!f->eof_reached()) {
- String l = f->get_line();
- String k = l.strip_edges();
- if (k.begins_with("[")) {
- section = k.substr(1, k.length() - 2).strip_edges().to_upper();
- print_line("Section: " + section);
- } else if (k != String()) {
- if (!manifest_sections.has(section)) {
- manifest_sections[section] = List<String>();
- }
- manifest_sections[section].push_back(l);
- }
- }
-
- f->close();
- }
- }
- //parse gradle
- {
- FileAccessRef f = FileAccess::open(String("res://android").plus_file(d).plus_file("gradle.conf"), FileAccess::READ);
- if (f) {
-
- String section;
- while (!f->eof_reached()) {
- String l = f->get_line().strip_edges();
- String k = l.strip_edges();
- if (k.begins_with("[")) {
- section = k.substr(1, k.length() - 2).strip_edges().to_upper();
- print_line("Section: " + section);
- } else if (k != String()) {
- if (!gradle_sections.has(section)) {
- gradle_sections[section] = List<String>();
- }
- gradle_sections[section].push_back(l);
- }
- }
- }
- }
- }
- d = da->get_next();
- }
- da->list_dir_end();
-
- { //fix gradle build
-
- String new_file;
- {
- FileAccessRef f = FileAccess::open("res://android/build/build.gradle", FileAccess::READ);
- if (f) {
-
- while (!f->eof_reached()) {
- String l = f->get_line();
-
- if (l.begins_with("//CHUNK_")) {
- String text = l.replace_first("//CHUNK_", "");
- int begin_pos = text.find("_BEGIN");
- if (begin_pos != -1) {
- text = text.substr(0, begin_pos);
- text = text.to_upper(); //just in case
-
- String end_marker = "//CHUNK_" + text + "_END";
- size_t pos = f->get_position();
- bool found = false;
- while (!f->eof_reached()) {
- l = f->get_line();
- if (l.begins_with(end_marker)) {
- found = true;
- break;
- }
- }
-
- new_file += "//CHUNK_" + text + "_BEGIN\n";
-
- if (!found) {
- ERR_PRINT("No end marker found in build.gradle for chunk: " + text);
- f->seek(pos);
- } else {
-
- //add chunk lines
- if (gradle_sections.has(text)) {
- for (List<String>::Element *E = gradle_sections[text].front(); E; E = E->next()) {
- new_file += E->get() + "\n";
- }
- }
- new_file += end_marker + "\n";
- }
- } else {
- new_file += l + "\n"; //pass line by
- }
- } else if (l.begins_with("//DIR_")) {
- String text = l.replace_first("//DIR_", "");
- int begin_pos = text.find("_BEGIN");
- if (begin_pos != -1) {
- text = text.substr(0, begin_pos);
- text = text.to_upper(); //just in case
-
- String end_marker = "//DIR_" + text + "_END";
- size_t pos = f->get_position();
- bool found = false;
- while (!f->eof_reached()) {
- l = f->get_line();
- if (l.begins_with(end_marker)) {
- found = true;
- break;
- }
- }
-
- new_file += "//DIR_" + text + "_BEGIN\n";
-
- if (!found) {
- ERR_PRINT("No end marker found in build.gradle for dir: " + text);
- f->seek(pos);
- } else {
- //add chunk lines
- if (directory_paths.has(text)) {
- for (List<String>::Element *E = directory_paths[text].front(); E; E = E->next()) {
- new_file += ",'" + E->get().replace("'", "\'") + "'";
- new_file += "\n";
- }
- }
- new_file += end_marker + "\n";
- }
- } else {
- new_file += l + "\n"; //pass line by
- }
-
- } else {
- new_file += l + "\n";
- }
- }
- }
- }
-
- FileAccessRef f = FileAccess::open("res://android/build/build.gradle", FileAccess::WRITE);
- f->store_string(new_file);
- f->close();
- }
-
- { //fix manifest
-
- String new_file;
- {
- FileAccessRef f = FileAccess::open("res://android/build/AndroidManifest.xml", FileAccess::READ);
- if (f) {
-
- while (!f->eof_reached()) {
- String l = f->get_line();
-
- if (l.begins_with("<!--CHUNK_")) {
- String text = l.replace_first("<!--CHUNK_", "");
- int begin_pos = text.find("_BEGIN-->");
- if (begin_pos != -1) {
- text = text.substr(0, begin_pos);
- text = text.to_upper(); //just in case
-
- String end_marker = "<!--CHUNK_" + text + "_END-->";
- size_t pos = f->get_position();
- bool found = false;
- while (!f->eof_reached()) {
- l = f->get_line();
- if (l.begins_with(end_marker)) {
- found = true;
- break;
- }
- }
-
- new_file += "<!--CHUNK_" + text + "_BEGIN-->\n";
-
- if (!found) {
- ERR_PRINT("No end marker found in AndroidManifest.xml for chunk: " + text);
- f->seek(pos);
- } else {
- //add chunk lines
- if (manifest_sections.has(text)) {
- for (List<String>::Element *E = manifest_sections[text].front(); E; E = E->next()) {
- new_file += E->get() + "\n";
- }
- }
- new_file += end_marker + "\n";
- }
- } else {
- new_file += l + "\n"; //pass line by
- }
-
- } else if (l.strip_edges().begins_with("<application")) {
- String last_tag = "android:icon=\"@mipmap/icon\"";
- int last_tag_pos = l.find(last_tag);
- if (last_tag_pos == -1) {
- ERR_PRINT("Not adding application attributes as the expected tag was not found in '<application': " + last_tag);
- new_file += l + "\n";
- } else {
- String base = l.substr(0, last_tag_pos + last_tag.length());
- if (manifest_sections.has("application_attribs")) {
- for (List<String>::Element *E = manifest_sections["application_attribs"].front(); E; E = E->next()) {
- String to_add = E->get().strip_edges();
- base += " " + to_add + " ";
- }
- }
- base += ">\n";
- new_file += base;
- }
- } else {
- new_file += l + "\n";
- }
- }
- }
- }
-
- FileAccessRef f = FileAccess::open("res://android/build/AndroidManifest.xml", FileAccess::WRITE);
- f->store_string(new_file);
- f->close();
- }
- }
-
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) {
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
@@ -2035,8 +1779,6 @@ public:
ERR_FAIL_COND_V_MSG(sdk_path == "", ERR_UNCONFIGURED, "Android SDK path must be configured in Editor Settings at 'export/android/custom_build_sdk_path'.");
- _update_custom_build_project();
-
OS::get_singleton()->set_environment("ANDROID_HOME", sdk_path); //set and overwrite if required
String build_command;
@@ -2047,14 +1789,18 @@ public:
#endif
String build_path = ProjectSettings::get_singleton()->get_resource_path().plus_file("android/build");
+ String plugins_dir = ProjectSettings::get_singleton()->get_resource_path().plus_file("android/plugins");
build_command = build_path.plus_file(build_command);
String package_name = get_package_name(p_preset->get("package/unique_name"));
+ String plugins = p_preset->get("custom_template/plugins");
List<String> cmdline;
cmdline.push_back("build");
cmdline.push_back("-Pexport_package_name=" + package_name); // argument to specify the package name.
+ cmdline.push_back("-Pcustom_template_plugins_dir=" + plugins_dir); // argument to specify the plugins directory.
+ cmdline.push_back("-Pcustom_template_plugins=" + plugins); // argument to specify the list of plugins to enable.
cmdline.push_back("-p"); // argument to specify the start directory.
cmdline.push_back(build_path); // start directory.
/*{ used for debug
@@ -2570,7 +2316,6 @@ public:
run_icon.instance();
run_icon->create_from_image(img);
- device_lock = Mutex::create();
devices_changed = true;
quit_request = false;
device_thread = Thread::create(_device_poll_thread, this);
@@ -2579,7 +2324,6 @@ public:
~EditorExportPlatformAndroid() {
quit_request = true;
Thread::wait_to_finish(device_thread);
- memdelete(device_lock);
memdelete(device_thread);
}
};
diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml
index 4d2eb1ef65..cc480d1c84 100644
--- a/platform/android/java/app/AndroidManifest.xml
+++ b/platform/android/java/app/AndroidManifest.xml
@@ -6,9 +6,6 @@
android:versionName="1.0"
android:installLocation="auto" >
- <!-- Adding custom text to the manifest is fine, but do it outside the custom USER and APPLICATION BEGIN/END comments, -->
- <!-- as that gets rewritten. -->
-
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
@@ -19,14 +16,11 @@
android:glEsVersion="0x00020000"
android:required="true" />
-<!-- Custom user permissions XML added by add-ons. It's recommended to add them from the export preset, though. -->
-<!--CHUNK_USER_PERMISSIONS_BEGIN-->
-<!--CHUNK_USER_PERMISSIONS_END-->
-
- <!-- Any tag in this line after android:icon will be erased when doing custom builds. -->
- <!-- If you want to add tags manually, do before it. -->
- <!-- WARNING: This should stay on a single line until the parsing code is improved. See GH-32414. -->
- <application android:label="@string/godot_project_name_string" android:allowBackup="false" tools:ignore="GoogleAppIndexingWarning" android:icon="@mipmap/icon" >
+ <application
+ android:label="@string/godot_project_name_string"
+ android:allowBackup="false"
+ tools:ignore="GoogleAppIndexingWarning"
+ android:icon="@mipmap/icon" >
<!-- The following metadata values are replaced when Godot exports, modifying them here has no effect. -->
<!-- Do these changes in the export preset. Adding new ones is fine. -->
@@ -36,6 +30,11 @@
android:name="xr_mode_metadata_name"
android:value="xr_mode_metadata_value" />
+ <!-- Metadata populated at export time and used by Godot to figure out which plugins must be enabled. -->
+ <meta-data
+ android:name="custom_template_plugins"
+ android:value="custom_template_plugins_value"/>
+
<activity
android:name=".GodotApp"
android:label="@string/godot_project_name_string"
@@ -52,10 +51,6 @@
</intent-filter>
</activity>
-<!-- Custom application XML added by add-ons. -->
-<!--CHUNK_APPLICATION_BEGIN-->
-<!--CHUNK_APPLICATION_END-->
-
</application>
</manifest>
diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle
index 2e4f2ffab0..5e37f538e9 100644
--- a/platform/android/java/app/build.gradle
+++ b/platform/android/java/app/build.gradle
@@ -1,7 +1,4 @@
// Gradle build config for Godot Engine's Android port.
-//
-// Do not remove/modify comments ending with BEGIN/END, they are used to inject
-// addon-specific configuration.
apply from: 'config.gradle'
buildscript {
@@ -10,13 +7,10 @@ buildscript {
repositories {
google()
jcenter()
-//CHUNK_BUILDSCRIPT_REPOSITORIES_BEGIN
-//CHUNK_BUILDSCRIPT_REPOSITORIES_END
}
dependencies {
classpath libraries.androidGradlePlugin
-//CHUNK_BUILDSCRIPT_DEPENDENCIES_BEGIN
-//CHUNK_BUILDSCRIPT_DEPENDENCIES_END
+ classpath libraries.kotlinGradlePlugin
}
}
@@ -27,24 +21,35 @@ allprojects {
mavenCentral()
google()
jcenter()
-//CHUNK_ALLPROJECTS_REPOSITORIES_BEGIN
-//CHUNK_ALLPROJECTS_REPOSITORIES_END
}
}
dependencies {
implementation libraries.supportCoreUtils
+ implementation libraries.kotlinStdLib
+ implementation libraries.v4Support
if (rootProject.findProject(":lib")) {
implementation project(":lib")
+ } else if (rootProject.findProject(":godot:lib")) {
+ implementation project(":godot:lib")
} else {
// Custom build mode. In this scenario this project is the only one around and the Godot
// library is available through the pre-generated godot-lib.*.aar android archive files.
debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar', '*.aar'])
releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar', '*.aar'])
}
-//CHUNK_DEPENDENCIES_BEGIN
-//CHUNK_DEPENDENCIES_END
+
+ // Godot prebuilt plugins
+ implementation fileTree(dir: 'libs/plugins', include: ["GodotPayment*.aar"])
+
+ // Godot user plugins dependencies
+ String pluginsDir = getGodotPluginsDirectory()
+ String[] pluginsBinaries = getGodotPluginsBinaries()
+ if (pluginsDir != null && !pluginsDir.isEmpty() &&
+ pluginsBinaries != null && pluginsBinaries.size() > 0) {
+ implementation fileTree(dir: pluginsDir, include: pluginsBinaries)
+ }
}
android {
@@ -56,8 +61,6 @@ android {
applicationId getExportPackageName()
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
-//CHUNK_ANDROID_DEFAULTCONFIG_BEGIN
-//CHUNK_ANDROID_DEFAULTCONFIG_END
}
lintOptions {
@@ -79,37 +82,13 @@ android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = [
- 'src'
-//DIR_SRC_BEGIN
-//DIR_SRC_END
- ]
- res.srcDirs = [
- 'res'
-//DIR_RES_BEGIN
-//DIR_RES_END
- ]
- aidl.srcDirs = [
- 'aidl'
-//DIR_AIDL_BEGIN
-//DIR_AIDL_END
- ]
- assets.srcDirs = [
- 'assets'
-//DIR_ASSETS_BEGIN
-//DIR_ASSETS_END
- ]
+ java.srcDirs = ['src']
+ res.srcDirs = ['res']
+ aidl.srcDirs = ['aidl']
+ assets.srcDirs = ['assets']
}
- debug.jniLibs.srcDirs = [
- 'libs/debug'
-//DIR_JNI_DEBUG_BEGIN
-//DIR_JNI_DEBUG_END
- ]
- release.jniLibs.srcDirs = [
- 'libs/release'
-//DIR_JNI_RELEASE_BEGIN
-//DIR_JNI_RELEASE_END
- ]
+ debug.jniLibs.srcDirs = ['libs/debug']
+ release.jniLibs.srcDirs = ['libs/release']
}
applicationVariants.all { variant ->
@@ -118,6 +97,3 @@ android {
}
}
}
-
-//CHUNK_GLOBAL_BEGIN
-//CHUNK_GLOBAL_END
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle
index 5550d3099d..eaaefcbccb 100644
--- a/platform/android/java/app/config.gradle
+++ b/platform/android/java/app/config.gradle
@@ -1,24 +1,66 @@
ext.versions = [
- androidGradlePlugin : '3.4.2',
- compileSdk : 28,
- minSdk : 18,
- targetSdk : 28,
- buildTools : '28.0.3',
- supportCoreUtils : '28.0.0'
+ androidGradlePlugin: '3.6.0',
+ compileSdk : 29,
+ minSdk : 18,
+ targetSdk : 29,
+ buildTools : '29.0.1',
+ supportCoreUtils : '28.0.0',
+ kotlinVersion : '1.3.61',
+ v4Support : '28.0.0'
]
ext.libraries = [
- androidGradlePlugin : "com.android.tools.build:gradle:$versions.androidGradlePlugin",
- supportCoreUtils : "com.android.support:support-core-utils:$versions.supportCoreUtils"
+ androidGradlePlugin: "com.android.tools.build:gradle:$versions.androidGradlePlugin",
+ supportCoreUtils : "com.android.support:support-core-utils:$versions.supportCoreUtils",
+ kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion",
+ kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlinVersion",
+ v4Support : "com.android.support:support-v4:$versions.v4Support"
]
ext.getExportPackageName = { ->
- // Retrieve the app id from the project property set by the Godot build command.
- String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
- // Check if the app id is valid, otherwise use the default.
- if (appId == null || appId.isEmpty()) {
- appId = "com.godot.game"
- }
- return appId
+ // Retrieve the app id from the project property set by the Godot build command.
+ String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
+ // Check if the app id is valid, otherwise use the default.
+ if (appId == null || appId.isEmpty()) {
+ appId = "com.godot.game"
+ }
+ return appId
+}
+
+/**
+ * Parse the project properties for the 'custom_template_plugins' property and return
+ * their binaries for inclusion in the build dependencies.
+ *
+ * The listed plugins must have their binaries in the project plugins directory.
+ */
+ext.getGodotPluginsBinaries = { ->
+ String[] binDeps = []
+
+ // Retrieve the list of enabled plugins.
+ if (project.hasProperty("custom_template_plugins")) {
+ String pluginsList = project.property("custom_template_plugins")
+ if (pluginsList != null && !pluginsList.trim().isEmpty()) {
+ for (String plugin : pluginsList.split(",")) {
+ binDeps += plugin.trim() + "*.aar"
+ }
+ }
+ }
+
+ return binDeps
+}
+
+/**
+ * Parse the project properties for the 'custom_template_plugins_dir' property and return
+ * its value.
+ *
+ * The returned value is the directory containing user plugins.
+ */
+ext.getGodotPluginsDirectory = { ->
+ // The plugins directory is provided by the 'custom_template_plugins_dir' property.
+ String pluginsDir = project.hasProperty("custom_template_plugins_dir")
+ ? project.property("custom_template_plugins_dir")
+ : ""
+
+ return pluginsDir
}
diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle
index 2052017888..976a5bda99 100644
--- a/platform/android/java/build.gradle
+++ b/platform/android/java/build.gradle
@@ -9,6 +9,7 @@ buildscript {
}
dependencies {
classpath libraries.androidGradlePlugin
+ classpath libraries.kotlinGradlePlugin
}
}
@@ -24,7 +25,7 @@ ext {
sconsExt = org.gradle.internal.os.OperatingSystem.current().isWindows() ? ".bat" : ""
supportedAbis = ["armv7", "arm64v8", "x86", "x86_64"]
- supportedTargets = ['release':"release", 'debug':"release_debug"]
+ supportedTargets = ['release': "release", 'debug': "release_debug"]
// Used by gradle to specify which architecture to build for by default when running `./gradlew build`.
// This command is usually used by Android Studio.
@@ -64,10 +65,10 @@ task copyReleaseBinaryToBin(type: Copy) {
}
/**
- * Copy the Godot android library archive debug file into the app debug libs directory.
+ * Copy the Godot android library archive debug file into the app module debug libs directory.
* Depends on the library build task to ensure the AAR file is generated prior to copying.
*/
-task copyDebugAAR(type: Copy) {
+task copyDebugAARToAppModule(type: Copy) {
dependsOn ':lib:assembleDebug'
from('lib/build/outputs/aar')
into('app/libs/debug')
@@ -75,16 +76,45 @@ task copyDebugAAR(type: Copy) {
}
/**
- * Copy the Godot android library archive release file into the app release libs directory.
+ * Copy the Godot android library archive debug file into the root bin directory.
* Depends on the library build task to ensure the AAR file is generated prior to copying.
*/
-task copyReleaseAAR(type: Copy) {
+task copyDebugAARToBin(type: Copy) {
+ dependsOn ':lib:assembleDebug'
+ from('lib/build/outputs/aar')
+ into(binDir)
+ include('godot-lib.debug.aar')
+}
+
+/**
+ * Copy the Godot android library archive release file into the app module release libs directory.
+ * Depends on the library build task to ensure the AAR file is generated prior to copying.
+ */
+task copyReleaseAARToAppModule(type: Copy) {
dependsOn ':lib:assembleRelease'
from('lib/build/outputs/aar')
into('app/libs/release')
include('godot-lib.release.aar')
}
+task copyGodotPaymentPluginToAppModule(type: Copy) {
+ dependsOn ':plugins:godotpayment:assembleRelease'
+ from('plugins/godotpayment/build/outputs/aar')
+ into('app/libs/plugins')
+ include('GodotPayment.release.aar')
+}
+
+/**
+ * Copy the Godot android library archive release file into the root bin directory.
+ * Depends on the library build task to ensure the AAR file is generated prior to copying.
+ */
+task copyReleaseAARToBin(type: Copy) {
+ dependsOn ':lib:assembleRelease'
+ from('lib/build/outputs/aar')
+ into(binDir)
+ include('godot-lib.release.aar')
+}
+
/**
* Generate Godot custom build template by zipping the source files from the app directory, as well
* as the AAR files generated by 'copyDebugAAR' and 'copyReleaseAAR'.
@@ -95,7 +125,7 @@ task zipCustomBuild(type: Zip) {
doFirst {
logger.lifecycle("Generating Godot custom build template")
}
- from(fileTree(dir: 'app', excludes: ['**/build/**', '**/.gradle/**', '**/*.iml']), fileTree(dir: '.', includes: ['gradle.properties','gradlew', 'gradlew.bat', 'gradle/**']))
+ from(fileTree(dir: 'app', excludes: ['**/build/**', '**/.gradle/**', '**/*.iml']), fileTree(dir: '.', includes: ['gradle.properties', 'gradlew', 'gradlew.bat', 'gradle/**']))
include '**/*'
archiveName 'android_source.zip'
destinationDir(file(binDir))
@@ -110,19 +140,24 @@ task generateGodotTemplates(type: GradleBuild) {
startParameter.excludedTaskNames += ":lib:" + getSconsTaskName(buildType)
}
- tasks = []
+ tasks = ["copyGodotPaymentPluginToAppModule"]
// Only build the apks and aar files for which we have native shared libraries.
for (String target : supportedTargets.keySet()) {
File targetLibs = new File("lib/libs/" + target)
- if (targetLibs != null && targetLibs.isDirectory()) {
- File[] targetLibsContents = targetLibs.listFiles()
- if (targetLibsContents != null && targetLibsContents.length > 0) {
- // Copy the generated aar library files to the custom build directory.
- tasks += "copy" + target.capitalize() + "AAR"
- // Copy the prebuilt binary templates to the bin directory.
- tasks += "copy" + target.capitalize() + "BinaryToBin"
- }
+ if (targetLibs != null
+ && targetLibs.isDirectory()
+ && targetLibs.listFiles() != null
+ && targetLibs.listFiles().length > 0) {
+ String capitalizedTarget = target.capitalize()
+ // Copy the generated aar library files to the custom build directory.
+ tasks += "copy" + capitalizedTarget + "AARToAppModule"
+ // Copy the generated aar library files to the bin directory.
+ tasks += "copy" + capitalizedTarget + "AARToBin"
+ // Copy the prebuilt binary templates to the bin directory.
+ tasks += "copy" + capitalizedTarget + "BinaryToBin"
+ } else {
+ logger.lifecycle("No native shared libs for target $target. Skipping build.")
}
}
@@ -133,20 +168,28 @@ task generateGodotTemplates(type: GradleBuild) {
* Clean the generated artifacts.
*/
task cleanGodotTemplates(type: Delete) {
- // Delete the generated native libs
- delete("lib/libs")
+ // Delete the generated native libs
+ delete("lib/libs")
+
+ // Delete the library generated AAR files
+ delete("lib/build/outputs/aar")
+
+ // Delete the godotpayment libs directory contents
+ delete("plugins/godotpayment/libs")
- // Delete the library generated AAR files
- delete("lib/build/outputs/aar")
+ // Delete the generated godotpayment aar
+ delete("plugins/godotpayment/build/outputs/aar")
- // Delete the app libs directory contents
- delete("app/libs")
+ // Delete the app libs directory contents
+ delete("app/libs")
- // Delete the generated binary apks
- delete("app/build/outputs/apk")
+ // Delete the generated binary apks
+ delete("app/build/outputs/apk")
- // Delete the Godot templates in the Godot bin directory
- delete("$binDir/android_debug.apk")
- delete("$binDir/android_release.apk")
- delete("$binDir/android_source.zip")
+ // Delete the Godot templates in the Godot bin directory
+ delete("$binDir/android_debug.apk")
+ delete("$binDir/android_release.apk")
+ delete("$binDir/android_source.zip")
+ delete("$binDir/godot-lib.debug.aar")
+ delete("$binDir/godot-lib.release.aar")
}
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index bf50265715..f56b0f6a5e 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/platform/android/java/lib/build.gradle b/platform/android/java/lib/build.gradle
index eb97484b9c..ca8aaf8af0 100644
--- a/platform/android/java/lib/build.gradle
+++ b/platform/android/java/lib/build.gradle
@@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
dependencies {
implementation libraries.supportCoreUtils
+ implementation libraries.kotlinStdLib
+ implementation libraries.v4Support
}
def pathToRootDir = "../../../../"
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index 021214b627..7db4aa6597 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -61,8 +61,11 @@ import android.os.Messenger;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.provider.Settings.Secure;
+import android.support.annotation.CallSuper;
import android.support.annotation.Keep;
+import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import android.support.v4.app.FragmentActivity;
import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -87,22 +90,20 @@ import com.google.android.vending.expansion.downloader.IStub;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
-import java.lang.reflect.Method;
import java.security.MessageDigest;
-import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
-import javax.microedition.khronos.opengles.GL10;
import org.godotengine.godot.input.GodotEditText;
import org.godotengine.godot.payments.PaymentsManager;
+import org.godotengine.godot.plugin.GodotPlugin;
+import org.godotengine.godot.plugin.GodotPluginRegistry;
import org.godotengine.godot.utils.GodotNetUtils;
import org.godotengine.godot.utils.PermissionsUtil;
import org.godotengine.godot.xr.XRMode;
-public abstract class Godot extends Activity implements SensorEventListener, IDownloaderClient {
+public abstract class Godot extends FragmentActivity implements SensorEventListener, IDownloaderClient {
- static final int MAX_SINGLETONS = 64;
private IStub mDownloaderClientStub;
private TextView mStatusText;
private TextView mProgressFraction;
@@ -126,8 +127,7 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
private boolean activityResumed;
private int mState;
- // Used to dispatch events to the main thread.
- private final Handler mainThreadHandler = new Handler(Looper.getMainLooper());
+ private GodotPluginRegistry pluginRegistry;
static private Intent mCurrentIntent;
@@ -154,83 +154,6 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
mPauseButton.setText(stringResourceID);
}
- static public class SingletonBase {
-
- protected void registerClass(String p_name, String[] p_methods) {
-
- GodotLib.singleton(p_name, this);
-
- Class clazz = getClass();
- Method[] methods = clazz.getDeclaredMethods();
- for (Method method : methods) {
- boolean found = false;
-
- for (String s : p_methods) {
- if (s.equals(method.getName())) {
- found = true;
- break;
- }
- }
- if (!found)
- continue;
-
- List<String> ptr = new ArrayList<String>();
-
- Class[] paramTypes = method.getParameterTypes();
- for (Class c : paramTypes) {
- ptr.add(c.getName());
- }
-
- String[] pt = new String[ptr.size()];
- ptr.toArray(pt);
-
- GodotLib.method(p_name, method.getName(), method.getReturnType().getName(), pt);
- }
-
- Godot.singletons[Godot.singleton_count++] = this;
- }
-
- /**
- * Invoked once during the Godot Android initialization process after creation of the
- * {@link GodotView} view.
- * <p>
- * This method should be overridden by descendants of this class that would like to add
- * their view/layout to the Godot view hierarchy.
- *
- * @return the view to be included; null if no views should be included.
- */
- @Nullable
- protected View onMainCreateView(Activity activity) {
- return null;
- }
-
- protected void onMainActivityResult(int requestCode, int resultCode, Intent data) {
- }
-
- protected void onMainRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
- }
-
- protected void onMainPause() {}
- protected void onMainResume() {}
- protected void onMainDestroy() {}
- protected boolean onMainBackPressed() { return false; }
-
- protected void onGLDrawFrame(GL10 gl) {}
- protected void onGLSurfaceChanged(GL10 gl, int width, int height) {} // singletons will always miss first onGLSurfaceChanged call
- //protected void onGLSurfaceCreated(GL10 gl, EGLConfig config) {} // singletons won't be ready until first GodotLib.step()
-
- public void registerMethods() {}
- }
-
- /*
- protected List<SingletonBase> singletons = new ArrayList<SingletonBase>();
- protected void instanceSingleton(SingletonBase s) {
-
- s.registerMethods();
- singletons.add(s);
- }
- */
-
private String[] command_line;
private boolean use_apk_expansion;
@@ -246,9 +169,6 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
public static GodotIO io;
public static GodotNetUtils netUtils;
- static SingletonBase[] singletons = new SingletonBase[MAX_SINGLETONS];
- static int singleton_count = 0;
-
public interface ResultCallback {
public void callback(int requestCode, int resultCode, Intent data);
}
@@ -265,16 +185,15 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
result_callback = null;
};
- for (int i = 0; i < singleton_count; i++) {
-
- singletons[i].onMainActivityResult(requestCode, resultCode, data);
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onMainActivityResult(requestCode, resultCode, data);
}
};
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
- for (int i = 0; i < singleton_count; i++) {
- singletons[i].onMainRequestPermissionsResult(requestCode, permissions, grantResults);
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onMainRequestPermissionsResult(requestCode, permissions, grantResults);
}
for (int i = 0; i < permissions.length; i++) {
@@ -283,6 +202,16 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
};
/**
+ * Invoked on the GL thread when the Godot main loop has started.
+ */
+ @CallSuper
+ protected void onGLGodotMainLoopStarted() {
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onGLGodotMainLoopStarted();
+ }
+ }
+
+ /**
* Used by the native code (java_godot_lib_jni.cpp) to complete initialization of the GLSurfaceView view and renderer.
*/
@Keep
@@ -302,14 +231,13 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
edittext.setView(mView);
io.setEdit(edittext);
- final Godot godot = this;
mView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
Point fullSize = new Point();
- godot.getWindowManager().getDefaultDisplay().getSize(fullSize);
+ getWindowManager().getDefaultDisplay().getSize(fullSize);
Rect gameSize = new Rect();
- godot.mView.getWindowVisibleDisplayFrame(gameSize);
+ mView.getWindowVisibleDisplayFrame(gameSize);
final int keyboardHeight = fullSize.y - gameSize.bottom;
GodotLib.setVirtualKeyboardHeight(keyboardHeight);
@@ -321,23 +249,23 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
@Override
public void run() {
GodotLib.setup(current_command_line);
- setKeepScreenOn("True".equals(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
- // The Godot Android plugins are setup on completion of GodotLib.setup
- mainThreadHandler.post(new Runnable() {
- @Override
- public void run() {
- // Include the non-null views returned in the Godot view hierarchy.
- for (int i = 0; i < singleton_count; i++) {
- View view = singletons[i].onMainCreateView(Godot.this);
- if (view != null) {
- layout.addView(view);
- }
- }
- }
- });
+ // Must occur after GodotLib.setup has completed.
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onGLRegisterPluginWithGodotNative();
+ }
+
+ setKeepScreenOn("True".equals(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
}
});
+
+ // Include the returned non-null views in the Godot view hierarchy.
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ View pluginView = plugin.onMainCreateView(this);
+ if (pluginView != null) {
+ layout.addView(pluginView);
+ }
+ }
}
public void setKeepScreenOn(final boolean p_enabled) {
@@ -535,6 +463,7 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
mClipboard = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
+ pluginRegistry = GodotPluginRegistry.initializePluginRegistry(this);
//check for apk expansion API
if (true) {
@@ -675,8 +604,8 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
protected void onDestroy() {
if (mPaymentsManager != null) mPaymentsManager.destroy();
- for (int i = 0; i < singleton_count; i++) {
- singletons[i].onMainDestroy();
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onMainDestroy();
}
GodotLib.ondestroy(this);
@@ -703,8 +632,8 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
mSensorManager.unregisterListener(this);
- for (int i = 0; i < singleton_count; i++) {
- singletons[i].onMainPause();
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onMainPause();
}
}
@@ -755,9 +684,8 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
- for (int i = 0; i < singleton_count; i++) {
-
- singletons[i].onMainResume();
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onMainResume();
}
}
@@ -850,8 +778,8 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
public void onBackPressed() {
boolean shouldQuit = true;
- for (int i = 0; i < singleton_count; i++) {
- if (singletons[i].onMainBackPressed()) {
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ if (plugin.onMainBackPressed()) {
shouldQuit = false;
}
}
@@ -866,6 +794,17 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
}
}
+ /**
+ * Queue a runnable to be run on the GL thread.
+ * <p>
+ * This must be called after the GL thread has started.
+ */
+ public final void runOnGLThread(@NonNull Runnable action) {
+ if (mView != null) {
+ mView.queueEvent(action);
+ }
+ }
+
private void forceQuit() {
System.exit(0);
}
@@ -990,8 +929,8 @@ public abstract class Godot extends Activity implements SensorEventListener, IDo
int keyCode;
if ((keyCode = cc[i]) != 0) {
// Simulate key down and up...
- GodotLib.key(0, keyCode, true);
- GodotLib.key(0, keyCode, false);
+ GodotLib.key(0, 0, keyCode, true);
+ GodotLib.key(0, 0, keyCode, false);
}
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
index e0b46673ba..89a65aea24 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
@@ -136,7 +136,7 @@ public class GodotLib {
/**
* Forward regular key events from the main thread to the GL thread.
*/
- public static native void key(int p_scancode, int p_unicode_char, boolean p_pressed);
+ public static native void key(int p_keycode, int p_scancode, int p_unicode_char, boolean p_pressed);
/**
* Forward game device's key events from the main thread to the GL thread.
@@ -176,22 +176,6 @@ public class GodotLib {
public static native void audio();
/**
- * Used to setup a {@link org.godotengine.godot.Godot.SingletonBase} instance.
- * @param p_name Name of the instance.
- * @param p_object Reference to the singleton instance.
- */
- public static native void singleton(String p_name, Object p_object);
-
- /**
- * Used to complete registration of the {@link org.godotengine.godot.Godot.SingletonBase} instance's methods.
- * @param p_sname Name of the instance
- * @param p_name Name of the method to register
- * @param p_ret Return type of the registered method
- * @param p_params Method parameters types
- */
- public static native void method(String p_sname, String p_name, String p_ret, String[] p_params);
-
- /**
* Used to access Godot global properties.
* @param p_key Property key
* @return String value of the property
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
index 26fa033f12..ee9a2aee4f 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderer.java
@@ -30,9 +30,12 @@
package org.godotengine.godot;
+import android.content.Context;
import android.opengl.GLSurfaceView;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
+import org.godotengine.godot.plugin.GodotPlugin;
+import org.godotengine.godot.plugin.GodotPluginRegistry;
import org.godotengine.godot.utils.GLUtils;
/**
@@ -40,8 +43,13 @@ import org.godotengine.godot.utils.GLUtils;
*/
class GodotRenderer implements GLSurfaceView.Renderer {
+ private final GodotPluginRegistry pluginRegistry;
private boolean activityJustResumed = false;
+ GodotRenderer() {
+ this.pluginRegistry = GodotPluginRegistry.getPluginRegistry();
+ }
+
public void onDrawFrame(GL10 gl) {
if (activityJustResumed) {
GodotLib.onRendererResumed();
@@ -49,21 +57,23 @@ class GodotRenderer implements GLSurfaceView.Renderer {
}
GodotLib.step();
- for (int i = 0; i < Godot.singleton_count; i++) {
- Godot.singletons[i].onGLDrawFrame(gl);
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onGLDrawFrame(gl);
}
}
public void onSurfaceChanged(GL10 gl, int width, int height) {
-
GodotLib.resize(width, height);
- for (int i = 0; i < Godot.singleton_count; i++) {
- Godot.singletons[i].onGLSurfaceChanged(gl, width, height);
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onGLSurfaceChanged(gl, width, height);
}
}
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
GodotLib.newcontext(GLUtils.use_32);
+ for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
+ plugin.onGLSurfaceCreated(gl, config);
+ }
}
void onActivityResumed() {
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index b2b88088e8..e00ca86c41 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -98,11 +98,12 @@ public class GodotInputHandler implements InputDeviceListener {
});
}
} else {
+ final int scanCode = event.getScanCode();
final int chr = event.getUnicodeChar(0);
queueEvent(new Runnable() {
@Override
public void run() {
- GodotLib.key(keyCode, chr, false);
+ GodotLib.key(keyCode, scanCode, chr, false);
}
});
};
@@ -143,11 +144,12 @@ public class GodotInputHandler implements InputDeviceListener {
});
}
} else {
+ final int scanCode = event.getScanCode();
final int chr = event.getUnicodeChar(0);
queueEvent(new Runnable() {
@Override
public void run() {
- GodotLib.key(keyCode, chr, true);
+ GodotLib.key(keyCode, scanCode, chr, true);
}
});
};
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index 3a154f1bf3..8d9b5461a1 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -91,8 +91,8 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
@Override
public void run() {
for (int i = 0; i < count; ++i) {
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, true);
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, false);
+ GodotLib.key(KeyEvent.KEYCODE_DEL, KeyEvent.KEYCODE_DEL, 0, true);
+ GodotLib.key(KeyEvent.KEYCODE_DEL, KeyEvent.KEYCODE_DEL, 0, false);
}
}
});
@@ -110,8 +110,8 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
@Override
public void run() {
for (int i = 0; i < count; ++i) {
- GodotLib.key(0, newChars[i], true);
- GodotLib.key(0, newChars[i], false);
+ GodotLib.key(0, 0, newChars[i], true);
+ GodotLib.key(0, 0, newChars[i], false);
}
}
});
@@ -127,8 +127,8 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
public void run() {
for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i);
- GodotLib.key(0, ch, true);
- GodotLib.key(0, ch, false);
+ GodotLib.key(0, 0, ch, true);
+ GodotLib.key(0, 0, ch, false);
}
}
});
diff --git a/platform/iphone/semaphore_iphone.cpp b/platform/android/java/lib/src/org/godotengine/godot/payments/GodotPaymentInterface.java
index 0461f58c40..6ac7338b30 100644
--- a/platform/iphone/semaphore_iphone.cpp
+++ b/platform/android/java/lib/src/org/godotengine/godot/payments/GodotPaymentInterface.java
@@ -1,12 +1,12 @@
/*************************************************************************/
-/* semaphore_iphone.cpp */
+/* GodotPaymentInterface.java */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,85 +28,70 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "semaphore_iphone.h"
+package org.godotengine.godot.payments;
-#include <fcntl.h>
-#include <unistd.h>
+public interface GodotPaymentInterface {
+ void purchase(String sku, String transactionId);
-void cgsem_init(cgsem_t *);
-void cgsem_post(cgsem_t *);
-void cgsem_wait(cgsem_t *);
-void cgsem_destroy(cgsem_t *);
+ void consumeUnconsumedPurchases();
-void cgsem_init(cgsem_t *cgsem) {
- int flags, fd, i;
+ String getSignature();
- pipe(cgsem->pipefd);
+ void callbackSuccess(String ticket, String signature, String sku);
- /* Make the pipes FD_CLOEXEC to allow them to close should we call
- * execv on restart. */
- for (i = 0; i < 2; i++) {
- fd = cgsem->pipefd[i];
- flags = fcntl(fd, F_GETFD, 0);
- flags |= FD_CLOEXEC;
- fcntl(fd, F_SETFD, flags);
- }
-}
+ void callbackSuccessProductMassConsumed(String ticket, String signature, String sku);
-void cgsem_post(cgsem_t *cgsem) {
- const char buf = 1;
+ void callbackSuccessNoUnconsumedPurchases();
- write(cgsem->pipefd[1], &buf, 1);
-}
+ void callbackFailConsume(String message);
-void cgsem_wait(cgsem_t *cgsem) {
- char buf;
+ void callbackFail(String message);
- read(cgsem->pipefd[0], &buf, 1);
-}
+ void callbackCancel();
-void cgsem_destroy(cgsem_t *cgsem) {
- close(cgsem->pipefd[1]);
- close(cgsem->pipefd[0]);
-}
+ void callbackAlreadyOwned(String sku);
-#include "core/os/memory.h"
+ int getPurchaseCallbackId();
-#include <errno.h>
+ void setPurchaseCallbackId(int purchaseCallbackId);
-Error SemaphoreIphone::wait() {
+ String getPurchaseValidationUrlPrefix();
- cgsem_wait(&sem);
- return OK;
-}
+ void setPurchaseValidationUrlPrefix(String url);
-Error SemaphoreIphone::post() {
+ String getAccessToken();
- cgsem_post(&sem);
+ void setAccessToken(String accessToken);
- return OK;
-}
-int SemaphoreIphone::get() const {
+ void setTransactionId(String transactionId);
- return 0;
-}
+ String getTransactionId();
-SemaphoreOld *SemaphoreIphone::create_semaphore_iphone() {
+ // request purchased items are not consumed
+ void requestPurchased();
- return memnew(SemaphoreIphone);
-}
+ // callback for requestPurchased()
+ void callbackPurchased(String receipt, String signature, String sku);
-void SemaphoreIphone::make_default() {
+ void callbackDisconnected();
- create_func = create_semaphore_iphone;
-}
+ void callbackConnected();
-SemaphoreIphone::SemaphoreIphone() {
+ // true if connected, false otherwise
+ boolean isConnected();
- cgsem_init(&sem);
-}
+ // consume item automatically after purchase. default is true.
+ void setAutoConsume(boolean autoConsume);
+
+ // consume a specific item
+ void consume(String sku);
+
+ // query in app item detail info
+ void querySkuDetails(String[] list);
+
+ void addSkuDetail(String itemJson);
-SemaphoreIphone::~SemaphoreIphone() {
+ void completeSkuDetail();
- cgsem_destroy(&sem);
+ void errorSkuDetail(String errorMessage);
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/payments/PaymentsManager.java b/platform/android/java/lib/src/org/godotengine/godot/payments/PaymentsManager.java
index 90b958266b..9bf6650f84 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/payments/PaymentsManager.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/payments/PaymentsManager.java
@@ -43,7 +43,6 @@ import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import java.util.ArrayList;
import java.util.Arrays;
-import org.godotengine.godot.GodotPaymentV3;
import org.json.JSONException;
import org.json.JSONObject;
@@ -90,9 +89,9 @@ public class PaymentsManager {
public void onServiceDisconnected(ComponentName name) {
mService = null;
- // At this stage, godotPaymentV3 might not have been initialized yet.
- if (godotPaymentV3 != null) {
- godotPaymentV3.callbackDisconnected();
+ // At this stage, godotPayment might not have been initialized yet.
+ if (godotPayment != null) {
+ godotPayment.callbackDisconnected();
}
}
@@ -100,9 +99,9 @@ public class PaymentsManager {
public void onServiceConnected(ComponentName name, IBinder service) {
mService = IInAppBillingService.Stub.asInterface(service);
- // At this stage, godotPaymentV3 might not have been initialized yet.
- if (godotPaymentV3 != null) {
- godotPaymentV3.callbackConnected();
+ // At this stage, godotPayment might not have been initialized yet.
+ if (godotPayment != null) {
+ godotPayment.callbackConnected();
}
}
};
@@ -111,17 +110,17 @@ public class PaymentsManager {
new PurchaseTask(mService, activity) {
@Override
protected void error(String message) {
- godotPaymentV3.callbackFail(message);
+ godotPayment.callbackFail(message);
}
@Override
protected void canceled() {
- godotPaymentV3.callbackCancel();
+ godotPayment.callbackCancel();
}
@Override
protected void alreadyOwned() {
- godotPaymentV3.callbackAlreadyOwned(sku);
+ godotPayment.callbackAlreadyOwned(sku);
}
}
.purchase(sku, transactionId);
@@ -135,19 +134,19 @@ public class PaymentsManager {
new ReleaseAllConsumablesTask(mService, activity) {
@Override
protected void success(String sku, String receipt, String signature, String token) {
- godotPaymentV3.callbackSuccessProductMassConsumed(receipt, signature, sku);
+ godotPayment.callbackSuccessProductMassConsumed(receipt, signature, sku);
}
@Override
protected void error(String message) {
Log.d("godot", "consumeUnconsumedPurchases :" + message);
- godotPaymentV3.callbackFailConsume(message);
+ godotPayment.callbackFailConsume(message);
}
@Override
protected void notRequired() {
Log.d("godot", "callbackSuccessNoUnconsumedPurchases :");
- godotPaymentV3.callbackSuccessNoUnconsumedPurchases();
+ godotPayment.callbackSuccessNoUnconsumedPurchases();
}
}
.consumeItAll();
@@ -168,7 +167,7 @@ public class PaymentsManager {
final ArrayList<String> mySignatures = bundle.getStringArrayList("INAPP_DATA_SIGNATURE_LIST");
if (myPurchases == null || myPurchases.size() == 0) {
- godotPaymentV3.callbackPurchased("", "", "");
+ godotPayment.callbackPurchased("", "", "");
return;
}
@@ -186,7 +185,7 @@ public class PaymentsManager {
pc.setConsumableFlag("block", sku, true);
pc.setConsumableValue("token", sku, token);
- godotPaymentV3.callbackPurchased(receipt, signature, sku);
+ godotPayment.callbackPurchased(receipt, signature, sku);
} catch (JSONException e) {
}
}
@@ -203,7 +202,7 @@ public class PaymentsManager {
new HandlePurchaseTask(activity) {
@Override
protected void success(final String sku, final String signature, final String ticket) {
- godotPaymentV3.callbackSuccess(ticket, signature, sku);
+ godotPayment.callbackSuccess(ticket, signature, sku);
if (auto_consume) {
new ConsumeTask(mService, activity) {
@@ -213,7 +212,7 @@ public class PaymentsManager {
@Override
protected void error(String message) {
- godotPaymentV3.callbackFail(message);
+ godotPayment.callbackFail(message);
}
}
.consume(sku);
@@ -222,12 +221,12 @@ public class PaymentsManager {
@Override
protected void error(String message) {
- godotPaymentV3.callbackFail(message);
+ godotPayment.callbackFail(message);
}
@Override
protected void canceled() {
- godotPaymentV3.callbackCancel();
+ godotPayment.callbackCancel();
}
}
.handlePurchaseRequest(resultCode, data);
@@ -235,19 +234,19 @@ public class PaymentsManager {
public void validatePurchase(String purchaseToken, final String sku) {
- new ValidateTask(activity, godotPaymentV3) {
+ new ValidateTask(activity, godotPayment) {
@Override
protected void success() {
new ConsumeTask(mService, activity) {
@Override
protected void success(String ticket) {
- godotPaymentV3.callbackSuccess(ticket, null, sku);
+ godotPayment.callbackSuccess(ticket, null, sku);
}
@Override
protected void error(String message) {
- godotPaymentV3.callbackFail(message);
+ godotPayment.callbackFail(message);
}
}
.consume(sku);
@@ -255,12 +254,12 @@ public class PaymentsManager {
@Override
protected void error(String message) {
- godotPaymentV3.callbackFail(message);
+ godotPayment.callbackFail(message);
}
@Override
protected void canceled() {
- godotPaymentV3.callbackCancel();
+ godotPayment.callbackCancel();
}
}
.validatePurchase(sku);
@@ -274,12 +273,12 @@ public class PaymentsManager {
new ConsumeTask(mService, activity) {
@Override
protected void success(String ticket) {
- godotPaymentV3.callbackSuccessProductMassConsumed(ticket, "", sku);
+ godotPayment.callbackSuccessProductMassConsumed(ticket, "", sku);
}
@Override
protected void error(String message) {
- godotPaymentV3.callbackFailConsume(message);
+ godotPayment.callbackFailConsume(message);
}
}
.consume(sku);
@@ -387,9 +386,9 @@ public class PaymentsManager {
if (!skuDetails.containsKey("DETAILS_LIST")) {
int response = getResponseCodeFromBundle(skuDetails);
if (response != BILLING_RESPONSE_RESULT_OK) {
- godotPaymentV3.errorSkuDetail(getResponseDesc(response));
+ godotPayment.errorSkuDetail(getResponseDesc(response));
} else {
- godotPaymentV3.errorSkuDetail("No error but no detail list.");
+ godotPayment.errorSkuDetail("No error but no detail list.");
}
return;
}
@@ -398,22 +397,22 @@ public class PaymentsManager {
for (String thisResponse : responseList) {
Log.d("godot", "response = " + thisResponse);
- godotPaymentV3.addSkuDetail(thisResponse);
+ godotPayment.addSkuDetail(thisResponse);
}
} catch (RemoteException e) {
e.printStackTrace();
- godotPaymentV3.errorSkuDetail("RemoteException error!");
+ godotPayment.errorSkuDetail("RemoteException error!");
}
}
- godotPaymentV3.completeSkuDetail();
+ godotPayment.completeSkuDetail();
}
}))
.start();
}
- private GodotPaymentV3 godotPaymentV3;
+ private GodotPaymentInterface godotPayment;
- public void setBaseSingleton(GodotPaymentV3 godotPaymentV3) {
- this.godotPaymentV3 = godotPaymentV3;
+ public void setBaseSingleton(GodotPaymentInterface godotPaymentInterface) {
+ this.godotPayment = godotPaymentInterface;
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/payments/ValidateTask.java b/platform/android/java/lib/src/org/godotengine/godot/payments/ValidateTask.java
index dbb6b8a783..10c314aecf 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/payments/ValidateTask.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/payments/ValidateTask.java
@@ -34,7 +34,6 @@ import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import java.lang.ref.WeakReference;
-import org.godotengine.godot.GodotPaymentV3;
import org.godotengine.godot.utils.HttpRequester;
import org.godotengine.godot.utils.RequestParams;
import org.json.JSONException;
@@ -43,7 +42,7 @@ import org.json.JSONObject;
abstract public class ValidateTask {
private Activity context;
- private GodotPaymentV3 godotPaymentsV3;
+ private GodotPaymentInterface godotPayments;
private ProgressDialog dialog;
private String mSku;
@@ -80,9 +79,9 @@ abstract public class ValidateTask {
}
}
- public ValidateTask(Activity context, GodotPaymentV3 godotPaymentsV3) {
+ public ValidateTask(Activity context, GodotPaymentInterface godotPayments) {
this.context = context;
- this.godotPaymentsV3 = godotPaymentsV3;
+ this.godotPayments = godotPayments;
}
public void validatePurchase(final String sku) {
@@ -96,7 +95,7 @@ abstract public class ValidateTask {
private String doInBackground(String... params) {
PaymentsCache pc = new PaymentsCache(context);
- String url = godotPaymentsV3.getPurchaseValidationUrlPrefix();
+ String url = godotPayments.getPurchaseValidationUrlPrefix();
RequestParams param = new RequestParams();
param.setUrl(url);
param.put("ticket", pc.getConsumableValue("ticket", mSku));
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
new file mode 100644
index 0000000000..d5bf4fc70e
--- /dev/null
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -0,0 +1,256 @@
+/*************************************************************************/
+/* GodotPlugin.java */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* 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. */
+/*************************************************************************/
+
+package org.godotengine.godot.plugin;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.view.View;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+import org.godotengine.godot.Godot;
+
+/**
+ * Base class for the Godot Android plugins.
+ * <p>
+ * A Godot Android plugin is a regular Android library packaged as an aar archive file with the following caveats:
+ * <p>
+ * - The library must have a dependency on the Godot Android library (godot-lib.aar).
+ * A stable version is available for each release.
+ * <p>
+ * - The library must include a <meta-data> tag in its manifest file setup as follow:
+ * <meta-data android:name="org.godotengine.plugin.v1.[PluginName]" android:value="[plugin.init.ClassFullName]" />
+ * Where:
+ * - 'PluginName' is the name of the plugin.
+ * - 'plugin.init.ClassFullName' is the full name (package + class name) of the plugin class
+ * extending {@link GodotPlugin}.
+ *
+ * A plugin can also define and provide c/c++ gdnative libraries and nativescripts for the target
+ * app/game to leverage.
+ * The shared library for the gdnative library will be automatically bundled by the aar build
+ * system.
+ * Godot '*.gdnlib' and '*.gdns' resource files must however be manually defined in the project
+ * 'assets' directory. The recommended path for these resources in the 'assets' directory should be:
+ * 'godot/plugin/v1/[PluginName]/'
+ */
+public abstract class GodotPlugin {
+
+ private final Godot godot;
+
+ public GodotPlugin(Godot godot) {
+ this.godot = godot;
+ }
+
+ /**
+ * Provides access to the Godot engine.
+ */
+ protected Godot getGodot() {
+ return godot;
+ }
+
+ /**
+ * Register the plugin with Godot native code.
+ */
+ public final void onGLRegisterPluginWithGodotNative() {
+ nativeRegisterSingleton(getPluginName());
+
+ Class clazz = getClass();
+ Method[] methods = clazz.getDeclaredMethods();
+ for (Method method : methods) {
+ boolean found = false;
+
+ for (String s : getPluginMethods()) {
+ if (s.equals(method.getName())) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ continue;
+
+ List<String> ptr = new ArrayList<String>();
+
+ Class[] paramTypes = method.getParameterTypes();
+ for (Class c : paramTypes) {
+ ptr.add(c.getName());
+ }
+
+ String[] pt = new String[ptr.size()];
+ ptr.toArray(pt);
+
+ nativeRegisterMethod(getPluginName(), method.getName(), method.getReturnType().getName(), pt);
+ }
+
+ // Get the list of gdnative libraries to register.
+ Set<String> gdnativeLibrariesPaths = getPluginGDNativeLibrariesPaths();
+ if (!gdnativeLibrariesPaths.isEmpty()) {
+ nativeRegisterGDNativeLibraries(gdnativeLibrariesPaths.toArray(new String[0]));
+ }
+ }
+
+ /**
+ * Invoked once during the Godot Android initialization process after creation of the
+ * {@link org.godotengine.godot.GodotView} view.
+ * <p>
+ * This method should be overridden by descendants of this class that would like to add
+ * their view/layout to the Godot view hierarchy.
+ *
+ * @return the view to be included; null if no views should be included.
+ */
+ @Nullable
+ public View onMainCreateView(Activity activity) {
+ return null;
+ }
+
+ /**
+ * @see Activity#onActivityResult(int, int, Intent)
+ */
+ public void onMainActivityResult(int requestCode, int resultCode, Intent data) {
+ }
+
+ /**
+ * @see Activity#onRequestPermissionsResult(int, String[], int[])
+ */
+ public void onMainRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+ }
+
+ /**
+ * @see Activity#onPause()
+ */
+ public void onMainPause() {}
+
+ /**
+ * @see Activity#onResume()
+ */
+ public void onMainResume() {}
+
+ /**
+ * @see Activity#onDestroy()
+ */
+ public void onMainDestroy() {}
+
+ /**
+ * @see Activity#onBackPressed()
+ */
+ public boolean onMainBackPressed() { return false; }
+
+ /**
+ * Invoked on the GL thread when the Godot main loop has started.
+ */
+ public void onGLGodotMainLoopStarted() {}
+
+ /**
+ * Invoked once per frame on the GL thread after the frame is drawn.
+ */
+ public void onGLDrawFrame(GL10 gl) {}
+
+ /**
+ * Called on the GL thread after the surface is created and whenever the OpenGL ES surface size
+ * changes.
+ */
+ public void onGLSurfaceChanged(GL10 gl, int width, int height) {}
+
+ /**
+ * Called on the GL thread when the surface is created or recreated.
+ */
+ public void onGLSurfaceCreated(GL10 gl, EGLConfig config) {}
+
+ /**
+ * Returns the name of the plugin.
+ * <p>
+ * This value must match the one listed in the plugin '<meta-data>' manifest entry.
+ */
+ @NonNull
+ public abstract String getPluginName();
+
+ /**
+ * Returns the list of methods to be exposed to Godot.
+ */
+ @NonNull
+ public abstract List<String> getPluginMethods();
+
+ /**
+ * Returns the paths for the plugin's gdnative libraries.
+ *
+ * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file.
+ */
+ @NonNull
+ protected Set<String> getPluginGDNativeLibrariesPaths() {
+ return Collections.emptySet();
+ }
+
+ /**
+ * Runs the specified action on the UI thread. If the current thread is the UI
+ * thread, then the action is executed immediately. If the current thread is
+ * not the UI thread, the action is posted to the event queue of the UI thread.
+ *
+ * @param action the action to run on the UI thread
+ */
+ protected void runOnUiThread(Runnable action) {
+ godot.runOnUiThread(action);
+ }
+
+ /**
+ * Queue the specified action to be run on the GL thread.
+ *
+ * @param action the action to run on the GL thread
+ */
+ protected void runOnGLThread(Runnable action) {
+ godot.runOnGLThread(action);
+ }
+
+ /**
+ * Used to setup a {@link GodotPlugin} instance.
+ * @param p_name Name of the instance.
+ */
+ private native void nativeRegisterSingleton(String p_name);
+
+ /**
+ * Used to complete registration of the {@link GodotPlugin} instance's methods.
+ * @param p_sname Name of the instance
+ * @param p_name Name of the method to register
+ * @param p_ret Return type of the registered method
+ * @param p_params Method parameters types
+ */
+ private native void nativeRegisterMethod(String p_sname, String p_name, String p_ret, String[] p_params);
+
+ /**
+ * Used to register gdnative libraries bundled by the plugin.
+ * @param gdnlibPaths Paths to the libraries relative to the 'assets' directory.
+ */
+ private native void nativeRegisterGDNativeLibraries(String[] gdnlibPaths);
+}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java
new file mode 100644
index 0000000000..b6d949b7bf
--- /dev/null
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java
@@ -0,0 +1,199 @@
+/*************************************************************************/
+/* GodotPluginRegistry.java */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* 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. */
+/*************************************************************************/
+
+package org.godotengine.godot.plugin;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.text.TextUtils;
+import android.util.Log;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import org.godotengine.godot.Godot;
+
+/**
+ * Registry used to load and access the registered Godot Android plugins.
+ */
+public final class GodotPluginRegistry {
+
+ private static final String TAG = GodotPluginRegistry.class.getSimpleName();
+
+ private static final String GODOT_PLUGIN_V1_NAME_PREFIX = "org.godotengine.plugin.v1.";
+
+ /**
+ * Name for the metadata containing the list of Godot plugins to enable.
+ */
+ private static final String GODOT_ENABLED_PLUGINS_LABEL = "custom_template_plugins";
+
+ private static GodotPluginRegistry instance;
+ private final ConcurrentHashMap<String, GodotPlugin> registry;
+
+ private GodotPluginRegistry(Godot godot) {
+ registry = new ConcurrentHashMap<>();
+ loadPlugins(godot);
+ }
+
+ /**
+ * Retrieve the plugin tied to the given plugin name.
+ * @param pluginName Name of the plugin
+ * @return {@link GodotPlugin} handle if it exists, null otherwise.
+ */
+ @Nullable
+ public GodotPlugin getPlugin(String pluginName) {
+ return registry.get(pluginName);
+ }
+
+ /**
+ * Retrieve the full set of loaded plugins.
+ */
+ public Collection<GodotPlugin> getAllPlugins() {
+ return registry.values();
+ }
+
+ /**
+ * Parse the manifest file and load all included Godot Android plugins.
+ * <p>
+ * A plugin manifest entry is a '<meta-data>' tag setup as described in the {@link GodotPlugin}
+ * documentation.
+ *
+ * @param godot Godot instance
+ * @return A singleton instance of {@link GodotPluginRegistry}. This ensures that only one instance
+ * of each Godot Android plugins is available at runtime.
+ */
+ public static GodotPluginRegistry initializePluginRegistry(Godot godot) {
+ if (instance == null) {
+ instance = new GodotPluginRegistry(godot);
+ }
+
+ return instance;
+ }
+
+ /**
+ * Return the plugin registry if it's initialized.
+ * Throws a {@link IllegalStateException} exception if not.
+ *
+ * @throws IllegalStateException if {@link GodotPluginRegistry#initializePluginRegistry(Godot)} has not been called prior to calling this method.
+ */
+ public static GodotPluginRegistry getPluginRegistry() throws IllegalStateException {
+ if (instance == null) {
+ throw new IllegalStateException("Plugin registry hasn't been initialized.");
+ }
+
+ return instance;
+ }
+
+ private void loadPlugins(Godot godot) {
+ try {
+ ApplicationInfo appInfo = godot
+ .getPackageManager()
+ .getApplicationInfo(godot.getPackageName(), PackageManager.GET_META_DATA);
+ Bundle metaData = appInfo.metaData;
+ if (metaData == null || metaData.isEmpty()) {
+ return;
+ }
+
+ // When using the Godot editor for building and exporting the apk, this is used to check
+ // which plugins to enable since the custom build template may contain prebuilt plugins.
+ // When using a custom process to generate the apk, the metadata is not needed since
+ // it's assumed that the developer is aware of the dependencies included in the apk.
+ final Set<String> enabledPluginsSet;
+ if (metaData.containsKey(GODOT_ENABLED_PLUGINS_LABEL)) {
+ String enabledPlugins = metaData.getString(GODOT_ENABLED_PLUGINS_LABEL, "");
+ String[] enabledPluginsList = enabledPlugins.split(",");
+ if (enabledPluginsList.length == 0) {
+ // No plugins to enable. Aborting early.
+ return;
+ }
+
+ enabledPluginsSet = new HashSet<>();
+ for (String enabledPlugin : enabledPluginsList) {
+ enabledPluginsSet.add(enabledPlugin.trim());
+ }
+ } else {
+ enabledPluginsSet = null;
+ }
+
+ int godotPluginV1NamePrefixLength = GODOT_PLUGIN_V1_NAME_PREFIX.length();
+ for (String metaDataName : metaData.keySet()) {
+ // Parse the meta-data looking for entry with the Godot plugin name prefix.
+ if (metaDataName.startsWith(GODOT_PLUGIN_V1_NAME_PREFIX)) {
+ String pluginName = metaDataName.substring(godotPluginV1NamePrefixLength).trim();
+ if (enabledPluginsSet != null && !enabledPluginsSet.contains(pluginName)) {
+ Log.w(TAG, "Plugin " + pluginName + " is listed in the dependencies but is not enabled.");
+ continue;
+ }
+
+ // Retrieve the plugin class full name.
+ String pluginHandleClassFullName = metaData.getString(metaDataName);
+ if (!TextUtils.isEmpty(pluginHandleClassFullName)) {
+ try {
+ // Attempt to create the plugin init class via reflection.
+ @SuppressWarnings("unchecked")
+ Class<GodotPlugin> pluginClass = (Class<GodotPlugin>)Class
+ .forName(pluginHandleClassFullName);
+ Constructor<GodotPlugin> pluginConstructor = pluginClass
+ .getConstructor(Godot.class);
+ GodotPlugin pluginHandle = pluginConstructor.newInstance(godot);
+
+ // Load the plugin initializer into the registry using the plugin name
+ // as key.
+ if (!pluginName.equals(pluginHandle.getPluginName())) {
+ Log.w(TAG,
+ "Meta-data plugin name does not match the value returned by the plugin handle: " + pluginName + " =/= " + pluginHandle.getPluginName());
+ }
+ registry.put(pluginName, pluginHandle);
+ } catch (ClassNotFoundException e) {
+ Log.w(TAG, "Unable to load Godot plugin " + pluginName, e);
+ } catch (IllegalAccessException e) {
+ Log.w(TAG, "Unable to load Godot plugin " + pluginName, e);
+ } catch (InstantiationException e) {
+ Log.w(TAG, "Unable to load Godot plugin " + pluginName, e);
+ } catch (NoSuchMethodException e) {
+ Log.w(TAG, "Unable to load Godot plugin " + pluginName, e);
+ } catch (InvocationTargetException e) {
+ Log.w(TAG, "Unable to load Godot plugin " + pluginName, e);
+ }
+ } else {
+ Log.w(TAG, "Invalid plugin loader class for " + pluginName);
+ }
+ }
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.e(TAG, "Unable load Godot Android plugins from the manifest file.", e);
+ }
+ }
+}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt
new file mode 100644
index 0000000000..67faad8ddd
--- /dev/null
+++ b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt
@@ -0,0 +1,99 @@
+/*************************************************************************/
+/* VkRenderer.kt */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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:JvmName("VkRenderer")
+package org.godotengine.godot.vulkan
+
+import android.view.Surface
+
+/**
+ * Responsible to setting up and driving the Vulkan rendering logic.
+ *
+ * <h3>Threading</h3>
+ * The renderer will be called on a separate thread, so that rendering
+ * performance is decoupled from the UI thread. Clients typically need to
+ * communicate with the renderer from the UI thread, because that's where
+ * input events are received. Clients can communicate using any of the
+ * standard Java techniques for cross-thread communication, or they can
+ * use the [VkSurfaceView.queueOnVkThread] convenience method.
+ *
+ * @see [VkSurfaceView.startRenderer]
+ */
+internal class VkRenderer {
+
+ /**
+ * Called when the surface is created and signals the beginning of rendering.
+ */
+ fun onVkSurfaceCreated(surface: Surface) {
+ nativeOnVkSurfaceCreated(surface)
+ }
+
+ /**
+ * Called after the surface is created and whenever its size changes.
+ */
+ fun onVkSurfaceChanged(surface: Surface, width: Int, height: Int) {
+ nativeOnVkSurfaceChanged(surface, width, height)
+ }
+
+ /**
+ * Called to draw the current frame.
+ */
+ fun onVkDrawFrame() {
+ nativeOnVkDrawFrame()
+ }
+
+ /**
+ * Called when the rendering thread is resumed.
+ */
+ fun onVkResume() {
+ nativeOnVkResume()
+ }
+
+ /**
+ * Called when the rendering thread is paused.
+ */
+ fun onVkPause() {
+ nativeOnVkPause()
+ }
+
+ /**
+ * Called when the rendering thread is destroyed and used as signal to tear down the Vulkan logic.
+ */
+ fun onVkDestroy() {
+ nativeOnVkDestroy()
+ }
+
+ private external fun nativeOnVkSurfaceCreated(surface: Surface)
+ private external fun nativeOnVkSurfaceChanged(surface: Surface, width: Int, height: Int)
+ private external fun nativeOnVkResume()
+ private external fun nativeOnVkDrawFrame()
+ private external fun nativeOnVkPause()
+ private external fun nativeOnVkDestroy()
+}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkSurfaceView.kt b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkSurfaceView.kt
new file mode 100644
index 0000000000..1c594f3201
--- /dev/null
+++ b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkSurfaceView.kt
@@ -0,0 +1,136 @@
+/*************************************************************************/
+/* VkSurfaceView.kt */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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:JvmName("VkSurfaceView")
+package org.godotengine.godot.vulkan
+
+import android.content.Context
+import android.view.SurfaceHolder
+import android.view.SurfaceView
+
+/**
+ * An implementation of SurfaceView that uses the dedicated surface for
+ * displaying Vulkan rendering.
+ * <p>
+ * A [VkSurfaceView] provides the following features:
+ * <p>
+ * <ul>
+ * <li>Manages a surface, which is a special piece of memory that can be
+ * composited into the Android view system.
+ * <li>Accepts a user-provided [VkRenderer] object that does the actual rendering.
+ * <li>Renders on a dedicated [VkThread] thread to decouple rendering performance from the
+ * UI thread.
+ * </ul>
+ */
+internal class VkSurfaceView(context: Context) : SurfaceView(context), SurfaceHolder.Callback {
+
+ companion object {
+ fun checkState(expression: Boolean, errorMessage: Any) {
+ check(expression) { errorMessage.toString() }
+ }
+ }
+
+ /**
+ * Thread used to drive the vulkan logic.
+ */
+ private val vkThread: VkThread by lazy {
+ VkThread(this, renderer)
+ }
+
+ /**
+ * Performs the actual rendering.
+ */
+ private lateinit var renderer: VkRenderer
+
+ init {
+ isClickable = true
+ holder.addCallback(this)
+ }
+
+ /**
+ * Set the [VkRenderer] associated with the view, and starts the thread that will drive the vulkan
+ * rendering.
+ *
+ * This method should be called once and only once in the life-cycle of [VkSurfaceView].
+ */
+ fun startRenderer(renderer: VkRenderer) {
+ checkState(!this::renderer.isInitialized, "startRenderer must only be invoked once")
+ this.renderer = renderer
+ vkThread.start()
+ }
+
+ /**
+ * Queues a runnable to be run on the Vulkan rendering thread.
+ *
+ * Must not be called before a [VkRenderer] has been set.
+ */
+ fun queueOnVkThread(runnable: Runnable) {
+ vkThread.queueEvent(runnable)
+ }
+
+ /**
+ * Resumes the rendering thread.
+ *
+ * Must not be called before a [VkRenderer] has been set.
+ */
+ fun onResume() {
+ vkThread.onResume()
+ }
+
+ /**
+ * Pauses the rendering thread.
+ *
+ * Must not be called before a [VkRenderer] has been set.
+ */
+ fun onPause() {
+ vkThread.onPause()
+ }
+
+ /**
+ * Tear down the rendering thread.
+ *
+ * Must not be called before a [VkRenderer] has been set.
+ */
+ fun onDestroy() {
+ vkThread.blockingExit()
+ }
+
+ override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
+ vkThread.onSurfaceChanged(width, height)
+ }
+
+ override fun surfaceDestroyed(holder: SurfaceHolder) {
+ vkThread.onSurfaceDestroyed()
+ }
+
+ override fun surfaceCreated(holder: SurfaceHolder) {
+ vkThread.onSurfaceCreated()
+ }
+}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkThread.kt b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkThread.kt
new file mode 100644
index 0000000000..2e332840bf
--- /dev/null
+++ b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkThread.kt
@@ -0,0 +1,230 @@
+/*************************************************************************/
+/* VkThread.kt */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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:JvmName("VkThread")
+package org.godotengine.godot.vulkan
+
+import android.util.Log
+import java.util.concurrent.locks.ReentrantLock
+import kotlin.concurrent.withLock
+
+/**
+ * Thread implementation for the [VkSurfaceView] onto which the vulkan logic is ran.
+ *
+ * The implementation is modeled after [android.opengl.GLSurfaceView]'s GLThread.
+ */
+internal class VkThread(private val vkSurfaceView: VkSurfaceView, private val vkRenderer: VkRenderer) : Thread(TAG) {
+
+ companion object {
+ private val TAG = VkThread::class.java.simpleName
+ }
+
+ /**
+ * Used to run events scheduled on the thread.
+ */
+ private val eventQueue = ArrayList<Runnable>()
+
+ /**
+ * Used to synchronize interaction with other threads (e.g: main thread).
+ */
+ private val lock = ReentrantLock()
+ private val lockCondition = lock.newCondition()
+
+ private var shouldExit = false
+ private var exited = false
+ private var rendererInitialized = false
+ private var rendererResumed = false
+ private var resumed = false
+ private var hasSurface = false
+ private var width = 0
+ private var height = 0
+
+ /**
+ * Determine when drawing can occur on the thread. This usually occurs after the
+ * [android.view.Surface] is available, the app is in a resumed state.
+ */
+ private val readyToDraw
+ get() = hasSurface && resumed
+
+ private fun threadExiting() {
+ lock.withLock {
+ exited = true
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Queue an event on the [VkThread].
+ */
+ fun queueEvent(event: Runnable) {
+ lock.withLock {
+ eventQueue.add(event)
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Request the thread to exit and block until it's done.
+ */
+ fun blockingExit() {
+ lock.withLock {
+ shouldExit = true
+ lockCondition.signalAll()
+ while (!exited) {
+ try {
+ Log.i(TAG, "Waiting on exit for $name")
+ lockCondition.await()
+ } catch (ex: InterruptedException) {
+ currentThread().interrupt()
+ }
+ }
+ }
+ }
+
+ /**
+ * Invoked when the app resumes.
+ */
+ fun onResume() {
+ lock.withLock {
+ resumed = true
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Invoked when the app pauses.
+ */
+ fun onPause() {
+ lock.withLock {
+ resumed = false
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Invoked when the [android.view.Surface] has been created.
+ */
+ fun onSurfaceCreated() {
+ // This is a no op because surface creation will always be followed by surfaceChanged()
+ // which provide all the needed information.
+ }
+
+ /**
+ * Invoked following structural updates to [android.view.Surface].
+ */
+ fun onSurfaceChanged(width: Int, height: Int) {
+ lock.withLock {
+ hasSurface = true
+ this.width = width
+ this.height = height
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Invoked when the [android.view.Surface] is no longer available.
+ */
+ fun onSurfaceDestroyed() {
+ lock.withLock {
+ hasSurface = false
+ lockCondition.signalAll()
+ }
+ }
+
+ /**
+ * Thread loop modeled after [android.opengl.GLSurfaceView]'s GLThread.
+ */
+ override fun run() {
+ try {
+ while (true) {
+ var event: Runnable? = null
+ lock.withLock {
+ while (true) {
+ // Code path for exiting the thread loop.
+ if (shouldExit) {
+ vkRenderer.onVkDestroy()
+ return
+ }
+
+ // Check for events and execute them outside of the loop if found to avoid
+ // blocking the thread lifecycle by holding onto the lock.
+ if (eventQueue.isNotEmpty()) {
+ event = eventQueue.removeAt(0)
+ break;
+ }
+
+ if (readyToDraw) {
+ if (!rendererResumed) {
+ rendererResumed = true
+ vkRenderer.onVkResume()
+
+ if (!rendererInitialized) {
+ rendererInitialized = true
+ vkRenderer.onVkSurfaceCreated(vkSurfaceView.holder.surface)
+ }
+
+ vkRenderer.onVkSurfaceChanged(vkSurfaceView.holder.surface, width, height)
+ }
+
+ // Break out of the loop so drawing can occur without holding onto the lock.
+ break;
+ } else if (rendererResumed) {
+ // If we aren't ready to draw but are resumed, that means we either lost a surface
+ // or the app was paused.
+ rendererResumed = false
+ vkRenderer.onVkPause()
+ }
+ // We only reach this state if we are not ready to draw and have no queued events, so
+ // we wait.
+ // On state change, the thread will be awoken using the [lock] and [lockCondition], and
+ // we will resume execution.
+ lockCondition.await()
+ }
+ }
+
+ // Run queued event.
+ if (event != null) {
+ event?.run()
+ continue
+ }
+
+ // Draw only when there no more queued events.
+ vkRenderer.onVkDrawFrame()
+ }
+ } catch (ex: InterruptedException) {
+ Log.i(TAG, ex.message)
+ } catch (ex: IllegalStateException) {
+ Log.i(TAG, ex.message)
+ } finally {
+ threadExiting()
+ }
+ }
+
+}
diff --git a/platform/android/java/plugins/godotpayment/build.gradle b/platform/android/java/plugins/godotpayment/build.gradle
new file mode 100644
index 0000000000..4f376c4587
--- /dev/null
+++ b/platform/android/java/plugins/godotpayment/build.gradle
@@ -0,0 +1,31 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion versions.compileSdk
+ buildToolsVersion versions.buildTools
+
+ defaultConfig {
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ libraryVariants.all { variant ->
+ variant.outputs.all { output ->
+ output.outputFileName = "GodotPayment.${variant.name}.aar"
+ }
+ }
+
+}
+
+dependencies {
+ implementation libraries.supportCoreUtils
+ implementation libraries.v4Support
+
+ if (rootProject.findProject(":lib")) {
+ compileOnly project(":lib")
+ } else if (rootProject.findProject(":godot:lib")) {
+ compileOnly project(":godot:lib")
+ } else {
+ compileOnly fileTree(dir: 'libs', include: ['godot-lib*.aar'])
+ }
+}
diff --git a/platform/android/java/plugins/godotpayment/src/main/AndroidManifest.xml b/platform/android/java/plugins/godotpayment/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..61afa03799
--- /dev/null
+++ b/platform/android/java/plugins/godotpayment/src/main/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.godotengine.godot.plugin.payment">
+
+ <application>
+
+ <meta-data
+ android:name="org.godotengine.plugin.v1.GodotPayment"
+ android:value="org.godotengine.godot.plugin.payment.GodotPayment" />
+
+ </application>
+</manifest>
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotPaymentV3.java b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
index 93265d509f..4a6b611c4d 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotPaymentV3.java
+++ b/platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* GodotPaymentV3.java */
+/* GodotPayment.java */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,20 +28,24 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-package org.godotengine.godot;
+package org.godotengine.godot.plugin.payment;
-import android.app.Activity;
+import android.support.annotation.NonNull;
import android.util.Log;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.godotengine.godot.Dictionary;
+import org.godotengine.godot.Godot;
+import org.godotengine.godot.GodotLib;
+import org.godotengine.godot.payments.GodotPaymentInterface;
import org.godotengine.godot.payments.PaymentsManager;
+import org.godotengine.godot.plugin.GodotPlugin;
import org.json.JSONException;
import org.json.JSONObject;
-public class GodotPaymentV3 extends Godot.SingletonBase {
+public class GodotPayment extends GodotPlugin implements GodotPaymentInterface {
- private Godot activity;
private Integer purchaseCallbackId = 0;
private String accessToken;
private String purchaseValidationUrlPrefix;
@@ -49,8 +53,15 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
private PaymentsManager mPaymentManager;
private Dictionary mSkuDetails = new Dictionary();
+ public GodotPayment(Godot godot) {
+ super(godot);
+ mPaymentManager = godot.getPaymentsManager();
+ mPaymentManager.setBaseSingleton(this);
+ }
+
+ @Override
public void purchase(final String sku, final String transactionId) {
- activity.runOnUiThread(new Runnable() {
+ runOnUiThread(new Runnable() {
@Override
public void run() {
mPaymentManager.requestPurchase(sku, transactionId);
@@ -58,21 +69,9 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
});
}
- static public Godot.SingletonBase initialize(Activity p_activity) {
-
- return new GodotPaymentV3(p_activity);
- }
-
- public GodotPaymentV3(Activity p_activity) {
-
- registerClass("GodotPayments", new String[] { "purchase", "setPurchaseCallbackId", "setPurchaseValidationUrlPrefix", "setTransactionId", "getSignature", "consumeUnconsumedPurchases", "requestPurchased", "setAutoConsume", "consume", "querySkuDetails", "isConnected" });
- activity = (Godot)p_activity;
- mPaymentManager = activity.getPaymentsManager();
- mPaymentManager.setBaseSingleton(this);
- }
-
+ @Override
public void consumeUnconsumedPurchases() {
- activity.runOnUiThread(new Runnable() {
+ runOnUiThread(new Runnable() {
@Override
public void run() {
mPaymentManager.consumeUnconsumedPurchases();
@@ -82,74 +81,91 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
private String signature;
+ @Override
public String getSignature() {
return this.signature;
}
+ @Override
public void callbackSuccess(String ticket, String signature, String sku) {
GodotLib.calldeferred(purchaseCallbackId, "purchase_success", new Object[] { ticket, signature, sku });
}
+ @Override
public void callbackSuccessProductMassConsumed(String ticket, String signature, String sku) {
Log.d(this.getClass().getName(), "callbackSuccessProductMassConsumed > " + ticket + "," + signature + "," + sku);
GodotLib.calldeferred(purchaseCallbackId, "consume_success", new Object[] { ticket, signature, sku });
}
+ @Override
public void callbackSuccessNoUnconsumedPurchases() {
GodotLib.calldeferred(purchaseCallbackId, "consume_not_required", new Object[] {});
}
+ @Override
public void callbackFailConsume(String message) {
GodotLib.calldeferred(purchaseCallbackId, "consume_fail", new Object[] { message });
}
+ @Override
public void callbackFail(String message) {
GodotLib.calldeferred(purchaseCallbackId, "purchase_fail", new Object[] { message });
}
+ @Override
public void callbackCancel() {
GodotLib.calldeferred(purchaseCallbackId, "purchase_cancel", new Object[] {});
}
+ @Override
public void callbackAlreadyOwned(String sku) {
GodotLib.calldeferred(purchaseCallbackId, "purchase_owned", new Object[] { sku });
}
+ @Override
public int getPurchaseCallbackId() {
return purchaseCallbackId;
}
+ @Override
public void setPurchaseCallbackId(int purchaseCallbackId) {
this.purchaseCallbackId = purchaseCallbackId;
}
+ @Override
public String getPurchaseValidationUrlPrefix() {
return this.purchaseValidationUrlPrefix;
}
+ @Override
public void setPurchaseValidationUrlPrefix(String url) {
this.purchaseValidationUrlPrefix = url;
}
+ @Override
public String getAccessToken() {
return accessToken;
}
+ @Override
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
+ @Override
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
+ @Override
public String getTransactionId() {
return this.transactionId;
}
// request purchased items are not consumed
+ @Override
public void requestPurchased() {
- activity.runOnUiThread(new Runnable() {
+ runOnUiThread(new Runnable() {
@Override
public void run() {
mPaymentManager.requestPurchased();
@@ -158,34 +174,41 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
}
// callback for requestPurchased()
+ @Override
public void callbackPurchased(String receipt, String signature, String sku) {
GodotLib.calldeferred(purchaseCallbackId, "has_purchased", new Object[] { receipt, signature, sku });
}
+ @Override
public void callbackDisconnected() {
GodotLib.calldeferred(purchaseCallbackId, "iap_disconnected", new Object[] {});
}
+ @Override
public void callbackConnected() {
GodotLib.calldeferred(purchaseCallbackId, "iap_connected", new Object[] {});
}
// true if connected, false otherwise
+ @Override
public boolean isConnected() {
return mPaymentManager.isConnected();
}
// consume item automatically after purchase. default is true.
+ @Override
public void setAutoConsume(boolean autoConsume) {
mPaymentManager.setAutoConsume(autoConsume);
}
// consume a specific item
+ @Override
public void consume(String sku) {
mPaymentManager.consume(sku);
}
// query in app item detail info
+ @Override
public void querySkuDetails(String[] list) {
List<String> nKeys = Arrays.asList(list);
List<String> cKeys = Arrays.asList(mSkuDetails.get_keys());
@@ -202,6 +225,7 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
}
}
+ @Override
public void addSkuDetail(String itemJson) {
JSONObject o = null;
try {
@@ -220,11 +244,25 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
}
}
+ @Override
public void completeSkuDetail() {
GodotLib.calldeferred(purchaseCallbackId, "sku_details_complete", new Object[] { mSkuDetails });
}
+ @Override
public void errorSkuDetail(String errorMessage) {
GodotLib.calldeferred(purchaseCallbackId, "sku_details_error", new Object[] { errorMessage });
}
+
+ @NonNull
+ @Override
+ public String getPluginName() {
+ return "GodotPayment";
+ }
+
+ @NonNull
+ @Override
+ public List<String> getPluginMethods() {
+ return Arrays.asList("purchase", "setPurchaseCallbackId", "setPurchaseValidationUrlPrefix", "setTransactionId", "getSignature", "consumeUnconsumedPurchases", "requestPurchased", "setAutoConsume", "consume", "querySkuDetails", "isConnected");
+ }
}
diff --git a/platform/android/java/settings.gradle b/platform/android/java/settings.gradle
index f6921c70aa..9536d3de6d 100644
--- a/platform/android/java/settings.gradle
+++ b/platform/android/java/settings.gradle
@@ -3,3 +3,4 @@ rootProject.name = "Godot"
include ':app'
include ':lib'
+include ':plugins:godotpayment'
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index fe2fd89710..9e9b17fb99 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -32,7 +32,7 @@
#include "string_android.h"
#include "thread_jandroid.h"
-bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error, Variant &ret) {
+bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret) {
Map<StringName, List<MethodInfo> >::Element *M = methods.find(p_method);
if (!M)
@@ -44,20 +44,20 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
for (List<MethodInfo>::Element *E = M->get().front(); E; E = E->next()) {
if (!p_instance && !E->get()._static) {
- r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
continue;
}
int pc = E->get().param_types.size();
if (pc > p_argcount) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = pc;
continue;
}
if (pc < p_argcount) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = pc;
continue;
}
@@ -97,7 +97,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
case ARG_TYPE_DOUBLE: {
if (!p_args[i]->is_num())
- arg_expected = Variant::REAL;
+ arg_expected = Variant::FLOAT;
} break;
case ARG_TYPE_STRING: {
@@ -141,7 +141,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
}
if (arg_expected != Variant::NIL) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = i;
r_error.expected = arg_expected;
valid = false;
@@ -158,7 +158,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
if (!method)
return true; //no version convinces
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
jvalue *argv = NULL;
@@ -405,7 +405,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
}
}
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
bool success = true;
switch (method->return_type) {
@@ -501,7 +501,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
if (!_convert_object_to_variant(env, obj, ret, method->return_type)) {
ret = Variant();
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
success = false;
}
env->DeleteLocalRef(obj);
@@ -517,7 +517,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
return success;
}
-Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
Variant ret;
bool found = _call_method(NULL, p_method, p_args, p_argcount, r_error, ret);
@@ -533,7 +533,7 @@ JavaClass::JavaClass() {
/////////////////////
-Variant JavaObject::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant JavaObject::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
return Variant();
}
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp
index dedb2ee114..0b1d070441 100644
--- a/platform/android/java_godot_lib_jni.cpp
+++ b/platform/android/java_godot_lib_jni.cpp
@@ -33,14 +33,15 @@
#include "java_godot_wrapper.h"
#include "android/asset_manager_jni.h"
+#include "android_keys_utils.h"
#include "api/java_class_wrapper.h"
#include "audio_driver_jandroid.h"
#include "core/engine.h"
-#include "core/os/keyboard.h"
#include "core/project_settings.h"
#include "dir_access_jandroid.h"
#include "file_access_android.h"
#include "file_access_jandroid.h"
+#include "jni_utils.h"
#include "main/input_default.h"
#include "main/main.h"
#include "net_socket_android.h"
@@ -54,544 +55,6 @@ static OS_Android *os_android = NULL;
static GodotJavaWrapper *godot_java = NULL;
static GodotIOJavaWrapper *godot_io_java = NULL;
-struct jvalret {
-
- jobject obj;
- jvalue val;
- jvalret() { obj = NULL; }
-};
-
-jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_arg, bool force_jobject = false) {
-
- jvalret v;
-
- switch (p_type) {
-
- case Variant::BOOL: {
-
- if (force_jobject) {
- jclass bclass = env->FindClass("java/lang/Boolean");
- jmethodID ctor = env->GetMethodID(bclass, "<init>", "(Z)V");
- jvalue val;
- val.z = (bool)(*p_arg);
- jobject obj = env->NewObjectA(bclass, ctor, &val);
- v.val.l = obj;
- v.obj = obj;
- env->DeleteLocalRef(bclass);
- } else {
- v.val.z = *p_arg;
- };
- } break;
- case Variant::INT: {
-
- if (force_jobject) {
-
- jclass bclass = env->FindClass("java/lang/Integer");
- jmethodID ctor = env->GetMethodID(bclass, "<init>", "(I)V");
- jvalue val;
- val.i = (int)(*p_arg);
- jobject obj = env->NewObjectA(bclass, ctor, &val);
- v.val.l = obj;
- v.obj = obj;
- env->DeleteLocalRef(bclass);
-
- } else {
- v.val.i = *p_arg;
- };
- } break;
- case Variant::REAL: {
-
- if (force_jobject) {
-
- jclass bclass = env->FindClass("java/lang/Double");
- jmethodID ctor = env->GetMethodID(bclass, "<init>", "(D)V");
- jvalue val;
- val.d = (double)(*p_arg);
- jobject obj = env->NewObjectA(bclass, ctor, &val);
- v.val.l = obj;
- v.obj = obj;
- env->DeleteLocalRef(bclass);
-
- } else {
- v.val.f = *p_arg;
- };
- } break;
- case Variant::STRING: {
-
- String s = *p_arg;
- jstring jStr = env->NewStringUTF(s.utf8().get_data());
- v.val.l = jStr;
- v.obj = jStr;
- } break;
- case Variant::POOL_STRING_ARRAY: {
-
- PoolVector<String> sarray = *p_arg;
- jobjectArray arr = env->NewObjectArray(sarray.size(), env->FindClass("java/lang/String"), env->NewStringUTF(""));
-
- for (int j = 0; j < sarray.size(); j++) {
-
- jstring str = env->NewStringUTF(sarray[j].utf8().get_data());
- env->SetObjectArrayElement(arr, j, str);
- env->DeleteLocalRef(str);
- }
- v.val.l = arr;
- v.obj = arr;
-
- } break;
-
- case Variant::DICTIONARY: {
-
- Dictionary dict = *p_arg;
- jclass dclass = env->FindClass("org/godotengine/godot/Dictionary");
- jmethodID ctor = env->GetMethodID(dclass, "<init>", "()V");
- jobject jdict = env->NewObject(dclass, ctor);
-
- Array keys = dict.keys();
-
- jobjectArray jkeys = env->NewObjectArray(keys.size(), env->FindClass("java/lang/String"), env->NewStringUTF(""));
- for (int j = 0; j < keys.size(); j++) {
- jstring str = env->NewStringUTF(String(keys[j]).utf8().get_data());
- env->SetObjectArrayElement(jkeys, j, str);
- env->DeleteLocalRef(str);
- };
-
- jmethodID set_keys = env->GetMethodID(dclass, "set_keys", "([Ljava/lang/String;)V");
- jvalue val;
- val.l = jkeys;
- env->CallVoidMethodA(jdict, set_keys, &val);
- env->DeleteLocalRef(jkeys);
-
- jobjectArray jvalues = env->NewObjectArray(keys.size(), env->FindClass("java/lang/Object"), NULL);
-
- for (int j = 0; j < keys.size(); j++) {
- Variant var = dict[keys[j]];
- jvalret v = _variant_to_jvalue(env, var.get_type(), &var, true);
- env->SetObjectArrayElement(jvalues, j, v.val.l);
- if (v.obj) {
- env->DeleteLocalRef(v.obj);
- }
- };
-
- jmethodID set_values = env->GetMethodID(dclass, "set_values", "([Ljava/lang/Object;)V");
- val.l = jvalues;
- env->CallVoidMethodA(jdict, set_values, &val);
- env->DeleteLocalRef(jvalues);
- env->DeleteLocalRef(dclass);
-
- v.val.l = jdict;
- v.obj = jdict;
- } break;
-
- case Variant::POOL_INT_ARRAY: {
-
- PoolVector<int> array = *p_arg;
- jintArray arr = env->NewIntArray(array.size());
- PoolVector<int>::Read r = array.read();
- env->SetIntArrayRegion(arr, 0, array.size(), r.ptr());
- v.val.l = arr;
- v.obj = arr;
-
- } break;
- case Variant::POOL_BYTE_ARRAY: {
- PoolVector<uint8_t> array = *p_arg;
- jbyteArray arr = env->NewByteArray(array.size());
- PoolVector<uint8_t>::Read r = array.read();
- env->SetByteArrayRegion(arr, 0, array.size(), reinterpret_cast<const signed char *>(r.ptr()));
- v.val.l = arr;
- v.obj = arr;
-
- } break;
- case Variant::POOL_REAL_ARRAY: {
-
- PoolVector<float> array = *p_arg;
- jfloatArray arr = env->NewFloatArray(array.size());
- PoolVector<float>::Read r = array.read();
- env->SetFloatArrayRegion(arr, 0, array.size(), r.ptr());
- v.val.l = arr;
- v.obj = arr;
-
- } break;
- default: {
-
- v.val.i = 0;
- } break;
- }
- return v;
-}
-
-String _get_class_name(JNIEnv *env, jclass cls, bool *array) {
-
- jclass cclass = env->FindClass("java/lang/Class");
- jmethodID getName = env->GetMethodID(cclass, "getName", "()Ljava/lang/String;");
- jstring clsName = (jstring)env->CallObjectMethod(cls, getName);
-
- if (array) {
- jmethodID isArray = env->GetMethodID(cclass, "isArray", "()Z");
- jboolean isarr = env->CallBooleanMethod(cls, isArray);
- (*array) = isarr ? true : false;
- }
- String name = jstring_to_string(clsName, env);
- env->DeleteLocalRef(clsName);
-
- return name;
-}
-
-Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
-
- if (obj == NULL) {
- return Variant();
- }
-
- jclass c = env->GetObjectClass(obj);
- bool array;
- String name = _get_class_name(env, c, &array);
-
- if (name == "java.lang.String") {
-
- return jstring_to_string((jstring)obj, env);
- };
-
- if (name == "[Ljava.lang.String;") {
-
- jobjectArray arr = (jobjectArray)obj;
- int stringCount = env->GetArrayLength(arr);
- PoolVector<String> sarr;
-
- for (int i = 0; i < stringCount; i++) {
- jstring string = (jstring)env->GetObjectArrayElement(arr, i);
- sarr.push_back(jstring_to_string(string, env));
- env->DeleteLocalRef(string);
- }
-
- return sarr;
- };
-
- if (name == "java.lang.Boolean") {
-
- jmethodID boolValue = env->GetMethodID(c, "booleanValue", "()Z");
- bool ret = env->CallBooleanMethod(obj, boolValue);
- return ret;
- };
-
- if (name == "java.lang.Integer" || name == "java.lang.Long") {
-
- jclass nclass = env->FindClass("java/lang/Number");
- jmethodID longValue = env->GetMethodID(nclass, "longValue", "()J");
- jlong ret = env->CallLongMethod(obj, longValue);
- return ret;
- };
-
- if (name == "[I") {
-
- jintArray arr = (jintArray)obj;
- int fCount = env->GetArrayLength(arr);
- PoolVector<int> sarr;
- sarr.resize(fCount);
-
- PoolVector<int>::Write w = sarr.write();
- env->GetIntArrayRegion(arr, 0, fCount, w.ptr());
- w.release();
- return sarr;
- };
-
- if (name == "[B") {
-
- jbyteArray arr = (jbyteArray)obj;
- int fCount = env->GetArrayLength(arr);
- PoolVector<uint8_t> sarr;
- sarr.resize(fCount);
-
- PoolVector<uint8_t>::Write w = sarr.write();
- env->GetByteArrayRegion(arr, 0, fCount, reinterpret_cast<signed char *>(w.ptr()));
- w.release();
- return sarr;
- };
-
- if (name == "java.lang.Float" || name == "java.lang.Double") {
-
- jclass nclass = env->FindClass("java/lang/Number");
- jmethodID doubleValue = env->GetMethodID(nclass, "doubleValue", "()D");
- double ret = env->CallDoubleMethod(obj, doubleValue);
- return ret;
- };
-
- if (name == "[D") {
-
- jdoubleArray arr = (jdoubleArray)obj;
- int fCount = env->GetArrayLength(arr);
- PoolRealArray sarr;
- sarr.resize(fCount);
-
- PoolRealArray::Write w = sarr.write();
-
- for (int i = 0; i < fCount; i++) {
-
- double n;
- env->GetDoubleArrayRegion(arr, i, 1, &n);
- w.ptr()[i] = n;
- };
- return sarr;
- };
-
- if (name == "[F") {
-
- jfloatArray arr = (jfloatArray)obj;
- int fCount = env->GetArrayLength(arr);
- PoolRealArray sarr;
- sarr.resize(fCount);
-
- PoolRealArray::Write w = sarr.write();
-
- for (int i = 0; i < fCount; i++) {
-
- float n;
- env->GetFloatArrayRegion(arr, i, 1, &n);
- w.ptr()[i] = n;
- };
- return sarr;
- };
-
- if (name == "[Ljava.lang.Object;") {
-
- jobjectArray arr = (jobjectArray)obj;
- int objCount = env->GetArrayLength(arr);
- Array varr;
-
- for (int i = 0; i < objCount; i++) {
- jobject jobj = env->GetObjectArrayElement(arr, i);
- Variant v = _jobject_to_variant(env, jobj);
- varr.push_back(v);
- env->DeleteLocalRef(jobj);
- }
-
- return varr;
- };
-
- if (name == "java.util.HashMap" || name == "org.godotengine.godot.Dictionary") {
-
- Dictionary ret;
- jclass oclass = c;
- jmethodID get_keys = env->GetMethodID(oclass, "get_keys", "()[Ljava/lang/String;");
- jobjectArray arr = (jobjectArray)env->CallObjectMethod(obj, get_keys);
-
- PoolStringArray keys = _jobject_to_variant(env, arr);
- env->DeleteLocalRef(arr);
-
- jmethodID get_values = env->GetMethodID(oclass, "get_values", "()[Ljava/lang/Object;");
- arr = (jobjectArray)env->CallObjectMethod(obj, get_values);
-
- Array vals = _jobject_to_variant(env, arr);
- env->DeleteLocalRef(arr);
-
- for (int i = 0; i < keys.size(); i++) {
-
- ret[keys[i]] = vals[i];
- };
-
- return ret;
- };
-
- env->DeleteLocalRef(c);
-
- return Variant();
-}
-
-class JNISingleton : public Object {
-
- GDCLASS(JNISingleton, Object);
-
- struct MethodData {
-
- jmethodID method;
- Variant::Type ret_type;
- Vector<Variant::Type> argtypes;
- };
-
- jobject instance;
- Map<StringName, MethodData> method_map;
-
-public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
-
- ERR_FAIL_COND_V(!instance, Variant());
-
- r_error.error = Variant::CallError::CALL_OK;
-
- Map<StringName, MethodData>::Element *E = method_map.find(p_method);
- if (!E) {
-
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
- return Variant();
- }
-
- int ac = E->get().argtypes.size();
- if (ac < p_argcount) {
-
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = ac;
- return Variant();
- }
-
- if (ac > p_argcount) {
-
- r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
- r_error.argument = ac;
- return Variant();
- }
-
- for (int i = 0; i < p_argcount; i++) {
-
- if (!Variant::can_convert(p_args[i]->get_type(), E->get().argtypes[i])) {
-
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
- r_error.argument = i;
- r_error.expected = E->get().argtypes[i];
- }
- }
-
- jvalue *v = NULL;
-
- if (p_argcount) {
-
- v = (jvalue *)alloca(sizeof(jvalue) * p_argcount);
- }
-
- JNIEnv *env = ThreadAndroid::get_env();
-
- int res = env->PushLocalFrame(16);
-
- ERR_FAIL_COND_V(res != 0, Variant());
-
- List<jobject> to_erase;
- for (int i = 0; i < p_argcount; i++) {
-
- jvalret vr = _variant_to_jvalue(env, E->get().argtypes[i], p_args[i]);
- v[i] = vr.val;
- if (vr.obj)
- to_erase.push_back(vr.obj);
- }
-
- Variant ret;
-
- switch (E->get().ret_type) {
-
- case Variant::NIL: {
-
- env->CallVoidMethodA(instance, E->get().method, v);
- } break;
- case Variant::BOOL: {
-
- ret = env->CallBooleanMethodA(instance, E->get().method, v) == JNI_TRUE;
- } break;
- case Variant::INT: {
-
- ret = env->CallIntMethodA(instance, E->get().method, v);
- } break;
- case Variant::REAL: {
-
- ret = env->CallFloatMethodA(instance, E->get().method, v);
- } break;
- case Variant::STRING: {
-
- jobject o = env->CallObjectMethodA(instance, E->get().method, v);
- ret = jstring_to_string((jstring)o, env);
- env->DeleteLocalRef(o);
- } break;
- case Variant::POOL_STRING_ARRAY: {
-
- jobjectArray arr = (jobjectArray)env->CallObjectMethodA(instance, E->get().method, v);
-
- ret = _jobject_to_variant(env, arr);
-
- env->DeleteLocalRef(arr);
- } break;
- case Variant::POOL_INT_ARRAY: {
-
- jintArray arr = (jintArray)env->CallObjectMethodA(instance, E->get().method, v);
-
- int fCount = env->GetArrayLength(arr);
- PoolVector<int> sarr;
- sarr.resize(fCount);
-
- PoolVector<int>::Write w = sarr.write();
- env->GetIntArrayRegion(arr, 0, fCount, w.ptr());
- w.release();
- ret = sarr;
- env->DeleteLocalRef(arr);
- } break;
- case Variant::POOL_REAL_ARRAY: {
-
- jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance, E->get().method, v);
-
- int fCount = env->GetArrayLength(arr);
- PoolVector<float> sarr;
- sarr.resize(fCount);
-
- PoolVector<float>::Write w = sarr.write();
- env->GetFloatArrayRegion(arr, 0, fCount, w.ptr());
- w.release();
- ret = sarr;
- env->DeleteLocalRef(arr);
- } break;
-
- case Variant::DICTIONARY: {
-
- jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
- ret = _jobject_to_variant(env, obj);
- env->DeleteLocalRef(obj);
-
- } break;
- default: {
-
- env->PopLocalFrame(NULL);
- ERR_FAIL_V(Variant());
- } break;
- }
-
- while (to_erase.size()) {
- env->DeleteLocalRef(to_erase.front()->get());
- to_erase.pop_front();
- }
-
- env->PopLocalFrame(NULL);
-
- return ret;
- }
-
- jobject get_instance() const {
-
- return instance;
- }
- void set_instance(jobject p_instance) {
-
- instance = p_instance;
- }
-
- void add_method(const StringName &p_name, jmethodID p_method, const Vector<Variant::Type> &p_args, Variant::Type p_ret_type) {
-
- MethodData md;
- md.method = p_method;
- md.argtypes = p_args;
- md.ret_type = p_ret_type;
- method_map[p_name] = md;
- }
-
- JNISingleton() {
- instance = NULL;
- }
-};
-
-struct TST {
-
- int a;
- TST() {
-
- a = 5;
- }
-};
-
-TST tst;
-
static bool initialized = false;
static int step = 0;
@@ -600,20 +63,16 @@ static Vector3 accelerometer;
static Vector3 gravity;
static Vector3 magnetometer;
static Vector3 gyroscope;
-static HashMap<String, JNISingleton *> jni_singletons;
-// virtual Error native_video_play(String p_path);
-// virtual bool native_video_is_playing();
-// virtual void native_video_pause();
-// virtual void native_video_stop();
+extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jobject obj, jint p_height) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jclass clazz, jint p_height) {
if (godot_io_java) {
godot_io_java->set_vk_height(p_height);
}
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jclass clazz, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion) {
initialized = true;
@@ -646,7 +105,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
godot_java->on_video_init(env);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jobject obj, jobject activity) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jclass clazz, jobject activity) {
// lets cleanup
if (godot_io_java) {
delete godot_io_java;
@@ -659,47 +118,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env
}
}
-static void _initialize_java_modules() {
-
- if (!ProjectSettings::get_singleton()->has_setting("android/modules")) {
- return;
- }
-
- String modules = ProjectSettings::get_singleton()->get("android/modules");
- modules = modules.strip_edges();
- if (modules == String()) {
- return;
- }
- Vector<String> mods = modules.split(",", false);
-
- if (mods.size()) {
- jobject cls = godot_java->get_class_loader();
-
- // TODO create wrapper for class loader
-
- JNIEnv *env = ThreadAndroid::get_env();
- jclass classLoader = env->FindClass("java/lang/ClassLoader");
- jmethodID findClass = env->GetMethodID(classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
-
- for (int i = 0; i < mods.size(); i++) {
-
- String m = mods[i];
-
- print_line("Loading Android module: " + m);
- jstring strClassName = env->NewStringUTF(m.utf8().get_data());
- jclass singletonClass = (jclass)env->CallObjectMethod(cls, findClass, strClassName);
- ERR_CONTINUE_MSG(!singletonClass, "Couldn't find singleton for class: " + m + ".");
-
- jmethodID initialize = env->GetStaticMethodID(singletonClass, "initialize", "(Landroid/app/Activity;)Lorg/godotengine/godot/Godot$SingletonBase;");
- ERR_CONTINUE_MSG(!initialize, "Couldn't find proper initialize function 'public static Godot.SingletonBase Class::initialize(Activity p_activity)' initializer for singleton class: " + m + ".");
-
- jobject obj = env->CallStaticObjectMethod(singletonClass, initialize, godot_java->get_activity());
- env->NewGlobalRef(obj);
- }
- }
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline) {
ThreadAndroid::setup_thread();
const char **cmdline = NULL;
@@ -739,16 +158,15 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
}
java_class_wrapper = memnew(JavaClassWrapper(godot_java->get_activity()));
- _initialize_java_modules();
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jclass clazz, jint width, jint height) {
if (os_android)
os_android->set_display_size(Size2(width, height));
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jclass clazz, jboolean p_32_bits) {
if (os_android) {
if (step == 0) {
@@ -763,14 +181,14 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *en
}
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jobject obj) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jclass clazz) {
if (step == 0)
return;
os_android->main_loop_request_go_back();
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jclass clazz) {
if (step == -1)
return;
@@ -789,6 +207,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
}
os_android->main_loop_begin();
+ godot_java->on_gl_godot_main_loop_started(env);
++step;
}
@@ -803,7 +222,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
}
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jobject obj, jint ev, jint pointer, jint count, jintArray positions) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint count, jintArray positions) {
if (step == 0)
return;
@@ -827,282 +246,28 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jo
*/
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_hover(JNIEnv *env, jobject obj, jint p_type, jint p_x, jint p_y) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_hover(JNIEnv *env, jclass clazz, jint p_type, jint p_x, jint p_y) {
if (step == 0)
return;
os_android->process_hover(p_type, Point2(p_x, p_y));
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_doubletap(JNIEnv *env, jobject obj, jint p_x, jint p_y) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_doubletap(JNIEnv *env, jclass clazz, jint p_x, jint p_y) {
if (step == 0)
return;
os_android->process_double_tap(Point2(p_x, p_y));
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_scroll(JNIEnv *env, jobject obj, jint p_x, jint p_y) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_scroll(JNIEnv *env, jclass clazz, jint p_x, jint p_y) {
if (step == 0)
return;
os_android->process_scroll(Point2(p_x, p_y));
}
-/*
- * Android Key codes.
- */
-enum {
- AKEYCODE_UNKNOWN = 0,
- AKEYCODE_SOFT_LEFT = 1,
- AKEYCODE_SOFT_RIGHT = 2,
- AKEYCODE_HOME = 3,
- AKEYCODE_BACK = 4,
- AKEYCODE_CALL = 5,
- AKEYCODE_ENDCALL = 6,
- AKEYCODE_0 = 7,
- AKEYCODE_1 = 8,
- AKEYCODE_2 = 9,
- AKEYCODE_3 = 10,
- AKEYCODE_4 = 11,
- AKEYCODE_5 = 12,
- AKEYCODE_6 = 13,
- AKEYCODE_7 = 14,
- AKEYCODE_8 = 15,
- AKEYCODE_9 = 16,
- AKEYCODE_STAR = 17,
- AKEYCODE_POUND = 18,
- AKEYCODE_DPAD_UP = 19,
- AKEYCODE_DPAD_DOWN = 20,
- AKEYCODE_DPAD_LEFT = 21,
- AKEYCODE_DPAD_RIGHT = 22,
- AKEYCODE_DPAD_CENTER = 23,
- AKEYCODE_VOLUME_UP = 24,
- AKEYCODE_VOLUME_DOWN = 25,
- AKEYCODE_POWER = 26,
- AKEYCODE_CAMERA = 27,
- AKEYCODE_CLEAR = 28,
- AKEYCODE_A = 29,
- AKEYCODE_B = 30,
- AKEYCODE_C = 31,
- AKEYCODE_D = 32,
- AKEYCODE_E = 33,
- AKEYCODE_F = 34,
- AKEYCODE_G = 35,
- AKEYCODE_H = 36,
- AKEYCODE_I = 37,
- AKEYCODE_J = 38,
- AKEYCODE_K = 39,
- AKEYCODE_L = 40,
- AKEYCODE_M = 41,
- AKEYCODE_N = 42,
- AKEYCODE_O = 43,
- AKEYCODE_P = 44,
- AKEYCODE_Q = 45,
- AKEYCODE_R = 46,
- AKEYCODE_S = 47,
- AKEYCODE_T = 48,
- AKEYCODE_U = 49,
- AKEYCODE_V = 50,
- AKEYCODE_W = 51,
- AKEYCODE_X = 52,
- AKEYCODE_Y = 53,
- AKEYCODE_Z = 54,
- AKEYCODE_COMMA = 55,
- AKEYCODE_PERIOD = 56,
- AKEYCODE_ALT_LEFT = 57,
- AKEYCODE_ALT_RIGHT = 58,
- AKEYCODE_SHIFT_LEFT = 59,
- AKEYCODE_SHIFT_RIGHT = 60,
- AKEYCODE_TAB = 61,
- AKEYCODE_SPACE = 62,
- AKEYCODE_SYM = 63,
- AKEYCODE_EXPLORER = 64,
- AKEYCODE_ENVELOPE = 65,
- AKEYCODE_ENTER = 66,
- AKEYCODE_DEL = 67,
- AKEYCODE_GRAVE = 68,
- AKEYCODE_MINUS = 69,
- AKEYCODE_EQUALS = 70,
- AKEYCODE_LEFT_BRACKET = 71,
- AKEYCODE_RIGHT_BRACKET = 72,
- AKEYCODE_BACKSLASH = 73,
- AKEYCODE_SEMICOLON = 74,
- AKEYCODE_APOSTROPHE = 75,
- AKEYCODE_SLASH = 76,
- AKEYCODE_AT = 77,
- AKEYCODE_NUM = 78,
- AKEYCODE_HEADSETHOOK = 79,
- AKEYCODE_FOCUS = 80, // *Camera* focus
- AKEYCODE_PLUS = 81,
- AKEYCODE_MENU = 82,
- AKEYCODE_NOTIFICATION = 83,
- AKEYCODE_SEARCH = 84,
- AKEYCODE_MEDIA_PLAY_PAUSE = 85,
- AKEYCODE_MEDIA_STOP = 86,
- AKEYCODE_MEDIA_NEXT = 87,
- AKEYCODE_MEDIA_PREVIOUS = 88,
- AKEYCODE_MEDIA_REWIND = 89,
- AKEYCODE_MEDIA_FAST_FORWARD = 90,
- AKEYCODE_MUTE = 91,
- AKEYCODE_PAGE_UP = 92,
- AKEYCODE_PAGE_DOWN = 93,
- AKEYCODE_PICTSYMBOLS = 94,
- AKEYCODE_SWITCH_CHARSET = 95,
- AKEYCODE_BUTTON_A = 96,
- AKEYCODE_BUTTON_B = 97,
- AKEYCODE_BUTTON_C = 98,
- AKEYCODE_BUTTON_X = 99,
- AKEYCODE_BUTTON_Y = 100,
- AKEYCODE_BUTTON_Z = 101,
- AKEYCODE_BUTTON_L1 = 102,
- AKEYCODE_BUTTON_R1 = 103,
- AKEYCODE_BUTTON_L2 = 104,
- AKEYCODE_BUTTON_R2 = 105,
- AKEYCODE_BUTTON_THUMBL = 106,
- AKEYCODE_BUTTON_THUMBR = 107,
- AKEYCODE_BUTTON_START = 108,
- AKEYCODE_BUTTON_SELECT = 109,
- AKEYCODE_BUTTON_MODE = 110,
-
- // NOTE: If you add a new keycode here you must also add it to several other files.
- // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
-};
-
-struct _WinTranslatePair {
-
- unsigned int keysym;
- unsigned int keycode;
-};
-
-static _WinTranslatePair _ak_to_keycode[] = {
- { KEY_TAB, AKEYCODE_TAB },
- { KEY_ENTER, AKEYCODE_ENTER },
- { KEY_SHIFT, AKEYCODE_SHIFT_LEFT },
- { KEY_SHIFT, AKEYCODE_SHIFT_RIGHT },
- { KEY_ALT, AKEYCODE_ALT_LEFT },
- { KEY_ALT, AKEYCODE_ALT_RIGHT },
- { KEY_MENU, AKEYCODE_MENU },
- { KEY_PAUSE, AKEYCODE_MEDIA_PLAY_PAUSE },
- { KEY_ESCAPE, AKEYCODE_BACK },
- { KEY_SPACE, AKEYCODE_SPACE },
- { KEY_PAGEUP, AKEYCODE_PAGE_UP },
- { KEY_PAGEDOWN, AKEYCODE_PAGE_DOWN },
- { KEY_HOME, AKEYCODE_HOME }, //(0x24)
- { KEY_LEFT, AKEYCODE_DPAD_LEFT },
- { KEY_UP, AKEYCODE_DPAD_UP },
- { KEY_RIGHT, AKEYCODE_DPAD_RIGHT },
- { KEY_DOWN, AKEYCODE_DPAD_DOWN },
- { KEY_PERIODCENTERED, AKEYCODE_DPAD_CENTER },
- { KEY_BACKSPACE, AKEYCODE_DEL },
- { KEY_0, AKEYCODE_0 }, ////0 key
- { KEY_1, AKEYCODE_1 }, ////1 key
- { KEY_2, AKEYCODE_2 }, ////2 key
- { KEY_3, AKEYCODE_3 }, ////3 key
- { KEY_4, AKEYCODE_4 }, ////4 key
- { KEY_5, AKEYCODE_5 }, ////5 key
- { KEY_6, AKEYCODE_6 }, ////6 key
- { KEY_7, AKEYCODE_7 }, ////7 key
- { KEY_8, AKEYCODE_8 }, ////8 key
- { KEY_9, AKEYCODE_9 }, ////9 key
- { KEY_A, AKEYCODE_A }, ////A key
- { KEY_B, AKEYCODE_B }, ////B key
- { KEY_C, AKEYCODE_C }, ////C key
- { KEY_D, AKEYCODE_D }, ////D key
- { KEY_E, AKEYCODE_E }, ////E key
- { KEY_F, AKEYCODE_F }, ////F key
- { KEY_G, AKEYCODE_G }, ////G key
- { KEY_H, AKEYCODE_H }, ////H key
- { KEY_I, AKEYCODE_I }, ////I key
- { KEY_J, AKEYCODE_J }, ////J key
- { KEY_K, AKEYCODE_K }, ////K key
- { KEY_L, AKEYCODE_L }, ////L key
- { KEY_M, AKEYCODE_M }, ////M key
- { KEY_N, AKEYCODE_N }, ////N key
- { KEY_O, AKEYCODE_O }, ////O key
- { KEY_P, AKEYCODE_P }, ////P key
- { KEY_Q, AKEYCODE_Q }, ////Q key
- { KEY_R, AKEYCODE_R }, ////R key
- { KEY_S, AKEYCODE_S }, ////S key
- { KEY_T, AKEYCODE_T }, ////T key
- { KEY_U, AKEYCODE_U }, ////U key
- { KEY_V, AKEYCODE_V }, ////V key
- { KEY_W, AKEYCODE_W }, ////W key
- { KEY_X, AKEYCODE_X }, ////X key
- { KEY_Y, AKEYCODE_Y }, ////Y key
- { KEY_Z, AKEYCODE_Z }, ////Z key
- { KEY_HOMEPAGE, AKEYCODE_EXPLORER },
- { KEY_LAUNCH0, AKEYCODE_BUTTON_A },
- { KEY_LAUNCH1, AKEYCODE_BUTTON_B },
- { KEY_LAUNCH2, AKEYCODE_BUTTON_C },
- { KEY_LAUNCH3, AKEYCODE_BUTTON_X },
- { KEY_LAUNCH4, AKEYCODE_BUTTON_Y },
- { KEY_LAUNCH5, AKEYCODE_BUTTON_Z },
- { KEY_LAUNCH6, AKEYCODE_BUTTON_L1 },
- { KEY_LAUNCH7, AKEYCODE_BUTTON_R1 },
- { KEY_LAUNCH8, AKEYCODE_BUTTON_L2 },
- { KEY_LAUNCH9, AKEYCODE_BUTTON_R2 },
- { KEY_LAUNCHA, AKEYCODE_BUTTON_THUMBL },
- { KEY_LAUNCHB, AKEYCODE_BUTTON_THUMBR },
- { KEY_LAUNCHC, AKEYCODE_BUTTON_START },
- { KEY_LAUNCHD, AKEYCODE_BUTTON_SELECT },
- { KEY_LAUNCHE, AKEYCODE_BUTTON_MODE },
- { KEY_VOLUMEMUTE, AKEYCODE_MUTE },
- { KEY_VOLUMEDOWN, AKEYCODE_VOLUME_DOWN },
- { KEY_VOLUMEUP, AKEYCODE_VOLUME_UP },
- { KEY_BACK, AKEYCODE_MEDIA_REWIND },
- { KEY_FORWARD, AKEYCODE_MEDIA_FAST_FORWARD },
- { KEY_MEDIANEXT, AKEYCODE_MEDIA_NEXT },
- { KEY_MEDIAPREVIOUS, AKEYCODE_MEDIA_PREVIOUS },
- { KEY_MEDIASTOP, AKEYCODE_MEDIA_STOP },
- { KEY_PLUS, AKEYCODE_PLUS },
- { KEY_EQUAL, AKEYCODE_EQUALS }, // the '+' key
- { KEY_COMMA, AKEYCODE_COMMA }, // the ',' key
- { KEY_MINUS, AKEYCODE_MINUS }, // the '-' key
- { KEY_SLASH, AKEYCODE_SLASH }, // the '/?' key
- { KEY_BACKSLASH, AKEYCODE_BACKSLASH },
- { KEY_BRACKETLEFT, AKEYCODE_LEFT_BRACKET },
- { KEY_BRACKETRIGHT, AKEYCODE_RIGHT_BRACKET },
- { KEY_UNKNOWN, 0 }
-};
-/*
-TODO: map these android key:
- AKEYCODE_SOFT_LEFT = 1,
- AKEYCODE_SOFT_RIGHT = 2,
- AKEYCODE_CALL = 5,
- AKEYCODE_ENDCALL = 6,
- AKEYCODE_STAR = 17,
- AKEYCODE_POUND = 18,
- AKEYCODE_POWER = 26,
- AKEYCODE_CAMERA = 27,
- AKEYCODE_CLEAR = 28,
- AKEYCODE_SYM = 63,
- AKEYCODE_ENVELOPE = 65,
- AKEYCODE_GRAVE = 68,
- AKEYCODE_SEMICOLON = 74,
- AKEYCODE_APOSTROPHE = 75,
- AKEYCODE_AT = 77,
- AKEYCODE_NUM = 78,
- AKEYCODE_HEADSETHOOK = 79,
- AKEYCODE_FOCUS = 80, // *Camera* focus
- AKEYCODE_NOTIFICATION = 83,
- AKEYCODE_SEARCH = 84,
- AKEYCODE_PICTSYMBOLS = 94,
- AKEYCODE_SWITCH_CHARSET = 95,
-*/
-
-static unsigned int android_get_keysym(unsigned int p_code) {
- for (int i = 0; _ak_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
-
- if (_ak_to_keycode[i].keycode == p_code) {
-
- return _ak_to_keycode[i].keysym;
- }
- }
-
- return KEY_UNKNOWN;
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env, jobject obj, jint p_device, jint p_button, jboolean p_pressed) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env, jclass clazz, jint p_device, jint p_button, jboolean p_pressed) {
if (step == 0)
return;
@@ -1115,7 +280,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env
os_android->process_joy_event(jevent);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jobject obj, jint p_device, jint p_axis, jfloat p_value) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jclass clazz, jint p_device, jint p_axis, jfloat p_value) {
if (step == 0)
return;
@@ -1128,7 +293,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env,
os_android->process_joy_event(jevent);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jobject obj, jint p_device, jint p_hat_x, jint p_hat_y) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jclass clazz, jint p_device, jint p_hat_x, jint p_hat_y) {
if (step == 0)
return;
@@ -1153,58 +318,59 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, j
os_android->process_joy_event(jevent);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jobject obj, jint p_device, jboolean p_connected, jstring p_name) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jclass clazz, jint p_device, jboolean p_connected, jstring p_name) {
if (os_android) {
String name = jstring_to_string(p_name, env);
os_android->joy_connection_changed(p_device, p_connected, name);
}
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jobject obj, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
if (step == 0)
return;
Ref<InputEventKey> ievent;
ievent.instance();
int val = p_unicode_char;
- int scancode = android_get_keysym(p_scancode);
- ievent->set_scancode(scancode);
+ int keycode = android_get_keysym(p_keycode);
+ int phy_keycode = android_get_keysym(p_scancode);
+ ievent->set_keycode(keycode);
+ ievent->set_physical_keycode(phy_keycode);
ievent->set_unicode(val);
ievent->set_pressed(p_pressed);
if (val == '\n') {
- ievent->set_scancode(KEY_ENTER);
+ ievent->set_keycode(KEY_ENTER);
} else if (val == 61448) {
- ievent->set_scancode(KEY_BACKSPACE);
+ ievent->set_keycode(KEY_BACKSPACE);
ievent->set_unicode(KEY_BACKSPACE);
} else if (val == 61453) {
- ievent->set_scancode(KEY_ENTER);
+ ievent->set_keycode(KEY_ENTER);
ievent->set_unicode(KEY_ENTER);
- } else if (p_scancode == 4) {
-
+ } else if (p_keycode == 4) {
os_android->main_loop_request_go_back();
}
os_android->process_event(ievent);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
accelerometer = Vector3(x, y, z);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gravity(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gravity(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
gravity = Vector3(x, y, z);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
magnetometer = Vector3(x, y, z);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
gyroscope = Vector3(x, y, z);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jobject obj) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jclass clazz) {
if (step == 0)
return;
@@ -1212,7 +378,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env,
os_android->main_loop_focusin();
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jobject obj) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jclass clazz) {
if (step == 0)
return;
@@ -1220,134 +386,22 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env,
os_android->main_loop_focusout();
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jobject obj) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jclass clazz) {
ThreadAndroid::setup_thread();
AudioDriverAndroid::thread_func(env);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv *env, jobject obj, jstring name, jobject p_object) {
-
- String singname = jstring_to_string(name, env);
- JNISingleton *s = memnew(JNISingleton);
- s->set_instance(env->NewGlobalRef(p_object));
- jni_singletons[singname] = s;
-
- Engine::get_singleton()->add_singleton(Engine::Singleton(singname, s));
- ProjectSettings::get_singleton()->set(singname, s);
-}
-
-static Variant::Type get_jni_type(const String &p_type) {
-
- static struct {
- const char *name;
- Variant::Type type;
- } _type_to_vtype[] = {
- { "void", Variant::NIL },
- { "boolean", Variant::BOOL },
- { "int", Variant::INT },
- { "float", Variant::REAL },
- { "double", Variant::REAL },
- { "java.lang.String", Variant::STRING },
- { "[I", Variant::POOL_INT_ARRAY },
- { "[B", Variant::POOL_BYTE_ARRAY },
- { "[F", Variant::POOL_REAL_ARRAY },
- { "[Ljava.lang.String;", Variant::POOL_STRING_ARRAY },
- { "org.godotengine.godot.Dictionary", Variant::DICTIONARY },
- { NULL, Variant::NIL }
- };
-
- int idx = 0;
-
- while (_type_to_vtype[idx].name) {
-
- if (p_type == _type_to_vtype[idx].name)
- return _type_to_vtype[idx].type;
-
- idx++;
- }
-
- return Variant::NIL;
-}
-
-static const char *get_jni_sig(const String &p_type) {
-
- static struct {
- const char *name;
- const char *sig;
- } _type_to_vtype[] = {
- { "void", "V" },
- { "boolean", "Z" },
- { "int", "I" },
- { "float", "F" },
- { "double", "D" },
- { "java.lang.String", "Ljava/lang/String;" },
- { "org.godotengine.godot.Dictionary", "Lorg/godotengine/godot/Dictionary;" },
- { "[I", "[I" },
- { "[B", "[B" },
- { "[F", "[F" },
- { "[Ljava.lang.String;", "[Ljava/lang/String;" },
- { NULL, "V" }
- };
-
- int idx = 0;
-
- while (_type_to_vtype[idx].name) {
-
- if (p_type == _type_to_vtype[idx].name)
- return _type_to_vtype[idx].sig;
-
- idx++;
- }
-
- return "Ljava/lang/Object;";
-}
-
-JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jobject obj, jstring path) {
+JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jclass clazz, jstring path) {
String js = jstring_to_string(path, env);
return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
-
- String singname = jstring_to_string(sname, env);
-
- ERR_FAIL_COND(!jni_singletons.has(singname));
-
- JNISingleton *s = jni_singletons.get(singname);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jint ID, jstring method, jobjectArray params) {
- String mname = jstring_to_string(name, env);
- String retval = jstring_to_string(ret, env);
- Vector<Variant::Type> types;
- String cs = "(";
-
- int stringCount = env->GetArrayLength(args);
-
- for (int i = 0; i < stringCount; i++) {
-
- jstring string = (jstring)env->GetObjectArrayElement(args, i);
- const String rawString = jstring_to_string(string, env);
- types.push_back(get_jni_type(rawString));
- cs += get_jni_sig(rawString);
- }
-
- cs += ")";
- cs += get_jni_sig(retval);
- jclass cls = env->GetObjectClass(s->get_instance());
- jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
- if (!mid) {
-
- print_line("Failed getting method ID " + mname);
- }
-
- s->add_method(mname, mid, types, get_jni_type(retval));
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params) {
-
- Object *obj = ObjectDB::get_instance(ID);
+ Object *obj = ObjectDB::get_instance(ObjectID((uint64_t)ID));
ERR_FAIL_COND(!obj);
int res = env->PushLocalFrame(16);
@@ -1370,16 +424,16 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *en
env->DeleteLocalRef(obj);
};
- Variant::CallError err;
+ Callable::CallError err;
obj->call(str_method, (const Variant **)vptr, count, err);
// something
env->PopLocalFrame(NULL);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jclass clazz, jint ID, jstring method, jobjectArray params) {
- Object *obj = ObjectDB::get_instance(ID);
+ Object *obj = ObjectDB::get_instance(ObjectID((uint64_t)ID));
ERR_FAIL_COND(!obj);
int res = env->PushLocalFrame(16);
@@ -1403,7 +457,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *
env->PopLocalFrame(NULL);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jobject p_obj, jstring p_permission, jboolean p_result) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jclass clazz, jstring p_permission, jboolean p_result) {
String permission = jstring_to_string(p_permission, env);
if (permission == "android.permission.RECORD_AUDIO" && p_result) {
AudioDriver::get_singleton()->capture_start();
@@ -1431,3 +485,4 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererPaused(JNIE
os_android->get_main_loop()->notification(MainLoop::NOTIFICATION_APP_PAUSED);
}
}
+}
diff --git a/platform/android/java_godot_lib_jni.h b/platform/android/java_godot_lib_jni.h
index 71d4547f65..a7a5970440 100644
--- a/platform/android/java_godot_lib_jni.h
+++ b/platform/android/java_godot_lib_jni.h
@@ -37,36 +37,34 @@
// These functions can be called from within JAVA and are the means by which our JAVA implementation calls back into our C++ code.
// See java/src/org/godotengine/godot/GodotLib.java for the JAVA side of this (yes that's why we have the long names)
extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jobject obj, jobject activity);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jobject obj);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jobject obj, jint ev, jint pointer, jint count, jintArray positions);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_hover(JNIEnv *env, jobject obj, jint p_type, jint p_x, jint p_y);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_doubletap(JNIEnv *env, jobject obj, jint p_x, jint p_y);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_scroll(JNIEnv *env, jobject obj, jint p_x, jint p_y);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jobject obj, jint p_scancode, jint p_unicode_char, jboolean p_pressed);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env, jobject obj, jint p_device, jint p_button, jboolean p_pressed);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jobject obj, jint p_device, jint p_axis, jfloat p_value);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jobject obj, jint p_device, jint p_hat_x, jint p_hat_y);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jobject obj, jint p_device, jboolean p_connected, jstring p_name);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jobject obj);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gravity(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jobject obj);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jobject obj);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv *env, jobject obj, jstring name, jobject p_object);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args);
-JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jobject obj, jstring path);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jobject obj, jint p_height);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jobject p_obj, jstring p_permission, jboolean p_result);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jclass clazz, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jclass clazz, jobject activity);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jclass clazz, jint width, jint height);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jclass clazz, jboolean p_32_bits);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jclass clazz);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jclass clazz);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint count, jintArray positions);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_hover(JNIEnv *env, jclass clazz, jint p_type, jint p_x, jint p_y);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_doubletap(JNIEnv *env, jclass clazz, jint p_x, jint p_y);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_scroll(JNIEnv *env, jclass clazz, jint p_x, jint p_y);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_scancode, jint p_unicode_char, jboolean p_pressed);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env, jclass clazz, jint p_device, jint p_button, jboolean p_pressed);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jclass clazz, jint p_device, jint p_axis, jfloat p_value);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jclass clazz, jint p_device, jint p_hat_x, jint p_hat_y);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jclass clazz, jint p_device, jboolean p_connected, jstring p_name);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jclass clazz);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gravity(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jclass clazz);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jclass clazz);
+JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jclass clazz, jstring path);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jint ID, jstring method, jobjectArray params);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jclass clazz, jint ID, jstring method, jobjectArray params);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jclass clazz, jint p_height);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jclass clazz, jstring p_permission, jboolean p_result);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererResumed(JNIEnv *env, jclass clazz);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererPaused(JNIEnv *env, jclass clazz);
}
diff --git a/platform/android/java_godot_wrapper.cpp b/platform/android/java_godot_wrapper.cpp
index 9ac91b8ef6..7b677c186e 100644
--- a/platform/android/java_godot_wrapper.cpp
+++ b/platform/android/java_godot_wrapper.cpp
@@ -66,6 +66,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_godot_instance) {
_is_activity_resumed = p_env->GetMethodID(cls, "isActivityResumed", "()Z");
_vibrate = p_env->GetMethodID(cls, "vibrate", "(I)V");
_get_input_fallback_mapping = p_env->GetMethodID(cls, "getInputFallbackMapping", "()Ljava/lang/String;");
+ _on_gl_godot_main_loop_started = p_env->GetMethodID(cls, "onGLGodotMainLoopStarted", "()V");
}
GodotJavaWrapper::~GodotJavaWrapper() {
@@ -107,6 +108,15 @@ void GodotJavaWrapper::on_video_init(JNIEnv *p_env) {
p_env->CallVoidMethod(godot_instance, _on_video_init);
}
+void GodotJavaWrapper::on_gl_godot_main_loop_started(JNIEnv *p_env) {
+ if (_on_gl_godot_main_loop_started) {
+ if (p_env == NULL) {
+ p_env = ThreadAndroid::get_env();
+ }
+ }
+ p_env->CallVoidMethod(godot_instance, _on_gl_godot_main_loop_started);
+}
+
void GodotJavaWrapper::restart(JNIEnv *p_env) {
if (_restart)
if (p_env == NULL)
diff --git a/platform/android/java_godot_wrapper.h b/platform/android/java_godot_wrapper.h
index f378b1ea38..cdab2ecc9c 100644
--- a/platform/android/java_godot_wrapper.h
+++ b/platform/android/java_godot_wrapper.h
@@ -61,6 +61,7 @@ private:
jmethodID _is_activity_resumed = 0;
jmethodID _vibrate = 0;
jmethodID _get_input_fallback_mapping = 0;
+ jmethodID _on_gl_godot_main_loop_started = 0;
public:
GodotJavaWrapper(JNIEnv *p_env, jobject p_godot_instance);
@@ -72,6 +73,7 @@ public:
jobject get_class_loader();
void on_video_init(JNIEnv *p_env = NULL);
+ void on_gl_godot_main_loop_started(JNIEnv *p_env = NULL);
void restart(JNIEnv *p_env = NULL);
void force_quit(JNIEnv *p_env = NULL);
void set_keep_screen_on(bool p_enabled);
diff --git a/platform/android/jni_utils.cpp b/platform/android/jni_utils.cpp
new file mode 100644
index 0000000000..3fa4e80884
--- /dev/null
+++ b/platform/android/jni_utils.cpp
@@ -0,0 +1,434 @@
+/*************************************************************************/
+/* jni_utils.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "jni_utils.h"
+
+jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_arg, bool force_jobject) {
+
+ jvalret v;
+
+ switch (p_type) {
+
+ case Variant::BOOL: {
+
+ if (force_jobject) {
+ jclass bclass = env->FindClass("java/lang/Boolean");
+ jmethodID ctor = env->GetMethodID(bclass, "<init>", "(Z)V");
+ jvalue val;
+ val.z = (bool)(*p_arg);
+ jobject obj = env->NewObjectA(bclass, ctor, &val);
+ v.val.l = obj;
+ v.obj = obj;
+ env->DeleteLocalRef(bclass);
+ } else {
+ v.val.z = *p_arg;
+ };
+ } break;
+ case Variant::INT: {
+
+ if (force_jobject) {
+
+ jclass bclass = env->FindClass("java/lang/Integer");
+ jmethodID ctor = env->GetMethodID(bclass, "<init>", "(I)V");
+ jvalue val;
+ val.i = (int)(*p_arg);
+ jobject obj = env->NewObjectA(bclass, ctor, &val);
+ v.val.l = obj;
+ v.obj = obj;
+ env->DeleteLocalRef(bclass);
+
+ } else {
+ v.val.i = *p_arg;
+ };
+ } break;
+ case Variant::FLOAT: {
+
+ if (force_jobject) {
+
+ jclass bclass = env->FindClass("java/lang/Double");
+ jmethodID ctor = env->GetMethodID(bclass, "<init>", "(D)V");
+ jvalue val;
+ val.d = (double)(*p_arg);
+ jobject obj = env->NewObjectA(bclass, ctor, &val);
+ v.val.l = obj;
+ v.obj = obj;
+ env->DeleteLocalRef(bclass);
+
+ } else {
+ v.val.f = *p_arg;
+ };
+ } break;
+ case Variant::STRING: {
+
+ String s = *p_arg;
+ jstring jStr = env->NewStringUTF(s.utf8().get_data());
+ v.val.l = jStr;
+ v.obj = jStr;
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
+
+ Vector<String> sarray = *p_arg;
+ jobjectArray arr = env->NewObjectArray(sarray.size(), env->FindClass("java/lang/String"), env->NewStringUTF(""));
+
+ for (int j = 0; j < sarray.size(); j++) {
+
+ jstring str = env->NewStringUTF(sarray[j].utf8().get_data());
+ env->SetObjectArrayElement(arr, j, str);
+ env->DeleteLocalRef(str);
+ }
+ v.val.l = arr;
+ v.obj = arr;
+
+ } break;
+
+ case Variant::DICTIONARY: {
+
+ Dictionary dict = *p_arg;
+ jclass dclass = env->FindClass("org/godotengine/godot/Dictionary");
+ jmethodID ctor = env->GetMethodID(dclass, "<init>", "()V");
+ jobject jdict = env->NewObject(dclass, ctor);
+
+ Array keys = dict.keys();
+
+ jobjectArray jkeys = env->NewObjectArray(keys.size(), env->FindClass("java/lang/String"), env->NewStringUTF(""));
+ for (int j = 0; j < keys.size(); j++) {
+ jstring str = env->NewStringUTF(String(keys[j]).utf8().get_data());
+ env->SetObjectArrayElement(jkeys, j, str);
+ env->DeleteLocalRef(str);
+ };
+
+ jmethodID set_keys = env->GetMethodID(dclass, "set_keys", "([Ljava/lang/String;)V");
+ jvalue val;
+ val.l = jkeys;
+ env->CallVoidMethodA(jdict, set_keys, &val);
+ env->DeleteLocalRef(jkeys);
+
+ jobjectArray jvalues = env->NewObjectArray(keys.size(), env->FindClass("java/lang/Object"), NULL);
+
+ for (int j = 0; j < keys.size(); j++) {
+ Variant var = dict[keys[j]];
+ jvalret v = _variant_to_jvalue(env, var.get_type(), &var, true);
+ env->SetObjectArrayElement(jvalues, j, v.val.l);
+ if (v.obj) {
+ env->DeleteLocalRef(v.obj);
+ }
+ };
+
+ jmethodID set_values = env->GetMethodID(dclass, "set_values", "([Ljava/lang/Object;)V");
+ val.l = jvalues;
+ env->CallVoidMethodA(jdict, set_values, &val);
+ env->DeleteLocalRef(jvalues);
+ env->DeleteLocalRef(dclass);
+
+ v.val.l = jdict;
+ v.obj = jdict;
+ } break;
+
+ case Variant::PACKED_INT32_ARRAY: {
+
+ Vector<int> array = *p_arg;
+ jintArray arr = env->NewIntArray(array.size());
+ const int *r = array.ptr();
+ env->SetIntArrayRegion(arr, 0, array.size(), r);
+ v.val.l = arr;
+ v.obj = arr;
+
+ } break;
+ case Variant::PACKED_BYTE_ARRAY: {
+ Vector<uint8_t> array = *p_arg;
+ jbyteArray arr = env->NewByteArray(array.size());
+ const uint8_t *r = array.ptr();
+ env->SetByteArrayRegion(arr, 0, array.size(), reinterpret_cast<const signed char *>(r));
+ v.val.l = arr;
+ v.obj = arr;
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ Vector<float> array = *p_arg;
+ jfloatArray arr = env->NewFloatArray(array.size());
+ const float *r = array.ptr();
+ env->SetFloatArrayRegion(arr, 0, array.size(), r);
+ v.val.l = arr;
+ v.obj = arr;
+
+ } break;
+#ifndef _MSC_VER
+#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
+#endif
+
+ default: {
+
+ v.val.i = 0;
+ } break;
+ }
+ return v;
+}
+
+String _get_class_name(JNIEnv *env, jclass cls, bool *array) {
+
+ jclass cclass = env->FindClass("java/lang/Class");
+ jmethodID getName = env->GetMethodID(cclass, "getName", "()Ljava/lang/String;");
+ jstring clsName = (jstring)env->CallObjectMethod(cls, getName);
+
+ if (array) {
+ jmethodID isArray = env->GetMethodID(cclass, "isArray", "()Z");
+ jboolean isarr = env->CallBooleanMethod(cls, isArray);
+ (*array) = isarr ? true : false;
+ }
+ String name = jstring_to_string(clsName, env);
+ env->DeleteLocalRef(clsName);
+
+ return name;
+}
+
+Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
+
+ if (obj == NULL) {
+ return Variant();
+ }
+
+ jclass c = env->GetObjectClass(obj);
+ bool array;
+ String name = _get_class_name(env, c, &array);
+
+ if (name == "java.lang.String") {
+
+ return jstring_to_string((jstring)obj, env);
+ };
+
+ if (name == "[Ljava.lang.String;") {
+
+ jobjectArray arr = (jobjectArray)obj;
+ int stringCount = env->GetArrayLength(arr);
+ Vector<String> sarr;
+
+ for (int i = 0; i < stringCount; i++) {
+ jstring string = (jstring)env->GetObjectArrayElement(arr, i);
+ sarr.push_back(jstring_to_string(string, env));
+ env->DeleteLocalRef(string);
+ }
+
+ return sarr;
+ };
+
+ if (name == "java.lang.Boolean") {
+
+ jmethodID boolValue = env->GetMethodID(c, "booleanValue", "()Z");
+ bool ret = env->CallBooleanMethod(obj, boolValue);
+ return ret;
+ };
+
+ if (name == "java.lang.Integer" || name == "java.lang.Long") {
+
+ jclass nclass = env->FindClass("java/lang/Number");
+ jmethodID longValue = env->GetMethodID(nclass, "longValue", "()J");
+ jlong ret = env->CallLongMethod(obj, longValue);
+ return ret;
+ };
+
+ if (name == "[I") {
+
+ jintArray arr = (jintArray)obj;
+ int fCount = env->GetArrayLength(arr);
+ Vector<int> sarr;
+ sarr.resize(fCount);
+
+ int *w = sarr.ptrw();
+ env->GetIntArrayRegion(arr, 0, fCount, w);
+ return sarr;
+ };
+
+ if (name == "[B") {
+
+ jbyteArray arr = (jbyteArray)obj;
+ int fCount = env->GetArrayLength(arr);
+ Vector<uint8_t> sarr;
+ sarr.resize(fCount);
+
+ uint8_t *w = sarr.ptrw();
+ env->GetByteArrayRegion(arr, 0, fCount, reinterpret_cast<signed char *>(w));
+ return sarr;
+ };
+
+ if (name == "java.lang.Float" || name == "java.lang.Double") {
+
+ jclass nclass = env->FindClass("java/lang/Number");
+ jmethodID doubleValue = env->GetMethodID(nclass, "doubleValue", "()D");
+ double ret = env->CallDoubleMethod(obj, doubleValue);
+ return ret;
+ };
+
+ if (name == "[D") {
+
+ jdoubleArray arr = (jdoubleArray)obj;
+ int fCount = env->GetArrayLength(arr);
+ PackedFloat32Array sarr;
+ sarr.resize(fCount);
+
+ real_t *w = sarr.ptrw();
+
+ for (int i = 0; i < fCount; i++) {
+
+ double n;
+ env->GetDoubleArrayRegion(arr, i, 1, &n);
+ w[i] = n;
+ };
+ return sarr;
+ };
+
+ if (name == "[F") {
+
+ jfloatArray arr = (jfloatArray)obj;
+ int fCount = env->GetArrayLength(arr);
+ PackedFloat32Array sarr;
+ sarr.resize(fCount);
+
+ real_t *w = sarr.ptrw();
+
+ for (int i = 0; i < fCount; i++) {
+
+ float n;
+ env->GetFloatArrayRegion(arr, i, 1, &n);
+ w[i] = n;
+ };
+ return sarr;
+ };
+
+ if (name == "[Ljava.lang.Object;") {
+
+ jobjectArray arr = (jobjectArray)obj;
+ int objCount = env->GetArrayLength(arr);
+ Array varr;
+
+ for (int i = 0; i < objCount; i++) {
+ jobject jobj = env->GetObjectArrayElement(arr, i);
+ Variant v = _jobject_to_variant(env, jobj);
+ varr.push_back(v);
+ env->DeleteLocalRef(jobj);
+ }
+
+ return varr;
+ };
+
+ if (name == "java.util.HashMap" || name == "org.godotengine.godot.Dictionary") {
+
+ Dictionary ret;
+ jclass oclass = c;
+ jmethodID get_keys = env->GetMethodID(oclass, "get_keys", "()[Ljava/lang/String;");
+ jobjectArray arr = (jobjectArray)env->CallObjectMethod(obj, get_keys);
+
+ PackedStringArray keys = _jobject_to_variant(env, arr);
+ env->DeleteLocalRef(arr);
+
+ jmethodID get_values = env->GetMethodID(oclass, "get_values", "()[Ljava/lang/Object;");
+ arr = (jobjectArray)env->CallObjectMethod(obj, get_values);
+
+ Array vals = _jobject_to_variant(env, arr);
+ env->DeleteLocalRef(arr);
+
+ for (int i = 0; i < keys.size(); i++) {
+
+ ret[keys[i]] = vals[i];
+ };
+
+ return ret;
+ };
+
+ env->DeleteLocalRef(c);
+
+ return Variant();
+}
+
+Variant::Type get_jni_type(const String &p_type) {
+
+ static struct {
+ const char *name;
+ Variant::Type type;
+ } _type_to_vtype[] = {
+ { "void", Variant::NIL },
+ { "boolean", Variant::BOOL },
+ { "int", Variant::INT },
+ { "float", Variant::FLOAT },
+ { "double", Variant::FLOAT },
+ { "java.lang.String", Variant::STRING },
+ { "[I", Variant::PACKED_INT32_ARRAY },
+ { "[B", Variant::PACKED_BYTE_ARRAY },
+ { "[F", Variant::PACKED_FLOAT32_ARRAY },
+ { "[Ljava.lang.String;", Variant::PACKED_STRING_ARRAY },
+ { "org.godotengine.godot.Dictionary", Variant::DICTIONARY },
+ { NULL, Variant::NIL }
+ };
+
+ int idx = 0;
+
+ while (_type_to_vtype[idx].name) {
+
+ if (p_type == _type_to_vtype[idx].name)
+ return _type_to_vtype[idx].type;
+
+ idx++;
+ }
+
+ return Variant::NIL;
+}
+
+const char *get_jni_sig(const String &p_type) {
+
+ static struct {
+ const char *name;
+ const char *sig;
+ } _type_to_vtype[] = {
+ { "void", "V" },
+ { "boolean", "Z" },
+ { "int", "I" },
+ { "float", "F" },
+ { "double", "D" },
+ { "java.lang.String", "Ljava/lang/String;" },
+ { "org.godotengine.godot.Dictionary", "Lorg/godotengine/godot/Dictionary;" },
+ { "[I", "[I" },
+ { "[B", "[B" },
+ { "[F", "[F" },
+ { "[Ljava.lang.String;", "[Ljava/lang/String;" },
+ { NULL, "V" }
+ };
+
+ int idx = 0;
+
+ while (_type_to_vtype[idx].name) {
+
+ if (p_type == _type_to_vtype[idx].name)
+ return _type_to_vtype[idx].sig;
+
+ idx++;
+ }
+
+ return "Ljava/lang/Object;";
+}
diff --git a/platform/android/jni_utils.h b/platform/android/jni_utils.h
new file mode 100644
index 0000000000..925340a680
--- /dev/null
+++ b/platform/android/jni_utils.h
@@ -0,0 +1,242 @@
+/*************************************************************************/
+/* jni_utils.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 JNI_UTILS_H
+#define JNI_UTILS_H
+
+#include "string_android.h"
+#include <core/engine.h>
+#include <core/variant.h>
+#include <jni.h>
+
+struct jvalret {
+
+ jobject obj;
+ jvalue val;
+ jvalret() { obj = NULL; }
+};
+
+jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_arg, bool force_jobject = false);
+
+String _get_class_name(JNIEnv *env, jclass cls, bool *array);
+
+Variant _jobject_to_variant(JNIEnv *env, jobject obj);
+
+Variant::Type get_jni_type(const String &p_type);
+
+const char *get_jni_sig(const String &p_type);
+
+class JNISingleton : public Object {
+
+ GDCLASS(JNISingleton, Object);
+
+ struct MethodData {
+
+ jmethodID method;
+ Variant::Type ret_type;
+ Vector<Variant::Type> argtypes;
+ };
+
+ jobject instance;
+ Map<StringName, MethodData> method_map;
+
+public:
+ virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+
+ ERR_FAIL_COND_V(!instance, Variant());
+
+ r_error.error = Callable::CallError::CALL_OK;
+
+ Map<StringName, MethodData>::Element *E = method_map.find(p_method);
+ if (!E) {
+
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
+ return Variant();
+ }
+
+ int ac = E->get().argtypes.size();
+ if (ac < p_argcount) {
+
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.argument = ac;
+ return Variant();
+ }
+
+ if (ac > p_argcount) {
+
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
+ r_error.argument = ac;
+ return Variant();
+ }
+
+ for (int i = 0; i < p_argcount; i++) {
+
+ if (!Variant::can_convert(p_args[i]->get_type(), E->get().argtypes[i])) {
+
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.argument = i;
+ r_error.expected = E->get().argtypes[i];
+ }
+ }
+
+ jvalue *v = NULL;
+
+ if (p_argcount) {
+
+ v = (jvalue *)alloca(sizeof(jvalue) * p_argcount);
+ }
+
+ JNIEnv *env = ThreadAndroid::get_env();
+
+ int res = env->PushLocalFrame(16);
+
+ ERR_FAIL_COND_V(res != 0, Variant());
+
+ List<jobject> to_erase;
+ for (int i = 0; i < p_argcount; i++) {
+
+ jvalret vr = _variant_to_jvalue(env, E->get().argtypes[i], p_args[i]);
+ v[i] = vr.val;
+ if (vr.obj)
+ to_erase.push_back(vr.obj);
+ }
+
+ Variant ret;
+
+ switch (E->get().ret_type) {
+
+ case Variant::NIL: {
+
+ env->CallVoidMethodA(instance, E->get().method, v);
+ } break;
+ case Variant::BOOL: {
+
+ ret = env->CallBooleanMethodA(instance, E->get().method, v) == JNI_TRUE;
+ } break;
+ case Variant::INT: {
+
+ ret = env->CallIntMethodA(instance, E->get().method, v);
+ } break;
+ case Variant::FLOAT: {
+
+ ret = env->CallFloatMethodA(instance, E->get().method, v);
+ } break;
+ case Variant::STRING: {
+
+ jobject o = env->CallObjectMethodA(instance, E->get().method, v);
+ ret = jstring_to_string((jstring)o, env);
+ env->DeleteLocalRef(o);
+ } break;
+ case Variant::PACKED_STRING_ARRAY: {
+
+ jobjectArray arr = (jobjectArray)env->CallObjectMethodA(instance, E->get().method, v);
+
+ ret = _jobject_to_variant(env, arr);
+
+ env->DeleteLocalRef(arr);
+ } break;
+ case Variant::PACKED_INT32_ARRAY: {
+
+ jintArray arr = (jintArray)env->CallObjectMethodA(instance, E->get().method, v);
+
+ int fCount = env->GetArrayLength(arr);
+ Vector<int> sarr;
+ sarr.resize(fCount);
+
+ int *w = sarr.ptrw();
+ env->GetIntArrayRegion(arr, 0, fCount, w);
+ ret = sarr;
+ env->DeleteLocalRef(arr);
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance, E->get().method, v);
+
+ int fCount = env->GetArrayLength(arr);
+ Vector<float> sarr;
+ sarr.resize(fCount);
+
+ float *w = sarr.ptrw();
+ env->GetFloatArrayRegion(arr, 0, fCount, w);
+ ret = sarr;
+ env->DeleteLocalRef(arr);
+ } break;
+
+#ifndef _MSC_VER
+#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
+#endif
+ case Variant::DICTIONARY: {
+
+ jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
+ ret = _jobject_to_variant(env, obj);
+ env->DeleteLocalRef(obj);
+
+ } break;
+ default: {
+
+ env->PopLocalFrame(NULL);
+ ERR_FAIL_V(Variant());
+ } break;
+ }
+
+ while (to_erase.size()) {
+ env->DeleteLocalRef(to_erase.front()->get());
+ to_erase.pop_front();
+ }
+
+ env->PopLocalFrame(NULL);
+
+ return ret;
+ }
+
+ jobject get_instance() const {
+
+ return instance;
+ }
+ void set_instance(jobject p_instance) {
+
+ instance = p_instance;
+ }
+
+ void add_method(const StringName &p_name, jmethodID p_method, const Vector<Variant::Type> &p_args, Variant::Type p_ret_type) {
+
+ MethodData md;
+ md.method = p_method;
+ md.argtypes = p_args;
+ md.ret_type = p_ret_type;
+ method_map[p_name] = md;
+ }
+
+ JNISingleton() {
+ instance = NULL;
+ }
+};
+
+#endif // JNI_UTILS_H
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 15e3ac48c7..7e2b0d948e 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -32,7 +32,9 @@
#include "core/io/file_access_buffered_fa.h"
#include "core/project_settings.h"
+#if defined(OPENGL_ENABLED)
#include "drivers/gles2/rasterizer_gles2.h"
+#endif
#include "drivers/unix/dir_access_unix.h"
#include "drivers/unix/file_access_unix.h"
#include "file_access_android.h"
@@ -120,23 +122,27 @@ int OS_Android::get_current_video_driver() const {
Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
- bool gl_initialization_error = false;
-
// FIXME: Add Vulkan support. Readd fallback code from Vulkan to GLES2?
- if (RasterizerGLES2::is_viable() == OK) {
- RasterizerGLES2::register_config();
- RasterizerGLES2::make_current();
- } else {
- gl_initialization_error = true;
- }
-
- if (gl_initialization_error) {
- OS::get_singleton()->alert("Your device does not support any of the supported OpenGL versions.\n"
- "Please try updating your Android version.",
- "Unable to initialize video driver");
- return ERR_UNAVAILABLE;
+#if defined(OPENGL_ENABLED)
+ if (video_driver_index == VIDEO_DRIVER_GLES2) {
+ bool gl_initialization_error = false;
+
+ if (RasterizerGLES2::is_viable() == OK) {
+ RasterizerGLES2::register_config();
+ RasterizerGLES2::make_current();
+ } else {
+ gl_initialization_error = true;
+ }
+
+ if (gl_initialization_error) {
+ OS::get_singleton()->alert("Your device does not support any of the supported OpenGL versions.\n"
+ "Please try updating your Android version.",
+ "Unable to initialize video driver");
+ return ERR_UNAVAILABLE;
+ }
}
+#endif
video_driver_index = p_video_driver;
@@ -753,6 +759,8 @@ OS_Android::OS_Android(GodotJavaWrapper *p_godot_java, GodotIOJavaWrapper *p_god
//rasterizer = NULL;
use_gl2 = false;
+ visual_server = NULL;
+
godot_java = p_godot_java;
godot_io_java = p_godot_io_java;
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp
new file mode 100644
index 0000000000..7413236e5d
--- /dev/null
+++ b/platform/android/plugin/godot_plugin_jni.cpp
@@ -0,0 +1,115 @@
+/*************************************************************************/
+/* godot_plugin_jni.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "godot_plugin_jni.h"
+
+#include <core/engine.h>
+#include <core/error_macros.h>
+#include <core/project_settings.h>
+#include <platform/android/jni_utils.h>
+#include <platform/android/string_android.h>
+
+static HashMap<String, JNISingleton *> jni_singletons;
+
+extern "C" {
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jobject obj, jstring name) {
+
+ String singname = jstring_to_string(name, env);
+ JNISingleton *s = memnew(JNISingleton);
+ s->set_instance(env->NewGlobalRef(obj));
+ jni_singletons[singname] = s;
+
+ Engine::get_singleton()->add_singleton(Engine::Singleton(singname, s));
+ ProjectSettings::get_singleton()->set(singname, s);
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
+
+ String singname = jstring_to_string(sname, env);
+
+ ERR_FAIL_COND(!jni_singletons.has(singname));
+
+ JNISingleton *s = jni_singletons.get(singname);
+
+ String mname = jstring_to_string(name, env);
+ String retval = jstring_to_string(ret, env);
+ Vector<Variant::Type> types;
+ String cs = "(";
+
+ int stringCount = env->GetArrayLength(args);
+
+ for (int i = 0; i < stringCount; i++) {
+
+ jstring string = (jstring)env->GetObjectArrayElement(args, i);
+ const String rawString = jstring_to_string(string, env);
+ types.push_back(get_jni_type(rawString));
+ cs += get_jni_sig(rawString);
+ }
+
+ cs += ")";
+ cs += get_jni_sig(retval);
+ jclass cls = env->GetObjectClass(s->get_instance());
+ jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
+ if (!mid) {
+
+ print_line("Failed getting method ID " + mname);
+ }
+
+ s->add_method(mname, mid, types, get_jni_type(retval));
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jobject obj, jobjectArray gdnlib_paths) {
+ int gdnlib_count = env->GetArrayLength(gdnlib_paths);
+ if (gdnlib_count == 0) {
+ return;
+ }
+
+ // Retrieve the current list of gdnative libraries.
+ Array singletons = Array();
+ if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) {
+ singletons = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ }
+
+ // Insert the libraries provided by the plugin
+ for (int i = 0; i < gdnlib_count; i++) {
+ jstring relative_path = (jstring)env->GetObjectArrayElement(gdnlib_paths, i);
+
+ String path = "res://" + jstring_to_string(relative_path, env);
+ if (!singletons.has(path)) {
+ singletons.push_back(path);
+ }
+ env->DeleteLocalRef(relative_path);
+ }
+
+ // Insert the updated list back into project settings.
+ ProjectSettings::get_singleton()->set("gdnative/singletons", singletons);
+}
+}
diff --git a/platform/android/plugin/godot_plugin_jni.h b/platform/android/plugin/godot_plugin_jni.h
new file mode 100644
index 0000000000..0d613d3bfe
--- /dev/null
+++ b/platform/android/plugin/godot_plugin_jni.h
@@ -0,0 +1,43 @@
+/*************************************************************************/
+/* godot_plugin_jni.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 GODOT_PLUGIN_JNI_H
+#define GODOT_PLUGIN_JNI_H
+
+#include <android/log.h>
+#include <jni.h>
+
+extern "C" {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jobject obj, jstring name);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jobject obj, jobjectArray gdnlib_paths);
+}
+
+#endif // GODOT_PLUGIN_JNI_H
diff --git a/drivers/unix/semaphore_posix.cpp b/platform/android/vulkan/vk_renderer_jni.cpp
index b532b09cd6..3026e7daad 100644
--- a/drivers/unix/semaphore_posix.cpp
+++ b/platform/android/vulkan/vk_renderer_jni.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_posix.cpp */
+/* vk_renderer_jni.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,60 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "semaphore_posix.h"
+#include "vk_renderer_jni.h"
-#if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(OSX_ENABLED) && !defined(IPHONE_ENABLED)
+extern "C" {
-#include "core/os/memory.h"
-#include <errno.h>
-#include <stdio.h>
-
-Error SemaphorePosix::wait() {
-
- while (sem_wait(&sem)) {
- if (errno == EINTR) {
- errno = 0;
- continue;
- } else {
- perror("sem waiting");
- return ERR_BUSY;
- }
- }
- return OK;
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkSurfaceCreated(JNIEnv *env, jobject obj, jobject j_surface) {
+ // TODO: complete
}
-Error SemaphorePosix::post() {
-
- return (sem_post(&sem) == 0) ? OK : ERR_BUSY;
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkSurfaceChanged(JNIEnv *env, jobject object, jobject j_surface, jint width, jint height) {
+ // TODO: complete
}
-int SemaphorePosix::get() const {
- int val;
- sem_getvalue(&sem, &val);
-
- return val;
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkResume(JNIEnv *env, jobject obj) {
+ // TODO: complete
}
-SemaphoreOld *SemaphorePosix::create_semaphore_posix() {
-
- return memnew(SemaphorePosix);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkDrawFrame(JNIEnv *env, jobject obj) {
+ // TODO: complete
}
-void SemaphorePosix::make_default() {
-
- create_func = create_semaphore_posix;
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkPause(JNIEnv *env, jobject obj) {
+ // TODO: complete
}
-SemaphorePosix::SemaphorePosix() {
-
- int r = sem_init(&sem, 0, 0);
- if (r != 0)
- perror("sem creating");
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkDestroy(JNIEnv *env, jobject obj) {
+ // TODO: complete
}
-
-SemaphorePosix::~SemaphorePosix() {
-
- sem_destroy(&sem);
}
-
-#endif
diff --git a/platform/android/vulkan/vk_renderer_jni.h b/platform/android/vulkan/vk_renderer_jni.h
new file mode 100644
index 0000000000..017766fea2
--- /dev/null
+++ b/platform/android/vulkan/vk_renderer_jni.h
@@ -0,0 +1,46 @@
+/*************************************************************************/
+/* vk_renderer_jni.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 VK_RENDERER_JNI_H
+#define VK_RENDERER_JNI_H
+
+#include <android/log.h>
+#include <jni.h>
+
+extern "C" {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkSurfaceCreated(JNIEnv *env, jobject obj, jobject j_surface);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkSurfaceChanged(JNIEnv *env, jobject object, jobject j_surface, jint width, jint height);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkResume(JNIEnv *env, jobject obj);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkDrawFrame(JNIEnv *env, jobject obj);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkPause(JNIEnv *env, jobject obj);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_vulkan_VkRenderer_nativeOnVkDestroy(JNIEnv *env, jobject obj);
+}
+
+#endif // VK_RENDERER_JNI_H
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index b7f6b57244..0a5df14743 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -67,7 +67,6 @@ Error AudioDriverMediaKit::init() {
ERR_FAIL_COND_V(player == NULL, ERR_CANT_OPEN);
}
- mutex = Mutex::create();
player->Start();
return OK;
@@ -108,14 +107,14 @@ void AudioDriverMediaKit::lock() {
if (!mutex)
return;
- mutex->lock();
+ mutex.lock();
}
void AudioDriverMediaKit::unlock() {
if (!mutex)
return;
- mutex->unlock();
+ mutex.unlock();
}
void AudioDriverMediaKit::finish() {
@@ -124,15 +123,9 @@ void AudioDriverMediaKit::finish() {
if (samples_in) {
memdelete_arr(samples_in);
};
-
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
}
AudioDriverMediaKit::AudioDriverMediaKit() {
- mutex = NULL;
player = NULL;
}
diff --git a/platform/haiku/audio_driver_media_kit.h b/platform/haiku/audio_driver_media_kit.h
index 06a362a89e..8272780fa7 100644
--- a/platform/haiku/audio_driver_media_kit.h
+++ b/platform/haiku/audio_driver_media_kit.h
@@ -40,7 +40,7 @@
#include <SoundPlayer.h>
class AudioDriverMediaKit : public AudioDriver {
- Mutex *mutex;
+ Mutex mutex;
BSoundPlayer *player;
static int32_t *samples_in;
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 3c2b7f8d10..2d7efe6b61 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -273,7 +273,8 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
event.instance();
GetKeyModifierState(event, modifiers);
event->set_pressed(message->what == B_KEY_DOWN);
- event->set_scancode(KeyMappingHaiku::get_keysym(raw_char, key));
+ event->set_keycode(KeyMappingHaiku::get_keysym(raw_char, key));
+ event->set_physical_keycode(KeyMappingHaiku::get_keysym(raw_char, key));
event->set_echo(message->HasInt32("be:key_repeat"));
event->set_unicode(0);
@@ -283,8 +284,9 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
}
//make it consistent across platforms.
- if (event->get_scancode() == KEY_BACKTAB) {
- event->set_scancode(KEY_TAB);
+ if (event->get_keycode() == KEY_BACKTAB) {
+ event->set_keycode(KEY_TAB);
+ event->set_physical_keycode(KEY_TAB);
event->set_shift(true);
}
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index fa1b124561..1f82f51888 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -14,6 +14,7 @@ iphone_lib = [
'in_app_store.mm',
'icloud.mm',
'ios.mm',
+ 'vulkan_context_iphone.mm',
]
env_ios = env.Clone()
diff --git a/platform/iphone/app_delegate.h b/platform/iphone/app_delegate.h
index b4454aab11..6b3b7ad5bc 100644
--- a/platform/iphone/app_delegate.h
+++ b/platform/iphone/app_delegate.h
@@ -28,13 +28,20 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#if defined(OPENGL_ENABLED)
#import "gl_view.h"
+#endif
#import "view_controller.h"
#import <UIKit/UIKit.h>
#import <CoreMotion/CoreMotion.h>
+#if defined(OPENGL_ENABLED)
@interface AppDelegate : NSObject <UIApplicationDelegate, GLViewDelegate> {
+#endif
+#if defined(VULKAN_ENABLED)
+@interface AppDelegate : NSObject <UIApplicationDelegate> {
+#endif
//@property (strong, nonatomic) UIWindow *window;
ViewController *view_controller;
bool is_focus_out;
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index 4de321fa04..acc3e5d4e0 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -32,7 +32,9 @@
#include "core/project_settings.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
+#if defined(OPENGL_ENABLED)
#import "gl_view.h"
+#endif
#include "main/main.h"
#include "os_iphone.h"
@@ -412,10 +414,12 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
OS::VideoMode _get_video_mode() {
int backingWidth;
int backingHeight;
+#if defined(OPENGL_ENABLED)
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
+#endif
OS::VideoMode vm;
vm.fullscreen = true;
@@ -426,7 +430,7 @@ OS::VideoMode _get_video_mode() {
};
static int frame_count = 0;
-- (void)drawView:(GLView *)view;
+- (void)drawView:(UIView *)view;
{
switch (frame_count) {
@@ -634,6 +638,7 @@ static int frame_count = 0;
return FALSE;
};
+#if defined(OPENGL_ENABLED)
// WARNING: We must *always* create the GLView after we have constructed the
// OS with iphone_main. This allows the GLView to access project settings so
// it can properly initialize the OpenGL context
@@ -642,7 +647,7 @@ static int frame_count = 0;
view_controller = [[ViewController alloc] init];
view_controller.view = glView;
- window.rootViewController = view_controller;
+
_set_keep_screen_on(bool(GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true)) ? YES : NO);
glView.useCADisplayLink =
@@ -650,6 +655,13 @@ static int frame_count = 0;
printf("cadisaplylink: %d", glView.useCADisplayLink);
glView.animationInterval = 1.0 / kRenderingFrequency;
[glView startAnimation];
+#endif
+
+#if defined(VULKAN_ENABLED)
+ view_controller = [[ViewController alloc] init];
+#endif
+
+ window.rootViewController = view_controller;
// Show the window
[window makeKeyAndVisible];
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index f646b8b1d5..e01950c1db 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -23,6 +23,7 @@ def get_opts():
return [
('IPHONEPATH', 'Path to iPhone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'),
('IPHONESDK', 'Path to the iPhone SDK', ''),
+ BoolVariable('use_static_mvk', 'Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables validation layers)', False),
BoolVariable('game_center', 'Support for game center', True),
BoolVariable('store_kit', 'Support for in-app store', True),
BoolVariable('icloud', 'Support for iCloud', True),
@@ -149,7 +150,7 @@ def configure(env):
'-framework', 'Foundation',
'-framework', 'GameController',
'-framework', 'MediaPlayer',
- '-framework', 'OpenGLES',
+ '-framework', 'Metal',
'-framework', 'QuartzCore',
'-framework', 'Security',
'-framework', 'SystemConfiguration',
@@ -170,11 +171,18 @@ def configure(env):
env.Append(CPPDEFINES=['ICLOUD_ENABLED'])
env.Prepend(CPPPATH=['$IPHONESDK/usr/include',
- '$IPHONESDK/System/Library/Frameworks/OpenGLES.framework/Headers',
'$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers',
])
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
env.Prepend(CPPPATH=['#platform/iphone'])
- env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'GLES_ENABLED', 'COREAUDIO_ENABLED'])
+ env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'COREAUDIO_ENABLED'])
+
+ env.Append(CPPDEFINES=['VULKAN_ENABLED'])
+ env.Append(LINKFLAGS=['-framework', 'IOSurface'])
+ if (env['use_static_mvk']):
+ env.Append(LINKFLAGS=['-framework', 'MoltenVK'])
+ env['builtin_vulkan'] = False
+ elif not env['builtin_vulkan']:
+ env.Append(LIBS=['vulkan'])
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index 0767ce7638..7cef2351e3 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -447,9 +447,6 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref<Image> &p_dst, Ref<Image> &p
ERR_FAIL_COND(p_dst.is_null());
ERR_FAIL_COND(p_src.is_null());
- p_dst->lock();
- p_src->lock();
-
int sw = p_rot ? p_src->get_height() : p_src->get_width();
int sh = p_rot ? p_src->get_width() : p_src->get_height();
@@ -473,9 +470,6 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref<Image> &p_dst, Ref<Image> &p
p_dst->set_pixel(x_pos + x, y_pos + y, dc);
}
}
-
- p_dst->unlock();
- p_src->unlock();
}
struct IconInfo {
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index 696f61f954..99d539d4ff 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -198,11 +198,11 @@ void GameCenter::request_achievement_descriptions() {
ret["type"] = "achievement_descriptions";
if (error == nil) {
ret["result"] = "ok";
- PoolStringArray names;
- PoolStringArray titles;
- PoolStringArray unachieved_descriptions;
- PoolStringArray achieved_descriptions;
- PoolIntArray maximum_points;
+ PackedStringArray names;
+ PackedStringArray titles;
+ PackedStringArray unachieved_descriptions;
+ PackedStringArray achieved_descriptions;
+ PackedInt32Array maximum_points;
Array hidden;
Array replayable;
@@ -253,8 +253,8 @@ void GameCenter::request_achievements() {
ret["type"] = "achievements";
if (error == nil) {
ret["result"] = "ok";
- PoolStringArray names;
- PoolRealArray percentages;
+ PackedStringArray names;
+ PackedFloat32Array percentages;
for (int i = 0; i < [achievements count]; i++) {
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index f846043dde..251f78f2da 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -80,13 +80,13 @@ Variant nsobject_to_variant(NSObject *object) {
const char *str = [(NSString *)object UTF8String];
return String::utf8(str != NULL ? str : "");
} else if ([object isKindOfClass:[NSData class]]) {
- PoolByteArray ret;
+ PackedByteArray ret;
NSData *data = (NSData *)object;
if ([data length] > 0) {
ret.resize([data length]);
{
- PoolByteArray::Write w = ret.write();
- copymem(w.ptr(), [data bytes], [data length]);
+ // PackedByteArray::Write w = ret.write();
+ copymem((void *)ret.ptr(), [data bytes], [data length]);
}
}
return ret;
@@ -184,10 +184,10 @@ NSObject *variant_to_nsobject(Variant v) {
[result addObject:value];
}
return result;
- } else if (v.get_type() == Variant::POOL_BYTE_ARRAY) {
- PoolByteArray arr = v;
- PoolByteArray::Read r = arr.read();
- NSData *result = [NSData dataWithBytes:r.ptr() length:arr.size()];
+ } else if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
+ PackedByteArray arr = v;
+ // PackedByteArray::Read r = arr.read();
+ NSData *result = [NSData dataWithBytes:arr.ptr() length:arr.size()];
return result;
}
WARN_PRINT(String("Could not add unsupported type to iCloud: '" + Variant::get_type_name(v.get_type()) + "'").utf8().get_data());
@@ -315,7 +315,7 @@ ICloud::ICloud() {
Dictionary ret;
ret["type"] = "key_value_changed";
- //PoolStringArray result_keys;
+ //PackedStringArray result_keys;
//Array result_values;
Dictionary keyValues;
String reason = "";
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index 855ab195b0..a8a887824f 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -85,12 +85,12 @@ void InAppStore::_bind_methods() {
Dictionary ret;
ret["type"] = "product_info";
ret["result"] = "ok";
- PoolStringArray titles;
- PoolStringArray descriptions;
- PoolRealArray prices;
- PoolStringArray ids;
- PoolStringArray localized_prices;
- PoolStringArray currency_codes;
+ PackedStringArray titles;
+ PackedStringArray descriptions;
+ PackedFloat32Array prices;
+ PackedStringArray ids;
+ PackedStringArray localized_prices;
+ PackedStringArray currency_codes;
for (NSUInteger i = 0; i < [products count]; i++) {
@@ -113,7 +113,7 @@ void InAppStore::_bind_methods() {
ret["localized_prices"] = localized_prices;
ret["currency_codes"] = currency_codes;
- PoolStringArray invalid_ids;
+ PackedStringArray invalid_ids;
for (NSString *ipid in response.invalidProductIdentifiers) {
@@ -133,7 +133,7 @@ Error InAppStore::request_product_info(Variant p_params) {
Dictionary params = p_params;
ERR_FAIL_COND_V(!params.has("product_ids"), ERR_INVALID_PARAMETER);
- PoolStringArray pids = params["product_ids"];
+ PackedStringArray pids = params["product_ids"];
printf("************ request product info! %i\n", pids.size());
NSMutableArray *array = [[[NSMutableArray alloc] initWithCapacity:pids.size()] autorelease];
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 634062f46b..497f2f747d 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -32,7 +32,16 @@
#include "os_iphone.h"
+#if defined(OPENGL_ENABLED)
#include "drivers/gles2/rasterizer_gles2.h"
+#endif
+
+#if defined(VULKAN_ENABLED)
+#include "servers/visual/rasterizer_rd/rasterizer_rd.h"
+// #import <QuartzCore/CAMetalLayer.h>
+#include <vulkan/vulkan_metal.h>
+#endif
+
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
@@ -91,7 +100,6 @@ String OSIPhone::get_unique_id() const {
void OSIPhone::initialize_core() {
OS_Unix::initialize_core();
- SemaphoreIphone::make_default();
set_data_dir(data_dir);
};
@@ -101,7 +109,9 @@ int OSIPhone::get_current_video_driver() const {
}
Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+ video_driver_index = p_video_driver;
+#if defined(OPENGL_ENABLED)
bool gl_initialization_error = false;
// FIXME: Add Vulkan support via MoltenVK. Add fallback code back?
@@ -118,19 +128,24 @@ Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p
"Unable to initialize video driver");
return ERR_UNAVAILABLE;
}
+#endif
+
+#if defined(VULKAN_ENABLED)
+ RasterizerRD::make_current();
+#endif
- video_driver_index = p_video_driver;
visual_server = memnew(VisualServerRaster);
// FIXME: Reimplement threaded rendering
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, false));
}
-
visual_server->init();
//visual_server->cursor_set_visible(false, 0);
+#if defined(OPENGL_ENABLED)
// reset this to what it should be, it will have been set to 0 after visual_server->init() is called
RasterizerStorageGLES2::system_fbo = gl_view_base_fb;
+#endif
AudioDriverManager::initialize(p_audio_driver);
@@ -195,7 +210,8 @@ void OSIPhone::key(uint32_t p_key, bool p_pressed) {
ev.instance();
ev->set_echo(false);
ev->set_pressed(p_pressed);
- ev->set_scancode(p_key);
+ ev->set_keycode(p_key);
+ ev->set_physical_keycode(p_key);
ev->set_unicode(p_key);
queue_event(ev);
};
@@ -437,9 +453,10 @@ bool OSIPhone::can_draw() const {
};
int OSIPhone::set_base_framebuffer(int p_fb) {
-
+#if defined(OPENGL_ENABLED)
// gl_view_base_fb has not been updated yet
RasterizerStorageGLES2::system_fbo = p_fb;
+#endif
return 0;
};
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index d2d96181f5..f42679e754 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -46,6 +46,11 @@
#include "servers/visual/rasterizer.h"
#include "servers/visual_server.h"
+#if defined(VULKAN_ENABLED)
+#include "drivers/vulkan/rendering_device_vulkan.h"
+#include "platform/iphone/vulkan_context_iphone.h"
+#endif
+
class OSIPhone : public OS_Unix {
private:
@@ -74,6 +79,10 @@ private:
MainLoop *main_loop;
+#if defined(VULKAN_ENABLED)
+ VulkanContextIPhone *context_vulkan;
+ RenderingDeviceVulkan *rendering_device_vulkan;
+#endif
VideoMode video_mode;
virtual int get_video_driver_count() const;
diff --git a/platform/iphone/semaphore_iphone.h b/platform/iphone/semaphore_iphone.h
deleted file mode 100644
index 54ff3c17f9..0000000000
--- a/platform/iphone/semaphore_iphone.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************/
-/* semaphore_iphone.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 SEMAPHORE_IPHONE_H
-#define SEMAPHORE_IPHONE_H
-
-struct cgsem {
- int pipefd[2];
-};
-
-typedef struct cgsem cgsem_t;
-
-#include "core/os/semaphore.h"
-
-class SemaphoreIphone : public SemaphoreOld {
-
- mutable cgsem_t sem;
-
- static SemaphoreOld *create_semaphore_iphone();
-
-public:
- virtual Error wait();
- virtual Error post();
- virtual int get() const;
-
- static void make_default();
- SemaphoreIphone();
-
- ~SemaphoreIphone();
-};
-
-#endif // SEMAPHORE_IPHONE_H
diff --git a/drivers/windows/semaphore_windows.h b/platform/iphone/vulkan_context_iphone.h
index 159e8b3b96..200057e14d 100644
--- a/drivers/windows/semaphore_windows.h
+++ b/platform/iphone/vulkan_context_iphone.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* semaphore_windows.h */
+/* vulkan_context_osx.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,31 +28,21 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEMAPHORE_WINDOWS_H
-#define SEMAPHORE_WINDOWS_H
+#ifndef VULKAN_CONTEXT_IPHONE_H
+#define VULKAN_CONTEXT_IPHONE_H
-#include "core/os/semaphore.h"
+#include "drivers/vulkan/vulkan_context.h"
+// #import <UIKit/UIKit.h>
-#ifdef WINDOWS_ENABLED
+class VulkanContextIPhone : public VulkanContext {
-#include <windows.h>
-
-class SemaphoreWindows : public SemaphoreOld {
-
- mutable HANDLE semaphore;
-
- static SemaphoreOld *create_semaphore_windows();
+ virtual const char *_get_platform_surface_extension() const;
public:
- virtual Error wait();
- virtual Error post();
- virtual int get() const;
-
- static void make_default();
- SemaphoreWindows();
+ int window_create(void *p_window, int p_width, int p_height);
- ~SemaphoreWindows();
+ VulkanContextIPhone();
+ ~VulkanContextIPhone();
};
-#endif
-#endif
+#endif // VULKAN_CONTEXT_IPHONE_H
diff --git a/drivers/dummy/audio_driver_dummy.h b/platform/iphone/vulkan_context_iphone.mm
index 6e39df9e2f..f49b85c097 100644
--- a/drivers/dummy/audio_driver_dummy.h
+++ b/platform/iphone/vulkan_context_iphone.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_driver_dummy.h */
+/* vulkan_context_osx.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,31 +28,29 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef AUDIO_DRIVER_DUMMY_H
-#define AUDIO_DRIVER_DUMMY_H
+#include "vulkan_context_iphone.h"
+#include <vulkan/vulkan_ios.h>
-#include "core/os/mutex.h"
-#include "core/os/thread.h"
-#include "servers/audio_server.h"
+const char *VulkanContextIPhone::_get_platform_surface_extension() const {
+ return VK_MVK_IOS_SURFACE_EXTENSION_NAME;
+}
-class AudioDriverDummy : public AudioDriver {
-public:
- const char *get_name() const {
- return "Dummy";
- };
+int VulkanContextIPhone::window_create(void *p_window, int p_width, int p_height) {
- virtual Error init() { return OK; }
- virtual void start(){};
- virtual int get_mix_rate() const { return DEFAULT_MIX_RATE; };
- virtual SpeakerMode get_speaker_mode() const { return SPEAKER_MODE_STEREO; };
- virtual void lock(){};
- virtual void unlock(){};
- virtual void finish(){};
+ VkIOSSurfaceCreateInfoMVK createInfo;
+ createInfo.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
+ createInfo.pNext = NULL;
+ createInfo.flags = 0;
+ createInfo.pView = p_window;
- virtual float get_latency() { return 0; };
+ VkSurfaceKHR surface;
+ VkResult err = vkCreateIOSSurfaceMVK(_get_instance(), &createInfo, NULL, &surface);
+ ERR_FAIL_COND_V(err, -1);
+ return _window_create(surface, p_width, p_height);
+}
- AudioDriverDummy(){};
- ~AudioDriverDummy(){};
-};
+VulkanContextIPhone::VulkanContextIPhone() {
+}
-#endif // AUDIO_DRIVER_DUMMY_H
+VulkanContextIPhone::~VulkanContextIPhone() {
+}
diff --git a/platform/javascript/dom_keys.inc b/platform/javascript/dom_keys.inc
index 25e88f99d1..fd9df765d2 100644
--- a/platform/javascript/dom_keys.inc
+++ b/platform/javascript/dom_keys.inc
@@ -218,7 +218,7 @@
#define DOM_VK_PA1 0xFD
#define DOM_VK_WIN_OEM_CLEAR 0xFE
-int dom2godot_scancode(int dom_keycode) {
+int dom2godot_keycode(int dom_keycode) {
if (DOM_VK_0 <= dom_keycode && dom_keycode <= DOM_VK_Z) {
// ASCII intersection
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index c44a0270ab..f0326d5027 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -200,7 +200,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform {
private:
Ref<EditorHTTPServer> server;
bool server_quit;
- Mutex *server_lock;
+ Mutex server_lock;
Thread *server_thread;
static void _server_thread_poll(void *data);
@@ -531,9 +531,8 @@ bool EditorExportPlatformJavaScript::poll_export() {
menu_options = preset.is_valid();
if (server->is_listening()) {
if (menu_options == 0) {
- server_lock->lock();
+ MutexLock lock(server_lock);
server->stop();
- server_lock->unlock();
} else {
menu_options += 1;
}
@@ -553,9 +552,8 @@ int EditorExportPlatformJavaScript::get_options_count() const {
Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_preset, int p_option, int p_debug_flags) {
if (p_option == 1) {
- server_lock->lock();
+ MutexLock lock(server_lock);
server->stop();
- server_lock->unlock();
return OK;
}
@@ -584,10 +582,12 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese
ERR_FAIL_COND_V_MSG(!bind_ip.is_valid(), ERR_INVALID_PARAMETER, "Invalid editor setting 'export/web/http_host': '" + bind_host + "'. Try using '127.0.0.1'.");
// Restart server.
- server_lock->lock();
- server->stop();
- err = server->listen(bind_port, bind_ip);
- server_lock->unlock();
+ {
+ MutexLock lock(server_lock);
+
+ server->stop();
+ err = server->listen(bind_port, bind_ip);
+ }
ERR_FAIL_COND_V_MSG(err != OK, err, "Unable to start HTTP server.");
OS::get_singleton()->shell_open(String("http://" + bind_host + ":" + itos(bind_port) + "/tmp_js_export.html"));
@@ -605,9 +605,10 @@ void EditorExportPlatformJavaScript::_server_thread_poll(void *data) {
EditorExportPlatformJavaScript *ej = (EditorExportPlatformJavaScript *)data;
while (!ej->server_quit) {
OS::get_singleton()->delay_usec(1000);
- ej->server_lock->lock();
- ej->server->poll();
- ej->server_lock->unlock();
+ {
+ MutexLock lock(ej->server_lock);
+ ej->server->poll();
+ }
}
}
@@ -615,7 +616,6 @@ EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
server.instance();
server_quit = false;
- server_lock = Mutex::create();
server_thread = Thread::create(_server_thread_poll, this);
Ref<Image> img = memnew(Image(_javascript_logo));
@@ -639,7 +639,6 @@ EditorExportPlatformJavaScript::~EditorExportPlatformJavaScript() {
server->stop();
server_quit = true;
Thread::wait_to_finish(server_thread);
- memdelete(server_lock);
memdelete(server_thread);
}
diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp
index 2c2511a3a5..d7796cc4f4 100644
--- a/platform/javascript/http_client_javascript.cpp
+++ b/platform/javascript/http_client_javascript.cpp
@@ -103,12 +103,12 @@ Error HTTPClient::prepare_request(Method p_method, const String &p_url, const Ve
return OK;
}
-Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body) {
+Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body) {
Error err = prepare_request(p_method, p_url, p_headers);
if (err != OK)
return err;
- PoolByteArray::Read read = p_body.read();
+ const uint8_t *read = p_body.ptr();
godot_xhr_send_data(xhr_id, read.ptr(), p_body.size());
return OK;
}
@@ -173,18 +173,18 @@ int HTTPClient::get_response_body_length() const {
return polled_response.size();
}
-PoolByteArray HTTPClient::read_response_body_chunk() {
+PackedByteArray HTTPClient::read_response_body_chunk() {
- ERR_FAIL_COND_V(status != STATUS_BODY, PoolByteArray());
+ ERR_FAIL_COND_V(status != STATUS_BODY, PackedByteArray());
int to_read = MIN(read_limit, polled_response.size() - response_read_offset);
- PoolByteArray chunk;
+ PackedByteArray chunk;
chunk.resize(to_read);
- PoolByteArray::Write write = chunk.write();
- PoolByteArray::Read read = polled_response.read();
+ uint8_t *write = chunk.ptrw();
+ const uint8_t *read = polled_response.ptr();
memcpy(write.ptr(), read.ptr() + response_read_offset, to_read);
- write = PoolByteArray::Write();
- read = PoolByteArray::Read();
+ write = uint8_t * ();
+ read = const uint8_t * ();
response_read_offset += to_read;
if (response_read_offset == polled_response.size()) {
@@ -263,23 +263,23 @@ Error HTTPClient::poll() {
status = STATUS_BODY;
- PoolByteArray bytes;
+ PackedByteArray bytes;
int len = godot_xhr_get_response_headers_length(xhr_id);
bytes.resize(len + 1);
- PoolByteArray::Write write = bytes.write();
+ uint8_t *write = bytes.ptrw();
godot_xhr_get_response_headers(xhr_id, reinterpret_cast<char *>(write.ptr()), len);
write[len] = 0;
- write = PoolByteArray::Write();
+ write = uint8_t * ();
- PoolByteArray::Read read = bytes.read();
+ const uint8_t *read = bytes.ptr();
polled_response_header = String::utf8(reinterpret_cast<const char *>(read.ptr()));
- read = PoolByteArray::Read();
+ read = const uint8_t * ();
polled_response.resize(godot_xhr_get_response_length(xhr_id));
- write = polled_response.write();
+ write = polled_response.ptrw();
godot_xhr_get_response(xhr_id, write.ptr(), polled_response.size());
- write = PoolByteArray::Write();
+ write = uint8_t * ();
break;
}
diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp
index d907222d24..44cce28d57 100644
--- a/platform/javascript/javascript_eval.cpp
+++ b/platform/javascript/javascript_eval.cpp
@@ -33,7 +33,7 @@
#include "api/javascript_eval.h"
#include "emscripten.h"
-extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_poolbytearray_and_open_write(PoolByteArray *p_arr, PoolByteArray::Write *r_write, int p_len) {
+extern "C" EMSCRIPTEN_KEEPALIVE uint8_t *resize_PackedByteArray_and_open_write(PackedByteArray *p_arr, uint8_t **r_write, int p_len) {
p_arr->resize(p_len);
*r_write = p_arr->write();
@@ -48,8 +48,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
char *s;
} js_data;
- PoolByteArray arr;
- PoolByteArray::Write arr_write;
+ PackedByteArray arr;
+ uint8_t *arr_write;
/* clang-format off */
Variant::Type return_type = static_cast<Variant::Type>(EM_ASM_INT({
@@ -81,7 +81,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
case 'number':
setValue(PTR, eval_ret, 'double');
- return 3; // REAL
+ return 3; // FLOAT
case 'string':
var array_len = lengthBytesUTF8(eval_ret)+1;
@@ -114,9 +114,9 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
eval_ret = new Uint8Array(eval_ret);
}
if (eval_ret instanceof Uint8Array) {
- var bytes_ptr = ccall('resize_poolbytearray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]);
+ var bytes_ptr = ccall('resize_PackedByteArray_and_open_write', 'number', ['number', 'number' ,'number'], [BYTEARRAY_PTR, BYTEARRAY_WRITE_PTR, eval_ret.length]);
HEAPU8.set(eval_ret, bytes_ptr);
- return 20; // POOL_BYTE_ARRAY
+ return 20; // PACKED_BYTE_ARRAY
}
break;
}
@@ -128,7 +128,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
switch (return_type) {
case Variant::BOOL:
return js_data.b;
- case Variant::REAL:
+ case Variant::FLOAT:
return js_data.d;
case Variant::STRING: {
String str = String::utf8(js_data.s);
@@ -137,8 +137,8 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
/* clang-format on */
return str;
}
- case Variant::POOL_BYTE_ARRAY:
- arr_write = PoolByteArray::Write();
+ case Variant::PACKED_BYTE_ARRAY:
+ arr_write = uint8_t * ();
return arr;
default:
return Variant();
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 8ba2b39c85..037f78c7af 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -250,7 +250,8 @@ static Ref<InputEventKey> setup_key_event(const EmscriptenKeyboardEvent *emscrip
ev.instance();
ev->set_echo(emscripten_event->repeat);
dom2godot_mod(emscripten_event, ev);
- ev->set_scancode(dom2godot_scancode(emscripten_event->keyCode));
+ ev->set_keycode(dom2godot_keycode(emscripten_event->keyCode));
+ ev->set_physical_keycode(dom2godot_keycode(emscripten_event->keyCode));
String unicode = String::utf8(emscripten_event->key);
// Check if empty or multi-character (e.g. `CapsLock`).
@@ -270,7 +271,7 @@ EM_BOOL OS_JavaScript::keydown_callback(int p_event_type, const EmscriptenKeyboa
OS_JavaScript *os = get_singleton();
Ref<InputEventKey> ev = setup_key_event(p_event);
ev->set_pressed(true);
- if (ev->get_unicode() == 0 && keycode_has_unicode(ev->get_scancode())) {
+ if (ev->get_unicode() == 0 && keycode_has_unicode(ev->get_keycode())) {
// Defer to keypress event for legacy unicode retrieval.
os->deferred_key_event = ev;
// Do not suppress keypress event.
@@ -295,7 +296,7 @@ EM_BOOL OS_JavaScript::keyup_callback(int p_event_type, const EmscriptenKeyboard
Ref<InputEventKey> ev = setup_key_event(p_event);
ev->set_pressed(false);
get_singleton()->input->parse_input_event(ev);
- return ev->get_scancode() != KEY_UNKNOWN && ev->get_scancode() != 0;
+ return ev->get_keycode() != KEY_UNKNOWN && ev->get_keycode() != 0;
}
// Mouse
@@ -536,17 +537,17 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
png_meta.height = texture_size.height;
png_meta.format = PNG_FORMAT_RGBA;
- PoolByteArray png;
+ PackedByteArray png;
size_t len;
- PoolByteArray::Read r = image->get_data().read();
+ const uint8_t *r = image->get_data().ptr();
ERR_FAIL_COND(!png_image_write_get_memory_size(png_meta, len, 0, r.ptr(), 0, NULL));
png.resize(len);
- PoolByteArray::Write w = png.write();
+ uint8_t *w = png.ptrw();
ERR_FAIL_COND(!png_image_write_to_memory(&png_meta, w.ptr(), &len, 0, r.ptr(), 0, NULL));
- w = PoolByteArray::Write();
+ w = uint8_t * ();
- r = png.read();
+ r = png.ptr();
char *object_url;
/* clang-format off */
@@ -563,7 +564,7 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
stringToUTF8(url, string_on_wasm_heap, length_bytes);
}, r.ptr(), len, &object_url);
/* clang-format on */
- r = PoolByteArray::Read();
+ r = const uint8_t * ();
String url = String::utf8(object_url) + "?" + itos(p_hotspot.x) + " " + itos(p_hotspot.y);
@@ -981,10 +982,10 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, mousedown, mouse_button_callback)
SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, mouseup, mouse_button_callback)
SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, wheel, wheel_callback)
- SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, touchstart, touch_press_callback)
- SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, touchmove, touchmove_callback)
- SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, touchend, touch_press_callback)
- SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, touchcancel, touch_press_callback)
+ SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchstart, touch_press_callback)
+ SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchmove, touchmove_callback)
+ SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchend, touch_press_callback)
+ SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchcancel, touch_press_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, keydown, keydown_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, keypress, keypress_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, keyup, keyup_callback)
@@ -1178,17 +1179,17 @@ void OS_JavaScript::set_icon(const Ref<Image> &p_icon) {
png_meta.height = icon->get_height();
png_meta.format = PNG_FORMAT_RGBA;
- PoolByteArray png;
+ PackedByteArray png;
size_t len;
- PoolByteArray::Read r = icon->get_data().read();
+ const uint8_t *r = icon->get_data().ptr();
ERR_FAIL_COND(!png_image_write_get_memory_size(png_meta, len, 0, r.ptr(), 0, NULL));
png.resize(len);
- PoolByteArray::Write w = png.write();
+ uint8_t *w = png.ptrw();
ERR_FAIL_COND(!png_image_write_to_memory(&png_meta, w.ptr(), &len, 0, r.ptr(), 0, NULL));
- w = PoolByteArray::Write();
+ w = uint8_t * ();
- r = png.read();
+ r = png.ptr();
/* clang-format off */
EM_ASM_ARGS({
var PNG_PTR = $0;
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index d764ac4b50..0a4e0a45e1 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -9,7 +9,6 @@ files = [
'crash_handler_osx.mm',
'os_osx.mm',
'godot_main_osx.mm',
- 'semaphore_osx.cpp',
'dir_access_osx.mm',
'joypad_osx.cpp',
'vulkan_context_osx.mm',
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 0b164a2c56..b2f4032f66 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -151,18 +151,18 @@ def configure(env):
env.Prepend(CPPPATH=['#platform/osx'])
env.Append(CPPDEFINES=['OSX_ENABLED', 'UNIX_ENABLED', 'APPLE_STYLE_KEYS', 'COREAUDIO_ENABLED', 'COREMIDI_ENABLED'])
- env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreMIDI', '-framework', 'IOKit', '-framework', 'ForceFeedback', '-framework', 'CoreVideo', '-framework', 'AVFoundation', '-framework', 'CoreMedia'])
+ env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'AudioUnit', 'CoreAudio', 'CoreMIDI', 'IOKit', 'ForceFeedback', 'CoreVideo', 'AVFoundation', 'CoreMedia'])
env.Append(LIBS=['pthread', 'z'])
env.Append(CPPDEFINES=['VULKAN_ENABLED'])
- env.Append(LINKFLAGS=['-framework', 'Metal', '-framework', 'QuartzCore', '-framework', 'IOSurface'])
+ env.AppendUnique(FRAMEWORKS=['Metal', 'QuartzCore', 'IOSurface'])
if (env['use_static_mvk']):
- env.Append(LINKFLAGS=['-framework', 'MoltenVK'])
+ env.AppendUnique(FRAMEWORKS=['MoltenVK'])
env['builtin_vulkan'] = False
elif not env['builtin_vulkan']:
env.Append(LIBS=['vulkan'])
#env.Append(CPPDEFINES=['GLES_ENABLED', 'OPENGL_ENABLED'])
- env.Append(CCFLAGS=['-mmacosx-version-min=10.11'])
- env.Append(LINKFLAGS=['-mmacosx-version-min=10.11'])
+ env.Append(CCFLAGS=['-mmacosx-version-min=10.12'])
+ env.Append(LINKFLAGS=['-mmacosx-version-min=10.12'])
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 312987b8cb..dbe52da912 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -139,7 +139,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/timestamp"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements", PROPERTY_HINT_GLOBAL_FILE, "*.plist"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "codesign/custom_options"), PoolStringArray()));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
#endif
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
@@ -147,7 +147,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false));
}
-void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_source, Vector<uint8_t> &p_dest) {
+void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector<uint8_t> &p_source, Vector<uint8_t> &p_dest) {
int src_len = p_size * p_size;
@@ -160,11 +160,11 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_sour
int i = 0;
while (i < src_len) {
- uint8_t cur = p_source.read()[i * 4 + p_ch];
+ uint8_t cur = p_source.ptr()[i * 4 + p_ch];
if (i < src_len - 2) {
- if ((p_source.read()[(i + 1) * 4 + p_ch] == cur) && (p_source.read()[(i + 2) * 4 + p_ch] == cur)) {
+ if ((p_source.ptr()[(i + 1) * 4 + p_ch] == cur) && (p_source.ptr()[(i + 2) * 4 + p_ch] == cur)) {
if (buf_size > 0) {
result.write[res_size++] = (uint8_t)(buf_size - 1);
copymem(&result.write[res_size], &buf, buf_size);
@@ -176,7 +176,7 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, PoolVector<uint8_t> &p_sour
bool hit_lim = true;
for (int j = 3; j <= lim; j++) {
- if (p_source.read()[(i + j) * 4 + p_ch] != cur) {
+ if (p_source.ptr()[(i + j) * 4 + p_ch] != cur) {
hit_lim = false;
i = i + j - 1;
result.write[res_size++] = (uint8_t)(j - 3 + 0x80);
@@ -278,7 +278,7 @@ void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_
DirAccess::remove_file_or_error(path);
} else {
- PoolVector<uint8_t> src_data = copy->get_data();
+ Vector<uint8_t> src_data = copy->get_data();
//encode 24bit RGB RLE icon
{
@@ -302,7 +302,7 @@ void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_
data.resize(data.size() + len + 8);
for (int j = 0; j < len; j++) {
- data.write[ofs + 8 + j] = src_data.read()[j * 4 + 3];
+ data.write[ofs + 8 + j] = src_data.ptr()[j * 4 + 3];
}
len += 8;
len = BSWAP32(len);
@@ -386,7 +386,7 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese
args.push_back(p_preset->get("codesign/entitlements"));
}
- PoolStringArray user_args = p_preset->get("codesign/custom_options");
+ PackedStringArray user_args = p_preset->get("codesign/custom_options");
for (int i = 0; i < user_args.size(); i++) {
String user_arg = user_args[i].strip_edges();
if (!user_arg.empty()) {
diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp
index 13ece678f3..e9f46fb5a4 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/osx/joypad_osx.cpp
@@ -208,9 +208,8 @@ void joypad::add_hid_elements(CFArrayRef p_array) {
CFArrayApplyFunction(p_array, range, hid_element_added, this);
}
-static void joypad_removed_callback(void *ctx, IOReturn result, void *sender) {
- int id = (intptr_t)ctx;
- self->_device_removed(id);
+static void joypad_removed_callback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) {
+ self->_device_removed(res, ioHIDDeviceObject);
}
static void joypad_added_callback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) {
@@ -261,16 +260,15 @@ void JoypadOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) {
#endif
device_list.push_back(new_joypad);
}
- IOHIDDeviceRegisterRemovalCallback(p_device, joypad_removed_callback, (void *)(intptr_t)new_joypad.id);
IOHIDDeviceScheduleWithRunLoop(p_device, CFRunLoopGetCurrent(), GODOT_JOY_LOOP_RUN_MODE);
}
-void JoypadOSX::_device_removed(int p_id) {
+void JoypadOSX::_device_removed(IOReturn p_res, IOHIDDeviceRef p_device) {
- int device = get_joy_index(p_id);
+ int device = get_joy_ref(p_device);
ERR_FAIL_COND(device == -1);
- input->joy_connection_changed(p_id, false, "");
+ input->joy_connection_changed(device_list[device].id, false, "");
device_list.write[device].free();
device_list.remove(device);
}
@@ -516,6 +514,13 @@ int JoypadOSX::get_joy_index(int p_id) const {
return -1;
}
+int JoypadOSX::get_joy_ref(IOHIDDeviceRef p_device) const {
+ for (int i = 0; i < device_list.size(); i++) {
+ if (device_list[i].device_ref == p_device) return i;
+ }
+ return -1;
+}
+
bool JoypadOSX::have_device(IOHIDDeviceRef p_device) const {
for (int i = 0; i < device_list.size(); i++) {
if (device_list[i].device_ref == p_device) {
@@ -558,6 +563,7 @@ void JoypadOSX::config_hid_manager(CFArrayRef p_matching_array) const {
IOHIDManagerSetDeviceMatchingMultiple(hid_manager, p_matching_array);
IOHIDManagerRegisterDeviceMatchingCallback(hid_manager, joypad_added_callback, NULL);
+ IOHIDManagerRegisterDeviceRemovalCallback(hid_manager, joypad_removed_callback, NULL);
IOHIDManagerScheduleWithRunLoop(hid_manager, runloop, GODOT_JOY_LOOP_RUN_MODE);
while (CFRunLoopRunInMode(GODOT_JOY_LOOP_RUN_MODE, 0, TRUE) == kCFRunLoopRunHandledSource) {
diff --git a/platform/osx/joypad_osx.h b/platform/osx/joypad_osx.h
index 388251016b..2c076b3680 100644
--- a/platform/osx/joypad_osx.h
+++ b/platform/osx/joypad_osx.h
@@ -103,6 +103,7 @@ private:
bool configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy);
int get_joy_index(int p_id) const;
+ int get_joy_ref(IOHIDDeviceRef p_device) const;
void poll_joypads() const;
void setup_joypad_objects();
@@ -115,7 +116,7 @@ public:
void process_joypads();
void _device_added(IOReturn p_res, IOHIDDeviceRef p_device);
- void _device_removed(int p_id);
+ void _device_removed(IOReturn p_res, IOHIDDeviceRef p_device);
JoypadOSX();
~JoypadOSX();
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 75a56bd82c..3140d9bac4 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -69,7 +69,8 @@ public:
bool pressed;
bool echo;
bool raw;
- uint32_t scancode;
+ uint32_t keycode;
+ uint32_t physical_keycode;
uint32_t unicode;
};
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index ca29c95f57..4c70beee00 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -44,7 +44,6 @@
#endif
#include "main/main.h"
-#include "semaphore_osx.h"
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
@@ -157,7 +156,8 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
get_key_modifier_state([event modifierFlags], k);
k->set_pressed(true);
- k->set_scancode(KEY_PERIOD);
+ k->set_keycode(KEY_PERIOD);
+ k->set_physical_keycode(KEY_PERIOD);
k->set_echo([event isARepeat]);
OS_OSX::singleton->push_input(k);
@@ -635,7 +635,8 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
ke.pressed = true;
ke.echo = false;
ke.raw = false; // IME input event
- ke.scancode = 0;
+ ke.keycode = 0;
+ ke.physical_keycode = 0;
ke.unicode = codepoint;
push_to_key_event_buffer(ke);
@@ -747,7 +748,7 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
mm->set_position(pos);
mm->set_pressure([event pressure]);
- if ([event subtype] == NSTabletPointEventSubtype) {
+ if ([event subtype] == NSEventSubtypeTabletPoint) {
const NSPoint p = [event tilt];
mm->set_tilt(Vector2(p.x, p.y));
}
@@ -1158,7 +1159,8 @@ static int remapKey(unsigned int key, unsigned int state) {
ke.osx_state = [event modifierFlags];
ke.pressed = true;
ke.echo = [event isARepeat];
- ke.scancode = remapKey([event keyCode], [event modifierFlags]);
+ ke.keycode = remapKey([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = translateKey([event keyCode]);
ke.raw = true;
ke.unicode = [characters characterAtIndex:i];
@@ -1170,7 +1172,8 @@ static int remapKey(unsigned int key, unsigned int state) {
ke.osx_state = [event modifierFlags];
ke.pressed = true;
ke.echo = [event isARepeat];
- ke.scancode = remapKey([event keyCode], [event modifierFlags]);
+ ke.keycode = remapKey([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = translateKey([event keyCode]);
ke.raw = false;
ke.unicode = 0;
@@ -1228,7 +1231,8 @@ static int remapKey(unsigned int key, unsigned int state) {
}
ke.osx_state = mod;
- ke.scancode = remapKey(key, mod);
+ ke.keycode = remapKey(key, mod);
+ ke.physical_keycode = translateKey(key);
ke.unicode = 0;
push_to_key_event_buffer(ke);
@@ -1250,7 +1254,8 @@ static int remapKey(unsigned int key, unsigned int state) {
ke.osx_state = [event modifierFlags];
ke.pressed = false;
ke.echo = [event isARepeat];
- ke.scancode = remapKey([event keyCode], [event modifierFlags]);
+ ke.keycode = remapKey([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = translateKey([event keyCode]);
ke.raw = true;
ke.unicode = [characters characterAtIndex:i];
@@ -1262,7 +1267,8 @@ static int remapKey(unsigned int key, unsigned int state) {
ke.osx_state = [event modifierFlags];
ke.pressed = false;
ke.echo = [event isARepeat];
- ke.scancode = remapKey([event keyCode], [event modifierFlags]);
+ ke.keycode = remapKey([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = translateKey([event keyCode]);
ke.raw = true;
ke.unicode = 0;
@@ -1457,8 +1463,6 @@ void OS_OSX::initialize_core() {
DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_RESOURCES);
DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_USERDATA);
DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_FILESYSTEM);
-
- SemaphoreOSX::make_default();
}
static bool keyboard_layout_dirty = true;
@@ -1757,7 +1761,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) {
[window addButtonWithTitle:@"OK"];
[window setMessageText:ns_title];
[window setInformativeText:ns_alert];
- [window setAlertStyle:NSWarningAlertStyle];
+ [window setAlertStyle:NSAlertStyleWarning];
// Display it, then release
[window runModal];
@@ -1892,10 +1896,6 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
uint8_t *pixels = [imgrep bitmapData];
int len = int(texture_size.width * texture_size.height);
- PoolVector<uint8_t> data = image->get_data();
- PoolVector<uint8_t>::Read r = data.read();
-
- image->lock();
for (int i = 0; i < len; i++) {
int row_index = floor(i / texture_size.width) + atlas_rect.position.y;
@@ -1915,8 +1915,6 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
pixels[i * 4 + 3] = alpha;
}
- image->unlock();
-
NSImage *nsimage = [[NSImage alloc] initWithSize:NSMakeSize(texture_size.width, texture_size.height)];
[nsimage addRepresentation:imgrep];
@@ -2051,8 +2049,7 @@ void OS_OSX::set_icon(const Ref<Image> &p_icon) {
uint8_t *pixels = [imgrep bitmapData];
int len = img->get_width() * img->get_height();
- PoolVector<uint8_t> data = img->get_data();
- PoolVector<uint8_t>::Read r = data.read();
+ const uint8_t *r = img->get_data().ptr();
/* Premultiply the alpha channel */
for (int i = 0; i < len; i++) {
@@ -2852,32 +2849,35 @@ void OS_OSX::process_key_events() {
get_key_modifier_state(ke.osx_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
- k->set_scancode(ke.scancode);
+ k->set_keycode(ke.keycode);
+ k->set_physical_keycode(ke.physical_keycode);
k->set_unicode(ke.unicode);
push_input(k);
} else {
// IME input
- if ((i == 0 && ke.scancode == 0) || (i > 0 && key_event_buffer[i - 1].scancode == 0)) {
+ if ((i == 0 && ke.keycode == 0) || (i > 0 && key_event_buffer[i - 1].keycode == 0)) {
k.instance();
get_key_modifier_state(ke.osx_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
- k->set_scancode(0);
+ k->set_keycode(0);
+ k->set_physical_keycode(0);
k->set_unicode(ke.unicode);
push_input(k);
}
- if (ke.scancode != 0) {
+ if (ke.keycode != 0) {
k.instance();
get_key_modifier_state(ke.osx_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
- k->set_scancode(ke.scancode);
+ k->set_keycode(ke.keycode);
+ k->set_physical_keycode(ke.physical_keycode);
- if (i + 1 < key_event_pos && key_event_buffer[i + 1].scancode == 0) {
+ if (i + 1 < key_event_pos && key_event_buffer[i + 1].keycode == 0) {
k->set_unicode(key_event_buffer[i + 1].unicode);
}
diff --git a/platform/server/SCsub b/platform/server/SCsub
index e8538f03a6..8364164114 100644
--- a/platform/server/SCsub
+++ b/platform/server/SCsub
@@ -10,7 +10,6 @@ common_server = [\
if sys.platform == "darwin":
common_server.append("#platform/osx/crash_handler_osx.mm")
- common_server.append("#platform/osx/semaphore_osx.cpp")
else:
common_server.append("#platform/x11/crash_handler_x11.cpp")
diff --git a/platform/server/detect.py b/platform/server/detect.py
index d82df77957..db9ba8d036 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -32,6 +32,7 @@ def get_opts():
return [
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
+ BoolVariable('use_coverage', 'Test Godot coverage', False),
BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False),
BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
@@ -99,6 +100,9 @@ def configure(env):
env.Append(CPPDEFINES=['TYPED_METHOD_BIND'])
env.extra_suffix = ".llvm" + env.extra_suffix
+ if env['use_coverage']:
+ env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs'])
+ env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs'])
if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']:
env.extra_suffix += "s"
@@ -159,6 +163,10 @@ def configure(env):
sys.exit(255)
env.ParseConfig('pkg-config bullet --cflags --libs')
+ if False: # not env['builtin_assimp']:
+ # FIXME: Add min version check
+ env.ParseConfig('pkg-config assimp --cflags --libs')
+
if not env['builtin_enet']:
env.ParseConfig('pkg-config libenet --cflags --libs')
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index c0a4813596..3257ec261c 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -31,7 +31,6 @@
#include "os_server.h"
#include "core/print_string.h"
-#include "drivers/dummy/audio_driver_dummy.h"
#include "drivers/dummy/rasterizer_dummy.h"
#include "drivers/dummy/texture_loader_dummy.h"
#include "servers/visual/visual_server_raster.h"
@@ -69,10 +68,6 @@ void OS_Server::initialize_core() {
crash_handler.initialize();
OS_Unix::initialize_core();
-
-#ifdef __APPLE__
- SemaphoreOSX::make_default();
-#endif
}
Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index a47fe96c1b..ccb4b43373 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -410,14 +410,16 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
ke.type = OS_UWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
ke.unicode = 0;
- ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
+ ke.keycode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
+ ke.physical_keycode = KeyMappingWindows::get_scansym((unsigned int)key_args->KeyStatus.ScanCode);
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
} else {
ke.type = OS_UWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
ke.unicode = char_args->KeyCode;
- ke.scancode = 0;
+ ke.keycode = 0;
+ ke.physical_keycode = 0;
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 3cd7a02a94..4ddb5463d0 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -140,8 +140,6 @@ void OS_UWP::initialize_core() {
//RedirectIOToConsole();
ThreadUWP::make_default();
- SemaphoreWindows::make_default();
- MutexWindows::make_default();
RWLockWindows::make_default();
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES);
@@ -606,7 +604,8 @@ void OS_UWP::process_key_events() {
key_event->set_shift(kev.shift);
key_event->set_control(kev.control);
key_event->set_echo(kev.echo);
- key_event->set_scancode(kev.scancode);
+ key_event->set_keycode(kev.keycode);
+ key_event->set_physical_keycode(kev.physical_keycode);
key_event->set_unicode(kev.unicode);
key_event->set_pressed(kev.pressed);
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 32b899c0da..ac6e0f3dd5 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -61,7 +61,8 @@ public:
bool alt, shift, control;
MessageType type;
bool pressed;
- unsigned int scancode;
+ unsigned int keycode;
+ unsigned int physical_keycode;
unsigned int unicode;
bool echo;
CorePhysicalKeyStatus status;
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index 31501c2cd3..78a3fc8f79 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -85,7 +85,7 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/timestamp_server_url"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/digest_algorithm", PROPERTY_HINT_ENUM, "SHA1,SHA256"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/description"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::POOL_STRING_ARRAY, "codesign/custom_options"), PoolStringArray()));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.ico"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/file_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "1.0.0"), ""));
@@ -297,7 +297,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
}
//user options
- PoolStringArray user_args = p_preset->get("codesign/custom_options");
+ PackedStringArray user_args = p_preset->get("codesign/custom_options");
for (int i = 0; i < user_args.size(); i++) {
String user_arg = user_args[i].strip_edges();
if (!user_arg.empty()) {
diff --git a/platform/windows/key_mapping_windows.cpp b/platform/windows/key_mapping_windows.cpp
index c76b31ca9c..da63e92622 100644
--- a/platform/windows/key_mapping_windows.cpp
+++ b/platform/windows/key_mapping_windows.cpp
@@ -238,6 +238,104 @@ VK_PA1 (0xFD)
VK_OEM_CLEAR (0xFE)
*/
+static _WinTranslatePair _scancode_to_keycode[] = {
+
+ { KEY_ESCAPE, 0x01 },
+ { KEY_1, 0x02 },
+ { KEY_2, 0x03 },
+ { KEY_3, 0x04 },
+ { KEY_4, 0x05 },
+ { KEY_5, 0x06 },
+ { KEY_6, 0x07 },
+ { KEY_7, 0x08 },
+ { KEY_8, 0x09 },
+ { KEY_9, 0x0A },
+ { KEY_0, 0x0B },
+ { KEY_MINUS, 0x0C },
+ { KEY_EQUAL, 0x0D },
+ { KEY_BACKSPACE, 0x0E },
+ { KEY_TAB, 0x0F },
+ { KEY_Q, 0x10 },
+ { KEY_W, 0x11 },
+ { KEY_E, 0x12 },
+ { KEY_R, 0x13 },
+ { KEY_T, 0x14 },
+ { KEY_Y, 0x15 },
+ { KEY_U, 0x16 },
+ { KEY_I, 0x17 },
+ { KEY_O, 0x18 },
+ { KEY_P, 0x19 },
+ { KEY_BRACELEFT, 0x1A },
+ { KEY_BRACERIGHT, 0x1B },
+ { KEY_ENTER, 0x1C },
+ { KEY_CONTROL, 0x1D },
+ { KEY_A, 0x1E },
+ { KEY_S, 0x1F },
+ { KEY_D, 0x20 },
+ { KEY_F, 0x21 },
+ { KEY_G, 0x22 },
+ { KEY_H, 0x23 },
+ { KEY_J, 0x24 },
+ { KEY_K, 0x25 },
+ { KEY_L, 0x26 },
+ { KEY_SEMICOLON, 0x27 },
+ { KEY_APOSTROPHE, 0x28 },
+ { KEY_QUOTELEFT, 0x29 },
+ { KEY_SHIFT, 0x2A },
+ { KEY_BACKSLASH, 0x2B },
+ { KEY_Z, 0x2C },
+ { KEY_X, 0x2D },
+ { KEY_C, 0x2E },
+ { KEY_V, 0x2F },
+ { KEY_B, 0x30 },
+ { KEY_N, 0x31 },
+ { KEY_M, 0x32 },
+ { KEY_COMMA, 0x33 },
+ { KEY_PERIOD, 0x34 },
+ { KEY_SLASH, 0x35 },
+ { KEY_SHIFT, 0x36 },
+ { KEY_PRINT, 0x37 },
+ { KEY_ALT, 0x38 },
+ { KEY_SPACE, 0x39 },
+ { KEY_CAPSLOCK, 0x3A },
+ { KEY_F1, 0x3B },
+ { KEY_F2, 0x3C },
+ { KEY_F3, 0x3D },
+ { KEY_F4, 0x3E },
+ { KEY_F5, 0x3F },
+ { KEY_F6, 0x40 },
+ { KEY_F7, 0x41 },
+ { KEY_F8, 0x42 },
+ { KEY_F9, 0x43 },
+ { KEY_F10, 0x44 },
+ { KEY_NUMLOCK, 0x45 },
+ { KEY_SCROLLLOCK, 0x46 },
+ { KEY_HOME, 0x47 },
+ { KEY_UP, 0x48 },
+ { KEY_PAGEUP, 0x49 },
+ { KEY_KP_SUBTRACT, 0x4A },
+ { KEY_LEFT, 0x4B },
+ { KEY_KP_5, 0x4C },
+ { KEY_RIGHT, 0x4D },
+ { KEY_KP_ADD, 0x4E },
+ { KEY_END, 0x4F },
+ { KEY_DOWN, 0x50 },
+ { KEY_PAGEDOWN, 0x51 },
+ { KEY_INSERT, 0x52 },
+ { KEY_DELETE, 0x53 },
+ //{ KEY_???, 0x56 }, //NON US BACKSLASH
+ { KEY_F11, 0x57 },
+ { KEY_F12, 0x58 },
+ { KEY_META, 0x5B },
+ { KEY_META, 0x5C },
+ { KEY_MENU, 0x5D },
+ { KEY_F13, 0x64 },
+ { KEY_F14, 0x65 },
+ { KEY_F15, 0x66 },
+ { KEY_F16, 0x67 },
+ { KEY_UNKNOWN, 0 }
+};
+
unsigned int KeyMappingWindows::get_keysym(unsigned int p_code) {
for (int i = 0; _vk_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
@@ -251,3 +349,69 @@ unsigned int KeyMappingWindows::get_keysym(unsigned int p_code) {
return KEY_UNKNOWN;
}
+
+unsigned int KeyMappingWindows::get_scansym(unsigned int p_code, bool p_extended) {
+ unsigned int keycode = KEY_UNKNOWN;
+ for (int i = 0; _scancode_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
+
+ if (_scancode_to_keycode[i].keycode == p_code) {
+ keycode = _scancode_to_keycode[i].keysym;
+ break;
+ }
+ }
+
+ if (p_extended) {
+ switch (keycode) {
+ case KEY_ENTER: {
+ keycode = KEY_KP_ENTER;
+ } break;
+ case KEY_SLASH: {
+ keycode = KEY_KP_DIVIDE;
+ } break;
+ case KEY_CAPSLOCK: {
+ keycode = KEY_KP_ADD;
+ } break;
+ }
+ } else {
+ switch (keycode) {
+ case KEY_NUMLOCK: {
+ keycode = KEY_PAUSE;
+ } break;
+ case KEY_HOME: {
+ keycode = KEY_KP_7;
+ } break;
+ case KEY_UP: {
+ keycode = KEY_KP_8;
+ } break;
+ case KEY_PAGEUP: {
+ keycode = KEY_KP_9;
+ } break;
+ case KEY_LEFT: {
+ keycode = KEY_KP_4;
+ } break;
+ case KEY_RIGHT: {
+ keycode = KEY_KP_6;
+ } break;
+ case KEY_END: {
+ keycode = KEY_KP_1;
+ } break;
+ case KEY_DOWN: {
+ keycode = KEY_KP_2;
+ } break;
+ case KEY_PAGEDOWN: {
+ keycode = KEY_KP_3;
+ } break;
+ case KEY_INSERT: {
+ keycode = KEY_KP_0;
+ } break;
+ case KEY_DELETE: {
+ keycode = KEY_KP_PERIOD;
+ } break;
+ case KEY_PRINT: {
+ keycode = KEY_KP_MULTIPLY;
+ } break;
+ }
+ }
+
+ return keycode;
+}
diff --git a/platform/windows/key_mapping_windows.h b/platform/windows/key_mapping_windows.h
index 0f9bdecde1..3361ad397f 100644
--- a/platform/windows/key_mapping_windows.h
+++ b/platform/windows/key_mapping_windows.h
@@ -43,6 +43,7 @@ class KeyMappingWindows {
public:
static unsigned int get_keysym(unsigned int p_code);
+ static unsigned int get_scansym(unsigned int p_code, bool p_extended);
};
#endif // KEY_MAPPING_WINDOWS_H
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index cdcdf65e21..63f0cd53a4 100755..100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -34,6 +34,7 @@
#include "os_windows.h"
#include "core/io/marshalls.h"
+#include "core/script_language.h"
#include "core/version_generated.gen.h"
#if defined(OPENGL_ENABLED)
@@ -46,9 +47,7 @@
#include "drivers/windows/dir_access_windows.h"
#include "drivers/windows/file_access_windows.h"
-#include "drivers/windows/mutex_windows.h"
#include "drivers/windows/rw_lock_windows.h"
-#include "drivers/windows/semaphore_windows.h"
#include "drivers/windows/thread_windows.h"
#include "joypad_windows.h"
#include "lang_table.h"
@@ -228,8 +227,6 @@ void OS_Windows::initialize_core() {
borderless = false;
ThreadWindows::make_default();
- SemaphoreWindows::make_default();
- MutexWindows::make_default();
RWLockWindows::make_default();
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES);
@@ -708,7 +705,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
}
- FALLTHROUGH;
+ [[fallthrough]];
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_RBUTTONDOWN:
@@ -983,7 +980,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (wParam==VK_WIN) TODO wtf is this?
meta_mem=uMsg==WM_KEYDOWN;
*/
- FALLTHROUGH;
+ [[fallthrough]];
}
case WM_CHAR: {
@@ -1134,7 +1131,8 @@ void OS_Windows::process_key_events() {
k->set_control(ke.control);
k->set_metakey(ke.meta);
k->set_pressed(true);
- k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam));
+ k->set_keycode(KeyMappingWindows::get_keysym(ke.wParam));
+ k->set_physical_keycode(KeyMappingWindows::get_scansym((ke.lParam >> 16) & 0xFF, ke.lParam & (1 << 24)));
k->set_unicode(ke.wParam);
if (k->get_unicode() && gr_mem) {
k->set_alt(false);
@@ -1164,11 +1162,13 @@ void OS_Windows::process_key_events() {
if ((ke.lParam & (1 << 24)) && (ke.wParam == VK_RETURN)) {
// Special case for Numpad Enter key
- k->set_scancode(KEY_KP_ENTER);
+ k->set_keycode(KEY_KP_ENTER);
} else {
- k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam));
+ k->set_keycode(KeyMappingWindows::get_keysym(ke.wParam));
}
+ k->set_physical_keycode(KeyMappingWindows::get_scansym((ke.lParam >> 16) & 0xFF, ke.lParam & (1 << 24)));
+
if (i + 1 < key_event_pos && key_event_buffer[i + 1].uMsg == WM_CHAR) {
k->set_unicode(key_event_buffer[i + 1].wParam);
}
@@ -2567,7 +2567,6 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap
// Create the BITMAP with alpha channel
COLORREF *buffer = (COLORREF *)memalloc(sizeof(COLORREF) * image_size);
- image->lock();
for (UINT index = 0; index < image_size; index++) {
int row_index = floor(index / texture_size.width) + atlas_rect.position.y;
int column_index = (index % int(texture_size.width)) + atlas_rect.position.x;
@@ -2579,7 +2578,6 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap
*(buffer + index) = image->get_pixel(column_index, row_index).to_argb32();
}
- image->unlock();
// Using 4 channels, so 4 * 8 bits
HBITMAP bitmap = CreateBitmap(texture_size.width, texture_size.height, 1, 4 * 8, buffer);
@@ -2724,7 +2722,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
if (p_pipe_mutex) {
p_pipe_mutex->lock();
}
- (*r_pipe) += buf;
+ (*r_pipe) += String::utf8(buf);
if (p_pipe_mutex) {
p_pipe_mutex->unlock();
}
@@ -2934,7 +2932,7 @@ void OS_Windows::set_icon(const Ref<Image> &p_icon) {
encode_uint32(0, &icon_bmp[36]);
uint8_t *wr = &icon_bmp[40];
- PoolVector<uint8_t>::Read r = icon->get_data().read();
+ const uint8_t *r = icon->get_data().ptr();
for (int i = 0; i < h; i++) {
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 9d5affcb3c..9a9ab86068 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -1,7 +1,6 @@
import os
import platform
import sys
-from methods import get_compiler_version, using_gcc, using_clang
def is_active():
@@ -61,6 +60,7 @@ def get_opts():
BoolVariable('use_lld', 'Use the LLD linker', False),
BoolVariable('use_thinlto', 'Use ThinLTO', False),
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
+ BoolVariable('use_coverage', 'Test Godot coverage', False),
BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False),
BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
@@ -141,6 +141,10 @@ def configure(env):
print("Using LLD with GCC is not supported yet, try compiling with 'use_llvm=yes'.")
sys.exit(255)
+ if env['use_coverage']:
+ env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs'])
+ env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs'])
+
if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']:
env.extra_suffix += "s"
@@ -179,18 +183,10 @@ def configure(env):
env.Append(CCFLAGS=['-pipe'])
env.Append(LINKFLAGS=['-pipe'])
- # Check for gcc version >= 6 before adding -no-pie
- if using_gcc(env):
- version = get_compiler_version(env)
- if version != None and version[0] >= '6':
- env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
- # Do the same for clang should be fine with Clang 4 and higher
- if using_clang(env):
- version = get_compiler_version(env)
- if version != None and version[0] >= '4':
- env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
+ # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our
+ # minimal requirements.
+ env.Append(CCFLAGS=['-fpie'])
+ env.Append(LINKFLAGS=['-no-pie'])
## Dependencies
@@ -229,6 +225,10 @@ def configure(env):
sys.exit(255)
env.ParseConfig('pkg-config bullet --cflags --libs')
+ if False: # not env['builtin_assimp']:
+ # FIXME: Add min version check
+ env.ParseConfig('pkg-config assimp --cflags --libs')
+
if not env['builtin_enet']:
env.ParseConfig('pkg-config libenet --cflags --libs')
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index a64a25aeee..a9fe7275c2 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -83,7 +83,6 @@ void JoypadLinux::Joypad::reset() {
JoypadLinux::JoypadLinux(InputDefault *in) {
exit_udev = false;
input = in;
- joy_mutex = Mutex::create();
joy_thread = Thread::create(joy_thread_func, this);
}
@@ -91,7 +90,6 @@ JoypadLinux::~JoypadLinux() {
exit_udev = true;
Thread::wait_to_finish(joy_thread);
memdelete(joy_thread);
- memdelete(joy_mutex);
close_joypad();
}
@@ -137,9 +135,8 @@ void JoypadLinux::enumerate_joypads(udev *p_udev) {
String devnode_str = devnode;
if (devnode_str.find(ignore_str) == -1) {
- joy_mutex->lock();
+ MutexLock lock(joy_mutex);
open_joypad(devnode);
- joy_mutex->unlock();
}
}
udev_device_unref(dev);
@@ -176,7 +173,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) {
if (dev && udev_device_get_devnode(dev) != 0) {
- joy_mutex->lock();
+ MutexLock lock(joy_mutex);
String action = udev_device_get_action(dev);
const char *devnode = udev_device_get_devnode(dev);
if (devnode) {
@@ -192,7 +189,6 @@ void JoypadLinux::monitor_joypads(udev *p_udev) {
}
udev_device_unref(dev);
- joy_mutex->unlock();
}
}
usleep(50000);
@@ -204,15 +200,17 @@ void JoypadLinux::monitor_joypads(udev *p_udev) {
void JoypadLinux::monitor_joypads() {
while (!exit_udev) {
- joy_mutex->lock();
- for (int i = 0; i < 32; i++) {
- char fname[64];
- sprintf(fname, "/dev/input/event%d", i);
- if (attached_devices.find(fname) == -1) {
- open_joypad(fname);
+ {
+ MutexLock lock(joy_mutex);
+
+ for (int i = 0; i < 32; i++) {
+ char fname[64];
+ sprintf(fname, "/dev/input/event%d", i);
+ if (attached_devices.find(fname) == -1) {
+ open_joypad(fname);
+ }
}
}
- joy_mutex->unlock();
usleep(1000000); // 1s
}
}
@@ -457,7 +455,7 @@ InputDefault::JoyAxis JoypadLinux::axis_correct(const input_absinfo *p_abs, int
void JoypadLinux::process_joypads() {
- if (joy_mutex->try_lock() != OK) {
+ if (joy_mutex.try_lock() != OK) {
return;
}
for (int i = 0; i < JOYPADS_MAX; i++) {
@@ -548,6 +546,6 @@ void JoypadLinux::process_joypads() {
}
}
}
- joy_mutex->unlock();
+ joy_mutex.unlock();
}
#endif
diff --git a/platform/x11/joypad_linux.h b/platform/x11/joypad_linux.h
index e5638899bf..d5719b6dbe 100644
--- a/platform/x11/joypad_linux.h
+++ b/platform/x11/joypad_linux.h
@@ -72,7 +72,7 @@ private:
};
bool exit_udev;
- Mutex *joy_mutex;
+ Mutex joy_mutex;
Thread *joy_thread;
InputDefault *input;
Joypad joypads[JOYPADS_MAX];
diff --git a/platform/x11/key_mapping_x11.cpp b/platform/x11/key_mapping_x11.cpp
index 54e1e1d357..78bd2b71a0 100644
--- a/platform/x11/key_mapping_x11.cpp
+++ b/platform/x11/key_mapping_x11.cpp
@@ -180,6 +180,140 @@ static _XTranslatePair _xkeysym_to_keycode[] = {
{ 0, 0 }
};
+struct _TranslatePair {
+
+ unsigned int keysym;
+ unsigned int keycode;
+};
+
+static _TranslatePair _scancode_to_keycode[] = {
+
+ { KEY_ESCAPE, 0x09 },
+ { KEY_1, 0x0A },
+ { KEY_2, 0x0B },
+ { KEY_3, 0x0C },
+ { KEY_4, 0x0D },
+ { KEY_5, 0x0E },
+ { KEY_6, 0x0F },
+ { KEY_7, 0x10 },
+ { KEY_8, 0x11 },
+ { KEY_9, 0x12 },
+ { KEY_0, 0x13 },
+ { KEY_MINUS, 0x14 },
+ { KEY_EQUAL, 0x15 },
+ { KEY_BACKSPACE, 0x16 },
+ { KEY_TAB, 0x17 },
+ { KEY_Q, 0x18 },
+ { KEY_W, 0x19 },
+ { KEY_E, 0x1A },
+ { KEY_R, 0x1B },
+ { KEY_T, 0x1C },
+ { KEY_Y, 0x1D },
+ { KEY_U, 0x1E },
+ { KEY_I, 0x1F },
+ { KEY_O, 0x20 },
+ { KEY_P, 0x21 },
+ { KEY_BRACELEFT, 0x22 },
+ { KEY_BRACERIGHT, 0x23 },
+ { KEY_ENTER, 0x24 },
+ { KEY_CONTROL, 0x25 },
+ { KEY_A, 0x26 },
+ { KEY_S, 0x27 },
+ { KEY_D, 0x28 },
+ { KEY_F, 0x29 },
+ { KEY_G, 0x2A },
+ { KEY_H, 0x2B },
+ { KEY_J, 0x2C },
+ { KEY_K, 0x2D },
+ { KEY_L, 0x2E },
+ { KEY_SEMICOLON, 0x2F },
+ { KEY_APOSTROPHE, 0x30 },
+ { KEY_QUOTELEFT, 0x31 },
+ { KEY_SHIFT, 0x32 },
+ { KEY_BACKSLASH, 0x33 },
+ { KEY_Z, 0x34 },
+ { KEY_X, 0x35 },
+ { KEY_C, 0x36 },
+ { KEY_V, 0x37 },
+ { KEY_B, 0x38 },
+ { KEY_N, 0x39 },
+ { KEY_M, 0x3A },
+ { KEY_COMMA, 0x3B },
+ { KEY_PERIOD, 0x3C },
+ { KEY_SLASH, 0x3D },
+ { KEY_SHIFT, 0x3E },
+ { KEY_KP_MULTIPLY, 0x3F },
+ { KEY_ALT, 0x40 },
+ { KEY_SPACE, 0x41 },
+ { KEY_CAPSLOCK, 0x42 },
+ { KEY_F1, 0x43 },
+ { KEY_F2, 0x44 },
+ { KEY_F3, 0x45 },
+ { KEY_F4, 0x46 },
+ { KEY_F5, 0x47 },
+ { KEY_F6, 0x48 },
+ { KEY_F7, 0x49 },
+ { KEY_F8, 0x4A },
+ { KEY_F9, 0x4B },
+ { KEY_F10, 0x4C },
+ { KEY_NUMLOCK, 0x4D },
+ { KEY_SCROLLLOCK, 0x4E },
+ { KEY_KP_7, 0x4F },
+ { KEY_KP_8, 0x50 },
+ { KEY_KP_9, 0x51 },
+ { KEY_KP_SUBTRACT, 0x52 },
+ { KEY_KP_4, 0x53 },
+ { KEY_KP_5, 0x54 },
+ { KEY_KP_6, 0x55 },
+ { KEY_KP_ADD, 0x56 },
+ { KEY_KP_1, 0x57 },
+ { KEY_KP_2, 0x58 },
+ { KEY_KP_3, 0x59 },
+ { KEY_KP_0, 0x5A },
+ { KEY_KP_PERIOD, 0x5B },
+ //{ KEY_???, 0x5E }, //NON US BACKSLASH
+ { KEY_F11, 0x5F },
+ { KEY_F12, 0x60 },
+ { KEY_KP_ENTER, 0x68 },
+ { KEY_CONTROL, 0x69 },
+ { KEY_KP_DIVIDE, 0x6A },
+ { KEY_PRINT, 0x6B },
+ { KEY_ALT, 0x6C },
+ { KEY_ENTER, 0x6D },
+ { KEY_HOME, 0x6E },
+ { KEY_UP, 0x6F },
+ { KEY_PAGEUP, 0x70 },
+ { KEY_LEFT, 0x71 },
+ { KEY_RIGHT, 0x72 },
+ { KEY_END, 0x73 },
+ { KEY_DOWN, 0x74 },
+ { KEY_PAGEDOWN, 0x75 },
+ { KEY_INSERT, 0x76 },
+ { KEY_DELETE, 0x77 },
+ { KEY_VOLUMEMUTE, 0x79 },
+ { KEY_VOLUMEDOWN, 0x7A },
+ { KEY_VOLUMEUP, 0x7B },
+ { KEY_PAUSE, 0x7F },
+ { KEY_SUPER_L, 0x85 },
+ { KEY_SUPER_R, 0x86 },
+ { KEY_MENU, 0x87 },
+ { KEY_UNKNOWN, 0 }
+};
+
+unsigned int KeyMappingX11::get_scancode(unsigned int p_code) {
+
+ unsigned int keycode = KEY_UNKNOWN;
+ for (int i = 0; _scancode_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
+
+ if (_scancode_to_keycode[i].keycode == p_code) {
+ keycode = _scancode_to_keycode[i].keysym;
+ break;
+ }
+ }
+
+ return keycode;
+}
+
unsigned int KeyMappingX11::get_keycode(KeySym p_keysym) {
// kinda bruteforce.. could optimize.
diff --git a/platform/x11/key_mapping_x11.h b/platform/x11/key_mapping_x11.h
index e99bf1694b..10db43bcc4 100644
--- a/platform/x11/key_mapping_x11.h
+++ b/platform/x11/key_mapping_x11.h
@@ -45,6 +45,7 @@ class KeyMappingX11 {
public:
static unsigned int get_keycode(KeySym p_keysym);
+ static unsigned int get_scancode(unsigned int p_code);
static KeySym get_keysym(unsigned int p_code);
static unsigned int get_unicode_from_keysym(KeySym p_keysym);
static KeySym get_keysym_from_unicode(unsigned int p_unicode);
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 26170a8335..c74981fd55 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1888,6 +1888,8 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
if (status == XLookupChars) {
bool keypress = xkeyevent->type == KeyPress;
unsigned int keycode = KeyMappingX11::get_keycode(keysym_keycode);
+ unsigned int physical_keycode = KeyMappingX11::get_scancode(xkeyevent->keycode);
+
if (keycode >= 'a' && keycode <= 'z')
keycode -= 'a' - 'A';
@@ -1896,23 +1898,29 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
for (int i = 0; i < tmp.length(); i++) {
Ref<InputEventKey> k;
k.instance();
- if (keycode == 0 && tmp[i] == 0) {
+ if (physical_keycode == 0 && keycode == 0 && tmp[i] == 0) {
continue;
}
+ if (keycode == 0)
+ keycode = physical_keycode;
+
get_key_modifier_state(xkeyevent->state, k);
k->set_unicode(tmp[i]);
k->set_pressed(keypress);
- k->set_scancode(keycode);
+ k->set_keycode(keycode);
+
+ k->set_physical_keycode(physical_keycode);
k->set_echo(false);
- if (k->get_scancode() == KEY_BACKTAB) {
+ if (k->get_keycode() == KEY_BACKTAB) {
//make it consistent across platforms.
- k->set_scancode(KEY_TAB);
+ k->set_keycode(KEY_TAB);
+ k->set_physical_keycode(KEY_TAB);
k->set_shift(true);
}
@@ -1942,6 +1950,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
// keysym, so it works in all platforms the same.
unsigned int keycode = KeyMappingX11::get_keycode(keysym_keycode);
+ unsigned int physical_keycode = KeyMappingX11::get_scancode(xkeyevent->keycode);
/* Phase 3, obtain a unicode character from the keysym */
@@ -1961,9 +1970,12 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
bool keypress = xkeyevent->type == KeyPress;
- if (keycode == 0 && unicode == 0)
+ if (physical_keycode == 0 && keycode == 0 && unicode == 0)
return;
+ if (keycode == 0)
+ keycode = physical_keycode;
+
/* Phase 5, determine modifier mask */
// No problems here, except I had no way to
@@ -2025,37 +2037,39 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
if (keycode >= 'a' && keycode <= 'z')
keycode -= 'a' - 'A';
- k->set_scancode(keycode);
+ k->set_keycode(keycode);
+ k->set_physical_keycode(physical_keycode);
k->set_unicode(unicode);
k->set_echo(p_echo);
- if (k->get_scancode() == KEY_BACKTAB) {
+ if (k->get_keycode() == KEY_BACKTAB) {
//make it consistent across platforms.
- k->set_scancode(KEY_TAB);
+ k->set_keycode(KEY_TAB);
+ k->set_physical_keycode(KEY_TAB);
k->set_shift(true);
}
//don't set mod state if modifier keys are released by themselves
//else event.is_action() will not work correctly here
if (!k->is_pressed()) {
- if (k->get_scancode() == KEY_SHIFT)
+ if (k->get_keycode() == KEY_SHIFT)
k->set_shift(false);
- else if (k->get_scancode() == KEY_CONTROL)
+ else if (k->get_keycode() == KEY_CONTROL)
k->set_control(false);
- else if (k->get_scancode() == KEY_ALT)
+ else if (k->get_keycode() == KEY_ALT)
k->set_alt(false);
- else if (k->get_scancode() == KEY_META)
+ else if (k->get_keycode() == KEY_META)
k->set_metakey(false);
}
- bool last_is_pressed = Input::get_singleton()->is_key_pressed(k->get_scancode());
+ bool last_is_pressed = Input::get_singleton()->is_key_pressed(k->get_keycode());
if (k->is_pressed()) {
if (last_is_pressed) {
k->set_echo(true);
}
}
- //printf("key: %x\n",k->get_scancode());
+ //printf("key: %x\n",k->get_keycode());
input->accumulate_input_event(k);
}
@@ -3076,8 +3090,6 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
// allocate memory to contain the whole file
cursor_image->pixels = (XcursorPixel *)memalloc(size);
- image->lock();
-
for (XcursorPixel index = 0; index < image_size; index++) {
int row_index = floor(index / texture_size.width) + atlas_rect.position.y;
int column_index = (index % int(texture_size.width)) + atlas_rect.position.x;
@@ -3090,8 +3102,6 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
*(cursor_image->pixels + index) = image->get_pixel(column_index, row_index).to_argb32();
}
- image->unlock();
-
ERR_FAIL_COND(cursor_image->pixels == NULL);
// Save it for a further usage
@@ -3269,10 +3279,10 @@ void OS_X11::set_icon(const Ref<Image> &p_icon) {
pd.write[0] = w;
pd.write[1] = h;
- PoolVector<uint8_t>::Read r = img->get_data().read();
+ const uint8_t *r = img->get_data().ptr();
long *wr = &pd.write[2];
- uint8_t const *pr = r.ptr();
+ uint8_t const *pr = r;
for (int i = 0; i < w * h; i++) {
long v = 0;
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index b98820d5ac..f3f7ba9ddd 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -475,10 +475,10 @@ void AnimatedSprite::_notification(int p_what) {
void AnimatedSprite::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
if (frames.is_valid())
- frames->disconnect("changed", this, "_res_changed");
+ frames->disconnect("changed", callable_mp(this, &AnimatedSprite::_res_changed));
frames = p_frames;
if (frames.is_valid())
- frames->connect("changed", this, "_res_changed");
+ frames->connect("changed", callable_mp(this, &AnimatedSprite::_res_changed));
if (!frames.is_valid()) {
frame = 0;
@@ -735,20 +735,18 @@ void AnimatedSprite::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shininess", "shininess"), &AnimatedSprite::set_shininess);
ClassDB::bind_method(D_METHOD("get_shininess"), &AnimatedSprite::get_shininess);
- ClassDB::bind_method(D_METHOD("_res_changed"), &AnimatedSprite::_res_changed);
-
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("animation_finished"));
ADD_GROUP("Animation", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");
ADD_GROUP("Lighting", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Offset", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index b661db2e52..b99c4c88bf 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "area_2d.h"
+
#include "scene/scene_string_names.h"
#include "servers/audio_server.h"
#include "servers/physics_2d_server.h"
@@ -171,8 +172,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -198,8 +199,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree));
if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
}
@@ -273,8 +274,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_entered, node);
}
@@ -300,8 +301,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree));
if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->area_exited, obj);
}
@@ -333,12 +334,11 @@ void Area2D::_clear_monitoring() {
Object *obj = ObjectDB::get_instance(E->key());
Node *node = Object::cast_to<Node>(obj);
- if (!node) //node may have been deleted in previous frame or at other legiminate point
+ if (!node) //node may have been deleted in previous frame or at other legitimate point
continue;
- //ERR_CONTINUE(!node);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree));
if (!E->get().in_tree)
continue;
@@ -363,12 +363,11 @@ void Area2D::_clear_monitoring() {
Object *obj = ObjectDB::get_instance(E->key());
Node *node = Object::cast_to<Node>(obj);
- if (!node) //node may have been deleted in previous frame or at other legiminate point
+ if (!node) //node may have been deleted in previous frame or at other legitimate point
continue;
- //ERR_CONTINUE(!node);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree));
if (!E->get().in_tree)
continue;
@@ -584,13 +583,6 @@ void Area2D::_validate_property(PropertyInfo &property) const {
}
void Area2D::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_body_enter_tree", "id"), &Area2D::_body_enter_tree);
- ClassDB::bind_method(D_METHOD("_body_exit_tree", "id"), &Area2D::_body_exit_tree);
-
- ClassDB::bind_method(D_METHOD("_area_enter_tree", "id"), &Area2D::_area_enter_tree);
- ClassDB::bind_method(D_METHOD("_area_exit_tree", "id"), &Area2D::_area_exit_tree);
-
ClassDB::bind_method(D_METHOD("set_space_override_mode", "space_override_mode"), &Area2D::set_space_override_mode);
ClassDB::bind_method(D_METHOD("get_space_override_mode"), &Area2D::get_space_override_mode);
@@ -660,11 +652,11 @@ void Area2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity_vec"), "set_gravity_vector", "get_gravity_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable");
@@ -674,7 +666,7 @@ void Area2D::_bind_methods() {
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 4f0f681a01..aa4ed233fb 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -512,17 +512,15 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer2D::get_stream_playback);
- ClassDB::bind_method(D_METHOD("_bus_layout_changed"), &AudioStreamPlayer2D::_bus_layout_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_SIGNAL(MethodInfo("finished"));
@@ -545,7 +543,7 @@ AudioStreamPlayer2D::AudioStreamPlayer2D() {
stream_paused = false;
stream_paused_fade_in = false;
stream_paused_fade_out = false;
- AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
+ AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer2D::_bus_layout_changed));
}
AudioStreamPlayer2D::~AudioStreamPlayer2D() {
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 7ec770597e..a8860c3d81 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -128,9 +128,9 @@ Transform2D Camera2D::get_camera_transform() {
} else {
if (v_ofs < 0) {
- camera_pos.y = new_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_TOP] * v_ofs;
- } else {
camera_pos.y = new_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_BOTTOM] * v_ofs;
+ } else {
+ camera_pos.y = new_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_TOP] * v_ofs;
}
v_offset_changed = false;
@@ -753,17 +753,17 @@ void Camera2D::_bind_methods() {
ADD_GROUP("Smoothing", "smoothing_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smoothing_enabled"), "set_enable_follow_smoothing", "is_follow_smoothing_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing");
ADD_GROUP("Offset", "offset_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset");
ADD_GROUP("Drag Margin", "drag_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM);
ADD_GROUP("Editor", "editor_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_screen"), "set_screen_drawing_enabled", "is_screen_drawing_enabled");
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index aca0c4c959..ef7aa9ba01 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -41,17 +41,13 @@
#include "servers/visual/visual_server_raster.h"
#include "servers/visual_server.h"
-Mutex *CanvasItemMaterial::material_mutex = NULL;
+Mutex CanvasItemMaterial::material_mutex;
SelfList<CanvasItemMaterial>::List *CanvasItemMaterial::dirty_materials = NULL;
Map<CanvasItemMaterial::MaterialKey, CanvasItemMaterial::ShaderData> CanvasItemMaterial::shader_map;
CanvasItemMaterial::ShaderNames *CanvasItemMaterial::shader_names = NULL;
void CanvasItemMaterial::init_shaders() {
-#ifndef NO_THREADS
- material_mutex = Mutex::create();
-#endif
-
dirty_materials = memnew(SelfList<CanvasItemMaterial>::List);
shader_names = memnew(ShaderNames);
@@ -66,10 +62,6 @@ void CanvasItemMaterial::finish_shaders() {
memdelete(dirty_materials);
memdelete(shader_names);
dirty_materials = NULL;
-
-#ifndef NO_THREADS
- memdelete(material_mutex);
-#endif
}
void CanvasItemMaterial::_update_shader() {
@@ -156,44 +148,28 @@ void CanvasItemMaterial::_update_shader() {
void CanvasItemMaterial::flush_changes() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
while (dirty_materials->first()) {
dirty_materials->first()->self()->_update_shader();
}
-
- if (material_mutex)
- material_mutex->unlock();
}
void CanvasItemMaterial::_queue_shader_change() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (!element.in_list()) {
dirty_materials->add(&element);
}
-
- if (material_mutex)
- material_mutex->unlock();
}
bool CanvasItemMaterial::_is_shader_dirty() const {
- bool dirty = false;
-
- if (material_mutex)
- material_mutex->lock();
-
- dirty = element.in_list();
+ MutexLock lock(material_mutex);
- if (material_mutex)
- material_mutex->unlock();
-
- return dirty;
+ return element.in_list();
}
void CanvasItemMaterial::set_blend_mode(BlendMode p_blend_mode) {
@@ -332,8 +308,7 @@ CanvasItemMaterial::CanvasItemMaterial() :
CanvasItemMaterial::~CanvasItemMaterial() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (shader_map.has(current_key)) {
shader_map[current_key].users--;
@@ -345,9 +320,6 @@ CanvasItemMaterial::~CanvasItemMaterial() {
VS::get_singleton()->material_set_shader(_get_material(), RID());
}
-
- if (material_mutex)
- material_mutex->unlock();
}
///////////////////////////////////////////////////////////////////
@@ -1179,17 +1151,17 @@ void CanvasItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_multiline_colors", "points", "colors", "width"), &CanvasItem::draw_multiline_colors, DEFVAL(1.0));
ClassDB::bind_method(D_METHOD("draw_rect", "rect", "color", "filled", "width"), &CanvasItem::draw_rect, DEFVAL(true), DEFVAL(1.0));
ClassDB::bind_method(D_METHOD("draw_circle", "position", "radius", "color"), &CanvasItem::draw_circle);
- ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "normal_map", "specular_map", "clip_uv", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(true), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "normal_map", "specular_map", "specular_shininess", "clip_uv", "texture_filter", "texture_repeat"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(true), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
ClassDB::bind_method(D_METHOD("draw_style_box", "style_box", "rect"), &CanvasItem::draw_style_box);
- ClassDB::bind_method(D_METHOD("draw_primitive", "points", "colors", "uvs", "texture", "width", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_primitive, DEFVAL(Variant()), DEFVAL(1.0), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_polygon", "points", "colors", "uvs", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_polygon, DEFVAL(PoolVector2Array()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_colored_polygon", "points", "color", "uvs", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_colored_polygon, DEFVAL(PoolVector2Array()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_string", "font", "position", "text", "modulate", "clip_w"), &CanvasItem::draw_string, DEFVAL(Color(1, 1, 1)), DEFVAL(-1));
- ClassDB::bind_method(D_METHOD("draw_char", "font", "position", "char", "next", "modulate"), &CanvasItem::draw_char, DEFVAL(Color(1, 1, 1)));
- ClassDB::bind_method(D_METHOD("draw_mesh", "mesh", "texture", "normal_map", "specular_map", "transform", "modulate", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_mesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Transform2D()), DEFVAL(Color(1, 1, 1)), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
- ClassDB::bind_method(D_METHOD("draw_multimesh", "multimesh", "texture", "normal_map", "specular_map", "specular_shinness", "texture_filter", "texture_repeat"), &CanvasItem::draw_multimesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_primitive", "points", "colors", "uvs", "texture", "width", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_primitive, DEFVAL(Ref<Texture2D>()), DEFVAL(1.0), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_polygon", "points", "colors", "uvs", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_polygon, DEFVAL(PackedVector2Array()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_colored_polygon", "points", "color", "uvs", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_colored_polygon, DEFVAL(PackedVector2Array()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_string", "font", "position", "text", "modulate", "clip_w"), &CanvasItem::draw_string, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("draw_char", "font", "position", "char", "next", "modulate"), &CanvasItem::draw_char, DEFVAL(Color(1, 1, 1, 1)));
+ ClassDB::bind_method(D_METHOD("draw_mesh", "mesh", "texture", "normal_map", "specular_map", "specular_shininess", "transform", "modulate", "texture_filter", "texture_repeat"), &CanvasItem::draw_mesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Transform2D()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
+ ClassDB::bind_method(D_METHOD("draw_multimesh", "multimesh", "texture", "normal_map", "specular_map", "specular_shininess", "texture_filter", "texture_repeat"), &CanvasItem::draw_multimesh, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(TEXTURE_FILTER_PARENT_NODE), DEFVAL(TEXTURE_REPEAT_PARENT_NODE));
ClassDB::bind_method(D_METHOD("draw_set_transform", "position", "rotation", "scale"), &CanvasItem::draw_set_transform);
ClassDB::bind_method(D_METHOD("draw_set_transform_matrix", "xform"), &CanvasItem::draw_set_transform_matrix);
@@ -1263,9 +1235,9 @@ void CanvasItem::_bind_methods() {
BIND_ENUM_CONSTANT(TEXTURE_FILTER_PARENT_NODE);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX);
@@ -1353,7 +1325,7 @@ void CanvasItem::_update_texture_filter_changed(bool p_propagate) {
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST; break;
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR; break;
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS; break;
- case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS; break;
+ case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS; break;
default: {
}
}
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 1b0359f6ec..c7f9500ea1 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -108,7 +108,7 @@ private:
return mk;
}
- static Mutex *material_mutex;
+ static Mutex material_mutex;
static SelfList<CanvasItemMaterial>::List *dirty_materials;
SelfList<CanvasItemMaterial> element;
@@ -170,9 +170,9 @@ public:
TEXTURE_FILTER_PARENT_NODE,
TEXTURE_FILTER_NEAREST,
TEXTURE_FILTER_LINEAR,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_MAX
};
@@ -339,8 +339,8 @@ public:
void draw_polygon(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture2D> p_texture = Ref<Texture2D>(), const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
void draw_colored_polygon(const Vector<Point2> &p_points, const Color &p_color, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture2D> p_texture = Ref<Texture2D>(), const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
- void draw_mesh(const Ref<Mesh> &p_mesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
- void draw_multimesh(const Ref<MultiMesh> &p_multimesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
+ void draw_mesh(const Ref<Mesh> &p_mesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
+ void draw_multimesh(const Ref<MultiMesh> &p_multimesh, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_normal_map = Ref<Texture2D>(), const Ref<Texture2D> &p_specular_map = Ref<Texture2D>(), const Color &p_specular_color_shininess = Color(1, 1, 1, 1), TextureFilter p_texture_filter = TEXTURE_FILTER_PARENT_NODE, TextureRepeat p_texture_repeat = TEXTURE_REPEAT_PARENT_NODE);
void draw_string(const Ref<Font> &p_font, const Point2 &p_pos, const String &p_text, const Color &p_modulate = Color(1, 1, 1), int p_clip_w = -1);
float draw_char(const Ref<Font> &p_font, const Point2 &p_pos, const String &p_char, const String &p_next = "", const Color &p_modulate = Color(1, 1, 1));
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index d9cc94c6eb..4edf92197e 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -61,16 +61,15 @@ void CollisionPolygon2D::_build_polygon() {
Ref<ConcavePolygonShape2D> concave = memnew(ConcavePolygonShape2D);
- PoolVector<Vector2> segments;
+ Vector<Vector2> segments;
segments.resize(polygon.size() * 2);
- PoolVector<Vector2>::Write w = segments.write();
+ Vector2 *w = segments.ptrw();
for (int i = 0; i < polygon.size(); i++) {
w[(i << 1) + 0] = polygon[i];
w[(i << 1) + 1] = polygon[(i + 1) % polygon.size()];
}
- w.release();
concave->set_segments(segments);
parent->shape_owner_add_shape(owner_id, concave);
@@ -306,10 +305,10 @@ void CollisionPolygon2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_one_way_collision_margin"), &CollisionPolygon2D::get_one_way_collision_margin);
ADD_PROPERTY(PropertyInfo(Variant::INT, "build_mode", PROPERTY_HINT_ENUM, "Solids,Segments"), "set_build_mode", "get_build_mode");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
BIND_ENUM_CONSTANT(BUILD_SOLIDS);
BIND_ENUM_CONSTANT(BUILD_SEGMENTS);
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index bb975350a6..b2ad040654 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -149,7 +149,7 @@ void CollisionShape2D::_notification(int p_what) {
void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) {
if (shape.is_valid())
- shape->disconnect("changed", this, "_shape_changed");
+ shape->disconnect("changed", callable_mp(this, &CollisionShape2D::_shape_changed));
shape = p_shape;
update();
if (parent) {
@@ -160,7 +160,7 @@ void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) {
}
if (shape.is_valid())
- shape->connect("changed", this, "_shape_changed");
+ shape->connect("changed", callable_mp(this, &CollisionShape2D::_shape_changed));
update_configuration_warning();
}
@@ -237,12 +237,11 @@ void CollisionShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_one_way_collision_enabled"), &CollisionShape2D::is_one_way_collision_enabled);
ClassDB::bind_method(D_METHOD("set_one_way_collision_margin", "margin"), &CollisionShape2D::set_one_way_collision_margin);
ClassDB::bind_method(D_METHOD("get_one_way_collision_margin"), &CollisionShape2D::get_one_way_collision_margin);
- ClassDB::bind_method(D_METHOD("_shape_changed"), &CollisionShape2D::_shape_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", "get_shape");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
}
CollisionShape2D::CollisionShape2D() {
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 449951bc6c..3b8a81d2ca 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "cpu_particles_2d.h"
+
#include "core/core_string_names.h"
#include "scene/2d/canvas_item.h"
#include "scene/2d/particles_2d.h"
@@ -51,7 +52,7 @@ void CPUParticles2D::set_amount(int p_amount) {
particles.resize(p_amount);
{
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
for (int i = 0; i < p_amount; i++) {
w[i].active = false;
@@ -163,12 +164,12 @@ void CPUParticles2D::_update_mesh_texture() {
} else {
tex_size = Size2(1, 1);
}
- PoolVector<Vector2> vertices;
+ Vector<Vector2> vertices;
vertices.push_back(-tex_size * 0.5);
vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, 0));
vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, tex_size.y));
vertices.push_back(-tex_size * 0.5 + Vector2(0, tex_size.y));
- PoolVector<Vector2> uvs;
+ Vector<Vector2> uvs;
AtlasTexture *atlas_texure = Object::cast_to<AtlasTexture>(*texture);
if (atlas_texure && atlas_texure->get_atlas().is_valid()) {
Rect2 region_rect = atlas_texure->get_region();
@@ -183,12 +184,12 @@ void CPUParticles2D::_update_mesh_texture() {
uvs.push_back(Vector2(1, 1));
uvs.push_back(Vector2(0, 1));
}
- PoolVector<Color> colors;
+ Vector<Color> colors;
colors.push_back(Color(1, 1, 1, 1));
colors.push_back(Color(1, 1, 1, 1));
colors.push_back(Color(1, 1, 1, 1));
colors.push_back(Color(1, 1, 1, 1));
- PoolVector<int> indices;
+ Vector<int> indices;
indices.push_back(0);
indices.push_back(1);
indices.push_back(2);
@@ -212,12 +213,12 @@ void CPUParticles2D::set_texture(const Ref<Texture2D> &p_texture) {
return;
if (texture.is_valid())
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CPUParticles2D::_texture_changed));
texture = p_texture;
if (texture.is_valid())
- texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CPUParticles2D::_texture_changed));
update();
_update_mesh_texture();
@@ -291,7 +292,7 @@ void CPUParticles2D::restart() {
{
int pc = particles.size();
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
for (int i = 0; i < pc; i++) {
w[i].active = false;
@@ -455,17 +456,17 @@ void CPUParticles2D::set_emission_rect_extents(Vector2 p_extents) {
emission_rect_extents = p_extents;
}
-void CPUParticles2D::set_emission_points(const PoolVector<Vector2> &p_points) {
+void CPUParticles2D::set_emission_points(const Vector<Vector2> &p_points) {
emission_points = p_points;
}
-void CPUParticles2D::set_emission_normals(const PoolVector<Vector2> &p_normals) {
+void CPUParticles2D::set_emission_normals(const Vector<Vector2> &p_normals) {
emission_normals = p_normals;
}
-void CPUParticles2D::set_emission_colors(const PoolVector<Color> &p_colors) {
+void CPUParticles2D::set_emission_colors(const Vector<Color> &p_colors) {
emission_colors = p_colors;
}
@@ -478,16 +479,16 @@ Vector2 CPUParticles2D::get_emission_rect_extents() const {
return emission_rect_extents;
}
-PoolVector<Vector2> CPUParticles2D::get_emission_points() const {
+Vector<Vector2> CPUParticles2D::get_emission_points() const {
return emission_points;
}
-PoolVector<Vector2> CPUParticles2D::get_emission_normals() const {
+Vector<Vector2> CPUParticles2D::get_emission_normals() const {
return emission_normals;
}
-PoolVector<Color> CPUParticles2D::get_emission_colors() const {
+Vector<Color> CPUParticles2D::get_emission_colors() const {
return emission_colors;
}
@@ -630,9 +631,9 @@ void CPUParticles2D::_particles_process(float p_delta) {
p_delta *= speed_scale;
int pcount = particles.size();
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
- Particle *parray = w.ptr();
+ Particle *parray = w;
float prev_time = time;
time += p_delta;
@@ -970,118 +971,103 @@ void CPUParticles2D::_particles_process(float p_delta) {
}
void CPUParticles2D::_update_particle_data_buffer() {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
+ MutexLock lock(update_mutex);
- {
+ int pc = particles.size();
- int pc = particles.size();
+ int *ow;
+ int *order = NULL;
- PoolVector<int>::Write ow;
- int *order = NULL;
+ float *w = particle_data.ptrw();
+ const Particle *r = particles.ptr();
+ float *ptr = w;
- PoolVector<float>::Write w = particle_data.write();
- PoolVector<Particle>::Read r = particles.read();
- float *ptr = w.ptr();
+ if (draw_order != DRAW_ORDER_INDEX) {
+ ow = particle_order.ptrw();
+ order = ow;
- if (draw_order != DRAW_ORDER_INDEX) {
- ow = particle_order.write();
- order = ow.ptr();
-
- for (int i = 0; i < pc; i++) {
- order[i] = i;
- }
- if (draw_order == DRAW_ORDER_LIFETIME) {
- SortArray<int, SortLifetime> sorter;
- sorter.compare.particles = r.ptr();
- sorter.sort(order, pc);
- }
+ for (int i = 0; i < pc; i++) {
+ order[i] = i;
+ }
+ if (draw_order == DRAW_ORDER_LIFETIME) {
+ SortArray<int, SortLifetime> sorter;
+ sorter.compare.particles = r;
+ sorter.sort(order, pc);
}
+ }
- for (int i = 0; i < pc; i++) {
+ for (int i = 0; i < pc; i++) {
- int idx = order ? order[i] : i;
+ int idx = order ? order[i] : i;
- Transform2D t = r[idx].transform;
+ Transform2D t = r[idx].transform;
- if (!local_coords) {
- t = inv_emission_transform * t;
- }
+ if (!local_coords) {
+ t = inv_emission_transform * t;
+ }
- if (r[idx].active) {
+ if (r[idx].active) {
- ptr[0] = t.elements[0][0];
- ptr[1] = t.elements[1][0];
- ptr[2] = 0;
- ptr[3] = t.elements[2][0];
- ptr[4] = t.elements[0][1];
- ptr[5] = t.elements[1][1];
- ptr[6] = 0;
- ptr[7] = t.elements[2][1];
+ ptr[0] = t.elements[0][0];
+ ptr[1] = t.elements[1][0];
+ ptr[2] = 0;
+ ptr[3] = t.elements[2][0];
+ ptr[4] = t.elements[0][1];
+ ptr[5] = t.elements[1][1];
+ ptr[6] = 0;
+ ptr[7] = t.elements[2][1];
- } else {
- zeromem(ptr, sizeof(float) * 8);
- }
+ } else {
+ zeromem(ptr, sizeof(float) * 8);
+ }
- Color c = r[idx].color;
+ Color c = r[idx].color;
- ptr[8] = c.r;
- ptr[9] = c.g;
- ptr[10] = c.b;
- ptr[11] = c.a;
+ ptr[8] = c.r;
+ ptr[9] = c.g;
+ ptr[10] = c.b;
+ ptr[11] = c.a;
- ptr[12] = r[idx].custom[0];
- ptr[13] = r[idx].custom[1];
- ptr[14] = r[idx].custom[2];
- ptr[15] = r[idx].custom[3];
+ ptr[12] = r[idx].custom[0];
+ ptr[13] = r[idx].custom[1];
+ ptr[14] = r[idx].custom[2];
+ ptr[15] = r[idx].custom[3];
- ptr += 16;
- }
+ ptr += 16;
}
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
}
void CPUParticles2D::_set_redraw(bool p_redraw) {
if (redraw == p_redraw)
return;
redraw = p_redraw;
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- if (redraw) {
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
-
- VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
- } else {
- if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) {
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
- }
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
- VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0);
+ {
+ MutexLock lock(update_mutex);
+
+ if (redraw) {
+ VS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &CPUParticles2D::_update_render_thread));
+ VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
+
+ VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
+ } else {
+ if (VS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &CPUParticles2D::_update_render_thread))) {
+ VS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &CPUParticles2D::_update_render_thread));
+ }
+ VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
+
+ VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0);
+ }
}
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
+
update(); // redraw to update render list
}
void CPUParticles2D::_update_render_thread() {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
+ MutexLock lock(update_mutex);
VS::get_singleton()->multimesh_set_buffer(multimesh, particle_data);
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
}
void CPUParticles2D::_notification(int p_what) {
@@ -1127,9 +1113,9 @@ void CPUParticles2D::_notification(int p_what) {
int pc = particles.size();
- PoolVector<float>::Write w = particle_data.write();
- PoolVector<Particle>::Read r = particles.read();
- float *ptr = w.ptr();
+ float *w = particle_data.ptrw();
+ const Particle *r = particles.ptr();
+ float *ptr = w;
for (int i = 0; i < pc; i++) {
@@ -1273,13 +1259,13 @@ void CPUParticles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
@@ -1341,72 +1327,69 @@ void CPUParticles2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles2D::convert_from_particles);
- ClassDB::bind_method(D_METHOD("_update_render_thread"), &CPUParticles2D::_update_render_thread);
- ClassDB::bind_method(D_METHOD("_texture_changed"), &CPUParticles2D::_texture_changed);
-
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors");
ADD_GROUP("Flags", "flag_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_align_y"), "set_particle_flag", "get_particle_flag", FLAG_ALIGN_Y_TO_VELOCITY);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
@@ -1494,18 +1477,10 @@ CPUParticles2D::CPUParticles2D() {
set_color(Color(1, 1, 1, 1));
-#ifndef NO_THREADS
- update_mutex = Mutex::create();
-#endif
-
_update_mesh_texture();
}
CPUParticles2D::~CPUParticles2D() {
VS::get_singleton()->free(multimesh);
VS::get_singleton()->free(mesh);
-
-#ifndef NO_THREADS
- memdelete(update_mutex);
-#endif
}
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 5eb563bbbc..18d0caceed 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -108,9 +108,9 @@ private:
RID mesh;
RID multimesh;
- PoolVector<Particle> particles;
- PoolVector<float> particle_data;
- PoolVector<int> particle_order;
+ Vector<Particle> particles;
+ Vector<float> particle_data;
+ Vector<int> particle_order;
struct SortLifetime {
const Particle *particles;
@@ -167,9 +167,9 @@ private:
EmissionShape emission_shape;
float emission_sphere_radius;
Vector2 emission_rect_extents;
- PoolVector<Vector2> emission_points;
- PoolVector<Vector2> emission_normals;
- PoolVector<Color> emission_colors;
+ Vector<Vector2> emission_points;
+ Vector<Vector2> emission_normals;
+ Vector<Color> emission_colors;
int emission_point_count;
Vector2 gravity;
@@ -178,7 +178,7 @@ private:
void _particles_process(float p_delta);
void _update_particle_data_buffer();
- Mutex *update_mutex;
+ Mutex update_mutex;
void _update_render_thread();
@@ -265,17 +265,17 @@ public:
void set_emission_shape(EmissionShape p_shape);
void set_emission_sphere_radius(float p_radius);
void set_emission_rect_extents(Vector2 p_extents);
- void set_emission_points(const PoolVector<Vector2> &p_points);
- void set_emission_normals(const PoolVector<Vector2> &p_normals);
- void set_emission_colors(const PoolVector<Color> &p_colors);
+ void set_emission_points(const Vector<Vector2> &p_points);
+ void set_emission_normals(const Vector<Vector2> &p_normals);
+ void set_emission_colors(const Vector<Color> &p_colors);
void set_emission_point_count(int p_count);
EmissionShape get_emission_shape() const;
float get_emission_sphere_radius() const;
Vector2 get_emission_rect_extents() const;
- PoolVector<Vector2> get_emission_points() const;
- PoolVector<Vector2> get_emission_normals() const;
- PoolVector<Color> get_emission_colors() const;
+ Vector<Vector2> get_emission_points() const;
+ Vector<Vector2> get_emission_normals() const;
+ Vector<Color> get_emission_colors() const;
int get_emission_point_count() const;
void set_gravity(const Vector2 &p_gravity);
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 656ff45654..9cc9ab25ac 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -158,7 +158,7 @@ void Joint2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_a", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_a", "get_node_a");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_b", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_b", "get_node_b");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_collision"), "set_exclude_nodes_from_collision", "get_exclude_nodes_from_collision");
}
@@ -215,7 +215,7 @@ void PinJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_softness", "softness"), &PinJoint2D::set_softness);
ClassDB::bind_method(D_METHOD("get_softness"), &PinJoint2D::get_softness);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness");
}
PinJoint2D::PinJoint2D() {
@@ -285,8 +285,8 @@ void GrooveJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_initial_offset", "offset"), &GrooveJoint2D::set_initial_offset);
ClassDB::bind_method(D_METHOD("get_initial_offset"), &GrooveJoint2D::get_initial_offset);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset");
}
GrooveJoint2D::GrooveJoint2D() {
@@ -394,10 +394,10 @@ void DampedSpringJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_damping", "damping"), &DampedSpringJoint2D::set_damping);
ClassDB::bind_method(D_METHOD("get_damping"), &DampedSpringJoint2D::get_damping);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping");
}
DampedSpringJoint2D::DampedSpringJoint2D() {
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 0b66d34ece..e61b1fa339 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -426,12 +426,12 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_texture_offset", "get_texture_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Add,Sub,Mix,Mask"), "set_mode", "get_mode");
ADD_GROUP("Range", "range_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_min", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_min", "get_z_range_min");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_max", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_max", "get_z_range_max");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_layer_min", PROPERTY_HINT_RANGE, "-512,512,1"), "set_layer_range_min", "get_layer_range_min");
@@ -443,7 +443,7 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF5,PCF13"), "set_shadow_filter", "get_shadow_filter");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask");
BIND_ENUM_CONSTANT(MODE_ADD);
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index 0e8e8f6679..d4a5c93823 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -39,7 +39,7 @@ Rect2 OccluderPolygon2D::_edit_get_rect() const {
if (rect_cache_dirty) {
if (closed) {
- PoolVector<Vector2>::Read r = polygon.read();
+ const Vector2 *r = polygon.ptr();
item_rect = Rect2();
for (int i = 0; i < polygon.size(); i++) {
Vector2 pos = r[i];
@@ -72,7 +72,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double
return Geometry::is_point_in_polygon(p_point, Variant(polygon));
} else {
const real_t d = LINE_GRAB_WIDTH / 2 + p_tolerance;
- PoolVector<Vector2>::Read points = polygon.read();
+ const Vector2 *points = polygon.ptr();
for (int i = 0; i < polygon.size() - 1; i++) {
Vector2 p = Geometry::get_closest_point_to_segment_2d(p_point, &points[i]);
if (p.distance_to(p_point) <= d)
@@ -84,7 +84,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double
}
#endif
-void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) {
+void OccluderPolygon2D::set_polygon(const Vector<Vector2> &p_polygon) {
polygon = p_polygon;
rect_cache_dirty = true;
@@ -92,7 +92,7 @@ void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) {
emit_changed();
}
-PoolVector<Vector2> OccluderPolygon2D::get_polygon() const {
+Vector<Vector2> OccluderPolygon2D::get_polygon() const {
return polygon;
}
@@ -141,7 +141,7 @@ void OccluderPolygon2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "closed"), "set_closed", "is_closed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Disabled,ClockWise,CounterClockWise"), "set_cull_mode", "get_cull_mode");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
BIND_ENUM_CONSTANT(CULL_DISABLED);
BIND_ENUM_CONSTANT(CULL_CLOCKWISE);
@@ -191,7 +191,7 @@ void LightOccluder2D::_notification(int p_what) {
if (occluder_polygon.is_valid()) {
- PoolVector<Vector2> poly = occluder_polygon->get_polygon();
+ Vector<Vector2> poly = occluder_polygon->get_polygon();
if (poly.size()) {
if (occluder_polygon->is_closed()) {
@@ -201,7 +201,7 @@ void LightOccluder2D::_notification(int p_what) {
} else {
int ps = poly.size();
- PoolVector<Vector2>::Read r = poly.read();
+ const Vector2 *r = poly.ptr();
for (int i = 0; i < ps - 1; i++) {
draw_line(r[i], r[i + 1], Color(0, 0, 0, 0.6), 3);
@@ -234,7 +234,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->disconnect("changed", this, "_poly_changed");
+ occluder_polygon->disconnect("changed", callable_mp(this, &LightOccluder2D::_poly_changed));
#endif
occluder_polygon = p_polygon;
@@ -245,7 +245,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->connect("changed", this, "_poly_changed");
+ occluder_polygon->connect("changed", callable_mp(this, &LightOccluder2D::_poly_changed));
update();
#endif
}
@@ -287,8 +287,6 @@ void LightOccluder2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_occluder_light_mask", "mask"), &LightOccluder2D::set_occluder_light_mask);
ClassDB::bind_method(D_METHOD("get_occluder_light_mask"), &LightOccluder2D::get_occluder_light_mask);
- ClassDB::bind_method("_poly_changed", &LightOccluder2D::_poly_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "occluder", PROPERTY_HINT_RESOURCE_TYPE, "OccluderPolygon2D"), "set_occluder_polygon", "get_occluder_polygon");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_occluder_light_mask", "get_occluder_light_mask");
}
diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h
index b20e347c35..83702f2875 100644
--- a/scene/2d/light_occluder_2d.h
+++ b/scene/2d/light_occluder_2d.h
@@ -46,7 +46,7 @@ public:
private:
RID occ_polygon;
- PoolVector<Vector2> polygon;
+ Vector<Vector2> polygon;
bool closed;
CullMode cull;
@@ -62,8 +62,8 @@ public:
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
#endif
- void set_polygon(const PoolVector<Vector2> &p_polygon);
- PoolVector<Vector2> get_polygon() const;
+ void set_polygon(const Vector<Vector2> &p_polygon);
+ Vector<Vector2> get_polygon() const;
void set_closed(bool p_closed);
bool is_closed() const;
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 92d06d6056..873c901c0a 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "line_2d.h"
-#include "line_builder.h"
#include "core/core_string_names.h"
+#include "line_builder.h"
// Needed so we can bind functions
VARIANT_ENUM_CAST(Line2D::LineJointMode)
@@ -71,7 +71,7 @@ bool Line2D::_edit_use_rect() const {
bool Line2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
const real_t d = _width / 2 + p_tolerance;
- PoolVector<Vector2>::Read points = _points.read();
+ const Vector2 *points = _points.ptr();
for (int i = 0; i < _points.size() - 1; i++) {
Vector2 p = Geometry::get_closest_point_to_segment_2d(p_point, &points[i]);
if (p.distance_to(p_point) <= d)
@@ -82,7 +82,7 @@ bool Line2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toleranc
}
#endif
-void Line2D::set_points(const PoolVector<Vector2> &p_points) {
+void Line2D::set_points(const Vector<Vector2> &p_points) {
_points = p_points;
update();
}
@@ -101,14 +101,14 @@ float Line2D::get_width() const {
void Line2D::set_curve(const Ref<Curve> &p_curve) {
// Cleanup previous connection if any
if (_curve.is_valid()) {
- _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_curve_changed));
}
_curve = p_curve;
// Connect to the curve so the line will update when it is changed
if (_curve.is_valid()) {
- _curve->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_curve_changed));
}
update();
@@ -118,7 +118,7 @@ Ref<Curve> Line2D::get_curve() const {
return _curve;
}
-PoolVector<Vector2> Line2D::get_points() const {
+Vector<Vector2> Line2D::get_points() const {
return _points;
}
@@ -146,7 +146,7 @@ void Line2D::clear_points() {
void Line2D::add_point(Vector2 p_pos, int p_atpos) {
if (p_atpos < 0 || _points.size() < p_atpos) {
- _points.append(p_pos);
+ _points.push_back(p_pos);
} else {
_points.insert(p_atpos, p_pos);
}
@@ -171,14 +171,14 @@ void Line2D::set_gradient(const Ref<Gradient> &p_gradient) {
// Cleanup previous connection if any
if (_gradient.is_valid()) {
- _gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_gradient_changed));
}
_gradient = p_gradient;
// Connect to the gradient so the line will update when the ColorRamp is changed
if (_gradient.is_valid()) {
- _gradient->connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_gradient_changed));
}
update();
@@ -282,7 +282,7 @@ void Line2D::_draw() {
points.resize(_points.size());
int len = points.size();
{
- PoolVector<Vector2>::Read points_read = _points.read();
+ const Vector2 *points_read = _points.ptr();
for (int i = 0; i < len; ++i) {
points.write[i] = points_read[i];
}
@@ -400,8 +400,8 @@ void Line2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &Line2D::set_antialiased);
ClassDB::bind_method(D_METHOD("get_antialiased"), &Line2D::get_antialiased);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "width"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "width_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color");
ADD_GROUP("Fill", "");
@@ -413,7 +413,7 @@ void Line2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "begin_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_begin_cap_mode", "get_begin_cap_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "end_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_end_cap_mode", "get_end_cap_mode");
ADD_GROUP("Border", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sharp_limit"), "set_sharp_limit", "get_sharp_limit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sharp_limit"), "set_sharp_limit", "get_sharp_limit");
ADD_PROPERTY(PropertyInfo(Variant::INT, "round_precision"), "set_round_precision", "get_round_precision");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased");
@@ -428,7 +428,4 @@ void Line2D::_bind_methods() {
BIND_ENUM_CONSTANT(LINE_TEXTURE_NONE);
BIND_ENUM_CONSTANT(LINE_TEXTURE_TILE);
BIND_ENUM_CONSTANT(LINE_TEXTURE_STRETCH);
-
- ClassDB::bind_method(D_METHOD("_gradient_changed"), &Line2D::_gradient_changed);
- ClassDB::bind_method(D_METHOD("_curve_changed"), &Line2D::_curve_changed);
}
diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h
index b7e7f59403..51706befdb 100644
--- a/scene/2d/line_2d.h
+++ b/scene/2d/line_2d.h
@@ -64,8 +64,8 @@ public:
Line2D();
- void set_points(const PoolVector<Vector2> &p_points);
- PoolVector<Vector2> get_points() const;
+ void set_points(const Vector<Vector2> &p_points);
+ Vector<Vector2> get_points() const;
void set_point_position(int i, Vector2 pos);
Vector2 get_point_position(int i) const;
@@ -124,7 +124,7 @@ private:
void _curve_changed();
private:
- PoolVector<Vector2> _points;
+ Vector<Vector2> _points;
LineJointMode _joint_mode;
LineCapMode _begin_cap_mode;
LineCapMode _end_cap_mode;
diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp
index de01d97ad9..bbabfa16c7 100644
--- a/scene/2d/navigation_2d.cpp
+++ b/scene/2d/navigation_2d.cpp
@@ -35,6 +35,8 @@ void Navigation2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rid"), &Navigation2D::get_rid);
ClassDB::bind_method(D_METHOD("get_simple_path", "start", "end", "optimize"), &Navigation2D::get_simple_path, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("get_closest_point", "to_point"), &Navigation2D::get_closest_point);
+ ClassDB::bind_method(D_METHOD("get_closest_point_owner", "to_point"), &Navigation2D::get_closest_point_owner);
ClassDB::bind_method(D_METHOD("set_cell_size", "cell_size"), &Navigation2D::set_cell_size);
ClassDB::bind_method(D_METHOD("get_cell_size"), &Navigation2D::get_cell_size);
@@ -42,8 +44,8 @@ void Navigation2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_edge_connection_margin", "margin"), &Navigation2D::set_edge_connection_margin);
ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation2D::get_edge_connection_margin);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
}
void Navigation2D::_notification(int p_what) {
@@ -68,13 +70,25 @@ void Navigation2D::set_edge_connection_margin(float p_edge_connection_margin) {
Navigation2DServer::get_singleton()->map_set_edge_connection_margin(map, edge_connection_margin);
}
-Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize) {
+Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize) const {
return Navigation2DServer::get_singleton()->map_get_path(map, p_start, p_end, p_optimize);
}
+Vector2 Navigation2D::get_closest_point(const Vector2 &p_point) const {
+ return Navigation2DServer::get_singleton()->map_get_closest_point(map, p_point);
+}
+
+RID Navigation2D::get_closest_point_owner(const Vector2 &p_point) const {
+ return Navigation2DServer::get_singleton()->map_get_closest_point_owner(map, p_point);
+}
+
Navigation2D::Navigation2D() {
map = Navigation2DServer::get_singleton()->map_create();
set_cell_size(10); // Ten pixels
set_edge_connection_margin(100);
}
+
+Navigation2D::~Navigation2D() {
+ Navigation2DServer::get_singleton()->free(map);
+}
diff --git a/scene/2d/navigation_2d.h b/scene/2d/navigation_2d.h
index 08642a5489..5520f5006e 100644
--- a/scene/2d/navigation_2d.h
+++ b/scene/2d/navigation_2d.h
@@ -61,9 +61,12 @@ public:
return edge_connection_margin;
}
- Vector<Vector2> get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize = true);
+ Vector<Vector2> get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize = true) const;
+ Vector2 get_closest_point(const Vector2 &p_point) const;
+ RID get_closest_point_owner(const Vector2 &p_point) const;
Navigation2D();
+ ~Navigation2D();
};
#endif // NAVIGATION_2D_H
diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp
index d019d72bc9..f5fe113f29 100644
--- a/scene/2d/navigation_agent_2d.cpp
+++ b/scene/2d/navigation_agent_2d.cpp
@@ -74,13 +74,13 @@ void NavigationAgent2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent2D::_avoidance_done);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance");
ADD_SIGNAL(MethodInfo("path_changed"));
ADD_SIGNAL(MethodInfo("target_reached"));
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 21b2bede05..9159ef21c5 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -46,11 +46,11 @@ Rect2 NavigationPolygon::_edit_get_rect() const {
bool first = true;
for (int i = 0; i < outlines.size(); i++) {
- const PoolVector<Vector2> &outline = outlines[i];
+ const Vector<Vector2> &outline = outlines[i];
const int outline_size = outline.size();
if (outline_size < 3)
continue;
- PoolVector<Vector2>::Read p = outline.read();
+ const Vector2 *p = outline.ptr();
for (int j = 0; j < outline_size; j++) {
if (first) {
item_rect = Rect2(p[j], Vector2(0, 0));
@@ -69,7 +69,7 @@ Rect2 NavigationPolygon::_edit_get_rect() const {
bool NavigationPolygon::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
for (int i = 0; i < outlines.size(); i++) {
- const PoolVector<Vector2> &outline = outlines[i];
+ const Vector<Vector2> &outline = outlines[i];
const int outline_size = outline.size();
if (outline_size < 3)
continue;
@@ -80,25 +80,27 @@ bool NavigationPolygon::_edit_is_selected_on_click(const Point2 &p_point, double
}
#endif
-void NavigationPolygon::set_vertices(const PoolVector<Vector2> &p_vertices) {
+void NavigationPolygon::set_vertices(const Vector<Vector2> &p_vertices) {
- navmesh_generation->lock();
- navmesh.unref();
- navmesh_generation->unlock();
+ {
+ MutexLock lock(navmesh_generation);
+ navmesh.unref();
+ }
vertices = p_vertices;
rect_cache_dirty = true;
}
-PoolVector<Vector2> NavigationPolygon::get_vertices() const {
+Vector<Vector2> NavigationPolygon::get_vertices() const {
return vertices;
}
void NavigationPolygon::_set_polygons(const Array &p_array) {
- navmesh_generation->lock();
- navmesh.unref();
- navmesh_generation->unlock();
+ {
+ MutexLock lock(navmesh_generation);
+ navmesh.unref();
+ }
polygons.resize(p_array.size());
for (int i = 0; i < p_array.size(); i++) {
polygons.write[i].indices = p_array[i];
@@ -141,12 +143,13 @@ void NavigationPolygon::add_polygon(const Vector<int> &p_polygon) {
Polygon polygon;
polygon.indices = p_polygon;
polygons.push_back(polygon);
- navmesh_generation->lock();
- navmesh.unref();
- navmesh_generation->unlock();
+ {
+ MutexLock lock(navmesh_generation);
+ navmesh.unref();
+ }
}
-void NavigationPolygon::add_outline_at_index(const PoolVector<Vector2> &p_outline, int p_index) {
+void NavigationPolygon::add_outline_at_index(const Vector<Vector2> &p_outline, int p_index) {
outlines.insert(p_index, p_outline);
rect_cache_dirty = true;
@@ -164,21 +167,23 @@ Vector<int> NavigationPolygon::get_polygon(int p_idx) {
void NavigationPolygon::clear_polygons() {
polygons.clear();
- navmesh_generation->lock();
- navmesh.unref();
- navmesh_generation->unlock();
+ {
+ MutexLock lock(navmesh_generation);
+ navmesh.unref();
+ }
}
Ref<NavigationMesh> NavigationPolygon::get_mesh() {
- navmesh_generation->lock();
+ MutexLock lock(navmesh_generation);
+
if (navmesh.is_null()) {
navmesh.instance();
- PoolVector<Vector3> verts;
+ Vector<Vector3> verts;
{
verts.resize(get_vertices().size());
- PoolVector<Vector3>::Write w = verts.write();
+ Vector3 *w = verts.ptrw();
- PoolVector<Vector2>::Read r = get_vertices().read();
+ const Vector2 *r = get_vertices().ptr();
for (int i(0); i < get_vertices().size(); i++) {
w[i] = Vector3(r[i].x, 0.0, r[i].y);
@@ -190,11 +195,11 @@ Ref<NavigationMesh> NavigationPolygon::get_mesh() {
navmesh->add_polygon(get_polygon(i));
}
}
- navmesh_generation->unlock();
+
return navmesh;
}
-void NavigationPolygon::add_outline(const PoolVector<Vector2> &p_outline) {
+void NavigationPolygon::add_outline(const Vector<Vector2> &p_outline) {
outlines.push_back(p_outline);
rect_cache_dirty = true;
@@ -205,7 +210,7 @@ int NavigationPolygon::get_outline_count() const {
return outlines.size();
}
-void NavigationPolygon::set_outline(int p_idx, const PoolVector<Vector2> &p_outline) {
+void NavigationPolygon::set_outline(int p_idx, const Vector<Vector2> &p_outline) {
ERR_FAIL_INDEX(p_idx, outlines.size());
outlines.write[p_idx] = p_outline;
rect_cache_dirty = true;
@@ -218,8 +223,8 @@ void NavigationPolygon::remove_outline(int p_idx) {
rect_cache_dirty = true;
}
-PoolVector<Vector2> NavigationPolygon::get_outline(int p_idx) const {
- ERR_FAIL_INDEX_V(p_idx, outlines.size(), PoolVector<Vector2>());
+Vector<Vector2> NavigationPolygon::get_outline(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, outlines.size(), Vector<Vector2>());
return outlines[p_idx];
}
@@ -230,20 +235,21 @@ void NavigationPolygon::clear_outlines() {
}
void NavigationPolygon::make_polygons_from_outlines() {
- navmesh_generation->lock();
- navmesh.unref();
- navmesh_generation->unlock();
+ {
+ MutexLock lock(navmesh_generation);
+ navmesh.unref();
+ }
List<TriangulatorPoly> in_poly, out_poly;
Vector2 outside_point(-1e10, -1e10);
for (int i = 0; i < outlines.size(); i++) {
- PoolVector<Vector2> ol = outlines[i];
+ Vector<Vector2> ol = outlines[i];
int olsize = ol.size();
if (olsize < 3)
continue;
- PoolVector<Vector2>::Read r = ol.read();
+ const Vector2 *r = ol.ptr();
for (int j = 0; j < olsize; j++) {
outside_point.x = MAX(r[j].x, outside_point.x);
outside_point.y = MAX(r[j].y, outside_point.y);
@@ -254,11 +260,11 @@ void NavigationPolygon::make_polygons_from_outlines() {
for (int i = 0; i < outlines.size(); i++) {
- PoolVector<Vector2> ol = outlines[i];
+ Vector<Vector2> ol = outlines[i];
int olsize = ol.size();
if (olsize < 3)
continue;
- PoolVector<Vector2>::Read r = ol.read();
+ const Vector2 *r = ol.ptr();
int interscount = 0;
//test if this is an outer outline
@@ -267,11 +273,11 @@ void NavigationPolygon::make_polygons_from_outlines() {
if (i == k)
continue; //no self intersect
- PoolVector<Vector2> ol2 = outlines[k];
+ Vector<Vector2> ol2 = outlines[k];
int olsize2 = ol2.size();
if (olsize2 < 3)
continue;
- PoolVector<Vector2>::Read r2 = ol2.read();
+ const Vector2 *r2 = ol2.ptr();
for (int l = 0; l < olsize2; l++) {
@@ -356,21 +362,19 @@ void NavigationPolygon::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_outlines", "outlines"), &NavigationPolygon::_set_outlines);
ClassDB::bind_method(D_METHOD("_get_outlines"), &NavigationPolygon::_get_outlines);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_outlines", "_get_outlines");
}
NavigationPolygon::NavigationPolygon() :
- rect_cache_dirty(true),
- navmesh_generation(Mutex::create()) {
+ rect_cache_dirty(true) {
}
NavigationPolygon::~NavigationPolygon() {
- memdelete(navmesh_generation);
}
-void NavigationPolygonInstance::set_enabled(bool p_enabled) {
+void NavigationRegion2D::set_enabled(bool p_enabled) {
if (enabled == p_enabled)
return;
@@ -394,25 +398,25 @@ void NavigationPolygonInstance::set_enabled(bool p_enabled) {
update();
}
-bool NavigationPolygonInstance::is_enabled() const {
+bool NavigationRegion2D::is_enabled() const {
return enabled;
}
/////////////////////////////
#ifdef TOOLS_ENABLED
-Rect2 NavigationPolygonInstance::_edit_get_rect() const {
+Rect2 NavigationRegion2D::_edit_get_rect() const {
return navpoly.is_valid() ? navpoly->_edit_get_rect() : Rect2();
}
-bool NavigationPolygonInstance::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
+bool NavigationRegion2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
return navpoly.is_valid() ? navpoly->_edit_is_selected_on_click(p_point, p_tolerance) : false;
}
#endif
-void NavigationPolygonInstance::_notification(int p_what) {
+void NavigationRegion2D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -451,7 +455,7 @@ void NavigationPolygonInstance::_notification(int p_what) {
if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) && navpoly.is_valid()) {
- PoolVector<Vector2> verts = navpoly->get_vertices();
+ Vector<Vector2> verts = navpoly->get_vertices();
int vsize = verts.size();
if (vsize < 3)
return;
@@ -467,7 +471,7 @@ void NavigationPolygonInstance::_notification(int p_what) {
vertices.resize(vsize);
colors.resize(vsize);
{
- PoolVector<Vector2>::Read vr = verts.read();
+ const Vector2 *vr = verts.ptr();
for (int i = 0; i < vsize; i++) {
vertices.write[i] = vr[i];
colors.write[i] = color;
@@ -496,21 +500,21 @@ void NavigationPolygonInstance::_notification(int p_what) {
}
}
-void NavigationPolygonInstance::set_navigation_polygon(const Ref<NavigationPolygon> &p_navpoly) {
+void NavigationRegion2D::set_navigation_polygon(const Ref<NavigationPolygon> &p_navpoly) {
if (p_navpoly == navpoly) {
return;
}
if (navpoly.is_valid()) {
- navpoly->disconnect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
+ navpoly->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &NavigationRegion2D::_navpoly_changed));
}
navpoly = p_navpoly;
Navigation2DServer::get_singleton()->region_set_navpoly(region, p_navpoly);
if (navpoly.is_valid()) {
- navpoly->connect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
+ navpoly->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &NavigationRegion2D::_navpoly_changed));
}
_navpoly_changed();
@@ -518,18 +522,18 @@ void NavigationPolygonInstance::set_navigation_polygon(const Ref<NavigationPolyg
update_configuration_warning();
}
-Ref<NavigationPolygon> NavigationPolygonInstance::get_navigation_polygon() const {
+Ref<NavigationPolygon> NavigationRegion2D::get_navigation_polygon() const {
return navpoly;
}
-void NavigationPolygonInstance::_navpoly_changed() {
+void NavigationRegion2D::_navpoly_changed() {
if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()))
update();
}
-String NavigationPolygonInstance::get_configuration_warning() const {
+String NavigationRegion2D::get_configuration_warning() const {
if (!is_visible_in_tree() || !is_inside_tree())
return String();
@@ -547,24 +551,24 @@ String NavigationPolygonInstance::get_configuration_warning() const {
c = Object::cast_to<Node2D>(c->get_parent());
}
- return TTR("NavigationPolygonInstance must be a child or grandchild to a Navigation2D node. It only provides navigation data.");
+ return TTR("NavigationRegion2D must be a child or grandchild to a Navigation2D node. It only provides navigation data.");
}
-void NavigationPolygonInstance::_bind_methods() {
+void NavigationRegion2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_navigation_polygon", "navpoly"), &NavigationPolygonInstance::set_navigation_polygon);
- ClassDB::bind_method(D_METHOD("get_navigation_polygon"), &NavigationPolygonInstance::get_navigation_polygon);
+ ClassDB::bind_method(D_METHOD("set_navigation_polygon", "navpoly"), &NavigationRegion2D::set_navigation_polygon);
+ ClassDB::bind_method(D_METHOD("get_navigation_polygon"), &NavigationRegion2D::get_navigation_polygon);
- ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &NavigationPolygonInstance::set_enabled);
- ClassDB::bind_method(D_METHOD("is_enabled"), &NavigationPolygonInstance::is_enabled);
+ ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &NavigationRegion2D::set_enabled);
+ ClassDB::bind_method(D_METHOD("is_enabled"), &NavigationRegion2D::is_enabled);
- ClassDB::bind_method(D_METHOD("_navpoly_changed"), &NavigationPolygonInstance::_navpoly_changed);
+ ClassDB::bind_method(D_METHOD("_navpoly_changed"), &NavigationRegion2D::_navpoly_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "navpoly", PROPERTY_HINT_RESOURCE_TYPE, "NavigationPolygon"), "set_navigation_polygon", "get_navigation_polygon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled");
}
-NavigationPolygonInstance::NavigationPolygonInstance() {
+NavigationRegion2D::NavigationRegion2D() {
enabled = true;
set_notify_transform(true);
@@ -573,6 +577,6 @@ NavigationPolygonInstance::NavigationPolygonInstance() {
navigation = NULL;
}
-NavigationPolygonInstance::~NavigationPolygonInstance() {
+NavigationRegion2D::~NavigationRegion2D() {
Navigation2DServer::get_singleton()->free(region);
}
diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h
index 8d3d8543c4..579d6b0e0e 100644
--- a/scene/2d/navigation_polygon.h
+++ b/scene/2d/navigation_polygon.h
@@ -34,23 +34,21 @@
#include "scene/2d/node_2d.h"
#include "scene/resources/navigation_mesh.h"
-class Mutex;
-
class NavigationPolygon : public Resource {
GDCLASS(NavigationPolygon, Resource);
- PoolVector<Vector2> vertices;
+ Vector<Vector2> vertices;
struct Polygon {
Vector<int> indices;
};
Vector<Polygon> polygons;
- Vector<PoolVector<Vector2> > outlines;
+ Vector<Vector<Vector2> > outlines;
mutable Rect2 item_rect;
mutable bool rect_cache_dirty;
- Mutex *navmesh_generation;
+ Mutex navmesh_generation;
// Navigation mesh
Ref<NavigationMesh> navmesh;
@@ -69,16 +67,16 @@ public:
bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
#endif
- void set_vertices(const PoolVector<Vector2> &p_vertices);
- PoolVector<Vector2> get_vertices() const;
+ void set_vertices(const Vector<Vector2> &p_vertices);
+ Vector<Vector2> get_vertices() const;
void add_polygon(const Vector<int> &p_polygon);
int get_polygon_count() const;
- void add_outline(const PoolVector<Vector2> &p_outline);
- void add_outline_at_index(const PoolVector<Vector2> &p_outline, int p_index);
- void set_outline(int p_idx, const PoolVector<Vector2> &p_outline);
- PoolVector<Vector2> get_outline(int p_idx) const;
+ void add_outline(const Vector<Vector2> &p_outline);
+ void add_outline_at_index(const Vector<Vector2> &p_outline, int p_index);
+ void set_outline(int p_idx, const Vector<Vector2> &p_outline);
+ Vector<Vector2> get_outline(int p_idx) const;
void remove_outline(int p_idx);
int get_outline_count() const;
@@ -96,9 +94,9 @@ public:
class Navigation2D;
-class NavigationPolygonInstance : public Node2D {
+class NavigationRegion2D : public Node2D {
- GDCLASS(NavigationPolygonInstance, Node2D);
+ GDCLASS(NavigationRegion2D, Node2D);
bool enabled;
RID region;
@@ -125,8 +123,8 @@ public:
String get_configuration_warning() const;
- NavigationPolygonInstance();
- ~NavigationPolygonInstance();
+ NavigationRegion2D();
+ ~NavigationRegion2D();
};
#endif // NAVIGATIONPOLYGON_H
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 7deebe9b27..df21538609 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -440,14 +440,14 @@ void Node2D::_bind_methods() {
ADD_GROUP("Transform", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position"), "set_position", "get_position");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform", PROPERTY_HINT_NONE, "", 0), "set_transform", "get_transform");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "", 0), "set_global_position", "get_global_position");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_scale", PROPERTY_HINT_NONE, "", 0), "set_global_scale", "get_global_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_transform", PROPERTY_HINT_NONE, "", 0), "set_global_transform", "get_global_transform");
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index d3bc7b6a5a..2ba2fd8f79 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -384,12 +384,12 @@ void Particles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index d83c163b4c..3e807f12dc 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -134,13 +134,13 @@ void Path2D::_curve_changed() {
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {
if (curve.is_valid()) {
- curve->disconnect("changed", this, "_curve_changed");
+ curve->disconnect("changed", callable_mp(this, &Path2D::_curve_changed));
}
curve = p_curve;
if (curve.is_valid()) {
- curve->connect("changed", this, "_curve_changed");
+ curve->connect("changed", callable_mp(this, &Path2D::_curve_changed));
}
_curve_changed();
@@ -155,7 +155,6 @@ void Path2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_curve", "curve"), &Path2D::set_curve);
ClassDB::bind_method(D_METHOD("get_curve"), &Path2D::get_curve);
- ClassDB::bind_method(D_METHOD("_curve_changed"), &Path2D::_curve_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve2D"), "set_curve", "get_curve");
}
@@ -308,14 +307,14 @@ void PathFollow2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lookahead", "lookahead"), &PathFollow2D::set_lookahead);
ClassDB::bind_method(D_METHOD("get_lookahead"), &PathFollow2D::get_lookahead);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rotate"), "set_rotate", "is_rotating");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead");
}
void PathFollow2D::set_offset(float p_offset) {
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 29bfc39477..9bfeca7e56 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -192,14 +192,15 @@ real_t StaticBody2D::get_constant_angular_velocity() const {
void StaticBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody2D::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody2D::_reload_physics_characteristics));
+ }
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody2D::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
@@ -218,10 +219,8 @@ void StaticBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody2D::set_physics_material_override);
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody2D::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &StaticBody2D::_reload_physics_characteristics);
-
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
}
@@ -311,8 +310,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
//E->get().rc=0;
E->get().in_scene = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree), make_binds(objid));
if (E->get().in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -340,8 +339,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
if (E->get().shapes.empty()) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree));
if (in_scene)
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
@@ -545,14 +544,15 @@ real_t RigidBody2D::get_weight() const {
void RigidBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics));
+ }
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
@@ -774,9 +774,8 @@ void RigidBody2D::set_contact_monitor(bool p_enabled) {
Node *node = Object::cast_to<Node>(obj);
if (node) {
-
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree));
}
}
@@ -845,8 +844,6 @@ void RigidBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidBody2D::set_physics_material_override);
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidBody2D::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &RigidBody2D::_reload_physics_characteristics);
-
ClassDB::bind_method(D_METHOD("set_gravity_scale", "gravity_scale"), &RigidBody2D::set_gravity_scale);
ClassDB::bind_method(D_METHOD("get_gravity_scale"), &RigidBody2D::get_gravity_scale);
@@ -898,19 +895,17 @@ void RigidBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("test_motion", "motion", "infinite_inertia", "margin", "result"), &RigidBody2D::_test_motion, DEFVAL(true), DEFVAL(0.08), DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("_direct_state_changed"), &RigidBody2D::_direct_state_changed);
- ClassDB::bind_method(D_METHOD("_body_enter_tree"), &RigidBody2D::_body_enter_tree);
- ClassDB::bind_method(D_METHOD("_body_exit_tree"), &RigidBody2D::_body_exit_tree);
ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody2D::get_colliding_bodies);
BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
ADD_PROPERTY(PropertyInfo(Variant::INT, "continuous_cd", PROPERTY_HINT_ENUM, "Disabled,Cast Ray,Cast Shape"), "set_continuous_collision_detection_mode", "get_continuous_collision_detection_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported");
@@ -919,13 +914,13 @@ void RigidBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "can_sleep"), "set_can_sleep", "is_able_to_sleep");
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
ADD_GROUP("Angular", "angular_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_GROUP("Applied Forces", "applied_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "applied_force"), "set_applied_force", "get_applied_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "applied_torque"), "set_applied_torque", "get_applied_torque");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "applied_torque"), "set_applied_torque", "get_applied_torque");
ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
@@ -1357,7 +1352,7 @@ void KinematicBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_direct_state_changed"), &KinematicBody2D::_direct_state_changed);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "motion/sync_to_physics"), "set_sync_to_physics", "is_sync_to_physics_enabled");
}
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index ba5b7d29e7..95656b9610 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -61,7 +61,7 @@ bool Polygon2D::_edit_use_pivot() const {
Rect2 Polygon2D::_edit_get_rect() const {
if (rect_cache_dirty) {
int l = polygon.size();
- PoolVector<Vector2>::Read r = polygon.read();
+ const Vector2 *r = polygon.ptr();
item_rect = Rect2();
for (int i = 0; i < l; i++) {
Vector2 pos = r[i] + offset;
@@ -120,11 +120,11 @@ void Polygon2D::_notification(int p_what) {
if (new_skeleton_id != current_skeleton_id) {
Object *old_skeleton = ObjectDB::get_instance(current_skeleton_id);
if (old_skeleton) {
- old_skeleton->disconnect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ old_skeleton->disconnect("bone_setup_changed", callable_mp(this, &Polygon2D::_skeleton_bone_setup_changed));
}
if (skeleton_node) {
- skeleton_node->connect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ skeleton_node->connect("bone_setup_changed", callable_mp(this, &Polygon2D::_skeleton_bone_setup_changed));
}
current_skeleton_id = new_skeleton_id;
@@ -148,7 +148,7 @@ void Polygon2D::_notification(int p_what) {
{
- PoolVector<Vector2>::Read polyr = polygon.read();
+ const Vector2 *polyr = polygon.ptr();
for (int i = 0; i < len; i++) {
points.write[i] = polyr[i] + offset;
}
@@ -217,7 +217,7 @@ void Polygon2D::_notification(int p_what) {
if (points.size() == uv.size()) {
- PoolVector<Vector2>::Read uvr = uv.read();
+ const Vector2 *uvr = uv.ptr();
for (int i = 0; i < len; i++) {
uvs.write[i] = texmat.xform(uvr[i]) / tex_size;
@@ -257,7 +257,7 @@ void Polygon2D::_notification(int p_what) {
}
int bone_index = bone->get_index_in_skeleton();
- PoolVector<float>::Read r = bone_weights[i].weights.read();
+ const float *r = bone_weights[i].weights.ptr();
for (int j = 0; j < vc; j++) {
if (r[j] == 0.0)
continue; //weight is unpainted, skip
@@ -296,7 +296,7 @@ void Polygon2D::_notification(int p_what) {
Vector<Color> colors;
if (vertex_colors.size() == points.size()) {
colors.resize(len);
- PoolVector<Color>::Read color_r = vertex_colors.read();
+ const Color *color_r = vertex_colors.ptr();
for (int i = 0; i < len; i++) {
colors.write[i] = color_r[i];
}
@@ -313,11 +313,11 @@ void Polygon2D::_notification(int p_what) {
//draw individual polygons
Vector<int> total_indices;
for (int i = 0; i < polygons.size(); i++) {
- PoolVector<int> src_indices = polygons[i];
+ Vector<int> src_indices = polygons[i];
int ic = src_indices.size();
if (ic < 3)
continue;
- PoolVector<int>::Read r = src_indices.read();
+ const int *r = src_indices.ptr();
Vector<Vector2> tmp_points;
tmp_points.resize(ic);
@@ -349,13 +349,13 @@ void Polygon2D::_notification(int p_what) {
}
}
-void Polygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) {
+void Polygon2D::set_polygon(const Vector<Vector2> &p_polygon) {
polygon = p_polygon;
rect_cache_dirty = true;
update();
}
-PoolVector<Vector2> Polygon2D::get_polygon() const {
+Vector<Vector2> Polygon2D::get_polygon() const {
return polygon;
}
@@ -369,13 +369,13 @@ int Polygon2D::get_internal_vertex_count() const {
return internal_vertices;
}
-void Polygon2D::set_uv(const PoolVector<Vector2> &p_uv) {
+void Polygon2D::set_uv(const Vector<Vector2> &p_uv) {
uv = p_uv;
update();
}
-PoolVector<Vector2> Polygon2D::get_uv() const {
+Vector<Vector2> Polygon2D::get_uv() const {
return uv;
}
@@ -401,12 +401,12 @@ Color Polygon2D::get_color() const {
return color;
}
-void Polygon2D::set_vertex_colors(const PoolVector<Color> &p_colors) {
+void Polygon2D::set_vertex_colors(const Vector<Color> &p_colors) {
vertex_colors = p_colors;
update();
}
-PoolVector<Color> Polygon2D::get_vertex_colors() const {
+Vector<Color> Polygon2D::get_vertex_colors() const {
return vertex_colors;
}
@@ -548,7 +548,7 @@ Vector2 Polygon2D::get_offset() const {
return offset;
}
-void Polygon2D::add_bone(const NodePath &p_path, const PoolVector<float> &p_weights) {
+void Polygon2D::add_bone(const NodePath &p_path, const Vector<float> &p_weights) {
Bone bone;
bone.path = p_path;
@@ -562,9 +562,9 @@ NodePath Polygon2D::get_bone_path(int p_index) const {
ERR_FAIL_INDEX_V(p_index, bone_weights.size(), NodePath());
return bone_weights[p_index].path;
}
-PoolVector<float> Polygon2D::get_bone_weights(int p_index) const {
+Vector<float> Polygon2D::get_bone_weights(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, bone_weights.size(), PoolVector<float>());
+ ERR_FAIL_INDEX_V(p_index, bone_weights.size(), Vector<float>());
return bone_weights[p_index].weights;
}
void Polygon2D::erase_bone(int p_idx) {
@@ -577,7 +577,7 @@ void Polygon2D::clear_bones() {
bone_weights.clear();
}
-void Polygon2D::set_bone_weights(int p_index, const PoolVector<float> &p_weights) {
+void Polygon2D::set_bone_weights(int p_index, const Vector<float> &p_weights) {
ERR_FAIL_INDEX(p_index, bone_weights.size());
bone_weights.write[p_index].weights = p_weights;
update();
@@ -690,8 +690,6 @@ void Polygon2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_bones", "bones"), &Polygon2D::_set_bones);
ClassDB::bind_method(D_METHOD("_get_bones"), &Polygon2D::_get_bones);
- ClassDB::bind_method(D_METHOD("_skeleton_bone_setup_changed"), &Polygon2D::_skeleton_bone_setup_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased");
@@ -700,24 +698,24 @@ void Polygon2D::_bind_methods() {
ADD_GROUP("Texture2D", "texture_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_offset"), "set_texture_offset", "get_texture_offset");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_scale"), "set_texture_scale", "get_texture_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation");
ADD_GROUP("Lighting", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Skeleton", "");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "skeleton", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Skeleton2D"), "set_skeleton", "get_skeleton");
ADD_GROUP("Invert", "invert_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "invert_enable"), "set_invert", "get_invert");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border");
ADD_GROUP("Data", "");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "uv"), "set_uv", "get_uv");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "vertex_colors"), "set_vertex_colors", "get_vertex_colors");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "uv"), "set_uv", "get_uv");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "vertex_colors"), "set_vertex_colors", "get_vertex_colors");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons"), "set_polygons", "get_polygons");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bones", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_bones", "_get_bones");
ADD_PROPERTY(PropertyInfo(Variant::INT, "internal_vertex_count", PROPERTY_HINT_RANGE, "0,1000"), "set_internal_vertex_count", "get_internal_vertex_count");
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index 4816e2c869..777c1f82f3 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -37,15 +37,15 @@ class Polygon2D : public Node2D {
GDCLASS(Polygon2D, Node2D);
- PoolVector<Vector2> polygon;
- PoolVector<Vector2> uv;
- PoolVector<Color> vertex_colors;
+ Vector<Vector2> polygon;
+ Vector<Vector2> uv;
+ Vector<Color> vertex_colors;
Array polygons;
int internal_vertices;
struct Bone {
NodePath path;
- PoolVector<float> weights;
+ Vector<float> weights;
};
Vector<Bone> bone_weights;
@@ -95,14 +95,14 @@ public:
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
#endif
- void set_polygon(const PoolVector<Vector2> &p_polygon);
- PoolVector<Vector2> get_polygon() const;
+ void set_polygon(const Vector<Vector2> &p_polygon);
+ Vector<Vector2> get_polygon() const;
void set_internal_vertex_count(int p_count);
int get_internal_vertex_count() const;
- void set_uv(const PoolVector<Vector2> &p_uv);
- PoolVector<Vector2> get_uv() const;
+ void set_uv(const Vector<Vector2> &p_uv);
+ Vector<Vector2> get_uv() const;
void set_polygons(const Array &p_polygons);
Array get_polygons() const;
@@ -110,8 +110,8 @@ public:
void set_color(const Color &p_color);
Color get_color() const;
- void set_vertex_colors(const PoolVector<Color> &p_colors);
- PoolVector<Color> get_vertex_colors() const;
+ void set_vertex_colors(const Vector<Color> &p_colors);
+ Vector<Color> get_vertex_colors() const;
void set_texture(const Ref<Texture2D> &p_texture);
Ref<Texture2D> get_texture() const;
@@ -152,13 +152,13 @@ public:
void set_offset(const Vector2 &p_offset);
Vector2 get_offset() const;
- void add_bone(const NodePath &p_path = NodePath(), const PoolVector<float> &p_weights = PoolVector<float>());
+ void add_bone(const NodePath &p_path = NodePath(), const Vector<float> &p_weights = Vector<float>());
int get_bone_count() const;
NodePath get_bone_path(int p_index) const;
- PoolVector<float> get_bone_weights(int p_index) const;
+ Vector<float> get_bone_weights(int p_index) const;
void erase_bone(int p_idx);
void clear_bones();
- void set_bone_weights(int p_index, const PoolVector<float> &p_weights);
+ void set_bone_weights(int p_index, const Vector<float> &p_weights);
void set_bone_path(int p_index, const NodePath &p_path);
void set_skeleton(const NodePath &p_skeleton);
diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp
index cdeb905c0c..9e95a55d9f 100644
--- a/scene/2d/position_2d.cpp
+++ b/scene/2d/position_2d.cpp
@@ -96,7 +96,7 @@ void Position2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_gizmo_extents", "extents"), &Position2D::set_gizmo_extents);
ClassDB::bind_method(D_METHOD("_get_gizmo_extents"), &Position2D::get_gizmo_extents);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents");
}
Position2D::Position2D() {
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 6f64464cc9..9ebaf23c3a 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -90,7 +90,7 @@ void Bone2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_default_length"), &Bone2D::get_default_length);
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "rest"), "set_rest", "get_rest");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length");
}
void Bone2D::set_rest(const Transform2D &p_rest) {
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 2fe39ca104..7eaafe5348 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "sprite.h"
+
#include "core/core_string_names.h"
#include "core/os/os.h"
#include "scene/main/viewport.h"
@@ -142,12 +143,12 @@ void Sprite::set_texture(const Ref<Texture2D> &p_texture) {
return;
if (texture.is_valid())
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite::_texture_changed));
texture = p_texture;
if (texture.is_valid())
- texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite::_texture_changed));
update();
emit_signal("texture_changed");
@@ -492,8 +493,6 @@ void Sprite::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rect"), &Sprite::get_rect);
- ClassDB::bind_method(D_METHOD("_texture_changed"), &Sprite::_texture_changed);
-
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("texture_changed"));
@@ -502,7 +501,7 @@ void Sprite::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Offset", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index e3fda5b585..601be17274 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -177,7 +177,7 @@ void TileMap::_update_quadrant_transform() {
void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
if (tile_set.is_valid()) {
- tile_set->disconnect("changed", this, "_recreate_quadrants");
+ tile_set->disconnect("changed", callable_mp(this, &TileMap::_recreate_quadrants));
tile_set->remove_change_receptor(this);
}
@@ -185,7 +185,7 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
tile_set = p_tileset;
if (tile_set.is_valid()) {
- tile_set->connect("changed", this, "_recreate_quadrants");
+ tile_set->connect("changed", callable_mp(this, &TileMap::_recreate_quadrants));
tile_set->add_change_receptor(this);
} else {
clear();
@@ -629,7 +629,7 @@ void TileMap::update_dirty_quadrants() {
vs->canvas_item_set_z_index(debug_navigation_item, VS::CANVAS_ITEM_Z_MAX - 2); // Display one below collision debug
if (debug_navigation_item.is_valid()) {
- PoolVector<Vector2> navigation_polygon_vertices = navpoly->get_vertices();
+ Vector<Vector2> navigation_polygon_vertices = navpoly->get_vertices();
int vsize = navigation_polygon_vertices.size();
if (vsize > 2) {
@@ -638,7 +638,7 @@ void TileMap::update_dirty_quadrants() {
vertices.resize(vsize);
colors.resize(vsize);
{
- PoolVector<Vector2>::Read vr = navigation_polygon_vertices.read();
+ const Vector2 *vr = navigation_polygon_vertices.ptr();
for (int j = 0; j < vsize; j++) {
vertices.write[j] = vr[j];
colors.write[j] = debug_navigation_color;
@@ -853,7 +853,7 @@ void TileMap::_set_celld(const Vector2 &p_pos, const Dictionary &p_data) {
Variant v_pos_x = p_pos.x, v_pos_y = p_pos.y, v_tile = p_data["id"], v_flip_h = p_data["flip_h"], v_flip_v = p_data["flip_y"], v_transpose = p_data["transpose"], v_autotile_coord = p_data["auto_coord"];
const Variant *args[7] = { &v_pos_x, &v_pos_y, &v_tile, &v_flip_h, &v_flip_v, &v_transpose, &v_autotile_coord };
- Variant::CallError ce;
+ Callable::CallError ce;
call("set_cell", args, 7, ce);
}
@@ -1207,12 +1207,12 @@ void TileMap::clear() {
used_size_cache_dirty = true;
}
-void TileMap::_set_tile_data(const PoolVector<int> &p_data) {
+void TileMap::_set_tile_data(const Vector<int> &p_data) {
ERR_FAIL_COND(format > FORMAT_2);
int c = p_data.size();
- PoolVector<int>::Read r = p_data.read();
+ const int *r = p_data.ptr();
int offset = (format == FORMAT_2) ? 3 : 2;
@@ -1255,11 +1255,11 @@ void TileMap::_set_tile_data(const PoolVector<int> &p_data) {
}
}
-PoolVector<int> TileMap::_get_tile_data() const {
+Vector<int> TileMap::_get_tile_data() const {
- PoolVector<int> data;
+ Vector<int> data;
data.resize(tile_map.size() * 3);
- PoolVector<int>::Write w = data.write();
+ int *w = data.ptrw();
// Save in highest format
@@ -1281,8 +1281,6 @@ PoolVector<int> TileMap::_get_tile_data() const {
idx += 3;
}
- w.release();
-
return data;
}
@@ -1885,7 +1883,6 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("world_to_map", "world_position"), &TileMap::world_to_map);
ClassDB::bind_method(D_METHOD("_clear_quadrants"), &TileMap::_clear_quadrants);
- ClassDB::bind_method(D_METHOD("_recreate_quadrants"), &TileMap::_recreate_quadrants);
ClassDB::bind_method(D_METHOD("update_dirty_quadrants"), &TileMap::update_dirty_quadrants);
ClassDB::bind_method(D_METHOD("update_bitmask_area", "position"), &TileMap::update_bitmask_area);
@@ -1911,8 +1908,8 @@ void TileMap::_bind_methods() {
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_parent", PROPERTY_HINT_NONE, ""), "set_collision_use_parent", "get_collision_use_parent");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_kinematic", PROPERTY_HINT_NONE, ""), "set_collision_use_kinematic", "get_collision_use_kinematic");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index d5ef7fc818..d9490aae13 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -220,8 +220,8 @@ private:
_FORCE_INLINE_ int _get_quadrant_size() const;
- void _set_tile_data(const PoolVector<int> &p_data);
- PoolVector<int> _get_tile_data() const;
+ void _set_tile_data(const Vector<int> &p_data);
+ Vector<int> _get_tile_data() const;
void _set_old_cell_size(int p_size) { set_cell_size(Size2(p_size, p_size)); }
int _get_old_cell_size() const { return cell_size.x; }
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index beff74f496..1cca45b422 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -69,12 +69,12 @@ Ref<BitMap> TouchScreenButton::get_bitmask() const {
void TouchScreenButton::set_shape(const Ref<Shape2D> &p_shape) {
if (shape.is_valid())
- shape->disconnect("changed", this, "update");
+ shape->disconnect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update));
shape = p_shape;
if (shape.is_valid())
- shape->connect("changed", this, "update");
+ shape->connect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update));
update();
}
@@ -404,7 +404,7 @@ void TouchScreenButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_centered"), "set_shape_centered", "is_shape_centered");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_visible"), "set_shape_visible", "is_shape_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "passby_press"), "set_passby_press", "is_passby_press_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visibility_mode", PROPERTY_HINT_ENUM, "Always,TouchScreen Only"), "set_visibility_mode", "get_visibility_mode");
ADD_SIGNAL(MethodInfo("pressed"));
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 0ac725b7dd..366de28386 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -224,7 +224,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (add) {
- p_node->connect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler2D::_node_removed), varray(p_node), CONNECT_ONESHOT);
nodes[p_node] = meta;
_change_node_state(p_node, false);
}
@@ -267,7 +267,7 @@ void VisibilityEnabler2D::_notification(int p_what) {
if (!visible)
_change_node_state(E->key(), true);
- E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
+ E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler2D::_node_removed));
}
nodes.clear();
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 62908e2b0f..321926d841 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "area.h"
+
#include "scene/scene_string_names.h"
#include "servers/audio_server.h"
#include "servers/physics_server.h"
@@ -170,8 +171,8 @@ void Area::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_body_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -197,8 +198,8 @@ void Area::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_body_exit_tree));
if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
}
@@ -244,8 +245,8 @@ void Area::_clear_monitoring() {
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_body_exit_tree));
}
}
@@ -274,8 +275,8 @@ void Area::_clear_monitoring() {
emit_signal(SceneStringNames::get_singleton()->area_exited, obj);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_area_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_area_exit_tree));
}
}
}
@@ -363,8 +364,8 @@ void Area::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, int
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_area_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_area_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_entered, node);
}
@@ -390,8 +391,8 @@ void Area::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, int
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area::_area_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area::_area_exit_tree));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_exited, obj);
}
@@ -618,13 +619,6 @@ void Area::_validate_property(PropertyInfo &property) const {
}
void Area::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_body_enter_tree", "id"), &Area::_body_enter_tree);
- ClassDB::bind_method(D_METHOD("_body_exit_tree", "id"), &Area::_body_exit_tree);
-
- ClassDB::bind_method(D_METHOD("_area_enter_tree", "id"), &Area::_area_enter_tree);
- ClassDB::bind_method(D_METHOD("_area_exit_tree", "id"), &Area::_area_exit_tree);
-
ClassDB::bind_method(D_METHOD("set_space_override_mode", "enable"), &Area::set_space_override_mode);
ClassDB::bind_method(D_METHOD("get_space_override_mode"), &Area::get_space_override_mode);
@@ -706,11 +700,11 @@ void Area::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity_vec"), "set_gravity_vector", "get_gravity_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable");
@@ -719,12 +713,12 @@ void Area::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus");
ADD_GROUP("Reverb Bus", "reverb_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "reverb_bus_enable"), "set_use_reverb_bus", "is_using_reverb_bus");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index 8d1556ef1c..d23e5ffa08 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -252,7 +252,7 @@ void ARVRController::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRController::get_rumble);
ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRController::set_rumble);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble");
ADD_PROPERTY_DEFAULT("rumble", 0.0);
ClassDB::bind_method(D_METHOD("get_mesh"), &ARVRController::get_mesh);
@@ -300,7 +300,7 @@ int ARVRController::get_joystick_id() const {
return tracker->get_joy_id();
};
-int ARVRController::is_button_pressed(int p_button) const {
+bool ARVRController::is_button_pressed(int p_button) const {
int joy_id = get_joystick_id();
if (joy_id == -1) {
return false;
@@ -544,7 +544,7 @@ String ARVROrigin::get_configuration_warning() const {
void ARVROrigin::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_world_scale", "world_scale"), &ARVROrigin::set_world_scale);
ClassDB::bind_method(D_METHOD("get_world_scale"), &ARVROrigin::get_world_scale);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
};
void ARVROrigin::set_tracked_camera(ARVRCamera *p_tracked_camera) {
diff --git a/scene/3d/arvr_nodes.h b/scene/3d/arvr_nodes.h
index 44dfda15a6..e968e33c9d 100644
--- a/scene/3d/arvr_nodes.h
+++ b/scene/3d/arvr_nodes.h
@@ -88,7 +88,7 @@ public:
String get_controller_name(void) const;
int get_joystick_id() const;
- int is_button_pressed(int p_button) const;
+ bool is_button_pressed(int p_button) const;
float get_joystick_axis(int p_axis) const;
real_t get_rumble() const;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 596ef78fb5..855d254bd6 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -45,12 +45,12 @@ private:
mutable real_t squared_gain; // temporary
};
- PoolVector<Speaker> speakers;
+ Vector<Speaker> speakers;
public:
Spcap(unsigned int speaker_count, const Vector3 *speaker_directions) {
this->speakers.resize(speaker_count);
- PoolVector<Speaker>::Write w = this->speakers.write();
+ Speaker *w = this->speakers.ptrw();
for (unsigned int speaker_num = 0; speaker_num < speaker_count; speaker_num++) {
w[speaker_num].direction = speaker_directions[speaker_num];
w[speaker_num].squared_gain = 0.0;
@@ -66,11 +66,11 @@ public:
}
Vector3 get_speaker_direction(unsigned int index) const {
- return this->speakers.read()[index].direction;
+ return this->speakers.ptr()[index].direction;
}
void calculate(const Vector3 &source_direction, real_t tightness, unsigned int volume_count, real_t *volumes) const {
- PoolVector<Speaker>::Read r = this->speakers.read();
+ const Speaker *r = this->speakers.ptr();
real_t sum_squared_gains = 0.0;
for (unsigned int speaker_num = 0; speaker_num < (unsigned int)this->speakers.size(); speaker_num++) {
real_t initial_gain = 0.5 * powf(1.0 + r[speaker_num].direction.dot(source_direction), tightness) / r[speaker_num].effective_number_of_speakers;
@@ -98,11 +98,18 @@ static const Vector3 speaker_directions[7] = {
void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) {
unsigned int speaker_count; // only main speakers (no LFE)
switch (AudioServer::get_singleton()->get_speaker_mode()) {
- default: //fallthrough
- case AudioServer::SPEAKER_MODE_STEREO: speaker_count = 2; break;
- case AudioServer::SPEAKER_SURROUND_31: speaker_count = 3; break;
- case AudioServer::SPEAKER_SURROUND_51: speaker_count = 5; break;
- case AudioServer::SPEAKER_SURROUND_71: speaker_count = 7; break;
+ case AudioServer::SPEAKER_MODE_STEREO:
+ speaker_count = 2;
+ break;
+ case AudioServer::SPEAKER_SURROUND_31:
+ speaker_count = 3;
+ break;
+ case AudioServer::SPEAKER_SURROUND_51:
+ speaker_count = 5;
+ break;
+ case AudioServer::SPEAKER_SURROUND_71:
+ speaker_count = 7;
+ break;
}
Spcap spcap(speaker_count, speaker_directions); //TODO: should only be created/recreated once the speaker mode / speaker positions changes
@@ -113,18 +120,19 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
case AudioServer::SPEAKER_SURROUND_71:
output.vol[3].l = volumes[5]; // side-left
output.vol[3].r = volumes[6]; // side-right
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_SURROUND_51:
output.vol[2].l = volumes[3]; // rear-left
output.vol[2].r = volumes[4]; // rear-right
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_SURROUND_31:
output.vol[1].r = 1.0; // LFE - always full power
output.vol[1].l = volumes[2]; // center
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_MODE_STEREO:
output.vol[0].r = volumes[1]; // front-right
output.vol[0].l = volumes[0]; // front-left
+ break;
}
}
@@ -1000,28 +1008,26 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer3D::get_stream_playback);
- ClassDB::bind_method(D_METHOD("_bus_layout_changed"), &AudioStreamPlayer3D::_bus_layout_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::INT, "attenuation_model", PROPERTY_HINT_ENUM, "Inverse,InverseSquare,Log,Disabled"), "set_attenuation_model", "get_attenuation_model");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::INT, "out_of_range_mode", PROPERTY_HINT_ENUM, "Mix,Pause"), "set_out_of_range_mode", "get_out_of_range_mode");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_GROUP("Emission Angle", "emission_angle");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emission_angle_enabled"), "set_emission_angle_enabled", "is_emission_angle_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db");
ADD_GROUP("Attenuation Filter", "attenuation_filter_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db");
ADD_GROUP("Doppler", "doppler_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking");
@@ -1068,7 +1074,7 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() {
stream_paused_fade_out = false;
velocity_tracker.instance();
- AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
+ AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer3D::_bus_layout_changed));
set_disable_scale(true);
}
AudioStreamPlayer3D::~AudioStreamPlayer3D() {
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 31a80bc2db..73b1d450f0 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -47,12 +47,12 @@ AABB BakedLightmapData::get_bounds() const {
return bounds;
}
-void BakedLightmapData::set_octree(const PoolVector<uint8_t> &p_octree) {
+void BakedLightmapData::set_octree(const Vector<uint8_t> &p_octree) {
VS::get_singleton()->lightmap_capture_set_octree(baked_light, p_octree);
}
-PoolVector<uint8_t> BakedLightmapData::get_octree() const {
+Vector<uint8_t> BakedLightmapData::get_octree() const {
return VS::get_singleton()->lightmap_capture_get_octree(baked_light);
}
@@ -174,8 +174,8 @@ void BakedLightmapData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::AABB, "bounds", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_bounds", "get_bounds");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "cell_space_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_space_transform", "get_cell_space_transform");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_subdiv", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_subdiv", "get_cell_subdiv");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "user_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_user_data", "_get_user_data");
}
@@ -495,13 +495,13 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi
if (hdr) {
//just save a regular image
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int s = lm.light.size();
data.resize(lm.light.size() * 2);
{
- PoolVector<uint8_t>::Write w = data.write();
- PoolVector<float>::Read r = lm.light.read();
+ uint8_t* w = data.ptrw();
+ const float* r = lm.light.ptr();
uint16_t *hfw = (uint16_t *)w.ptr();
for (int i = 0; i < s; i++) {
hfw[i] = Math::make_half_float(r[i]);
@@ -513,13 +513,13 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi
} else {
//just save a regular image
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int s = lm.light.size();
data.resize(lm.light.size());
{
- PoolVector<uint8_t>::Write w = data.write();
- PoolVector<float>::Read r = lm.light.read();
+ uint8_t* w = data.ptrw();
+ const float* r = lm.light.ptr();
for (int i = 0; i < s; i += 3) {
Color c(r[i + 0], r[i + 1], r[i + 2]);
c = c.to_srgb();
@@ -775,8 +775,8 @@ String BakedLightmap::get_image_path() const {
AABB BakedLightmap::get_aabb() const {
return AABB(-extents, extents * 2);
}
-PoolVector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+Vector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const {
+ return Vector<Face3>();
}
void BakedLightmap::_bind_methods() {
@@ -819,16 +819,16 @@ void BakedLightmap::_bind_methods() {
ClassDB::set_method_flags(get_class_static(), _scs_create("debug_bake"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ADD_GROUP("Bake", "bake_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), "set_bake_quality", "get_bake_quality");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_mode", PROPERTY_HINT_ENUM, "ConeTrace,RayTrace"), "set_bake_mode", "get_bake_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bake_hdr"), "set_hdr", "is_hdr");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "bake_extents"), "set_extents", "get_extents");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit");
ADD_GROUP("Capture", "capture_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size");
ADD_GROUP("Data", "");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "image_path", PROPERTY_HINT_DIR), "set_image_path", "get_image_path");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light_data", PROPERTY_HINT_RESOURCE_TYPE, "BakedLightmapData"), "set_light_data", "get_light_data");
diff --git a/scene/3d/baked_lightmap.h b/scene/3d/baked_lightmap.h
index 0633ffa641..bc9e3f55ea 100644
--- a/scene/3d/baked_lightmap.h
+++ b/scene/3d/baked_lightmap.h
@@ -64,8 +64,8 @@ public:
void set_bounds(const AABB &p_bounds);
AABB get_bounds() const;
- void set_octree(const PoolVector<uint8_t> &p_octree);
- PoolVector<uint8_t> get_octree() const;
+ void set_octree(const Vector<uint8_t> &p_octree);
+ Vector<uint8_t> get_octree() const;
void set_cell_space_transform(const Transform &p_xform);
Transform get_cell_space_transform() const;
@@ -202,7 +202,7 @@ public:
String get_image_path() const;
AABB get_aabb() const;
- PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ Vector<Face3> get_faces(uint32_t p_usage_flags) const;
BakeError bake(Node *p_from_node, bool p_create_visual_debug = false);
BakedLightmap();
diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp
index e94e174b92..b1cd9bfe8b 100644
--- a/scene/3d/bone_attachment.cpp
+++ b/scene/3d/bone_attachment.cpp
@@ -123,5 +123,5 @@ void BoneAttachment::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bone_name", "bone_name"), &BoneAttachment::set_bone_name);
ClassDB::bind_method(D_METHOD("get_bone_name"), &BoneAttachment::get_bone_name);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bone_name"), "set_bone_name", "get_bone_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bone_name"), "set_bone_name", "get_bone_name");
}
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index ac8d50c419..741712025c 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -545,16 +545,16 @@ void Camera::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_effects", "get_effects");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking");
ADD_PROPERTY(PropertyInfo(Variant::INT, "projection", PROPERTY_HINT_ENUM, "Perspective,Orthogonal,Frustum"), "set_projection", "get_projection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "current"), "set_current", "is_current");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frustum_offset"), "set_frustum_offset", "get_frustum_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar");
BIND_ENUM_CONSTANT(PROJECTION_PERSPECTIVE);
BIND_ENUM_CONSTANT(PROJECTION_ORTHOGONAL);
@@ -926,7 +926,7 @@ void ClippedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_exceptions"), &ClippedCamera::clear_exceptions);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin");
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_process_mode", "get_process_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index cc07072962..636b859477 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -53,11 +53,11 @@ void CollisionPolygon::_build_polygon() {
for (int i = 0; i < decomp.size(); i++) {
Ref<ConvexPolygonShape> convex = memnew(ConvexPolygonShape);
- PoolVector<Vector3> cp;
+ Vector<Vector3> cp;
int cs = decomp[i].size();
cp.resize(cs * 2);
{
- PoolVector<Vector3>::Write w = cp.write();
+ Vector3 *w = cp.ptrw();
int idx = 0;
for (int j = 0; j < cs; j++) {
@@ -191,9 +191,9 @@ void CollisionPolygon::_bind_methods() {
ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CollisionPolygon::_is_editable_3d_polygon);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
}
CollisionPolygon::CollisionPolygon() {
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index bf2816fd41..d825c8daf7 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -33,9 +33,9 @@
#include "scene/resources/capsule_shape.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/convex_polygon_shape.h"
-#include "scene/resources/plane_shape.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/sphere_shape.h"
+#include "scene/resources/world_margin_shape.h"
#include "servers/visual_server.h"
//TODO: Implement CylinderShape and HeightMapShape?
#include "core/math/quick_hull.h"
@@ -123,8 +123,12 @@ String CollisionShape::get_configuration_warning() const {
return TTR("A shape must be provided for CollisionShape to function. Please create a shape resource for it.");
}
- if (shape->is_class("PlaneShape")) {
- return TTR("Plane shapes don't work well and will be removed in future versions. Please don't use them.");
+ if (Object::cast_to<RigidBody>(get_parent())) {
+ if (Object::cast_to<ConcavePolygonShape>(*shape)) {
+ if (Object::cast_to<RigidBody>(get_parent())->get_mode() != RigidBody::MODE_STATIC) {
+ return TTR("ConcavePolygonShape doesn't support RigidBody in another mode than static.");
+ }
+ }
}
return String();
@@ -141,7 +145,6 @@ void CollisionShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("make_convex_from_brothers"), &CollisionShape::make_convex_from_brothers);
ClassDB::set_method_flags("CollisionShape", "make_convex_from_brothers", METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
- ClassDB::bind_method(D_METHOD("_shape_changed"), &CollisionShape::_shape_changed);
ClassDB::bind_method(D_METHOD("_update_debug_shape"), &CollisionShape::_update_debug_shape);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"), "set_shape", "get_shape");
@@ -152,12 +155,12 @@ void CollisionShape::set_shape(const Ref<Shape> &p_shape) {
if (!shape.is_null()) {
shape->unregister_owner(this);
- shape->disconnect("changed", this, "_shape_changed");
+ shape->disconnect("changed", callable_mp(this, &CollisionShape::_shape_changed));
}
shape = p_shape;
if (!shape.is_null()) {
shape->register_owner(this);
- shape->connect("changed", this, "_shape_changed");
+ shape->connect("changed", callable_mp(this, &CollisionShape::_shape_changed));
}
update_gizmo();
if (parent) {
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp
index 6e26f7ce8f..bde578d0af 100644
--- a/scene/3d/cpu_particles.cpp
+++ b/scene/3d/cpu_particles.cpp
@@ -39,9 +39,9 @@ AABB CPUParticles::get_aabb() const {
return AABB();
}
-PoolVector<Face3> CPUParticles::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> CPUParticles::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void CPUParticles::set_emitting(bool p_emitting) {
@@ -65,7 +65,7 @@ void CPUParticles::set_amount(int p_amount) {
particles.resize(p_amount);
{
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
for (int i = 0; i < p_amount; i++) {
w[i].active = false;
@@ -244,7 +244,7 @@ void CPUParticles::restart() {
{
int pc = particles.size();
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
for (int i = 0; i < pc; i++) {
w[i].active = false;
@@ -419,17 +419,17 @@ void CPUParticles::set_emission_box_extents(Vector3 p_extents) {
emission_box_extents = p_extents;
}
-void CPUParticles::set_emission_points(const PoolVector<Vector3> &p_points) {
+void CPUParticles::set_emission_points(const Vector<Vector3> &p_points) {
emission_points = p_points;
}
-void CPUParticles::set_emission_normals(const PoolVector<Vector3> &p_normals) {
+void CPUParticles::set_emission_normals(const Vector<Vector3> &p_normals) {
emission_normals = p_normals;
}
-void CPUParticles::set_emission_colors(const PoolVector<Color> &p_colors) {
+void CPUParticles::set_emission_colors(const Vector<Color> &p_colors) {
emission_colors = p_colors;
}
@@ -442,16 +442,16 @@ Vector3 CPUParticles::get_emission_box_extents() const {
return emission_box_extents;
}
-PoolVector<Vector3> CPUParticles::get_emission_points() const {
+Vector<Vector3> CPUParticles::get_emission_points() const {
return emission_points;
}
-PoolVector<Vector3> CPUParticles::get_emission_normals() const {
+Vector<Vector3> CPUParticles::get_emission_normals() const {
return emission_normals;
}
-PoolVector<Color> CPUParticles::get_emission_colors() const {
+Vector<Color> CPUParticles::get_emission_colors() const {
return emission_colors;
}
@@ -597,9 +597,9 @@ void CPUParticles::_particles_process(float p_delta) {
p_delta *= speed_scale;
int pcount = particles.size();
- PoolVector<Particle>::Write w = particles.write();
+ Particle *w = particles.ptrw();
- Particle *parray = w.ptr();
+ Particle *parray = w;
float prev_time = time;
time += p_delta;
@@ -1017,140 +1017,125 @@ void CPUParticles::_particles_process(float p_delta) {
}
void CPUParticles::_update_particle_data_buffer() {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
+ MutexLock lock(update_mutex);
- {
+ int pc = particles.size();
- int pc = particles.size();
+ int *ow;
+ int *order = NULL;
- PoolVector<int>::Write ow;
- int *order = NULL;
+ float *w = particle_data.ptrw();
+ const Particle *r = particles.ptr();
+ float *ptr = w;
- PoolVector<float>::Write w = particle_data.write();
- PoolVector<Particle>::Read r = particles.read();
- float *ptr = w.ptr();
+ if (draw_order != DRAW_ORDER_INDEX) {
+ ow = particle_order.ptrw();
+ order = ow;
- if (draw_order != DRAW_ORDER_INDEX) {
- ow = particle_order.write();
- order = ow.ptr();
+ for (int i = 0; i < pc; i++) {
+ order[i] = i;
+ }
+ if (draw_order == DRAW_ORDER_LIFETIME) {
+ SortArray<int, SortLifetime> sorter;
+ sorter.compare.particles = r;
+ sorter.sort(order, pc);
+ } else if (draw_order == DRAW_ORDER_VIEW_DEPTH) {
+ Camera *c = get_viewport()->get_camera();
+ if (c) {
+ Vector3 dir = c->get_global_transform().basis.get_axis(2); //far away to close
+
+ if (local_coords) {
+
+ // will look different from Particles in editor as this is based on the camera in the scenetree
+ // and not the editor camera
+ dir = inv_emission_transform.xform(dir).normalized();
+ } else {
+ dir = dir.normalized();
+ }
- for (int i = 0; i < pc; i++) {
- order[i] = i;
- }
- if (draw_order == DRAW_ORDER_LIFETIME) {
- SortArray<int, SortLifetime> sorter;
- sorter.compare.particles = r.ptr();
+ SortArray<int, SortAxis> sorter;
+ sorter.compare.particles = r;
+ sorter.compare.axis = dir;
sorter.sort(order, pc);
- } else if (draw_order == DRAW_ORDER_VIEW_DEPTH) {
- Camera *c = get_viewport()->get_camera();
- if (c) {
- Vector3 dir = c->get_global_transform().basis.get_axis(2); //far away to close
-
- if (local_coords) {
-
- // will look different from Particles in editor as this is based on the camera in the scenetree
- // and not the editor camera
- dir = inv_emission_transform.xform(dir).normalized();
- } else {
- dir = dir.normalized();
- }
-
- SortArray<int, SortAxis> sorter;
- sorter.compare.particles = r.ptr();
- sorter.compare.axis = dir;
- sorter.sort(order, pc);
- }
}
}
+ }
- for (int i = 0; i < pc; i++) {
-
- int idx = order ? order[i] : i;
+ for (int i = 0; i < pc; i++) {
- Transform t = r[idx].transform;
+ int idx = order ? order[i] : i;
- if (!local_coords) {
- t = inv_emission_transform * t;
- }
+ Transform t = r[idx].transform;
- if (r[idx].active) {
- ptr[0] = t.basis.elements[0][0];
- ptr[1] = t.basis.elements[0][1];
- ptr[2] = t.basis.elements[0][2];
- ptr[3] = t.origin.x;
- ptr[4] = t.basis.elements[1][0];
- ptr[5] = t.basis.elements[1][1];
- ptr[6] = t.basis.elements[1][2];
- ptr[7] = t.origin.y;
- ptr[8] = t.basis.elements[2][0];
- ptr[9] = t.basis.elements[2][1];
- ptr[10] = t.basis.elements[2][2];
- ptr[11] = t.origin.z;
- } else {
- zeromem(ptr, sizeof(float) * 12);
- }
+ if (!local_coords) {
+ t = inv_emission_transform * t;
+ }
- Color c = r[idx].color;
+ if (r[idx].active) {
+ ptr[0] = t.basis.elements[0][0];
+ ptr[1] = t.basis.elements[0][1];
+ ptr[2] = t.basis.elements[0][2];
+ ptr[3] = t.origin.x;
+ ptr[4] = t.basis.elements[1][0];
+ ptr[5] = t.basis.elements[1][1];
+ ptr[6] = t.basis.elements[1][2];
+ ptr[7] = t.origin.y;
+ ptr[8] = t.basis.elements[2][0];
+ ptr[9] = t.basis.elements[2][1];
+ ptr[10] = t.basis.elements[2][2];
+ ptr[11] = t.origin.z;
+ } else {
+ zeromem(ptr, sizeof(float) * 12);
+ }
- ptr[12] = c.r;
- ptr[13] = c.g;
- ptr[14] = c.b;
- ptr[15] = c.a;
+ Color c = r[idx].color;
- ptr[16] = r[idx].custom[0];
- ptr[17] = r[idx].custom[1];
- ptr[18] = r[idx].custom[2];
- ptr[19] = r[idx].custom[3];
+ ptr[12] = c.r;
+ ptr[13] = c.g;
+ ptr[14] = c.b;
+ ptr[15] = c.a;
- ptr += 20;
- }
+ ptr[16] = r[idx].custom[0];
+ ptr[17] = r[idx].custom[1];
+ ptr[18] = r[idx].custom[2];
+ ptr[19] = r[idx].custom[3];
- can_update = true;
+ ptr += 20;
}
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
+ can_update = true;
}
void CPUParticles::_set_redraw(bool p_redraw) {
if (redraw == p_redraw)
return;
redraw = p_redraw;
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- if (redraw) {
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true);
- VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
- } else {
- if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) {
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
+
+ {
+ MutexLock lock(update_mutex);
+
+ if (redraw) {
+ VS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &CPUParticles::_update_render_thread));
+ VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true);
+ VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
+ } else {
+ if (VS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &CPUParticles::_update_render_thread))) {
+ VS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &CPUParticles::_update_render_thread));
+ }
+ VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false);
+ VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0);
}
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false);
- VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0);
}
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
}
void CPUParticles::_update_render_thread() {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
+ MutexLock lock(update_mutex);
+
if (can_update) {
VS::get_singleton()->multimesh_set_buffer(multimesh, particle_data);
can_update = false; //wait for next time
}
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
}
void CPUParticles::_notification(int p_what) {
@@ -1185,9 +1170,9 @@ void CPUParticles::_notification(int p_what) {
int pc = particles.size();
- PoolVector<float>::Write w = particle_data.write();
- PoolVector<Particle>::Read r = particles.read();
- float *ptr = w.ptr();
+ float *w = particle_data.ptrw();
+ const Particle *r = particles.ptr();
+ float *ptr = w;
for (int i = 0; i < pc; i++) {
@@ -1327,13 +1312,13 @@ void CPUParticles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
@@ -1397,74 +1382,72 @@ void CPUParticles::_bind_methods() {
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles::convert_from_particles);
- ClassDB::bind_method(D_METHOD("_update_render_thread"), &CPUParticles::_update_render_thread);
-
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "emission_colors"), "set_emission_colors", "get_emission_colors");
ADD_GROUP("Flags", "flag_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_align_y"), "set_particle_flag", "get_particle_flag", FLAG_ALIGN_Y_TO_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_rotate_y"), "set_particle_flag", "get_particle_flag", FLAG_ROTATE_Y);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_particle_flag", "get_particle_flag", FLAG_DISABLE_Z);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
@@ -1556,16 +1539,8 @@ CPUParticles::CPUParticles() {
can_update = false;
set_color(Color(1, 1, 1, 1));
-
-#ifndef NO_THREADS
- update_mutex = Mutex::create();
-#endif
}
CPUParticles::~CPUParticles() {
VS::get_singleton()->free(multimesh);
-
-#ifndef NO_THREADS
- memdelete(update_mutex);
-#endif
}
diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h
index d5a549b976..231e1f1ad9 100644
--- a/scene/3d/cpu_particles.h
+++ b/scene/3d/cpu_particles.h
@@ -106,9 +106,9 @@ private:
RID multimesh;
- PoolVector<Particle> particles;
- PoolVector<float> particle_data;
- PoolVector<int> particle_order;
+ Vector<Particle> particles;
+ Vector<float> particle_data;
+ Vector<int> particle_order;
struct SortLifetime {
const Particle *particles;
@@ -167,9 +167,9 @@ private:
EmissionShape emission_shape;
float emission_sphere_radius;
Vector3 emission_box_extents;
- PoolVector<Vector3> emission_points;
- PoolVector<Vector3> emission_normals;
- PoolVector<Color> emission_colors;
+ Vector<Vector3> emission_points;
+ Vector<Vector3> emission_normals;
+ Vector<Color> emission_colors;
int emission_point_count;
Vector3 gravity;
@@ -178,7 +178,7 @@ private:
void _particles_process(float p_delta);
void _update_particle_data_buffer();
- Mutex *update_mutex;
+ Mutex update_mutex;
void _update_render_thread();
@@ -191,7 +191,7 @@ protected:
public:
AABB get_aabb() const;
- PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ Vector<Face3> get_faces(uint32_t p_usage_flags) const;
void set_emitting(bool p_emitting);
void set_amount(int p_amount);
@@ -264,17 +264,17 @@ public:
void set_emission_shape(EmissionShape p_shape);
void set_emission_sphere_radius(float p_radius);
void set_emission_box_extents(Vector3 p_extents);
- void set_emission_points(const PoolVector<Vector3> &p_points);
- void set_emission_normals(const PoolVector<Vector3> &p_normals);
- void set_emission_colors(const PoolVector<Color> &p_colors);
+ void set_emission_points(const Vector<Vector3> &p_points);
+ void set_emission_normals(const Vector<Vector3> &p_normals);
+ void set_emission_colors(const Vector<Color> &p_colors);
void set_emission_point_count(int p_count);
EmissionShape get_emission_shape() const;
float get_emission_sphere_radius() const;
Vector3 get_emission_box_extents() const;
- PoolVector<Vector3> get_emission_points() const;
- PoolVector<Vector3> get_emission_normals() const;
- PoolVector<Color> get_emission_colors() const;
+ Vector<Vector3> get_emission_points() const;
+ Vector<Vector3> get_emission_normals() const;
+ Vector<Color> get_emission_colors() const;
int get_emission_point_count() const;
void set_gravity(const Vector3 &p_gravity);
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 34540525af..c3f039ae85 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -47,14 +47,14 @@ void GIProbeData::_set_data(const Dictionary &p_data) {
AABB bounds = p_data["bounds"];
Vector3 octree_size = p_data["octree_size"];
- PoolVector<uint8_t> octree_cells = p_data["octree_cells"];
- PoolVector<uint8_t> octree_data = p_data["octree_data"];
+ Vector<uint8_t> octree_cells = p_data["octree_cells"];
+ Vector<uint8_t> octree_data = p_data["octree_data"];
- PoolVector<uint8_t> octree_df;
+ Vector<uint8_t> octree_df;
if (p_data.has("octree_df")) {
octree_df = p_data["octree_df"];
} else if (p_data.has("octree_df_png")) {
- PoolVector<uint8_t> octree_df_png = p_data["octree_df_png"];
+ Vector<uint8_t> octree_df_png = p_data["octree_df_png"];
Ref<Image> img;
img.instance();
Error err = img->load_png_from_buffer(octree_df_png);
@@ -62,7 +62,7 @@ void GIProbeData::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(img->get_format() != Image::FORMAT_L8);
octree_df = img->get_data();
}
- PoolVector<int> octree_levels = p_data["level_counts"];
+ Vector<int> octree_levels = p_data["level_counts"];
Transform to_cell_xform = p_data["to_cell_xform"];
allocate(to_cell_xform, bounds, octree_size, octree_cells, octree_data, octree_df, octree_levels);
@@ -79,11 +79,11 @@ Dictionary GIProbeData::_get_data() const {
Ref<Image> img;
img.instance();
img->create(otsize.x * otsize.y, otsize.z, false, Image::FORMAT_L8, get_distance_field());
- PoolVector<uint8_t> df_png = img->save_png_to_buffer();
+ Vector<uint8_t> df_png = img->save_png_to_buffer();
ERR_FAIL_COND_V(df_png.size() == 0, Dictionary());
d["octree_df_png"] = df_png;
} else {
- d["octree_df"] = PoolVector<uint8_t>();
+ d["octree_df"] = Vector<uint8_t>();
}
d["level_counts"] = get_level_counts();
@@ -91,7 +91,7 @@ Dictionary GIProbeData::_get_data() const {
return d;
}
-void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) {
+void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
VS::get_singleton()->gi_probe_allocate(probe, p_to_cell_xform, p_aabb, p_octree_size, p_octree_cells, p_data_cells, p_distance_field, p_level_counts);
bounds = p_aabb;
to_cell_xform = p_to_cell_xform;
@@ -104,17 +104,17 @@ AABB GIProbeData::get_bounds() const {
Vector3 GIProbeData::get_octree_size() const {
return octree_size;
}
-PoolVector<uint8_t> GIProbeData::get_octree_cells() const {
+Vector<uint8_t> GIProbeData::get_octree_cells() const {
return VS::get_singleton()->gi_probe_get_octree_cells(probe);
}
-PoolVector<uint8_t> GIProbeData::get_data_cells() const {
+Vector<uint8_t> GIProbeData::get_data_cells() const {
return VS::get_singleton()->gi_probe_get_data_cells(probe);
}
-PoolVector<uint8_t> GIProbeData::get_distance_field() const {
+Vector<uint8_t> GIProbeData::get_distance_field() const {
return VS::get_singleton()->gi_probe_get_distance_field(probe);
}
-PoolVector<int> GIProbeData::get_level_counts() const {
+Vector<int> GIProbeData::get_level_counts() const {
return VS::get_singleton()->gi_probe_get_level_counts(probe);
}
Transform GIProbeData::get_to_cell_xform() const {
@@ -271,13 +271,13 @@ void GIProbeData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
ADD_PROPERTY(PropertyInfo(Variant::INT, "dynamic_range", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_dynamic_range", "get_dynamic_range");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_two_bounces"), "set_use_two_bounces", "is_using_two_bounces");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior"), "set_interior", "is_interior");
}
@@ -492,7 +492,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
bake_step_function(pmc++, RTR("Generating Distance Field"));
}
- PoolVector<uint8_t> df = baker.get_sdf_3d_image();
+ Vector<uint8_t> df = baker.get_sdf_3d_image();
probe_data->allocate(baker.get_to_cell_space_xform(), AABB(-extents, extents * 2.0), baker.get_giprobe_octree_size(), baker.get_giprobe_octree_cells(), baker.get_giprobe_data_cells(), df, baker.get_giprobe_level_cell_count());
@@ -519,9 +519,9 @@ AABB GIProbe::get_aabb() const {
return AABB(-extents, extents * 2);
}
-PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
String GIProbe::get_configuration_warning() const {
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index 60aa1d952c..354eaad7c0 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -63,13 +63,13 @@ protected:
void _validate_property(PropertyInfo &property) const;
public:
- void allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts);
+ void allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts);
AABB get_bounds() const;
Vector3 get_octree_size() const;
- PoolVector<uint8_t> get_octree_cells() const;
- PoolVector<uint8_t> get_data_cells() const;
- PoolVector<uint8_t> get_distance_field() const;
- PoolVector<int> get_level_counts() const;
+ Vector<uint8_t> get_octree_cells() const;
+ Vector<uint8_t> get_data_cells() const;
+ Vector<uint8_t> get_distance_field() const;
+ Vector<int> get_level_counts() const;
Transform get_to_cell_xform() const;
void set_dynamic_range(float p_range);
@@ -164,7 +164,7 @@ public:
void bake(Node *p_from_node = NULL, bool p_create_visual_debug = false);
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
virtual String get_configuration_warning() const;
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp
index afe60226b6..f5b08b86e1 100644
--- a/scene/3d/immediate_geometry.cpp
+++ b/scene/3d/immediate_geometry.cpp
@@ -90,9 +90,9 @@ AABB ImmediateGeometry::get_aabb() const {
return aabb;
}
-PoolVector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void ImmediateGeometry::add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv) {
diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h
index 7f506ce9ef..77a20e8d4d 100644
--- a/scene/3d/immediate_geometry.h
+++ b/scene/3d/immediate_geometry.h
@@ -64,7 +64,7 @@ public:
void add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv = true);
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
ImmediateGeometry();
~ImmediateGeometry();
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index baf5ac4be6..592d592a38 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -144,7 +144,7 @@ void InterpolatedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_interpolation_enabled"), &InterpolatedCamera::is_interpolation_enabled);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target"), "set_target_path", "get_target_path");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed"), "set_speed", "get_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed"), "set_speed", "get_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_interpolation_enabled", "is_interpolation_enabled");
}
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 8d3b9bbaf0..7c922ce1cd 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -152,9 +152,9 @@ AABB Light::get_aabb() const {
return AABB();
}
-PoolVector<Face3> Light::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> Light::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void Light::set_bake_mode(BakeMode p_mode) {
@@ -253,17 +253,17 @@ void Light::_bind_methods() {
ADD_GROUP("Light", "light_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "light_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_color", "get_color");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_negative"), "set_negative", "is_negative");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR);
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_bake_mode", PROPERTY_HINT_ENUM, "Disable,Indirect,All"), "set_bake_mode", "get_bake_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
ADD_GROUP("Shadow", "shadow_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow", "has_shadow");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_shadow_color", "get_shadow_color");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_reverse_cull_face"), "set_shadow_reverse_cull_face", "get_shadow_reverse_cull_face");
ADD_GROUP("Editor", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
@@ -393,15 +393,15 @@ void DirectionalLight::_bind_methods() {
ADD_GROUP("Directional Shadow", "directional_shadow_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_mode", PROPERTY_HINT_ENUM, "Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), "set_shadow_mode", "get_shadow_mode");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_depth_range", PROPERTY_HINT_ENUM, "Stable,Optimized"), "set_shadow_depth_range", "get_shadow_depth_range");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL);
BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
@@ -442,8 +442,8 @@ void OmniLight::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_shadow_mode"), &OmniLight::get_shadow_mode);
ADD_GROUP("Omni", "omni_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
ADD_PROPERTY(PropertyInfo(Variant::INT, "omni_shadow_mode", PROPERTY_HINT_ENUM, "Dual Paraboloid,Cube"), "set_shadow_mode", "get_shadow_mode");
BIND_ENUM_CONSTANT(SHADOW_DUAL_PARABOLOID);
@@ -473,8 +473,8 @@ String SpotLight::get_configuration_warning() const {
void SpotLight::_bind_methods() {
ADD_GROUP("Spot", "spot_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION);
}
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 7287518ae9..16e0c47083 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -124,7 +124,7 @@ public:
BakeMode get_bake_mode() const;
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
Light();
~Light();
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index 6d0216d99c..4ca139ebbc 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -34,7 +34,6 @@
#include "core/core_string_names.h"
#include "physics_body.h"
#include "scene/resources/material.h"
-#include "scene/scene_string_names.h"
#include "skeleton.h"
bool MeshInstance::_set(const StringName &p_name, const Variant &p_value) {
@@ -96,12 +95,12 @@ void MeshInstance::_get_property_list(List<PropertyInfo> *p_list) const {
ls.sort();
for (List<String>::Element *E = ls.front(); E; E = E->next()) {
- p_list->push_back(PropertyInfo(Variant::REAL, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
}
if (mesh.is_valid()) {
for (int i = 0; i < mesh->get_surface_count(); i++) {
- p_list->push_back(PropertyInfo(Variant::OBJECT, "material/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "material/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE));
}
}
}
@@ -112,7 +111,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) {
return;
if (mesh.is_valid()) {
- mesh->disconnect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed);
+ mesh->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance::_mesh_changed));
materials.clear();
}
@@ -129,7 +128,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) {
blend_shape_tracks["blend_shapes/" + String(mesh->get_blend_shape_name(i))] = mt;
}
- mesh->connect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed);
+ mesh->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance::_mesh_changed));
materials.resize(mesh->get_surface_count());
set_base(mesh->get_rid());
@@ -204,13 +203,13 @@ AABB MeshInstance::get_aabb() const {
return AABB();
}
-PoolVector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const {
if (!(p_usage_flags & (FACES_SOLID | FACES_ENCLOSING)))
- return PoolVector<Face3>();
+ return Vector<Face3>();
if (mesh.is_null())
- return PoolVector<Face3>();
+ return Vector<Face3>();
return mesh->get_faces();
}
@@ -403,7 +402,6 @@ void MeshInstance::_bind_methods() {
ClassDB::set_method_flags("MeshInstance", "create_trimesh_collision", METHOD_FLAGS_DEFAULT);
ClassDB::bind_method(D_METHOD("create_convex_collision"), &MeshInstance::create_convex_collision);
ClassDB::set_method_flags("MeshInstance", "create_convex_collision", METHOD_FLAGS_DEFAULT);
- ClassDB::bind_method(D_METHOD("_mesh_changed"), &MeshInstance::_mesh_changed);
ClassDB::bind_method(D_METHOD("create_debug_tangents"), &MeshInstance::create_debug_tangents);
ClassDB::set_method_flags("MeshInstance", "create_debug_tangents", METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h
index fd5f60a5d7..d49d9ed98f 100644
--- a/scene/3d/mesh_instance.h
+++ b/scene/3d/mesh_instance.h
@@ -94,7 +94,7 @@ public:
void create_debug_tangents();
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
MeshInstance();
~MeshInstance();
diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp
index 245dbdaf58..075eb0a1ec 100644
--- a/scene/3d/multimesh_instance.cpp
+++ b/scene/3d/multimesh_instance.cpp
@@ -51,9 +51,9 @@ Ref<MultiMesh> MultiMeshInstance::get_multimesh() const {
return multimesh;
}
-PoolVector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
AABB MultiMeshInstance::get_aabb() const {
diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h
index 855bd54910..2b59c3b96c 100644
--- a/scene/3d/multimesh_instance.h
+++ b/scene/3d/multimesh_instance.h
@@ -44,7 +44,7 @@ protected:
// bind helpers
public:
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
void set_multimesh(const Ref<MultiMesh> &p_multimesh);
Ref<MultiMesh> get_multimesh() const;
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index 10b12f5c75..8c543bc97f 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -32,11 +32,27 @@
#include "servers/navigation_server.h"
-Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize) {
+Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize) const {
return NavigationServer::get_singleton()->map_get_path(map, p_start, p_end, p_optimize);
}
+Vector3 Navigation::get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, bool p_use_collision) const {
+ return NavigationServer::get_singleton()->map_get_closest_point_to_segment(map, p_from, p_to, p_use_collision);
+}
+
+Vector3 Navigation::get_closest_point(const Vector3 &p_point) const {
+ return NavigationServer::get_singleton()->map_get_closest_point(map, p_point);
+}
+
+Vector3 Navigation::get_closest_point_normal(const Vector3 &p_point) const {
+ return NavigationServer::get_singleton()->map_get_closest_point_normal(map, p_point);
+}
+
+RID Navigation::get_closest_point_owner(const Vector3 &p_point) const {
+ return NavigationServer::get_singleton()->map_get_closest_point_owner(map, p_point);
+}
+
void Navigation::set_up_vector(const Vector3 &p_up) {
up = p_up;
@@ -63,6 +79,10 @@ void Navigation::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rid"), &Navigation::get_rid);
ClassDB::bind_method(D_METHOD("get_simple_path", "start", "end", "optimize"), &Navigation::get_simple_path, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "start", "end", "use_collision"), &Navigation::get_closest_point_to_segment, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_closest_point", "to_point"), &Navigation::get_closest_point);
+ ClassDB::bind_method(D_METHOD("get_closest_point_normal", "to_point"), &Navigation::get_closest_point_normal);
+ ClassDB::bind_method(D_METHOD("get_closest_point_owner", "to_point"), &Navigation::get_closest_point_owner);
ClassDB::bind_method(D_METHOD("set_up_vector", "up"), &Navigation::set_up_vector);
ClassDB::bind_method(D_METHOD("get_up_vector"), &Navigation::get_up_vector);
@@ -74,8 +94,8 @@ void Navigation::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation::get_edge_connection_margin);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "up_vector"), "set_up_vector", "get_up_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
}
void Navigation::_notification(int p_what) {
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index 68e041ad73..08f306611f 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -31,7 +31,7 @@
#ifndef NAVIGATION_H
#define NAVIGATION_H
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include "scene/3d/spatial.h"
class Navigation : public Spatial {
@@ -66,7 +66,11 @@ public:
return edge_connection_margin;
}
- Vector<Vector3> get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize = true);
+ Vector<Vector3> get_simple_path(const Vector3 &p_start, const Vector3 &p_end, bool p_optimize = true) const;
+ Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, bool p_use_collision = false) const;
+ Vector3 get_closest_point(const Vector3 &p_point) const;
+ Vector3 get_closest_point_normal(const Vector3 &p_point) const;
+ RID get_closest_point_owner(const Vector3 &p_point) const;
Navigation();
~Navigation();
diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp
index 29cdd6f204..728fc947e9 100644
--- a/scene/3d/navigation_agent.cpp
+++ b/scene/3d/navigation_agent.cpp
@@ -80,14 +80,14 @@ void NavigationAgent::_bind_methods() {
ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent::_avoidance_done);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_y"), "set_ignore_y", "get_ignore_y");
ADD_SIGNAL(MethodInfo("path_changed"));
diff --git a/scene/3d/navigation_mesh_instance.cpp b/scene/3d/navigation_region.cpp
index 8f8574ba2d..d96d095797 100644
--- a/scene/3d/navigation_mesh_instance.cpp
+++ b/scene/3d/navigation_region.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation_mesh_instance.cpp */
+/* navigation_region.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "navigation_mesh_instance.h"
+#include "navigation_region.h"
#include "core/os/thread.h"
#include "mesh_instance.h"
#include "navigation.h"
#include "servers/navigation_server.h"
-void NavigationMeshInstance::set_enabled(bool p_enabled) {
+void NavigationRegion::set_enabled(bool p_enabled) {
if (enabled == p_enabled)
return;
@@ -66,14 +66,14 @@ void NavigationMeshInstance::set_enabled(bool p_enabled) {
update_gizmo();
}
-bool NavigationMeshInstance::is_enabled() const {
+bool NavigationRegion::is_enabled() const {
return enabled;
}
/////////////////////////////
-void NavigationMeshInstance::_notification(int p_what) {
+void NavigationRegion::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -129,7 +129,7 @@ void NavigationMeshInstance::_notification(int p_what) {
}
}
-void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh> &p_navmesh) {
+void NavigationRegion::set_navigation_mesh(const Ref<NavigationMesh> &p_navmesh) {
if (p_navmesh == navmesh)
return;
@@ -156,13 +156,13 @@ void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh> &p_na
update_configuration_warning();
}
-Ref<NavigationMesh> NavigationMeshInstance::get_navigation_mesh() const {
+Ref<NavigationMesh> NavigationRegion::get_navigation_mesh() const {
return navmesh;
}
struct BakeThreadsArgs {
- NavigationMeshInstance *nav_mesh_instance;
+ NavigationRegion *nav_mesh_instance;
};
void _bake_navigation_mesh(void *p_user_data) {
@@ -182,7 +182,7 @@ void _bake_navigation_mesh(void *p_user_data) {
}
}
-void NavigationMeshInstance::bake_navigation_mesh() {
+void NavigationRegion::bake_navigation_mesh() {
ERR_FAIL_COND(bake_thread != NULL);
BakeThreadsArgs *args = memnew(BakeThreadsArgs);
@@ -192,12 +192,12 @@ void NavigationMeshInstance::bake_navigation_mesh() {
ERR_FAIL_COND(bake_thread == NULL);
}
-void NavigationMeshInstance::_bake_finished(Ref<NavigationMesh> p_nav_mesh) {
+void NavigationRegion::_bake_finished(Ref<NavigationMesh> p_nav_mesh) {
set_navigation_mesh(p_nav_mesh);
bake_thread = NULL;
}
-String NavigationMeshInstance::get_configuration_warning() const {
+String NavigationRegion::get_configuration_warning() const {
if (!is_visible_in_tree() || !is_inside_tree())
return String();
@@ -214,19 +214,19 @@ String NavigationMeshInstance::get_configuration_warning() const {
c = Object::cast_to<Spatial>(c->get_parent());
}
- return TTR("NavigationMeshInstance must be a child or grandchild to a Navigation node. It only provides navigation data.");
+ return TTR("NavigationRegion must be a child or grandchild to a Navigation node. It only provides navigation data.");
}
-void NavigationMeshInstance::_bind_methods() {
+void NavigationRegion::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_navigation_mesh", "navmesh"), &NavigationMeshInstance::set_navigation_mesh);
- ClassDB::bind_method(D_METHOD("get_navigation_mesh"), &NavigationMeshInstance::get_navigation_mesh);
+ ClassDB::bind_method(D_METHOD("set_navigation_mesh", "navmesh"), &NavigationRegion::set_navigation_mesh);
+ ClassDB::bind_method(D_METHOD("get_navigation_mesh"), &NavigationRegion::get_navigation_mesh);
- ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &NavigationMeshInstance::set_enabled);
- ClassDB::bind_method(D_METHOD("is_enabled"), &NavigationMeshInstance::is_enabled);
+ ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &NavigationRegion::set_enabled);
+ ClassDB::bind_method(D_METHOD("is_enabled"), &NavigationRegion::is_enabled);
- ClassDB::bind_method(D_METHOD("bake_navigation_mesh"), &NavigationMeshInstance::bake_navigation_mesh);
- ClassDB::bind_method(D_METHOD("_bake_finished", "nav_mesh"), &NavigationMeshInstance::_bake_finished);
+ ClassDB::bind_method(D_METHOD("bake_navigation_mesh"), &NavigationRegion::bake_navigation_mesh);
+ ClassDB::bind_method(D_METHOD("_bake_finished", "nav_mesh"), &NavigationRegion::_bake_finished);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "navmesh", PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh"), "set_navigation_mesh", "get_navigation_mesh");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled");
@@ -235,12 +235,12 @@ void NavigationMeshInstance::_bind_methods() {
ADD_SIGNAL(MethodInfo("bake_finished"));
}
-void NavigationMeshInstance::_changed_callback(Object *p_changed, const char *p_prop) {
+void NavigationRegion::_changed_callback(Object *p_changed, const char *p_prop) {
update_gizmo();
update_configuration_warning();
}
-NavigationMeshInstance::NavigationMeshInstance() {
+NavigationRegion::NavigationRegion() {
enabled = true;
set_notify_transform(true);
@@ -251,7 +251,7 @@ NavigationMeshInstance::NavigationMeshInstance() {
bake_thread = NULL;
}
-NavigationMeshInstance::~NavigationMeshInstance() {
+NavigationRegion::~NavigationRegion() {
if (navmesh.is_valid())
navmesh->remove_change_receptor(this);
NavigationServer::get_singleton()->free(region);
diff --git a/scene/3d/navigation_mesh_instance.h b/scene/3d/navigation_region.h
index 1135bf47d2..f215e92c97 100644
--- a/scene/3d/navigation_mesh_instance.h
+++ b/scene/3d/navigation_region.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation_mesh_instance.h */
+/* navigation_region.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef NAVIGATION_MESH_INSTANCE_H
-#define NAVIGATION_MESH_INSTANCE_H
+#ifndef NAVIGATION_REGION_H
+#define NAVIGATION_REGION_H
#include "scene/3d/spatial.h"
#include "scene/resources/mesh.h"
@@ -37,9 +37,9 @@
class Navigation;
-class NavigationMeshInstance : public Spatial {
+class NavigationRegion : public Spatial {
- GDCLASS(NavigationMeshInstance, Spatial);
+ GDCLASS(NavigationRegion, Spatial);
bool enabled;
RID region;
@@ -68,8 +68,8 @@ public:
String get_configuration_warning() const;
- NavigationMeshInstance();
- ~NavigationMeshInstance();
+ NavigationRegion();
+ ~NavigationRegion();
};
-#endif // NAVIGATION_MESH_INSTANCE_H
+#endif // NAVIGATION_REGION_H
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 9fe626474e..e502b0c037 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -39,9 +39,9 @@ AABB Particles::get_aabb() const {
return AABB();
}
-PoolVector<Face3> Particles::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> Particles::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void Particles::set_emitting(bool p_emitting) {
@@ -386,12 +386,12 @@ void Particles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
diff --git a/scene/3d/particles.h b/scene/3d/particles.h
index 69be7da29a..95c6de15ec 100644
--- a/scene/3d/particles.h
+++ b/scene/3d/particles.h
@@ -78,7 +78,7 @@ protected:
public:
AABB get_aabb() const;
- PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ Vector<Face3> get_faces(uint32_t p_usage_flags) const;
void set_emitting(bool p_emitting);
void set_amount(int p_amount);
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index ac012de1ab..f93485d79f 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -59,13 +59,13 @@ void Path::_curve_changed() {
void Path::set_curve(const Ref<Curve3D> &p_curve) {
if (curve.is_valid()) {
- curve->disconnect("changed", this, "_curve_changed");
+ curve->disconnect("changed", callable_mp(this, &Path::_curve_changed));
}
curve = p_curve;
if (curve.is_valid()) {
- curve->connect("changed", this, "_curve_changed");
+ curve->connect("changed", callable_mp(this, &Path::_curve_changed));
}
_curve_changed();
}
@@ -79,7 +79,6 @@ void Path::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_curve", "curve"), &Path::set_curve);
ClassDB::bind_method(D_METHOD("get_curve"), &Path::get_curve);
- ClassDB::bind_method(D_METHOD("_curve_changed"), &Path::_curve_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve3D"), "set_curve", "get_curve");
@@ -297,10 +296,10 @@ void PathFollow::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow::set_loop);
ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow::has_loop);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ,Oriented"), "set_rotation_mode", "get_rotation_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 9848125d0f..2f8dc31cb6 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -180,14 +180,15 @@ PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) :
void StaticBody::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody::_reload_physics_characteristics));
+ }
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &StaticBody::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
@@ -227,8 +228,6 @@ void StaticBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody::set_physics_material_override);
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &StaticBody::_reload_physics_characteristics);
-
ClassDB::bind_method(D_METHOD("get_collision_exceptions"), &PhysicsBody::get_collision_exceptions);
ClassDB::bind_method(D_METHOD("add_collision_exception_with", "body"), &PhysicsBody::add_collision_exception_with);
ClassDB::bind_method(D_METHOD("remove_collision_exception_with", "body"), &PhysicsBody::remove_collision_exception_with);
@@ -322,8 +321,8 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
//E->get().rc=0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody::_body_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -349,8 +348,8 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
if (E->get().shapes.empty()) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody::_body_exit_tree));
if (in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
@@ -519,6 +518,7 @@ void RigidBody::set_mode(Mode p_mode) {
PhysicsServer::get_singleton()->body_set_mode(get_rid(), PhysicsServer::BODY_MODE_KINEMATIC);
} break;
}
+ update_configuration_warning();
}
RigidBody::Mode RigidBody::get_mode() const {
@@ -550,14 +550,15 @@ real_t RigidBody::get_weight() const {
void RigidBody::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody::_reload_physics_characteristics));
+ }
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
@@ -737,9 +738,8 @@ void RigidBody::set_contact_monitor(bool p_enabled) {
Node *node = Object::cast_to<Node>(obj);
if (node) {
-
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody::_body_exit_tree));
}
}
@@ -814,8 +814,6 @@ void RigidBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidBody::set_physics_material_override);
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidBody::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &RigidBody::_reload_physics_characteristics);
-
ClassDB::bind_method(D_METHOD("set_linear_velocity", "linear_velocity"), &RigidBody::set_linear_velocity);
ClassDB::bind_method(D_METHOD("get_linear_velocity"), &RigidBody::get_linear_velocity);
@@ -860,8 +858,6 @@ void RigidBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_able_to_sleep"), &RigidBody::is_able_to_sleep);
ClassDB::bind_method(D_METHOD("_direct_state_changed"), &RigidBody::_direct_state_changed);
- ClassDB::bind_method(D_METHOD("_body_enter_tree"), &RigidBody::_body_enter_tree);
- ClassDB::bind_method(D_METHOD("_body_exit_tree"), &RigidBody::_body_exit_tree);
ClassDB::bind_method(D_METHOD("set_axis_lock", "axis", "lock"), &RigidBody::set_axis_lock);
ClassDB::bind_method(D_METHOD("get_axis_lock", "axis"), &RigidBody::get_axis_lock);
@@ -871,10 +867,10 @@ void RigidBody::_bind_methods() {
BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "continuous_cd"), "set_use_continuous_collision_detection", "is_using_continuous_collision_detection");
ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported");
@@ -890,10 +886,10 @@ void RigidBody::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "axis_lock_angular_z"), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_ANGULAR_Z);
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
ADD_GROUP("Angular", "angular_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
@@ -1297,7 +1293,7 @@ void KinematicBody::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_y", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Y);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_z", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Z);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
}
void KinematicBody::_direct_state_changed(Object *p_state) {
@@ -1514,9 +1510,9 @@ bool PhysicalBone::PinJointData::_get(const StringName &p_name, Variant &r_ret)
void PhysicalBone::PinJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"));
}
bool PhysicalBone::ConeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1581,11 +1577,11 @@ bool PhysicalBone::ConeJointData::_get(const StringName &p_name, Variant &r_ret)
void PhysicalBone::ConeJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
}
bool PhysicalBone::HingeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1658,11 +1654,11 @@ void PhysicalBone::HingeJointData::_get_property_list(List<PropertyInfo> *p_list
JointData::_get_property_list(p_list);
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/angular_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
}
bool PhysicalBone::SliderJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1762,17 +1758,17 @@ bool PhysicalBone::SliderJointData::_get(const StringName &p_name, Variant &r_re
void PhysicalBone::SliderJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_upper"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_lower"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_upper"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_lower"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
}
bool PhysicalBone::SixDOFJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1986,26 +1982,26 @@ void PhysicalBone::SixDOFJointData::_get_property_list(List<PropertyInfo> *p_lis
const StringName axis_names[] = { "x", "y", "z" };
for (int i = 0; i < 3; ++i) {
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_upper"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_lower"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_upper"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_lower"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_spring_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_damping"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_damping"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/erp"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/erp"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_spring_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_damping"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_damping"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point"));
}
}
@@ -2054,10 +2050,10 @@ void PhysicalBone::_get_property_list(List<PropertyInfo> *p_list) const {
names += parent->get_bone_name(i);
}
- p_list->push_back(PropertyInfo(Variant::STRING, "bone_name", PROPERTY_HINT_ENUM, names));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name", PROPERTY_HINT_ENUM, names));
} else {
- p_list->push_back(PropertyInfo(Variant::STRING, "bone_name"));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name"));
}
if (joint_data) {
@@ -2169,11 +2165,11 @@ void PhysicalBone::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "body_offset"), "set_body_offset", "get_body_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale");
BIND_ENUM_CONSTANT(JOINT_TYPE_NONE);
BIND_ENUM_CONSTANT(JOINT_TYPE_PIN);
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index eacc6bcc0f..0699e366e0 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -172,9 +172,9 @@ void PinJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &PinJoint::set_param);
ClassDB::bind_method(D_METHOD("get_param", "param"), &PinJoint::get_param);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
BIND_ENUM_CONSTANT(PARAM_BIAS);
BIND_ENUM_CONSTANT(PARAM_DAMPING);
@@ -257,18 +257,18 @@ void HingeJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_lower_limit", "lower_limit"), &HingeJoint::_set_lower_limit);
ClassDB::bind_method(D_METHOD("_get_lower_limit"), &HingeJoint::_get_lower_limit);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit/enable"), "set_flag", "get_flag", FLAG_USE_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "motor/enable"), "set_flag", "get_flag", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
BIND_ENUM_CONSTANT(PARAM_BIAS);
BIND_ENUM_CONSTANT(PARAM_LIMIT_UPPER);
@@ -392,29 +392,29 @@ void SliderJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_lower_limit_angular", "lower_limit_angular"), &SliderJoint::_set_lower_limit_angular);
ClassDB::bind_method(D_METHOD("_get_lower_limit_angular"), &SliderJoint::_get_lower_limit_angular);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING);
-
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING);
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
@@ -541,12 +541,12 @@ void ConeTwistJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_twist_span", "twist_span"), &ConeTwistJoint::_set_twist_span);
ClassDB::bind_method(D_METHOD("_get_twist_span"), &ConeTwistJoint::_get_twist_span);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
BIND_ENUM_CONSTANT(PARAM_SWING_SPAN);
BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN);
@@ -711,92 +711,92 @@ void Generic6DOFJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_precision"), &Generic6DOFJoint::get_precision);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_x", "_get_angular_hi_limit_x");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_x", "_get_angular_hi_limit_x");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/lower_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_y", "_get_angular_hi_limit_y");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_y", "_get_angular_lo_limit_y");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_y", "_get_angular_hi_limit_y");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_y", "_get_angular_lo_limit_y");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/lower_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_z", "_get_angular_hi_limit_z");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_z", "_get_angular_hi_limit_z");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTY(PropertyInfo(Variant::INT, "precision", PROPERTY_HINT_RANGE, "1,99999,1"), "set_precision", "get_precision");
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 2a5a84741f..3cf8e43ec2 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -186,9 +186,9 @@ AABB ReflectionProbe::get_aabb() const {
aabb.size = origin_offset + extents;
return aabb;
}
-PoolVector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
void ReflectionProbe::_validate_property(PropertyInfo &property) const {
@@ -239,8 +239,8 @@ void ReflectionProbe::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_update_mode"), &ReflectionProbe::get_update_mode);
ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "Once,Always"), "set_update_mode", "get_update_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "origin_offset"), "set_origin_offset", "get_origin_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "box_projection"), "set_enable_box_projection", "is_box_projection_enabled");
@@ -250,8 +250,8 @@ void ReflectionProbe::_bind_methods() {
ADD_GROUP("Interior", "interior_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior_enable"), "set_as_interior", "is_set_as_interior");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "interior_ambient_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_interior_ambient", "get_interior_ambient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution");
BIND_ENUM_CONSTANT(UPDATE_ONCE);
BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index 28ca680e9f..57c1b0a320 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -103,7 +103,7 @@ public:
UpdateMode get_update_mode() const;
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
ReflectionProbe();
~ReflectionProbe();
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index aa5c439f8a..b2252bcb04 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -30,9 +30,8 @@
#include "skeleton.h"
-#include "core/message_queue.h"
-
#include "core/engine.h"
+#include "core/message_queue.h"
#include "core/project_settings.h"
#include "scene/3d/physics_body.h"
#include "scene/resources/surface_tool.h"
@@ -41,6 +40,7 @@ void SkinReference::_skin_changed() {
if (skeleton_node) {
skeleton_node->_make_dirty();
}
+ skeleton_version = 0;
}
void SkinReference::_bind_methods() {
@@ -322,10 +322,49 @@ void Skeleton::_notification(int p_what) {
if (E->get()->bind_count != bind_count) {
VS::get_singleton()->skeleton_allocate(skeleton, bind_count);
E->get()->bind_count = bind_count;
+ E->get()->skin_bone_indices.resize(bind_count);
+ E->get()->skin_bone_indices_ptrs = E->get()->skin_bone_indices.ptrw();
+ }
+
+ if (E->get()->skeleton_version != version) {
+
+ for (uint32_t i = 0; i < bind_count; i++) {
+ StringName bind_name = skin->get_bind_name(i);
+
+ if (bind_name != StringName()) {
+ //bind name used, use this
+ bool found = false;
+ for (int j = 0; j < len; j++) {
+ if (bonesptr[j].name == bind_name) {
+ E->get()->skin_bone_indices_ptrs[i] = j;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ ERR_PRINT("Skin bind #" + itos(i) + " contains named bind '" + String(bind_name) + "' but Skeleton has no bone by that name.");
+ E->get()->skin_bone_indices_ptrs[i] = 0;
+ }
+ } else if (skin->get_bind_bone(i) >= 0) {
+ int bind_index = skin->get_bind_bone(i);
+ if (bind_index >= len) {
+ ERR_PRINT("Skin bind #" + itos(i) + " contains bone index bind: " + itos(bind_index) + " , which is greater than the skeleton bone count: " + itos(len) + ".");
+ E->get()->skin_bone_indices_ptrs[i] = 0;
+ } else {
+ E->get()->skin_bone_indices_ptrs[i] = bind_index;
+ }
+ } else {
+ ERR_PRINT("Skin bind #" + itos(i) + " does not contain a name nor a bone index.");
+ E->get()->skin_bone_indices_ptrs[i] = 0;
+ }
+ }
+
+ E->get()->skeleton_version = version;
}
for (uint32_t i = 0; i < bind_count; i++) {
- uint32_t bone_index = skin->get_bind_bone(i);
+ uint32_t bone_index = E->get()->skin_bone_indices_ptrs[i];
ERR_CONTINUE(bone_index >= (uint32_t)len);
vs->skeleton_bone_set_transform(skeleton, i, bonesptr[bone_index].pose_global * skin->get_bind_pose(i));
}
@@ -388,6 +427,7 @@ void Skeleton::add_bone(const String &p_name) {
b.name = p_name;
bones.push_back(b);
process_order_dirty = true;
+ version++;
_make_dirty();
update_gizmo();
}
@@ -539,7 +579,7 @@ void Skeleton::clear_bones() {
bones.clear();
process_order_dirty = true;
-
+ version++;
_make_dirty();
}
@@ -733,7 +773,8 @@ void Skeleton::physical_bones_start_simulation_on(const Array &p_bones) {
sim_bones.resize(p_bones.size());
int c = 0;
for (int i = sim_bones.size() - 1; 0 <= i; --i) {
- if (Variant::STRING == p_bones.get(i).get_type()) {
+ Variant::Type type = p_bones.get(i).get_type();
+ if (Variant::STRING == type || Variant::STRING_NAME == type) {
int bone_id = find_bone(p_bones.get(i));
if (bone_id != -1)
sim_bones.write[c++] = bone_id;
@@ -829,7 +870,7 @@ Ref<SkinReference> Skeleton::register_skin(const Ref<Skin> &p_skin) {
skin_bindings.insert(skin_ref.operator->());
- skin->connect("changed", skin_ref.operator->(), "_skin_changed");
+ skin->connect_compat("changed", skin_ref.operator->(), "_skin_changed");
_make_dirty(); //skin needs to be updated, so update skeleton
@@ -894,6 +935,7 @@ Skeleton::Skeleton() {
animate_physical_bones = true;
dirty = false;
+ version = 1;
process_order_dirty = true;
}
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index b42c2112e3..76fd96f30a 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -51,6 +51,9 @@ class SkinReference : public Reference {
RID skeleton;
Ref<Skin> skin;
uint32_t bind_count = 0;
+ uint64_t skeleton_version = 0;
+ Vector<uint32_t> skin_bone_indices;
+ uint32_t *skin_bone_indices_ptrs;
void _skin_changed();
protected:
@@ -123,6 +126,8 @@ private:
void _make_dirty();
bool dirty;
+ uint64_t version;
+
// bind helpers
Array _get_bound_child_nodes_to_bone(int p_bone) const {
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index 931e786455..3859a278ef 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -73,11 +73,11 @@ void SoftBodyVisualServerHandler::clear() {
}
void SoftBodyVisualServerHandler::open() {
- write_buffer = buffer.write();
+ write_buffer = buffer.ptrw();
}
void SoftBodyVisualServerHandler::close() {
- write_buffer.release();
+ //write_buffer.release();
}
void SoftBodyVisualServerHandler::commit_changes() {
@@ -149,7 +149,7 @@ bool SoftBody::_get(const StringName &p_name, Variant &r_ret) const {
if ("pinned_points" == which) {
Array arr_ret;
const int pinned_points_indices_size = pinned_points.size();
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
+ const PinnedPoint *r = pinned_points.ptr();
arr_ret.resize(pinned_points_indices_size);
for (int i = 0; i < pinned_points_indices_size; ++i) {
@@ -174,7 +174,7 @@ void SoftBody::_get_property_list(List<PropertyInfo> *p_list) const {
const int pinned_points_indices_size = pinned_points.size();
- p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "pinned_points"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "pinned_points"));
for (int i = 0; i < pinned_points_indices_size; ++i) {
p_list->push_back(PropertyInfo(Variant::INT, "attachments/" + itos(i) + "/point_index"));
@@ -188,7 +188,7 @@ bool SoftBody::_set_property_pinned_points_indices(const Array &p_indices) {
const int p_indices_size = p_indices.size();
{ // Remove the pined points on physics server that will be removed by resize
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
+ const PinnedPoint *r = pinned_points.ptr();
if (p_indices_size < pinned_points.size()) {
for (int i = pinned_points.size() - 1; i >= p_indices_size; --i) {
pin_point(r[i].point_index, false);
@@ -198,7 +198,7 @@ bool SoftBody::_set_property_pinned_points_indices(const Array &p_indices) {
pinned_points.resize(p_indices_size);
- PoolVector<PinnedPoint>::Write w = pinned_points.write();
+ PinnedPoint *w = pinned_points.ptrw();
int point_index;
for (int i = 0; i < p_indices_size; ++i) {
point_index = p_indices.get(i);
@@ -218,11 +218,11 @@ bool SoftBody::_set_property_pinned_points_attachment(int p_item, const String &
}
if ("spatial_attachment_path" == p_what) {
- PoolVector<PinnedPoint>::Write w = pinned_points.write();
+ PinnedPoint *w = pinned_points.ptrw();
pin_point(w[p_item].point_index, true, p_value);
_make_cache_dirty();
} else if ("offset" == p_what) {
- PoolVector<PinnedPoint>::Write w = pinned_points.write();
+ PinnedPoint *w = pinned_points.ptrw();
w[p_item].offset = p_value;
} else {
return false;
@@ -235,7 +235,7 @@ bool SoftBody::_get_property_pinned_points(int p_item, const String &p_what, Var
if (pinned_points.size() <= p_item) {
return false;
}
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
+ const PinnedPoint *r = pinned_points.ptr();
if ("point_index" == p_what) {
r_ret = r[p_item].point_index;
@@ -319,8 +319,6 @@ void SoftBody::_notification(int p_what) {
void SoftBody::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_draw_soft_mesh"), &SoftBody::_draw_soft_mesh);
-
ClassDB::bind_method(D_METHOD("set_collision_mask", "collision_mask"), &SoftBody::set_collision_mask);
ClassDB::bind_method(D_METHOD("get_collision_mask"), &SoftBody::get_collision_mask);
@@ -376,14 +374,14 @@ void SoftBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "parent_collision_ignore", PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE, "Parent collision object"), "set_parent_collision_ignore", "get_parent_collision_ignore");
ADD_PROPERTY(PropertyInfo(Variant::INT, "simulation_precision", PROPERTY_HINT_RANGE, "1,100,1"), "set_simulation_precision", "get_simulation_precision");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ray_pickable"), "set_ray_pickable", "is_ray_pickable");
}
@@ -417,7 +415,7 @@ void SoftBody::_update_physics_server() {
_update_cache_pin_points_datas();
// Submit bone attachment
const int pinned_points_indices_size = pinned_points.size();
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
+ const PinnedPoint *r = pinned_points.ptr();
for (int i = 0; i < pinned_points_indices_size; ++i) {
if (r[i].spatial_attachment) {
PhysicsServer::get_singleton()->soft_body_move_point(physics_rid, r[i].point_index, r[i].spatial_attachment->get_global_transform().xform(r[i].offset));
@@ -464,12 +462,12 @@ void SoftBody::prepare_physics_server() {
become_mesh_owner();
PhysicsServer::get_singleton()->soft_body_set_mesh(physics_rid, get_mesh());
- VS::get_singleton()->connect("frame_pre_draw", this, "_draw_soft_mesh");
+ VS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &SoftBody::_draw_soft_mesh));
} else {
PhysicsServer::get_singleton()->soft_body_set_mesh(physics_rid, NULL);
- if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_draw_soft_mesh")) {
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_draw_soft_mesh");
+ if (VS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &SoftBody::_draw_soft_mesh))) {
+ VS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &SoftBody::_draw_soft_mesh));
}
}
}
@@ -559,15 +557,14 @@ const NodePath &SoftBody::get_parent_collision_ignore() const {
return parent_collision_ignore;
}
-void SoftBody::set_pinned_points_indices(PoolVector<SoftBody::PinnedPoint> p_pinned_points_indices) {
+void SoftBody::set_pinned_points_indices(Vector<SoftBody::PinnedPoint> p_pinned_points_indices) {
pinned_points = p_pinned_points_indices;
- PoolVector<PinnedPoint>::Read w = pinned_points.read();
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
pin_point(p_pinned_points_indices[i].point_index, true);
}
}
-PoolVector<SoftBody::PinnedPoint> SoftBody::get_pinned_points_indices() {
+Vector<SoftBody::PinnedPoint> SoftBody::get_pinned_points_indices() {
return pinned_points;
}
@@ -721,7 +718,7 @@ SoftBody::~SoftBody() {
void SoftBody::reset_softbody_pin() {
PhysicsServer::get_singleton()->soft_body_remove_all_pinned_points(physics_rid);
- PoolVector<PinnedPoint>::Read pps = pinned_points.read();
+ const PinnedPoint *pps = pinned_points.ptr();
for (int i = pinned_points.size() - 1; 0 < i; --i) {
PhysicsServer::get_singleton()->soft_body_pin_point(physics_rid, pps[i].point_index, true);
}
@@ -737,7 +734,7 @@ void SoftBody::_update_cache_pin_points_datas() {
pinned_points_cache_dirty = false;
- PoolVector<PinnedPoint>::Write w = pinned_points.write();
+ PinnedPoint *w = pinned_points.ptrw();
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
if (!w[i].spatial_attachment_path.is_empty()) {
@@ -786,8 +783,8 @@ void SoftBody::_reset_points_offsets() {
if (!Engine::get_singleton()->is_editor_hint())
return;
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
- PoolVector<PinnedPoint>::Write w = pinned_points.write();
+ const PinnedPoint *r = pinned_points.ptr();
+ PinnedPoint *w = pinned_points.ptrw();
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
if (!r[i].spatial_attachment)
@@ -813,13 +810,13 @@ int SoftBody::_get_pinned_point(int p_point_index, SoftBody::PinnedPoint *&r_poi
r_point = NULL;
return -1;
} else {
- r_point = const_cast<SoftBody::PinnedPoint *>(&pinned_points.read()[id]);
+ r_point = const_cast<SoftBody::PinnedPoint *>(&pinned_points.ptr()[id]);
return id;
}
}
int SoftBody::_has_pinned_point(int p_point_index) const {
- PoolVector<PinnedPoint>::Read r = pinned_points.read();
+ const PinnedPoint *r = pinned_points.ptr();
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
if (p_point_index == r[i].point_index) {
return i;
diff --git a/scene/3d/soft_body.h b/scene/3d/soft_body.h
index 800db12594..d6c35a5989 100644
--- a/scene/3d/soft_body.h
+++ b/scene/3d/soft_body.h
@@ -41,12 +41,12 @@ class SoftBodyVisualServerHandler {
RID mesh;
int surface;
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
uint32_t stride;
uint32_t offset_vertices;
uint32_t offset_normal;
- PoolVector<uint8_t>::Write write_buffer;
+ uint8_t *write_buffer;
private:
SoftBodyVisualServerHandler();
@@ -87,7 +87,7 @@ private:
uint32_t collision_mask;
uint32_t collision_layer;
NodePath parent_collision_ignore;
- PoolVector<PinnedPoint> pinned_points;
+ Vector<PinnedPoint> pinned_points;
bool simulation_started;
bool pinned_points_cache_dirty;
@@ -138,8 +138,8 @@ public:
void set_parent_collision_ignore(const NodePath &p_parent_collision_ignore);
const NodePath &get_parent_collision_ignore() const;
- void set_pinned_points_indices(PoolVector<PinnedPoint> p_pinned_points_indices);
- PoolVector<PinnedPoint> get_pinned_points_indices();
+ void set_pinned_points_indices(Vector<PinnedPoint> p_pinned_points_indices);
+ Vector<PinnedPoint> get_pinned_points_indices();
void set_simulation_precision(int p_simulation_precision);
int get_simulation_precision();
diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp
index bce0535d64..ce277dae5b 100644
--- a/scene/3d/spring_arm.cpp
+++ b/scene/3d/spring_arm.cpp
@@ -81,8 +81,8 @@ void SpringArm::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"), "set_shape", "get_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spring_length"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spring_length"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin");
}
float SpringArm::get_length() const {
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 04f00a527e..fd22076091 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "sprite_3d.h"
+
#include "core/core_string_names.h"
#include "scene/scene_string_names.h"
@@ -177,8 +178,6 @@ void SpriteBase3D::_im_update() {
_draw();
pending_update = false;
-
- //texture->draw_rect_region(ci,dst_rect,src_rect,modulate);
}
void SpriteBase3D::_queue_update() {
@@ -197,18 +196,18 @@ AABB SpriteBase3D::get_aabb() const {
return aabb;
}
-PoolVector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const {
+Vector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+ return Vector<Face3>();
}
Ref<TriangleMesh> SpriteBase3D::generate_triangle_mesh() const {
if (triangle_mesh.is_valid())
return triangle_mesh;
- PoolVector<Vector3> faces;
+ Vector<Vector3> faces;
faces.resize(6);
- PoolVector<Vector3>::Write facesw = faces.write();
+ Vector3 *facesw = faces.ptrw();
Rect2 final_rect = get_item_rect();
@@ -254,8 +253,6 @@ Ref<TriangleMesh> SpriteBase3D::generate_triangle_mesh() const {
facesw[j] = vtx;
}
- facesw.release();
-
triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh));
triangle_mesh->create(faces);
@@ -336,16 +333,13 @@ void SpriteBase3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_rect"), &SpriteBase3D::get_item_rect);
ClassDB::bind_method(D_METHOD("generate_triangle_mesh"), &SpriteBase3D::generate_triangle_mesh);
- ClassDB::bind_method(D_METHOD("_queue_update"), &SpriteBase3D::_queue_update);
- ClassDB::bind_method(D_METHOD("_im_update"), &SpriteBase3D::_im_update);
-
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis", PROPERTY_HINT_ENUM, "X-Axis,Y-Axis,Z-Axis"), "set_axis", "get_axis");
ADD_GROUP("Flags", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "billboard", PROPERTY_HINT_ENUM, "Disabled,Enabled,Y-Billboard"), "set_billboard_mode", "get_billboard_mode");
@@ -528,16 +522,20 @@ void Sprite3D::_draw() {
VS::get_singleton()->immediate_end(immediate);
}
+void Sprite3D::_texture_changed() {
+ _queue_update();
+}
+
void Sprite3D::set_texture(const Ref<Texture2D> &p_texture) {
if (p_texture == texture)
return;
if (texture.is_valid()) {
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update);
+ texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite3D::_texture_changed));
}
texture = p_texture;
if (texture.is_valid()) {
- texture->connect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_queue_update);
+ texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite3D::_texture_changed));
}
_queue_update();
}
@@ -954,10 +952,10 @@ void AnimatedSprite3D::_notification(int p_what) {
void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
if (frames.is_valid())
- frames->disconnect("changed", this, "_res_changed");
+ frames->disconnect("changed", callable_mp(this, &AnimatedSprite3D::_res_changed));
frames = p_frames;
if (frames.is_valid())
- frames->connect("changed", this, "_res_changed");
+ frames->connect("changed", callable_mp(this, &AnimatedSprite3D::_res_changed));
if (!frames.is_valid()) {
frame = 0;
@@ -1127,12 +1125,10 @@ void AnimatedSprite3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_frame", "frame"), &AnimatedSprite3D::set_frame);
ClassDB::bind_method(D_METHOD("get_frame"), &AnimatedSprite3D::get_frame);
- ClassDB::bind_method(D_METHOD("_res_changed"), &AnimatedSprite3D::_res_changed);
-
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");
}
diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h
index 9c31a667b5..082884c83b 100644
--- a/scene/3d/sprite_3d.h
+++ b/scene/3d/sprite_3d.h
@@ -137,7 +137,7 @@ public:
virtual Rect2 get_item_rect() const = 0;
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
Ref<TriangleMesh> generate_triangle_mesh() const;
SpriteBase3D();
@@ -157,6 +157,8 @@ class Sprite3D : public SpriteBase3D {
int vframes;
int hframes;
+ void _texture_changed();
+
protected:
virtual void _draw();
static void _bind_methods();
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 52e50aa84e..c249d844d1 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -282,24 +282,24 @@ void VehicleWheel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_steering"), &VehicleWheel::get_steering);
ADD_GROUP("Per-Wheel Motion", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
ADD_GROUP("VehicleBody Motion", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering");
ADD_GROUP("Wheel", "wheel_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_radius"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_radius"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip");
ADD_GROUP("Suspension", "suspension_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_travel"), "set_suspension_travel", "get_suspension_travel");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_travel"), "set_suspension_travel", "get_suspension_travel");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force");
ADD_GROUP("Damping", "damping_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_compression"), "set_damping_compression", "get_damping_compression");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_compression"), "set_damping_compression", "get_damping_compression");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation");
}
void VehicleWheel::set_engine_force(float p_engine_force) {
@@ -974,9 +974,9 @@ void VehicleBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_steering"), &VehicleBody::get_steering);
ADD_GROUP("Motion", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
}
VehicleBody::VehicleBody() {
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 510442dc1c..986607f18d 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -170,7 +170,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) {
if (add) {
- p_node->connect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler::_node_removed), varray(p_node), CONNECT_ONESHOT);
nodes[p_node] = meta;
_change_node_state(p_node, false);
}
@@ -208,7 +208,7 @@ void VisibilityEnabler::_notification(int p_what) {
if (!visible)
_change_node_state(E->key(), true);
- E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
+ E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler::_node_removed));
}
nodes.clear();
@@ -247,7 +247,6 @@ void VisibilityEnabler::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_enabler", "enabler", "enabled"), &VisibilityEnabler::set_enabler);
ClassDB::bind_method(D_METHOD("is_enabler_enabled", "enabler"), &VisibilityEnabler::is_enabler_enabled);
- ClassDB::bind_method(D_METHOD("_node_removed"), &VisibilityEnabler::_node_removed);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animations"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATIONS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "freeze_bodies"), "set_enabler", "is_enabler_enabled", ENABLER_FREEZE_BODIES);
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 5a332fe0f9..105ce9ca74 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -294,9 +294,9 @@ void GeometryInstance::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_aabb"), &GeometryInstance::get_aabb);
ADD_GROUP("Geometry", "");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D"), "set_material_override", "get_material_override");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE), "set_material_override", "get_material_override");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_in_baked_light"), "set_flag", "get_flag", FLAG_USE_BAKED_LIGHT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_dynamic_gi"), "set_flag", "get_flag", FLAG_USE_DYNAMIC_GI);
diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h
index c1d6c2b015..fee6787c87 100644
--- a/scene/3d/visual_instance.h
+++ b/scene/3d/visual_instance.h
@@ -63,7 +63,7 @@ public:
RID get_instance() const;
virtual AABB get_aabb() const = 0;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const = 0;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const = 0;
virtual AABB get_transformed_aabb() const; // helper
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index 7cf26ab974..0257e6e83d 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -497,7 +497,7 @@ Vector<Color> Voxelizer::_get_bake_texture(Ref<Image> p_image, const Color &p_co
p_image->convert(Image::FORMAT_RGBA8);
p_image->resize(bake_texture_size, bake_texture_size, Image::INTERPOLATE_CUBIC);
- PoolVector<uint8_t>::Read r = p_image->get_data().read();
+ const uint8_t *r = p_image->get_data().ptr();
ret.resize(bake_texture_size * bake_texture_size);
for (int i = 0; i < bake_texture_size * bake_texture_size; i++) {
@@ -589,32 +589,32 @@ void Voxelizer::plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, const Vec
Array a = p_mesh->surface_get_arrays(i);
- PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
- PoolVector<Vector3>::Read vr = vertices.read();
- PoolVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV];
- PoolVector<Vector2>::Read uvr;
- PoolVector<Vector3> normals = a[Mesh::ARRAY_NORMAL];
- PoolVector<Vector3>::Read nr;
- PoolVector<int> index = a[Mesh::ARRAY_INDEX];
+ Vector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
+ const Vector3 *vr = vertices.ptr();
+ Vector<Vector2> uv = a[Mesh::ARRAY_TEX_UV];
+ const Vector2 *uvr;
+ Vector<Vector3> normals = a[Mesh::ARRAY_NORMAL];
+ const Vector3 *nr;
+ Vector<int> index = a[Mesh::ARRAY_INDEX];
bool read_uv = false;
bool read_normals = false;
if (uv.size()) {
- uvr = uv.read();
+ uvr = uv.ptr();
read_uv = true;
}
if (normals.size()) {
read_normals = true;
- nr = normals.read();
+ nr = normals.ptr();
}
if (index.size()) {
int facecount = index.size() / 3;
- PoolVector<int>::Read ir = index.read();
+ const int *ir = index.ptr();
for (int j = 0; j < facecount; j++) {
@@ -886,12 +886,12 @@ int Voxelizer::get_giprobe_cell_count() const {
return bake_cells.size();
}
-PoolVector<uint8_t> Voxelizer::get_giprobe_octree_cells() const {
- PoolVector<uint8_t> data;
+Vector<uint8_t> Voxelizer::get_giprobe_octree_cells() const {
+ Vector<uint8_t> data;
data.resize((8 * 4) * bake_cells.size()); //8 uint32t values
{
- PoolVector<uint8_t>::Write w = data.write();
- uint32_t *children_cells = (uint32_t *)w.ptr();
+ uint8_t *w = data.ptrw();
+ uint32_t *children_cells = (uint32_t *)w;
const Cell *cells = bake_cells.ptr();
uint32_t cell_count = bake_cells.size();
@@ -906,12 +906,12 @@ PoolVector<uint8_t> Voxelizer::get_giprobe_octree_cells() const {
return data;
}
-PoolVector<uint8_t> Voxelizer::get_giprobe_data_cells() const {
- PoolVector<uint8_t> data;
+Vector<uint8_t> Voxelizer::get_giprobe_data_cells() const {
+ Vector<uint8_t> data;
data.resize((4 * 4) * bake_cells.size()); //8 uint32t values
{
- PoolVector<uint8_t>::Write w = data.write();
- uint32_t *dataptr = (uint32_t *)w.ptr();
+ uint8_t *w = data.ptrw();
+ uint32_t *dataptr = (uint32_t *)w;
const Cell *cells = bake_cells.ptr();
uint32_t cell_count = bake_cells.size();
@@ -962,13 +962,13 @@ PoolVector<uint8_t> Voxelizer::get_giprobe_data_cells() const {
return data;
}
-PoolVector<int> Voxelizer::get_giprobe_level_cell_count() const {
+Vector<int> Voxelizer::get_giprobe_level_cell_count() const {
uint32_t cell_count = bake_cells.size();
const Cell *cells = bake_cells.ptr();
- PoolVector<int> level_count;
+ Vector<int> level_count;
level_count.resize(cell_subdiv + 1); //remember, always x+1 levels for x subdivisions
{
- PoolVector<int>::Write w = level_count.write();
+ int *w = level_count.ptrw();
for (int i = 0; i < cell_subdiv + 1; i++) {
w[i] = 0;
}
@@ -1025,7 +1025,7 @@ static void edt(float *f, int stride, int n) {
#undef square
-PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const {
+Vector<uint8_t> Voxelizer::get_sdf_3d_image() const {
Vector3i octree_size = get_giprobe_octree_size();
@@ -1078,10 +1078,10 @@ PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const {
}
}
- PoolVector<uint8_t> image3d;
+ Vector<uint8_t> image3d;
image3d.resize(float_count);
{
- PoolVector<uint8_t>::Write w = image3d.write();
+ uint8_t *w = image3d.ptrw();
for (uint32_t i = 0; i < float_count; i++) {
uint32_t d = uint32_t(Math::sqrt(work_memory[i]));
if (d == 0) {
@@ -1154,8 +1154,8 @@ Ref<MultiMesh> Voxelizer::create_debug_multimesh() {
Array arr;
arr.resize(Mesh::ARRAY_MAX);
- PoolVector<Vector3> vertices;
- PoolVector<Color> colors;
+ Vector<Vector3> vertices;
+ Vector<Color> colors;
#define ADD_VTX(m_idx) \
vertices.push_back(face_points[m_idx]); \
colors.push_back(Color(1, 1, 1, 1));
diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h
index 5016ff029f..1d50f1cd18 100644
--- a/scene/3d/voxelizer.h
+++ b/scene/3d/voxelizer.h
@@ -109,7 +109,6 @@ private:
int color_scan_cell_width;
int bake_texture_size;
float cell_size;
- float propagation;
int max_original_cells;
int leaf_voxel_count;
@@ -132,10 +131,10 @@ public:
int get_gi_probe_octree_depth() const;
Vector3i get_giprobe_octree_size() const;
int get_giprobe_cell_count() const;
- PoolVector<uint8_t> get_giprobe_octree_cells() const;
- PoolVector<uint8_t> get_giprobe_data_cells() const;
- PoolVector<int> get_giprobe_level_cell_count() const;
- PoolVector<uint8_t> get_sdf_3d_image() const;
+ Vector<uint8_t> get_giprobe_octree_cells() const;
+ Vector<uint8_t> get_giprobe_data_cells() const;
+ Vector<int> get_giprobe_level_cell_count() const;
+ Vector<uint8_t> get_sdf_3d_image() const;
Ref<MultiMesh> create_debug_multimesh();
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 0f55682427..3502f5e961 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -31,7 +31,7 @@
#include "animation_blend_space_1d.h"
void AnimationNodeBlendSpace1D::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_position));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_position));
}
Variant AnimationNodeBlendSpace1D::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -79,16 +79,14 @@ void AnimationNodeBlendSpace1D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_add_blend_point", "index", "node"), &AnimationNodeBlendSpace1D::_add_blend_point);
- ClassDB::bind_method(D_METHOD("_tree_changed"), &AnimationNodeBlendSpace1D::_tree_changed);
-
for (int i = 0; i < MAX_BLEND_POINTS; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "blend_point_" + itos(i) + "/node", PROPERTY_HINT_RESOURCE_TYPE, "AnimationRootNode", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_add_blend_point", "get_blend_point_node", i);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
}
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "value_label", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_value_label", "get_value_label");
}
@@ -118,7 +116,7 @@ void AnimationNodeBlendSpace1D::add_blend_point(const Ref<AnimationRootNode> &p_
blend_points[p_at_index].node = p_node;
blend_points[p_at_index].position = p_position;
- blend_points[p_at_index].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
blend_points_used++;
emit_signal("tree_changed");
@@ -135,11 +133,11 @@ void AnimationNodeBlendSpace1D::set_blend_point_node(int p_point, const Ref<Anim
ERR_FAIL_COND(p_node.is_null());
if (blend_points[p_point].node.is_valid()) {
- blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed");
+ blend_points[p_point].node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed));
}
blend_points[p_point].node = p_node;
- blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
emit_signal("tree_changed");
}
@@ -158,7 +156,7 @@ void AnimationNodeBlendSpace1D::remove_blend_point(int p_point) {
ERR_FAIL_INDEX(p_point, blend_points_used);
ERR_FAIL_COND(blend_points[p_point].node.is_null());
- blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed");
+ blend_points[p_point].node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed));
for (int i = p_point; i < blend_points_used - 1; i++) {
blend_points[i] = blend_points[i + 1];
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index d749959377..638531df41 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -34,7 +34,7 @@
void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position));
r_list->push_back(PropertyInfo(Variant::INT, closest, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, length_internal, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, length_internal, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeBlendSpace2D::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == closest) {
@@ -77,7 +77,7 @@ void AnimationNodeBlendSpace2D::add_blend_point(const Ref<AnimationRootNode> &p_
blend_points[p_at_index].node = p_node;
blend_points[p_at_index].position = p_position;
- blend_points[p_at_index].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
blend_points_used++;
_queue_auto_triangles();
@@ -95,10 +95,10 @@ void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<Anim
ERR_FAIL_COND(p_node.is_null());
if (blend_points[p_point].node.is_valid()) {
- blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed");
+ blend_points[p_point].node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed));
}
blend_points[p_point].node = p_node;
- blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
emit_signal("tree_changed");
}
@@ -114,7 +114,7 @@ void AnimationNodeBlendSpace2D::remove_blend_point(int p_point) {
ERR_FAIL_INDEX(p_point, blend_points_used);
ERR_FAIL_COND(blend_points[p_point].node.is_null());
- blend_points[p_point].node->disconnect("tree_changed", this, "_tree_changed");
+ blend_points[p_point].node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed));
for (int i = 0; i < triangles.size(); i++) {
bool erase = false;
@@ -640,7 +640,6 @@ void AnimationNodeBlendSpace2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_blend_mode", "mode"), &AnimationNodeBlendSpace2D::set_blend_mode);
ClassDB::bind_method(D_METHOD("get_blend_mode"), &AnimationNodeBlendSpace2D::get_blend_mode);
- ClassDB::bind_method(D_METHOD("_tree_changed"), &AnimationNodeBlendSpace2D::_tree_changed);
ClassDB::bind_method(D_METHOD("_update_triangles"), &AnimationNodeBlendSpace2D::_update_triangles);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_auto_triangles", "get_auto_triangles");
@@ -650,7 +649,7 @@ void AnimationNodeBlendSpace2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::VECTOR2, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
}
- ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 5c284cb483..8ba7a38628 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -44,7 +44,7 @@ StringName AnimationNodeAnimation::get_animation() const {
Vector<String> (*AnimationNodeAnimation::get_editable_animation_list)() = NULL;
void AnimationNodeAnimation::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
}
void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const {
@@ -126,7 +126,7 @@ void AnimationNodeAnimation::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_animation", "name"), &AnimationNodeAnimation::set_animation);
ClassDB::bind_method(D_METHOD("get_animation"), &AnimationNodeAnimation::get_animation);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
}
AnimationNodeAnimation::AnimationNodeAnimation() {
@@ -140,9 +140,9 @@ AnimationNodeAnimation::AnimationNodeAnimation() {
void AnimationNodeOneShot::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::BOOL, active));
r_list->push_back(PropertyInfo(Variant::BOOL, prev_active, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, remaining, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time_to_restart, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, remaining, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time_to_restart, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeOneShot::get_parameter_default_value(const StringName &p_parameter) const {
@@ -339,14 +339,14 @@ void AnimationNodeOneShot::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeOneShot::set_use_sync);
ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeOneShot::is_using_sync);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");
ADD_GROUP("autorestart_", "Auto Restart");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autorestart"), "set_autorestart", "has_autorestart");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay");
ADD_GROUP("", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync");
@@ -379,7 +379,7 @@ AnimationNodeOneShot::AnimationNodeOneShot() {
////////////////////////////////////////////////
void AnimationNodeAdd2::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
Variant AnimationNodeAdd2::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -431,7 +431,7 @@ AnimationNodeAdd2::AnimationNodeAdd2() {
////////////////////////////////////////////////
void AnimationNodeAdd3::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
Variant AnimationNodeAdd3::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -484,7 +484,7 @@ AnimationNodeAdd3::AnimationNodeAdd3() {
/////////////////////////////////////////////
void AnimationNodeBlend2::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
Variant AnimationNodeBlend2::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
@@ -535,7 +535,7 @@ AnimationNodeBlend2::AnimationNodeBlend2() {
//////////////////////////////////////
void AnimationNodeBlend3::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
Variant AnimationNodeBlend3::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
@@ -583,7 +583,7 @@ AnimationNodeBlend3::AnimationNodeBlend3() {
/////////////////////////////////
void AnimationNodeTimeScale::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater"));
}
Variant AnimationNodeTimeScale::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
@@ -613,7 +613,7 @@ AnimationNodeTimeScale::AnimationNodeTimeScale() {
////////////////////////////////////
void AnimationNodeTimeSeek::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater"));
}
Variant AnimationNodeTimeSeek::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
@@ -661,8 +661,8 @@ void AnimationNodeTransition::get_parameter_list(List<PropertyInfo> *r_list) con
r_list->push_back(PropertyInfo(Variant::INT, current, PROPERTY_HINT_ENUM, anims));
r_list->push_back(PropertyInfo(Variant::INT, prev_current, PROPERTY_HINT_NONE, "", 0));
r_list->push_back(PropertyInfo(Variant::INT, prev, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, prev_xfading, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, prev_xfading, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeTransition::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == time || p_parameter == prev_xfading) {
@@ -829,7 +829,7 @@ void AnimationNodeTransition::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cross_fade_time"), &AnimationNodeTransition::get_cross_fade_time);
ADD_PROPERTY(PropertyInfo(Variant::INT, "input_count", PROPERTY_HINT_RANGE, "0,64,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_enabled_inputs", "get_enabled_inputs");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time");
for (int i = 0; i < MAX_INPUTS; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::STRING, "input_" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_input_caption", "get_input_caption", i);
@@ -884,8 +884,8 @@ void AnimationNodeBlendTree::add_node(const StringName &p_name, Ref<AnimationNod
emit_changed();
emit_signal("tree_changed");
- p_node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
- p_node->connect("changed", this, "_node_changed", varray(p_name), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendTree::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed), varray(p_name), CONNECT_REFERENCE_COUNTED);
}
Ref<AnimationNode> AnimationNodeBlendTree::get_node(const StringName &p_name) const {
@@ -947,8 +947,8 @@ void AnimationNodeBlendTree::remove_node(const StringName &p_name) {
{
Ref<AnimationNode> node = nodes[p_name].node;
- node->disconnect("tree_changed", this, "_tree_changed");
- node->disconnect("changed", this, "_node_changed");
+ node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendTree::_tree_changed));
+ node->disconnect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed));
}
nodes.erase(p_name);
@@ -973,7 +973,7 @@ void AnimationNodeBlendTree::rename_node(const StringName &p_name, const StringN
ERR_FAIL_COND(p_name == SceneStringNames::get_singleton()->output);
ERR_FAIL_COND(p_new_name == SceneStringNames::get_singleton()->output);
- nodes[p_name].node->disconnect("changed", this, "_node_changed");
+ nodes[p_name].node->disconnect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed));
nodes[p_new_name] = nodes[p_name];
nodes.erase(p_name);
@@ -988,7 +988,7 @@ void AnimationNodeBlendTree::rename_node(const StringName &p_name, const StringN
}
}
//connection must be done with new name
- nodes[p_new_name].node->connect("changed", this, "_node_changed", varray(p_new_name), CONNECT_REFERENCE_COUNTED);
+ nodes[p_new_name].node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed), varray(p_new_name), CONNECT_REFERENCE_COUNTED);
emit_signal("tree_changed");
}
@@ -1230,9 +1230,6 @@ void AnimationNodeBlendTree::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &AnimationNodeBlendTree::set_graph_offset);
ClassDB::bind_method(D_METHOD("get_graph_offset"), &AnimationNodeBlendTree::get_graph_offset);
- ClassDB::bind_method(D_METHOD("_tree_changed"), &AnimationNodeBlendTree::_tree_changed);
- ClassDB::bind_method(D_METHOD("_node_changed", "node"), &AnimationNodeBlendTree::_node_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_graph_offset", "get_graph_offset");
BIND_CONSTANT(CONNECTION_OK);
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 8d1ffb43cc..9ed8155bdc 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -56,7 +56,7 @@ void AnimationCache::_clear_cache() {
while (connected_nodes.size()) {
- connected_nodes.front()->get()->disconnect("tree_exiting", this, "_node_exit_tree");
+ connected_nodes.front()->get()->disconnect("tree_exiting", callable_mp(this, &AnimationCache::_node_exit_tree));
connected_nodes.erase(connected_nodes.front());
}
path_cache.clear();
@@ -174,7 +174,7 @@ void AnimationCache::_update_cache() {
if (!connected_nodes.has(path.node)) {
connected_nodes.insert(path.node);
- path.node->connect("tree_exiting", this, "_node_exit_tree", Node::make_binds(path.node), CONNECT_ONESHOT);
+ path.node->connect("tree_exiting", callable_mp(this, &AnimationCache::_node_exit_tree), Node::make_binds(path.node), CONNECT_ONESHOT);
}
}
@@ -218,7 +218,7 @@ void AnimationCache::set_track_value(int p_idx, const Variant &p_value) {
p.object->set_indexed(p.subpath, p_value);
}
-void AnimationCache::call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+void AnimationCache::call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (cache_dirty)
_update_cache();
@@ -283,7 +283,7 @@ void AnimationCache::set_all(float p_time, float p_delta) {
Vector<Variant> args = animation->method_track_get_params(i, E->get());
StringName name = animation->method_track_get_name(i, E->get());
- Variant::CallError err;
+ Callable::CallError err;
if (!args.size()) {
@@ -313,18 +313,15 @@ void AnimationCache::set_animation(const Ref<Animation> &p_animation) {
_clear_cache();
if (animation.is_valid())
- animation->disconnect("changed", this, "_animation_changed");
+ animation->disconnect("changed", callable_mp(this, &AnimationCache::_animation_changed));
animation = p_animation;
if (animation.is_valid())
- animation->connect("changed", this, "_animation_changed");
+ animation->connect("changed", callable_mp(this, &AnimationCache::_animation_changed));
}
void AnimationCache::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_node_exit_tree"), &AnimationCache::_node_exit_tree);
- ClassDB::bind_method(D_METHOD("_animation_changed"), &AnimationCache::_animation_changed);
}
void AnimationCache::set_root(Node *p_root) {
diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h
index 26ad9dfee5..e73b9e2498 100644
--- a/scene/animation/animation_cache.h
+++ b/scene/animation/animation_cache.h
@@ -79,7 +79,7 @@ protected:
public:
void set_track_transform(int p_idx, const Transform &p_transform);
void set_track_value(int p_idx, const Variant &p_value);
- void call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ void call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
void set_all(float p_time, float p_delta = 0);
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index 59d0d9e87f..fbd9a2aa7d 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -120,8 +120,8 @@ void AnimationNodeStateMachineTransition::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "switch_mode", PROPERTY_HINT_ENUM, "Immediate,Sync,AtEnd"), "set_switch_mode", "get_switch_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_advance"), "set_auto_advance", "has_auto_advance");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "advance_condition"), "set_advance_condition", "get_advance_condition");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "advance_condition"), "set_advance_condition", "get_advance_condition");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,32,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
@@ -562,7 +562,7 @@ void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<Animation
emit_changed();
emit_signal("tree_changed");
- p_node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
Ref<AnimationNode> AnimationNodeStateMachine::get_node(const StringName &p_name) const {
@@ -611,7 +611,7 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) {
ERR_FAIL_COND(node.is_null());
- node->disconnect("tree_changed", this, "_tree_changed");
+ node->disconnect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
}
states.erase(p_name);
@@ -619,7 +619,7 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) {
for (int i = 0; i < transitions.size(); i++) {
if (transitions[i].from == p_name || transitions[i].to == p_name) {
- transitions.write[i].transition->disconnect("advance_condition_changed", this, "_tree_changed");
+ transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
transitions.remove(i);
i--;
}
@@ -722,7 +722,7 @@ void AnimationNodeStateMachine::add_transition(const StringName &p_from, const S
tr.to = p_to;
tr.transition = p_transition;
- tr.transition->connect("advance_condition_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ tr.transition->connect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
transitions.push_back(tr);
}
@@ -750,7 +750,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons
for (int i = 0; i < transitions.size(); i++) {
if (transitions[i].from == p_from && transitions[i].to == p_to) {
- transitions.write[i].transition->disconnect("advance_condition_changed", this, "_tree_changed");
+ transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
transitions.remove(i);
return;
}
@@ -764,7 +764,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons
void AnimationNodeStateMachine::remove_transition_by_index(int p_transition) {
ERR_FAIL_INDEX(p_transition, transitions.size());
- transitions.write[p_transition].transition->disconnect("advance_condition_changed", this, "_tree_changed");
+ transitions.write[p_transition].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
transitions.remove(p_transition);
/*if (playing) {
path.clear();
@@ -926,8 +926,8 @@ void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) c
}
p_list->push_back(PropertyInfo(Variant::ARRAY, "transitions", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
- p_list->push_back(PropertyInfo(Variant::STRING, "start_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
- p_list->push_back(PropertyInfo(Variant::STRING, "end_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "start_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "end_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
@@ -975,8 +975,6 @@ void AnimationNodeStateMachine::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &AnimationNodeStateMachine::set_graph_offset);
ClassDB::bind_method(D_METHOD("get_graph_offset"), &AnimationNodeStateMachine::get_graph_offset);
-
- ClassDB::bind_method(D_METHOD("_tree_changed"), &AnimationNodeStateMachine::_tree_changed);
}
AnimationNodeStateMachine::AnimationNodeStateMachine() {
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index ceee0529c2..587485669e 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -263,8 +263,8 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) {
}
{
- if (!child->is_connected("tree_exiting", this, "_node_removed"))
- child->connect("tree_exiting", this, "_node_removed", make_binds(child), CONNECT_ONESHOT);
+ if (!child->is_connected("tree_exiting", callable_mp(this, &AnimationPlayer::_node_removed)))
+ child->connect("tree_exiting", callable_mp(this, &AnimationPlayer::_node_removed), make_binds(child), CONNECT_ONESHOT);
}
TrackNodeCacheKey key;
@@ -1007,12 +1007,12 @@ void AnimationPlayer::remove_animation(const StringName &p_name) {
void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) {
- Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, callable_mp(this, &AnimationPlayer::_animation_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
void AnimationPlayer::_unref_anim(const Ref<Animation> &p_anim) {
- Ref<Animation>(p_anim)->disconnect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed");
+ Ref<Animation>(p_anim)->disconnect(SceneStringNames::get_singleton()->tracks_changed, callable_mp(this, &AnimationPlayer::_animation_changed));
}
void AnimationPlayer::rename_animation(const StringName &p_name, const StringName &p_new_name) {
@@ -1129,8 +1129,8 @@ void AnimationPlayer::queue(const StringName &p_name) {
queued.push_back(p_name);
}
-PoolVector<String> AnimationPlayer::get_queue() {
- PoolVector<String> ret;
+Vector<String> AnimationPlayer::get_queue() {
+ Vector<String> ret;
for (List<StringName>::Element *E = queued.front(); E; E = E->next()) {
ret.push_back(E->get());
}
@@ -1619,10 +1619,6 @@ void AnimationPlayer::restore_animated_values(const AnimatedValuesBackup &p_back
#endif
void AnimationPlayer::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_node_removed"), &AnimationPlayer::_node_removed);
- ClassDB::bind_method(D_METHOD("_animation_changed"), &AnimationPlayer::_animation_changed);
-
ClassDB::bind_method(D_METHOD("add_animation", "name", "animation"), &AnimationPlayer::add_animation);
ClassDB::bind_method(D_METHOD("remove_animation", "name"), &AnimationPlayer::remove_animation);
ClassDB::bind_method(D_METHOD("rename_animation", "name", "newname"), &AnimationPlayer::rename_animation);
@@ -1682,22 +1678,22 @@ void AnimationPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_node"), "set_root", "get_root");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "assigned_animation", PROPERTY_HINT_NONE, "", 0), "set_assigned_animation", "get_assigned_animation");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_autoplay", "get_autoplay");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "assigned_animation", PROPERTY_HINT_NONE, "", 0), "set_assigned_animation", "get_assigned_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_autoplay", "get_autoplay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position");
ADD_GROUP("Playback Options", "playback_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle,Manual"), "set_animation_process_mode", "get_animation_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playback_active", PROPERTY_HINT_NONE, "", 0), "set_active", "is_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::INT, "method_call_mode", PROPERTY_HINT_ENUM, "Deferred,Immediate"), "set_method_call_mode", "get_method_call_mode");
- ADD_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING, "anim_name")));
- ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name")));
- ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING, "anim_name")));
+ ADD_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING_NAME, "anim_name")));
+ ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING_NAME, "old_name"), PropertyInfo(Variant::STRING_NAME, "new_name")));
+ ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING_NAME, "anim_name")));
ADD_SIGNAL(MethodInfo("caches_cleared"));
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_PHYSICS);
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 48829b02b9..24f60363ed 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -264,11 +264,11 @@ private:
void _stop_playing_caches();
// bind helpers
- PoolVector<String> _get_animation_list() const {
+ Vector<String> _get_animation_list() const {
List<StringName> animations;
get_animation_list(&animations);
- PoolVector<String> ret;
+ Vector<String> ret;
while (animations.size()) {
ret.push_back(animations.front()->get());
@@ -316,7 +316,7 @@ public:
void play(const StringName &p_name = StringName(), float p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false);
void play_backwards(const StringName &p_name = StringName(), float p_custom_blend = -1);
void queue(const StringName &p_name);
- PoolVector<String> get_queue();
+ Vector<String> get_queue();
void clear_queue();
void stop(bool p_reset = true);
bool is_playing() const;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index a08cc0927b..95afd74ee5 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -433,13 +433,13 @@ void AnimationNode::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::ARRAY, "get_parameter_list"));
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_child_by_name", PropertyInfo(Variant::STRING, "name")));
{
- MethodInfo mi = MethodInfo(Variant::NIL, "get_parameter_default_value", PropertyInfo(Variant::STRING, "name"));
+ MethodInfo mi = MethodInfo(Variant::NIL, "get_parameter_default_value", PropertyInfo(Variant::STRING_NAME, "name"));
mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
BIND_VMETHOD(mi);
}
- BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::REAL, "time"), PropertyInfo(Variant::BOOL, "seek")));
+ BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::FLOAT, "time"), PropertyInfo(Variant::BOOL, "seek")));
BIND_VMETHOD(MethodInfo(Variant::STRING, "get_caption"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "has_filter"));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_filter"));
ADD_SIGNAL(MethodInfo("removed_from_graph"));
@@ -463,13 +463,13 @@ AnimationNode::AnimationNode() {
void AnimationTree::set_tree_root(const Ref<AnimationNode> &p_root) {
if (root.is_valid()) {
- root->disconnect("tree_changed", this, "_tree_changed");
+ root->disconnect("tree_changed", callable_mp(this, &AnimationTree::_tree_changed));
}
root = p_root;
if (root.is_valid()) {
- root->connect("tree_changed", this, "_tree_changed");
+ root->connect("tree_changed", callable_mp(this, &AnimationTree::_tree_changed));
}
properties_dirty = true;
@@ -582,8 +582,8 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
continue;
}
- if (!child->is_connected("tree_exited", this, "_node_removed")) {
- child->connect("tree_exited", this, "_node_removed", varray(child));
+ if (!child->is_connected("tree_exited", callable_mp(this, &AnimationTree::_node_removed))) {
+ child->connect("tree_exited", callable_mp(this, &AnimationTree::_node_removed), varray(child));
}
switch (track_type) {
@@ -778,12 +778,12 @@ void AnimationTree::_process_graph(float p_delta) {
if (last_animation_player.is_valid()) {
Object *old_player = ObjectDB::get_instance(last_animation_player);
if (old_player) {
- old_player->disconnect("caches_cleared", this, "_clear_caches");
+ old_player->disconnect("caches_cleared", callable_mp(this, &AnimationTree::_clear_caches));
}
}
if (player) {
- player->connect("caches_cleared", this, "_clear_caches");
+ player->connect("caches_cleared", callable_mp(this, &AnimationTree::_clear_caches));
}
last_animation_player = current_animation_player;
@@ -1300,7 +1300,7 @@ void AnimationTree::_notification(int p_what) {
Object *player = ObjectDB::get_instance(last_animation_player);
if (player) {
- player->disconnect("caches_cleared", this, "_clear_caches");
+ player->disconnect("caches_cleared", callable_mp(this, &AnimationTree::_clear_caches));
}
}
} else if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -1308,7 +1308,7 @@ void AnimationTree::_notification(int p_what) {
Object *player = ObjectDB::get_instance(last_animation_player);
if (player) {
- player->connect("caches_cleared", this, "_clear_caches");
+ player->connect("caches_cleared", callable_mp(this, &AnimationTree::_clear_caches));
}
}
}
@@ -1553,16 +1553,12 @@ void AnimationTree::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_root_motion_transform"), &AnimationTree::get_root_motion_transform);
- ClassDB::bind_method(D_METHOD("_tree_changed"), &AnimationTree::_tree_changed);
ClassDB::bind_method(D_METHOD("_update_properties"), &AnimationTree::_update_properties);
ClassDB::bind_method(D_METHOD("rename_parameter", "old_name", "new_name"), &AnimationTree::rename_parameter);
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationTree::advance);
- ClassDB::bind_method(D_METHOD("_node_removed"), &AnimationTree::_node_removed);
- ClassDB::bind_method(D_METHOD("_clear_caches"), &AnimationTree::_clear_caches);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tree_root", PROPERTY_HINT_RESOURCE_TYPE, "AnimationRootNode"), "set_tree_root", "get_tree_root");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "anim_player", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "AnimationPlayer"), "set_animation_player", "get_animation_player");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "active"), "set_active", "is_active");
diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp
index fe062e0a20..ce9b8bd213 100644
--- a/scene/animation/root_motion_view.cpp
+++ b/scene/animation/root_motion_view.cpp
@@ -164,8 +164,8 @@ AABB RootMotionView::get_aabb() const {
return AABB(Vector3(-radius, 0, -radius), Vector3(radius * 2, 0.001, radius * 2));
}
-PoolVector<Face3> RootMotionView::get_faces(uint32_t p_usage_flags) const {
- return PoolVector<Face3>();
+Vector<Face3> RootMotionView::get_faces(uint32_t p_usage_flags) const {
+ return Vector<Face3>();
}
void RootMotionView::_bind_methods() {
@@ -187,8 +187,8 @@ void RootMotionView::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "animation_path", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "AnimationTree"), "set_animation_path", "get_animation_path");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "zero_y"), "set_zero_y", "get_zero_y");
}
diff --git a/scene/animation/root_motion_view.h b/scene/animation/root_motion_view.h
index 0a255cb5d2..42950dde42 100644
--- a/scene/animation/root_motion_view.h
+++ b/scene/animation/root_motion_view.h
@@ -69,7 +69,7 @@ public:
bool get_zero_y() const;
virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const;
RootMotionView();
~RootMotionView();
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp
index 518c243dd0..5cdb38b5c2 100644
--- a/scene/animation/skeleton_ik.cpp
+++ b/scene/animation/skeleton_ik.cpp
@@ -390,15 +390,15 @@ void SkeletonIK::_bind_methods() {
ClassDB::bind_method(D_METHOD("start", "one_time"), &SkeletonIK::start, DEFVAL(false));
ClassDB::bind_method(D_METHOD("stop"), &SkeletonIK::stop);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "root_bone"), "set_root_bone", "get_root_bone");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "tip_bone"), "set_tip_bone", "get_tip_bone");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "root_bone"), "set_root_bone", "get_root_bone");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "tip_bone"), "set_tip_bone", "get_tip_bone");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "target"), "set_target_transform", "get_target_transform");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_tip_basis"), "set_override_tip_basis", "is_override_tip_basis");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_magnet"), "set_use_magnet", "is_using_magnet");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet"), "set_magnet_position", "get_magnet_position");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target_node"), "set_target_node", "get_target_node");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_distance"), "set_min_distance", "get_min_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_distance"), "set_min_distance", "get_min_distance");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_iterations"), "set_max_iterations", "get_max_iterations");
}
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index a7f3794a05..628568afbb 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -67,7 +67,6 @@ void Tween::_add_pending_command(StringName p_key, const Variant &p_arg1, const
count = 0;
// Add the specified arguments to the command
- // TODO: Make this a switch statement?
if (count > 0)
cmd.arg[0] = p_arg1;
if (count > 1)
@@ -97,7 +96,7 @@ void Tween::_process_pending_commands() {
// Get the command
PendingCommand &cmd = E->get();
- Variant::CallError err;
+ Callable::CallError err;
// Grab all of the arguments for the command
Variant *arg[10] = {
@@ -157,7 +156,7 @@ void Tween::_get_property_list(List<PropertyInfo> *p_list) const {
// Add the property info for the Tween object
p_list->push_back(PropertyInfo(Variant::BOOL, "playback/active", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::BOOL, "playback/repeat", PROPERTY_HINT_NONE, ""));
- p_list->push_back(PropertyInfo(Variant::REAL, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01"));
}
void Tween::_notification(int p_what) {
@@ -250,14 +249,14 @@ void Tween::_bind_methods() {
// Add the Tween signals
ADD_SIGNAL(MethodInfo("tween_started", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key")));
- ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::REAL, "elapsed"), PropertyInfo(Variant::OBJECT, "value")));
+ ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::FLOAT, "elapsed"), PropertyInfo(Variant::OBJECT, "value")));
ADD_SIGNAL(MethodInfo("tween_completed", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key")));
ADD_SIGNAL(MethodInfo("tween_all_completed"));
// Add the properties and tie them to the getters and setters
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "repeat"), "set_repeat", "is_repeat");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_tween_process_mode", "get_tween_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
// Bind Idle vs Physics process
BIND_ENUM_CONSTANT(TWEEN_PROCESS_PHYSICS);
@@ -309,9 +308,9 @@ Variant Tween::_get_initial_val(const InterpolateData &p_data) const {
ERR_FAIL_COND_V(!valid, p_data.initial_val);
} else {
// Call the method and get the initial value from it
- Variant::CallError error;
+ Callable::CallError error;
initial_val = object->call(p_data.target_key[0], NULL, 0, error);
- ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val);
+ ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val);
}
return initial_val;
}
@@ -341,12 +340,12 @@ Variant Tween::_get_final_val(const InterpolateData &p_data) const {
ERR_FAIL_COND_V(!valid, p_data.initial_val);
} else {
// We're looking at a method. Call the method on the target object
- Variant::CallError error;
+ Callable::CallError error;
final_val = target->call(p_data.target_key[0], NULL, 0, error);
- ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val);
+ ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val);
}
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t();
@@ -383,12 +382,12 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) {
ERR_FAIL_COND_V(!valid, p_data.initial_val);
} else {
// We're looking at a method. Call the method on the target object
- Variant::CallError error;
+ Callable::CallError error;
final_val = target->call(p_data.target_key[0], NULL, 0, error);
- ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val);
+ ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val);
}
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t();
@@ -402,7 +401,7 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) {
// Grab the initial value from the data to calculate delta
Variant initial_val = _get_initial_val(p_data);
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
@@ -441,8 +440,8 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = (int)_run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (int)initial_val, (int)delta_val, p_data.duration);
break;
- case Variant::REAL:
- // Run the REAL specific equation
+ case Variant::FLOAT:
+ // Run the FLOAT specific equation
result = _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (real_t)initial_val, (real_t)delta_val, p_data.duration);
break;
@@ -459,6 +458,20 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = r;
} break;
+ case Variant::RECT2: {
+ // Get the Rect2 for initial and delta value
+ Rect2 i = initial_val;
+ Rect2 d = delta_val;
+ Rect2 r;
+
+ // Execute the equation for the position and size of Rect2
+ APPLY_EQUATION(position.x);
+ APPLY_EQUATION(position.y);
+ APPLY_EQUATION(size.x);
+ APPLY_EQUATION(size.y);
+ result = r;
+ } break;
+
case Variant::VECTOR3: {
// Get vectors for initial and delta values
Vector3 i = initial_val;
@@ -473,26 +486,6 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = r;
} break;
- case Variant::BASIS: {
- // Get the basis for initial and delta values
- Basis i = initial_val;
- Basis d = delta_val;
- Basis r;
-
- // Execute the equation on all the basis and mutate the r basis
- // This uses the custom APPLY_EQUATION macro defined above
- APPLY_EQUATION(elements[0][0]);
- APPLY_EQUATION(elements[0][1]);
- APPLY_EQUATION(elements[0][2]);
- APPLY_EQUATION(elements[1][0]);
- APPLY_EQUATION(elements[1][1]);
- APPLY_EQUATION(elements[1][2]);
- APPLY_EQUATION(elements[2][0]);
- APPLY_EQUATION(elements[2][1]);
- APPLY_EQUATION(elements[2][2]);
- result = r;
- } break;
-
case Variant::TRANSFORM2D: {
// Get the transforms for initial and delta values
Transform2D i = initial_val;
@@ -509,6 +502,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(elements[2][1]);
result = r;
} break;
+
case Variant::QUAT: {
// Get the quaternian for the initial and delta values
Quat i = initial_val;
@@ -523,6 +517,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(w);
result = r;
} break;
+
case Variant::AABB: {
// Get the AABB's for the initial and delta values
AABB i = initial_val;
@@ -539,6 +534,27 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(size.z);
result = r;
} break;
+
+ case Variant::BASIS: {
+ // Get the basis for initial and delta values
+ Basis i = initial_val;
+ Basis d = delta_val;
+ Basis r;
+
+ // Execute the equation on all the basis and mutate the r basis
+ // This uses the custom APPLY_EQUATION macro defined above
+ APPLY_EQUATION(elements[0][0]);
+ APPLY_EQUATION(elements[0][1]);
+ APPLY_EQUATION(elements[0][2]);
+ APPLY_EQUATION(elements[1][0]);
+ APPLY_EQUATION(elements[1][1]);
+ APPLY_EQUATION(elements[1][2]);
+ APPLY_EQUATION(elements[2][0]);
+ APPLY_EQUATION(elements[2][1]);
+ APPLY_EQUATION(elements[2][2]);
+ result = r;
+ } break;
+
case Variant::TRANSFORM: {
// Get the transforms for the initial and delta values
Transform i = initial_val;
@@ -561,6 +577,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(origin.z);
result = r;
} break;
+
case Variant::COLOR: {
// Get the Color for initial and delta value
Color i = initial_val;
@@ -575,6 +592,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(a);
result = r;
} break;
+
default: {
// If unknown, just return the initial value
result = initial_val;
@@ -607,7 +625,7 @@ bool Tween::_apply_tween_value(InterpolateData &p_data, Variant &value) {
case FOLLOW_METHOD:
case TARGETING_METHOD: {
// We want to call the method on the target object
- Variant::CallError error;
+ Callable::CallError error;
// Do we have a non-nil value passed in?
if (value.get_type() != Variant::NIL) {
@@ -620,7 +638,7 @@ bool Tween::_apply_tween_value(InterpolateData &p_data, Variant &value) {
}
// Did we get an error from the function call?
- return error.error == Variant::CallError::CALL_OK;
+ return error.error == Callable::CallError::CALL_OK;
}
case INTER_CALLBACK:
@@ -732,7 +750,7 @@ void Tween::_tween_process(float p_delta) {
}
} else {
// Call the function directly with the arguments
- Variant::CallError error;
+ Callable::CallError error;
Variant *arg[5] = {
&data.arg[0],
&data.arg[1],
@@ -820,23 +838,22 @@ float Tween::get_speed_scale() const {
return speed_scale;
}
-bool Tween::start() {
+void Tween::start() {
- ERR_FAIL_COND_V_MSG(!is_inside_tree(), false, "Tween was not added to the SceneTree!");
+ ERR_FAIL_COND_MSG(!is_inside_tree(), "Tween was not added to the SceneTree!");
// Are there any pending updates?
if (pending_update != 0) {
// Start the tweens after deferring
call_deferred("start");
- return true;
+ return;
}
// We want to be activated
set_active(true);
- return true;
}
-bool Tween::reset(Object *p_object, StringName p_key) {
+void Tween::reset(Object *p_object, StringName p_key) {
// Find all interpolations that use the same object and target string
pending_update++;
for (List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
@@ -858,10 +875,9 @@ bool Tween::reset(Object *p_object, StringName p_key) {
}
}
pending_update--;
- return true;
}
-bool Tween::reset_all() {
+void Tween::reset_all() {
// Go through all interpolations
pending_update++;
for (List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
@@ -875,10 +891,9 @@ bool Tween::reset_all() {
_apply_tween_value(data, data.initial_val);
}
pending_update--;
- return true;
}
-bool Tween::stop(Object *p_object, StringName p_key) {
+void Tween::stop(Object *p_object, StringName p_key) {
// Find the tween that has the given target object and string key
pending_update++;
for (List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
@@ -895,10 +910,9 @@ bool Tween::stop(Object *p_object, StringName p_key) {
data.active = false;
}
pending_update--;
- return true;
}
-bool Tween::stop_all() {
+void Tween::stop_all() {
// We no longer need to be active since all tweens have been stopped
set_active(false);
@@ -910,10 +924,9 @@ bool Tween::stop_all() {
data.active = false;
}
pending_update--;
- return true;
}
-bool Tween::resume(Object *p_object, StringName p_key) {
+void Tween::resume(Object *p_object, StringName p_key) {
// We need to be activated
// TODO: What if no tween is found??
set_active(true);
@@ -932,10 +945,9 @@ bool Tween::resume(Object *p_object, StringName p_key) {
data.active = true;
}
pending_update--;
- return true;
}
-bool Tween::resume_all() {
+void Tween::resume_all() {
// Set ourselves active so we can process tweens
// TODO: What if there are no tweens? We get set to active for no reason!
set_active(true);
@@ -948,14 +960,13 @@ bool Tween::resume_all() {
data.active = true;
}
pending_update--;
- return true;
}
-bool Tween::remove(Object *p_object, StringName p_key) {
+void Tween::remove(Object *p_object, StringName p_key) {
// If we are still updating, call this function again later
if (pending_update != 0) {
call_deferred("remove", p_object, p_key);
- return true;
+ return;
}
// For each interpolation...
@@ -978,7 +989,6 @@ bool Tween::remove(Object *p_object, StringName p_key) {
// Erase it
interpolates.erase(E->get());
}
- return true;
}
void Tween::_remove_by_uid(int uid) {
@@ -1008,11 +1018,11 @@ void Tween::_push_interpolate_data(InterpolateData &p_data) {
pending_update--;
}
-bool Tween::remove_all() {
+void Tween::remove_all() {
// If we are still updating, call this function again later
if (pending_update != 0) {
call_deferred("remove_all");
- return true;
+ return;
}
// We no longer need to be active
set_active(false);
@@ -1020,11 +1030,9 @@ bool Tween::remove_all() {
// Clear out all interpolations and reset the uid
interpolates.clear();
uid = 0;
-
- return true;
}
-bool Tween::seek(real_t p_time) {
+void Tween::seek(real_t p_time) {
// Go through each interpolation...
pending_update++;
for (List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
@@ -1058,7 +1066,6 @@ bool Tween::seek(real_t p_time) {
_apply_tween_value(data, result);
}
pending_update--;
- return true;
}
real_t Tween::tell() const {
@@ -1119,8 +1126,8 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = (int)final_val - (int)initial_val;
break;
- case Variant::REAL:
- // Convert to REAL and find the delta
+ case Variant::FLOAT:
+ // Convert to FLOAT and find the delta
delta_val = (real_t)final_val - (real_t)initial_val;
break;
@@ -1129,26 +1136,18 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = final_val.operator Vector2() - initial_val.operator Vector2();
break;
+ case Variant::RECT2: {
+ // Build a new Rect2 and use the new position and sizes to make a delta
+ Rect2 i = initial_val;
+ Rect2 f = final_val;
+ delta_val = Rect2(f.position - i.position, f.size - i.size);
+ } break;
+
case Variant::VECTOR3:
// Convert to Vectors and find the delta
delta_val = final_val.operator Vector3() - initial_val.operator Vector3();
break;
- case Variant::BASIS: {
- // Build a new basis which is the delta between the initial and final values
- Basis i = initial_val;
- Basis f = final_val;
- delta_val = Basis(f.elements[0][0] - i.elements[0][0],
- f.elements[0][1] - i.elements[0][1],
- f.elements[0][2] - i.elements[0][2],
- f.elements[1][0] - i.elements[1][0],
- f.elements[1][1] - i.elements[1][1],
- f.elements[1][2] - i.elements[1][2],
- f.elements[2][0] - i.elements[2][0],
- f.elements[2][1] - i.elements[2][1],
- f.elements[2][2] - i.elements[2][2]);
- } break;
-
case Variant::TRANSFORM2D: {
// Build a new transform which is the difference between the initial and final values
Transform2D i = initial_val;
@@ -1175,6 +1174,21 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = AABB(f.position - i.position, f.size - i.size);
} break;
+ case Variant::BASIS: {
+ // Build a new basis which is the delta between the initial and final values
+ Basis i = initial_val;
+ Basis f = final_val;
+ delta_val = Basis(f.elements[0][0] - i.elements[0][0],
+ f.elements[0][1] - i.elements[0][1],
+ f.elements[0][2] - i.elements[0][2],
+ f.elements[1][0] - i.elements[1][0],
+ f.elements[1][1] - i.elements[1][1],
+ f.elements[1][2] - i.elements[1][2],
+ f.elements[2][0] - i.elements[2][0],
+ f.elements[2][1] - i.elements[2][1],
+ f.elements[2][2] - i.elements[2][2]);
+ } break;
+
case Variant::TRANSFORM: {
// Build a new transform which is the difference between the initial and final values
Transform i = initial_val;
@@ -1203,15 +1217,39 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = Color(f.r - i.r, f.g - i.g, f.b - i.b, f.a - i.a);
} break;
- default:
- // TODO: Should move away from a 'magic string'?
- ERR_PRINT("Invalid param type, except(int/real/vector2/vector/matrix/matrix32/quat/aabb/transform/color)");
+ default: {
+ static Variant::Type supported_types[] = {
+ Variant::BOOL,
+ Variant::INT,
+ Variant::FLOAT,
+ Variant::VECTOR2,
+ Variant::RECT2,
+ Variant::VECTOR3,
+ Variant::TRANSFORM2D,
+ Variant::QUAT,
+ Variant::AABB,
+ Variant::BASIS,
+ Variant::TRANSFORM,
+ Variant::COLOR,
+ };
+
+ int length = *(&supported_types + 1) - supported_types;
+ String error_msg = "Invalid parameter type. Supported types are: ";
+ for (int i = 0; i < length; i++) {
+ if (i != 0) {
+ error_msg += ", ";
+ }
+ error_msg += Variant::get_type_name(supported_types[i]);
+ }
+ error_msg += ".";
+ ERR_PRINT(error_msg);
return false;
+ }
};
return true;
}
-bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p_object, NodePath *p_property, StringName *p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p_object, NodePath *p_property, StringName *p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// TODO: Add initialization+implementation for remaining interpolation types
// TODO: Fix this method's organization to take advantage of the type
@@ -1226,28 +1264,28 @@ bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p
// Validate and apply interpolation data
// Give it the object
- ERR_FAIL_COND_V_MSG(p_object == NULL, false, "Invalid object provided to Tween.");
+ ERR_FAIL_COND_MSG(p_object == NULL, "Invalid object provided to Tween.");
data.id = p_object->get_instance_id();
// Validate the initial and final values
- ERR_FAIL_COND_V_MSG(p_initial_val.get_type() != p_final_val.get_type(), false, "Initial value type '" + Variant::get_type_name(p_initial_val.get_type()) + "' does not match final value type '" + Variant::get_type_name(p_final_val.get_type()) + "'.");
+ ERR_FAIL_COND_MSG(p_initial_val.get_type() != p_final_val.get_type(), "Initial value type '" + Variant::get_type_name(p_initial_val.get_type()) + "' does not match final value type '" + Variant::get_type_name(p_final_val.get_type()) + "'.");
data.initial_val = p_initial_val;
data.final_val = p_final_val;
// Check the Duration
- ERR_FAIL_COND_V_MSG(p_duration < 0, false, "Only non-negative duration values allowed in Tweens.");
+ ERR_FAIL_COND_MSG(p_duration < 0, "Only non-negative duration values allowed in Tweens.");
data.duration = p_duration;
// Tween Delay
- ERR_FAIL_COND_V_MSG(p_delay < 0, false, "Only non-negative delay values allowed in Tweens.");
+ ERR_FAIL_COND_MSG(p_delay < 0, "Only non-negative delay values allowed in Tweens.");
data.delay = p_delay;
// Transition type
- ERR_FAIL_COND_V_MSG(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, false, "Invalid transition type provided to Tween.");
+ ERR_FAIL_COND_MSG(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, "Invalid transition type provided to Tween.");
data.trans_type = p_trans_type;
// Easing type
- ERR_FAIL_COND_V_MSG(p_ease_type < 0 || p_ease_type >= EASE_COUNT, false, "Invalid easing type provided to Tween.");
+ ERR_FAIL_COND_MSG(p_ease_type < 0 || p_ease_type >= EASE_COUNT, "Invalid easing type provided to Tween.");
data.ease_type = p_ease_type;
// Is the property defined?
@@ -1255,7 +1293,7 @@ bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p
// Check that the object actually contains the given property
bool prop_valid = false;
p_object->get_indexed(p_property->get_subnames(), &prop_valid);
- ERR_FAIL_COND_V_MSG(!prop_valid, false, "Tween target object has no property named: " + p_property->get_concatenated_subnames() + ".");
+ ERR_FAIL_COND_MSG(!prop_valid, "Tween target object has no property named: " + p_property->get_concatenated_subnames() + ".");
data.key = p_property->get_subnames();
data.concatenated_key = p_property->get_concatenated_subnames();
@@ -1264,7 +1302,7 @@ bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p
// Is the method defined?
if (p_method) {
// Does the object even have the requested method?
- ERR_FAIL_COND_V_MSG(!p_object->has_method(*p_method), false, "Tween target object has no method named: " + *p_method + ".");
+ ERR_FAIL_COND_MSG(!p_object->has_method(*p_method), "Tween target object has no method named: " + *p_method + ".");
data.key.push_back(*p_method);
data.concatenated_key = *p_method;
@@ -1272,18 +1310,17 @@ bool Tween::_build_interpolation(InterpolateType p_interpolation_type, Object *p
// Is there not a valid delta?
if (!_calc_delta_val(data.initial_val, data.final_val, data.delta_val))
- return false;
+ return;
// Add this interpolation to the total
_push_interpolate_data(data);
- return true;
}
-bool Tween::interpolate_property(Object *p_object, NodePath p_property, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::interpolate_property(Object *p_object, NodePath p_property, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are busy updating, call this function again later
if (pending_update != 0) {
_add_pending_command("interpolate_property", p_object, p_property, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
// Get the property from the node path
@@ -1298,15 +1335,14 @@ bool Tween::interpolate_property(Object *p_object, NodePath p_property, Variant
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Build the interpolation data
- bool result = _build_interpolation(INTER_PROPERTY, p_object, &p_property, NULL, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return result;
+ _build_interpolation(INTER_PROPERTY, p_object, &p_property, NULL, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
}
-bool Tween::interpolate_method(Object *p_object, StringName p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::interpolate_method(Object *p_object, StringName p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are busy updating, call this function again later
if (pending_update != 0) {
_add_pending_command("interpolate_method", p_object, p_method, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
// Convert any integers into REALs as they are better for interpolation
@@ -1314,25 +1350,24 @@ bool Tween::interpolate_method(Object *p_object, StringName p_method, Variant p_
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Build the interpolation data
- bool result = _build_interpolation(INTER_METHOD, p_object, NULL, &p_method, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return result;
+ _build_interpolation(INTER_METHOD, p_object, NULL, &p_method, p_initial_val, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
}
-bool Tween::interpolate_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE) {
+void Tween::interpolate_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE) {
// If we are already updating, call this function again later
if (pending_update != 0) {
_add_pending_command("interpolate_callback", p_object, p_duration, p_callback, p_arg1, p_arg2, p_arg3, p_arg4, p_arg5);
- return true;
+ return;
}
// Check that the target object is valid
- ERR_FAIL_COND_V(p_object == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
// Duration cannot be negative
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Check whether the object even has the callback
- ERR_FAIL_COND_V_MSG(!p_object->has_method(p_callback), false, "Object has no callback named: " + p_callback + ".");
+ ERR_FAIL_COND_MSG(!p_object->has_method(p_callback), "Object has no callback named: " + p_callback + ".");
// Build a new InterpolationData
InterpolateData data;
@@ -1373,24 +1408,23 @@ bool Tween::interpolate_callback(Object *p_object, real_t p_duration, String p_c
// Add the new interpolation
_push_interpolate_data(data);
- return true;
}
-bool Tween::interpolate_deferred_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE) {
+void Tween::interpolate_deferred_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE) {
// If we are already updating, call this function again later
if (pending_update != 0) {
_add_pending_command("interpolate_deferred_callback", p_object, p_duration, p_callback, p_arg1, p_arg2, p_arg3, p_arg4, p_arg5);
- return true;
+ return;
}
// Check that the target object is valid
- ERR_FAIL_COND_V(p_object == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
// No negative durations allowed
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Confirm the callback exists on the object
- ERR_FAIL_COND_V_MSG(!p_object->has_method(p_callback), false, "Object has no callback named: " + p_callback + ".");
+ ERR_FAIL_COND_MSG(!p_object->has_method(p_callback), "Object has no callback named: " + p_callback + ".");
// Create a new InterpolateData for the callback
InterpolateData data;
@@ -1431,14 +1465,13 @@ bool Tween::interpolate_deferred_callback(Object *p_object, real_t p_duration, S
// Add the new interpolation
_push_interpolate_data(data);
- return true;
}
-bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_initial_val, Object *p_target, NodePath p_target_property, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::follow_property(Object *p_object, NodePath p_property, Variant p_initial_val, Object *p_target, NodePath p_target_property, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are already updating, call this function again later
if (pending_update != 0) {
_add_pending_command("follow_property", p_object, p_property, p_initial_val, p_target, p_target_property, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
// Get the two properties from their paths
@@ -1449,37 +1482,37 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini
// TODO: Is this documented? It's really helpful for decluttering tweens
if (p_initial_val.get_type() == Variant::NIL) p_initial_val = p_object->get_indexed(p_property.get_subnames());
- // Convert initial INT values to REAL as they are better for interpolation
+ // Convert initial INT values to FLOAT as they are better for interpolation
if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t();
// Confirm the source and target objects are valid
- ERR_FAIL_COND_V(p_object == NULL, false);
- ERR_FAIL_COND_V(p_target == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
+ ERR_FAIL_COND(p_target == NULL);
// No negative durations
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Ensure transition and easing types are valid
- ERR_FAIL_COND_V(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, false);
- ERR_FAIL_COND_V(p_ease_type < 0 || p_ease_type >= EASE_COUNT, false);
+ ERR_FAIL_COND(p_trans_type < 0 || p_trans_type >= TRANS_COUNT);
+ ERR_FAIL_COND(p_ease_type < 0 || p_ease_type >= EASE_COUNT);
// No negative delays
- ERR_FAIL_COND_V(p_delay < 0, false);
+ ERR_FAIL_COND(p_delay < 0);
// Confirm the source and target objects have the desired properties
bool prop_valid = false;
p_object->get_indexed(p_property.get_subnames(), &prop_valid);
- ERR_FAIL_COND_V(!prop_valid, false);
+ ERR_FAIL_COND(!prop_valid);
bool target_prop_valid = false;
Variant target_val = p_target->get_indexed(p_target_property.get_subnames(), &target_prop_valid);
- ERR_FAIL_COND_V(!target_prop_valid, false);
+ ERR_FAIL_COND(!target_prop_valid);
- // Convert target INT to REAL since it is better for interpolation
+ // Convert target INT to FLOAT since it is better for interpolation
if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t();
// Verify that the target value and initial value are the same type
- ERR_FAIL_COND_V(target_val.get_type() != p_initial_val.get_type(), false);
+ ERR_FAIL_COND(target_val.get_type() != p_initial_val.get_type());
// Create a new InterpolateData
InterpolateData data;
@@ -1502,44 +1535,43 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini
// Add the interpolation
_push_interpolate_data(data);
- return true;
}
-bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initial_val, Object *p_target, StringName p_target_method, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::follow_method(Object *p_object, StringName p_method, Variant p_initial_val, Object *p_target, StringName p_target_method, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are currently updating, call this function again later
if (pending_update != 0) {
_add_pending_command("follow_method", p_object, p_method, p_initial_val, p_target, p_target_method, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
- // Convert initial INT values to REAL as they are better for interpolation
+ // Convert initial INT values to FLOAT as they are better for interpolation
if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t();
// Verify the source and target objects are valid
- ERR_FAIL_COND_V(p_object == NULL, false);
- ERR_FAIL_COND_V(p_target == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
+ ERR_FAIL_COND(p_target == NULL);
// No negative durations
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Ensure that the transition and ease types are valid
- ERR_FAIL_COND_V(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, false);
- ERR_FAIL_COND_V(p_ease_type < 0 || p_ease_type >= EASE_COUNT, false);
+ ERR_FAIL_COND(p_trans_type < 0 || p_trans_type >= TRANS_COUNT);
+ ERR_FAIL_COND(p_ease_type < 0 || p_ease_type >= EASE_COUNT);
// No negative delays
- ERR_FAIL_COND_V(p_delay < 0, false);
+ ERR_FAIL_COND(p_delay < 0);
// Confirm both objects have the target methods
- ERR_FAIL_COND_V_MSG(!p_object->has_method(p_method), false, "Object has no method named: " + p_method + ".");
- ERR_FAIL_COND_V_MSG(!p_target->has_method(p_target_method), false, "Target has no method named: " + p_target_method + ".");
+ ERR_FAIL_COND_MSG(!p_object->has_method(p_method), "Object has no method named: " + p_method + ".");
+ ERR_FAIL_COND_MSG(!p_target->has_method(p_target_method), "Target has no method named: " + p_target_method + ".");
// Call the method to get the target value
- Variant::CallError error;
+ Callable::CallError error;
Variant target_val = p_target->call(p_target_method, NULL, 0, error);
- ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, false);
+ ERR_FAIL_COND(error.error != Callable::CallError::CALL_OK);
- // Convert target INT values to REAL as they are better for interpolation
+ // Convert target INT values to FLOAT as they are better for interpolation
if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t();
- ERR_FAIL_COND_V(target_val.get_type() != p_initial_val.get_type(), false);
+ ERR_FAIL_COND(target_val.get_type() != p_initial_val.get_type());
// Make the new InterpolateData for the method follow
InterpolateData data;
@@ -1562,48 +1594,47 @@ bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initi
// Add the new interpolation
_push_interpolate_data(data);
- return true;
}
-bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_initial, NodePath p_initial_property, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_initial, NodePath p_initial_property, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are currently updating, call this function again later
if (pending_update != 0) {
_add_pending_command("targeting_property", p_object, p_property, p_initial, p_initial_property, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
// Grab the target property and the target property
p_property = p_property.get_as_property_path();
p_initial_property = p_initial_property.get_as_property_path();
- // Convert the initial INT values to REAL as they are better for Interpolation
+ // Convert the initial INT values to FLOAT as they are better for Interpolation
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Verify both objects are valid
- ERR_FAIL_COND_V(p_object == NULL, false);
- ERR_FAIL_COND_V(p_initial == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
+ ERR_FAIL_COND(p_initial == NULL);
// No negative durations
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Ensure transition and easing types are valid
- ERR_FAIL_COND_V(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, false);
- ERR_FAIL_COND_V(p_ease_type < 0 || p_ease_type >= EASE_COUNT, false);
+ ERR_FAIL_COND(p_trans_type < 0 || p_trans_type >= TRANS_COUNT);
+ ERR_FAIL_COND(p_ease_type < 0 || p_ease_type >= EASE_COUNT);
// No negative delays
- ERR_FAIL_COND_V(p_delay < 0, false);
+ ERR_FAIL_COND(p_delay < 0);
// Ensure the initial and target properties exist on their objects
bool prop_valid = false;
p_object->get_indexed(p_property.get_subnames(), &prop_valid);
- ERR_FAIL_COND_V(!prop_valid, false);
+ ERR_FAIL_COND(!prop_valid);
bool initial_prop_valid = false;
Variant initial_val = p_initial->get_indexed(p_initial_property.get_subnames(), &initial_prop_valid);
- ERR_FAIL_COND_V(!initial_prop_valid, false);
+ ERR_FAIL_COND(!initial_prop_valid);
- // Convert the initial INT value to REAL as it is better for interpolation
+ // Convert the initial INT value to FLOAT as it is better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
- ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false);
+ ERR_FAIL_COND(initial_val.get_type() != p_final_val.get_type());
// Build the InterpolateData object
InterpolateData data;
@@ -1626,50 +1657,50 @@ bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_
data.delay = p_delay;
// Ensure there is a valid delta
- if (!_calc_delta_val(data.initial_val, data.final_val, data.delta_val))
- return false;
+ if (!_calc_delta_val(data.initial_val, data.final_val, data.delta_val)) {
+ return;
+ }
// Add the interpolation
_push_interpolate_data(data);
- return true;
}
-bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_initial, StringName p_initial_method, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
+void Tween::targeting_method(Object *p_object, StringName p_method, Object *p_initial, StringName p_initial_method, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay) {
// If we are currently updating, call this function again later
if (pending_update != 0) {
_add_pending_command("targeting_method", p_object, p_method, p_initial, p_initial_method, p_final_val, p_duration, p_trans_type, p_ease_type, p_delay);
- return true;
+ return;
}
- // Convert final INT values to REAL as they are better for interpolation
+ // Convert final INT values to FLOAT as they are better for interpolation
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Make sure the given objects are valid
- ERR_FAIL_COND_V(p_object == NULL, false);
- ERR_FAIL_COND_V(p_initial == NULL, false);
+ ERR_FAIL_COND(p_object == NULL);
+ ERR_FAIL_COND(p_initial == NULL);
// No negative durations
- ERR_FAIL_COND_V(p_duration < 0, false);
+ ERR_FAIL_COND(p_duration < 0);
// Ensure transition and easing types are valid
- ERR_FAIL_COND_V(p_trans_type < 0 || p_trans_type >= TRANS_COUNT, false);
- ERR_FAIL_COND_V(p_ease_type < 0 || p_ease_type >= EASE_COUNT, false);
+ ERR_FAIL_COND(p_trans_type < 0 || p_trans_type >= TRANS_COUNT);
+ ERR_FAIL_COND(p_ease_type < 0 || p_ease_type >= EASE_COUNT);
// No negative delays
- ERR_FAIL_COND_V(p_delay < 0, false);
+ ERR_FAIL_COND(p_delay < 0);
// Make sure both objects have the given method
- ERR_FAIL_COND_V_MSG(!p_object->has_method(p_method), false, "Object has no method named: " + p_method + ".");
- ERR_FAIL_COND_V_MSG(!p_initial->has_method(p_initial_method), false, "Initial Object has no method named: " + p_initial_method + ".");
+ ERR_FAIL_COND_MSG(!p_object->has_method(p_method), "Object has no method named: " + p_method + ".");
+ ERR_FAIL_COND_MSG(!p_initial->has_method(p_initial_method), "Initial Object has no method named: " + p_initial_method + ".");
// Call the method to get the initial value
- Variant::CallError error;
+ Callable::CallError error;
Variant initial_val = p_initial->call(p_initial_method, NULL, 0, error);
- ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, false);
+ ERR_FAIL_COND(error.error != Callable::CallError::CALL_OK);
- // Convert initial INT values to REAL as they aer better for interpolation
+ // Convert initial INT values to FLOAT as they aer better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
- ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false);
+ ERR_FAIL_COND(initial_val.get_type() != p_final_val.get_type());
// Build the new InterpolateData object
InterpolateData data;
@@ -1692,12 +1723,12 @@ bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in
data.delay = p_delay;
// Ensure there is a valid delta
- if (!_calc_delta_val(data.initial_val, data.final_val, data.delta_val))
- return false;
+ if (!_calc_delta_val(data.initial_val, data.final_val, data.delta_val)) {
+ return;
+ }
// Add the interpolation
_push_interpolate_data(data);
- return true;
}
Tween::Tween() {
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index f1218cd698..f74df50f68 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -142,7 +142,7 @@ private:
void _tween_process(float p_delta);
void _remove_by_uid(int uid);
void _push_interpolate_data(InterpolateData &p_data);
- bool _build_interpolation(InterpolateType p_interpolation_type, Object *p_object, NodePath *p_property, StringName *p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay);
+ void _build_interpolation(InterpolateType p_interpolation_type, Object *p_object, NodePath *p_property, StringName *p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay);
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -165,28 +165,28 @@ public:
void set_speed_scale(float p_speed);
float get_speed_scale() const;
- bool start();
- bool reset(Object *p_object, StringName p_key);
- bool reset_all();
- bool stop(Object *p_object, StringName p_key);
- bool stop_all();
- bool resume(Object *p_object, StringName p_key);
- bool resume_all();
- bool remove(Object *p_object, StringName p_key);
- bool remove_all();
-
- bool seek(real_t p_time);
+ void start();
+ void reset(Object *p_object, StringName p_key);
+ void reset_all();
+ void stop(Object *p_object, StringName p_key);
+ void stop_all();
+ void resume(Object *p_object, StringName p_key);
+ void resume_all();
+ void remove(Object *p_object, StringName p_key);
+ void remove_all();
+
+ void seek(real_t p_time);
real_t tell() const;
real_t get_runtime() const;
- bool interpolate_property(Object *p_object, NodePath p_property, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
- bool interpolate_method(Object *p_object, StringName p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
- bool interpolate_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);
- bool interpolate_deferred_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);
- bool follow_property(Object *p_object, NodePath p_property, Variant p_initial_val, Object *p_target, NodePath p_target_property, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
- bool follow_method(Object *p_object, StringName p_method, Variant p_initial_val, Object *p_target, StringName p_target_method, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
- bool targeting_property(Object *p_object, NodePath p_property, Object *p_initial, NodePath p_initial_property, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
- bool targeting_method(Object *p_object, StringName p_method, Object *p_initial, StringName p_initial_method, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void interpolate_property(Object *p_object, NodePath p_property, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void interpolate_method(Object *p_object, StringName p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void interpolate_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);
+ void interpolate_deferred_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);
+ void follow_property(Object *p_object, NodePath p_property, Variant p_initial_val, Object *p_target, NodePath p_target_property, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void follow_method(Object *p_object, StringName p_method, Variant p_initial_val, Object *p_target, StringName p_target_method, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void targeting_property(Object *p_object, NodePath p_property, Object *p_initial, NodePath p_initial_property, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
+ void targeting_method(Object *p_object, StringName p_method, Object *p_initial, StringName p_initial_method, Variant p_final_val, real_t p_duration, TransitionType p_trans_type = TRANS_LINEAR, EaseType p_ease_type = EASE_IN_OUT, real_t p_delay = 0);
Tween();
~Tween();
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 3a0169f065..2582bab200 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -403,21 +403,19 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_playing", "enable"), &AudioStreamPlayer::_set_playing);
ClassDB::bind_method(D_METHOD("_is_active"), &AudioStreamPlayer::_is_active);
- ClassDB::bind_method(D_METHOD("_bus_layout_changed"), &AudioStreamPlayer::_bus_layout_changed);
-
ClassDB::bind_method(D_METHOD("set_stream_paused", "pause"), &AudioStreamPlayer::set_stream_paused);
ClassDB::bind_method(D_METHOD("get_stream_paused"), &AudioStreamPlayer::get_stream_paused);
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer::get_stream_playback);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_SIGNAL(MethodInfo("finished"));
@@ -441,7 +439,7 @@ AudioStreamPlayer::AudioStreamPlayer() {
setstop = false;
use_fadeout = false;
- AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
+ AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer::_bus_layout_changed));
}
AudioStreamPlayer::~AudioStreamPlayer() {
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
new file mode 100644
index 0000000000..22ff0611a7
--- /dev/null
+++ b/scene/debugger/scene_debugger.cpp
@@ -0,0 +1,871 @@
+/*************************************************************************/
+/* scene_debugger.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 "scene_debugger.h"
+
+#include "core/io/marshalls.h"
+#include "core/script_debugger_remote.h"
+#include "scene/main/scene_tree.h"
+#include "scene/main/viewport.h"
+#include "scene/resources/packed_scene.h"
+
+void SceneDebugger::initialize() {
+#ifdef DEBUG_ENABLED
+ LiveEditor::singleton = memnew(LiveEditor);
+ ScriptDebuggerRemote::scene_tree_parse_func = SceneDebugger::parse_message;
+#endif
+}
+
+void SceneDebugger::deinitialize() {
+#ifdef DEBUG_ENABLED
+ if (LiveEditor::singleton) {
+ memdelete(LiveEditor::singleton);
+ LiveEditor::singleton = NULL;
+ }
+#endif
+}
+
+#ifdef DEBUG_ENABLED
+Error SceneDebugger::parse_message(const String &p_msg, const Array &p_args) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return ERR_UNCONFIGURED;
+ LiveEditor *live_editor = LiveEditor::get_singleton();
+ if (!live_editor)
+ return ERR_UNCONFIGURED;
+ if (p_msg == "request_scene_tree") { // Scene tree
+ live_editor->_send_tree();
+
+ } else if (p_msg == "save_node") { // Save node.
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ _save_node(p_args[0], p_args[1]);
+
+ } else if (p_msg == "inspect_object") { // Object Inspect
+ ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
+ ObjectID id = p_args[0];
+ _send_object_id(id);
+
+ } else if (p_msg == "override_camera_2D:set") { // Camera
+ ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
+ bool enforce = p_args[0];
+ scene_tree->get_root()->enable_canvas_transform_override(enforce);
+
+ } else if (p_msg == "override_camera_2D:transform") {
+ ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
+ Transform2D transform = p_args[1];
+ scene_tree->get_root()->set_canvas_transform_override(transform);
+
+ } else if (p_msg == "override_camera_3D:set") {
+ ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
+ bool enable = p_args[0];
+ scene_tree->get_root()->enable_camera_override(enable);
+
+ } else if (p_msg == "override_camera_3D:transform") {
+ ERR_FAIL_COND_V(p_args.size() < 5, ERR_INVALID_DATA);
+ Transform transform = p_args[0];
+ bool is_perspective = p_args[1];
+ float size_or_fov = p_args[2];
+ float near = p_args[3];
+ float far = p_args[4];
+ if (is_perspective) {
+ scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far);
+ } else {
+ scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far);
+ }
+ scene_tree->get_root()->set_camera_override_transform(transform);
+
+ } else if (p_msg == "set_object_property") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ _set_object_property(p_args[0], p_args[1], p_args[2]);
+
+ } else if (!p_msg.begins_with("live_")) { // Live edits below.
+ return ERR_SKIP;
+ } else if (p_msg == "live_set_root") {
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ live_editor->_root_func(p_args[0], p_args[1]);
+
+ } else if (p_msg == "live_node_path") {
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ live_editor->_node_path_func(p_args[0], p_args[1]);
+
+ } else if (p_msg == "live_res_path") {
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ live_editor->_res_path_func(p_args[0], p_args[1]);
+
+ } else if (p_msg == "live_node_prop_res") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_node_set_res_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_node_prop") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_node_set_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_res_prop_res") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_res_set_res_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_res_prop") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_res_set_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_node_call") {
+ ERR_FAIL_COND_V(p_args.size() < 7, ERR_INVALID_DATA);
+ live_editor->_node_call_func(p_args[0], p_args[1], p_args[2], p_args[3], p_args[4], p_args[5], p_args[6]);
+
+ } else if (p_msg == "live_res_call") {
+ ERR_FAIL_COND_V(p_args.size() < 7, ERR_INVALID_DATA);
+ live_editor->_res_call_func(p_args[0], p_args[1], p_args[2], p_args[3], p_args[4], p_args[5], p_args[6]);
+
+ } else if (p_msg == "live_create_node") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_create_node_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_instance_node") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_instance_node_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_remove_node") {
+ ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
+ live_editor->_remove_node_func(p_args[0]);
+
+ } else if (p_msg == "live_remove_and_keep_node") {
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ live_editor->_remove_and_keep_node_func(p_args[0], p_args[1]);
+
+ } else if (p_msg == "live_restore_node") {
+ ERR_FAIL_COND_V(p_args.size() < 3, ERR_INVALID_DATA);
+ live_editor->_restore_node_func(p_args[0], p_args[1], p_args[2]);
+
+ } else if (p_msg == "live_duplicate_node") {
+ ERR_FAIL_COND_V(p_args.size() < 2, ERR_INVALID_DATA);
+ live_editor->_duplicate_node_func(p_args[0], p_args[1]);
+
+ } else if (p_msg == "live_reparent_node") {
+ ERR_FAIL_COND_V(p_args.size() < 4, ERR_INVALID_DATA);
+ live_editor->_reparent_node_func(p_args[0], p_args[1], p_args[2], p_args[3]);
+ } else {
+ return ERR_SKIP;
+ }
+ return OK;
+}
+
+void SceneDebugger::_save_node(ObjectID id, const String &p_path) {
+ Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id));
+ ERR_FAIL_COND(!node);
+
+ WARN_PRINT("SAVING " + itos(id) + " TO " + p_path);
+ Ref<PackedScene> ps = memnew(PackedScene);
+ ps->pack(node);
+ ResourceSaver::save(p_path, ps);
+}
+
+void SceneDebugger::_send_object_id(ObjectID p_id, int p_max_size) {
+ SceneDebuggerObject obj(p_id);
+ if (obj.id.is_null())
+ return;
+
+ Array arr;
+ obj.serialize(arr);
+ ScriptDebugger::get_singleton()->send_message("inspect_object", arr);
+}
+
+void SceneDebugger::_set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value) {
+
+ Object *obj = ObjectDB::get_instance(p_id);
+ if (!obj)
+ return;
+
+ String prop_name = p_property;
+ if (p_property.begins_with("Members/")) {
+ Vector<String> ss = p_property.split("/");
+ prop_name = ss[ss.size() - 1];
+ }
+
+ obj->set(prop_name, p_value);
+}
+
+void SceneDebugger::add_to_cache(const String &p_filename, Node *p_node) {
+ LiveEditor *debugger = LiveEditor::get_singleton();
+ if (!debugger)
+ return;
+
+ if (ScriptDebugger::get_singleton() && p_filename != String()) {
+ debugger->live_scene_edit_cache[p_filename].insert(p_node);
+ }
+}
+void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) {
+ LiveEditor *debugger = LiveEditor::get_singleton();
+ if (!debugger)
+ return;
+
+ Map<String, Set<Node *> > &edit_cache = debugger->live_scene_edit_cache;
+ Map<String, Set<Node *> >::Element *E = edit_cache.find(p_filename);
+ if (E) {
+ E->get().erase(p_node);
+ if (E->get().size() == 0) {
+ edit_cache.erase(E);
+ }
+ }
+
+ Map<Node *, Map<ObjectID, Node *> > &remove_list = debugger->live_edit_remove_list;
+ Map<Node *, Map<ObjectID, Node *> >::Element *F = remove_list.find(p_node);
+ if (F) {
+ for (Map<ObjectID, Node *>::Element *G = F->get().front(); G; G = G->next()) {
+
+ memdelete(G->get());
+ }
+ remove_list.erase(F);
+ }
+}
+
+/// SceneDebuggerObject
+SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) {
+ id = ObjectID();
+ Object *obj = ObjectDB::get_instance(p_id);
+ if (!obj)
+ return;
+
+ id = p_id;
+ class_name = obj->get_class();
+
+ if (ScriptInstance *si = obj->get_script_instance()) {
+ // Read script instance constants and variables
+ if (!si->get_script().is_null()) {
+ Script *s = si->get_script().ptr();
+ _parse_script_properties(s, si);
+ }
+ }
+
+ if (Node *node = Object::cast_to<Node>(obj)) {
+ // Add specialized NodePath info (if inside tree).
+ if (node->is_inside_tree()) {
+ PropertyInfo pi(Variant::NODE_PATH, String("Node/path"));
+ properties.push_back(SceneDebuggerProperty(pi, node->get_path()));
+ } else { // Can't ask for path if a node is not in tree.
+ PropertyInfo pi(Variant::STRING, String("Node/path"));
+ properties.push_back(SceneDebuggerProperty(pi, "[Orphan]"));
+ }
+ } else if (Script *s = Object::cast_to<Script>(obj)) {
+ // Add script constants (no instance).
+ _parse_script_properties(s, NULL);
+ }
+
+ // Add base object properties.
+ List<PropertyInfo> pinfo;
+ obj->get_property_list(&pinfo, true);
+ for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
+ if (E->get().usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) {
+ properties.push_back(SceneDebuggerProperty(E->get(), obj->get(E->get().name)));
+ }
+ }
+}
+
+void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInstance *p_instance) {
+ typedef Map<const Script *, Set<StringName> > ScriptMemberMap;
+ typedef Map<const Script *, Map<StringName, Variant> > ScriptConstantsMap;
+
+ ScriptMemberMap members;
+ if (p_instance) {
+ members[p_script] = Set<StringName>();
+ p_script->get_members(&(members[p_script]));
+ }
+
+ ScriptConstantsMap constants;
+ constants[p_script] = Map<StringName, Variant>();
+ p_script->get_constants(&(constants[p_script]));
+
+ Ref<Script> base = p_script->get_base_script();
+ while (base.is_valid()) {
+ if (p_instance) {
+ members[base.ptr()] = Set<StringName>();
+ base->get_members(&(members[base.ptr()]));
+ }
+
+ constants[base.ptr()] = Map<StringName, Variant>();
+ base->get_constants(&(constants[base.ptr()]));
+
+ base = base->get_base_script();
+ }
+
+ // Members
+ for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) {
+ for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) {
+ Variant m;
+ if (p_instance->get(E->get(), m)) {
+ String script_path = sm->key() == p_script ? "" : sm->key()->get_path().get_file() + "/";
+ PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get());
+ properties.push_back(SceneDebuggerProperty(pi, m));
+ }
+ }
+ }
+ // Constants
+ for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) {
+ for (Map<StringName, Variant>::Element *E = sc->get().front(); E; E = E->next()) {
+ String script_path = sc->key() == p_script ? "" : sc->key()->get_path().get_file() + "/";
+ if (E->value().get_type() == Variant::OBJECT) {
+ Variant id = ((Object *)E->value())->get_instance_id();
+ PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object");
+ properties.push_back(SceneDebuggerProperty(pi, id));
+ } else {
+ PropertyInfo pi(E->value().get_type(), "Constants/" + script_path + E->key());
+ properties.push_back(SceneDebuggerProperty(pi, E->value()));
+ }
+ }
+ }
+}
+
+void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) {
+ Array send_props;
+ for (int i = 0; i < properties.size(); i++) {
+ const PropertyInfo &pi = properties[i].first;
+ Variant &var = properties[i].second;
+
+ RES res = var;
+
+ if (var.get_type() == Variant::OBJECT && var.is_ref()) {
+ REF r = var;
+ if (r.is_valid()) {
+ res = *r;
+ } else {
+ res = RES();
+ }
+ }
+
+ Array prop;
+ prop.push_back(pi.name);
+ prop.push_back(pi.type);
+
+ PropertyHint hint = pi.hint;
+ String hint_string = pi.hint_string;
+ if (!res.is_null()) {
+ var = res->get_path();
+ } else { //only send information that can be sent..
+ int len = 0; //test how big is this to encode
+ encode_variant(var, NULL, len);
+ if (len > p_max_size) { //limit to max size
+ hint = PROPERTY_HINT_OBJECT_TOO_BIG;
+ hint_string = "";
+ var = Variant();
+ }
+ }
+ prop.push_back(hint);
+ prop.push_back(hint_string);
+ prop.push_back(pi.usage);
+ prop.push_back(var);
+ send_props.push_back(prop);
+ }
+ r_arr.push_back(uint64_t(id));
+ r_arr.push_back(class_name);
+ r_arr.push_back(send_props);
+}
+
+void SceneDebuggerObject::deserialize(const Array &p_arr) {
+#define CHECK_TYPE(p_what, p_type) ERR_FAIL_COND(p_what.get_type() != Variant::p_type);
+ ERR_FAIL_COND(p_arr.size() < 3);
+ CHECK_TYPE(p_arr[0], INT);
+ CHECK_TYPE(p_arr[1], STRING);
+ CHECK_TYPE(p_arr[2], ARRAY);
+
+ id = uint64_t(p_arr[0]);
+ class_name = p_arr[1];
+ Array props = p_arr[2];
+
+ for (int i = 0; i < props.size(); i++) {
+
+ CHECK_TYPE(props[i], ARRAY);
+ Array prop = props[i];
+
+ ERR_FAIL_COND(prop.size() != 6);
+ CHECK_TYPE(prop[0], STRING);
+ CHECK_TYPE(prop[1], INT);
+ CHECK_TYPE(prop[2], INT);
+ CHECK_TYPE(prop[3], STRING);
+ CHECK_TYPE(prop[4], INT);
+
+ PropertyInfo pinfo;
+ pinfo.name = prop[0];
+ pinfo.type = Variant::Type(int(prop[1]));
+ pinfo.hint = PropertyHint(int(prop[2]));
+ pinfo.hint_string = prop[3];
+ pinfo.usage = PropertyUsageFlags(int(prop[4]));
+ Variant var = prop[5];
+
+ if (pinfo.type == Variant::OBJECT) {
+ if (var.is_zero()) {
+ var = RES();
+ } else if (var.get_type() == Variant::OBJECT) {
+ if (((Object *)var)->is_class("EncodedObjectAsID")) {
+ var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id();
+ pinfo.type = var.get_type();
+ pinfo.hint = PROPERTY_HINT_OBJECT_ID;
+ pinfo.hint_string = "Object";
+ }
+ }
+ }
+ properties.push_back(SceneDebuggerProperty(pinfo, var));
+ }
+}
+
+/// SceneDebuggerTree
+SceneDebuggerTree::SceneDebuggerTree(Node *p_root) {
+ // Flatten tree into list, depth first, use stack to avoid recursion.
+ List<Node *> stack;
+ stack.push_back(p_root);
+ while (stack.size()) {
+ Node *n = stack[0];
+ stack.pop_front();
+ int count = n->get_child_count();
+ nodes.push_back(RemoteNode(count, n->get_name(), n->get_class(), n->get_instance_id()));
+ for (int i = 0; i < count; i++) {
+ stack.push_front(n->get_child(count - i - 1));
+ }
+ }
+}
+
+void SceneDebuggerTree::serialize(Array &p_arr) {
+ for (List<RemoteNode>::Element *E = nodes.front(); E; E = E->next()) {
+ RemoteNode &n = E->get();
+ p_arr.push_back(n.child_count);
+ p_arr.push_back(n.name);
+ p_arr.push_back(n.type_name);
+ p_arr.push_back(n.id);
+ }
+}
+
+void SceneDebuggerTree::deserialize(const Array &p_arr) {
+ int idx = 0;
+ while (p_arr.size() > idx) {
+ ERR_FAIL_COND(p_arr.size() < 4);
+ CHECK_TYPE(p_arr[idx], INT);
+ CHECK_TYPE(p_arr[idx + 1], STRING);
+ CHECK_TYPE(p_arr[idx + 2], STRING);
+ CHECK_TYPE(p_arr[idx + 3], INT);
+ nodes.push_back(RemoteNode(p_arr[idx], p_arr[idx + 1], p_arr[idx + 2], p_arr[idx + 3]));
+ idx += 4;
+ }
+}
+
+/// LiveEditor
+LiveEditor *LiveEditor::singleton = NULL;
+LiveEditor *LiveEditor::get_singleton() {
+ return singleton;
+}
+
+void LiveEditor::_send_tree() {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Array arr;
+ // Encoded as a flat list depth fist.
+ SceneDebuggerTree tree(scene_tree->root);
+ tree.serialize(arr);
+ ScriptDebugger::get_singleton()->send_message("scene_tree", arr);
+}
+
+void LiveEditor::_node_path_func(const NodePath &p_path, int p_id) {
+
+ live_edit_node_path_cache[p_id] = p_path;
+}
+
+void LiveEditor::_res_path_func(const String &p_path, int p_id) {
+
+ live_edit_resource_cache[p_id] = p_path;
+}
+
+void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value) {
+
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ if (!live_edit_node_path_cache.has(p_id))
+ return;
+
+ NodePath np = live_edit_node_path_cache[p_id];
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(np))
+ continue;
+ Node *n2 = n->get_node(np);
+
+ n2->set(p_prop, p_value);
+ }
+}
+
+void LiveEditor::_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value) {
+
+ RES r = ResourceLoader::load(p_value);
+ if (!r.is_valid())
+ return;
+ _node_set_func(p_id, p_prop, r);
+}
+void LiveEditor::_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+ if (!live_edit_node_path_cache.has(p_id))
+ return;
+
+ NodePath np = live_edit_node_path_cache[p_id];
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(np))
+ continue;
+ Node *n2 = n->get_node(np);
+
+ n2->call(p_method, VARIANT_ARG_PASS);
+ }
+}
+void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value) {
+
+ if (!live_edit_resource_cache.has(p_id))
+ return;
+
+ String resp = live_edit_resource_cache[p_id];
+
+ if (!ResourceCache::has(resp))
+ return;
+
+ RES r = ResourceCache::get(resp);
+ if (!r.is_valid())
+ return;
+
+ r->set(p_prop, p_value);
+}
+void LiveEditor::_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) {
+
+ RES r = ResourceLoader::load(p_value);
+ if (!r.is_valid())
+ return;
+ _res_set_func(p_id, p_prop, r);
+}
+void LiveEditor::_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
+
+ if (!live_edit_resource_cache.has(p_id))
+ return;
+
+ String resp = live_edit_resource_cache[p_id];
+
+ if (!ResourceCache::has(resp))
+ return;
+
+ RES r = ResourceCache::get(resp);
+ if (!r.is_valid())
+ return;
+
+ r->call(p_method, VARIANT_ARG_PASS);
+}
+
+void LiveEditor::_root_func(const NodePath &p_scene_path, const String &p_scene_from) {
+
+ live_edit_root = p_scene_path;
+ live_edit_scene = p_scene_from;
+}
+
+void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_parent))
+ continue;
+ Node *n2 = n->get_node(p_parent);
+
+ Node *no = Object::cast_to<Node>(ClassDB::instance(p_type));
+ if (!no) {
+ continue;
+ }
+
+ no->set_name(p_name);
+ n2->add_child(no);
+ }
+}
+void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Ref<PackedScene> ps = ResourceLoader::load(p_path);
+
+ if (!ps.is_valid())
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_parent))
+ continue;
+ Node *n2 = n->get_node(p_parent);
+
+ Node *no = ps->instance();
+ if (!no) {
+ continue;
+ }
+
+ no->set_name(p_name);
+ n2->add_child(no);
+ }
+}
+void LiveEditor::_remove_node_func(const NodePath &p_at) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F;) {
+
+ Set<Node *>::Element *N = F->next();
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_at))
+ continue;
+ Node *n2 = n->get_node(p_at);
+
+ memdelete(n2);
+
+ F = N;
+ }
+}
+void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F;) {
+
+ Set<Node *>::Element *N = F->next();
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_at))
+ continue;
+
+ Node *n2 = n->get_node(p_at);
+
+ n2->get_parent()->remove_child(n2);
+
+ live_edit_remove_list[n][p_keep_id] = n2;
+
+ F = N;
+ }
+}
+void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F;) {
+
+ Set<Node *>::Element *N = F->next();
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_at))
+ continue;
+ Node *n2 = n->get_node(p_at);
+
+ Map<Node *, Map<ObjectID, Node *> >::Element *EN = live_edit_remove_list.find(n);
+
+ if (!EN)
+ continue;
+
+ Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id);
+
+ if (!FN)
+ continue;
+ n2->add_child(FN->get());
+
+ EN->get().erase(FN);
+
+ if (EN->get().size() == 0) {
+ live_edit_remove_list.erase(EN);
+ }
+
+ F = N;
+ }
+}
+void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_name) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_at))
+ continue;
+ Node *n2 = n->get_node(p_at);
+
+ Node *dup = n2->duplicate(Node::DUPLICATE_SIGNALS | Node::DUPLICATE_GROUPS | Node::DUPLICATE_SCRIPTS);
+
+ if (!dup)
+ continue;
+
+ dup->set_name(p_new_name);
+ n2->get_parent()->add_child(dup);
+ }
+}
+void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
+ SceneTree *scene_tree = SceneTree::get_singleton();
+ if (!scene_tree)
+ return;
+
+ Node *base = NULL;
+ if (scene_tree->root->has_node(live_edit_root))
+ base = scene_tree->root->get_node(live_edit_root);
+
+ Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
+ if (!E)
+ return; //scene not editable
+
+ for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
+
+ Node *n = F->get();
+
+ if (base && !base->is_a_parent_of(n))
+ continue;
+
+ if (!n->has_node(p_at))
+ continue;
+ Node *nfrom = n->get_node(p_at);
+
+ if (!n->has_node(p_new_place))
+ continue;
+ Node *nto = n->get_node(p_new_place);
+
+ nfrom->get_parent()->remove_child(nfrom);
+ nfrom->set_name(p_new_name);
+
+ nto->add_child(nfrom);
+ if (p_at_pos >= 0)
+ nto->move_child(nfrom, p_at_pos);
+ }
+}
+
+#endif
diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h
new file mode 100644
index 0000000000..d22f8e8e18
--- /dev/null
+++ b/scene/debugger/scene_debugger.h
@@ -0,0 +1,151 @@
+/*************************************************************************/
+/* scene_debugger.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 SCENE_DEBUGGER_H
+#define SCENE_DEBUGGER_H
+
+#include "core/array.h"
+#include "core/object.h"
+#include "core/pair.h"
+#include "core/script_language.h"
+#include "core/ustring.h"
+
+class SceneDebugger {
+
+public:
+ static void initialize();
+ static void deinitialize();
+
+#ifdef DEBUG_ENABLED
+private:
+ static void _save_node(ObjectID id, const String &p_path);
+ static void _set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value);
+ static void _send_object_id(ObjectID p_id, int p_max_size = 1 << 20);
+
+public:
+ static Error parse_message(const String &p_msg, const Array &p_args);
+ static void add_to_cache(const String &p_filename, Node *p_node);
+ static void remove_from_cache(const String &p_filename, Node *p_node);
+#endif
+};
+
+#ifdef DEBUG_ENABLED
+class SceneDebuggerObject {
+
+private:
+ void _parse_script_properties(Script *p_script, ScriptInstance *p_instance);
+
+public:
+ typedef Pair<PropertyInfo, Variant> SceneDebuggerProperty;
+ ObjectID id;
+ String class_name;
+ List<SceneDebuggerProperty> properties;
+
+ SceneDebuggerObject(ObjectID p_id);
+ SceneDebuggerObject() {}
+
+ void serialize(Array &r_arr, int p_max_size = 1 << 20);
+ void deserialize(const Array &p_arr);
+};
+
+class SceneDebuggerTree {
+
+public:
+ struct RemoteNode {
+ int child_count;
+ String name;
+ String type_name;
+ ObjectID id;
+
+ RemoteNode(int p_child, const String &p_name, const String &p_type, ObjectID p_id) {
+ child_count = p_child;
+ name = p_name;
+ type_name = p_type;
+ id = p_id;
+ }
+
+ RemoteNode() {}
+ };
+
+ List<RemoteNode> nodes;
+
+ void serialize(Array &r_arr);
+ void deserialize(const Array &p_arr);
+ SceneDebuggerTree(Node *p_root);
+ SceneDebuggerTree(){};
+};
+
+class LiveEditor {
+
+private:
+ friend class SceneDebugger;
+ Map<int, NodePath> live_edit_node_path_cache;
+ Map<int, String> live_edit_resource_cache;
+
+ NodePath live_edit_root;
+ String live_edit_scene;
+
+ Map<String, Set<Node *> > live_scene_edit_cache;
+ Map<Node *, Map<ObjectID, Node *> > live_edit_remove_list;
+
+ void _send_tree();
+
+ void _node_path_func(const NodePath &p_path, int p_id);
+ void _res_path_func(const String &p_path, int p_id);
+
+ void _node_set_func(int p_id, const StringName &p_prop, const Variant &p_value);
+ void _node_set_res_func(int p_id, const StringName &p_prop, const String &p_value);
+ void _node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
+ void _res_set_func(int p_id, const StringName &p_prop, const Variant &p_value);
+ void _res_set_res_func(int p_id, const StringName &p_prop, const String &p_value);
+ void _res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
+ void _root_func(const NodePath &p_scene_path, const String &p_scene_from);
+
+ void _create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name);
+ void _instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name);
+ void _remove_node_func(const NodePath &p_at);
+ void _remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id);
+ void _restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos);
+ void _duplicate_node_func(const NodePath &p_at, const String &p_new_name);
+ void _reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos);
+
+ LiveEditor() {
+ singleton = this;
+ live_edit_root = NodePath("/root");
+ };
+
+ static LiveEditor *singleton;
+
+public:
+ static LiveEditor *get_singleton();
+};
+#endif
+
+#endif
diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp
deleted file mode 100644
index 80972ba3d1..0000000000
--- a/scene/debugger/script_debugger_remote.cpp
+++ /dev/null
@@ -1,1313 +0,0 @@
-/*************************************************************************/
-/* script_debugger_remote.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* 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 "script_debugger_remote.h"
-
-#include "core/engine.h"
-#include "core/io/ip.h"
-#include "core/io/marshalls.h"
-#include "core/os/input.h"
-#include "core/os/os.h"
-#include "core/project_settings.h"
-#include "scene/main/node.h"
-#include "scene/main/scene_tree.h"
-#include "scene/main/viewport.h"
-#include "scene/resources/packed_scene.h"
-#include "servers/visual_server.h"
-
-void ScriptDebuggerRemote::_send_video_memory() {
-
- List<ResourceUsage> usage;
- if (resource_usage_func)
- resource_usage_func(&usage);
-
- usage.sort();
-
- packet_peer_stream->put_var("message:video_mem");
- packet_peer_stream->put_var(usage.size() * 4);
-
- for (List<ResourceUsage>::Element *E = usage.front(); E; E = E->next()) {
-
- packet_peer_stream->put_var(E->get().path);
- packet_peer_stream->put_var(E->get().type);
- packet_peer_stream->put_var(E->get().format);
- packet_peer_stream->put_var(E->get().vram);
- }
-}
-
-Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_port) {
-
- IP_Address ip;
- if (p_host.is_valid_ip_address())
- ip = p_host;
- else
- ip = IP::get_singleton()->resolve_hostname(p_host);
-
- int port = p_port;
-
- const int tries = 6;
- int waits[tries] = { 1, 10, 100, 1000, 1000, 1000 };
-
- tcp_client->connect_to_host(ip, port);
-
- for (int i = 0; i < tries; i++) {
-
- if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
- print_verbose("Remote Debugger: Connected!");
- break;
- } else {
-
- const int ms = waits[i];
- OS::get_singleton()->delay_usec(ms * 1000);
- print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
- };
- };
-
- if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
-
- ERR_PRINT("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + ".");
- return FAILED;
- };
-
- packet_peer_stream->set_stream_peer(tcp_client);
-
- return OK;
-}
-
-void ScriptDebuggerRemote::_put_variable(const String &p_name, const Variant &p_variable) {
-
- packet_peer_stream->put_var(p_name);
-
- Variant var = p_variable;
- if (p_variable.get_type() == Variant::OBJECT && p_variable.get_validated_object() == nullptr) {
- var = Variant();
- }
-
- int len = 0;
- Error err = encode_variant(var, NULL, len, true);
- if (err != OK)
- ERR_PRINT("Failed to encode variant.");
-
- if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size
- packet_peer_stream->put_var(Variant());
- } else {
- packet_peer_stream->put_var(var);
- }
-}
-
-void ScriptDebuggerRemote::_save_node(ObjectID id, const String &p_path) {
-
- Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id));
- ERR_FAIL_COND(!node);
-
- Ref<PackedScene> ps = memnew(PackedScene);
- ps->pack(node);
- ResourceSaver::save(p_path, ps);
-}
-
-void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue, bool p_is_error_breakpoint) {
-
- //this function is called when there is a debugger break (bug on script)
- //or when execution is paused from editor
-
- if (skip_breakpoints && !p_is_error_breakpoint)
- return;
-
- ERR_FAIL_COND_MSG(!tcp_client->is_connected_to_host(), "Script Debugger failed to connect, but being used anyway.");
-
- packet_peer_stream->put_var("debug_enter");
- packet_peer_stream->put_var(2);
- packet_peer_stream->put_var(p_can_continue);
- packet_peer_stream->put_var(p_script->debug_get_error());
-
- skip_profile_frame = true; // to avoid super long frame time for the frame
-
- Input::MouseMode mouse_mode = Input::get_singleton()->get_mouse_mode();
- if (mouse_mode != Input::MOUSE_MODE_VISIBLE)
- Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
-
- uint64_t loop_begin_usec = 0;
- uint64_t loop_time_sec = 0;
- while (true) {
- loop_begin_usec = OS::get_singleton()->get_ticks_usec();
-
- _get_output();
-
- if (packet_peer_stream->get_available_packet_count() > 0) {
-
- Variant var;
- Error err = packet_peer_stream->get_var(var);
-
- ERR_CONTINUE(err != OK);
- ERR_CONTINUE(var.get_type() != Variant::ARRAY);
-
- Array cmd = var;
-
- ERR_CONTINUE(cmd.size() == 0);
- ERR_CONTINUE(cmd[0].get_type() != Variant::STRING);
-
- String command = cmd[0];
-
- if (command == "get_stack_dump") {
-
- packet_peer_stream->put_var("stack_dump");
- int slc = p_script->debug_get_stack_level_count();
- packet_peer_stream->put_var(slc);
-
- for (int i = 0; i < slc; i++) {
-
- Dictionary d;
- d["file"] = p_script->debug_get_stack_level_source(i);
- d["line"] = p_script->debug_get_stack_level_line(i);
- d["function"] = p_script->debug_get_stack_level_function(i);
- //d["id"]=p_script->debug_get_stack_level_
- d["id"] = 0;
-
- packet_peer_stream->put_var(d);
- }
-
- } else if (command == "get_stack_frame_vars") {
-
- cmd.remove(0);
- ERR_CONTINUE(cmd.size() != 1);
- int lv = cmd[0];
-
- List<String> members;
- List<Variant> member_vals;
- if (ScriptInstance *inst = p_script->debug_get_stack_level_instance(lv)) {
- members.push_back("self");
- member_vals.push_back(inst->get_owner());
- }
- p_script->debug_get_stack_level_members(lv, &members, &member_vals);
- ERR_CONTINUE(members.size() != member_vals.size());
-
- List<String> locals;
- List<Variant> local_vals;
- p_script->debug_get_stack_level_locals(lv, &locals, &local_vals);
- ERR_CONTINUE(locals.size() != local_vals.size());
-
- List<String> globals;
- List<Variant> globals_vals;
- p_script->debug_get_globals(&globals, &globals_vals);
- ERR_CONTINUE(globals.size() != globals_vals.size());
-
- packet_peer_stream->put_var("stack_frame_vars");
- packet_peer_stream->put_var(3 + (locals.size() + members.size() + globals.size()) * 2);
-
- { //locals
- packet_peer_stream->put_var(locals.size());
-
- List<String>::Element *E = locals.front();
- List<Variant>::Element *F = local_vals.front();
-
- while (E) {
- _put_variable(E->get(), F->get());
-
- E = E->next();
- F = F->next();
- }
- }
-
- { //members
- packet_peer_stream->put_var(members.size());
-
- List<String>::Element *E = members.front();
- List<Variant>::Element *F = member_vals.front();
-
- while (E) {
-
- _put_variable(E->get(), F->get());
-
- E = E->next();
- F = F->next();
- }
- }
-
- { //globals
- packet_peer_stream->put_var(globals.size());
-
- List<String>::Element *E = globals.front();
- List<Variant>::Element *F = globals_vals.front();
-
- while (E) {
- _put_variable(E->get(), F->get());
-
- E = E->next();
- F = F->next();
- }
- }
-
- } else if (command == "step") {
-
- set_depth(-1);
- set_lines_left(1);
- break;
- } else if (command == "next") {
-
- set_depth(0);
- set_lines_left(1);
- break;
-
- } else if (command == "continue") {
- set_depth(-1);
- set_lines_left(-1);
- OS::get_singleton()->move_window_to_foreground();
- break;
- } else if (command == "break") {
- ERR_PRINT("Got break when already broke!");
- break;
- } else if (command == "request_scene_tree") {
-
-#ifdef DEBUG_ENABLED
- if (scene_tree)
- scene_tree->_debugger_request_tree();
-#endif
- } else if (command == "request_video_mem") {
-
- _send_video_memory();
- } else if (command == "inspect_object") {
-
- ObjectID id = cmd[1];
- _send_object_id(id);
- } else if (command == "set_object_property") {
-
- _set_object_property(cmd[1], cmd[2], cmd[3]);
-
- } else if (command == "override_camera_2D:set") {
- bool enforce = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->enable_canvas_transform_override(enforce);
- }
- } else if (command == "override_camera_2D:transform") {
- Transform2D transform = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->set_canvas_transform_override(transform);
- }
- } else if (command == "override_camera_3D:set") {
- bool enable = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->enable_camera_override(enable);
- }
- } else if (command == "override_camera_3D:transform") {
- Transform transform = cmd[1];
- bool is_perspective = cmd[2];
- float size_or_fov = cmd[3];
- float near = cmd[4];
- float far = cmd[5];
-
- if (scene_tree) {
- if (is_perspective) {
- scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far);
- } else {
- scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far);
- }
- scene_tree->get_root()->set_camera_override_transform(transform);
- }
-
- } else if (command == "reload_scripts") {
- reload_all_scripts = true;
- } else if (command == "breakpoint") {
-
- bool set = cmd[3];
- if (set)
- insert_breakpoint(cmd[2], cmd[1]);
- else
- remove_breakpoint(cmd[2], cmd[1]);
-
- } else if (command == "save_node") {
- _save_node(cmd[1], cmd[2]);
- } else if (command == "set_skip_breakpoints") {
- skip_breakpoints = cmd[1];
- } else {
- _parse_live_edit(cmd);
- }
-
- } else {
- OS::get_singleton()->delay_usec(10000);
- OS::get_singleton()->process_and_drop_events();
- }
-
- // This is for the camera override to stay live even when the game is paused from the editor
- loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f;
- VisualServer::get_singleton()->sync();
- if (VisualServer::get_singleton()->has_changed()) {
- VisualServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale());
- }
- }
-
- packet_peer_stream->put_var("debug_exit");
- packet_peer_stream->put_var(0);
-
- if (mouse_mode != Input::MOUSE_MODE_VISIBLE)
- Input::get_singleton()->set_mouse_mode(mouse_mode);
-}
-
-void ScriptDebuggerRemote::_get_output() {
-
- mutex->lock();
- if (output_strings.size()) {
-
- locking = true;
- packet_peer_stream->put_var("output");
- packet_peer_stream->put_var(output_strings.size());
-
- while (output_strings.size()) {
-
- packet_peer_stream->put_var(output_strings.front()->get());
- output_strings.pop_front();
- }
- locking = false;
- }
-
- if (n_messages_dropped > 0) {
- Message msg;
- msg.message = "Too many messages! " + String::num_int64(n_messages_dropped) + " messages were dropped.";
- messages.push_back(msg);
- n_messages_dropped = 0;
- }
-
- while (messages.size()) {
- locking = true;
- packet_peer_stream->put_var("message:" + messages.front()->get().message);
- packet_peer_stream->put_var(messages.front()->get().data.size());
- for (int i = 0; i < messages.front()->get().data.size(); i++) {
- packet_peer_stream->put_var(messages.front()->get().data[i]);
- }
- messages.pop_front();
- locking = false;
- }
-
- if (n_errors_dropped == 1) {
- // Only print one message about dropping per second
- OutputError oe;
- oe.error = "TOO_MANY_ERRORS";
- oe.error_descr = "Too many errors! Ignoring errors for up to 1 second.";
- oe.warning = false;
- uint64_t time = OS::get_singleton()->get_ticks_msec();
- oe.hr = time / 3600000;
- oe.min = (time / 60000) % 60;
- oe.sec = (time / 1000) % 60;
- oe.msec = time % 1000;
- errors.push_back(oe);
- }
-
- if (n_warnings_dropped == 1) {
- // Only print one message about dropping per second
- OutputError oe;
- oe.error = "TOO_MANY_WARNINGS";
- oe.error_descr = "Too many warnings! Ignoring warnings for up to 1 second.";
- oe.warning = true;
- uint64_t time = OS::get_singleton()->get_ticks_msec();
- oe.hr = time / 3600000;
- oe.min = (time / 60000) % 60;
- oe.sec = (time / 1000) % 60;
- oe.msec = time % 1000;
- errors.push_back(oe);
- }
-
- while (errors.size()) {
- locking = true;
- packet_peer_stream->put_var("error");
- OutputError oe = errors.front()->get();
-
- packet_peer_stream->put_var(oe.callstack.size() + 2);
-
- Array error_data;
-
- error_data.push_back(oe.hr);
- error_data.push_back(oe.min);
- error_data.push_back(oe.sec);
- error_data.push_back(oe.msec);
- error_data.push_back(oe.source_func);
- error_data.push_back(oe.source_file);
- error_data.push_back(oe.source_line);
- error_data.push_back(oe.error);
- error_data.push_back(oe.error_descr);
- error_data.push_back(oe.warning);
- packet_peer_stream->put_var(error_data);
- packet_peer_stream->put_var(oe.callstack.size());
- for (int i = 0; i < oe.callstack.size(); i++) {
- packet_peer_stream->put_var(oe.callstack[i]);
- }
-
- errors.pop_front();
- locking = false;
- }
- mutex->unlock();
-}
-
-void ScriptDebuggerRemote::line_poll() {
-
- //the purpose of this is just processing events every now and then when the script might get too busy
- //otherwise bugs like infinite loops can't be caught
- if (poll_every % 2048 == 0)
- _poll_events();
- poll_every++;
-}
-
-void ScriptDebuggerRemote::_err_handler(void *ud, const char *p_func, const char *p_file, int p_line, const char *p_err, const char *p_descr, ErrorHandlerType p_type) {
-
- if (p_type == ERR_HANDLER_SCRIPT)
- return; //ignore script errors, those go through debugger
-
- Vector<ScriptLanguage::StackInfo> si;
-
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- si = ScriptServer::get_language(i)->debug_get_current_stack_info();
- if (si.size())
- break;
- }
-
- ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)ud;
- sdr->send_error(p_func, p_file, p_line, p_err, p_descr, p_type, si);
-}
-
-bool ScriptDebuggerRemote::_parse_live_edit(const Array &p_command) {
-
-#ifdef DEBUG_ENABLED
-
- String cmdstr = p_command[0];
- if (!scene_tree || !cmdstr.begins_with("live_"))
- return false;
-
- if (cmdstr == "live_set_root") {
-
- scene_tree->_live_edit_root_func(p_command[1], p_command[2]);
-
- } else if (cmdstr == "live_node_path") {
-
- scene_tree->_live_edit_node_path_func(p_command[1], p_command[2]);
-
- } else if (cmdstr == "live_res_path") {
-
- scene_tree->_live_edit_res_path_func(p_command[1], p_command[2]);
-
- } else if (cmdstr == "live_node_prop_res") {
-
- scene_tree->_live_edit_node_set_res_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_node_prop") {
-
- scene_tree->_live_edit_node_set_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_res_prop_res") {
-
- scene_tree->_live_edit_res_set_res_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_res_prop") {
-
- scene_tree->_live_edit_res_set_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_node_call") {
-
- scene_tree->_live_edit_node_call_func(p_command[1], p_command[2], p_command[3], p_command[4], p_command[5], p_command[6], p_command[7]);
-
- } else if (cmdstr == "live_res_call") {
-
- scene_tree->_live_edit_res_call_func(p_command[1], p_command[2], p_command[3], p_command[4], p_command[5], p_command[6], p_command[7]);
-
- } else if (cmdstr == "live_create_node") {
-
- scene_tree->_live_edit_create_node_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_instance_node") {
-
- scene_tree->_live_edit_instance_node_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_remove_node") {
-
- scene_tree->_live_edit_remove_node_func(p_command[1]);
-
- } else if (cmdstr == "live_remove_and_keep_node") {
-
- scene_tree->_live_edit_remove_and_keep_node_func(p_command[1], p_command[2]);
-
- } else if (cmdstr == "live_restore_node") {
-
- scene_tree->_live_edit_restore_node_func(p_command[1], p_command[2], p_command[3]);
-
- } else if (cmdstr == "live_duplicate_node") {
-
- scene_tree->_live_edit_duplicate_node_func(p_command[1], p_command[2]);
-
- } else if (cmdstr == "live_reparent_node") {
-
- scene_tree->_live_edit_reparent_node_func(p_command[1], p_command[2], p_command[3], p_command[4]);
-
- } else {
-
- return false;
- }
-
- return true;
-#else
-
- return false;
-#endif
-}
-
-void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
-
- Object *obj = ObjectDB::get_instance(p_id);
- if (!obj)
- return;
-
- typedef Pair<PropertyInfo, Variant> PropertyDesc;
- List<PropertyDesc> properties;
-
- if (ScriptInstance *si = obj->get_script_instance()) {
- if (!si->get_script().is_null()) {
-
- typedef Map<const Script *, Set<StringName> > ScriptMemberMap;
- typedef Map<const Script *, Map<StringName, Variant> > ScriptConstantsMap;
-
- ScriptMemberMap members;
- members[si->get_script().ptr()] = Set<StringName>();
- si->get_script()->get_members(&(members[si->get_script().ptr()]));
-
- ScriptConstantsMap constants;
- constants[si->get_script().ptr()] = Map<StringName, Variant>();
- si->get_script()->get_constants(&(constants[si->get_script().ptr()]));
-
- Ref<Script> base = si->get_script()->get_base_script();
- while (base.is_valid()) {
-
- members[base.ptr()] = Set<StringName>();
- base->get_members(&(members[base.ptr()]));
-
- constants[base.ptr()] = Map<StringName, Variant>();
- base->get_constants(&(constants[base.ptr()]));
-
- base = base->get_base_script();
- }
-
- for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) {
- for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) {
- Variant m;
- if (si->get(E->get(), m)) {
- String script_path = sm->key() == si->get_script().ptr() ? "" : sm->key()->get_path().get_file() + "/";
- PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get());
- properties.push_back(PropertyDesc(pi, m));
- }
- }
- }
-
- for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) {
- for (Map<StringName, Variant>::Element *E = sc->get().front(); E; E = E->next()) {
- String script_path = sc->key() == si->get_script().ptr() ? "" : sc->key()->get_path().get_file() + "/";
- if (E->value().get_type() == Variant::OBJECT) {
- Variant id = ((Object *)E->value())->get_instance_id();
- PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object");
- properties.push_back(PropertyDesc(pi, id));
- } else {
- PropertyInfo pi(E->value().get_type(), "Constants/" + script_path + E->key());
- properties.push_back(PropertyDesc(pi, E->value()));
- }
- }
- }
- }
- }
-
- if (Node *node = Object::cast_to<Node>(obj)) {
- // in some cases node will not be in tree here
- // for instance where it created as variable and not yet added to tree
- // in such cases we can't ask for it's path
- if (node->is_inside_tree()) {
- PropertyInfo pi(Variant::NODE_PATH, String("Node/path"));
- properties.push_front(PropertyDesc(pi, node->get_path()));
- } else {
- PropertyInfo pi(Variant::STRING, String("Node/path"));
- properties.push_front(PropertyDesc(pi, "[Orphan]"));
- }
-
- } else if (Resource *res = Object::cast_to<Resource>(obj)) {
- if (Script *s = Object::cast_to<Script>(res)) {
- Map<StringName, Variant> constants;
- s->get_constants(&constants);
- for (Map<StringName, Variant>::Element *E = constants.front(); E; E = E->next()) {
- if (E->value().get_type() == Variant::OBJECT) {
- Variant id = ((Object *)E->value())->get_instance_id();
- PropertyInfo pi(id.get_type(), "Constants/" + E->key(), PROPERTY_HINT_OBJECT_ID, "Object");
- properties.push_front(PropertyDesc(pi, E->value()));
- } else {
- PropertyInfo pi(E->value().get_type(), String("Constants/") + E->key());
- properties.push_front(PropertyDesc(pi, E->value()));
- }
- }
- }
- }
-
- List<PropertyInfo> pinfo;
- obj->get_property_list(&pinfo, true);
- for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
- if (E->get().usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) {
- properties.push_back(PropertyDesc(E->get(), obj->get(E->get().name)));
- }
- }
-
- Array send_props;
- for (int i = 0; i < properties.size(); i++) {
- const PropertyInfo &pi = properties[i].first;
- Variant &var = properties[i].second;
-
- WeakRef *ref = Object::cast_to<WeakRef>(var);
- if (ref) {
- var = ref->get_ref();
- }
-
- RES res = var;
-
- Array prop;
- prop.push_back(pi.name);
- prop.push_back(pi.type);
-
- //only send information that can be sent..
- int len = 0; //test how big is this to encode
- encode_variant(var, NULL, len);
- if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size
- prop.push_back(PROPERTY_HINT_OBJECT_TOO_BIG);
- prop.push_back("");
- prop.push_back(pi.usage);
- prop.push_back(Variant());
- } else {
- prop.push_back(pi.hint);
- prop.push_back(pi.hint_string);
- prop.push_back(pi.usage);
-
- if (!res.is_null()) {
- var = res->get_path();
- }
-
- prop.push_back(var);
- }
- send_props.push_back(prop);
- }
-
- packet_peer_stream->put_var("message:inspect_object");
- packet_peer_stream->put_var(3);
- packet_peer_stream->put_var(p_id);
- packet_peer_stream->put_var(obj->get_class());
- packet_peer_stream->put_var(send_props);
-}
-
-void ScriptDebuggerRemote::_set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value) {
-
- Object *obj = ObjectDB::get_instance(p_id);
- if (!obj)
- return;
-
- String prop_name = p_property;
- if (p_property.begins_with("Members/")) {
- Vector<String> ss = p_property.split("/");
- prop_name = ss[ss.size() - 1];
- }
-
- obj->set(prop_name, p_value);
-}
-
-void ScriptDebuggerRemote::_poll_events() {
-
- //this si called from ::idle_poll, happens only when running the game,
- //does not get called while on debug break
-
- while (packet_peer_stream->get_available_packet_count() > 0) {
-
- _get_output();
-
- //send over output_strings
-
- Variant var;
- Error err = packet_peer_stream->get_var(var);
-
- ERR_CONTINUE(err != OK);
- ERR_CONTINUE(var.get_type() != Variant::ARRAY);
-
- Array cmd = var;
-
- ERR_CONTINUE(cmd.size() == 0);
- ERR_CONTINUE(cmd[0].get_type() != Variant::STRING);
-
- String command = cmd[0];
- //cmd.remove(0);
-
- if (command == "break") {
-
- if (get_break_language())
- debug(get_break_language());
- } else if (command == "request_scene_tree") {
-
-#ifdef DEBUG_ENABLED
- if (scene_tree)
- scene_tree->_debugger_request_tree();
-#endif
- } else if (command == "request_video_mem") {
-
- _send_video_memory();
- } else if (command == "inspect_object") {
-
- ObjectID id = cmd[1];
- _send_object_id(id);
- } else if (command == "set_object_property") {
-
- _set_object_property(cmd[1], cmd[2], cmd[3]);
-
- } else if (command == "start_profiling") {
-
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- ScriptServer::get_language(i)->profiling_start();
- }
-
- max_frame_functions = cmd[1];
- profiler_function_signature_map.clear();
- profiling = true;
- frame_time = 0;
- idle_time = 0;
- physics_time = 0;
- physics_frame_time = 0;
-
- print_line("PROFILING ALRIGHT!");
-
- } else if (command == "stop_profiling") {
-
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- ScriptServer::get_language(i)->profiling_stop();
- }
- profiling = false;
- _send_profiling_data(false);
- print_line("PROFILING END!");
- } else if (command == "start_visual_profiling") {
-
- visual_profiling = true;
- VS::get_singleton()->set_frame_profiling_enabled(true);
- } else if (command == "stop_visual_profiling") {
-
- visual_profiling = false;
- VS::get_singleton()->set_frame_profiling_enabled(false);
- } else if (command == "start_network_profiling") {
-
- network_profiling = true;
- multiplayer->profiling_start();
- } else if (command == "stop_network_profiling") {
-
- network_profiling = false;
- multiplayer->profiling_end();
- } else if (command == "override_camera_2D:set") {
- bool enforce = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->enable_canvas_transform_override(enforce);
- }
- } else if (command == "override_camera_2D:transform") {
- Transform2D transform = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->set_canvas_transform_override(transform);
- }
- } else if (command == "override_camera_3D:set") {
- bool enable = cmd[1];
-
- if (scene_tree) {
- scene_tree->get_root()->enable_camera_override(enable);
- }
- } else if (command == "override_camera_3D:transform") {
- Transform transform = cmd[1];
- bool is_perspective = cmd[2];
- float size_or_fov = cmd[3];
- float near = cmd[4];
- float far = cmd[5];
-
- if (scene_tree) {
- if (is_perspective) {
- scene_tree->get_root()->set_camera_override_perspective(size_or_fov, near, far);
- } else {
- scene_tree->get_root()->set_camera_override_orthogonal(size_or_fov, near, far);
- }
- scene_tree->get_root()->set_camera_override_transform(transform);
- }
-
- } else if (command == "reload_scripts") {
- reload_all_scripts = true;
- } else if (command == "breakpoint") {
-
- bool set = cmd[3];
- if (set)
- insert_breakpoint(cmd[2], cmd[1]);
- else
- remove_breakpoint(cmd[2], cmd[1]);
- } else if (command == "set_skip_breakpoints") {
- skip_breakpoints = cmd[1];
- } else {
- _parse_live_edit(cmd);
- }
- }
-}
-
-void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) {
-
- int ofs = 0;
-
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- if (p_for_frame)
- ofs += ScriptServer::get_language(i)->profiling_get_frame_data(&profile_info.write[ofs], profile_info.size() - ofs);
- else
- ofs += ScriptServer::get_language(i)->profiling_get_accumulated_data(&profile_info.write[ofs], profile_info.size() - ofs);
- }
-
- for (int i = 0; i < ofs; i++) {
- profile_info_ptrs.write[i] = &profile_info.write[i];
- }
-
- SortArray<ScriptLanguage::ProfilingInfo *, ProfileInfoSort> sa;
- sa.sort(profile_info_ptrs.ptrw(), ofs);
-
- int to_send = MIN(ofs, max_frame_functions);
-
- //check signatures first
- uint64_t total_script_time = 0;
-
- for (int i = 0; i < to_send; i++) {
-
- if (!profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) {
-
- int idx = profiler_function_signature_map.size();
- packet_peer_stream->put_var("profile_sig");
- packet_peer_stream->put_var(2);
- packet_peer_stream->put_var(profile_info_ptrs[i]->signature);
- packet_peer_stream->put_var(idx);
-
- profiler_function_signature_map[profile_info_ptrs[i]->signature] = idx;
- }
-
- total_script_time += profile_info_ptrs[i]->self_time;
- }
-
- //send frames then
-
- if (p_for_frame) {
- packet_peer_stream->put_var("profile_frame");
- packet_peer_stream->put_var(8 + profile_frame_data.size() * 2 + to_send * 4);
- } else {
- packet_peer_stream->put_var("profile_total");
- packet_peer_stream->put_var(8 + to_send * 4);
- }
-
- packet_peer_stream->put_var(Engine::get_singleton()->get_frames_drawn()); //total frame time
- packet_peer_stream->put_var(frame_time); //total frame time
- packet_peer_stream->put_var(idle_time); //idle frame time
- packet_peer_stream->put_var(physics_time); //fixed frame time
- packet_peer_stream->put_var(physics_frame_time); //fixed frame time
-
- packet_peer_stream->put_var(USEC_TO_SEC(total_script_time)); //total script execution time
-
- if (p_for_frame) {
-
- packet_peer_stream->put_var(profile_frame_data.size()); //how many profile framedatas to send
- packet_peer_stream->put_var(to_send); //how many script functions to send
- for (int i = 0; i < profile_frame_data.size(); i++) {
-
- packet_peer_stream->put_var(profile_frame_data[i].name);
- packet_peer_stream->put_var(profile_frame_data[i].data);
- }
- } else {
- packet_peer_stream->put_var(0); //how many script functions to send
- packet_peer_stream->put_var(to_send); //how many script functions to send
- }
-
- for (int i = 0; i < to_send; i++) {
-
- int sig_id = -1;
-
- if (profiler_function_signature_map.has(profile_info_ptrs[i]->signature)) {
- sig_id = profiler_function_signature_map[profile_info_ptrs[i]->signature];
- }
-
- packet_peer_stream->put_var(sig_id);
- packet_peer_stream->put_var(profile_info_ptrs[i]->call_count);
- packet_peer_stream->put_var(profile_info_ptrs[i]->total_time / 1000000.0);
- packet_peer_stream->put_var(profile_info_ptrs[i]->self_time / 1000000.0);
- }
-
- if (p_for_frame) {
- profile_frame_data.clear();
- }
-}
-
-void ScriptDebuggerRemote::idle_poll() {
-
- // this function is called every frame, except when there is a debugger break (::debug() in this class)
- // execution stops and remains in the ::debug function
-
- _get_output();
-
- if (requested_quit) {
-
- packet_peer_stream->put_var("kill_me");
- packet_peer_stream->put_var(0);
- requested_quit = false;
- }
-
- if (performance) {
-
- uint64_t pt = OS::get_singleton()->get_ticks_msec();
- if (pt - last_perf_time > 1000) {
-
- last_perf_time = pt;
- int max = performance->get("MONITOR_MAX");
- Array arr;
- arr.resize(max);
- for (int i = 0; i < max; i++) {
- arr[i] = performance->call("get_monitor", i);
- }
- packet_peer_stream->put_var("performance");
- packet_peer_stream->put_var(1);
- packet_peer_stream->put_var(arr);
- }
- }
- if (visual_profiling) {
- Vector<VS::FrameProfileArea> profile_areas = VS::get_singleton()->get_frame_profile();
- if (profile_areas.size()) {
- PoolVector<String> area_names;
- PoolVector<real_t> area_times;
- area_names.resize(profile_areas.size());
- area_times.resize(profile_areas.size() * 2);
- {
- PoolVector<String>::Write area_namesw = area_names.write();
- PoolVector<real_t>::Write area_timesw = area_times.write();
-
- for (int i = 0; i < profile_areas.size(); i++) {
- area_namesw[i] = profile_areas[i].name;
- area_timesw[i * 2 + 0] = profile_areas[i].cpu_msec;
- area_timesw[i * 2 + 1] = profile_areas[i].gpu_msec;
- }
- }
- packet_peer_stream->put_var("visual_profile");
- packet_peer_stream->put_var(3);
- packet_peer_stream->put_var(VS::get_singleton()->get_frame_profile_frame());
- packet_peer_stream->put_var(area_names);
- packet_peer_stream->put_var(area_times);
- }
- }
-
- if (profiling) {
-
- if (skip_profile_frame) {
- skip_profile_frame = false;
- } else {
- //send profiling info normally
- _send_profiling_data(true);
- }
- }
-
- if (network_profiling) {
- uint64_t pt = OS::get_singleton()->get_ticks_msec();
- if (pt - last_net_bandwidth_time > 200) {
- last_net_bandwidth_time = pt;
- _send_network_bandwidth_usage();
- }
- if (pt - last_net_prof_time > 100) {
- last_net_prof_time = pt;
- _send_network_profiling_data();
- }
- }
-
- if (reload_all_scripts) {
-
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- ScriptServer::get_language(i)->reload_all_scripts();
- }
- reload_all_scripts = false;
- }
-
- _poll_events();
-}
-
-void ScriptDebuggerRemote::_send_network_profiling_data() {
- ERR_FAIL_COND(multiplayer.is_null());
-
- int n_nodes = multiplayer->get_profiling_frame(&network_profile_info.write[0]);
-
- packet_peer_stream->put_var("network_profile");
- packet_peer_stream->put_var(n_nodes * 6);
- for (int i = 0; i < n_nodes; ++i) {
- packet_peer_stream->put_var(network_profile_info[i].node);
- packet_peer_stream->put_var(network_profile_info[i].node_path);
- packet_peer_stream->put_var(network_profile_info[i].incoming_rpc);
- packet_peer_stream->put_var(network_profile_info[i].incoming_rset);
- packet_peer_stream->put_var(network_profile_info[i].outgoing_rpc);
- packet_peer_stream->put_var(network_profile_info[i].outgoing_rset);
- }
-}
-
-void ScriptDebuggerRemote::_send_network_bandwidth_usage() {
- ERR_FAIL_COND(multiplayer.is_null());
-
- int incoming_bandwidth = multiplayer->get_incoming_bandwidth_usage();
- int outgoing_bandwidth = multiplayer->get_outgoing_bandwidth_usage();
-
- packet_peer_stream->put_var("network_bandwidth");
- packet_peer_stream->put_var(2);
- packet_peer_stream->put_var(incoming_bandwidth);
- packet_peer_stream->put_var(outgoing_bandwidth);
-}
-
-void ScriptDebuggerRemote::send_message(const String &p_message, const Array &p_args) {
-
- mutex->lock();
- if (!locking && tcp_client->is_connected_to_host()) {
-
- if (messages.size() >= max_messages_per_frame) {
- n_messages_dropped++;
- } else {
- Message msg;
- msg.message = p_message;
- msg.data = p_args;
- messages.push_back(msg);
- }
- }
- mutex->unlock();
-}
-
-void ScriptDebuggerRemote::send_error(const String &p_func, const String &p_file, int p_line, const String &p_err, const String &p_descr, ErrorHandlerType p_type, const Vector<ScriptLanguage::StackInfo> &p_stack_info) {
-
- OutputError oe;
- oe.error = p_err;
- oe.error_descr = p_descr;
- oe.source_file = p_file;
- oe.source_line = p_line;
- oe.source_func = p_func;
- oe.warning = p_type == ERR_HANDLER_WARNING;
- uint64_t time = OS::get_singleton()->get_ticks_msec();
- oe.hr = time / 3600000;
- oe.min = (time / 60000) % 60;
- oe.sec = (time / 1000) % 60;
- oe.msec = time % 1000;
- Array cstack;
-
- uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000;
- msec_count += ticks - last_msec;
- last_msec = ticks;
-
- if (msec_count > 1000) {
- msec_count = 0;
-
- err_count = 0;
- n_errors_dropped = 0;
- warn_count = 0;
- n_warnings_dropped = 0;
- }
-
- cstack.resize(p_stack_info.size() * 3);
- for (int i = 0; i < p_stack_info.size(); i++) {
- cstack[i * 3 + 0] = p_stack_info[i].file;
- cstack[i * 3 + 1] = p_stack_info[i].func;
- cstack[i * 3 + 2] = p_stack_info[i].line;
- }
-
- oe.callstack = cstack;
- if (oe.warning) {
- warn_count++;
- } else {
- err_count++;
- }
-
- mutex->lock();
-
- if (!locking && tcp_client->is_connected_to_host()) {
-
- if (oe.warning) {
- if (warn_count > max_warnings_per_second) {
- n_warnings_dropped++;
- } else {
- errors.push_back(oe);
- }
- } else {
- if (err_count > max_errors_per_second) {
- n_errors_dropped++;
- } else {
- errors.push_back(oe);
- }
- }
- }
-
- mutex->unlock();
-}
-
-void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string, bool p_error) {
-
- ScriptDebuggerRemote *sdr = (ScriptDebuggerRemote *)p_this;
-
- uint64_t ticks = OS::get_singleton()->get_ticks_usec() / 1000;
- sdr->msec_count += ticks - sdr->last_msec;
- sdr->last_msec = ticks;
-
- if (sdr->msec_count > 1000) {
- sdr->char_count = 0;
- sdr->msec_count = 0;
- }
-
- String s = p_string;
- int allowed_chars = MIN(MAX(sdr->max_cps - sdr->char_count, 0), s.length());
-
- if (allowed_chars == 0)
- return;
-
- if (allowed_chars < s.length()) {
- s = s.substr(0, allowed_chars);
- }
-
- sdr->char_count += allowed_chars;
- bool overflowed = sdr->char_count >= sdr->max_cps;
-
- sdr->mutex->lock();
- if (!sdr->locking && sdr->tcp_client->is_connected_to_host()) {
-
- if (overflowed)
- s += "[...]";
-
- sdr->output_strings.push_back(s);
-
- if (overflowed) {
- sdr->output_strings.push_back("[output overflow, print less text!]");
- }
- }
- sdr->mutex->unlock();
-}
-
-void ScriptDebuggerRemote::request_quit() {
-
- requested_quit = true;
-}
-
-void ScriptDebuggerRemote::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) {
- multiplayer = p_multiplayer;
-}
-
-bool ScriptDebuggerRemote::is_profiling() const {
-
- return profiling;
-}
-void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, const Array &p_data) {
-
- int idx = -1;
- for (int i = 0; i < profile_frame_data.size(); i++) {
- if (profile_frame_data[i].name == p_name) {
- idx = i;
- break;
- }
- }
-
- FrameData fd;
- fd.name = p_name;
- fd.data = p_data;
-
- if (idx == -1) {
- profile_frame_data.push_back(fd);
- } else {
- profile_frame_data.write[idx] = fd;
- }
-}
-
-void ScriptDebuggerRemote::profiling_start() {
- //ignores this, uses it via connection
-}
-
-void ScriptDebuggerRemote::profiling_end() {
- //ignores this, uses it via connection
-}
-
-void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
-
- frame_time = p_frame_time;
- idle_time = p_idle_time;
- physics_time = p_physics_time;
- physics_frame_time = p_physics_frame_time;
-}
-
-void ScriptDebuggerRemote::set_skip_breakpoints(bool p_skip_breakpoints) {
- skip_breakpoints = p_skip_breakpoints;
-}
-
-ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
-
-ScriptDebuggerRemote::ScriptDebuggerRemote() :
- profiling(false),
- visual_profiling(false),
- network_profiling(false),
- max_frame_functions(16),
- skip_profile_frame(false),
- reload_all_scripts(false),
- tcp_client(Ref<StreamPeerTCP>(memnew(StreamPeerTCP))),
- packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))),
- last_perf_time(0),
- last_net_prof_time(0),
- last_net_bandwidth_time(0),
- performance(Engine::get_singleton()->get_singleton_object("Performance")),
- requested_quit(false),
- mutex(Mutex::create()),
- max_messages_per_frame(GLOBAL_GET("network/limits/debugger_stdout/max_messages_per_frame")),
- n_messages_dropped(0),
- max_errors_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_errors_per_second")),
- max_warnings_per_second(GLOBAL_GET("network/limits/debugger_stdout/max_warnings_per_second")),
- n_errors_dropped(0),
- max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")),
- char_count(0),
- err_count(0),
- warn_count(0),
- last_msec(0),
- msec_count(0),
- locking(false),
- poll_every(0),
- scene_tree(NULL) {
-
- packet_peer_stream->set_stream_peer(tcp_client);
- packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator.
-
- phl.printfunc = _print_handler;
- phl.userdata = this;
- add_print_handler(&phl);
-
- eh.errfunc = _err_handler;
- eh.userdata = this;
- add_error_handler(&eh);
-
- profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions"));
- network_profile_info.resize(GLOBAL_GET("debug/settings/profiler/max_functions"));
- profile_info_ptrs.resize(profile_info.size());
-}
-
-ScriptDebuggerRemote::~ScriptDebuggerRemote() {
-
- remove_print_handler(&phl);
- remove_error_handler(&eh);
- memdelete(mutex);
-}
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 04ff11f20c..784d298bff 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -106,7 +106,7 @@ void Button::_notification(int p_what) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case DRAW_PRESSED: {
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 2e903b6867..cbbad79811 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -59,7 +59,7 @@ void ColorPicker::_notification(int p_what) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- PoolColorArray saved_presets = EditorSettings::get_singleton()->get_project_metadata("color_picker", "presets", PoolColorArray());
+ PackedColorArray saved_presets = EditorSettings::get_singleton()->get_project_metadata("color_picker", "presets", PackedColorArray());
for (int i = 0; i < saved_presets.size(); i++) {
add_preset(saved_presets[i]);
@@ -295,7 +295,7 @@ void ColorPicker::add_preset(const Color &p_color) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- PoolColorArray arr_to_save = get_presets();
+ PackedColorArray arr_to_save = get_presets();
EditorSettings::get_singleton()->set_project_metadata("color_picker", "presets", arr_to_save);
}
#endif
@@ -309,16 +309,16 @@ void ColorPicker::erase_preset(const Color &p_color) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- PoolColorArray arr_to_save = get_presets();
+ PackedColorArray arr_to_save = get_presets();
EditorSettings::get_singleton()->set_project_metadata("color_picker", "presets", arr_to_save);
}
#endif
}
}
-PoolColorArray ColorPicker::get_presets() const {
+PackedColorArray ColorPicker::get_presets() const {
- PoolColorArray arr;
+ PackedColorArray arr;
arr.resize(presets.size());
for (int i = 0; i < presets.size(); i++) {
arr.set(i, presets[i]);
@@ -593,10 +593,10 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &p_event) {
Ref<Image> img = r->get_texture()->get_data();
if (img.is_valid() && !img->empty()) {
- img->lock();
+
Vector2 ofs = mev->get_global_position() - r->get_visible_rect().get_position();
Color c = img->get_pixel(ofs.x, r->get_visible_rect().size.height - ofs.y);
- img->unlock();
+
set_pick_color(c);
}
}
@@ -615,9 +615,9 @@ void ColorPicker::_screen_pick_pressed() {
screen->set_as_toplevel(true);
screen->set_anchors_and_margins_preset(Control::PRESET_WIDE);
screen->set_default_cursor_shape(CURSOR_POINTING_HAND);
- screen->connect("gui_input", this, "_screen_input");
+ screen->connect("gui_input", callable_mp(this, &ColorPicker::_screen_input));
// It immediately toggles off in the first press otherwise.
- screen->call_deferred("connect", "hide", btn_pick, "set_pressed", varray(false));
+ screen->call_deferred("connect", "hide", Callable(btn_pick, "set_pressed"), varray(false));
}
screen->raise();
screen->show_modal();
@@ -678,9 +678,9 @@ void ColorPicker::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pick_color", "color"), &ColorPicker::set_pick_color);
ClassDB::bind_method(D_METHOD("get_pick_color"), &ColorPicker::get_pick_color);
- ClassDB::bind_method(D_METHOD("set_hsv_mode", "mode"), &ColorPicker::set_hsv_mode);
+ ClassDB::bind_method(D_METHOD("set_hsv_mode"), &ColorPicker::set_hsv_mode);
ClassDB::bind_method(D_METHOD("is_hsv_mode"), &ColorPicker::is_hsv_mode);
- ClassDB::bind_method(D_METHOD("set_raw_mode", "mode"), &ColorPicker::set_raw_mode);
+ ClassDB::bind_method(D_METHOD("set_raw_mode"), &ColorPicker::set_raw_mode);
ClassDB::bind_method(D_METHOD("is_raw_mode"), &ColorPicker::is_raw_mode);
ClassDB::bind_method(D_METHOD("set_deferred_mode", "mode"), &ColorPicker::set_deferred_mode);
ClassDB::bind_method(D_METHOD("is_deferred_mode"), &ColorPicker::is_deferred_mode);
@@ -693,21 +693,6 @@ void ColorPicker::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_preset", "color"), &ColorPicker::add_preset);
ClassDB::bind_method(D_METHOD("erase_preset", "color"), &ColorPicker::erase_preset);
ClassDB::bind_method(D_METHOD("get_presets"), &ColorPicker::get_presets);
- ClassDB::bind_method(D_METHOD("_value_changed"), &ColorPicker::_value_changed);
- ClassDB::bind_method(D_METHOD("_html_entered"), &ColorPicker::_html_entered);
- ClassDB::bind_method(D_METHOD("_text_type_toggled"), &ColorPicker::_text_type_toggled);
- ClassDB::bind_method(D_METHOD("_add_preset_pressed"), &ColorPicker::_add_preset_pressed);
- ClassDB::bind_method(D_METHOD("_screen_pick_pressed"), &ColorPicker::_screen_pick_pressed);
- ClassDB::bind_method(D_METHOD("_sample_draw"), &ColorPicker::_sample_draw);
- ClassDB::bind_method(D_METHOD("_update_presets"), &ColorPicker::_update_presets);
- ClassDB::bind_method(D_METHOD("_hsv_draw"), &ColorPicker::_hsv_draw);
- ClassDB::bind_method(D_METHOD("_uv_input"), &ColorPicker::_uv_input);
- ClassDB::bind_method(D_METHOD("_w_input"), &ColorPicker::_w_input);
- ClassDB::bind_method(D_METHOD("_preset_input"), &ColorPicker::_preset_input);
- ClassDB::bind_method(D_METHOD("_screen_input"), &ColorPicker::_screen_input);
- ClassDB::bind_method(D_METHOD("_focus_enter"), &ColorPicker::_focus_enter);
- ClassDB::bind_method(D_METHOD("_focus_exit"), &ColorPicker::_focus_exit);
- ClassDB::bind_method(D_METHOD("_html_focus_exit"), &ColorPicker::_html_focus_exit);
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_pick_color", "get_pick_color");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "edit_alpha"), "set_edit_alpha", "is_editing_alpha");
@@ -742,20 +727,20 @@ ColorPicker::ColorPicker() :
uv_edit = memnew(Control);
hb_edit->add_child(uv_edit);
- uv_edit->connect("gui_input", this, "_uv_input");
+ uv_edit->connect("gui_input", callable_mp(this, &ColorPicker::_uv_input));
uv_edit->set_mouse_filter(MOUSE_FILTER_PASS);
uv_edit->set_h_size_flags(SIZE_EXPAND_FILL);
uv_edit->set_v_size_flags(SIZE_EXPAND_FILL);
uv_edit->set_custom_minimum_size(Size2(get_constant("sv_width"), get_constant("sv_height")));
- uv_edit->connect("draw", this, "_hsv_draw", make_binds(0, uv_edit));
+ uv_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(0, uv_edit));
w_edit = memnew(Control);
hb_edit->add_child(w_edit);
w_edit->set_custom_minimum_size(Size2(get_constant("h_width"), 0));
w_edit->set_h_size_flags(SIZE_FILL);
w_edit->set_v_size_flags(SIZE_EXPAND_FILL);
- w_edit->connect("gui_input", this, "_w_input");
- w_edit->connect("draw", this, "_hsv_draw", make_binds(1, w_edit));
+ w_edit->connect("gui_input", callable_mp(this, &ColorPicker::_w_input));
+ w_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(1, w_edit));
HBoxContainer *hb_smpl = memnew(HBoxContainer);
add_child(hb_smpl);
@@ -763,13 +748,13 @@ ColorPicker::ColorPicker() :
sample = memnew(TextureRect);
hb_smpl->add_child(sample);
sample->set_h_size_flags(SIZE_EXPAND_FILL);
- sample->connect("draw", this, "_sample_draw");
+ sample->connect("draw", callable_mp(this, &ColorPicker::_sample_draw));
btn_pick = memnew(ToolButton);
hb_smpl->add_child(btn_pick);
btn_pick->set_toggle_mode(true);
btn_pick->set_tooltip(TTR("Pick a color from the editor window."));
- btn_pick->connect("pressed", this, "_screen_pick_pressed");
+ btn_pick->connect("pressed", callable_mp(this, &ColorPicker::_screen_pick_pressed));
VBoxContainer *vbl = memnew(VBoxContainer);
add_child(vbl);
@@ -797,14 +782,14 @@ ColorPicker::ColorPicker() :
values[i] = memnew(SpinBox);
scroll[i]->share(values[i]);
hbc->add_child(values[i]);
- values[i]->get_line_edit()->connect("focus_entered", this, "_focus_enter");
- values[i]->get_line_edit()->connect("focus_exited", this, "_focus_exit");
+ values[i]->get_line_edit()->connect("focus_entered", callable_mp(this, &ColorPicker::_focus_enter));
+ values[i]->get_line_edit()->connect("focus_exited", callable_mp(this, &ColorPicker::_focus_exit));
scroll[i]->set_min(0);
scroll[i]->set_page(0);
scroll[i]->set_h_size_flags(SIZE_EXPAND_FILL);
- scroll[i]->connect("value_changed", this, "_value_changed");
+ scroll[i]->connect("value_changed", callable_mp(this, &ColorPicker::_value_changed));
vbr->add_child(hbc);
}
@@ -816,12 +801,12 @@ ColorPicker::ColorPicker() :
btn_hsv = memnew(CheckButton);
hhb->add_child(btn_hsv);
btn_hsv->set_text(TTR("HSV"));
- btn_hsv->connect("toggled", this, "set_hsv_mode");
+ btn_hsv->connect("toggled", callable_mp(this, &ColorPicker::set_hsv_mode));
btn_raw = memnew(CheckButton);
hhb->add_child(btn_raw);
btn_raw->set_text(TTR("Raw"));
- btn_raw->connect("toggled", this, "set_raw_mode");
+ btn_raw->connect("toggled", callable_mp(this, &ColorPicker::set_raw_mode));
text_type = memnew(Button);
hhb->add_child(text_type);
@@ -832,7 +817,7 @@ ColorPicker::ColorPicker() :
#ifdef TOOLS_ENABLED
text_type->set_custom_minimum_size(Size2(28 * EDSCALE, 0)); // Adjust for the width of the "Script" icon.
#endif
- text_type->connect("pressed", this, "_text_type_toggled");
+ text_type->connect("pressed", callable_mp(this, &ColorPicker::_text_type_toggled));
} else {
text_type->set_flat(true);
@@ -842,9 +827,9 @@ ColorPicker::ColorPicker() :
c_text = memnew(LineEdit);
hhb->add_child(c_text);
c_text->set_h_size_flags(SIZE_EXPAND_FILL);
- c_text->connect("text_entered", this, "_html_entered");
- c_text->connect("focus_entered", this, "_focus_enter");
- c_text->connect("focus_exited", this, "_html_focus_exit");
+ c_text->connect("text_entered", callable_mp(this, &ColorPicker::_html_entered));
+ c_text->connect("focus_entered", callable_mp(this, &ColorPicker::_focus_enter));
+ c_text->connect("focus_exited", callable_mp(this, &ColorPicker::_html_focus_exit));
_update_controls();
updating = false;
@@ -860,8 +845,8 @@ ColorPicker::ColorPicker() :
preset = memnew(TextureRect);
preset_container->add_child(preset);
- preset->connect("gui_input", this, "_preset_input");
- preset->connect("draw", this, "_update_presets");
+ preset->connect("gui_input", callable_mp(this, &ColorPicker::_preset_input));
+ preset->connect("draw", callable_mp(this, &ColorPicker::_update_presets));
preset_container2 = memnew(HBoxContainer);
preset_container2->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -869,7 +854,7 @@ ColorPicker::ColorPicker() :
bt_add_preset = memnew(Button);
preset_container2->add_child(bt_add_preset);
bt_add_preset->set_tooltip(TTR("Add current color as a preset."));
- bt_add_preset->connect("pressed", this, "_add_preset_pressed");
+ bt_add_preset->connect("pressed", callable_mp(this, &ColorPicker::_add_preset_pressed));
}
/////////////////
@@ -969,10 +954,10 @@ void ColorPickerButton::_update_picker() {
picker = memnew(ColorPicker);
popup->add_child(picker);
add_child(popup);
- picker->connect("color_changed", this, "_color_changed");
- popup->connect("modal_closed", this, "_modal_closed");
- popup->connect("about_to_show", this, "set_pressed", varray(true));
- popup->connect("popup_hide", this, "set_pressed", varray(false));
+ picker->connect("color_changed", callable_mp(this, &ColorPickerButton::_color_changed));
+ popup->connect("modal_closed", callable_mp(this, &ColorPickerButton::_modal_closed));
+ popup->connect("about_to_show", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(true));
+ popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
picker->set_pick_color(color);
picker->set_edit_alpha(edit_alpha);
emit_signal("picker_created");
@@ -987,8 +972,6 @@ void ColorPickerButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_popup"), &ColorPickerButton::get_popup);
ClassDB::bind_method(D_METHOD("set_edit_alpha", "show"), &ColorPickerButton::set_edit_alpha);
ClassDB::bind_method(D_METHOD("is_editing_alpha"), &ColorPickerButton::is_editing_alpha);
- ClassDB::bind_method(D_METHOD("_color_changed"), &ColorPickerButton::_color_changed);
- ClassDB::bind_method(D_METHOD("_modal_closed"), &ColorPickerButton::_modal_closed);
ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color")));
ADD_SIGNAL(MethodInfo("popup_closed"));
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 49d36dfb3a..dde2f37135 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -116,7 +116,7 @@ public:
void add_preset(const Color &p_color);
void erase_preset(const Color &p_color);
- PoolColorArray get_presets() const;
+ PackedColorArray get_presets() const;
void set_hsv_mode(bool p_enabled);
bool is_hsv_mode() const;
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index b411f563b8..41f33bb719 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -48,9 +48,9 @@ void Container::add_child_notify(Node *p_child) {
if (!control)
return;
- control->connect("size_flags_changed", this, "queue_sort");
- control->connect("minimum_size_changed", this, "_child_minsize_changed");
- control->connect("visibility_changed", this, "_child_minsize_changed");
+ control->connect("size_flags_changed", callable_mp(this, &Container::queue_sort));
+ control->connect("minimum_size_changed", callable_mp(this, &Container::_child_minsize_changed));
+ control->connect("visibility_changed", callable_mp(this, &Container::_child_minsize_changed));
minimum_size_changed();
queue_sort();
@@ -75,9 +75,9 @@ void Container::remove_child_notify(Node *p_child) {
if (!control)
return;
- control->disconnect("size_flags_changed", this, "queue_sort");
- control->disconnect("minimum_size_changed", this, "_child_minsize_changed");
- control->disconnect("visibility_changed", this, "_child_minsize_changed");
+ control->disconnect("size_flags_changed", callable_mp(this, &Container::queue_sort));
+ control->disconnect("minimum_size_changed", callable_mp(this, &Container::_child_minsize_changed));
+ control->disconnect("visibility_changed", callable_mp(this, &Container::_child_minsize_changed));
minimum_size_changed();
queue_sort();
@@ -185,7 +185,6 @@ String Container::get_configuration_warning() const {
void Container::_bind_methods() {
ClassDB::bind_method(D_METHOD("_sort_children"), &Container::_sort_children);
- ClassDB::bind_method(D_METHOD("_child_minsize_changed"), &Container::_child_minsize_changed);
ClassDB::bind_method(D_METHOD("queue_sort"), &Container::queue_sort);
ClassDB::bind_method(D_METHOD("fit_child_in_rect", "child", "rect"), &Container::fit_child_in_rect);
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index b7bc2f9c9e..1a231e368b 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -221,28 +221,28 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) {
if (name.begins_with("custom_icons/")) {
String dname = name.get_slicec('/', 1);
if (data.icon_override.has(dname)) {
- data.icon_override[dname]->disconnect("changed", this, "_override_changed");
+ data.icon_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
data.icon_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_shaders/")) {
String dname = name.get_slicec('/', 1);
if (data.shader_override.has(dname)) {
- data.shader_override[dname]->disconnect("changed", this, "_override_changed");
+ data.shader_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
data.shader_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_styles/")) {
String dname = name.get_slicec('/', 1);
if (data.style_override.has(dname)) {
- data.style_override[dname]->disconnect("changed", this, "_override_changed");
+ data.style_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
data.style_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_fonts/")) {
String dname = name.get_slicec('/', 1);
if (data.font_override.has(dname)) {
- data.font_override[dname]->disconnect("changed", this, "_override_changed");
+ data.font_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
data.font_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
@@ -542,10 +542,10 @@ void Control::_notification(int p_notification) {
if (data.parent_canvas_item) {
- data.parent_canvas_item->connect("item_rect_changed", this, "_size_changed");
+ data.parent_canvas_item->connect("item_rect_changed", callable_mp(this, &Control::_size_changed));
} else {
//connect viewport
- get_viewport()->connect("size_changed", this, "_size_changed");
+ get_viewport()->connect("size_changed", callable_mp(this, &Control::_size_changed));
}
}
@@ -561,11 +561,11 @@ void Control::_notification(int p_notification) {
if (data.parent_canvas_item) {
- data.parent_canvas_item->disconnect("item_rect_changed", this, "_size_changed");
+ data.parent_canvas_item->disconnect("item_rect_changed", callable_mp(this, &Control::_size_changed));
data.parent_canvas_item = NULL;
} else if (!is_set_as_toplevel()) {
//disconnect viewport
- get_viewport()->disconnect("size_changed", this, "_size_changed");
+ get_viewport()->disconnect("size_changed", callable_mp(this, &Control::_size_changed));
}
if (data.MI) {
@@ -687,9 +687,9 @@ bool Control::has_point(const Point2 &p_point) const {
if (get_script_instance()) {
Variant v = p_point;
const Variant *p = &v;
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->has_point, &p, 1, ce);
- if (ce.error == Variant::CallError::CALL_OK) {
+ if (ce.error == Callable::CallError::CALL_OK) {
return ret;
}
}
@@ -721,9 +721,9 @@ Variant Control::get_drag_data(const Point2 &p_point) {
if (get_script_instance()) {
Variant v = p_point;
const Variant *p = &v;
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->get_drag_data, &p, 1, ce);
- if (ce.error == Variant::CallError::CALL_OK)
+ if (ce.error == Callable::CallError::CALL_OK)
return ret;
}
@@ -743,9 +743,9 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const
if (get_script_instance()) {
Variant v = p_point;
const Variant *p[2] = { &v, &p_data };
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->can_drop_data, p, 2, ce);
- if (ce.error == Variant::CallError::CALL_OK)
+ if (ce.error == Callable::CallError::CALL_OK)
return ret;
}
@@ -765,9 +765,9 @@ void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
if (get_script_instance()) {
Variant v = p_point;
const Variant *p[2] = { &v, &p_data };
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->drop_data, p, 2, ce);
- if (ce.error == Variant::CallError::CALL_OK)
+ if (ce.error == Callable::CallError::CALL_OK)
return;
}
}
@@ -805,9 +805,9 @@ Size2 Control::get_minimum_size() const {
ScriptInstance *si = const_cast<Control *>(this)->get_script_instance();
if (si) {
- Variant::CallError ce;
+ Callable::CallError ce;
Variant s = si->call(SceneStringNames::get_singleton()->_get_minimum_size, NULL, 0, ce);
- if (ce.error == Variant::CallError::CALL_OK)
+ if (ce.error == Callable::CallError::CALL_OK)
return s;
}
return Size2();
@@ -1883,7 +1883,7 @@ Rect2 Control::get_anchorable_rect() const {
void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) {
if (data.icon_override.has(p_name)) {
- data.icon_override[p_name]->disconnect("changed", this, "_override_changed");
+ data.icon_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
// clear if "null" is passed instead of a icon
@@ -1892,7 +1892,7 @@ void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> &
} else {
data.icon_override[p_name] = p_icon;
if (data.icon_override[p_name].is_valid()) {
- data.icon_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ data.icon_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
}
}
notification(NOTIFICATION_THEME_CHANGED);
@@ -1901,7 +1901,7 @@ void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> &
void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p_shader) {
if (data.shader_override.has(p_name)) {
- data.shader_override[p_name]->disconnect("changed", this, "_override_changed");
+ data.shader_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
// clear if "null" is passed instead of a shader
@@ -1910,7 +1910,7 @@ void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p
} else {
data.shader_override[p_name] = p_shader;
if (data.shader_override[p_name].is_valid()) {
- data.shader_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ data.shader_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
}
}
notification(NOTIFICATION_THEME_CHANGED);
@@ -1918,7 +1918,7 @@ void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p
void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {
if (data.style_override.has(p_name)) {
- data.style_override[p_name]->disconnect("changed", this, "_override_changed");
+ data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
// clear if "null" is passed instead of a style
@@ -1927,7 +1927,7 @@ void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> &
} else {
data.style_override[p_name] = p_style;
if (data.style_override[p_name].is_valid()) {
- data.style_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ data.style_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
}
}
notification(NOTIFICATION_THEME_CHANGED);
@@ -1936,7 +1936,7 @@ void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> &
void Control::add_font_override(const StringName &p_name, const Ref<Font> &p_font) {
if (data.font_override.has(p_name)) {
- data.font_override[p_name]->disconnect("changed", this, "_override_changed");
+ data.font_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
}
// clear if "null" is passed instead of a font
@@ -1945,7 +1945,7 @@ void Control::add_font_override(const StringName &p_name, const Ref<Font> &p_fon
} else {
data.font_override[p_name] = p_font;
if (data.font_override[p_name].is_valid()) {
- data.font_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ data.font_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
}
}
notification(NOTIFICATION_THEME_CHANGED);
@@ -2262,7 +2262,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) {
return;
if (data.theme.is_valid()) {
- data.theme->disconnect("changed", this, "_theme_changed");
+ data.theme->disconnect("changed", callable_mp(this, &Control::_theme_changed));
}
data.theme = p_theme;
@@ -2282,7 +2282,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) {
}
if (data.theme.is_valid()) {
- data.theme->connect("changed", this, "_theme_changed", varray(), CONNECT_DEFERRED);
+ data.theme->connect("changed", callable_mp(this, &Control::_theme_changed), varray(), CONNECT_DEFERRED);
}
}
@@ -2625,9 +2625,9 @@ bool Control::is_text_field() const {
if (get_script_instance()) {
Variant v=p_point;
const Variant *p[2]={&v,&p_data};
- Variant::CallError ce;
+ Callable::CallError ce;
Variant ret = get_script_instance()->call("is_text_field",p,2,ce);
- if (ce.error==Variant::CallError::CALL_OK)
+ if (ce.error==Callable::CallError::CALL_OK)
return ret;
}
*/
@@ -2813,7 +2813,6 @@ Control::GrowDirection Control::get_v_grow_direction() const {
void Control::_bind_methods() {
//ClassDB::bind_method(D_METHOD("_window_resize_event"),&Control::_window_resize_event);
- ClassDB::bind_method(D_METHOD("_size_changed"), &Control::_size_changed);
ClassDB::bind_method(D_METHOD("_update_minimum_size"), &Control::_update_minimum_size);
ClassDB::bind_method(D_METHOD("accept_event"), &Control::accept_event);
@@ -2942,10 +2941,6 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("minimum_size_changed"), &Control::minimum_size_changed);
- ClassDB::bind_method(D_METHOD("_theme_changed"), &Control::_theme_changed);
-
- ClassDB::bind_method(D_METHOD("_override_changed"), &Control::_override_changed);
-
BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size"));
@@ -2959,10 +2954,10 @@ void Control::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_clips_input"));
ADD_GROUP("Anchor", "anchor_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM);
ADD_GROUP("Margin", "margin_");
ADD_PROPERTYI(PropertyInfo(Variant::INT, "margin_left", PROPERTY_HINT_RANGE, "-4096,4096"), "set_margin", "get_margin", MARGIN_LEFT);
@@ -2979,7 +2974,7 @@ void Control::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "_set_global_position", "get_global_position");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents");
@@ -3003,7 +2998,7 @@ void Control::_bind_methods() {
ADD_GROUP("Size Flags", "size_flags_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_vertical", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_v_size_flags", "get_v_size_flags");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
ADD_GROUP("Theme", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index e0e88e1577..6cadd0a63e 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -247,8 +247,10 @@ void WindowDialog::_notification(int p_what) {
} break;
case NOTIFICATION_POPUP_HIDE: {
- if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton() && !was_editor_dimmed)
+ if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton() && !was_editor_dimmed) {
EditorNode::get_singleton()->dim_editor(false);
+ set_pass_on_modal_close_click(false);
+ }
} break;
#endif
}
@@ -334,7 +336,6 @@ void WindowDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_title"), &WindowDialog::get_title);
ClassDB::bind_method(D_METHOD("set_resizable", "resizable"), &WindowDialog::set_resizable);
ClassDB::bind_method(D_METHOD("get_resizable"), &WindowDialog::get_resizable);
- ClassDB::bind_method(D_METHOD("_closed"), &WindowDialog::_closed);
ClassDB::bind_method(D_METHOD("get_close_button"), &WindowDialog::get_close_button);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "window_title", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT_INTL), "set_title", "get_title");
@@ -347,7 +348,7 @@ WindowDialog::WindowDialog() {
resizable = false;
close_button = memnew(TextureButton);
add_child(close_button);
- close_button->connect("pressed", this, "_closed");
+ close_button->connect("pressed", callable_mp(this, &WindowDialog::_closed));
#ifdef TOOLS_ENABLED
was_editor_dimmed = false;
@@ -395,7 +396,7 @@ void AcceptDialog::_notification(int p_what) {
}
}
-void AcceptDialog::_builtin_text_entered(const String &p_text) {
+void AcceptDialog::_text_entered(const String &p_text) {
_ok_pressed();
}
@@ -407,11 +408,18 @@ void AcceptDialog::_ok_pressed() {
ok_pressed();
emit_signal("confirmed");
}
+
void AcceptDialog::_close_pressed() {
cancel_pressed();
}
+// FIXME: This is redundant with _closed_pressed, but there's a slight behavior
+// change (WindowDialog's _closed() also calls hide()) which should be assessed.
+void AcceptDialog::_on_close_pressed() {
+ _closed(); // From WindowDialog.
+}
+
String AcceptDialog::get_text() const {
return label->get_text();
@@ -446,7 +454,7 @@ void AcceptDialog::register_text_enter(Node *p_line_edit) {
ERR_FAIL_NULL(p_line_edit);
LineEdit *line_edit = Object::cast_to<LineEdit>(p_line_edit);
if (line_edit)
- line_edit->connect("text_entered", this, "_builtin_text_entered");
+ line_edit->connect("text_entered", callable_mp(this, &AcceptDialog::_text_entered));
}
void AcceptDialog::_update_child_rects() {
@@ -531,7 +539,7 @@ Button *AcceptDialog::add_button(const String &p_text, bool p_right, const Strin
}
if (p_action != "") {
- button->connect("pressed", this, "_custom_action", varray(p_action));
+ button->connect("pressed", callable_mp(this, &AcceptDialog::_custom_action), varray(p_action));
}
return button;
@@ -543,29 +551,26 @@ Button *AcceptDialog::add_cancel(const String &p_cancel) {
if (p_cancel == "")
c = RTR("Cancel");
Button *b = swap_ok_cancel ? add_button(c, true) : add_button(c);
- b->connect("pressed", this, "_closed");
+ b->connect("pressed", callable_mp(this, &AcceptDialog::_on_close_pressed));
return b;
}
void AcceptDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_ok"), &AcceptDialog::_ok_pressed);
ClassDB::bind_method(D_METHOD("get_ok"), &AcceptDialog::get_ok);
ClassDB::bind_method(D_METHOD("get_label"), &AcceptDialog::get_label);
ClassDB::bind_method(D_METHOD("set_hide_on_ok", "enabled"), &AcceptDialog::set_hide_on_ok);
ClassDB::bind_method(D_METHOD("get_hide_on_ok"), &AcceptDialog::get_hide_on_ok);
ClassDB::bind_method(D_METHOD("add_button", "text", "right", "action"), &AcceptDialog::add_button, DEFVAL(false), DEFVAL(""));
ClassDB::bind_method(D_METHOD("add_cancel", "name"), &AcceptDialog::add_cancel);
- ClassDB::bind_method(D_METHOD("_builtin_text_entered"), &AcceptDialog::_builtin_text_entered);
ClassDB::bind_method(D_METHOD("register_text_enter", "line_edit"), &AcceptDialog::register_text_enter);
- ClassDB::bind_method(D_METHOD("_custom_action"), &AcceptDialog::_custom_action);
ClassDB::bind_method(D_METHOD("set_text", "text"), &AcceptDialog::set_text);
ClassDB::bind_method(D_METHOD("get_text"), &AcceptDialog::get_text);
ClassDB::bind_method(D_METHOD("set_autowrap", "autowrap"), &AcceptDialog::set_autowrap);
ClassDB::bind_method(D_METHOD("has_autowrap"), &AcceptDialog::has_autowrap);
ADD_SIGNAL(MethodInfo("confirmed"));
- ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING, "action")));
+ ADD_SIGNAL(MethodInfo("custom_action", PropertyInfo(Variant::STRING_NAME, "action")));
ADD_GROUP("Dialog", "dialog");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "dialog_text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
@@ -600,7 +605,7 @@ AcceptDialog::AcceptDialog() {
hbc->add_child(ok);
hbc->add_spacer();
- ok->connect("pressed", this, "_ok");
+ ok->connect("pressed", callable_mp(this, &AcceptDialog::_ok_pressed));
set_as_toplevel(true);
hide_on_ok = true;
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index b6381e98b4..c474f7849d 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -64,7 +64,6 @@ class WindowDialog : public Popup {
#endif
void _gui_input(const Ref<InputEvent> &p_event);
- void _closed();
int _drag_hit_test(const Point2 &pos) const;
protected:
@@ -75,6 +74,9 @@ protected:
void _notification(int p_what);
static void _bind_methods();
+ // Not private since used by derived classes signal.
+ void _closed();
+
public:
TextureButton *get_close_button();
@@ -113,9 +115,7 @@ class AcceptDialog : public WindowDialog {
bool hide_on_ok;
void _custom_action(const String &p_action);
- void _ok_pressed();
void _close_pressed();
- void _builtin_text_entered(const String &p_text);
void _update_child_rects();
static bool swap_ok_cancel;
@@ -128,6 +128,11 @@ protected:
virtual void cancel_pressed() {}
virtual void custom_action(const String &) {}
+ // Not private since used by derived classes signal.
+ void _text_entered(const String &p_text);
+ void _ok_pressed();
+ void _on_close_pressed();
+
public:
Size2 get_minimum_size() const;
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 6e7491e7b4..3be77ff4b3 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -85,7 +85,7 @@ void FileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
bool handled = true;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_H: {
@@ -135,7 +135,8 @@ Vector<String> FileDialog::get_selected_files() const {
void FileDialog::update_dir() {
- dir->set_text(dir_access->get_current_dir());
+ dir->set_text(dir_access->get_current_dir(false));
+
if (drives->is_visible()) {
drives->select(dir_access->get_current_drive());
}
@@ -193,7 +194,7 @@ void FileDialog::_action_pressed() {
TreeItem *ti = tree->get_next_selected(NULL);
String fbase = dir_access->get_current_dir();
- PoolVector<String> files;
+ Vector<String> files;
while (ti) {
files.push_back(fbase.plus_file(ti->get_text(0)));
@@ -789,6 +790,12 @@ void FileDialog::_update_drives() {
drives->hide();
} else {
drives->clear();
+ Node *dp = drives->get_parent();
+ if (dp) {
+ dp->remove_child(drives);
+ }
+ dp = dir_access->drives_are_shortcuts() ? shortcuts_container : drives_container;
+ dp->add_child(drives);
drives->show();
for (int i = 0; i < dir_access->get_drive_count(); i++) {
@@ -805,15 +812,7 @@ void FileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &FileDialog::_unhandled_input);
- ClassDB::bind_method(D_METHOD("_tree_multi_selected"), &FileDialog::_tree_multi_selected);
- ClassDB::bind_method(D_METHOD("_tree_selected"), &FileDialog::_tree_selected);
- ClassDB::bind_method(D_METHOD("_tree_item_activated"), &FileDialog::_tree_item_activated);
- ClassDB::bind_method(D_METHOD("_dir_entered"), &FileDialog::_dir_entered);
- ClassDB::bind_method(D_METHOD("_file_entered"), &FileDialog::_file_entered);
- ClassDB::bind_method(D_METHOD("_action_pressed"), &FileDialog::_action_pressed);
ClassDB::bind_method(D_METHOD("_cancel_pressed"), &FileDialog::_cancel_pressed);
- ClassDB::bind_method(D_METHOD("_filter_selected"), &FileDialog::_filter_selected);
- ClassDB::bind_method(D_METHOD("_save_confirm_pressed"), &FileDialog::_save_confirm_pressed);
ClassDB::bind_method(D_METHOD("clear_filters"), &FileDialog::clear_filters);
ClassDB::bind_method(D_METHOD("add_filter", "filter"), &FileDialog::add_filter);
@@ -835,13 +834,9 @@ void FileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_access"), &FileDialog::get_access);
ClassDB::bind_method(D_METHOD("set_show_hidden_files", "show"), &FileDialog::set_show_hidden_files);
ClassDB::bind_method(D_METHOD("is_showing_hidden_files"), &FileDialog::is_showing_hidden_files);
- ClassDB::bind_method(D_METHOD("_select_drive"), &FileDialog::_select_drive);
- ClassDB::bind_method(D_METHOD("_make_dir"), &FileDialog::_make_dir);
- ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &FileDialog::_make_dir_confirm);
ClassDB::bind_method(D_METHOD("_update_file_name"), &FileDialog::update_file_name);
- ClassDB::bind_method(D_METHOD("_update_file_list"), &FileDialog::update_file_list);
ClassDB::bind_method(D_METHOD("_update_dir"), &FileDialog::update_dir);
- ClassDB::bind_method(D_METHOD("_go_up"), &FileDialog::_go_up);
+ ClassDB::bind_method(D_METHOD("_update_file_list"), &FileDialog::update_file_list);
ClassDB::bind_method(D_METHOD("deselect_items"), &FileDialog::deselect_items);
ClassDB::bind_method(D_METHOD("invalidate"), &FileDialog::invalidate);
@@ -849,14 +844,14 @@ void FileDialog::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open File,Open Files,Open Folder,Open Any,Save"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "filters"), "set_filters", "get_filters");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir"), "set_current_dir", "get_current_dir");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_file"), "set_current_file", "get_current_file");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_path"), "set_current_path", "get_current_path");
ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path")));
- ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths")));
+ ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::PACKED_STRING_ARRAY, "paths")));
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
BIND_ENUM_CONSTANT(MODE_OPEN_FILE);
@@ -900,32 +895,38 @@ FileDialog::FileDialog() {
dir_up = memnew(ToolButton);
dir_up->set_tooltip(RTR("Go to parent folder."));
hbc->add_child(dir_up);
- dir_up->connect("pressed", this, "_go_up");
+ dir_up->connect("pressed", callable_mp(this, &FileDialog::_go_up));
+
+ hbc->add_child(memnew(Label(RTR("Path:"))));
+
+ drives_container = memnew(HBoxContainer);
+ hbc->add_child(drives_container);
drives = memnew(OptionButton);
- hbc->add_child(drives);
- drives->connect("item_selected", this, "_select_drive");
+ drives->connect("item_selected", callable_mp(this, &FileDialog::_select_drive));
- hbc->add_child(memnew(Label(RTR("Path:"))));
dir = memnew(LineEdit);
hbc->add_child(dir);
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
refresh->set_tooltip(RTR("Refresh files."));
- refresh->connect("pressed", this, "_update_file_list");
+ refresh->connect("pressed", callable_mp(this, &FileDialog::update_file_list));
hbc->add_child(refresh);
show_hidden = memnew(ToolButton);
show_hidden->set_toggle_mode(true);
show_hidden->set_pressed(is_showing_hidden_files());
show_hidden->set_tooltip(RTR("Toggle the visibility of hidden files."));
- show_hidden->connect("toggled", this, "set_show_hidden_files");
+ show_hidden->connect("toggled", callable_mp(this, &FileDialog::set_show_hidden_files));
hbc->add_child(show_hidden);
+ shortcuts_container = memnew(HBoxContainer);
+ hbc->add_child(shortcuts_container);
+
makedir = memnew(Button);
makedir->set_text(RTR("Create Folder"));
- makedir->connect("pressed", this, "_make_dir");
+ makedir->connect("pressed", callable_mp(this, &FileDialog::_make_dir));
hbc->add_child(makedir);
vbc->add_child(hbc);
@@ -950,20 +951,20 @@ FileDialog::FileDialog() {
access = ACCESS_RESOURCES;
_update_drives();
- connect("confirmed", this, "_action_pressed");
- tree->connect("multi_selected", this, "_tree_multi_selected", varray(), CONNECT_DEFERRED);
- tree->connect("cell_selected", this, "_tree_selected", varray(), CONNECT_DEFERRED);
- tree->connect("item_activated", this, "_tree_item_activated", varray());
- tree->connect("nothing_selected", this, "deselect_items");
- dir->connect("text_entered", this, "_dir_entered");
- file->connect("text_entered", this, "_file_entered");
- filter->connect("item_selected", this, "_filter_selected");
+ connect("confirmed", callable_mp(this, &FileDialog::_action_pressed));
+ tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), varray(), CONNECT_DEFERRED);
+ tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), varray(), CONNECT_DEFERRED);
+ tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated), varray());
+ tree->connect("nothing_selected", callable_mp(this, &FileDialog::deselect_items));
+ dir->connect("text_entered", callable_mp(this, &FileDialog::_dir_entered));
+ file->connect("text_entered", callable_mp(this, &FileDialog::_file_entered));
+ filter->connect("item_selected", callable_mp(this, &FileDialog::_filter_selected));
confirm_save = memnew(ConfirmationDialog);
confirm_save->set_as_toplevel(true);
add_child(confirm_save);
- confirm_save->connect("confirmed", this, "_save_confirm_pressed");
+ confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed));
makedialog = memnew(ConfirmationDialog);
makedialog->set_title(RTR("Create Folder"));
@@ -974,7 +975,7 @@ FileDialog::FileDialog() {
makevb->add_margin_child(RTR("Name:"), makedirname);
add_child(makedialog);
makedialog->register_text_enter(makedirname);
- makedialog->connect("confirmed", this, "_make_dir_confirm");
+ makedialog->connect("confirmed", callable_mp(this, &FileDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog);
mkdirerr->set_text(RTR("Could not create folder."));
add_child(mkdirerr);
@@ -1003,8 +1004,6 @@ FileDialog::~FileDialog() {
void LineEditFileChooser::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_browse"), &LineEditFileChooser::_browse);
- ClassDB::bind_method(D_METHOD("_chosen"), &LineEditFileChooser::_chosen);
ClassDB::bind_method(D_METHOD("get_button"), &LineEditFileChooser::get_button);
ClassDB::bind_method(D_METHOD("get_line_edit"), &LineEditFileChooser::get_line_edit);
ClassDB::bind_method(D_METHOD("get_file_dialog"), &LineEditFileChooser::get_file_dialog);
@@ -1029,10 +1028,10 @@ LineEditFileChooser::LineEditFileChooser() {
button = memnew(Button);
button->set_text(" .. ");
add_child(button);
- button->connect("pressed", this, "_browse");
+ button->connect("pressed", callable_mp(this, &LineEditFileChooser::_browse));
dialog = memnew(FileDialog);
add_child(dialog);
- dialog->connect("file_selected", this, "_chosen");
- dialog->connect("dir_selected", this, "_chosen");
- dialog->connect("files_selected", this, "_chosen");
+ dialog->connect("file_selected", callable_mp(this, &LineEditFileChooser::_chosen));
+ dialog->connect("dir_selected", callable_mp(this, &LineEditFileChooser::_chosen));
+ dialog->connect("files_selected", callable_mp(this, &LineEditFileChooser::_chosen));
}
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 9f6650c276..a7dc101d12 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -76,6 +76,8 @@ private:
VBoxContainer *vbox;
Mode mode;
LineEdit *dir;
+ HBoxContainer *drives_container;
+ HBoxContainer *shortcuts_container;
OptionButton *drives;
Tree *tree;
HBoxContainer *file_box;
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 80431cefe0..6345bfe562 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -96,7 +96,7 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && grabbed != -1) {
+ if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_DELETE && grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -302,8 +302,8 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {
void GradientEdit::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- if (!picker->is_connected("color_changed", this, "_color_changed")) {
- picker->connect("color_changed", this, "_color_changed");
+ if (!picker->is_connected("color_changed", callable_mp(this, &GradientEdit::_color_changed))) {
+ picker->connect("color_changed", callable_mp(this, &GradientEdit::_color_changed));
}
}
if (p_what == NOTIFICATION_DRAW) {
@@ -490,6 +490,5 @@ Vector<Gradient::Point> &GradientEdit::get_points() {
void GradientEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &GradientEdit::_gui_input);
- ClassDB::bind_method(D_METHOD("_color_changed"), &GradientEdit::_color_changed);
ADD_SIGNAL(MethodInfo("ramp_changed"));
}
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index c6a5e21ff8..4bc33b220e 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -257,9 +257,9 @@ void GraphEdit::add_child_notify(Node *p_child) {
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->set_scale(Vector2(zoom, zoom));
- gn->connect("offset_changed", this, "_graph_node_moved", varray(gn));
- gn->connect("raise_request", this, "_graph_node_raised", varray(gn));
- gn->connect("item_rect_changed", connections_layer, "update");
+ gn->connect("offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved), varray(gn));
+ gn->connect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised), varray(gn));
+ gn->connect("item_rect_changed", callable_mp((CanvasItem *)connections_layer, &CanvasItem::update));
_graph_node_moved(gn);
gn->set_mouse_filter(MOUSE_FILTER_PASS);
}
@@ -273,8 +273,8 @@ void GraphEdit::remove_child_notify(Node *p_child) {
}
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
- gn->disconnect("offset_changed", this, "_graph_node_moved");
- gn->disconnect("raise_request", this, "_graph_node_raised");
+ gn->disconnect("offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved));
+ gn->disconnect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised));
}
}
@@ -1043,22 +1043,22 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
if (k.is_valid()) {
- if (k->get_scancode() == KEY_D && k->is_pressed() && k->get_command()) {
+ if (k->get_keycode() == KEY_D && k->is_pressed() && k->get_command()) {
emit_signal("duplicate_nodes_request");
accept_event();
}
- if (k->get_scancode() == KEY_C && k->is_pressed() && k->get_command()) {
+ if (k->get_keycode() == KEY_C && k->is_pressed() && k->get_command()) {
emit_signal("copy_nodes_request");
accept_event();
}
- if (k->get_scancode() == KEY_V && k->is_pressed() && k->get_command()) {
+ if (k->get_keycode() == KEY_V && k->is_pressed() && k->get_command()) {
emit_signal("paste_nodes_request");
accept_event();
}
- if (k->get_scancode() == KEY_DELETE && k->is_pressed()) {
+ if (k->get_keycode() == KEY_DELETE && k->is_pressed()) {
emit_signal("delete_nodes_request");
accept_event();
}
@@ -1291,21 +1291,8 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_right_disconnects", "enable"), &GraphEdit::set_right_disconnects);
ClassDB::bind_method(D_METHOD("is_right_disconnects_enabled"), &GraphEdit::is_right_disconnects_enabled);
- ClassDB::bind_method(D_METHOD("_graph_node_moved"), &GraphEdit::_graph_node_moved);
- ClassDB::bind_method(D_METHOD("_graph_node_raised"), &GraphEdit::_graph_node_raised);
-
- ClassDB::bind_method(D_METHOD("_top_layer_input"), &GraphEdit::_top_layer_input);
- ClassDB::bind_method(D_METHOD("_top_layer_draw"), &GraphEdit::_top_layer_draw);
- ClassDB::bind_method(D_METHOD("_scroll_moved"), &GraphEdit::_scroll_moved);
- ClassDB::bind_method(D_METHOD("_zoom_minus"), &GraphEdit::_zoom_minus);
- ClassDB::bind_method(D_METHOD("_zoom_reset"), &GraphEdit::_zoom_reset);
- ClassDB::bind_method(D_METHOD("_zoom_plus"), &GraphEdit::_zoom_plus);
- ClassDB::bind_method(D_METHOD("_snap_toggled"), &GraphEdit::_snap_toggled);
- ClassDB::bind_method(D_METHOD("_snap_value_changed"), &GraphEdit::_snap_value_changed);
-
ClassDB::bind_method(D_METHOD("_gui_input"), &GraphEdit::_gui_input);
ClassDB::bind_method(D_METHOD("_update_scroll_offset"), &GraphEdit::_update_scroll_offset);
- ClassDB::bind_method(D_METHOD("_connections_layer_draw"), &GraphEdit::_connections_layer_draw);
ClassDB::bind_method(D_METHOD("get_zoom_hbox"), &GraphEdit::get_zoom_hbox);
@@ -1315,17 +1302,17 @@ void GraphEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_ofs", "get_scroll_ofs");
ADD_PROPERTY(PropertyInfo(Variant::INT, "snap_distance"), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_snap"), "set_use_snap", "is_using_snap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "zoom"), "set_zoom", "get_zoom");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "zoom"), "set_zoom", "get_zoom");
- ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));
- ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));
+ ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot")));
+ ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot")));
ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "position")));
ADD_SIGNAL(MethodInfo("duplicate_nodes_request"));
ADD_SIGNAL(MethodInfo("copy_nodes_request"));
ADD_SIGNAL(MethodInfo("paste_nodes_request"));
ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
- ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
- ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
+ ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
+ ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
ADD_SIGNAL(MethodInfo("delete_nodes_request"));
ADD_SIGNAL(MethodInfo("_begin_node_move"));
ADD_SIGNAL(MethodInfo("_end_node_move"));
@@ -1341,12 +1328,12 @@ GraphEdit::GraphEdit() {
add_child(top_layer);
top_layer->set_mouse_filter(MOUSE_FILTER_PASS);
top_layer->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- top_layer->connect("draw", this, "_top_layer_draw");
- top_layer->connect("gui_input", this, "_top_layer_input");
+ top_layer->connect("draw", callable_mp(this, &GraphEdit::_top_layer_draw));
+ top_layer->connect("gui_input", callable_mp(this, &GraphEdit::_top_layer_input));
connections_layer = memnew(Control);
add_child(connections_layer);
- connections_layer->connect("draw", this, "_connections_layer_draw");
+ connections_layer->connect("draw", callable_mp(this, &GraphEdit::_connections_layer_draw));
connections_layer->set_name("CLAYER");
connections_layer->set_disable_visibility_clip(true); // so it can draw freely and be offset
connections_layer->set_mouse_filter(MOUSE_FILTER_IGNORE);
@@ -1373,8 +1360,8 @@ GraphEdit::GraphEdit() {
v_scroll->set_min(-10000);
v_scroll->set_max(10000);
- h_scroll->connect("value_changed", this, "_scroll_moved");
- v_scroll->connect("value_changed", this, "_scroll_moved");
+ h_scroll->connect("value_changed", callable_mp(this, &GraphEdit::_scroll_moved));
+ v_scroll->connect("value_changed", callable_mp(this, &GraphEdit::_scroll_moved));
zoom = 1;
@@ -1385,25 +1372,25 @@ GraphEdit::GraphEdit() {
zoom_minus = memnew(ToolButton);
zoom_hb->add_child(zoom_minus);
zoom_minus->set_tooltip(RTR("Zoom Out"));
- zoom_minus->connect("pressed", this, "_zoom_minus");
+ zoom_minus->connect("pressed", callable_mp(this, &GraphEdit::_zoom_minus));
zoom_minus->set_focus_mode(FOCUS_NONE);
zoom_reset = memnew(ToolButton);
zoom_hb->add_child(zoom_reset);
zoom_reset->set_tooltip(RTR("Zoom Reset"));
- zoom_reset->connect("pressed", this, "_zoom_reset");
+ zoom_reset->connect("pressed", callable_mp(this, &GraphEdit::_zoom_reset));
zoom_reset->set_focus_mode(FOCUS_NONE);
zoom_plus = memnew(ToolButton);
zoom_hb->add_child(zoom_plus);
zoom_plus->set_tooltip(RTR("Zoom In"));
- zoom_plus->connect("pressed", this, "_zoom_plus");
+ zoom_plus->connect("pressed", callable_mp(this, &GraphEdit::_zoom_plus));
zoom_plus->set_focus_mode(FOCUS_NONE);
snap_button = memnew(ToolButton);
snap_button->set_toggle_mode(true);
snap_button->set_tooltip(RTR("Enable snap and show grid."));
- snap_button->connect("pressed", this, "_snap_toggled");
+ snap_button->connect("pressed", callable_mp(this, &GraphEdit::_snap_toggled));
snap_button->set_pressed(true);
snap_button->set_focus_mode(FOCUS_NONE);
zoom_hb->add_child(snap_button);
@@ -1413,7 +1400,7 @@ GraphEdit::GraphEdit() {
snap_amount->set_max(100);
snap_amount->set_step(1);
snap_amount->set_value(20);
- snap_amount->connect("value_changed", this, "_snap_value_changed");
+ snap_amount->connect("value_changed", callable_mp(this, &GraphEdit::_snap_value_changed));
zoom_hb->add_child(snap_amount);
setting_scroll_ofs = false;
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index cf798f36e4..5e662b8df0 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1542,7 +1542,6 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_v_scroll"), &ItemList::get_v_scroll);
- ClassDB::bind_method(D_METHOD("_scroll_changed"), &ItemList::_scroll_changed);
ClassDB::bind_method(D_METHOD("_gui_input"), &ItemList::_gui_input);
ClassDB::bind_method(D_METHOD("_set_items"), &ItemList::_set_items);
@@ -1561,7 +1560,7 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_column_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_fixed_column_width", "get_fixed_column_width");
ADD_GROUP("Icon", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "icon_scale"), "set_icon_scale", "get_icon_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size");
BIND_ENUM_CONSTANT(ICON_MODE_TOP);
@@ -1599,7 +1598,7 @@ ItemList::ItemList() {
add_child(scroll_bar);
shape_changed = true;
- scroll_bar->connect("value_changed", this, "_scroll_changed");
+ scroll_bar->connect("value_changed", callable_mp(this, &ItemList::_scroll_changed));
set_focus_mode(FOCUS_ALL);
current_columns = 1;
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 9b542cb179..c900b35d65 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -687,7 +687,7 @@ void Label::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1", PROPERTY_USAGE_EDITOR), "set_visible_characters", "get_visible_characters");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::INT, "lines_skipped", PROPERTY_HINT_RANGE, "0,999,1"), "set_lines_skipped", "get_lines_skipped");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_lines_visible", PROPERTY_HINT_RANGE, "-1,999,1"), "set_max_lines_visible", "get_max_lines_visible");
}
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 3f4fd37c08..fdddf0b5fa 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -165,7 +165,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
#ifdef APPLE_STYLE_KEYS
if (k->get_control() && !k->get_shift() && !k->get_alt() && !k->get_command()) {
uint32_t remap_key = KEY_UNKNOWN;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_F: {
remap_key = KEY_RIGHT;
} break;
@@ -193,13 +193,13 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
}
if (remap_key != KEY_UNKNOWN) {
- k->set_scancode(remap_key);
+ k->set_keycode(remap_key);
k->set_control(false);
}
}
#endif
- unsigned int code = k->get_scancode();
+ unsigned int code = k->get_keycode();
if (k->get_command() && is_shortcut_keys_enabled()) {
@@ -355,14 +355,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_LEFT: {
-
#ifndef APPLE_STYLE_KEYS
- if (!k->get_alt())
+ if (!k->get_alt()) {
#endif
+ if (selection.enabled && !k->get_shift()) {
+ set_cursor_position(selection.begin);
+ deselect();
+ handled = true;
+ break;
+ }
+
shift_selection_check_pre(k->get_shift());
+#ifndef APPLE_STYLE_KEYS
+ }
+#endif
#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
@@ -402,11 +411,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_RIGHT: {
+#ifndef APPLE_STYLE_KEYS
+ if (!k->get_alt()) {
+#endif
+ if (selection.enabled && !k->get_shift()) {
+ set_cursor_position(selection.end);
+ deselect();
+ handled = true;
+ break;
+ }
- shift_selection_check_pre(k->get_shift());
+ shift_selection_check_pre(k->get_shift());
+#ifndef APPLE_STYLE_KEYS
+ }
+#endif
#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
@@ -509,7 +530,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_HOME: {
@@ -522,7 +543,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_END: {
@@ -550,7 +571,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
if (handled) {
accept_event();
} else if (!k->get_command()) {
- if (k->get_unicode() >= 32 && k->get_scancode() != KEY_DELETE) {
+ if (k->get_unicode() >= 32 && k->get_keycode() != KEY_DELETE) {
if (editable) {
selection_delete();
@@ -648,8 +669,8 @@ void LineEdit::_notification(int p_what) {
cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false));
cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65));
- if (!EditorSettings::get_singleton()->is_connected("settings_changed", this, "_editor_settings_changed")) {
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
+ if (!EditorSettings::get_singleton()->is_connected("settings_changed", callable_mp(this, &LineEdit::_editor_settings_changed))) {
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &LineEdit::_editor_settings_changed));
}
}
} break;
@@ -1752,9 +1773,6 @@ void LineEdit::_generate_context_menu() {
void LineEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_text_changed"), &LineEdit::_text_changed);
- ClassDB::bind_method(D_METHOD("_toggle_draw_caret"), &LineEdit::_toggle_draw_caret);
-
- ClassDB::bind_method("_editor_settings_changed", &LineEdit::_editor_settings_changed);
ClassDB::bind_method(D_METHOD("set_align", "align"), &LineEdit::set_align);
ClassDB::bind_method(D_METHOD("get_align"), &LineEdit::get_align);
@@ -1832,10 +1850,10 @@ void LineEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_right_icon", "get_right_icon");
ADD_GROUP("Placeholder", "placeholder_");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha");
ADD_GROUP("Caret", "caret_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "caret_position"), "set_cursor_position", "get_cursor_position");
}
@@ -1870,7 +1888,7 @@ LineEdit::LineEdit() {
caret_blink_timer = memnew(Timer);
add_child(caret_blink_timer);
caret_blink_timer->set_wait_time(0.65);
- caret_blink_timer->connect("timeout", this, "_toggle_draw_caret");
+ caret_blink_timer->connect("timeout", callable_mp(this, &LineEdit::_toggle_draw_caret));
cursor_set_blink_enabled(false);
context_menu_enabled = true;
@@ -1878,7 +1896,7 @@ LineEdit::LineEdit() {
add_child(menu);
editable = false; // Initialise to opposite first, so we get past the early-out in set_editable.
set_editable(true);
- menu->connect("id_pressed", this, "menu_option");
+ menu->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
expand_to_text_length = false;
}
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 6e348054e2..2b163187c5 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "menu_button.h"
+
#include "core/os/keyboard.h"
#include "scene/main/viewport.h"
@@ -137,8 +138,8 @@ MenuButton::MenuButton() {
popup->hide();
add_child(popup);
popup->set_pass_on_modal_close_click(false);
- popup->connect("about_to_show", this, "set_pressed", varray(true)); // For when switching from another MenuButton.
- popup->connect("popup_hide", this, "set_pressed", varray(false));
+ popup->connect("about_to_show", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(true)); // For when switching from another MenuButton.
+ popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
}
MenuButton::~MenuButton() {
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 6f656025e6..c185761beb 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "option_button.h"
+
#include "core/print_string.h"
Size2 OptionButton::get_minimum_size() const {
@@ -309,9 +310,6 @@ void OptionButton::get_translatable_strings(List<String> *p_strings) const {
void OptionButton::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_selected"), &OptionButton::_selected);
- ClassDB::bind_method(D_METHOD("_focused"), &OptionButton::_focused);
-
ClassDB::bind_method(D_METHOD("add_item", "label", "id"), &OptionButton::add_item, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("add_icon_item", "texture", "label", "id"), &OptionButton::add_icon_item, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &OptionButton::set_item_text);
@@ -363,9 +361,9 @@ OptionButton::OptionButton() {
popup->set_pass_on_modal_close_click(false);
popup->set_notify_transform(true);
popup->set_allow_search(true);
- popup->connect("index_pressed", this, "_selected");
- popup->connect("id_focused", this, "_focused");
- popup->connect("popup_hide", this, "set_pressed", varray(false));
+ popup->connect("index_pressed", callable_mp(this, &OptionButton::_selected));
+ popup->connect("id_focused", callable_mp(this, &OptionButton::_focused));
+ popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
}
OptionButton::~OptionButton() {
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index b494506c6c..e75dadd5e0 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "popup_menu.h"
+
#include "core/os/input.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
@@ -1074,7 +1075,7 @@ bool PopupMenu::activate_item_by_event(const Ref<InputEvent> &p_event, bool p_fo
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- code = k->get_scancode();
+ code = k->get_keycode();
if (code == 0)
code = k->get_unicode();
if (k->get_control())
@@ -1233,7 +1234,7 @@ void PopupMenu::_ref_shortcut(Ref<ShortCut> p_sc) {
if (!shortcut_refcount.has(p_sc)) {
shortcut_refcount[p_sc] = 1;
- p_sc->connect("changed", this, "update");
+ p_sc->connect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update));
} else {
shortcut_refcount[p_sc] += 1;
}
@@ -1244,7 +1245,7 @@ void PopupMenu::_unref_shortcut(Ref<ShortCut> p_sc) {
ERR_FAIL_COND(!shortcut_refcount.has(p_sc));
shortcut_refcount[p_sc]--;
if (shortcut_refcount[p_sc] == 0) {
- p_sc->disconnect("changed", this, "update");
+ p_sc->disconnect("changed", callable_mp((CanvasItem *)this, &CanvasItem::update));
shortcut_refcount.erase(p_sc);
}
}
@@ -1471,13 +1472,11 @@ void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_allow_search", "allow"), &PopupMenu::set_allow_search);
ClassDB::bind_method(D_METHOD("get_allow_search"), &PopupMenu::get_allow_search);
- ClassDB::bind_method(D_METHOD("_submenu_timeout"), &PopupMenu::_submenu_timeout);
-
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_item_selection"), "set_hide_on_item_selection", "is_hide_on_item_selection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_checkable_item_selection"), "set_hide_on_checkable_item_selection", "is_hide_on_checkable_item_selection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_state_item_selection"), "set_hide_on_state_item_selection", "is_hide_on_state_item_selection");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_search"), "set_allow_search", "get_allow_search");
ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "id")));
@@ -1514,7 +1513,7 @@ PopupMenu::PopupMenu() {
submenu_timer = memnew(Timer);
submenu_timer->set_wait_time(0.3);
submenu_timer->set_one_shot(true);
- submenu_timer->connect("timeout", this, "_submenu_timeout");
+ submenu_timer->connect("timeout", callable_mp(this, &PopupMenu::_submenu_timeout));
add_child(submenu_timer);
}
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 6b6f5bca93..adc5f81465 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -267,15 +267,15 @@ void Range::_bind_methods() {
ClassDB::bind_method(D_METHOD("share", "with"), &Range::_share);
ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare);
- ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value")));
+ ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::FLOAT, "value")));
ADD_SIGNAL(MethodInfo("changed"));
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value"), "set_min", "get_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value"), "set_max", "get_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "page"), "set_page", "get_page");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "value"), "set_value", "get_value");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "page"), "set_page", "get_page");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "value"), "set_value", "get_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_greater"), "set_allow_greater", "is_greater_allowed");
diff --git a/scene/gui/rich_text_effect.cpp b/scene/gui/rich_text_effect.cpp
index c5b1685ff9..0f5926ea1c 100644
--- a/scene/gui/rich_text_effect.cpp
+++ b/scene/gui/rich_text_effect.cpp
@@ -91,7 +91,7 @@ void CharFXTransform::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "relative_index"), "set_relative_index", "get_relative_index");
ADD_PROPERTY(PropertyInfo(Variant::INT, "absolute_index"), "set_absolute_index", "get_absolute_index");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "elapsed_time"), "set_elapsed_time", "get_elapsed_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "elapsed_time"), "set_elapsed_time", "get_elapsed_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "visible"), "set_visibility", "is_visible");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 6d8be469bd..bc1510d6f6 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1208,49 +1208,59 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
if (k.is_valid()) {
if (k->is_pressed() && !k->get_alt() && !k->get_shift()) {
- bool handled = true;
- switch (k->get_scancode()) {
+ bool handled = false;
+ switch (k->get_keycode()) {
case KEY_PAGEUP: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(vscroll->get_value() - vscroll->get_page());
+ handled = true;
+ }
} break;
case KEY_PAGEDOWN: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(vscroll->get_value() + vscroll->get_page());
+ handled = true;
+ }
} break;
case KEY_UP: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(vscroll->get_value() - get_font("normal_font")->get_height());
+ handled = true;
+ }
} break;
case KEY_DOWN: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(vscroll->get_value() + get_font("normal_font")->get_height());
+ handled = true;
+ }
} break;
case KEY_HOME: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(0);
+ handled = true;
+ }
} break;
case KEY_END: {
- if (vscroll->is_visible_in_tree())
+ if (vscroll->is_visible_in_tree()) {
vscroll->set_value(vscroll->get_max());
+ handled = true;
+ }
} break;
case KEY_INSERT:
case KEY_C: {
if (k->get_command()) {
selection_copy();
- } else {
- handled = false;
+ handled = true;
}
} break;
- default: handled = false;
}
if (handled)
@@ -2689,7 +2699,6 @@ int RichTextLabel::get_content_height() {
void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &RichTextLabel::_gui_input);
- ClassDB::bind_method(D_METHOD("_scroll_changed"), &RichTextLabel::_scroll_changed);
ClassDB::bind_method(D_METHOD("get_text"), &RichTextLabel::get_text);
ClassDB::bind_method(D_METHOD("add_text", "text"), &RichTextLabel::add_text);
ClassDB::bind_method(D_METHOD("set_text", "text"), &RichTextLabel::set_text);
@@ -2771,7 +2780,7 @@ void RichTextLabel::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bbcode_text", PROPERTY_HINT_MULTILINE_TEXT), "set_bbcode", "get_bbcode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined");
ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size");
@@ -2953,7 +2962,7 @@ RichTextLabel::RichTextLabel() {
vscroll->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 0);
vscroll->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 0);
vscroll->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0);
- vscroll->connect("value_changed", this, "_scroll_changed");
+ vscroll->connect("value_changed", callable_mp(this, &RichTextLabel::_scroll_changed));
vscroll->set_step(1);
vscroll->hide();
current_idx = 1;
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 8e6d0843a7..fef5e00984 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -296,15 +296,15 @@ void ScrollBar::_notification(int p_what) {
}
if (drag_node) {
- drag_node->connect("gui_input", this, "_drag_node_input");
- drag_node->connect("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT);
+ drag_node->connect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
+ drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), varray(), CONNECT_ONESHOT);
}
}
if (p_what == NOTIFICATION_EXIT_TREE) {
if (drag_node) {
- drag_node->disconnect("gui_input", this, "_drag_node_input");
- drag_node->disconnect("tree_exiting", this, "_drag_node_exit");
+ drag_node->disconnect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
+ drag_node->disconnect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit));
}
drag_node = NULL;
@@ -539,7 +539,7 @@ float ScrollBar::get_custom_step() const {
void ScrollBar::_drag_node_exit() {
if (drag_node) {
- drag_node->disconnect("gui_input", this, "_drag_node_input");
+ drag_node->disconnect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
}
drag_node = NULL;
}
@@ -611,8 +611,8 @@ void ScrollBar::set_drag_node(const NodePath &p_path) {
if (is_inside_tree()) {
if (drag_node) {
- drag_node->disconnect("gui_input", this, "_drag_node_input");
- drag_node->disconnect("tree_exiting", this, "_drag_node_exit");
+ drag_node->disconnect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
+ drag_node->disconnect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit));
}
}
@@ -627,8 +627,8 @@ void ScrollBar::set_drag_node(const NodePath &p_path) {
}
if (drag_node) {
- drag_node->connect("gui_input", this, "_drag_node_input");
- drag_node->connect("tree_exiting", this, "_drag_node_exit", varray(), CONNECT_ONESHOT);
+ drag_node->connect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
+ drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), varray(), CONNECT_ONESHOT);
}
}
}
@@ -651,12 +651,10 @@ void ScrollBar::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &ScrollBar::_gui_input);
ClassDB::bind_method(D_METHOD("set_custom_step", "step"), &ScrollBar::set_custom_step);
ClassDB::bind_method(D_METHOD("get_custom_step"), &ScrollBar::get_custom_step);
- ClassDB::bind_method(D_METHOD("_drag_node_input"), &ScrollBar::_drag_node_input);
- ClassDB::bind_method(D_METHOD("_drag_node_exit"), &ScrollBar::_drag_node_exit);
ADD_SIGNAL(MethodInfo("scrolling"));
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step");
}
ScrollBar::ScrollBar(Orientation p_orientation) {
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 509e6d19f6..c25a6d5a0c 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -267,7 +267,7 @@ void ScrollContainer::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- get_viewport()->connect("gui_focus_changed", this, "_ensure_focused_visible");
+ get_viewport()->connect("gui_focus_changed", callable_mp(this, &ScrollContainer::_ensure_focused_visible));
}
if (p_what == NOTIFICATION_SORT_CHILDREN) {
@@ -570,14 +570,12 @@ VScrollBar *ScrollContainer::get_v_scrollbar() {
void ScrollContainer::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_scroll_moved"), &ScrollContainer::_scroll_moved);
ClassDB::bind_method(D_METHOD("_gui_input"), &ScrollContainer::_gui_input);
ClassDB::bind_method(D_METHOD("set_enable_h_scroll", "enable"), &ScrollContainer::set_enable_h_scroll);
ClassDB::bind_method(D_METHOD("is_h_scroll_enabled"), &ScrollContainer::is_h_scroll_enabled);
ClassDB::bind_method(D_METHOD("set_enable_v_scroll", "enable"), &ScrollContainer::set_enable_v_scroll);
ClassDB::bind_method(D_METHOD("is_v_scroll_enabled"), &ScrollContainer::is_v_scroll_enabled);
ClassDB::bind_method(D_METHOD("_update_scrollbar_position"), &ScrollContainer::_update_scrollbar_position);
- ClassDB::bind_method(D_METHOD("_ensure_focused_visible"), &ScrollContainer::_ensure_focused_visible);
ClassDB::bind_method(D_METHOD("set_h_scroll", "value"), &ScrollContainer::set_h_scroll);
ClassDB::bind_method(D_METHOD("get_h_scroll"), &ScrollContainer::get_h_scroll);
ClassDB::bind_method(D_METHOD("set_v_scroll", "value"), &ScrollContainer::set_v_scroll);
@@ -610,12 +608,12 @@ ScrollContainer::ScrollContainer() {
h_scroll = memnew(HScrollBar);
h_scroll->set_name("_h_scroll");
add_child(h_scroll);
- h_scroll->connect("value_changed", this, "_scroll_moved");
+ h_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved));
v_scroll = memnew(VScrollBar);
v_scroll->set_name("_v_scroll");
add_child(v_scroll);
- v_scroll->connect("value_changed", this, "_scroll_moved");
+ v_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved));
drag_speed = Vector2();
drag_touching = false;
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index c49d7f3d12..576de98a4f 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -267,7 +267,6 @@ void SpinBox::_bind_methods() {
//ClassDB::bind_method(D_METHOD("_value_changed"),&SpinBox::_value_changed);
ClassDB::bind_method(D_METHOD("_gui_input"), &SpinBox::_gui_input);
- ClassDB::bind_method(D_METHOD("_text_entered"), &SpinBox::_text_entered);
ClassDB::bind_method(D_METHOD("set_align", "align"), &SpinBox::set_align);
ClassDB::bind_method(D_METHOD("get_align"), &SpinBox::get_align);
ClassDB::bind_method(D_METHOD("set_suffix", "suffix"), &SpinBox::set_suffix);
@@ -277,10 +276,7 @@ void SpinBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_editable", "editable"), &SpinBox::set_editable);
ClassDB::bind_method(D_METHOD("is_editable"), &SpinBox::is_editable);
ClassDB::bind_method(D_METHOD("apply"), &SpinBox::apply);
- ClassDB::bind_method(D_METHOD("_line_edit_focus_exit"), &SpinBox::_line_edit_focus_exit);
ClassDB::bind_method(D_METHOD("get_line_edit"), &SpinBox::get_line_edit);
- ClassDB::bind_method(D_METHOD("_line_edit_input"), &SpinBox::_line_edit_input);
- ClassDB::bind_method(D_METHOD("_range_click_timeout"), &SpinBox::_range_click_timeout);
ADD_PROPERTY(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable");
@@ -297,12 +293,12 @@ SpinBox::SpinBox() {
line_edit->set_anchors_and_margins_preset(Control::PRESET_WIDE);
line_edit->set_mouse_filter(MOUSE_FILTER_PASS);
//connect("value_changed",this,"_value_changed");
- line_edit->connect("text_entered", this, "_text_entered", Vector<Variant>(), CONNECT_DEFERRED);
- line_edit->connect("focus_exited", this, "_line_edit_focus_exit", Vector<Variant>(), CONNECT_DEFERRED);
- line_edit->connect("gui_input", this, "_line_edit_input");
+ line_edit->connect("text_entered", callable_mp(this, &SpinBox::_text_entered), Vector<Variant>(), CONNECT_DEFERRED);
+ line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), Vector<Variant>(), CONNECT_DEFERRED);
+ line_edit->connect("gui_input", callable_mp(this, &SpinBox::_line_edit_input));
drag.enabled = false;
range_click_timer = memnew(Timer);
- range_click_timer->connect("timeout", this, "_range_click_timeout");
+ range_click_timer->connect("timeout", callable_mp(this, &SpinBox::_range_click_timeout));
add_child(range_click_timer);
}
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 402623e53d..6290d364fc 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -537,8 +537,8 @@ void TabContainer::add_child_notify(Node *p_child) {
c->set_margin(Margin(MARGIN_BOTTOM), c->get_margin(Margin(MARGIN_BOTTOM)) - sb->get_margin(Margin(MARGIN_BOTTOM)));
update();
- p_child->connect("renamed", this, "_child_renamed_callback");
- if (first)
+ p_child->connect("renamed", callable_mp(this, &TabContainer::_child_renamed_callback));
+ if (first && is_inside_tree())
emit_signal("tab_changed", current);
}
@@ -620,7 +620,7 @@ void TabContainer::remove_child_notify(Node *p_child) {
call_deferred("_update_current_tab");
- p_child->disconnect("renamed", this, "_child_renamed_callback");
+ p_child->disconnect("renamed", callable_mp(this, &TabContainer::_child_renamed_callback));
update();
}
@@ -1011,9 +1011,7 @@ void TabContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_hidden_tabs_for_min_size", "enabled"), &TabContainer::set_use_hidden_tabs_for_min_size);
ClassDB::bind_method(D_METHOD("get_use_hidden_tabs_for_min_size"), &TabContainer::get_use_hidden_tabs_for_min_size);
- ClassDB::bind_method(D_METHOD("_child_renamed_callback"), &TabContainer::_child_renamed_callback);
ClassDB::bind_method(D_METHOD("_on_theme_changed"), &TabContainer::_on_theme_changed);
- ClassDB::bind_method(D_METHOD("_on_mouse_exited"), &TabContainer::_on_mouse_exited);
ClassDB::bind_method(D_METHOD("_update_current_tab"), &TabContainer::_update_current_tab);
ADD_SIGNAL(MethodInfo("tab_changed", PropertyInfo(Variant::INT, "tab")));
@@ -1048,5 +1046,5 @@ TabContainer::TabContainer() {
tabs_rearrange_group = -1;
use_hidden_tabs_for_min_size = false;
- connect("mouse_exited", this, "_on_mouse_exited");
+ connect("mouse_exited", callable_mp(this, &TabContainer::_on_mouse_exited));
}
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 4aa7ea8cb1..901408919a 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -956,7 +956,6 @@ void Tabs::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &Tabs::_gui_input);
ClassDB::bind_method(D_METHOD("_update_hover"), &Tabs::_update_hover);
- ClassDB::bind_method(D_METHOD("_on_mouse_exited"), &Tabs::_on_mouse_exited);
ClassDB::bind_method(D_METHOD("get_tab_count"), &Tabs::get_tab_count);
ClassDB::bind_method(D_METHOD("set_current_tab", "tab_idx"), &Tabs::set_current_tab);
ClassDB::bind_method(D_METHOD("get_current_tab"), &Tabs::get_current_tab);
@@ -1034,5 +1033,5 @@ Tabs::Tabs() {
drag_to_rearrange_enabled = false;
tabs_rearrange_group = -1;
- connect("mouse_exited", this, "_on_mouse_exited");
+ connect("mouse_exited", callable_mp(this, &Tabs::_on_mouse_exited));
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index a5c316848e..5e925bf37f 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -753,10 +753,18 @@ void TextEdit::_notification(int p_what) {
}
}
- if (line_length_guideline) {
- int x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs;
- if (x > xmargin_beg && x < xmargin_end) {
- VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color);
+ if (line_length_guidelines) {
+ const int hard_x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_hard_col - cursor.x_ofs;
+ if (hard_x > xmargin_beg && hard_x < xmargin_end) {
+ VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(hard_x, 0), Point2(hard_x, size.height), cache.line_length_guideline_color);
+ }
+
+ // Draw a "Soft" line length guideline, less visible than the hard line length guideline.
+ // It's usually set to a lower column compared to the hard line length guideline.
+ // Only drawn if its column differs from the hard line length guideline.
+ const int soft_x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_soft_col - cursor.x_ofs;
+ if (hard_x != soft_x && soft_x > xmargin_beg && soft_x < xmargin_end) {
+ VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(soft_x, 0), Point2(soft_x, size.height), cache.line_length_guideline_color * Color(1, 1, 1, 0.5));
}
}
@@ -1844,6 +1852,42 @@ void TextEdit::_consume_pair_symbol(CharType ch) {
}
}
+ String line = text[cursor.line];
+
+ bool in_single_quote = false;
+ bool in_double_quote = false;
+
+ int c = 0;
+ while (c < line.length()) {
+ if (line[c] == '\\') {
+ c++; // Skip quoted anything.
+
+ if (cursor.column == c) {
+ break;
+ }
+ } else {
+ if (line[c] == '\'' && !in_double_quote) {
+ in_single_quote = !in_single_quote;
+ } else if (line[c] == '"' && !in_single_quote) {
+ in_double_quote = !in_double_quote;
+ }
+ }
+
+ c++;
+
+ if (cursor.column == c) {
+ break;
+ }
+ }
+
+ // Disallow inserting duplicated quotes while already in string
+ if ((in_single_quote || in_double_quote) && (ch == '"' || ch == '\'')) {
+ insert_text_at_cursor(ch_single);
+ cursor_set_column(cursor_position_to_move);
+
+ return;
+ }
+
insert_text_at_cursor(ch_pair);
cursor_set_column(cursor_position_to_move);
}
@@ -2520,9 +2564,9 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
k = k->duplicate(); // It will be modified later on.
#ifdef OSX_ENABLED
- if (k->get_scancode() == KEY_META) {
+ if (k->get_keycode() == KEY_META) {
#else
- if (k->get_scancode() == KEY_CONTROL) {
+ if (k->get_keycode() == KEY_CONTROL) {
#endif
if (select_identifiers_enabled) {
@@ -2553,7 +2597,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (valid) {
if (!k->get_alt()) {
- if (k->get_scancode() == KEY_UP) {
+ if (k->get_keycode() == KEY_UP) {
if (completion_index > 0) {
completion_index--;
@@ -2567,7 +2611,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_DOWN) {
+ if (k->get_keycode() == KEY_DOWN) {
if (completion_index < completion_options.size() - 1) {
completion_index++;
@@ -2581,7 +2625,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_PAGEUP) {
+ if (k->get_keycode() == KEY_PAGEUP) {
completion_index -= get_constant("completion_lines");
if (completion_index < 0)
@@ -2592,7 +2636,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_PAGEDOWN) {
+ if (k->get_keycode() == KEY_PAGEDOWN) {
completion_index += get_constant("completion_lines");
if (completion_index >= completion_options.size())
@@ -2603,7 +2647,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_HOME && completion_index > 0) {
+ if (k->get_keycode() == KEY_HOME && completion_index > 0) {
completion_index = 0;
completion_current = completion_options[completion_index];
@@ -2612,7 +2656,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_END && completion_index < completion_options.size() - 1) {
+ if (k->get_keycode() == KEY_END && completion_index < completion_options.size() - 1) {
completion_index = completion_options.size() - 1;
completion_current = completion_options[completion_index];
@@ -2621,14 +2665,14 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_KP_ENTER || k->get_scancode() == KEY_ENTER || k->get_scancode() == KEY_TAB) {
+ if (k->get_keycode() == KEY_KP_ENTER || k->get_keycode() == KEY_ENTER || k->get_keycode() == KEY_TAB) {
_confirm_completion();
accept_event();
return;
}
- if (k->get_scancode() == KEY_BACKSPACE) {
+ if (k->get_keycode() == KEY_BACKSPACE) {
_reset_caret_blink_timer();
@@ -2638,7 +2682,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
- if (k->get_scancode() == KEY_SHIFT) {
+ if (k->get_keycode() == KEY_SHIFT) {
accept_event();
return;
}
@@ -2682,20 +2726,20 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
/* TEST CONTROL FIRST! */
// Some remaps for duplicate functions.
- if (k->get_command() && !k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_scancode() == KEY_INSERT) {
+ if (k->get_command() && !k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_keycode() == KEY_INSERT) {
- k->set_scancode(KEY_C);
+ k->set_keycode(KEY_C);
}
- if (!k->get_command() && k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_scancode() == KEY_INSERT) {
+ if (!k->get_command() && k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_keycode() == KEY_INSERT) {
- k->set_scancode(KEY_V);
+ k->set_keycode(KEY_V);
k->set_command(true);
k->set_shift(false);
}
#ifdef APPLE_STYLE_KEYS
if (k->get_control() && !k->get_shift() && !k->get_alt() && !k->get_command()) {
uint32_t remap_key = KEY_UNKNOWN;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_F: {
remap_key = KEY_RIGHT;
} break;
@@ -2717,7 +2761,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
if (remap_key != KEY_UNKNOWN) {
- k->set_scancode(remap_key);
+ k->set_keycode(remap_key);
k->set_control(false);
}
}
@@ -2735,7 +2779,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
bool unselect = false;
bool dobreak = false;
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_TAB: {
if (k->get_shift()) {
@@ -2809,11 +2853,11 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
selection.selecting_text = false;
- bool scancode_handled = true;
+ bool keycode_handled = true;
- // Special scancode test.
+ // Special keycode test.
- switch (k->get_scancode()) {
+ switch (k->get_keycode()) {
case KEY_KP_ENTER:
case KEY_ENTER: {
@@ -2935,7 +2979,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
completion_hint = "";
update();
} else {
- scancode_handled = false;
+ keycode_handled = false;
}
} break;
case KEY_TAB: {
@@ -3008,7 +3052,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (k->get_alt() && cursor.column > 1) {
#else
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
} else if (k->get_command() && cursor.column > 1) {
#endif
@@ -3065,10 +3109,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_4: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_LEFT: {
@@ -3101,7 +3145,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} else if (k->get_alt()) {
#else
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
} else if (k->get_command()) {
#endif
@@ -3141,10 +3185,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_6: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_RIGHT: {
@@ -3163,7 +3207,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} else if (k->get_alt()) {
#else
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
} else if (k->get_command()) {
#endif
@@ -3202,15 +3246,15 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_8: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_UP: {
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
#ifndef APPLE_STYLE_KEYS
@@ -3255,15 +3299,15 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_2: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_DOWN: {
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
#ifndef APPLE_STYLE_KEYS
@@ -3323,7 +3367,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (k->get_alt() && cursor.column < curline_len - 1) {
#else
if (k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
} else if (k->get_command() && cursor.column < curline_len - 1) {
#endif
@@ -3378,10 +3422,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_7: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_HOME: {
#ifdef APPLE_STYLE_KEYS
@@ -3439,10 +3483,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_1: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_END: {
#ifdef APPLE_STYLE_KEYS
@@ -3486,10 +3530,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_9: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_PAGEUP: {
@@ -3509,10 +3553,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_KP_3: {
if (k->get_unicode() != 0) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_PAGEDOWN: {
@@ -3534,7 +3578,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
#ifndef APPLE_STYLE_KEYS
if (!k->get_control() || k->get_shift() || k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
if (is_shortcut_keys_enabled()) {
@@ -3542,7 +3586,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
#else
if ((!k->get_command() && !k->get_control())) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
if (!k->get_shift() && k->get_command() && is_shortcut_keys_enabled())
@@ -3573,7 +3617,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
case KEY_E: {
if (!k->get_control() || k->get_command() || k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
@@ -3598,7 +3642,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
break;
}
if (!k->get_command() || k->get_shift() || k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
if (is_shortcut_keys_enabled()) {
@@ -3609,7 +3653,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
case KEY_C: {
if (!k->get_command() || k->get_shift() || k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
@@ -3625,7 +3669,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
if (!k->get_command()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
@@ -3643,7 +3687,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
if (!k->get_command()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
@@ -3656,7 +3700,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
break;
}
if (!k->get_command() || k->get_shift() || k->get_alt()) {
- scancode_handled = false;
+ keycode_handled = false;
break;
}
@@ -3673,9 +3717,9 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
#endif
query_code_comple();
- scancode_handled = true;
+ keycode_handled = true;
} else {
- scancode_handled = false;
+ keycode_handled = false;
}
} break;
@@ -3692,20 +3736,20 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
default: {
- scancode_handled = false;
+ keycode_handled = false;
} break;
}
- if (scancode_handled)
+ if (keycode_handled)
accept_event();
- if (k->get_scancode() == KEY_INSERT) {
+ if (k->get_keycode() == KEY_INSERT) {
set_insert_mode(!insert_mode);
accept_event();
return;
}
- if (!scancode_handled && !k->get_command()) { // For German keyboards.
+ if (!keycode_handled && !k->get_command()) { // For German keyboards.
if (k->get_unicode() >= 32) {
@@ -5446,11 +5490,11 @@ int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_searc
return col;
}
-PoolVector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const {
+Vector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const {
int col, line;
if (search(p_key, p_search_flags, p_from_line, p_from_column, line, col)) {
- PoolVector<int> result;
+ Vector<int> result;
result.resize(2);
result.set(SEARCH_RESULT_COLUMN, col);
result.set(SEARCH_RESULT_LINE, line);
@@ -5458,7 +5502,7 @@ PoolVector<int> TextEdit::_search_bind(const String &p_key, uint32_t p_search_fl
} else {
- return PoolVector<int>();
+ return Vector<int>();
}
}
@@ -6798,13 +6842,18 @@ bool TextEdit::is_show_line_numbers_enabled() const {
return line_numbers;
}
-void TextEdit::set_show_line_length_guideline(bool p_show) {
- line_length_guideline = p_show;
+void TextEdit::set_show_line_length_guidelines(bool p_show) {
+ line_length_guidelines = p_show;
+ update();
+}
+
+void TextEdit::set_line_length_guideline_soft_column(int p_column) {
+ line_length_guideline_soft_col = p_column;
update();
}
-void TextEdit::set_line_length_guideline_column(int p_column) {
- line_length_guideline_col = p_column;
+void TextEdit::set_line_length_guideline_hard_column(int p_column) {
+ line_length_guideline_hard_col = p_column;
update();
}
@@ -6995,13 +7044,8 @@ PopupMenu *TextEdit::get_menu() const {
void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &TextEdit::_gui_input);
- ClassDB::bind_method(D_METHOD("_scroll_moved"), &TextEdit::_scroll_moved);
ClassDB::bind_method(D_METHOD("_cursor_changed_emit"), &TextEdit::_cursor_changed_emit);
ClassDB::bind_method(D_METHOD("_text_changed_emit"), &TextEdit::_text_changed_emit);
- ClassDB::bind_method(D_METHOD("_push_current_op"), &TextEdit::_push_current_op);
- ClassDB::bind_method(D_METHOD("_click_selection_held"), &TextEdit::_click_selection_held);
- ClassDB::bind_method(D_METHOD("_toggle_draw_caret"), &TextEdit::_toggle_draw_caret);
- ClassDB::bind_method(D_METHOD("_v_scroll_input"), &TextEdit::_v_scroll_input);
ClassDB::bind_method(D_METHOD("_update_wrap_at"), &TextEdit::_update_wrap_at);
BIND_ENUM_CONSTANT(SEARCH_MATCH_CASE);
@@ -7147,10 +7191,10 @@ void TextEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shortcut_keys_enabled"), "set_shortcut_keys_enabled", "is_shortcut_keys_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selecting_enabled"), "set_selecting_enabled", "is_selecting_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_scrolling"), "set_smooth_scroll_enable", "is_smooth_scroll_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_enabled"), "set_wrap_enabled", "is_wrap_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "scroll_vertical"), "set_v_scroll", "get_v_scroll");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "scroll_vertical"), "set_v_scroll", "get_v_scroll");
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll");
ADD_GROUP("Minimap", "minimap_");
@@ -7160,7 +7204,7 @@ void TextEdit::_bind_methods() {
ADD_GROUP("Caret", "caret_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), "cursor_set_block_mode", "cursor_is_block_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_moving_by_right_click"), "set_right_click_moves_caret", "is_right_click_moving_caret");
ADD_SIGNAL(MethodInfo("cursor_changed"));
@@ -7180,7 +7224,7 @@ void TextEdit::_bind_methods() {
BIND_ENUM_CONSTANT(MENU_MAX);
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
- ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::REAL, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers.
+ ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::FLOAT, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers.
}
TextEdit::TextEdit() {
@@ -7223,10 +7267,10 @@ TextEdit::TextEdit() {
updating_scrolls = false;
selection.active = false;
- h_scroll->connect("value_changed", this, "_scroll_moved");
- v_scroll->connect("value_changed", this, "_scroll_moved");
+ h_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
+ v_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
- v_scroll->connect("scrolling", this, "_v_scroll_input");
+ v_scroll->connect("scrolling", callable_mp(this, &TextEdit::_v_scroll_input));
cursor_changed_dirty = false;
text_changed_dirty = false;
@@ -7243,7 +7287,7 @@ TextEdit::TextEdit() {
caret_blink_timer = memnew(Timer);
add_child(caret_blink_timer);
caret_blink_timer->set_wait_time(0.65);
- caret_blink_timer->connect("timeout", this, "_toggle_draw_caret");
+ caret_blink_timer->connect("timeout", callable_mp(this, &TextEdit::_toggle_draw_caret));
cursor_set_blink_enabled(false);
right_click_moves_caret = true;
@@ -7251,12 +7295,12 @@ TextEdit::TextEdit() {
add_child(idle_detect);
idle_detect->set_one_shot(true);
idle_detect->set_wait_time(GLOBAL_GET("gui/timers/text_edit_idle_detect_sec"));
- idle_detect->connect("timeout", this, "_push_current_op");
+ idle_detect->connect("timeout", callable_mp(this, &TextEdit::_push_current_op));
click_select_held = memnew(Timer);
add_child(click_select_held);
click_select_held->set_wait_time(0.05);
- click_select_held->connect("timeout", this, "_click_selection_held");
+ click_select_held->connect("timeout", callable_mp(this, &TextEdit::_click_selection_held));
current_op.type = TextOperation::TYPE_NONE;
undo_enabled = true;
@@ -7273,8 +7317,9 @@ TextEdit::TextEdit() {
tooltip_obj = NULL;
line_numbers = false;
line_numbers_zero_padded = false;
- line_length_guideline = false;
- line_length_guideline_col = 80;
+ line_length_guidelines = false;
+ line_length_guideline_soft_col = 80;
+ line_length_guideline_hard_col = 100;
draw_bookmark_gutter = false;
draw_breakpoint_gutter = false;
draw_fold_gutter = false;
@@ -7314,7 +7359,7 @@ TextEdit::TextEdit() {
add_child(menu);
readonly = true; // Initialise to opposite first, so we get past the early-out in set_readonly.
set_readonly(false);
- menu->connect("id_pressed", this, "menu_option");
+ menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
first_draw = true;
executing_line = -1;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index a849f62bc5..6e267f5a47 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -369,8 +369,9 @@ private:
bool undo_enabled;
bool line_numbers;
bool line_numbers_zero_padded;
- bool line_length_guideline;
- int line_length_guideline_col;
+ bool line_length_guidelines;
+ int line_length_guideline_soft_col;
+ int line_length_guideline_hard_col;
bool draw_bookmark_gutter;
bool draw_breakpoint_gutter;
int breakpoint_gutter_width;
@@ -513,7 +514,7 @@ private:
int _get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column);
- PoolVector<int> _search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const;
+ Vector<int> _search_bind(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const;
PopupMenu *menu;
@@ -765,8 +766,9 @@ public:
void set_line_numbers_zero_padded(bool p_zero_padded);
- void set_show_line_length_guideline(bool p_show);
- void set_line_length_guideline_column(int p_column);
+ void set_show_line_length_guidelines(bool p_show);
+ void set_line_length_guideline_soft_column(int p_column);
+ void set_line_length_guideline_hard_column(int p_column);
void set_bookmark_gutter_enabled(bool p_draw);
bool is_bookmark_gutter_enabled() const;
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index c5650b1795..abf6b2ed49 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -510,8 +510,8 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_over"), "set_tint_over", "get_tint_over");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress"), "set_tint_progress", "get_tint_progress");
ADD_GROUP("Radial Fill", "radial_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");
ADD_GROUP("Stretch", "stretch_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "nine_patch_stretch"), "set_nine_patch_stretch", "get_nine_patch_stretch");
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index 64693e2531..6dafd3bf4f 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -127,7 +127,6 @@ void TextureRect::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_flipped_v"), &TextureRect::is_flipped_v);
ClassDB::bind_method(D_METHOD("set_stretch_mode", "stretch_mode"), &TextureRect::set_stretch_mode);
ClassDB::bind_method(D_METHOD("get_stretch_mode"), &TextureRect::get_stretch_mode);
- ClassDB::bind_method(D_METHOD("_texture_changed"), &TextureRect::_texture_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand");
@@ -160,13 +159,13 @@ void TextureRect::set_texture(const Ref<Texture2D> &p_tex) {
}
if (texture.is_valid()) {
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureRect::_texture_changed));
}
texture = p_tex;
if (texture.is_valid()) {
- texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureRect::_texture_changed));
}
update();
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 08835be9fd..12b3d56938 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -729,18 +729,18 @@ bool TreeItem::is_folding_disabled() const {
return disable_folding;
}
-Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
- if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ if (p_args[0]->get_type() != Variant::STRING && p_args[0]->get_type() != Variant::STRING_NAME) {
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::STRING;
+ r_error.expected = Variant::STRING_NAME;
return Variant();
}
@@ -750,7 +750,7 @@ Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, V
return Variant();
}
-void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (!p_item) {
return;
}
@@ -762,7 +762,7 @@ void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Vari
}
}
-void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
recursive_call_aux(this, p_method, p_args, p_argcount, r_error);
}
@@ -861,7 +861,7 @@ void TreeItem::_bind_methods() {
{
MethodInfo mi;
mi.name = "call_recursive";
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_recursive", &TreeItem::_call_recursive_bind, mi);
}
@@ -1020,7 +1020,7 @@ int Tree::compute_item_height(TreeItem *p_item) const {
int check_icon_h = cache.checked->get_height();
if (height < check_icon_h)
height = check_icon_h;
- FALLTHROUGH;
+ [[fallthrough]];
}
case TreeItem::CELL_MODE_STRING:
case TreeItem::CELL_MODE_CUSTOM:
@@ -2439,7 +2439,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
return;
} else {
- if (k->get_scancode() != KEY_SHIFT)
+ if (k->get_keycode() != KEY_SHIFT)
last_keypress = 0;
}
}
@@ -3914,13 +3914,7 @@ bool Tree::get_allow_reselect() const {
void Tree::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_range_click_timeout"), &Tree::_range_click_timeout);
ClassDB::bind_method(D_METHOD("_gui_input"), &Tree::_gui_input);
- ClassDB::bind_method(D_METHOD("_popup_select"), &Tree::popup_select);
- ClassDB::bind_method(D_METHOD("_text_editor_enter"), &Tree::text_editor_enter);
- ClassDB::bind_method(D_METHOD("_text_editor_modal_close"), &Tree::_text_editor_modal_close);
- ClassDB::bind_method(D_METHOD("_value_editor_changed"), &Tree::value_editor_changed);
- ClassDB::bind_method(D_METHOD("_scroll_moved"), &Tree::_scroll_moved);
ClassDB::bind_method(D_METHOD("clear"), &Tree::clear);
ClassDB::bind_method(D_METHOD("create_item", "parent", "idx"), &Tree::_create_item, DEFVAL(Variant()), DEFVAL(-1));
@@ -4043,15 +4037,15 @@ Tree::Tree() {
add_child(v_scroll);
range_click_timer = memnew(Timer);
- range_click_timer->connect("timeout", this, "_range_click_timeout");
+ range_click_timer->connect("timeout", callable_mp(this, &Tree::_range_click_timeout));
add_child(range_click_timer);
- h_scroll->connect("value_changed", this, "_scroll_moved");
- v_scroll->connect("value_changed", this, "_scroll_moved");
- text_editor->connect("text_entered", this, "_text_editor_enter");
- text_editor->connect("modal_closed", this, "_text_editor_modal_close");
- popup_menu->connect("id_pressed", this, "_popup_select");
- value_editor->connect("value_changed", this, "_value_editor_changed");
+ h_scroll->connect("value_changed", callable_mp(this, &Tree::_scroll_moved));
+ v_scroll->connect("value_changed", callable_mp(this, &Tree::_scroll_moved));
+ text_editor->connect("text_entered", callable_mp(this, &Tree::text_editor_enter));
+ text_editor->connect("modal_closed", callable_mp(this, &Tree::_text_editor_modal_close));
+ popup_menu->connect("id_pressed", callable_mp(this, &Tree::popup_select));
+ value_editor->connect("value_changed", callable_mp(this, &Tree::value_editor_changed));
value_editor->set_as_toplevel(true);
text_editor->set_as_toplevel(true);
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index b58f937c57..b179c5bcba 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -172,7 +172,7 @@ protected:
remove_child(Object::cast_to<TreeItem>(p_child));
}
- Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
public:
/* cell mode */
@@ -282,7 +282,7 @@ public:
void set_disable_folding(bool p_disable);
bool is_folding_disabled() const;
- void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
~TreeItem();
};
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 3d8112b986..ac1e4a5629 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -473,15 +473,15 @@ void VideoPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "audio_track", PROPERTY_HINT_RANGE, "0,128,1"), "set_audio_track", "get_audio_track");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "VideoStream"), "set_stream", "get_stream");
//ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), "set_loop", "has_loop") ;
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "has_autoplay");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_paused", "is_paused");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand");
ADD_PROPERTY(PropertyInfo(Variant::INT, "buffering_msec", PROPERTY_HINT_RANGE, "10,1000"), "set_buffering_msec", "get_buffering_msec");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
}
VideoPlayer::VideoPlayer() {
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 04cf5c6338..2085fa3a60 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -307,15 +307,15 @@ void CanvasLayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "layer", PROPERTY_HINT_RANGE, "-128,128,1"), "set_layer", "get_layer");
ADD_GROUP("Transform", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform");
ADD_GROUP("", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_viewport", PROPERTY_HINT_RESOURCE_TYPE, "Viewport", 0), "set_custom_viewport", "get_custom_viewport");
ADD_GROUP("Follow Viewport", "follow_viewport");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_viewport_enable"), "set_follow_viewport", "is_following_viewport");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale");
}
CanvasLayer::CanvasLayer() {
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 3c89069816..fee2ada76d 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -118,7 +118,7 @@ Error HTTPRequest::request(const String &p_url, const Vector<String> &p_custom_h
client->set_blocking_mode(false);
err = _request();
if (err != OK) {
- call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
return ERR_CANT_CONNECT;
}
@@ -135,7 +135,7 @@ void HTTPRequest::_thread_func(void *p_userdata) {
Error err = hr->_request();
if (err != OK) {
- hr->call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray());
+ hr->call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
} else {
while (!hr->thread_request_quit) {
@@ -180,7 +180,7 @@ void HTTPRequest::cancel_request() {
bool HTTPRequest::_handle_response(bool *ret_value) {
if (!client->has_response()) {
- call_deferred("_request_done", RESULT_NO_RESPONSE, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_NO_RESPONSE, 0, PackedStringArray(), PackedByteArray());
*ret_value = true;
return true;
}
@@ -200,7 +200,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) {
if (max_redirects >= 0 && redirections >= max_redirects) {
- call_deferred("_request_done", RESULT_REDIRECT_LIMIT_REACHED, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_REDIRECT_LIMIT_REACHED, response_code, response_headers, PackedByteArray());
*ret_value = true;
return true;
}
@@ -246,7 +246,7 @@ bool HTTPRequest::_update_connection() {
switch (client->get_status()) {
case HTTPClient::STATUS_DISCONNECTED: {
- call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
return true; // End it, since it's doing something
} break;
case HTTPClient::STATUS_RESOLVING: {
@@ -255,7 +255,7 @@ bool HTTPRequest::_update_connection() {
return false;
} break;
case HTTPClient::STATUS_CANT_RESOLVE: {
- call_deferred("_request_done", RESULT_CANT_RESOLVE, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CANT_RESOLVE, 0, PackedStringArray(), PackedByteArray());
return true;
} break;
@@ -266,7 +266,7 @@ bool HTTPRequest::_update_connection() {
} break; // Connecting to IP
case HTTPClient::STATUS_CANT_CONNECT: {
- call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
return true;
} break;
@@ -283,7 +283,7 @@ bool HTTPRequest::_update_connection() {
if (_handle_response(&ret_value))
return ret_value;
- call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PackedByteArray());
return true;
}
if (body_len < 0) {
@@ -292,7 +292,7 @@ bool HTTPRequest::_update_connection() {
return true;
}
- call_deferred("_request_done", RESULT_CHUNKED_BODY_SIZE_MISMATCH, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_CHUNKED_BODY_SIZE_MISMATCH, response_code, response_headers, PackedByteArray());
return true;
// Request migh have been done
} else {
@@ -300,7 +300,7 @@ bool HTTPRequest::_update_connection() {
Error err = client->request(method, request_string, headers, request_data);
if (err != OK) {
- call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PackedStringArray(), PackedByteArray());
return true;
}
@@ -325,7 +325,7 @@ bool HTTPRequest::_update_connection() {
if (!client->is_response_chunked() && client->get_response_body_length() == 0) {
- call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, PackedByteArray());
return true;
}
@@ -334,7 +334,7 @@ bool HTTPRequest::_update_connection() {
body_len = client->get_response_body_length();
if (body_size_limit >= 0 && body_len > body_size_limit) {
- call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PackedByteArray());
return true;
}
@@ -342,7 +342,7 @@ bool HTTPRequest::_update_connection() {
file = FileAccess::open(download_to_file, FileAccess::WRITE);
if (!file) {
- call_deferred("_request_done", RESULT_DOWNLOAD_FILE_CANT_OPEN, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_DOWNLOAD_FILE_CANT_OPEN, response_code, response_headers, PackedByteArray());
return true;
}
}
@@ -350,14 +350,14 @@ bool HTTPRequest::_update_connection() {
client->poll();
- PoolByteArray chunk = client->read_response_body_chunk();
+ PackedByteArray chunk = client->read_response_body_chunk();
downloaded += chunk.size();
if (file) {
- PoolByteArray::Read r = chunk.read();
- file->store_buffer(r.ptr(), chunk.size());
+ const uint8_t *r = chunk.ptr();
+ file->store_buffer(r, chunk.size());
if (file->get_error() != OK) {
- call_deferred("_request_done", RESULT_DOWNLOAD_FILE_WRITE_ERROR, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_DOWNLOAD_FILE_WRITE_ERROR, response_code, response_headers, PackedByteArray());
return true;
}
} else {
@@ -365,7 +365,7 @@ bool HTTPRequest::_update_connection() {
}
if (body_size_limit >= 0 && downloaded > body_size_limit) {
- call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PoolByteArray());
+ call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PackedByteArray());
return true;
}
@@ -384,11 +384,11 @@ bool HTTPRequest::_update_connection() {
} break; // Request resulted in body: break which must be read
case HTTPClient::STATUS_CONNECTION_ERROR: {
- call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_CONNECTION_ERROR, 0, PackedStringArray(), PackedByteArray());
return true;
} break;
case HTTPClient::STATUS_SSL_HANDSHAKE_ERROR: {
- call_deferred("_request_done", RESULT_SSL_HANDSHAKE_ERROR, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_SSL_HANDSHAKE_ERROR, 0, PackedStringArray(), PackedByteArray());
return true;
} break;
}
@@ -396,7 +396,7 @@ bool HTTPRequest::_update_connection() {
ERR_FAIL_V(false);
}
-void HTTPRequest::_request_done(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data) {
+void HTTPRequest::_request_done(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data) {
cancel_request();
emit_signal("request_completed", p_status, p_code, headers, p_data);
@@ -505,12 +505,12 @@ int HTTPRequest::get_timeout() {
void HTTPRequest::_timeout() {
cancel_request();
- call_deferred("_request_done", RESULT_TIMEOUT, 0, PoolStringArray(), PoolByteArray());
+ call_deferred("_request_done", RESULT_TIMEOUT, 0, PackedStringArray(), PackedByteArray());
}
void HTTPRequest::_bind_methods() {
- ClassDB::bind_method(D_METHOD("request", "url", "custom_headers", "ssl_validate_domain", "method", "request_data"), &HTTPRequest::request, DEFVAL(PoolStringArray()), DEFVAL(true), DEFVAL(HTTPClient::METHOD_GET), DEFVAL(String()));
+ ClassDB::bind_method(D_METHOD("request", "url", "custom_headers", "ssl_validate_domain", "method", "request_data"), &HTTPRequest::request, DEFVAL(PackedStringArray()), DEFVAL(true), DEFVAL(HTTPClient::METHOD_GET), DEFVAL(String()));
ClassDB::bind_method(D_METHOD("cancel_request"), &HTTPRequest::cancel_request);
ClassDB::bind_method(D_METHOD("get_http_client_status"), &HTTPRequest::get_http_client_status);
@@ -539,8 +539,6 @@ void HTTPRequest::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_download_chunk_size"), &HTTPRequest::set_download_chunk_size);
ClassDB::bind_method(D_METHOD("get_download_chunk_size"), &HTTPRequest::get_download_chunk_size);
- ClassDB::bind_method(D_METHOD("_timeout"), &HTTPRequest::_timeout);
-
ADD_PROPERTY(PropertyInfo(Variant::STRING, "download_file", PROPERTY_HINT_FILE), "set_download_file", "get_download_file");
ADD_PROPERTY(PropertyInfo(Variant::INT, "download_chunk_size", PROPERTY_HINT_RANGE, "256,16777216"), "set_download_chunk_size", "get_download_chunk_size");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_threads"), "set_use_threads", "is_using_threads");
@@ -548,7 +546,7 @@ void HTTPRequest::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_redirects", PROPERTY_HINT_RANGE, "-1,64"), "set_max_redirects", "get_max_redirects");
ADD_PROPERTY(PropertyInfo(Variant::INT, "timeout", PROPERTY_HINT_RANGE, "0,86400"), "set_timeout", "get_timeout");
- ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::POOL_STRING_ARRAY, "headers"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "body")));
+ ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "headers"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "body")));
BIND_ENUM_CONSTANT(RESULT_SUCCESS);
//BIND_ENUM_CONSTANT( RESULT_NO_BODY );
@@ -589,7 +587,7 @@ HTTPRequest::HTTPRequest() {
timer = memnew(Timer);
timer->set_one_shot(true);
- timer->connect("timeout", this, "_timeout");
+ timer->connect("timeout", callable_mp(this, &HTTPRequest::_timeout));
add_child(timer);
timeout = 0;
}
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 94b323ae8a..a3d95cd652 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -73,12 +73,12 @@ private:
bool request_sent;
Ref<HTTPClient> client;
- PoolByteArray body;
+ PackedByteArray body;
volatile bool use_threads;
bool got_response;
int response_code;
- PoolVector<String> response_headers;
+ Vector<String> response_headers;
String download_to_file;
@@ -108,7 +108,7 @@ private:
Thread *thread;
- void _request_done(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
+ void _request_done(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
static void _thread_func(void *p_userdata);
protected:
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index f1b3f91920..fe238af1c4 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -115,7 +115,7 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene
Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) {
Dictionary ret;
- PoolStringArray order;
+ PackedStringArray order;
for (List<PropSet>::Element *E = stored_values.front(); E; E = E->next()) {
ret[E->get().name] = E->get().value;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 8ceac74bb8..973dff07d2 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -30,13 +30,12 @@
#include "node.h"
-#include <stdint.h>
-
#include "core/core_string_names.h"
#include "core/io/resource_loader.h"
#include "core/message_queue.h"
#include "core/print_string.h"
#include "instance_placeholder.h"
+#include "scene/debugger/scene_debugger.h"
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
#include "viewport.h"
@@ -45,6 +44,8 @@
#include "editor/editor_settings.h"
#endif
+#include <stdint.h>
+
VARIANT_ENUM_CAST(Node::PauseMode);
int Node::orphan_node_count = 0;
@@ -244,11 +245,7 @@ void Node::_propagate_enter_tree() {
data.blocked--;
#ifdef DEBUG_ENABLED
-
- if (ScriptDebugger::get_singleton() && data.filename != String()) {
- //used for live edit
- data.tree->live_scene_edit_cache[data.filename].insert(this);
- }
+ SceneDebugger::add_to_cache(data.filename, this);
#endif
// enter groups
}
@@ -268,26 +265,7 @@ void Node::_propagate_exit_tree() {
//block while removing children
#ifdef DEBUG_ENABLED
-
- if (ScriptDebugger::get_singleton() && data.filename != String()) {
- //used for live edit
- Map<String, Set<Node *> >::Element *E = data.tree->live_scene_edit_cache.find(data.filename);
- if (E) {
- E->get().erase(this);
- if (E->get().size() == 0) {
- data.tree->live_scene_edit_cache.erase(E);
- }
- }
-
- Map<Node *, Map<ObjectID, Node *> >::Element *F = data.tree->live_edit_remove_list.find(this);
- if (F) {
- for (Map<ObjectID, Node *>::Element *G = F->get().front(); G; G = G->next()) {
-
- memdelete(G->get());
- }
- data.tree->live_edit_remove_list.erase(F);
- }
- }
+ SceneDebugger::remove_from_cache(data.filename, this);
#endif
data.blocked++;
@@ -592,16 +570,16 @@ void Node::rpc_unreliable_id(int p_peer_id, const StringName &p_method, VARIANT_
rpcp(p_peer_id, true, p_method, argptr, argc);
}
-Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
return Variant();
}
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
return Variant();
@@ -611,27 +589,27 @@ Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Variant::CallErr
rpcp(0, false, method, &p_args[1], p_argcount - 1);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return Variant();
}
-Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 2;
return Variant();
}
if (p_args[0]->get_type() != Variant::INT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
return Variant();
}
if (p_args[1]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
return Variant();
@@ -642,20 +620,20 @@ Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Variant::Call
rpcp(peer_id, false, method, &p_args[2], p_argcount - 2);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return Variant();
}
-Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
return Variant();
}
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
return Variant();
@@ -665,27 +643,27 @@ Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Varia
rpcp(0, true, method, &p_args[1], p_argcount - 1);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return Variant();
}
-Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 2) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 2;
return Variant();
}
if (p_args[0]->get_type() != Variant::INT) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
return Variant();
}
if (p_args[1]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
return Variant();
@@ -696,7 +674,7 @@ Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Va
rpcp(peer_id, true, method, &p_args[2], p_argcount - 2);
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
return Variant();
}
@@ -2360,7 +2338,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
NodePath p = p_original->get_path_to(this);
Node *copy = p_copy->get_node(p);
- Node *target = Object::cast_to<Node>(E->get().target);
+ Node *target = Object::cast_to<Node>(E->get().callable.get_object());
if (!target) {
continue;
}
@@ -2368,15 +2346,18 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
Node *copytarget = target;
- // Atempt to find a path to the duplicate target, if it seems it's not part
+ // Attempt to find a path to the duplicate target, if it seems it's not part
// of the duplicated and not yet parented hierarchy then at least try to connect
// to the same target as the original
if (p_copy->has_node(ptarget))
copytarget = p_copy->get_node(ptarget);
- if (copy && copytarget && !copy->is_connected(E->get().signal, copytarget, E->get().method)) {
- copy->connect(E->get().signal, copytarget, E->get().method, E->get().binds, E->get().flags);
+ if (copy && copytarget) {
+ const Callable copy_callable = Callable(copytarget, E->get().callable.get_method());
+ if (!copy->is_connected(E->get().signal.get_name(), copy_callable)) {
+ copy->connect(E->get().signal.get_name(), copy_callable, E->get().binds, E->get().flags);
+ }
}
}
}
@@ -2531,10 +2512,10 @@ void Node::_replace_connections_target(Node *p_new_target) {
Connection &c = E->get();
if (c.flags & CONNECT_PERSIST) {
- c.source->disconnect(c.signal, this, c.method);
- bool valid = p_new_target->has_method(c.method) || Ref<Script>(p_new_target->get_script()).is_null() || Ref<Script>(p_new_target->get_script())->has_method(c.method);
- ERR_CONTINUE_MSG(!valid, "Attempt to connect signal '" + c.source->get_class() + "." + c.signal + "' to nonexistent method '" + c.target->get_class() + "." + c.method + "'.");
- c.source->connect(c.signal, p_new_target, c.method, c.binds, c.flags);
+ c.signal.get_object()->disconnect(c.signal.get_name(), Callable(this, c.callable.get_method()));
+ bool valid = p_new_target->has_method(c.callable.get_method()) || Ref<Script>(p_new_target->get_script()).is_null() || Ref<Script>(p_new_target->get_script())->has_method(c.callable.get_method());
+ ERR_CONTINUE_MSG(!valid, "Attempt to connect signal '" + c.signal.get_object()->get_class() + "." + c.signal.get_name() + "' to nonexistent method '" + c.callable.get_object()->get_class() + "." + c.callable.get_method() + "'.");
+ c.signal.get_object()->connect(c.signal.get_name(), Callable(p_new_target, c.callable.get_method()), c.binds, c.flags);
}
}
}
@@ -2822,7 +2803,7 @@ void Node::_bind_methods() {
GLOBAL_DEF("node/name_casing", NAME_CASING_PASCAL_CASE);
ProjectSettings::get_singleton()->set_custom_property_info("node/name_casing", PropertyInfo(Variant::INT, "node/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
- ClassDB::bind_method(D_METHOD("add_child_below_node", "node", "child_node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_child_below_node", "preceding_node", "node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false));
ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name);
ClassDB::bind_method(D_METHOD("get_name"), &Node::get_name);
@@ -2926,7 +2907,7 @@ void Node::_bind_methods() {
{
MethodInfo mi;
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
mi.name = "rpc";
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "rpc", &Node::_rpc_bind, mi);
@@ -2998,15 +2979,15 @@ void Node::_bind_methods() {
ADD_GROUP("Pause", "pause_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "pause_mode", PROPERTY_HINT_ENUM, "Inherit,Stop,Process"), "set_pause_mode", "get_pause_mode");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "filename", PROPERTY_HINT_NONE, "", 0), "set_filename", "get_filename");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "owner", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_owner", "get_owner");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", 0), "", "get_multiplayer");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", 0), "set_custom_multiplayer", "get_custom_multiplayer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_priority"), "set_process_priority", "get_process_priority");
- BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
+ BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::FLOAT, "delta")));
+ BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::FLOAT, "delta")));
BIND_VMETHOD(MethodInfo("_enter_tree"));
BIND_VMETHOD(MethodInfo("_exit_tree"));
BIND_VMETHOD(MethodInfo("_ready"));
diff --git a/scene/main/node.h b/scene/main/node.h
index 02c828e8ff..d1f75b71ec 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -185,10 +185,10 @@ private:
Array _get_children() const;
Array _get_groups() const;
- Variant _rpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _rpc_unreliable_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _rpc_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _rpc_unreliable_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
friend class SceneTree;
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index 5582ed59b0..43a61834eb 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -35,7 +35,7 @@ void ResourcePreloader::_set_resources(const Array &p_data) {
resources.clear();
ERR_FAIL_COND(p_data.size() != 2);
- PoolVector<String> names = p_data[0];
+ Vector<String> names = p_data[0];
Array resdata = p_data[1];
ERR_FAIL_COND(names.size() != resdata.size());
@@ -53,7 +53,7 @@ void ResourcePreloader::_set_resources(const Array &p_data) {
Array ResourcePreloader::_get_resources() const {
- PoolVector<String> names;
+ Vector<String> names;
Array arr;
arr.resize(resources.size());
names.resize(resources.size());
@@ -129,9 +129,9 @@ RES ResourcePreloader::get_resource(const StringName &p_name) const {
return resources[p_name];
}
-PoolVector<String> ResourcePreloader::_get_resource_list() const {
+Vector<String> ResourcePreloader::_get_resource_list() const {
- PoolVector<String> res;
+ Vector<String> res;
res.resize(resources.size());
int i = 0;
for (Map<StringName, RES>::Element *E = resources.front(); E; E = E->next(), i++) {
diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h
index d03c784883..9ad219dd92 100644
--- a/scene/main/resource_preloader.h
+++ b/scene/main/resource_preloader.h
@@ -41,7 +41,7 @@ class ResourcePreloader : public Node {
void _set_resources(const Array &p_data);
Array _get_resources() const;
- PoolVector<String> _get_resource_list() const;
+ Vector<String> _get_resource_list() const;
protected:
static void _bind_methods();
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index a27f8c4d94..370cf6a2a4 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -38,9 +38,10 @@
#include "core/os/os.h"
#include "core/print_string.h"
#include "core/project_settings.h"
+#include "core/script_debugger_remote.h"
#include "main/input_default.h"
#include "node.h"
-#include "scene/debugger/script_debugger_remote.h"
+#include "scene/debugger/scene_debugger.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
@@ -58,7 +59,7 @@ void SceneTreeTimer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_time_left", "time"), &SceneTreeTimer::set_time_left);
ClassDB::bind_method(D_METHOD("get_time_left"), &SceneTreeTimer::get_time_left);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left"), "set_time_left", "get_time_left");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left"), "set_time_left", "get_time_left");
ADD_SIGNAL(MethodInfo("timeout"));
}
@@ -87,7 +88,7 @@ void SceneTreeTimer::release_connections() {
for (List<Connection>::Element *E = connections.front(); E; E = E->next()) {
Connection const &connection = E->get();
- disconnect(connection.signal, connection.target, connection.method);
+ disconnect(connection.signal.get_name(), connection.callable);
}
}
@@ -434,7 +435,7 @@ void SceneTree::input_event(const Ref<InputEvent> &p_event) {
if (ScriptDebugger::get_singleton() && ScriptDebugger::get_singleton()->is_remote()) {
//quit from game window using F8
Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_scancode() == KEY_F8) {
+ if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_F8) {
ScriptDebugger::get_singleton()->request_quit();
}
}
@@ -873,11 +874,11 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() {
};
/* clang-format on */
- PoolVector<int> indices;
+ Vector<int> indices;
for (int i = 0; i < 8 * 3; i++)
indices.push_back(diamond_faces[i]);
- PoolVector<Vector3> vertices;
+ Vector<Vector3> vertices;
for (int i = 0; i < 6; i++)
vertices.push_back(diamond[i] * 0.1);
@@ -1004,14 +1005,14 @@ void SceneMainLoop::_update_listener_2d() {
}
*/
-Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
ERR_FAIL_COND_V(p_argcount < 3, Variant());
ERR_FAIL_COND_V(!p_args[0]->is_num(), Variant());
- ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING, Variant());
- ERR_FAIL_COND_V(p_args[2]->get_type() != Variant::STRING, Variant());
+ ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING, Variant());
+ ERR_FAIL_COND_V(p_args[2]->get_type() != Variant::STRING_NAME && p_args[2]->get_type() != Variant::STRING, Variant());
int flags = *p_args[0];
StringName group = *p_args[1];
@@ -1027,13 +1028,13 @@ Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Var
return Variant();
}
-Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
- r_error.error = Variant::CallError::CALL_OK;
+ r_error.error = Callable::CallError::CALL_OK;
ERR_FAIL_COND_V(p_argcount < 2, Variant());
- ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING, Variant());
- ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING, Variant());
+ ERR_FAIL_COND_V(p_args[0]->get_type() != Variant::STRING_NAME && p_args[0]->get_type() != Variant::STRING, Variant());
+ ERR_FAIL_COND_V(p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING, Variant());
StringName group = *p_args[0];
StringName method = *p_args[1];
@@ -1329,380 +1330,6 @@ void SceneTree::add_current_scene(Node *p_current) {
root->add_child(p_current);
}
-#ifdef DEBUG_ENABLED
-
-static void _fill_array(Node *p_node, Array &array, int p_level) {
-
- array.push_back(p_node->get_child_count());
- array.push_back(p_node->get_name());
- array.push_back(p_node->get_class());
- array.push_back(p_node->get_instance_id());
- for (int i = 0; i < p_node->get_child_count(); i++) {
-
- _fill_array(p_node->get_child(i), array, p_level + 1);
- }
-}
-
-void SceneTree::_debugger_request_tree() {
-
- Array arr;
- _fill_array(root, arr, 0);
- ScriptDebugger::get_singleton()->send_message("scene_tree", arr);
-}
-
-void SceneTree::_live_edit_node_path_func(const NodePath &p_path, int p_id) {
-
- live_edit_node_path_cache[p_id] = p_path;
-}
-
-void SceneTree::_live_edit_res_path_func(const String &p_path, int p_id) {
-
- live_edit_resource_cache[p_id] = p_path;
-}
-
-void SceneTree::_live_edit_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value) {
-
- if (!live_edit_node_path_cache.has(p_id))
- return;
-
- NodePath np = live_edit_node_path_cache[p_id];
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(np))
- continue;
- Node *n2 = n->get_node(np);
-
- n2->set(p_prop, p_value);
- }
-}
-
-void SceneTree::_live_edit_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value) {
-
- RES r = ResourceLoader::load(p_value);
- if (!r.is_valid())
- return;
- _live_edit_node_set_func(p_id, p_prop, r);
-}
-void SceneTree::_live_edit_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
-
- if (!live_edit_node_path_cache.has(p_id))
- return;
-
- NodePath np = live_edit_node_path_cache[p_id];
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(np))
- continue;
- Node *n2 = n->get_node(np);
-
- n2->call(p_method, VARIANT_ARG_PASS);
- }
-}
-void SceneTree::_live_edit_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value) {
-
- if (!live_edit_resource_cache.has(p_id))
- return;
-
- String resp = live_edit_resource_cache[p_id];
-
- if (!ResourceCache::has(resp))
- return;
-
- RES r = ResourceCache::get(resp);
- if (!r.is_valid())
- return;
-
- r->set(p_prop, p_value);
-}
-void SceneTree::_live_edit_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) {
-
- RES r = ResourceLoader::load(p_value);
- if (!r.is_valid())
- return;
- _live_edit_res_set_func(p_id, p_prop, r);
-}
-void SceneTree::_live_edit_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE) {
-
- if (!live_edit_resource_cache.has(p_id))
- return;
-
- String resp = live_edit_resource_cache[p_id];
-
- if (!ResourceCache::has(resp))
- return;
-
- RES r = ResourceCache::get(resp);
- if (!r.is_valid())
- return;
-
- r->call(p_method, VARIANT_ARG_PASS);
-}
-
-void SceneTree::_live_edit_root_func(const NodePath &p_scene_path, const String &p_scene_from) {
-
- live_edit_root = p_scene_path;
- live_edit_scene = p_scene_from;
-}
-
-void SceneTree::_live_edit_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_parent))
- continue;
- Node *n2 = n->get_node(p_parent);
-
- Node *no = Object::cast_to<Node>(ClassDB::instance(p_type));
- if (!no) {
- continue;
- }
-
- no->set_name(p_name);
- n2->add_child(no);
- }
-}
-void SceneTree::_live_edit_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name) {
-
- Ref<PackedScene> ps = ResourceLoader::load(p_path);
-
- if (!ps.is_valid())
- return;
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_parent))
- continue;
- Node *n2 = n->get_node(p_parent);
-
- Node *no = ps->instance();
- if (!no) {
- continue;
- }
-
- no->set_name(p_name);
- n2->add_child(no);
- }
-}
-void SceneTree::_live_edit_remove_node_func(const NodePath &p_at) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F;) {
-
- Set<Node *>::Element *N = F->next();
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_at))
- continue;
- Node *n2 = n->get_node(p_at);
-
- memdelete(n2);
-
- F = N;
- }
-}
-void SceneTree::_live_edit_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F;) {
-
- Set<Node *>::Element *N = F->next();
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_at))
- continue;
-
- Node *n2 = n->get_node(p_at);
-
- n2->get_parent()->remove_child(n2);
-
- live_edit_remove_list[n][p_keep_id] = n2;
-
- F = N;
- }
-}
-void SceneTree::_live_edit_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F;) {
-
- Set<Node *>::Element *N = F->next();
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_at))
- continue;
- Node *n2 = n->get_node(p_at);
-
- Map<Node *, Map<ObjectID, Node *> >::Element *EN = live_edit_remove_list.find(n);
-
- if (!EN)
- continue;
-
- Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id);
-
- if (!FN)
- continue;
- n2->add_child(FN->get());
-
- EN->get().erase(FN);
-
- if (EN->get().size() == 0) {
- live_edit_remove_list.erase(EN);
- }
-
- F = N;
- }
-}
-void SceneTree::_live_edit_duplicate_node_func(const NodePath &p_at, const String &p_new_name) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_at))
- continue;
- Node *n2 = n->get_node(p_at);
-
- Node *dup = n2->duplicate(Node::DUPLICATE_SIGNALS | Node::DUPLICATE_GROUPS | Node::DUPLICATE_SCRIPTS);
-
- if (!dup)
- continue;
-
- dup->set_name(p_new_name);
- n2->get_parent()->add_child(dup);
- }
-}
-void SceneTree::_live_edit_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
-
- Node *base = NULL;
- if (root->has_node(live_edit_root))
- base = root->get_node(live_edit_root);
-
- Map<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene);
- if (!E)
- return; //scene not editable
-
- for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) {
-
- Node *n = F->get();
-
- if (base && !base->is_a_parent_of(n))
- continue;
-
- if (!n->has_node(p_at))
- continue;
- Node *nfrom = n->get_node(p_at);
-
- if (!n->has_node(p_new_place))
- continue;
- Node *nto = n->get_node(p_new_place);
-
- nfrom->get_parent()->remove_child(nfrom);
- nfrom->set_name(p_new_name);
-
- nto->add_child(nfrom);
- if (p_at_pos >= 0)
- nto->move_child(nfrom, p_at_pos);
- }
-}
-
-#endif
-
void SceneTree::drop_files(const Vector<String> &p_files, int p_from_screen) {
emit_signal("files_dropped", p_files, p_from_screen);
@@ -1766,21 +1393,21 @@ void SceneTree::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer) {
ERR_FAIL_COND(!p_multiplayer.is_valid());
if (multiplayer.is_valid()) {
- multiplayer->disconnect("network_peer_connected", this, "_network_peer_connected");
- multiplayer->disconnect("network_peer_disconnected", this, "_network_peer_disconnected");
- multiplayer->disconnect("connected_to_server", this, "_connected_to_server");
- multiplayer->disconnect("connection_failed", this, "_connection_failed");
- multiplayer->disconnect("server_disconnected", this, "_server_disconnected");
+ multiplayer->disconnect("network_peer_connected", callable_mp(this, &SceneTree::_network_peer_connected));
+ multiplayer->disconnect("network_peer_disconnected", callable_mp(this, &SceneTree::_network_peer_disconnected));
+ multiplayer->disconnect("connected_to_server", callable_mp(this, &SceneTree::_connected_to_server));
+ multiplayer->disconnect("connection_failed", callable_mp(this, &SceneTree::_connection_failed));
+ multiplayer->disconnect("server_disconnected", callable_mp(this, &SceneTree::_server_disconnected));
}
multiplayer = p_multiplayer;
multiplayer->set_root_node(root);
- multiplayer->connect("network_peer_connected", this, "_network_peer_connected");
- multiplayer->connect("network_peer_disconnected", this, "_network_peer_disconnected");
- multiplayer->connect("connected_to_server", this, "_connected_to_server");
- multiplayer->connect("connection_failed", this, "_connection_failed");
- multiplayer->connect("server_disconnected", this, "_server_disconnected");
+ multiplayer->connect("network_peer_connected", callable_mp(this, &SceneTree::_network_peer_connected));
+ multiplayer->connect("network_peer_disconnected", callable_mp(this, &SceneTree::_network_peer_disconnected));
+ multiplayer->connect("connected_to_server", callable_mp(this, &SceneTree::_connected_to_server));
+ multiplayer->connect("connection_failed", callable_mp(this, &SceneTree::_connection_failed));
+ multiplayer->connect("server_disconnected", callable_mp(this, &SceneTree::_server_disconnected));
}
void SceneTree::set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_network_peer) {
@@ -1858,8 +1485,8 @@ void SceneTree::_bind_methods() {
MethodInfo mi;
mi.name = "call_group_flags";
mi.arguments.push_back(PropertyInfo(Variant::INT, "flags"));
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "group"));
- mi.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "group"));
+ mi.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_group_flags", &SceneTree::_call_group_flags, mi);
@@ -1868,8 +1495,8 @@ void SceneTree::_bind_methods() {
MethodInfo mi2;
mi2.name = "call_group";
- mi2.arguments.push_back(PropertyInfo(Variant::STRING, "group"));
- mi2.arguments.push_back(PropertyInfo(Variant::STRING, "method"));
+ mi2.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "group"));
+ mi2.arguments.push_back(PropertyInfo(Variant::STRING_NAME, "method"));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_group", &SceneTree::_call_group, mi2);
@@ -1901,11 +1528,6 @@ void SceneTree::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rpc_sender_id"), &SceneTree::get_rpc_sender_id);
ClassDB::bind_method(D_METHOD("set_refuse_new_network_connections", "refuse"), &SceneTree::set_refuse_new_network_connections);
ClassDB::bind_method(D_METHOD("is_refusing_new_network_connections"), &SceneTree::is_refusing_new_network_connections);
- ClassDB::bind_method(D_METHOD("_network_peer_connected"), &SceneTree::_network_peer_connected);
- ClassDB::bind_method(D_METHOD("_network_peer_disconnected"), &SceneTree::_network_peer_disconnected);
- ClassDB::bind_method(D_METHOD("_connected_to_server"), &SceneTree::_connected_to_server);
- ClassDB::bind_method(D_METHOD("_connection_failed"), &SceneTree::_connection_failed);
- ClassDB::bind_method(D_METHOD("_server_disconnected"), &SceneTree::_server_disconnected);
ClassDB::bind_method(D_METHOD("set_use_font_oversampling", "enable"), &SceneTree::set_use_font_oversampling);
ClassDB::bind_method(D_METHOD("is_using_font_oversampling"), &SceneTree::is_using_font_oversampling);
@@ -1933,7 +1555,7 @@ void SceneTree::_bind_methods() {
ADD_SIGNAL(MethodInfo("idle_frame"));
ADD_SIGNAL(MethodInfo("physics_frame"));
- ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen")));
+ ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen")));
ADD_SIGNAL(MethodInfo("global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta")));
ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id")));
@@ -2073,8 +1695,6 @@ SceneTree::SceneTree() {
root->set_as_audio_listener_2d(true);
current_scene = NULL;
- int ref_atlas_size = GLOBAL_DEF("rendering/quality/reflections/atlas_size", 2048);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/reflections/atlas_size", PropertyInfo(Variant::INT, "rendering/quality/reflections/atlas_size", PROPERTY_HINT_RANGE, "0,8192,or_greater")); //next_power_of_2 will return a 0 as min value
int msaa_mode = GLOBAL_DEF("rendering/quality/filters/msaa", 0);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/filters/msaa", PROPERTY_HINT_ENUM, "Disabled,2x,4x,8x,16x,AndroidVR 2x,AndroidVR 4x"));
root->set_msaa(Viewport::MSAA(msaa_mode));
@@ -2118,11 +1738,6 @@ SceneTree::SceneTree() {
_update_root_rect();
if (ScriptDebugger::get_singleton()) {
- if (ScriptDebugger::get_singleton()->is_remote()) {
- ScriptDebuggerRemote *remote_debugger = static_cast<ScriptDebuggerRemote *>(ScriptDebugger::get_singleton());
-
- remote_debugger->set_scene_tree(this);
- }
ScriptDebugger::get_singleton()->set_multiplayer(multiplayer);
}
@@ -2131,12 +1746,6 @@ SceneTree::SceneTree() {
#ifdef TOOLS_ENABLED
edited_scene_root = NULL;
#endif
-
-#ifdef DEBUG_ENABLED
-
- live_edit_root = NodePath("/root");
-
-#endif
}
SceneTree::~SceneTree() {
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 565c58fac1..1bef0d3131 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -44,6 +44,7 @@ class Node;
class Viewport;
class Material;
class Mesh;
+class SceneDebugger;
class SceneTreeTimer : public Reference {
GDCLASS(SceneTreeTimer, Reference);
@@ -208,8 +209,8 @@ private:
void _notify_group_pause(const StringName &p_group, int p_notification);
void _call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input);
- Variant _call_group_flags(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
- Variant _call_group(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
+ Variant _call_group_flags(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Variant _call_group(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
void _flush_delete_queue();
//optimization
@@ -219,39 +220,8 @@ private:
SelfList<Node>::List xform_change_list;
- friend class ScriptDebuggerRemote;
-#ifdef DEBUG_ENABLED
-
- Map<int, NodePath> live_edit_node_path_cache;
- Map<int, String> live_edit_resource_cache;
-
- NodePath live_edit_root;
- String live_edit_scene;
-
- Map<String, Set<Node *> > live_scene_edit_cache;
- Map<Node *, Map<ObjectID, Node *> > live_edit_remove_list;
-
- void _debugger_request_tree();
-
- void _live_edit_node_path_func(const NodePath &p_path, int p_id);
- void _live_edit_res_path_func(const String &p_path, int p_id);
-
- void _live_edit_node_set_func(int p_id, const StringName &p_prop, const Variant &p_value);
- void _live_edit_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value);
- void _live_edit_node_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
- void _live_edit_res_set_func(int p_id, const StringName &p_prop, const Variant &p_value);
- void _live_edit_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value);
- void _live_edit_res_call_func(int p_id, const StringName &p_method, VARIANT_ARG_DECLARE);
- void _live_edit_root_func(const NodePath &p_scene_path, const String &p_scene_from);
-
- void _live_edit_create_node_func(const NodePath &p_parent, const String &p_type, const String &p_name);
- void _live_edit_instance_node_func(const NodePath &p_parent, const String &p_path, const String &p_name);
- void _live_edit_remove_node_func(const NodePath &p_at);
- void _live_edit_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_keep_id);
- void _live_edit_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_at_pos);
- void _live_edit_duplicate_node_func(const NodePath &p_at, const String &p_new_name);
- void _live_edit_reparent_node_func(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos);
-
+#ifdef DEBUG_ENABLED // No live editor in release build.
+ friend class LiveEditor;
#endif
enum {
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index cb213be731..7c847095e1 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -206,11 +206,11 @@ void Timer::_bind_methods() {
ADD_SIGNAL(MethodInfo("timeout"));
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_mode", "get_timer_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", 0), "set_paused", "is_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left");
BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 748a713110..e027ec9b4b 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1124,7 +1124,7 @@ void Viewport::set_world(const Ref<World> &p_world) {
_propagate_exit_world(this);
if (own_world.is_valid() && world.is_valid()) {
- world->disconnect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed");
+ world->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
}
world = p_world;
@@ -1132,7 +1132,7 @@ void Viewport::set_world(const Ref<World> &p_world) {
if (own_world.is_valid()) {
if (world.is_valid()) {
own_world = world->duplicate();
- world->connect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed");
+ world->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
} else {
own_world = Ref<World>(memnew(World));
}
@@ -2473,7 +2473,7 @@ List<Control *>::Element *Viewport::_gui_add_root_control(Control *p_control) {
List<Control *>::Element *Viewport::_gui_add_subwindow_control(Control *p_control) {
- p_control->connect("visibility_changed", this, "_subwindow_visibility_changed");
+ p_control->connect("visibility_changed", callable_mp(this, &Viewport::_subwindow_visibility_changed));
if (p_control->is_visible_in_tree()) {
gui.subwindow_order_dirty = true;
@@ -2568,7 +2568,7 @@ void Viewport::_gui_remove_subwindow_control(List<Control *>::Element *SI) {
Control *control = SI->get();
- control->disconnect("visibility_changed", this, "_subwindow_visibility_changed");
+ control->disconnect("visibility_changed", callable_mp(this, &Viewport::_subwindow_visibility_changed));
List<Control *>::Element *E = gui.subwindows.find(control);
if (E)
@@ -2850,12 +2850,12 @@ void Viewport::set_use_own_world(bool p_world) {
if (!p_world) {
own_world = Ref<World>();
if (world.is_valid()) {
- world->disconnect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed");
+ world->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
}
} else {
if (world.is_valid()) {
own_world = world->duplicate();
- world->connect(CoreStringNames::get_singleton()->changed, this, "_own_world_changed");
+ world->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Viewport::_own_world_changed));
} else {
own_world = Ref<World>(memnew(World));
}
@@ -3194,10 +3194,6 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_default_canvas_item_texture_repeat", "mode"), &Viewport::set_default_canvas_item_texture_repeat);
ClassDB::bind_method(D_METHOD("get_default_canvas_item_texture_repeat"), &Viewport::get_default_canvas_item_texture_repeat);
- ClassDB::bind_method(D_METHOD("_subwindow_visibility_changed"), &Viewport::_subwindow_visibility_changed);
-
- ClassDB::bind_method(D_METHOD("_own_world_changed"), &Viewport::_own_world_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "arvr"), "set_use_arvr", "use_arvr");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size");
@@ -3285,7 +3281,7 @@ void Viewport::_bind_methods() {
BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST);
BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR);
BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS);
- BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS);
+ BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX);
BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
@@ -3360,7 +3356,7 @@ Viewport::Viewport() {
//gui.tooltip_timer->force_parent_owned();
gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::REAL, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
+ ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
gui.tooltip = NULL;
gui.tooltip_label = NULL;
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 44d4c89ed1..30c872b6ed 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -153,7 +153,7 @@ public:
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST,
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR,
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS,
- DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS,
+ DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS,
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX
};
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 40f24ece87..dd00565929 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -76,6 +76,7 @@
#include "scene/animation/root_motion_view.h"
#include "scene/animation/tween.h"
#include "scene/audio/audio_stream_player.h"
+#include "scene/debugger/scene_debugger.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/center_container.h"
@@ -150,7 +151,6 @@
#include "scene/resources/packed_scene.h"
#include "scene/resources/particles_material.h"
#include "scene/resources/physics_material.h"
-#include "scene/resources/plane_shape.h"
#include "scene/resources/polygon_path_finder.h"
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
@@ -168,6 +168,7 @@
#include "scene/resources/visual_shader_nodes.h"
#include "scene/resources/world.h"
#include "scene/resources/world_2d.h"
+#include "scene/resources/world_margin_shape.h"
#include "scene/scene_string_names.h"
#ifndef _3D_DISABLED
@@ -189,8 +190,8 @@
#include "scene/3d/multimesh_instance.h"
#include "scene/3d/navigation.h"
#include "scene/3d/navigation_agent.h"
-#include "scene/3d/navigation_mesh_instance.h"
#include "scene/3d/navigation_obstacle.h"
+#include "scene/3d/navigation_region.h"
#include "scene/3d/particles.h"
#include "scene/3d/path.h"
#include "scene/3d/physics_body.h"
@@ -469,7 +470,7 @@ void register_scene_types() {
ClassDB::register_class<Generic6DOFJoint>();
ClassDB::register_class<Navigation>();
- ClassDB::register_class<NavigationMeshInstance>();
+ ClassDB::register_class<NavigationRegion>();
ClassDB::register_class<NavigationAgent>();
ClassDB::register_class<NavigationObstacle>();
@@ -487,17 +488,20 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeInput>();
ClassDB::register_virtual_class<VisualShaderNodeOutput>();
ClassDB::register_class<VisualShaderNodeGroupBase>();
- ClassDB::register_class<VisualShaderNodeScalarConstant>();
+ ClassDB::register_class<VisualShaderNodeFloatConstant>();
+ ClassDB::register_class<VisualShaderNodeIntConstant>();
ClassDB::register_class<VisualShaderNodeBooleanConstant>();
ClassDB::register_class<VisualShaderNodeColorConstant>();
ClassDB::register_class<VisualShaderNodeVec3Constant>();
ClassDB::register_class<VisualShaderNodeTransformConstant>();
- ClassDB::register_class<VisualShaderNodeScalarOp>();
+ ClassDB::register_class<VisualShaderNodeFloatOp>();
+ ClassDB::register_class<VisualShaderNodeIntOp>();
ClassDB::register_class<VisualShaderNodeVectorOp>();
ClassDB::register_class<VisualShaderNodeColorOp>();
ClassDB::register_class<VisualShaderNodeTransformMult>();
ClassDB::register_class<VisualShaderNodeTransformVecMult>();
- ClassDB::register_class<VisualShaderNodeScalarFunc>();
+ ClassDB::register_class<VisualShaderNodeFloatFunc>();
+ ClassDB::register_class<VisualShaderNodeIntFunc>();
ClassDB::register_class<VisualShaderNodeVectorFunc>();
ClassDB::register_class<VisualShaderNodeColorFunc>();
ClassDB::register_class<VisualShaderNodeTransformFunc>();
@@ -526,7 +530,8 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeTexture>();
ClassDB::register_class<VisualShaderNodeCubemap>();
ClassDB::register_virtual_class<VisualShaderNodeUniform>();
- ClassDB::register_class<VisualShaderNodeScalarUniform>();
+ ClassDB::register_class<VisualShaderNodeFloatUniform>();
+ ClassDB::register_class<VisualShaderNodeIntUniform>();
ClassDB::register_class<VisualShaderNodeBooleanUniform>();
ClassDB::register_class<VisualShaderNodeColorUniform>();
ClassDB::register_class<VisualShaderNodeVec3Uniform>();
@@ -638,7 +643,7 @@ void register_scene_types() {
ClassDB::register_class<CapsuleShape>();
ClassDB::register_class<CylinderShape>();
ClassDB::register_class<HeightMapShape>();
- ClassDB::register_class<PlaneShape>();
+ ClassDB::register_class<WorldMarginShape>();
ClassDB::register_class<ConvexPolygonShape>();
ClassDB::register_class<ConcavePolygonShape>();
@@ -721,7 +726,7 @@ void register_scene_types() {
ClassDB::register_class<Navigation2D>();
ClassDB::register_class<NavigationPolygon>();
- ClassDB::register_class<NavigationPolygonInstance>();
+ ClassDB::register_class<NavigationRegion2D>();
ClassDB::register_class<NavigationAgent2D>();
ClassDB::register_class<NavigationObstacle2D>();
@@ -737,6 +742,13 @@ void register_scene_types() {
ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D");
ClassDB::add_compatibility_class("Mesh", "ArrayMesh");
ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarConstant", "VisualShaderNodeFloatConstant");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform", "VisualShaderNodeFloatUniform");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc", "VisualShaderNodeFloatFunc");
+ ClassDB::add_compatibility_class("NavigationMeshInstance", "NavigationRegion");
+ ClassDB::add_compatibility_class("NavigationPolygonInstance", "NavigationRegion2D");
+ ClassDB::add_compatibility_class("PlaneShape", "WorldMarginShape");
#endif
OS::get_singleton()->yield(); //may take time to init
@@ -777,10 +789,12 @@ void register_scene_types() {
ERR_PRINT("Error loading custom theme '" + theme_path + "'");
}
}
+ SceneDebugger::initialize();
}
void unregister_scene_types() {
+ SceneDebugger::deinitialize();
clear_default_theme();
ResourceLoader::remove_resource_format_loader(resource_loader_dynamic_font);
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 91d1e32053..ba1f738115 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -91,11 +91,11 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
if (track_get_type(track) == TYPE_TRANSFORM) {
TransformTrack *tt = static_cast<TransformTrack *>(tracks[track]);
- PoolVector<float> values = p_value;
+ Vector<float> values = p_value;
int vcount = values.size();
ERR_FAIL_COND_V(vcount % 12, false); // should be multiple of 11
- PoolVector<float>::Read r = values.read();
+ const float *r = values.ptr();
tt->transforms.resize(vcount / 12);
@@ -140,7 +140,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
vt->update_mode = UpdateMode(um);
}
- PoolVector<float> times = d["times"];
+ Vector<float> times = d["times"];
Array values = d["values"];
ERR_FAIL_COND_V(times.size() != values.size(), false);
@@ -149,7 +149,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
int valcount = times.size();
- PoolVector<float>::Read rt = times.read();
+ const float *rt = times.ptr();
vt->values.resize(valcount);
@@ -161,10 +161,10 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
if (d.has("transitions")) {
- PoolVector<float> transitions = d["transitions"];
+ Vector<float> transitions = d["transitions"];
ERR_FAIL_COND_V(transitions.size() != valcount, false);
- PoolVector<float>::Read rtr = transitions.read();
+ const float *rtr = transitions.ptr();
for (int i = 0; i < valcount; i++) {
@@ -184,7 +184,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!d.has("times"), false);
ERR_FAIL_COND_V(!d.has("values"), false);
- PoolVector<float> times = d["times"];
+ Vector<float> times = d["times"];
Array values = d["values"];
ERR_FAIL_COND_V(times.size() != values.size(), false);
@@ -193,7 +193,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
int valcount = times.size();
- PoolVector<float>::Read rt = times.read();
+ const float *rt = times.ptr();
for (int i = 0; i < valcount; i++) {
@@ -202,10 +202,10 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
if (d.has("transitions")) {
- PoolVector<float> transitions = d["transitions"];
+ Vector<float> transitions = d["transitions"];
ERR_FAIL_COND_V(transitions.size() != valcount, false);
- PoolVector<float>::Read rtr = transitions.read();
+ const float *rtr = transitions.ptr();
for (int i = 0; i < valcount; i++) {
@@ -220,8 +220,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!d.has("times"), false);
ERR_FAIL_COND_V(!d.has("points"), false);
- PoolVector<float> times = d["times"];
- PoolRealArray values = d["points"];
+ Vector<float> times = d["times"];
+ PackedFloat32Array values = d["points"];
ERR_FAIL_COND_V(times.size() * 5 != values.size(), false);
@@ -229,8 +229,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
int valcount = times.size();
- PoolVector<float>::Read rt = times.read();
- PoolVector<float>::Read rv = values.read();
+ const float *rt = times.ptr();
+ const float *rv = values.ptr();
bt->values.resize(valcount);
@@ -254,7 +254,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!d.has("times"), false);
ERR_FAIL_COND_V(!d.has("clips"), false);
- PoolVector<float> times = d["times"];
+ Vector<float> times = d["times"];
Array clips = d["clips"];
ERR_FAIL_COND_V(clips.size() != times.size(), false);
@@ -263,7 +263,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
int valcount = times.size();
- PoolVector<float>::Read rt = times.read();
+ const float *rt = times.ptr();
ad->values.clear();
@@ -295,8 +295,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!d.has("times"), false);
ERR_FAIL_COND_V(!d.has("clips"), false);
- PoolVector<float> times = d["times"];
- PoolVector<String> clips = d["clips"];
+ Vector<float> times = d["times"];
+ Vector<String> clips = d["clips"];
ERR_FAIL_COND_V(clips.size() != times.size(), false);
@@ -304,8 +304,8 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
int valcount = times.size();
- PoolVector<float>::Read rt = times.read();
- PoolVector<String>::Read rc = clips.read();
+ const float *rt = times.ptr();
+ const String *rc = clips.ptr();
an->values.resize(valcount);
@@ -373,11 +373,11 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
if (track_get_type(track) == TYPE_TRANSFORM) {
- PoolVector<real_t> keys;
+ Vector<float> keys;
int kk = track_get_key_count(track);
keys.resize(kk * 12);
- PoolVector<real_t>::Write w = keys.write();
+ real_t *w = keys.ptrw();
int idx = 0;
for (int i = 0; i < track_get_key_count(track); i++) {
@@ -403,7 +403,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
w[idx++] = scale.z;
}
- w.release();
r_ret = keys;
return true;
@@ -413,8 +412,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<float> key_times;
- PoolVector<float> key_transitions;
+ Vector<float> key_times;
+ Vector<float> key_transitions;
Array key_values;
int kk = vt->values.size();
@@ -423,8 +422,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
key_transitions.resize(kk);
key_values.resize(kk);
- PoolVector<float>::Write wti = key_times.write();
- PoolVector<float>::Write wtr = key_transitions.write();
+ float *wti = key_times.ptrw();
+ float *wtr = key_transitions.ptrw();
int idx = 0;
@@ -438,9 +437,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
idx++;
}
- wti.release();
- wtr.release();
-
d["times"] = key_times;
d["transitions"] = key_transitions;
d["values"] = key_values;
@@ -456,8 +452,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<float> key_times;
- PoolVector<float> key_transitions;
+ Vector<float> key_times;
+ Vector<float> key_transitions;
Array key_values;
int kk = track_get_key_count(track);
@@ -466,8 +462,8 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
key_transitions.resize(kk);
key_values.resize(kk);
- PoolVector<float>::Write wti = key_times.write();
- PoolVector<float>::Write wtr = key_transitions.write();
+ float *wti = key_times.ptrw();
+ float *wtr = key_transitions.ptrw();
int idx = 0;
for (int i = 0; i < track_get_key_count(track); i++) {
@@ -478,9 +474,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
idx++;
}
- wti.release();
- wtr.release();
-
d["times"] = key_times;
d["transitions"] = key_transitions;
d["values"] = key_values;
@@ -497,16 +490,16 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<float> key_times;
- PoolVector<float> key_points;
+ Vector<float> key_times;
+ Vector<float> key_points;
int kk = bt->values.size();
key_times.resize(kk);
key_points.resize(kk * 5);
- PoolVector<float>::Write wti = key_times.write();
- PoolVector<float>::Write wpo = key_points.write();
+ float *wti = key_times.ptrw();
+ float *wpo = key_points.ptrw();
int idx = 0;
@@ -523,9 +516,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
idx++;
}
- wti.release();
- wpo.release();
-
d["times"] = key_times;
d["points"] = key_points;
@@ -538,14 +528,14 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<float> key_times;
+ Vector<float> key_times;
Array clips;
int kk = ad->values.size();
key_times.resize(kk);
- PoolVector<float>::Write wti = key_times.write();
+ float *wti = key_times.ptrw();
int idx = 0;
@@ -562,8 +552,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
idx++;
}
- wti.release();
-
d["times"] = key_times;
d["clips"] = clips;
@@ -576,16 +564,16 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary d;
- PoolVector<float> key_times;
- PoolVector<String> clips;
+ Vector<float> key_times;
+ Vector<String> clips;
int kk = an->values.size();
key_times.resize(kk);
clips.resize(kk);
- PoolVector<float>::Write wti = key_times.write();
- PoolVector<String>::Write wcl = clips.write();
+ float *wti = key_times.ptrw();
+ String *wcl = clips.ptrw();
const TKey<StringName> *vls = an->values.ptr();
@@ -595,9 +583,6 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
wcl[i] = vls[i].value;
}
- wti.release();
- wcl.release();
-
d["times"] = key_times;
d["clips"] = clips;
@@ -1063,7 +1048,7 @@ void Animation::track_insert_key(int p_track, float p_time, const Variant &p_key
ERR_FAIL_COND(p_key.get_type() != Variant::DICTIONARY);
Dictionary d = p_key;
- ERR_FAIL_COND(!d.has("method") || d["method"].get_type() != Variant::STRING);
+ ERR_FAIL_COND(!d.has("method") || (d["method"].get_type() != Variant::STRING_NAME && d["method"].get_type() != Variant::STRING));
ERR_FAIL_COND(!d.has("args") || !d["args"].is_array());
MethodKey k;
@@ -1635,7 +1620,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a
vformat |= 1 << type_pa;
vformat |= 1 << type_pb;
- if (vformat == ((1 << Variant::INT) | (1 << Variant::REAL)) || vformat == (1 << Variant::REAL)) {
+ if (vformat == ((1 << Variant::INT) | (1 << Variant::FLOAT)) || vformat == (1 << Variant::FLOAT)) {
//mix of real and int
real_t p0 = p_pre_a;
@@ -2825,9 +2810,9 @@ void Animation::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &Animation::clear);
ClassDB::bind_method(D_METHOD("copy_track", "track_idx", "to_animation"), &Animation::copy_track);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step");
ADD_SIGNAL(MethodInfo("tracks_changed"));
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index 6ac0ea04d9..ea4f92878d 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -242,11 +242,11 @@ private:
return ret;
}
- PoolVector<int> _value_track_get_key_indices(int p_track, float p_time, float p_delta) const {
+ Vector<int> _value_track_get_key_indices(int p_track, float p_time, float p_delta) const {
List<int> idxs;
value_track_get_key_indices(p_track, p_time, p_delta, &idxs);
- PoolVector<int> idxr;
+ Vector<int> idxr;
for (List<int>::Element *E = idxs.front(); E; E = E->next()) {
@@ -254,11 +254,11 @@ private:
}
return idxr;
}
- PoolVector<int> _method_track_get_key_indices(int p_track, float p_time, float p_delta) const {
+ Vector<int> _method_track_get_key_indices(int p_track, float p_time, float p_delta) const {
List<int> idxs;
method_track_get_key_indices(p_track, p_time, p_delta, &idxs);
- PoolVector<int> idxr;
+ Vector<int> idxr;
for (List<int>::Element *E = idxs.front(); E; E = E->next()) {
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index a412d8a5e2..ed25729c40 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -477,7 +477,7 @@ float AudioStreamSample::get_length() const {
return float(len) / mix_rate;
}
-void AudioStreamSample::set_data(const PoolVector<uint8_t> &p_data) {
+void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) {
AudioServer::get_singleton()->lock();
if (data) {
@@ -489,28 +489,28 @@ void AudioStreamSample::set_data(const PoolVector<uint8_t> &p_data) {
int datalen = p_data.size();
if (datalen) {
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
int alloc_len = datalen + DATA_PAD * 2;
data = AudioServer::get_singleton()->audio_data_alloc(alloc_len); //alloc with some padding for interpolation
zeromem(data, alloc_len);
uint8_t *dataptr = (uint8_t *)data;
- copymem(dataptr + DATA_PAD, r.ptr(), datalen);
+ copymem(dataptr + DATA_PAD, r, datalen);
data_bytes = datalen;
}
AudioServer::get_singleton()->unlock();
}
-PoolVector<uint8_t> AudioStreamSample::get_data() const {
+Vector<uint8_t> AudioStreamSample::get_data() const {
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
if (data) {
pv.resize(data_bytes);
{
- PoolVector<uint8_t>::Write w = pv.write();
+ uint8_t *w = pv.ptrw();
uint8_t *dataptr = (uint8_t *)data;
- copymem(w.ptr(), dataptr + DATA_PAD, data_bytes);
+ copymem(w, dataptr + DATA_PAD, data_bytes);
}
}
@@ -566,8 +566,8 @@ Error AudioStreamSample::save_to_wav(const String &p_path) {
file->store_32(sub_chunk_2_size); //Subchunk2Size
// Add data
- PoolVector<uint8_t> data = get_data();
- PoolVector<uint8_t>::Read read_data = data.read();
+ Vector<uint8_t> data = get_data();
+ const uint8_t *read_data = data.ptr();
switch (format) {
case AudioStreamSample::FORMAT_8_BITS:
for (unsigned int i = 0; i < data_bytes; i++) {
@@ -629,7 +629,7 @@ void AudioStreamSample::_bind_methods() {
ClassDB::bind_method(D_METHOD("save_to_wav", "path"), &AudioStreamSample::save_to_wav);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
ADD_PROPERTY(PropertyInfo(Variant::INT, "format", PROPERTY_HINT_ENUM, "8-Bit,16-Bit,IMA-ADPCM"), "set_format", "get_format");
ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "Disabled,Forward,Ping-Pong,Backward"), "set_loop_mode", "get_loop_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_begin"), "set_loop_begin", "get_loop_begin");
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index adcac14ea8..0b46bc1c75 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -138,8 +138,8 @@ public:
virtual float get_length() const; //if supported, otherwise return 0
- void set_data(const PoolVector<uint8_t> &p_data);
- PoolVector<uint8_t> get_data() const;
+ void set_data(const Vector<uint8_t> &p_data);
+ Vector<uint8_t> get_data() const;
Error save_to_wav(const String &p_path);
diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp
index 06323a8d31..6730f86e0c 100644
--- a/scene/resources/bit_map.cpp
+++ b/scene/resources/bit_map.cpp
@@ -52,7 +52,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshol
create(Size2(img->get_width(), img->get_height()));
- PoolVector<uint8_t>::Read r = img->get_data().read();
+ const uint8_t *r = img->get_data().ptr();
uint8_t *w = bitmask.ptrw();
for (int i = 0; i < width * height; i++) {
@@ -426,7 +426,7 @@ struct FillBitsStackEntry {
static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_pos, const Rect2i &rect) {
// Using a custom stack to work iteratively to avoid stack overflow on big bitmaps
- PoolVector<FillBitsStackEntry> stack;
+ Vector<FillBitsStackEntry> stack;
// Tracking size since we won't be shrinking the stack vector
int stack_size = 0;
@@ -601,11 +601,11 @@ Array BitMap::_opaque_to_polygons_bind(const Rect2 &p_rect, float p_epsilon) con
const Vector<Vector2> &polygon = result[i];
- PoolVector2Array polygon_array;
+ PackedVector2Array polygon_array;
polygon_array.resize(polygon.size());
{
- PoolVector2Array::Write w = polygon_array.write();
+ Vector2 *w = polygon_array.ptrw();
for (int j = 0; j < polygon.size(); j++) {
w[j] = polygon[j];
}
@@ -640,15 +640,13 @@ Ref<Image> BitMap::convert_to_image() const {
Ref<Image> image;
image.instance();
image->create(width, height, false, Image::FORMAT_L8);
- image->lock();
+
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
image->set_pixel(i, j, get_bit(Point2(i, j)) ? Color(1, 1, 1) : Color(0, 0, 0));
}
}
- image->unlock();
-
return image;
}
void BitMap::blit(const Vector2 &p_pos, const Ref<BitMap> &p_bitmap) {
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp
index 933129936a..dddbd7fef3 100644
--- a/scene/resources/capsule_shape.cpp
+++ b/scene/resources/capsule_shape.cpp
@@ -38,7 +38,7 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() {
Vector<Vector3> points;
- Vector3 d(0, 0, height * 0.5);
+ Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
float ra = Math::deg2rad((float)i);
@@ -46,24 +46,24 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(b.x, b.y, 0) + d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(b.x, 0, b.y) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
- points.push_back(Vector3(b.x, b.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
+ points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 180 ? d : -d;
- points.push_back(Vector3(0, a.y, a.x) + dud);
- points.push_back(Vector3(0, b.y, b.x) + dud);
- points.push_back(Vector3(a.y, 0, a.x) + dud);
- points.push_back(Vector3(b.y, 0, b.x) + dud);
+ points.push_back(Vector3(0, a.x, a.y) + dud);
+ points.push_back(Vector3(0, b.x, b.y) + dud);
+ points.push_back(Vector3(a.y, a.x, 0) + dud);
+ points.push_back(Vector3(b.y, b.x, 0) + dud);
}
return points;
@@ -115,8 +115,8 @@ void CapsuleShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
}
CapsuleShape::CapsuleShape() :
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 5658395cee..9b8083de97 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -109,8 +109,8 @@ void CapsuleShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape2D::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape2D::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height"), "set_height", "get_height");
}
CapsuleShape2D::CapsuleShape2D() :
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index 10f8ab8a8a..37874e17ef 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -60,7 +60,7 @@ void CircleShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &CircleShape2D::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &CircleShape2D::get_radius);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius");
}
Rect2 CircleShape2D::get_rect() const {
diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp
index 0a93f99ea3..fe123a2df7 100644
--- a/scene/resources/concave_polygon_shape.cpp
+++ b/scene/resources/concave_polygon_shape.cpp
@@ -36,11 +36,11 @@ Vector<Vector3> ConcavePolygonShape::get_debug_mesh_lines() {
Set<DrawEdge> edges;
- PoolVector<Vector3> data = get_faces();
+ Vector<Vector3> data = get_faces();
int datalen = data.size();
ERR_FAIL_COND_V((datalen % 3) != 0, Vector<Vector3>());
- PoolVector<Vector3>::Read r = data.read();
+ const Vector3 *r = data.ptr();
for (int i = 0; i < datalen; i += 3) {
@@ -65,8 +65,8 @@ Vector<Vector3> ConcavePolygonShape::get_debug_mesh_lines() {
}
real_t ConcavePolygonShape::get_enclosing_radius() const {
- PoolVector<Vector3> data = get_faces();
- PoolVector<Vector3>::Read read = data.read();
+ Vector<Vector3> data = get_faces();
+ const Vector3 *read = data.ptr();
real_t r = 0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
@@ -78,13 +78,13 @@ void ConcavePolygonShape::_update_shape() {
Shape::_update_shape();
}
-void ConcavePolygonShape::set_faces(const PoolVector<Vector3> &p_faces) {
+void ConcavePolygonShape::set_faces(const Vector<Vector3> &p_faces) {
PhysicsServer::get_singleton()->shape_set_data(get_shape(), p_faces);
notify_change_to_owners();
}
-PoolVector<Vector3> ConcavePolygonShape::get_faces() const {
+Vector<Vector3> ConcavePolygonShape::get_faces() const {
return PhysicsServer::get_singleton()->shape_get_data(get_shape());
}
@@ -93,7 +93,7 @@ void ConcavePolygonShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_faces", "faces"), &ConcavePolygonShape::set_faces);
ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces");
}
ConcavePolygonShape::ConcavePolygonShape() :
diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h
index b4bebbd7b4..63aabb27d7 100644
--- a/scene/resources/concave_polygon_shape.h
+++ b/scene/resources/concave_polygon_shape.h
@@ -63,8 +63,8 @@ protected:
virtual void _update_shape();
public:
- void set_faces(const PoolVector<Vector3> &p_faces);
- PoolVector<Vector3> get_faces() const;
+ void set_faces(const Vector<Vector3> &p_faces);
+ Vector<Vector3> get_faces() const;
virtual Vector<Vector3> get_debug_mesh_lines();
virtual real_t get_enclosing_radius() const;
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index 840733add3..c3e9e19721 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -35,12 +35,12 @@
bool ConcavePolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
- PoolVector<Vector2> s = get_segments();
+ Vector<Vector2> s = get_segments();
int len = s.size();
if (len == 0 || (len % 2) == 1)
return false;
- PoolVector<Vector2>::Read r = s.read();
+ const Vector2 *r = s.ptr();
for (int i = 0; i < len; i += 2) {
Vector2 closest = Geometry::get_closest_point_to_segment_2d(p_point, &r[i]);
if (p_point.distance_to(closest) < p_tolerance)
@@ -50,25 +50,25 @@ bool ConcavePolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, do
return false;
}
-void ConcavePolygonShape2D::set_segments(const PoolVector<Vector2> &p_segments) {
+void ConcavePolygonShape2D::set_segments(const Vector<Vector2> &p_segments) {
Physics2DServer::get_singleton()->shape_set_data(get_rid(), p_segments);
emit_changed();
}
-PoolVector<Vector2> ConcavePolygonShape2D::get_segments() const {
+Vector<Vector2> ConcavePolygonShape2D::get_segments() const {
return Physics2DServer::get_singleton()->shape_get_data(get_rid());
}
void ConcavePolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) {
- PoolVector<Vector2> s = get_segments();
+ Vector<Vector2> s = get_segments();
int len = s.size();
if (len == 0 || (len % 2) == 1)
return;
- PoolVector<Vector2>::Read r = s.read();
+ const Vector2 *r = s.ptr();
for (int i = 0; i < len; i += 2) {
VisualServer::get_singleton()->canvas_item_add_line(p_to_rid, r[i], r[i + 1], p_color, 2);
}
@@ -76,14 +76,14 @@ void ConcavePolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Rect2 ConcavePolygonShape2D::get_rect() const {
- PoolVector<Vector2> s = get_segments();
+ Vector<Vector2> s = get_segments();
int len = s.size();
if (len == 0)
return Rect2();
Rect2 rect;
- PoolVector<Vector2>::Read r = s.read();
+ const Vector2 *r = s.ptr();
for (int i = 0; i < len; i++) {
if (i == 0)
rect.position = r[i];
@@ -95,8 +95,8 @@ Rect2 ConcavePolygonShape2D::get_rect() const {
}
real_t ConcavePolygonShape2D::get_enclosing_radius() const {
- PoolVector<Vector2> data = get_segments();
- PoolVector<Vector2>::Read read = data.read();
+ Vector<Vector2> data = get_segments();
+ const Vector2 *read = data.ptr();
real_t r = 0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
@@ -109,11 +109,11 @@ void ConcavePolygonShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_segments", "segments"), &ConcavePolygonShape2D::set_segments);
ClassDB::bind_method(D_METHOD("get_segments"), &ConcavePolygonShape2D::get_segments);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments");
}
ConcavePolygonShape2D::ConcavePolygonShape2D() :
Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) {
- PoolVector<Vector2> empty;
+ Vector<Vector2> empty;
set_segments(empty);
}
diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/concave_polygon_shape_2d.h
index 4e47ad34b8..f89995567e 100644
--- a/scene/resources/concave_polygon_shape_2d.h
+++ b/scene/resources/concave_polygon_shape_2d.h
@@ -42,8 +42,8 @@ protected:
public:
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
- void set_segments(const PoolVector<Vector2> &p_segments);
- PoolVector<Vector2> get_segments() const;
+ void set_segments(const Vector<Vector2> &p_segments);
+ Vector<Vector2> get_segments() const;
virtual void draw(const RID &p_to_rid, const Color &p_color);
virtual Rect2 get_rect() const;
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp
index 21fdcc1f06..b7463605b4 100644
--- a/scene/resources/convex_polygon_shape.cpp
+++ b/scene/resources/convex_polygon_shape.cpp
@@ -34,7 +34,7 @@
Vector<Vector3> ConvexPolygonShape::get_debug_mesh_lines() {
- PoolVector<Vector3> points = get_points();
+ Vector<Vector3> points = get_points();
if (points.size() > 3) {
@@ -56,8 +56,8 @@ Vector<Vector3> ConvexPolygonShape::get_debug_mesh_lines() {
}
real_t ConvexPolygonShape::get_enclosing_radius() const {
- PoolVector<Vector3> data = get_points();
- PoolVector<Vector3>::Read read = data.read();
+ Vector<Vector3> data = get_points();
+ const Vector3 *read = data.ptr();
real_t r = 0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
@@ -71,14 +71,14 @@ void ConvexPolygonShape::_update_shape() {
Shape::_update_shape();
}
-void ConvexPolygonShape::set_points(const PoolVector<Vector3> &p_points) {
+void ConvexPolygonShape::set_points(const Vector<Vector3> &p_points) {
points = p_points;
_update_shape();
notify_change_to_owners();
}
-PoolVector<Vector3> ConvexPolygonShape::get_points() const {
+Vector<Vector3> ConvexPolygonShape::get_points() const {
return points;
}
diff --git a/scene/resources/convex_polygon_shape.h b/scene/resources/convex_polygon_shape.h
index e3bf02399a..fcd733887e 100644
--- a/scene/resources/convex_polygon_shape.h
+++ b/scene/resources/convex_polygon_shape.h
@@ -36,7 +36,7 @@
class ConvexPolygonShape : public Shape {
GDCLASS(ConvexPolygonShape, Shape);
- PoolVector<Vector3> points;
+ Vector<Vector3> points;
protected:
static void _bind_methods();
@@ -44,8 +44,8 @@ protected:
virtual void _update_shape();
public:
- void set_points(const PoolVector<Vector3> &p_points);
- PoolVector<Vector3> get_points() const;
+ void set_points(const Vector<Vector3> &p_points);
+ Vector<Vector3> get_points() const;
virtual Vector<Vector3> get_debug_mesh_lines();
virtual real_t get_enclosing_radius() const;
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index 296d014cc7..95967429c9 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -74,7 +74,7 @@ void ConvexPolygonShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_points", "points"), &ConvexPolygonShape2D::set_points);
ClassDB::bind_method(D_METHOD("get_points"), &ConvexPolygonShape2D::get_points);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points");
}
void ConvexPolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) {
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 397f6ca906..a68eb77378 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -392,7 +392,7 @@ void Curve::set_data(Array input) {
for (int i = 0; i < input.size(); i += ELEMS) {
ERR_FAIL_COND(input[i].get_type() != Variant::VECTOR2);
ERR_FAIL_COND(!input[i + 1].is_num());
- ERR_FAIL_COND(input[i + 2].get_type() != Variant::REAL);
+ ERR_FAIL_COND(input[i + 2].get_type() != Variant::FLOAT);
ERR_FAIL_COND(input[i + 3].get_type() != Variant::INT);
int left_mode = input[i + 3];
@@ -524,8 +524,8 @@ void Curve::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve::get_data);
ClassDB::bind_method(D_METHOD("_set_data", "data"), &Curve::set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_resolution", PROPERTY_HINT_RANGE, "1,1000,1"), "set_bake_resolution", "get_bake_resolution");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
@@ -741,7 +741,7 @@ void Curve2D::_bake() const {
pointlist.push_back(lastpos);
baked_point_cache.resize(pointlist.size());
- PoolVector2Array::Write w = baked_point_cache.write();
+ Vector2 *w = baked_point_cache.ptrw();
int idx = 0;
for (List<Vector2>::Element *E = pointlist.front(); E; E = E->next()) {
@@ -771,7 +771,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const {
return baked_point_cache.get(0);
int bpc = baked_point_cache.size();
- PoolVector2Array::Read r = baked_point_cache.read();
+ const Vector2 *r = baked_point_cache.ptr();
if (p_offset < 0)
return r[0];
@@ -800,7 +800,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const {
}
}
-PoolVector2Array Curve2D::get_baked_points() const {
+PackedVector2Array Curve2D::get_baked_points() const {
if (baked_cache_dirty)
_bake();
@@ -833,7 +833,7 @@ Vector2 Curve2D::get_closest_point(const Vector2 &p_to_point) const {
if (pc == 1)
return baked_point_cache.get(0);
- PoolVector2Array::Read r = baked_point_cache.read();
+ const Vector2 *r = baked_point_cache.ptr();
Vector2 nearest;
float nearest_dist = -1.0f;
@@ -869,7 +869,7 @@ float Curve2D::get_closest_offset(const Vector2 &p_to_point) const {
if (pc == 1)
return 0.0f;
- PoolVector2Array::Read r = baked_point_cache.read();
+ const Vector2 *r = baked_point_cache.ptr();
float nearest = 0.0f;
float nearest_dist = -1.0f;
@@ -899,9 +899,9 @@ Dictionary Curve2D::_get_data() const {
Dictionary dc;
- PoolVector2Array d;
+ PackedVector2Array d;
d.resize(points.size() * 3);
- PoolVector2Array::Write w = d.write();
+ Vector2 *w = d.ptrw();
for (int i = 0; i < points.size(); i++) {
@@ -910,8 +910,6 @@ Dictionary Curve2D::_get_data() const {
w[i * 3 + 2] = points[i].pos;
}
- w = PoolVector2Array::Write();
-
dc["points"] = d;
return dc;
@@ -920,11 +918,11 @@ void Curve2D::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(!p_data.has("points"));
- PoolVector2Array rp = p_data["points"];
+ PackedVector2Array rp = p_data["points"];
int pc = rp.size();
ERR_FAIL_COND(pc % 3 != 0);
points.resize(pc / 3);
- PoolVector2Array::Read r = rp.read();
+ const Vector2 *r = rp.ptr();
for (int i = 0; i < points.size(); i++) {
@@ -936,9 +934,9 @@ void Curve2D::_set_data(const Dictionary &p_data) {
baked_cache_dirty = true;
}
-PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const {
+PackedVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const {
- PoolVector2Array tess;
+ PackedVector2Array tess;
if (points.size() == 0) {
return tess;
@@ -956,7 +954,7 @@ PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const
}
tess.resize(pc);
- PoolVector2Array::Write bpw = tess.write();
+ Vector2 *bpw = tess.ptrw();
bpw[0] = points[0].pos;
int pidx = 0;
@@ -972,8 +970,6 @@ PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const
bpw[pidx] = points[i + 1].pos;
}
- bpw = PoolVector2Array::Write();
-
return tess;
}
@@ -1005,7 +1001,7 @@ void Curve2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve2D::_get_data);
ClassDB::bind_method(D_METHOD("_set_data"), &Curve2D::_set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
}
@@ -1258,14 +1254,14 @@ void Curve3D::_bake() const {
pointlist.push_back(Plane(lastpos, lastilt));
baked_point_cache.resize(pointlist.size());
- PoolVector3Array::Write w = baked_point_cache.write();
+ Vector3 *w = baked_point_cache.ptrw();
int idx = 0;
baked_tilt_cache.resize(pointlist.size());
- PoolRealArray::Write wt = baked_tilt_cache.write();
+ real_t *wt = baked_tilt_cache.ptrw();
baked_up_vector_cache.resize(up_vector_enabled ? pointlist.size() : 0);
- PoolVector3Array::Write up_write = baked_up_vector_cache.write();
+ Vector3 *up_write = baked_up_vector_cache.ptrw();
Vector3 sideways;
Vector3 up;
@@ -1333,7 +1329,7 @@ Vector3 Curve3D::interpolate_baked(float p_offset, bool p_cubic) const {
return baked_point_cache.get(0);
int bpc = baked_point_cache.size();
- PoolVector3Array::Read r = baked_point_cache.read();
+ const Vector3 *r = baked_point_cache.ptr();
if (p_offset < 0)
return r[0];
@@ -1375,7 +1371,7 @@ float Curve3D::interpolate_baked_tilt(float p_offset) const {
return baked_tilt_cache.get(0);
int bpc = baked_tilt_cache.size();
- PoolRealArray::Read r = baked_tilt_cache.read();
+ const real_t *r = baked_tilt_cache.ptr();
if (p_offset < 0)
return r[0];
@@ -1410,9 +1406,9 @@ Vector3 Curve3D::interpolate_baked_up_vector(float p_offset, bool p_apply_tilt)
if (count == 1)
return baked_up_vector_cache.get(0);
- PoolVector3Array::Read r = baked_up_vector_cache.read();
- PoolVector3Array::Read rp = baked_point_cache.read();
- PoolRealArray::Read rt = baked_tilt_cache.read();
+ const Vector3 *r = baked_up_vector_cache.ptr();
+ const Vector3 *rp = baked_point_cache.ptr();
+ const real_t *rt = baked_tilt_cache.ptr();
float offset = CLAMP(p_offset, 0.0f, baked_max_ofs);
@@ -1441,7 +1437,7 @@ Vector3 Curve3D::interpolate_baked_up_vector(float p_offset, bool p_apply_tilt)
return up.rotated(axis, up.angle_to(up1) * frac);
}
-PoolVector3Array Curve3D::get_baked_points() const {
+PackedVector3Array Curve3D::get_baked_points() const {
if (baked_cache_dirty)
_bake();
@@ -1449,7 +1445,7 @@ PoolVector3Array Curve3D::get_baked_points() const {
return baked_point_cache;
}
-PoolRealArray Curve3D::get_baked_tilts() const {
+PackedFloat32Array Curve3D::get_baked_tilts() const {
if (baked_cache_dirty)
_bake();
@@ -1457,7 +1453,7 @@ PoolRealArray Curve3D::get_baked_tilts() const {
return baked_tilt_cache;
}
-PoolVector3Array Curve3D::get_baked_up_vectors() const {
+PackedVector3Array Curve3D::get_baked_up_vectors() const {
if (baked_cache_dirty)
_bake();
@@ -1478,7 +1474,7 @@ Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const {
if (pc == 1)
return baked_point_cache.get(0);
- PoolVector3Array::Read r = baked_point_cache.read();
+ const Vector3 *r = baked_point_cache.ptr();
Vector3 nearest;
float nearest_dist = -1.0f;
@@ -1514,7 +1510,7 @@ float Curve3D::get_closest_offset(const Vector3 &p_to_point) const {
if (pc == 1)
return 0.0f;
- PoolVector3Array::Read r = baked_point_cache.read();
+ const Vector3 *r = baked_point_cache.ptr();
float nearest = 0.0f;
float nearest_dist = -1.0f;
@@ -1568,12 +1564,12 @@ Dictionary Curve3D::_get_data() const {
Dictionary dc;
- PoolVector3Array d;
+ PackedVector3Array d;
d.resize(points.size() * 3);
- PoolVector3Array::Write w = d.write();
- PoolRealArray t;
+ Vector3 *w = d.ptrw();
+ PackedFloat32Array t;
t.resize(points.size());
- PoolRealArray::Write wt = t.write();
+ real_t *wt = t.ptrw();
for (int i = 0; i < points.size(); i++) {
@@ -1583,9 +1579,6 @@ Dictionary Curve3D::_get_data() const {
wt[i] = points[i].tilt;
}
- w = PoolVector3Array::Write();
- wt = PoolRealArray::Write();
-
dc["points"] = d;
dc["tilts"] = t;
@@ -1596,13 +1589,13 @@ void Curve3D::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(!p_data.has("points"));
ERR_FAIL_COND(!p_data.has("tilts"));
- PoolVector3Array rp = p_data["points"];
+ PackedVector3Array rp = p_data["points"];
int pc = rp.size();
ERR_FAIL_COND(pc % 3 != 0);
points.resize(pc / 3);
- PoolVector3Array::Read r = rp.read();
- PoolRealArray rtl = p_data["tilts"];
- PoolRealArray::Read rt = rtl.read();
+ const Vector3 *r = rp.ptr();
+ PackedFloat32Array rtl = p_data["tilts"];
+ const real_t *rt = rtl.ptr();
for (int i = 0; i < points.size(); i++) {
@@ -1615,9 +1608,9 @@ void Curve3D::_set_data(const Dictionary &p_data) {
baked_cache_dirty = true;
}
-PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const {
+PackedVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const {
- PoolVector3Array tess;
+ PackedVector3Array tess;
if (points.size() == 0) {
return tess;
@@ -1635,7 +1628,7 @@ PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const
}
tess.resize(pc);
- PoolVector3Array::Write bpw = tess.write();
+ Vector3 *bpw = tess.ptrw();
bpw[0] = points[0].pos;
int pidx = 0;
@@ -1651,8 +1644,6 @@ PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const
bpw[pidx] = points[i + 1].pos;
}
- bpw = PoolVector3Array::Write();
-
return tess;
}
@@ -1691,7 +1682,7 @@ void Curve3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve3D::_get_data);
ClassDB::bind_method(D_METHOD("_set_data"), &Curve3D::_set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
ADD_GROUP("Up Vector", "up_vector_");
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index b02466534c..7dcbf1ceff 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -168,7 +168,7 @@ class Curve2D : public Resource {
};
mutable bool baked_cache_dirty;
- mutable PoolVector2Array baked_point_cache;
+ mutable PackedVector2Array baked_point_cache;
mutable float baked_max_ofs;
void _bake() const;
@@ -202,11 +202,11 @@ public:
float get_baked_length() const;
Vector2 interpolate_baked(float p_offset, bool p_cubic = false) const;
- PoolVector2Array get_baked_points() const; //useful for going through
+ PackedVector2Array get_baked_points() const; //useful for going through
Vector2 get_closest_point(const Vector2 &p_to_point) const;
float get_closest_offset(const Vector2 &p_to_point) const;
- PoolVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
+ PackedVector2Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
Curve2D();
};
@@ -234,9 +234,9 @@ class Curve3D : public Resource {
};
mutable bool baked_cache_dirty;
- mutable PoolVector3Array baked_point_cache;
- mutable PoolRealArray baked_tilt_cache;
- mutable PoolVector3Array baked_up_vector_cache;
+ mutable PackedVector3Array baked_point_cache;
+ mutable PackedFloat32Array baked_tilt_cache;
+ mutable PackedVector3Array baked_up_vector_cache;
mutable float baked_max_ofs;
void _bake() const;
@@ -277,13 +277,13 @@ public:
Vector3 interpolate_baked(float p_offset, bool p_cubic = false) const;
float interpolate_baked_tilt(float p_offset) const;
Vector3 interpolate_baked_up_vector(float p_offset, bool p_apply_tilt = false) const;
- PoolVector3Array get_baked_points() const; //useful for going through
- PoolRealArray get_baked_tilts() const; //useful for going through
- PoolVector3Array get_baked_up_vectors() const;
+ PackedVector3Array get_baked_points() const; //useful for going through
+ PackedFloat32Array get_baked_tilts() const; //useful for going through
+ PackedVector3Array get_baked_up_vectors() const;
Vector3 get_closest_point(const Vector3 &p_to_point) const;
float get_closest_offset(const Vector3 &p_to_point) const;
- PoolVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
+ PackedVector3Array tessellate(int p_max_stages = 5, float p_tolerance = 4) const; //useful for display
Curve3D();
};
diff --git a/scene/resources/cylinder_shape.cpp b/scene/resources/cylinder_shape.cpp
index b9b0d77a1b..53d368d32a 100644
--- a/scene/resources/cylinder_shape.cpp
+++ b/scene/resources/cylinder_shape.cpp
@@ -108,8 +108,8 @@ void CylinderShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CylinderShape::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CylinderShape::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
}
CylinderShape::CylinderShape() :
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 5a6a8dc286..04bc95ade6 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -706,9 +706,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color_disabled", "TabContainer", control_font_color_disabled);
theme->set_constant("side_margin", "TabContainer", 8 * scale);
- theme->set_constant("top_margin", "TabContainer", 24 * scale);
- theme->set_constant("label_valign_fg", "TabContainer", 0 * scale);
- theme->set_constant("label_valign_bg", "TabContainer", 2 * scale);
theme->set_constant("hseparation", "TabContainer", 4 * scale);
// Tabs
@@ -732,9 +729,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color_bg", "Tabs", control_font_color_low);
theme->set_color("font_color_disabled", "Tabs", control_font_color_disabled);
- theme->set_constant("top_margin", "Tabs", 24 * scale);
- theme->set_constant("label_valign_fg", "Tabs", 0 * scale);
- theme->set_constant("label_valign_bg", "Tabs", 2 * scale);
theme->set_constant("hseparation", "Tabs", 4 * scale);
// Separators
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index d2a90f388e..ebd5b02dbc 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -442,7 +442,7 @@ DynamicFontAtSize::TexturePosition DynamicFontAtSize::_find_texture_pos_for_glyp
{
//zero texture
- PoolVector<uint8_t>::Write w = tex.imgdata.write();
+ uint8_t *w = tex.imgdata.ptrw();
ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);
for (int i = 0; i < texsize * texsize * p_color_size; i++) {
w[i] = 0;
@@ -480,7 +480,7 @@ DynamicFontAtSize::Character DynamicFontAtSize::_bitmap_to_character(FT_Bitmap b
CharTexture &tex = textures.write[tex_pos.index];
{
- PoolVector<uint8_t>::Write wr = tex.imgdata.write();
+ uint8_t *wr = tex.imgdata.ptrw();
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
@@ -990,7 +990,7 @@ void DynamicFont::_bind_methods() {
BIND_ENUM_CONSTANT(SPACING_SPACE);
}
-Mutex *DynamicFont::dynamic_font_mutex = NULL;
+Mutex DynamicFont::dynamic_font_mutex;
SelfList<DynamicFont>::List *DynamicFont::dynamic_fonts = NULL;
@@ -1004,29 +1004,21 @@ DynamicFont::DynamicFont() :
spacing_char = 0;
spacing_space = 0;
outline_color = Color(1, 1, 1);
- if (dynamic_font_mutex) {
- dynamic_font_mutex->lock();
- dynamic_fonts->add(&font_list);
- dynamic_font_mutex->unlock();
- }
+
+ MutexLock lock(dynamic_font_mutex);
+ dynamic_fonts->add(&font_list);
}
DynamicFont::~DynamicFont() {
- if (dynamic_font_mutex) {
- dynamic_font_mutex->lock();
- dynamic_fonts->remove(&font_list);
- dynamic_font_mutex->unlock();
- }
+ MutexLock lock(dynamic_font_mutex);
+ dynamic_fonts->remove(&font_list);
}
void DynamicFont::initialize_dynamic_fonts() {
dynamic_fonts = memnew(SelfList<DynamicFont>::List());
- dynamic_font_mutex = Mutex::create();
}
void DynamicFont::finish_dynamic_fonts() {
- memdelete(dynamic_font_mutex);
- dynamic_font_mutex = NULL;
memdelete(dynamic_fonts);
dynamic_fonts = NULL;
}
@@ -1034,39 +1026,36 @@ void DynamicFont::finish_dynamic_fonts() {
void DynamicFont::update_oversampling() {
Vector<Ref<DynamicFont> > changed;
+ {
+ MutexLock lock(dynamic_font_mutex);
- if (dynamic_font_mutex)
- dynamic_font_mutex->lock();
-
- SelfList<DynamicFont> *E = dynamic_fonts->first();
- while (E) {
+ SelfList<DynamicFont> *E = dynamic_fonts->first();
+ while (E) {
- if (E->self()->data_at_size.is_valid()) {
- E->self()->data_at_size->update_oversampling();
+ if (E->self()->data_at_size.is_valid()) {
+ E->self()->data_at_size->update_oversampling();
- if (E->self()->outline_data_at_size.is_valid()) {
- E->self()->outline_data_at_size->update_oversampling();
- }
+ if (E->self()->outline_data_at_size.is_valid()) {
+ E->self()->outline_data_at_size->update_oversampling();
+ }
- for (int i = 0; i < E->self()->fallback_data_at_size.size(); i++) {
- if (E->self()->fallback_data_at_size[i].is_valid()) {
- E->self()->fallback_data_at_size.write[i]->update_oversampling();
+ for (int i = 0; i < E->self()->fallback_data_at_size.size(); i++) {
+ if (E->self()->fallback_data_at_size[i].is_valid()) {
+ E->self()->fallback_data_at_size.write[i]->update_oversampling();
- if (E->self()->has_outline() && E->self()->fallback_outline_data_at_size[i].is_valid()) {
- E->self()->fallback_outline_data_at_size.write[i]->update_oversampling();
+ if (E->self()->has_outline() && E->self()->fallback_outline_data_at_size[i].is_valid()) {
+ E->self()->fallback_outline_data_at_size.write[i]->update_oversampling();
+ }
}
}
+
+ changed.push_back(Ref<DynamicFont>(E->self()));
}
- changed.push_back(Ref<DynamicFont>(E->self()));
+ E = E->next();
}
-
- E = E->next();
}
- if (dynamic_font_mutex)
- dynamic_font_mutex->unlock();
-
for (int i = 0; i < changed.size(); i++) {
changed.write[i]->emit_changed();
}
@@ -1074,7 +1063,7 @@ void DynamicFont::update_oversampling() {
/////////////////////////
-RES ResourceFormatLoaderDynamicFont::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderDynamicFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index 94f03665d3..c10f1e6681 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -129,7 +129,7 @@ class DynamicFontAtSize : public Reference {
struct CharTexture {
- PoolVector<uint8_t> imgdata;
+ Vector<uint8_t> imgdata;
int texture_size;
Vector<int> offsets;
Ref<ImageTexture> texture;
@@ -285,7 +285,7 @@ public:
SelfList<DynamicFont> font_list;
- static Mutex *dynamic_font_mutex;
+ static Mutex dynamic_font_mutex;
static SelfList<DynamicFont>::List *dynamic_fonts;
static void initialize_dynamic_fonts();
@@ -302,7 +302,7 @@ VARIANT_ENUM_CAST(DynamicFont::SpacingType);
class ResourceFormatLoaderDynamicFont : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 12b2bf4bc9..d407dd3722 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -870,16 +870,16 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "background_canvas_max_layer", PROPERTY_HINT_RANGE, "-1000,1000,1"), "set_canvas_max_layer", "get_canvas_max_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "background_camera_feed_id", PROPERTY_HINT_RANGE, "1,10,1"), "set_camera_feed_id", "get_camera_feed_id");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
ADD_GROUP("Sky", "sky_");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "sky_rotation"), "set_sky_rotation", "get_sky_rotation");
ADD_GROUP("Ambient Light", "ambient_light_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ambient_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Color,Sky"), "set_ambient_source", "get_ambient_source");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_color"), "set_ambient_light_color", "get_ambient_light_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_occlusion_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ao_color", "get_ao_color");
ADD_GROUP("Reflected Light", "reflected_light_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "reflected_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Sky"), "set_reflection_source", "get_reflection_source");
@@ -930,17 +930,17 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_enabled"), "set_fog_enabled", "is_fog_enabled");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_color"), "set_fog_color", "get_fog_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_sun_color"), "set_fog_sun_color", "get_fog_sun_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_depth_enabled"), "set_fog_depth_enabled", "is_fog_depth_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_transmit_enabled"), "set_fog_transmit_enabled", "is_fog_transmit_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_height_enabled"), "set_fog_height_enabled", "is_fog_height_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve");
ClassDB::bind_method(D_METHOD("set_tonemapper", "mode"), &Environment::set_tonemapper);
ClassDB::bind_method(D_METHOD("get_tonemapper"), &Environment::get_tonemapper);
@@ -968,14 +968,14 @@ void Environment::_bind_methods() {
ADD_GROUP("Tonemap", "tonemap_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "tonemap_mode", PROPERTY_HINT_ENUM, "Linear,Reinhard,Filmic,Aces"), "set_tonemapper", "get_tonemapper");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white");
ADD_GROUP("Auto Exposure", "auto_exposure_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_exposure_enabled"), "set_tonemap_auto_exposure", "get_tonemap_auto_exposure");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed");
ClassDB::bind_method(D_METHOD("set_ssr_enabled", "enabled"), &Environment::set_ssr_enabled);
ClassDB::bind_method(D_METHOD("is_ssr_enabled"), &Environment::is_ssr_enabled);
@@ -998,9 +998,9 @@ void Environment::_bind_methods() {
ADD_GROUP("SS Reflections", "ss_reflections_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_enabled"), "set_ssr_enabled", "is_ssr_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ss_reflections_max_steps", PROPERTY_HINT_RANGE, "1,512,1"), "set_ssr_max_steps", "get_ssr_max_steps");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_roughness"), "set_ssr_rough", "is_ssr_rough");
ClassDB::bind_method(D_METHOD("set_ssao_enabled", "enabled"), &Environment::set_ssao_enabled);
@@ -1029,13 +1029,13 @@ void Environment::_bind_methods() {
ADD_GROUP("SSAO", "ssao_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ssao_blur", PROPERTY_HINT_ENUM, "Disabled,1x1,2x2,3x3"), "set_ssao_blur", "get_ssao_blur");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness");
ClassDB::bind_method(D_METHOD("set_glow_enabled", "enabled"), &Environment::set_glow_enabled);
ClassDB::bind_method(D_METHOD("is_glow_enabled"), &Environment::is_glow_enabled);
@@ -1080,14 +1080,14 @@ void Environment::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/6"), "set_glow_level", "is_glow_level_enabled", 5);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/7"), "set_glow_level", "is_glow_level_enabled", 6);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom");
ADD_PROPERTY(PropertyInfo(Variant::INT, "glow_blend_mode", PROPERTY_HINT_ENUM, "Additive,Screen,Softlight,Replace,Mix"), "set_glow_blend_mode", "get_glow_blend_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_bicubic_upscale"), "set_glow_bicubic_upscale", "is_glow_bicubic_upscale_enabled");
ClassDB::bind_method(D_METHOD("set_adjustment_enable", "enabled"), &Environment::set_adjustment_enable);
@@ -1107,9 +1107,9 @@ void Environment::_bind_methods() {
ADD_GROUP("Adjustments", "adjustment_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "adjustment_enabled"), "set_adjustment_enable", "is_adjustment_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_adjustment_color_correction", "get_adjustment_color_correction");
BIND_ENUM_CONSTANT(BG_CLEAR_COLOR);
@@ -1369,15 +1369,15 @@ void CameraEffects::_bind_methods() {
ADD_GROUP("DOF Blur", "dof_blur_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_far_enabled"), "set_dof_blur_far_enabled", "is_dof_blur_far_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_near_enabled"), "set_dof_blur_near_enabled", "is_dof_blur_near_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount");
ADD_GROUP("Override Exposure", "override_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_exposure_enable"), "set_override_exposure_enabled", "is_override_exposure_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure");
}
CameraEffects::CameraEffects() {
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 872d6a043c..1f5e4b647a 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -107,7 +107,7 @@ Font::Font() {
/////////////////////////////////////////////////////////////////
-void BitmapFont::_set_chars(const PoolVector<int> &p_chars) {
+void BitmapFont::_set_chars(const Vector<int> &p_chars) {
int len = p_chars.size();
//char 1 charsize 1 texture, 4 rect, 2 align, advance 1
@@ -116,7 +116,7 @@ void BitmapFont::_set_chars(const PoolVector<int> &p_chars) {
return; //none to do
int chars = len / 9;
- PoolVector<int>::Read r = p_chars.read();
+ const int *r = p_chars.ptr();
for (int i = 0; i < chars; i++) {
const int *data = &r[i * 9];
@@ -124,16 +124,16 @@ void BitmapFont::_set_chars(const PoolVector<int> &p_chars) {
}
}
-PoolVector<int> BitmapFont::_get_chars() const {
+Vector<int> BitmapFont::_get_chars() const {
- PoolVector<int> chars;
+ Vector<int> chars;
const CharType *key = NULL;
while ((key = char_map.next(key))) {
const Character *c = char_map.getptr(*key);
- ERR_FAIL_COND_V(!c, PoolVector<int>());
+ ERR_FAIL_COND_V(!c, Vector<int>());
chars.push_back(*key);
chars.push_back(c->texture_idx);
chars.push_back(c->rect.position.x);
@@ -149,13 +149,13 @@ PoolVector<int> BitmapFont::_get_chars() const {
return chars;
}
-void BitmapFont::_set_kernings(const PoolVector<int> &p_kernings) {
+void BitmapFont::_set_kernings(const Vector<int> &p_kernings) {
int len = p_kernings.size();
ERR_FAIL_COND(len % 3);
if (!len)
return;
- PoolVector<int>::Read r = p_kernings.read();
+ const int *r = p_kernings.ptr();
for (int i = 0; i < len / 3; i++) {
@@ -164,9 +164,9 @@ void BitmapFont::_set_kernings(const PoolVector<int> &p_kernings) {
}
}
-PoolVector<int> BitmapFont::_get_kernings() const {
+Vector<int> BitmapFont::_get_kernings() const {
- PoolVector<int> kernings;
+ Vector<int> kernings;
for (Map<KerningPairKey, int>::Element *E = kerning_map.front(); E; E = E->next()) {
@@ -625,11 +625,11 @@ void BitmapFont::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_fallback"), &BitmapFont::get_fallback);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "textures", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_textures", "_get_textures");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field"), "set_distance_field_hint", "is_distance_field_hint");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "fallback", PROPERTY_HINT_RESOURCE_TYPE, "BitmapFont"), "set_fallback", "get_fallback");
}
@@ -646,7 +646,7 @@ BitmapFont::~BitmapFont() {
////////////
-RES ResourceFormatLoaderBMFont::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderBMFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/scene/resources/font.h b/scene/resources/font.h
index fc1d92e2f9..85b295b5f8 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -146,10 +146,10 @@ private:
float ascent;
bool distance_field_hint;
- void _set_chars(const PoolVector<int> &p_chars);
- PoolVector<int> _get_chars() const;
- void _set_kernings(const PoolVector<int> &p_kernings);
- PoolVector<int> _get_kernings() const;
+ void _set_chars(const Vector<int> &p_chars);
+ Vector<int> _get_chars() const;
+ void _set_kernings(const Vector<int> &p_kernings);
+ Vector<int> _get_kernings() const;
void _set_textures(const Vector<Variant> &p_textures);
Vector<Variant> _get_textures() const;
@@ -200,7 +200,7 @@ public:
class ResourceFormatLoaderBMFont : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index fe5a01886d..7bce04beaf 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -72,8 +72,8 @@ void Gradient::_bind_methods() {
ClassDB::bind_method(D_METHOD(COLOR_RAMP_SET_COLORS, "colors"), &Gradient::set_colors);
ClassDB::bind_method(D_METHOD(COLOR_RAMP_GET_COLORS), &Gradient::get_colors);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS);
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS);
}
Vector<float> Gradient::get_offsets() const {
diff --git a/scene/resources/height_map_shape.cpp b/scene/resources/height_map_shape.cpp
index 48c9221e27..fa45ddcabb 100644
--- a/scene/resources/height_map_shape.cpp
+++ b/scene/resources/height_map_shape.cpp
@@ -42,7 +42,7 @@ Vector<Vector3> HeightMapShape::get_debug_mesh_lines() {
Vector2 size(map_width - 1, map_depth - 1);
Vector2 start = size * -0.5;
- PoolRealArray::Read r = map_data.read();
+ const real_t *r = map_data.ptr();
// reserve some memory for our points..
points.resize(((map_width - 1) * map_depth * 2) + (map_width * (map_depth - 1) * 2));
@@ -102,7 +102,7 @@ void HeightMapShape::set_map_width(int p_new) {
int new_size = map_width * map_depth;
map_data.resize(map_width * map_depth);
- PoolRealArray::Write w = map_data.write();
+ real_t *w = map_data.ptrw();
while (was_size < new_size) {
w[was_size++] = 0.0;
}
@@ -128,7 +128,7 @@ void HeightMapShape::set_map_depth(int p_new) {
int new_size = map_width * map_depth;
map_data.resize(new_size);
- PoolRealArray::Write w = map_data.write();
+ real_t *w = map_data.ptrw();
while (was_size < new_size) {
w[was_size++] = 0.0;
}
@@ -144,7 +144,7 @@ int HeightMapShape::get_map_depth() const {
return map_depth;
}
-void HeightMapShape::set_map_data(PoolRealArray p_new) {
+void HeightMapShape::set_map_data(PackedFloat32Array p_new) {
int size = (map_width * map_depth);
if (p_new.size() != size) {
// fail
@@ -152,8 +152,8 @@ void HeightMapShape::set_map_data(PoolRealArray p_new) {
}
// copy
- PoolRealArray::Write w = map_data.write();
- PoolRealArray::Read r = p_new.read();
+ real_t *w = map_data.ptrw();
+ const real_t *r = p_new.ptr();
for (int i = 0; i < size; i++) {
float val = r[i];
w[i] = val;
@@ -174,7 +174,7 @@ void HeightMapShape::set_map_data(PoolRealArray p_new) {
_change_notify("map_data");
}
-PoolRealArray HeightMapShape::get_map_data() const {
+PackedFloat32Array HeightMapShape::get_map_data() const {
return map_data;
}
@@ -188,7 +188,7 @@ void HeightMapShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "map_width", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_width", "get_map_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "map_depth", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_depth", "get_map_depth");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "map_data"), "set_map_data", "get_map_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "map_data"), "set_map_data", "get_map_data");
}
HeightMapShape::HeightMapShape() :
@@ -197,7 +197,7 @@ HeightMapShape::HeightMapShape() :
map_width = 2;
map_depth = 2;
map_data.resize(map_width * map_depth);
- PoolRealArray::Write w = map_data.write();
+ real_t *w = map_data.ptrw();
w[0] = 0.0;
w[1] = 0.0;
w[2] = 0.0;
diff --git a/scene/resources/height_map_shape.h b/scene/resources/height_map_shape.h
index a6263f061f..b8204f6c98 100644
--- a/scene/resources/height_map_shape.h
+++ b/scene/resources/height_map_shape.h
@@ -38,7 +38,7 @@ class HeightMapShape : public Shape {
int map_width;
int map_depth;
- PoolRealArray map_data;
+ PackedFloat32Array map_data;
float min_height;
float max_height;
@@ -51,8 +51,8 @@ public:
int get_map_width() const;
void set_map_depth(int p_new);
int get_map_depth() const;
- void set_map_data(PoolRealArray p_new);
- PoolRealArray get_map_data() const;
+ void set_map_data(PackedFloat32Array p_new);
+ PackedFloat32Array get_map_data() const;
virtual Vector<Vector3> get_debug_mesh_lines();
virtual real_t get_enclosing_radius() const;
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index d1bb61820b..3b30b4528a 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -113,7 +113,7 @@ void LineShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_d"), &LineShape2D::get_d);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "d"), "set_d", "get_d");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "d"), "set_d", "get_d");
}
LineShape2D::LineShape2D() :
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 6e2fe01834..d387a39dbe 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -197,7 +197,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) {
// This can be a slow operation, and `_change_notify()` (which is called by `_shader_changed()`)
// does nothing in non-editor builds anyway. See GH-34741 for details.
if (shader.is_valid() && Engine::get_singleton()->is_editor_hint()) {
- shader->disconnect("changed", this, "_shader_changed");
+ shader->disconnect("changed", callable_mp(this, &ShaderMaterial::_shader_changed));
}
shader = p_shader;
@@ -207,7 +207,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) {
rid = shader->get_rid();
if (Engine::get_singleton()->is_editor_hint()) {
- shader->connect("changed", this, "_shader_changed");
+ shader->connect("changed", callable_mp(this, &ShaderMaterial::_shader_changed));
}
}
@@ -241,7 +241,6 @@ void ShaderMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_shader"), &ShaderMaterial::get_shader);
ClassDB::bind_method(D_METHOD("set_shader_param", "param", "value"), &ShaderMaterial::set_shader_param);
ClassDB::bind_method(D_METHOD("get_shader_param", "param"), &ShaderMaterial::get_shader_param);
- ClassDB::bind_method(D_METHOD("_shader_changed"), &ShaderMaterial::_shader_changed);
ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &ShaderMaterial::property_can_revert);
ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &ShaderMaterial::property_get_revert);
@@ -290,17 +289,13 @@ ShaderMaterial::~ShaderMaterial() {
/////////////////////////////////
-Mutex *BaseMaterial3D::material_mutex = NULL;
+Mutex BaseMaterial3D::material_mutex;
SelfList<BaseMaterial3D>::List *BaseMaterial3D::dirty_materials = NULL;
Map<BaseMaterial3D::MaterialKey, BaseMaterial3D::ShaderData> BaseMaterial3D::shader_map;
BaseMaterial3D::ShaderNames *BaseMaterial3D::shader_names = NULL;
void BaseMaterial3D::init_shaders() {
-#ifndef NO_THREADS
- material_mutex = Mutex::create();
-#endif
-
dirty_materials = memnew(SelfList<BaseMaterial3D>::List);
shader_names = memnew(ShaderNames);
@@ -379,10 +374,6 @@ void BaseMaterial3D::finish_shaders() {
materials_for_2d[i].unref();
}
-#ifndef NO_THREADS
- memdelete(material_mutex);
-#endif
-
memdelete(dirty_materials);
dirty_materials = NULL;
@@ -419,9 +410,9 @@ void BaseMaterial3D::_update_shader() {
switch (texture_filter) {
case TEXTURE_FILTER_NEAREST: texfilter_str = "filter_nearest"; break;
case TEXTURE_FILTER_LINEAR: texfilter_str = "filter_linear"; break;
- case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: texfilter_str = "filter_nearest_mipmap"; break;
+ case TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: texfilter_str = "filter_nearest_mipmap"; break;
case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texfilter_str = "filter_linear_mipmap"; break;
- case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break;
+ case TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break;
case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_linear_mipmap_aniso"; break;
case TEXTURE_FILTER_MAX: break; // Internal value, skip.
}
@@ -1133,44 +1124,28 @@ void BaseMaterial3D::_update_shader() {
void BaseMaterial3D::flush_changes() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
while (dirty_materials->first()) {
dirty_materials->first()->self()->_update_shader();
}
-
- if (material_mutex)
- material_mutex->unlock();
}
void BaseMaterial3D::_queue_shader_change() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (!element.in_list()) {
dirty_materials->add(&element);
}
-
- if (material_mutex)
- material_mutex->unlock();
}
bool BaseMaterial3D::_is_shader_dirty() const {
- bool dirty = false;
-
- if (material_mutex)
- material_mutex->lock();
-
- dirty = element.in_list();
+ MutexLock lock(material_mutex);
- if (material_mutex)
- material_mutex->unlock();
-
- return dirty;
+ return element.in_list();
}
void BaseMaterial3D::set_albedo(const Color &p_albedo) {
@@ -2223,7 +2198,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Transparency", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "transparency", PROPERTY_HINT_ENUM, "Disabled,Alpha,AlphaScissor,DepthPrePass"), "set_transparency", "get_transparency");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold");
ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul"), "set_blend_mode", "get_blend_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Back,Front,Disabled"), "set_cull_mode", "get_cull_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "depth_draw_mode", PROPERTY_HINT_ENUM, "Opaque Only,Always,Never"), "set_depth_draw_mode", "get_depth_draw_mode");
@@ -2248,56 +2223,56 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orm_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ORM);
ADD_GROUP("Metallic", "metallic_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "metallic_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_METALLIC);
ADD_PROPERTY(PropertyInfo(Variant::INT, "metallic_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_metallic_texture_channel", "get_metallic_texture_channel");
ADD_GROUP("Roughness", "roughness_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "roughness_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ROUGHNESS);
ADD_PROPERTY(PropertyInfo(Variant::INT, "roughness_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_roughness_texture_channel", "get_roughness_texture_channel");
ADD_GROUP("Emission", "emission_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_enabled"), "set_feature", "get_feature", FEATURE_EMISSION);
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "emission", PROPERTY_HINT_COLOR_NO_ALPHA), "set_emission", "get_emission");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_operator", PROPERTY_HINT_ENUM, "Add,Multiply"), "set_emission_operator", "get_emission_operator");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_on_uv2"), "set_flag", "get_flag", FLAG_EMISSION_ON_UV2);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "emission_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_EMISSION);
ADD_GROUP("NormalMap", "normal_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "normal_enabled"), "set_feature", "get_feature", FEATURE_NORMAL_MAPPING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_NORMAL);
ADD_GROUP("Rim", "rim_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "rim_enabled"), "set_feature", "get_feature", FEATURE_RIM);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "rim_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_RIM);
ADD_GROUP("Clearcoat", "clearcoat_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "clearcoat_enabled"), "set_feature", "get_feature", FEATURE_CLEARCOAT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "clearcoat_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_CLEARCOAT);
ADD_GROUP("Anisotropy", "anisotropy_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "anisotropy_enabled"), "set_feature", "get_feature", FEATURE_ANISOTROPY);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anisotropy_flowmap", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_FLOWMAP);
ADD_GROUP("Ambient Occlusion", "ao_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_enabled"), "set_feature", "get_feature", FEATURE_AMBIENT_OCCLUSION);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "ao_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_AMBIENT_OCCLUSION);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_on_uv2"), "set_flag", "get_flag", FLAG_AO_ON_UV2);
ADD_PROPERTY(PropertyInfo(Variant::INT, "ao_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_ao_texture_channel", "get_ao_texture_channel");
ADD_GROUP("Height", "heightmap_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "heightmap_enabled"), "set_feature", "get_feature", FEATURE_HEIGHT_MAPPING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "heightmap_deep_parallax"), "set_heightmap_deep_parallax", "is_heightmap_deep_parallax_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_min_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_min_layers", "get_heightmap_deep_parallax_min_layers");
ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_max_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_max_layers", "get_heightmap_deep_parallax_max_layers");
@@ -2308,7 +2283,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Subsurf Scatter", "subsurf_scatter_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "subsurf_scatter_enabled"), "set_feature", "get_feature", FEATURE_SUBSURACE_SCATTERING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "subsurf_scatter_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_SUBSURFACE_SCATTERING);
ADD_GROUP("Transmission", "transmission_");
@@ -2318,7 +2293,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Refraction", "refraction_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "refraction_enabled"), "set_feature", "get_feature", FEATURE_REFRACTION);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "refraction_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_REFRACTION);
ADD_PROPERTY(PropertyInfo(Variant::INT, "refraction_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_refraction_texture_channel", "get_refraction_texture_channel");
@@ -2334,14 +2309,14 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_scale"), "set_uv1_scale", "get_uv1_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_offset"), "set_uv1_offset", "get_uv1_offset");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_TRIPLANAR);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_world_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_WORLD_TRIPLANAR);
ADD_GROUP("UV2", "uv2_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_scale"), "set_uv2_scale", "get_uv2_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_offset"), "set_uv2_offset", "get_uv2_offset");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_TRIPLANAR);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_world_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_WORLD_TRIPLANAR);
ADD_GROUP("Sampling", "texture_");
@@ -2363,18 +2338,18 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Grow", "grow_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "grow"), "set_grow_enabled", "is_grow_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow");
ADD_GROUP("Transform", "");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_size"), "set_flag", "get_flag", FLAG_FIXED_SIZE);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_point_size"), "set_flag", "get_flag", FLAG_USE_POINT_SIZE);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size");
ADD_GROUP("Proximity Fade", "proximity_fade_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "proximity_fade_enable"), "set_proximity_fade", "is_proximity_fade_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance");
ADD_GROUP("Distance Fade", "distance_fade_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "distance_fade_mode", PROPERTY_HINT_ENUM, "Disabled,PixelAlpha,PixelDither,ObjectDither"), "set_distance_fade", "get_distance_fade");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance");
BIND_ENUM_CONSTANT(TEXTURE_ALBEDO);
BIND_ENUM_CONSTANT(TEXTURE_METALLIC);
@@ -2397,9 +2372,9 @@ void BaseMaterial3D::_bind_methods() {
BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX);
@@ -2580,8 +2555,7 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
BaseMaterial3D::~BaseMaterial3D() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (shader_map.has(current_key)) {
shader_map[current_key].users--;
@@ -2593,9 +2567,6 @@ BaseMaterial3D::~BaseMaterial3D() {
VS::get_singleton()->material_set_shader(_get_material(), RID());
}
-
- if (material_mutex)
- material_mutex->unlock();
}
//////////////////////
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 8c5a648058..fc77226fb9 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -138,9 +138,9 @@ public:
enum TextureFilter {
TEXTURE_FILTER_NEAREST,
TEXTURE_FILTER_LINEAR,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_MAX
};
@@ -388,7 +388,7 @@ private:
StringName texture_names[TEXTURE_MAX];
};
- static Mutex *material_mutex;
+ static Mutex material_mutex;
static SelfList<BaseMaterial3D>::List *dirty_materials;
static ShaderNames *shader_names;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 58463abad8..a063b7f74f 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -63,9 +63,9 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
if (facecount == 0 || (facecount % 3) != 0)
return triangle_mesh;
- PoolVector<Vector3> faces;
+ Vector<Vector3> faces;
faces.resize(facecount);
- PoolVector<Vector3>::Write facesw = faces.write();
+ Vector3 *facesw = faces.ptrw();
int widx = 0;
@@ -78,14 +78,14 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
ERR_FAIL_COND_V(a.empty(), Ref<TriangleMesh>());
int vc = surface_get_array_len(i);
- PoolVector<Vector3> vertices = a[ARRAY_VERTEX];
- PoolVector<Vector3>::Read vr = vertices.read();
+ Vector<Vector3> vertices = a[ARRAY_VERTEX];
+ const Vector3 *vr = vertices.ptr();
if (surface_get_format(i) & ARRAY_FORMAT_INDEX) {
int ic = surface_get_array_index_len(i);
- PoolVector<int> indices = a[ARRAY_INDEX];
- PoolVector<int>::Read ir = indices.read();
+ Vector<int> indices = a[ARRAY_INDEX];
+ const int *ir = indices.ptr();
for (int j = 0; j < ic; j++) {
int index = ir[j];
@@ -99,8 +99,6 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
}
}
- facesw.release();
-
triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh));
triangle_mesh->create(faces);
@@ -118,15 +116,15 @@ void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) {
if (tm.is_null())
return;
- PoolVector<int> triangle_indices;
+ Vector<int> triangle_indices;
tm->get_indices(&triangle_indices);
const int triangles_num = tm->get_triangles().size();
- PoolVector<Vector3> vertices = tm->get_vertices();
+ Vector<Vector3> vertices = tm->get_vertices();
debug_lines.resize(tm->get_triangles().size() * 6); // 3 lines x 2 points each line
- PoolVector<int>::Read ind_r = triangle_indices.read();
- PoolVector<Vector3>::Read ver_r = vertices.read();
+ const int *ind_r = triangle_indices.ptr();
+ const Vector3 *ver_r = vertices.ptr();
for (int j = 0, x = 0, i = 0; i < triangles_num; j += 6, x += 3, ++i) {
// Triangle line 1
debug_lines.write[j + 0] = ver_r[ind_r[x + 0]];
@@ -148,7 +146,7 @@ void Mesh::generate_debug_mesh_indices(Vector<Vector3> &r_points) {
if (tm.is_null())
return;
- PoolVector<Vector3> vertices = tm->get_vertices();
+ Vector<Vector3> vertices = tm->get_vertices();
int vertices_size = vertices.size();
r_points.resize(vertices_size);
@@ -162,20 +160,20 @@ bool Mesh::surface_is_softbody_friendly(int p_idx) const {
return (surface_format & Mesh::ARRAY_FLAG_USE_DYNAMIC_UPDATE && (!(surface_format & Mesh::ARRAY_COMPRESS_NORMAL)));
}
-PoolVector<Face3> Mesh::get_faces() const {
+Vector<Face3> Mesh::get_faces() const {
Ref<TriangleMesh> tm = generate_triangle_mesh();
if (tm.is_valid())
return tm->get_faces();
- return PoolVector<Face3>();
+ return Vector<Face3>();
/*
for (int i=0;i<surfaces.size();i++) {
if (VisualServer::get_singleton()->mesh_surface_get_primitive_type( mesh, i ) != VisualServer::PRIMITIVE_TRIANGLES )
continue;
- PoolVector<int> indices;
- PoolVector<Vector3> vertices;
+ Vector<int> indices;
+ Vector<Vector3> vertices;
vertices=VisualServer::get_singleton()->mesh_surface_get_array(mesh, i,VisualServer::ARRAY_VERTEX);
@@ -196,10 +194,10 @@ PoolVector<Face3> Mesh::get_faces() const {
if (len<=0)
continue;
- PoolVector<int>::Read indicesr = indices.read();
+ const int* indicesr = indices.ptr();
const int *indicesptr = indicesr.ptr();
- PoolVector<Vector3>::Read verticesr = vertices.read();
+ const Vector3* verticesr = vertices.ptr();
const Vector3 *verticesptr = verticesr.ptr();
int old_faces=faces.size();
@@ -207,7 +205,7 @@ PoolVector<Face3> Mesh::get_faces() const {
faces.resize(new_faces);
- PoolVector<Face3>::Write facesw = faces.write();
+ Face3* facesw = faces.ptrw();
Face3 *facesptr=facesw.ptr();
@@ -230,13 +228,13 @@ PoolVector<Face3> Mesh::get_faces() const {
Ref<Shape> Mesh::create_convex_shape() const {
- PoolVector<Vector3> vertices;
+ Vector<Vector3> vertices;
for (int i = 0; i < get_surface_count(); i++) {
Array a = surface_get_arrays(i);
ERR_FAIL_COND_V(a.empty(), Ref<ConvexPolygonShape>());
- PoolVector<Vector3> v = a[ARRAY_VERTEX];
+ Vector<Vector3> v = a[ARRAY_VERTEX];
vertices.append_array(v);
}
@@ -247,11 +245,11 @@ Ref<Shape> Mesh::create_convex_shape() const {
Ref<Shape> Mesh::create_trimesh_shape() const {
- PoolVector<Face3> faces = get_faces();
+ Vector<Face3> faces = get_faces();
if (faces.size() == 0)
return Ref<Shape>();
- PoolVector<Vector3> face_points;
+ Vector<Vector3> face_points;
face_points.resize(faces.size() * 3);
for (int i = 0; i < face_points.size(); i++) {
@@ -279,7 +277,7 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
if (i == 0) {
arrays = a;
- PoolVector<Vector3> v = a[ARRAY_VERTEX];
+ Vector<Vector3> v = a[ARRAY_VERTEX];
index_accum += v.size();
} else {
@@ -297,8 +295,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
case ARRAY_VERTEX:
case ARRAY_NORMAL: {
- PoolVector<Vector3> dst = arrays[j];
- PoolVector<Vector3> src = a[j];
+ Vector<Vector3> dst = arrays[j];
+ Vector<Vector3> src = a[j];
if (j == ARRAY_VERTEX)
vcount = src.size();
if (dst.size() == 0 || src.size() == 0) {
@@ -312,8 +310,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
case ARRAY_BONES:
case ARRAY_WEIGHTS: {
- PoolVector<real_t> dst = arrays[j];
- PoolVector<real_t> src = a[j];
+ Vector<real_t> dst = arrays[j];
+ Vector<real_t> src = a[j];
if (dst.size() == 0 || src.size() == 0) {
arrays[j] = Variant();
continue;
@@ -323,8 +321,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
} break;
case ARRAY_COLOR: {
- PoolVector<Color> dst = arrays[j];
- PoolVector<Color> src = a[j];
+ Vector<Color> dst = arrays[j];
+ Vector<Color> src = a[j];
if (dst.size() == 0 || src.size() == 0) {
arrays[j] = Variant();
continue;
@@ -335,8 +333,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
} break;
case ARRAY_TEX_UV:
case ARRAY_TEX_UV2: {
- PoolVector<Vector2> dst = arrays[j];
- PoolVector<Vector2> src = a[j];
+ Vector<Vector2> dst = arrays[j];
+ Vector<Vector2> src = a[j];
if (dst.size() == 0 || src.size() == 0) {
arrays[j] = Variant();
continue;
@@ -346,15 +344,15 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
} break;
case ARRAY_INDEX: {
- PoolVector<int> dst = arrays[j];
- PoolVector<int> src = a[j];
+ Vector<int> dst = arrays[j];
+ Vector<int> src = a[j];
if (dst.size() == 0 || src.size() == 0) {
arrays[j] = Variant();
continue;
}
{
int ss = src.size();
- PoolVector<int>::Write w = src.write();
+ int *w = src.ptrw();
for (int k = 0; k < ss; k++) {
w[k] += index_accum;
}
@@ -372,18 +370,18 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
ERR_FAIL_COND_V(arrays.size() != ARRAY_MAX, Ref<ArrayMesh>());
{
- PoolVector<int>::Write ir;
- PoolVector<int> indices = arrays[ARRAY_INDEX];
+ int *ir;
+ Vector<int> indices = arrays[ARRAY_INDEX];
bool has_indices = false;
- PoolVector<Vector3> vertices = arrays[ARRAY_VERTEX];
+ Vector<Vector3> vertices = arrays[ARRAY_VERTEX];
int vc = vertices.size();
ERR_FAIL_COND_V(!vc, Ref<ArrayMesh>());
- PoolVector<Vector3>::Write r = vertices.write();
+ Vector3 *r = vertices.ptrw();
if (indices.size()) {
ERR_FAIL_COND_V(indices.size() % 3 != 0, Ref<ArrayMesh>());
vc = indices.size();
- ir = indices.write();
+ ir = indices.ptrw();
has_indices = true;
}
@@ -440,14 +438,13 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
r[i] = t;
}
- r.release();
arrays[ARRAY_VERTEX] = vertices;
if (!has_indices) {
- PoolVector<int> new_indices;
+ Vector<int> new_indices;
new_indices.resize(vertices.size());
- PoolVector<int>::Write iw = new_indices.write();
+ int *iw = new_indices.ptrw();
for (int j = 0; j < vc2; j += 3) {
@@ -456,7 +453,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
iw[j + 2] = j + 1;
}
- iw.release();
arrays[ARRAY_INDEX] = new_indices;
} else {
@@ -465,7 +461,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
SWAP(ir[j + 1], ir[j + 2]);
}
- ir.release();
arrays[ARRAY_INDEX] = indices;
}
}
@@ -548,10 +543,10 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const {
ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape> >());
- PoolVector<Face3> faces = get_faces();
+ Vector<Face3> faces = get_faces();
Vector<Face3> f3;
f3.resize(faces.size());
- PoolVector<Face3>::Read f = faces.read();
+ const Face3 *f = faces.ptr();
for (int i = 0; i < f3.size(); i++) {
f3.write[i] = f[i];
}
@@ -568,10 +563,10 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const {
points.insert(decomposed[i][j].vertex[2]);
}
- PoolVector<Vector3> convex_points;
+ Vector<Vector3> convex_points;
convex_points.resize(points.size());
{
- PoolVector<Vector3>::Write w = convex_points.write();
+ Vector3 *w = convex_points.ptrw();
int idx = 0;
for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) {
w[idx++] = E->get();
@@ -590,7 +585,7 @@ Vector<Ref<Shape> > Mesh::convex_decompose() const {
Mesh::Mesh() {
}
-static PoolVector<uint8_t> _fix_array_compatibility(const PoolVector<uint8_t> &p_src, uint32_t p_format, uint32_t p_elements) {
+static Vector<uint8_t> _fix_array_compatibility(const Vector<uint8_t> &p_src, uint32_t p_format, uint32_t p_elements) {
bool vertex_16bit = p_format & ((1 << (Mesh::ARRAY_VERTEX + Mesh::ARRAY_COMPRESS_BASE)));
bool has_bones = (p_format & Mesh::ARRAY_FORMAT_BONES);
@@ -608,18 +603,18 @@ static PoolVector<uint8_t> _fix_array_compatibility(const PoolVector<uint8_t> &p
uint32_t src_stride = p_src.size() / p_elements;
uint32_t dst_stride = src_stride + (vertex_16bit ? 4 : 0) + (bone_8 ? 4 : 0) - (weight_32 ? 8 : 0);
- PoolVector<uint8_t> ret = p_src;
+ Vector<uint8_t> ret = p_src;
ret.resize(dst_stride * p_elements);
{
- PoolVector<uint8_t>::Write w = ret.write();
- PoolVector<uint8_t>::Read r = p_src.read();
+ uint8_t *w = ret.ptrw();
+ const uint8_t *r = p_src.ptr();
for (uint32_t i = 0; i < p_elements; i++) {
uint32_t remaining = src_stride;
- const uint8_t *src = (const uint8_t *)(r.ptr() + src_stride * i);
- uint8_t *dst = (uint8_t *)(w.ptr() + dst_stride * i);
+ const uint8_t *src = (const uint8_t *)(r + src_stride * i);
+ uint8_t *dst = (uint8_t *)(w + dst_stride * i);
if (!vertex_2d) { //3D
if (vertex_16bit) {
@@ -714,9 +709,9 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) {
if (p_name == "blend_shape/names") {
- PoolVector<String> sk = p_value;
+ Vector<String> sk = p_value;
int sz = sk.size();
- PoolVector<String>::Read r = sk.read();
+ const String *r = sk.ptr();
for (int i = 0; i < sz; i++)
add_blend_shape(r[i]);
return true;
@@ -766,8 +761,8 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) {
} else if (d.has("array_data")) {
//print_line("array data (old style");
//older format (3.x)
- PoolVector<uint8_t> array_data = d["array_data"];
- PoolVector<uint8_t> array_index_data;
+ Vector<uint8_t> array_data = d["array_data"];
+ Vector<uint8_t> array_index_data;
if (d.has("array_index_data"))
array_index_data = d["array_index_data"];
@@ -797,12 +792,12 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) {
if (d.has("index_count"))
index_count = d["index_count"];
- Vector<PoolVector<uint8_t> > blend_shapes;
+ Vector<Vector<uint8_t> > blend_shapes;
if (d.has("blend_shape_data")) {
Array blend_shape_data = d["blend_shape_data"];
for (int i = 0; i < blend_shape_data.size(); i++) {
- PoolVector<uint8_t> shape = blend_shape_data[i];
+ Vector<uint8_t> shape = blend_shape_data[i];
shape = _fix_array_compatibility(shape, format, vertex_count);
blend_shapes.push_back(shape);
@@ -1009,7 +1004,6 @@ void ArrayMesh::_set_surfaces(const Array &p_surfaces) {
} else {
// if mesh does not exist (first time this is loaded, most likely),
// we can create it with a single call, which is a lot more efficient and thread friendly
- print_line("create mesh from surfaces: " + itos(surface_data.size()));
mesh = VS::get_singleton()->mesh_create_from_surfaces(surface_data);
VS::get_singleton()->mesh_set_blend_shape_mode(mesh, (VS::BlendShapeMode)blend_shape_mode);
}
@@ -1049,7 +1043,7 @@ bool ArrayMesh::_get(const StringName &p_name, Variant &r_ret) const {
if (p_name == "blend_shape/names") {
- PoolVector<String> sk;
+ Vector<String> sk;
for (int i = 0; i < blend_shapes.size(); i++)
sk.push_back(blend_shapes[i]);
r_ret = sk;
@@ -1081,7 +1075,7 @@ void ArrayMesh::_get_property_list(List<PropertyInfo> *p_list) const {
return;
if (blend_shapes.size()) {
- p_list->push_back(PropertyInfo(Variant::POOL_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
+ p_list->push_back(PropertyInfo(Variant::PACKED_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::INT, "blend_shape/mode", PROPERTY_HINT_ENUM, "Normalized,Relative"));
}
@@ -1112,7 +1106,7 @@ void ArrayMesh::_recompute_aabb() {
#ifndef _MSC_VER
#warning need to add binding to add_surface using future MeshSurfaceData object
#endif
-void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) {
+void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) {
_create_if_empty();
@@ -1293,7 +1287,7 @@ String ArrayMesh::surface_get_name(int p_idx) const {
return surfaces[p_idx].name;
}
-void ArrayMesh::surface_update_region(int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {
+void ArrayMesh::surface_update_region(int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
ERR_FAIL_INDEX(p_surface, surfaces.size());
VS::get_singleton()->mesh_surface_update_region(mesh, p_surface, p_offset, p_data);
@@ -1404,12 +1398,12 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe
s.material = surface_get_material(i);
s.vertices = SurfaceTool::create_vertex_array_from_triangle_arrays(arrays);
- PoolVector<Vector3> rvertices = arrays[Mesh::ARRAY_VERTEX];
+ Vector<Vector3> rvertices = arrays[Mesh::ARRAY_VERTEX];
int vc = rvertices.size();
- PoolVector<Vector3>::Read r = rvertices.read();
+ const Vector3 *r = rvertices.ptr();
- PoolVector<Vector3> rnormals = arrays[Mesh::ARRAY_NORMAL];
- PoolVector<Vector3>::Read rn = rnormals.read();
+ Vector<Vector3> rnormals = arrays[Mesh::ARRAY_NORMAL];
+ const Vector3 *rn = rnormals.ptr();
int vertex_ofs = vertices.size() / 3;
@@ -1431,7 +1425,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe
uv_index.write[j + vertex_ofs] = Pair<int, int>(i, j);
}
- PoolVector<int> rindices = arrays[Mesh::ARRAY_INDEX];
+ Vector<int> rindices = arrays[Mesh::ARRAY_INDEX];
int ic = rindices.size();
if (ic == 0) {
@@ -1447,7 +1441,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe
}
} else {
- PoolVector<int>::Read ri = rindices.read();
+ const int *ri = rindices.ptr();
for (int j = 0; j < ic / 3; j++) {
if (Face3(r[ri[j * 3 + 0]], r[ri[j * 3 + 1]], r[ri[j * 3 + 2]]).is_degenerate())
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index b8f3702bbe..0e356c16a6 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -126,7 +126,7 @@ public:
virtual int get_blend_shape_count() const = 0;
virtual StringName get_blend_shape_name(int p_index) const = 0;
- PoolVector<Face3> get_faces() const;
+ Vector<Face3> get_faces() const;
Ref<TriangleMesh> generate_triangle_mesh() const;
void generate_debug_mesh_lines(Vector<Vector3> &r_lines);
void generate_debug_mesh_indices(Vector<Vector3> &r_points);
@@ -193,7 +193,7 @@ protected:
public:
void add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), uint32_t p_flags = ARRAY_COMPRESS_DEFAULT);
- void add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>());
+ void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>());
Array surface_get_arrays(int p_surface) const;
Array surface_get_blend_shape_arrays(int p_surface) const;
@@ -207,7 +207,7 @@ public:
void set_blend_shape_mode(BlendShapeMode p_mode);
BlendShapeMode get_blend_shape_mode() const;
- void surface_update_region(int p_surface, int p_offset, const PoolVector<uint8_t> &p_data);
+ void surface_update_region(int p_surface, int p_offset, const Vector<uint8_t> &p_data);
int get_surface_count() const;
void surface_remove(int p_idx);
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index 7a303443e3..675cfc6d64 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -47,7 +47,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
Array arrays = p_mesh->surface_get_arrays(p_surface);
ERR_FAIL_COND_V(arrays.empty(), ERR_INVALID_PARAMETER);
- PoolVector<Vector3> varray = arrays[Mesh::ARRAY_VERTEX];
+ Vector<Vector3> varray = arrays[Mesh::ARRAY_VERTEX];
int vcount = varray.size();
ERR_FAIL_COND_V(vcount == 0, ERR_INVALID_PARAMETER);
@@ -56,34 +56,34 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
format = p_mesh->surface_get_format(p_surface);
material = p_mesh->surface_get_material(p_surface);
- PoolVector<Vector3>::Read vr = varray.read();
+ const Vector3 *vr = varray.ptr();
- PoolVector<Vector3>::Read nr;
+ const Vector3 *nr;
if (arrays[Mesh::ARRAY_NORMAL].get_type() != Variant::NIL)
- nr = arrays[Mesh::ARRAY_NORMAL].operator PoolVector<Vector3>().read();
+ nr = arrays[Mesh::ARRAY_NORMAL].operator Vector<Vector3>().ptr();
- PoolVector<real_t>::Read ta;
+ const real_t *ta;
if (arrays[Mesh::ARRAY_TANGENT].get_type() != Variant::NIL)
- ta = arrays[Mesh::ARRAY_TANGENT].operator PoolVector<real_t>().read();
+ ta = arrays[Mesh::ARRAY_TANGENT].operator Vector<real_t>().ptr();
- PoolVector<Vector2>::Read uv;
+ const Vector2 *uv;
if (arrays[Mesh::ARRAY_TEX_UV].get_type() != Variant::NIL)
- uv = arrays[Mesh::ARRAY_TEX_UV].operator PoolVector<Vector2>().read();
- PoolVector<Vector2>::Read uv2;
+ uv = arrays[Mesh::ARRAY_TEX_UV].operator Vector<Vector2>().ptr();
+ const Vector2 *uv2;
if (arrays[Mesh::ARRAY_TEX_UV2].get_type() != Variant::NIL)
- uv2 = arrays[Mesh::ARRAY_TEX_UV2].operator PoolVector<Vector2>().read();
+ uv2 = arrays[Mesh::ARRAY_TEX_UV2].operator Vector<Vector2>().ptr();
- PoolVector<Color>::Read col;
+ const Color *col;
if (arrays[Mesh::ARRAY_COLOR].get_type() != Variant::NIL)
- col = arrays[Mesh::ARRAY_COLOR].operator PoolVector<Color>().read();
+ col = arrays[Mesh::ARRAY_COLOR].operator Vector<Color>().ptr();
- PoolVector<int>::Read bo;
+ const int *bo;
if (arrays[Mesh::ARRAY_BONES].get_type() != Variant::NIL)
- bo = arrays[Mesh::ARRAY_BONES].operator PoolVector<int>().read();
+ bo = arrays[Mesh::ARRAY_BONES].operator Vector<int>().ptr();
- PoolVector<real_t>::Read we;
+ const real_t *we;
if (arrays[Mesh::ARRAY_WEIGHTS].get_type() != Variant::NIL)
- we = arrays[Mesh::ARRAY_WEIGHTS].operator PoolVector<real_t>().read();
+ we = arrays[Mesh::ARRAY_WEIGHTS].operator Vector<real_t>().ptr();
vertices.resize(vcount);
@@ -91,18 +91,18 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
Vertex v;
v.vertex = vr[i];
- if (nr.ptr())
+ if (nr)
v.normal = nr[i];
- if (ta.ptr())
+ if (ta)
v.tangent = Plane(ta[i * 4 + 0], ta[i * 4 + 1], ta[i * 4 + 2], ta[i * 4 + 3]);
- if (uv.ptr())
+ if (uv)
v.uv = uv[i];
- if (uv2.ptr())
+ if (uv2)
v.uv2 = uv2[i];
- if (col.ptr())
+ if (col)
v.color = col[i];
- if (we.ptr()) {
+ if (we) {
v.weights.push_back(we[i * 4 + 0]);
v.weights.push_back(we[i * 4 + 1]);
@@ -110,7 +110,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
v.weights.push_back(we[i * 4 + 3]);
}
- if (bo.ptr()) {
+ if (bo) {
v.bones.push_back(bo[i * 4 + 0]);
v.bones.push_back(bo[i * 4 + 1]);
@@ -121,7 +121,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
vertices.write[i] = v;
}
- PoolVector<int> indices;
+ Vector<int> indices;
if (arrays[Mesh::ARRAY_INDEX].get_type() != Variant::NIL) {
@@ -129,13 +129,13 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf
} else {
//make code simpler
indices.resize(vcount);
- PoolVector<int>::Write iw = indices.write();
+ int *iw = indices.ptrw();
for (int i = 0; i < vcount; i++)
iw[i] = i;
}
int icount = indices.size();
- PoolVector<int>::Read r = indices.read();
+ const int *r = indices.ptr();
Map<Point2i, int> edge_indices;
@@ -187,61 +187,61 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
int vcount = vertices.size();
- PoolVector<Vector3> v;
- PoolVector<Vector3> n;
- PoolVector<real_t> t;
- PoolVector<Vector2> u;
- PoolVector<Vector2> u2;
- PoolVector<Color> c;
- PoolVector<int> b;
- PoolVector<real_t> w;
- PoolVector<int> in;
+ Vector<Vector3> v;
+ Vector<Vector3> n;
+ Vector<real_t> t;
+ Vector<Vector2> u;
+ Vector<Vector2> u2;
+ Vector<Color> c;
+ Vector<int> b;
+ Vector<real_t> w;
+ Vector<int> in;
{
v.resize(vcount);
- PoolVector<Vector3>::Write vr = v.write();
+ Vector3 *vr = v.ptrw();
- PoolVector<Vector3>::Write nr;
+ Vector3 *nr;
if (format & Mesh::ARRAY_FORMAT_NORMAL) {
n.resize(vcount);
- nr = n.write();
+ nr = n.ptrw();
}
- PoolVector<real_t>::Write ta;
+ real_t *ta;
if (format & Mesh::ARRAY_FORMAT_TANGENT) {
t.resize(vcount * 4);
- ta = t.write();
+ ta = t.ptrw();
}
- PoolVector<Vector2>::Write uv;
+ Vector2 *uv;
if (format & Mesh::ARRAY_FORMAT_TEX_UV) {
u.resize(vcount);
- uv = u.write();
+ uv = u.ptrw();
}
- PoolVector<Vector2>::Write uv2;
+ Vector2 *uv2;
if (format & Mesh::ARRAY_FORMAT_TEX_UV2) {
u2.resize(vcount);
- uv2 = u2.write();
+ uv2 = u2.ptrw();
}
- PoolVector<Color>::Write col;
+ Color *col;
if (format & Mesh::ARRAY_FORMAT_COLOR) {
c.resize(vcount);
- col = c.write();
+ col = c.ptrw();
}
- PoolVector<int>::Write bo;
+ int *bo;
if (format & Mesh::ARRAY_FORMAT_BONES) {
b.resize(vcount * 4);
- bo = b.write();
+ bo = b.ptrw();
}
- PoolVector<real_t>::Write we;
+ real_t *we;
if (format & Mesh::ARRAY_FORMAT_WEIGHTS) {
w.resize(vcount * 4);
- we = w.write();
+ we = w.ptrw();
}
for (int i = 0; i < vcount; i++) {
@@ -249,22 +249,22 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
const Vertex &vtx = vertices[i];
vr[i] = vtx.vertex;
- if (nr.ptr())
+ if (nr)
nr[i] = vtx.normal;
- if (ta.ptr()) {
+ if (ta) {
ta[i * 4 + 0] = vtx.tangent.normal.x;
ta[i * 4 + 1] = vtx.tangent.normal.y;
ta[i * 4 + 2] = vtx.tangent.normal.z;
ta[i * 4 + 3] = vtx.tangent.d;
}
- if (uv.ptr())
+ if (uv)
uv[i] = vtx.uv;
- if (uv2.ptr())
+ if (uv2)
uv2[i] = vtx.uv2;
- if (col.ptr())
+ if (col)
col[i] = vtx.color;
- if (we.ptr()) {
+ if (we) {
we[i * 4 + 0] = vtx.weights[0];
we[i * 4 + 1] = vtx.weights[1];
@@ -272,7 +272,7 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
we[i * 4 + 3] = vtx.weights[3];
}
- if (bo.ptr()) {
+ if (bo) {
bo[i * 4 + 0] = vtx.bones[0];
bo[i * 4 + 1] = vtx.bones[1];
@@ -283,7 +283,7 @@ Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
int fc = faces.size();
in.resize(fc * 3);
- PoolVector<int>::Write iw = in.write();
+ int *iw = in.ptrw();
for (int i = 0; i < fc; i++) {
iw[i * 3 + 0] = faces[i].v[0];
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index ac016bec5d..fffd192348 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -29,7 +29,6 @@
/*************************************************************************/
#include "mesh_library.h"
-#include "core/engine.h"
bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) {
@@ -202,11 +201,6 @@ Transform MeshLibrary::get_item_navmesh_transform(int p_item) const {
Ref<Texture2D> MeshLibrary::get_item_preview(int p_item) const {
- if (!Engine::get_singleton()->is_editor_hint()) {
- ERR_PRINT("MeshLibrary item previews are only generated in an editor context, which means they aren't available in a running project.");
- return Ref<Texture2D>();
- }
-
ERR_FAIL_COND_V_MSG(!item_map.has(p_item), Ref<Texture2D>(), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
return item_map[p_item].preview;
}
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 9155975f47..b256e86b96 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -34,7 +34,7 @@
#include "core/map.h"
#include "core/resource.h"
#include "mesh.h"
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
#include "shape.h"
class MeshLibrary : public Resource {
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 9c34ae0504..aa8be326f5 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -35,17 +35,17 @@
#ifndef DISABLE_DEPRECATED
// Kept for compatibility from 3.x to 4.0.
-void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) {
+void MultiMesh::_set_transform_array(const Vector<Vector3> &p_array) {
if (transform_format != TRANSFORM_3D)
return;
- const PoolVector<Vector3> &xforms = p_array;
+ const Vector<Vector3> &xforms = p_array;
int len = xforms.size();
ERR_FAIL_COND((len / 4) != instance_count);
if (len == 0)
return;
- PoolVector<Vector3>::Read r = xforms.read();
+ const Vector3 *r = xforms.ptr();
for (int i = 0; i < len / 4; i++) {
@@ -59,18 +59,18 @@ void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) {
}
}
-PoolVector<Vector3> MultiMesh::_get_transform_array() const {
+Vector<Vector3> MultiMesh::_get_transform_array() const {
if (transform_format != TRANSFORM_3D)
- return PoolVector<Vector3>();
+ return Vector<Vector3>();
if (instance_count == 0)
- return PoolVector<Vector3>();
+ return Vector<Vector3>();
- PoolVector<Vector3> xforms;
+ Vector<Vector3> xforms;
xforms.resize(instance_count * 4);
- PoolVector<Vector3>::Write w = xforms.write();
+ Vector3 *w = xforms.ptrw();
for (int i = 0; i < instance_count; i++) {
@@ -84,18 +84,18 @@ PoolVector<Vector3> MultiMesh::_get_transform_array() const {
return xforms;
}
-void MultiMesh::_set_transform_2d_array(const PoolVector<Vector2> &p_array) {
+void MultiMesh::_set_transform_2d_array(const Vector<Vector2> &p_array) {
if (transform_format != TRANSFORM_2D)
return;
- const PoolVector<Vector2> &xforms = p_array;
+ const Vector<Vector2> &xforms = p_array;
int len = xforms.size();
ERR_FAIL_COND((len / 3) != instance_count);
if (len == 0)
return;
- PoolVector<Vector2>::Read r = xforms.read();
+ const Vector2 *r = xforms.ptr();
for (int i = 0; i < len / 3; i++) {
@@ -108,18 +108,18 @@ void MultiMesh::_set_transform_2d_array(const PoolVector<Vector2> &p_array) {
}
}
-PoolVector<Vector2> MultiMesh::_get_transform_2d_array() const {
+Vector<Vector2> MultiMesh::_get_transform_2d_array() const {
if (transform_format != TRANSFORM_2D)
- return PoolVector<Vector2>();
+ return Vector<Vector2>();
if (instance_count == 0)
- return PoolVector<Vector2>();
+ return Vector<Vector2>();
- PoolVector<Vector2> xforms;
+ Vector<Vector2> xforms;
xforms.resize(instance_count * 3);
- PoolVector<Vector2>::Write w = xforms.write();
+ Vector2 *w = xforms.ptrw();
for (int i = 0; i < instance_count; i++) {
@@ -132,15 +132,15 @@ PoolVector<Vector2> MultiMesh::_get_transform_2d_array() const {
return xforms;
}
-void MultiMesh::_set_color_array(const PoolVector<Color> &p_array) {
+void MultiMesh::_set_color_array(const Vector<Color> &p_array) {
- const PoolVector<Color> &colors = p_array;
+ const Vector<Color> &colors = p_array;
int len = colors.size();
if (len == 0)
return;
ERR_FAIL_COND(len != instance_count);
- PoolVector<Color>::Read r = colors.read();
+ const Color *r = colors.ptr();
for (int i = 0; i < len; i++) {
@@ -148,12 +148,12 @@ void MultiMesh::_set_color_array(const PoolVector<Color> &p_array) {
}
}
-PoolVector<Color> MultiMesh::_get_color_array() const {
+Vector<Color> MultiMesh::_get_color_array() const {
if (instance_count == 0 || !use_colors)
- return PoolVector<Color>();
+ return Vector<Color>();
- PoolVector<Color> colors;
+ Vector<Color> colors;
colors.resize(instance_count);
for (int i = 0; i < instance_count; i++) {
@@ -164,15 +164,15 @@ PoolVector<Color> MultiMesh::_get_color_array() const {
return colors;
}
-void MultiMesh::_set_custom_data_array(const PoolVector<Color> &p_array) {
+void MultiMesh::_set_custom_data_array(const Vector<Color> &p_array) {
- const PoolVector<Color> &custom_datas = p_array;
+ const Vector<Color> &custom_datas = p_array;
int len = custom_datas.size();
if (len == 0)
return;
ERR_FAIL_COND(len != instance_count);
- PoolVector<Color>::Read r = custom_datas.read();
+ const Color *r = custom_datas.ptr();
for (int i = 0; i < len; i++) {
@@ -180,12 +180,12 @@ void MultiMesh::_set_custom_data_array(const PoolVector<Color> &p_array) {
}
}
-PoolVector<Color> MultiMesh::_get_custom_data_array() const {
+Vector<Color> MultiMesh::_get_custom_data_array() const {
if (instance_count == 0 || !use_custom_data)
- return PoolVector<Color>();
+ return Vector<Color>();
- PoolVector<Color> custom_datas;
+ Vector<Color> custom_datas;
custom_datas.resize(instance_count);
for (int i = 0; i < instance_count; i++) {
@@ -197,11 +197,11 @@ PoolVector<Color> MultiMesh::_get_custom_data_array() const {
}
#endif // DISABLE_DEPRECATED
-void MultiMesh::set_buffer(const PoolVector<float> &p_buffer) {
+void MultiMesh::set_buffer(const Vector<float> &p_buffer) {
VS::get_singleton()->multimesh_set_buffer(multimesh, p_buffer);
}
-PoolVector<float> MultiMesh::get_buffer() const {
+Vector<float> MultiMesh::get_buffer() const {
return VS::get_singleton()->multimesh_get_buffer(multimesh);
}
@@ -350,7 +350,7 @@ void MultiMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "instance_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"), "set_instance_count", "get_instance_count");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_instance_count", PROPERTY_HINT_RANGE, "-1,16384,1,or_greater"), "set_visible_instance_count", "get_visible_instance_count");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_mesh", "get_mesh");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer");
#ifndef DISABLE_DEPRECATED
// Kept for compatibility from 3.x to 4.0.
@@ -363,10 +363,10 @@ void MultiMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_custom_data_array"), &MultiMesh::_set_custom_data_array);
ClassDB::bind_method(D_METHOD("_get_custom_data_array"), &MultiMesh::_get_custom_data_array);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_array", "_get_transform_array");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "transform_2d_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_2d_array", "_get_transform_2d_array");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", 0), "_set_color_array", "_get_color_array");
- ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "custom_data_array", PROPERTY_HINT_NONE, "", 0), "_set_custom_data_array", "_get_custom_data_array");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_array", "_get_transform_array");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "transform_2d_array", PROPERTY_HINT_NONE, "", 0), "_set_transform_2d_array", "_get_transform_2d_array");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", 0), "_set_color_array", "_get_color_array");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "custom_data_array", PROPERTY_HINT_NONE, "", 0), "_set_custom_data_array", "_get_custom_data_array");
#endif
BIND_ENUM_CONSTANT(TRANSFORM_2D);
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 5423e66358..8ca30a5b88 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -59,20 +59,20 @@ protected:
#ifndef DISABLE_DEPRECATED
// Kept for compatibility from 3.x to 4.0.
- void _set_transform_array(const PoolVector<Vector3> &p_array);
- PoolVector<Vector3> _get_transform_array() const;
+ void _set_transform_array(const Vector<Vector3> &p_array);
+ Vector<Vector3> _get_transform_array() const;
- void _set_transform_2d_array(const PoolVector<Vector2> &p_array);
- PoolVector<Vector2> _get_transform_2d_array() const;
+ void _set_transform_2d_array(const Vector<Vector2> &p_array);
+ Vector<Vector2> _get_transform_2d_array() const;
- void _set_color_array(const PoolVector<Color> &p_array);
- PoolVector<Color> _get_color_array() const;
+ void _set_color_array(const Vector<Color> &p_array);
+ Vector<Color> _get_color_array() const;
- void _set_custom_data_array(const PoolVector<Color> &p_array);
- PoolVector<Color> _get_custom_data_array() const;
+ void _set_custom_data_array(const Vector<Color> &p_array);
+ Vector<Color> _get_custom_data_array() const;
#endif
- void set_buffer(const PoolVector<float> &p_buffer);
- PoolVector<float> get_buffer() const;
+ void set_buffer(const Vector<float> &p_buffer);
+ Vector<float> get_buffer() const;
public:
void set_mesh(const Ref<Mesh> &p_mesh);
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index e6544778bc..e0aff2182e 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -32,7 +32,7 @@
void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
- vertices = PoolVector<Vector3>();
+ vertices = Vector<Vector3>();
clear_polygons();
for (int i = 0; i < p_mesh->get_surface_count(); i++) {
@@ -40,15 +40,15 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES)
continue;
Array arr = p_mesh->surface_get_arrays(i);
- PoolVector<Vector3> varr = arr[Mesh::ARRAY_VERTEX];
- PoolVector<int> iarr = arr[Mesh::ARRAY_INDEX];
+ Vector<Vector3> varr = arr[Mesh::ARRAY_VERTEX];
+ Vector<int> iarr = arr[Mesh::ARRAY_INDEX];
if (varr.size() == 0 || iarr.size() == 0)
continue;
int from = vertices.size();
vertices.append_array(varr);
int rlen = iarr.size();
- PoolVector<int>::Read r = iarr.read();
+ const int *r = iarr.ptr();
for (int j = 0; j < rlen; j += 3) {
Vector<int> vi;
@@ -252,13 +252,13 @@ bool NavigationMesh::get_filter_walkable_low_height_spans() const {
return filter_walkable_low_height_spans;
}
-void NavigationMesh::set_vertices(const PoolVector<Vector3> &p_vertices) {
+void NavigationMesh::set_vertices(const Vector<Vector3> &p_vertices) {
vertices = p_vertices;
_change_notify();
}
-PoolVector<Vector3> NavigationMesh::get_vertices() const {
+Vector<Vector3> NavigationMesh::get_vertices() const {
return vertices;
}
@@ -309,8 +309,8 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
if (debug_mesh.is_valid())
return debug_mesh;
- PoolVector<Vector3> vertices = get_vertices();
- PoolVector<Vector3>::Read vr = vertices.read();
+ Vector<Vector3> vertices = get_vertices();
+ const Vector3 *vr = vertices.ptr();
List<Face3> faces;
for (int i = 0; i < get_polygon_count(); i++) {
Vector<int> p = get_polygon(i);
@@ -326,11 +326,11 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
}
Map<_EdgeKey, bool> edge_map;
- PoolVector<Vector3> tmeshfaces;
+ Vector<Vector3> tmeshfaces;
tmeshfaces.resize(faces.size() * 3);
{
- PoolVector<Vector3>::Write tw = tmeshfaces.write();
+ Vector3 *tw = tmeshfaces.ptrw();
int tidx = 0;
for (List<Face3>::Element *E = faces.front(); E; E = E->next()) {
@@ -369,10 +369,10 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
}
}
- PoolVector<Vector3> varr;
+ Vector<Vector3> varr;
varr.resize(lines.size());
{
- PoolVector<Vector3>::Write w = varr.write();
+ Vector3 *w = varr.ptrw();
int idx = 0;
for (List<Vector3>::Element *E = lines.front(); E; E = E->next()) {
w[idx++] = E->get();
@@ -478,7 +478,7 @@ void NavigationMesh::_bind_methods() {
BIND_CONSTANT(PARSED_GEOMETRY_STATIC_COLLIDERS);
BIND_CONSTANT(PARSED_GEOMETRY_BOTH);
- ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sample_partition_type/sample_partition_type", PROPERTY_HINT_ENUM, "Watershed,Monotone,Layers"), "set_sample_partition_type", "get_sample_partition_type");
@@ -487,19 +487,19 @@ void NavigationMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "geometry/source_geometry_mode", PROPERTY_HINT_ENUM, "Navmesh Children, Group With Children, Group Explicit"), "set_source_geometry_mode", "get_source_geometry_mode");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "geometry/source_group_name"), "set_source_group_name", "get_source_group_name");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/low_hanging_obstacles"), "set_filter_low_hanging_obstacles", "get_filter_low_hanging_obstacles");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/ledge_spans"), "set_filter_ledge_spans", "get_filter_ledge_spans");
diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h
index a2b1c62eab..cc3ac6e3fd 100644
--- a/scene/resources/navigation_mesh.h
+++ b/scene/resources/navigation_mesh.h
@@ -39,7 +39,7 @@ class NavigationMesh : public Resource {
GDCLASS(NavigationMesh, Resource);
- PoolVector<Vector3> vertices;
+ Vector<Vector3> vertices;
struct Polygon {
Vector<int> indices;
};
@@ -179,8 +179,8 @@ public:
void create_from_mesh(const Ref<Mesh> &p_mesh);
- void set_vertices(const PoolVector<Vector3> &p_vertices);
- PoolVector<Vector3> get_vertices() const;
+ void set_vertices(const Vector<Vector3> &p_vertices);
+ Vector<Vector3> get_vertices() const;
void add_polygon(const Vector<int> &p_polygon);
int get_polygon_count() const;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 3e7d350eec..0538f679cc 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -331,7 +331,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
binds.write[j] = props[c.binds[j]];
}
- cfrom->connect(snames[c.signal], cto, snames[c.method], binds, CONNECT_PERSIST | c.flags);
+ cfrom->connect(snames[c.signal], Callable(cto, snames[c.method]), binds, CONNECT_PERSIST | c.flags);
}
//Node *s = ret_nodes[0];
@@ -532,7 +532,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
if (exists) {
//check if already exists and did not change
- if (value.get_type() == Variant::REAL && original.get_type() == Variant::REAL) {
+ if (value.get_type() == Variant::FLOAT && original.get_type() == Variant::FLOAT) {
//this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error
float a = value;
float b = original;
@@ -702,7 +702,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
// only connections that originate or end into main saved scene are saved
// everything else is discarded
- Node *target = Object::cast_to<Node>(c.target);
+ Node *target = Object::cast_to<Node>(c.callable.get_object());
if (!target) {
continue;
@@ -734,7 +734,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
NodePath signal_from = common_parent->get_path_to(p_node);
NodePath signal_to = common_parent->get_path_to(target);
- if (ps->has_connection(signal_from, c.signal, signal_to, c.method)) {
+ if (ps->has_connection(signal_from, c.signal.get_name(), signal_to, c.callable.get_method())) {
exists = true;
break;
}
@@ -766,7 +766,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
if (from_node >= 0 && to_node >= 0) {
//this one has state for this node, save
- if (state->is_connection(from_node, c.signal, to_node, c.method)) {
+ if (state->is_connection(from_node, c.signal.get_name(), to_node, c.callable.get_method())) {
exists2 = true;
break;
}
@@ -784,7 +784,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
if (from_node >= 0 && to_node >= 0) {
//this one has state for this node, save
- if (state->is_connection(from_node, c.signal, to_node, c.method)) {
+ if (state->is_connection(from_node, c.signal.get_name(), to_node, c.callable.get_method())) {
exists2 = true;
break;
}
@@ -831,8 +831,8 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
ConnectionData cd;
cd.from = src_id;
cd.to = target_id;
- cd.method = _nm_get_string(c.method, name_map);
- cd.signal = _nm_get_string(c.signal, name_map);
+ cd.method = _nm_get_string(c.callable.get_method(), name_map);
+ cd.signal = _nm_get_string(c.signal.get_name(), name_map);
cd.flags = c.flags;
for (int i = 0; i < c.binds.size(); i++) {
@@ -1098,19 +1098,19 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {
ERR_FAIL_COND_MSG(version > PACKED_SCENE_VERSION, "Save format version too new.");
const int node_count = p_dictionary["node_count"];
- const PoolVector<int> snodes = p_dictionary["nodes"];
+ const Vector<int> snodes = p_dictionary["nodes"];
ERR_FAIL_COND(snodes.size() < node_count);
const int conn_count = p_dictionary["conn_count"];
- const PoolVector<int> sconns = p_dictionary["conns"];
+ const Vector<int> sconns = p_dictionary["conns"];
ERR_FAIL_COND(sconns.size() < conn_count);
- PoolVector<String> snames = p_dictionary["names"];
+ Vector<String> snames = p_dictionary["names"];
if (snames.size()) {
int namecount = snames.size();
names.resize(namecount);
- PoolVector<String>::Read r = snames.read();
+ const String *r = snames.ptr();
for (int i = 0; i < names.size(); i++)
names.write[i] = r[i];
}
@@ -1131,7 +1131,7 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {
nodes.resize(node_count);
if (node_count) {
- PoolVector<int>::Read r = snodes.read();
+ const int *r = snodes.ptr();
int idx = 0;
for (int i = 0; i < node_count; i++) {
NodeData &nd = nodes.write[i];
@@ -1159,7 +1159,7 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {
connections.resize(conn_count);
if (conn_count) {
- PoolVector<int>::Read r = sconns.read();
+ const int *r = sconns.ptr();
int idx = 0;
for (int i = 0; i < conn_count; i++) {
ConnectionData &cd = connections.write[i];
@@ -1205,12 +1205,12 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {
Dictionary SceneState::get_bundled_scene() const {
- PoolVector<String> rnames;
+ Vector<String> rnames;
rnames.resize(names.size());
if (names.size()) {
- PoolVector<String>::Write r = rnames.write();
+ String *r = rnames.ptrw();
for (int i = 0; i < names.size(); i++)
r[i] = names[i];
@@ -1612,10 +1612,10 @@ void SceneState::add_editable_instance(const NodePath &p_path) {
editable_instances.push_back(p_path);
}
-PoolVector<String> SceneState::_get_node_groups(int p_idx) const {
+Vector<String> SceneState::_get_node_groups(int p_idx) const {
Vector<StringName> groups = get_node_groups(p_idx);
- PoolVector<String> ret;
+ Vector<String> ret;
for (int i = 0; i < groups.size(); i++)
ret.push_back(groups[i]);
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index b4966e2528..c5873a0792 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -103,7 +103,7 @@ class SceneState : public Reference {
static bool disable_placeholders;
- PoolVector<String> _get_node_groups(int p_idx) const;
+ Vector<String> _get_node_groups(int p_idx) const;
int _find_base_scene_node_remap_key(int p_idx) const;
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index d852dca7fa..f18e8956f1 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -30,17 +30,13 @@
#include "particles_material.h"
-Mutex *ParticlesMaterial::material_mutex = NULL;
+Mutex ParticlesMaterial::material_mutex;
SelfList<ParticlesMaterial>::List *ParticlesMaterial::dirty_materials = NULL;
Map<ParticlesMaterial::MaterialKey, ParticlesMaterial::ShaderData> ParticlesMaterial::shader_map;
ParticlesMaterial::ShaderNames *ParticlesMaterial::shader_names = NULL;
void ParticlesMaterial::init_shaders() {
-#ifndef NO_THREADS
- material_mutex = Mutex::create();
-#endif
-
dirty_materials = memnew(SelfList<ParticlesMaterial>::List);
shader_names = memnew(ShaderNames);
@@ -107,10 +103,6 @@ void ParticlesMaterial::init_shaders() {
void ParticlesMaterial::finish_shaders() {
-#ifndef NO_THREADS
- memdelete(material_mutex);
-#endif
-
memdelete(dirty_materials);
dirty_materials = NULL;
@@ -189,7 +181,7 @@ void ParticlesMaterial::_update_shader() {
} break;
case EMISSION_SHAPE_DIRECTED_POINTS: {
code += "uniform sampler2D emission_texture_normal : hint_black;\n";
- FALLTHROUGH;
+ [[fallthrough]];
}
case EMISSION_SHAPE_POINTS: {
code += "uniform sampler2D emission_texture_points : hint_black;\n";
@@ -612,44 +604,28 @@ void ParticlesMaterial::_update_shader() {
void ParticlesMaterial::flush_changes() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
while (dirty_materials->first()) {
dirty_materials->first()->self()->_update_shader();
}
-
- if (material_mutex)
- material_mutex->unlock();
}
void ParticlesMaterial::_queue_shader_change() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (!element.in_list()) {
dirty_materials->add(&element);
}
-
- if (material_mutex)
- material_mutex->unlock();
}
bool ParticlesMaterial::_is_shader_dirty() const {
- bool dirty = false;
+ MutexLock lock(material_mutex);
- if (material_mutex)
- material_mutex->lock();
-
- dirty = element.in_list();
-
- if (material_mutex)
- material_mutex->unlock();
-
- return dirty;
+ return element.in_list();
}
void ParticlesMaterial::set_direction(Vector3 p_direction) {
@@ -1153,14 +1129,14 @@ void ParticlesMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_lifetime_randomness"), &ParticlesMaterial::get_lifetime_randomness);
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_GROUP("Trail", "trail_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "trail_divisor", PROPERTY_HINT_RANGE, "1,1000000,1"), "set_trail_divisor", "get_trail_divisor");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_size_modifier", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_trail_size_modifier", "get_trail_size_modifier");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_color_modifier", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_trail_color_modifier", "get_trail_color_modifier");
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_point_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_point_texture", "get_emission_point_texture");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_normal_texture", "get_emission_normal_texture");
@@ -1172,59 +1148,59 @@ void ParticlesMaterial::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_flag", "get_flag", FLAG_DISABLE_Z);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
@@ -1298,8 +1274,7 @@ ParticlesMaterial::ParticlesMaterial() :
ParticlesMaterial::~ParticlesMaterial() {
- if (material_mutex)
- material_mutex->lock();
+ MutexLock lock(material_mutex);
if (shader_map.has(current_key)) {
shader_map[current_key].users--;
@@ -1311,7 +1286,4 @@ ParticlesMaterial::~ParticlesMaterial() {
VS::get_singleton()->material_set_shader(_get_material(), RID());
}
-
- if (material_mutex)
- material_mutex->unlock();
}
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index 246ce58a21..c6c8316995 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -126,7 +126,7 @@ private:
return mk;
}
- static Mutex *material_mutex;
+ static Mutex material_mutex;
static SelfList<ParticlesMaterial>::List *dirty_materials;
struct ShaderNames {
diff --git a/scene/resources/physics_material.cpp b/scene/resources/physics_material.cpp
index 0db115ecc0..8ac0191452 100644
--- a/scene/resources/physics_material.cpp
+++ b/scene/resources/physics_material.cpp
@@ -44,9 +44,9 @@ void PhysicsMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_absorbent", "absorbent"), &PhysicsMaterial::set_absorbent);
ClassDB::bind_method(D_METHOD("is_absorbent"), &PhysicsMaterial::is_absorbent);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction"), "set_friction", "get_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction"), "set_friction", "get_friction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rough"), "set_rough", "is_rough");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce"), "set_bounce", "get_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce"), "set_bounce", "get_bounce");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "absorbent"), "set_absorbent", "is_absorbent");
}
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index 9a1d478777..eff0721cef 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -415,7 +415,7 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(!p_data.has("segments"));
ERR_FAIL_COND(!p_data.has("bounds"));
- PoolVector<Vector2> p = p_data["points"];
+ Vector<Vector2> p = p_data["points"];
Array c = p_data["connections"];
ERR_FAIL_COND(c.size() != p.size());
@@ -425,11 +425,11 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) {
int pc = p.size();
points.resize(pc + 2);
- PoolVector<Vector2>::Read pr = p.read();
+ const Vector2 *pr = p.ptr();
for (int i = 0; i < pc; i++) {
points.write[i].pos = pr[i];
- PoolVector<int> con = c[i];
- PoolVector<int>::Read cr = con.read();
+ Vector<int> con = c[i];
+ const int *cr = con.ptr();
int cc = con.size();
for (int j = 0; j < cc; j++) {
@@ -439,19 +439,19 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) {
if (p_data.has("penalties")) {
- PoolVector<float> penalties = p_data["penalties"];
+ Vector<float> penalties = p_data["penalties"];
if (penalties.size() == pc) {
- PoolVector<float>::Read pr2 = penalties.read();
+ const float *pr2 = penalties.ptr();
for (int i = 0; i < pc; i++) {
points.write[i].penalty = pr2[i];
}
}
}
- PoolVector<int> segs = p_data["segments"];
+ Vector<int> segs = p_data["segments"];
int sc = segs.size();
ERR_FAIL_COND(sc & 1);
- PoolVector<int>::Read sr = segs.read();
+ const int *sr = segs.ptr();
for (int i = 0; i < sc; i += 2) {
Edge e(sr[i], sr[i + 1]);
@@ -463,25 +463,25 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) {
Dictionary PolygonPathFinder::_get_data() const {
Dictionary d;
- PoolVector<Vector2> p;
- PoolVector<int> ind;
+ Vector<Vector2> p;
+ Vector<int> ind;
Array connections;
p.resize(MAX(0, points.size() - 2));
connections.resize(MAX(0, points.size() - 2));
ind.resize(edges.size() * 2);
- PoolVector<float> penalties;
+ Vector<float> penalties;
penalties.resize(MAX(0, points.size() - 2));
{
- PoolVector<Vector2>::Write wp = p.write();
- PoolVector<float>::Write pw = penalties.write();
+ Vector2 *wp = p.ptrw();
+ float *pw = penalties.ptrw();
for (int i = 0; i < points.size() - 2; i++) {
wp[i] = points[i].pos;
pw[i] = points[i].penalty;
- PoolVector<int> c;
+ Vector<int> c;
c.resize(points[i].connections.size());
{
- PoolVector<int>::Write cw = c.write();
+ int *cw = c.ptrw();
int idx = 0;
for (Set<int>::Element *E = points[i].connections.front(); E; E = E->next()) {
cw[idx++] = E->get();
@@ -492,7 +492,7 @@ Dictionary PolygonPathFinder::_get_data() const {
}
{
- PoolVector<int>::Write iw = ind.write();
+ int *iw = ind.ptrw();
int idx = 0;
for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) {
iw[idx++] = E->get().points[0];
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index fa0ded12a1..00fc016ca1 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -40,7 +40,7 @@ void PrimitiveMesh::_update() const {
arr.resize(VS::ARRAY_MAX);
_create_mesh_array(arr);
- PoolVector<Vector3> points = arr[VS::ARRAY_VERTEX];
+ Vector<Vector3> points = arr[VS::ARRAY_VERTEX];
aabb = AABB();
@@ -48,7 +48,7 @@ void PrimitiveMesh::_update() const {
ERR_FAIL_COND(pc == 0);
{
- PoolVector<Vector3>::Read r = points.read();
+ const Vector3 *r = points.ptr();
for (int i = 0; i < pc; i++) {
if (i == 0)
aabb.position = r[i];
@@ -57,16 +57,16 @@ void PrimitiveMesh::_update() const {
}
}
- PoolVector<int> indices = arr[VS::ARRAY_INDEX];
+ Vector<int> indices = arr[VS::ARRAY_INDEX];
if (flip_faces) {
- PoolVector<Vector3> normals = arr[VS::ARRAY_NORMAL];
+ Vector<Vector3> normals = arr[VS::ARRAY_NORMAL];
if (normals.size() && indices.size()) {
{
int nc = normals.size();
- PoolVector<Vector3>::Write w = normals.write();
+ Vector3 *w = normals.ptrw();
for (int i = 0; i < nc; i++) {
w[i] = -w[i];
}
@@ -74,7 +74,7 @@ void PrimitiveMesh::_update() const {
{
int ic = indices.size();
- PoolVector<int>::Write w = indices.write();
+ int *w = indices.ptrw();
for (int i = 0; i < ic; i += 3) {
SWAP(w[i + 0], w[i + 1]);
}
@@ -282,11 +282,11 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
// note, this has been aligned with our collision shape but I've left the descriptions as top/middle/bottom
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -303,19 +303,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v /= (rings + 1);
w = sin(0.5 * Math_PI * v);
- z = radius * cos(0.5 * Math_PI * v);
+ y = radius * cos(0.5 * Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- y = -cos(u * (Math_PI * 2.0));
+ x = -sin(u * (Math_PI * 2.0));
+ z = cos(u * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius * w, y * radius * w, z);
- points.push_back(p + Vector3(0.0, 0.0, 0.5 * mid_height));
+ Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
+ points.push_back(p + Vector3(0.0, 0.5 * mid_height, 0.0));
normals.push_back(p.normalized());
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u, v * onethird));
point++;
@@ -341,20 +341,20 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v = j;
v /= (rings + 1);
- z = mid_height * v;
- z = (mid_height * 0.5) - z;
+ y = mid_height * v;
+ y = (mid_height * 0.5) - y;
for (i = 0; i <= radial_segments; i++) {
u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- y = -cos(u * (Math_PI * 2.0));
+ x = -sin(u * (Math_PI * 2.0));
+ z = cos(u * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius, y * radius, z);
+ Vector3 p = Vector3(x * radius, y, -z * radius);
points.push_back(p);
- normals.push_back(Vector3(x, y, 0.0));
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ normals.push_back(Vector3(x, 0.0, -z));
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u, onethird + (v * onethird)));
point++;
@@ -382,19 +382,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v /= (rings + 1);
v += 1.0;
w = sin(0.5 * Math_PI * v);
- z = radius * cos(0.5 * Math_PI * v);
+ y = radius * cos(0.5 * Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
float u2 = i;
u2 /= radial_segments;
- x = sin(u2 * (Math_PI * 2.0));
- y = -cos(u2 * (Math_PI * 2.0));
+ x = -sin(u2 * (Math_PI * 2.0));
+ z = cos(u2 * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius * w, y * radius * w, z);
- points.push_back(p + Vector3(0.0, 0.0, -0.5 * mid_height));
+ Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
+ points.push_back(p + Vector3(0.0, -0.5 * mid_height, 0.0));
normals.push_back(p.normalized());
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u2, twothirds + ((v - 1.0) * onethird)));
point++;
@@ -431,8 +431,8 @@ void CapsuleMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CapsuleMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CapsuleMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
}
@@ -495,11 +495,11 @@ void CubeMesh::_create_mesh_array(Array &p_arr) const {
// set our bounding box
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -746,11 +746,11 @@ void CylinderMesh::_create_mesh_array(Array &p_arr) const {
int i, j, prevrow, thisrow, point;
float x, y, z, u, v, radius;
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -891,9 +891,9 @@ void CylinderMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CylinderMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CylinderMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
}
@@ -962,11 +962,11 @@ void PlaneMesh::_create_mesh_array(Array &p_arr) const {
Size2 start_pos = size * -0.5;
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -1079,11 +1079,11 @@ void PrismMesh::_create_mesh_array(Array &p_arr) const {
// set our bounding box
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -1291,7 +1291,7 @@ void PrismMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_subdivide_depth", "segments"), &PrismMesh::set_subdivide_depth);
ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &PrismMesh::get_subdivide_depth);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_height", "get_subdivide_height");
@@ -1357,10 +1357,10 @@ PrismMesh::PrismMesh() {
*/
void QuadMesh::_create_mesh_array(Array &p_arr) const {
- PoolVector<Vector3> faces;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
+ Vector<Vector3> faces;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
faces.resize(6);
normals.resize(6);
@@ -1437,11 +1437,11 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const {
// set our bounding box
- PoolVector<Vector3> points;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector2> uvs;
- PoolVector<int> indices;
+ Vector<Vector3> points;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector2> uvs;
+ Vector<int> indices;
point = 0;
#define ADD_TANGENT(m_x, m_y, m_z, m_d) \
@@ -1515,8 +1515,8 @@ void SphereMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_is_hemisphere", "is_hemisphere"), &SphereMesh::set_is_hemisphere);
ClassDB::bind_method(D_METHOD("get_is_hemisphere"), &SphereMesh::get_is_hemisphere);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_hemisphere"), "set_is_hemisphere", "get_is_hemisphere");
@@ -1581,7 +1581,7 @@ SphereMesh::SphereMesh() {
*/
void PointMesh::_create_mesh_array(Array &p_arr) const {
- PoolVector<Vector3> faces;
+ Vector<Vector3> faces;
faces.resize(1);
faces.set(0, Vector3(0.0, 0.0, 0.0));
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp
index 1a9b7e6dd2..906abaf60c 100644
--- a/scene/resources/ray_shape.cpp
+++ b/scene/resources/ray_shape.cpp
@@ -87,7 +87,7 @@ void RayShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape::set_slips_on_slope);
ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape::get_slips_on_slope);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
}
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index a5475776a7..238bdf05ef 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -35,7 +35,7 @@
#include "core/project_settings.h"
#include "core/version.h"
-//version 2: changed names for basis, aabb, poolvectors, etc.
+//version 2: changed names for basis, aabb, Vectors, etc.
#define FORMAT_VERSION 2
#include "core/os/dir_access.h"
@@ -45,17 +45,17 @@
///
-void ResourceInteractiveLoaderText::set_local_path(const String &p_local_path) {
+void ResourceLoaderText::set_local_path(const String &p_local_path) {
res_path = p_local_path;
}
-Ref<Resource> ResourceInteractiveLoaderText::get_resource() {
+Ref<Resource> ResourceLoaderText::get_resource() {
return resource;
}
-Error ResourceInteractiveLoaderText::_parse_sub_resource_dummy(DummyReadData *p_data, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
+Error ResourceLoaderText::_parse_sub_resource_dummy(DummyReadData *p_data, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
VariantParser::Token token;
VariantParser::get_token(p_stream, token, line, r_err_str);
@@ -85,7 +85,7 @@ Error ResourceInteractiveLoaderText::_parse_sub_resource_dummy(DummyReadData *p_
return OK;
}
-Error ResourceInteractiveLoaderText::_parse_ext_resource_dummy(DummyReadData *p_data, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
+Error ResourceLoaderText::_parse_ext_resource_dummy(DummyReadData *p_data, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
VariantParser::Token token;
VariantParser::get_token(p_stream, token, line, r_err_str);
@@ -109,7 +109,7 @@ Error ResourceInteractiveLoaderText::_parse_ext_resource_dummy(DummyReadData *p_
return OK;
}
-Error ResourceInteractiveLoaderText::_parse_sub_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
+Error ResourceLoaderText::_parse_sub_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
VariantParser::Token token;
VariantParser::get_token(p_stream, token, line, r_err_str);
@@ -143,7 +143,7 @@ Error ResourceInteractiveLoaderText::_parse_sub_resource(VariantParser::Stream *
return OK;
}
-Error ResourceInteractiveLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
+Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) {
VariantParser::Token token;
VariantParser::get_token(p_stream, token, line, r_err_str);
@@ -164,15 +164,30 @@ Error ResourceInteractiveLoaderText::_parse_ext_resource(VariantParser::Stream *
String path = ext_resources[id].path;
String type = ext_resources[id].type;
- if (path.find("://") == -1 && path.is_rel_path()) {
- // path is relative to file being loaded, so convert to a resource path
- path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path));
- }
+ if (ext_resources[id].cache.is_valid()) {
+ r_res = ext_resources[id].cache;
+ } else if (use_sub_threads) {
- r_res = ResourceLoader::load(path, type);
+ RES res = ResourceLoader::load_threaded_get(path);
+ if (res.is_null()) {
- if (r_res.is_null()) {
- WARN_PRINT(String("Couldn't load external resource: " + path).utf8().get_data());
+ if (ResourceLoader::get_abort_on_missing_resources()) {
+ error = ERR_FILE_CORRUPT;
+ error_text = "[ext_resource] referenced nonexistent resource at: " + path;
+ _printerr();
+ return error;
+ } else {
+ ResourceLoader::notify_dependency_error(local_path, path, type);
+ }
+ } else {
+ ext_resources[id].cache = res;
+ r_res = res;
+ }
+ } else {
+ error = ERR_FILE_CORRUPT;
+ error_text = "[ext_resource] referenced non-loaded resource at: " + path;
+ _printerr();
+ return error;
}
} else {
r_res = RES();
@@ -187,7 +202,7 @@ Error ResourceInteractiveLoaderText::_parse_ext_resource(VariantParser::Stream *
return OK;
}
-Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) {
+Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) {
Ref<PackedScene> packed_scene;
packed_scene.instance();
@@ -278,6 +293,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R
_printerr();
return Ref<PackedScene>();
} else {
+ error = OK;
return packed_scene;
}
}
@@ -321,7 +337,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R
NodePath to = next_tag.fields["to"];
StringName method = next_tag.fields["method"];
StringName signal = next_tag.fields["signal"];
- int flags = CONNECT_PERSIST;
+ int flags = Object::CONNECT_PERSIST;
Array binds;
if (next_tag.fields.has("flags")) {
@@ -352,6 +368,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R
_printerr();
return Ref<PackedScene>();
} else {
+ error = OK;
return packed_scene;
}
}
@@ -375,6 +392,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R
_printerr();
return Ref<PackedScene>();
} else {
+ error = OK;
return packed_scene;
}
}
@@ -385,16 +403,17 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R
return Ref<PackedScene>();
}
}
-
- return packed_scene;
}
-Error ResourceInteractiveLoaderText::poll() {
+Error ResourceLoaderText::load() {
if (error != OK)
return error;
- if (next_tag.name == "ext_resource") {
+ while (true) {
+ if (next_tag.name != "ext_resource") {
+ break;
+ }
if (!next_tag.fields.has("path")) {
error = ERR_FILE_CORRUPT;
@@ -430,30 +449,49 @@ Error ResourceInteractiveLoaderText::poll() {
path = remaps[path];
}
- RES res = ResourceLoader::load(path, type);
+ ExtResource er;
+ er.path = path;
+ er.type = type;
- if (res.is_null()) {
+ if (use_sub_threads) {
- if (ResourceLoader::get_abort_on_missing_resources()) {
- error = ERR_FILE_CORRUPT;
- error_text = "[ext_resource] referenced nonexistent resource at: " + path;
- _printerr();
- return error;
- } else {
- ResourceLoader::notify_dependency_error(local_path, path, type);
+ Error err = ResourceLoader::load_threaded_request(path, type, use_sub_threads, local_path);
+
+ if (err != OK) {
+ if (ResourceLoader::get_abort_on_missing_resources()) {
+ error = ERR_FILE_CORRUPT;
+ error_text = "[ext_resource] referenced broken resource at: " + path;
+ _printerr();
+ return error;
+ } else {
+ ResourceLoader::notify_dependency_error(local_path, path, type);
+ }
}
+
} else {
+ RES res = ResourceLoader::load(path, type);
+
+ if (res.is_null()) {
+
+ if (ResourceLoader::get_abort_on_missing_resources()) {
+ error = ERR_FILE_CORRUPT;
+ error_text = "[ext_resource] referenced nonexistent resource at: " + path;
+ _printerr();
+ return error;
+ } else {
+ ResourceLoader::notify_dependency_error(local_path, path, type);
+ }
+ } else {
- resource_cache.push_back(res);
#ifdef TOOLS_ENABLED
- //remember ID for saving
- res->set_id_for_path(local_path, index);
+ //remember ID for saving
+ res->set_id_for_path(local_path, index);
#endif
+ }
+
+ er.cache = res;
}
- ExtResource er;
- er.path = path;
- er.type = type;
ext_resources[index] = er;
error = VariantParser::parse_tag(&stream, lines, error_text, next_tag, &rp);
@@ -463,9 +501,16 @@ Error ResourceInteractiveLoaderText::poll() {
}
resource_current++;
- return error;
+ }
- } else if (next_tag.name == "sub_resource") {
+ //these are the ones that count
+ resources_total -= resource_current;
+ resource_current = 0;
+
+ while (true) {
+ if (next_tag.name != "sub_resource") {
+ break;
+ }
if (!next_tag.fields.has("type")) {
error = ERR_FILE_CORRUPT;
@@ -546,9 +591,15 @@ Error ResourceInteractiveLoaderText::poll() {
}
}
- return OK;
+ if (progress) {
+ *progress = resource_current / float(resources_total);
+ }
+ }
- } else if (next_tag.name == "resource") {
+ while (true) {
+ if (next_tag.name != "resource") {
+ break;
+ }
if (is_scene) {
@@ -591,6 +642,7 @@ Error ResourceInteractiveLoaderText::poll() {
if (error != ERR_FILE_EOF) {
_printerr();
} else {
+ error = OK;
if (!ResourceCache::has(res_path)) {
resource->set_path(res_path);
}
@@ -609,14 +661,19 @@ Error ResourceInteractiveLoaderText::poll() {
_printerr();
return error;
} else {
- error = ERR_FILE_EOF;
+ error = OK;
+ if (progress) {
+ *progress = resource_current / float(resources_total);
+ }
+
return error;
}
}
+ }
- return OK;
+ //for scene files
- } else if (next_tag.name == "node") {
+ if (next_tag.name == "node") {
if (!is_scene) {
@@ -631,49 +688,60 @@ Error ResourceInteractiveLoaderText::poll() {
if (!packed_scene.is_valid())
return error;
- error = ERR_FILE_EOF;
+ error = OK;
//get it here
resource = packed_scene;
if (!ResourceCache::has(res_path)) {
packed_scene->set_path(res_path);
}
- return error;
+ resource_current++;
+
+ if (progress) {
+ *progress = resource_current / float(resources_total);
+ }
+ return error;
} else {
error_text += "Unknown tag in file: " + next_tag.name;
_printerr();
error = ERR_FILE_CORRUPT;
return error;
}
-
- return OK;
}
-int ResourceInteractiveLoaderText::get_stage() const {
+int ResourceLoaderText::get_stage() const {
return resource_current;
}
-int ResourceInteractiveLoaderText::get_stage_count() const {
+int ResourceLoaderText::get_stage_count() const {
return resources_total; //+ext_resources;
}
-void ResourceInteractiveLoaderText::set_translation_remapped(bool p_remapped) {
+void ResourceLoaderText::set_translation_remapped(bool p_remapped) {
translation_remapped = p_remapped;
}
-ResourceInteractiveLoaderText::ResourceInteractiveLoaderText() {
+ResourceLoaderText::ResourceLoaderText() {
+ resources_total = 0;
+ resource_current = 0;
+ use_sub_threads = false;
+
+ progress = nullptr;
+ lines = false;
translation_remapped = false;
+ use_sub_threads = false;
+ error = OK;
}
-ResourceInteractiveLoaderText::~ResourceInteractiveLoaderText() {
+ResourceLoaderText::~ResourceLoaderText() {
memdelete(f);
}
-void ResourceInteractiveLoaderText::get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types) {
+void ResourceLoaderText::get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types) {
open(p_f);
ignore_resource_parsing = true;
@@ -720,7 +788,7 @@ void ResourceInteractiveLoaderText::get_dependencies(FileAccess *p_f, List<Strin
}
}
-Error ResourceInteractiveLoaderText::rename_dependencies(FileAccess *p_f, const String &p_path, const Map<String, String> &p_map) {
+Error ResourceLoaderText::rename_dependencies(FileAccess *p_f, const String &p_path, const Map<String, String> &p_map) {
open(p_f, true);
ERR_FAIL_COND_V(error != OK, error);
@@ -822,7 +890,7 @@ Error ResourceInteractiveLoaderText::rename_dependencies(FileAccess *p_f, const
return OK;
}
-void ResourceInteractiveLoaderText::open(FileAccess *p_f, bool p_skip_first_tag) {
+void ResourceLoaderText::open(FileAccess *p_f, bool p_skip_first_tag) {
error = OK;
@@ -908,7 +976,7 @@ static void bs_save_unicode_string(FileAccess *f, const String &p_string, bool p
f->store_buffer((const uint8_t *)utf8.get_data(), utf8.length() + 1);
}
-Error ResourceInteractiveLoaderText::save_as_binary(FileAccess *p_f, const String &p_path) {
+Error ResourceLoaderText::save_as_binary(FileAccess *p_f, const String &p_path) {
if (error)
return error;
@@ -1172,7 +1240,7 @@ Error ResourceInteractiveLoaderText::save_as_binary(FileAccess *p_f, const Strin
return OK;
}
-String ResourceInteractiveLoaderText::recognize(FileAccess *p_f) {
+String ResourceLoaderText::recognize(FileAccess *p_f) {
error = OK;
@@ -1217,24 +1285,34 @@ String ResourceInteractiveLoaderText::recognize(FileAccess *p_f) {
/////////////////////
-Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderText::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_CANT_OPEN;
Error err;
+
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
- ERR_FAIL_COND_V_MSG(err != OK, Ref<ResourceInteractiveLoader>(), "Cannot open file '" + p_path + "'.");
+ ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot open file '" + p_path + "'.");
- Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
+ ResourceLoaderText loader;
String path = p_original_path != "" ? p_original_path : p_path;
- ria->local_path = ProjectSettings::get_singleton()->localize_path(path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
- ria->open(f);
-
- return ria;
+ loader.use_sub_threads = p_use_sub_threads;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(path);
+ loader.progress = r_progress;
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
+ loader.open(f);
+ err = loader.load();
+ if (r_error) {
+ *r_error = err;
+ }
+ if (err == OK) {
+ return loader.get_resource();
+ } else {
+ return RES();
+ }
}
void ResourceFormatLoaderText::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const {
@@ -1276,11 +1354,11 @@ String ResourceFormatLoaderText::get_resource_type(const String &p_path) const {
return ""; //could not rwead
}
- Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
- String r = ria->recognize(f);
+ ResourceLoaderText loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
+ String r = loader.recognize(f);
return ClassDB::get_compatibility_remapped_class(r);
}
@@ -1292,11 +1370,11 @@ void ResourceFormatLoaderText::get_dependencies(const String &p_path, List<Strin
ERR_FAIL();
}
- Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
- ria->get_dependencies(f, p_dependencies, p_add_types);
+ ResourceLoaderText loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
+ loader.get_dependencies(f, p_dependencies, p_add_types);
}
Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const Map<String, String> &p_map) {
@@ -1307,11 +1385,11 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const
ERR_FAIL_V(ERR_CANT_OPEN);
}
- Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
- return ria->rename_dependencies(f, p_path, p_map);
+ ResourceLoaderText loader;
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
+ return loader.rename_dependencies(f, p_path, p_map);
}
ResourceFormatLoaderText *ResourceFormatLoaderText::singleton = NULL;
@@ -1323,13 +1401,13 @@ Error ResourceFormatLoaderText::convert_file_to_binary(const String &p_src_path,
ERR_FAIL_COND_V_MSG(err != OK, ERR_CANT_OPEN, "Cannot open file '" + p_src_path + "'.");
- Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
+ ResourceLoaderText loader;
const String &path = p_src_path;
- ria->local_path = ProjectSettings::get_singleton()->localize_path(path);
- ria->res_path = ria->local_path;
- //ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
- ria->open(f);
- return ria->save_as_binary(f, p_dst_path);
+ loader.local_path = ProjectSettings::get_singleton()->localize_path(path);
+ loader.res_path = loader.local_path;
+ //loader.set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
+ loader.open(f);
+ return loader.save_as_binary(f, p_dst_path);
}
/*****************************************************************************************************/
diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h
index 66c69725e8..2425ac7f6c 100644
--- a/scene/resources/resource_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -37,7 +37,7 @@
#include "core/variant_parser.h"
#include "scene/resources/packed_scene.h"
-class ResourceInteractiveLoaderText : public ResourceInteractiveLoader {
+class ResourceLoaderText {
bool translation_remapped;
String local_path;
@@ -49,6 +49,7 @@ class ResourceInteractiveLoaderText : public ResourceInteractiveLoader {
VariantParser::StreamFile stream;
struct ExtResource {
+ RES cache;
String path;
String type;
};
@@ -68,13 +69,16 @@ class ResourceInteractiveLoaderText : public ResourceInteractiveLoader {
VariantParser::Tag next_tag;
+ bool use_sub_threads;
+ float *progress;
+
mutable int lines;
Map<String, String> remaps;
//void _printerr();
- static Error _parse_sub_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceInteractiveLoaderText *>(p_self)->_parse_sub_resource(p_stream, r_res, line, r_err_str); }
- static Error _parse_ext_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceInteractiveLoaderText *>(p_self)->_parse_ext_resource(p_stream, r_res, line, r_err_str); }
+ static Error _parse_sub_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_sub_resource(p_stream, r_res, line, r_err_str); }
+ static Error _parse_ext_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_ext_resource(p_stream, r_res, line, r_err_str); }
Error _parse_sub_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str);
Error _parse_ext_resource(VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str);
@@ -110,12 +114,12 @@ class ResourceInteractiveLoaderText : public ResourceInteractiveLoader {
Ref<PackedScene> _parse_node_tag(VariantParser::ResourceParser &parser);
public:
- virtual void set_local_path(const String &p_local_path);
- virtual Ref<Resource> get_resource();
- virtual Error poll();
- virtual int get_stage() const;
- virtual int get_stage_count() const;
- virtual void set_translation_remapped(bool p_remapped);
+ void set_local_path(const String &p_local_path);
+ Ref<Resource> get_resource();
+ Error load();
+ int get_stage() const;
+ int get_stage_count() const;
+ void set_translation_remapped(bool p_remapped);
void open(FileAccess *p_f, bool p_skip_first_tag = false);
String recognize(FileAccess *p_f);
@@ -123,14 +127,14 @@ public:
Error rename_dependencies(FileAccess *p_f, const String &p_path, const Map<String, String> &p_map);
Error save_as_binary(FileAccess *p_f, const String &p_path);
- ResourceInteractiveLoaderText();
- ~ResourceInteractiveLoaderText();
+ ResourceLoaderText();
+ ~ResourceLoaderText();
};
class ResourceFormatLoaderText : public ResourceFormatLoader {
public:
static ResourceFormatLoaderText *singleton;
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index 3094d0f9bd..2e78a4fccf 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -154,7 +154,7 @@ void RayShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape2D::set_slips_on_slope);
ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape2D::get_slips_on_slope);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
}
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 79cb9754df..8f76c0165f 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -173,7 +173,7 @@ Shader::~Shader() {
}
////////////
-RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index 702e58aedc..5050632dd5 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -101,7 +101,7 @@ VARIANT_ENUM_CAST(Shader::Mode);
class ResourceFormatLoaderShader : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp
index b50c68727a..4a6da18f2b 100644
--- a/scene/resources/shape.cpp
+++ b/scene/resources/shape.cpp
@@ -35,7 +35,7 @@
#include "scene/resources/mesh.h"
#include "servers/physics_server.h"
-void Shape::add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p_xform) {
+void Shape::add_vertices_to_array(Vector<Vector3> &array, const Transform &p_xform) {
Vector<Vector3> toadd = get_debug_mesh_lines();
@@ -43,7 +43,7 @@ void Shape::add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p
int base = array.size();
array.resize(base + toadd.size());
- PoolVector<Vector3>::Write w = array.write();
+ Vector3 *w = array.ptrw();
for (int i = 0; i < toadd.size(); i++) {
w[i + base] = p_xform.xform(toadd[i]);
}
@@ -70,11 +70,11 @@ Ref<ArrayMesh> Shape::get_debug_mesh() {
if (!lines.empty()) {
//make mesh
- PoolVector<Vector3> array;
+ Vector<Vector3> array;
array.resize(lines.size());
{
- PoolVector<Vector3>::Write w = array.write();
+ Vector3 *w = array.ptrw();
for (int i = 0; i < lines.size(); i++) {
w[i] = lines[i];
}
@@ -106,7 +106,7 @@ void Shape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin);
ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
}
Shape::Shape() :
diff --git a/scene/resources/shape.h b/scene/resources/shape.h
index 227a581c96..e5ccbf7e28 100644
--- a/scene/resources/shape.h
+++ b/scene/resources/shape.h
@@ -61,7 +61,7 @@ public:
/// Returns the radius of a sphere that fully enclose this shape
virtual real_t get_enclosing_radius() const = 0;
- void add_vertices_to_array(PoolVector<Vector3> &array, const Transform &p_xform);
+ void add_vertices_to_array(Vector<Vector3> &array, const Transform &p_xform);
real_t get_margin() const;
void set_margin(real_t p_margin);
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 9e97c65a3c..64930c3117 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -105,7 +105,7 @@ void Shape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("collide_and_get_contacts", "local_xform", "with_shape", "shape_xform"), &Shape2D::collide_and_get_contacts);
ClassDB::bind_method(D_METHOD("collide_with_motion_and_get_contacts", "local_xform", "local_motion", "with_shape", "shape_xform", "shape_motion"), &Shape2D::collide_with_motion_and_get_contacts);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias");
}
Shape2D::Shape2D(const RID &p_rid) {
diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp
index 9c8710a59c..df0620b6c4 100644
--- a/scene/resources/skin.cpp
+++ b/scene/resources/skin.cpp
@@ -45,6 +45,24 @@ void Skin::add_bind(int p_bone, const Transform &p_pose) {
set_bind_pose(index, p_pose);
}
+void Skin::add_named_bind(const String &p_name, const Transform &p_pose) {
+
+ uint32_t index = bind_count;
+ set_bind_count(bind_count + 1);
+ set_bind_name(index, p_name);
+ set_bind_pose(index, p_pose);
+}
+
+void Skin::set_bind_name(int p_index, const StringName &p_name) {
+ ERR_FAIL_INDEX(p_index, bind_count);
+ bool notify_change = (binds_ptr[p_index].name != StringName()) != (p_name != StringName());
+ binds_ptr[p_index].name = p_name;
+ emit_changed();
+ if (notify_change) {
+ _change_notify();
+ }
+}
+
void Skin::set_bind_bone(int p_index, int p_bone) {
ERR_FAIL_INDEX(p_index, bind_count);
binds_ptr[p_index].bone = p_bone;
@@ -75,6 +93,9 @@ bool Skin::_set(const StringName &p_name, const Variant &p_value) {
if (what == "bone") {
set_bind_bone(index, p_value);
return true;
+ } else if (what == "name") {
+ set_bind_name(index, p_value);
+ return true;
} else if (what == "pose") {
set_bind_pose(index, p_value);
return true;
@@ -95,6 +116,9 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const {
if (what == "bone") {
r_ret = get_bind_bone(index);
return true;
+ } else if (what == "name") {
+ r_ret = get_bind_name(index);
+ return true;
} else if (what == "pose") {
r_ret = get_bind_pose(index);
return true;
@@ -105,7 +129,8 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const {
void Skin::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "bind_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"));
for (int i = 0; i < get_bind_count(); i++) {
- p_list->push_back(PropertyInfo(Variant::INT, "bind/" + itos(i) + "/bone", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bind/" + itos(i) + "/name"));
+ p_list->push_back(PropertyInfo(Variant::INT, "bind/" + itos(i) + "/bone", PROPERTY_HINT_RANGE, "0,16384,1,or_greater", get_bind_name(i) != StringName() ? PROPERTY_USAGE_NOEDITOR : PROPERTY_USAGE_DEFAULT));
p_list->push_back(PropertyInfo(Variant::TRANSFORM, "bind/" + itos(i) + "/pose"));
}
}
@@ -120,6 +145,9 @@ void Skin::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bind_pose", "bind_index", "pose"), &Skin::set_bind_pose);
ClassDB::bind_method(D_METHOD("get_bind_pose", "bind_index"), &Skin::get_bind_pose);
+ ClassDB::bind_method(D_METHOD("set_bind_name", "bind_index", "name"), &Skin::set_bind_name);
+ ClassDB::bind_method(D_METHOD("get_bind_name", "bind_index"), &Skin::get_bind_name);
+
ClassDB::bind_method(D_METHOD("set_bind_bone", "bind_index", "bone"), &Skin::set_bind_bone);
ClassDB::bind_method(D_METHOD("get_bind_bone", "bind_index"), &Skin::get_bind_bone);
diff --git a/scene/resources/skin.h b/scene/resources/skin.h
index ddc7c655f5..57aaf1afd4 100644
--- a/scene/resources/skin.h
+++ b/scene/resources/skin.h
@@ -37,7 +37,8 @@ class Skin : public Resource {
GDCLASS(Skin, Resource)
struct Bind {
- int bone;
+ int bone = -1;
+ StringName name;
Transform pose;
};
@@ -58,9 +59,11 @@ public:
inline int get_bind_count() const { return bind_count; }
void add_bind(int p_bone, const Transform &p_pose);
+ void add_named_bind(const String &p_name, const Transform &p_pose);
void set_bind_bone(int p_index, int p_bone);
void set_bind_pose(int p_index, const Transform &p_pose);
+ void set_bind_name(int p_index, const StringName &p_name);
inline int get_bind_bone(int p_index) const {
#ifdef DEBUG_ENABLED
@@ -69,6 +72,13 @@ public:
return binds_ptr[p_index].bone;
}
+ inline StringName get_bind_name(int p_index) const {
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_INDEX_V(p_index, bind_count, StringName());
+#endif
+ return binds_ptr[p_index].name;
+ }
+
inline Transform get_bind_pose(int p_index) const {
#ifdef DEBUG_ENABLED
ERR_FAIL_INDEX_V(p_index, bind_count, Transform());
diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp
index 3e797a7bde..54648e8af7 100644
--- a/scene/resources/sky.cpp
+++ b/scene/resources/sky.cpp
@@ -130,7 +130,7 @@ Ref<Image> ProceduralSky::_generate_sky() {
update_queued = false;
- PoolVector<uint8_t> imgdata;
+ Vector<uint8_t> imgdata;
static const int size[TEXTURE_SIZE_MAX] = {
256, 512, 1024, 2048, 4096
@@ -142,9 +142,9 @@ Ref<Image> ProceduralSky::_generate_sky() {
imgdata.resize(w * h * 4); //RGBE
{
- PoolVector<uint8_t>::Write dataw = imgdata.write();
+ uint8_t *dataw = imgdata.ptrw();
- uint32_t *ptr = (uint32_t *)dataw.ptr();
+ uint32_t *ptr = (uint32_t *)dataw;
Color sky_top_linear = sky_top_color.to_linear();
Color sky_horizon_linear = sky_horizon_color.to_linear();
@@ -509,23 +509,23 @@ void ProceduralSky::_bind_methods() {
ADD_GROUP("Sky", "sky_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color"), "set_sky_top_color", "get_sky_top_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color"), "set_sky_horizon_color", "get_sky_horizon_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy");
ADD_GROUP("Ground", "ground_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_bottom_color"), "set_ground_bottom_color", "get_ground_bottom_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_horizon_color"), "set_ground_horizon_color", "get_ground_horizon_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy");
ADD_GROUP("Sun", "sun_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sun_color"), "set_sun_color", "get_sun_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy");
ADD_GROUP("Texture2D", "texture_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_texture_size", "get_texture_size");
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index 56121b6941..825708d1e2 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -83,7 +83,7 @@ void SphereShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape::get_radius);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
}
SphereShape::SphereShape() :
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 1766b531d5..119cbcd098 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -104,10 +104,10 @@ void StyleBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw", "canvas_item", "rect"), &StyleBox::draw);
ADD_GROUP("Content Margin", "content_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM);
}
StyleBox::StyleBox() {
@@ -339,15 +339,15 @@ void StyleBoxTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");
ADD_GROUP("Margin", "margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM);
ADD_GROUP("Expand Margin", "expand_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM);
ADD_GROUP("Axis Stretch", "axis_stretch_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");
@@ -933,10 +933,10 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "corner_detail", PROPERTY_HINT_RANGE, "1,20,1"), "set_corner_detail", "get_corner_detail");
ADD_GROUP("Expand Margin", "expand_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM);
ADD_GROUP("Shadow", "shadow_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color");
@@ -1035,8 +1035,8 @@ void StyleBoxLine::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_vertical"), &StyleBoxLine::is_vertical);
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end");
ADD_PROPERTY(PropertyInfo(Variant::INT, "thickness", PROPERTY_HINT_RANGE, "0,10"), "set_thickness", "get_thickness");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vertical"), "set_vertical", "is_vertical");
}
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index a1e6430255..fa177d03fb 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -288,9 +288,9 @@ Array SurfaceTool::commit_to_arrays() {
case Mesh::ARRAY_VERTEX:
case Mesh::ARRAY_NORMAL: {
- PoolVector<Vector3> array;
+ Vector<Vector3> array;
array.resize(varr_len);
- PoolVector<Vector3>::Write w = array.write();
+ Vector3 *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) {
@@ -307,7 +307,6 @@ Array SurfaceTool::commit_to_arrays() {
}
}
- w.release();
a[i] = array;
} break;
@@ -315,9 +314,9 @@ Array SurfaceTool::commit_to_arrays() {
case Mesh::ARRAY_TEX_UV:
case Mesh::ARRAY_TEX_UV2: {
- PoolVector<Vector2> array;
+ Vector<Vector2> array;
array.resize(varr_len);
- PoolVector<Vector2>::Write w = array.write();
+ Vector2 *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) {
@@ -335,14 +334,13 @@ Array SurfaceTool::commit_to_arrays() {
}
}
- w.release();
a[i] = array;
} break;
case Mesh::ARRAY_TANGENT: {
- PoolVector<float> array;
+ Vector<float> array;
array.resize(varr_len * 4);
- PoolVector<float>::Write w = array.write();
+ float *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) {
@@ -358,15 +356,14 @@ Array SurfaceTool::commit_to_arrays() {
w[idx + 3] = d < 0 ? -1 : 1;
}
- w.release();
a[i] = array;
} break;
case Mesh::ARRAY_COLOR: {
- PoolVector<Color> array;
+ Vector<Color> array;
array.resize(varr_len);
- PoolVector<Color>::Write w = array.write();
+ Color *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx++) {
@@ -375,14 +372,13 @@ Array SurfaceTool::commit_to_arrays() {
w[idx] = v.color;
}
- w.release();
a[i] = array;
} break;
case Mesh::ARRAY_BONES: {
- PoolVector<int> array;
+ Vector<int> array;
array.resize(varr_len * 4);
- PoolVector<int>::Write w = array.write();
+ int *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) {
@@ -396,15 +392,14 @@ Array SurfaceTool::commit_to_arrays() {
}
}
- w.release();
a[i] = array;
} break;
case Mesh::ARRAY_WEIGHTS: {
- PoolVector<float> array;
+ Vector<float> array;
array.resize(varr_len * 4);
- PoolVector<float>::Write w = array.write();
+ float *w = array.ptrw();
int idx = 0;
for (List<Vertex>::Element *E = vertex_array.front(); E; E = E->next(), idx += 4) {
@@ -418,7 +413,6 @@ Array SurfaceTool::commit_to_arrays() {
}
}
- w.release();
a[i] = array;
} break;
@@ -426,9 +420,9 @@ Array SurfaceTool::commit_to_arrays() {
ERR_CONTINUE(index_array.size() == 0);
- PoolVector<int> array;
+ Vector<int> array;
array.resize(index_array.size());
- PoolVector<int>::Write w = array.write();
+ int *w = array.ptrw();
int idx = 0;
for (List<int>::Element *E = index_array.front(); E; E = E->next(), idx++) {
@@ -436,8 +430,6 @@ Array SurfaceTool::commit_to_arrays() {
w[idx] = E->get();
}
- w.release();
-
a[i] = array;
} break;
@@ -535,68 +527,46 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array
Vector<SurfaceTool::Vertex> ret;
- PoolVector<Vector3> varr = p_arrays[VS::ARRAY_VERTEX];
- PoolVector<Vector3> narr = p_arrays[VS::ARRAY_NORMAL];
- PoolVector<float> tarr = p_arrays[VS::ARRAY_TANGENT];
- PoolVector<Color> carr = p_arrays[VS::ARRAY_COLOR];
- PoolVector<Vector2> uvarr = p_arrays[VS::ARRAY_TEX_UV];
- PoolVector<Vector2> uv2arr = p_arrays[VS::ARRAY_TEX_UV2];
- PoolVector<int> barr = p_arrays[VS::ARRAY_BONES];
- PoolVector<float> warr = p_arrays[VS::ARRAY_WEIGHTS];
+ Vector<Vector3> varr = p_arrays[VS::ARRAY_VERTEX];
+ Vector<Vector3> narr = p_arrays[VS::ARRAY_NORMAL];
+ Vector<float> tarr = p_arrays[VS::ARRAY_TANGENT];
+ Vector<Color> carr = p_arrays[VS::ARRAY_COLOR];
+ Vector<Vector2> uvarr = p_arrays[VS::ARRAY_TEX_UV];
+ Vector<Vector2> uv2arr = p_arrays[VS::ARRAY_TEX_UV2];
+ Vector<int> barr = p_arrays[VS::ARRAY_BONES];
+ Vector<float> warr = p_arrays[VS::ARRAY_WEIGHTS];
int vc = varr.size();
-
if (vc == 0)
return ret;
- int lformat = 0;
- PoolVector<Vector3>::Read rv;
+ int lformat = 0;
if (varr.size()) {
lformat |= VS::ARRAY_FORMAT_VERTEX;
- rv = varr.read();
}
- PoolVector<Vector3>::Read rn;
if (narr.size()) {
lformat |= VS::ARRAY_FORMAT_NORMAL;
- rn = narr.read();
}
- PoolVector<float>::Read rt;
if (tarr.size()) {
lformat |= VS::ARRAY_FORMAT_TANGENT;
- rt = tarr.read();
}
- PoolVector<Color>::Read rc;
if (carr.size()) {
lformat |= VS::ARRAY_FORMAT_COLOR;
- rc = carr.read();
}
-
- PoolVector<Vector2>::Read ruv;
if (uvarr.size()) {
lformat |= VS::ARRAY_FORMAT_TEX_UV;
- ruv = uvarr.read();
}
-
- PoolVector<Vector2>::Read ruv2;
if (uv2arr.size()) {
lformat |= VS::ARRAY_FORMAT_TEX_UV2;
- ruv2 = uv2arr.read();
}
-
- PoolVector<int>::Read rb;
if (barr.size()) {
lformat |= VS::ARRAY_FORMAT_BONES;
- rb = barr.read();
}
-
- PoolVector<float>::Read rw;
if (warr.size()) {
lformat |= VS::ARRAY_FORMAT_WEIGHTS;
- rw = warr.read();
}
for (int i = 0; i < vc; i++) {
-
Vertex v;
if (lformat & VS::ARRAY_FORMAT_VERTEX)
v.vertex = varr[i];
@@ -640,68 +610,46 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array
void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, List<int> *r_index, int &lformat) {
- PoolVector<Vector3> varr = arr[VS::ARRAY_VERTEX];
- PoolVector<Vector3> narr = arr[VS::ARRAY_NORMAL];
- PoolVector<float> tarr = arr[VS::ARRAY_TANGENT];
- PoolVector<Color> carr = arr[VS::ARRAY_COLOR];
- PoolVector<Vector2> uvarr = arr[VS::ARRAY_TEX_UV];
- PoolVector<Vector2> uv2arr = arr[VS::ARRAY_TEX_UV2];
- PoolVector<int> barr = arr[VS::ARRAY_BONES];
- PoolVector<float> warr = arr[VS::ARRAY_WEIGHTS];
+ Vector<Vector3> varr = arr[VS::ARRAY_VERTEX];
+ Vector<Vector3> narr = arr[VS::ARRAY_NORMAL];
+ Vector<float> tarr = arr[VS::ARRAY_TANGENT];
+ Vector<Color> carr = arr[VS::ARRAY_COLOR];
+ Vector<Vector2> uvarr = arr[VS::ARRAY_TEX_UV];
+ Vector<Vector2> uv2arr = arr[VS::ARRAY_TEX_UV2];
+ Vector<int> barr = arr[VS::ARRAY_BONES];
+ Vector<float> warr = arr[VS::ARRAY_WEIGHTS];
int vc = varr.size();
-
if (vc == 0)
return;
- lformat = 0;
- PoolVector<Vector3>::Read rv;
+ lformat = 0;
if (varr.size()) {
lformat |= VS::ARRAY_FORMAT_VERTEX;
- rv = varr.read();
}
- PoolVector<Vector3>::Read rn;
if (narr.size()) {
lformat |= VS::ARRAY_FORMAT_NORMAL;
- rn = narr.read();
}
- PoolVector<float>::Read rt;
if (tarr.size()) {
lformat |= VS::ARRAY_FORMAT_TANGENT;
- rt = tarr.read();
}
- PoolVector<Color>::Read rc;
if (carr.size()) {
lformat |= VS::ARRAY_FORMAT_COLOR;
- rc = carr.read();
}
-
- PoolVector<Vector2>::Read ruv;
if (uvarr.size()) {
lformat |= VS::ARRAY_FORMAT_TEX_UV;
- ruv = uvarr.read();
}
-
- PoolVector<Vector2>::Read ruv2;
if (uv2arr.size()) {
lformat |= VS::ARRAY_FORMAT_TEX_UV2;
- ruv2 = uv2arr.read();
}
-
- PoolVector<int>::Read rb;
if (barr.size()) {
lformat |= VS::ARRAY_FORMAT_BONES;
- rb = barr.read();
}
-
- PoolVector<float>::Read rw;
if (warr.size()) {
lformat |= VS::ARRAY_FORMAT_WEIGHTS;
- rw = warr.read();
}
for (int i = 0; i < vc; i++) {
-
Vertex v;
if (lformat & VS::ARRAY_FORMAT_VERTEX)
v.vertex = varr[i];
@@ -742,12 +690,12 @@ void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, Li
//indices
- PoolVector<int> idx = arr[VS::ARRAY_INDEX];
+ Vector<int> idx = arr[VS::ARRAY_INDEX];
int is = idx.size();
if (is) {
lformat |= VS::ARRAY_FORMAT_INDEX;
- PoolVector<int>::Read iarr = idx.read();
+ const int *iarr = idx.ptr();
for (int i = 0; i < is; i++) {
r_index->push_back(iarr[i]);
}
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp
index af55d2dde3..e291dcb67e 100644
--- a/scene/resources/text_file.cpp
+++ b/scene/resources/text_file.cpp
@@ -50,7 +50,7 @@ void TextFile::reload_from_file() {
Error TextFile::load_text(const String &p_path) {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
@@ -58,15 +58,15 @@ Error TextFile::load_text(const String &p_path) {
int len = f->get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
w[len] = 0;
String s;
- ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w.ptr()), ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
+ ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w), ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
text = s;
path = p_path;
return OK;
diff --git a/scene/resources/text_file.h b/scene/resources/text_file.h
index 76c80ba509..666c088d04 100644
--- a/scene/resources/text_file.h
+++ b/scene/resources/text_file.h
@@ -36,6 +36,8 @@
class TextFile : public Resource {
+ GDCLASS(TextFile, Resource);
+
private:
String text;
String path;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index ff9c786b4c..cb827c4b0b 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -363,7 +363,6 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit)
uint32_t mipmaps = f->get_32();
Image::Format format = Image::Format(f->get_32());
- print_line("format: " + itos(data_format) + " size " + Size2i(w, h) + " mipmaps: " + itos(mipmaps));
if (data_format == DATA_FORMAT_LOSSLESS || data_format == DATA_FORMAT_LOSSY || data_format == DATA_FORMAT_BASIS_UNIVERSAL) {
//look for a PNG or WEBP file inside
@@ -388,11 +387,11 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit)
continue;
}
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(size);
{
- PoolVector<uint8_t>::Write wr = pv.write();
- f->get_buffer(wr.ptr(), size);
+ uint8_t *wr = pv.ptrw();
+ f->get_buffer(wr, size);
}
Ref<Image> img;
@@ -405,7 +404,6 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit)
}
if (img.is_null() || img->empty()) {
- memdelete(f);
ERR_FAIL_COND_V(img.is_null() || img->empty(), Ref<Image>());
}
@@ -438,19 +436,19 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit)
} else {
//rarer use case, but needs to be supported
- PoolVector<uint8_t> img_data;
+ Vector<uint8_t> img_data;
img_data.resize(total_size);
{
- PoolVector<uint8_t>::Write wr = img_data.write();
+ uint8_t *wr = img_data.ptrw();
int ofs = 0;
for (int i = 0; i < mipmap_images.size(); i++) {
- PoolVector<uint8_t> id = mipmap_images[i]->get_data();
+ Vector<uint8_t> id = mipmap_images[i]->get_data();
int len = id.size();
- PoolVector<uint8_t>::Read r = id.read();
- copymem(&wr[ofs], r.ptr(), len);
+ const uint8_t *r = id.ptr();
+ copymem(&wr[ofs], r, len);
ofs += len;
}
}
@@ -474,12 +472,12 @@ Ref<Image> StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit)
continue; //oops, size limit enforced, go to next
}
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(size - ofs);
{
- PoolVector<uint8_t>::Write wr = data.write();
- f->get_buffer(wr.ptr(), data.size());
+ uint8_t *wr = data.ptrw();
+ f->get_buffer(wr, data.size());
}
Ref<Image> image;
@@ -798,7 +796,7 @@ StreamTexture::~StreamTexture() {
}
}
-RES ResourceFormatLoaderStreamTexture::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderStreamTexture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
Ref<StreamTexture> st;
st.instance();
@@ -1410,11 +1408,11 @@ void CurveTexture::ensure_default_setup(float p_min, float p_max) {
void CurveTexture::set_curve(Ref<Curve> p_curve) {
if (_curve != p_curve) {
if (_curve.is_valid()) {
- _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_update");
+ _curve->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveTexture::_update));
}
_curve = p_curve;
if (_curve.is_valid()) {
- _curve->connect(CoreStringNames::get_singleton()->changed, this, "_update");
+ _curve->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveTexture::_update));
}
_update();
}
@@ -1422,13 +1420,13 @@ void CurveTexture::set_curve(Ref<Curve> p_curve) {
void CurveTexture::_update() {
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(_width * sizeof(float));
// The array is locked in that scope
{
- PoolVector<uint8_t>::Write wd8 = data.write();
- float *wd = (float *)wd8.ptr();
+ uint8_t *wd8 = data.ptrw();
+ float *wd = (float *)wd8;
if (_curve.is_valid()) {
Curve &curve = **_curve;
@@ -1515,11 +1513,11 @@ void GradientTexture::set_gradient(Ref<Gradient> p_gradient) {
if (p_gradient == gradient)
return;
if (gradient.is_valid()) {
- gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_update");
+ gradient->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GradientTexture::_update));
}
gradient = p_gradient;
if (gradient.is_valid()) {
- gradient->connect(CoreStringNames::get_singleton()->changed, this, "_update");
+ gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GradientTexture::_update));
}
_update();
emit_changed();
@@ -1545,10 +1543,10 @@ void GradientTexture::_update() {
if (gradient.is_null())
return;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
data.resize(width * 4);
{
- PoolVector<uint8_t>::Write wd8 = data.write();
+ uint8_t *wd8 = data.ptrw();
Gradient &g = **gradient;
for (int i = 0; i < width; i++) {
@@ -1844,14 +1842,12 @@ void AnimatedTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_frame_delay", "frame", "delay"), &AnimatedTexture::set_frame_delay);
ClassDB::bind_method(D_METHOD("get_frame_delay", "frame"), &AnimatedTexture::get_frame_delay);
- ClassDB::bind_method(D_METHOD("_update_proxy"), &AnimatedTexture::_update_proxy);
-
ADD_PROPERTY(PropertyInfo(Variant::INT, "frames", PROPERTY_HINT_RANGE, "1," + itos(MAX_FRAMES), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_frames", "get_frames");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps");
for (int i = 0; i < MAX_FRAMES; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "frame_" + itos(i) + "/texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_texture", "get_frame_texture", i);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i);
}
BIND_CONSTANT(MAX_FRAMES);
@@ -1868,7 +1864,7 @@ AnimatedTexture::AnimatedTexture() {
fps = 4;
prev_ticks = 0;
current_frame = 0;
- VisualServer::get_singleton()->connect("frame_pre_draw", this, "_update_proxy");
+ VisualServer::get_singleton()->connect("frame_pre_draw", callable_mp(this, &AnimatedTexture::_update_proxy));
#ifndef NO_THREADS
rw_lock = RWLock::create();
@@ -2028,7 +2024,7 @@ TextureLayered::~TextureLayered() {
}
}
-RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error) {
+RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
@@ -2096,11 +2092,11 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
for (int i = 0; i < mipmaps; i++) {
uint32_t size = f->get_32();
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(size);
{
- PoolVector<uint8_t>::Write w = pv.write();
- f->get_buffer(w.ptr(), size);
+ uint8_t *w = pv.ptrw();
+ f->get_buffer(w, size);
}
Ref<Image> img = Image::lossless_unpacker(pv);
@@ -2123,19 +2119,19 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
} else {
int total_size = Image::get_image_data_size(tw, th, format, true);
- PoolVector<uint8_t> img_data;
+ Vector<uint8_t> img_data;
img_data.resize(total_size);
{
- PoolVector<uint8_t>::Write w = img_data.write();
+ uint8_t *w = img_data.ptrw();
int ofs = 0;
for (int i = 0; i < mipmap_images.size(); i++) {
- PoolVector<uint8_t> id = mipmap_images[i]->get_data();
+ Vector<uint8_t> id = mipmap_images[i]->get_data();
int len = id.size();
- PoolVector<uint8_t>::Read r = id.read();
- copymem(&w[ofs], r.ptr(), len);
+ const uint8_t *r = id.ptr();
+ copymem(&w[ofs], r, len);
ofs += len;
}
}
@@ -2157,12 +2153,12 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
int total_size = Image::get_image_data_size(tw, th, format, use_mipmaps);
- PoolVector<uint8_t> img_data;
+ Vector<uint8_t> img_data;
img_data.resize(total_size);
{
- PoolVector<uint8_t>::Write w = img_data.write();
- int bytes = f->get_buffer(w.ptr(), total_size);
+ uint8_t *w = img_data.ptrw();
+ int bytes = f->get_buffer(w, total_size);
if (bytes != total_size) {
if (r_error) {
*r_error = ERR_FILE_CORRUPT;
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index b42b770903..237c02a8cd 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -52,7 +52,7 @@ public:
class Texture2D : public Texture {
- GDCLASS(Texture2D, Resource);
+ GDCLASS(Texture2D, Texture);
OBJ_SAVE_TYPE(Texture2D); // Saves derived classes with common type so they can be interchanged.
protected:
@@ -213,7 +213,7 @@ public:
class ResourceFormatLoaderStreamTexture : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
@@ -350,7 +350,7 @@ public:
class TextureLayered : public Texture {
- GDCLASS(TextureLayered, Resource);
+ GDCLASS(TextureLayered, Texture);
VS::TextureLayeredType layered_type;
@@ -421,7 +421,7 @@ public:
COMPRESSION_UNCOMPRESSED
};
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 75903c1383..d67f5f9ff2 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -37,112 +37,112 @@ void Theme::_emit_theme_changed() {
emit_changed();
}
-PoolVector<String> Theme::_get_icon_list(const String &p_type) const {
+Vector<String> Theme::_get_icon_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_icon_list(p_type, &il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_stylebox_list(const String &p_type) const {
+Vector<String> Theme::_get_stylebox_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_stylebox_list(p_type, &il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_stylebox_types(void) const {
+Vector<String> Theme::_get_stylebox_types(void) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_stylebox_types(&il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_font_list(const String &p_type) const {
+Vector<String> Theme::_get_font_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_font_list(p_type, &il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_color_list(const String &p_type) const {
+Vector<String> Theme::_get_color_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_color_list(p_type, &il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_constant_list(const String &p_type) const {
+Vector<String> Theme::_get_constant_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_constant_list(p_type, &il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
return ilret;
}
-PoolVector<String> Theme::_get_type_list(const String &p_type) const {
+Vector<String> Theme::_get_type_list(const String &p_type) const {
- PoolVector<String> ilret;
+ Vector<String> ilret;
List<StringName> il;
get_type_list(&il);
ilret.resize(il.size());
int i = 0;
- PoolVector<String>::Write w = ilret.write();
+ String *w = ilret.ptrw();
for (List<StringName>::Element *E = il.front(); E; E = E->next(), i++) {
w[i] = E->get();
}
@@ -302,13 +302,13 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) {
return;
if (default_theme_font.is_valid()) {
- default_theme_font->disconnect("changed", this, "_emit_theme_changed");
+ default_theme_font->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
default_theme_font = p_default_font;
if (default_theme_font.is_valid()) {
- default_theme_font->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ default_theme_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
_change_notify();
@@ -366,13 +366,13 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_type, const R
bool new_value = !icon_map.has(p_type) || !icon_map[p_type].has(p_name);
if (icon_map[p_type].has(p_name) && icon_map[p_type][p_name].is_valid()) {
- icon_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ icon_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
icon_map[p_type][p_name] = p_icon;
if (p_icon.is_valid()) {
- icon_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ icon_map[p_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
if (new_value) {
@@ -401,7 +401,7 @@ void Theme::clear_icon(const StringName &p_name, const StringName &p_type) {
ERR_FAIL_COND(!icon_map[p_type].has(p_name));
if (icon_map[p_type][p_name].is_valid()) {
- icon_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ icon_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
icon_map[p_type].erase(p_name);
@@ -479,13 +479,13 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_type, con
bool new_value = !style_map.has(p_type) || !style_map[p_type].has(p_name);
if (style_map[p_type].has(p_name) && style_map[p_type][p_name].is_valid()) {
- style_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ style_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
style_map[p_type][p_name] = p_style;
if (p_style.is_valid()) {
- style_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ style_map[p_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
if (new_value)
@@ -514,7 +514,7 @@ void Theme::clear_stylebox(const StringName &p_name, const StringName &p_type) {
ERR_FAIL_COND(!style_map[p_type].has(p_name));
if (style_map[p_type][p_name].is_valid()) {
- style_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ style_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
style_map[p_type].erase(p_name);
@@ -554,13 +554,13 @@ void Theme::set_font(const StringName &p_name, const StringName &p_type, const R
bool new_value = !font_map.has(p_type) || !font_map[p_type].has(p_name);
if (font_map[p_type][p_name].is_valid()) {
- font_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ font_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
font_map[p_type][p_name] = p_font;
if (p_font.is_valid()) {
- font_map[p_type][p_name]->connect("changed", this, "_emit_theme_changed", varray(), CONNECT_REFERENCE_COUNTED);
+ font_map[p_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
if (new_value) {
@@ -589,7 +589,7 @@ void Theme::clear_font(const StringName &p_name, const StringName &p_type) {
ERR_FAIL_COND(!font_map[p_type].has(p_name));
if (font_map[p_type][p_name].is_valid()) {
- font_map[p_type][p_name]->disconnect("changed", this, "_emit_theme_changed");
+ font_map[p_type][p_name]->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
font_map[p_type].erase(p_name);
@@ -722,7 +722,7 @@ void Theme::clear() {
while ((L = icon_map[*K].next(L))) {
Ref<Texture2D> icon = icon_map[*K][*L];
if (icon.is_valid()) {
- icon->disconnect("changed", this, "_emit_theme_changed");
+ icon->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
}
}
@@ -735,7 +735,7 @@ void Theme::clear() {
while ((L = style_map[*K].next(L))) {
Ref<StyleBox> style = style_map[*K][*L];
if (style.is_valid()) {
- style->disconnect("changed", this, "_emit_theme_changed");
+ style->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
}
}
@@ -748,7 +748,7 @@ void Theme::clear() {
while ((L = font_map[*K].next(L))) {
Ref<Font> font = font_map[*K][*L];
if (font.is_valid()) {
- font->disconnect("changed", this, "_emit_theme_changed");
+ font->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed));
}
}
}
@@ -906,8 +906,6 @@ void Theme::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_type_list", "type"), &Theme::_get_type_list);
- ClassDB::bind_method(D_METHOD("_emit_theme_changed"), &Theme::_emit_theme_changed);
-
ClassDB::bind_method("copy_default_theme", &Theme::copy_default_theme);
ClassDB::bind_method(D_METHOD("copy_theme", "other"), &Theme::copy_theme);
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index e60734b144..3d01f71ea0 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -52,13 +52,13 @@ class Theme : public Resource {
HashMap<StringName, HashMap<StringName, Color> > color_map;
HashMap<StringName, HashMap<StringName, int> > constant_map;
- PoolVector<String> _get_icon_list(const String &p_type) const;
- PoolVector<String> _get_stylebox_list(const String &p_type) const;
- PoolVector<String> _get_stylebox_types(void) const;
- PoolVector<String> _get_font_list(const String &p_type) const;
- PoolVector<String> _get_color_list(const String &p_type) const;
- PoolVector<String> _get_constant_list(const String &p_type) const;
- PoolVector<String> _get_type_list(const String &p_type) const;
+ Vector<String> _get_icon_list(const String &p_type) const;
+ Vector<String> _get_stylebox_list(const String &p_type) const;
+ Vector<String> _get_stylebox_types(void) const;
+ Vector<String> _get_font_list(const String &p_type) const;
+ Vector<String> _get_color_list(const String &p_type) const;
+ Vector<String> _get_constant_list(const String &p_type) const;
+ Vector<String> _get_type_list(const String &p_type) const;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 7383e18473..f42b56bc83 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -360,7 +360,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "shape_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::OBJECT, pre + "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::BOOL, pre + "shape_one_way", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
- p_list->push_back(PropertyInfo(Variant::REAL, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "shapes", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::INT, pre + "z_index", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1", PROPERTY_USAGE_NOEDITOR));
}
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index f80fe9f791..407325c199 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -32,6 +32,7 @@
#include "core/vmap.h"
#include "servers/visual/shader_types.h"
+#include "visual_shader_nodes.h"
bool VisualShaderNode::is_simple_decl() const {
return simple_decl;
@@ -127,6 +128,7 @@ void VisualShaderNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("editor_refresh_request"));
BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR_INT);
BIND_ENUM_CONSTANT(PORT_TYPE_VECTOR);
BIND_ENUM_CONSTANT(PORT_TYPE_BOOLEAN);
BIND_ENUM_CONSTANT(PORT_TYPE_TRANSFORM);
@@ -266,14 +268,13 @@ void VisualShaderNodeCustom::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_name"));
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_description"));
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_subcategory"));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_return_icon_type"));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_count"));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_type", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_input_port_name", PropertyInfo(Variant::INT, "port")));
+ BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_input_port_name", PropertyInfo(Variant::INT, "port")));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_count"));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_type", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_output_port_name", PropertyInfo(Variant::INT, "port")));
+ BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_output_port_name", PropertyInfo(Variant::INT, "port")));
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_code", PropertyInfo(Variant::ARRAY, "input_vars"), PropertyInfo(Variant::ARRAY, "output_vars"), PropertyInfo(Variant::INT, "mode"), PropertyInfo(Variant::INT, "type")));
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_global_code", PropertyInfo(Variant::INT, "mode")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_highend"));
@@ -285,6 +286,49 @@ VisualShaderNodeCustom::VisualShaderNodeCustom() {
/////////////////////////////////////////////////////////
+void VisualShader::set_version(const String &p_version) {
+ version = p_version;
+}
+
+String VisualShader::get_version() const {
+ return version;
+}
+
+void VisualShader::update_version(const String &p_new_version) {
+ if (version == "") {
+ for (int i = 0; i < TYPE_MAX; i++) {
+ for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) {
+ Ref<VisualShaderNodeExpression> expression = Object::cast_to<VisualShaderNodeExpression>(E->get().node.ptr());
+ if (expression.is_valid()) {
+ for (int j = 0; j < expression->get_input_port_count(); j++) {
+ int type = expression->get_input_port_type(j);
+ if (type > 0) { // + PORT_TYPE_SCALAR_INT
+ type += 1;
+ }
+ expression->set_input_port_type(j, type);
+ }
+ for (int j = 0; j < expression->get_output_port_count(); j++) {
+ int type = expression->get_output_port_type(j);
+ if (type > 0) { // + PORT_TYPE_SCALAR_INT
+ type += 1;
+ }
+ expression->set_output_port_type(j, type);
+ }
+ }
+ Ref<VisualShaderNodeCompare> compare = Object::cast_to<VisualShaderNodeCompare>(E->get().node.ptr());
+ if (compare.is_valid()) {
+ int ctype = int(compare->get_comparison_type());
+ if (int(ctype) > 0) { // + PORT_TYPE_SCALAR_INT
+ ctype += 1;
+ }
+ compare->set_comparison_type(VisualShaderNodeCompare::ComparisonType(ctype));
+ }
+ }
+ }
+ }
+ set_version(p_new_version);
+}
+
void VisualShader::add_node(Type p_type, const Ref<VisualShaderNode> &p_node, const Vector2 &p_position, int p_id) {
ERR_FAIL_COND(p_node.is_null());
ERR_FAIL_COND(p_id < 2);
@@ -305,10 +349,10 @@ void VisualShader::add_node(Type p_type, const Ref<VisualShaderNode> &p_node, co
if (input.is_valid()) {
input->shader_mode = shader_mode;
input->shader_type = p_type;
- input->connect("input_type_changed", this, "_input_type_changed", varray(p_type, p_id));
+ input->connect("input_type_changed", callable_mp(this, &VisualShader::_input_type_changed), varray(p_type, p_id));
}
- n.node->connect("changed", this, "_queue_update");
+ n.node->connect("changed", callable_mp(this, &VisualShader::_queue_update));
Ref<VisualShaderNodeCustom> custom = n.node;
if (custom.is_valid()) {
@@ -375,10 +419,10 @@ void VisualShader::remove_node(Type p_type, int p_id) {
Ref<VisualShaderNodeInput> input = g->nodes[p_id].node;
if (input.is_valid()) {
- input->disconnect("input_type_changed", this, "_input_type_changed");
+ input->disconnect("input_type_changed", callable_mp(this, &VisualShader::_input_type_changed));
}
- g->nodes[p_id].node->disconnect("changed", this, "_queue_update");
+ g->nodes[p_id].node->disconnect("changed", callable_mp(this, &VisualShader::_queue_update));
g->nodes.erase(p_id);
@@ -470,7 +514,7 @@ bool VisualShader::can_connect_nodes(Type p_type, int p_from_node, int p_from_po
}
bool VisualShader::is_port_types_compatible(int p_a, int p_b) const {
- return MAX(0, p_a - 2) == (MAX(0, p_b - 2));
+ return MAX(0, p_a - 3) == (MAX(0, p_b - 3));
}
void VisualShader::connect_nodes_forced(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) {
@@ -698,9 +742,11 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port
ERR_FAIL_COND_V(err != OK, String());
if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR) {
- code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " );\n";
+ code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " );\n";
+ } else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ code += "\tCOLOR.rgb = vec3(float(n_out" + itos(p_node) + "p" + itos(p_port) + "));\n";
} else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_BOOLEAN) {
- code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0 );\n";
+ code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0);\n";
} else {
code += "\tCOLOR.rgb = n_out" + itos(p_node) + "p" + itos(p_port) + ";\n";
}
@@ -985,8 +1031,8 @@ bool VisualShader::_get(const StringName &p_name, Variant &r_ret) const {
}
return false;
}
-void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
+void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
//mode
p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Spatial,CanvasItem,Particles"));
//render modes
@@ -995,7 +1041,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
Set<String> toggles;
for (int i = 0; i < ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode)).size(); i++) {
-
String mode = ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode))[i];
int idx = 0;
bool in_enum = false;
@@ -1020,7 +1065,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
}
for (Map<String, String>::Element *E = blend_mode_enums.front(); E; E = E->next()) {
-
p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E->key(), PROPERTY_HINT_ENUM, E->get()));
}
@@ -1050,7 +1094,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::STRING, prop_name + "/expression", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
}
- p_list->push_back(PropertyInfo(Variant::POOL_INT_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
}
@@ -1113,24 +1157,40 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
inputs[i] = src_var;
} else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
inputs[i] = "dot(" + src_var + ", vec3(0.333333, 0.333333, 0.333333))";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
+ inputs[i] = "dot(float(" + src_var + "), vec3(0.333333, 0.333333, 0.333333))";
} else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
inputs[i] = "vec3(" + src_var + ")";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = "vec3(float(" + src_var + "))";
} else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
inputs[i] = "all(bvec3(" + src_var + "))";
} else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
inputs[i] = src_var + " > 0.0 ? true : false";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = src_var + " > 0 ? true : false";
} else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
inputs[i] = src_var + " ? 1.0 : 0.0";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
+ inputs[i] = src_var + " ? 1 : 0";
} else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
inputs[i] = "vec3(" + src_var + " ? 1.0 : 0.0)";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = "float(" + src_var + ")";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
+ inputs[i] = "int(" + src_var + ")";
}
} else {
Variant defval = vsnode->get_input_port_default_value(i);
- if (defval.get_type() == Variant::REAL || defval.get_type() == Variant::INT) {
+ if (defval.get_type() == Variant::FLOAT) {
float val = defval;
inputs[i] = "n_in" + itos(node) + "p" + itos(i);
code += "\tfloat " + inputs[i] + " = " + vformat("%.5f", val) + ";\n";
+ } else if (defval.get_type() == Variant::INT) {
+ int val = defval;
+ inputs[i] = "n_in" + itos(node) + "p" + itos(i);
+ code += "\tint " + inputs[i] + " = " + itos(val) + ";\n";
} else if (defval.get_type() == Variant::BOOL) {
bool val = defval;
inputs[i] = "n_in" + itos(node) + "p" + itos(i);
@@ -1170,6 +1230,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
String var_name = "n_out" + itos(node) + "p" + itos(i);
switch (vsnode->get_output_port_type(i)) {
case VisualShaderNode::PORT_TYPE_SCALAR: outputs[i] = "float " + var_name; break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT: outputs[i] = "int " + var_name; break;
case VisualShaderNode::PORT_TYPE_VECTOR: outputs[i] = "vec3 " + var_name; break;
case VisualShaderNode::PORT_TYPE_BOOLEAN: outputs[i] = "bool " + var_name; break;
case VisualShaderNode::PORT_TYPE_TRANSFORM: outputs[i] = "mat4 " + var_name; break;
@@ -1183,6 +1244,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
outputs[i] = "n_out" + itos(node) + "p" + itos(i);
switch (vsnode->get_output_port_type(i)) {
case VisualShaderNode::PORT_TYPE_SCALAR: code += String() + "\tfloat " + outputs[i] + ";\n"; break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT: code += String() + "\tint " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_VECTOR: code += String() + "\tvec3 " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_BOOLEAN: code += String() + "\tbool " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_TRANSFORM: code += String() + "\tmat4 " + outputs[i] + ";\n"; break;
@@ -1412,15 +1474,16 @@ void VisualShader::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_node_connections", "type"), &VisualShader::_get_node_connections);
+ ClassDB::bind_method(D_METHOD("set_version", "version"), &VisualShader::set_version);
+ ClassDB::bind_method(D_METHOD("get_version"), &VisualShader::get_version);
+
ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &VisualShader::set_graph_offset);
ClassDB::bind_method(D_METHOD("get_graph_offset"), &VisualShader::get_graph_offset);
- ClassDB::bind_method(D_METHOD("_queue_update"), &VisualShader::_queue_update);
ClassDB::bind_method(D_METHOD("_update_shader"), &VisualShader::_update_shader);
- ClassDB::bind_method(D_METHOD("_input_type_changed"), &VisualShader::_input_type_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_graph_offset", "get_graph_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "version", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_version", "get_version");
BIND_ENUM_CONSTANT(TYPE_VERTEX);
BIND_ENUM_CONSTANT(TYPE_FRAGMENT);
@@ -1576,7 +1639,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "delta", "DELTA" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "lifetime", "LIFETIME" },
- { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "index", "float(INDEX)" },
+ { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR_INT, "index", "INDEX" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_TRANSFORM, "emission_transform", "EMISSION_TRANSFORM" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "time", "TIME" },
@@ -1684,17 +1747,20 @@ String VisualShaderNodeInput::generate_code(Shader::Mode p_mode, VisualShader::T
switch (get_output_port_type(0)) {
case PORT_TYPE_SCALAR: {
code = "\t" + p_output_vars[0] + " = 0.0;\n";
- } break; //default (none found) is scalar
+ } break;
+ case PORT_TYPE_SCALAR_INT: {
+ code = "\t" + p_output_vars[0] + " = 0;\n";
+ } break;
case PORT_TYPE_VECTOR: {
code = "\t" + p_output_vars[0] + " = vec3(0.0);\n";
- } break; //default (none found) is scalar
+ } break;
case PORT_TYPE_TRANSFORM: {
code = "\t" + p_output_vars[0] + " = mat4( vec4(1.0,0.0,0.0,0.0), vec4(0.0,1.0,0.0,0.0), vec4(0.0,0.0,1.0,0.0), vec4(0.0,0.0,0.0,1.0) );\n";
- } break; //default (none found) is scalar
+ } break;
case PORT_TYPE_BOOLEAN: {
code = "\t" + p_output_vars[0] + " = false;\n";
} break;
- default:
+ default: //default (none found) is scalar
break;
}
}
@@ -1847,7 +1913,7 @@ void VisualShaderNodeInput::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_input_name"), &VisualShaderNodeInput::get_input_name);
ClassDB::bind_method(D_METHOD("get_input_real_name"), &VisualShaderNodeInput::get_input_real_name);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "input_name", PROPERTY_HINT_ENUM, ""), "set_input_name", "get_input_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "input_name", PROPERTY_HINT_ENUM, ""), "set_input_name", "get_input_name");
ADD_SIGNAL(MethodInfo("input_type_changed"));
}
VisualShaderNodeInput::VisualShaderNodeInput() {
@@ -2047,7 +2113,7 @@ void VisualShaderNodeUniform::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_uniform_name", "name"), &VisualShaderNodeUniform::set_uniform_name);
ClassDB::bind_method(D_METHOD("get_uniform_name"), &VisualShaderNodeUniform::get_uniform_name);
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "uniform_name"), "set_uniform_name", "get_uniform_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "uniform_name"), "set_uniform_name", "get_uniform_name");
}
VisualShaderNodeUniform::VisualShaderNodeUniform() {
@@ -2626,6 +2692,9 @@ String VisualShaderNodeExpression::generate_code(Shader::Mode p_mode, VisualShad
case PORT_TYPE_SCALAR:
tk = "0.0";
break;
+ case PORT_TYPE_SCALAR_INT:
+ tk = "0";
+ break;
case PORT_TYPE_VECTOR:
tk = "vec3(0.0, 0.0, 0.0)";
break;
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 1ee75a4cb7..450dcfa081 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -41,6 +41,10 @@ class VisualShaderNode;
class VisualShader : public Shader {
GDCLASS(VisualShader, Shader);
+ friend class VisualShaderNodeVersionChecker;
+
+ String version = "";
+
public:
enum Type {
TYPE_VERTEX,
@@ -118,6 +122,11 @@ protected:
void _get_property_list(List<PropertyInfo> *p_list) const;
public:
+ void set_version(const String &p_version);
+ String get_version() const;
+
+ void update_version(const String &p_new_version);
+
enum {
NODE_ID_INVALID = -1,
NODE_ID_OUTPUT = 0,
@@ -182,6 +191,7 @@ protected:
public:
enum PortType {
PORT_TYPE_SCALAR,
+ PORT_TYPE_SCALAR_INT,
PORT_TYPE_VECTOR,
PORT_TYPE_BOOLEAN,
PORT_TYPE_TRANSFORM,
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index 95a8155c31..2064ca10f3 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -30,66 +30,127 @@
#include "visual_shader_nodes.h"
-////////////// Scalar
+////////////// Scalar(Float)
-String VisualShaderNodeScalarConstant::get_caption() const {
- return "Scalar";
+String VisualShaderNodeFloatConstant::get_caption() const {
+ return "ScalarFloat";
}
-int VisualShaderNodeScalarConstant::get_input_port_count() const {
+int VisualShaderNodeFloatConstant::get_input_port_count() const {
return 0;
}
-VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarConstant::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatConstant::get_input_port_name(int p_port) const {
return String();
}
-int VisualShaderNodeScalarConstant::get_output_port_count() const {
+int VisualShaderNodeFloatConstant::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarConstant::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatConstant::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + vformat("%.6f", constant) + ";\n";
}
-void VisualShaderNodeScalarConstant::set_constant(float p_value) {
+void VisualShaderNodeFloatConstant::set_constant(float p_value) {
constant = p_value;
emit_changed();
}
-float VisualShaderNodeScalarConstant::get_constant() const {
+float VisualShaderNodeFloatConstant::get_constant() const {
return constant;
}
-Vector<StringName> VisualShaderNodeScalarConstant::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatConstant::get_editable_properties() const {
Vector<StringName> props;
props.push_back("constant");
return props;
}
-void VisualShaderNodeScalarConstant::_bind_methods() {
+void VisualShaderNodeFloatConstant::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeScalarConstant::set_constant);
- ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeScalarConstant::get_constant);
+ ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeFloatConstant::set_constant);
+ ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeFloatConstant::get_constant);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant"), "set_constant", "get_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant"), "set_constant", "get_constant");
}
-VisualShaderNodeScalarConstant::VisualShaderNodeScalarConstant() {
+VisualShaderNodeFloatConstant::VisualShaderNodeFloatConstant() {
+ constant = 0.0;
+}
+
+////////////// Scalar(Int)
+
+String VisualShaderNodeIntConstant::get_caption() const {
+ return "ScalarInt";
+}
+
+int VisualShaderNodeIntConstant::get_input_port_count() const {
+ return 0;
+}
+
+VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntConstant::get_input_port_name(int p_port) const {
+ return String();
+}
+
+int VisualShaderNodeIntConstant::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntConstant::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = " + itos(constant) + ";\n";
+}
+
+void VisualShaderNodeIntConstant::set_constant(int p_value) {
+ constant = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntConstant::get_constant() const {
+ return constant;
+}
+
+Vector<StringName> VisualShaderNodeIntConstant::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("constant");
+ return props;
+}
+
+void VisualShaderNodeIntConstant::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeIntConstant::set_constant);
+ ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeIntConstant::get_constant);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "constant"), "set_constant", "get_constant");
+}
+
+VisualShaderNodeIntConstant::VisualShaderNodeIntConstant() {
constant = 0;
}
@@ -936,37 +997,37 @@ VisualShaderNodeCubemap::VisualShaderNodeCubemap() {
simple_decl = false;
}
-////////////// Scalar Op
+////////////// Float Op
-String VisualShaderNodeScalarOp::get_caption() const {
- return "ScalarOp";
+String VisualShaderNodeFloatOp::get_caption() const {
+ return "FloatOp";
}
-int VisualShaderNodeScalarOp::get_input_port_count() const {
+int VisualShaderNodeFloatOp::get_input_port_count() const {
return 2;
}
-VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarOp::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatOp::get_input_port_name(int p_port) const {
return p_port == 0 ? "a" : "b";
}
-int VisualShaderNodeScalarOp::get_output_port_count() const {
+int VisualShaderNodeFloatOp::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarOp::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatOp::get_output_port_name(int p_port) const {
return "op"; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
String code = "\t" + p_output_vars[0] + " = ";
switch (op) {
@@ -986,27 +1047,27 @@ String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader
return code;
}
-void VisualShaderNodeScalarOp::set_operator(Operator p_op) {
+void VisualShaderNodeFloatOp::set_operator(Operator p_op) {
op = p_op;
emit_changed();
}
-VisualShaderNodeScalarOp::Operator VisualShaderNodeScalarOp::get_operator() const {
+VisualShaderNodeFloatOp::Operator VisualShaderNodeFloatOp::get_operator() const {
return op;
}
-Vector<StringName> VisualShaderNodeScalarOp::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatOp::get_editable_properties() const {
Vector<StringName> props;
props.push_back("operator");
return props;
}
-void VisualShaderNodeScalarOp::_bind_methods() {
+void VisualShaderNodeFloatOp::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeScalarOp::set_operator);
- ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeScalarOp::get_operator);
+ ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeFloatOp::set_operator);
+ ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeFloatOp::get_operator);
ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Power,Max,Min,Atan2,Step"), "set_operator", "get_operator");
@@ -1022,12 +1083,97 @@ void VisualShaderNodeScalarOp::_bind_methods() {
BIND_ENUM_CONSTANT(OP_STEP);
}
-VisualShaderNodeScalarOp::VisualShaderNodeScalarOp() {
+VisualShaderNodeFloatOp::VisualShaderNodeFloatOp() {
op = OP_ADD;
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
}
+////////////// Integer Op
+
+String VisualShaderNodeIntOp::get_caption() const {
+ return "IntOp";
+}
+
+int VisualShaderNodeIntOp::get_input_port_count() const {
+ return 2;
+}
+
+VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntOp::get_input_port_name(int p_port) const {
+ return p_port == 0 ? "a" : "b";
+}
+
+int VisualShaderNodeIntOp::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntOp::get_output_port_name(int p_port) const {
+ return "op"; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+
+ String code = "\t" + p_output_vars[0] + " = ";
+ switch (op) {
+
+ case OP_ADD: code += p_input_vars[0] + " + " + p_input_vars[1] + ";\n"; break;
+ case OP_SUB: code += p_input_vars[0] + " - " + p_input_vars[1] + ";\n"; break;
+ case OP_MUL: code += p_input_vars[0] + " * " + p_input_vars[1] + ";\n"; break;
+ case OP_DIV: code += p_input_vars[0] + " / " + p_input_vars[1] + ";\n"; break;
+ case OP_MOD: code += p_input_vars[0] + " % " + p_input_vars[1] + ";\n"; break;
+ case OP_MAX: code += "max(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break;
+ case OP_MIN: code += "min(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break;
+ }
+
+ return code;
+}
+
+void VisualShaderNodeIntOp::set_operator(Operator p_op) {
+
+ op = p_op;
+ emit_changed();
+}
+
+VisualShaderNodeIntOp::Operator VisualShaderNodeIntOp::get_operator() const {
+ return op;
+}
+
+Vector<StringName> VisualShaderNodeIntOp::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("operator");
+ return props;
+}
+
+void VisualShaderNodeIntOp::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeIntOp::set_operator);
+ ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeIntOp::get_operator);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Max,Min"), "set_operator", "get_operator");
+
+ BIND_ENUM_CONSTANT(OP_ADD);
+ BIND_ENUM_CONSTANT(OP_SUB);
+ BIND_ENUM_CONSTANT(OP_MUL);
+ BIND_ENUM_CONSTANT(OP_DIV);
+ BIND_ENUM_CONSTANT(OP_MOD);
+ BIND_ENUM_CONSTANT(OP_MAX);
+ BIND_ENUM_CONSTANT(OP_MIN);
+}
+
+VisualShaderNodeIntOp::VisualShaderNodeIntOp() {
+ op = OP_ADD;
+ set_input_port_default_value(0, 0);
+ set_input_port_default_value(1, 0);
+}
+
////////////// Vector Op
String VisualShaderNodeVectorOp::get_caption() const {
@@ -1462,37 +1608,37 @@ VisualShaderNodeTransformVecMult::VisualShaderNodeTransformVecMult() {
set_input_port_default_value(1, Vector3());
}
-////////////// Scalar Func
+////////////// Float Func
-String VisualShaderNodeScalarFunc::get_caption() const {
- return "ScalarFunc";
+String VisualShaderNodeFloatFunc::get_caption() const {
+ return "FloatFunc";
}
-int VisualShaderNodeScalarFunc::get_input_port_count() const {
+int VisualShaderNodeFloatFunc::get_input_port_count() const {
return 1;
}
-VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarFunc::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatFunc::get_input_port_name(int p_port) const {
return "";
}
-int VisualShaderNodeScalarFunc::get_output_port_count() const {
+int VisualShaderNodeFloatFunc::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarFunc::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatFunc::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
static const char *scalar_func_id[FUNC_ONEMINUS + 1] = {
"sin($)",
@@ -1532,27 +1678,27 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad
return "\t" + p_output_vars[0] + " = " + String(scalar_func_id[func]).replace("$", p_input_vars[0]) + ";\n";
}
-void VisualShaderNodeScalarFunc::set_function(Function p_func) {
+void VisualShaderNodeFloatFunc::set_function(Function p_func) {
func = p_func;
emit_changed();
}
-VisualShaderNodeScalarFunc::Function VisualShaderNodeScalarFunc::get_function() const {
+VisualShaderNodeFloatFunc::Function VisualShaderNodeFloatFunc::get_function() const {
return func;
}
-Vector<StringName> VisualShaderNodeScalarFunc::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatFunc::get_editable_properties() const {
Vector<StringName> props;
props.push_back("function");
return props;
}
-void VisualShaderNodeScalarFunc::_bind_methods() {
+void VisualShaderNodeFloatFunc::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeScalarFunc::set_function);
- ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeScalarFunc::get_function);
+ ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeFloatFunc::set_function);
+ ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeFloatFunc::get_function);
ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Sin,Cos,Tan,ASin,ACos,ATan,SinH,CosH,TanH,Log,Exp,Sqrt,Abs,Sign,Floor,Round,Ceil,Frac,Saturate,Negate,ACosH,ASinH,ATanH,Degrees,Exp2,InverseSqrt,Log2,Radians,Reciprocal,RoundEven,Trunc,OneMinus"), "set_function", "get_function");
@@ -1590,11 +1736,108 @@ void VisualShaderNodeScalarFunc::_bind_methods() {
BIND_ENUM_CONSTANT(FUNC_ONEMINUS);
}
-VisualShaderNodeScalarFunc::VisualShaderNodeScalarFunc() {
+VisualShaderNodeFloatFunc::VisualShaderNodeFloatFunc() {
func = FUNC_SIGN;
set_input_port_default_value(0, 0.0);
}
+////////////// Int Func
+
+String VisualShaderNodeIntFunc::get_caption() const {
+ return "IntFunc";
+}
+
+int VisualShaderNodeIntFunc::get_input_port_count() const {
+ if (func == FUNC_CLAMP) {
+ return 3;
+ }
+ return 1;
+}
+
+VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntFunc::get_input_port_name(int p_port) const {
+ if (func == FUNC_CLAMP) {
+ if (p_port == 0) {
+ return "";
+ } else if (p_port == 1) {
+ return "min";
+ } else if (p_port == 2) {
+ return "max";
+ }
+ }
+ return "";
+}
+
+int VisualShaderNodeIntFunc::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntFunc::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ if (func == FUNC_CLAMP) {
+ return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ }
+
+ static const char *int_func_id[FUNC_SIGN + 1] = {
+ "abs($)",
+ "",
+ "-($)",
+ "sign($)"
+ };
+
+ return "\t" + p_output_vars[0] + " = " + String(int_func_id[func]).replace("$", p_input_vars[0]) + ";\n";
+}
+
+void VisualShaderNodeIntFunc::set_function(Function p_func) {
+ if (func != p_func) {
+ if (p_func == FUNC_CLAMP) {
+ set_input_port_default_value(1, 0);
+ set_input_port_default_value(2, 0);
+ }
+ }
+ func = p_func;
+ emit_changed();
+}
+
+VisualShaderNodeIntFunc::Function VisualShaderNodeIntFunc::get_function() const {
+
+ return func;
+}
+
+Vector<StringName> VisualShaderNodeIntFunc::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("function");
+ return props;
+}
+
+void VisualShaderNodeIntFunc::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeIntFunc::set_function);
+ ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeIntFunc::get_function);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Abs,Clamp,Negate,Sign"), "set_function", "get_function");
+
+ BIND_ENUM_CONSTANT(FUNC_ABS);
+ BIND_ENUM_CONSTANT(FUNC_CLAMP);
+ BIND_ENUM_CONSTANT(FUNC_NEGATE);
+ BIND_ENUM_CONSTANT(FUNC_SIGN);
+}
+
+VisualShaderNodeIntFunc::VisualShaderNodeIntFunc() {
+ func = FUNC_SIGN;
+ set_input_port_default_value(0, 0);
+}
+
////////////// Vector Func
String VisualShaderNodeVectorFunc::get_caption() const {
@@ -3008,37 +3251,37 @@ VisualShaderNodeTransformDecompose::VisualShaderNodeTransformDecompose() {
set_input_port_default_value(0, Transform());
}
-////////////// Scalar Uniform
+////////////// Float Uniform
-String VisualShaderNodeScalarUniform::get_caption() const {
- return "ScalarUniform";
+String VisualShaderNodeFloatUniform::get_caption() const {
+ return "FloatUniform";
}
-int VisualShaderNodeScalarUniform::get_input_port_count() const {
+int VisualShaderNodeFloatUniform::get_input_port_count() const {
return 0;
}
-VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarUniform::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatUniform::get_input_port_name(int p_port) const {
return String();
}
-int VisualShaderNodeScalarUniform::get_output_port_count() const {
+int VisualShaderNodeFloatUniform::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarUniform::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatUniform::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
+String VisualShaderNodeFloatUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
if (hint == HINT_RANGE) {
return "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
} else if (hint == HINT_RANGE_STEP) {
@@ -3047,70 +3290,70 @@ String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, Visua
return "uniform float " + get_uniform_name() + ";\n";
}
-String VisualShaderNodeScalarUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
}
-void VisualShaderNodeScalarUniform::set_hint(Hint p_hint) {
+void VisualShaderNodeFloatUniform::set_hint(Hint p_hint) {
hint = p_hint;
emit_changed();
}
-VisualShaderNodeScalarUniform::Hint VisualShaderNodeScalarUniform::get_hint() const {
+VisualShaderNodeFloatUniform::Hint VisualShaderNodeFloatUniform::get_hint() const {
return hint;
}
-void VisualShaderNodeScalarUniform::set_min(float p_value) {
+void VisualShaderNodeFloatUniform::set_min(float p_value) {
hint_range_min = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_min() const {
+float VisualShaderNodeFloatUniform::get_min() const {
return hint_range_min;
}
-void VisualShaderNodeScalarUniform::set_max(float p_value) {
+void VisualShaderNodeFloatUniform::set_max(float p_value) {
hint_range_max = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_max() const {
+float VisualShaderNodeFloatUniform::get_max() const {
return hint_range_max;
}
-void VisualShaderNodeScalarUniform::set_step(float p_value) {
+void VisualShaderNodeFloatUniform::set_step(float p_value) {
hint_range_step = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_step() const {
+float VisualShaderNodeFloatUniform::get_step() const {
return hint_range_step;
}
-void VisualShaderNodeScalarUniform::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeScalarUniform::set_hint);
- ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeScalarUniform::get_hint);
+void VisualShaderNodeFloatUniform::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeFloatUniform::set_hint);
+ ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeFloatUniform::get_hint);
- ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeScalarUniform::set_min);
- ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeScalarUniform::get_min);
+ ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeFloatUniform::set_min);
+ ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeFloatUniform::get_min);
- ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeScalarUniform::set_max);
- ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeScalarUniform::get_max);
+ ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeFloatUniform::set_max);
+ ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeFloatUniform::get_max);
- ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeScalarUniform::set_step);
- ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeScalarUniform::get_step);
+ ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeFloatUniform::set_step);
+ ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeFloatUniform::get_step);
ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min"), "set_min", "get_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max"), "set_max", "get_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step");
BIND_ENUM_CONSTANT(HINT_NONE);
BIND_ENUM_CONSTANT(HINT_RANGE);
BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
}
-Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatUniform::get_editable_properties() const {
Vector<StringName> props;
props.push_back("hint");
if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
@@ -3123,13 +3366,135 @@ Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() cons
return props;
}
-VisualShaderNodeScalarUniform::VisualShaderNodeScalarUniform() {
+VisualShaderNodeFloatUniform::VisualShaderNodeFloatUniform() {
hint = HINT_NONE;
hint_range_min = 0.0;
hint_range_max = 1.0;
hint_range_step = 0.1;
}
+////////////// Integer Uniform
+
+String VisualShaderNodeIntUniform::get_caption() const {
+ return "IntUniform";
+}
+
+int VisualShaderNodeIntUniform::get_input_port_count() const {
+ return 0;
+}
+
+VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntUniform::get_input_port_name(int p_port) const {
+ return String();
+}
+
+int VisualShaderNodeIntUniform::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntUniform::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
+ if (hint == HINT_RANGE) {
+ return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
+ } else if (hint == HINT_RANGE_STEP) {
+ return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
+ }
+ return "uniform int " + get_uniform_name() + ";\n";
+}
+
+String VisualShaderNodeIntUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
+}
+
+void VisualShaderNodeIntUniform::set_hint(Hint p_hint) {
+ hint = p_hint;
+ emit_changed();
+}
+
+VisualShaderNodeIntUniform::Hint VisualShaderNodeIntUniform::get_hint() const {
+ return hint;
+}
+
+void VisualShaderNodeIntUniform::set_min(int p_value) {
+ hint_range_min = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_min() const {
+ return hint_range_min;
+}
+
+void VisualShaderNodeIntUniform::set_max(int p_value) {
+ hint_range_max = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_max() const {
+ return hint_range_max;
+}
+
+void VisualShaderNodeIntUniform::set_step(int p_value) {
+ hint_range_step = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_step() const {
+ return hint_range_step;
+}
+
+void VisualShaderNodeIntUniform::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeIntUniform::set_hint);
+ ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeIntUniform::get_hint);
+
+ ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeIntUniform::set_min);
+ ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeIntUniform::get_min);
+
+ ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeIntUniform::set_max);
+ ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeIntUniform::get_max);
+
+ ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeIntUniform::set_step);
+ ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeIntUniform::get_step);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "min"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "step"), "set_step", "get_step");
+
+ BIND_ENUM_CONSTANT(HINT_NONE);
+ BIND_ENUM_CONSTANT(HINT_RANGE);
+ BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
+}
+
+Vector<StringName> VisualShaderNodeIntUniform::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("hint");
+ if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
+ props.push_back("min");
+ props.push_back("max");
+ }
+ if (hint == HINT_RANGE_STEP) {
+ props.push_back("step");
+ }
+ return props;
+}
+
+VisualShaderNodeIntUniform::VisualShaderNodeIntUniform() {
+ hint = HINT_NONE;
+ hint_range_min = 0;
+ hint_range_max = 100;
+ hint_range_step = 1;
+}
+
////////////// Boolean Uniform
String VisualShaderNodeBooleanUniform::get_caption() const {
@@ -3968,6 +4333,8 @@ VisualShaderNodeCompare::PortType VisualShaderNodeCompare::get_input_port_type(i
switch (ctype) {
case CTYPE_SCALAR:
return PORT_TYPE_SCALAR;
+ case CTYPE_SCALAR_INT:
+ return PORT_TYPE_SCALAR_INT;
case CTYPE_VECTOR:
return PORT_TYPE_VECTOR;
case CTYPE_BOOLEAN:
@@ -4046,10 +4413,14 @@ String VisualShaderNodeCompare::generate_code(Shader::Mode p_mode, VisualShader:
} else if (func == FUNC_NOT_EQUAL) {
code += "\t" + p_output_vars[0] + " = !(abs(" + p_input_vars[0] + " - " + p_input_vars[1] + ") < " + p_input_vars[2] + ");";
} else {
- code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + "$" + p_input_vars[1]).replace("$", ops[func]) + ";\n";
+ code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n";
}
break;
+ case CTYPE_SCALAR_INT:
+ code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n";
+ break;
+
case CTYPE_VECTOR:
code += "\t{\n";
code += "\t\tbvec3 _bv = " + String(funcs[func]).replace("$", p_input_vars[0] + ", " + p_input_vars[1]) + ";\n";
@@ -4085,6 +4456,11 @@ void VisualShaderNodeCompare::set_comparison_type(ComparisonType p_type) {
set_input_port_default_value(1, 0.0);
simple_decl = true;
break;
+ case CTYPE_SCALAR_INT:
+ set_input_port_default_value(0, 0);
+ set_input_port_default_value(1, 0);
+ simple_decl = true;
+ break;
case CTYPE_VECTOR:
set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
@@ -4151,11 +4527,12 @@ void VisualShaderNodeCompare::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_condition", "condition"), &VisualShaderNodeCompare::set_condition);
ClassDB::bind_method(D_METHOD("get_condition"), &VisualShaderNodeCompare::get_condition);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Scalar,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Float,Int,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type");
ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "a == b,a != b,a > b,a >= b,a < b,a <= b"), "set_function", "get_function");
ADD_PROPERTY(PropertyInfo(Variant::INT, "condition", PROPERTY_HINT_ENUM, "All,Any"), "set_condition", "get_condition");
BIND_ENUM_CONSTANT(CTYPE_SCALAR);
+ BIND_ENUM_CONSTANT(CTYPE_SCALAR_INT);
BIND_ENUM_CONSTANT(CTYPE_VECTOR);
BIND_ENUM_CONSTANT(CTYPE_BOOLEAN);
BIND_ENUM_CONSTANT(CTYPE_TRANSFORM);
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index 85782bc509..035e39230c 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -37,8 +37,8 @@
/// CONSTANTS
///////////////////////////////////////
-class VisualShaderNodeScalarConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarConstant, VisualShaderNode);
+class VisualShaderNodeFloatConstant : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatConstant, VisualShaderNode);
float constant;
protected:
@@ -62,7 +62,37 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarConstant();
+ VisualShaderNodeFloatConstant();
+};
+
+///////////////////////////////////////
+
+class VisualShaderNodeIntConstant : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntConstant, VisualShaderNode);
+ int constant;
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_constant(int p_value);
+ int get_constant() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntConstant();
};
///////////////////////////////////////
@@ -314,8 +344,8 @@ VARIANT_ENUM_CAST(VisualShaderNodeCubemap::Source)
/// OPS
///////////////////////////////////////
-class VisualShaderNodeScalarOp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarOp, VisualShaderNode);
+class VisualShaderNodeFloatOp : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatOp, VisualShaderNode);
public:
enum Operator {
@@ -354,10 +384,52 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarOp();
+ VisualShaderNodeFloatOp();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarOp::Operator)
+VARIANT_ENUM_CAST(VisualShaderNodeFloatOp::Operator)
+
+class VisualShaderNodeIntOp : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntOp, VisualShaderNode);
+
+public:
+ enum Operator {
+ OP_ADD,
+ OP_SUB,
+ OP_MUL,
+ OP_DIV,
+ OP_MOD,
+ OP_MAX,
+ OP_MIN,
+ };
+
+protected:
+ Operator op;
+
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_operator(Operator p_op);
+ Operator get_operator() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntOp();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeIntOp::Operator)
class VisualShaderNodeVectorOp : public VisualShaderNode {
GDCLASS(VisualShaderNodeVectorOp, VisualShaderNode);
@@ -539,11 +611,11 @@ public:
VARIANT_ENUM_CAST(VisualShaderNodeTransformVecMult::Operator)
///////////////////////////////////////
-/// SCALAR FUNC
+/// FLOAT FUNC
///////////////////////////////////////
-class VisualShaderNodeScalarFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarFunc, VisualShaderNode);
+class VisualShaderNodeFloatFunc : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatFunc, VisualShaderNode);
public:
enum Function {
@@ -604,10 +676,53 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarFunc();
+ VisualShaderNodeFloatFunc();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeFloatFunc::Function)
+
+///////////////////////////////////////
+/// INT FUNC
+///////////////////////////////////////
+
+class VisualShaderNodeIntFunc : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntFunc, VisualShaderNode);
+
+public:
+ enum Function {
+ FUNC_ABS,
+ FUNC_CLAMP,
+ FUNC_NEGATE,
+ FUNC_SIGN,
+ };
+
+protected:
+ Function func;
+
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_function(Function p_func);
+ Function get_function() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntFunc();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarFunc::Function)
+VARIANT_ENUM_CAST(VisualShaderNodeIntFunc::Function)
///////////////////////////////////////
/// VECTOR FUNC
@@ -1297,8 +1412,8 @@ public:
/// UNIFORMS
///////////////////////////////////////
-class VisualShaderNodeScalarUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeScalarUniform, VisualShaderNodeUniform);
+class VisualShaderNodeFloatUniform : public VisualShaderNodeUniform {
+ GDCLASS(VisualShaderNodeFloatUniform, VisualShaderNodeUniform);
public:
enum Hint {
@@ -1344,10 +1459,62 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarUniform();
+ VisualShaderNodeFloatUniform();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeFloatUniform::Hint)
+
+class VisualShaderNodeIntUniform : public VisualShaderNodeUniform {
+ GDCLASS(VisualShaderNodeIntUniform, VisualShaderNodeUniform);
+
+public:
+ enum Hint {
+ HINT_NONE,
+ HINT_RANGE,
+ HINT_RANGE_STEP,
+ };
+
+private:
+ Hint hint;
+ int hint_range_min;
+ int hint_range_max;
+ int hint_range_step;
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_hint(Hint p_hint);
+ Hint get_hint() const;
+
+ void set_min(int p_value);
+ int get_min() const;
+
+ void set_max(int p_value);
+ int get_max() const;
+
+ void set_step(int p_value);
+ int get_step() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntUniform();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarUniform::Hint)
+VARIANT_ENUM_CAST(VisualShaderNodeIntUniform::Hint)
///////////////////////////////////////
@@ -1669,9 +1836,10 @@ class VisualShaderNodeCompare : public VisualShaderNode {
public:
enum ComparisonType {
CTYPE_SCALAR,
+ CTYPE_SCALAR_INT,
CTYPE_VECTOR,
CTYPE_BOOLEAN,
- CTYPE_TRANSFORM
+ CTYPE_TRANSFORM,
};
enum Function {
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 78c08080b5..a7e519479f 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -360,9 +360,9 @@ World::World() {
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/3d/default_gravity", 9.8));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/3d/default_gravity_vector", Vector3(0, -1, 0)));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/3d/default_linear_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/3d/default_angular_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
#ifdef _3D_DISABLED
indexer = NULL;
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 5cc809d8e3..6bdc4cf6f0 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -394,9 +394,9 @@ World2D::World2D() {
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 98));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/2d/default_gravity_vector", Vector2(0, 1)));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/2d/default_linear_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/2d/default_angular_damp", 1.0));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
indexer = memnew(SpatialIndexer2D);
}
diff --git a/scene/resources/plane_shape.cpp b/scene/resources/world_margin_shape.cpp
index ddc820233e..b5b701327c 100644
--- a/scene/resources/plane_shape.cpp
+++ b/scene/resources/world_margin_shape.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* plane_shape.cpp */
+/* world_margin_shape.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "plane_shape.h"
+#include "world_margin_shape.h"
#include "servers/physics_server.h"
-Vector<Vector3> PlaneShape::get_debug_mesh_lines() {
+Vector<Vector3> WorldMarginShape::get_debug_mesh_lines() {
Plane p = get_plane();
Vector<Vector3> points;
@@ -61,13 +61,13 @@ Vector<Vector3> PlaneShape::get_debug_mesh_lines() {
return points;
}
-void PlaneShape::_update_shape() {
+void WorldMarginShape::_update_shape() {
PhysicsServer::get_singleton()->shape_set_data(get_shape(), plane);
Shape::_update_shape();
}
-void PlaneShape::set_plane(Plane p_plane) {
+void WorldMarginShape::set_plane(Plane p_plane) {
plane = p_plane;
_update_shape();
@@ -75,20 +75,20 @@ void PlaneShape::set_plane(Plane p_plane) {
_change_notify("plane");
}
-Plane PlaneShape::get_plane() const {
+Plane WorldMarginShape::get_plane() const {
return plane;
}
-void PlaneShape::_bind_methods() {
+void WorldMarginShape::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_plane", "plane"), &PlaneShape::set_plane);
- ClassDB::bind_method(D_METHOD("get_plane"), &PlaneShape::get_plane);
+ ClassDB::bind_method(D_METHOD("set_plane", "plane"), &WorldMarginShape::set_plane);
+ ClassDB::bind_method(D_METHOD("get_plane"), &WorldMarginShape::get_plane);
ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane"), "set_plane", "get_plane");
}
-PlaneShape::PlaneShape() :
+WorldMarginShape::WorldMarginShape() :
Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_PLANE)) {
set_plane(Plane(0, 1, 0, 0));
diff --git a/scene/resources/plane_shape.h b/scene/resources/world_margin_shape.h
index 360f9dbbe9..78ea570212 100644
--- a/scene/resources/plane_shape.h
+++ b/scene/resources/world_margin_shape.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* plane_shape.h */
+/* world_margin_shape.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,14 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLANE_SHAPE_H
-#define PLANE_SHAPE_H
+#ifndef WORLD_MARGIN_SHAPE_H
+#define WORLD_MARGIN_SHAPE_H
#include "scene/resources/shape.h"
-class PlaneShape : public Shape {
+class WorldMarginShape : public Shape {
- GDCLASS(PlaneShape, Shape);
+ GDCLASS(WorldMarginShape, Shape);
Plane plane;
protected:
@@ -52,6 +52,6 @@ public:
return 0;
}
- PlaneShape();
+ WorldMarginShape();
};
-#endif // PLANE_SHAPE_H
+#endif // WORLD_MARGIN_SHAPE_H
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index 6299c3a801..d3c5a87cae 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -119,12 +119,6 @@ SceneStringNames::SceneStringNames() {
camera_entered = StaticCString::create("camera_entered");
camera_exited = StaticCString::create("camera_exited");
- _body_enter_tree = StaticCString::create("_body_enter_tree");
- _body_exit_tree = StaticCString::create("_body_exit_tree");
-
- _area_enter_tree = StaticCString::create("_area_enter_tree");
- _area_exit_tree = StaticCString::create("_area_exit_tree");
-
_input = StaticCString::create("_input");
_input_event = StaticCString::create("_input_event");
@@ -167,8 +161,7 @@ SceneStringNames::SceneStringNames() {
drop_data = StaticCString::create("drop_data");
can_drop_data = StaticCString::create("can_drop_data");
- _im_update = StaticCString::create("_im_update");
- _queue_update = StaticCString::create("_queue_update");
+ _im_update = StaticCString::create("_im_update"); // Sprite3D
baked_light_changed = StaticCString::create("baked_light_changed");
_baked_light_changed = StaticCString::create("_baked_light_changed");
@@ -200,8 +193,6 @@ SceneStringNames::SceneStringNames() {
mesh_materials[i] = "material/" + itos(i);
}
- _mesh_changed = StaticCString::create("_mesh_changed");
-
parameters_base_path = "parameters/";
tracks_changed = "tracks_changed";
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index eeeaf22b01..7976a2072c 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -33,6 +33,7 @@
#include "core/node_path.h"
#include "core/string_name.h"
+
class SceneStringNames {
friend void register_scene_types();
@@ -147,12 +148,6 @@ public:
StringName camera_entered;
StringName camera_exited;
- StringName _body_enter_tree;
- StringName _body_exit_tree;
-
- StringName _area_enter_tree;
- StringName _area_exit_tree;
-
StringName changed;
StringName _shader_changed;
@@ -179,7 +174,6 @@ public:
StringName _get_minimum_size;
StringName _im_update;
- StringName _queue_update;
StringName baked_light_changed;
StringName _baked_light_changed;
@@ -211,7 +205,6 @@ public:
MAX_MATERIALS = 32
};
StringName mesh_materials[MAX_MATERIALS];
- StringName _mesh_changed;
};
#endif // SCENE_STRING_NAMES_H
diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp
index 4438475d44..a64e36b6a2 100644
--- a/servers/arvr/arvr_positional_tracker.cpp
+++ b/servers/arvr/arvr_positional_tracker.cpp
@@ -38,6 +38,7 @@ void ARVRPositionalTracker::_bind_methods() {
// this class is read only from GDScript, so we only have access to getters..
ClassDB::bind_method(D_METHOD("get_type"), &ARVRPositionalTracker::get_type);
+ ClassDB::bind_method(D_METHOD("get_tracker_id"), &ARVRPositionalTracker::get_tracker_id);
ClassDB::bind_method(D_METHOD("get_name"), &ARVRPositionalTracker::get_name);
ClassDB::bind_method(D_METHOD("get_joy_id"), &ARVRPositionalTracker::get_joy_id);
ClassDB::bind_method(D_METHOD("get_tracks_orientation"), &ARVRPositionalTracker::get_tracks_orientation);
@@ -58,7 +59,7 @@ void ARVRPositionalTracker::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRPositionalTracker::get_rumble);
ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRPositionalTracker::set_rumble);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble"), "set_rumble", "get_rumble");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble"), "set_rumble", "get_rumble");
};
void ARVRPositionalTracker::set_type(ARVRServer::TrackerType p_type) {
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index a5bb9f794d..4b3417db6c 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -46,7 +46,7 @@ void ARVRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("center_on_hmd", "rotation_mode", "keep_height"), &ARVRServer::center_on_hmd);
ClassDB::bind_method(D_METHOD("get_hmd_transform"), &ARVRServer::get_hmd_transform);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
ClassDB::bind_method(D_METHOD("get_interface_count"), &ARVRServer::get_interface_count);
ClassDB::bind_method(D_METHOD("get_interface", "idx"), &ARVRServer::get_interface);
@@ -75,11 +75,11 @@ void ARVRServer::_bind_methods() {
BIND_ENUM_CONSTANT(RESET_BUT_KEEP_TILT);
BIND_ENUM_CONSTANT(DONT_RESET_ROTATION);
- ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "interface_name")));
- ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING, "interface_name")));
+ ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING_NAME, "interface_name")));
+ ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING_NAME, "interface_name")));
- ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
};
real_t ARVRServer::get_world_scale() const {
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp
index 5389c64099..69b098edfc 100644
--- a/servers/audio/audio_driver_dummy.cpp
+++ b/servers/audio/audio_driver_dummy.cpp
@@ -49,7 +49,6 @@ Error AudioDriverDummy::init() {
samples_in = memnew_arr(int32_t, buffer_frames * channels);
- mutex = Mutex::create();
thread = Thread::create(AudioDriverDummy::thread_func, this);
return OK;
@@ -95,16 +94,16 @@ AudioDriver::SpeakerMode AudioDriverDummy::get_speaker_mode() const {
void AudioDriverDummy::lock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->lock();
+ mutex.lock();
};
void AudioDriverDummy::unlock() {
- if (!thread || !mutex)
+ if (!thread)
return;
- mutex->unlock();
+ mutex.unlock();
};
void AudioDriverDummy::finish() {
@@ -120,14 +119,11 @@ void AudioDriverDummy::finish() {
};
memdelete(thread);
- if (mutex)
- memdelete(mutex);
thread = NULL;
};
AudioDriverDummy::AudioDriverDummy() {
- mutex = NULL;
thread = NULL;
};
diff --git a/servers/audio/audio_driver_dummy.h b/servers/audio/audio_driver_dummy.h
index ba99e5a239..a2cd9b2dc6 100644
--- a/servers/audio/audio_driver_dummy.h
+++ b/servers/audio/audio_driver_dummy.h
@@ -39,7 +39,7 @@
class AudioDriverDummy : public AudioDriver {
Thread *thread;
- Mutex *mutex;
+ Mutex mutex;
int32_t *samples_in;
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 259c5487e9..46e674fd9b 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -300,7 +300,7 @@ void AudioStreamRandomPitch::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_random_pitch"), &AudioStreamRandomPitch::get_random_pitch);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "audio_stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_audio_stream", "get_audio_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch");
}
AudioStreamRandomPitch::AudioStreamRandomPitch() {
diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp
index 938d29f764..8ad2ecc5ce 100644
--- a/servers/audio/effects/audio_effect_amplify.cpp
+++ b/servers/audio/effects/audio_effect_amplify.cpp
@@ -67,7 +67,7 @@ void AudioEffectAmplify::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_volume_db", "volume"), &AudioEffectAmplify::set_volume_db);
ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioEffectAmplify::get_volume_db);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
}
AudioEffectAmplify::AudioEffectAmplify() {
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index 58943582c9..34c03dca8d 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -326,36 +326,36 @@ void AudioEffectChorus::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_dry"), &AudioEffectChorus::get_dry);
ADD_PROPERTY(PropertyInfo(Variant::INT, "voice_count", PROPERTY_HINT_RANGE, "1,4,1"), "set_voice_count", "get_voice_count");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3);
}
AudioEffectChorus::AudioEffectChorus() {
diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp
index 1ef3bb9b10..8d54bd8e36 100644
--- a/servers/audio/effects/audio_effect_compressor.cpp
+++ b/servers/audio/effects/audio_effect_compressor.cpp
@@ -230,13 +230,13 @@ void AudioEffectCompressor::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_sidechain", "sidechain"), &AudioEffectCompressor::set_sidechain);
ClassDB::bind_method(D_METHOD("get_sidechain"), &AudioEffectCompressor::get_sidechain);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain");
}
AudioEffectCompressor::AudioEffectCompressor() {
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index 21d979a78c..fa57a94977 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -305,22 +305,22 @@ void AudioEffectDelay::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_feedback_lowpass", "amount"), &AudioEffectDelay::set_feedback_lowpass);
ClassDB::bind_method(D_METHOD("get_feedback_lowpass"), &AudioEffectDelay::get_feedback_lowpass);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap1/active"), "set_tap1_active", "is_tap1_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap2/active"), "set_tap2_active", "is_tap2_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "feedback/active"), "set_feedback_active", "is_feedback_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass");
}
AudioEffectDelay::AudioEffectDelay() {
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 8f2c0743ef..bc4fc7ecd6 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -172,10 +172,10 @@ void AudioEffectDistortion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_post_gain"), &AudioEffectDistortion::get_post_gain);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Clip,ATan,LoFi,Overdrive,WaveShape"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain");
BIND_ENUM_CONSTANT(MODE_CLIP);
BIND_ENUM_CONSTANT(MODE_ATAN);
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index ecd5f04d5f..b315fdc3bb 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -117,7 +117,7 @@ void AudioEffectEQ::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < band_names.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::REAL, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1"));
}
}
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index 9ba5ceb500..18047bc99e 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -156,9 +156,9 @@ void AudioEffectFilter::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_db", "amount"), &AudioEffectFilter::set_db);
ClassDB::bind_method(D_METHOD("get_db"), &AudioEffectFilter::get_db);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
ADD_PROPERTY(PropertyInfo(Variant::INT, "db", PROPERTY_HINT_ENUM, "6 dB,12 dB,18 dB,24 dB"), "set_db", "get_db");
BIND_ENUM_CONSTANT(FILTER_6DB);
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index d495964719..40a4243168 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -128,10 +128,10 @@ void AudioEffectLimiter::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_soft_clip_ratio", "soft_clip"), &AudioEffectLimiter::set_soft_clip_ratio);
ClassDB::bind_method(D_METHOD("get_soft_clip_ratio"), &AudioEffectLimiter::get_soft_clip_ratio);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio");
}
AudioEffectLimiter::AudioEffectLimiter() {
diff --git a/servers/audio/effects/audio_effect_panner.cpp b/servers/audio/effects/audio_effect_panner.cpp
index b9e95f44df..10724175e5 100644
--- a/servers/audio/effects/audio_effect_panner.cpp
+++ b/servers/audio/effects/audio_effect_panner.cpp
@@ -63,7 +63,7 @@ void AudioEffectPanner::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pan", "cpanume"), &AudioEffectPanner::set_pan);
ClassDB::bind_method(D_METHOD("get_pan"), &AudioEffectPanner::get_pan);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan");
}
AudioEffectPanner::AudioEffectPanner() {
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index d811522576..3709b69d45 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -154,11 +154,11 @@ void AudioEffectPhaser::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_depth", "depth"), &AudioEffectPhaser::set_depth);
ClassDB::bind_method(D_METHOD("get_depth"), &AudioEffectPhaser::get_depth);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth");
}
AudioEffectPhaser::AudioEffectPhaser() {
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 28185e591f..56529e208e 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -347,8 +347,8 @@ void AudioEffectPitchShift::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectPitchShift::set_fft_size);
ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectPitchShift::get_fft_size);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size");
BIND_ENUM_CONSTANT(FFT_SIZE_256);
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp
index 9be3a2d554..8f0c55ad83 100644
--- a/servers/audio/effects/audio_effect_record.cpp
+++ b/servers/audio/effects/audio_effect_record.cpp
@@ -215,7 +215,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
AudioStreamSample::Format dst_format = format;
bool stereo = true; //forcing mono is not implemented
- PoolVector<uint8_t> dst_data;
+ Vector<uint8_t> dst_data;
ERR_FAIL_COND_V(current_instance.is_null(), NULL);
ERR_FAIL_COND_V(current_instance->recording_data.size() == 0, NULL);
@@ -223,7 +223,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
if (dst_format == AudioStreamSample::FORMAT_8_BITS) {
int data_size = current_instance->recording_data.size();
dst_data.resize(data_size);
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
for (int i = 0; i < data_size; i++) {
int8_t v = CLAMP(current_instance->recording_data[i] * 128, -128, 127);
@@ -232,7 +232,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
} else if (dst_format == AudioStreamSample::FORMAT_16_BITS) {
int data_size = current_instance->recording_data.size();
dst_data.resize(data_size * 2);
- PoolVector<uint8_t>::Write w = dst_data.write();
+ uint8_t *w = dst_data.ptrw();
for (int i = 0; i < data_size; i++) {
int16_t v = CLAMP(current_instance->recording_data[i] * 32768, -32768, 32767);
@@ -252,8 +252,8 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
right.set(i, current_instance->recording_data[i * 2 + 1]);
}
- PoolVector<uint8_t> bleft;
- PoolVector<uint8_t> bright;
+ Vector<uint8_t> bleft;
+ Vector<uint8_t> bright;
ResourceImporterWAV::_compress_ima_adpcm(left, bleft);
ResourceImporterWAV::_compress_ima_adpcm(right, bright);
@@ -261,9 +261,9 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
int dl = bleft.size();
dst_data.resize(dl * 2);
- PoolVector<uint8_t>::Write w = dst_data.write();
- PoolVector<uint8_t>::Read rl = bleft.read();
- PoolVector<uint8_t>::Read rr = bright.read();
+ uint8_t *w = dst_data.ptrw();
+ const uint8_t *rl = bleft.ptr();
+ const uint8_t *rr = bright.ptr();
for (int i = 0; i < dl; i++) {
w[i * 2 + 0] = rl[i];
diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp
index caa2d8ab26..6dccb2945b 100644
--- a/servers/audio/effects/audio_effect_reverb.cpp
+++ b/servers/audio/effects/audio_effect_reverb.cpp
@@ -184,15 +184,15 @@ void AudioEffectReverb::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_hpf"), &AudioEffectReverb::get_hpf);
ADD_GROUP("Predelay", "predelay_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback");
ADD_GROUP("", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
}
AudioEffectReverb::AudioEffectReverb() {
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index d4bd3e2461..47aee02de2 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -268,8 +268,8 @@ void AudioEffectSpectrumAnalyzer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectSpectrumAnalyzer::set_fft_size);
ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectSpectrumAnalyzer::get_fft_size);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size");
BIND_ENUM_CONSTANT(FFT_SIZE_256);
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp
index e8b8f47676..a10aca02b2 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.cpp
+++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp
@@ -146,9 +146,9 @@ void AudioEffectStereoEnhance::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_surround", "amount"), &AudioEffectStereoEnhance::set_surround);
ClassDB::bind_method(D_METHOD("get_surround"), &AudioEffectStereoEnhance::get_surround);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround");
}
AudioEffectStereoEnhance::AudioEffectStereoEnhance() {
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index 9e1019afbc..5f24cf3d6b 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -74,8 +74,8 @@ void AudioStreamGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_buffer_length", "seconds"), &AudioStreamGenerator::set_buffer_length);
ClassDB::bind_method(D_METHOD("get_buffer_length"), &AudioStreamGenerator::get_buffer_length);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
}
AudioStreamGenerator::AudioStreamGenerator() {
@@ -99,17 +99,17 @@ bool AudioStreamGeneratorPlayback::push_frame(const Vector2 &p_frame) {
bool AudioStreamGeneratorPlayback::can_push_buffer(int p_frames) const {
return buffer.space_left() >= p_frames;
}
-bool AudioStreamGeneratorPlayback::push_buffer(const PoolVector2Array &p_frames) {
+bool AudioStreamGeneratorPlayback::push_buffer(const PackedVector2Array &p_frames) {
int to_write = p_frames.size();
if (buffer.space_left() < to_write) {
return false;
}
- PoolVector2Array::Read r = p_frames.read();
+ const Vector2 *r = p_frames.ptr();
if (sizeof(real_t) == 4) {
//write directly
- buffer.write((const AudioFrame *)r.ptr(), to_write);
+ buffer.write((const AudioFrame *)r, to_write);
} else {
//convert from double
AudioFrame buf[2048];
diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h
index f1cd73d266..aee3459e17 100644
--- a/servers/audio/effects/audio_stream_generator.h
+++ b/servers/audio/effects/audio_stream_generator.h
@@ -85,7 +85,7 @@ public:
bool push_frame(const Vector2 &p_frame);
bool can_push_buffer(int p_frames) const;
- bool push_buffer(const PoolVector2Array &p_frames);
+ bool push_buffer(const PackedVector2Array &p_frames);
int get_frames_available() const;
int get_skips() const;
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 2a5a5040b6..caee5f5db5 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -971,7 +971,7 @@ void AudioServer::init() {
channel_disable_threshold_db = GLOBAL_DEF_RST("audio/channel_disable_threshold_db", -60.0);
channel_disable_frames = float(GLOBAL_DEF_RST("audio/channel_disable_time", 2.0)) * get_mix_rate();
- ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::REAL, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
buffer_size = 1024; //hardcoded for now
init_channels_and_buffers();
@@ -1137,27 +1137,28 @@ void *AudioServer::audio_data_alloc(uint32_t p_data_len, const uint8_t *p_from_d
copymem(ad, p_from_data, p_data_len);
}
- audio_data_lock->lock();
- audio_data[ad] = p_data_len;
- audio_data_total_mem += p_data_len;
- audio_data_max_mem = MAX(audio_data_total_mem, audio_data_max_mem);
- audio_data_lock->unlock();
+ {
+ MutexLock lock(audio_data_lock);
+
+ audio_data[ad] = p_data_len;
+ audio_data_total_mem += p_data_len;
+ audio_data_max_mem = MAX(audio_data_total_mem, audio_data_max_mem);
+ }
return ad;
}
void AudioServer::audio_data_free(void *p_data) {
- audio_data_lock->lock();
+ MutexLock lock(audio_data_lock);
+
if (!audio_data.has(p_data)) {
- audio_data_lock->unlock();
ERR_FAIL();
}
audio_data_total_mem -= audio_data[p_data];
audio_data.erase(p_data);
memfree(p_data);
- audio_data_lock->unlock();
}
size_t AudioServer::audio_data_get_total_memory_usage() const {
@@ -1384,7 +1385,7 @@ void AudioServer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale");
ADD_SIGNAL(MethodInfo("bus_layout_changed"));
@@ -1399,7 +1400,6 @@ AudioServer::AudioServer() {
singleton = this;
audio_data_total_mem = 0;
audio_data_max_mem = 0;
- audio_data_lock = Mutex::create();
mix_frames = 0;
channel_count = 0;
to_mix = 0;
@@ -1413,7 +1413,6 @@ AudioServer::AudioServer() {
AudioServer::~AudioServer() {
- memdelete(audio_data_lock);
singleton = NULL;
}
@@ -1531,8 +1530,8 @@ void AudioBusLayout::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/solo", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/mute", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/bypass_fx", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
- p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
- p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
for (int j = 0; j < buses[i].effects.size(); j++) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "bus/" + itos(i) + "/effect/" + itos(j) + "/effect", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
diff --git a/servers/audio_server.h b/servers/audio_server.h
index eff66d4008..cc0c9d1112 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -104,7 +104,7 @@ public:
virtual Error capture_stop() { return FAILED; }
virtual void capture_set_device(const String &p_name) {}
virtual String capture_get_device() { return "Default"; }
- virtual Array capture_get_device_list(); // TODO: convert this and get_device_list to PoolStringArray
+ virtual Array capture_get_device_list(); // TODO: convert this and get_device_list to PackedStringArray
virtual float get_latency() { return 0; }
@@ -238,7 +238,7 @@ private:
size_t audio_data_total_mem;
size_t audio_data_max_mem;
- Mutex *audio_data_lock;
+ Mutex audio_data_lock;
void init_channels_and_buffers();
diff --git a/servers/navigation_2d_server.cpp b/servers/navigation_2d_server.cpp
index 94ddecf9c3..d9b53122e2 100644
--- a/servers/navigation_2d_server.cpp
+++ b/servers/navigation_2d_server.cpp
@@ -62,6 +62,12 @@ Navigation2DServer *Navigation2DServer::singleton = NULL;
return NavigationServer::get_singleton()->FUNC_NAME(CONV_0(D_0), CONV_1(D_1)); \
}
+#define FORWARD_2_R_C(CONV_R, FUNC_NAME, T_0, D_0, T_1, D_1, CONV_0, CONV_1) \
+ Navigation2DServer::FUNC_NAME(T_0 D_0, T_1 D_1) \
+ const { \
+ return CONV_R(NavigationServer::get_singleton()->FUNC_NAME(CONV_0(D_0), CONV_1(D_1))); \
+ }
+
#define FORWARD_4_R_C(CONV_R, FUNC_NAME, T_0, D_0, T_1, D_1, T_2, D_2, T_3, D_3, CONV_0, CONV_1, CONV_2, CONV_3) \
Navigation2DServer::FUNC_NAME(T_0 D_0, T_1 D_1, T_2 D_2, T_3 D_3) \
const { \
@@ -132,6 +138,8 @@ void Navigation2DServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("map_set_edge_connection_margin", "map", "margin"), &Navigation2DServer::map_set_edge_connection_margin);
ClassDB::bind_method(D_METHOD("map_get_edge_connection_margin", "map"), &Navigation2DServer::map_get_edge_connection_margin);
ClassDB::bind_method(D_METHOD("map_get_path", "map", "origin", "destination", "optimize"), &Navigation2DServer::map_get_path);
+ ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &Navigation2DServer::map_get_closest_point);
+ ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &Navigation2DServer::map_get_closest_point_owner);
ClassDB::bind_method(D_METHOD("region_create"), &Navigation2DServer::region_create);
ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &Navigation2DServer::region_set_map);
@@ -176,6 +184,9 @@ real_t FORWARD_1_C(map_get_edge_connection_margin, RID, p_map, rid_to_rid);
Vector<Vector2> FORWARD_4_R_C(vector_v3_to_v2, map_get_path, RID, p_map, Vector2, p_origin, Vector2, p_destination, bool, p_optimize, rid_to_rid, v2_to_v3, v2_to_v3, bool_to_bool);
+Vector2 FORWARD_2_R_C(v3_to_v2, map_get_closest_point, RID, p_map, const Vector2 &, p_point, rid_to_rid, v2_to_v3);
+RID FORWARD_2_C(map_get_closest_point_owner, RID, p_map, const Vector2 &, p_point, rid_to_rid, v2_to_v3);
+
RID FORWARD_0_C(region_create);
void FORWARD_2_C(region_set_map, RID, p_region, RID, p_map, rid_to_rid, rid_to_rid);
diff --git a/servers/navigation_2d_server.h b/servers/navigation_2d_server.h
index 2ac0e8f875..955b0c3726 100644
--- a/servers/navigation_2d_server.h
+++ b/servers/navigation_2d_server.h
@@ -79,6 +79,9 @@ public:
/// Returns the navigation path to reach the destination from the origin.
virtual Vector<Vector2> map_get_path(RID p_map, Vector2 p_origin, Vector2 p_destination, bool p_optimize) const;
+ virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const;
+ virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const;
+
/// Creates a new region.
virtual RID region_create() const;
diff --git a/servers/navigation_server.cpp b/servers/navigation_server.cpp
index d28aed9110..f2b727ac47 100644
--- a/servers/navigation_server.cpp
+++ b/servers/navigation_server.cpp
@@ -48,6 +48,10 @@ void NavigationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("map_set_edge_connection_margin", "map", "margin"), &NavigationServer::map_set_edge_connection_margin);
ClassDB::bind_method(D_METHOD("map_get_edge_connection_margin", "map"), &NavigationServer::map_get_edge_connection_margin);
ClassDB::bind_method(D_METHOD("map_get_path", "map", "origin", "destination", "optimize"), &NavigationServer::map_get_path);
+ ClassDB::bind_method(D_METHOD("map_get_closest_point_to_segment", "map", "start", "end", "use_collision"), &NavigationServer::map_get_closest_point_to_segment, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &NavigationServer::map_get_closest_point);
+ ClassDB::bind_method(D_METHOD("map_get_closest_point_normal", "map", "to_point"), &NavigationServer::map_get_closest_point_normal);
+ ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer::map_get_closest_point_owner);
ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer::region_create);
ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer::region_set_map);
@@ -71,7 +75,7 @@ void NavigationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("free", "object"), &NavigationServer::free);
ClassDB::bind_method(D_METHOD("set_active", "active"), &NavigationServer::set_active);
- ClassDB::bind_method(D_METHOD("step", "delta_time"), &NavigationServer::step);
+ ClassDB::bind_method(D_METHOD("process", "delta_time"), &NavigationServer::process);
}
const NavigationServer *NavigationServer::get_singleton() {
diff --git a/servers/navigation_server.h b/servers/navigation_server.h
index bcdbf84339..7c9b6ba595 100644
--- a/servers/navigation_server.h
+++ b/servers/navigation_server.h
@@ -37,7 +37,7 @@
#include "core/object.h"
#include "core/rid.h"
-#include "scene/3d/navigation_mesh_instance.h"
+#include "scene/3d/navigation_region.h"
/// This server uses the concept of internal mutability.
/// All the constant functions can be called in multithread because internally
@@ -90,6 +90,11 @@ public:
/// Returns the navigation path to reach the destination from the origin.
virtual Vector<Vector3> map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize) const = 0;
+ virtual Vector3 map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision = false) const = 0;
+ virtual Vector3 map_get_closest_point(RID p_map, const Vector3 &p_point) const = 0;
+ virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const = 0;
+ virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const = 0;
+
/// Creates a new region.
virtual RID region_create() const = 0;
@@ -170,9 +175,11 @@ public:
/// Control activation of this server.
virtual void set_active(bool p_active) const = 0;
- /// Step the server
- /// NOTE: This function is not Threadsafe and MUST be called in single thread.
- virtual void step(real_t delta_time) = 0;
+ /// Process the collision avoidance agents.
+ /// The result of this process is needed by the physics server,
+ /// so this must be called in the main thread.
+ /// Note: This function is not thread safe.
+ virtual void process(real_t delta_time) = 0;
NavigationServer();
virtual ~NavigationServer();
diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp
index 1016afcaba..4b54a56253 100644
--- a/servers/physics/area_sw.cpp
+++ b/servers/physics/area_sw.cpp
@@ -200,7 +200,7 @@ void AreaSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
@@ -232,7 +232,7 @@ void AreaSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index b71c9772df..8819941f04 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -713,7 +713,7 @@ void BodySW::call_queries() {
} else {
const Variant *vp[2] = { &v, &fi_callback->udata };
- Variant::CallError ce;
+ Callable::CallError ce;
int argc = (fi_callback->udata.get_type() == Variant::NIL) ? 1 : 2;
obj->call(fi_callback->method, vp, argc, ce);
}
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 7c92178803..4a6ed6be58 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -1106,9 +1106,9 @@ FaceShapeSW::FaceShapeSW() {
configure(AABB());
}
-PoolVector<Vector3> ConcavePolygonShapeSW::get_faces() const {
+Vector<Vector3> ConcavePolygonShapeSW::get_faces() const {
- PoolVector<Vector3> rfaces;
+ Vector<Vector3> rfaces;
rfaces.resize(faces.size() * 3);
for (int i = 0; i < faces.size(); i++) {
@@ -1132,8 +1132,7 @@ void ConcavePolygonShapeSW::project_range(const Vector3 &p_normal, const Transfo
r_max = 0;
return;
}
- PoolVector<Vector3>::Read r = vertices.read();
- const Vector3 *vptr = r.ptr();
+ const Vector3 *vptr = vertices.ptr();
for (int i = 0; i < count; i++) {
@@ -1152,8 +1151,7 @@ Vector3 ConcavePolygonShapeSW::get_support(const Vector3 &p_normal) const {
if (count == 0)
return Vector3();
- PoolVector<Vector3>::Read r = vertices.read();
- const Vector3 *vptr = r.ptr();
+ const Vector3 *vptr = vertices.ptr();
Vector3 n = p_normal;
@@ -1231,9 +1229,9 @@ bool ConcavePolygonShapeSW::intersect_segment(const Vector3 &p_begin, const Vect
return false;
// unlock data
- PoolVector<Face>::Read fr = faces.read();
- PoolVector<Vector3>::Read vr = vertices.read();
- PoolVector<BVH>::Read br = bvh.read();
+ const Face *fr = faces.ptr();
+ const Vector3 *vr = vertices.ptr();
+ const BVH *br = bvh.ptr();
_SegmentCullParams params;
params.from = p_begin;
@@ -1241,9 +1239,9 @@ bool ConcavePolygonShapeSW::intersect_segment(const Vector3 &p_begin, const Vect
params.collisions = 0;
params.dir = (p_end - p_begin).normalized();
- params.faces = fr.ptr();
- params.vertices = vr.ptr();
- params.bvh = br.ptr();
+ params.faces = fr;
+ params.vertices = vr;
+ params.bvh = br;
params.min_d = 1e20;
// cull
@@ -1310,18 +1308,18 @@ void ConcavePolygonShapeSW::cull(const AABB &p_local_aabb, Callback p_callback,
AABB local_aabb = p_local_aabb;
// unlock data
- PoolVector<Face>::Read fr = faces.read();
- PoolVector<Vector3>::Read vr = vertices.read();
- PoolVector<BVH>::Read br = bvh.read();
+ const Face *fr = faces.ptr();
+ const Vector3 *vr = vertices.ptr();
+ const BVH *br = bvh.ptr();
FaceShapeSW face; // use this to send in the callback
_CullParams params;
params.aabb = local_aabb;
params.face = &face;
- params.faces = fr.ptr();
- params.vertices = vr.ptr();
- params.bvh = br.ptr();
+ params.faces = fr;
+ params.vertices = vr;
+ params.bvh = br;
params.callback = p_callback;
params.userdata = p_userdata;
@@ -1464,7 +1462,7 @@ void ConcavePolygonShapeSW::_fill_bvh(_VolumeSW_BVH *p_bvh_tree, BVH *p_bvh_arra
memdelete(p_bvh_tree);
}
-void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) {
+void ConcavePolygonShapeSW::_setup(Vector<Vector3> p_faces) {
int src_face_count = p_faces.size();
if (src_face_count == 0) {
@@ -1474,23 +1472,19 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) {
ERR_FAIL_COND(src_face_count % 3);
src_face_count /= 3;
- PoolVector<Vector3>::Read r = p_faces.read();
- const Vector3 *facesr = r.ptr();
+ const Vector3 *facesr = p_faces.ptr();
- PoolVector<_VolumeSW_BVH_Element> bvh_array;
+ Vector<_VolumeSW_BVH_Element> bvh_array;
bvh_array.resize(src_face_count);
- PoolVector<_VolumeSW_BVH_Element>::Write bvhw = bvh_array.write();
- _VolumeSW_BVH_Element *bvh_arrayw = bvhw.ptr();
+ _VolumeSW_BVH_Element *bvh_arrayw = bvh_array.ptrw();
faces.resize(src_face_count);
- PoolVector<Face>::Write w = faces.write();
- Face *facesw = w.ptr();
+ Face *facesw = faces.ptrw();
vertices.resize(src_face_count * 3);
- PoolVector<Vector3>::Write vw = vertices.write();
- Vector3 *verticesw = vw.ptr();
+ Vector3 *verticesw = vertices.ptrw();
AABB _aabb;
@@ -1514,16 +1508,12 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) {
_aabb.merge_with(bvh_arrayw[i].aabb);
}
- w.release();
- vw.release();
-
int count = 0;
_VolumeSW_BVH *bvh_tree = _volume_sw_build_bvh(bvh_arrayw, src_face_count, count);
bvh.resize(count + 1);
- PoolVector<BVH>::Write bvhw2 = bvh.write();
- BVH *bvh_arrayw2 = bvhw2.ptr();
+ BVH *bvh_arrayw2 = bvh.ptrw();
int idx = 0;
_fill_bvh(bvh_tree, bvh_arrayw2, idx);
@@ -1546,7 +1536,7 @@ ConcavePolygonShapeSW::ConcavePolygonShapeSW() {
/* HEIGHT MAP SHAPE */
-PoolVector<real_t> HeightMapShapeSW::get_heights() const {
+Vector<real_t> HeightMapShapeSW::get_heights() const {
return heights;
}
@@ -1603,14 +1593,14 @@ Vector3 HeightMapShapeSW::get_moment_of_inertia(real_t p_mass) const {
(p_mass / 3.0) * (extents.y * extents.y + extents.y * extents.y));
}
-void HeightMapShapeSW::_setup(PoolVector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size) {
+void HeightMapShapeSW::_setup(Vector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size) {
heights = p_heights;
width = p_width;
depth = p_depth;
cell_size = p_cell_size;
- PoolVector<real_t>::Read r = heights.read();
+ const real_t *r = heights.ptr();
AABB aabb;
@@ -1643,7 +1633,7 @@ void HeightMapShapeSW::set_data(const Variant &p_data) {
int width = d["width"];
int depth = d["depth"];
real_t cell_size = d["cell_size"];
- PoolVector<real_t> heights = d["heights"];
+ Vector<real_t> heights = d["heights"];
ERR_FAIL_COND(width <= 0);
ERR_FAIL_COND(depth <= 0);
diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h
index 62a6cb7f29..eaae64be66 100644
--- a/servers/physics/shape_sw.h
+++ b/servers/physics/shape_sw.h
@@ -31,7 +31,6 @@
#ifndef SHAPE_SW_H
#define SHAPE_SW_H
-#include "core/math/bsp_tree.h"
#include "core/math/geometry.h"
#include "servers/physics_server.h"
/*
@@ -297,8 +296,8 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW {
int indices[3];
};
- PoolVector<Face> faces;
- PoolVector<Vector3> vertices;
+ Vector<Face> faces;
+ Vector<Vector3> vertices;
struct BVH {
@@ -309,7 +308,7 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW {
int face_index;
};
- PoolVector<BVH> bvh;
+ Vector<BVH> bvh;
struct _CullParams {
@@ -342,10 +341,10 @@ struct ConcavePolygonShapeSW : public ConcaveShapeSW {
void _fill_bvh(_VolumeSW_BVH *p_bvh_tree, BVH *p_bvh_array, int &p_idx);
- void _setup(PoolVector<Vector3> p_faces);
+ void _setup(Vector<Vector3> p_faces);
public:
- PoolVector<Vector3> get_faces() const;
+ Vector<Vector3> get_faces() const;
virtual PhysicsServer::ShapeType get_type() const { return PhysicsServer::SHAPE_CONCAVE_POLYGON; }
@@ -368,7 +367,7 @@ public:
struct HeightMapShapeSW : public ConcaveShapeSW {
- PoolVector<real_t> heights;
+ Vector<real_t> heights;
int width;
int depth;
real_t cell_size;
@@ -376,10 +375,10 @@ struct HeightMapShapeSW : public ConcaveShapeSW {
//void _cull_segment(int p_idx,_SegmentCullParams *p_params) const;
//void _cull(int p_idx,_CullParams *p_params) const;
- void _setup(PoolVector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size);
+ void _setup(Vector<real_t> p_heights, int p_width, int p_depth, real_t p_cell_size);
public:
- PoolVector<real_t> get_heights() const;
+ Vector<real_t> get_heights() const;
int get_width() const;
int get_depth() const;
real_t get_cell_size() const;
@@ -468,16 +467,4 @@ struct MotionShapeSW : public ShapeSW {
MotionShapeSW() { configure(AABB()); }
};
-struct _ShapeTestConvexBSPSW {
-
- const BSP_Tree *bsp;
- const ShapeSW *shape;
- Transform transform;
-
- _FORCE_INLINE_ void project_range(const Vector3 &p_normal, real_t &r_min, real_t &r_max) const {
-
- shape->project_range(p_normal, transform, r_min, r_max);
- }
-};
-
-#endif // SHAPESW_H
+#endif // SHAPE_SW_H
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 03dca8b9ec..110520db5a 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -1220,7 +1220,7 @@ SpaceSW::SpaceSW() {
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
body_angular_velocity_damp_ratio = 10;
broadphase = BroadPhaseSW::create_func();
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index c67d870b2a..45666d9d09 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -200,7 +200,7 @@ void Area2DSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
@@ -232,7 +232,7 @@ void Area2DSW::call_queries() {
res[3] = E->key().body_shape;
res[4] = E->key().area_shape;
- Variant::CallError ce;
+ Callable::CallError ce;
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
}
}
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 4de52cacbd..863b422996 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -612,7 +612,7 @@ void Body2DSW::call_queries() {
set_force_integration_callback(ObjectID(), StringName());
} else {
- Variant::CallError ce;
+ Callable::CallError ce;
if (fi_callback->callback_udata.get_type() != Variant::NIL) {
obj->call(fi_callback->method, vp, 2, ce);
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
index 291693de39..76036930c6 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
@@ -40,7 +40,7 @@ void Physics2DServerWrapMT::thread_exit() {
void Physics2DServerWrapMT::thread_step(real_t p_delta) {
physics_2d_server->step(p_delta);
- step_sem->post();
+ step_sem.post();
}
void Physics2DServerWrapMT::_thread_callback(void *_instance) {
@@ -84,11 +84,11 @@ void Physics2DServerWrapMT::step(real_t p_step) {
void Physics2DServerWrapMT::sync() {
- if (step_sem) {
+ if (thread) {
if (first_frame)
first_frame = false;
else
- step_sem->wait(); //must not wait if a step was not issued
+ step_sem.wait(); //must not wait if a step was not issued
}
physics_2d_server->sync();
}
@@ -107,11 +107,8 @@ void Physics2DServerWrapMT::init() {
if (create_thread) {
- step_sem = SemaphoreOld::create();
//OS::get_singleton()->release_rendering_thread();
- if (create_thread) {
- thread = Thread::create(_thread_callback, this);
- }
+ thread = Thread::create(_thread_callback, this);
while (!step_thread_up) {
OS::get_singleton()->delay_usec(1000);
}
@@ -146,9 +143,6 @@ void Physics2DServerWrapMT::finish() {
space_free_cached_ids();
area_free_cached_ids();
body_free_cached_ids();
-
- if (step_sem)
- memdelete(step_sem);
}
Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool p_create_thread) :
@@ -157,10 +151,8 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool
physics_2d_server = p_contained;
create_thread = p_create_thread;
thread = NULL;
- step_sem = NULL;
step_pending = 0;
step_thread_up = false;
- alloc_mutex = Mutex::create();
pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
@@ -177,6 +169,5 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool
Physics2DServerWrapMT::~Physics2DServerWrapMT() {
memdelete(physics_2d_server);
- memdelete(alloc_mutex);
//finish();
}
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index 9a01344390..4d5e317c8c 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -58,7 +58,7 @@ class Physics2DServerWrapMT : public Physics2DServer {
volatile bool step_thread_up;
bool create_thread;
- SemaphoreOld *step_sem;
+ Semaphore step_sem;
int step_pending;
void thread_step(real_t p_delta);
void thread_flush();
@@ -67,7 +67,7 @@ class Physics2DServerWrapMT : public Physics2DServer {
bool first_frame;
- Mutex *alloc_mutex;
+ Mutex alloc_mutex;
int pool_max_size;
public:
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 75c604f0fa..5fefb9595f 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -639,19 +639,19 @@ real_t ConvexPolygonShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2
void ConvexPolygonShape2DSW::set_data(const Variant &p_data) {
- ERR_FAIL_COND(p_data.get_type() != Variant::POOL_VECTOR2_ARRAY && p_data.get_type() != Variant::POOL_REAL_ARRAY);
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
if (points)
memdelete_arr(points);
points = NULL;
point_count = 0;
- if (p_data.get_type() == Variant::POOL_VECTOR2_ARRAY) {
- PoolVector<Vector2> arr = p_data;
+ if (p_data.get_type() == Variant::PACKED_VECTOR2_ARRAY) {
+ Vector<Vector2> arr = p_data;
ERR_FAIL_COND(arr.size() == 0);
point_count = arr.size();
points = memnew_arr(Point, point_count);
- PoolVector<Vector2>::Read r = arr.read();
+ const Vector2 *r = arr.ptr();
for (int i = 0; i < point_count; i++) {
points[i].pos = r[i];
@@ -665,12 +665,12 @@ void ConvexPolygonShape2DSW::set_data(const Variant &p_data) {
}
} else {
- PoolVector<real_t> dvr = p_data;
+ Vector<real_t> dvr = p_data;
point_count = dvr.size() / 4;
ERR_FAIL_COND(point_count == 0);
points = memnew_arr(Point, point_count);
- PoolVector<real_t>::Read r = dvr.read();
+ const real_t *r = dvr.ptr();
for (int i = 0; i < point_count; i++) {
@@ -693,7 +693,7 @@ void ConvexPolygonShape2DSW::set_data(const Variant &p_data) {
Variant ConvexPolygonShape2DSW::get_data() const {
- PoolVector<Vector2> dvr;
+ Vector<Vector2> dvr;
dvr.resize(point_count);
@@ -899,13 +899,13 @@ int ConcavePolygonShape2DSW::_generate_bvh(BVH *p_bvh, int p_len, int p_depth) {
void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
- ERR_FAIL_COND(p_data.get_type() != Variant::POOL_VECTOR2_ARRAY && p_data.get_type() != Variant::POOL_REAL_ARRAY);
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
Rect2 aabb;
- if (p_data.get_type() == Variant::POOL_VECTOR2_ARRAY) {
+ if (p_data.get_type() == Variant::PACKED_VECTOR2_ARRAY) {
- PoolVector<Vector2> p2arr = p_data;
+ Vector<Vector2> p2arr = p_data;
int len = p2arr.size();
ERR_FAIL_COND(len % 2);
@@ -919,7 +919,7 @@ void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
return;
}
- PoolVector<Vector2>::Read arr = p2arr.read();
+ const Vector2 *arr = p2arr.ptr();
Map<Point2, int> pointmap;
for (int i = 0; i < len; i += 2) {
@@ -976,18 +976,16 @@ void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
}
Variant ConcavePolygonShape2DSW::get_data() const {
- PoolVector<Vector2> rsegments;
+ Vector<Vector2> rsegments;
int len = segments.size();
rsegments.resize(len * 2);
- PoolVector<Vector2>::Write w = rsegments.write();
+ Vector2 *w = rsegments.ptrw();
for (int i = 0; i < len; i++) {
w[(i << 1) + 0] = points[segments[i].points[0]];
w[(i << 1) + 1] = points[segments[i].points[1]];
}
- w.release();
-
return rsegments;
}
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 83bcae4607..2009cb823d 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -1346,7 +1346,7 @@ Space2DSW::Space2DSW() {
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
broadphase = BroadPhase2DSW::create_func();
broadphase->set_pair_callback(_broadphase_pair, this);
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 925af52eeb..1f92d6e419 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -118,13 +118,13 @@ void Physics2DDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("integrate_forces"), &Physics2DDirectBodyState::integrate_forces);
ClassDB::bind_method(D_METHOD("get_space_state"), &Physics2DDirectBodyState::get_space_state);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_inertia"), "", "get_inverse_inertia");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_inertia"), "", "get_inverse_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "total_gravity"), "", "get_total_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform");
@@ -249,7 +249,7 @@ void Physics2DShapeQueryParameters::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "set_motion", "get_motion");
//ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter
ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid");
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 94bcf1f76e..57f3a7979e 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -120,10 +120,10 @@ void PhysicsDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("integrate_forces"), &PhysicsDirectBodyState::integrate_forces);
ClassDB::bind_method(D_METHOD("get_space_state"), &PhysicsDirectBodyState::get_space_state);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inverse_inertia"), "", "get_inverse_inertia");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "total_gravity"), "", "get_total_gravity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass"), "", "get_center_of_mass");
@@ -242,7 +242,7 @@ void PhysicsShapeQueryParameters::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
//ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter
ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform");
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 25d122604a..c9f5277a4d 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -56,6 +56,7 @@
#include "audio_server.h"
#include "camera/camera_feed.h"
#include "camera_server.h"
+#include "core/script_debugger_remote.h"
#include "navigation_2d_server.h"
#include "navigation_server.h"
#include "physics/physics_server_sw.h"
@@ -63,18 +64,17 @@
#include "physics_2d/physics_2d_server_wrap_mt.h"
#include "physics_2d_server.h"
#include "physics_server.h"
-#include "scene/debugger/script_debugger_remote.h"
#include "visual/shader_types.h"
#include "visual_server.h"
-static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsage> *r_usage) {
+static void _debugger_get_resource_usage(ScriptDebuggerRemote::ResourceUsage *r_usage) {
List<VS::TextureInfo> tinfo;
VS::get_singleton()->texture_debug_usage(&tinfo);
for (List<VS::TextureInfo>::Element *E = tinfo.front(); E; E = E->next()) {
- ScriptDebuggerRemote::ResourceUsage usage;
+ ScriptDebuggerRemote::ResourceInfo usage;
usage.path = E->get().path;
usage.vram = E->get().bytes;
usage.id = E->get().texture;
@@ -84,7 +84,7 @@ static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsag
} else {
usage.format = itos(E->get().width) + "x" + itos(E->get().height) + "x" + itos(E->get().depth) + " " + Image::get_format_name(E->get().format);
}
- r_usage->push_back(usage);
+ r_usage->infos.push_back(usage);
}
}
diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h
index f01e0b9578..4481b296c6 100644
--- a/servers/server_wrap_mt_common.h
+++ b/servers/server_wrap_mt_common.h
@@ -57,7 +57,7 @@
virtual RID m_type##_create() { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, &ret); \
@@ -65,7 +65,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(); \
@@ -88,7 +87,7 @@
virtual RID m_type##_create(m_arg1 p1) { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, &ret); \
@@ -96,7 +95,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(p1); \
@@ -119,7 +117,7 @@
virtual RID m_type##_create(m_arg1 p1, m_arg2 p2) { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, &ret); \
@@ -127,7 +125,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(p1, p2); \
@@ -150,7 +147,7 @@
virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, &ret); \
@@ -158,7 +155,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(p1, p2, p3); \
@@ -181,7 +177,7 @@
virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, &ret); \
@@ -189,7 +185,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(p1, p2, p3, p4); \
@@ -213,7 +208,7 @@
virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
if (Thread::get_caller_id() != server_thread) { \
RID rid; \
- alloc_mutex->lock(); \
+ MutexLock lock(alloc_mutex); \
if (m_type##_id_pool.size() == 0) { \
int ret; \
command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, p5, &ret); \
@@ -221,7 +216,6 @@
} \
rid = m_type##_id_pool.front()->get(); \
m_type##_id_pool.pop_front(); \
- alloc_mutex->unlock(); \
return rid; \
} else { \
return server_name->m_type##_create(p1, p2, p3, p4, p5); \
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 08d2104f94..0a55c78133 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -356,7 +356,7 @@ public:
virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) = 0;
virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0;
- virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0;
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0;
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0;
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0;
@@ -393,8 +393,8 @@ public:
virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0;
virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0;
- virtual void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) = 0;
- virtual PoolVector<float> multimesh_get_buffer(RID p_multimesh) const = 0;
+ virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0;
+ virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0;
virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0;
virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0;
@@ -499,15 +499,15 @@ public:
virtual RID gi_probe_create() = 0;
- virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) = 0;
+ virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0;
virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0;
- virtual PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0;
+ virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0;
virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const = 0;
virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) = 0;
@@ -558,15 +558,15 @@ public:
virtual RID lightmap_capture_create() = 0;
virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) = 0;
virtual AABB lightmap_capture_get_bounds(RID p_capture) const = 0;
- virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) = 0;
- virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0;
+ virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) = 0;
+ virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0;
virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) = 0;
virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const = 0;
virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) = 0;
virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const = 0;
virtual void lightmap_capture_set_energy(RID p_capture, float p_energy) = 0;
virtual float lightmap_capture_get_energy(RID p_capture) const = 0;
- virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0;
+ virtual const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0;
/* PARTICLES */
@@ -1080,7 +1080,7 @@ public:
const Item::CommandTransform *transform = static_cast<const Item::CommandTransform *>(c);
xf = transform->xform;
found_xform = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
default: {
c = c->next;
@@ -1171,6 +1171,7 @@ public:
Command *n = c->next;
if (c == commands) {
memdelete(commands);
+ commands = NULL;
} else {
c->~Command();
}
@@ -1258,7 +1259,7 @@ public:
virtual void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) = 0;
virtual RID occluder_polygon_create() = 0;
- virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) = 0;
+ virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) = 0;
virtual void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode) = 0;
virtual void draw_window_margins(int *p_margins, RID *p_margin_textures) = 0;
diff --git a/servers/visual/rasterizer_rd/cubemap_coeffs.h b/servers/visual/rasterizer_rd/cubemap_coeffs.h
new file mode 100644
index 0000000000..9d4117191b
--- /dev/null
+++ b/servers/visual/rasterizer_rd/cubemap_coeffs.h
@@ -0,0 +1,28 @@
+// Copyright 2016 Activision Publishing, Inc.
+//
+// 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 CUBEMAP_COEFFS_H
+#define CUBEMAP_COEFFS_H
+
+const float low_quality_coeffs[7][5][6][4] = { { { { 0.0002037563, 0.0045063655, -0.0016408688, 0.00012037493 }, { -9.1834951e-05, -0.008947532, -8.1524405e-05, -3.9080094e-05 }, { -2.6038267e-05, -6.8409667e-05, 7.2175702e-05, 0.25492775 }, { -9.9426044e-05, 0.0025427756, -0.00074437925, 1.1773191e-05 }, { -3.2668211e-05, 0.0026930659, -4.824934e-05, -0.0006835048 }, { -0.0002864144, -0.0032220854, 0.0021558286, -0.00014573736 } }, { { 0.00030683201, 0.0026819548, -0.00060011756, -0.0067169226 }, { -0.0030993251, 0.0098575575, 0.0022416671, -8.9075401e-05 }, { 0.00052405626, 0.00057860515, 0.00011654518, -0.048018609 }, { 0.00010850967, -0.0088443512, -0.0018168095, 8.6633128e-05 }, { 0.003333989, -0.0050956447, -8.0414612e-05, 0.0049721239 }, { -4.0961436e-05, -8.5486984e-05, 0.0058683066, 2.2978359e-05 } }, { { 0.99999993, 0.99998625, 0.99999847, 0.99997743 }, { 0.99999519, 0.99991138, 0.99999748, 1 }, { 0.99999986, 0.99999983, 0.99999999, 0.96576708 }, { 0.99999999, 0.99995765, 0.99999807, 1 }, { 0.99999444, 0.99998339, 1, 0.99998741 }, { 0.99999996, 0.99999481, 0.99998046, 0.99999999 } }, { { -0.32267524, -0.65409377, -1.4666488, 0.87153305 }, { -1.264365, 0.89880861, -1.2245906, -0.88501403 }, { -0.31118682, -0.086150323, -0.58811532, 1.1317711 }, { -1.2193493, 1.250379, -1.0871569, -0.12694096 }, { -0.4012249, -0.47436307, -0.59661001, 2.7313005 }, { -1.3109856, 0.60929855, 0.55672643, -0.39880018 } }, { { 0.93273157, 0.59530745, 1.1994788, 0.19102276 }, { 1.2272239, 0.23245736, 1.2577607, 2.5491008 }, { 1.1210098, 0.83074953, 1.3049282, -0.001940633 }, { 1.5839111, 0.10520816, 1.150458, 2.3251789 }, { 0.688692, 0.59807498, 1.3374877, 0.095746692 }, { 1.3054173, 0.36604721, 0.065870226, 1.6496907 } } }, { { { 0.10348445, -4.6771514e-07, -0.011513131, 8.8921052e-05 }, { -0.042152043, 0.013143535, 0.00029120107, 0.036661611 }, { -0.04516036, 0.011438473, -0.0099289792, -0.011707897 }, { -0.034779497, 0.0090981166, -5.4202726e-05, 0.038592793 }, { -0.0071967376, -0.0056614418, -0.012278945, 0.0056867462 }, { -0.037678514, 0.011570177, 0.00029044557, 0.038583909 } }, { { 0.048320869, 1.4603673e-05, 0.0092672368, 0.00033289199 }, { 0.0071001761, -0.0090106091, -0.0027305905, -0.00221479 }, { -0.0027204116, 0.00017921587, 0.015296357, -0.00010306185 }, { 0.0079350203, -0.014772431, -1.2410913e-05, -0.0062296897 }, { 0.025087691, 0.00086046427, 0.015034685, -0.00078224706 }, { 0.00074587265, -0.014602074, 0.00027338224, -0.012848552 } }, { { 0.99345662, 1, 0.99989078, 0.99999994 }, { 0.99908598, 0.99987302, 0.99999623, 0.99932528 }, { 0.99897605, 0.99993456, 0.9998337, 0.99993145 }, { 0.99936351, 0.99984949, 1, 0.9992356 }, { 0.99965935, 0.9999836, 0.99981158, 0.99998352 }, { 0.99928963, 0.99982644, 0.99999992, 0.99917276 } }, { { 3.6882765, 0.15963861, 0.55983965, 0.4075649 }, { 2.1169304, 0.56463157, 0.52957047, 2.0117964 }, { 3.1080461, 0.09682931, 0.42125986, 0.089254784 }, { 1.4247315, 0.48411378, -0.17039102, 1.7431674 }, { 4.0339531, 0.14046159, 0.89848909, 0.011661811 }, { 1.9787852, 0.61750145, 0.63514194, 1.9359003 } }, { { 0.030848793, 1.4472743, 1.4356825, 1.4078009 }, { 0.37639678, 1.0793106, 1.1945413, 0.43983395 }, { 0.27451605, 1.5256415, 1.016769, 1.4850575 }, { 0.54580883, 1.1332879, 3.1331784, 0.60772955 }, { 0.11785158, 1.3928946, 0.94998805, 1.0377182 }, { 0.2842108, 1.0026911, 1.9064553, 0.27147854 } } }, { { { -0.096789259, 0.10326967, 0.0011799959, -0.03077328 }, { 0.08342021, 0.033260738, -0.00045864451, -0.021450568 }, { -0.093369441, -0.05807574, -0.033745214, 0.023817208 }, { 0.056747754, 0.031140512, 0.00019362509, -0.023727797 }, { -0.084538386, -0.040545412, -0.0076838784, 0.03424599 }, { 0.074312056, 0.027619787, 0.0015509082, -0.031043528 } }, { { -0.0085160473, -0.012179292, 0.0049910118, 0.020224799 }, { 0.022559343, -0.016273333, -0.0069382139, 0.00058083224 }, { -0.001115062, 0.035002846, -0.0038974773, -0.039378629 }, { 0.0014921617, -0.00058523872, -0.0011606685, 0.02807528 }, { -0.021454809, 0.052957852, -0.0022083677, -0.027956663 }, { -0.016486487, -0.0040233682, 0.00029949558, 0.021924605 } }, { { 0.99526846, 0.99457883, 0.99998685, 0.99932175 }, { 0.99625908, 0.99931422, 0.99997583, 0.99976974 }, { 0.99563091, 0.99769836, 0.99942287, 0.99894047 }, { 0.99838743, 0.99951485, 0.99999931, 0.99932416 }, { 0.99618922, 0.99777329, 0.99996804, 0.99902234 }, { 0.99709875, 0.9996104, 0.99999875, 0.99927754 } }, { { 3.0342011, 4.8022834, 1.3814123, 1.5280754 }, { 2.9043837, 1.7325954, 1.422223, 2.0569263 }, { 3.0358722, 5.3331504, 1.5680146, 1.6079289 }, { 3.2062833, 1.5368069, 1.0484709, 1.5399477 }, { 2.4471653, 4.0916696, 1.5060688, 1.5807009 }, { 2.6932695, 1.5161537, 1.3991175, 1.6301918 } }, { { 0.50787578, 0.17735471, 1.4006765, 1.0878482 }, { 0.69514518, 1.6765187, 1.2224869, 1.3461327 }, { 0.71381288, 0.17509216, 1.2712934, 0.94575821 }, { 1.1817337, 1.796984, 1.8671538, 1.5708691 }, { 0.55621228, 0.38291359, 1.4128781, 0.82625349 }, { 0.72441647, 1.005794, 1.5522327, 1.6032524 } } }, { { { -0.00041301094, -0.095882618, 0.26932618, -0.25137214 }, { 0.13737415, -0.12694293, -0.0090389663, 0.07227623 }, { -0.005236407, -0.0072961249, 0.27776083, -0.19536433 }, { 0.12781899, -0.042881667, -0.095979169, 0.088937396 }, { 0.037496084, -0.090547583, 0.22112334, -0.21930294 }, { 0.13353408, -0.084346121, -0.011365728, 0.043459312 } }, { { -0.05799135, -0.048612281, 0.02422989, 0.015536268 }, { -0.083144241, 0.039381032, 0.018705957, 0.029297922 }, { 0.026364989, -0.041927591, 0.036718516, 0.0050376168 }, { -0.11562256, 0.043521976, -0.014481644, 0.01529188 }, { -0.047859898, -0.057779647, -0.053171395, -0.0063193506 }, { -0.028781196, 0.041145059, -0.00018523142, 0.053524246 } }, { { 0.998317, 0.99420489, 0.96274416, 0.96776581 }, { 0.98702349, 0.99112796, 0.99978417, 0.99695425 }, { 0.99963867, 0.99909401, 0.95994827, 0.9807178 }, { 0.98503489, 0.99813175, 0.99527799, 0.99591983 }, { 0.99815003, 0.99421459, 0.97379529, 0.97563635 }, { 0.99062621, 0.99558667, 0.99993539, 0.99762039 } }, { { 2.3221943, 2.5383575, 4.3177232, 4.2016467 }, { 3.1936529, 3.0443024, 2.548962, 2.7636456 }, { 2.5923827, 2.3497949, 4.2471014, 4.1975975 }, { 3.3748785, 3.2836577, 2.9220414, 2.7175317 }, { 2.3290083, 2.5560991, 4.3572168, 4.4372585 }, { 3.1512055, 3.2863613, 2.4475378, 2.3620003 } }, { { 0.62833231, 0.52378061, 0.55845033, 0.64883444 }, { 0.76905594, 1.1017801, 1.8714048, 1.5664383 }, { 1.5283278, 1.2423369, 0.62247385, 1.0341956 }, { 0.77484548, 1.6866409, 1.0307399, 1.4224643 }, { 0.85627405, 0.72516079, 0.70094339, 0.7547877 }, { 1.202842, 1.7650605, 1.5938526, 0.97031337 } } }, { { { -0.078108035, -0.049518839, 0.26950139, -0.51522828 }, { 0.43015518, -0.045354216, 0.094550359, -0.2395012 }, { -0.079900522, -0.082582235, 0.24464909, -0.5234896 }, { 0.38422945, -0.023833644, 0.07334288, -0.22827313 }, { -0.075370379, -0.05156594, 0.19883182, -0.45064193 }, { 0.46285395, 0.021899343, 0.10155287, -0.25974773 } }, { { 0.068681419, -0.32175988, 0.15143274, -0.0066205388 }, { -0.17060226, 0.31051319, -0.080511981, -0.1593209 }, { 0.08167251, -0.32517768, 0.10937023, -0.06941926 }, { -0.14580685, 0.32474959, -0.081718057, -0.11068378 }, { 0.053961394, -0.29322836, 0.10408839, -0.02243046 }, { -0.030598471, 0.34332821, -0.091528353, -0.16299796 } }, { { 0.99457629, 0.9455255, 0.95101899, 0.85702741 }, { 0.88648824, 0.94948647, 0.99225906, 0.95773484 }, { 0.99345131, 0.94204015, 0.96342357, 0.84919939 }, { 0.9116513, 0.94549969, 0.99395321, 0.96728511 }, { 0.99569447, 0.95465076, 0.97449039, 0.89242295 }, { 0.88590629, 0.93896015, 0.99061071, 0.95182077 } }, { { 3.6380949, 4.1749529, 4.1351439, 4.8389883 }, { 5.256362, 4.2027959, 3.6096892, 3.9848645 }, { 3.5689427, 3.8620869, 4.0023981, 4.8268584 }, { 5.1128497, 4.468934, 3.5851596, 4.047485 }, { 3.7014988, 4.1310058, 4.2446872, 5.3049323 }, { 4.8659881, 4.3133002, 3.4582876, 3.8863853 } }, { { 1.6276316, 0.7747672, 1.0485958, 0.73900224 }, { 0.72010795, 0.65403093, 1.3179681, 0.65610074 }, { 1.5881174, 0.55108527, 1.0509725, 0.72153362 }, { 1.1389053, 1.0905142, 1.6661598, 0.9987548 }, { 1.977914, 0.83001686, 1.0571479, 0.80249183 }, { 0.94107069, 0.80840873, 0.95379751, 0.50386367 } } }, { { { 0.015525428, -0.48038019, -0.021799698, 0.43629156 }, { 0.045681247, -0.55039024, -0.54573329, 0.57817853 }, { -0.045869129, -0.42209953, -0.14040829, 0.37787106 }, { 0.66327604, -0.70070311, -0.55261635, 0.63446196 }, { 0.015397585, -0.43515767, -0.021927897, 0.4203714 }, { 0.85681772, -0.65394729, -0.67557236, 0.60104142 } }, { { -0.31503888, -0.26745648, 0.26817896, 0.26548747 }, { -0.93282124, -0.033621213, 0.68374802, -0.10858524 }, { -0.21723689, -0.17935495, 0.38521982, 0.2578335 }, { -0.39913153, 0.23555359, 0.59589456, -0.19075103 }, { -0.28851798, -0.24142459, 0.28279261, 0.24766617 }, { -0.29435977, -0.25850549, 0.57790878, -0.200546 } }, { { 0.94895177, 0.83528552, 0.96312243, 0.85974768 }, { 0.35743218, 0.8342303, 0.48442112, 0.80865248 }, { 0.97504059, 0.88863029, 0.9120807, 0.88923301 }, { 0.63305523, 0.67344611, 0.58268761, 0.74904744 }, { 0.95735066, 0.86738225, 0.9589304, 0.87289711 }, { 0.42333878, 0.71100482, 0.45784651, 0.77364753 } }, { { 5.3641275, 5.2550422, 5.3103777, 5.2851215 }, { 5.2657045, 6.2095784, 6.9549598, 4.9205516 }, { 5.163385, 5.3141038, 4.9907618, 5.3583852 }, { 6.1257061, 6.1102338, 6.9549598, 5.3129951 }, { 5.3138838, 5.3257842, 5.3133783, 5.2687156 }, { 5.8915091, 6.153324, 6.9549598, 4.9568971 } }, { { 3.1221918, 1.1882615, 2.6991784, 1.1185048 }, { -0.2322432, -0.16590163, 0.088416958, 0.057399579 }, { 3.4395383, 1.5836276, 2.6242352, 1.2873336 }, { -0.23767634, -0.79425452, 0.20477899, 0.40461516 }, { 2.2521751, 1.1933374, 2.3309484, 1.0185309 }, { -0.099258385, -0.2173726, 0.0736866, 0.15470436 } } }, { { { 0.066050217, -0.33053278, -0.13771479, 0.33278465 }, { 0.00084467977, -0.50077778, -0.30083482, 0.6494273 }, { 0.24880159, -0.30354993, -0.15417892, 0.38203296 }, { -0.073325098, -0.4778777, 0.10779844, 0.66683723 }, { 0.15703809, -0.36335455, -0.15657631, 0.35926503 }, { 0.26127617, -0.29524368, -0.14490804, 0.65461301 } }, { { -0.57970022, -0.33939622, 0.72169742, 0.320959 }, { -0.38698206, -0.12730306, 0.65810895, 0.026509232 }, { -0.6199708, -0.34745658, 0.68683659, 0.34547285 }, { -0.3613378, -0.14006845, 0.65917895, 0.038446867 }, { -0.57778101, -0.35057776, 0.57837882, 0.36488991 }, { -0.50051482, -0.019174387, 0.50816239, 0.02682636 } }, { { 0.8121484, 0.88065787, 0.67837119, 0.88670158 }, { 0.92208686, 0.85616327, 0.69021085, -0.75996148 }, { 0.74413303, 0.88720424, 0.71027063, 0.85714604 }, { 0.92954743, 0.86718726, 0.74421946, -0.74421095 }, { 0.80094204, 0.86317363, 0.8006009, 0.85894353 }, { 0.82536033, 0.95522956, 0.8489833, -0.75548802 } }, { { 5.7725061, 5.1565901, 5.6224483, 5.0847054 }, { 5.7717118, 6.4180057, 6.9797014, -0.03290957 }, { 5.7847117, 5.2015529, 5.614561, 5.2019388 }, { 6.2613999, 6.5807982, 6.9797014, -0.032764603 }, { 5.823775, 5.2332343, 5.826694, 5.197143 }, { 6.3463188, 5.8174311, 6.9797014, -0.032766769 } }, { { 2.96787, 1.3557735, 2.0749129, 1.3066609 }, { -0.92782801, 0.0079162579, -0.33479446, 2.699659e-05 }, { 2.1997063, 3.1083252, 2.6810949, 1.8276262 }, { -0.48654719, -0.10954189, -0.32175132, 5.490092e-05 }, { 3.1970446, 1.787085, 3.062849, 1.6274811 }, { -0.78882801, -0.34050184, -0.59962127, 3.6554198e-05 } } } };
+
+const float high_quality_coeffs[7][5][3][24][4] = { { { { { -4.8355339e-06, -4.4902569e-05, -9.2632249e-05, -0.00053773136 }, { 0.0040143823, -0.00060900339, -0.0095301923, -0.0053956011 }, { -0.0005923892, -3.6901978e-05, -5.6694857e-06, -0.00017018564 }, { 0.0012441402, 0.02236187, 0.022751769, 0.0062788948 }, { 0.00013810055, -2.2709815e-05, 0.0054849671, -1.6599195e-05 }, { -0.020320408, -0.017066319, -0.017457746, 0.022910628 }, { 0.00024171724, 9.7419073e-05, -0.00047804272, -0.00010093683 }, { 7.6988167e-05, 1.8551597e-05, -5.7692813e-05, -3.332362e-05 }, { -0.00062766208, 2.713742e-05, 0.00026511682, 2.3841873e-05 }, { -0.00043656844, 0.0028645469, 0.0049817085, 0.0080221478 }, { -3.3210444e-05, -8.0852386e-05, -2.2111492e-06, -8.4430827e-05 }, { 0.010967284, 0.018811225, 0.017569463, -0.0046944996 }, { -0.00018391248, -0.00010462174, -0.00017726, -0.00018490133 }, { 0.00012591989, 0.015965386, 0.015964059, -0.0078018431 }, { -0.006125333, -8.2224165e-05, -0.00020500151, -0.00025207244 }, { -0.00016320041, -0.0001279242, 0.00014038799, 8.1359421e-05 }, { -0.00064341098, -0.0011265496, -0.0011634792, -0.00081607159 }, { 0.00089294825, 0.0061923653, 0.0052662392, -0.00058227469 }, { -2.4001308e-05, -1.3534224e-05, -1.4720478e-05, -2.5120827e-05 }, { 0.00029964918, -0.0045658543, -0.0045581938, 0.0017106208 }, { 7.5790173e-05, -1.8265415e-05, 1.5918205e-05, 5.8524021e-05 }, { 0.0011669872, -0.00017571882, -0.00017190275, -0.0023833977 }, { 0.0033487264, -0.0066535821, -0.0066413786, -0.0032332601 }, { -3.6468807e-05, -0.00068145131, -9.8190714e-05, -8.7169435e-05 } }, { { -0.0010440653, -8.9750644e-05, 4.971182e-05, 0.0044618878 }, { 0.0078333883, -0.00090884312, -0.00046920549, -0.002465051 }, { -0.0058778609, 0.0026554895, -0.00031880506, -0.00010649091 }, { -0.0015095448, 0.0094026506, 0.009492703, 0.0024572848 }, { 0.0047331786, 0.00070722401, 0.0028798817, -0.00039779892 }, { -0.0089878107, -0.0095474878, -0.0097187652, 0.008765907 }, { -4.0435321e-05, -0.00061813281, -0.0060490143, 0.0016259965 }, { -0.00014720558, -1.0601876e-05, 0.00014757138, 0.00016227641 }, { -0.010428289, -0.00031812813, -0.0016172213, -0.00012022134 }, { 0.0040517131, 0.0072972763, 0.0060433905, 0.0025041645 }, { 0.00014090924, 0.00027612853, 0.00015961665, 0.0002605418 }, { -0.00020653783, -0.00048482867, -0.00058472338, 0.00026413759 }, { 0.00056712638, 0.00026385353, 0.00035484947, 0.00033212447 }, { -0.00094663094, 0.0029891757, 0.0029887838, -0.0026583585 }, { -0.0017400246, 0.00042350567, 0.00086128207, 0.00039863587 }, { 0.00059604848, 0.00027495434, -0.00059956434, -4.4981673e-05 }, { -0.010211343, -0.0080580409, -0.0085333216, 0.0023258717 }, { 0.00042832593, 0.0056750222, 0.0048059635, -0.0092168281 }, { 3.0214612e-05, 4.540924e-06, 1.7239937e-05, 2.783598e-05 }, { 0.00029393335, -4.5128636e-05, -4.3089017e-05, 0.00030682556 }, { -4.7077735e-05, -1.3596835e-05, -0.0015338149, -7.4957991e-05 }, { -0.00097136844, 0.00018564298, 0.00021815754, 0.0015095577 }, { 0.00043929849, -0.0014691094, -0.0014671742, -0.00029365954 }, { 8.8554045e-05, 0.0062500772, 0.0001495049, 0.00021007601 } }, { { 0.0020307077, 0.0020947445, 0.0017438295, 0.0084822342 }, { -0.0069727503, -0.0010131005, 0.0055261321, -0.0020442588 }, { 0.00031035611, 0.00010839441, 3.7359209e-06, 4.3112837e-05 }, { 9.1207794e-05, 0.0050148169, 0.0051071455, 0.0033679057 }, { -0.00090101737, -0.00053793176, -0.0025829621, 0.0003241927 }, { -0.0019244714, -0.0033690472, -0.0035193497, 0.0027653636 }, { -0.00065476293, -0.00017787403, 0.00040383136, -0.00018123957 }, { -0.00030640434, -0.00018961553, -0.00011036218, -0.00015793049 }, { 0.001110592, -0.00021252645, 0.00015849587, -3.7758317e-05 }, { 0.00077967828, -0.0051765235, -0.0078505592, -0.010796339 }, { -1.2024951e-05, 6.48806e-05, -3.9409005e-05, 7.4639306e-05 }, { -0.00017352424, -0.00037802595, -0.00045639468, 0.00016843169 }, { -4.2866244e-05, -4.3730932e-06, 7.3574276e-05, 5.6076779e-05 }, { 0.00024802387, 0.0018053101, 0.0018042994, -0.0016700716 }, { 0.0082698262, -0.00014605077, 0.0004377682, 8.1585074e-05 }, { -4.494343e-06, 0.00019781519, -0.00058910268, -0.00027360572 }, { 0.0013016934, 0.0021020456, 0.0022718598, -0.0059377824 }, { 0.002185371, -0.0080788056, -0.0071952836, 0.0039688918 }, { 0.00013048617, 0.0001738124, 0.00012978924, 0.00013813358 }, { 0.00032386518, 0.00023046021, 0.00023064714, 0.00033762343 }, { 0.00023643771, 0.00019652953, 0.0013083597, 0.00024739959 }, { -0.0063957036, -0.0055319023, -0.0054742301, -0.0037204932 }, { -0.0005510683, -0.0007715413, -0.00077385934, -0.001009415 }, { 0.00017904616, -0.00096137522, 0.00030252599, -2.2478138e-05 } } }, { { { -0.00038948583, -0.00040817153, -0.00041280315, -0.0010985631 }, { 0.0025695337, 0.00042904308, 0.0054649973, -0.0055079106 }, { 0.00052050672, 2.2618679e-05, 0.00024058975, -0.00012632201 }, { -0.013468886, 0.0079396715, 0.0079402246, 0.026283756 }, { -7.922122e-05, -3.4761763e-06, -0.0041716347, 0.0001478739 }, { 0.023716381, -0.016415262, -0.015296927, -0.021050827 }, { 3.7654391e-05, 0.00012765816, -0.0001337099, 0.00051483398 }, { 0.00015671907, 0.00010686796, 2.1421097e-05, -2.2281569e-05 }, { 3.1779413e-06, 0.00010449913, -0.00018303614, 7.5382489e-05 }, { -0.00020526765, -0.0011333575, -0.0050720108, 0.0051482782 }, { 4.0450357e-05, 1.0808158e-05, -2.3316095e-05, 9.7767333e-06 }, { -0.019107229, 0.010907324, 0.0048969594, 0.017851514 }, { 7.4048796e-05, -7.041835e-06, 8.0226174e-05, 5.1714105e-05 }, { -0.016564627, 0.0023486944, 0.0023601429, 0.016005248 }, { -0.004528284, 3.6291049e-05, 2.4229636e-05, 0.0024853948 }, { 5.6882054e-05, 6.8805135e-05, 0.00013119897, 0.00010339801 }, { 0.00021183341, 0.0008203137, -7.204401e-05, 0.00062599728 }, { -0.00099314707, 0.0030198762, -0.0038989955, 0.00055571214 }, { -7.4247984e-05, -8.3993373e-05, -5.9133252e-05, -7.7411989e-05 }, { 0.0054296732, -0.00057858871, -0.00058417754, -0.005072911 }, { -0.00019259782, -0.00018772532, -4.2959783e-05, -0.0001827295 }, { -0.00029351865, 0.00013736372, 0.00016666048, 0.00020873447 }, { 0.0069341659, 0.0027612928, 0.0027538377, -0.0061770317 }, { 4.2584714e-05, -0.00037063589, -9.0693123e-06, 0.00011845784 } }, { { 0.0028834168, 0.0031807308, 0.0031352582, 0.01064051 }, { 0.0049297987, -4.2149356e-05, -0.0014926841, -0.0002300371 }, { 0.0020396303, -0.00066042794, -6.4359283e-05, 0.00017835163 }, { -0.0025767816, 0.0025148152, 0.0025224779, 0.0043006543 }, { -0.00042084416, -0.00013534305, 0.002453623, -4.0707749e-05 }, { -0.0001803055, -0.0010450606, -0.00084380806, 0.00014843677 }, { -0.0064067107, 0.00011012652, -0.0022552747, -0.00080508294 }, { -0.00017778763, -4.296789e-05, 0.00015343883, 0.00025036711 }, { 0.002825978, -0.00031945362, -0.00031987612, -0.00021117763 }, { 0.00032791249, -0.00049524542, 0.0049368722, -0.0017186408 }, { -0.0001685943, -0.00016766033, -0.0001755097, -0.00017067307 }, { 0.00023939157, -0.00011793706, -6.0620575e-05, -0.0002706595 }, { -2.9718673e-05, 3.5950879e-05, 1.839844e-05, -2.8718148e-05 }, { -0.0017260981, 0.00012145435, 0.0001236679, 0.0018292155 }, { 0.0036086706, 0.0001026898, -2.5518889e-05, -0.00019830236 }, { -0.00031546808, -0.00042107458, -0.00059963868, -0.00061472497 }, { -0.0074719522, 0.0015719596, -0.0033624165, -0.0092664101 }, { -0.0011285776, 0.0018601435, 0.00052060704, -1.5554679e-05 }, { 4.9853171e-05, 7.3650922e-05, 3.4080107e-05, 5.4255445e-05 }, { 0.00015102779, -2.58105e-05, -2.5851018e-05, -4.5185316e-05 }, { 0.0002057452, 0.00019037765, 0.0040052198, 0.00020046579 }, { 0.0027727314, 0.0040749211, 0.0036050794, 0.0034635222 }, { 0.00042503689, 0.00056027382, 0.00056052971, -8.2485044e-05 }, { -5.6309634e-05, 0.0019722025, 6.4267434e-05, -0.00020376412 } }, { { 0.0051607661, 0.0047835358, 0.0047658352, 0.0054281814 }, { -0.0040939561, 0.0012119183, -0.0023408179, -0.00055891234 }, { -0.0031939804, -0.0015954053, -0.00018570689, 0.00028849431 }, { -0.0075625096, 0.0033878734, 0.0033797415, 0.010242674 }, { -0.002293562, 0.00024245282, 0.0019455622, 0.0039550747 }, { 0.0090386754, -0.0086947671, -0.0082684939, -0.0075613346 }, { -0.00085735117, 3.4822634e-05, -0.0024653972, -0.00090964985 }, { -0.00013750587, -0.00010089501, 6.3555498e-05, 0.0002758494 }, { 0.0060496328, -0.00032664426, 0.0005979723, -0.00018819024 }, { 0.00072724184, 0.00082242885, 0.0045668772, -0.0054557456 }, { -9.6167811e-05, 7.9856612e-05, 0.00015672473, 8.0901183e-05 }, { 0.00038859448, -0.00025360755, -0.00017624981, -0.00049125519 }, { -8.8277361e-05, 2.4159527e-05, -0.00016014627, -2.7854246e-05 }, { -0.0037308647, 0.00041434141, 0.0004167221, 0.0037190244 }, { 0.00050696744, -4.6752715e-05, 0.00033183668, -0.0025882828 }, { -0.00015915702, -0.0002325901, -0.00036157415, -0.00016391937 }, { 0.00012320153, 0.0026711886, 0.0018414591, -0.0058215223 }, { -0.0029409983, -0.00015460743, 0.0031951665, 0.0074654329 }, { 9.9084813e-05, 9.1785865e-05, 5.9300007e-05, 0.00010463304 }, { 0.00024773341, -2.5723276e-05, -2.5709769e-05, -0.00015357475 }, { 0.000416633, 0.00028749584, -0.0038632071, 0.00039869488 }, { 0.00018344152, 3.0811778e-05, -0.00010240082, 0.00059301197 }, { 0.0019217461, 0.00034404024, 0.00034318823, -0.0015867375 }, { -0.00011928879, 0.001178769, -5.8655983e-05, -0.00028461439 } } }, { { { 0.99999992, 0.99999992, 0.99999991, 0.99999925 }, { 0.99998864, 0.99999972, 0.99993965, 0.99997027 }, { 0.99999969, 1, 0.99999997, 0.99999998 }, { 0.99990852, 0.99971841, 0.99970961, 0.9996348 }, { 0.99999999, 1, 0.99997626, 0.99999999 }, { 0.99951219, 0.9997196, 0.99973058, 0.99951587 }, { 0.99999997, 0.99999999, 0.99999988, 0.99999986 }, { 0.99999998, 0.99999999, 1, 1 }, { 0.9999998, 0.99999999, 0.99999995, 1 }, { 0.99999988, 0.99999525, 0.99997473, 0.99995457 }, { 1, 1, 1, 1 }, { 0.99975729, 0.99976356, 0.99983365, 0.99982963 }, { 0.99999998, 0.99999999, 0.99999998, 0.99999998 }, { 0.99986279, 0.99986979, 0.99986978, 0.99984147 }, { 0.99997099, 1, 0.99999998, 0.99999688 }, { 0.99999999, 0.99999999, 0.99999998, 0.99999999 }, { 0.99999977, 0.99999903, 0.99999932, 0.99999947 }, { 0.99999911, 0.99997627, 0.99997853, 0.99999968 }, { 1, 1, 1, 1 }, { 0.99998521, 0.99998941, 0.99998944, 0.99998567 }, { 0.99999998, 0.99999998, 1, 0.99999998 }, { 0.99999928, 0.99999998, 0.99999997, 0.99999714 }, { 0.99997035, 0.99997405, 0.99997415, 0.99997569 }, { 1, 0.9999997, 1, 0.99999999 } }, { { 0.00015966941, 0.00014262676, 0.00020165066, 0.00021618914 }, { 2.8140907e-06, -0.00020325872, 0.00017736728, 6.0386679e-05 }, { -0.0003187876, 5.8862288e-05, 6.2281085e-05, 1.7339908e-05 }, { -2.6587911e-05, -0.00011609007, -0.00011725093, -7.6114852e-05 }, { 0.00013665042, 5.2703844e-06, -0.00031293536, 3.8693931e-05 }, { -9.8143069e-05, -0.00012816332, -0.00012926252, -0.00010623032 }, { 0.00032342312, -1.9200091e-06, -0.00010691485, 6.3541059e-05 }, { -8.0643542e-06, 9.7622933e-06, 2.9924822e-05, -1.988333e-05 }, { 0.00025318464, 1.2588649e-05, 1.4665927e-05, 9.3294806e-06 }, { 2.6875391e-06, -2.4928123e-05, 2.251878e-05, 0.00011026808 }, { 1.767638e-05, 1.0309044e-05, 2.4765648e-05, 1.4397941e-05 }, { 6.9000935e-06, 1.0637078e-05, 1.087637e-05, 6.3065784e-06 }, { 5.532953e-05, 1.6231463e-05, 4.9564371e-05, 3.6623041e-05 }, { -1.6958729e-05, -3.1627491e-05, -3.1524511e-05, -2.9954116e-05 }, { 8.9045086e-05, 2.1005026e-05, 1.3016463e-05, 8.7863053e-05 }, { -2.75035e-05, -3.0440427e-05, -3.5356286e-05, 5.9609261e-06 }, { 0.0001586274, 4.0711165e-05, 3.1563135e-05, 0.0001385483 }, { 8.5548316e-06, 7.4531928e-05, -3.7017413e-05, 2.6874037e-05 }, { -1.3750655e-05, -8.2756032e-06, -2.7214983e-07, -1.4830115e-05 }, { -7.0798362e-07, -3.3187173e-07, -3.3266762e-07, -5.7113855e-07 }, { 4.3615512e-05, -4.4076433e-06, 8.9239586e-06, 3.7278531e-05 }, { -7.7366773e-06, 4.610399e-06, 4.3762687e-06, -5.64067e-06 }, { -3.2666125e-06, -1.0773146e-05, -1.0861965e-05, -1.3327232e-06 }, { -9.1178305e-06, 0.00030171207, -1.5395234e-05, -2.0695425e-07 } }, { { 0.00017159464, 0.00014699558, 0.00018752678, 0.0002227926 }, { -4.6524822e-05, -0.00010460271, 0.00034735325, 0.00010082238 }, { -6.8269006e-05, 1.4343751e-05, 7.7283393e-06, 2.5347136e-05 }, { -6.6149546e-05, -7.1168993e-05, -7.0621016e-05, -0.00015246746 }, { 7.12022e-05, 3.8790461e-05, -0.00023994449, 6.6792921e-05 }, { -0.00014735813, -0.00012658353, -0.00012162488, -0.00012106777 }, { 0.00015161388, -1.4439153e-05, -3.7629923e-06, 8.3140788e-06 }, { 4.0175416e-05, 2.5380268e-05, -2.2894421e-06, 4.6374378e-06 }, { 0.00028906023, 1.7695243e-05, 5.3790587e-06, 1.631859e-05 }, { 1.8890685e-05, -1.6898275e-05, 2.1007663e-05, 6.5179363e-05 }, { -3.9142595e-06, 2.5745488e-05, 1.0803197e-05, 2.7099749e-05 }, { 9.4245546e-06, 1.0010075e-05, 9.058324e-06, 9.8703427e-06 }, { -2.3441863e-06, 2.5490323e-05, -1.0097654e-05, 4.0554798e-05 }, { -4.1443921e-05, -1.996316e-05, -2.0000841e-05, -4.7495655e-05 }, { 0.00012591695, 5.6179903e-05, -1.8415869e-05, -3.8697972e-05 }, { 2.6719505e-05, 2.4195362e-06, 2.4287424e-05, 3.4703059e-05 }, { 7.3804931e-05, 4.9784871e-05, 3.1159931e-06, 0.00015857197 }, { -0.00010634331, -1.6427658e-05, -7.4874306e-05, -6.2620255e-05 }, { -4.2561214e-06, -1.6123179e-05, -1.5507273e-05, -1.2909924e-05 }, { -1.2210463e-06, 1.1546399e-06, 1.1413892e-06, -1.3465856e-06 }, { 3.4909884e-05, -1.2677793e-05, 0.00011543701, 2.413091e-05 }, { -2.1953323e-05, -4.6244252e-06, -3.5624435e-06, 4.2293671e-06 }, { -1.1392936e-05, -4.3970369e-06, -4.4264864e-06, -1.208518e-05 }, { -4.4002617e-05, 0.00020912348, -3.9617824e-05, -4.1725112e-05 } } }, { { { -0.32504349, -0.32502096, -0.32501094, -0.32423576 }, { -0.65602876, -0.65622598, -0.65567173, -0.65525128 }, { -1.4666488, -1.4666488, -1.4666488, -1.4666488 }, { 0.87168363, 0.87181364, 0.87181792, 0.8718169 }, { -1.264365, -1.264365, -1.264365, -1.264365 }, { 0.89917968, 0.89916889, 0.89916525, 0.89927374 }, { -1.2245906, -1.2245906, -1.2245906, -1.2245906 }, { -0.8885678, -0.88856217, -0.88856327, -0.88855044 }, { -0.31799095, -0.31916566, -0.31907669, -0.31918911 }, { -0.08987958, -0.090342401, -0.090004674, -0.090222398 }, { -0.59425693, -0.59433999, -0.59429118, -0.59433553 }, { 1.1317575, 1.1317475, 1.1317412, 1.1317494 }, { -1.2193493, -1.2193493, -1.2193493, -1.2193493 }, { 1.2506981, 1.250675, 1.250675, 1.2506569 }, { -1.08782, -1.0877793, -1.0878022, -1.0878025 }, { -0.13925598, -0.13932948, -0.13919658, -0.13913403 }, { -0.40394684, -0.4042314, -0.40436178, -0.40402218 }, { -0.47762966, -0.47745572, -0.47767784, -0.47713093 }, { -0.60177181, -0.60176862, -0.60177347, -0.60177079 }, { 2.7311956, 2.7311911, 2.7311911, 2.731191 }, { -1.3109856, -1.3109856, -1.3109856, -1.3109856 }, { 0.60942644, 0.60941369, 0.6094123, 0.60944198 }, { 0.55675448, 0.55672275, 0.55672303, 0.5567542 }, { -0.40637059, -0.4057945, -0.40635768, -0.40636681 } }, { { -0.0016154222, -0.0015930079, -0.0015828998, -0.00087447165 }, { -0.0011262472, -0.001324462, -0.00094895016, -0.00062188189 }, { 0, 0, 0, 0 }, { 9.7616744e-05, 0.00010718899, 0.00010718606, 0.00012665246 }, { 0, 0, 0, 0 }, { 0.00013476236, 6.982272e-05, 6.8208505e-05, 0.00014604742 }, { 0, 0, 0, 0 }, { -0.0031089951, -0.0031071196, -0.0031207245, -0.0031097054 }, { -0.0027808116, -0.0035049857, -0.0034100135, -0.0035192661 }, { -0.0018291474, -0.0019603285, -0.0018919656, -0.0019656229 }, { -0.0034301741, -0.0034912573, -0.0034474395, -0.0034893985 }, { -6.156701e-06, -9.8568527e-06, -1.2383692e-05, -9.9984205e-06 }, { 0, 0, 0, 0 }, { 0.00011838153, 0.00011008679, 0.00011008878, 0.00010536608 }, { -0.0006246638, -0.00058479459, -0.00061327452, -0.00061085433 }, { -0.0059197749, -0.0059778169, -0.0059586015, -0.0058798299 }, { -0.0013246996, -0.0016061786, -0.0016081246, -0.0014374546 }, { -0.001593227, -0.0014706843, -0.0015974008, -0.001341579 }, { -0.0027930604, -0.0027920013, -0.0027939865, -0.0027928528 }, { -1.8908723e-06, -4.266382e-06, -4.2210172e-06, -5.0155215e-06 }, { 0, 0, 0, 0 }, { 0.00018508026, 0.00019774537, 0.00019744661, 0.00019538593 }, { 2.3243747e-05, 1.7291398e-05, 1.7309712e-05, 2.9261396e-05 }, { -0.0041402471, -0.0037085946, -0.0041294876, -0.0041316136 } }, { { -0.0018899732, -0.0018719182, -0.0018661076, -0.0012234594 }, { -0.0012968123, -0.0012971446, -0.00093522854, -0.00066475268 }, { 0, 0, 0, 0 }, { 9.1054464e-05, 0.00014124217, 0.00014156806, 0.00012014953 }, { 0, 0, 0, 0 }, { 0.00017026995, 0.00010528413, 0.00010537941, 0.00015698848 }, { 0, 0, 0, 0 }, { -0.0025812972, -0.0025835894, -0.0025789321, -0.002554949 }, { -0.0035568863, -0.0042988014, -0.0042155548, -0.004312546 }, { -0.0024184575, -0.0025111277, -0.0024654994, -0.0023980076 }, { -0.0036993386, -0.0037113013, -0.0036987284, -0.0037094875 }, { -5.074861e-06, -1.1367399e-05, -1.4819989e-05, -9.2705899e-06 }, { 0, 0, 0, 0 }, { 0.00012570403, 0.00012150272, 0.00012149179, 0.00010579599 }, { -0.00062162762, -0.00058131015, -0.00060837583, -0.00060795256 }, { -0.00775735, -0.0077198081, -0.0078365948, -0.0077749317 }, { -0.0015325554, -0.0017125784, -0.001703195, -0.0015662859 }, { -0.0018130784, -0.00177106, -0.001858095, -0.0015845058 }, { -0.003668417, -0.0036659688, -0.0036693421, -0.0036680526 }, { -9.5804016e-06, -9.6276607e-06, -9.630607e-06, -1.2159056e-05 }, { 0, 0, 0, 0 }, { 0.00017930618, 0.00020084683, 0.00020150104, 0.00020810787 }, { 2.3869269e-05, 1.1024793e-05, 1.1041937e-05, 1.6467357e-05 }, { -0.004690782, -0.0044656761, -0.0046782065, -0.0046921455 } } }, { { { 0.23047932, 0.23043226, 0.23041471, 0.22922185 }, { 0.14990977, 0.15703656, 0.15110771, 0.15149153 }, { 0.30629171, 0.30426701, 0.30400037, 0.30403889 }, { 0.03476576, 0.036188528, 0.036216719, 0.037322097 }, { 0.31066251, 0.31090363, 0.31041565, 0.31057779 }, { 0.04875259, 0.046468595, 0.046486323, 0.046584523 }, { 0.31745458, 0.31874472, 0.32086369, 0.31880207 }, { 0.64054942, 0.64062862, 0.64051973, 0.64059059 }, { 0.27309038, 0.27480819, 0.27477284, 0.27486762 }, { 0.196647, 0.19687982, 0.19607604, 0.1957915 }, { 0.32867362, 0.32858008, 0.32856702, 0.328555 }, { -0.0026873031, -0.0042393446, -0.0057894907, -0.0041858859 }, { 0.40254624, 0.4024247, 0.4025598, 0.40243731 }, { 0.019362807, 0.018146218, 0.018146051, 0.019656613 }, { 0.29328089, 0.29403937, 0.29435036, 0.29403094 }, { 0.57111506, 0.57118505, 0.57099608, 0.57099266 }, { 0.16966612, 0.16993739, 0.17069399, 0.16991136 }, { 0.14989055, 0.1489484, 0.14995985, 0.15015916 }, { 0.33606014, 0.33606294, 0.33606393, 0.33605429 }, { 0.015421206, 0.015180692, 0.01518037, 0.015431139 }, { 0.33165237, 0.33185282, 0.33162592, 0.33166981 }, { 0.078137018, 0.078153855, 0.078165152, 0.078332343 }, { 0.002896946, 0.0026038621, 0.0026029604, 0.0022081151 }, { 0.41064398, 0.40987685, 0.41065341, 0.41059166 } }, { { -0.0024316111, -0.0024732789, -0.0024922144, -0.0035874346 }, { 0.0013306961, 0.004171802, 0.0027660627, 0.0023671465 }, { 0.0034411091, 0.0020878413, 0.0020874456, 0.0022028237 }, { -0.0032873976, -0.0021351911, -0.0021071363, -0.0028424534 }, { 0.0017995208, 0.0022319618, 0.0039270256, 0.0021249365 }, { -0.0019590835, -0.0012526895, -0.0012347747, -0.0021069943 }, { 0.0012319531, 0.002255621, 0.0030193583, 0.0020970822 }, { 0.0015144077, 0.0015110104, 0.0014803089, 0.0015340007 }, { -0.0036679996, -0.0028160114, -0.0028586497, -0.0027953731 }, { -0.005445786, -0.0052624873, -0.0054843188, -0.0053271749 }, { 0.00067154572, 0.0007530775, 0.00067974516, 0.00074462315 }, { -0.0035626119, -0.0034186877, -0.0038720517, -0.0040088745 }, { 0.003455851, 0.0035040061, 0.0034671486, 0.0035069881 }, { -0.0047789747, -0.0047994804, -0.0047996451, -0.0044008337 }, { 0.0032403482, 0.0033627856, 0.003429619, 0.0031153117 }, { -0.005027022, -0.0049812, -0.0049604573, -0.0050556194 }, { -0.0020728991, -0.0014784158, -0.001216894, -0.0019213729 }, { -0.00013808007, -0.00067270623, -0.00024001574, -0.00030691077 }, { 0.0004367104, 0.00043390709, 0.00043548166, 0.00043425516 }, { -0.00082746467, -0.00088151411, -0.00088152334, -0.0008043643 }, { 0.0030277712, 0.003133577, 0.0028529862, 0.0030362271 }, { -0.0058721937, -0.0059816331, -0.0059799345, -0.0058882832 }, { -0.0057032562, -0.0057401855, -0.0057416619, -0.0062417688 }, { -0.0014357888, -0.0020782049, -0.0014346823, -0.0014513767 } }, { { -0.0027051235, -0.0027087245, -0.0027052303, -0.0033594951 }, { 0.0028036195, 0.0030416572, 0.0014306948, 0.0017897371 }, { 0.0031113166, 0.0026432303, 0.0025937824, 0.0025394463 }, { -0.0036032904, -0.003447065, -0.0034344406, -0.0024163572 }, { 0.0023912799, 0.0025281229, 0.0038665087, 0.0024214034 }, { -0.0023543827, -0.0024294943, -0.0024539784, -0.0027742617 }, { 0.0020903896, 0.0026617586, 0.003395249, 0.0026261065 }, { 0.0019031008, 0.0019405475, 0.0019426085, 0.0019404325 }, { -0.0040413326, -0.0030964835, -0.0031020735, -0.0030826754 }, { -0.0064568993, -0.0062342438, -0.0064704698, -0.0065636744 }, { 0.0010788406, 0.0010092051, 0.0010264121, 0.00099891228 }, { -0.0040759201, -0.0059224283, -0.0066809927, -0.0049099348 }, { 0.0042962009, 0.0041909175, 0.0043195236, 0.0041900138 }, { -0.0062728983, -0.0070256154, -0.007025641, -0.0061758746 }, { 0.0036210401, 0.0039723998, 0.0042232048, 0.0042757707 }, { -0.0058693852, -0.0058583303, -0.0058544016, -0.005887725 }, { -0.0023099876, -0.0021136245, -0.0017298078, -0.0022483337 }, { -0.00017851962, -0.00014956209, 8.5676316e-05, -0.00024971669 }, { 0.0003734781, 0.00037078986, 0.00037364181, 0.00037070594 }, { -0.00030648905, -0.00038230535, -0.00038223043, -0.00028623253 }, { 0.0032871423, 0.0034163052, 0.0028276655, 0.0032991918 }, { -0.0061331695, -0.0063319797, -0.0063340119, -0.0064390374 }, { -0.0062172888, -0.0059787106, -0.0059793294, -0.0060406701 }, { -0.0018276142, -0.0022170788, -0.0018293949, -0.0018222824 } } } }, { { { { 0.13218089, -0.11654637, -0.11622196, -0.044208736 }, { 0.0074579257, 0.0038503609, 0.0013201096, 4.0415784e-05 }, { -0.025474487, -0.01209255, -0.016535858, 0.012704547 }, { -0.0016894103, -0.0081312144, -0.0033264609, 0.0011923269 }, { -0.068044876, 0.018276873, -0.074833897, 0.01308348 }, { 0.02665691, 0.013515118, 0.026440814, -0.0077037816 }, { 0.0023286096, -0.0025782652, 0.0021644694, -0.0042955294 }, { 0.051356261, -0.031058382, -0.085382962, -0.033103269 }, { -0.081609229, 0.0035270199, -0.015722417, 0.048773789 }, { 0.0023928418, -0.001243811, 0.011910492, -0.011621478 }, { -0.028953904, -0.029335777, -0.0057891432, 0.013874136 }, { -0.012473582, 0.001772629, -0.013983442, 0.014846792 }, { -0.016111661, 0.0018902323, 0.025910586, 0.042848276 }, { 0.026200626, 0.024007879, 0.0017667146, -0.016394032 }, { -0.0067006429, -0.0017968936, 0.009028659, 0.0044060413 }, { 0.019280611, 0.0449581, -0.042852227, -0.066012332 }, { -0.014451123, -0.047772741, -0.047475406, 0.098434178 }, { -0.0028954635, 0.010521833, -0.015741597, -0.00091666191 }, { 0.0020291956, -0.057966746, -0.04525094, 0.032711614 }, { 0.020563445, -0.0078684621, -0.015282237, -0.0019830466 }, { -0.019504171, 0.071338511, 0.0033729474, -0.0095772339 }, { 0.013056103, 0.018719519, 0.0096002937, -0.028774366 }, { -0.00038728577, -0.0010662982, -0.0014333502, 0.00059135695 }, { 0.073844752, -0.05666013, -0.1007151, -0.030440738 } }, { { 0.00017766639, -9.2398532e-05, -3.9442682e-05, -3.9559848e-05 }, { -0.0043956477, 0.00044042277, -0.00047491077, 9.4171117e-05 }, { -0.0042095545, -0.00910753, -0.0014295282, 0.0042595844 }, { 0.00070989004, -0.0009623012, 0.00084162653, -0.00015925965 }, { -0.0017587638, 0.0033199811, -0.00025544613, 0.00083644978 }, { 0.0051797987, 0.0015691893, -0.002324397, 0.0050776381 }, { 0.003911779, 0.00072639703, 2.102924e-05, -0.0029529332 }, { 0.0050240476, -0.00041452319, 3.1730448e-06, -0.0072697591 }, { -1.5023048e-05, 0.00032491246, -9.2151952e-05, 0.0035851726 }, { 0.0030984373, 0.0016428856, 0.0032974124, -0.0036034289 }, { -0.00044578206, -0.0035916409, 0.0028146658, 0.0068013321 }, { 0.00025716711, -0.0024772152, 0.0029660992, -0.0008783244 }, { -0.005543602, -0.00046453249, 0.006815884, 0.0069207512 }, { -0.0033541738, -0.0015140333, -0.004071746, -0.0020908789 }, { 0.0027932918, -0.0012517158, -0.0033509184, -0.001271572 }, { 0.0043481525, -0.00088858735, -0.0081538059, 0.00027985077 }, { 7.4017523e-05, -7.0080388e-05, -7.1766386e-05, 0.00020468758 }, { 0.00044507396, 0.010179106, -0.0048087449, 0.0013487105 }, { 0.00082148695, -0.00042640153, -0.0024255173, 0.0044486011 }, { -0.00026383509, -0.0031871528, -0.008203704, -0.00053957093 }, { -0.0002996462, 0.00070789605, 7.9300612e-05, -0.00024002209 }, { 0.0013722116, 0.0049176054, 0.0029283062, -0.000849108 }, { 0.00026545039, 0.0011783443, 0.00072103548, -0.0007355776 }, { 0.002192273, -0.00294318, 1.5452606e-05, -0.0020953993 } }, { { 2.4074136e-05, -2.4931598e-05, -1.0893587e-05, 1.080951e-05 }, { -0.0061635883, -0.0042963493, -0.00177783, -0.00080292808 }, { 0.0047868795, -0.0050472436, 0.0082439123, -0.0090979713 }, { 0.0017221077, 0.0067285193, 0.0031011872, -0.0019932567 }, { 0.0010926271, -0.0012170693, 0.00012875612, 0.00016441623 }, { -0.0048786273, -0.0041225634, -0.005591426, 0.0043469593 }, { -0.0070664098, -0.0012625813, -0.00022220241, -0.0026120468 }, { -0.0026689917, 0.00030860545, 1.9297947e-05, 0.001274799 }, { 0.0026769559, 0.00016106032, 0.00013829246, -0.0017239107 }, { -0.0042495789, 0.0010270326, -0.00078224804, -0.0019210019 }, { 0.0072385804, 0.0086418476, 0.0061428272, -0.0027142827 }, { 0.0019768127, -0.00057957046, 0.0047464783, -0.004599565 }, { 0.0093618867, -0.0010476542, -0.0038681572, -0.0065219521 }, { -0.0076406673, -0.0036729355, -0.0068804827, 0.0077571478 }, { 0.0012706397, -0.00042567505, -0.002521821, 6.0288127e-05 }, { -0.002041411, 0.000430125, 0.0073620925, 0.0021579456 }, { 0.00012145466, 4.1276616e-05, 4.2449608e-05, 9.8351262e-05 }, { 0.0014376278, -0.007439719, 0.0039006971, 0.00051135138 }, { -7.1665367e-05, 0.00023856335, 0.00015274881, -0.0096946274 }, { -0.00076804256, 0.0040182915, 0.012603411, -0.00059669891 }, { -0.00010641981, -0.00052355992, 0.00057481361, 0.00016456343 }, { -0.0027623375, -0.0036761364, -0.010480297, 0.0066006902 }, { 0.00049081404, 0.00077264749, 0.0021355718, -0.00029188425 }, { 0.00028566818, 0.00097678458, 0.00089022281, -0.00013760767 } } }, { { { -0.0098123577, 0.11017117, 0.11245143, -0.01173447 }, { 0.0036188505, -0.0025878518, -0.00043343726, -0.0038813197 }, { 0.013109746, -0.016775181, -0.0011093308, 0.00083465721 }, { -0.0042515898, -0.0028159364, 0.00027829209, -0.002907578 }, { -0.0081027554, -0.0019330574, 0.061872524, -0.037539524 }, { -0.012923735, 0.021011524, 0.002680406, 0.0034369108 }, { 0.0027819214, 0.0028657905, -0.0034177203, -0.0037322329 }, { -0.0036178174, 0.065792163, 0.13263475, 0.0055427994 }, { 0.027832309, -0.083372016, -0.058757582, 0.016164879 }, { -0.0082343898, 0.011782416, 0.011496052, -0.0027847616 }, { 0.0012516658, -0.014686832, -0.025073035, -0.020700577 }, { 0.0055718234, -0.011543219, -0.012867689, -0.0049474286 }, { 0.028869265, -0.035431559, 0.024976635, -0.01063055 }, { -0.0010657662, 0.014977146, 0.027109, 0.01612865 }, { -0.0021697493, 0.0044220507, 0.0055654161, -0.0032373397 }, { -0.018500666, -0.01979267, -0.0068480612, 0.03908391 }, { 0.063306878, 0.01934691, 0.019254616, -0.099824471 }, { 7.0580666e-05, -0.0015082457, -0.0056893693, 0.00022726294 }, { 0.0077067654, -0.014018834, -0.021406454, -0.0076589993 }, { -0.0013072394, 2.6765854e-05, 0.0028400803, 0.0037431063 }, { -0.025369581, -0.064039908, -0.020594137, -0.086807367 }, { -0.033639351, 0.010434758, 0.00082983507, 0.013145885 }, { 0.00029373395, 7.8193614e-05, 0.00048496415, 0.00062972215 }, { -0.0041597628, 0.024283117, -0.030148407, 0.011456515 } }, { { -1.3484857e-05, -3.7204145e-05, -1.5660577e-05, -2.4497955e-05 }, { -0.0068070249, 0.0041035892, 0.0034647689, 0.0035918321 }, { -0.0053613309, 0.0080593503, 0.0028507084, -0.0023104987 }, { 0.0048581064, 0.0039720065, -0.0019058129, 0.0047295789 }, { -0.00030675956, -0.0007787587, -0.00025201217, 0.00020777843 }, { -0.00026433336, -0.0093672701, -0.0053201627, -0.0059632173 }, { -0.0063062815, 0.0011995204, 0.0001870407, 0.0028197877 }, { -0.00053247524, -0.00066138217, -1.4959372e-05, -0.00036023628 }, { 0.00027591427, 0.00011309835, 2.2453632e-05, -0.00075736359 }, { 0.0015654886, 0.0018114616, -0.0004503446, -8.5866048e-05 }, { 0.003501393, 0.0037179893, 0.008328543, 0.013411108 }, { -0.0035136609, -0.0015054003, 0.0011903964, 0.0022551358 }, { -0.0083723767, 0.0061303554, -0.008056962, 0.0035035183 }, { -0.0023715655, -0.0070468331, -0.010219655, -0.0057856465 }, { -0.0011406634, -0.00021204595, -0.001693195, 0.0011051597 }, { 0.0011643412, 0.00037557194, 0.0048567739, -0.00063996433 }, { -3.1728174e-05, -2.9073903e-06, -3.0243209e-06, 2.579239e-05 }, { 0.00053152589, 0.0029635352, 0.0040743289, -0.00051381046 }, { -0.0017253584, 0.00012081524, 0.00012243664, -0.00063598215 }, { 0.0026711847, -0.0020733972, -0.0027860744, 0.0017065643 }, { 5.7762902e-05, 0.00092043577, -0.0035278882, 0.0007846087 }, { 0.0056127705, -0.0051893669, -0.0027072408, -0.0025630045 }, { -0.00059289151, -0.0004168408, -8.8118696e-05, -0.00073538101 }, { 0.0003388606, -0.00094234652, 3.013109e-05, -0.0010532484 } }, { { -2.9013996e-05, 6.1983083e-05, 2.8401438e-05, -3.4901557e-05 }, { 0.0045230474, -0.0021369843, -0.00422706, -0.0018918027 }, { 0.00017586142, 0.005389053, 0.0071352982, -0.0018278685 }, { -0.0012135723, -0.0035970727, 0.00078957165, -0.0017065397 }, { -0.00067051937, -1.9501585e-05, 4.1968766e-05, -0.0010958091 }, { -0.0015277626, -0.0039952533, -0.00049631478, 0.0018042745 }, { 0.0039376754, -0.00097834328, 6.5894634e-06, -0.0044189106 }, { -0.00067623039, 0.0004690807, 1.4532105e-07, 0.0032984829 }, { 0.0020787449, -0.0016586579, -0.00062367064, 0.0021545362 }, { 0.0016427801, 2.6710288e-05, 0.0016011535, -0.00077649869 }, { 0.0039999622, -0.0014968097, -0.0025647576, 0.0022783424 }, { 0.001558454, -0.00083803058, 0.0018955692, 0.0010432376 }, { 0.010555722, -0.010395022, 0.0050354965, -0.0016177699 }, { 0.00011370745, -0.009328355, -0.0063009522, 0.0024377458 }, { -0.00024433189, 0.00052920244, -0.0013213352, -0.0013503982 }, { -0.0057620093, 0.00095391746, -0.0034768563, 0.00093990705 }, { 0.00012108024, 4.1007202e-05, 4.2193381e-05, -0.00011043617 }, { 0.0038593696, -0.00074282979, -0.0093457897, 0.00027311164 }, { 0.0021514797, -7.8742315e-05, -0.0018813077, -0.0017625098 }, { 0.0038491118, 0.00022570776, -0.0061331041, 0.00014956617 }, { -0.00014676603, -0.00025053931, 0.003376287, -0.00014730695 }, { 0.0016439646, 0.0060569792, 0.00063058918, -0.0034810156 }, { 0.00011722835, 0.00032237223, -0.0012556553, -0.0006887808 }, { 0.00060814722, 0.0003708376, -0.00056515636, -0.00016801817 } } }, { { { 0.99117704, 0.98705585, 0.98683693, 0.9989534 }, { 0.99996564, 0.99998924, 0.99999903, 0.99999247 }, { 0.99958951, 0.99978616, 0.99986266, 0.99991895 }, { 0.99998953, 0.99996298, 0.99999443, 0.99999506 }, { 0.99764936, 0.9998311, 0.99527468, 0.99920949 }, { 0.9995611, 0.99968788, 0.99964679, 0.99996442 }, { 0.99999342, 0.99999257, 0.99999182, 0.99998381 }, { 0.99867384, 0.99734987, 0.98748052, 0.99943657 }, { 0.99627571, 0.99651225, 0.99814846, 0.99867903 }, { 0.99996323, 0.99992981, 0.99986298, 0.99992859 }, { 0.99957996, 0.99946171, 0.99966886, 0.99968945 }, { 0.99990668, 0.9999318, 0.99981943, 0.99987754 }, { 0.99945334, 0.99937032, 0.99935219, 0.99902503 }, { 0.99965614, 0.99959957, 0.99963092, 0.99973552 }, { 0.9999752, 0.99998861, 0.99994375, 0.99998505 }, { 0.99964293, 0.99879278, 0.99905795, 0.99705307 }, { 0.99788947, 0.99867085, 0.99868681, 0.99012413 }, { 0.99999581, 0.99994351, 0.99985991, 0.99999955 }, { 0.99996824, 0.99822008, 0.99874627, 0.99943549 }, { 0.9997877, 0.99996904, 0.99987919, 0.99999103 }, { 0.99948785, 0.99539425, 0.99978223, 0.99617908 }, { 0.99934875, 0.99977032, 0.99995357, 0.99949949 }, { 0.99999988, 0.99999943, 0.99999886, 0.99999963 }, { 0.99726107, 0.99809817, 0.99445842, 0.99947091 } }, { { -2.3481737e-05, -6.7307406e-06, -2.8605869e-06, -2.0372001e-06 }, { 6.6885689e-05, 4.5630281e-06, 3.5788218e-05, 1.0842484e-05 }, { -4.9278613e-05, -2.4660601e-05, 3.1625301e-06, 0.00019708279 }, { 1.2439158e-05, 3.0347865e-05, 8.6153947e-06, 1.0887256e-05 }, { -0.00012454598, -6.513709e-05, -3.5853483e-06, -3.4708286e-06 }, { -0.00013746339, 0.00013516333, 8.4535039e-05, 5.693766e-05 }, { -2.3674091e-05, -3.4690053e-06, 5.3812265e-07, -1.7613197e-05 }, { -0.00025790043, 3.0475251e-05, 2.1174795e-06, -0.00023630753 }, { -8.8624748e-06, 7.9175589e-06, -2.4258477e-07, -0.00017288313 }, { 4.0061469e-05, 0.00069846663, -0.00060299476, -0.00015396968 }, { 5.0667108e-06, 2.306363e-05, 0.00028636884, 3.6246633e-05 }, { 0.00032740524, -0.00037985037, -0.00014841039, -0.00012676016 }, { 8.7000758e-05, 0.00018530207, 1.7669124e-05, -0.00023199594 }, { 9.2332094e-05, 0.00013487652, 0.00034587506, -3.8853378e-05 }, { 6.9809868e-05, -0.00015411544, 0.0013505166, 1.4531796e-06 }, { -6.3782301e-05, 4.8545135e-05, -0.00027083794, 4.5129465e-05 }, { 3.0912438e-06, -3.2982361e-06, -3.3551612e-06, -1.7781589e-05 }, { 9.872609e-06, -2.9944213e-05, -4.5592652e-05, 1.5950681e-05 }, { 1.4767773e-05, -2.2486726e-05, -0.00010613341, -0.00015794394 }, { 2.4386215e-05, -1.1610334e-05, -4.4456294e-05, -5.0215596e-06 }, { -4.2741558e-06, 8.7714242e-06, -6.6343322e-05, 6.7010735e-05 }, { 0.00016489767, -3.3636771e-05, 5.1610504e-05, 5.2803593e-06 }, { 1.1649256e-05, 2.1169993e-05, 1.9755999e-05, 1.3389438e-05 }, { -0.00015815197, -0.00014316145, 2.6536218e-06, -4.6846396e-05 } }, { { -3.5109783e-06, -9.8530632e-06, -4.5020804e-06, 6.9233235e-08 }, { 9.9938991e-06, -2.0914089e-06, 3.5717699e-05, 3.2813664e-06 }, { 0.00012938219, 1.111062e-05, 8.0858608e-05, 0.00018147439 }, { 4.8657525e-06, 8.6580257e-06, 3.6742927e-06, 3.5828406e-06 }, { 6.9905696e-05, 2.0985073e-05, 6.8866215e-06, -4.2552499e-05 }, { 0.00012100208, 9.7821801e-05, 0.00013576456, 6.3686234e-05 }, { 1.954525e-06, -1.0727343e-06, 5.2332444e-07, -5.4034988e-06 }, { 0.00013699813, -2.226833e-05, 1.4994043e-06, 1.7110377e-05 }, { 0.0001678261, -0.00013844113, -3.4281745e-05, 5.3854072e-05 }, { -1.3018868e-05, 0.00022176303, 0.00016983401, 0.00038109805 }, { 0.00019016068, 0.00023448876, 2.643329e-05, 4.6842203e-05 }, { -1.2492528e-05, -0.00059486605, 0.00012427061, 8.1876965e-05 }, { 8.400564e-05, -0.00029859163, -4.884214e-05, 0.0002631806 }, { 0.00019907281, 0.00014046808, 0.00015482448, 4.0461099e-05 }, { -0.00024349239, 0.00081298441, 0.00084294728, 7.9617963e-05 }, { -6.0040835e-05, 3.2352918e-07, 0.00024295599, 0.00011067283 }, { -6.0027092e-06, 1.1975092e-06, 1.2248893e-06, -2.1293392e-05 }, { 1.4478736e-05, 6.8326918e-05, -7.8693614e-06, 9.2888155e-06 }, { -1.6982828e-05, 1.2094341e-05, -3.1693808e-05, 0.00028574477 }, { 3.4480942e-05, 2.6556008e-05, 0.00016193956, -1.8966503e-06 }, { -5.7726961e-06, 2.1091148e-05, 5.8963955e-05, -1.0834372e-05 }, { 0.0001214393, 1.4174882e-05, 0.0001371836, 0.00021757165 }, { 1.0140226e-05, 6.1641031e-06, 1.0590727e-05, 1.0893212e-05 }, { -1.7442656e-05, 4.2353331e-05, 7.4324714e-05, -1.9484775e-06 } } }, { { { 3.7217719, 3.6900797, 3.6899881, 3.6670816 }, { 0.067826319, 0.16468028, 0.083129199, 0.1336756 }, { 0.66338737, 0.23883566, 0.093361469, 0.10095622 }, { 0.27185537, 0.20781392, 0.32216624, 0.29876595 }, { 2.0776462, 2.0006156, 2.0243138, 2.080345 }, { 0.57695783, 0.18015147, -0.11440889, 0.14229144 }, { 0.63833683, 0.41431062, 0.44752994, 0.47594414 }, { 1.7890608, 1.962584, 1.9322155, 1.6588331 }, { 3.0538128, 3.108267, 3.1001573, 2.9593433 }, { -0.28383051, -0.27708376, -0.042513902, -0.085181891 }, { 0.3873435, 0.41697884, 0.39625427, 0.33250735 }, { -0.33498881, -0.40206929, -0.028905862, -0.48179632 }, { 1.1875033, 1.3535177, 1.2526197, 1.3337495 }, { 0.42579488, 0.24951727, 0.18976118, 0.20605317 }, { -0.53212666, -0.3861028, -0.75685995, -0.23411882 }, { 1.6910165, 1.686815, 1.5906473, 1.6528217 }, { 4.0570657, 4.0349492, 4.0350332, 4.0498099 }, { -0.017225465, -0.032503897, 0.46003211, 0.21602109 }, { 1.1196901, 1.00885, 0.91675568, 0.99635794 }, { -0.093891275, 0.0809352, -0.13783332, 0.27130678 }, { 1.9925136, 1.9829394, 1.8820721, 1.9542026 }, { 0.84563763, 0.48476746, 0.37907152, 0.70267878 }, { 0.37054708, 0.4228574, 0.6329822, 0.26197064 }, { 1.9618393, 1.8405969, 1.9440918, 1.901629 } }, { { -5.6047186e-06, 6.0454847e-06, 2.8365975e-06, 6.0894367e-06 }, { -0.00069876506, -0.00029642785, -0.00059516082, -0.00025400441 }, { -0.00020850504, -0.00012959593, -0.00032902532, -0.00058117893 }, { -0.00037901964, -0.00038062016, -0.00023777964, -0.00033714679 }, { -5.9894351e-05, -9.820791e-05, -5.9867157e-06, -6.258549e-06 }, { -0.00035424038, -8.7146215e-05, 3.0398362e-05, -0.00061406521 }, { 0.00014971442, 4.5936211e-05, -5.6259869e-06, 0.00013567035 }, { -0.00016180211, 3.1840487e-06, 3.8979157e-07, -0.00017131994 }, { -1.9877193e-05, 2.5768261e-05, 9.0577543e-06, -0.00013927462 }, { -0.0012323564, -0.00042892846, 7.2082106e-05, 0.00010999853 }, { -0.00034618449, -0.00017058897, -0.00016535057, -0.00096982024 }, { -0.00028039653, -7.155747e-05, -0.00075796707, 0.00062756458 }, { 6.6596276e-05, -7.9730809e-05, -8.0686754e-05, -2.9532397e-05 }, { -0.00084106867, -0.00036762453, 0.00012523548, -0.00052789663 }, { 7.6718268e-05, -0.0010042005, -0.00042802983, -0.0011951304 }, { -3.6972258e-05, 2.1447505e-06, -0.00035448623, -1.0620008e-05 }, { 2.8326169e-05, 2.2049468e-05, 2.2640575e-05, 1.7574827e-05 }, { -0.00014318496, -0.0004811524, -0.00049293303, -0.00067646484 }, { -2.7469144e-05, -5.9653763e-06, -1.3998899e-05, -0.00018475323 }, { -0.00017314302, -0.00010954727, -0.00040004932, 3.31106e-05 }, { -3.6093435e-06, -1.6125243e-05, -4.9195648e-05, 1.5586886e-05 }, { 0.0002059631, -0.0004024722, -0.00047984678, -9.8485329e-05 }, { -0.00094100913, -0.00073046048, -0.00052500163, -0.00068196784 }, { -2.2820197e-05, -5.9454557e-05, -6.2505468e-06, -2.6569804e-05 } }, { { 2.6015883e-05, 8.5398335e-06, 3.8473185e-06, 9.1409625e-06 }, { -0.00041459247, -0.0001855224, -0.00030529542, -0.00016322166 }, { -8.8427847e-05, -0.0002302048, -0.00038072959, -0.00076801295 }, { -0.00027717792, -0.00028594346, -0.00017910208, -0.00027291164 }, { 2.8409311e-05, -3.8005817e-05, -4.2266878e-06, -1.4520383e-05 }, { -0.0001088827, -0.00021924377, 3.9307406e-05, -0.00032488556 }, { 0.00027997916, 3.5103699e-05, -5.7448764e-06, 0.00010259251 }, { -4.7807894e-06, -2.9470863e-05, 2.6656233e-07, -0.00014346393 }, { 0.00015527098, -6.8528726e-05, -1.1206714e-05, 2.3422595e-05 }, { -0.0012763247, -0.00051503472, 0.00058055106, -0.00068688488 }, { -6.1232076e-06, -1.7073841e-05, -0.00033533389, -0.00078769935 }, { -0.00044113485, -0.00027577451, -0.0012008622, 0.00013071136 }, { 1.834948e-05, -0.00015615102, -0.00016449385, 3.6685217e-05 }, { -0.00063618257, -0.00032641968, -5.0281118e-05, -0.00041378992 }, { -0.0010181884, -0.0003871932, -0.00050061147, -0.0018967455 }, { -5.7650067e-05, -5.1145774e-06, -0.00017409773, 1.9512036e-05 }, { 1.5838743e-05, 2.503655e-05, 2.5679098e-05, 2.0053218e-05 }, { -0.00018055811, -0.00044345237, -7.9049557e-05, -0.00095669161 }, { -4.98611e-05, -1.1320605e-06, 3.7756645e-06, -8.7299215e-05 }, { -0.00011794063, -0.00015778552, -0.00036514881, 4.7288704e-05 }, { -5.1753817e-06, -1.5040527e-06, -2.836739e-05, -9.4945229e-06 }, { 0.00016873335, -0.00031983601, -0.00052281245, 0.00019034815 }, { -0.0011988594, -0.0010684975, -0.00057577023, -0.0009143845 }, { 5.0336006e-05, -1.356148e-05, 1.5582694e-05, -2.0666272e-05 } } }, { { { 0.012207721, 0.0044164612, 0.0022704542, 0.0042008503 }, { 0.29516302, 0.139976, 0.35038027, 0.13748343 }, { 0.1462123, 0.12114907, 0.28473665, 0.45762717 }, { 0.17976664, 0.19141553, 0.1209483, 0.16393769 }, { 0.044254492, 0.11383095, 0.0062726904, 0.023550537 }, { 0.14785458, 0.10151341, 0.045717467, 0.42243971 }, { -0.24205201, -0.033590842, 0.0032064617, -0.093924041 }, { 0.10866955, 0.016299431, 0.00081631108, 0.15856447 }, { 0.10108337, 0.057931152, 0.024463589, 0.21514346 }, { 0.47967783, 0.75472932, 0.5653649, 0.64752457 }, { 0.30082544, 0.15124922, 0.23567284, 0.47161499 }, { 0.54286166, 0.61049777, 0.61641378, 0.51181399 }, { 0.39328762, 0.25557559, 0.25875912, 0.22436901 }, { 0.45699569, 0.16989563, 0.2429263, 0.3924359 }, { 0.92996797, 1.1024806, 0.78045387, 1.2298879 }, { 0.19029829, -0.022675055, 0.28113642, 0.034941166 }, { 0.013203939, 0.013034069, 0.013414649, 0.011688038 }, { 0.076026927, 0.13838472, 0.29961655, 0.31531564 }, { 0.089182386, 0.010401684, 0.029374547, 0.22995838 }, { 0.052198894, 0.039866726, 0.11570972, -0.013818992 }, { 0.0062380932, 0.01788119, -0.20765047, 0.013339281 }, { 0.12436441, 0.17318651, 0.21554136, 0.18600144 }, { 0.38005287, 0.32135548, 0.28632777, 0.29211902 }, { 0.03798742, 0.0450845, 0.010912505, 0.039060104 } }, { { 0.00077914246, 0.00011130803, 8.1110229e-05, -0.00035312557 }, { 0.00051711901, 0.00029701387, 0.00040733345, 0.00034149723 }, { 0.00063893978, -0.00013702086, 0.00030866699, -0.00020070677 }, { 7.5899443e-05, 9.7456273e-05, -4.5352178e-05, 7.6172703e-06 }, { 0.00066250814, -0.00073033349, 0.00015225542, -0.0010197351 }, { 0.00040931533, -0.00043022747, 0.00093333285, 0.0002579685 }, { -0.00067488578, -0.0003706974, -0.00044487256, -0.00056555959 }, { 0.00075838366, -0.0021903789, -0.0026744174, -0.00047135202 }, { -0.00081050821, -0.0010297809, -0.00099480849, -0.00074914246 }, { 0.00063637392, 5.248783e-05, 0.00044645091, 0.00018028446 }, { 0.00067430392, 0.0004762628, -0.00032736685, 0.00041933609 }, { 6.2324555e-05, -1.6709531e-06, 0.00057418116, -0.0010360999 }, { -0.00038256183, -0.0010104012, -0.00045533693, -1.3888404e-05 }, { 0.00068274628, 0.00068411875, -0.00091273333, 0.00016211145 }, { -0.00039440715, 0.00027665323, -0.00035895503, 0.00013423207 }, { -0.00061939017, 0.00012140102, 0.00024178233, 0.00064755788 }, { -0.00052441128, -0.00050994483, -0.00051126044, 0.00066320373 }, { 0.00085915332, 0.0013567332, -0.00014328466, 0.00056098523 }, { -0.0012682676, 0.0029139719, 0.0019812291, -0.00053863027 }, { 0.0021895869, 0.00062956835, 0.0018161156, 0.00011699452 }, { -0.0010337306, 0.00016880497, -0.0014942346, -0.0034402453 }, { -0.0025336946, -0.00019468865, -0.00018045349, -5.4312149e-05 }, { 0.00021491979, 4.7651714e-05, -0.00044921151, 0.00046742044 }, { 0.0019408125, 0.00044842687, 0.0026003265, -0.00090116109 } }, { { -0.0006591255, 0.00022873584, 0.00026313866, -0.00060151354 }, { 0.00027198127, 0.00034252944, 0.00033246896, 0.00035232159 }, { -0.00034460639, -5.9085725e-05, 7.836454e-05, -0.00018946388 }, { 0.00018790551, 0.0001918358, 9.7031467e-05, 0.00015259869 }, { -0.0023033429, -0.0012945186, -0.00080964072, -0.00030432514 }, { -0.001359781, 0.00055828912, -0.00041912301, 0.00019263336 }, { -0.00042789448, -0.00018313775, -0.00030217124, -0.00028437496 }, { -0.0018340159, 0.00030654336, -0.00010781402, -0.0011985455 }, { -0.002103478, 0.00029492518, -0.00042283946, -0.001472689 }, { 0.00064558079, 0.00049703204, -0.00018932594, -0.00038268301 }, { -0.00097813334, -0.00057838807, 0.00079268109, 0.00039650774 }, { -0.00017335252, 0.00074363734, 0.0008194423, -0.00065923207 }, { -0.00075344545, -0.00026114262, -0.00054658657, -0.0013814943 }, { -0.00028279346, 0.00055730283, 0.00048990213, -0.00022186466 }, { 0.00013438509, -0.0001962818, -0.00036195953, 0.00042669461 }, { -0.00089003585, -0.0011600794, -0.0012554286, -0.0012892408 }, { -0.00067007058, -0.0010597247, -0.0010590421, 0.00044132516 }, { 0.0011626727, 0.001261033, -0.00072912018, 0.00076332442 }, { -0.001204702, -0.00011230019, 0.00036178615, -0.0017559004 }, { 0.00096282849, 0.001025959, 0.0011696947, 0.00046633555 }, { -0.00082328571, -0.00075771669, -0.0011629302, 0.00073458863 }, { -0.0016869269, -0.00035239862, -0.0004024204, -0.0016276971 }, { 0.00029053123, 0.00013409355, -0.00049087974, 0.00061969429 }, { -0.0013198997, -0.0018615784, -0.0025724061, -0.0015563017 } } } }, { { { { -0.072246889, -0.043157285, 0.043289306, 0.095998047 }, { 0.12597079, 0.24289541, -0.10930005, -0.24150539 }, { 0.031889347, -0.036238337, -0.014521983, -0.018963885 }, { -0.044155351, -0.0077170425, -0.043781059, 0.047982339 }, { 0.093995001, -0.0079510758, -0.04688882, -0.11125523 }, { 0.01700754, -0.0034361033, 0.055252382, -0.053119426 }, { -0.0014957087, -0.00063057103, 0.037930463, 0.017656646 }, { -0.017388477, -0.084085888, -0.067726647, 0.061397079 }, { -0.070625168, -0.061293011, -0.077366932, 0.11518646 }, { -0.14771316, -0.12543895, 0.052150789, 0.10530462 }, { -0.03609139, 0.001131616, -0.039549928, 0.03805765 }, { 0.064364205, 0.066758929, 0.045537002, -0.05510954 }, { 0.049051369, 0.098312455, -0.01079726, -0.11202623 }, { 0.033012208, -0.0013996988, -0.0049458824, -0.028981527 }, { 0.008617177, -0.00017670863, -0.0052380282, -0.0023438457 }, { -0.05901498, -0.050754807, -0.00011829844, 0.037297411 }, { -0.056264446, -0.03645315, -0.066412698, 0.019549244 }, { -0.11401603, -0.11856524, 0.12275022, 0.11635143 }, { -0.0011999881, -0.0016334327, -0.0056868938, 0.013393766 }, { 0.054526972, 0.033632235, 0.062591094, -0.0025531074 }, { 0.073041316, 0.073735243, -0.06935254, -0.11214186 }, { 0.034872822, -0.015473423, 0.037359975, -0.026829465 }, { -0.015137592, -0.0064462553, 0.011771178, 0.0025042048 }, { -0.038708904, -0.033968131, -0.044070885, 0.024422773 } }, { { -0.047895007, -0.016535938, 0.04855533, 0.018341613 }, { 0.004310087, 0.01519838, -0.0033290683, -0.013597406 }, { 0.0015859181, 0.016869623, -0.019279963, -0.01426933 }, { -0.0061048976, 0.031131561, 0.018085381, -0.017927117 }, { 0.052590378, 0.0066156852, -0.0025756141, -0.037241705 }, { 0.0083512619, 0.0046235666, 0.024122126, -0.013443654 }, { 0.0010672274, 0.00053123301, -0.0016276029, -0.04221993 }, { -0.0048754166, -0.021474788, -0.0039993317, 0.011831691 }, { -0.054685347, -0.050242732, -0.007606251, 0.043061893 }, { -7.5644942e-05, 0.00086632318, 0.0001960729, 0.0013264286 }, { 0.0042413724, -0.0057181522, 0.0065940983, -0.0078263328 }, { 0.0031260881, -0.0013520907, 0.025073658, -0.010841673 }, { 0.038353769, 0.06620308, -0.0072105562, -0.079188681 }, { 0.003099559, -0.0022927921, 0.021982683, -0.018991144 }, { 0.012285675, 0.0091834074, -0.0041874571, -0.032253924 }, { -0.014563556, 0.009843969, -0.010490279, 0.012979866 }, { -0.005492286, 0.064109426, -0.034795617, -0.020395732 }, { -0.023364141, -0.059336321, 0.080710391, 0.038948527 }, { 0.0028384819, 0.001822471, 0.0012903958, 0.012781079 }, { -0.004510518, -0.0020008272, 0.0017752876, 0.0077607089 }, { 0.032279653, 0.0041906079, -0.034682371, 0.0061335907 }, { -0.0082992317, -0.025250117, -0.017026845, -0.028345042 }, { -0.013132125, -0.026688493, -0.0014827793, -0.003236826 }, { 0.01650781, 0.002313574, -0.012897922, 0.026077933 } }, { { 0.062668058, 0.0081578851, 0.018952049, -0.012267283 }, { 0.0008567722, 0.0033246009, -0.0037620102, -0.0096317368 }, { -0.0083012273, 0.01184624, -0.01209373, 0.020208536 }, { 0.013862003, 0.019166381, 0.013235471, -0.026788736 }, { -0.021904217, -0.051018749, 0.0020330268, 0.006626371 }, { -0.015856131, 0.0028024655, -0.032825412, -0.018920906 }, { 0.0020870233, 0.0011616727, -0.0032704368, -0.027327141 }, { 0.01934969, 0.002427195, 0.049925128, -0.0061414889 }, { 0.013158375, 0.022248445, 0.040266734, -0.017583455 }, { 1.9024812e-05, 0.00071602053, 0.0012622199, 0.0018791611 }, { -0.0011857767, 0.0023417924, 0.026237548, -0.014687892 }, { -0.041419782, 0.024942194, -0.029143101, 0.036590943 }, { -0.015470651, -0.035208671, -0.038530514, 0.037434376 }, { -0.0029356279, 0.0023358079, 0.017641055, 0.0038203652 }, { -0.0030449623, -0.010187444, 0.0066142145, 0.0037433206 }, { 0.0080034603, 0.011463159, -0.0058129532, 0.011831147 }, { -0.0091743137, 0.045949289, 0.022412137, -0.0067531419 }, { 0.00069946656, -0.0068974782, 0.0091806954, 0.0022160793 }, { -0.0027530077, 0.00089797627, 0.0066153093, -0.010355635 }, { -0.019399018, -0.0085762573, 0.0208003, -0.027739023 }, { -0.014354809, -0.011971089, -0.0031124986, 0.044710091 }, { -0.011411144, 0.0073253411, -0.0087561348, -0.014838738 }, { 0.018837992, 0.00231775, -0.013982978, -0.0020044658 }, { 0.0012069362, 0.0012202952, 0.029106153, 0.00062793994 } } }, { { { 0.054154158, -0.11603661, -0.025631275, 0.054671866 }, { -0.2359715, 0.093194255, 0.21874866, -0.08378526 }, { 0.0089903397, 0.0087113885, -0.015445726, 0.011142042 }, { -0.0055372249, -0.0041494086, -0.033355186, -0.010136823 }, { -0.015010227, -0.0077144008, 0.13058394, -0.016779666 }, { -0.015855009, 0.014090685, 0.026549575, 0.025677527 }, { -0.00065423811, -0.0011506403, 0.028628751, 0.0086359197 }, { -0.010571292, 0.035861454, -0.025871285, -0.024827688 }, { 0.00010603924, 0.011433504, -0.052819957, -0.020208661 }, { 0.12243361, -0.14574398, -0.10091072, 0.054524772 }, { -0.014659734, -0.02291001, 0.010102434, -0.0099333349 }, { -0.0079939087, 0.023468399, 0.044548395, 0.04568814 }, { -0.048188816, 0.016469102, 0.084818672, -0.040634065 }, { 0.015089138, 0.025396216, 0.017000121, 0.010820807 }, { -0.0098155552, -0.00080001495, 0.0020122754, -0.00046896909 }, { -0.0018906417, -0.03909342, -0.020339049, -0.024007559 }, { -0.0012744487, -0.027829333, -0.05202457, -0.024366779 }, { 0.10406956, -0.092281421, -0.050420166, 0.10716663 }, { -0.0049603976, -0.0055370076, -0.0016910106, 0.012172389 }, { -0.0026486448, 0.038673757, -0.0016176887, 0.052692494 }, { -0.03722357, 0.055455783, 0.067738953, -0.0087990582 }, { -0.0026491637, 0.017275247, 0.010687117, 0.020312052 }, { -0.0016032469, 0.0090272843, -0.0079027514, -0.0050039898 }, { -0.0073653412, -0.033150577, 0.0082912493, -0.021457881 } }, { { -0.0059001999, 0.033600833, 0.066374213, -0.018058548 }, { -0.0037864945, -0.0064946131, 0.0018627774, 0.0044899139 }, { 0.0048961861, -0.0034770968, -0.0002311598, -0.0053935761 }, { 0.0090090757, 0.012149811, 0.0029969663, 0.0049403543 }, { -0.042874682, -0.0083455851, -0.0064437344, 0.0010579362 }, { 0.011866873, -0.017157526, -0.014724976, 0.0054373752 }, { -0.0006329516, -0.00024834697, 0.0015416168, -0.014246989 }, { 0.031530357, -0.052715858, -0.0063186617, -0.0070200141 }, { -0.0082273844, 0.053856605, 0.0096812384, 0.01684635 }, { -0.00017150577, 0.00097354737, 0.0013944706, 0.00085166684 }, { -0.013604545, 0.0089329355, -0.013809086, 0.0025044469 }, { -0.020284731, 0.0004724419, -0.045697697, -0.01844702 }, { 0.017874081, -0.0040537465, -0.023316716, -0.026344708 }, { 0.0092557469, -0.014456327, -0.0092919835, 0.0091758924 }, { 0.016058873, 0.0019220807, 0.0031692823, 0.0024577167 }, { -0.021184352, 0.021287579, -0.0048442696, 0.0095799112 }, { 0.035229915, -0.054291919, -0.013871324, 0.035585241 }, { 0.001275203, 0.011513119, 0.020184769, -0.0061701639 }, { 0.011353237, 0.0052697685, 0.0047637419, -0.020278005 }, { 0.0068266296, -0.01173749, 0.037482577, -0.0083236299 }, { 0.025699221, -0.03651135, -0.032342446, -0.0059784486 }, { 0.0029540635, -0.0021598269, 0.0028168477, 0.0044577193 }, { 0.0038274002, -0.0050806333, 0.007628551, 0.0027461742 }, { 0.0056567464, 0.006846664, -0.031161558, -0.0040832656 } }, { { 0.025668431, 0.0093723617, 7.4324163e-05, -0.023051436 }, { -0.010148124, 0.0018159908, 0.0072269566, 0.00082671261 }, { 0.0069741056, 0.023493533, 0.028507618, -0.026874125 }, { 0.0083316277, -0.024891629, 0.013623217, 0.0038373532 }, { -0.020992516, 0.070912136, -0.0014634877, -0.015680371 }, { 0.02178962, -0.003772636, -0.024578501, -0.047467019 }, { 0.0028586275, 0.0033445767, 0.0049576063, -0.017365739 }, { 0.0075721122, 0.010652219, -0.024031886, -0.0001146548 }, { 0.016381176, -0.044765924, -0.038036229, -0.014041395 }, { -0.00082564842, 0.00033107944, 0.00073792054, 0.0005712734 }, { 0.0080934887, 0.014534447, -0.0071347609, 0.0085413493 }, { -0.018211778, 0.0064443848, 0.017393403, 0.011490985 }, { -0.071531366, 0.030059694, 0.049103287, 0.0074609412 }, { 0.00770209, -0.017999995, -0.040048679, -0.0029073853 }, { 0.020442166, 0.0019454488, -0.019644905, 0.021793285 }, { 0.035171271, 0.0080192155, -0.023151504, 0.014168348 }, { -0.048901887, -0.0039613606, 0.0021703807, 0.030275152 }, { 0.044666116, -0.029756153, -0.015570779, 0.034470632 }, { -0.0078700362, 0.0037551741, 0.0003070052, -0.0031237403 }, { 0.015288427, -0.01284757, -0.0075319169, 0.026981487 }, { -0.0093872483, 0.013517073, -0.030221944, 0.058356065 }, { 0.0042326205, -0.016381154, 0.021475001, 0.01008732 }, { 0.0034929117, 0.020531314, -0.0085114063, 0.004821913 }, { 0.014314413, 0.01127037, -0.017197896, 0.0046932185 } } }, { { { 0.99591552, 0.99230689, 0.99873374, 0.99387895 }, { 0.96356049, 0.96556546, 0.96964041, 0.96677566 }, { 0.99945097, 0.99930521, 0.99977525, 0.99975808 }, { 0.99900933, 0.99996161, 0.99848418, 0.99879675 }, { 0.99545951, 0.99993863, 0.99032786, 0.9936502 }, { 0.99972964, 0.99989482, 0.99811938, 0.99825798 }, { 0.99999867, 0.99999914, 0.9988702, 0.99980681 }, { 0.99979292, 0.99581299, 0.99736843, 0.99780458 }, { 0.99750292, 0.99805433, 0.99560254, 0.9931383 }, { 0.98142286, 0.98133774, 0.99352772, 0.9929441 }, { 0.99924096, 0.99973689, 0.99916652, 0.99922617 }, { 0.99789446, 0.9974931, 0.99796885, 0.99743448 }, { 0.9976331, 0.99501931, 0.9963379, 0.99287411 }, { 0.99934104, 0.99967648, 0.99984325, 0.99952138 }, { 0.9999147, 0.99999966, 0.99998426, 0.99999714 }, { 0.99825531, 0.99794572, 0.99979313, 0.99901579 }, { 0.99841509, 0.99894779, 0.99643504, 0.99951192 }, { 0.98801309, 0.98864879, 0.99115599, 0.98740957 }, { 0.99998698, 0.99998334, 0.9999824, 0.99983621 }, { 0.99850879, 0.99868574, 0.99803794, 0.99860752 }, { 0.99663402, 0.99573479, 0.99528974, 0.99365325 }, { 0.99938825, 0.99973103, 0.99924472, 0.99943364 }, { 0.99988413, 0.99993848, 0.99989949, 0.99998434 }, { 0.99922338, 0.99887297, 0.998994, 0.9994714 } }, { { -0.0050599833, 0.003362263, 0.0035202243, -0.00056864904 }, { -0.0014675187, -0.0029154981, -0.00077796172, -0.0027392627 }, { -0.0010916411, 0.00078232803, 0.0014339533, -0.0020166729 }, { 0.011183745, 0.008298699, 0.011631254, 0.00030693508 }, { -0.0012964861, -0.00028098882, 0.00098513135, -0.0052243577 }, { 0.0091119501, 0.002780703, 0.011045274, 0.00334383 }, { 4.1103001e-05, 5.5767744e-05, 0.0030605577, 0.0022152241 }, { 0.00085375099, 0.0026952672, 0.0071937971, 0.0056504112 }, { -0.003773118, 0.0047936307, -4.5743022e-05, -0.0038357994 }, { 2.3815581e-05, 0.0002468657, 0.00013492048, -0.00018410816 }, { 0.0070959632, -0.00205589, 0.0056417297, 0.0030702073 }, { 0.010671769, 0.0074346008, 0.0012867659, 0.0075437523 }, { -0.0013037272, -0.0058374269, 0.0025899757, -0.0071565118 }, { 0.0030041304, 0.0018011397, 0.0093160386, 0.0082062863 }, { 0.0053156934, 0.0036543193, 0.0048724246, 0.0035118324 }, { -0.0053866158, 0.0024053442, 0.00052459148, 0.0090970513 }, { 0.011239324, -0.0010327051, -0.00097551594, 0.0044180668 }, { -0.0024379533, -0.0088232426, -0.012355568, -0.0031875953 }, { 0.0026244123, 0.0011858999, 0.0028110843, -0.001005442 }, { 0.0059514328, 0.0018892606, 0.0050231625, 0.0046700575 }, { 0.00050741664, 0.0096547476, -0.00079618251, 0.0024532112 }, { 0.0058717468, -0.0017457656, 0.0080261577, -0.00048009588 }, { 0.0025457914, 0.0016788968, 0.0013982313, 0.00073909928 }, { 0.0075035778, 0.011234409, 0.0079271096, 0.006672353 } }, { { 0.0095152396, 0.0011785006, -0.00081996856, 0.0018904938 }, { -0.0025430397, -0.0010236291, -0.0020168276, -0.0021827861 }, { 0.0036295778, 0.005406882, 0.0040788276, -0.0057729163 }, { -0.00029952998, 0.0024548208, 0.0088548836, 0.0019084209 }, { 0.0034184324, -0.0088925589, 0.00023040452, 0.00017437939 }, { 0.0037804595, 0.012156355, 0.0041276361, 0.012721488 }, { 7.4846461e-05, 0.00010580108, 0.013483417, 0.0024239851 }, { 0.00026411032, -0.00059353627, 0.0093564271, 0.0061507538 }, { 0.0016065383, -0.0027764641, 0.0013620195, 0.0010062065 }, { 9.7127925e-05, 0.00017275393, 1.0814607e-05, -0.00022627793 }, { 0.0048710612, -0.00014794569, 0.0082832436, -0.00072595412 }, { -0.0027392579, 0.0066783951, 0.00087397132, 0.001567366 }, { -0.003378151, 0.0025916338, -0.0025553201, 0.0030152022 }, { 0.0096818399, 0.0012695523, 0.0072489949, 0.016881099 }, { 0.0022796191, 0.0051693266, 0.0023373397, -0.0041448561 }, { -0.0002074582, 0.0035962454, -0.0007460719, 0.0025086317 }, { 0.0035784996, 0.003162753, 0.0022592918, 0.00024595998 }, { -0.0051294944, -0.0041428868, -0.0027597, -0.0039539398 }, { 0.0022410392, 0.00031263884, 0.0016376751, -0.0022787113 }, { 0.0025647038, 0.0074733037, 0.0051722028, 0.0024463612 }, { 0.0011787227, 0.0071159753, 0.0017217143, 0.0062717989 }, { 0.0046836737, 0.0038976423, 0.00062832002, 0.0027638154 }, { 0.0014142926, 0.0024903802, 0.0015757227, 0.0011628587 }, { 0.0016928585, 0.0043828548, 0.001653268, 0.011450696 } } }, { { { 2.8886078, 2.8900127, 2.7925705, 2.7895874 }, { 4.5455217, 4.5284714, 4.7042338, 4.6915273 }, { 0.96672505, 0.99303664, 0.98927606, 1.0351588 }, { 1.2743756, 1.2525364, 0.99649566, 0.94572778 }, { 2.6910679, 2.6922168, 2.8503404, 2.8246076 }, { 1.256075, 1.2325025, 1.5911826, 1.6091223 }, { 1.3601759, 1.3606869, 1.2793533, 1.240925 }, { 2.0291828, 2.0506809, 1.7341658, 1.6555689 }, { 2.6663531, 2.6921882, 3.1290975, 3.11849 }, { 5.3676887, 5.3663279, 5.3848664, 5.3852162 }, { 1.0586431, 1.0865889, 0.8196623, 0.8076665 }, { 1.6967251, 1.7305944, 1.5450413, 1.6347879 }, { 3.0908857, 3.0706775, 3.2974343, 3.3053965 }, { 1.2172073, 1.3839086, 1.5086796, 1.4295506 }, { 0.97676668, 1.0856738, 0.98747912, 1.0385491 }, { 1.5662275, 1.4603538, 1.784278, 1.6575438 }, { 2.1085757, 2.2092885, 2.1410448, 2.1518347 }, { 4.0214776, 4.006424, 3.7686967, 3.7771354 }, { 1.2089239, 1.2116036, 1.1244311, 1.0901017 }, { 1.1827246, 1.1472796, 1.7516784, 1.7833976 }, { 2.2113439, 2.197512, 2.2692963, 2.2787751 }, { 0.98819531, 1.057833, 1.3587301, 1.3890421 }, { 1.208957, 1.2247867, 1.2301205, 1.2325178 }, { 1.0499613, 1.1319197, 1.4067885, 1.3209087 } }, { { -0.002860931, -0.0033581281, -0.0047612075, -0.0030481839 }, { -0.0017370907, -0.0065700936, -0.0011051926, -0.0046915938 }, { -0.0006126207, 0.0010791181, -0.022876686, -0.015937275 }, { -0.010040922, -0.016433531, -0.0044976975, -0.029838315 }, { 0.00056888968, -0.0093450028, -0.00041549218, -0.0069079656 }, { -0.029781683, -0.019722587, 0.019472312, 0.0016798037 }, { -0.0015128736, -0.0012250172, -0.0091568262, -0.0091368119 }, { 0.0010846814, 0.0017189068, 0.012975603, -0.0051530971 }, { -0.026042808, -0.0090684857, -0.0021498742, -0.0032938309 }, { -0.0012792901, -0.0010431731, -0.0021366737, -0.0025526365 }, { -0.03218779, -0.013848893, -0.021872476, -0.029443623 }, { 0.008300061, 0.011951182, -0.011139414, 0.0098292843 }, { -0.0065854884, -0.020955083, -9.3843515e-05, -0.0078425688 }, { -0.054726229, -0.0073673428, -0.019267231, -0.03383648 }, { -0.049769726, 0.0065482059, -0.010189395, -0.0050480393 }, { 0.022565943, -0.020311569, 0.0091512717, -0.015600752 }, { -0.014418429, 0.0060070592, -0.0055296743, -0.003361885 }, { 8.8146509e-05, -0.0082609252, 0.0036746024, 0.0040108321 }, { 0.0010230427, 4.8153189e-06, 0.0052893378, -0.0096303521 }, { 0.0032909351, -0.010982824, 0.003880027, 0.0097699095 }, { -0.006528317, -0.012608887, -0.0057088008, -0.003867806 }, { -0.046599771, -0.024701737, -0.001078321, -0.0041018649 }, { -0.021680777, -0.021120711, 0.0055144734, -0.0031337995 }, { -0.030559213, 0.0089872726, -0.011166202, -0.0077587071 } }, { { -0.0059548858, -0.0040070313, -0.0062572119, -0.0047711065 }, { -0.0031938803, -0.005431389, -0.0026376521, -0.0046119366 }, { 0.0064917253, 0.013030824, -0.027850471, -0.011824849 }, { -0.032644485, -0.025045016, -0.0034396539, -0.039827623 }, { -0.007691681, -0.014095643, -0.0008171964, -0.0051336386 }, { -0.035626586, -0.021424668, 0.00035790929, 0.0099705685 }, { -0.0019006762, -0.0014887089, -0.0050782898, -0.0096835564 }, { -0.00087496879, 0.0052586834, 0.017041675, -0.00046753956 }, { -0.022489507, -0.0084834888, 0.0017184219, -0.0023910992 }, { -0.0010618265, -0.00085888729, -0.0020035777, -0.0024245283 }, { -0.029245834, -0.038977066, -0.013385246, -0.030312138 }, { -0.0028497869, 0.014205986, -0.0125692, 0.0037959624 }, { -0.0086377959, -0.019175965, -0.007684309, -0.005037677 }, { -0.063945685, -0.0060751259, -0.0057457302, -0.019079575 }, { -0.043745147, 0.013651906, -0.034067394, 0.0012111497 }, { 0.0086647574, -0.019171418, 0.020745219, -0.0055629951 }, { -0.024541273, 0.0072112135, -0.0078821942, -0.0085072621 }, { -0.0018227939, -0.0021153099, 0.008577002, 0.0043865151 }, { -0.013984752, -0.012209334, 0.00023638151, -0.0085025952 }, { -0.0099800075, -0.0095390578, 0.0081328135, 0.012673433 }, { -0.0099975551, -0.0028467616, -0.010712056, -0.0045012212 }, { -0.011329139, -0.0084709831, -0.0070232966, 0.0015504012 }, { -0.015334801, -0.0075637633, -0.01107439, -0.0094188163 }, { -0.017505269, -0.00013701888, -0.033955823, -0.034192649 } } }, { { { 0.16413327, 0.084074422, 0.10646123, 0.18806073 }, { 0.039511019, 0.058967072, 0.035166958, 0.052296507 }, { 0.26970995, 0.21576211, 0.2954278, 0.29870678 }, { 0.40442043, 0.38744132, 0.14502571, 0.24076804 }, { 0.22655046, 0.20912486, 0.015295019, 0.16442957 }, { 0.69235319, 0.6080183, 0.36756076, 0.23314717 }, { 0.085565328, 0.075535626, 0.22162979, 0.33140596 }, { 0.16109547, 0.11961895, 0.26619212, 0.25941009 }, { 0.27077686, 0.23481238, 0.063446408, 0.11614487 }, { 0.026116057, 0.027491327, 0.030421883, 0.039965345 }, { 0.33922592, 0.38039792, 0.27167385, 0.31510976 }, { 0.32744968, 0.22567102, 0.23116584, 0.18867836 }, { 0.29783431, 0.28054079, 0.26752139, 0.23889932 }, { 0.61721263, 0.60602797, 0.51283622, 0.47601102 }, { 0.51383952, 0.53111455, 0.44519064, 0.42875877 }, { 0.3485879, 0.35374178, 0.53292055, 0.53995494 }, { 0.4366997, 0.35554257, 0.14878367, 0.22083288 }, { 0.12855375, 0.16718264, 0.17583661, 0.11125895 }, { 0.35898096, 0.37222307, 0.35439108, 0.35956111 }, { 0.16773044, 0.25668894, 0.23246756, 0.1506316 }, { 0.36172813, 0.26938211, 0.20069185, 0.1714591 }, { 0.3998571, 0.23607244, 0.34121623, 0.29126696 }, { 0.31471307, 0.29500525, 0.39451396, 0.40013999 }, { 0.29554399, 0.28083636, 0.47190649, 0.47892938 } }, { { 0.01419653, -0.061214452, -0.032506906, 0.0078227125 }, { -0.015799432, 0.0136148, -0.0090824684, 0.013638505 }, { 0.023848919, 0.022034707, 0.022812846, 0.022790329 }, { -0.0026324255, -0.0053566952, 0.00027470228, 0.050203583 }, { 0.0035659857, -0.02015272, -0.039043616, 0.054511651 }, { 0.0052075445, 0.0051043119, -0.011801097, -0.0074336577 }, { 0.020735195, 0.01811747, 0.00808952, 0.01140964 }, { -0.0073139049, 0.011075347, 0.0057685988, 0.010251582 }, { 0.024813488, -0.01629986, -0.012536791, -0.01110061 }, { -0.014508648, -0.021444084, -0.023836972, -0.014258253 }, { 0.0079687141, -0.00092011446, 0.060249601, 0.033199468 }, { -0.020822483, -0.013924875, -0.005068391, -0.016928794 }, { -0.030059, -0.013887475, -0.045329289, -0.04449219 }, { 0.007264541, 0.0015213919, -0.0066322618, -0.0036449174 }, { 0.0057175046, 0.0012159867, -0.00054271896, 0.0020625484 }, { 0.0027083179, -0.0012554897, -0.0044854592, -0.0045242423 }, { -0.017906563, -0.028301884, -0.010139427, 0.0035851304 }, { -0.020245794, 0.01149232, 0.011320484, -0.013561794 }, { 0.0068048997, 0.011957759, 0.0046962412, -0.0015476541 }, { -0.0022514613, 0.019996868, 0.0051520398, -0.023405604 }, { 0.0055213198, 0.0070384134, 0.024405643, -0.02050399 }, { 0.039987541, 0.021127504, -0.012323503, -0.0041538161 }, { 0.0072321478, 0.0053097351, 0.0039966161, 0.013617175 }, { 0.030470642, 0.0044694115, -0.0024591651, -0.0027274707 } }, { { -0.040500402, -0.039657034, -0.017497359, -0.017857145 }, { -0.0015646885, -0.020957371, -0.0057356498, -0.0060587007 }, { 0.0070388709, -0.013205178, -0.00033412934, 0.02192306 }, { -0.0042317723, 0.020620857, -0.012309167, 0.065948811 }, { -0.016686589, 0.013616667, 0.030139062, -0.019023551 }, { 0.015181564, 0.008673659, -0.0014559576, -0.025916054 }, { 0.031630671, 0.027030197, -0.026982415, 0.025214731 }, { -0.003845127, -0.00062884599, -0.029488655, -0.0051457939 }, { -0.0032476351, 0.0021153707, -0.033110808, -0.033629213 }, { -0.0064637077, -0.010805748, -0.014982403, -0.0084641529 }, { 0.0087766042, 0.017780238, 0.026838871, 0.032580257 }, { 0.0010700985, -0.037414784, -0.0053773565, 0.0040969752 }, { -0.02637392, -0.050236074, -0.048422986, -0.069357813 }, { -0.0089483588, 0.0026259727, 0.0040142797, -0.010752754 }, { -0.0025658872, 0.0071106029, 0.015467367, 0.0012536589 }, { -0.0037247444, -0.0036991733, -0.015429566, -0.016148852 }, { -0.024788221, -0.045938054, -0.028679471, 0.011593494 }, { -0.032699114, -0.036800967, -0.033870575, -0.031842203 }, { 0.018156047, 0.02457546, 0.0209432, 0.015057433 }, { 0.0043152638, 0.025831372, -0.019608349, -0.026614397 }, { -0.0057047815, -0.013831909, 0.027613211, -0.043616864 }, { 0.014124478, -0.010786326, 0.010775415, -0.023241344 }, { 0.018337827, 0.0048735321, 0.018371717, 0.022106807 }, { 0.013619207, 0.022051384, 0.0082720974, -0.0030262071 } } } }, { { { { 0.083322661, 0.079807165, 0.03660117, -0.051657142 }, { -0.099216074, -0.0080141573, 0.10637241, 0.0367403 }, { 0.20813681, -0.0001361621, -0.20762563, -0.085913357 }, { -0.22091149, 0.10003156, -0.16122219, 0.31542901 }, { 0.16226908, 0.02665194, -0.012123307, -0.16559939 }, { -0.14025496, 0.025804505, 0.076174345, 0.20548591 }, { 0.0035713609, -0.0092551928, -0.099937652, 0.0038879391 }, { 0.12405732, -0.0053373497, -0.030865175, -0.060934551 }, { -0.0060175826, -0.026583926, -0.075326797, -0.0063155886 }, { 0.036389362, 0.054175433, 0.06490927, -0.038784258 }, { 0.30604876, -0.030813476, 0.011402956, -0.21074796 }, { -0.31769497, 0.046793931, -0.038212559, 0.21137297 }, { 0.12952945, 0.20720126, 0.08525845, -0.14568109 }, { -0.09735197, -0.17799099, -0.12256082, 0.038889119 }, { 0.002114572, 0.026037779, -0.0036772795, 0.13478173 }, { 0.094577863, 0.0057382415, -0.087017736, -0.059444148 }, { 0.054953104, 0.071323301, 0.097417831, 8.3254475e-05 }, { -0.11005534, 0.027214076, 0.0059378205, 0.02443999 }, { 0.27096654, 0.1864966, 0.034810947, -0.25886676 }, { -0.35626794, 0.037256657, -0.17795321, 0.52988269 }, { 0.14913899, -0.0086988732, -0.028760192, -0.21779266 }, { -0.16010301, -0.17699785, 0.017269826, 0.17878541 }, { -0.0049504093, -0.02387924, -0.04034852, -0.060461173 }, { 0.10405347, 0.0072745723, -0.10244372, -0.072981984 } }, { { 0.019363393, 5.327311e-05, 0.0075925373, 0.0019542034 }, { -0.051707557, 0.06554253, 0.0050626046, -0.0061857803 }, { 0.022891698, 0.014872273, -0.020436928, 0.0069081531 }, { -0.044566611, 0.019854557, 0.023600607, -0.0055387351 }, { 0.02283957, -0.067086756, 0.088865856, -0.033915007 }, { 0.0020254431, -0.16422426, 0.032495902, 0.012460808 }, { -0.017316175, 0.023440087, 0.011459595, 0.0043887872 }, { 0.027714908, -0.06907548, 0.013578806, -0.009848884 }, { 0.0044782488, 0.0079432606, 0.010143137, 0.023589488 }, { 0.014325082, 0.0075465848, -0.0079373813, -0.0056032635 }, { 0.025123579, 0.01904807, -0.0092328848, -0.019002052 }, { -0.02633985, -0.019560519, -0.065544737, 0.0073352606 }, { 0.044308433, -0.0032233834, 0.01324206, -0.00047128106 }, { -0.076577611, -0.021853603, -0.020190543, 0.0026420865 }, { -0.0029799448, -0.0083566545, 0.14896601, 0.0078617095 }, { 0.021033237, -0.08234711, -0.020642328, -0.0089829962 }, { 0.043793881, 0.0096494147, 0.035831274, -0.01294602 }, { -0.014064874, 0.066144489, 0.0143429, 0.015113964 }, { 0.043111732, 0.0029232804, -0.016912145, 0.012142059 }, { 0.0014186333, -0.0078590166, 0.065781153, -0.038375123 }, { 0.02255714, -0.030191796, -0.078373164, -0.0017593196 }, { -0.033878798, 0.016266579, 0.013539653, 0.043519216 }, { 0.019046482, 0.0080403173, -0.0010755939, 0.03305222 }, { 0.023206448, -0.054323067, -0.035173093, -0.010873592 } }, { { 0.014068291, -0.026418786, 0.016375695, 0.0048801469 }, { 0.024404214, 0.0073572002, -0.027247654, 0.00093849398 }, { 0.012741523, -0.012913063, 0.0054881373, -0.021780769 }, { -0.020497215, 0.057437717, 0.0031122704, 0.014713732 }, { 0.012765254, -0.052846334, 0.048042201, 0.0016578534 }, { 0.031245254, -0.0469321, -0.057199738, 0.012436479 }, { -0.0022837759, 0.0068501747, 0.010541107, -0.0005227683 }, { -0.0187059, 0.0025631581, -0.0082184266, 0.0026294483 }, { 0.0053899388, -0.0199458, 0.0023448066, 0.016215236 }, { 0.021117204, 0.010868775, -0.016412681, -0.016399297 }, { -0.0026199223, -0.011436548, 0.0031355049, 0.011933919 }, { 0.017940023, 0.090292392, -0.061029038, 0.016388845 }, { 0.0074493061, -0.045849358, -0.082612855, 0.025851315 }, { 0.061276666, -0.024654813, 0.035447334, -0.025952766 }, { -0.0068267167, -0.02207426, 0.003724368, 0.0070458116 }, { 0.021714649, -0.017552721, -0.037105408, 0.024398534 }, { 0.0092901891, -0.021559075, 0.009034776, -0.016574279 }, { -0.017218595, -0.041930302, 0.003369899, 0.017959363 }, { -0.0022510875, 0.028106616, -0.042936548, -0.041948028 }, { -0.017145551, -0.032331654, 0.021486923, -0.020295391 }, { -0.023196465, -0.088353584, 0.010086154, 0.018689553 }, { -0.024508386, -0.00058959302, -0.02867958, 0.019018994 }, { 0.0088748911, 0.012528454, -0.016636351, 0.0078166115 }, { 0.00066772723, 0.001693912, 0.032066885, 0.016951148 } } }, { { { 0.015200105, 0.071414961, -0.020616434, 0.0063982643 }, { -0.084578144, -0.12318522, -0.035470756, 0.057833574 }, { 0.19487946, 0.44043059, 0.10981527, -0.31907303 }, { -0.17774238, -0.30460726, -0.53133003, 0.31186606 }, { -0.1172677, 0.3183613, 0.10375266, -0.066515168 }, { 0.054176263, -0.12382077, -0.033807438, 0.039809238 }, { -5.3634009e-05, 0.004084452, 0.005103199, -0.060697866 }, { 0.06093199, 0.060355274, 0.049176467, -0.060579228 }, { 0.054611799, 9.0520863e-05, -0.048891261, -0.047609349 }, { -0.036428706, 0.06336736, 0.0020843807, 0.033254378 }, { 0.26975732, 0.51328693, 0.29976157, 0.049031141 }, { -0.28383516, -0.48219276, -0.27898799, -0.033028759 }, { -0.078976834, 0.14077934, 0.098587186, 0.051336328 }, { 0.076281206, -0.074223398, -0.053178835, -0.099578331 }, { -0.056377095, -0.00066113896, -0.11597726, 0.058805777 }, { -0.0027130032, 0.12007881, 0.0081935835, -0.10415807 }, { -0.019349408, 0.06206561, -0.0079099126, 0.079363093 }, { -0.059959607, -0.0591041, -0.047505451, -0.0031496967 }, { -0.11419194, 0.20904287, 0.53960104, 0.10467592 }, { -0.21312862, -0.34770872, -0.54593093, 0.23230512 }, { -0.073229448, 0.12913, 0.27728133, -0.050627706 }, { 0.082312471, -0.24529296, -0.12381516, 0.05577292 }, { 0.03015389, -0.0015805638, 0.024306632, -0.080697961 }, { 0.061367564, 0.056058289, 0.041197211, -0.015551356 } }, { { -0.029269776, -0.030251548, 0.01352869, 0.0084860712 }, { 0.053983187, 0.047657625, -0.026379004, 0.022474039 }, { 0.011898439, 0.045120742, -0.024430477, -0.081318878 }, { -0.0012641508, -0.018495044, -0.030127865, -0.0088483264 }, { 0.040728292, 0.010691761, -0.023566342, 0.028045232 }, { 0.014593998, 0.0047006468, -0.049032498, -0.011446808 }, { 0.00045433705, -0.0030610749, -0.010359449, -0.0026455857 }, { -0.0026794352, -0.032142744, 0.010153936, -0.0034586152 }, { 0.0097198782, 0.0051005644, 0.03482872, -0.0043676475 }, { -0.0012381415, -0.025746274, -0.0081178021, 0.0041481596 }, { -0.01598781, 0.0048815642, 0.06313106, -0.0062291669 }, { 0.072970618, -0.041153529, -0.007457013, 0.059776924 }, { 0.0024768493, 0.0093018711, 0.024827984, 0.043842172 }, { -0.012927661, -0.023256709, -0.0035951539, -0.069710027 }, { 0.0064149713, 0.0019783425, 0.010135188, 0.019449636 }, { -0.0071551675, 0.015761815, 0.0086309278, 0.038854386 }, { 0.020978109, -0.0056696814, 0.0025526797, -0.017352926 }, { -0.010711116, -0.0097050903, 0.0022304504, -0.0039308489 }, { 0.036904234, 0.025927127, 0.028330671, 0.051193417 }, { -0.00076391153, -0.077528792, -0.029763477, 0.0033945843 }, { -0.01775202, 0.034507636, 0.065392848, -0.017840909 }, { -0.019567742, -0.019880035, 0.055214211, -0.02206159 }, { 0.01110111, 0.0022938832, -0.011417507, 0.017692635 }, { 0.050208493, -0.028178909, 0.0065276591, -0.0056267473 } }, { { 0.0065622702, -0.0012303136, -0.0081183663, 0.00079383048 }, { 0.030775912, 0.052260356, -0.019758331, -0.020044147 }, { 0.019016537, -0.043070451, 0.035298744, -0.040592775 }, { 0.010468089, 0.00057085185, 0.0081761984, 0.0033382478 }, { 0.047189462, -0.052695409, 0.021849623, 0.033585939 }, { 0.0012065616, -0.050287476, -0.065085924, -0.039012886 }, { -0.012294892, 0.006839242, 0.0051165438, -2.0711078e-05 }, { -0.03292822, 0.015299577, 0.0029119931, 0.0073040242 }, { -0.0086784873, 0.0085910164, -0.0059378411, -0.010259049 }, { -0.014191355, -0.011172486, -0.01299927, 0.015386671 }, { 0.040453224, -0.041489173, 0.015047889, 0.064340197 }, { -0.020000046, 0.058477092, -0.0018150465, 0.048536972 }, { -0.006105982, 0.03437044, 0.0087640339, 0.032868283 }, { -0.027120362, 0.016579996, -0.01708524, 0.011178424 }, { 0.030535528, 0.0058718219, -0.031240404, 0.024241052 }, { 0.003729958, -0.055735848, -0.0055392842, 0.03447519 }, { -0.04084502, -0.01227488, 0.0062970198, -0.021996031 }, { 0.053671675, -0.067787009, 0.0053426012, -0.0080796738 }, { -0.021911856, 0.038395527, -0.07713235, 0.024805484 }, { -0.0034319194, 0.0052741327, 0.026402991, 0.0012916612 }, { -0.033119652, -0.0046506889, 0.045613946, -0.050230593 }, { -0.0054612035, -0.033482221, 0.084267507, -0.0224334 }, { -0.0063348693, -0.0074524817, -0.0029629355, 0.035493958 }, { -0.0073519185, 0.045139911, 0.0022901735, -0.041385515 } } }, { { { 0.99640669, 0.99424882, 0.99911727, 0.99864438 }, { 0.99146493, 0.99235134, 0.99369348, 0.99764995 }, { 0.95848895, 0.89778665, 0.9720248, 0.943828 }, { 0.95896077, 0.9472107, 0.83168251, 0.89623886 }, { 0.97975356, 0.94759472, 0.99452924, 0.98394744 }, { 0.98863213, 0.99196902, 0.99652121, 0.97785007 }, { 0.99999362, 0.99994883, 0.99498061, 0.99814861 }, { 0.99040248, 0.99816269, 0.99831309, 0.99630173 }, { 0.99848953, 0.99964658, 0.9959596, 0.99884607 }, { 0.9986735, 0.99651874, 0.99788899, 0.99869411 }, { 0.91299789, 0.85766372, 0.953946, 0.97631002 }, { 0.90471405, 0.87481454, 0.959534, 0.97684726 }, { 0.9884254, 0.96811612, 0.9914694, 0.98799879 }, { 0.99232241, 0.98122887, 0.99103524, 0.99426948 }, { 0.99840731, 0.99966074, 0.99324506, 0.98912879 }, { 0.99551377, 0.99274778, 0.99617307, 0.9927827 }, { 0.99830144, 0.99552039, 0.99521214, 0.99684577 }, { 0.99211525, 0.9978808, 0.99885333, 0.99969634 }, { 0.95579147, 0.95995838, 0.84120087, 0.96022443 }, { 0.90975235, 0.9368621, 0.81871367, 0.8156339 }, { 0.98610091, 0.99158952, 0.96035822, 0.97468107 }, { 0.98366238, 0.9531543, 0.99215501, 0.98230604 }, { 0.99953301, 0.9997136, 0.99888998, 0.99490315 }, { 0.99267663, 0.998401, 0.99388534, 0.99721201 } }, { { -0.0021537732, 0.010607958, -0.0066166595, -0.0027390442 }, { -0.0069401807, 0.0053215201, 0.0062121114, 0.013403291 }, { -0.0035740125, -0.021839368, 0.00042431197, -0.029478899 }, { -0.007886159, -0.0087705321, -0.010570968, 0.0040635318 }, { -0.0021772698, 0.00025306776, -0.0092725896, -0.0075657706 }, { -0.010438319, -0.0072866821, 0.009272756, 0.0043932916 }, { -0.00058203184, 0.0081284104, 0.027749999, 0.0035426599 }, { -0.003604276, -0.012244348, 0.0072177908, 0.0026686264 }, { 0.011192179, 0.0069527119, 0.017278396, -0.0053058312 }, { -0.020276487, -0.0063228657, 0.013968347, -0.0021534789 }, { -0.0037534313, 0.00061399133, -0.02126817, 0.0085256452 }, { 0.015620795, -0.022637876, 0.00069280338, 0.0054369037 }, { 0.0095244184, -0.0026896982, -0.0057963534, 0.0067237437 }, { -0.0085689961, -0.004816024, -0.00088793436, -0.0034021999 }, { 0.015428153, 0.019777562, -0.011217833, 0.0095744159 }, { -0.003802304, 0.0022643577, 0.0054254827, 0.025560756 }, { -0.0053298651, 0.021621993, -0.01864184, 0.019120967 }, { 0.015380344, -0.0027384467, 0.0010235928, 0.0062792725 }, { -0.001166873, -0.0049586656, -0.014850883, 0.00057841904 }, { 0.0032865456, -0.033386196, 0.0032068954, 0.02854738 }, { 0.010308266, -0.000233004, -0.020287643, 0.0044441043 }, { -0.0040523345, 0.0050367711, 0.01627907, -0.010032412 }, { 0.0073463987, 0.00073274858, 0.002814661, 0.030221018 }, { 0.0057509063, -0.011441338, 0.01894259, 0.0077856453 } }, { { -0.0053054924, 0.0037677068, 0.0066263851, 0.0011220287 }, { -0.02212139, 0.013769097, -0.0013834097, 0.014152363 }, { -0.0008493126, 0.021473024, -0.0039313241, -0.017764981 }, { -0.00081897848, -0.0074161164, 0.0038179092, -0.0035760615 }, { 0.014045643, 0.015317904, 0.0045966739, 0.0075917156 }, { 0.0035574126, -0.00017773424, -0.0010937491, -0.0017762282 }, { 0.0072018344, 0.012586227, 0.0138702, -0.0085424173 }, { -0.0055783456, -0.019909385, 0.01190919, -0.0065821489 }, { 1.7402026e-05, 0.0094513341, 0.015333305, -0.0072158969 }, { -0.0063049905, 0.0021776758, 0.014376378, 0.0072426401 }, { -0.0078049673, 0.028764242, -0.0024169449, 0.0077604105 }, { 0.00047536469, 0.029806623, 0.0017798261, 0.00087410198 }, { -0.0030498401, 0.0044874501, 0.0020382571, -0.0011101062 }, { -0.0057084397, -0.0013428994, -0.001024136, 0.0066188614 }, { 0.039201052, 0.015120258, -0.0082642793, 0.0051985023 }, { -0.0091203243, 0.020790215, 0.0025270937, 0.020092044 }, { -0.0029830063, 0.006602841, -0.00833601, 0.044852353 }, { 0.025206353, -0.0038915173, 0.00045914851, 0.0037840538 }, { 0.0014814254, -0.011573911, 0.046232337, -0.015228958 }, { -0.0071984443, 0.0090004063, 0.022942838, 0.016019787 }, { 0.0050929336, 0.0060892107, -0.0061771339, 0.0047850766 }, { -0.011634853, 0.0010276548, 0.022396644, -0.0021248711 }, { -0.012943002, 0.0016430074, 0.02034928, 0.024289705 }, { 0.0051047037, 0.010052556, 0.0020923265, -0.019043181 } } }, { { { 2.1627647, 2.1788232, 1.9290264, 1.8457806 }, { 2.526488, 2.3020441, 2.538915, 2.03484 }, { 3.9987521, 4.3952121, 3.906821, 4.1693278 }, { 4.0400466, 4.1069844, 5.2512999, 5.4283264 }, { 3.0141968, 3.3306035, 3.2224806, 3.2473051 }, { 2.9840674, 3.1294685, 3.2964833, 3.2929246 }, { 1.8346741, 1.8637353, 2.3037966, 2.0860888 }, { 2.691236, 2.6068079, 1.9349032, 2.1632935 }, { 1.9231956, 1.7251627, 2.1609654, 2.1155629 }, { 2.165771, 2.1908952, 1.777038, 2.0223741 }, { 4.5166991, 4.8674508, 3.918546, 3.378087 }, { 4.4502295, 4.5429338, 3.9552598, 3.3580272 }, { 3.0973598, 3.3953852, 2.2704362, 2.6488177 }, { 3.2110537, 3.3104376, 2.515002, 2.3267785 }, { 1.8303675, 1.7094345, 3.1787979, 2.5960104 }, { 2.4391795, 2.8730077, 2.3730261, 2.1545299 }, { 2.2130903, 2.1899209, 2.4997355, 1.9058674 }, { 2.6472893, 2.5455636, 2.1164596, 1.8341163 }, { 3.9428283, 4.0433678, 4.5430063, 4.2482776 }, { 4.1941673, 4.28852, 4.64044, 4.6644567 }, { 3.0873642, 2.649364, 3.6026133, 3.2426354 }, { 3.2415154, 3.5406745, 3.2976852, 3.3100246 }, { 1.8400289, 1.8404692, 1.889289, 2.0125184 }, { 2.7063995, 2.7229173, 2.6289878, 2.4313709 } }, { { -0.015335928, -0.043382119, -0.0054163805, -0.028249934 }, { -0.017200109, 0.0027582413, -0.079612821, -0.0013966663 }, { -0.027233584, -0.018783395, -0.01183278, -0.020918937 }, { -0.0036358348, -0.015712206, -0.0089146421, -0.0057117233 }, { 0.020392865, 0.017743746, -0.068597326, -0.030425581 }, { -0.041123673, -0.020767538, -0.0087941887, -0.0065248183 }, { -0.0055478408, -0.00082196865, 0.0088521402, -0.045916836 }, { -0.010506485, 0.0078523247, -0.030002306, -0.0015085765 }, { 0.01894068, -0.012424968, -0.034837214, -0.045009941 }, { -0.045299587, 0.02630478, -0.017175711, -0.043601235 }, { -0.046003661, -0.020588165, 0.034398873, -0.054653787 }, { -0.0042534368, 0.01325834, -0.0036369576, -0.079162988 }, { -0.028728556, 0.0051289128, 0.012104313, 0.010686997 }, { -0.066337767, 0.00059928728, -0.080303668, 0.011318772 }, { -0.031879871, 0.0011317962, -0.050259029, 0.0031596552 }, { -0.090121238, -0.011196084, -0.072456123, -0.00079731072 }, { -0.024243475, 0.021401076, -0.018209385, -0.0083196072 }, { -0.079888701, 0.0032806631, -0.12762259, -0.04652308 }, { 0.031806075, -0.034165157, -0.015255921, -0.049164663 }, { -0.0012051123, 0.030788487, 0.022291919, 0.0025694519 }, { 0.035836509, 0.0055365388, 0.026704836, 0.0001547235 }, { -0.012129747, -0.0094322145, -0.040637935, -0.12125388 }, { -0.027044986, 0.04531553, -0.033484589, -0.0059927923 }, { 0.0067188802, -0.051166351, -0.048822794, -0.025926988 } }, { { 0.022049053, 0.021265778, -0.040370641, -0.036232952 }, { -0.0058098424, -0.0042264198, -0.077428509, -0.04241654 }, { -0.0026825379, -0.029453318, -0.016181275, -0.028320229 }, { -0.012541692, -0.01345735, 0.00037814888, -0.0046052489 }, { -0.026527394, 0.020033638, -0.025683861, -0.084207169 }, { -0.0010459945, -0.036745215, -0.039772051, 0.024810839 }, { 0.012134618, 0.0068515798, -0.035286972, 0.043129595 }, { -0.077093357, -0.026872688, 0.032800133, -0.090326706 }, { 0.13930909, 0.0081274014, -0.08349188, -0.012200005 }, { -0.091693797, -0.012567011, -0.069736822, -0.0061444184 }, { -0.053061301, 0.003642159, 0.0052515175, -0.036957472 }, { 0.0043493933, -0.013069332, -0.014708126, -0.032765039 }, { -0.016116105, -0.022907609, -0.043503106, -0.013266465 }, { -0.072759977, -0.077354585, 0.0043827591, -0.013821612 }, { -0.032399073, -0.045305037, -0.021840791, 0.073996542 }, { -0.057239255, -0.056581235, -0.038880927, 0.044102943 }, { -0.026951489, -0.088667645, -0.013659704, 0.033527579 }, { 0.034815442, -0.028634059, -0.036666529, 0.011546036 }, { 0.026688447, -0.0081892129, -0.031138092, -0.041739155 }, { 0.0015665701, -0.012701682, 0.0013533943, -0.002849785 }, { 0.032994636, 0.008802974, 0.019032649, 0.0039042621 }, { -0.044544917, 0.0093201326, -0.017968915, 0.01936344 }, { -0.034794535, 0.043032983, -0.051072531, -0.040148303 }, { -0.0030398597, -0.027112065, -0.064007483, -0.01798277 } } }, { { { 0.22040906, 0.24911942, 0.41660708, 0.23632869 }, { 0.25894466, 0.1416669, 0.41902981, 0.35717608 }, { 0.26918091, 0.14566759, 0.2147652, 0.15769391 }, { 0.22500921, 0.12113361, 0.11151768, 0.12348609 }, { 0.25699055, 0.056819107, 0.3859882, 0.4585378 }, { 0.7304995, 0.20719358, 0.44455636, 0.42226989 }, { 0.43602897, 0.51049581, 0.41978824, 0.62521039 }, { 0.42004119, 0.52912054, 0.33314238, 0.38257921 }, { 0.55092562, 0.43085653, 0.31149977, 0.34391138 }, { 0.40391149, 0.48820255, 0.13569806, 0.36060266 }, { 0.13647907, 0.12061002, 0.20668806, 0.30221394 }, { 0.15583476, 0.13133696, 0.22775202, 0.35653823 }, { 0.56336195, 0.25684627, 0.11118383, 0.23109245 }, { 0.45430401, 0.42843367, 0.25496534, 0.097473509 }, { 0.3420223, 0.39418925, 0.26458947, 0.30588082 }, { 0.51345558, 0.3612731, 0.41151773, 0.25269512 }, { 0.29195176, 0.42659964, 0.47971993, 0.32714756 }, { 0.49222777, 0.28477645, 0.74993827, 0.43781271 }, { 0.098434481, 0.31164923, 0.14486345, 0.11466693 }, { 0.070833248, 0.20569754, 0.10233576, 0.047352701 }, { 0.51050902, 0.15597643, 0.1417112, 0.35581415 }, { 0.48261165, 0.14592221, 0.62554576, 0.5209765 }, { 0.33562628, 0.39920067, 0.28183433, 0.297464 }, { 0.366851, 0.59278666, 0.59095922, 0.48385165 } }, { { 0.13792051, 0.072076744, 0.094800532, 0.026318377 }, { 0.13607414, -0.061382542, 0.061800151, -0.020060553 }, { 0.028096406, 0.069282616, 0.010195109, -0.010461141 }, { 0.018651237, 0.02642439, 0.0077552848, -0.051151646 }, { 0.098299803, -0.0085081153, -0.011764584, 0.087405711 }, { 0.064082346, -0.04626424, -0.071480607, 0.064447268 }, { 0.022766233, 0.0167542, -0.021285286, -0.071637286 }, { -0.0202445, 0.011692601, 0.048325551, 0.0097755172 }, { -0.027775183, 0.016463115, 0.060050391, -0.034226107 }, { 0.019412547, 0.059977501, -0.0041737169, 0.031539317 }, { 0.013192979, 0.036015595, -0.049943198, 0.014112312 }, { -0.013272349, 0.035821037, -0.060503687, 0.095316821 }, { 0.038338785, -0.059038809, -0.044954172, -0.00051347307 }, { -0.039594082, 0.018205882, 0.13413799, 0.012292954 }, { 0.015177594, -0.0082493854, 0.00029420179, 0.010356248 }, { 0.100271, -0.13623174, 0.1121235, 0.068902399 }, { 0.025189636, 0.0014918434, 0.0088847718, -0.053714493 }, { 0.06487698, -0.097217547, -0.069537353, 0.032490984 }, { -0.030729608, 0.048956315, 0.016036034, 0.022485239 }, { 0.049839618, 0.01148525, -0.021032427, -0.019665817 }, { -0.0037762817, -0.030422275, -0.062343207, 0.057994884 }, { 0.014035184, -0.021387762, -0.080846143, -0.020681511 }, { -0.03594567, 0.026862531, 0.078975557, -0.034056659 }, { -0.014490672, 0.026128902, 0.045617611, 0.090192953 } }, { { 0.011904288, -0.014624471, 0.042023114, 0.019592867 }, { 0.032705848, 0.00038558691, 0.031901745, 0.027208951 }, { -0.044369719, -0.039761364, -0.013366816, -0.019308126 }, { -0.019051023, -0.00015767269, -0.082968285, -0.035266053 }, { -0.004775162, 0.010889271, 0.0089521094, 0.027037104 }, { 0.005616143, -0.00099668486, 0.0068716426, -0.12649184 }, { 0.018531199, 0.023881776, -0.053798787, -0.041912909 }, { -0.0036187094, 0.11590788, 0.025140733, 0.022280209 }, { -0.02994342, -0.026293799, -0.017204658, 0.044901944 }, { 0.079892089, 0.10816526, 0.14667807, 0.027301352 }, { -0.045296738, -0.066748968, -0.0099354431, -0.070369692 }, { -0.08357374, -0.043311901, 0.013163375, -0.0881777 }, { -0.065923811, -0.10382274, 0.090440302, -0.013617198 }, { -0.092578587, -0.010178017, -0.01416593, 0.0432333 }, { 0.055172515, 0.10021805, -0.0062782668, -0.11791805 }, { -0.039684132, -0.08934283, 0.020686084, -0.0013788117 }, { 0.064624676, 0.051773746, 0.0045383964, -0.037696971 }, { -0.066296373, 0.020570689, -0.017742721, -0.022651449 }, { -0.0061572447, -0.094510525, -0.094775804, -0.038022514 }, { 0.0055683313, 0.039513342, -0.096815654, -0.0065483011 }, { -0.03311602, -0.018395457, 0.0028464434, -0.088048272 }, { -0.073106109, -0.055187863, -0.093209932, -0.10155137 }, { 0.042841842, -0.005778703, 0.074069607, -0.025841052 }, { -0.018569637, 0.063144303, 0.02291584, 0.005525742 } } } }, { { { { -0.20809663, -0.18346453, -0.072140694, -0.0078104407 }, { -0.19490097, 0.25712922, 0.37640771, 0.11563399 }, { 0.26894915, -0.33477877, -0.093739129, -0.55078405 }, { -0.65794103, 0.09211629, -0.19166986, 0.5574327 }, { 0.45579532, 0.23202083, 0.19626303, -0.64130523 }, { -0.018763975, -0.24981569, -0.32514026, -0.11121342 }, { 0.22376238, 0.09515938, 0.071728264, -0.02790747 }, { -0.3053338, 0.34023365, 0.099862481, 0.26163964 }, { -0.21722968, -0.094881958, -0.086364431, -0.0081863581 }, { -0.16090709, 0.23527698, 0.28947119, 0.11309742 }, { 0.26447184, -0.33536416, -0.096418234, -0.26201294 }, { -0.56343769, -0.041662822, -0.24873841, 0.67122901 }, { 0.35362642, 0.2577592, 0.2009013, -0.74233681 }, { -0.047956299, -0.54973418, -0.4958485, -0.12453303 }, { 0.06917425, 0.080509853, 0.0090863722, -0.023518805 }, { -0.27000602, 0.083167162, 0.12715558, 0.12397839 }, { -0.11376964, -0.079199259, 0.019676685, -0.0094352472 }, { -0.19185851, 0.22193112, 0.28110877, -0.06422845 }, { 0.084091992, -0.16151548, 0.091400556, -0.28257376 }, { -0.53821376, 0.21718328, -0.2234907, 0.52302804 }, { 0.71322306, 0.042728493, 0.13229522, -0.61892094 }, { 0.15270046, -0.26304886, -0.33110633, -0.052728951 }, { 0.072398971, 0.25829764, 0.25881687, -0.020942042 }, { -0.26788161, 0.055822039, 0.33817103, 0.42061402 } }, { { 0.088248648, 0.091306255, 0.020476927, 0.0030144802 }, { 0.0087376707, 0.043816157, 0.0022807168, 0.016745414 }, { -0.13412414, 0.12686539, 0.060531476, 0.044582027 }, { 0.019204757, -0.0070891897, 0.091194602, 0.065258927 }, { -0.10429513, -0.027665602, -0.064350626, 0.0053147478 }, { 0.069218141, -0.035018324, -0.088257571, 0.019279642 }, { -0.073137338, 0.040764456, -0.022352804, 0.031743288 }, { 0.040325697, -0.12840825, -0.009582113, 0.034509657 }, { 0.081971224, -0.0035223125, -0.051728499, 0.0038899717 }, { 0.050968435, 0.022254651, 0.18781134, -0.032392139 }, { 0.024342518, 0.13929014, -0.019175435, -0.0011608234 }, { -0.0021942487, -0.01251222, 0.024263454, -0.063179344 }, { -0.13071776, -0.059221747, -0.034153238, 0.036561209 }, { 0.054124093, 0.070495803, 0.081441614, 0.051900357 }, { 0.027480327, 0.028940343, -0.01469313, 0.032388411 }, { -0.039696828, -0.0069393798, -0.011361641, 0.035031025 }, { -0.039730763, 0.0085971581, -0.0077461932, -0.040735188 }, { 0.10893368, 0.00014757217, 0.025489178, -0.11388774 }, { -0.0013816669, 0.0031148929, 0.10281666, -0.019860642 }, { -0.065093128, -0.11495815, 0.041783056, -0.091373461 }, { -0.044985581, 0.0012713031, -0.16078032, 0.17303747 }, { -0.038132358, -0.02995975, -0.037612782, 0.012575173 }, { 0.0042976619, 0.027014275, 0.017518808, 0.030405184 }, { -0.0015298607, 0.029297664, -0.1034349, 0.023450502 } }, { { 0.028785558, -0.028708377, -0.010459636, 2.8360915e-05 }, { 0.091634877, 0.021214811, 0.12282079, 0.080617943 }, { -0.29287977, 0.045481846, 0.014712563, 0.057317576 }, { -0.10728772, 0.03268482, 0.015167285, -0.011256231 }, { 0.09337321, 0.037150859, 0.052549202, -0.042671474 }, { -0.0041288689, -0.024299997, -0.11357403, -0.022045772 }, { -0.041469935, -0.0071353646, -0.0086607538, 0.008536762 }, { 0.033629272, -0.0070042955, -0.037864853, -0.0055907778 }, { 0.016404597, -0.0055321059, -0.020989839, -0.013771265 }, { 0.042552435, 0.04428518, 0.0030587466, 0.044894182 }, { -0.027600219, 0.026831779, 0.051120849, -0.032184808 }, { 0.13870554, 0.15273282, 0.049260112, 0.043371121 }, { -0.018453269, -0.18061413, 0.24805649, -0.031741165 }, { -0.085137374, 0.025935867, 0.015978067, 0.067726486 }, { 0.072393868, 0.0050430488, 0.0016664585, 0.0072097064 }, { 0.033840162, 0.082225764, -0.079387016, 0.033165625 }, { 0.033170766, 0.0012231618, -0.066984982, 0.051671704 }, { 0.017894231, -0.012267532, 0.045536123, -0.07327109 }, { 0.0073109731, -0.063797898, -0.13446413, 0.1408986 }, { -0.045702456, -0.1647051, -0.14336468, 0.054543693 }, { 0.0042448876, -0.13234456, 0.092181719, -0.10440841 }, { -0.060020212, -0.011098469, -0.030257182, -0.030922037 }, { -0.018118661, 0.00067983745, -0.0061776598, -0.031721273 }, { -0.019885189, 0.094157888, 0.014017961, -0.051373389 } } }, { { { 0.12415319, -0.13611564, -0.029441661, -0.14143497 }, { -0.26074418, 0.011913326, -0.033328425, 0.43248793 }, { 0.19336432, 0.37269586, 0.36803538, -0.51720719 }, { -0.15185913, -0.47431781, -0.6593667, 0.23163184 }, { 0.18276216, 0.19248743, 0.65453332, 0.54748087 }, { 0.17751443, -0.0020337696, 0.08506463, -0.40147769 }, { -0.11370932, 0.11523476, -0.010573025, 0.082295392 }, { -0.13666335, -0.32747478, -0.16897386, 0.15359006 }, { 0.11716326, -0.12259922, 0.0033396256, -0.13240653 }, { -0.27776876, -0.10222241, -0.039920479, 0.35499708 }, { 0.090003723, 0.3313923, 0.1871549, 0.003163675 }, { -0.51626118, -0.76341562, -0.56326874, 0.20153559 }, { -0.34172723, 0.26975563, 0.67520079, -0.1252004 }, { 0.45758078, -0.19142179, 0.064180031, -0.48748431 }, { -0.12800789, 0.1399912, 0.0077954775, 0.14379741 }, { -0.13042104, -0.45670817, -0.18831095, 0.0032738639 }, { 0.12446807, -0.11504524, -0.027331682, 0.03861758 }, { -0.31337986, -0.11842668, 0.033415325, 0.45344231 }, { 0.11463107, 0.077427841, 0.060880794, -0.069619455 }, { -0.37772106, -0.59628905, -0.65426572, 0.065297039 }, { 0.29532991, 0.75920243, 0.53294265, -0.15002562 }, { 0.3618333, 0.10488387, 0.36007528, -0.30963565 }, { -0.13738196, 0.20795596, 0.029274703, 0.18017599 }, { -0.10290023, -0.48517535, -0.33278584, 0.56477854 } }, { { -0.0047891472, 0.024629901, 0.015256654, -0.0084462001 }, { 0.056227746, -0.048057782, -0.15671312, 0.06418471 }, { -0.070093217, -0.018057199, 0.062026545, -0.051053726 }, { -0.0091221476, 0.0020547295, -0.087729813, -0.10164738 }, { 0.098917091, -0.066835916, 0.083151519, 0.006342544 }, { 0.0013540606, 0.038719082, 0.036333261, -0.053178668 }, { 0.0083787438, 0.0028359378, 0.0089872852, 0.031308249 }, { 0.014379686, -0.079563474, -0.079160006, -0.016352226 }, { 0.0091376645, -0.016678006, -0.044636785, -0.0011035265 }, { 0.0099146109, 0.027589302, -0.09494437, 0.07451767 }, { 0.017453983, 0.080674871, 0.06341808, 0.048820473 }, { 0.02794057, 0.058230195, -0.010793601, 0.091813872 }, { -0.049633232, -0.1142016, 0.036984283, 0.0034294865 }, { 0.047712957, 0.10161366, 0.13774722, 0.039503136 }, { 0.014194782, -0.014555183, -0.00053182909, 0.0019143477 }, { 0.0014900262, 0.0056176356, -0.034517871, -0.0010707988 }, { 0.013287784, -0.0073967933, -0.019271341, 0.016354896 }, { -0.10345626, 0.023536634, 0.027943639, -0.015686972 }, { -0.025193395, -0.10224801, 0.078686884, -0.048574399 }, { 0.15797878, -0.0012322757, -0.036096649, -0.23983963 }, { -0.10455507, -0.056368102, -0.06570944, 0.29104616 }, { 0.05155239, -0.040940824, -0.038367594, 0.058174485 }, { 0.010471732, -0.066952904, -0.047763843, -0.021124742 }, { -0.033555686, 0.0049111983, -0.026592789, 0.014438586 } }, { { -0.0048440946, 0.025915095, -0.018325403, 0.022133613 }, { 0.059240081, -0.031272176, -0.12967647, -0.17957913 }, { 0.0574837, 0.067005152, 0.024644254, 0.10786296 }, { 0.067084865, 0.008513386, 0.04077659, 0.10587924 }, { 0.026332643, 0.1072618, -0.098375042, -0.001724609 }, { -0.021386362, -0.0020174921, 0.16800158, 0.081359882 }, { -0.018204146, -0.026432136, -0.0068153455, -0.029997667 }, { -0.043221501, -0.016869967, -0.067406967, -0.024965804 }, { -0.0033879999, 0.031310818, -0.010853802, 0.00088944004 }, { -0.068991006, 0.087874253, -0.15737392, -0.088870044 }, { 0.061763806, -0.00072874343, -0.009915009, -0.0178225 }, { -0.07340717, 0.080339271, -0.0027124572, -0.13078641 }, { -0.023682834, 0.16512313, -0.15784472, 0.047978827 }, { 0.0063250439, -0.09953777, 0.094180888, 0.010565041 }, { 0.010047311, -0.042999009, -0.012483998, -0.016966759 }, { -0.048612679, 0.051708319, 0.015059148, 0.0036776472 }, { -0.011737015, -0.0027276603, 0.026535075, -0.065453876 }, { 0.056388137, 0.061461073, -0.12726984, -0.025578248 }, { 0.0016833003, 0.10878558, 0.13254828, -0.017098914 }, { -0.031606282, -0.072245098, 0.12724789, -0.21852899 }, { -0.062502612, -0.073402771, -0.049624729, 0.069066032 }, { -0.075837195, -0.10297347, -0.07249237, -0.11538062 }, { -0.015644005, 0.039474396, 0.074415075, -0.038881161 }, { -0.040175911, 0.034030267, 0.03947059, 0.014167463 } } }, { { { 0.97019677, 0.97355703, 0.99695983, 0.98991674 }, { 0.94552952, 0.96630359, 0.92585444, 0.89419404 }, { 0.9435447, 0.86545998, 0.92507456, 0.65508294 }, { 0.73759908, 0.87552111, 0.72697883, 0.79725496 }, { 0.87111918, 0.95347518, 0.73011435, 0.53758004 }, { 0.9839393, 0.96829127, 0.94183216, 0.90909143 }, { 0.96798791, 0.98876976, 0.99736817, 0.99621717 }, { 0.9423876, 0.88147679, 0.98054848, 0.95286662 }, { 0.96906348, 0.98791034, 0.99625801, 0.99116169 }, { 0.94707625, 0.9665378, 0.9563539, 0.9280011 }, { 0.96018435, 0.88187869, 0.97758711, 0.96505917 }, { 0.64499021, 0.64456248, 0.78794513, 0.71332673 }, { 0.87073007, 0.92778882, 0.70974824, 0.65822558 }, { 0.88787388, 0.81311133, 0.86603417, 0.86420517 }, { 0.98935782, 0.98687417, 0.99992833, 0.98932764 }, { 0.95398485, 0.88572054, 0.97384313, 0.99227952 }, { 0.98567955, 0.99019799, 0.99943274, 0.99920952 }, { 0.93004482, 0.96784384, 0.95909399, 0.88896838 }, { 0.98984254, 0.98382807, 0.99395144, 0.95671584 }, { 0.75342733, 0.77283296, 0.72248756, 0.84981055 }, { 0.63568318, 0.6494505, 0.83574524, 0.77099234 }, { 0.91965169, 0.95906448, 0.87218942, 0.94939213 }, { 0.98786871, 0.94341754, 0.96548269, 0.98341143 }, { 0.95794101, 0.87263324, 0.8802806, 0.71000638 } }, { { -0.0064390277, 0.051629953, -0.011423447, 0.032337826 }, { 0.055030538, 0.061305324, -0.016012659, 0.083766345 }, { 0.052467122, 0.018425134, -0.00054737782, 0.048038459 }, { 0.076436505, 0.016815709, -0.024174832, -0.00829119 }, { 0.057903371, 0.068822104, -0.0064003131, 0.00010695928 }, { 0.067104151, 0.067284611, 0.0074295447, 0.024215238 }, { 0.073380541, 0.01486405, 0.01523157, 0.012966612 }, { -0.0002536971, 0.010628632, 0.00045031869, 0.041891438 }, { 0.055922922, 0.0090823157, 0.011101162, 0.033807592 }, { -0.040264953, 0.022318628, -0.013682045, -0.016112502 }, { -0.034286564, 4.7089727e-05, -0.013030079, -0.012231424 }, { 0.027756308, 0.084041595, 0.018308393, 0.11564334 }, { 0.0026690817, 0.058149333, -0.013682964, 0.052975934 }, { -0.03852481, 0.063493354, 0.059460027, 0.047740976 }, { 0.026410264, -0.0073902435, 0.022353771, 0.012987341 }, { 0.035217135, -0.0023455309, -0.0055505614, 0.010102857 }, { 0.00075590283, 0.038624793, -0.0040614962, 0.070039437 }, { -0.02318411, 0.04527054, 0.013119286, 0.025335215 }, { 0.021268391, 0.044855911, 0.012622905, 0.04827088 }, { -0.0046678346, -0.01934799, 0.018393432, 0.09750434 }, { 0.12480373, 0.059151139, 0.055196092, 0.26701338 }, { -0.0096669036, 0.065624767, 0.016918517, 0.028425135 }, { 0.026488514, -0.0037618693, 0.0077028717, 0.041713399 }, { 0.018628451, 0.033145064, 0.029067918, -0.000924258 } }, { { -0.043525781, 0.028119778, -0.011653105, -0.020930158 }, { -0.028099186, 0.017594088, -0.099226445, 0.10408808 }, { 0.11750066, -0.0010629746, 0.018381448, 0.096538552 }, { 0.0010069446, 0.013799541, 0.1325137, 0.020820734 }, { -0.053571928, -0.0066793785, 0.14596488, -0.03272949 }, { 0.028507895, 0.015474376, -0.025411653, 0.037264272 }, { 0.033698911, 0.018088387, 0.0038898537, 0.03163178 }, { 0.0057766828, 0.015879322, 0.012557033, 0.071771631 }, { -0.0044521866, 0.0083963511, -0.0020426175, 0.023784146 }, { -0.011508765, 0.0075020051, 0.0018808294, 0.040843424 }, { 0.0085150894, 0.0056891711, 0.010134672, 0.046224768 }, { 0.040825446, 0.10099754, 0.021853299, 0.024507528 }, { -0.0055958303, -0.0060958, 0.1115321, -0.021701014 }, { 0.010487817, -0.010033143, -0.031203025, 0.054265436 }, { 0.0040500672, 0.0053935875, 0.018233022, 0.018797311 }, { 0.064057639, 0.014318185, 0.0199119, 0.014366235 }, { 0.02411682, 0.045454692, 0.0030084434, 0.019464939 }, { 0.012500289, 0.027734846, 0.0025097372, 0.047343669 }, { 0.037625829, -0.00064472688, 0.0557556, 0.04785655 }, { 0.0020433437, 0.019929208, 0.087936103, -0.036738471 }, { 0.020811556, 0.0915387, 0.055445303, -0.065132763 }, { 0.03911814, 0.043721622, 0.0074336204, -0.031370424 }, { 0.014072509, -0.014795458, 0.010517063, 0.022409628 }, { -0.0054107234, 0.055313602, 0.053556404, 0.048574319 } } }, { { { 3.4224197, 3.3162336, 3.1136621, 3.3189801 }, { 4.0715355, 3.5614196, 4.1797877, 4.0959601 }, { 4.3979407, 4.1858272, 4.3116447, 4.5467451 }, { 4.4920032, 4.0716439, 4.6107962, 4.5268016 }, { 5.6570832, 4.9036495, 4.7373547, 4.7259419 }, { 3.3277827, 3.6015237, 4.226646, 3.7939772 }, { 3.4893058, 3.3260638, 3.0626103, 3.1798705 }, { 3.6423735, 4.1092281, 3.3264203, 3.7325301 }, { 3.4756581, 3.2550256, 3.224671, 3.4093307 }, { 3.8511362, 3.4821381, 4.3232597, 3.7357164 }, { 3.6688024, 4.0797971, 3.4140927, 3.6881261 }, { 4.5298469, 4.7472506, 4.4046473, 4.7279944 }, { 4.1614448, 4.1242955, 4.6741969, 5.0037875 }, { 4.3148703, 4.3815566, 4.1976536, 3.9032858 }, { 3.2640506, 3.3214728, 2.9463564, 3.3562068 }, { 3.6729325, 3.9218642, 3.4550701, 3.4833871 }, { 3.435975, 3.3079446, 3.3432341, 3.3632985 }, { 3.8404619, 3.4716915, 3.858149, 3.8677391 }, { 3.3181827, 3.8403872, 4.0363918, 3.9604287 }, { 5.0916792, 5.2773748, 4.5404255, 4.377031 }, { 4.6514614, 4.7569957, 4.1233238, 4.4022582 }, { 3.6884833, 3.6283543, 4.1874612, 4.2963913 }, { 3.456705, 3.6250566, 3.5292789, 3.1420033 }, { 3.5986317, 4.0596074, 4.0696874, 4.5327067 } }, { { -0.12592901, -0.14780788, -0.11051274, -0.18767653 }, { -0.020435093, 0.0055221209, -0.021183195, -0.15159792 }, { 0.022498629, -0.025100789, -0.30939177, 0.016420202 }, { 0.21296442, -0.042976575, 0.082118132, 0.14574735 }, { -0.13608022, 0.16141834, -0.015091164, 0.044951541 }, { -0.08235774, -0.10333151, 0.089785432, -0.036620639 }, { -0.17664465, -0.015842477, -0.083075331, -0.15660828 }, { -0.11292423, -0.072894494, -0.068901923, -0.2283674 }, { -0.19063437, -0.071954393, 0.091375283, -0.26993547 }, { 0.042798331, -0.06495575, 0.050221766, 0.024602586 }, { -0.026228614, 0.0049810367, 0.046584088, -0.13067577 }, { 0.072779737, -0.023369437, -0.030275791, 0.19591126 }, { -0.018649072, 0.029208952, 0.012033439, 0.00094798196 }, { -0.094599446, 0.0070746366, -0.0007115864, -0.040175552 }, { -0.027599009, -0.068747365, 0.19480498, -0.19423733 }, { -0.076671551, 0.0075475135, 0.019853903, -0.012984601 }, { 0.064371855, -0.24044027, -0.043765356, 0.0016424127 }, { -0.076744435, 0.035881398, 0.12967612, 0.081825243 }, { -0.15224256, 0.032665115, -0.027927205, 0.076091133 }, { -0.0057973613, -0.14914213, -0.047678749, -0.037214457 }, { 0.10060085, -0.099197666, -0.22704457, -0.0020812401 }, { -0.070664558, -0.13179176, -0.014217065, -0.030410253 }, { -0.12286487, -0.046623366, -0.10695394, -0.0081383175 }, { -0.14561788, 0.02765909, 0.10439783, 0.033139041 } }, { { 0.0063171031, -0.0047223477, -0.056312039, -0.065065766 }, { -0.0059575982, -0.062348475, 0.069540315, -0.090331962 }, { 0.10218203, 0.050383376, -0.0089914697, -0.037837343 }, { -0.0037657879, 0.18278082, 0.079014627, -0.052587294 }, { -0.33929282, 0.018522098, 0.0078923893, 0.042545349 }, { 0.027294929, -0.086490439, -0.0057363347, -0.035932082 }, { -0.061716003, -0.14470599, 0.033117786, -0.08112808 }, { 0.16414856, 0.082471596, -0.058497326, 0.050552718 }, { -0.07627083, -0.0064181717, -0.031179581, -0.075705068 }, { -0.057808009, -0.00074561624, -0.23990956, 0.018671772 }, { 0.1677602, 0.10757253, 0.028015134, -0.23923178 }, { 0.078827365, 0.068682485, 0.056277532, -0.069749241 }, { 0.079502977, 0.05526585, 0.0089767144, -0.15319341 }, { -0.038594242, -0.055488998, -0.043132461, 0.054313031 }, { 0.12890592, -0.082639555, 0.22520491, -0.026781096 }, { -0.071292391, 0.064592881, -0.050368563, -0.072488866 }, { 0.092998671, 0.12152394, 0.033318795, -0.039691417 }, { -0.0049706273, -0.0014175115, -0.11634604, 0.15219284 }, { -0.012414906, 0.035583927, -0.072463074, -0.058394705 }, { -0.071558898, -0.00093653835, 0.013149622, 0.01495775 }, { -0.057103279, 0.013702583, -0.020242751, 0.04649072 }, { -0.083398977, -0.20123674, 0.062758815, -0.043671819 }, { 0.084479675, 0.17868517, -0.021185269, 0.15711776 }, { 0.11862504, 0.079985297, 0.063556911, 0.14639069 } } }, { { { 0.48018566, 0.17712962, 0.45065949, 0.76214707 }, { 0.37788335, 0.385421, 0.24766167, 0.3647243 }, { 0.45095873, 0.2634498, 0.37824131, 0.10713483 }, { 0.18808611, 0.27852978, 0.23671202, 0.23174978 }, { 0.39404781, -0.7399413, 0.28511918, 0.026007027 }, { 0.46587668, 0.46802177, 0.36697974, 0.23706778 }, { 0.48925391, 0.42086488, 0.49570155, 0.45137287 }, { 0.30655255, 0.35196398, 0.23019387, 0.50586011 }, { 0.45798975, 0.34137244, 0.33289763, 0.54218519 }, { 0.42271216, 0.38700914, 0.48791862, 0.15025833 }, { 0.7282781, 0.37956244, 0.25156645, 0.51632504 }, { 0.084933462, 0.15576738, 0.16469359, 0.29684651 }, { 0.34570877, 0.34912791, 0.26663435, 0.11188061 }, { 0.48552914, 0.19012867, 0.12677402, 0.1234341 }, { 0.2190939, 0.41431469, 0.64823269, 0.51846746 }, { 0.49289149, 0.29829354, 0.29090992, 0.36465152 }, { 0.50568056, 0.64150077, 0.40217634, 0.53523743 }, { 0.24945735, 0.47058801, 0.29099852, 0.25452114 }, { 0.49039753, 0.26327736, 0.39431507, 0.50632023 }, { 0.19678915, 0.031547614, 0.22295107, 0.26300048 }, { 0.12409997, 0.11506147, 0.19327618, 0.2174585 }, { 0.15319333, 0.39177705, 0.38498586, 0.25972804 }, { 0.69027161, 0.37279682, 0.31143504, 0.23440833 }, { 0.39682066, 0.3156927, 0.36369313, 0.14308402 } }, { { 0.15030994, 0.15410005, 0.0072554408, -0.22242826 }, { -0.032421729, 0.22531436, 0.22185899, -0.022703209 }, { 0.070341052, 0.30237173, 0.047916387, 0.03629681 }, { -0.024283222, 0.075614195, 0.013940033, -0.016841468 }, { 0.077729482, 0.19455394, -0.02162282, -0.018761003 }, { -0.22986895, 0.18914992, 0.14483608, 0.11173921 }, { 0.14132894, -0.0081864768, -0.11405791, 0.031777789 }, { 0.38775389, 0.0085565642, -0.057167843, 0.09784167 }, { 0.079102739, 0.030530894, 0.041954967, 0.02957611 }, { 0.076915126, 0.18656729, 0.044218872, 0.22478833 }, { 0.017173879, 0.11961351, -0.085099523, 0.22720323 }, { 0.030466202, 0.095221887, -0.042982583, -0.069264747 }, { 0.041170442, -0.090598444, -0.021082598, -0.028016784 }, { -0.082581617, -0.023712106, 0.32427665, 0.1010696 }, { 0.19197752, 0.10900527, -0.0053794951, 0.068553764 }, { 0.18674269, 0.028895321, -0.053421028, 0.063918058 }, { 0.044090722, -0.054247791, 0.05585954, -0.13406746 }, { 0.08358642, -0.032301886, 0.010371619, 0.099505528 }, { 0.16467816, 0.044994571, -0.0045949279, 0.0626774 }, { 0.12942209, 0.092097891, 0.019866495, 0.10340014 }, { 0.037094903, 0.13829877, 0.15116473, -0.048632499 }, { 0.10749044, 0.14329542, -0.061272024, -0.1536028 }, { 0.097716907, 0.044246181, 0.056664419, 0.15804873 }, { 0.031819999, 0.10132976, 0.079198524, 0.017871462 } }, { { 0.056219172, 0.08683492, -0.061488015, 0.065746152 }, { 0.088983664, 0.19773741, -0.096766599, 0.16352101 }, { -0.0097043787, -0.040925999, 0.097458334, 0.032319634 }, { -0.024873518, 0.057873123, -0.0059256291, -0.057498398 }, { -0.13355098, 0.39190863, 0.017449142, -0.0076009344 }, { 0.10319658, 0.22069551, -0.098795717, 0.10603434 }, { 0.090765308, 0.13803326, -0.070647945, 0.14557561 }, { -0.068457348, 0.058955208, -0.050501105, 0.02914144 }, { 0.10363866, 0.060231993, 0.027681685, 0.079659088 }, { 0.01269983, 0.11977996, -0.049648315, 0.089882363 }, { -0.072877286, 0.019348792, 0.13977764, 0.055396044 }, { 0.028834456, -0.1084196, -0.0043985215, -0.072640844 }, { -0.040232522, 0.051835989, -0.02198193, 0.016421295 }, { -0.087848469, -0.04621504, 0.099259188, -0.0025909067 }, { 0.3000131, 0.10526775, 0.016890366, 0.12892588 }, { -0.021028821, -0.024429075, 0.088067677, -0.084594075 }, { 0.086861805, -0.045902006, 0.0058222123, -0.0075466204 }, { 0.14411905, 0.036488937, 0.05091815, 0.16385101 }, { 0.1576814, 0.043890956, -0.064244298, -0.087234754 }, { -0.071100004, 0.16782304, -0.10860149, -0.1601076 }, { 0.032634641, -0.0025068263, -0.093802703, -0.076176546 }, { 0.1121451, 0.15584236, 0.070074778, 0.083736091 }, { 0.16981897, -0.078106227, 0.12480295, -0.0056807652 }, { -0.20300117, -0.017467249, 0.035504155, 0.056546123 } } } }, { { { { 0.014994926, 0.3118252, 0.12179235, -0.2013765 }, { -0.2622824, 0.28086607, 0.018805882, 0.72058929 }, { -0.0081002049, -0.28176506, -0.592214, -0.15032918 }, { 0.18913426, -0.24000825, 0.0020279072, -0.54749128 }, { 0.010237954, 0.76905205, 0.80173664, -0.016024595 }, { -0.53448318, 0.31204229, -0.16183732, 0.76857439 }, { -0.57639279, -0.63719194, -0.71354849, 0.56346054 }, { 0.49443258, 0.15067585, 0.31864726, -0.30570933 }, { -0.20756322, 0.2544828, -0.005298245, 0.0073796841 }, { -0.61822672, 0.21508574, 0.6362534, 0.30433278 }, { -0.0050327191, -0.278054, -0.3460806, 0.29967778 }, { 0.33983098, -0.11715664, -0.21761592, -0.068273894 }, { 0.5550354, 0.44369709, 0.64019993, -0.026032291 }, { -0.72587268, -0.33528197, -0.33592445, 0.53027141 }, { -0.47623191, -0.61767624, -0.61525655, 0.37823554 }, { 0.82869964, 0.219401, -0.018181789, -0.56937955 }, { -0.051792934, 0.3461701, 0.20915925, 0.078166496 }, { -0.26705611, 0.14439061, 0.0055054648, 0.463243 }, { -0.0019649711, -0.34119962, -0.29306531, -0.040223173 }, { 0.29285811, -0.32824753, -0.24768208, -0.29676955 }, { 0.87604898, 0.25374435, 0.2341931, -0.77851996 }, { -0.80404697, 0.011122158, 0.18899178, 0.55592668 }, { -0.78397618, -0.53690406, -0.59931185, 0.62348293 }, { 0.54613799, 0.080819658, 0.12590931, -0.60614071 } }, { { -0.12307869, -0.20242175, 0.21530167, -0.15608553 }, { 0.00052208688, 0.09998365, -0.067550225, -0.14009319 }, { 0.12621699, -0.089024022, 0.022656689, 0.18947331 }, { 0.34838897, -0.04936051, 0.25527451, -0.18942819 }, { 0.013210249, -0.043957685, -0.19088103, -0.034189573 }, { -0.0027790938, -0.026595097, 0.087083287, -0.12513839 }, { -0.038231564, 0.013328425, -0.0091503894, -0.005743873 }, { 0.17205702, -0.14956835, -0.0088915291, 0.18720588 }, { -0.049670195, 0.39532325, 0.080260299, 0.01811245 }, { 0.043555003, -0.30289197, -0.50878196, 0.27306166 }, { 0.02555972, -0.0068359476, 0.061097702, -0.43822038 }, { -0.10926471, 0.1870906, 0.12419548, 0.1245213 }, { -0.012443149, 0.040036941, 0.18601483, 0.02310445 }, { -0.10442982, 0.057455632, 0.13475314, -0.0019859122 }, { -0.068181593, -0.0033655904, 0.01922998, -0.020393828 }, { -0.10660626, 0.0020812455, 0.081209707, 0.077131932 }, { 0.088733212, -0.10430986, 0.45554817, -0.17113078 }, { 0.0046831409, 0.13247549, -0.1077727, 0.15382275 }, { 0.022346595, 0.022924261, -0.35016323, 0.2437608 }, { 0.029795657, 0.23046877, -0.020493651, -0.33214749 }, { -0.016101582, 0.042296203, 0.046779444, 0.037412394 }, { -0.02214903, -0.025218605, 0.14797485, -0.051723623 }, { 0.021321783, 0.010405115, 0.0075476201, 0.0082410917 }, { 0.040559796, 0.027927916, -0.012812736, -0.0096642379 } }, { { -0.055647079, 0.017595207, 0.34495838, -0.03055759 }, { -0.058415094, 0.027416036, 0.18568916, 0.13044498 }, { 0.01482217, -0.17300703, 0.027540135, -0.2744944 }, { 0.25558424, -0.15324455, -0.29751197, -0.11422984 }, { -0.068936732, -0.11425403, 0.094767025, -0.0020892558 }, { 0.040887892, 0.031622148, -0.095292456, -0.02460001 }, { -0.0026237665, 0.017734103, 0.01213911, 0.0056586962 }, { -0.052138375, 0.052245567, 0.04608449, -0.043004468 }, { -0.17693366, 0.0021023738, 0.13167397, -0.14062006 }, { -0.20900333, 0.0057695127, 0.13057243, 0.046715668 }, { -0.020569928, -0.08439655, -0.09683347, 0.038139385 }, { 0.18196242, 0.44461908, -0.11388512, -0.12413082 }, { 0.072801844, -0.0017236427, -0.0026756083, 0.049805114 }, { -0.092195952, -0.0076195172, -0.22763849, -0.11320887 }, { 0.016234922, 0.007258942, 0.078535592, -0.084829275 }, { -0.15320003, 0.057490618, -0.16065455, -0.17063675 }, { -0.012856124, 0.024818957, 0.097529739, 0.11569844 }, { -0.11141243, 0.26677735, 0.1319403, -0.15699502 }, { -0.021128161, -0.12370585, 0.056198856, -0.1836225 }, { -0.01871806, 0.025525037, 0.063822152, 0.066517944 }, { -0.013759301, 0.11401068, -0.04701374, -0.021321516 }, { 0.032714649, -3.161284e-06, 0.026930697, 0.00019593482 }, { 0.10575127, 0.016956425, 0.016873291, 0.0049304377 }, { -0.11938883, 0.31242334, 0.29347156, -0.19514533 } } }, { { { -0.17374661, -0.028781395, -0.25993234, 0.27242277 }, { -0.13675759, -0.62291002, -0.80742781, 0.54260546 }, { 0.16876581, -0.052588487, 0.22415557, -0.59669887 }, { 0.1769234, 0.64210979, 0.81157479, -0.2718564 }, { -0.99873125, -0.013258174, 0.58939675, 0.99930085 }, { -0.30883355, -0.71116337, -0.76218623, 0.096388818 }, { 0.65749012, -0.54533843, -0.57508599, -0.70359398 }, { -0.27406769, 0.61006308, 0.1873512, 0.2563151 }, { -0.78453523, -0.13585943, -0.048534939, 0.02085237 }, { 0.40938527, -0.76981396, -0.42506866, 0.22362984 }, { 0.29003079, -0.20624421, 0.1151133, -0.50558933 }, { 0.0070051806, 0.20763719, 0.59485798, -0.61562639 }, { -0.4371111, 0.48314196, 0.72981069, 0.99889301 }, { 0.58257878, -0.8603979, -0.94188892, -0.83140889 }, { 0.71858167, -0.49534538, -0.63421799, -0.84488463 }, { 0.016158248, 0.65330502, 0.82883727, -0.127372 }, { -0.50292264, -0.14848746, -0.20836533, 0.2471481 }, { -0.15815031, -0.63472031, -0.79826416, 0.15325573 }, { -0.010424343, -0.022843894, 0.099730136, -0.26040744 }, { 0.15069433, 0.31188588, 0.63836617, -0.25234477 }, { -0.36946506, 0.92093529, 0.96548808, 0.62354203 }, { -0.57070465, -0.99847512, -0.47855156, -0.079970605 }, { 0.077467525, -0.71134336, -0.67172579, -0.66364974 }, { -0.27299386, 0.89512951, 0.61598356, 0.49577277 } }, { { 0.070458859, -0.28774455, 0.21287043, -0.094689772 }, { 0.0029548085, -0.31404605, -0.039280892, -0.3652277 }, { -0.033729607, 0.041215792, 0.065844258, -0.21509418 }, { 0.39270582, 0.067526811, 0.15655351, 0.053346856 }, { 0.052704394, -0.087801294, 0.18655104, 0.056114808 }, { -0.074582751, -0.055177669, -0.22165519, 0.13272162 }, { -0.027850171, 0.0029849066, -0.0062314784, -0.010484316 }, { 0.20753796, -0.0087111988, -0.13875075, -0.06137521 }, { 0.089744421, 0.07271039, 0.099417029, -0.22157272 }, { -0.013209094, 0.048633419, -0.26528065, -0.15253703 }, { 0.052922007, 0.24859103, 0.14406684, 0.13857649 }, { 0.00096142813, 0.32643367, 0.17939549, -0.39761314 }, { 0.013505803, -0.036986517, -0.12729111, 0.15459921 }, { -0.00049722057, -0.047063275, -0.0018666598, 0.1067114 }, { -0.074221027, -0.00927958, -0.029535811, -0.024240068 }, { -0.12387933, 0.06626829, 0.16422781, 0.077740779 }, { 0.14560404, -0.082132455, 0.027268021, 0.18857832 }, { 0.10470732, -0.29519533, -0.23666419, 0.10917064 }, { 0.042550279, 0.02436036, -0.31865644, -0.024987356 }, { -0.030434576, 0.082115299, 0.17770796, 0.020944092 }, { -0.17365377, 0.13807361, 0.12476029, 0.072738061 }, { -0.11503962, -0.04022554, 0.028018434, -0.070211356 }, { -0.043677907, 0.0053361863, 0.0039019898, 0.0027489647 }, { 0.27060899, -0.0016552279, 0.14166067, -0.25461265 } }, { { 0.014703402, 0.094752279, -0.32162049, 0.082335322 }, { -0.31539882, 0.44394592, 0.44316202, -0.031456167 }, { -0.024148679, 0.082370612, -0.0031744796, 0.098610537 }, { 0.46130367, -0.19989896, -0.56118891, 0.11979937 }, { 0.11784636, 0.079971516, -0.16977121, 0.014922099 }, { 0.018367216, -0.076519762, 0.13801492, 0.039682415 }, { -0.0027614728, 0.0010389006, -0.023126227, 0.0027068473 }, { 0.22249856, -0.071302328, 0.23721977, 0.10734273 }, { 0.41478408, -0.36611101, 0.18031261, -0.11176768 }, { 0.15800457, 0.23829725, -0.0016193556, 0.2112867 }, { -0.14793833, -0.15378785, 0.0082778301, 0.27105519 }, { -0.064743588, 0.44794816, -0.12599819, 0.4310022 }, { 0.092725214, 0.033947737, 0.19969884, 0.0072363359 }, { -0.074190657, 0.005985921, 0.300818, -0.090919095 }, { 0.024238118, -0.010955859, -0.068086841, -0.021137349 }, { 0.12196721, -0.19977338, -0.64428422, -0.30808722 }, { 0.46567096, -0.042072501, -0.1778338, 0.34294059 }, { -0.32528695, 0.25699981, 0.49346557, -0.20743316 }, { 0.10422458, 0.049488574, 0.49098274, -0.34871439 }, { 0.16431875, -0.050748897, -0.18464312, -0.61695364 }, { -0.1753479, 0.033238479, -0.046267845, -0.012339883 }, { -0.16098841, 0.080519992, -0.11793031, 0.036790025 }, { 0.017193144, -0.0029212372, -0.0044153187, -0.0057094316 }, { 0.23481771, -0.1556448, -0.18775429, -0.013697353 } } }, { { { 0.98467622, 0.94970347, 0.95791534, 0.9408684 }, { 0.95525144, 0.73013516, 0.58966657, 0.43166004 }, { 0.98562289, 0.95804118, 0.77397471, 0.78825859 }, { 0.96588112, 0.72807352, 0.58424502, 0.79142113 }, { -0.049305848, 0.63904864, 0.099145551, -0.03377918 }, { 0.78673348, 0.62998117, 0.62680207, 0.63245759 }, { 0.48526085, 0.544603, 0.40015579, 0.43297544 }, { 0.82487776, 0.77789448, 0.92917353, 0.91697567 }, { 0.58431326, 0.95748667, 0.99880743, 0.99975533 }, { 0.67096902, 0.60093643, 0.64381538, 0.92594344 }, { 0.95700408, 0.93816272, 0.93111608, 0.80905665 }, { 0.94046044, 0.97116483, 0.77381347, 0.78507504 }, { 0.7077214, 0.7547892, 0.23983411, -0.039180128 }, { 0.3656649, 0.38379871, -0.00015338393, 0.16604667 }, { 0.50679735, 0.6108265, 0.46821675, 0.37829596 }, { 0.55946029, 0.72460731, 0.55919425, 0.81214734 }, { 0.86277825, 0.92634645, 0.95542467, 0.96581976 }, { 0.95061533, 0.75913205, 0.60228234, 0.87287949 }, { 0.99994373, 0.93971324, 0.95087677, 0.96466059 }, { 0.9442062, 0.89161694, 0.72879505, 0.92100486 }, { 0.30989313, 0.29579046, 0.11395771, 0.071428407 }, { 0.16674735, -0.054071458, 0.85747916, 0.82737551 }, { 0.61593841, 0.45356879, 0.43544204, 0.41332561 }, { 0.79196443, 0.43841915, 0.77763172, 0.62193473 } }, { { 0.028699614, 0.071974788, -0.028868668, 0.030119772 }, { -0.16988515, -0.35713152, 0.36877151, 0.37172103 }, { 0.024472009, 0.10373643, 0.052160621, -0.12998364 }, { 0.051999909, -0.1688679, 0.05813266, -0.11063347 }, { 0.026373007, 0.067310776, 0.34433164, 0.0017481699 }, { -0.017659611, -0.10215276, -0.23736187, 0.12678732 }, { -0.0019097928, 0.02067204, -0.030447136, -0.0093192388 }, { 0.10615435, 0.11124023, 0.04473958, 0.14369936 }, { 0.14791062, -0.034502091, 0.041456555, 0.06737059 }, { 0.22389399, 0.2668048, 0.25742349, 0.03724758 }, { 0.0046009946, 0.066632032, 0.097957775, 0.22969631 }, { 0.043253167, -0.013638494, 0.071328387, -0.19249903 }, { -0.023561087, 0.011490741, 0.19824644, -0.04133258 }, { -0.057507532, -0.039265903, 0.060469313, 0.37300659 }, { 0.027051207, -0.0086784396, -0.0055877341, -0.0315352 }, { 0.15724931, 0.0099485187, 0.22462997, 0.14112999 }, { 0.13909905, 0.026199511, -0.12430815, -0.076900423 }, { -0.022327596, -0.1975812, 0.49862652, -0.096026553 }, { 0.076782007, 0.041598482, 0.0033451155, 0.039947963 }, { 0.005353589, 0.070993946, 0.0068174778, -0.17805261 }, { -0.059912765, -0.17027417, -0.060069718, 0.1561139 }, { 0.017122435, 0.048532637, -0.05315926, 0.066962855 }, { 0.058014377, 0.021874362, 0.017248667, -0.0069413843 }, { 0.099274028, 0.040622241, 0.040435904, 0.14191123 } }, { { -0.13453832, 0.071519908, -0.1597656, -0.030758273 }, { -0.13511715, 0.32373425, 0.35851035, -0.18685481 }, { 0.021440457, 0.034442875, 0.14324368, 0.15754565 }, { -0.061440371, 0.16837735, 0.47887644, -0.036265812 }, { 0.55060811, 0.14095672, 0.13077418, 0.25515565 }, { -0.084599968, -0.084002143, 0.1542308, 0.044223437 }, { 0.0017727822, 0.025149715, -0.025479364, -0.0023658361 }, { 0.1619123, 0.069159159, -0.016343512, 0.026108175 }, { 0.3296525, 0.029456656, 0.039715069, 0.015958704 }, { -0.093419591, 0.37051381, -0.063182977, -0.017764112 }, { 0.11962535, 0.062511772, -0.070445145, 0.27768911 }, { 0.07458833, -0.16218828, 0.064111239, 0.43889373 }, { -0.0326486, -0.03666828, -0.17597139, 0.34213144 }, { 0.061334301, -0.0099525239, 0.21497301, 0.0074569296 }, { -0.016749445, 0.00054557189, 0.040331287, 0.066200794 }, { 0.20620866, 0.25268529, 0.46594276, 0.059651923 }, { 0.15170896, 0.041438057, 0.021708506, -0.15049245 }, { -0.14317538, 0.13548996, 0.37297491, 0.13718874 }, { 0.053339004, 0.015014013, -0.10418356, -0.13598877 }, { -0.02227412, 0.045548464, 0.21534467, -0.23828118 }, { -0.055326885, 0.11851609, 0.28938409, 0.041373996 }, { -0.1219532, 0.57338554, -0.094571555, 0.025008596 }, { 0.070380772, 0.016993506, 0.018073937, -0.015404818 }, { 0.17033841, 0.12449473, 0.10847869, -0.11141982 } } }, { { { 4.409738, 4.5071479, 5.4761817, 5.3214091 }, { 5.3741435, 4.6270256, 5.4786338, 5.323679 }, { 4.305776, 4.4890731, 4.6894257, 4.6068436 }, { 5.4930574, 4.9116386, 5.4097636, 4.9225404 }, { 5.1861828, 5.5144226, 5.1307797, 5.0804212 }, { 6.1194597, 6.0655136, 5.7369562, 6.1076578 }, { 6.9549598, 6.9281578, 6.9549598, 6.9549598 }, { 4.5030565, 4.5849566, 4.4830953, 4.4904323 }, { 5.3629211, 5.5524848, 4.5719135, 4.9103175 }, { 4.8906163, 5.3972226, 4.8806206, 5.1834202 }, { 4.5047396, 4.5984947, 4.7039612, 4.3422371 }, { 4.5956963, 5.6294962, 4.46025, 4.4827131 }, { 5.8454206, 6.000743, 5.4594428, 4.9952614 }, { 6.09642, 6.3979283, 4.9784963, 5.6878449 }, { 6.9549598, 6.9752898, 6.9549598, 6.9549598 }, { 6.2053562, 4.9984547, 5.3887395, 4.6221036 }, { 4.5265196, 4.3684629, 5.5819288, 5.4957366 }, { 5.2220057, 4.6118907, 5.5046208, 4.9190037 }, { 4.3408178, 4.4980303, 5.4937404, 5.6154153 }, { 4.4802186, 4.4666194, 4.8546878, 5.1764252 }, { 5.7384024, 5.9048089, 5.4636107, 5.0807017 }, { 5.1013817, 5.2237041, 6.0338955, 5.8869417 }, { 6.9414339, 6.9549598, 6.9549598, 6.9549598 }, { 4.3368412, 4.9692663, 4.7090567, 4.9023075 } }, { { 0.0093525884, -0.33796029, -0.4366682, -0.18161326 }, { -0.34446047, 0.10854359, -0.61563912, -0.16514117 }, { 0.055849315, 0.093045585, 0.36722184, 0.085665647 }, { -0.21881508, -0.036846235, -0.25226403, -0.012790033 }, { -0.14697546, -0.026656628, 0.2559775, 0.026279081 }, { 0.073189287, -0.074472165, -0.15439557, 0.020907645 }, { 0, -0.015078298, 0, 0 }, { 0.027540893, -0.30876053, -0.15680794, -0.18470107 }, { -0.072547269, -0.019227086, -0.26735769, -0.1362069 }, { 0.36907279, -0.28005156, 0.01966203, -0.10277819 }, { -0.26755862, 0.066747173, 0.60834173, -0.23356165 }, { -0.12357338, -0.41742338, 0.081840746, -0.14596222 }, { -0.068599762, -0.004402392, -0.17192993, -0.15797464 }, { -0.072923207, -0.02555551, -0.21075071, 0.047272919 }, { 0, 0.0115085, 0, 0 }, { 0.32527558, 0.066048741, -0.28639187, 0.45171914 }, { -0.158086, -0.049098981, -0.17226122, -0.50289857 }, { -0.39456648, 0.031970902, -0.74883626, 0.20536003 }, { 0.22864705, -0.0095988927, -0.1155595, -0.06240073 }, { 0.12336497, -0.34128076, 0.34341316, 0.083678547 }, { -0.032718317, 0.076359349, -0.30099369, -0.016865529 }, { -0.23491753, -0.17228011, -0.044893186, -0.057411459 }, { -0.0077848677, 0, 0, 0 }, { -0.18713605, -0.11612415, 0.30907006, 0.064707406 } }, { { -0.20768494, -0.15642062, -0.079474216, -0.020948121 }, { -0.18767308, -0.013722599, 0.15827086, -0.27421942 }, { -0.11484158, -0.29325715, 0.24426149, 0.34598577 }, { -0.095599056, 0.16784413, 0.23369965, 0.15036114 }, { 0.058496274, -0.064565923, -0.076598803, -0.11988702 }, { -0.03406356, -0.010863931, -0.036116475, 0.0077051595 }, { 0, -0.015078298, 0, 0 }, { -0.21271534, 0.31678528, 0.084310434, -0.039787477 }, { 0.057420352, -0.60894321, -0.14275706, -0.29178151 }, { -0.21477227, 0.091254596, -0.053659362, -0.13299553 }, { -0.24972574, 0.22261101, -0.59415755, -0.13299464 }, { -0.406027, 0.15018847, 0.33281927, 0.28006105 }, { -0.033198856, 0.013081228, 0.0098634494, -0.18858267 }, { -0.16914457, -0.014917022, -0.15618156, 0.038961385 }, { 0, 0.0115085, 0, 0 }, { 0.047340338, -0.052961301, 0.30193278, 0.38564757 }, { -0.2009302, -0.15247105, -0.32333852, 0.22878398 }, { -0.22934017, 0.022888443, 0.30911154, -0.12420416 }, { 0.21191356, -0.33281926, -0.13523708, -0.038546557 }, { 0.28507859, -0.012777666, 0.16285544, -0.12612215 }, { -0.057034227, 0.01719448, -0.037892291, -0.13064036 }, { -0.075888865, 0.041589292, 0.0089100653, -0.10775402 }, { 0.0075560462, 0, 0, 0 }, { -0.18120766, 0.16485298, 0.58949587, 0.072313493 } } }, { { { 0.60381773, 0.64633179, 0.92301353, 0.23720177 }, { 1.1128727, 0.42172315, 1.6605811, 0.22066721 }, { 0.55829912, 0.7107351, 0.47437673, 0.53646626 }, { 0.75684406, 0.65607146, 1.5264507, 0.12817954 }, { -0.25070514, 0.30263175, -0.21070678, -0.2264813 }, { -0.24745858, -0.26801252, 0.2750925, 0.055035565 }, { -0.018769156, -0.066023008, 0.10111114, 0.0089232736 }, { 0.41152465, 0.52508091, 0.4161358, 0.39058287 }, { 0.90919582, 1.2448772, 0.61547497, 0.51303689 }, { 0.2973136, 1.2348603, 0.24154398, 0.76087607 }, { 0.23369317, 0.68368068, 0.81024353, 0.35451079 }, { 0.69272073, 0.47014545, 0.61401877, 0.43768641 }, { -0.44449894, -0.10123077, -0.19173956, -0.15811184 }, { -0.089717, -0.068601549, -0.16704813, -0.29761406 }, { 0.0055968308, -0.089855929, -0.087150641, 0.2244144 }, { 0.38902787, 0.62620686, 1.3314901, 0.26038797 }, { 0.16776511, 0.32722251, 0.71914611, 0.53556119 }, { 0.63106992, 0.46256454, 1.785895, 0.17339911 }, { 0.72516261, 0.44941094, 0.81174974, 0.61247129 }, { 0.56877815, 0.20989179, 0.7607991, 0.017998645 }, { 0.016372087, 0.26062407, -0.32771461, -0.075930098 }, { -0.11957223, -0.22579003, -0.42587945, -0.0015549589 }, { 0.0049992009, 0.053511694, 0.00053268274, 0.022778575 }, { 0.19356675, 0.5564623, 0.74981777, 0.28733119 } }, { { 0.017029304, 0.22690356, 0.25927682, -0.048136042 }, { 0.52936856, -0.26082526, 0.12568074, -0.046727529 }, { 0.08949554, -0.019090555, 0.31477592, -0.067513409 }, { 0.056302335, -0.011819435, -0.063621104, 0.27092306 }, { 0.053971592, -0.17913246, -0.14991651, -0.044263405 }, { 0.29037749, -0.040498369, -0.33600753, 0.16250066 }, { -0.067102844, -0.17843768, 0.033172168, 0.13638573 }, { 0.057127881, -0.044468822, 0.33005778, 0.34775491 }, { -0.14300931, 0.022121077, -0.045281831, -0.065216583 }, { 0.084931489, 0.06688461, 0.15758114, -0.091330485 }, { -0.014274888, 0.29139103, 0.089163749, -0.18005467 }, { -0.2191522, -0.1333803, -0.31948964, -0.28536602 }, { 0.20298891, -0.0031882515, -0.15749696, -0.014977715 }, { -0.14016857, -0.17278064, 0.01369474, 0.10971499 }, { 0.018219806, 0.080447764, 0.0056022696, -0.043028475 }, { -0.076556403, -0.13038184, -0.23788273, 0.5849635 }, { 0.1038427, 0.18199702, 0.35294355, -0.0023601311 }, { 0.22294845, -0.37427713, 0.2907529, 0.26234219 }, { 0.40809306, 0.12982813, 0.42857338, 0.14064303 }, { 0.4265028, 0.18710053, 0.15310514, 0.067551813 }, { -0.18986488, -0.029676062, -0.087045959, -0.14788626 }, { -0.07865478, 0.011558295, -0.018262356, 0.38992629 }, { 0.22297641, 0.072192947, 0.064119712, 0.12862555 }, { -0.069262467, -0.14990585, 0.31342655, -0.15002022 } }, { { 0.25288162, -0.096551539, 0.051695506, 0.20925392 }, { 0.23093904, 0.096712594, 0.19826434, 0.32530694 }, { 0.14114785, 0.071010138, -0.17642029, 0.092260082 }, { 0.39001648, -0.17666595, 0.088397252, 0.1462816 }, { 0.12484597, 0.066920676, -0.16116194, 0.21758387 }, { 0.15625272, -0.00043631439, -0.07868976, -0.19261141 }, { -0.0142415, 0.06356153, 0.026276923, -0.024546668 }, { 0.097089221, 0.085426402, 0.11936115, 0.012042542 }, { 0.52509109, -0.22465399, -0.11490612, 0.023562122 }, { -0.12418278, 0.11985465, 0.087804943, 0.25283464 }, { 0.10716753, -0.036426901, 0.2469409, -0.095816257 }, { -0.095364501, 0.14001518, -0.068636804, -0.082487255 }, { 0.074490355, 0.25323233, 0.17863748, 0.12482145 }, { -0.019616587, -0.0053326518, 0.047558858, 0.066104462 }, { 0.12647102, 0.25712368, 0.12306783, -0.050252261 }, { -0.13375041, 0.17825067, 0.026649645, -0.33338076 }, { 0.16384463, -0.022241979, 0.17817325, 0.6808721 }, { 0.42075944, -0.024292721, -0.11323318, 0.45027063 }, { -0.023953485, 0.25719992, 0.28680108, 0.33600529 }, { 0.013445546, 0.22504275, 0.17408162, 0.52860686 }, { -0.098839039, -0.27017244, 0.10293505, -0.012472685 }, { 0.074267375, -0.0056418849, 0.17632358, 0.21754089 }, { 0.1491061, 0.017927571, -0.0217757, -0.0039381966 }, { 0.067239102, -0.74624136, 0.12992555, -0.058866581 } } } }, { { { { 0.1270204, 0.7650174, 0.55252173, 0.05956498 }, { -0.36870832, 0.31227245, 0.52167466, 0.4282174 }, { -0.036761861, -0.5477415, -0.76091563, -0.37583127 }, { 0.17129434, -0.14281209, -0.40463148, -0.56367877 }, { 0.07429238, 0.45420144, 0.41919765, 0.019225986 }, { -0.44125436, -0.05567539, 0.080551064, 0.54444995 }, { -0.36600455, -0.55359309, -0.3290331, 0.33946169 }, { 0.65253747, 0.015186649, 0.0665303, -0.64649501 }, { 0.05392469, 0.54355001, 0.7539307, -0.41089455 }, { -0.29264863, 0.49684721, 0.39184208, 0.47737193 }, { 0.10885354, -0.80803227, -0.7443769, -0.3736688 }, { 0.1939378, -0.079590275, -0.42241709, -0.75536039 }, { 0.44776697, 0.44884546, 0.427965, 0.3297221 }, { -0.34595785, 0.27723463, 0.12245317, 0.43884357 }, { 0.18467758, -0.55582608, -0.99421464, -0.0096027817 }, { 0.6672057, -0.038103784, -0.048616141, -0.68508055 }, { -0.016615937, 0.62001729, 0.50530563, -0.22211425 }, { -0.16823123, 0.31934529, 0.47092187, 0.4884373 }, { 0.03194189, -0.5624624, -0.44688229, 0.223814 }, { 0.17828041, -0.080017082, -0.44239439, -0.46726625 }, { 0.19895649, 0.82568772, 0.47859751, 0.064443297 }, { -0.47464217, 0.011895223, 0.01123465, -0.010697203 }, { -0.17670677, -0.66931423, -0.5814681, -0.01325001 }, { 0.65193874, -0.010713062, -0.007915928, -0.65520853 } }, { { -0.01027431, -0.0019056004, 0.0020213958, 0.0064495753 }, { 0.0058416688, 0.0051314639, 0.021497114, 0.005870592 }, { -0.00035518612, -0.00087553938, -0.0029318969, 0.0087577986 }, { -0.0048770476, -0.015949665, -0.034816051, -0.006104917 }, { 0.0015371362, -0.0012591621, 0.01241148, 0.00096621463 }, { 0.0032416133, 0.021025709, 0.0036344622, 0.0015436078 }, { -0.0093946276, 0.0046564763, 0.028177476, -0.01022744 }, { 0.00014675555, 0.030031482, -0.0092302407, -0.001999398 }, { -0.049980321, 0.024752279, 0.016684689, -0.0045230976 }, { 0.0067493834, 0.014071508, 0.0079316435, 0.034593704 }, { 0.01971715, -0.0037227013, -0.013430278, -0.024257585 }, { -0.004342319, 0.024001878, -0.013356442, -0.022792018 }, { -0.0051709665, -0.017029547, 0.040567567, 0.0052520812 }, { 0.0090399102, 0.0079604733, 0.00018765016, -0.0092868977 }, { -0.020304032, 0.0056590257, -0.0045373063, -0.018653318 }, { -9.9636934e-05, 0.002001886, 0.0046843544, 0.0055608043 }, { 0.0018025744, -0.0025962216, 0.0068285574, -0.014851062 }, { 0.00041645221, 0.0054738242, 0.0076769026, -0.013419208 }, { 0.0038347099, -0.0042555066, -0.0066470075, 0.0039146778 }, { -0.009084153, 0.024461537, 0.0034578066, -0.0054827001 }, { 0.0033463477, 0.0045594748, 0.00037604935, -0.01571513 }, { -0.012589588, 0.029678359, -0.019924871, -0.004708459 }, { -0.0002642682, -0.0051057336, -0.0042867302, -0.00041141781 }, { -0.00086487068, -0.0025170841, 0.0030062196, -0.0030385417 } }, { { -0.01027431, -0.0019056004, 0.0020213958, 0.0064495753 }, { 0.0058416688, 0.0051314639, 0.021497114, 0.005870592 }, { -0.00035518612, -0.00087553938, -0.0029318969, 0.0087577986 }, { -0.0048770476, -0.015949665, -0.034816051, -0.006104917 }, { 0.0015371362, -0.0012591621, 0.01241148, 0.00096621463 }, { 0.0032416133, 0.021025709, 0.0036344622, 0.0015436078 }, { -0.0093946276, 0.0046564763, 0.028177476, -0.01022744 }, { 0.00014675555, 0.030031482, -0.0092302407, -0.001999398 }, { -0.049980321, 0.024752279, 0.016684689, -0.0045230976 }, { 0.0067493834, 0.014071508, 0.0079316435, 0.034593704 }, { 0.01971715, -0.0037227013, -0.013430278, -0.024257585 }, { -0.004342319, 0.024001878, -0.013356442, -0.022792018 }, { -0.0051709665, -0.017029547, 0.040567567, 0.0052520812 }, { 0.0090399102, 0.0079604733, 0.00018765016, -0.0092868977 }, { -0.020304032, 0.0056590257, -0.0045373063, -0.018653318 }, { -9.9636934e-05, 0.002001886, 0.0046843544, 0.0055608043 }, { 0.0018025744, -0.0025962216, 0.0068285574, -0.014851062 }, { 0.00041645221, 0.0054738242, 0.0076769026, -0.013419208 }, { 0.0038347099, -0.0042555066, -0.0066470075, 0.0039146778 }, { -0.009084153, 0.024461537, 0.0034578066, -0.0054827001 }, { 0.0033463477, 0.0045594748, 0.00037604935, -0.01571513 }, { -0.012589588, 0.029678359, -0.019924871, -0.004708459 }, { -0.0002642682, -0.0051057336, -0.0042867302, -0.00041141781 }, { -0.00086487068, -0.0025170841, 0.0030062196, -0.0030385417 } } }, { { { -0.68772793, 0.19029367, -0.17427646, 0.60300616 }, { -0.29980532, -0.22397537, -0.4071009, 0.36277983 }, { 0.75628069, -0.13426242, 0.13645381, -0.74653491 }, { 0.14891408, -0.13497977, 0.36807879, -0.39814386 }, { -0.20608987, -0.076497863, -0.19510375, 0.34604256 }, { -0.02421123, -0.4588774, -0.64965351, 0.083039161 }, { 0.51918764, -0.30614677, -0.25791921, -0.40837612 }, { 0.028860181, 0.63152733, 0.5876224, -0.033139773 }, { -0.63418144, 0.046874151, 0.24431924, 0.71662556 }, { -0.29088451, -0.21455586, -0.73980807, 0.65038559 }, { 0.78663226, 0.00020858525, 0.40361403, -0.75720144 }, { 0.1998276, 0.54590973, 0.1773378, -0.35464319 }, { -0.40236144, 0.31362578, -0.34406026, 0.38120073 }, { -0.27845549, -0.46862161, -0.47141499, 0.095899189 }, { 0.6004921, 0.28051621, -0.011378178, -0.98141078 }, { 0.032724674, 0.66798127, 0.66430425, -0.05209965 }, { -0.59603974, -0.083198329, 0.34616224, 0.42082916 }, { -0.14262632, -0.21418442, -0.37504914, 0.32676687 }, { 0.58204273, 0.0067537174, -0.35923481, -0.40792038 }, { 0.15607366, 0.17215007, 0.34414936, -0.33566945 }, { -0.44862333, 0.004919013, 0.0076768115, 0.41897935 }, { -0.022062848, -0.39695079, -0.0062786656, 0.042925103 }, { 0.65953535, -0.15521993, 0.011867978, -0.57721165 }, { 0.031305912, 0.65627006, 0.66779002, -0.029815636 } }, { { 0.011457792, -0.011774949, -0.012205337, 0.0048139052 }, { -0.024024566, 0.018313023, -0.023210623, -0.0046351547 }, { 0.0039133571, 0.0046801024, -0.020590099, -0.0018568631 }, { -0.015369931, -0.0092621276, -0.026149742, 0.0010335971 }, { 0.032555144, -0.01336897, -0.022733265, -0.027997469 }, { -0.028161537, -0.00073877629, -0.023989631, 0.0055660453 }, { -0.012966193, 0.003944376, 0.025685982, -0.0017458044 }, { 0.00015626641, -0.009524206, 0.0083025026, -0.00049753811 }, { -0.02358661, 0.006370149, 0.00087066462, -0.00054248544 }, { -0.0024571244, -0.023218369, -0.010895303, -0.0095647684 }, { 0.0069970393, -0.00093403301, -0.0081922371, -0.00026359768 }, { 0.0065921354, 0.028846533, -0.045676337, 0.006070217 }, { 0.0045248423, -0.0084676847, 0.028756195, 0.020612871 }, { 0.0037691244, -0.0069385161, -0.00029501448, -0.0017839033 }, { -0.0048675353, -0.011930456, 0.0044251285, -0.00016323616 }, { -0.0012291164, -0.0019575288, 0.0078250029, -0.0011151155 }, { 0.00503333, -0.0094538968, 0.0092375183, 0.018207648 }, { 0.0080615812, -0.0073583459, -0.0166794, 0.016416158 }, { 0.002192959, -0.01153759, -0.0048668362, -0.0071123281 }, { -0.010116143, -0.010224552, 0.010897731, 0.00093792816 }, { 0.017199359, -0.0087516179, 0.0021169251, -0.020946959 }, { -0.01570063, 0.020087246, 0.014492818, -0.016014018 }, { 0.0023484072, 0.0015070243, -0.00045616273, -0.001211882 }, { 0.0018090492, -0.0012261901, 0.0012809284, 0.00096488905 } }, { { 0.011457792, -0.011774949, -0.012205337, 0.0048139052 }, { -0.024024566, 0.018313023, -0.023210623, -0.0046351547 }, { 0.0039133571, 0.0046801024, -0.020590099, -0.0018568631 }, { -0.015369931, -0.0092621276, -0.026149742, 0.0010335971 }, { 0.032555144, -0.01336897, -0.022733265, -0.027997469 }, { -0.028161537, -0.00073877629, -0.023989631, 0.0055660453 }, { -0.012966193, 0.003944376, 0.025685982, -0.0017458044 }, { 0.00015626641, -0.009524206, 0.0083025026, -0.00049753811 }, { -0.02358661, 0.006370149, 0.00087066462, -0.00054248544 }, { -0.0024571244, -0.023218369, -0.010895303, -0.0095647684 }, { 0.0069970393, -0.00093403301, -0.0081922371, -0.00026359768 }, { 0.0065921354, 0.028846533, -0.045676337, 0.006070217 }, { 0.0045248423, -0.0084676847, 0.028756195, 0.020612871 }, { 0.0037691244, -0.0069385161, -0.00029501448, -0.0017839033 }, { -0.0048675353, -0.011930456, 0.0044251285, -0.00016323616 }, { -0.0012291164, -0.0019575288, 0.0078250029, -0.0011151155 }, { 0.00503333, -0.0094538968, 0.0092375183, 0.018207648 }, { 0.0080615812, -0.0073583459, -0.0166794, 0.016416158 }, { 0.002192959, -0.01153759, -0.0048668362, -0.0071123281 }, { -0.010116143, -0.010224552, 0.010897731, 0.00093792816 }, { 0.017199359, -0.0087516179, 0.0021169251, -0.020946959 }, { -0.01570063, 0.020087246, 0.014492818, -0.016014018 }, { 0.0023484072, 0.0015070243, -0.00045616273, -0.001211882 }, { 0.0018090492, -0.0012261901, 0.0012809284, 0.00096488905 } } }, { { { 0.71476997, 0.61525336, 0.81507512, 0.79550964 }, { 0.87986984, 0.9232123, 0.74974956, 0.82765975 }, { 0.65321366, 0.82580437, 0.63434042, 0.54903231 }, { 0.97390084, 0.98050251, 0.83713283, 0.72370416 }, { 0.97570877, 0.88760866, 0.88668363, 0.9380218 }, { 0.89705541, 0.88675351, 0.75595095, 0.83467284 }, { 0.77232433, 0.77447327, 0.9084134, 0.84734569 }, { -0.75720667, -0.77520488, -0.80639546, -0.76219811 }, { 0.77130152, 0.83806694, 0.60983327, 0.56357207 }, { 0.91090229, 0.84089752, 0.54694041, 0.59085922 }, { 0.60775044, 0.58913818, 0.53197627, 0.53574024 }, { 0.96044628, 0.83405513, 0.88888419, 0.55105253 }, { 0.79850486, 0.83676557, 0.83574428, 0.86369517 }, { 0.89597751, 0.83876978, 0.87336884, 0.8934314 }, { 0.77801249, 0.78253947, 0.10680725, 0.19167855 }, { -0.74415432, -0.74320194, -0.74587957, -0.72660186 }, { 0.802783, 0.78016447, 0.79046691, 0.87952719 }, { 0.97537479, 0.92311625, 0.79848027, 0.80910594 }, { 0.8125306, 0.82679528, 0.81929639, 0.88516002 }, { 0.97152309, 0.98181547, 0.82815966, 0.81791703 }, { 0.87129411, 0.56410602, 0.87800085, 0.905706 }, { 0.87990229, 0.91776281, 0.99991718, 0.99902102 }, { 0.73060786, 0.72658464, 0.81348263, 0.81648708 }, { -0.75762512, -0.75445002, -0.74430762, -0.75485946 } }, { { 0.018332644, 0.0084005452, -0.0018937689, -0.0035491975 }, { 0.0016556654, 0.0049261013, -0.021796869, 0.0025973591 }, { -0.0019671758, 0.00051947074, 0.0071261223, 0.0056689139 }, { 0.00041901024, -0.0023903288, -0.0035639711, -0.0036673013 }, { 0.009963464, 0.00099195429, -0.0042516892, 0.0092605531 }, { 0.0034813664, 0.0028575465, -0.016343415, -0.0014475905 }, { 0.0053571039, 0.0051116063, 0.016171091, -0.00052744238 }, { 0.00013272575, -0.0095491849, 0.0070156475, 0.0017057538 }, { 0.028067438, -0.0086835729, -0.0087852674, 0.0035321054 }, { 0.0025007808, -0.0075654884, -0.012551417, -0.0068823899 }, { -0.00017607308, 0.002636122, -0.011272055, -0.010314896 }, { 0.010646599, 0.00042804331, 0.013900837, -0.01279076 }, { 0.0059898286, 0.012331371, -0.0073125296, 0.016248603 }, { 0.031579315, -0.0057840222, -0.00018304192, 0.005171422 }, { 0.010928513, 0.0092660887, 0.030404621, 0.0053167707 }, { -0.00014899672, -0.0035246494, 0.0075862845, -0.005861723 }, { 0.0067791918, 0.0021224495, -0.0071755505, -0.010370936 }, { 0.0015352958, -0.0025785166, -0.0092688001, 0.003966373 }, { 0.0036915074, -0.002306452, -0.005736452, -0.0033594125 }, { 0.0065128512, 0.006188005, 0.00088322638, -0.0016227066 }, { 0.0092720771, -0.0046684631, -7.3769604e-05, 0.013807013 }, { -0.0031421984, 0.010622679, 0.00041591214, 0.0032786075 }, { -0.0021421613, -0.0041675589, -0.0029529994, -0.00085350449 }, { -0.00069204344, -0.0010785124, 0.00097549628, 0.0025280456 } }, { { 0.018332644, 0.0084005452, -0.0018937689, -0.0035491975 }, { 0.0016556654, 0.0049261013, -0.021796869, 0.0025973591 }, { -0.0019671758, 0.00051947074, 0.0071261223, 0.0056689139 }, { 0.00041901024, -0.0023903288, -0.0035639711, -0.0036673013 }, { 0.009963464, 0.00099195429, -0.0042516892, 0.0092605531 }, { 0.0034813664, 0.0028575465, -0.016343415, -0.0014475905 }, { 0.0053571039, 0.0051116063, 0.016171091, -0.00052744238 }, { 0.00013272575, -0.0095491849, 0.0070156475, 0.0017057538 }, { 0.028067438, -0.0086835729, -0.0087852674, 0.0035321054 }, { 0.0025007808, -0.0075654884, -0.012551417, -0.0068823899 }, { -0.00017607308, 0.002636122, -0.011272055, -0.010314896 }, { 0.010646599, 0.00042804331, 0.013900837, -0.01279076 }, { 0.0059898286, 0.012331371, -0.0073125296, 0.016248603 }, { 0.031579315, -0.0057840222, -0.00018304192, 0.005171422 }, { 0.010928513, 0.0092660887, 0.030404621, 0.0053167707 }, { -0.00014899672, -0.0035246494, 0.0075862845, -0.005861723 }, { 0.0067791918, 0.0021224495, -0.0071755505, -0.010370936 }, { 0.0015352958, -0.0025785166, -0.0092688001, 0.003966373 }, { 0.0036915074, -0.002306452, -0.005736452, -0.0033594125 }, { 0.0065128512, 0.006188005, 0.00088322638, -0.0016227066 }, { 0.0092720771, -0.0046684631, -7.3769604e-05, 0.013807013 }, { -0.0031421984, 0.010622679, 0.00041591214, 0.0032786075 }, { -0.0021421613, -0.0041675589, -0.0029529994, -0.00085350449 }, { -0.00069204344, -0.0010785124, 0.00097549628, 0.0025280456 } } }, { { { 5.3792285, 5.1960477, 5.5112916, 5.6615254 }, { 5.0489877, 5.2428834, 5.1752035, 5.1109826 }, { 5.5205204, 5.7511938, 5.0202917, 4.9168865 }, { 4.9522523, 4.8880256, 5.1015936, 5.2858816 }, { 5.7256502, 5.7919759, 5.645241, 5.6035708 }, { 6.4076931, 6.4822111, 6.2642633, 6.3925959 }, { 6.9797014, 6.981436, 7.0028674, 6.9976464 }, { -0.03290957, -0.03290957, -0.03290957, -0.03290957 }, { 5.4977854, 5.7684965, 5.3463095, 4.8810492 }, { 4.9869047, 5.4896416, 4.9647805, 4.884877 }, { 5.3141219, 5.3357788, 4.7695434, 4.8709631 }, { 5.2056063, 5.407802, 5.2123857, 4.9428208 }, { 6.2188218, 6.17756, 6.2751008, 6.3672109 }, { 6.9105856, 6.7986798, 6.5712335, 6.5907061 }, { 6.9797014, 6.9797014, 5.6859993, 5.5642483 }, { -0.032764603, -0.032764603, -0.032764603, -0.032764603 }, { 5.7724142, 6.0929556, 5.99581, 5.9265164 }, { 4.9363192, 4.9823732, 5.1732995, 5.2475265 }, { 5.8365191, 5.9972902, 5.9778441, 5.9270668 }, { 4.8706768, 5.0194503, 5.155585, 5.2188041 }, { 6.1569904, 6.0563989, 6.0989699, 6.2139837 }, { 5.8727399, 5.8948086, 5.5734095, 5.5536103 }, { 6.9797014, 6.9797014, 6.9797014, 6.9797014 }, { -0.032766769, -0.032766769, -0.032766769, -0.032766769 } }, { { 0.0011802354, -0.006546101, -0.02103972, 0.0008654047 }, { -0.015460534, 0.017874544, 0.0029121134, 0.023511773 }, { -0.040909245, 0.011927691, 0.011991588, 0.01677931 }, { -0.015633544, -0.0042321141, 0.026623034, 0.0080414514 }, { 0.012614382, 0.0065080145, 0.035716738, -0.0080665814 }, { -0.0057849744, -0.017478461, -0.031219642, 0.00016446523 }, { 0, 0.00032235028, 0, 0 }, { 0, 0, 0, 0 }, { -0.068586697, -0.024228236, -0.012857221, -0.039493706 }, { -0.018078201, -0.015140979, 0.00072119173, -0.051249859 }, { -0.054228277, 0.0097895101, 0.0019832646, -0.011715411 }, { -0.042326208, -0.010160072, 0.037088052, -0.031848667 }, { 0.00067130897, -0.013966717, -0.017268559, -0.0074614576 }, { 0.070515961, 0.012848107, -0.0008396517, 0.0049006506 }, { 0, 0, -0.063014256, -0.0085124986 }, { 0, 0, 0, 0 }, { -0.040302299, 0.0048936307, 0.0064406394, 0.0034044871 }, { -0.010453589, 0.0035820836, -0.017384391, -0.038199947 }, { -0.044968611, -0.0088322127, 0.020303819, 0.0058131005 }, { -0.0056838535, 0.010211409, -0.010999927, -0.027621859 }, { 0.0064753811, -0.0059341242, -0.014902755, 0.0082868118 }, { -0.0013222735, 0.0028492181, -0.023523273, -0.02576271 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, { { 0.0011802354, -0.006546101, -0.02103972, 0.00086540469 }, { -0.015460534, 0.017874544, 0.0029121134, 0.023511773 }, { -0.040909245, 0.011927691, 0.011991588, 0.01677931 }, { -0.015633544, -0.0042321141, 0.026623034, 0.0080414514 }, { 0.012614382, 0.0065080145, 0.035716738, -0.0080665814 }, { -0.0057849744, -0.017478461, -0.031219642, 0.00016446523 }, { 0, 0.00032235028, 0, 0 }, { 0, 0, 0, 0 }, { -0.068586697, -0.024228236, -0.012857221, -0.039493706 }, { -0.018078201, -0.015140979, 0.00072119173, -0.051249859 }, { -0.054228277, 0.0097895101, 0.0019832646, -0.011715411 }, { -0.042326208, -0.010160072, 0.037088052, -0.031848667 }, { 0.00067130897, -0.013966717, -0.017268559, -0.0074614576 }, { 0.070515961, 0.012848107, -0.0008396517, 0.0049006506 }, { 0, 0, -0.063014256, -0.0085124986 }, { 0, 0, 0, 0 }, { -0.040302299, 0.0048936307, 0.0064406394, 0.0034044871 }, { -0.010453589, 0.0035820836, -0.017384391, -0.038199947 }, { -0.044968611, -0.0088322127, 0.020303819, 0.0058131005 }, { -0.0056838535, 0.010211409, -0.010999927, -0.027621859 }, { 0.0064753811, -0.0059341242, -0.014902755, 0.0082868118 }, { -0.0013222735, 0.0028492181, -0.023523273, -0.02576271 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } } }, { { { 0.72189984, 0.22069996, 0.71952927, 0.77725949 }, { 0.4054405, 0.20582059, 0.2747016, 0.37612563 }, { 0.58887422, 0.27441131, 0.19468101, 0.21480554 }, { 0.46814145, 0.34317, 0.46068212, 0.13962064 }, { -0.18134132, -0.26668789, -0.60984999, -0.67879259 }, { -0.47870351, -0.34453227, 0.32494779, 0.10292971 }, { 0.087252967, 0.066950358, 0.31813819, 0.071094818 }, { -0.0031436256, 0.038245091, -0.0076651913, -0.015389479 }, { 1.2668531, 1.2894974, 0.40584018, 0.51755806 }, { 1.3207257, 1.3403747, 0.54924634, 0.40282713 }, { 0.78581828, 0.56379328, 0.27901993, 0.56429306 }, { 0.8748226, 1.0271253, 1.0085726, 0.3888545 }, { -0.22577636, -0.32895071, -0.2846317, -0.11679531 }, { 0.26477285, 0.3179447, -0.063393238, 0.024059773 }, { -0.15463395, -0.22721468, -0.20680404, -0.15700788 }, { 0.012107106, -0.0061245949, -0.024224367, 0.005040693 }, { 0.97943693, 0.64840429, 0.45106998, 0.40771935 }, { 0.49907853, 0.1562184, 0.34338458, 0.39710628 }, { 0.95047709, 0.53336107, 0.38318275, 0.44919148 }, { 0.41892697, 0.069965886, 0.45831656, 0.38821529 }, { -0.20216736, -0.43209441, -0.57684857, -0.40189427 }, { -0.63992377, -0.40683032, -0.59207903, -0.57251716 }, { -0.047117438, -0.1880015, -0.12265155, 0.00059988607 }, { -0.011836442, -0.010049497, -0.0026152072, 0.016137736 } }, { { 0.092068993, 0.0045466749, 0.0054574031, 0.02582156 }, { 0.022115456, -0.015664041, -0.022004653, 0.041431654 }, { 0.029951298, -0.0004408542, 0.0087496069, 0.017850027 }, { 0.029086373, 0.022116039, 0.044010315, 0.001644876 }, { 0.016256387, 0.0083249367, 0.019570849, -0.0021276222 }, { 0.0079070076, -0.024696939, 0.044311101, 0.023671132 }, { -0.0081796119, -0.0024995551, 0.033501743, -0.031958988 }, { 0.0065005403, -0.076642001, 0.015736477, 0.030966939 }, { 0.029110717, 0.039154477, -0.074376619, 0.025532063 }, { -0.10980761, 0.0038346834, 0.014449171, -0.030702653 }, { -0.00068350423, -0.037251569, -0.008409224, -0.026322878 }, { 0.035406012, 0.064176275, 0.031437854, -0.0344642 }, { 0.037145809, -0.024909212, 0.041030386, 0.035216105 }, { -0.093276646, -0.013904083, -0.019536023, -0.023834405 }, { 0.042751846, -0.03620164, 0.081115921, 0.018379967 }, { -0.023909625, 0.012833691, 0.048086442, -0.0097340268 }, { 0.039552712, -0.00026806514, 0.011646753, 0.0065939486 }, { 0.058985248, 0.020165701, 0.0076721521, 0.033274221 }, { 0.052889871, 0.0042520093, 0.016490396, 0.009287973 }, { 0.044305975, -0.0016263469, 0.041390177, 0.033541355 }, { 0.014595133, -0.004801042, -0.0049517302, 0.015714264 }, { 0.00075086205, 0.0080838736, -0.037611057, -0.030488441 }, { 0.0019178075, -0.0082517768, -0.002525773, 0.0043993022 }, { 0.023774971, 0.020335611, 0.0056643868, -0.032100338 } }, { { 0.092068993, 0.0045466749, 0.0054574031, 0.02582156 }, { 0.022115456, -0.015664041, -0.022004653, 0.041431654 }, { 0.029951298, -0.0004408542, 0.0087496069, 0.017850027 }, { 0.029086373, 0.022116039, 0.044010315, 0.001644876 }, { 0.016256387, 0.0083249367, 0.019570849, -0.0021276222 }, { 0.0079070076, -0.024696939, 0.044311101, 0.023671132 }, { -0.0081796119, -0.0024995551, 0.033501743, -0.031958988 }, { 0.0065005403, -0.076642001, 0.015736477, 0.030966939 }, { 0.029110717, 0.039154477, -0.074376619, 0.025532063 }, { -0.10980761, 0.0038346834, 0.014449171, -0.030702653 }, { -0.00068350423, -0.037251569, -0.008409224, -0.026322878 }, { 0.035406012, 0.064176275, 0.031437854, -0.0344642 }, { 0.037145809, -0.024909212, 0.041030386, 0.035216105 }, { -0.093276646, -0.013904083, -0.019536023, -0.023834405 }, { 0.042751846, -0.03620164, 0.081115921, 0.018379967 }, { -0.023909625, 0.012833691, 0.048086442, -0.0097340268 }, { 0.039552712, -0.00026806514, 0.011646753, 0.0065939486 }, { 0.058985248, 0.020165701, 0.0076721521, 0.033274221 }, { 0.052889871, 0.0042520093, 0.016490396, 0.009287973 }, { 0.044305975, -0.0016263469, 0.041390177, 0.033541355 }, { 0.014595133, -0.004801042, -0.0049517303, 0.015714264 }, { 0.00075086205, 0.0080838736, -0.037611057, -0.030488441 }, { 0.0019178075, -0.0082517768, -0.002525773, 0.0043993022 }, { 0.023774971, 0.020335611, 0.0056643868, -0.032100338 } } } } };
+
+#endif \ No newline at end of file
diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.cpp b/servers/visual/rasterizer_rd/light_cluster_builder.cpp
index 78011c22cc..943ef1c7fa 100644
--- a/servers/visual/rasterizer_rd/light_cluster_builder.cpp
+++ b/servers/visual/rasterizer_rd/light_cluster_builder.cpp
@@ -47,8 +47,8 @@ void LightClusterBuilder::bake_cluster() {
float slice_depth = (z_near - z_far) / depth;
- PoolVector<uint8_t>::Write cluster_dataw = cluster_data.write();
- Cell *cluster_data_ptr = (Cell *)cluster_dataw.ptr();
+ uint8_t *cluster_dataw = cluster_data.ptrw();
+ Cell *cluster_data_ptr = (Cell *)cluster_dataw;
//clear the cluster
zeromem(cluster_data_ptr, (width * height * depth * sizeof(Cell)));
@@ -160,8 +160,7 @@ void LightClusterBuilder::bake_cluster() {
//print_line("offset: " + itos(offset));
/* Step 3, Place item lists */
- PoolVector<uint32_t>::Write idsw = ids.write();
- uint32_t *ids_ptr = idsw.ptr();
+ uint32_t *ids_ptr = ids.ptrw();
for (uint32_t i = 0; i < sort_id_count; i++) {
const SortID &id = sort_ids[i];
@@ -173,12 +172,8 @@ void LightClusterBuilder::bake_cluster() {
cell.item_pointers[id.item_type] = pointer | ((counter + 1) << COUNTER_SHIFT);
}
- cluster_dataw = PoolVector<uint8_t>::Write();
-
RD::get_singleton()->texture_update(cluster_texture, 0, cluster_data, true);
RD::get_singleton()->buffer_update(items_buffer, 0, offset * sizeof(uint32_t), ids_ptr, true);
-
- idsw = PoolVector<uint32_t>::Write();
}
void LightClusterBuilder::setup(uint32_t p_width, uint32_t p_height, uint32_t p_depth) {
diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.h b/servers/visual/rasterizer_rd/light_cluster_builder.h
index fd2bd612c3..83014a7dd0 100644
--- a/servers/visual/rasterizer_rd/light_cluster_builder.h
+++ b/servers/visual/rasterizer_rd/light_cluster_builder.h
@@ -104,7 +104,7 @@ private:
uint32_t item_pointers[ITEM_TYPE_MAX];
};
- PoolVector<uint8_t> cluster_data;
+ Vector<uint8_t> cluster_data;
RID cluster_texture;
struct SortID {
@@ -114,7 +114,7 @@ private:
};
SortID *sort_ids = nullptr;
- PoolVector<uint32_t> ids;
+ Vector<uint32_t> ids;
uint32_t sort_id_count = 0;
uint32_t sort_id_max = 0;
RID items_buffer;
diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp
index 7012cb04cd..78fff0c381 100644
--- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp
@@ -271,7 +271,7 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int
uint32_t buffer_size = stride * p_points.size();
- PoolVector<uint8_t> polygon_buffer;
+ Vector<uint8_t> polygon_buffer;
polygon_buffer.resize(buffer_size * sizeof(float));
Vector<RD::VertexDescription> descriptions;
descriptions.resize(4);
@@ -279,9 +279,9 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int
buffers.resize(4);
{
- PoolVector<uint8_t>::Read r = polygon_buffer.read();
- float *fptr = (float *)r.ptr();
- uint32_t *uptr = (uint32_t *)r.ptr();
+ const uint8_t *r = polygon_buffer.ptr();
+ float *fptr = (float *)r;
+ uint32_t *uptr = (uint32_t *)r;
uint32_t base_offset = 0;
{ //vertices
RD::VertexDescription vd;
@@ -430,11 +430,11 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int
if (p_indices.size()) {
//create indices, as indices were requested
- PoolVector<uint8_t> index_buffer;
+ Vector<uint8_t> index_buffer;
index_buffer.resize(p_indices.size() * sizeof(int32_t));
{
- PoolVector<uint8_t>::Write w = index_buffer.write();
- copymem(w.ptr(), p_indices.ptr(), sizeof(int32_t) * p_indices.size());
+ uint8_t *w = index_buffer.ptrw();
+ copymem(w, p_indices.ptr(), sizeof(int32_t) * p_indices.size());
}
pb.index_buffer = RD::get_singleton()->index_buffer_create(p_indices.size(), RD::INDEX_BUFFER_FORMAT_UINT32, index_buffer);
pb.indices = RD::get_singleton()->index_array_create(pb.index_buffer, 0, p_indices.size());
@@ -991,6 +991,15 @@ void RasterizerCanvasRD::_render_item(RD::DrawListID p_draw_list, const Item *p_
}
} break;
+ case Item::Command::TYPE_MESH:
+ case Item::Command::TYPE_MULTIMESH:
+ case Item::Command::TYPE_PARTICLES: {
+ ERR_PRINT("FIXME: Mesh, MultiMesh and Particles render commands are unimplemented currently, they need to be ported to the 4.0 rendering architecture.");
+#ifndef _MSC_VER
+#warning Item::Command types for Mesh, MultiMesh and Particles need to be implemented.
+#endif
+ // See #if 0'ed code below to port from GLES3.
+ } break;
#if 0
case Item::Command::TYPE_MESH: {
@@ -1707,7 +1716,7 @@ RID RasterizerCanvasRD::occluder_polygon_create() {
return occluder_polygon_owner.make_rid(occluder);
}
-void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) {
+void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) {
OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder);
ERR_FAIL_COND(!oc);
@@ -1727,20 +1736,20 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con
if (p_lines.size()) {
- PoolVector<uint8_t> geometry;
- PoolVector<uint8_t> indices;
+ Vector<uint8_t> geometry;
+ Vector<uint8_t> indices;
int lc = p_lines.size();
geometry.resize(lc * 6 * sizeof(float));
indices.resize(lc * 3 * sizeof(uint16_t));
{
- PoolVector<uint8_t>::Write vw = geometry.write();
- float *vwptr = (float *)vw.ptr();
- PoolVector<uint8_t>::Write iw = indices.write();
- uint16_t *iwptr = (uint16_t *)iw.ptr();
+ uint8_t *vw = geometry.ptrw();
+ float *vwptr = (float *)vw;
+ uint8_t *iw = indices.ptrw();
+ uint16_t *iwptr = (uint16_t *)iw;
- PoolVector<Vector2>::Read lr = p_lines.read();
+ const Vector2 *lr = p_lines.ptr();
const int POLY_HEIGHT = 16384;
@@ -1789,10 +1798,10 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con
} else {
//update existing
- PoolVector<uint8_t>::Read vr = geometry.read();
- RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr.ptr());
- PoolVector<uint8_t>::Read ir = indices.read();
- RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir.ptr());
+ const uint8_t *vr = geometry.ptr();
+ RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr);
+ const uint8_t *ir = indices.ptr();
+ RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir);
}
}
}
@@ -2131,15 +2140,15 @@ void RasterizerCanvasRD::MaterialData::update_parameters(const Map<StringName, V
RID *ids_ptr = u.ids.ptrw();
ids_ptr[0] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[1] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
- ids_ptr[2] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
+ ids_ptr[2] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[3] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
- ids_ptr[4] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
+ ids_ptr[4] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[5] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[6] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[7] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
- ids_ptr[8] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
+ ids_ptr[8] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[9] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
- ids_ptr[10] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
+ ids_ptr[10] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[11] = canvas_singleton->storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
uniforms.push_back(u);
}
@@ -2431,11 +2440,11 @@ RasterizerCanvasRD::RasterizerCanvasRD(RasterizerStorageRD *p_storage) {
{ // default index buffer
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(6 * 4);
{
- PoolVector<uint8_t>::Write w = pv.write();
- int *p32 = (int *)w.ptr();
+ uint8_t *w = pv.ptrw();
+ int *p32 = (int *)w;
p32[0] = 0;
p32[1] = 1;
p32[2] = 2;
@@ -2471,7 +2480,7 @@ RasterizerCanvasRD::RasterizerCanvasRD(RasterizerStorageRD *p_storage) {
state.time = 0;
- ERR_FAIL_COND(sizeof(PushConstant) != 128);
+ static_assert(sizeof(PushConstant) == 128);
}
bool RasterizerCanvasRD::free(RID p_rid) {
@@ -2482,7 +2491,7 @@ bool RasterizerCanvasRD::free(RID p_rid) {
light_set_use_shadow(p_rid, false, 64);
canvas_light_owner.free(p_rid);
} else if (occluder_polygon_owner.owns(p_rid)) {
- occluder_polygon_set_shape_as_lines(p_rid, PoolVector<Vector2>());
+ occluder_polygon_set_shape_as_lines(p_rid, Vector<Vector2>());
occluder_polygon_owner.free(p_rid);
} else {
return false;
diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h
index 17560ea540..894a00a436 100644
--- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h
@@ -482,7 +482,7 @@ public:
void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders);
RID occluder_polygon_create();
- void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines);
+ void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines);
void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode);
void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, const Transform2D &p_canvas_transform);
diff --git a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp
index 4b8b3334b5..6b6c750fd3 100644
--- a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp
@@ -30,6 +30,8 @@
#include "rasterizer_effects_rd.h"
#include "core/os/os.h"
+#include "core/project_settings.h"
+#include "cubemap_coeffs.h"
static _FORCE_INLINE_ void store_transform_3x3(const Basis &p_basis, float *p_array) {
p_array[0] = p_basis.elements[0][0];
@@ -246,26 +248,30 @@ void RasterizerEffectsRD::gaussian_glow(RID p_source_rd_texture, RID p_framebuff
RD::get_singleton()->draw_list_end();
}
-void RasterizerEffectsRD::cubemap_roughness(RID p_source_rd_texture, bool p_source_is_panorama, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness) {
+void RasterizerEffectsRD::cubemap_roughness(RID p_source_rd_texture, bool p_source_is_panorama, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size) {
zeromem(&roughness.push_constant, sizeof(CubemapRoughnessPushConstant));
- roughness.push_constant.face_id = p_face_id;
+ roughness.push_constant.face_id = p_face_id > 9 ? 0 : p_face_id;
roughness.push_constant.roughness = p_roughness;
roughness.push_constant.sample_count = p_sample_count;
roughness.push_constant.use_direct_write = p_roughness == 0.0;
+ roughness.push_constant.face_size = p_size;
- //RUN
- RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD);
- RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, roughness.pipelines[p_source_is_panorama ? CUBEMAP_ROUGHNESS_SOURCE_PANORAMA : CUBEMAP_ROUGHNESS_SOURCE_CUBEMAP].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer)));
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, roughness.pipelines[p_source_is_panorama ? CUBEMAP_ROUGHNESS_SOURCE_PANORAMA : CUBEMAP_ROUGHNESS_SOURCE_CUBEMAP]);
- RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0);
- RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_framebuffer), 1);
- RD::get_singleton()->draw_list_set_push_constant(draw_list, &roughness.push_constant, sizeof(CubemapRoughnessPushConstant));
+ RD::get_singleton()->compute_list_set_push_constant(compute_list, &roughness.push_constant, sizeof(CubemapRoughnessPushConstant));
- RD::get_singleton()->draw_list_draw(draw_list, true);
- RD::get_singleton()->draw_list_end();
+ int x_groups = (p_size - 1) / 8 + 1;
+ int y_groups = (p_size - 1) / 8 + 1;
+
+ RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, p_face_id > 9 ? 6 : 1);
+
+ RD::get_singleton()->compute_list_end();
}
void RasterizerEffectsRD::render_panorama(RD::DrawListID p_list, RenderingDevice::FramebufferFormatID p_fb_format, RID p_panorama, const CameraMatrix &p_camera, const Basis &p_orientation, float p_alpha, float p_multipler) {
@@ -750,6 +756,55 @@ void RasterizerEffectsRD::roughness_limit(RID p_source_normal, RID p_roughness,
RD::get_singleton()->compute_list_end();
}
+void RasterizerEffectsRD::cubemap_downsample(RID p_source_cubemap, bool p_source_is_panorama, RID p_dest_cubemap, const Size2i &p_size) {
+
+ cubemap_downsampler.push_constant.face_size = p_size.x;
+
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, cubemap_downsampler.pipelines[p_source_is_panorama ? CUBEMAP_DOWNSAMPLER_SOURCE_PANORAMA : CUBEMAP_DOWNSAMPLER_SOURCE_CUBEMAP]);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_cubemap), 0);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_cubemap), 1);
+
+ int x_groups = (p_size.x - 1) / 8 + 1;
+ int y_groups = (p_size.y - 1) / 8 + 1;
+
+ RD::get_singleton()->compute_list_set_push_constant(compute_list, &cubemap_downsampler.push_constant, sizeof(CubemapDownsamplerPushConstant));
+
+ RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 6); // one z_group for each face
+
+ RD::get_singleton()->compute_list_end();
+}
+
+void RasterizerEffectsRD::cubemap_filter(RID p_source_cubemap, Vector<RID> p_dest_cubemap, bool p_use_array) {
+
+ Vector<RD::Uniform> uniforms;
+ for (int i = 0; i < p_dest_cubemap.size(); i++) {
+ RD::Uniform u;
+ u.type = RD::UNIFORM_TYPE_IMAGE;
+ u.binding = i;
+ u.ids.push_back(p_dest_cubemap[i]);
+ uniforms.push_back(u);
+ }
+ if (RD::get_singleton()->uniform_set_is_valid(filter.image_uniform_set)) {
+ RD::get_singleton()->free(filter.image_uniform_set);
+ }
+ filter.image_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, filter.shader.version_get_shader(filter.shader_version, 0), 2);
+
+ int pipeline = p_use_array ? FILTER_MODE_HIGH_QUALITY_ARRAY : FILTER_MODE_HIGH_QUALITY;
+ pipeline = filter.use_high_quality ? pipeline : pipeline + 1;
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, filter.pipelines[pipeline]);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_cubemap, true), 0);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, filter.uniform_set, 1);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, filter.image_uniform_set, 2);
+
+ int x_groups = p_use_array ? 1792 : 342; // (128 * 128 * 7) / 64 : (128*128 + 64*64 + 32*32 + 16*16 + 8*8 + 4*4 + 2*2) / 64
+
+ RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, 6, 1); // one y_group for each face
+
+ RD::get_singleton()->compute_list_end();
+}
+
RasterizerEffectsRD::RasterizerEffectsRD() {
{
@@ -790,7 +845,7 @@ RasterizerEffectsRD::RasterizerEffectsRD() {
roughness.shader_version = roughness.shader.version_create();
for (int i = 0; i < CUBEMAP_ROUGHNESS_SOURCE_MAX; i++) {
- roughness.pipelines[i].setup(roughness.shader.version_get_shader(roughness.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0);
+ roughness.pipelines[i] = RD::get_singleton()->compute_pipeline_create(roughness.shader.version_get_shader(roughness.shader_version, i));
}
}
@@ -930,7 +985,7 @@ RasterizerEffectsRD::RasterizerEffectsRD() {
}
{
- // Initialize copier
+ // Initialize roughness limiter
Vector<String> shader_modes;
shader_modes.push_back("");
@@ -941,6 +996,55 @@ RasterizerEffectsRD::RasterizerEffectsRD() {
roughness_limiter.pipeline = RD::get_singleton()->compute_pipeline_create(roughness_limiter.shader.version_get_shader(roughness_limiter.shader_version, 0));
}
+ {
+ //Initialize cubemap downsampler
+ Vector<String> cubemap_downsampler_modes;
+ cubemap_downsampler_modes.push_back("\n#define MODE_SOURCE_PANORAMA\n");
+ cubemap_downsampler_modes.push_back("\n#define MODE_SOURCE_CUBEMAP\n");
+ cubemap_downsampler.shader.initialize(cubemap_downsampler_modes);
+
+ cubemap_downsampler.shader_version = cubemap_downsampler.shader.version_create();
+
+ for (int i = 0; i < CUBEMAP_DOWNSAMPLER_SOURCE_MAX; i++) {
+ cubemap_downsampler.pipelines[i] = RD::get_singleton()->compute_pipeline_create(cubemap_downsampler.shader.version_get_shader(cubemap_downsampler.shader_version, i));
+ }
+ }
+
+ {
+ // Initialize cubemap filter
+ filter.use_high_quality = GLOBAL_GET("rendering/quality/reflections/fast_filter_high_quality");
+
+ Vector<String> cubemap_filter_modes;
+ cubemap_filter_modes.push_back("\n#define USE_HIGH_QUALITY\n");
+ cubemap_filter_modes.push_back("\n#define USE_LOW_QUALITY\n");
+ cubemap_filter_modes.push_back("\n#define USE_HIGH_QUALITY\n#define USE_TEXTURE_ARRAY\n");
+ cubemap_filter_modes.push_back("\n#define USE_LOW_QUALITY\n#define USE_TEXTURE_ARRAY\n");
+ filter.shader.initialize(cubemap_filter_modes);
+ filter.shader_version = filter.shader.version_create();
+
+ for (int i = 0; i < FILTER_MODE_MAX; i++) {
+ filter.pipelines[i] = RD::get_singleton()->compute_pipeline_create(filter.shader.version_get_shader(filter.shader_version, i));
+ }
+
+ if (filter.use_high_quality) {
+ filter.coefficient_buffer = RD::get_singleton()->storage_buffer_create(sizeof(high_quality_coeffs));
+ RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(high_quality_coeffs), &high_quality_coeffs[0], false);
+ } else {
+ filter.coefficient_buffer = RD::get_singleton()->storage_buffer_create(sizeof(low_quality_coeffs));
+ RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(low_quality_coeffs), &low_quality_coeffs[0], false);
+ }
+
+ Vector<RD::Uniform> uniforms;
+ {
+ RD::Uniform u;
+ u.type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
+ u.binding = 0;
+ u.ids.push_back(filter.coefficient_buffer);
+ uniforms.push_back(u);
+ }
+ filter.uniform_set = RD::get_singleton()->uniform_set_create(uniforms, filter.shader.version_get_shader(filter.shader_version, filter.use_high_quality ? 0 : 1), 1);
+ }
+
RD::SamplerState sampler;
sampler.mag_filter = RD::SAMPLER_FILTER_LINEAR;
sampler.min_filter = RD::SAMPLER_FILTER_LINEAR;
@@ -955,11 +1059,11 @@ RasterizerEffectsRD::RasterizerEffectsRD() {
default_mipmap_sampler = RD::get_singleton()->sampler_create(sampler);
{ //create index array for copy shaders
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(6 * 4);
{
- PoolVector<uint8_t>::Write w = pv.write();
- int *p32 = (int *)w.ptr();
+ uint8_t *w = pv.ptrw();
+ int *p32 = (int *)w;
p32[0] = 0;
p32[1] = 1;
p32[2] = 2;
@@ -973,7 +1077,29 @@ RasterizerEffectsRD::RasterizerEffectsRD() {
}
RasterizerEffectsRD::~RasterizerEffectsRD() {
+ if (RD::get_singleton()->uniform_set_is_valid(filter.image_uniform_set)) {
+ RD::get_singleton()->free(filter.image_uniform_set);
+ }
+
+ if (RD::get_singleton()->uniform_set_is_valid(filter.uniform_set)) {
+ RD::get_singleton()->free(filter.uniform_set);
+ }
+
RD::get_singleton()->free(default_sampler);
- blur.shader.version_free(blur.shader_version);
+ RD::get_singleton()->free(default_mipmap_sampler);
RD::get_singleton()->free(index_buffer); //array gets freed as dependency
+ RD::get_singleton()->free(filter.coefficient_buffer);
+ blur.shader.version_free(blur.shader_version);
+ roughness.shader.version_free(roughness.shader_version);
+ sky.shader.version_free(sky.shader_version);
+ tonemap.shader.version_free(tonemap.shader_version);
+ luminance_reduce.shader.version_free(luminance_reduce.shader_version);
+ copy.shader.version_free(copy.shader_version);
+ bokeh.shader.version_free(bokeh.shader_version);
+ ssao.minify_shader.version_free(ssao.minify_shader_version);
+ ssao.gather_shader.version_free(ssao.gather_shader_version);
+ ssao.blur_shader.version_free(ssao.blur_shader_version);
+ roughness_limiter.shader.version_free(roughness_limiter.shader_version);
+ cubemap_downsampler.shader.version_free(cubemap_downsampler.shader_version);
+ filter.shader.version_free(filter.shader_version);
}
diff --git a/servers/visual/rasterizer_rd/rasterizer_effects_rd.h b/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
index cd5634d564..fbf6b39ecb 100644
--- a/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_effects_rd.h
@@ -36,6 +36,8 @@
#include "servers/visual/rasterizer_rd/shaders/blur.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/bokeh_dof.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/copy.glsl.gen.h"
+#include "servers/visual/rasterizer_rd/shaders/cubemap_downsampler.glsl.gen.h"
+#include "servers/visual/rasterizer_rd/shaders/cubemap_filter.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/luminance_reduce.glsl.gen.h"
#include "servers/visual/rasterizer_rd/shaders/roughness_limiter.glsl.gen.h"
@@ -125,6 +127,8 @@ class RasterizerEffectsRD {
uint32_t sample_count;
float roughness;
uint32_t use_direct_write;
+ float face_size;
+ float pad[3];
};
struct CubemapRoughness {
@@ -132,7 +136,7 @@ class RasterizerEffectsRD {
CubemapRoughnessPushConstant push_constant;
CubemapRoughnessShaderRD shader;
RID shader_version;
- RenderPipelineVertexFormatCacheRD pipelines[CUBEMAP_ROUGHNESS_SOURCE_MAX];
+ RID pipelines[CUBEMAP_ROUGHNESS_SOURCE_MAX];
} roughness;
struct SkyPushConstant {
@@ -355,6 +359,46 @@ class RasterizerEffectsRD {
} roughness_limiter;
+ enum CubemapDownsamplerSource {
+ CUBEMAP_DOWNSAMPLER_SOURCE_PANORAMA,
+ CUBEMAP_DOWNSAMPLER_SOURCE_CUBEMAP,
+ CUBEMAP_DOWNSAMPLER_SOURCE_MAX
+ };
+
+ struct CubemapDownsamplerPushConstant {
+ uint32_t face_size;
+ float pad[3];
+ };
+
+ struct CubemapDownsampler {
+
+ CubemapDownsamplerPushConstant push_constant;
+ CubemapDownsamplerShaderRD shader;
+ RID shader_version;
+ RID pipelines[CUBEMAP_DOWNSAMPLER_SOURCE_MAX];
+
+ } cubemap_downsampler;
+
+ enum CubemapFilterMode {
+ FILTER_MODE_HIGH_QUALITY,
+ FILTER_MODE_LOW_QUALITY,
+ FILTER_MODE_HIGH_QUALITY_ARRAY,
+ FILTER_MODE_LOW_QUALITY_ARRAY,
+ FILTER_MODE_MAX,
+ };
+
+ struct CubemapFilter {
+
+ CubemapFilterShaderRD shader;
+ RID shader_version;
+ RID pipelines[FILTER_MODE_MAX];
+ RID uniform_set;
+ RID image_uniform_set;
+ RID coefficient_buffer;
+ bool use_high_quality;
+
+ } filter;
+
RID default_sampler;
RID default_mipmap_sampler;
RID index_buffer;
@@ -377,7 +421,7 @@ public:
void gaussian_blur(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, const Rect2 &p_region);
void gaussian_glow(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, float p_strength = 1.0, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_treshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0);
- void cubemap_roughness(RID p_source_rd_texture, bool p_source_is_panorama, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness);
+ void cubemap_roughness(RID p_source_rd_texture, bool p_source_is_panorama, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
void render_panorama(RD::DrawListID p_list, RenderingDevice::FramebufferFormatID p_fb_format, RID p_panorama, const CameraMatrix &p_camera, const Basis &p_orientation, float p_alpha, float p_multipler);
void make_mipmap(RID p_source_rd_texture, RID p_framebuffer_half, const Vector2 &p_pixel_size);
void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_rect, float p_z_near, float p_z_far, float p_bias, bool p_dp_flip);
@@ -424,6 +468,8 @@ public:
void generate_ssao(RID p_depth_buffer, RID p_normal_buffer, const Size2i &p_depth_buffer_size, RID p_depth_mipmaps_texture, const Vector<RID> &depth_mipmaps, RID p_ao1, bool p_half_size, RID p_ao2, RID p_upscale_buffer, float p_intensity, float p_radius, float p_bias, const CameraMatrix &p_projection, VS::EnvironmentSSAOQuality p_quality, VS::EnvironmentSSAOBlur p_blur, float p_edge_sharpness);
void roughness_limit(RID p_source_normal, RID p_roughness, const Size2i &p_size, float p_curve);
+ void cubemap_downsample(RID p_source_cubemap, bool p_source_is_panorama, RID p_dest_cubemap, const Size2i &p_size);
+ void cubemap_filter(RID p_source_cubemap, Vector<RID> p_dest_cubemap, bool p_use_array);
RasterizerEffectsRD();
~RasterizerEffectsRD();
diff --git a/servers/visual/rasterizer_rd/rasterizer_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_rd.cpp
index 34be4817f6..206320376b 100644
--- a/servers/visual/rasterizer_rd/rasterizer_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_rd.cpp
@@ -121,18 +121,16 @@ void RasterizerRD::initialize() {
String error;
copy_viewports_rd_shader = RD::get_singleton()->shader_create(source);
if (!copy_viewports_rd_shader.is_valid()) {
- print_line("failed compilation: " + error);
- } else {
- print_line("compilation success");
+ print_line("Failed compilation: " + error);
}
}
{ //create index array for copy shader
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(6 * 4);
{
- PoolVector<uint8_t>::Write w = pv.write();
- int *p32 = (int *)w.ptr();
+ uint8_t *w = pv.ptrw();
+ int *p32 = (int *)w;
p32[0] = 0;
p32[1] = 1;
p32[2] = 2;
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
index d329fa5779..0a3105b143 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
@@ -67,18 +67,6 @@ static _FORCE_INLINE_ void store_transform_3x3(const Transform &p_mtx, float *p_
p_array[11] = 0;
}
-static _FORCE_INLINE_ void store_transform_3x3_430(const Transform &p_mtx, float *p_array) {
- p_array[0] = p_mtx.basis.elements[0][0];
- p_array[1] = p_mtx.basis.elements[1][0];
- p_array[2] = p_mtx.basis.elements[2][0];
- p_array[3] = p_mtx.basis.elements[0][1];
- p_array[4] = p_mtx.basis.elements[1][1];
- p_array[5] = p_mtx.basis.elements[2][1];
- p_array[6] = p_mtx.basis.elements[0][2];
- p_array[7] = p_mtx.basis.elements[1][2];
- p_array[8] = p_mtx.basis.elements[2][2];
-}
-
static _FORCE_INLINE_ void store_camera(const CameraMatrix &p_mtx, float *p_array) {
for (int i = 0; i < 4; i++) {
@@ -1906,8 +1894,16 @@ void RasterizerSceneHighEndRD::_render_scene(RID p_render_buffer, const Transfor
if (draw_sky) {
RENDER_TIMESTAMP("Render Sky");
+
+ CameraMatrix projection = p_cam_projection;
+ if (p_reflection_probe.is_valid()) {
+ CameraMatrix correction;
+ correction.set_depth_correction(true);
+ projection = correction * p_cam_projection;
+ }
+
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(opaque_framebuffer, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ);
- _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, p_cam_projection, p_cam_transform, 1.0);
+ _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, projection, p_cam_transform, 1.0);
RD::get_singleton()->draw_list_end();
if (using_separate_specular && !can_continue) {
@@ -2104,15 +2100,15 @@ void RasterizerSceneHighEndRD::_update_render_base_uniform_set() {
RID *ids_ptr = u.ids.ptrw();
ids_ptr[0] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[1] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
- ids_ptr[2] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
+ ids_ptr[2] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[3] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
- ids_ptr[4] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
+ ids_ptr[4] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[5] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED);
ids_ptr[6] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[7] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
- ids_ptr[8] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
+ ids_ptr[8] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[9] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
- ids_ptr[10] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
+ ids_ptr[10] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
ids_ptr[11] = storage->sampler_rd_get_default(VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC, VS::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED);
uniforms.push_back(u);
}
@@ -2697,6 +2693,11 @@ RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() {
RD::get_singleton()->free(view_dependant_uniform_set);
}
+ RD::get_singleton()->free(default_render_buffers_uniform_set);
+ RD::get_singleton()->free(default_radiance_uniform_set);
+ RD::get_singleton()->free(default_vec4_xform_buffer);
+ RD::get_singleton()->free(shadow_sampler);
+
storage->free(wireframe_material_shader);
storage->free(overdraw_material_shader);
storage->free(default_shader);
@@ -2706,6 +2707,11 @@ RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() {
storage->free(default_material);
{
+ RD::get_singleton()->free(scene_state.uniform_buffer);
+ RD::get_singleton()->free(scene_state.instance_buffer);
+ RD::get_singleton()->free(scene_state.gi_probe_buffer);
+ RD::get_singleton()->free(scene_state.directional_light_buffer);
+ RD::get_singleton()->free(scene_state.light_buffer);
RD::get_singleton()->free(scene_state.reflection_buffer);
memdelete_arr(scene_state.instances);
memdelete_arr(scene_state.gi_probes);
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
index 317ffb994f..457f6970c8 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
@@ -40,21 +40,29 @@ void RasterizerSceneRD::_clear_reflection_data(ReflectionData &rd) {
rd.layers.clear();
rd.radiance_base_cubemap = RID();
+ if (rd.downsampled_radiance_cubemap.is_valid()) {
+ RD::get_singleton()->free(rd.downsampled_radiance_cubemap);
+ }
+ rd.downsampled_radiance_cubemap = RID();
+ rd.downsampled_layer.mipmaps.clear();
+ rd.coefficient_buffer = RID();
}
-void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size, int p_mipmaps, bool p_use_array, RID p_base_cube, int p_base_layer) {
+void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size, int p_mipmaps, bool p_use_array, RID p_base_cube, int p_base_layer, bool p_low_quality) {
//recreate radiance and all data
int mipmaps = p_mipmaps;
uint32_t w = p_size, h = p_size;
if (p_use_array) {
+ int layers = p_low_quality ? 7 : roughness_layers;
- for (int i = 0; i < roughness_layers; i++) {
+ for (int i = 0; i < layers; i++) {
ReflectionData::Layer layer;
uint32_t mmw = w;
uint32_t mmh = h;
layer.mipmaps.resize(mipmaps);
+ layer.views.resize(mipmaps);
for (int j = 0; j < mipmaps; j++) {
ReflectionData::Layer::Mipmap &mm = layer.mipmaps.write[j];
mm.size.width = mmw;
@@ -66,6 +74,8 @@ void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size,
mm.framebuffers[k] = RD::get_singleton()->framebuffer_create(fbtex);
}
+ layer.views.write[j] = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), p_base_cube, p_base_layer + i * 6, j, RD::TEXTURE_SLICE_CUBEMAP);
+
mmw = MAX(1, mmw >> 1);
mmh = MAX(1, mmh >> 1);
}
@@ -74,12 +84,14 @@ void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size,
}
} else {
+ mipmaps = p_low_quality ? 7 : mipmaps;
//regular cubemap, lower quality (aliasing, less memory)
ReflectionData::Layer layer;
uint32_t mmw = w;
uint32_t mmh = h;
- layer.mipmaps.resize(roughness_layers);
- for (int j = 0; j < roughness_layers; j++) {
+ layer.mipmaps.resize(mipmaps);
+ layer.views.resize(mipmaps);
+ for (int j = 0; j < mipmaps; j++) {
ReflectionData::Layer::Mipmap &mm = layer.mipmaps.write[j];
mm.size.width = mmw;
mm.size.height = mmh;
@@ -90,6 +102,8 @@ void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size,
mm.framebuffers[k] = RD::get_singleton()->framebuffer_create(fbtex);
}
+ layer.views.write[j] = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), p_base_cube, p_base_layer, j, RD::TEXTURE_SLICE_CUBEMAP);
+
mmw = MAX(1, mmw >> 1);
mmh = MAX(1, mmh >> 1);
}
@@ -98,90 +112,109 @@ void RasterizerSceneRD::_update_reflection_data(ReflectionData &rd, int p_size,
}
rd.radiance_base_cubemap = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), p_base_cube, p_base_layer, 0, RD::TEXTURE_SLICE_CUBEMAP);
+
+ RD::TextureFormat tf;
+ tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
+ tf.width = 64; // Always 64x64
+ tf.height = 64;
+ tf.type = RD::TEXTURE_TYPE_CUBE;
+ tf.array_layers = 6;
+ tf.mipmaps = 7;
+ tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT;
+
+ rd.downsampled_radiance_cubemap = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ {
+ uint32_t mmw = 64;
+ uint32_t mmh = 64;
+ rd.downsampled_layer.mipmaps.resize(7);
+ for (int j = 0; j < rd.downsampled_layer.mipmaps.size(); j++) {
+ ReflectionData::DownsampleLayer::Mipmap &mm = rd.downsampled_layer.mipmaps.write[j];
+ mm.size.width = mmw;
+ mm.size.height = mmh;
+ mm.view = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rd.downsampled_radiance_cubemap, 0, j, RD::TEXTURE_SLICE_CUBEMAP);
+
+ mmw = MAX(1, mmw >> 1);
+ mmh = MAX(1, mmh >> 1);
+ }
+ }
}
void RasterizerSceneRD::_create_reflection_from_panorama(ReflectionData &rd, RID p_panorama, bool p_quality) {
-#ifndef _MSC_VER
-#warning TODO, should probably use this algorithm instead. Volunteers? - https://www.ppsloan.org/publications/ggx_filtering.pdf / https://github.com/dariomanesku/cmft
-#endif
if (sky_use_cubemap_array) {
if (p_quality) {
//render directly to the layers
for (int i = 0; i < rd.layers.size(); i++) {
- for (int j = 0; j < 6; j++) {
- storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[i].mipmaps[0].framebuffers[j], j, sky_ggx_samples_quality, float(i) / (rd.layers.size() - 1.0));
- }
+ storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[i].views[0], 10, sky_ggx_samples_quality, float(i) / (rd.layers.size() - 1.0), rd.layers[i].mipmaps[0].size.x);
}
} else {
- //render to first mipmap
- for (int j = 0; j < 6; j++) {
- storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[0].mipmaps[0].framebuffers[j], j, sky_ggx_samples_realtime, 0.0);
+ // Use fast filtering. Render directly to base mip levels
+ storage->get_effects()->cubemap_downsample(p_panorama, true, rd.downsampled_layer.mipmaps[0].view, rd.downsampled_layer.mipmaps[0].size);
+
+ for (int i = 1; i < rd.downsampled_layer.mipmaps.size(); i++) {
+ storage->get_effects()->cubemap_downsample(rd.downsampled_layer.mipmaps[i - 1].view, false, rd.downsampled_layer.mipmaps[i].view, rd.downsampled_layer.mipmaps[i].size);
}
- //do the rest in other mipmaps and use cubemap itself as source
- for (int i = 1; i < roughness_layers; i++) {
- //render using a smaller mipmap, then copy to main layer
- for (int j = 0; j < 6; j++) {
- //storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[0].mipmaps[i].framebuffers[0], j, sky_ggx_samples_realtime, float(i) / (rd.layers.size() - 1.0));
- storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[0].mipmaps[i].framebuffers[0], j, sky_ggx_samples_realtime, float(i) / (rd.layers.size() - 1.0));
- storage->get_effects()->region_copy(rd.layers[0].mipmaps[i].views[0], rd.layers[i].mipmaps[0].framebuffers[j], Rect2());
- }
+ Vector<RID> views;
+ for (int i = 0; i < rd.layers.size(); i++) {
+ views.push_back(rd.layers[i].views[0]);
}
+
+ storage->get_effects()->cubemap_filter(rd.downsampled_radiance_cubemap, views, true);
}
} else {
if (p_quality) {
//render directly to the layers
for (int i = 0; i < rd.layers[0].mipmaps.size(); i++) {
- for (int j = 0; j < 6; j++) {
- storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[0].mipmaps[i].framebuffers[j], j, sky_ggx_samples_quality, float(i) / (rd.layers[0].mipmaps.size() - 1.0));
- }
+ storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[0].views[i], 10, sky_ggx_samples_quality, float(i) / (rd.layers[0].mipmaps.size() - 1.0), rd.layers[0].mipmaps[i].size.x);
}
} else {
+ // Use fast filtering. Render directly to each mip level
+ storage->get_effects()->cubemap_downsample(p_panorama, true, rd.downsampled_layer.mipmaps[0].view, rd.downsampled_layer.mipmaps[0].size);
- for (int j = 0; j < 6; j++) {
- storage->get_effects()->cubemap_roughness(p_panorama, true, rd.layers[0].mipmaps[0].framebuffers[j], j, sky_ggx_samples_realtime, 0);
- }
-
- for (int i = 1; i < rd.layers[0].mipmaps.size(); i++) {
- for (int j = 0; j < 6; j++) {
- storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[0].mipmaps[i].framebuffers[j], j, sky_ggx_samples_realtime, float(i) / (rd.layers[0].mipmaps.size() - 1.0));
- }
+ for (int i = 1; i < rd.downsampled_layer.mipmaps.size(); i++) {
+ storage->get_effects()->cubemap_downsample(rd.downsampled_layer.mipmaps[i - 1].view, false, rd.downsampled_layer.mipmaps[i].view, rd.downsampled_layer.mipmaps[i].size);
}
+ storage->get_effects()->cubemap_filter(rd.downsampled_radiance_cubemap, rd.layers[0].views, false);
}
}
}
-void RasterizerSceneRD::_create_reflection_from_base_mipmap(ReflectionData &rd, bool p_use_arrays, bool p_quality, int p_cube_side) {
+void RasterizerSceneRD::_create_reflection_from_base_mipmap(ReflectionData &rd, bool p_use_arrays, bool p_quality, int p_cube_side, int p_base_layer) {
if (p_use_arrays) {
if (p_quality) {
//render directly to the layers
- for (int i = 1; i < rd.layers.size(); i++) {
- storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[i].mipmaps[0].framebuffers[p_cube_side], p_cube_side, sky_ggx_samples_quality, float(i) / (rd.layers.size() - 1.0));
- }
+ storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[p_base_layer].views[0], p_cube_side, sky_ggx_samples_quality, float(p_base_layer) / (rd.layers.size() - 1.0), rd.layers[p_base_layer].mipmaps[0].size.x);
} else {
- //do the rest in other mipmaps and use cubemap itself as source
- for (int i = 1; i < roughness_layers; i++) {
- //render using a smaller mipmap, then copy to main layer
- storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[0].mipmaps[i].framebuffers[0], p_cube_side, sky_ggx_samples_realtime, float(i) / (rd.layers.size() - 1.0));
- storage->get_effects()->region_copy(rd.layers[0].mipmaps[i].views[0], rd.layers[i].mipmaps[0].framebuffers[p_cube_side], Rect2());
+
+ storage->get_effects()->cubemap_downsample(rd.radiance_base_cubemap, false, rd.downsampled_layer.mipmaps[0].view, rd.downsampled_layer.mipmaps[0].size);
+
+ for (int i = 1; i < rd.downsampled_layer.mipmaps.size(); i++) {
+ storage->get_effects()->cubemap_downsample(rd.downsampled_layer.mipmaps[i - 1].view, false, rd.downsampled_layer.mipmaps[i].view, rd.downsampled_layer.mipmaps[i].size);
}
+ Vector<RID> views;
+ for (int i = 0; i < rd.layers.size(); i++) {
+ views.push_back(rd.layers[i].views[0]);
+ }
+
+ storage->get_effects()->cubemap_filter(rd.downsampled_radiance_cubemap, views, true);
}
} else {
if (p_quality) {
- //render directly to the layers
- for (int i = 1; i < rd.layers[0].mipmaps.size(); i++) {
- storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[0].mipmaps[i].framebuffers[p_cube_side], p_cube_side, sky_ggx_samples_quality, float(i) / (rd.layers[0].mipmaps.size() - 1.0));
- }
+
+ storage->get_effects()->cubemap_roughness(rd.layers[0].views[p_base_layer - 1], false, rd.layers[0].views[p_base_layer], p_cube_side, sky_ggx_samples_quality, float(p_base_layer) / (rd.layers[0].mipmaps.size() - 1.0), rd.layers[0].mipmaps[p_base_layer].size.x);
} else {
- for (int i = 1; i < rd.layers[0].mipmaps.size(); i++) {
- storage->get_effects()->cubemap_roughness(rd.radiance_base_cubemap, false, rd.layers[0].mipmaps[i].framebuffers[p_cube_side], p_cube_side, sky_ggx_samples_realtime, float(i) / (rd.layers[0].mipmaps.size() - 1.0));
+ storage->get_effects()->cubemap_downsample(rd.radiance_base_cubemap, false, rd.downsampled_layer.mipmaps[0].view, rd.downsampled_layer.mipmaps[0].size);
+
+ for (int i = 1; i < rd.downsampled_layer.mipmaps.size(); i++) {
+ storage->get_effects()->cubemap_downsample(rd.downsampled_layer.mipmaps[i - 1].view, false, rd.downsampled_layer.mipmaps[i].view, rd.downsampled_layer.mipmaps[i].size);
}
+ storage->get_effects()->cubemap_filter(rd.downsampled_radiance_cubemap, rd.layers[0].views, false);
}
}
}
@@ -224,6 +257,12 @@ void RasterizerSceneRD::sky_set_radiance_size(RID p_sky, int p_radiance_size) {
return;
}
sky->radiance_size = p_radiance_size;
+
+ if (sky->mode == VS::SKY_MODE_REALTIME && sky->radiance_size != 128) {
+ WARN_PRINT("Realtime Skies can only use a radiance size of 128. Radiance size will be set to 128 internally.");
+ sky->radiance_size = 128;
+ }
+
_sky_invalidate(sky);
if (sky->radiance.is_valid()) {
RD::get_singleton()->free(sky->radiance);
@@ -241,7 +280,18 @@ void RasterizerSceneRD::sky_set_mode(RID p_sky, VS::SkyMode p_mode) {
}
sky->mode = p_mode;
+
+ if (sky->mode == VS::SKY_MODE_REALTIME && sky->radiance_size != 128) {
+ WARN_PRINT("Realtime Skies can only use a radiance size of 128. Radiance size will be set to 128 internally.");
+ sky_set_radiance_size(p_sky, 128);
+ }
+
_sky_invalidate(sky);
+ if (sky->radiance.is_valid()) {
+ RD::get_singleton()->free(sky->radiance);
+ sky->radiance = RID();
+ }
+ _clear_reflection_data(sky->reflection);
}
void RasterizerSceneRD::sky_set_texture(RID p_sky, RID p_panorama) {
@@ -275,27 +325,24 @@ void RasterizerSceneRD::_update_dirty_skys() {
if (sky->radiance.is_null()) {
int mipmaps = Image::get_image_required_mipmaps(sky->radiance_size, sky->radiance_size, Image::FORMAT_RGBAH) + 1;
- if (sky->mode != VS::SKY_MODE_QUALITY) {
- //use less mipmaps
- mipmaps = MIN(8, mipmaps);
- }
uint32_t w = sky->radiance_size, h = sky->radiance_size;
+ int layers = sky->mode == VS::SKY_MODE_REALTIME ? 7 : roughness_layers;
if (sky_use_cubemap_array) {
//array (higher quality, 6 times more memory)
RD::TextureFormat tf;
- tf.array_layers = roughness_layers * 6;
+ tf.array_layers = layers * 6;
tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
tf.type = RD::TEXTURE_TYPE_CUBE_ARRAY;
tf.mipmaps = mipmaps;
tf.width = w;
tf.height = h;
- tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT;
+ tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
sky->radiance = RD::get_singleton()->texture_create(tf, RD::TextureView());
- _update_reflection_data(sky->reflection, sky->radiance_size, mipmaps, true, sky->radiance, 0);
+ _update_reflection_data(sky->reflection, sky->radiance_size, mipmaps, true, sky->radiance, 0, sky->mode == VS::SKY_MODE_REALTIME);
} else {
//regular cubemap, lower quality (aliasing, less memory)
@@ -303,14 +350,14 @@ void RasterizerSceneRD::_update_dirty_skys() {
tf.array_layers = 6;
tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
tf.type = RD::TEXTURE_TYPE_CUBE;
- tf.mipmaps = roughness_layers;
+ tf.mipmaps = MIN(mipmaps, layers);
tf.width = w;
tf.height = h;
- tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT;
+ tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
sky->radiance = RD::get_singleton()->texture_create(tf, RD::TextureView());
- _update_reflection_data(sky->reflection, sky->radiance_size, mipmaps, false, sky->radiance, 0);
+ _update_reflection_data(sky->reflection, sky->radiance_size, MIN(mipmaps, layers), false, sky->radiance, 0, sky->mode == VS::SKY_MODE_REALTIME);
}
}
@@ -591,12 +638,18 @@ void RasterizerSceneRD::reflection_atlas_set_size(RID p_ref_atlas, int p_reflect
return; //no changes
}
+ ra->size = p_reflection_size;
+ ra->count = p_reflection_count;
+
if (ra->reflection.is_valid()) {
//clear and invalidate everything
RD::get_singleton()->free(ra->reflection);
ra->reflection = RID();
+ RD::get_singleton()->free(ra->depth_buffer);
+ ra->depth_buffer = RID();
for (int i = 0; i < ra->reflections.size(); i++) {
+ _clear_reflection_data(ra->reflections.write[i].data);
if (ra->reflections[i].owner.is_null()) {
continue;
}
@@ -673,17 +726,42 @@ bool RasterizerSceneRD::reflection_probe_instance_begin_render(RID p_instance, R
ERR_FAIL_COND_V(!atlas, false);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ERR_FAIL_COND_V(!rpi, false);
+
+ if (storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ALWAYS && atlas->reflection.is_valid() && atlas->size != 128) {
+ WARN_PRINT("ReflectionProbes set to UPDATE_ALWAYS must have an atlas size of 128. Please update the atlas size in the ProjectSettings.");
+ reflection_atlas_set_size(p_reflection_atlas, 128, atlas->count);
+ }
+
+ if (storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ALWAYS && atlas->reflection.is_valid() && atlas->reflections[0].data.layers[0].mipmaps.size() != 7) {
+ // Invalidate reflection atlas, need to regenerate
+ RD::get_singleton()->free(atlas->reflection);
+ atlas->reflection = RID();
+
+ for (int i = 0; i < atlas->reflections.size(); i++) {
+ if (atlas->reflections[i].owner.is_null()) {
+ continue;
+ }
+ reflection_probe_release_atlas_index(atlas->reflections[i].owner);
+ }
+
+ atlas->reflections.clear();
+ }
+
if (atlas->reflection.is_null()) {
+ int mipmaps = MIN(roughness_layers, Image::get_image_required_mipmaps(atlas->size, atlas->size, Image::FORMAT_RGBAH) + 1);
+ mipmaps = storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ALWAYS ? 7 : mipmaps; // always use 7 mipmaps with real time filtering
{
//reflection atlas was unused, create:
RD::TextureFormat tf;
tf.array_layers = 6 * atlas->count;
tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
tf.type = RD::TEXTURE_TYPE_CUBE_ARRAY;
- tf.mipmaps = roughness_layers;
+ tf.mipmaps = mipmaps;
tf.width = atlas->size;
tf.height = atlas->size;
- tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT;
+ tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
atlas->reflection = RD::get_singleton()->texture_create(tf, RD::TextureView());
}
@@ -698,7 +776,7 @@ bool RasterizerSceneRD::reflection_probe_instance_begin_render(RID p_instance, R
}
atlas->reflections.resize(atlas->count);
for (int i = 0; i < atlas->count; i++) {
- _update_reflection_data(atlas->reflections.write[i].data, atlas->size, roughness_layers, false, atlas->reflection, i * 6);
+ _update_reflection_data(atlas->reflections.write[i].data, atlas->size, mipmaps, false, atlas->reflection, i * 6, storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ALWAYS);
for (int j = 0; j < 6; j++) {
Vector<RID> fb;
fb.push_back(atlas->reflections.write[i].data.layers[0].mipmaps[0].views[j]);
@@ -712,9 +790,6 @@ bool RasterizerSceneRD::reflection_probe_instance_begin_render(RID p_instance, R
atlas->depth_fb = RD::get_singleton()->framebuffer_create(fb);
}
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
- ERR_FAIL_COND_V(!rpi, false);
-
if (rpi->atlas_index == -1) {
for (int i = 0; i < atlas->reflections.size(); i++) {
if (atlas->reflections[i].owner.is_null()) {
@@ -740,6 +815,7 @@ bool RasterizerSceneRD::reflection_probe_instance_begin_render(RID p_instance, R
rpi->atlas = p_reflection_atlas;
rpi->rendering = true;
rpi->dirty = false;
+ rpi->processing_layer = 1;
rpi->processing_side = 0;
return true;
@@ -759,17 +835,36 @@ bool RasterizerSceneRD::reflection_probe_instance_postprocess_step(RID p_instanc
return false;
}
- _create_reflection_from_base_mipmap(atlas->reflections.write[rpi->atlas_index].data, false, storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ONCE, rpi->processing_side);
+ if (rpi->processing_layer > 1) {
+ _create_reflection_from_base_mipmap(atlas->reflections.write[rpi->atlas_index].data, false, storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ONCE, 10, rpi->processing_layer);
+ rpi->processing_layer++;
+ if (rpi->processing_layer == atlas->reflections[rpi->atlas_index].data.layers[0].mipmaps.size()) {
+ rpi->rendering = false;
+ rpi->processing_side = 0;
+ rpi->processing_layer = 1;
+ return true;
+ }
+ return false;
- rpi->processing_side++;
+ } else {
+ _create_reflection_from_base_mipmap(atlas->reflections.write[rpi->atlas_index].data, false, storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ONCE, rpi->processing_side, rpi->processing_layer);
+ }
- if (rpi->processing_side == 6) {
+ if (storage->reflection_probe_get_update_mode(rpi->probe) == VS::REFLECTION_PROBE_UPDATE_ALWAYS) {
+ // Using real time reflections, all roughness is done in one step
rpi->rendering = false;
rpi->processing_side = 0;
+ rpi->processing_layer = 1;
return true;
- } else {
- return false;
}
+
+ rpi->processing_side++;
+ if (rpi->processing_side == 6) {
+ rpi->processing_side = 0;
+ rpi->processing_layer++;
+ }
+
+ return false;
}
uint32_t RasterizerSceneRD::reflection_probe_instance_get_resolution(RID p_instance) {
@@ -814,7 +909,6 @@ void RasterizerSceneRD::shadow_atlas_set_size(RID p_atlas, int p_size) {
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_COND(p_size < 0);
p_size = next_power_of_2(p_size);
- p_size = MAX(p_size, 1 << roughness_layers);
if (p_size == shadow_atlas->size)
return;
@@ -1406,7 +1500,7 @@ void RasterizerSceneRD::gi_probe_update(RID p_probe, bool p_update_light_instanc
if (octree_size != Vector3i()) {
//can create a 3D texture
- PoolVector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe);
+ Vector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe);
RD::TextureFormat tf;
tf.format = RD::DATA_FORMAT_R8G8B8A8_UNORM;
@@ -2745,7 +2839,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas
Rect2i atlas_rect;
RID atlas_fb;
- int atlas_fb_size;
bool using_dual_paraboloid = false;
bool using_dual_paraboloid_flip = false;
@@ -2816,7 +2909,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas
render_fb = shadow_map->fb;
render_texture = shadow_map->depth;
atlas_fb = directional_shadow.fb;
- atlas_fb_size = directional_shadow.size;
} else {
//set from shadow atlas
@@ -2844,7 +2936,6 @@ void RasterizerSceneRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pas
atlas_rect.size.width = shadow_size;
atlas_rect.size.height = shadow_size;
atlas_fb = shadow_atlas->fb;
- atlas_fb_size = shadow_atlas->size;
zfar = storage->light_get_param(light_instance->light, VS::LIGHT_PARAM_RANGE);
bias = storage->light_get_param(light_instance->light, VS::LIGHT_PARAM_SHADOW_BIAS);
@@ -3028,7 +3119,6 @@ RasterizerSceneRD::RasterizerSceneRD(RasterizerStorageRD *p_storage) {
roughness_layers = GLOBAL_GET("rendering/quality/reflections/roughness_layers");
sky_ggx_samples_quality = GLOBAL_GET("rendering/quality/reflections/ggx_samples");
- sky_ggx_samples_realtime = GLOBAL_GET("rendering/quality/reflections/ggx_samples_realtime");
sky_use_cubemap_array = GLOBAL_GET("rendering/quality/reflections/texture_array_reflections");
// sky_use_cubemap_array = false;
@@ -3133,5 +3223,7 @@ RasterizerSceneRD::~RasterizerSceneRD() {
}
RD::get_singleton()->free(gi_probe_lights_uniform);
+ giprobe_debug_shader.version_free(giprobe_debug_shader_version);
+ giprobe_shader.version_free(giprobe_lighting_shader_version);
memdelete_arr(gi_probe_lights);
}
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.h b/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
index 541c28f11f..0fa853f2df 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
@@ -85,24 +85,37 @@ private:
RID views[6];
Size2i size;
};
+ Vector<Mipmap> mipmaps; //per-face view
+ Vector<RID> views; // per-cubemap view
+ };
+
+ struct DownsampleLayer {
+ struct Mipmap {
+ RID view;
+ Size2i size;
+ };
Vector<Mipmap> mipmaps;
};
+
RID radiance_base_cubemap; //cubemap for first layer, first cubemap
+ RID downsampled_radiance_cubemap;
+ DownsampleLayer downsampled_layer;
+ RID coefficient_buffer;
Vector<Layer> layers;
};
void _clear_reflection_data(ReflectionData &rd);
- void _update_reflection_data(ReflectionData &rd, int p_size, int p_mipmaps, bool p_use_array, RID p_base_cube, int p_base_layer);
+ void _update_reflection_data(ReflectionData &rd, int p_size, int p_mipmaps, bool p_use_array, RID p_base_cube, int p_base_layer, bool p_low_quality);
void _create_reflection_from_panorama(ReflectionData &rd, RID p_panorama, bool p_quality);
- void _create_reflection_from_base_mipmap(ReflectionData &rd, bool p_use_arrays, bool p_quality, int p_cube_side);
+ void _create_reflection_from_base_mipmap(ReflectionData &rd, bool p_use_arrays, bool p_quality, int p_cube_side, int p_base_layer);
void _update_reflection_mipmaps(ReflectionData &rd, bool p_quality);
/* SKY */
struct Sky {
RID radiance;
RID uniform_set;
- int radiance_size = 256;
+ int radiance_size = 128;
VS::SkyMode mode = VS::SKY_MODE_QUALITY;
RID panorama;
ReflectionData reflection;
@@ -116,7 +129,6 @@ private:
void _update_dirty_skys();
uint32_t sky_ggx_samples_quality;
- uint32_t sky_ggx_samples_realtime;
bool sky_use_cubemap_array;
mutable RID_Owner<Sky> sky_owner;
@@ -153,6 +165,7 @@ private:
bool dirty = true;
bool rendering = false;
+ int processing_layer = 1;
int processing_side = 0;
uint32_t render_step = 0;
diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp
index 5203873b7b..52cefa7511 100644
--- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp
@@ -584,8 +584,8 @@ RID RasterizerStorageRD::texture_2d_create(const Ref<Image> &p_image) {
rd_view.swizzle_b = ret_format.swizzle_b;
rd_view.swizzle_a = ret_format.swizzle_a;
}
- PoolVector<uint8_t> data = image->get_data(); //use image data
- Vector<PoolVector<uint8_t> > data_slices;
+ Vector<uint8_t> data = image->get_data(); //use image data
+ Vector<Vector<uint8_t> > data_slices;
data_slices.push_back(data);
texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices);
ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID());
@@ -720,13 +720,12 @@ RID RasterizerStorageRD::texture_2d_placeholder_create() {
Ref<Image> image;
image.instance();
image->create(4, 4, false, Image::FORMAT_RGBA8);
- image->lock();
+
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
image->set_pixel(i, j, Color(1, 0, 1, 1));
}
}
- image->unlock();
return texture_2d_create(image);
}
@@ -749,7 +748,7 @@ Ref<Image> RasterizerStorageRD::texture_2d_get(RID p_texture) const {
return tex->image_cache_2d;
}
#endif
- PoolVector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0);
+ Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0);
ERR_FAIL_COND_V(data.size() == 0, Ref<Image>());
Ref<Image> image;
image.instance();
@@ -1195,11 +1194,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
} break;
case ShaderLanguage::TYPE_IVEC2: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
int32_t *gui = (int32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 2; i++) {
if (i < s)
@@ -1211,11 +1210,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
} break;
case ShaderLanguage::TYPE_IVEC3: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
int32_t *gui = (int32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 3; i++) {
if (i < s)
@@ -1226,11 +1225,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
} break;
case ShaderLanguage::TYPE_IVEC4: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
int32_t *gui = (int32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 4; i++) {
if (i < s)
@@ -1248,11 +1247,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
} break;
case ShaderLanguage::TYPE_UVEC2: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
uint32_t *gui = (uint32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 2; i++) {
if (i < s)
@@ -1262,11 +1261,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
}
} break;
case ShaderLanguage::TYPE_UVEC3: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
uint32_t *gui = (uint32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 3; i++) {
if (i < s)
@@ -1277,11 +1276,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
} break;
case ShaderLanguage::TYPE_UVEC4: {
- PoolVector<int> iv = value;
+ Vector<int> iv = value;
int s = iv.size();
uint32_t *gui = (uint32_t *)data;
- PoolVector<int>::Read r = iv.read();
+ const int *r = iv.ptr();
for (int i = 0; i < 4; i++) {
if (i < s)
@@ -1907,8 +1906,10 @@ void RasterizerStorageRD::mesh_add_surface(RID p_mesh, const VS::SurfaceData &p_
for (int i = 0; i < p_surface.blend_shapes.size(); i++) {
- ERR_FAIL_COND(p_surface.blend_shapes[i].size() != p_surface.vertex_data.size());
-
+ if (p_surface.blend_shapes[i].size() != p_surface.vertex_data.size()) {
+ memdelete(s);
+ ERR_FAIL_COND(p_surface.blend_shapes[i].size() != p_surface.vertex_data.size());
+ }
RID vertex_buffer = RD::get_singleton()->vertex_buffer_create(p_surface.blend_shapes[i].size(), p_surface.blend_shapes[i]);
s->blend_shapes.push_back(vertex_buffer);
}
@@ -1945,7 +1946,7 @@ int RasterizerStorageRD::mesh_get_blend_shape_count(RID p_mesh) const {
void RasterizerStorageRD::mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_mode, 2);
+ ERR_FAIL_INDEX((int)p_mode, 2);
mesh->blend_shape_mode = p_mode;
}
@@ -1955,15 +1956,15 @@ VS::BlendShapeMode RasterizerStorageRD::mesh_get_blend_shape_mode(RID p_mesh) co
return mesh->blend_shape_mode;
}
-void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) {
+void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count);
ERR_FAIL_COND(p_data.size() == 0);
uint64_t data_size = p_data.size();
- PoolVector<uint8_t>::Read r = p_data.read();
+ const uint8_t *r = p_data.ptr();
- RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r.ptr());
+ RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r);
}
void RasterizerStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {
@@ -2012,7 +2013,7 @@ VS::SurfaceData RasterizerStorageRD::mesh_get_surface(RID p_mesh, int p_surface)
sd.bone_aabbs = s.bone_aabbs;
for (int i = 0; i < s.blend_shapes.size(); i++) {
- PoolVector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]);
+ Vector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]);
sd.blend_shapes.push_back(bs);
}
@@ -2386,7 +2387,7 @@ void RasterizerStorageRD::multimesh_allocate(RID p_multimesh, int p_instances, V
multimesh->buffer_set = false;
//print_line("allocate, elements: " + itos(p_instances) + " 2D: " + itos(p_transform_format == VS::MULTIMESH_TRANSFORM_2D) + " colors " + itos(multimesh->uses_colors) + " data " + itos(multimesh->uses_custom_data) + " stride " + itos(multimesh->stride_cache) + " total size " + itos(multimesh->stride_cache * multimesh->instances));
- multimesh->data_cache = PoolVector<float>();
+ multimesh->data_cache = Vector<float>();
multimesh->aabb = AABB();
multimesh->aabb_dirty = false;
multimesh->visible_instances = MIN(multimesh->visible_instances, multimesh->instances);
@@ -2421,9 +2422,9 @@ void RasterizerStorageRD::multimesh_set_mesh(RID p_multimesh, RID p_mesh) {
} else if (multimesh->instances) {
//need to re-create AABB unfortunately, calling this has a penalty
if (multimesh->buffer_set) {
- PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
- PoolVector<uint8_t>::Read r = buffer.read();
- const float *data = (const float *)r.ptr();
+ Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
+ const uint8_t *r = buffer.ptr();
+ const float *data = (const float *)r;
_multimesh_re_create_aabb(multimesh, data, multimesh->instances);
}
}
@@ -2442,17 +2443,17 @@ void RasterizerStorageRD::_multimesh_make_local(MultiMesh *multimesh) const {
// for this, the data must reside on CPU, so just copy it there.
multimesh->data_cache.resize(multimesh->instances * multimesh->stride_cache);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
+ float *w = multimesh->data_cache.ptrw();
if (multimesh->buffer_set) {
- PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
+ Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
{
- PoolVector<uint8_t>::Read r = buffer.read();
- copymem(w.ptr(), r.ptr(), buffer.size());
+ const uint8_t *r = buffer.ptr();
+ copymem(w, r, buffer.size());
}
} else {
- zeromem(w.ptr(), multimesh->instances * multimesh->stride_cache * sizeof(float));
+ zeromem(w, multimesh->instances * multimesh->stride_cache * sizeof(float));
}
}
uint32_t data_cache_dirty_region_count = (multimesh->instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1;
@@ -2564,9 +2565,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform(RID p_multimesh, int
_multimesh_make_local(multimesh);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
+ float *w = multimesh->data_cache.ptrw();
- float *dataptr = w.ptr() + p_index * multimesh->stride_cache;
+ float *dataptr = w + p_index * multimesh->stride_cache;
dataptr[0] = p_transform.basis.elements[0][0];
dataptr[1] = p_transform.basis.elements[0][1];
@@ -2595,9 +2596,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, i
_multimesh_make_local(multimesh);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
+ float *w = multimesh->data_cache.ptrw();
- float *dataptr = w.ptr() + p_index * multimesh->stride_cache;
+ float *dataptr = w + p_index * multimesh->stride_cache;
dataptr[0] = p_transform.elements[0][0];
dataptr[1] = p_transform.elements[1][0];
@@ -2621,9 +2622,9 @@ void RasterizerStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_in
_multimesh_make_local(multimesh);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
+ float *w = multimesh->data_cache.ptrw();
- float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache;
+ float *dataptr = w + p_index * multimesh->stride_cache + multimesh->color_offset_cache;
dataptr[0] = p_color.r;
dataptr[1] = p_color.g;
@@ -2637,14 +2638,14 @@ void RasterizerStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, in
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_INDEX(p_index, multimesh->instances);
- ERR_FAIL_INDEX(p_index, !multimesh->uses_custom_data);
+ ERR_FAIL_COND(!multimesh->uses_custom_data);
_multimesh_make_local(multimesh);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
+ float *w = multimesh->data_cache.ptrw();
- float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache;
+ float *dataptr = w + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache;
dataptr[0] = p_color.r;
dataptr[1] = p_color.g;
@@ -2674,9 +2675,9 @@ Transform RasterizerStorageRD::multimesh_instance_get_transform(RID p_multimesh,
Transform t;
{
- PoolVector<float>::Read r = multimesh->data_cache.read();
+ const float *r = multimesh->data_cache.ptr();
- const float *dataptr = r.ptr() + p_index * multimesh->stride_cache;
+ const float *dataptr = r + p_index * multimesh->stride_cache;
t.basis.elements[0][0] = dataptr[0];
t.basis.elements[0][1] = dataptr[1];
@@ -2705,9 +2706,9 @@ Transform2D RasterizerStorageRD::multimesh_instance_get_transform_2d(RID p_multi
Transform2D t;
{
- PoolVector<float>::Read r = multimesh->data_cache.read();
+ const float *r = multimesh->data_cache.ptr();
- const float *dataptr = r.ptr() + p_index * multimesh->stride_cache;
+ const float *dataptr = r + p_index * multimesh->stride_cache;
t.elements[0][0] = dataptr[0];
t.elements[1][0] = dataptr[1];
@@ -2724,15 +2725,15 @@ Color RasterizerStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_i
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color());
- ERR_FAIL_INDEX_V(p_index, !multimesh->uses_colors, Color());
+ ERR_FAIL_COND_V(!multimesh->uses_colors, Color());
_multimesh_make_local(multimesh);
Color c;
{
- PoolVector<float>::Read r = multimesh->data_cache.read();
+ const float *r = multimesh->data_cache.ptr();
- const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache;
+ const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->color_offset_cache;
c.r = dataptr[0];
c.g = dataptr[1];
@@ -2747,15 +2748,15 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color());
- ERR_FAIL_INDEX_V(p_index, !multimesh->uses_custom_data, Color());
+ ERR_FAIL_COND_V(!multimesh->uses_custom_data, Color());
_multimesh_make_local(multimesh);
Color c;
{
- PoolVector<float>::Read r = multimesh->data_cache.read();
+ const float *r = multimesh->data_cache.ptr();
- const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache;
+ const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache;
c.r = dataptr[0];
c.g = dataptr[1];
@@ -2766,14 +2767,14 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i
return c;
}
-void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) {
+void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_COND(p_buffer.size() != (multimesh->instances * (int)multimesh->stride_cache));
{
- PoolVector<float>::Read r = p_buffer.read();
- RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r.ptr(), false);
+ const float *r = p_buffer.ptr();
+ RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r, false);
multimesh->buffer_set = true;
}
@@ -2792,30 +2793,30 @@ void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector
_multimesh_mark_all_dirty(multimesh, false, true); //update AABB
} else if (multimesh->mesh.is_valid()) {
//if we have a mesh set, we need to re-generate the AABB from the new data
- PoolVector<float>::Read r = p_buffer.read();
- const float *data = r.ptr();
+ const float *data = p_buffer.ptr();
+
_multimesh_re_create_aabb(multimesh, data, multimesh->instances);
multimesh->instance_dependency.instance_notify_changed(true, false);
}
}
-PoolVector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const {
+Vector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, PoolVector<float>());
+ ERR_FAIL_COND_V(!multimesh, Vector<float>());
if (multimesh->buffer.is_null()) {
- return PoolVector<float>();
+ return Vector<float>();
} else if (multimesh->data_cache.size()) {
return multimesh->data_cache;
} else {
//get from memory
- PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
- PoolVector<float> ret;
+ Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer);
+ Vector<float> ret;
ret.resize(multimesh->instances);
{
- PoolVector<float>::Write w = multimesh->data_cache.write();
- PoolVector<uint8_t>::Read r = buffer.read();
- copymem(w.ptr(), r.ptr(), buffer.size());
+ float *w = multimesh->data_cache.ptrw();
+ const uint8_t *r = buffer.ptr();
+ copymem(w, r, buffer.size());
}
return ret;
@@ -2860,8 +2861,7 @@ void RasterizerStorageRD::_update_dirty_multimeshes() {
MultiMesh *multimesh = multimesh_dirty_list;
if (multimesh->data_cache.size()) { //may have been cleared, so only process if it exists
- PoolVector<float>::Read r = multimesh->data_cache.read();
- const float *data = r.ptr();
+ const float *data = multimesh->data_cache.ptr();
uint32_t visible_instances = multimesh->visible_instances >= 0 ? multimesh->visible_instances : multimesh->instances;
@@ -3552,7 +3552,7 @@ RID RasterizerStorageRD::gi_probe_create() {
return gi_probe_owner.make_rid(GIProbe());
}
-void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) {
+void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND(!gi_probe);
@@ -3597,7 +3597,7 @@ void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_t
tf.depth = gi_probe->octree_size.z;
tf.type = RD::TEXTURE_TYPE_3D;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT;
- Vector<PoolVector<uint8_t> > s;
+ Vector<Vector<uint8_t> > s;
s.push_back(p_distance_field);
gi_probe->sdf_texture = RD::get_singleton()->texture_create(tf, RD::TextureView(), s);
}
@@ -3690,36 +3690,36 @@ Vector3i RasterizerStorageRD::gi_probe_get_octree_size(RID p_gi_probe) const {
ERR_FAIL_COND_V(!gi_probe, Vector3i());
return gi_probe->octree_size;
}
-PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const {
+Vector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
- ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
if (gi_probe->octree_buffer.is_valid()) {
return RD::get_singleton()->buffer_get_data(gi_probe->octree_buffer);
}
- return PoolVector<uint8_t>();
+ return Vector<uint8_t>();
}
-PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const {
+Vector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
- ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
if (gi_probe->data_buffer.is_valid()) {
return RD::get_singleton()->buffer_get_data(gi_probe->data_buffer);
}
- return PoolVector<uint8_t>();
+ return Vector<uint8_t>();
}
-PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const {
+Vector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
- ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>());
if (gi_probe->data_buffer.is_valid()) {
return RD::get_singleton()->texture_get_data(gi_probe->sdf_texture, 0);
}
- return PoolVector<uint8_t>();
+ return Vector<uint8_t>();
}
-PoolVector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const {
+Vector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
- ERR_FAIL_COND_V(!gi_probe, PoolVector<int>());
+ ERR_FAIL_COND_V(!gi_probe, Vector<int>());
return gi_probe->level_counts;
}
@@ -4387,7 +4387,7 @@ bool RasterizerStorageRD::free(RID p_rid) {
reflection_probe->instance_dependency.instance_notify_deleted(p_rid);
reflection_probe_owner.free(p_rid);
} else if (gi_probe_owner.owns(p_rid)) {
- gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<int>()); //deallocate
+ gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate
GIProbe *gi_probe = gi_probe_owner.getornull(p_rid);
gi_probe->instance_dependency.instance_notify_deleted(p_rid);
gi_probe_owner.free(p_rid);
@@ -4463,7 +4463,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
tformat.type = RD::TEXTURE_TYPE_2D;
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(16 * 4);
for (int i = 0; i < 16; i++) {
pv.set(i * 4 + 0, 255);
@@ -4473,7 +4473,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
vpv.push_back(pv);
default_rd_textures[DEFAULT_RD_TEXTURE_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
}
@@ -4486,7 +4486,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
vpv.push_back(pv);
default_rd_textures[DEFAULT_RD_TEXTURE_BLACK] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
}
@@ -4499,7 +4499,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
vpv.push_back(pv);
default_rd_textures[DEFAULT_RD_TEXTURE_NORMAL] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
}
@@ -4512,7 +4512,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
vpv.push_back(pv);
default_rd_textures[DEFAULT_RD_TEXTURE_ANISO] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
}
@@ -4537,7 +4537,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
tformat.type = RD::TEXTURE_TYPE_CUBE_ARRAY;
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(16 * 4);
for (int i = 0; i < 16; i++) {
pv.set(i * 4 + 0, 0);
@@ -4547,7 +4547,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
for (int i = 0; i < 6; i++) {
vpv.push_back(pv);
}
@@ -4565,7 +4565,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
tformat.type = RD::TEXTURE_TYPE_CUBE;
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(16 * 4);
for (int i = 0; i < 16; i++) {
pv.set(i * 4 + 0, 0);
@@ -4575,7 +4575,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
for (int i = 0; i < 6; i++) {
vpv.push_back(pv);
}
@@ -4593,7 +4593,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
tformat.type = RD::TEXTURE_TYPE_3D;
- PoolVector<uint8_t> pv;
+ Vector<uint8_t> pv;
pv.resize(64 * 4);
for (int i = 0; i < 64; i++) {
pv.set(i * 4 + 0, 0);
@@ -4603,7 +4603,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{
- Vector<PoolVector<uint8_t> > vpv;
+ Vector<Vector<uint8_t> > vpv;
vpv.push_back(pv);
default_rd_textures[DEFAULT_RD_TEXTURE_3D_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
}
@@ -4625,7 +4625,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.max_lod = 0;
} break;
- case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: {
+ case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST;
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
@@ -4636,7 +4636,7 @@ RasterizerStorageRD::RasterizerStorageRD() {
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
} break;
- case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: {
+ case VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_NEAREST;
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
@@ -4682,11 +4682,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
{ //vertex
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 3);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 0.0;
fptr[1] = 0.0;
fptr[2] = 0.0;
@@ -4695,11 +4695,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //normal
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 3);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 1.0;
fptr[1] = 0.0;
fptr[2] = 0.0;
@@ -4708,11 +4708,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //tangent
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 4);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 1.0;
fptr[1] = 0.0;
fptr[2] = 0.0;
@@ -4722,11 +4722,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //color
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 4);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 1.0;
fptr[1] = 1.0;
fptr[2] = 1.0;
@@ -4736,22 +4736,22 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //tex uv 1
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 2);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 0.0;
fptr[1] = 0.0;
}
mesh_default_rd_buffers[DEFAULT_RD_BUFFER_TEX_UV] = RD::get_singleton()->vertex_buffer_create(buffer.size(), buffer);
}
{ //tex uv 2
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 2);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 0.0;
fptr[1] = 0.0;
}
@@ -4759,11 +4759,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //bones
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(uint32_t) * 4);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- uint32_t *fptr = (uint32_t *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ uint32_t *fptr = (uint32_t *)w;
fptr[0] = 0;
fptr[1] = 0;
fptr[2] = 0;
@@ -4773,11 +4773,11 @@ RasterizerStorageRD::RasterizerStorageRD() {
}
{ //weights
- PoolVector<uint8_t> buffer;
+ Vector<uint8_t> buffer;
buffer.resize(sizeof(float) * 4);
{
- PoolVector<uint8_t>::Write w = buffer.write();
- float *fptr = (float *)w.ptr();
+ uint8_t *w = buffer.ptrw();
+ float *fptr = (float *)w;
fptr[0] = 0.0;
fptr[1] = 0.0;
fptr[2] = 0.0;
@@ -4816,4 +4816,5 @@ RasterizerStorageRD::~RasterizerStorageRD() {
for (int i = 0; i < DEFAULT_RD_BUFFER_MAX; i++) {
RD::get_singleton()->free(mesh_default_rd_buffers[i]);
}
+ giprobe_sdf_shader.version_free(giprobe_sdf_shader_version);
}
diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h
index 055737d65d..48097ffaac 100644
--- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h
@@ -306,7 +306,7 @@ private:
uint32_t color_offset_cache = 0;
uint32_t custom_data_offset_cache = 0;
- PoolVector<float> data_cache; //used if individual setting is used
+ Vector<float> data_cache; //used if individual setting is used
bool *data_cache_dirty_regions = nullptr;
uint32_t data_cache_used_dirty_regions = 0;
@@ -413,7 +413,7 @@ private:
uint32_t octree_buffer_size = 0;
uint32_t data_buffer_size = 0;
- PoolVector<int> level_counts;
+ Vector<int> level_counts;
int cell_count = 0;
@@ -621,7 +621,7 @@ public:
virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode);
virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const;
- virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data);
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data);
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material);
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
@@ -747,8 +747,8 @@ public:
Color multimesh_instance_get_color(RID p_multimesh, int p_index) const;
Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const;
- void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer);
- PoolVector<float> multimesh_get_buffer(RID p_multimesh) const;
+ void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer);
+ Vector<float> multimesh_get_buffer(RID p_multimesh) const;
void multimesh_set_visible_instances(RID p_multimesh, int p_visible);
int multimesh_get_visible_instances(RID p_multimesh) const;
@@ -969,15 +969,15 @@ public:
RID gi_probe_create();
- void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts);
+ void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts);
AABB gi_probe_get_bounds(RID p_gi_probe) const;
Vector3i gi_probe_get_octree_size(RID p_gi_probe) const;
- PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const;
- PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const;
- PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const;
+ Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const;
+ Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const;
+ Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const;
- PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const;
+ Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const;
Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const;
void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range);
@@ -1022,12 +1022,12 @@ public:
void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {}
AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); }
- void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {}
+ void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {}
RID lightmap_capture_create() {
return RID();
}
- PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const {
- return PoolVector<uint8_t>();
+ Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const {
+ return Vector<uint8_t>();
}
void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {}
Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); }
@@ -1035,7 +1035,7 @@ public:
int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; }
void lightmap_capture_set_energy(RID p_capture, float p_energy) {}
float lightmap_capture_get_energy(RID p_capture) const { return 0.0; }
- const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const {
+ const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const {
return NULL;
}
diff --git a/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h b/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h
index 173e839330..05c5968360 100644
--- a/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h
+++ b/servers/visual/rasterizer_rd/render_pipeline_vertex_format_cache_rd.h
@@ -41,7 +41,6 @@ class RenderPipelineVertexFormatCacheRD {
RID shader;
uint32_t input_mask;
- RD::FramebufferFormatID framebuffer_format;
RD::RenderPrimitive render_primitive;
RD::PipelineRasterizationState rasterization_state;
RD::PipelineMultisampleState multisample_state;
diff --git a/servers/visual/rasterizer_rd/shader_compiler_rd.cpp b/servers/visual/rasterizer_rd/shader_compiler_rd.cpp
index b2cbac8a09..ecff8d81f6 100644
--- a/servers/visual/rasterizer_rd/shader_compiler_rd.cpp
+++ b/servers/visual/rasterizer_rd/shader_compiler_rd.cpp
@@ -483,7 +483,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
}
r_gen_code.uniform_total_size = offset;
- print_line("uniform total: " + itos(r_gen_code.uniform_total_size));
+
if (r_gen_code.uniform_total_size % 16 != 0) { //UBO sizes must be multiples of 16
r_gen_code.uniform_total_size += 16 - (r_gen_code.uniform_total_size % 16);
}
diff --git a/servers/visual/rasterizer_rd/shader_rd.cpp b/servers/visual/rasterizer_rd/shader_rd.cpp
index cc6c13f598..857a29f7f4 100644
--- a/servers/visual/rasterizer_rd/shader_rd.cpp
+++ b/servers/visual/rasterizer_rd/shader_rd.cpp
@@ -342,23 +342,21 @@ void ShaderRD::_compile_variant(uint32_t p_variant, Version *p_version) {
}
if (!build_ok) {
- variant_set_mutex.lock(); //properly print the errors
+ MutexLock lock(variant_set_mutex); //properly print the errors
ERR_PRINT("Error compiling " + String(current_stage == RD::SHADER_STAGE_COMPUTE ? "Compute " : (current_stage == RD::SHADER_STAGE_VERTEX ? "Vertex" : "Fragment")) + " shader, variant #" + itos(p_variant) + " (" + variant_defines[p_variant].get_data() + ").");
ERR_PRINT(error);
#ifdef DEBUG_ENABLED
ERR_PRINT("code:\n" + current_source.get_with_code_lines());
#endif
-
- variant_set_mutex.unlock();
return;
}
RID shader = RD::get_singleton()->shader_create(stages);
-
- variant_set_mutex.lock();
- p_version->variants[p_variant] = shader;
- variant_set_mutex.unlock();
+ {
+ MutexLock lock(variant_set_mutex);
+ p_version->variants[p_variant] = shader;
+ }
}
void ShaderRD::_compile_version(Version *p_version) {
diff --git a/servers/visual/rasterizer_rd/shader_rd.h b/servers/visual/rasterizer_rd/shader_rd.h
index dce46fc0b5..6635b08cc8 100644
--- a/servers/visual/rasterizer_rd/shader_rd.h
+++ b/servers/visual/rasterizer_rd/shader_rd.h
@@ -33,10 +33,11 @@
#include "core/hash_map.h"
#include "core/map.h"
+#include "core/os/mutex.h"
#include "core/rid_owner.h"
#include "core/variant.h"
+
#include <stdio.h>
-#include <mutex>
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -47,11 +48,7 @@ class ShaderRD {
CharString general_defines;
Vector<CharString> variant_defines;
- int vertex_code_start;
- int fragment_code_start;
-
struct Version {
-
CharString uniforms;
CharString vertex_globals;
CharString vertex_code;
@@ -69,7 +66,7 @@ class ShaderRD {
bool initialize_needed;
};
- std::mutex variant_set_mutex;
+ Mutex variant_set_mutex;
void _compile_variant(uint32_t p_variant, Version *p_version);
diff --git a/servers/visual/rasterizer_rd/shaders/SCsub b/servers/visual/rasterizer_rd/shaders/SCsub
index 9a28ef062c..2dcb2a703f 100644
--- a/servers/visual/rasterizer_rd/shaders/SCsub
+++ b/servers/visual/rasterizer_rd/shaders/SCsub
@@ -7,6 +7,8 @@ if 'RD_GLSL' in env['BUILDERS']:
env.RD_GLSL('canvas_occlusion.glsl');
env.RD_GLSL('blur.glsl');
env.RD_GLSL('cubemap_roughness.glsl');
+ env.RD_GLSL('cubemap_downsampler.glsl');
+ env.RD_GLSL('cubemap_filter.glsl');
env.RD_GLSL('scene_high_end.glsl');
env.RD_GLSL('sky.glsl');
env.RD_GLSL('tonemap.glsl');
diff --git a/servers/visual/rasterizer_rd/shaders/cubemap_downsampler.glsl b/servers/visual/rasterizer_rd/shaders/cubemap_downsampler.glsl
new file mode 100644
index 0000000000..b042dc8868
--- /dev/null
+++ b/servers/visual/rasterizer_rd/shaders/cubemap_downsampler.glsl
@@ -0,0 +1,220 @@
+// Copyright 2016 Activision Publishing, Inc.
+//
+// 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 off */
+[compute]
+
+#version 450
+
+VERSION_DEFINES
+
+#define BLOCK_SIZE 8
+
+layout(local_size_x = BLOCK_SIZE, local_size_y = BLOCK_SIZE, local_size_z = 1) in;
+/* clang-format on */
+
+#ifdef MODE_SOURCE_PANORAMA
+layout(set = 0, binding = 0) uniform sampler2D source_panorama;
+#endif
+
+#ifdef MODE_SOURCE_CUBEMAP
+layout(set = 0, binding = 0) uniform samplerCube source_cubemap;
+#endif
+
+layout(rgba16f, set = 1, binding = 0) uniform restrict writeonly imageCube dest_cubemap;
+
+layout(push_constant, binding = 1, std430) uniform Params {
+ uint face_size;
+}
+params;
+
+#define M_PI 3.14159265359
+
+void get_dir_0(out vec3 dir, in float u, in float v) {
+ dir[0] = 1.0;
+ dir[1] = v;
+ dir[2] = -u;
+}
+void get_dir_1(out vec3 dir, in float u, in float v) {
+ dir[0] = -1.0;
+ dir[1] = v;
+ dir[2] = u;
+}
+void get_dir_2(out vec3 dir, in float u, in float v) {
+ dir[0] = u;
+ dir[1] = 1.0;
+ dir[2] = -v;
+}
+void get_dir_3(out vec3 dir, in float u, in float v) {
+ dir[0] = u;
+ dir[1] = -1.0;
+ dir[2] = v;
+}
+void get_dir_4(out vec3 dir, in float u, in float v) {
+ dir[0] = u;
+ dir[1] = v;
+ dir[2] = 1.0;
+}
+void get_dir_5(out vec3 dir, in float u, in float v) {
+ dir[0] = -u;
+ dir[1] = v;
+ dir[2] = -1.0;
+}
+
+float calcWeight(float u, float v) {
+ float val = u * u + v * v + 1.0;
+ return val * sqrt(val);
+}
+
+#ifdef MODE_SOURCE_PANORAMA
+
+vec4 texturePanorama(vec3 normal, sampler2D pano) {
+
+ vec2 st = vec2(
+ atan(normal.x, -normal.z),
+ acos(normal.y));
+
+ if (st.x < 0.0)
+ st.x += M_PI * 2.0;
+
+ st /= vec2(M_PI * 2.0, M_PI);
+
+ return textureLod(pano, st, 0.0);
+}
+
+#endif
+
+vec4 get_texture(vec3 p_dir) {
+#ifdef MODE_SOURCE_PANORAMA
+ return texturePanorama(normalize(p_dir), source_panorama);
+#else
+ return textureLod(source_cubemap, normalize(p_dir), 0.0);
+#endif
+}
+
+void main() {
+ uvec3 id = gl_GlobalInvocationID;
+ uint face_size = params.face_size;
+
+ if (id.x < face_size && id.y < face_size) {
+ float inv_face_size = 1.0 / float(face_size);
+
+ float u0 = (float(id.x) * 2.0 + 1.0 - 0.75) * inv_face_size - 1.0;
+ float u1 = (float(id.x) * 2.0 + 1.0 + 0.75) * inv_face_size - 1.0;
+
+ float v0 = (float(id.y) * 2.0 + 1.0 - 0.75) * -inv_face_size + 1.0;
+ float v1 = (float(id.y) * 2.0 + 1.0 + 0.75) * -inv_face_size + 1.0;
+
+ float weights[4];
+ weights[0] = calcWeight(u0, v0);
+ weights[1] = calcWeight(u1, v0);
+ weights[2] = calcWeight(u0, v1);
+ weights[3] = calcWeight(u1, v1);
+
+ const float wsum = 0.5 / (weights[0] + weights[1] + weights[2] + weights[3]);
+ for (int i = 0; i < 4; i++) {
+ weights[i] = weights[i] * wsum + .125;
+ }
+
+ vec3 dir;
+ vec4 color;
+ switch (id.z) {
+ case 0:
+ get_dir_0(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_0(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_0(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_0(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ case 1:
+ get_dir_1(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_1(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_1(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_1(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ case 2:
+ get_dir_2(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_2(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_2(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_2(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ case 3:
+ get_dir_3(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_3(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_3(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_3(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ case 4:
+ get_dir_4(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_4(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_4(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_4(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ default:
+ get_dir_5(dir, u0, v0);
+ color = get_texture(dir) * weights[0];
+
+ get_dir_5(dir, u1, v0);
+ color += get_texture(dir) * weights[1];
+
+ get_dir_5(dir, u0, v1);
+ color += get_texture(dir) * weights[2];
+
+ get_dir_5(dir, u1, v1);
+ color += get_texture(dir) * weights[3];
+ break;
+ }
+ imageStore(dest_cubemap, ivec3(id), color);
+ }
+} \ No newline at end of file
diff --git a/servers/visual/rasterizer_rd/shaders/cubemap_filter.glsl b/servers/visual/rasterizer_rd/shaders/cubemap_filter.glsl
new file mode 100644
index 0000000000..a7e51c1489
--- /dev/null
+++ b/servers/visual/rasterizer_rd/shaders/cubemap_filter.glsl
@@ -0,0 +1,289 @@
+// Copyright 2016 Activision Publishing, Inc.
+//
+// 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 off */
+[compute]
+
+#version 450
+
+VERSION_DEFINES
+
+#define GROUP_SIZE 64
+
+layout(local_size_x = GROUP_SIZE, local_size_y = 1, local_size_z = 1) in;
+/* clang-format on */
+
+layout(set = 0, binding = 0) uniform samplerCube source_cubemap;
+layout(rgba16f, set = 2, binding = 0) uniform restrict writeonly imageCube dest_cubemap0;
+layout(rgba16f, set = 2, binding = 1) uniform restrict writeonly imageCube dest_cubemap1;
+layout(rgba16f, set = 2, binding = 2) uniform restrict writeonly imageCube dest_cubemap2;
+layout(rgba16f, set = 2, binding = 3) uniform restrict writeonly imageCube dest_cubemap3;
+layout(rgba16f, set = 2, binding = 4) uniform restrict writeonly imageCube dest_cubemap4;
+layout(rgba16f, set = 2, binding = 5) uniform restrict writeonly imageCube dest_cubemap5;
+layout(rgba16f, set = 2, binding = 6) uniform restrict writeonly imageCube dest_cubemap6;
+
+#ifdef USE_HIGH_QUALITY
+#define NUM_TAPS 32
+#else
+#define NUM_TAPS 8
+#endif
+
+#define BASE_RESOLUTION 128
+
+#ifdef USE_HIGH_QUALITY
+layout(set = 1, binding = 0, std430) buffer restrict readonly Data {
+ vec4[7][5][3][24] coeffs;
+}
+data;
+#else
+layout(set = 1, binding = 0, std430) buffer restrict readonly Data {
+ vec4[7][5][6] coeffs;
+}
+data;
+#endif
+
+void get_dir(out vec3 dir, in vec2 uv, in uint face) {
+ switch (face) {
+ case 0:
+ dir = vec3(1.0, uv[1], -uv[0]);
+ break;
+ case 1:
+ dir = vec3(-1.0, uv[1], uv[0]);
+ break;
+ case 2:
+ dir = vec3(uv[0], 1.0, -uv[1]);
+ break;
+ case 3:
+ dir = vec3(uv[0], -1.0, uv[1]);
+ break;
+ case 4:
+ dir = vec3(uv[0], uv[1], 1.0);
+ break;
+ default:
+ dir = vec3(-uv[0], uv[1], -1.0);
+ break;
+ }
+}
+
+void main() {
+ // INPUT:
+ // id.x = the linear address of the texel (ignoring face)
+ // id.y = the face
+ // -> use to index output texture
+ // id.x = texel x
+ // id.y = texel y
+ // id.z = face
+ uvec3 id = gl_GlobalInvocationID;
+
+ // determine which texel this is
+#ifndef USE_TEXTURE_ARRAY
+ int level = 0;
+ if (id.x < (128 * 128)) {
+ level = 0;
+ } else if (id.x < (128 * 128 + 64 * 64)) {
+ level = 1;
+ id.x -= (128 * 128);
+ } else if (id.x < (128 * 128 + 64 * 64 + 32 * 32)) {
+ level = 2;
+ id.x -= (128 * 128 + 64 * 64);
+ } else if (id.x < (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16)) {
+ level = 3;
+ id.x -= (128 * 128 + 64 * 64 + 32 * 32);
+ } else if (id.x < (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8)) {
+ level = 4;
+ id.x -= (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16);
+ } else if (id.x < (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8 + 4 * 4)) {
+ level = 5;
+ id.x -= (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8);
+ } else if (id.x < (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8 + 4 * 4 + 2 * 2)) {
+ level = 6;
+ id.x -= (128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8 + 4 * 4);
+ } else {
+ return;
+ }
+ int res = BASE_RESOLUTION >> level;
+#else // Using Texture Arrays so all levels are the same resolution
+ int res = BASE_RESOLUTION;
+ int level = int(id.x / (BASE_RESOLUTION * BASE_RESOLUTION));
+ id.x -= level * BASE_RESOLUTION * BASE_RESOLUTION;
+#endif
+
+ // determine dir / pos for the texel
+ vec3 dir, adir, frameZ;
+ {
+ id.z = id.y;
+ id.y = id.x / res;
+ id.x -= id.y * res;
+
+ vec2 uv;
+ uv.x = (float(id.x) * 2.0 + 1.0) / float(res) - 1.0;
+ uv.y = -(float(id.y) * 2.0 + 1.0) / float(res) + 1.0;
+
+ get_dir(dir, uv, id.z);
+ frameZ = normalize(dir);
+
+ adir = abs(dir);
+ }
+
+ // GGX gather colors
+ vec4 color = vec4(0.0);
+ for (int axis = 0; axis < 3; axis++) {
+ const int otherAxis0 = 1 - (axis & 1) - (axis >> 1);
+ const int otherAxis1 = 2 - (axis >> 1);
+
+ float frameweight = (max(adir[otherAxis0], adir[otherAxis1]) - .75) / .25;
+ if (frameweight > 0.0) {
+ // determine frame
+ vec3 UpVector;
+ switch (axis) {
+ case 0:
+ UpVector = vec3(1, 0, 0);
+ break;
+ case 1:
+ UpVector = vec3(0, 1, 0);
+ break;
+ default:
+ UpVector = vec3(0, 0, 1);
+ break;
+ }
+
+ vec3 frameX = normalize(cross(UpVector, frameZ));
+ vec3 frameY = cross(frameZ, frameX);
+
+ // calculate parametrization for polynomial
+ float Nx = dir[otherAxis0];
+ float Ny = dir[otherAxis1];
+ float Nz = adir[axis];
+
+ float NmaxXY = max(abs(Ny), abs(Nx));
+ Nx /= NmaxXY;
+ Ny /= NmaxXY;
+
+ float theta;
+ if (Ny < Nx) {
+ if (Ny <= -0.999)
+ theta = Nx;
+ else
+ theta = Ny;
+ } else {
+ if (Ny >= 0.999)
+ theta = -Nx;
+ else
+ theta = -Ny;
+ }
+
+ float phi;
+ if (Nz <= -0.999)
+ phi = -NmaxXY;
+ else if (Nz >= 0.999)
+ phi = NmaxXY;
+ else
+ phi = Nz;
+
+ float theta2 = theta * theta;
+ float phi2 = phi * phi;
+
+ // sample
+ for (int iSuperTap = 0; iSuperTap < NUM_TAPS / 4; iSuperTap++) {
+ const int index = (NUM_TAPS / 4) * axis + iSuperTap;
+
+#ifdef USE_HIGH_QUALITY
+ vec4 coeffsDir0[3];
+ vec4 coeffsDir1[3];
+ vec4 coeffsDir2[3];
+ vec4 coeffsLevel[3];
+ vec4 coeffsWeight[3];
+
+ for (int iCoeff = 0; iCoeff < 3; iCoeff++) {
+ coeffsDir0[iCoeff] = data.coeffs[level][0][iCoeff][index];
+ coeffsDir1[iCoeff] = data.coeffs[level][1][iCoeff][index];
+ coeffsDir2[iCoeff] = data.coeffs[level][2][iCoeff][index];
+ coeffsLevel[iCoeff] = data.coeffs[level][3][iCoeff][index];
+ coeffsWeight[iCoeff] = data.coeffs[level][4][iCoeff][index];
+ }
+
+ for (int iSubTap = 0; iSubTap < 4; iSubTap++) {
+ // determine sample attributes (dir, weight, level)
+ vec3 sample_dir = frameX * (coeffsDir0[0][iSubTap] + coeffsDir0[1][iSubTap] * theta2 + coeffsDir0[2][iSubTap] * phi2) + frameY * (coeffsDir1[0][iSubTap] + coeffsDir1[1][iSubTap] * theta2 + coeffsDir1[2][iSubTap] * phi2) + frameZ * (coeffsDir2[0][iSubTap] + coeffsDir2[1][iSubTap] * theta2 + coeffsDir2[2][iSubTap] * phi2);
+
+ float sample_level = coeffsLevel[0][iSubTap] + coeffsLevel[1][iSubTap] * theta2 + coeffsLevel[2][iSubTap] * phi2;
+
+ float sample_weight = coeffsWeight[0][iSubTap] + coeffsWeight[1][iSubTap] * theta2 + coeffsWeight[2][iSubTap] * phi2;
+#else
+ vec4 coeffsDir0 = data.coeffs[level][0][index];
+ vec4 coeffsDir1 = data.coeffs[level][1][index];
+ vec4 coeffsDir2 = data.coeffs[level][2][index];
+ vec4 coeffsLevel = data.coeffs[level][3][index];
+ vec4 coeffsWeight = data.coeffs[level][4][index];
+
+ for (int iSubTap = 0; iSubTap < 4; iSubTap++) {
+ // determine sample attributes (dir, weight, level)
+ vec3 sample_dir = frameX * coeffsDir0[iSubTap] + frameY * coeffsDir1[iSubTap] + frameZ * coeffsDir2[iSubTap];
+
+ float sample_level = coeffsLevel[iSubTap];
+
+ float sample_weight = coeffsWeight[iSubTap];
+#endif
+
+ sample_weight *= frameweight;
+
+ // adjust for jacobian
+ sample_dir /= max(abs(sample_dir[0]), max(abs(sample_dir[1]), abs(sample_dir[2])));
+ sample_level += 0.75 * log2(dot(sample_dir, sample_dir));
+#ifndef USE_TEXTURE_ARRAY
+ sample_level += float(level) / 6.0; // Hack to increase the perceived roughness and reduce upscaling artifacts
+#endif
+ // sample cubemap
+ color.xyz += textureLod(source_cubemap, normalize(sample_dir), sample_level).xyz * sample_weight;
+ color.w += sample_weight;
+ }
+ }
+ }
+ }
+ color /= color.w;
+
+ // write color
+ color.xyz = max(vec3(0.0), color.xyz);
+ color.w = 1.0;
+
+ switch (level) {
+ case 0:
+ imageStore(dest_cubemap0, ivec3(id), color);
+ break;
+ case 1:
+ imageStore(dest_cubemap1, ivec3(id), color);
+ break;
+ case 2:
+ imageStore(dest_cubemap2, ivec3(id), color);
+ break;
+ case 3:
+ imageStore(dest_cubemap3, ivec3(id), color);
+ break;
+ case 4:
+ imageStore(dest_cubemap4, ivec3(id), color);
+ break;
+ case 5:
+ imageStore(dest_cubemap5, ivec3(id), color);
+ break;
+ default:
+ imageStore(dest_cubemap6, ivec3(id), color);
+ break;
+ }
+} \ No newline at end of file
diff --git a/servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl b/servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl
index 011dfce985..3dba143e56 100644
--- a/servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl
+++ b/servers/visual/rasterizer_rd/shaders/cubemap_roughness.glsl
@@ -1,83 +1,38 @@
/* clang-format off */
-[vertex]
+[compute]
#version 450
VERSION_DEFINES
-layout(location = 0) out highp vec2 uv_interp;
-/* clang-format on */
-
-void main() {
-
- vec2 base_arr[4] = vec2[](vec2(0.0, 0.0), vec2(0.0, 1.0), vec2(1.0, 1.0), vec2(1.0, 0.0));
- uv_interp = base_arr[gl_VertexIndex];
- gl_Position = vec4(uv_interp * 2.0 - 1.0, 0.0, 1.0);
-}
-
-/* clang-format off */
-[fragment]
-
-#version 450
+#define GROUP_SIZE 8
-VERSION_DEFINES
+layout(local_size_x = GROUP_SIZE, local_size_y = GROUP_SIZE, local_size_z = 1) in;
+/* clang-format on */
#ifdef MODE_SOURCE_PANORAMA
layout(set = 0, binding = 0) uniform sampler2D source_panorama;
-/* clang-format on */
#endif
#ifdef MODE_SOURCE_CUBEMAP
layout(set = 0, binding = 0) uniform samplerCube source_cube;
#endif
+layout(rgba16f, set = 1, binding = 0) uniform restrict writeonly imageCube dest_cubemap;
+
layout(push_constant, binding = 1, std430) uniform Params {
uint face_id;
uint sample_count;
float roughness;
bool use_direct_write;
+ float face_size;
}
params;
-layout(location = 0) in vec2 uv_interp;
-
-layout(location = 0) out vec4 frag_color;
-
#define M_PI 3.14159265359
vec3 texelCoordToVec(vec2 uv, uint faceID) {
mat3 faceUvVectors[6];
- /*
- // -x
- faceUvVectors[0][0] = vec3(0.0, 0.0, 1.0); // u -> +z
- faceUvVectors[0][1] = vec3(0.0, -1.0, 0.0); // v -> -y
- faceUvVectors[0][2] = vec3(-1.0, 0.0, 0.0); // -x face
-
- // +x
- faceUvVectors[1][0] = vec3(0.0, 0.0, -1.0); // u -> -z
- faceUvVectors[1][1] = vec3(0.0, -1.0, 0.0); // v -> -y
- faceUvVectors[1][2] = vec3(1.0, 0.0, 0.0); // +x face
-
- // -y
- faceUvVectors[2][0] = vec3(1.0, 0.0, 0.0); // u -> +x
- faceUvVectors[2][1] = vec3(0.0, 0.0, -1.0); // v -> -z
- faceUvVectors[2][2] = vec3(0.0, -1.0, 0.0); // -y face
-
- // +y
- faceUvVectors[3][0] = vec3(1.0, 0.0, 0.0); // u -> +x
- faceUvVectors[3][1] = vec3(0.0, 0.0, 1.0); // v -> +z
- faceUvVectors[3][2] = vec3(0.0, 1.0, 0.0); // +y face
-
- // -z
- faceUvVectors[4][0] = vec3(-1.0, 0.0, 0.0); // u -> -x
- faceUvVectors[4][1] = vec3(0.0, -1.0, 0.0); // v -> -y
- faceUvVectors[4][2] = vec3(0.0, 0.0, -1.0); // -z face
-
- // +z
- faceUvVectors[5][0] = vec3(1.0, 0.0, 0.0); // u -> +x
- faceUvVectors[5][1] = vec3(0.0, -1.0, 0.0); // v -> -y
- faceUvVectors[5][2] = vec3(0.0, 0.0, 1.0); // +z face
- */
// -x
faceUvVectors[1][0] = vec3(0.0, 0.0, 1.0); // u -> +z
@@ -179,21 +134,23 @@ vec4 texturePanorama(vec3 normal, sampler2D pano) {
#endif
void main() {
+ uvec3 id = gl_GlobalInvocationID;
+ id.z += params.face_id;
- vec2 uv = (uv_interp * 2.0) - 1.0;
- vec3 N = texelCoordToVec(uv, params.face_id);
+ vec2 uv = ((vec2(id.xy) * 2.0 + 1.0) / (params.face_size) - 1.0);
+ vec3 N = texelCoordToVec(uv, id.z);
//vec4 color = color_interp;
if (params.use_direct_write) {
#ifdef MODE_SOURCE_PANORAMA
-
- frag_color = vec4(texturePanorama(N, source_panorama).rgb, 1.0);
+ imageStore(dest_cubemap, ivec3(id), vec4(texturePanorama(N, source_panorama).rgb, 1.0));
#endif
#ifdef MODE_SOURCE_CUBEMAP
- frag_color = vec4(texture(source_cube, N).rgb, 1.0);
+ imageStore(dest_cubemap, ivec3(id), vec4(texture(source_cube, N).rgb, 1.0));
+
#endif
} else {
@@ -222,6 +179,6 @@ void main() {
}
sum /= sum.a;
- frag_color = vec4(sum.rgb, 1.0);
+ imageStore(dest_cubemap, ivec3(id), vec4(sum.rgb, 1.0));
}
}
diff --git a/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl b/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl
index 9b14499923..baef1e060f 100644
--- a/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl
+++ b/servers/visual/rasterizer_rd/shaders/scene_high_end_inc.glsl
@@ -11,15 +11,15 @@ draw_call;
#define SAMPLER_NEAREST_CLAMP 0
#define SAMPLER_LINEAR_CLAMP 1
-#define SAMPLER_NEAREST_WITH_MIMPAMPS_CLAMP 2
+#define SAMPLER_NEAREST_WITH_MIPMAPS_CLAMP 2
#define SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP 3
-#define SAMPLER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC_CLAMP 4
+#define SAMPLER_NEAREST_WITH_MIPMAPS_ANISOTROPIC_CLAMP 4
#define SAMPLER_LINEAR_WITH_MIPMAPS_ANISOTROPIC_CLAMP 5
#define SAMPLER_NEAREST_REPEAT 6
#define SAMPLER_LINEAR_REPEAT 7
-#define SAMPLER_NEAREST_WITH_MIMPAMPS_REPEAT 8
+#define SAMPLER_NEAREST_WITH_MIPMAPS_REPEAT 8
#define SAMPLER_LINEAR_WITH_MIPMAPS_REPEAT 9
-#define SAMPLER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC_REPEAT 10
+#define SAMPLER_NEAREST_WITH_MIPMAPS_ANISOTROPIC_REPEAT 10
#define SAMPLER_LINEAR_WITH_MIPMAPS_ANISOTROPIC_REPEAT 11
layout(set = 0, binding = 1) uniform sampler material_samplers[12];
diff --git a/servers/visual/rendering_device.cpp b/servers/visual/rendering_device.cpp
index d7c88d5671..3c1795161d 100644
--- a/servers/visual/rendering_device.cpp
+++ b/servers/visual/rendering_device.cpp
@@ -46,15 +46,15 @@ void RenderingDevice::shader_set_cache_function(ShaderCacheFunction p_function)
cache_function = p_function;
}
-PoolVector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) {
+Vector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) {
if (p_allow_cache && cache_function) {
- PoolVector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language);
+ Vector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language);
if (cache.size()) {
return cache;
}
}
- ERR_FAIL_COND_V(!compile_function, PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(!compile_function, Vector<uint8_t>());
return compile_function(p_stage, p_source_code, p_language, r_error);
}
diff --git a/servers/visual/rendering_device.h b/servers/visual/rendering_device.h
index d7b13a739c..c3b937d5e2 100644
--- a/servers/visual/rendering_device.h
+++ b/servers/visual/rendering_device.h
@@ -55,8 +55,8 @@ public:
SHADER_LANGUAGE_HLSL
};
- typedef PoolVector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error);
- typedef PoolVector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language);
+ typedef Vector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error);
+ typedef Vector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language);
private:
static ShaderCompileFunction compile_function;
@@ -407,7 +407,7 @@ public:
}
};
- virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >()) = 0;
+ virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >()) = 0;
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture) = 0;
enum TextureSliceType {
@@ -418,8 +418,8 @@ public:
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D) = 0;
- virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls
- virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush
+ virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls
+ virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const = 0;
virtual bool texture_is_shared(RID p_texture) = 0;
@@ -542,7 +542,7 @@ public:
frequency = VERTEX_FREQUENCY_VERTEX;
}
};
- virtual RID vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0;
+ virtual RID vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0;
typedef int64_t VertexFormatID;
@@ -555,21 +555,21 @@ public:
INDEX_BUFFER_FORMAT_UINT32,
};
- virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>(), bool p_use_restart_indices = false) = 0;
+ virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>(), bool p_use_restart_indices = false) = 0;
virtual RID index_array_create(RID p_index_buffer, uint32_t p_index_offset, uint32_t p_index_count) = 0;
/****************/
/**** SHADER ****/
/****************/
- virtual PoolVector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true);
+ virtual Vector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true);
static void shader_set_compile_function(ShaderCompileFunction p_function);
static void shader_set_cache_function(ShaderCacheFunction p_function);
struct ShaderStageData {
ShaderStage shader_stage;
- PoolVector<uint8_t> spir_v;
+ Vector<uint8_t> spir_v;
ShaderStageData() {
shader_stage = SHADER_STAGE_VERTEX;
@@ -597,9 +597,9 @@ public:
UNIFORM_TYPE_MAX
};
- virtual RID uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0;
- virtual RID storage_buffer_create(uint32_t p_size, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0;
- virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0;
+ virtual RID uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0;
+ virtual RID storage_buffer_create(uint32_t p_size, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0;
+ virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0;
struct Uniform {
UniformType type;
@@ -622,7 +622,7 @@ public:
virtual bool uniform_set_is_valid(RID p_uniform_set) = 0;
virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls
- virtual PoolVector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving
+ virtual Vector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving
/*************************/
/**** RENDER PIPELINE ****/
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index a7c18f184d..ed3feccb43 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2646,7 +2646,7 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform
pi.type = Variant::INT;
if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
pi.hint = PROPERTY_HINT_RANGE;
- pi.hint_string = rtos(p_uniform.hint_range[0]) + "," + rtos(p_uniform.hint_range[1]);
+ pi.hint_string = rtos(p_uniform.hint_range[0]) + "," + rtos(p_uniform.hint_range[1]) + "," + rtos(p_uniform.hint_range[2]);
}
} break;
@@ -2657,10 +2657,10 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform
case ShaderLanguage::TYPE_UVEC3:
case ShaderLanguage::TYPE_UVEC4: {
- pi.type = Variant::POOL_INT_ARRAY;
+ pi.type = Variant::PACKED_INT32_ARRAY;
} break;
case ShaderLanguage::TYPE_FLOAT: {
- pi.type = Variant::REAL;
+ pi.type = Variant::FLOAT;
if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
pi.hint = PROPERTY_HINT_RANGE;
pi.hint_string = rtos(p_uniform.hint_range[0]) + "," + rtos(p_uniform.hint_range[1]) + "," + rtos(p_uniform.hint_range[2]);
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index 69f843eb4b..c192b77988 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -183,7 +183,7 @@ void VisualServerCanvas::_cull_canvas_item(Item *p_canvas_item, const Transform2
VisualServerRaster::redraw_request();
}
- if ((ci->commands != NULL && p_clip_rect.intersects_touch(global_rect)) || ci->vp_render || ci->copy_back_buffer) {
+ if ((ci->commands != NULL && p_clip_rect.intersects(global_rect, true)) || ci->vp_render || ci->copy_back_buffer) {
//something to draw?
ci->final_transform = xform;
ci->final_modulate = Color(modulate.r * ci->self_modulate.r, modulate.g * ci->self_modulate.g, modulate.b * ci->self_modulate.b, modulate.a * ci->self_modulate.a);
@@ -1265,20 +1265,20 @@ RID VisualServerCanvas::canvas_occluder_polygon_create() {
occluder_poly->occluder = VSG::canvas_render->occluder_polygon_create();
return canvas_light_occluder_polygon_owner.make_rid(occluder_poly);
}
-void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) {
+void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) {
if (p_shape.size() < 3) {
canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, p_shape);
return;
}
- PoolVector<Vector2> lines;
+ Vector<Vector2> lines;
int lc = p_shape.size() * 2;
lines.resize(lc - (p_closed ? 0 : 2));
{
- PoolVector<Vector2>::Write w = lines.write();
- PoolVector<Vector2>::Read r = p_shape.read();
+ Vector2 *w = lines.ptrw();
+ const Vector2 *r = p_shape.ptr();
int max = lc / 2;
if (!p_closed) {
@@ -1295,7 +1295,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygo
canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, lines);
}
-void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) {
+void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) {
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon);
ERR_FAIL_COND(!occluder_poly);
@@ -1304,7 +1304,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occlud
int lc = p_shape.size();
occluder_poly->aabb = Rect2();
{
- PoolVector<Vector2>::Read r = p_shape.read();
+ const Vector2 *r = p_shape.ptr();
for (int i = 0; i < lc; i++) {
if (i == 0)
occluder_poly->aabb.position = r[i];
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index c120a90314..dea4183752 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -257,8 +257,8 @@ public:
void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask);
RID canvas_occluder_polygon_create();
- void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed);
- void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape);
+ void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed);
+ void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape);
void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, VS::CanvasOccluderPolygonCullMode p_mode);
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index b27c01cccc..35ec52a5c0 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -120,10 +120,10 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) {
Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object);
if (obj) {
- Variant::CallError ce;
+ Callable::CallError ce;
const Variant *v = &frame_drawn_callbacks.front()->get().param;
obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce);
- if (ce.error != Variant::CallError::CALL_OK) {
+ if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce);
ERR_PRINT("Error calling frame drawn function: " + err);
}
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 297f0727a0..4fea6082f4 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -233,7 +233,7 @@ public:
BIND2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
BIND1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
- BIND4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &)
+ BIND4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
BIND3(mesh_surface_set_material, RID, int, RID)
BIND2RC(RID, mesh_surface_get_material, RID, int)
@@ -268,8 +268,8 @@ public:
BIND2RC(Color, multimesh_instance_get_color, RID, int)
BIND2RC(Color, multimesh_instance_get_custom_data, RID, int)
- BIND2(multimesh_set_buffer, RID, const PoolVector<float> &)
- BIND1RC(PoolVector<float>, multimesh_get_buffer, RID)
+ BIND2(multimesh_set_buffer, RID, const Vector<float> &)
+ BIND1RC(Vector<float>, multimesh_get_buffer, RID)
BIND2(multimesh_set_visible_instances, RID, int)
BIND1RC(int, multimesh_get_visible_instances, RID)
@@ -344,14 +344,14 @@ public:
BIND0R(RID, gi_probe_create)
- BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &)
+ BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
BIND1RC(AABB, gi_probe_get_bounds, RID)
BIND1RC(Vector3i, gi_probe_get_octree_size, RID)
- BIND1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID)
- BIND1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID)
- BIND1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID)
- BIND1RC(PoolVector<int>, gi_probe_get_level_counts, RID)
+ BIND1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
+ BIND1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
+ BIND1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
+ BIND1RC(Vector<int>, gi_probe_get_level_counts, RID)
BIND1RC(Transform, gi_probe_get_to_cell_xform, RID)
BIND2(gi_probe_set_dynamic_range, RID, float)
@@ -391,8 +391,8 @@ public:
BIND2(lightmap_capture_set_bounds, RID, const AABB &)
BIND1RC(AABB, lightmap_capture_get_bounds, RID)
- BIND2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &)
- BIND1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID)
+ BIND2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &)
+ BIND1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID)
BIND2(lightmap_capture_set_octree_cell_transform, RID, const Transform &)
BIND1RC(Transform, lightmap_capture_get_octree_cell_transform, RID)
@@ -686,8 +686,8 @@ public:
BIND2(canvas_light_occluder_set_light_mask, RID, int)
BIND0R(RID, canvas_occluder_polygon_create)
- BIND3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool)
- BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &)
+ BIND3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
+ BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &)
BIND2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 61c885cba3..1a9ecae23a 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -1313,7 +1313,7 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance)
//this could use some sort of blending..
for (List<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) {
- const PoolVector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base);
+ const Vector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base);
//print_line("octree size: " + itos(octree->size()));
if (octree->size() == 0)
continue;
@@ -1321,14 +1321,14 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance)
int cell_subdiv = VSG::storage->lightmap_capture_get_octree_cell_subdiv(E->get()->base);
to_cell_xform = to_cell_xform * E->get()->transform.affine_inverse();
- PoolVector<RasterizerStorage::LightmapCaptureOctree>::Read octree_r = octree->read();
+ const RasterizerStorage::LightmapCaptureOctree *octree_r = octree->ptr();
Vector3 pos = to_cell_xform.xform(p_instance->transform.origin);
for (int i = 0; i < 12; i++) {
Vector3 dir = to_cell_xform.basis.xform(cone_traces[i]).normalized();
- Color capture = _light_capture_voxel_cone_trace(octree_r.ptr(), pos, dir, cone_aperture, cell_subdiv);
+ Color capture = _light_capture_voxel_cone_trace(octree_r, pos, dir, cone_aperture, cell_subdiv);
p_instance->lightmap_capture_data.write[i] += capture;
}
}
diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp
index 9a5e5e896a..90d301c0cd 100644
--- a/servers/visual/visual_server_wrap_mt.cpp
+++ b/servers/visual/visual_server_wrap_mt.cpp
@@ -180,7 +180,6 @@ VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_
thread = NULL;
draw_pending = 0;
draw_thread_up = false;
- alloc_mutex = Mutex::create();
pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
if (!p_create_thread) {
@@ -193,6 +192,5 @@ VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_
VisualServerWrapMT::~VisualServerWrapMT() {
memdelete(visual_server);
- memdelete(alloc_mutex);
//finish();
}
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 3ed3728757..2eaafe220b 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -57,7 +57,7 @@ class VisualServerWrapMT : public VisualServer {
void thread_exit();
- Mutex *alloc_mutex;
+ Mutex alloc_mutex;
int pool_max_size;
@@ -157,7 +157,7 @@ public:
FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
- FUNC4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &)
+ FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
FUNC3(mesh_surface_set_material, RID, int, RID)
FUNC2RC(RID, mesh_surface_get_material, RID, int)
@@ -192,8 +192,8 @@ public:
FUNC2RC(Color, multimesh_instance_get_color, RID, int)
FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int)
- FUNC2(multimesh_set_buffer, RID, const PoolVector<float> &)
- FUNC1RC(PoolVector<float>, multimesh_get_buffer, RID)
+ FUNC2(multimesh_set_buffer, RID, const Vector<float> &)
+ FUNC1RC(Vector<float>, multimesh_get_buffer, RID)
FUNC2(multimesh_set_visible_instances, RID, int)
FUNC1RC(int, multimesh_get_visible_instances, RID)
@@ -268,14 +268,14 @@ public:
FUNCRID(gi_probe)
- FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &)
+ FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
FUNC1RC(AABB, gi_probe_get_bounds, RID)
FUNC1RC(Vector3i, gi_probe_get_octree_size, RID)
- FUNC1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID)
- FUNC1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID)
- FUNC1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID)
- FUNC1RC(PoolVector<int>, gi_probe_get_level_counts, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
+ FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID)
FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID)
FUNC2(gi_probe_set_dynamic_range, RID, float)
@@ -315,8 +315,8 @@ public:
FUNC2(lightmap_capture_set_bounds, RID, const AABB &)
FUNC1RC(AABB, lightmap_capture_get_bounds, RID)
- FUNC2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &)
- FUNC1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID)
+ FUNC2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &)
+ FUNC1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID)
FUNC2(lightmap_capture_set_octree_cell_transform, RID, const Transform &)
FUNC1RC(Transform, lightmap_capture_get_octree_cell_transform, RID)
FUNC2(lightmap_capture_set_octree_cell_subdiv, RID, int)
@@ -590,8 +590,8 @@ public:
FUNC2(canvas_light_occluder_set_light_mask, RID, int)
FUNCRID(canvas_occluder_polygon)
- FUNC3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool)
- FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &)
+ FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
+ FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &)
FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 83efbabc36..b30d5e1dd1 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -120,11 +120,11 @@ RID VisualServer::get_test_texture() {
#define TEST_TEXTURE_SIZE 256
- PoolVector<uint8_t> test_data;
+ Vector<uint8_t> test_data;
test_data.resize(TEST_TEXTURE_SIZE * TEST_TEXTURE_SIZE * 3);
{
- PoolVector<uint8_t>::Write w = test_data.write();
+ uint8_t *w = test_data.ptrw();
for (int x = 0; x < TEST_TEXTURE_SIZE; x++) {
@@ -172,10 +172,10 @@ void VisualServer::_free_internal_rids() {
RID VisualServer::_make_test_cube() {
- PoolVector<Vector3> vertices;
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- PoolVector<Vector3> uvs;
+ Vector<Vector3> vertices;
+ Vector<Vector3> normals;
+ Vector<float> tangents;
+ Vector<Vector3> uvs;
#define ADD_VTX(m_idx) \
vertices.push_back(face_points[m_idx]); \
@@ -229,7 +229,7 @@ RID VisualServer::_make_test_cube() {
d[VisualServer::ARRAY_TEX_UV] = uvs;
d[VisualServer::ARRAY_VERTEX] = vertices;
- PoolVector<int> indices;
+ Vector<int> indices;
indices.resize(vertices.size());
for (int i = 0; i < vertices.size(); i++)
indices.set(i, i);
@@ -254,8 +254,8 @@ RID VisualServer::_make_test_cube() {
RID VisualServer::make_sphere_mesh(int p_lats, int p_lons, float p_radius) {
- PoolVector<Vector3> vertices;
- PoolVector<Vector3> normals;
+ Vector<Vector3> vertices;
+ Vector<Vector3> normals;
for (int i = 1; i <= p_lats; i++) {
double lat0 = Math_PI * (-0.5 + (double)(i - 1) / p_lats);
@@ -314,10 +314,10 @@ RID VisualServer::get_white_texture() {
if (white_texture.is_valid())
return white_texture;
- PoolVector<uint8_t> wt;
+ Vector<uint8_t> wt;
wt.resize(16 * 3);
{
- PoolVector<uint8_t>::Write w = wt.write();
+ uint8_t *w = wt.ptrw();
for (int i = 0; i < 16 * 3; i++)
w[i] = 255;
}
@@ -329,13 +329,13 @@ RID VisualServer::get_white_texture() {
#define SMALL_VEC2 Vector2(0.00001, 0.00001)
#define SMALL_VEC3 Vector3(0.00001, 0.00001, 0.00001)
-Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, PoolVector<uint8_t> &r_vertex_array, int p_vertex_array_len, PoolVector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb) {
+Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, Vector<uint8_t> &r_vertex_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb) {
- PoolVector<uint8_t>::Write vw = r_vertex_array.write();
+ uint8_t *vw = r_vertex_array.ptrw();
- PoolVector<uint8_t>::Write iw;
+ uint8_t *iw;
if (r_index_array.size()) {
- iw = r_index_array.write();
+ iw = r_index_array.ptrw();
}
int max_bone = 0;
@@ -351,11 +351,10 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
if (p_format & VS::ARRAY_FLAG_USE_2D_VERTICES) {
- PoolVector<Vector2> array = p_arrays[ai];
+ Vector<Vector2> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Vector2>::Read read = array.read();
- const Vector2 *src = read.ptr();
+ const Vector2 *src = array.ptr();
// setting vertices means regenerating the AABB
Rect2 aabb;
@@ -380,11 +379,10 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
r_aabb = AABB(Vector3(aabb.position.x, aabb.position.y, 0), Vector3(aabb.size.x, aabb.size.y, 0));
} else {
- PoolVector<Vector3> array = p_arrays[ai];
+ Vector<Vector3> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Vector3>::Read read = array.read();
- const Vector3 *src = read.ptr();
+ const Vector3 *src = array.ptr();
// setting vertices means regenerating the AABB
AABB aabb;
@@ -412,13 +410,12 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_NORMAL: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<Vector3> array = p_arrays[ai];
+ Vector<Vector3> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Vector3>::Read read = array.read();
- const Vector3 *src = read.ptr();
+ const Vector3 *src = array.ptr();
// setting vertices means regenerating the AABB
@@ -448,14 +445,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
case VS::ARRAY_TANGENT: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<real_t> array = p_arrays[ai];
+ Vector<real_t> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len * 4, ERR_INVALID_PARAMETER);
- PoolVector<real_t>::Read read = array.read();
- const real_t *src = read.ptr();
+ const real_t *src = array.ptr();
if (p_format & ARRAY_COMPRESS_TANGENT) {
@@ -487,14 +483,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_COLOR: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_COLOR_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_COLOR_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<Color> array = p_arrays[ai];
+ Vector<Color> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Color>::Read read = array.read();
- const Color *src = read.ptr();
+ const Color *src = array.ptr();
if (p_format & ARRAY_COMPRESS_COLOR) {
@@ -520,15 +515,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_TEX_UV: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::POOL_VECTOR2_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_VECTOR2_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<Vector2> array = p_arrays[ai];
+ Vector<Vector2> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Vector2>::Read read = array.read();
-
- const Vector2 *src = read.ptr();
+ const Vector2 *src = array.ptr();
if (p_format & ARRAY_COMPRESS_TEX_UV) {
@@ -551,15 +544,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
case VS::ARRAY_TEX_UV2: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::POOL_VECTOR2_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_VECTOR2_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<Vector2> array = p_arrays[ai];
+ Vector<Vector2> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len, ERR_INVALID_PARAMETER);
- PoolVector<Vector2>::Read read = array.read();
-
- const Vector2 *src = read.ptr();
+ const Vector2 *src = array.ptr();
if (p_format & ARRAY_COMPRESS_TEX_UV2) {
@@ -580,15 +571,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_WEIGHTS: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<real_t> array = p_arrays[ai];
+ Vector<real_t> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER);
- PoolVector<real_t>::Read read = array.read();
-
- const real_t *src = read.ptr();
+ const real_t *src = array.ptr();
{
@@ -606,15 +595,13 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_BONES: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_INT_ARRAY && p_arrays[ai].get_type() != Variant::POOL_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<int> array = p_arrays[ai];
+ Vector<int> array = p_arrays[ai];
ERR_FAIL_COND_V(array.size() != p_vertex_array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER);
- PoolVector<int>::Read read = array.read();
-
- const int *src = read.ptr();
+ const int *src = array.ptr();
for (int i = 0; i < p_vertex_array_len; i++) {
@@ -631,16 +618,15 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
case VS::ARRAY_INDEX: {
ERR_FAIL_COND_V(p_index_array_len <= 0, ERR_INVALID_DATA);
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::POOL_INT_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY, ERR_INVALID_PARAMETER);
- PoolVector<int> indices = p_arrays[ai];
+ Vector<int> indices = p_arrays[ai];
ERR_FAIL_COND_V(indices.size() == 0, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(indices.size() != p_index_array_len, ERR_INVALID_PARAMETER);
/* determine whether using 16 or 32 bits indices */
- PoolVector<int>::Read read = indices.read();
- const int *src = read.ptr();
+ const int *src = indices.ptr();
for (int i = 0; i < p_index_array_len; i++) {
@@ -675,18 +661,18 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
}
}
- PoolVector<Vector3> vertices = p_arrays[VS::ARRAY_VERTEX];
- PoolVector<int> bones = p_arrays[VS::ARRAY_BONES];
- PoolVector<float> weights = p_arrays[VS::ARRAY_WEIGHTS];
+ Vector<Vector3> vertices = p_arrays[VS::ARRAY_VERTEX];
+ Vector<int> bones = p_arrays[VS::ARRAY_BONES];
+ Vector<float> weights = p_arrays[VS::ARRAY_WEIGHTS];
bool any_valid = false;
if (vertices.size() && bones.size() == vertices.size() * 4 && weights.size() == bones.size()) {
int vs = vertices.size();
- PoolVector<Vector3>::Read rv = vertices.read();
- PoolVector<int>::Read rb = bones.read();
- PoolVector<float>::Read rw = weights.read();
+ const Vector3 *rv = vertices.ptr();
+ const int *rb = bones.ptr();
+ const float *rw = weights.ptr();
AABB *bptr = r_bone_aabb.ptrw();
@@ -866,22 +852,22 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
Variant var = p_arrays[i];
switch (var.get_type()) {
- case Variant::POOL_VECTOR2_ARRAY: {
- PoolVector<Vector2> v2 = var;
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ Vector<Vector2> v2 = var;
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
- PoolVector<Vector3> v3 = var;
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ Vector<Vector3> v3 = var;
} break;
default: {
Array v = var;
} break;
}
- array_len = PoolVector3Array(p_arrays[i]).size();
+ array_len = PackedVector3Array(p_arrays[i]).size();
ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA);
} else if (i == VS::ARRAY_INDEX) {
- index_array_len = PoolIntArray(p_arrays[i]).size();
+ index_array_len = PackedInt32Array(p_arrays[i]).size();
}
}
@@ -921,10 +907,10 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
case VS::ARRAY_VERTEX: {
Variant arr = p_arrays[0];
- if (arr.get_type() == Variant::POOL_VECTOR2_ARRAY) {
+ if (arr.get_type() == Variant::PACKED_VECTOR2_ARRAY) {
elem_size = 2;
p_compress_format |= ARRAY_FLAG_USE_2D_VERTICES;
- } else if (arr.get_type() == Variant::POOL_VECTOR3_ARRAY) {
+ } else if (arr.get_type() == Variant::PACKED_VECTOR3_ARRAY) {
p_compress_format &= ~ARRAY_FLAG_USE_2D_VERTICES;
elem_size = 3;
} else {
@@ -1020,12 +1006,12 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
int array_size = total_elem_size * array_len;
- PoolVector<uint8_t> vertex_array;
+ Vector<uint8_t> vertex_array;
vertex_array.resize(array_size);
int index_array_size = offsets[VS::ARRAY_INDEX] * index_array_len;
- PoolVector<uint8_t> index_array;
+ Vector<uint8_t> index_array;
index_array.resize(index_array_size);
AABB aabb;
@@ -1034,13 +1020,13 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
Error err = _surface_set_data(p_arrays, format, offsets, total_elem_size, vertex_array, array_len, index_array, index_array_len, aabb, bone_aabb);
ERR_FAIL_COND_V_MSG(err != OK, ERR_INVALID_DATA, "Invalid array format for surface.");
- Vector<PoolVector<uint8_t> > blend_shape_data;
+ Vector<Vector<uint8_t> > blend_shape_data;
for (int i = 0; i < p_blend_shapes.size(); i++) {
- PoolVector<uint8_t> vertex_array_shape;
+ Vector<uint8_t> vertex_array_shape;
vertex_array_shape.resize(array_size);
- PoolVector<uint8_t> noindex;
+ Vector<uint8_t> noindex;
AABB laabb;
Error err2 = _surface_set_data(p_blend_shapes[i], format & ~ARRAY_FORMAT_INDEX, offsets, total_elem_size, vertex_array_shape, array_len, noindex, 0, laabb, bone_aabb);
@@ -1057,27 +1043,27 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
float distance = E->get();
ERR_CONTINUE(distance <= 0.0);
- PoolVector<int> indices = p_lods[E->get()];
+ Vector<int> indices = p_lods[E->get()];
ERR_CONTINUE(indices.size() == 0);
uint32_t index_count = indices.size();
ERR_CONTINUE(index_count >= (uint32_t)index_array_len); //should be smaller..
- PoolVector<int>::Read r = indices.read();
+ const int *r = indices.ptr();
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
if (array_len <= 65536) {
//16 bits indices
data.resize(indices.size() * 2);
- PoolVector<uint8_t>::Write w = data.write();
- uint16_t *index_ptr = (uint16_t *)w.ptr();
+ uint8_t *w = data.ptrw();
+ uint16_t *index_ptr = (uint16_t *)w;
for (uint32_t i = 0; i < index_count; i++) {
index_ptr[i] = r[i];
}
} else {
//32 bits indices
data.resize(indices.size() * 4);
- PoolVector<uint8_t>::Write w = data.write();
- uint32_t *index_ptr = (uint32_t *)w.ptr();
+ uint8_t *w = data.ptrw();
+ uint32_t *index_ptr = (uint32_t *)w;
for (uint32_t i = 0; i < index_count; i++) {
index_ptr[i] = r[i];
}
@@ -1115,7 +1101,7 @@ void VisualServer::mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_prim
mesh_add_surface(p_mesh, sd);
}
-Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_t> p_vertex_data, int p_vertex_len, PoolVector<uint8_t> p_index_data, int p_index_len) const {
+Array VisualServer::_get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const {
uint32_t offsets[ARRAY_MAX];
@@ -1227,7 +1213,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
Array ret;
ret.resize(VS::ARRAY_MAX);
- PoolVector<uint8_t>::Read r = p_vertex_data.read();
+ const uint8_t *r = p_vertex_data.ptr();
for (int i = 0; i < VS::ARRAY_MAX; i++) {
@@ -1240,12 +1226,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
if (p_format & ARRAY_FLAG_USE_2D_VERTICES) {
- PoolVector<Vector2> arr_2d;
+ Vector<Vector2> arr_2d;
arr_2d.resize(p_vertex_len);
{
- PoolVector<Vector2>::Write w = arr_2d.write();
+ Vector2 *w = arr_2d.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1257,12 +1243,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
ret[i] = arr_2d;
} else {
- PoolVector<Vector3> arr_3d;
+ Vector<Vector3> arr_3d;
arr_3d.resize(p_vertex_len);
{
- PoolVector<Vector3>::Write w = arr_3d.write();
+ Vector3 *w = arr_3d.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1276,12 +1262,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_NORMAL: {
- PoolVector<Vector3> arr;
+ Vector<Vector3> arr;
arr.resize(p_vertex_len);
if (p_format & ARRAY_COMPRESS_NORMAL) {
- PoolVector<Vector3>::Write w = arr.write();
+ Vector3 *w = arr.ptrw();
const float multiplier = 1.f / 127.f;
for (int j = 0; j < p_vertex_len; j++) {
@@ -1290,7 +1276,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
w[j] = Vector3(float(v[0]) * multiplier, float(v[1]) * multiplier, float(v[2]) * multiplier);
}
} else {
- PoolVector<Vector3>::Write w = arr.write();
+ Vector3 *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1304,10 +1290,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_TANGENT: {
- PoolVector<float> arr;
+ Vector<float> arr;
arr.resize(p_vertex_len * 4);
if (p_format & ARRAY_COMPRESS_TANGENT) {
- PoolVector<float>::Write w = arr.write();
+ float *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1318,7 +1304,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
}
} else {
- PoolVector<float>::Write w = arr.write();
+ float *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
const float *v = (const float *)&r[j * total_elem_size + offsets[i]];
@@ -1333,12 +1319,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_COLOR: {
- PoolVector<Color> arr;
+ Vector<Color> arr;
arr.resize(p_vertex_len);
if (p_format & ARRAY_COMPRESS_COLOR) {
- PoolVector<Color>::Write w = arr.write();
+ Color *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1346,7 +1332,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
w[j] = Color(float(v[0] / 255.0), float(v[1] / 255.0), float(v[2] / 255.0), float(v[3] / 255.0));
}
} else {
- PoolVector<Color>::Write w = arr.write();
+ Color *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1359,12 +1345,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_TEX_UV: {
- PoolVector<Vector2> arr;
+ Vector<Vector2> arr;
arr.resize(p_vertex_len);
if (p_format & ARRAY_COMPRESS_TEX_UV) {
- PoolVector<Vector2>::Write w = arr.write();
+ Vector2 *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1373,7 +1359,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
}
} else {
- PoolVector<Vector2>::Write w = arr.write();
+ Vector2 *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1386,12 +1372,12 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_TEX_UV2: {
- PoolVector<Vector2> arr;
+ Vector<Vector2> arr;
arr.resize(p_vertex_len);
if (p_format & ARRAY_COMPRESS_TEX_UV2) {
- PoolVector<Vector2>::Write w = arr.write();
+ Vector2 *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1400,7 +1386,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
}
} else {
- PoolVector<Vector2>::Write w = arr.write();
+ Vector2 *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1414,10 +1400,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_WEIGHTS: {
- PoolVector<float> arr;
+ Vector<float> arr;
arr.resize(p_vertex_len * 4);
{
- PoolVector<float>::Write w = arr.write();
+ float *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1433,10 +1419,10 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
} break;
case VS::ARRAY_BONES: {
- PoolVector<int> arr;
+ Vector<int> arr;
arr.resize(p_vertex_len * 4);
- PoolVector<int>::Write w = arr.write();
+ int *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1452,13 +1438,13 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
case VS::ARRAY_INDEX: {
/* determine whether using 16 or 32 bits indices */
- PoolVector<uint8_t>::Read ir = p_index_data.read();
+ const uint8_t *ir = p_index_data.ptr();
- PoolVector<int> arr;
+ Vector<int> arr;
arr.resize(p_index_len);
if (p_vertex_len < (1 << 16)) {
- PoolVector<int>::Write w = arr.write();
+ int *w = arr.ptrw();
for (int j = 0; j < p_index_len; j++) {
@@ -1467,7 +1453,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_
}
} else {
- PoolVector<int>::Write w = arr.write();
+ int *w = arr.ptrw();
for (int j = 0; j < p_index_len; j++) {
const int *v = (const int *)&ir[j * 4];
@@ -1499,22 +1485,22 @@ Dictionary VisualServer::mesh_surface_get_lods(RID p_mesh, int p_surface) const
Dictionary ret;
for (int i = 0; i < sd.lods.size(); i++) {
- PoolVector<int> lods;
+ Vector<int> lods;
if (sd.vertex_count <= 65536) {
uint32_t lc = sd.lods[i].index_data.size() / 2;
lods.resize(lc);
- PoolVector<uint8_t>::Read r = sd.lods[i].index_data.read();
- const uint16_t *rptr = (const uint16_t *)r.ptr();
- PoolVector<int>::Write w = lods.write();
+ const uint8_t *r = sd.lods[i].index_data.ptr();
+ const uint16_t *rptr = (const uint16_t *)r;
+ int *w = lods.ptrw();
for (uint32_t j = 0; j < lc; j++) {
w[j] = rptr[i];
}
} else {
uint32_t lc = sd.lods[i].index_data.size() / 4;
lods.resize(lc);
- PoolVector<uint8_t>::Read r = sd.lods[i].index_data.read();
- const uint32_t *rptr = (const uint32_t *)r.ptr();
- PoolVector<int>::Write w = lods.write();
+ const uint8_t *r = sd.lods[i].index_data.ptr();
+ const uint32_t *rptr = (const uint32_t *)r;
+ int *w = lods.ptrw();
for (uint32_t j = 0; j < lc; j++) {
w[j] = rptr[i];
}
@@ -1531,12 +1517,12 @@ Array VisualServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surfac
SurfaceData sd = mesh_get_surface(p_mesh, p_surface);
ERR_FAIL_COND_V(sd.vertex_count == 0, Array());
- Vector<PoolVector<uint8_t> > blend_shape_data = sd.blend_shapes;
+ Vector<Vector<uint8_t> > blend_shape_data = sd.blend_shapes;
if (blend_shape_data.size() > 0) {
int vertex_len = sd.vertex_count;
- PoolVector<uint8_t> index_data = sd.index_data;
+ Vector<uint8_t> index_data = sd.index_data;
int index_len = sd.index_count;
uint32_t format = sd.format;
@@ -1555,12 +1541,12 @@ Array VisualServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surfac
Array VisualServer::mesh_create_arrays_from_surface_data(const SurfaceData &p_data) const {
- PoolVector<uint8_t> vertex_data = p_data.vertex_data;
+ Vector<uint8_t> vertex_data = p_data.vertex_data;
ERR_FAIL_COND_V(vertex_data.size() == 0, Array());
int vertex_len = p_data.vertex_count;
- PoolVector<uint8_t> index_data = p_data.index_data;
+ Vector<uint8_t> index_data = p_data.index_data;
int index_len = p_data.index_count;
uint32_t format = p_data.format;
@@ -1819,7 +1805,7 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white", "auto_exposure", "min_luminance", "max_luminance", "auto_exp_speed", "auto_exp_grey"), &VisualServer::environment_set_tonemap);
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "ramp"), &VisualServer::environment_set_adjustment);
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance", "roughness"), &VisualServer::environment_set_ssr);
- ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "radius2", "intensity2", "bias", "light_affect", "ao_channel_affect", "color", "blur", "bilateral_sharpness"), &VisualServer::environment_set_ssao);
+ ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "bias", "light_affect", "ao_channel_affect", "blur", "bilateral_sharpness"), &VisualServer::environment_set_ssao);
ClassDB::bind_method(D_METHOD("environment_set_fog", "env", "enable", "color", "sun_color", "sun_amount"), &VisualServer::environment_set_fog);
ClassDB::bind_method(D_METHOD("environment_set_fog_depth", "env", "enable", "depth_begin", "depth_end", "depth_curve", "transmit", "transmit_curve"), &VisualServer::environment_set_fog_depth);
@@ -2141,10 +2127,6 @@ void VisualServer::_bind_methods() {
BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_FILMIC);
BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_ACES);
- BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_LOW);
- BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_MEDIUM);
- BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_HIGH);
-
BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_DISABLED);
BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_1x1);
BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_2x2);
@@ -2198,9 +2180,9 @@ void VisualServer::_bind_methods() {
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_DEFAULT);
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST);
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR);
- BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS);
+ BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS);
- BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC);
+ BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(CANVAS_ITEM_TEXTURE_FILTER_MAX);
@@ -2255,8 +2237,8 @@ void VisualServer::_camera_set_orthogonal(RID p_camera, float p_size, float p_z_
void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data) {
- PoolVector<Vector3> vertices;
- PoolVector<Vector3> normals;
+ Vector<Vector3> vertices;
+ Vector<Vector3> normals;
for (int i = 0; i < p_mesh_data.faces.size(); i++) {
@@ -2281,7 +2263,7 @@ void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::M
mesh_add_surface_from_arrays(p_mesh, PRIMITIVE_TRIANGLES, d);
}
-void VisualServer::mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes) {
+void VisualServer::mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes) {
Geometry::MeshData mdata = Geometry::build_convex_mesh(p_planes);
mesh_add_surface_from_mesh_data(p_mesh, mdata);
@@ -2334,9 +2316,8 @@ VisualServer::VisualServer() {
GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections.mobile", false);
GLOBAL_DEF("rendering/quality/reflections/ggx_samples", 1024);
GLOBAL_DEF("rendering/quality/reflections/ggx_samples.mobile", 128);
- GLOBAL_DEF("rendering/quality/reflections/ggx_samples_realtime", 64);
- GLOBAL_DEF("rendering/quality/reflections/ggx_samples_realtime.mobile", 16);
- GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size", 256);
+ GLOBAL_DEF("rendering/quality/reflections/fast_filter_high_quality", false);
+ GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size", 128);
GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size.mobile", 128);
GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_count", 64);
@@ -2370,7 +2351,7 @@ VisualServer::VisualServer() {
GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter", 0);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter", PropertyInfo(Variant::INT, "rendering/quality/filters/screen_space_roughness_limiter", PROPERTY_HINT_ENUM, "Disabled,Enabled (Small Cost)"));
GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter_curve", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::REAL, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::FLOAT, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01"));
}
VisualServer::~VisualServer() {
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 9b7a3ffa76..9129f940ee 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -32,7 +32,6 @@
#define VISUAL_SERVER_H
#include "core/image.h"
-#include "core/math/bsp_tree.h"
#include "core/math/geometry.h"
#include "core/math/transform_2d.h"
#include "core/object.h"
@@ -49,7 +48,7 @@ class VisualServer : public Object {
void _camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far);
void _canvas_item_add_style_box(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector<float> &p_margins, const Color &p_modulate = Color(1, 1, 1));
- Array _get_array_from_surface(uint32_t p_format, PoolVector<uint8_t> p_vertex_data, int p_vertex_len, PoolVector<uint8_t> p_index_data, int p_index_len) const;
+ Array _get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const;
protected:
RID _make_test_cube();
@@ -58,7 +57,7 @@ protected:
RID white_texture;
RID test_material;
- Error _surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, PoolVector<uint8_t> &r_vertex_array, int p_vertex_array_len, PoolVector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb);
+ Error _surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, Vector<uint8_t> &r_vertex_array, int p_vertex_array_len, Vector<uint8_t> &r_index_array, int p_index_array_len, AABB &r_aabb, Vector<AABB> &r_bone_aabb);
static VisualServer *(*create_func)();
static void _bind_methods();
@@ -250,20 +249,20 @@ public:
PrimitiveType primitive = PRIMITIVE_MAX;
uint32_t format = 0;
- PoolVector<uint8_t> vertex_data;
+ Vector<uint8_t> vertex_data;
uint32_t vertex_count = 0;
- PoolVector<uint8_t> index_data;
+ Vector<uint8_t> index_data;
uint32_t index_count = 0;
AABB aabb;
struct LOD {
float edge_length;
- PoolVector<uint8_t> index_data;
+ Vector<uint8_t> index_data;
};
Vector<LOD> lods;
Vector<AABB> bone_aabbs;
- Vector<PoolVector<uint8_t> > blend_shapes;
+ Vector<Vector<uint8_t> > blend_shapes;
RID material;
};
@@ -294,7 +293,7 @@ public:
virtual void mesh_set_blend_shape_mode(RID p_mesh, BlendShapeMode p_mode) = 0;
virtual BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0;
- virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0;
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0;
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0;
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0;
@@ -334,8 +333,8 @@ public:
virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0;
virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0;
- virtual void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) = 0;
- virtual PoolVector<float> multimesh_get_buffer(RID p_multimesh) const = 0;
+ virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0;
+ virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0;
virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0;
virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0;
@@ -463,14 +462,14 @@ public:
virtual RID gi_probe_create() = 0;
- virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) = 0;
+ virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0;
virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0;
- virtual PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0;
- virtual PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0;
+ virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0;
+ virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0;
virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const = 0;
virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) = 0;
@@ -508,12 +507,12 @@ public:
virtual RID lightmap_capture_create() = 0;
virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) = 0;
virtual AABB lightmap_capture_get_bounds(RID p_capture) const = 0;
- virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) = 0;
+ virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) = 0;
virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) = 0;
virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const = 0;
virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) = 0;
virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const = 0;
- virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0;
+ virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0;
virtual void lightmap_capture_set_energy(RID p_capture, float p_energy) = 0;
virtual float lightmap_capture_get_energy(RID p_capture) const = 0;
@@ -753,7 +752,7 @@ public:
ENV_SSAO_BLUR_3x3,
};
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity2, float p_bias, float p_light_affect, float p_ao_channel_affect, EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0;
+ virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_bias, float p_light_affect, float p_ao_channel_affect, EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0;
enum EnvironmentSSAOQuality {
ENV_SSAO_QUALITY_LOW,
@@ -917,9 +916,9 @@ public:
CANVAS_ITEM_TEXTURE_FILTER_DEFAULT, //uses canvas item setting for draw command, uses global setting for canvas item
CANVAS_ITEM_TEXTURE_FILTER_NEAREST,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR,
- CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS,
+ CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS,
- CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC,
+ CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC,
CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC,
CANVAS_ITEM_TEXTURE_FILTER_MAX
};
@@ -1011,8 +1010,8 @@ public:
virtual void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) = 0;
virtual RID canvas_occluder_polygon_create() = 0;
- virtual void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) = 0;
- virtual void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) = 0;
+ virtual void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) = 0;
+ virtual void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) = 0;
enum CanvasOccluderPolygonCullMode {
CANVAS_OCCLUDER_POLYGON_CULL_DISABLED,
@@ -1082,7 +1081,7 @@ public:
virtual RID make_sphere_mesh(int p_lats, int p_lons, float p_radius);
virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data);
- virtual void mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes);
+ virtual void mesh_add_surface_from_planes(RID p_mesh, const Vector<Plane> &p_planes);
virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) = 0;
virtual void set_default_clear_color(const Color &p_color) = 0;
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 934d719ca6..2dbc29a3ba 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -9,9 +9,20 @@ Subcategories (`###` level) where needed are separated by a single empty line.
## assimp
- Upstream: http://github.com/assimp/assimp
-- Version: git (308db73d0b3c2d1870cd3e465eaa283692a4cf23)
+- Version: git (308db73d0b3c2d1870cd3e465eaa283692a4cf23, 2019)
- License: BSD-3-Clause
+Files extracted from upstream source:
+
+- Run `cmake .` in root folder to generate files
+- `code/{CApi,Common,FBX,Material,PostProcessing}/`
+- `contrib/utf8cpp/source/`
+- `include/`
+- `revision.h`
+- `CREDITS` and `LICENSE` files
+- `rm -f code/Common/ZipArchiveIOSystem.cpp include/assimp/ZipArchiveIOSystem.h
+ include/assimp/irrXMLWrapper.h`
+
## basis_universal
@@ -151,11 +162,21 @@ the GLES version Godot targets.
## glslang
- Upstream: https://github.com/KhronosGroup/glslang
-- Version: rev.3226
+- Version: git (4fc7a33910fb8e40b970d160e1b38ab3f67fe0f3, 2020)
- License: glslang
-Important: File `glslang/glslang/Include/Common.h` has
-Godot-made change marked with `// -- GODOT --` comments.
+Version should be kept in sync with the one of the used Vulkan SDK (see `vulkan`
+section). Check Vulkan-ValidationLayers at the matching SDK tag for the known
+good glslang commit: https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/scripts/known_good.json
+
+Files extracted from upstream source:
+
+- `glslang`, `OGLCompilersDLL`, `SPIRV`
+- `LICENSE.txt`
+- Unnecessary files like `CMakeLists.txt`, `revision.template` and
+ `updateGrammar` removed.
+
+Patches in the `patches` directory should be re-applied after updates.
## jpeg-compressor
@@ -281,7 +302,7 @@ changes are marked with `// -- GODOT --` comments.
## mbedtls
- Upstream: https://tls.mbed.org/
-- Version: 2.16.4
+- Version: 2.16.5
- License: Apache 2.0
File extracted from upstream release tarball (`-apache.tgz` variant):
@@ -291,9 +312,6 @@ File extracted from upstream release tarball (`-apache.tgz` variant):
- LICENSE and apache-2.0.txt files
- Applied the patch in `thirdparty/mbedtls/patches/1453.diff` (PR 1453).
Soon to be merged upstream. Check it out at next update.
-- Applied the patch in `thirdparty/mbedtls/patches/padlock.diff`. This disables VIA
- padlock support which defines a symbol `unsupported` which clashes with
- a symbol in libwebsockets.
- Added 2 files `godot_core_mbedtls_platform.{c,h}` providing configuration
for light bundling with core.
@@ -301,7 +319,7 @@ File extracted from upstream release tarball (`-apache.tgz` variant):
## miniupnpc
- Upstream: https://github.com/miniupnp/miniupnp/tree/master/miniupnpc
-- Version: git (0ab1d67, 2019)
+- Version: git (4436632, 2020)
- License: BSD-3-Clause
Files extracted from upstream source:
@@ -531,7 +549,7 @@ folder.
## vulkan
- Upstream: https://github.com/KhronosGroup/Vulkan-Loader
-- Version: 1.1.127
+- Version: sdk-1.2.131.2
- License: Apache 2.0
Unless there is a specific reason to package a more recent version, please stick
@@ -547,10 +565,11 @@ Files extracted from upstream source:
`loader/` folder
- `LICENSE.txt`
-`vk_enum_string_helper.h` is taken from the match `Vulkan-ValidationLayers` SDK
-release: https://github.com/KhronosGroup/Vulkan-Loader/tree/master/loader/generated
+`vk_enum_string_helper.h` is taken from the matching `Vulkan-ValidationLayers`
+SDK release: https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/layers/generated/vk_enum_string_helper.h
`vk_mem_alloc.h` is taken from https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
+Version: 2.3.0
## wslay
diff --git a/thirdparty/assimp/contrib/utf8cpp/doc/ReleaseNotes b/thirdparty/assimp/contrib/utf8cpp/doc/ReleaseNotes
deleted file mode 100644
index 364411a23d..0000000000
--- a/thirdparty/assimp/contrib/utf8cpp/doc/ReleaseNotes
+++ /dev/null
@@ -1,12 +0,0 @@
-utf8 cpp library
-Release 2.3.4
-
-A minor bug fix release. Thanks to all who reported bugs.
-
-Note: Version 2.3.3 contained a regression, and therefore was removed.
-
-Changes from version 2.3.2
-- Bug fix [39]: checked.h Line 273 and unchecked.h Line 182 have an extra ';'
-- Bug fix [36]: replace_invalid() only works with back_inserter
-
-Files included in the release: utf8.h, core.h, checked.h, unchecked.h, utf8cpp.html, ReleaseNotes
diff --git a/thirdparty/assimp/contrib/utf8cpp/doc/utf8cpp.html b/thirdparty/assimp/contrib/utf8cpp/doc/utf8cpp.html
deleted file mode 100644
index 6f2aacbe7b..0000000000
--- a/thirdparty/assimp/contrib/utf8cpp/doc/utf8cpp.html
+++ /dev/null
@@ -1,1789 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org">
- <meta name="description" content=
- "A simple, portable and lightweigt C++ library for easy handling of UTF-8 encoded strings">
- <meta name="keywords" content="UTF-8 C++ portable utf8 unicode generic templates">
- <meta name="author" content="Nemanja Trifunovic">
- <title>
- UTF8-CPP: UTF-8 with C++ in a Portable Way
- </title>
- <style type="text/css">
- <!--
- span.return_value {
- color: brown;
- }
- span.keyword {
- color: blue;
- }
- span.preprocessor {
- color: navy;
- }
- span.literal {
- color: olive;
- }
- span.comment {
- color: green;
- }
- code {
- font-weight: bold;
- }
- ul.toc {
- list-style-type: none;
- }
- p.version {
- font-size: small;
- font-style: italic;
- }
- -->
- </style>
- </head>
- <body>
- <h1>
- UTF8-CPP: UTF-8 with C++ in a Portable Way
- </h1>
- <p>
- <a href="https://sourceforge.net/projects/utfcpp">The Sourceforge project page</a>
- </p>
- <div id="toc">
- <h2>
- Table of Contents
- </h2>
- <ul class="toc">
- <li>
- <a href="#introduction">Introduction</a>
- </li>
- <li>
- <a href="#examples">Examples of Use</a>
- <ul class="toc">
- <li>
- <a href=#introsample>Introductionary Sample </a>
- </li>
- <li>
- <a href=#validfile>Checking if a file contains valid UTF-8 text</a>
- </li>
- <li>
- <a href=#fixinvalid>Ensure that a string contains valid UTF-8 text</a>
- </li>
- </ul>
- <li>
- <a href="#reference">Reference</a>
- <ul class="toc">
- <li>
- <a href="#funutf8">Functions From utf8 Namespace </a>
- </li>
- <li>
- <a href="#typesutf8">Types From utf8 Namespace </a>
- </li>
- <li>
- <a href="#fununchecked">Functions From utf8::unchecked Namespace </a>
- </li>
- <li>
- <a href="#typesunchecked">Types From utf8::unchecked Namespace </a>
- </li>
- </ul>
- </li>
- <li>
- <a href="#points">Points of Interest</a>
- </li>
- <li>
- <a href="#links">Links</a>
- </li>
- </ul>
- </div>
- <h2 id="introduction">
- Introduction
- </h2>
- <p>
- Many C++ developers miss an easy and portable way of handling Unicode encoded
- strings. The original C++ Standard (known as C++98 or C++03) is Unicode agnostic.
- C++11 provides some support for Unicode on core language and library level:
- u8, u, and U character and string literals, char16_t and char32_t character types,
- u16string and u32string library classes, and codecvt support for conversions
- between Unicode encoding forms.
- In the meantime, developers use third party libraries like ICU, OS specific capabilities, or simply
- roll out their own solutions.
- </p>
- <p>
- In order to easily handle UTF-8 encoded Unicode strings, I came up with a small
- generic library. For anybody used to work with STL algorithms and iterators, it should be
- easy and natural to use. The code is freely available for any purpose - check out
- the license at the beginning of the utf8.h file. If you run into
- bugs or performance issues, please let me know and I'll do my best to address them.
- </p>
- <p>
- The purpose of this article is not to offer an introduction to Unicode in general,
- and UTF-8 in particular. If you are not familiar with Unicode, be sure to check out
- <a href="http://www.unicode.org/">Unicode Home Page</a> or some other source of
- information for Unicode. Also, it is not my aim to advocate the use of UTF-8
- encoded strings in C++ programs; if you want to handle UTF-8 encoded strings from
- C++, I am sure you have good reasons for it.
- </p>
- <h2 id="examples">
- Examples of use
- </h2>
- <h3 id="introsample">
- Introductionary Sample
- </h3>
- <p>
- To illustrate the use of the library, let's start with a small but complete program
- that opens a file containing UTF-8 encoded text, reads it line by line, checks each line
- for invalid UTF-8 byte sequences, and converts it to UTF-16 encoding and back to UTF-8:
- </p>
-<pre>
-<span class="preprocessor">#include &lt;fstream&gt;</span>
-<span class="preprocessor">#include &lt;iostream&gt;</span>
-<span class="preprocessor">#include &lt;string&gt;</span>
-<span class="preprocessor">#include &lt;vector&gt;</span>
-<span class="preprocessor">#include "utf8.h"</span>
-<span class="keyword">using namespace</span> std;
-<span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">char</span>** argv)
-{
- <span class="keyword">if</span> (argc != <span class="literal">2</span>) {
- cout &lt;&lt; <span class="literal">"\nUsage: docsample filename\n"</span>;
- <span class="keyword">return</span> <span class="literal">0</span>;
- }
-
- <span class="keyword">const char</span>* test_file_path = argv[1];
- <span class="comment">// Open the test file (contains UTF-8 encoded text)</span>
- ifstream fs8(test_file_path);
- <span class="keyword">if</span> (!fs8.is_open()) {
- cout &lt;&lt; <span class=
-"literal">"Could not open "</span> &lt;&lt; test_file_path &lt;&lt; endl;
- <span class="keyword">return</span> <span class="literal">0</span>;
- }
-
- <span class="keyword">unsigned</span> line_count = <span class="literal">1</span>;
- string line;
- <span class="comment">// Play with all the lines in the file</span>
- <span class="keyword">while</span> (getline(fs8, line)) {
- <span class="comment">// check for invalid utf-8 (for a simple yes/no check, there is also utf8::is_valid function)</span>
- string::iterator end_it = utf8::find_invalid(line.begin(), line.end());
- <span class="keyword">if</span> (end_it != line.end()) {
- cout &lt;&lt; <span class=
-"literal">"Invalid UTF-8 encoding detected at line "</span> &lt;&lt; line_count &lt;&lt; <span
- class="literal">"\n"</span>;
- cout &lt;&lt; <span class=
-"literal">"This part is fine: "</span> &lt;&lt; string(line.begin(), end_it) &lt;&lt; <span
- class="literal">"\n"</span>;
- }
-
- <span class="comment">// Get the line length (at least for the valid part)</span>
- <span class="keyword">int</span> length = utf8::distance(line.begin(), end_it);
- cout &lt;&lt; <span class=
-"literal">"Length of line "</span> &lt;&lt; line_count &lt;&lt; <span class=
-"literal">" is "</span> &lt;&lt; length &lt;&lt; <span class="literal">"\n"</span>;
-
- <span class="comment">// Convert it to utf-16</span>
- vector&lt;unsigned short&gt; utf16line;
- utf8::utf8to16(line.begin(), end_it, back_inserter(utf16line));
-
- <span class="comment">// And back to utf-8</span>
- string utf8line;
- utf8::utf16to8(utf16line.begin(), utf16line.end(), back_inserter(utf8line));
-
- <span class="comment">// Confirm that the conversion went OK:</span>
- <span class="keyword">if</span> (utf8line != string(line.begin(), end_it))
- cout &lt;&lt; <span class=
-"literal">"Error in UTF-16 conversion at line: "</span> &lt;&lt; line_count &lt;&lt; <span
- class="literal">"\n"</span>;
-
- line_count++;
- }
- <span class="keyword">return</span> <span class="literal">0</span>;
-}
-</pre>
- <p>
- In the previous code sample, for each line we performed
- a detection of invalid UTF-8 sequences with <code>find_invalid</code>; the number
- of characters (more precisely - the number of Unicode code points, including the end
- of line and even BOM if there is one) in each line was
- determined with a use of <code>utf8::distance</code>; finally, we have converted
- each line to UTF-16 encoding with <code>utf8to16</code> and back to UTF-8 with
- <code>utf16to8</code>.
- </p>
- <h3 id="validfile">Checking if a file contains valid UTF-8 text</h3>
-<p>
-Here is a function that checks whether the content of a file is valid UTF-8 encoded text without
-reading the content into the memory:
-</p>
-<pre>
-<span class="keyword">bool</span> valid_utf8_file(i<span class="keyword">const char</span>* file_name)
-{
- ifstream ifs(file_name);
- <span class="keyword">if</span> (!ifs)
- <span class="keyword">return false</span>; <span class="comment">// even better, throw here</span>
-
- istreambuf_iterator&lt;<span class="keyword">char</span>&gt; it(ifs.rdbuf());
- istreambuf_iterator&lt;<span class="keyword">char</span>&gt; eos;
-
- <span class="keyword">return</span> utf8::is_valid(it, eos);
-}
-</pre>
-<p>
-Because the function <code>utf8::is_valid()</code> works with input iterators, we were able
-to pass an <code>istreambuf_iterator</code> to it and read the content of the file directly
-without loading it to the memory first.</p>
-<p>
-Note that other functions that take input iterator arguments can be used in a similar way. For
-instance, to read the content of a UTF-8 encoded text file and convert the text to UTF-16, just
-do something like:
-</p>
-<pre>
- utf8::utf8to16(it, eos, back_inserter(u16string));
-</pre>
- <h3 id="fixinvalid">Ensure that a string contains valid UTF-8 text</h3>
-<p>
-If we have some text that "probably" contains UTF-8 encoded text and we want to
-replace any invalid UTF-8 sequence with a replacement character, something like
-the following function may be used:
-</p>
-<pre>
-<span class="keyword">void</span> fix_utf8_string(std::string&amp; str)
-{
- std::string temp;
- utf8::replace_invalid(str.begin(), str.end(), back_inserter(temp));
- str = temp;
-}
-</pre>
-<p>The function will replace any invalid UTF-8 sequence with a Unicode replacement character.
-There is an overloaded function that enables the caller to supply their own replacement character.
-</p>
- <h2 id="reference">
- Reference
- </h2>
- <h3 id="funutf8">
- Functions From utf8 Namespace
- </h3>
- <h4>
- utf8::append
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Encodes a 32 bit code point as a UTF-8 sequence of octets and appends the sequence
- to a UTF-8 string.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-octet_iterator append(uint32_t cp, octet_iterator result);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an output iterator.<br>
- <code>cp</code>: a 32 bit integer representing a code point to append to the
- sequence.<br>
- <code>result</code>: an output iterator to the place in the sequence where to
- append the code point.<br>
- <span class="return_value">Return value</span>: an iterator pointing to the place
- after the newly appended sequence.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned char</span> u[<span class="literal">5</span>] = {<span
-class="literal">0</span>,<span class="literal">0</span>,<span class=
-"literal">0</span>,<span class="literal">0</span>,<span class="literal">0</span>};
-<span class="keyword">unsigned char</span>* end = append(<span class=
-"literal">0x0448</span>, u);
-assert (u[<span class="literal">0</span>] == <span class=
-"literal">0xd1</span> &amp;&amp; u[<span class="literal">1</span>] == <span class=
-"literal">0x88</span> &amp;&amp; u[<span class="literal">2</span>] == <span class=
-"literal">0</span> &amp;&amp; u[<span class="literal">3</span>] == <span class=
-"literal">0</span> &amp;&amp; u[<span class="literal">4</span>] == <span class=
-"literal">0</span>);
-</pre>
- <p>
- Note that <code>append</code> does not allocate any memory - it is the burden of
- the caller to make sure there is enough memory allocated for the operation. To make
- things more interesting, <code>append</code> can add anywhere between 1 and 4
- octets to the sequence. In practice, you would most often want to use
- <code>std::back_inserter</code> to ensure that the necessary memory is allocated.
- </p>
- <p>
- In case of an invalid code point, a <code>utf8::invalid_code_point</code> exception
- is thrown.
- </p>
- <h4>
- utf8::next
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Given the iterator to the beginning of the UTF-8 sequence, it returns the code
- point and moves the iterator to the next position.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t next(octet_iterator&amp; it, octet_iterator end);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>it</code>: a reference to an iterator pointing to the beginning of an UTF-8
- encoded code point. After the function returns, it is incremented to point to the
- beginning of the next code point.<br>
- <code>end</code>: end of the UTF-8 sequence to be processed. If <code>it</code>
- gets equal to <code>end</code> during the extraction of a code point, an
- <code>utf8::not_enough_room</code> exception is thrown.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- processed UTF-8 code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars;
-<span class="keyword">int</span> cp = next(w, twochars + <span class="literal">6</span>);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars + <span class="literal">3</span>);
-</pre>
- <p>
- This function is typically used to iterate through a UTF-8 encoded string.
- </p>
- <p>
- In case of an invalid UTF-8 seqence, a <code>utf8::invalid_utf8</code> exception is
- thrown.
- </p>
- <h4>
- utf8::peek_next
- </h4>
- <p class="version">
- Available in version 2.1 and later.
- </p>
- <p>
- Given the iterator to the beginning of the UTF-8 sequence, it returns the code
- point for the following sequence without changing the value of the iterator.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t peek_next(octet_iterator it, octet_iterator end);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>it</code>: an iterator pointing to the beginning of an UTF-8
- encoded code point.<br>
- <code>end</code>: end of the UTF-8 sequence to be processed. If <code>it</code>
- gets equal to <code>end</code> during the extraction of a code point, an
- <code>utf8::not_enough_room</code> exception is thrown.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- processed UTF-8 code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars;
-<span class="keyword">int</span> cp = peek_next(w, twochars + <span class="literal">6</span>);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- In case of an invalid UTF-8 seqence, a <code>utf8::invalid_utf8</code> exception is
- thrown.
- </p>
- <h4>
- utf8::prior
- </h4>
- <p class="version">
- Available in version 1.02 and later.
- </p>
- <p>
- Given a reference to an iterator pointing to an octet in a UTF-8 sequence, it
- decreases the iterator until it hits the beginning of the previous UTF-8 encoded
- code point and returns the 32 bits representation of the code point.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t prior(octet_iterator&amp; it, octet_iterator start);
-
-</pre>
- <p>
- <code>octet_iterator</code>: a bidirectional iterator.<br>
- <code>it</code>: a reference pointing to an octet within a UTF-8 encoded string.
- After the function returns, it is decremented to point to the beginning of the
- previous code point.<br>
- <code>start</code>: an iterator to the beginning of the sequence where the search
- for the beginning of a code point is performed. It is a
- safety measure to prevent passing the beginning of the string in the search for a
- UTF-8 lead octet.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- previous code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">unsigned char</span>* w = twochars + <span class=
-"literal">3</span>;
-<span class="keyword">int</span> cp = prior (w, twochars);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- This function has two purposes: one is two iterate backwards through a UTF-8
- encoded string. Note that it is usually a better idea to iterate forward instead,
- since <code>utf8::next</code> is faster. The second purpose is to find a beginning
- of a UTF-8 sequence if we have a random position within a string. Note that in that
- case <code>utf8::prior</code> may not detect an invalid UTF-8 sequence in some scenarios:
- for instance if there are superfluous trail octets, it will just skip them.
- </p>
- <p>
- <code>it</code> will typically point to the beginning of
- a code point, and <code>start</code> will point to the
- beginning of the string to ensure we don't go backwards too far. <code>it</code> is
- decreased until it points to a lead UTF-8 octet, and then the UTF-8 sequence
- beginning with that octet is decoded to a 32 bit representation and returned.
- </p>
- <p>
- In case <code>start</code> is reached before a UTF-8 lead octet is hit, or if an
- invalid UTF-8 sequence is started by the lead octet, an <code>invalid_utf8</code>
- exception is thrown.
- </p>
- <p>In case <code>start</code> equals <code>it</code>, a <code>not_enough_room</code>
- exception is thrown.
- <h4>
- utf8::previous
- </h4>
- <p class="version">
- Deprecated in version 1.02 and later.
- </p>
- <p>
- Given a reference to an iterator pointing to an octet in a UTF-8 seqence, it
- decreases the iterator until it hits the beginning of the previous UTF-8 encoded
- code point and returns the 32 bits representation of the code point.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t previous(octet_iterator&amp; it, octet_iterator pass_start);
-
-</pre>
- <p>
- <code>octet_iterator</code>: a random access iterator.<br>
- <code>it</code>: a reference pointing to an octet within a UTF-8 encoded string.
- After the function returns, it is decremented to point to the beginning of the
- previous code point.<br>
- <code>pass_start</code>: an iterator to the point in the sequence where the search
- for the beginning of a code point is aborted if no result was reached. It is a
- safety measure to prevent passing the beginning of the string in the search for a
- UTF-8 lead octet.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- previous code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">unsigned char</span>* w = twochars + <span class=
-"literal">3</span>;
-<span class="keyword">int</span> cp = previous (w, twochars - <span class=
-"literal">1</span>);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- <code>utf8::previous</code> is deprecated, and <code>utf8::prior</code> should
- be used instead, although the existing code can continue using this function.
- The problem is the parameter <code>pass_start</code> that points to the position
- just before the beginning of the sequence. Standard containers don't have the
- concept of "pass start" and the function can not be used with their iterators.
- </p>
- <p>
- <code>it</code> will typically point to the beginning of
- a code point, and <code>pass_start</code> will point to the octet just before the
- beginning of the string to ensure we don't go backwards too far. <code>it</code> is
- decreased until it points to a lead UTF-8 octet, and then the UTF-8 sequence
- beginning with that octet is decoded to a 32 bit representation and returned.
- </p>
- <p>
- In case <code>pass_start</code> is reached before a UTF-8 lead octet is hit, or if an
- invalid UTF-8 sequence is started by the lead octet, an <code>invalid_utf8</code>
- exception is thrown
- </p>
- <h4>
- utf8::advance
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Advances an iterator by the specified number of code points within an UTF-8
- sequence.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, typename distance_type&gt;
-<span class=
-"keyword">void</span> advance (octet_iterator&amp; it, distance_type n, octet_iterator end);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>distance_type</code>: an integral type convertible to <code>octet_iterator</code>'s difference type.<br>
- <code>it</code>: a reference to an iterator pointing to the beginning of an UTF-8
- encoded code point. After the function returns, it is incremented to point to the
- nth following code point.<br>
- <code>n</code>: a positive integer that shows how many code points we want to
- advance.<br>
- <code>end</code>: end of the UTF-8 sequence to be processed. If <code>it</code>
- gets equal to <code>end</code> during the extraction of a code point, an
- <code>utf8::not_enough_room</code> exception is thrown.<br>
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">unsigned char</span>* w = twochars;
-advance (w, <span class="literal">2</span>, twochars + <span class="literal">6</span>);
-assert (w == twochars + <span class="literal">5</span>);
-</pre>
- <p>
- This function works only "forward". In case of a negative <code>n</code>, there is
- no effect.
- </p>
- <p>
- In case of an invalid code point, a <code>utf8::invalid_code_point</code> exception
- is thrown.
- </p>
- <h4>
- utf8::distance
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Given the iterators to two UTF-8 encoded code points in a seqence, returns the
- number of code points between them.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-<span class=
-"keyword">typename</span> std::iterator_traits&lt;octet_iterator&gt;::difference_type distance (octet_iterator first, octet_iterator last);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>first</code>: an iterator to a beginning of a UTF-8 encoded code point.<br>
- <code>last</code>: an iterator to a "post-end" of the last UTF-8 encoded code
- point in the sequence we are trying to determine the length. It can be the
- beginning of a new code point, or not.<br>
- <span class="return_value">Return value</span> the distance between the iterators,
- in code points.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-size_t dist = utf8::distance(twochars, twochars + <span class="literal">5</span>);
-assert (dist == <span class="literal">2</span>);
-</pre>
- <p>
- This function is used to find the length (in code points) of a UTF-8 encoded
- string. The reason it is called <em>distance</em>, rather than, say,
- <em>length</em> is mainly because developers are used that <em>length</em> is an
- O(1) function. Computing the length of an UTF-8 string is a linear operation, and
- it looked better to model it after <code>std::distance</code> algorithm.
- </p>
- <p>
- In case of an invalid UTF-8 seqence, a <code>utf8::invalid_utf8</code> exception is
- thrown. If <code>last</code> does not point to the past-of-end of a UTF-8 seqence,
- a <code>utf8::not_enough_room</code> exception is thrown.
- </p>
- <h4>
- utf8::utf16to8
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-16 encoded string to UTF-8.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> u16bit_iterator, <span class=
-"keyword">typename</span> octet_iterator&gt;
-octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result);
-
-</pre>
- <p>
- <code>u16bit_iterator</code>: an input iterator.<br>
- <code>octet_iterator</code>: an output iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-16 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-16 encoded
- string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-8 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-8 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned short</span> utf16string[] = {<span class=
-"literal">0x41</span>, <span class="literal">0x0448</span>, <span class=
-"literal">0x65e5</span>, <span class="literal">0xd834</span>, <span class=
-"literal">0xdd1e</span>};
-vector&lt;<span class="keyword">unsigned char</span>&gt; utf8result;
-utf16to8(utf16string, utf16string + <span class=
-"literal">5</span>, back_inserter(utf8result));
-assert (utf8result.size() == <span class="literal">10</span>);
-</pre>
- <p>
- In case of invalid UTF-16 sequence, a <code>utf8::invalid_utf16</code> exception is
- thrown.
- </p>
- <h4>
- utf8::utf8to16
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts an UTF-8 encoded string to UTF-16
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> u16bit_iterator, typename octet_iterator&gt;
-u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>u16bit_iterator</code>: an output iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 encoded
- string to convert. &lt; br /&gt; <code>end</code>: an iterator pointing to
- pass-the-end of the UTF-8 encoded string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-16 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-16 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span> utf8_with_surrogates[] = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88\xf0\x9d\x84\x9e"</span>;
-vector &lt;<span class="keyword">unsigned short</span>&gt; utf16result;
-utf8to16(utf8_with_surrogates, utf8_with_surrogates + <span class=
-"literal">9</span>, back_inserter(utf16result));
-assert (utf16result.size() == <span class="literal">4</span>);
-assert (utf16result[<span class="literal">2</span>] == <span class=
-"literal">0xd834</span>);
-assert (utf16result[<span class="literal">3</span>] == <span class=
-"literal">0xdd1e</span>);
-</pre>
- <p>
- In case of an invalid UTF-8 seqence, a <code>utf8::invalid_utf8</code> exception is
- thrown. If <code>end</code> does not point to the past-of-end of a UTF-8 seqence, a
- <code>utf8::not_enough_room</code> exception is thrown.
- </p>
- <h4>
- utf8::utf32to8
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-32 encoded string to UTF-8.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, typename u32bit_iterator&gt;
-octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an output iterator.<br>
- <code>u32bit_iterator</code>: an input iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-32 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-32 encoded
- string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-8 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-8 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">int</span> utf32string[] = {<span class=
-"literal">0x448</span>, <span class="literal">0x65E5</span>, <span class=
-"literal">0x10346</span>, <span class="literal">0</span>};
-vector&lt;<span class="keyword">unsigned char</span>&gt; utf8result;
-utf32to8(utf32string, utf32string + <span class=
-"literal">3</span>, back_inserter(utf8result));
-assert (utf8result.size() == <span class="literal">9</span>);
-</pre>
- <p>
- In case of invalid UTF-32 string, a <code>utf8::invalid_code_point</code> exception
- is thrown.
- </p>
- <h4>
- utf8::utf8to32
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-8 encoded string to UTF-32.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, <span class=
-"keyword">typename</span> u32bit_iterator&gt;
-u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>u32bit_iterator</code>: an output iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-8 encoded string
- to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-32 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-32 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-vector&lt;<span class="keyword">int</span>&gt; utf32result;
-utf8to32(twochars, twochars + <span class=
-"literal">5</span>, back_inserter(utf32result));
-assert (utf32result.size() == <span class="literal">2</span>);
-</pre>
- <p>
- In case of an invalid UTF-8 seqence, a <code>utf8::invalid_utf8</code> exception is
- thrown. If <code>end</code> does not point to the past-of-end of a UTF-8 seqence, a
- <code>utf8::not_enough_room</code> exception is thrown.
- </p>
- <h4>
- utf8::find_invalid
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Detects an invalid sequence within a UTF-8 string.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-octet_iterator find_invalid(octet_iterator start, octet_iterator end);
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 string to
- test for validity.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-8 string to test
- for validity.<br>
- <span class="return_value">Return value</span>: an iterator pointing to the first
- invalid octet in the UTF-8 string. In case none were found, equals
- <code>end</code>.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span> utf_invalid[] = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88\xfa"</span>;
-<span class=
-"keyword">char</span>* invalid = find_invalid(utf_invalid, utf_invalid + <span class=
-"literal">6</span>);
-assert (invalid == utf_invalid + <span class="literal">5</span>);
-</pre>
- <p>
- This function is typically used to make sure a UTF-8 string is valid before
- processing it with other functions. It is especially important to call it if before
- doing any of the <em>unchecked</em> operations on it.
- </p>
- <h4>
- utf8::is_valid
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Checks whether a sequence of octets is a valid UTF-8 string.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-<span class="keyword">bool</span> is_valid(octet_iterator start, octet_iterator end);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 string to
- test for validity.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-8 string to test
- for validity.<br>
- <span class="return_value">Return value</span>: <code>true</code> if the sequence
- is a valid UTF-8 string; <code>false</code> if not.
- </p>
- Example of use:
-<pre>
-<span class="keyword">char</span> utf_invalid[] = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88\xfa"</span>;
-<span class="keyword">bool</span> bvalid = is_valid(utf_invalid, utf_invalid + <span
-class="literal">6</span>);
-assert (bvalid == false);
-</pre>
- <p>
- <code>is_valid</code> is a shorthand for <code>find_invalid(start, end) ==
- end;</code>. You may want to use it to make sure that a byte seqence is a valid
- UTF-8 string without the need to know where it fails if it is not valid.
- </p>
- <h4>
- utf8::replace_invalid
- </h4>
- <p class="version">
- Available in version 2.0 and later.
- </p>
- <p>
- Replaces all invalid UTF-8 sequences within a string with a replacement marker.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, <span class=
-"keyword">typename</span> output_iterator&gt;
-output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement);
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, <span class=
-"keyword">typename</span> output_iterator&gt;
-output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out);
-
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>output_iterator</code>: an output iterator.<br>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 string to
- look for invalid UTF-8 sequences.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-8 string to look
- for invalid UTF-8 sequences.<br>
- <code>out</code>: An output iterator to the range where the result of replacement
- is stored.<br>
- <code>replacement</code>: A Unicode code point for the replacement marker. The
- version without this parameter assumes the value <code>0xfffd</code><br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the UTF-8 string with replaced invalid sequences.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span> invalid_sequence[] = <span class=
-"literal">"a\x80\xe0\xa0\xc0\xaf\xed\xa0\x80z"</span>;
-vector&lt;<span class="keyword">char</span>&gt; replace_invalid_result;
-replace_invalid (invalid_sequence, invalid_sequence + sizeof(invalid_sequence), back_inserter(replace_invalid_result), <span
- class="literal">'?'</span>);
-bvalid = is_valid(replace_invalid_result.begin(), replace_invalid_result.end());
-assert (bvalid);
-<span class="keyword">char</span>* fixed_invalid_sequence = <span class=
-"literal">"a????z"</span>;
-assert (std::equal(replace_invalid_result.begin(), replace_invalid_result.end(), fixed_invalid_sequence));
-</pre>
- <p>
- <code>replace_invalid</code> does not perform in-place replacement of invalid
- sequences. Rather, it produces a copy of the original string with the invalid
- sequences replaced with a replacement marker. Therefore, <code>out</code> must not
- be in the <code>[start, end]</code> range.
- </p>
- <p>
- If <code>end</code> does not point to the past-of-end of a UTF-8 sequence, a
- <code>utf8::not_enough_room</code> exception is thrown.
- </p>
- <h4>
- utf8::starts_with_bom
- </h4>
- <p class="version">
- Available in version 2.3 and later. Relaces deprecated <code>is_bom()</code> function.
- </p>
- <p>
- Checks whether an octet sequence starts with a UTF-8 byte order mark (BOM)
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-<span class="keyword">bool</span> starts_with_bom (octet_iterator it, octet_iterator end);
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>it</code>: beginning of the octet sequence to check<br>
- <code>end</code>: pass-end of the sequence to check<br>
- <span class="return_value">Return value</span>: <code>true</code> if the sequence
- starts with a UTF-8 byte order mark; <code>false</code> if not.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned char</span> byte_order_mark[] = {<span class=
-"literal">0xef</span>, <span class="literal">0xbb</span>, <span class=
-"literal">0xbf</span>};
-<span class="keyword">bool</span> bbom = starts_with_bom(byte_order_mark, byte_order_mark + <span class="keyword">sizeof</span>(byte_order_mark));
-assert (bbom == <span class="literal">true</span>);
-</pre>
- <p>
- The typical use of this function is to check the first three bytes of a file. If
- they form the UTF-8 BOM, we want to skip them before processing the actual UTF-8
- encoded text.
- </p>
- <h4>
- utf8::is_bom
- </h4>
- <p class="version">
- Available in version 1.0 and later. Deprecated in version 2.3. <code>starts_with_bom()</code> should be used
- instead.
- </p>
- <p>
- Checks whether a sequence of three octets is a UTF-8 byte order mark (BOM)
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-<span class="keyword">bool</span> is_bom (octet_iterator it); <span class="comment"> // Deprecated</span>
-</pre>
- <p>
- <code>octet_iterator</code>: an input iterator.<br>
- <code>it</code>: beginning of the 3-octet sequence to check<br>
- <span class="return_value">Return value</span>: <code>true</code> if the sequence
- is UTF-8 byte order mark; <code>false</code> if not.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned char</span> byte_order_mark[] = {<span class=
-"literal">0xef</span>, <span class="literal">0xbb</span>, <span class=
-"literal">0xbf</span>};
-<span class="keyword">bool</span> bbom = is_bom(byte_order_mark);
-assert (bbom == <span class="literal">true</span>);
-</pre>
- <p>
- The typical use of this function is to check the first three bytes of a file. If
- they form the UTF-8 BOM, we want to skip them before processing the actual UTF-8
- encoded text.
- </p>
- <p>
- If a sequence is
- shorter than three bytes, an invalid iterator will be dereferenced. Therefore, this function is deprecated
- in favor of <code>starts_with_bom()</code>that takes the end of sequence as an argument.
- </p>
- <h3 id="typesutf8">
- Types From utf8 Namespace
- </h3>
- <h4>utf8::exception
- </h4>
- <p class="version">
- Available in version 2.3 and later.
- </p>
- <p>
- Base class for the exceptions thrown by UTF CPP library functions.
- </p>
-<pre>
-<span class="keyword">class</span> exception : <span class="keyword">public</span> std::exception {};
-</pre>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">try</span> {
- code_that_uses_utf_cpp_library();
-}
-<span class="keyword">catch</span>(<span class="keyword">const</span> utf8::exception&amp; utfcpp_ex) {
- cerr &lt;&lt; utfcpp_ex.what();
-}
-</pre>
-
- <h4>utf8::invalid_code_point
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Thrown by UTF8 CPP functions such as <code>advance</code> and <code>next</code> if an UTF-8 sequence represents and invalid code point.
- </p>
-
-<pre>
-<span class="keyword">class</span> invalid_code_point : <span class="keyword">public</span> exception {
-<span class="keyword">public</span>:
- uint32_t code_point() <span class="keyword">const</span>;
-};
-
-</pre>
- <p>
- Member function <code>code_point()</code> can be used to determine the invalid code point that
- caused the exception to be thrown.
- </p>
- <h4>utf8::invalid_utf8
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Thrown by UTF8 CPP functions such as <code>next</code> and <code>prior</code> if an invalid UTF-8 sequence
- is detected during decoding.
- </p>
-
-<pre>
-<span class="keyword">class</span> invalid_utf8 : <span class="keyword">public</span> exception {
-<span class="keyword">public</span>:
- uint8_t utf8_octet() <span class="keyword">const</span>;
-};
-</pre>
-
- <p>
- Member function <code>utf8_octet()</code> can be used to determine the beginning of the byte
- sequence that caused the exception to be thrown.
- </p>
-</pre>
- <h4>utf8::invalid_utf16
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Thrown by UTF8 CPP function <code>utf16to8</code> if an invalid UTF-16 sequence
- is detected during decoding.
- </p>
-
-<pre>
-<span class="keyword">class</span> invalid_utf16 : <span class="keyword">public</span> exception {
-<span class="keyword">public</span>:
- uint16_t utf16_word() <span class="keyword">const</span>;
-};
-</pre>
-
- <p>
- Member function <code>utf16_word()</code> can be used to determine the UTF-16 code unit
- that caused the exception to be thrown.
- </p>
- <h4>utf8::not_enough_room
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Thrown by UTF8 CPP functions such as <code>next</code> if the end of the decoded UTF-8 sequence
- was reached before the code point was decoded.
- </p>
-
-<pre>
-<span class="keyword">class</span> not_enough_room : <span class="keyword">public</span> exception {};
-</pre>
- <h4>
- utf8::iterator
- </h4>
- <p class="version">
- Available in version 2.0 and later.
- </p>
- <p>
- Adapts the underlying octet iterator to iterate over the sequence of code points,
- rather than raw octets.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class="keyword">typename</span> octet_iterator&gt;
-<span class="keyword">class</span> iterator;
-</pre>
-
- <h5>Member functions</h5>
- <dl>
- <dt><code>iterator();</code> <dd> the deafult constructor; the underlying <code>octet_iterator</code> is
- constructed with its default constructor.
- <dt><code><span class="keyword">explicit</span> iterator (const octet_iterator&amp; octet_it,
- const octet_iterator&amp; range_start,
- const octet_iterator&amp; range_end);</code> <dd> a constructor
- that initializes the underlying <code>octet_iterator</code> with <code>octet_it</code>
- and sets the range in which the iterator is considered valid.
- <dt><code>octet_iterator base () <span class="keyword">const</span>;</code> <dd> returns the
- underlying <code>octet_iterator</code>.
- <dt><code>uint32_t operator * () <span class="keyword">const</span>;</code> <dd> decodes the utf-8 sequence
- the underlying <code>octet_iterator</code> is pointing to and returns the code point.
- <dt><code><span class="keyword">bool operator</span> == (const iterator&amp; rhs)
- <span class="keyword">const</span>;</code> <dd> returns <span class="keyword">true</span>
- if the two underlaying iterators are equal.
- <dt><code><span class="keyword">bool operator</span> != (const iterator&amp; rhs)
- <span class="keyword">const</span>;</code> <dd> returns <span class="keyword">true</span>
- if the two underlaying iterators are not equal.
- <dt><code>iterator&amp; <span class="keyword">operator</span> ++ (); </code> <dd> the prefix increment - moves
- the iterator to the next UTF-8 encoded code point.
- <dt><code>iterator <span class="keyword">operator</span> ++ (<span class="keyword">int</span>); </code> <dd>
- the postfix increment - moves the iterator to the next UTF-8 encoded code point and returns the current one.
- <dt><code>iterator&amp; <span class="keyword">operator</span> -- (); </code> <dd> the prefix decrement - moves
- the iterator to the previous UTF-8 encoded code point.
- <dt><code>iterator <span class="keyword">operator</span> -- (<span class="keyword">int</span>); </code> <dd>
- the postfix decrement - moves the iterator to the previous UTF-8 encoded code point and returns the current one.
- </dl>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* threechars = <span class="literal">"\xf0\x90\x8d\x86\xe6\x97\xa5\xd1\x88"</span>;
-utf8::iterator&lt;<span class="keyword">char</span>*&gt; it(threechars, threechars, threechars + <span class="literal">9</span>);
-utf8::iterator&lt;<span class="keyword">char</span>*&gt; it2 = it;
-assert (it2 == it);
-assert (*it == <span class="literal">0x10346</span>);
-assert (*(++it) == <span class="literal">0x65e5</span>);
-assert ((*it++) == <span class="literal">0x65e5</span>);
-assert (*it == <span class="literal">0x0448</span>);
-assert (it != it2);
-utf8::iterator&lt;<span class="keyword">char</span>*&gt; endit (threechars + <span class="literal">9</span>, threechars, threechars + <span class="literal">9</span>);
-assert (++it == endit);
-assert (*(--it) == <span class="literal">0x0448</span>);
-assert ((*it--) == <span class="literal">0x0448</span>);
-assert (*it == <span class="literal">0x65e5</span>);
-assert (--it == utf8::iterator&lt;<span class="keyword">char</span>*&gt;(threechars, threechars, threechars + <span class="literal">9</span>));
-assert (*it == <span class="literal">0x10346</span>);
-</pre>
- <p>
- The purpose of <code>utf8::iterator</code> adapter is to enable easy iteration as well as the use of STL
- algorithms with UTF-8 encoded strings. Increment and decrement operators are implemented in terms of
- <code>utf8::next()</code> and <code>utf8::prior()</code> functions.
- </p>
- <p>
- Note that <code>utf8::iterator</code> adapter is a checked iterator. It operates on the range specified in
- the constructor; any attempt to go out of that range will result in an exception. Even the comparison operators
- require both iterator object to be constructed against the same range - otherwise an exception is thrown. Typically,
- the range will be determined by sequence container functions <code>begin</code> and <code>end</code>, i.e.:
- </p>
-<pre>
-std::string s = <span class="literal">"example"</span>;
-utf8::iterator i (s.begin(), s.begin(), s.end());
-</pre>
- <h3 id="fununchecked">
- Functions From utf8::unchecked Namespace
- </h3>
- <h4>
- utf8::unchecked::append
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Encodes a 32 bit code point as a UTF-8 sequence of octets and appends the sequence
- to a UTF-8 string.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-octet_iterator append(uint32_t cp, octet_iterator result);
-
-</pre>
- <p>
- <code>cp</code>: A 32 bit integer representing a code point to append to the
- sequence.<br>
- <code>result</code>: An output iterator to the place in the sequence where to
- append the code point.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the newly appended sequence.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned char</span> u[<span class="literal">5</span>] = {<span
-class="literal">0</span>,<span class="literal">0</span>,<span class=
-"literal">0</span>,<span class="literal">0</span>,<span class="literal">0</span>};
-<span class="keyword">unsigned char</span>* end = unchecked::append(<span class=
-"literal">0x0448</span>, u);
-assert (u[<span class="literal">0</span>] == <span class=
-"literal">0xd1</span> &amp;&amp; u[<span class="literal">1</span>] == <span class=
-"literal">0x88</span> &amp;&amp; u[<span class="literal">2</span>] == <span class=
-"literal">0</span> &amp;&amp; u[<span class="literal">3</span>] == <span class=
-"literal">0</span> &amp;&amp; u[<span class="literal">4</span>] == <span class=
-"literal">0</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::append</code>. It does not
- check for validity of the supplied code point, and may produce an invalid UTF-8
- sequence.
- </p>
- <h4>
- utf8::unchecked::next
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Given the iterator to the beginning of a UTF-8 sequence, it returns the code point
- and moves the iterator to the next position.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t next(octet_iterator&amp; it);
-
-</pre>
- <p>
- <code>it</code>: a reference to an iterator pointing to the beginning of an UTF-8
- encoded code point. After the function returns, it is incremented to point to the
- beginning of the next code point.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- processed UTF-8 code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars;
-<span class="keyword">int</span> cp = unchecked::next(w);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars + <span class="literal">3</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::next</code>. It does not
- check for validity of the supplied UTF-8 sequence.
- </p>
- <h4>
- utf8::unchecked::peek_next
- </h4>
- <p class="version">
- Available in version 2.1 and later.
- </p>
- <p>
- Given the iterator to the beginning of a UTF-8 sequence, it returns the code point.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t peek_next(octet_iterator it);
-
-</pre>
- <p>
- <code>it</code>: an iterator pointing to the beginning of an UTF-8
- encoded code point.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- processed UTF-8 code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars;
-<span class="keyword">int</span> cp = unchecked::peek_next(w);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::peek_next</code>. It does not
- check for validity of the supplied UTF-8 sequence.
- </p>
- <h4>
- utf8::unchecked::prior
- </h4>
- <p class="version">
- Available in version 1.02 and later.
- </p>
- <p>
- Given a reference to an iterator pointing to an octet in a UTF-8 seqence, it
- decreases the iterator until it hits the beginning of the previous UTF-8 encoded
- code point and returns the 32 bits representation of the code point.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t prior(octet_iterator&amp; it);
-
-</pre>
- <p>
- <code>it</code>: a reference pointing to an octet within a UTF-8 encoded string.
- After the function returns, it is decremented to point to the beginning of the
- previous code point.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- previous code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars + <span class="literal">3</span>;
-<span class="keyword">int</span> cp = unchecked::prior (w);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::prior</code>. It does not
- check for validity of the supplied UTF-8 sequence and offers no boundary checking.
- </p>
- <h4>
- utf8::unchecked::previous (deprecated, see utf8::unchecked::prior)
- </h4>
- <p class="version">
- Deprecated in version 1.02 and later.
- </p>
- <p>
- Given a reference to an iterator pointing to an octet in a UTF-8 seqence, it
- decreases the iterator until it hits the beginning of the previous UTF-8 encoded
- code point and returns the 32 bits representation of the code point.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-uint32_t previous(octet_iterator&amp; it);
-
-</pre>
- <p>
- <code>it</code>: a reference pointing to an octet within a UTF-8 encoded string.
- After the function returns, it is decremented to point to the beginning of the
- previous code point.<br>
- <span class="return_value">Return value</span>: the 32 bit representation of the
- previous code point.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars + <span class="literal">3</span>;
-<span class="keyword">int</span> cp = unchecked::previous (w);
-assert (cp == <span class="literal">0x65e5</span>);
-assert (w == twochars);
-</pre>
- <p>
- The reason this function is deprecated is just the consistency with the "checked"
- versions, where <code>prior</code> should be used instead of <code>previous</code>.
- In fact, <code>unchecked::previous</code> behaves exactly the same as <code>
- unchecked::prior</code>
- </p>
- <p>
- This is a faster but less safe version of <code>utf8::previous</code>. It does not
- check for validity of the supplied UTF-8 sequence and offers no boundary checking.
- </p>
- <h4>
- utf8::unchecked::advance
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Advances an iterator by the specified number of code points within an UTF-8
- sequence.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, typename distance_type&gt;
-<span class="keyword">void</span> advance (octet_iterator&amp; it, distance_type n);
-
-</pre>
- <p>
- <code>it</code>: a reference to an iterator pointing to the beginning of an UTF-8
- encoded code point. After the function returns, it is incremented to point to the
- nth following code point.<br>
- <code>n</code>: a positive integer that shows how many code points we want to
- advance.<br>
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-<span class="keyword">char</span>* w = twochars;
-unchecked::advance (w, <span class="literal">2</span>);
-assert (w == twochars + <span class="literal">5</span>);
-</pre>
- <p>
- This function works only "forward". In case of a negative <code>n</code>, there is
- no effect.
- </p>
- <p>
- This is a faster but less safe version of <code>utf8::advance</code>. It does not
- check for validity of the supplied UTF-8 sequence and offers no boundary checking.
- </p>
- <h4>
- utf8::unchecked::distance
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Given the iterators to two UTF-8 encoded code points in a seqence, returns the
- number of code points between them.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator&gt;
-<span class=
-"keyword">typename</span> std::iterator_traits&lt;octet_iterator&gt;::difference_type distance (octet_iterator first, octet_iterator last);
-</pre>
- <p>
- <code>first</code>: an iterator to a beginning of a UTF-8 encoded code point.<br>
- <code>last</code>: an iterator to a "post-end" of the last UTF-8 encoded code
- point in the sequence we are trying to determine the length. It can be the
- beginning of a new code point, or not.<br>
- <span class="return_value">Return value</span> the distance between the iterators,
- in code points.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-size_t dist = utf8::unchecked::distance(twochars, twochars + <span class=
-"literal">5</span>);
-assert (dist == <span class="literal">2</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::distance</code>. It does not
- check for validity of the supplied UTF-8 sequence.
- </p>
- <h4>
- utf8::unchecked::utf16to8
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-16 encoded string to UTF-8.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> u16bit_iterator, <span class=
-"keyword">typename</span> octet_iterator&gt;
-octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result);
-
-</pre>
- <p>
- <code>start</code>: an iterator pointing to the beginning of the UTF-16 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-16 encoded
- string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-8 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-8 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">unsigned short</span> utf16string[] = {<span class=
-"literal">0x41</span>, <span class="literal">0x0448</span>, <span class=
-"literal">0x65e5</span>, <span class="literal">0xd834</span>, <span class=
-"literal">0xdd1e</span>};
-vector&lt;<span class="keyword">unsigned char</span>&gt; utf8result;
-unchecked::utf16to8(utf16string, utf16string + <span class=
-"literal">5</span>, back_inserter(utf8result));
-assert (utf8result.size() == <span class="literal">10</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::utf16to8</code>. It does not
- check for validity of the supplied UTF-16 sequence.
- </p>
- <h4>
- utf8::unchecked::utf8to16
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts an UTF-8 encoded string to UTF-16
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> u16bit_iterator, typename octet_iterator&gt;
-u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result);
-
-</pre>
- <p>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 encoded
- string to convert. &lt; br /&gt; <code>end</code>: an iterator pointing to
- pass-the-end of the UTF-8 encoded string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-16 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-16 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span> utf8_with_surrogates[] = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88\xf0\x9d\x84\x9e"</span>;
-vector &lt;<span class="keyword">unsigned short</span>&gt; utf16result;
-unchecked::utf8to16(utf8_with_surrogates, utf8_with_surrogates + <span class=
-"literal">9</span>, back_inserter(utf16result));
-assert (utf16result.size() == <span class="literal">4</span>);
-assert (utf16result[<span class="literal">2</span>] == <span class=
-"literal">0xd834</span>);
-assert (utf16result[<span class="literal">3</span>] == <span class=
-"literal">0xdd1e</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::utf8to16</code>. It does not
- check for validity of the supplied UTF-8 sequence.
- </p>
- <h4>
- utf8::unchecked::utf32to8
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-32 encoded string to UTF-8.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, <span class=
-"keyword">typename</span> u32bit_iterator&gt;
-octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result);
-
-</pre>
- <p>
- <code>start</code>: an iterator pointing to the beginning of the UTF-32 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-32 encoded
- string to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-8 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-8 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">int</span> utf32string[] = {<span class=
-"literal">0x448</span>, <span class="literal">0x65e5</span>, <span class=
-"literal">0x10346</span>, <span class="literal">0</span>};
-vector&lt;<span class="keyword">unsigned char</span>&gt; utf8result;
-utf32to8(utf32string, utf32string + <span class=
-"literal">3</span>, back_inserter(utf8result));
-assert (utf8result.size() == <span class="literal">9</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::utf32to8</code>. It does not
- check for validity of the supplied UTF-32 sequence.
- </p>
- <h4>
- utf8::unchecked::utf8to32
- </h4>
- <p class="version">
- Available in version 1.0 and later.
- </p>
- <p>
- Converts a UTF-8 encoded string to UTF-32.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class=
-"keyword">typename</span> octet_iterator, typename u32bit_iterator&gt;
-u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result);
-
-</pre>
- <p>
- <code>start</code>: an iterator pointing to the beginning of the UTF-8 encoded
- string to convert.<br>
- <code>end</code>: an iterator pointing to pass-the-end of the UTF-8 encoded string
- to convert.<br>
- <code>result</code>: an output iterator to the place in the UTF-32 string where to
- append the result of conversion.<br>
- <span class="return_value">Return value</span>: An iterator pointing to the place
- after the appended UTF-32 string.
- </p>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* twochars = <span class=
-"literal">"\xe6\x97\xa5\xd1\x88"</span>;
-vector&lt;<span class="keyword">int</span>&gt; utf32result;
-unchecked::utf8to32(twochars, twochars + <span class=
-"literal">5</span>, back_inserter(utf32result));
-assert (utf32result.size() == <span class="literal">2</span>);
-</pre>
- <p>
- This is a faster but less safe version of <code>utf8::utf8to32</code>. It does not
- check for validity of the supplied UTF-8 sequence.
- </p>
- <h3 id="typesunchecked">
- Types From utf8::unchecked Namespace
- </h3>
- <h4>
- utf8::iterator
- </h4>
- <p class="version">
- Available in version 2.0 and later.
- </p>
- <p>
- Adapts the underlying octet iterator to iterate over the sequence of code points,
- rather than raw octets.
- </p>
-<pre>
-<span class="keyword">template</span> &lt;<span class="keyword">typename</span> octet_iterator&gt;
-<span class="keyword">class</span> iterator;
-</pre>
-
- <h5>Member functions</h5>
- <dl>
- <dt><code>iterator();</code> <dd> the deafult constructor; the underlying <code>octet_iterator</code> is
- constructed with its default constructor.
- <dt><code><span class="keyword">explicit</span> iterator (const octet_iterator&amp; octet_it);
- </code> <dd> a constructor
- that initializes the underlying <code>octet_iterator</code> with <code>octet_it</code>
- <dt><code>octet_iterator base () <span class="keyword">const</span>;</code> <dd> returns the
- underlying <code>octet_iterator</code>.
- <dt><code>uint32_t operator * () <span class="keyword">const</span>;</code> <dd> decodes the utf-8 sequence
- the underlying <code>octet_iterator</code> is pointing to and returns the code point.
- <dt><code><span class="keyword">bool operator</span> == (const iterator&amp; rhs)
- <span class="keyword">const</span>;</code> <dd> returns <span class="keyword">true</span>
- if the two underlaying iterators are equal.
- <dt><code><span class="keyword">bool operator</span> != (const iterator&amp; rhs)
- <span class="keyword">const</span>;</code> <dd> returns <span class="keyword">true</span>
- if the two underlaying iterators are not equal.
- <dt><code>iterator&amp; <span class="keyword">operator</span> ++ (); </code> <dd> the prefix increment - moves
- the iterator to the next UTF-8 encoded code point.
- <dt><code>iterator <span class="keyword">operator</span> ++ (<span class="keyword">int</span>); </code> <dd>
- the postfix increment - moves the iterator to the next UTF-8 encoded code point and returns the current one.
- <dt><code>iterator&amp; <span class="keyword">operator</span> -- (); </code> <dd> the prefix decrement - moves
- the iterator to the previous UTF-8 encoded code point.
- <dt><code>iterator <span class="keyword">operator</span> -- (<span class="keyword">int</span>); </code> <dd>
- the postfix decrement - moves the iterator to the previous UTF-8 encoded code point and returns the current one.
- </dl>
- <p>
- Example of use:
- </p>
-<pre>
-<span class="keyword">char</span>* threechars = <span class="literal">"\xf0\x90\x8d\x86\xe6\x97\xa5\xd1\x88"</span>;
-utf8::unchecked::iterator&lt;<span class="keyword">char</span>*&gt; un_it(threechars);
-utf8::unchecked::iterator&lt;<span class="keyword">char</span>*&gt; un_it2 = un_it;
-assert (un_it2 == un_it);
-assert (*un_it == <span class="literal">0x10346</span>);
-assert (*(++un_it) == <span class="literal">0x65e5</span>);
-assert ((*un_it++) == <span class="literal">0x65e5</span>);
-assert (*un_it == <span class="literal">0x0448</span>);
-assert (un_it != un_it2);
-utf8::::unchecked::iterator&lt;<span class="keyword">char</span>*&gt; un_endit (threechars + <span class="literal">9</span>);
-assert (++un_it == un_endit);
-assert (*(--un_it) == <span class="literal">0x0448</span>);
-assert ((*un_it--) == <span class="literal">0x0448</span>);
-assert (*un_it == <span class="literal">0x65e5</span>);
-assert (--un_it == utf8::unchecked::iterator&lt;<span class="keyword">char</span>*&gt;(threechars));
-assert (*un_it == <span class="literal">0x10346</span>);
-</pre>
- <p>
- This is an unchecked version of <code>utf8::iterator</code>. It is faster in many cases, but offers
- no validity or range checks.
- </p>
- <h2 id="points">
- Points of interest
- </h2>
- <h4>
- Design goals and decisions
- </h4>
- <p>
- The library was designed to be:
- </p>
- <ol>
- <li>
- Generic: for better or worse, there are many C++ string classes out there, and
- the library should work with as many of them as possible.
- </li>
- <li>
- Portable: the library should be portable both accross different platforms and
- compilers. The only non-portable code is a small section that declares unsigned
- integers of different sizes: three typedefs. They can be changed by the users of
- the library if they don't match their platform. The default setting should work
- for Windows (both 32 and 64 bit), and most 32 bit and 64 bit Unix derivatives.
- </li>
- <li>
- Lightweight: follow the "pay only for what you use" guideline.
- </li>
- <li>
- Unintrusive: avoid forcing any particular design or even programming style on the
- user. This is a library, not a framework.
- </li>
- </ol>
- <h4>
- Alternatives
- </h4>
- <p>
- In case you want to look into other means of working with UTF-8 strings from C++,
- here is the list of solutions I am aware of:
- </p>
- <ol>
- <li>
- <a href="http://icu.sourceforge.net/">ICU Library</a>. It is very powerful,
- complete, feature-rich, mature, and widely used. Also big, intrusive,
- non-generic, and doesn't play well with the Standard Library. I definitelly
- recommend looking at ICU even if you don't plan to use it.
- </li>
- <li>
- C++11 language and library features. Still far from complete, and not widely
- supported by compiler vendors.
- </li>
- <li>
- <a href=
- "http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch03s04.html">Glib::ustring</a>.
- A class specifically made to work with UTF-8 strings, and also feel like
- <code>std::string</code>. If you prefer to have yet another string class in your
- code, it may be worth a look. Be aware of the licensing issues, though.
- </li>
- <li>
- Platform dependent solutions: Windows and POSIX have functions to convert strings
- from one encoding to another. That is only a subset of what my library offers,
- but if that is all you need it may be good enough.
- </li>
- </ol>
- <h2 id="links">
- Links
- </h2>
- <ol>
- <li>
- <a href="http://www.unicode.org/">The Unicode Consortium</a>.
- </li>
- <li>
- <a href="http://icu.sourceforge.net/">ICU Library</a>.
- </li>
- <li>
- <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8 at Wikipedia</a>
- </li>
- <li>
- <a href="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ for
- Unix/Linux</a>
- </li>
- </ol>
- </body>
-</html>
diff --git a/thirdparty/assimp/assimp/config.h b/thirdparty/assimp/include/assimp/config.h
index d0e4817349..48d61941ad 100644
--- a/thirdparty/assimp/assimp/config.h
+++ b/thirdparty/assimp/include/assimp/config.h
@@ -60,6 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_CONFIG_H_INC
#define AI_CONFIG_H_INC
+
// ###########################################################################
// LIBRARY SETTINGS
// General, global settings
@@ -75,8 +76,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Property type: bool. Default value: false.
*/
-#define AI_CONFIG_GLOB_MEASURE_TIME \
- "GLOB_MEASURE_TIME"
+#define AI_CONFIG_GLOB_MEASURE_TIME \
+ "GLOB_MEASURE_TIME"
+
// ---------------------------------------------------------------------------
/** @brief Global setting to disable generation of skeleton dummy meshes
@@ -87,9 +89,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// ---------------------------------------------------------------------------
#define AI_CONFIG_IMPORT_NO_SKELETON_MESHES \
- "IMPORT_NO_SKELETON_MESHES"
+ "IMPORT_NO_SKELETON_MESHES"
+
-#if 0 // not implemented yet
+
+# if 0 // not implemented yet
// ---------------------------------------------------------------------------
/** @brief Set Assimp's multithreading policy.
*
@@ -105,8 +109,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* For more information, see the @link threading Threading page@endlink.
* Property type: int, default value: -1.
*/
-#define AI_CONFIG_GLOB_MULTITHREADING \
- "GLOB_MULTITHREADING"
+#define AI_CONFIG_GLOB_MULTITHREADING \
+ "GLOB_MULTITHREADING"
#endif
// ###########################################################################
@@ -114,6 +118,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Various stuff to fine-tune the behavior of a specific post processing step.
// ###########################################################################
+
// ---------------------------------------------------------------------------
/** @brief Maximum bone count per mesh for the SplitbyBoneCount step.
*
@@ -124,13 +129,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// ---------------------------------------------------------------------------
#define AI_CONFIG_PP_SBBC_MAX_BONES \
- "PP_SBBC_MAX_BONES"
+ "PP_SBBC_MAX_BONES"
+
// default limit for bone count
#if (!defined AI_SBBC_DEFAULT_MAX_BONES)
-#define AI_SBBC_DEFAULT_MAX_BONES 60
+# define AI_SBBC_DEFAULT_MAX_BONES 60
#endif
+
// ---------------------------------------------------------------------------
/** @brief Specifies the maximum angle that may be between two vertex tangents
* that their tangents and bi-tangents are smoothed.
@@ -140,7 +147,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Property type: float. Default value: 45 degrees
*/
#define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \
- "PP_CT_MAX_SMOOTHING_ANGLE"
+ "PP_CT_MAX_SMOOTHING_ANGLE"
// ---------------------------------------------------------------------------
/** @brief Source UV channel for tangent space computation.
@@ -150,7 +157,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// ---------------------------------------------------------------------------
#define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \
- "PP_CT_TEXTURE_CHANNEL_INDEX"
+ "PP_CT_TEXTURE_CHANNEL_INDEX"
// ---------------------------------------------------------------------------
/** @brief Specifies the maximum angle that may be between two face normals
@@ -165,7 +172,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* the output quality may be reduced.
*/
#define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \
- "PP_GSN_MAX_SMOOTHING_ANGLE"
+ "PP_GSN_MAX_SMOOTHING_ANGLE"
+
// ---------------------------------------------------------------------------
/** @brief Sets the colormap (= palette) to be used to decode embedded
@@ -177,8 +185,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* a default palette (from Quake 1) is used.
* Property type: string.
*/
-#define AI_CONFIG_IMPORT_MDL_COLORMAP \
- "IMPORT_MDL_COLORMAP"
+#define AI_CONFIG_IMPORT_MDL_COLORMAP \
+ "IMPORT_MDL_COLORMAP"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_RemoveRedundantMaterials step to
@@ -199,8 +207,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note Linefeeds, tabs or carriage returns are treated as whitespace.
* Material names are case sensitive.
*/
-#define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
- "PP_RRM_EXCLUDE_LIST"
+#define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
+ "PP_RRM_EXCLUDE_LIST"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to
@@ -214,8 +222,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* any transformations.
* Property type: bool. Default value: false.
*/
-#define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
- "PP_PTV_KEEP_HIERARCHY"
+#define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
+ "PP_PTV_KEEP_HIERARCHY"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to normalize
@@ -224,8 +232,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* meshes are scaled appropriately (uniformly of course!).
* This might be useful if you don't know the spatial dimension of the input
* data*/
-#define AI_CONFIG_PP_PTV_NORMALIZE \
- "PP_PTV_NORMALIZE"
+#define AI_CONFIG_PP_PTV_NORMALIZE \
+ "PP_PTV_NORMALIZE"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to use
@@ -233,8 +241,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* transforming vertices.
* Property type: bool. Default value: false.
*/
-#define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \
- "PP_PTV_ADD_ROOT_TRANSFORMATION"
+#define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \
+ "PP_PTV_ADD_ROOT_TRANSFORMATION"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to use
@@ -243,8 +251,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* of the transformation matrix.
* Property type: aiMatrix4x4.
*/
-#define AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION \
- "PP_PTV_ROOT_TRANSFORMATION"
+#define AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION \
+ "PP_PTV_ROOT_TRANSFORMATION"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_FindDegenerates step to
@@ -257,7 +265,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Property type: bool. Default value: false.
*/
#define AI_CONFIG_PP_FD_REMOVE \
- "PP_FD_REMOVE"
+ "PP_FD_REMOVE"
// ---------------------------------------------------------------------------
/**
@@ -266,7 +274,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* be removed if #AI_CONFIG_PP_FD_REMOVE is set to true.
*/
#define AI_CONFIG_PP_FD_CHECKAREA \
- "PP_FD_CHECKAREA"
+ "PP_FD_CHECKAREA"
// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
@@ -286,8 +294,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note Linefeeds, tabs or carriage returns are treated as whitespace.
* Node names are case sensitive.
*/
-#define AI_CONFIG_PP_OG_EXCLUDE_LIST \
- "PP_OG_EXCLUDE_LIST"
+#define AI_CONFIG_PP_OG_EXCLUDE_LIST \
+ "PP_OG_EXCLUDE_LIST"
// ---------------------------------------------------------------------------
/** @brief Set the maximum number of triangles in a mesh.
@@ -298,11 +306,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Property type: integer.
*/
#define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
- "PP_SLM_TRIANGLE_LIMIT"
+ "PP_SLM_TRIANGLE_LIMIT"
// default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
#if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
-#define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
+# define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
#endif
// ---------------------------------------------------------------------------
@@ -314,11 +322,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Property type: integer.
*/
#define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
- "PP_SLM_VERTEX_LIMIT"
+ "PP_SLM_VERTEX_LIMIT"
// default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
#if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
-#define AI_SLM_DEFAULT_MAX_VERTICES 1000000
+# define AI_SLM_DEFAULT_MAX_VERTICES 1000000
#endif
// ---------------------------------------------------------------------------
@@ -327,12 +335,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
* @note The default value is AI_LMW_MAX_WEIGHTS
* Property type: integer.*/
-#define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
- "PP_LBW_MAX_WEIGHTS"
+#define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
+ "PP_LBW_MAX_WEIGHTS"
// default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
#if (!defined AI_LMW_MAX_WEIGHTS)
-#define AI_LMW_MAX_WEIGHTS 0x4
+# define AI_LMW_MAX_WEIGHTS 0x4
#endif // !! AI_LMW_MAX_WEIGHTS
// ---------------------------------------------------------------------------
@@ -342,11 +350,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note The default value is AI_DEBONE_THRESHOLD
* Property type: float.*/
#define AI_CONFIG_PP_DB_THRESHOLD \
- "PP_DB_THRESHOLD"
+ "PP_DB_THRESHOLD"
// default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
#if (!defined AI_DEBONE_THRESHOLD)
-#define AI_DEBONE_THRESHOLD 1.0f
+# define AI_DEBONE_THRESHOLD 1.0f
#endif // !! AI_DEBONE_THRESHOLD
// ---------------------------------------------------------------------------
@@ -356,12 +364,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note The default value is 0
* Property type: bool.*/
#define AI_CONFIG_PP_DB_ALL_OR_NONE \
- "PP_DB_ALL_OR_NONE"
+ "PP_DB_ALL_OR_NONE"
/** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
*/
#ifndef PP_ICL_PTCACHE_SIZE
-#define PP_ICL_PTCACHE_SIZE 12
+# define PP_ICL_PTCACHE_SIZE 12
#endif
// ---------------------------------------------------------------------------
@@ -375,7 +383,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* performance improvements for most nVidia/AMD cards since 2002.
* Property type: integer.
*/
-#define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
+#define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
// ---------------------------------------------------------------------------
/** @brief Enumerates components of the aiScene and aiMesh data structures
@@ -383,71 +391,73 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* See the documentation to #aiProcess_RemoveComponent for more details.
*/
-enum aiComponent {
-/** Normal vectors */
+enum aiComponent
+{
+ /** Normal vectors */
#ifdef SWIG
aiComponent_NORMALS = 0x2,
#else
- aiComponent_NORMALS = 0x2u,
+ aiComponent_NORMALS = 0x2u,
#endif
-/** Tangents and bitangents go always together ... */
+ /** Tangents and bitangents go always together ... */
#ifdef SWIG
aiComponent_TANGENTS_AND_BITANGENTS = 0x4,
#else
- aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
+ aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
#endif
- /** ALL color sets
+ /** ALL color sets
* Use aiComponent_COLORn(N) to specify the N'th set */
- aiComponent_COLORS = 0x8,
+ aiComponent_COLORS = 0x8,
- /** ALL texture UV sets
+ /** ALL texture UV sets
* aiComponent_TEXCOORDn(N) to specify the N'th set */
- aiComponent_TEXCOORDS = 0x10,
+ aiComponent_TEXCOORDS = 0x10,
- /** Removes all bone weights from all meshes.
+ /** Removes all bone weights from all meshes.
* The scenegraph nodes corresponding to the bones are NOT removed.
* use the #aiProcess_OptimizeGraph step to do this */
- aiComponent_BONEWEIGHTS = 0x20,
+ aiComponent_BONEWEIGHTS = 0x20,
- /** Removes all node animations (aiScene::mAnimations).
+ /** Removes all node animations (aiScene::mAnimations).
* The corresponding scenegraph nodes are NOT removed.
* use the #aiProcess_OptimizeGraph step to do this */
- aiComponent_ANIMATIONS = 0x40,
+ aiComponent_ANIMATIONS = 0x40,
- /** Removes all embedded textures (aiScene::mTextures) */
- aiComponent_TEXTURES = 0x80,
+ /** Removes all embedded textures (aiScene::mTextures) */
+ aiComponent_TEXTURES = 0x80,
- /** Removes all light sources (aiScene::mLights).
+ /** Removes all light sources (aiScene::mLights).
* The corresponding scenegraph nodes are NOT removed.
* use the #aiProcess_OptimizeGraph step to do this */
- aiComponent_LIGHTS = 0x100,
+ aiComponent_LIGHTS = 0x100,
- /** Removes all cameras (aiScene::mCameras).
+ /** Removes all cameras (aiScene::mCameras).
* The corresponding scenegraph nodes are NOT removed.
* use the #aiProcess_OptimizeGraph step to do this */
- aiComponent_CAMERAS = 0x200,
+ aiComponent_CAMERAS = 0x200,
- /** Removes all meshes (aiScene::mMeshes). */
- aiComponent_MESHES = 0x400,
+ /** Removes all meshes (aiScene::mMeshes). */
+ aiComponent_MESHES = 0x400,
- /** Removes all materials. One default material will
+ /** Removes all materials. One default material will
* be generated, so aiScene::mNumMaterials will be 1. */
- aiComponent_MATERIALS = 0x800,
+ aiComponent_MATERIALS = 0x800,
+
-/** This value is not used. It is just there to force the
+ /** This value is not used. It is just there to force the
* compiler to map this enum to a 32 Bit integer. */
#ifndef SWIG
- _aiComponent_Force32Bit = 0x9fffffff
+ _aiComponent_Force32Bit = 0x9fffffff
#endif
};
// Remove a specific color channel 'n'
-#define aiComponent_COLORSn(n) (1u << (n + 20u))
+#define aiComponent_COLORSn(n) (1u << (n+20u))
// Remove a specific UV channel 'n'
-#define aiComponent_TEXCOORDSn(n) (1u << (n + 25u))
+#define aiComponent_TEXCOORDSn(n) (1u << (n+25u))
// ---------------------------------------------------------------------------
/** @brief Input parameter to the #aiProcess_RemoveComponent step:
@@ -461,8 +471,8 @@ enum aiComponent {
* of the flags defined above) the import FAILS. Mainly because there is
* no data to work on anymore ...
*/
-#define AI_CONFIG_PP_RVC_FLAGS \
- "PP_RVC_FLAGS"
+#define AI_CONFIG_PP_RVC_FLAGS \
+ "PP_RVC_FLAGS"
// ---------------------------------------------------------------------------
/** @brief Input parameter to the #aiProcess_SortByPType step:
@@ -473,8 +483,8 @@ enum aiComponent {
* be to exclude all line and point meshes from the import. This
* is an integer property, its default value is 0.
*/
-#define AI_CONFIG_PP_SBP_REMOVE \
- "PP_SBP_REMOVE"
+#define AI_CONFIG_PP_SBP_REMOVE \
+ "PP_SBP_REMOVE"
// ---------------------------------------------------------------------------
/** @brief Input parameter to the #aiProcess_FindInvalidData step:
@@ -485,8 +495,16 @@ enum aiComponent {
* abs(n0-n1)>epsilon holds true for all vector respectively quaternion
* components. The default value is 0.f - comparisons are exact then.
*/
-#define AI_CONFIG_PP_FID_ANIM_ACCURACY \
- "PP_FID_ANIM_ACCURACY"
+#define AI_CONFIG_PP_FID_ANIM_ACCURACY \
+ "PP_FID_ANIM_ACCURACY"
+
+// ---------------------------------------------------------------------------
+/** @brief Input parameter to the #aiProcess_FindInvalidData step:
+ * Set to true to ignore texture coordinates. This may be useful if you have
+ * to assign different kind of textures like one for the summer or one for the winter.
+ */
+#define AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS \
+ "PP_FID_IGNORE_TEXTURECOORDS"
// TransformUVCoords evaluates UV scalings
#define AI_UVTRAFO_SCALING 0x1
@@ -501,14 +519,6 @@ enum aiComponent {
#define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION)
// ---------------------------------------------------------------------------
-/** @brief Input parameter to the #aiProcess_FindInvalidData step:
- * Set to true to ignore texture coordinates. This may be useful if you have
- * to assign different kind of textures like one for the summer or one for the winter.
- */
-#define AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS \
- "PP_FID_IGNORE_TEXTURECOORDS"
-
-// ---------------------------------------------------------------------------
/** @brief Input parameter to the #aiProcess_TransformUVCoords step:
* Specifies which UV transformations are evaluated.
*
@@ -516,8 +526,8 @@ enum aiComponent {
* property, of course). By default all transformations are enabled
* (AI_UVTRAFO_ALL).
*/
-#define AI_CONFIG_PP_TUV_EVALUATE \
- "PP_TUV_EVALUATE"
+#define AI_CONFIG_PP_TUV_EVALUATE \
+ "PP_TUV_EVALUATE"
// ---------------------------------------------------------------------------
/** @brief A hint to assimp to favour speed against import quality.
@@ -528,14 +538,16 @@ enum aiComponent {
* This property is expected to be an integer, != 0 stands for true.
* The default value is 0.
*/
-#define AI_CONFIG_FAVOUR_SPEED \
- "FAVOUR_SPEED"
+#define AI_CONFIG_FAVOUR_SPEED \
+ "FAVOUR_SPEED"
+
// ###########################################################################
// IMPORTER SETTINGS
// Various stuff to fine-tune the behaviour of specific importer plugins.
// ###########################################################################
+
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will merge all geometry layers present
* in the source file or take only the first.
@@ -544,7 +556,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS \
- "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS"
+ "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read all materials present in the
@@ -556,7 +568,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS \
- "IMPORT_FBX_READ_ALL_MATERIALS"
+ "IMPORT_FBX_READ_ALL_MATERIALS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read materials.
@@ -565,7 +577,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_MATERIALS \
- "IMPORT_FBX_READ_MATERIALS"
+ "IMPORT_FBX_READ_MATERIALS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read embedded textures.
@@ -574,7 +586,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_TEXTURES \
- "IMPORT_FBX_READ_TEXTURES"
+ "IMPORT_FBX_READ_TEXTURES"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read cameras.
@@ -583,7 +595,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_CAMERAS \
- "IMPORT_FBX_READ_CAMERAS"
+ "IMPORT_FBX_READ_CAMERAS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read light sources.
@@ -592,7 +604,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_LIGHTS \
- "IMPORT_FBX_READ_LIGHTS"
+ "IMPORT_FBX_READ_LIGHTS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will read animations.
@@ -601,7 +613,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \
- "IMPORT_FBX_READ_ANIMATIONS"
+ "IMPORT_FBX_READ_ANIMATIONS"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will act in strict mode in which only
@@ -613,7 +625,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_STRICT_MODE \
- "IMPORT_FBX_STRICT_MODE"
+ "IMPORT_FBX_STRICT_MODE"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will preserve pivot points for
@@ -624,7 +636,7 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS \
- "IMPORT_FBX_PRESERVE_PIVOTS"
+ "IMPORT_FBX_PRESERVE_PIVOTS"
// ---------------------------------------------------------------------------
/** @brief Specifies whether the importer will drop empty animation curves or
@@ -635,26 +647,26 @@ enum aiComponent {
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
- "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
+ "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will use the legacy embedded texture naming.
-*
-* The default value is false (0)
-* Property type: bool
-*/
+ *
+ * The default value is false (0)
+ * Property type: bool
+ */
#define AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING \
"AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
// ---------------------------------------------------------------------------
-/** @brief Set wether the FBX importer shall not remove empty bones.
- *
+/** @brief Set wether the importer shall not remove empty bones.
*
* Empty bone are often used to define connections for other models.
*/
#define AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES \
"AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES"
+
// ---------------------------------------------------------------------------
/** @brief Set wether the FBX importer shall convert the unit from cm to m.
*/
@@ -674,14 +686,14 @@ enum aiComponent {
* want to override the global setting).
* Property type: integer.
*/
-#define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
+#define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
-#define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
-#define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
-#define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
-#define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
-#define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
-#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
+#define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
+#define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
+#define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
+#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
// ---------------------------------------------------------------------------
/** Smd load multiple animations
@@ -697,7 +709,7 @@ enum aiComponent {
* Property type: bool. Default value: true.
*/
#define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
- "IMPORT_AC_SEPARATE_BFCULL"
+ "IMPORT_AC_SEPARATE_BFCULL"
// ---------------------------------------------------------------------------
/** @brief Configures whether the AC loader evaluates subdivision surfaces (
@@ -707,8 +719,8 @@ enum aiComponent {
*
* * Property type: bool. Default value: true.
*/
-#define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
- "IMPORT_AC_EVAL_SUBDIVISION"
+#define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
+ "IMPORT_AC_EVAL_SUBDIVISION"
// ---------------------------------------------------------------------------
/** @brief Configures the UNREAL 3D loader to separate faces with different
@@ -717,7 +729,7 @@ enum aiComponent {
* * Property type: bool. Default value: true.
*/
#define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \
- "UNREAL_HANDLE_FLAGS"
+ "UNREAL_HANDLE_FLAGS"
// ---------------------------------------------------------------------------
/** @brief Configures the terragen import plugin to compute uv's for
@@ -730,7 +742,7 @@ enum aiComponent {
* * Property type: bool. Default value: false.
*/
#define AI_CONFIG_IMPORT_TER_MAKE_UVS \
- "IMPORT_TER_MAKE_UVS"
+ "IMPORT_TER_MAKE_UVS"
// ---------------------------------------------------------------------------
/** @brief Configures the ASE loader to always reconstruct normal vectors
@@ -739,8 +751,8 @@ enum aiComponent {
* Some ASE files have carry invalid normals, other don't.
* * Property type: bool. Default value: true.
*/
-#define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
- "IMPORT_ASE_RECONSTRUCT_NORMALS"
+#define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
+ "IMPORT_ASE_RECONSTRUCT_NORMALS"
// ---------------------------------------------------------------------------
/** @brief Configures the M3D loader to detect and process multi-part
@@ -752,7 +764,7 @@ enum aiComponent {
* Property type: bool. Default value: true.
*/
#define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
- "IMPORT_MD3_HANDLE_MULTIPART"
+ "IMPORT_MD3_HANDLE_MULTIPART"
// ---------------------------------------------------------------------------
/** @brief Tells the MD3 loader which skin files to load.
@@ -764,7 +776,7 @@ enum aiComponent {
* Property type: String. Default value: "default".
*/
#define AI_CONFIG_IMPORT_MD3_SKIN_NAME \
- "IMPORT_MD3_SKIN_NAME"
+ "IMPORT_MD3_SKIN_NAME"
// ---------------------------------------------------------------------------
/** @brief Specify the Quake 3 shader file to be used for a particular
@@ -782,7 +794,7 @@ enum aiComponent {
* Property type: String. Default value: n/a.
*/
#define AI_CONFIG_IMPORT_MD3_SHADER_SRC \
- "IMPORT_MD3_SHADER_SRC"
+ "IMPORT_MD3_SHADER_SRC"
// ---------------------------------------------------------------------------
/** @brief Configures the LWO loader to load just one layer from the model.
@@ -795,8 +807,8 @@ enum aiComponent {
* layer name may not be empty.<br>
* Property type: Integer. Default value: all layers are loaded.
*/
-#define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
- "IMPORT_LWO_ONE_LAYER_ONLY"
+#define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
+ "IMPORT_LWO_ONE_LAYER_ONLY"
// ---------------------------------------------------------------------------
/** @brief Configures the MD5 loader to not load the MD5ANIM file for
@@ -809,8 +821,8 @@ enum aiComponent {
*
* * Property type: bool. Default value: false.
*/
-#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
- "IMPORT_MD5_NO_ANIM_AUTOLOAD"
+#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
+ "IMPORT_MD5_NO_ANIM_AUTOLOAD"
// ---------------------------------------------------------------------------
/** @brief Defines the begin of the time range for which the LWS loader
@@ -828,10 +840,10 @@ enum aiComponent {
*
* @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
*/
-#define AI_CONFIG_IMPORT_LWS_ANIM_START \
- "IMPORT_LWS_ANIM_START"
-#define AI_CONFIG_IMPORT_LWS_ANIM_END \
- "IMPORT_LWS_ANIM_END"
+#define AI_CONFIG_IMPORT_LWS_ANIM_START \
+ "IMPORT_LWS_ANIM_START"
+#define AI_CONFIG_IMPORT_LWS_ANIM_END \
+ "IMPORT_LWS_ANIM_END"
// ---------------------------------------------------------------------------
/** @brief Defines the output frame rate of the IRR loader.
@@ -841,8 +853,8 @@ enum aiComponent {
* are returned by the converter.<br>
* Property type: integer. Default value: 100
*/
-#define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
- "IMPORT_IRR_ANIM_FPS"
+#define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
+ "IMPORT_IRR_ANIM_FPS"
// ---------------------------------------------------------------------------
/** @brief Ogre Importer will try to find referenced materials from this file.
@@ -855,7 +867,7 @@ enum aiComponent {
* Property type: String. Default value: Scene.material.
*/
#define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE \
- "IMPORT_OGRE_MATERIAL_FILE"
+ "IMPORT_OGRE_MATERIAL_FILE"
// ---------------------------------------------------------------------------
/** @brief Ogre Importer detect the texture usage from its filename.
@@ -875,15 +887,15 @@ enum aiComponent {
* Property type: Bool. Default value: false.
*/
#define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \
- "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
+ "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
-/** @brief Specifies whether the Android JNI asset extraction is supported.
+ /** @brief Specifies whether the Android JNI asset extraction is supported.
*
* Turn on this option if you want to manage assets in native
* Android application without having to keep the internal directory and asset
* manager pointer.
*/
-#define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT"
+ #define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT"
// ---------------------------------------------------------------------------
/** @brief Specifies whether the IFC loader skips over IfcSpace elements.
@@ -922,7 +934,7 @@ enum aiComponent {
// default value for AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE
#if (!defined AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE)
-#define AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE 10.0f
+# define AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE 10.0f
#endif
// ---------------------------------------------------------------------------
@@ -938,7 +950,7 @@ enum aiComponent {
// default value for AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION
#if (!defined AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION)
-#define AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION 32
+# define AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION 32
#endif
// ---------------------------------------------------------------------------
@@ -969,8 +981,12 @@ enum aiComponent {
#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
-/**
- *
+/** @brief Specifies whether the assimp export shall be able to export point clouds
+ *
+ * When this flag is not defined the render data has to contain valid faces.
+ * Point clouds are only a collection of vertices which have nor spatial organization
+ * by a face and the validation process will remove them. Enabling this feature will
+ * switch off the flag and enable the functionality to export pure point clouds.
*/
#define AI_CONFIG_EXPORT_POINT_CLOUDS "EXPORT_POINT_CLOUDS"
@@ -980,7 +996,7 @@ enum aiComponent {
#define AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY "GLOBAL_SCALE_FACTOR"
#if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT)
-#define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
+# define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
#endif // !! AI_DEBONE_THRESHOLD
#define AI_CONFIG_APP_SCALE_KEY "APP_SCALE_FACTOR"
@@ -997,7 +1013,6 @@ enum aiComponent {
* Property type: Bool. Default value: undefined.
*/
-/* #cmakedefine ASSIMP_DOUBLE_PRECISION 1 */
+/* #undef ASSIMP_DOUBLE_PRECISION */
#endif // !! AI_CONFIG_H_INC
-
diff --git a/thirdparty/assimp/code/revision.h b/thirdparty/assimp/revision.h
index 66eb875303..66eb875303 100644
--- a/thirdparty/assimp/code/revision.h
+++ b/thirdparty/assimp/revision.h
diff --git a/thirdparty/enet/enet/enet.h b/thirdparty/enet/enet/enet.h
index 966e3a465d..ac7552adb2 100644
--- a/thirdparty/enet/enet/enet.h
+++ b/thirdparty/enet/enet/enet.h
@@ -578,6 +578,8 @@ 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 void enet_host_dtls_server_setup (ENetHost *, void *, void *);
+ENET_API void enet_host_dtls_client_setup (ENetHost *, void *, uint8_t, const char *);
ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *);
ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID);
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp
index 63580b6d1a..9fefa53e77 100644
--- a/thirdparty/enet/godot.cpp
+++ b/thirdparty/enet/godot.cpp
@@ -32,13 +32,313 @@
@brief ENet Godot specific functions
*/
+#include "core/io/dtls_server.h"
#include "core/io/ip.h"
#include "core/io/net_socket.h"
+#include "core/io/packet_peer_dtls.h"
+#include "core/io/udp_server.h"
#include "core/os/os.h"
// This must be last for windows to compile (tested with MinGW)
#include "enet/enet.h"
+/// Abstract ENet interface for UDP/DTLS.
+class ENetGodotSocket {
+
+public:
+ virtual Error bind(IP_Address p_ip, uint16_t p_port) = 0;
+ virtual Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) = 0;
+ virtual Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) = 0;
+ virtual int set_option(ENetSocketOption p_option, int p_value) = 0;
+ virtual void close() = 0;
+ virtual ~ENetGodotSocket(){};
+};
+
+class ENetDTLSClient;
+class ENetDTLSServer;
+
+/// NetSocket interface
+class ENetUDP : public ENetGodotSocket {
+
+ friend class ENetDTLSClient;
+ friend class ENetDTLSServer;
+
+private:
+ Ref<NetSocket> sock;
+ IP_Address address;
+ uint16_t port;
+ bool bound;
+
+public:
+ ENetUDP() {
+ sock = Ref<NetSocket>(NetSocket::create());
+ IP::Type ip_type = IP::TYPE_ANY;
+ bound = false;
+ sock->open(NetSocket::TYPE_UDP, ip_type);
+ }
+
+ ~ENetUDP() {
+ sock->close();
+ }
+
+ Error bind(IP_Address p_ip, uint16_t p_port) {
+ address = p_ip;
+ port = p_port;
+ bound = true;
+ return sock->bind(address, port);
+ }
+
+ Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) {
+ return sock->sendto(p_buffer, p_len, r_sent, p_ip, p_port);
+ }
+
+ Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) {
+ Error err = sock->poll(NetSocket::POLL_TYPE_IN, 0);
+ if (err != OK)
+ return err;
+ return sock->recvfrom(p_buffer, p_len, r_read, r_ip, r_port);
+ }
+
+ int set_option(ENetSocketOption p_option, int p_value) {
+ switch (p_option) {
+ case ENET_SOCKOPT_NONBLOCK: {
+ sock->set_blocking_enabled(p_value ? false : true);
+ return 0;
+ } break;
+
+ case ENET_SOCKOPT_BROADCAST: {
+ sock->set_broadcasting_enabled(p_value ? true : false);
+ return 0;
+ } break;
+
+ case ENET_SOCKOPT_REUSEADDR: {
+ sock->set_reuse_address_enabled(p_value ? true : false);
+ return 0;
+ } break;
+
+ case ENET_SOCKOPT_RCVBUF: {
+ return -1;
+ } break;
+
+ case ENET_SOCKOPT_SNDBUF: {
+ return -1;
+ } break;
+
+ case ENET_SOCKOPT_RCVTIMEO: {
+ return -1;
+ } break;
+
+ case ENET_SOCKOPT_SNDTIMEO: {
+ return -1;
+ } break;
+
+ case ENET_SOCKOPT_NODELAY: {
+ sock->set_tcp_no_delay_enabled(p_value ? true : false);
+ return 0;
+ } break;
+ }
+
+ return -1;
+ }
+
+ void close() {
+ sock->close();
+ }
+};
+
+/// DTLS Client ENet interface
+class ENetDTLSClient : public ENetGodotSocket {
+
+ bool connected;
+ Ref<PacketPeerUDP> udp;
+ Ref<PacketPeerDTLS> dtls;
+ bool verify;
+ String for_hostname;
+ Ref<X509Certificate> cert;
+
+public:
+ ENetDTLSClient(ENetUDP *p_base, Ref<X509Certificate> p_cert, bool p_verify, String p_for_hostname) {
+ verify = p_verify;
+ for_hostname = p_for_hostname;
+ cert = p_cert;
+ udp.instance();
+ dtls = Ref<PacketPeerDTLS>(PacketPeerDTLS::create());
+ p_base->close();
+ if (p_base->bound) {
+ bind(p_base->address, p_base->port);
+ }
+ connected = false;
+ }
+
+ ~ENetDTLSClient() {
+ close();
+ }
+
+ Error bind(IP_Address p_ip, uint16_t p_port) {
+ return udp->listen(p_port, p_ip);
+ }
+
+ Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) {
+ if (!connected) {
+ udp->connect_to_host(p_ip, p_port);
+ dtls->connect_to_peer(udp, verify, for_hostname, cert);
+ connected = true;
+ }
+ dtls->poll();
+ if (dtls->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING)
+ return ERR_BUSY;
+ else if (dtls->get_status() != PacketPeerDTLS::STATUS_CONNECTED)
+ return FAILED;
+ r_sent = p_len;
+ return dtls->put_packet(p_buffer, p_len);
+ }
+
+ Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) {
+ dtls->poll();
+ if (dtls->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING)
+ return ERR_BUSY;
+ if (dtls->get_status() != PacketPeerDTLS::STATUS_CONNECTED)
+ return FAILED;
+ int pc = dtls->get_available_packet_count();
+ if (pc == 0)
+ return ERR_BUSY;
+ else if (pc < 0)
+ return FAILED;
+
+ const uint8_t *buffer;
+ Error err = dtls->get_packet(&buffer, r_read);
+ ERR_FAIL_COND_V(err != OK, err);
+ ERR_FAIL_COND_V(p_len < r_read, ERR_OUT_OF_MEMORY);
+
+ copymem(p_buffer, buffer, r_read);
+ r_ip = udp->get_packet_address();
+ r_port = udp->get_packet_port();
+ return err;
+ }
+
+ int set_option(ENetSocketOption p_option, int p_value) {
+ return -1;
+ }
+
+ void close() {
+ dtls->disconnect_from_peer();
+ udp->close();
+ }
+};
+
+/// DTLSServer - ENet interface
+class ENetDTLSServer : public ENetGodotSocket {
+
+ Ref<DTLSServer> server;
+ Ref<UDPServer> udp_server;
+ Map<String, Ref<PacketPeerDTLS> > peers;
+ int last_service;
+
+public:
+ ENetDTLSServer(ENetUDP *p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert) {
+ last_service = 0;
+ udp_server.instance();
+ p_base->close();
+ if (p_base->bound) {
+ bind(p_base->address, p_base->port);
+ }
+ server = Ref<DTLSServer>(DTLSServer::create());
+ server->setup(p_key, p_cert);
+ }
+
+ ~ENetDTLSServer() {
+ close();
+ }
+
+ Error bind(IP_Address p_ip, uint16_t p_port) {
+ return udp_server->listen(p_port, p_ip);
+ }
+
+ Error sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IP_Address p_ip, uint16_t p_port) {
+ String key = String(p_ip) + ":" + itos(p_port);
+ ERR_FAIL_COND_V(!peers.has(key), ERR_UNAVAILABLE);
+ Ref<PacketPeerDTLS> peer = peers[key];
+ Error err = peer->put_packet(p_buffer, p_len);
+ if (err == OK)
+ r_sent = p_len;
+ else if (err == ERR_BUSY)
+ r_sent = 0;
+ else
+ r_sent = -1;
+ return err;
+ }
+
+ Error recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IP_Address &r_ip, uint16_t &r_port) {
+ // TODO limits? Maybe we can better enforce allowed connections!
+ if (udp_server->is_connection_available()) {
+ Ref<PacketPeerUDP> udp = udp_server->take_connection();
+ IP_Address peer_ip = udp->get_packet_address();
+ int peer_port = udp->get_packet_port();
+ Ref<PacketPeerDTLS> peer = server->take_connection(udp);
+ PacketPeerDTLS::Status status = peer->get_status();
+ if (status == PacketPeerDTLS::STATUS_HANDSHAKING || status == PacketPeerDTLS::STATUS_CONNECTED) {
+ String key = String(peer_ip) + ":" + itos(peer_port);
+ peers[key] = peer;
+ }
+ }
+
+ List<String> remove;
+ Error err = ERR_BUSY;
+ // TODO this needs to be fair!
+ for (Map<String, Ref<PacketPeerDTLS> >::Element *E = peers.front(); E; E = E->next()) {
+ Ref<PacketPeerDTLS> peer = E->get();
+ peer->poll();
+
+ if (peer->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING)
+ continue;
+ else if (peer->get_status() != PacketPeerDTLS::STATUS_CONNECTED) {
+ // Peer disconnected, removing it.
+ remove.push_back(E->key());
+ continue;
+ }
+
+ if (peer->get_available_packet_count() > 0) {
+ const uint8_t *buffer;
+ err = peer->get_packet(&buffer, r_read);
+ if (err != OK || p_len < r_read) {
+ // Something wrong with this peer, removing it.
+ remove.push_back(E->key());
+ err = FAILED;
+ continue;
+ }
+
+ Vector<String> s = E->key().rsplit(":", false, 1);
+ ERR_CONTINUE(s.size() != 2); // BUG!
+
+ copymem(p_buffer, buffer, r_read);
+ r_ip = s[0];
+ r_port = s[1].to_int();
+ break; // err = OK
+ }
+ }
+
+ // Remove disconnected peers from map.
+ for (List<String>::Element *E = remove.front(); E; E = E->next()) {
+ peers.erase(E->get());
+ }
+
+ return err; // OK, ERR_BUSY, or possibly an error.
+ }
+
+ int set_option(ENetSocketOption p_option, int p_value) {
+ return -1;
+ }
+
+ void close() {
+ for (Map<String, Ref<PacketPeerDTLS> >::Element *E = peers.front(); E; E = E->next()) {
+ E->get()->disconnect_from_peer();
+ }
+ peers.clear();
+ udp_server->stop();
+ server->stop();
+ }
+};
+
static enet_uint32 timeBase = 0;
int enet_initialize(void) {
@@ -92,13 +392,23 @@ int enet_address_get_host(const ENetAddress *address, char *name, size_t nameLen
ENetSocket enet_socket_create(ENetSocketType type) {
- NetSocket *socket = NetSocket::create();
- IP::Type ip_type = IP::TYPE_ANY;
- socket->open(NetSocket::TYPE_UDP, ip_type);
+ ENetUDP *socket = memnew(ENetUDP);
return socket;
}
+void enet_host_dtls_server_setup(ENetHost *host, void *p_key, void *p_cert) {
+ ENetUDP *sock = (ENetUDP *)host->socket;
+ host->socket = memnew(ENetDTLSServer(sock, Ref<CryptoKey>((CryptoKey *)p_key), Ref<X509Certificate>((X509Certificate *)p_cert)));
+ memdelete(sock);
+}
+
+void enet_host_dtls_client_setup(ENetHost *host, void *p_cert, uint8_t p_verify, const char *p_for_hostname) {
+ ENetUDP *sock = (ENetUDP *)host->socket;
+ host->socket = memnew(ENetDTLSClient(sock, Ref<X509Certificate>((X509Certificate *)p_cert), p_verify, String(p_for_hostname)));
+ memdelete(sock);
+}
+
int enet_socket_bind(ENetSocket socket, const ENetAddress *address) {
IP_Address ip;
@@ -108,7 +418,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) {
ip.set_ipv6(address->host);
}
- NetSocket *sock = (NetSocket *)socket;
+ ENetGodotSocket *sock = (ENetGodotSocket *)socket;
if (sock->bind(ip, address->port) != OK) {
return -1;
}
@@ -116,7 +426,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) {
}
void enet_socket_destroy(ENetSocket socket) {
- NetSocket *sock = (NetSocket *)socket;
+ ENetGodotSocket *sock = (ENetGodotSocket *)socket;
sock->close();
memdelete(sock);
}
@@ -125,7 +435,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu
ERR_FAIL_COND_V(address == NULL, -1);
- NetSocket *sock = (NetSocket *)socket;
+ ENetGodotSocket *sock = (ENetGodotSocket *)socket;
IP_Address dest;
Error err;
size_t i = 0;
@@ -133,8 +443,8 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu
dest.set_ipv6(address->host);
// Create a single packet.
- PoolVector<uint8_t> out;
- PoolVector<uint8_t>::Write w;
+ Vector<uint8_t> out;
+ uint8_t* w;
int size = 0;
int pos = 0;
for (i = 0; i < bufferCount; i++) {
@@ -142,7 +452,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu
}
out.resize(size);
- w = out.write();
+ w = out.ptrw();
for (i = 0; i < bufferCount; i++) {
memcpy(&w[pos], buffers[i].data, buffers[i].dataLength);
pos += buffers[i].dataLength;
@@ -167,15 +477,7 @@ int enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buf
ERR_FAIL_COND_V(bufferCount != 1, -1);
- NetSocket *sock = (NetSocket *)socket;
-
- Error ret = sock->poll(NetSocket::POLL_TYPE_IN, 0);
-
- if (ret == ERR_BUSY)
- return 0;
-
- if (ret != OK)
- return -1;
+ ENetGodotSocket *sock = (ENetGodotSocket *)socket;
int read;
IP_Address ip;
@@ -215,47 +517,8 @@ int enet_socket_listen(ENetSocket socket, int backlog) {
int enet_socket_set_option(ENetSocket socket, ENetSocketOption option, int value) {
- NetSocket *sock = (NetSocket *)socket;
-
- switch (option) {
- case ENET_SOCKOPT_NONBLOCK: {
- sock->set_blocking_enabled(value ? false : true);
- return 0;
- } break;
-
- case ENET_SOCKOPT_BROADCAST: {
- sock->set_broadcasting_enabled(value ? true : false);
- return 0;
- } break;
-
- case ENET_SOCKOPT_REUSEADDR: {
- sock->set_reuse_address_enabled(value ? true : false);
- return 0;
- } break;
-
- case ENET_SOCKOPT_RCVBUF: {
- return -1;
- } break;
-
- case ENET_SOCKOPT_SNDBUF: {
- return -1;
- } break;
-
- case ENET_SOCKOPT_RCVTIMEO: {
- return -1;
- } break;
-
- case ENET_SOCKOPT_SNDTIMEO: {
- return -1;
- } break;
-
- case ENET_SOCKOPT_NODELAY: {
- sock->set_tcp_no_delay_enabled(value ? true : false);
- return 0;
- } break;
- }
-
- return -1;
+ ENetGodotSocket *sock = (ENetGodotSocket *)socket;
+ return sock->set_option(option, value);
}
int enet_socket_get_option(ENetSocket socket, ENetSocketOption option, int *value) {
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
index e29c055b9a..40164b6187 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
@@ -34,5 +34,6 @@ static const char* const E_SPV_EXT_shader_stencil_export = "SPV_EXT_shade
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";
#endif // #ifndef GLSLextEXT_H
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
index 333442bb3e..e58e836a8d 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
@@ -41,5 +41,8 @@ static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_stora
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";
#endif // #ifndef GLSLextKHR_H
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
index ede2c570eb..50146da104 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
@@ -75,4 +75,7 @@ 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";
+
#endif // #ifndef GLSLextNV_H
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
index 4ef6cd7fc1..0c8a87e3ce 100644..100755
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
@@ -46,9 +46,7 @@ namespace spv {
#include "GLSL.std.450.h"
#include "GLSL.ext.KHR.h"
#include "GLSL.ext.EXT.h"
-#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
-#endif
#include "GLSL.ext.NV.h"
}
@@ -89,9 +87,29 @@ private:
};
struct OpDecorations {
+ public:
+ OpDecorations(spv::Decoration precision, spv::Decoration noContraction, spv::Decoration nonUniform) :
+ precision(precision)
+#ifndef GLSLANG_WEB
+ ,
+ noContraction(noContraction),
+ nonUniform(nonUniform)
+#endif
+ { }
+
spv::Decoration precision;
- spv::Decoration noContraction;
- spv::Decoration nonUniform;
+
+#ifdef GLSLANG_WEB
+ void addNoContraction(spv::Builder&, spv::Id) const { }
+ void addNonUniform(spv::Builder&, spv::Id) const { }
+#else
+ 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;
+#endif
+
};
} // namespace
@@ -138,7 +156,7 @@ protected:
spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const;
spv::StorageClass TranslateStorageClass(const glslang::TType&);
void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType);
- spv::Id createSpvVariable(const glslang::TIntermSymbol*);
+ 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);
@@ -169,7 +187,7 @@ protected:
void makeGlobalInitializers(const glslang::TIntermSequence&);
void visitFunctions(const glslang::TIntermSequence&);
void handleFunctionEntry(const glslang::TIntermAggregate* node);
- void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments);
+ void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
void translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments);
spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node);
spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*);
@@ -178,36 +196,30 @@ protected:
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);
+ glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
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 typeProxy);
spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize);
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
- spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
+ spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector<spv::Id>& operands);
spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId);
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
-#ifdef NV_EXTENSIONS
void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier);
-#endif
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);
-#ifdef AMD_EXTENSIONS
spv::Id getExtBuiltins(const char* name);
-#endif
- void addPre13Extension(const char* ext)
- {
- if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3)
- builder.addExtension(ext);
- }
+ std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
+ spv::Id translateForcedType(spv::Id object);
+ spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
glslang::SpvOptions& options;
spv::Function* shaderEntry;
@@ -224,6 +236,7 @@ protected:
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<spv::Id> 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;
std::unordered_map<const char*, spv::Id> extBuiltinMap;
@@ -232,11 +245,17 @@ protected:
std::unordered_map<std::string, spv::Function*> functionMap;
std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
// for mapping glslang block indices to spv indices (e.g., due to hidden members):
- std::unordered_map<const glslang::TTypeList*, std::vector<int> > memberRemapper;
+ std::unordered_map<int, std::vector<int>> memberRemapper;
+ // for mapping glslang symbol struct to symbol Id
+ std::unordered_map<const glslang::TTypeList*, int> glslangTypeToIdMap;
std::stack<bool> breakForLoop; // false means break for switch
std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator;
// Map pointee types for EbtReference to their forward pointers
std::map<const glslang::TType *, spv::Id> 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 <builtin-variable-id -> AST-required-type-id>
+ std::unordered_map<spv::Id, spv::Id> forceType;
};
//
@@ -246,6 +265,10 @@ protected:
// Translate glslang profile to SPIR-V source language.
spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile profile)
{
+#ifdef GLSLANG_WEB
+ return spv::SourceLanguageESSL;
+#endif
+
switch (source) {
case glslang::EShSourceGlsl:
switch (profile) {
@@ -270,12 +293,12 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
{
switch (stage) {
case EShLangVertex: return spv::ExecutionModelVertex;
+ case EShLangFragment: return spv::ExecutionModelFragment;
+ case EShLangCompute: return spv::ExecutionModelGLCompute;
+#ifndef GLSLANG_WEB
case EShLangTessControl: return spv::ExecutionModelTessellationControl;
case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
case EShLangGeometry: return spv::ExecutionModelGeometry;
- case EShLangFragment: return spv::ExecutionModelFragment;
- case EShLangCompute: return spv::ExecutionModelGLCompute;
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV: return spv::ExecutionModelRayGenerationNV;
case EShLangIntersectNV: return spv::ExecutionModelIntersectionNV;
case EShLangAnyHitNV: return spv::ExecutionModelAnyHitNV;
@@ -334,7 +357,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock;
case glslang::EvqVaryingIn: return spv::DecorationBlock;
case glslang::EvqVaryingOut: return spv::DecorationBlock;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
case glslang::EvqPayloadNV: return spv::DecorationBlock;
case glslang::EvqPayloadInNV: return spv::DecorationBlock;
case glslang::EvqHitAttrNV: return spv::DecorationBlock;
@@ -354,18 +377,18 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory, bool useVulkanMemoryModel)
{
if (!useVulkanMemoryModel) {
- if (qualifier.coherent)
+ if (qualifier.isCoherent())
memory.push_back(spv::DecorationCoherent);
- if (qualifier.volatil) {
+ if (qualifier.isVolatile()) {
memory.push_back(spv::DecorationVolatile);
memory.push_back(spv::DecorationCoherent);
}
}
- if (qualifier.restrict)
+ if (qualifier.isRestrict())
memory.push_back(spv::DecorationRestrict);
- if (qualifier.readonly)
+ if (qualifier.isReadOnly())
memory.push_back(spv::DecorationNonWritable);
- if (qualifier.writeonly)
+ if (qualifier.isWriteOnly())
memory.push_back(spv::DecorationNonReadable);
}
@@ -409,7 +432,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
}
return spv::DecorationMax;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
case glslang::EvqPayloadNV:
case glslang::EvqPayloadInNV:
case glslang::EvqHitAttrNV:
@@ -433,16 +456,14 @@ spv::Decoration TGlslangToSpvTraverser::TranslateInterpolationDecoration(const g
if (qualifier.smooth)
// Smooth decoration doesn't exist in SPIR-V 1.0
return spv::DecorationMax;
- else if (qualifier.nopersp)
+ else if (qualifier.isNonPerspective())
return spv::DecorationNoPerspective;
else if (qualifier.flat)
return spv::DecorationFlat;
-#ifdef AMD_EXTENSIONS
- else if (qualifier.explicitInterp) {
+ else if (qualifier.isExplicitInterpolation()) {
builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
return spv::DecorationExplicitInterpAMD;
}
-#endif
else
return spv::DecorationMax;
}
@@ -452,15 +473,18 @@ spv::Decoration TGlslangToSpvTraverser::TranslateInterpolationDecoration(const g
// should be applied.
spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier)
{
- if (qualifier.patch)
- return spv::DecorationPatch;
- else if (qualifier.centroid)
+ if (qualifier.centroid)
return spv::DecorationCentroid;
+#ifndef GLSLANG_WEB
+ else if (qualifier.patch)
+ return spv::DecorationPatch;
else if (qualifier.sample) {
builder.addCapability(spv::CapabilitySampleRateShading);
return spv::DecorationSample;
- } else
- return spv::DecorationMax;
+ }
+#endif
+
+ return spv::DecorationMax;
}
// If glslang type is invariant, return SPIR-V invariant decoration.
@@ -475,29 +499,36 @@ spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifie
// If glslang type is noContraction, return SPIR-V NoContraction decoration.
spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qualifier)
{
- if (qualifier.noContraction)
+#ifndef GLSLANG_WEB
+ if (qualifier.isNoContraction())
return spv::DecorationNoContraction;
else
+#endif
return spv::DecorationMax;
}
// If glslang type is nonUniform, return SPIR-V NonUniform decoration.
spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier)
{
+#ifndef GLSLANG_WEB
if (qualifier.isNonUniform()) {
- builder.addExtension("SPV_EXT_descriptor_indexing");
+ builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
builder.addCapability(spv::CapabilityShaderNonUniformEXT);
return spv::DecorationNonUniformEXT;
} else
+#endif
return spv::DecorationMax;
}
-spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
+spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(
+ const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
{
- if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage) {
- return spv::MemoryAccessMaskNone;
- }
spv::MemoryAccessMask mask = spv::MemoryAccessMaskNone;
+
+#ifndef GLSLANG_WEB
+ if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage)
+ return mask;
+
if (coherentFlags.volatil ||
coherentFlags.coherent ||
coherentFlags.devicecoherent ||
@@ -516,15 +547,20 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(const spv::B
if (mask != spv::MemoryAccessMaskNone) {
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
}
+#endif
+
return mask;
}
-spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands(const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
+spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands(
+ const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
{
- if (!glslangIntermediate->usingVulkanMemoryModel()) {
- return spv::ImageOperandsMaskNone;
- }
spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone;
+
+#ifndef GLSLANG_WEB
+ if (!glslangIntermediate->usingVulkanMemoryModel())
+ return mask;
+
if (coherentFlags.volatil ||
coherentFlags.coherent ||
coherentFlags.devicecoherent ||
@@ -543,12 +579,15 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands(const spv:
if (mask != spv::ImageOperandsMaskNone) {
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
}
+#endif
+
return mask;
}
spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCoherent(const glslang::TType& type)
{
- spv::Builder::AccessChain::CoherentFlags flags;
+ spv::Builder::AccessChain::CoherentFlags flags = {};
+#ifndef GLSLANG_WEB
flags.coherent = type.getQualifier().coherent;
flags.devicecoherent = type.getQualifier().devicecoherent;
flags.queuefamilycoherent = type.getQualifier().queuefamilycoherent;
@@ -566,12 +605,16 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere
flags.coherent ||
flags.volatil;
flags.isImage = type.getBasicType() == glslang::EbtSampler;
+#endif
return flags;
}
-spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
+spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(
+ const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
{
- spv::Scope scope;
+ spv::Scope scope = spv::ScopeMax;
+
+#ifndef GLSLANG_WEB
if (coherentFlags.volatil || coherentFlags.coherent) {
// coherent defaults to Device scope in the old model, QueueFamilyKHR scope in the new model
scope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
@@ -583,12 +626,12 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(const spv::Builder::Acce
scope = spv::ScopeWorkgroup;
} else if (coherentFlags.subgroupcoherent) {
scope = spv::ScopeSubgroup;
- } else {
- scope = spv::ScopeMax;
}
if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::ScopeDevice) {
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
}
+#endif
+
return scope;
}
@@ -601,6 +644,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
{
switch (builtIn) {
case glslang::EbvPointSize:
+#ifndef GLSLANG_WEB
// Defer adding the capability until the built-in is actually used.
if (! memberDeclaration) {
switch (glslangIntermediate->getStage()) {
@@ -615,8 +659,28 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
break;
}
}
+#endif
return spv::BuiltInPointSize;
+ case glslang::EbvPosition: return spv::BuiltInPosition;
+ case glslang::EbvVertexId: return spv::BuiltInVertexId;
+ case glslang::EbvInstanceId: return spv::BuiltInInstanceId;
+ case glslang::EbvVertexIndex: return spv::BuiltInVertexIndex;
+ case glslang::EbvInstanceIndex: return spv::BuiltInInstanceIndex;
+
+ case glslang::EbvFragCoord: return spv::BuiltInFragCoord;
+ case glslang::EbvPointCoord: return spv::BuiltInPointCoord;
+ case glslang::EbvFace: return spv::BuiltInFrontFacing;
+ case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
+
+ case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
+ case glslang::EbvWorkGroupSize: return spv::BuiltInWorkgroupSize;
+ case glslang::EbvWorkGroupId: return spv::BuiltInWorkgroupId;
+ case glslang::EbvLocalInvocationId: return spv::BuiltInLocalInvocationId;
+ case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex;
+ case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId;
+
+#ifndef GLSLANG_WEB
// 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.
@@ -639,7 +703,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
- builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+ builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
}
return spv::BuiltInViewportIndex;
@@ -656,39 +720,31 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return spv::BuiltInSampleMask;
case glslang::EbvLayer:
-#ifdef NV_EXTENSIONS
if (glslangIntermediate->getStage() == EShLangMeshNV) {
return spv::BuiltInLayer;
}
-#endif
builder.addCapability(spv::CapabilityGeometry);
if (glslangIntermediate->getStage() == EShLangVertex ||
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
- builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+ builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
}
return spv::BuiltInLayer;
- case glslang::EbvPosition: return spv::BuiltInPosition;
- case glslang::EbvVertexId: return spv::BuiltInVertexId;
- case glslang::EbvInstanceId: return spv::BuiltInInstanceId;
- case glslang::EbvVertexIndex: return spv::BuiltInVertexIndex;
- case glslang::EbvInstanceIndex: return spv::BuiltInInstanceIndex;
-
case glslang::EbvBaseVertex:
- addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
builder.addCapability(spv::CapabilityDrawParameters);
return spv::BuiltInBaseVertex;
case glslang::EbvBaseInstance:
- addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
builder.addCapability(spv::CapabilityDrawParameters);
return spv::BuiltInBaseInstance;
case glslang::EbvDrawId:
- addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
builder.addCapability(spv::CapabilityDrawParameters);
return spv::BuiltInDrawIndex;
@@ -707,17 +763,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter;
case glslang::EbvTessCoord: return spv::BuiltInTessCoord;
case glslang::EbvPatchVertices: return spv::BuiltInPatchVertices;
- case glslang::EbvFragCoord: return spv::BuiltInFragCoord;
- case glslang::EbvPointCoord: return spv::BuiltInPointCoord;
- case glslang::EbvFace: return spv::BuiltInFrontFacing;
- case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
- case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
- case glslang::EbvWorkGroupSize: return spv::BuiltInWorkgroupSize;
- case glslang::EbvWorkGroupId: return spv::BuiltInWorkgroupId;
- case glslang::EbvLocalInvocationId: return spv::BuiltInLocalInvocationId;
- case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex;
- case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId;
case glslang::EbvSubGroupSize:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
@@ -732,27 +778,27 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
case glslang::EbvSubGroupEqMask:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
- return spv::BuiltInSubgroupEqMaskKHR;
+ return spv::BuiltInSubgroupEqMask;
case glslang::EbvSubGroupGeMask:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
- return spv::BuiltInSubgroupGeMaskKHR;
+ return spv::BuiltInSubgroupGeMask;
case glslang::EbvSubGroupGtMask:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
- return spv::BuiltInSubgroupGtMaskKHR;
+ return spv::BuiltInSubgroupGtMask;
case glslang::EbvSubGroupLeMask:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
- return spv::BuiltInSubgroupLeMaskKHR;
+ return spv::BuiltInSubgroupLeMask;
case glslang::EbvSubGroupLtMask:
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
- return spv::BuiltInSubgroupLtMaskKHR;
+ return spv::BuiltInSubgroupLtMask;
case glslang::EbvNumSubgroups:
builder.addCapability(spv::CapabilityGroupNonUniform);
@@ -794,7 +840,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addCapability(spv::CapabilityGroupNonUniform);
builder.addCapability(spv::CapabilityGroupNonUniformBallot);
return spv::BuiltInSubgroupLtMask;
-#ifdef AMD_EXTENSIONS
+
case glslang::EbvBaryCoordNoPersp:
builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
return spv::BuiltInBaryCoordNoPerspAMD;
@@ -822,15 +868,14 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
case glslang::EbvBaryCoordPullModel:
builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
return spv::BuiltInBaryCoordPullModelAMD;
-#endif
case glslang::EbvDeviceIndex:
- addPre13Extension(spv::E_SPV_KHR_device_group);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_device_group, spv::Spv_1_3);
builder.addCapability(spv::CapabilityDeviceGroup);
return spv::BuiltInDeviceIndex;
case glslang::EbvViewIndex:
- addPre13Extension(spv::E_SPV_KHR_multiview);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_multiview, spv::Spv_1_3);
builder.addCapability(spv::CapabilityMultiView);
return spv::BuiltInViewIndex;
@@ -844,7 +889,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addCapability(spv::CapabilityFragmentDensityEXT);
return spv::BuiltInFragInvocationCountEXT;
-#ifdef NV_EXTENSIONS
case glslang::EbvViewportMaskNV:
if (!memberDeclaration) {
builder.addExtension(spv::E_SPV_NV_viewport_array2);
@@ -888,7 +932,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addCapability(spv::CapabilityShadingRateNV);
return spv::BuiltInInvocationsPerPixelNV;
- // raytracing
+ // ray tracing
case glslang::EbvLaunchIdNV:
return spv::BuiltInLaunchIdNV;
case glslang::EbvLaunchSizeNV:
@@ -917,6 +961,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return spv::BuiltInWorldToObjectNV;
case glslang::EbvIncomingRayFlagsNV:
return spv::BuiltInIncomingRayFlagsNV;
+
+ // barycentrics
case glslang::EbvBaryCoordNV:
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
@@ -925,23 +971,44 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
return spv::BuiltInBaryCoordNoPerspNV;
- case glslang::EbvTaskCountNV:
+
+ // mesh shaders
+ case glslang::EbvTaskCountNV:
return spv::BuiltInTaskCountNV;
- case glslang::EbvPrimitiveCountNV:
+ case glslang::EbvPrimitiveCountNV:
return spv::BuiltInPrimitiveCountNV;
- case glslang::EbvPrimitiveIndicesNV:
+ case glslang::EbvPrimitiveIndicesNV:
return spv::BuiltInPrimitiveIndicesNV;
- case glslang::EbvClipDistancePerViewNV:
+ case glslang::EbvClipDistancePerViewNV:
return spv::BuiltInClipDistancePerViewNV;
- case glslang::EbvCullDistancePerViewNV:
+ case glslang::EbvCullDistancePerViewNV:
return spv::BuiltInCullDistancePerViewNV;
- case glslang::EbvLayerPerViewNV:
+ case glslang::EbvLayerPerViewNV:
return spv::BuiltInLayerPerViewNV;
- case glslang::EbvMeshViewCountNV:
+ case glslang::EbvMeshViewCountNV:
return spv::BuiltInMeshViewCountNV;
- case glslang::EbvMeshViewIndicesNV:
+ case glslang::EbvMeshViewIndicesNV:
return spv::BuiltInMeshViewIndicesNV;
-#endif
+
+ // sm builtins
+ case glslang::EbvWarpsPerSM:
+ builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
+ builder.addCapability(spv::CapabilityShaderSMBuiltinsNV);
+ return spv::BuiltInWarpsPerSMNV;
+ case glslang::EbvSMCount:
+ builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
+ builder.addCapability(spv::CapabilityShaderSMBuiltinsNV);
+ return spv::BuiltInSMCountNV;
+ case glslang::EbvWarpID:
+ builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
+ builder.addCapability(spv::CapabilityShaderSMBuiltinsNV);
+ return spv::BuiltInWarpIDNV;
+ case glslang::EbvSMID:
+ builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
+ builder.addCapability(spv::CapabilityShaderSMBuiltinsNV);
+ return spv::BuiltInSMIDNV;
+#endif
+
default:
return spv::BuiltInMax;
}
@@ -952,8 +1019,12 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
{
assert(type.getBasicType() == glslang::EbtSampler);
+#ifdef GLSLANG_WEB
+ return spv::ImageFormatUnknown;
+#endif
+
// Check for capabilities
- switch (type.getQualifier().layoutFormat) {
+ switch (type.getQualifier().getFormat()) {
case glslang::ElfRg32f:
case glslang::ElfRg16f:
case glslang::ElfR11fG11fB10f:
@@ -990,7 +1061,7 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
}
// do the translation
- switch (type.getQualifier().layoutFormat) {
+ switch (type.getQualifier().getFormat()) {
case glslang::ElfNone: return spv::ImageFormatUnknown;
case glslang::ElfRgba32f: return spv::ImageFormatRgba32f;
case glslang::ElfRgba16f: return spv::ImageFormatRgba16f;
@@ -1104,27 +1175,25 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
return spv::StorageClassOutput;
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl ||
- type.getQualifier().storage == glslang::EvqUniform) {
- if (type.getBasicType() == glslang::EbtAtomicUint)
+ type.getQualifier().storage == glslang::EvqUniform) {
+ if (type.isAtomic())
return spv::StorageClassAtomicCounter;
if (type.containsOpaque())
return spv::StorageClassUniformConstant;
}
-#ifdef NV_EXTENSIONS
if (type.getQualifier().isUniformOrBuffer() &&
- type.getQualifier().layoutShaderRecordNV) {
+ type.getQualifier().isShaderRecordNV()) {
return spv::StorageClassShaderRecordBufferNV;
}
-#endif
if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
- addPre13Extension(spv::E_SPV_KHR_storage_buffer_storage_class);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_storage_buffer_storage_class, spv::Spv_1_3);
return spv::StorageClassStorageBuffer;
}
if (type.getQualifier().isUniformOrBuffer()) {
- if (type.getQualifier().layoutPushConstant)
+ if (type.getQualifier().isPushConstant())
return spv::StorageClassPushConstant;
if (type.getBasicType() == glslang::EbtBlock)
return spv::StorageClassUniform;
@@ -1132,11 +1201,11 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
}
switch (type.getQualifier().storage) {
- case glslang::EvqShared: return spv::StorageClassWorkgroup;
case glslang::EvqGlobal: return spv::StorageClassPrivate;
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
case glslang::EvqTemporary: return spv::StorageClassFunction;
-#ifdef NV_EXTENSIONS
+ case glslang::EvqShared: return spv::StorageClassWorkgroup;
+#ifndef GLSLANG_WEB
case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNV;
case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNV;
case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNV;
@@ -1155,15 +1224,16 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType,
const glslang::TType& indexType)
{
+#ifndef GLSLANG_WEB
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::CapabilityInputAttachmentArrayNonUniformIndexingEXT);
- else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer)
+ else if (baseType.isImage() && baseType.getSampler().isBuffer())
builder.addCapability(spv::CapabilityStorageTexelBufferArrayNonUniformIndexingEXT);
- else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer)
+ else if (baseType.isTexture() && baseType.getSampler().isBuffer())
builder.addCapability(spv::CapabilityUniformTexelBufferArrayNonUniformIndexingEXT);
else if (baseType.isImage())
builder.addCapability(spv::CapabilityStorageImageArrayNonUniformIndexingEXT);
@@ -1179,17 +1249,18 @@ void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TTyp
// assume a dynamically uniform index
if (baseType.getBasicType() == glslang::EbtSampler) {
if (baseType.getQualifier().hasAttachment()) {
- builder.addExtension("SPV_EXT_descriptor_indexing");
+ builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
- } else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer) {
- builder.addExtension("SPV_EXT_descriptor_indexing");
+ } else if (baseType.isImage() && baseType.getSampler().isBuffer()) {
+ builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
- } else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer) {
- builder.addExtension("SPV_EXT_descriptor_indexing");
+ } else if (baseType.isTexture() && baseType.getSampler().isBuffer()) {
+ builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
}
}
}
+#endif
}
// Return whether or not the given type is something that should be tied to a
@@ -1199,10 +1270,8 @@ 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() &&
-#ifdef NV_EXTENSIONS
- ! type.getQualifier().layoutShaderRecordNV &&
-#endif
- ! type.getQualifier().layoutPushConstant;
+ ! type.getQualifier().isShaderRecordNV() &&
+ ! type.getQualifier().isPushConstant();
// non block...
// basically samplerXXX/subpass/sampler/texture are all included
@@ -1222,16 +1291,21 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
if (parent.invariant)
child.invariant = true;
- if (parent.nopersp)
- child.nopersp = true;
-#ifdef AMD_EXTENSIONS
- if (parent.explicitInterp)
- child.explicitInterp = true;
-#endif
if (parent.flat)
child.flat = true;
if (parent.centroid)
child.centroid = true;
+#ifndef GLSLANG_WEB
+ 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.patch)
child.patch = true;
if (parent.sample)
@@ -1256,13 +1330,6 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
child.readonly = true;
if (parent.writeonly)
child.writeonly = true;
-#ifdef NV_EXTENSIONS
- if (parent.perPrimitiveNV)
- child.perPrimitiveNV = true;
- if (parent.perViewNV)
- child.perViewNV = true;
- if (parent.perTaskNV)
- child.perTaskNV = true;
#endif
}
@@ -1291,7 +1358,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
sequenceDepth(0), logger(buildLogger),
builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger),
inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
- glslangIntermediate(glslangIntermediate)
+ glslangIntermediate(glslangIntermediate),
+ nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp())
{
spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
@@ -1332,13 +1400,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
if (glslangIntermediate->usingPhysicalStorageBuffer()) {
addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
- builder.addExtension(spv::E_SPV_EXT_physical_storage_buffer);
+ builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
};
if (glslangIntermediate->usingVulkanMemoryModel()) {
memoryModel = spv::MemoryModelVulkanKHR;
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
- builder.addExtension(spv::E_SPV_KHR_vulkan_memory_model);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5);
}
builder.setMemoryModel(addressingModel, memoryModel);
@@ -1367,6 +1435,84 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addCapability(spv::CapabilityShader);
break;
+ case EShLangFragment:
+ builder.addCapability(spv::CapabilityShader);
+ if (glslangIntermediate->getPixelCenterInteger())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModePixelCenterInteger);
+
+ if (glslangIntermediate->getOriginUpperLeft())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginUpperLeft);
+ else
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginLowerLeft);
+
+ if (glslangIntermediate->getEarlyFragmentTests())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests);
+
+ if (glslangIntermediate->getPostDepthCoverage()) {
+ builder.addCapability(spv::CapabilitySampleMaskPostDepthCoverage);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModePostDepthCoverage);
+ builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
+ }
+
+ if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
+
+#ifndef GLSLANG_WEB
+ switch(glslangIntermediate->getDepth()) {
+ case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
+ case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
+ default: mode = spv::ExecutionModeMax; break;
+ }
+ if (mode != spv::ExecutionModeMax)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+ switch (glslangIntermediate->getInterlockOrdering()) {
+ case glslang::EioPixelInterlockOrdered: mode = spv::ExecutionModePixelInterlockOrderedEXT;
+ break;
+ case glslang::EioPixelInterlockUnordered: mode = spv::ExecutionModePixelInterlockUnorderedEXT;
+ break;
+ case glslang::EioSampleInterlockOrdered: mode = spv::ExecutionModeSampleInterlockOrderedEXT;
+ break;
+ case glslang::EioSampleInterlockUnordered: mode = spv::ExecutionModeSampleInterlockUnorderedEXT;
+ break;
+ case glslang::EioShadingRateInterlockOrdered: mode = spv::ExecutionModeShadingRateInterlockOrderedEXT;
+ break;
+ case glslang::EioShadingRateInterlockUnordered: mode = spv::ExecutionModeShadingRateInterlockUnorderedEXT;
+ break;
+ default: mode = spv::ExecutionModeMax;
+ break;
+ }
+ if (mode != spv::ExecutionModeMax) {
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+ if (mode == spv::ExecutionModeShadingRateInterlockOrderedEXT ||
+ mode == spv::ExecutionModeShadingRateInterlockUnorderedEXT) {
+ builder.addCapability(spv::CapabilityFragmentShaderShadingRateInterlockEXT);
+ } else if (mode == spv::ExecutionModePixelInterlockOrderedEXT ||
+ mode == spv::ExecutionModePixelInterlockUnorderedEXT) {
+ builder.addCapability(spv::CapabilityFragmentShaderPixelInterlockEXT);
+ } else {
+ builder.addCapability(spv::CapabilityFragmentShaderSampleInterlockEXT);
+ }
+ builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
+ }
+#endif
+ break;
+
+ case EShLangCompute:
+ builder.addCapability(spv::CapabilityShader);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
+ glslangIntermediate->getLocalSize(1),
+ glslangIntermediate->getLocalSize(2));
+ if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) {
+ builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV);
+ builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
+ } else if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupLinear) {
+ builder.addCapability(spv::CapabilityComputeDerivativeGroupLinearNV);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupLinearNV);
+ builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
+ }
+ break;
+#ifndef GLSLANG_WEB
case EShLangTessEvaluation:
case EShLangTessControl:
builder.addCapability(spv::CapabilityTessellation);
@@ -1436,56 +1582,6 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
break;
- case EShLangFragment:
- builder.addCapability(spv::CapabilityShader);
- if (glslangIntermediate->getPixelCenterInteger())
- builder.addExecutionMode(shaderEntry, spv::ExecutionModePixelCenterInteger);
-
- if (glslangIntermediate->getOriginUpperLeft())
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginUpperLeft);
- else
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginLowerLeft);
-
- if (glslangIntermediate->getEarlyFragmentTests())
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests);
-
- if (glslangIntermediate->getPostDepthCoverage()) {
- builder.addCapability(spv::CapabilitySampleMaskPostDepthCoverage);
- builder.addExecutionMode(shaderEntry, spv::ExecutionModePostDepthCoverage);
- builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
- }
-
- switch(glslangIntermediate->getDepth()) {
- case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
- case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
- default: mode = spv::ExecutionModeMax; break;
- }
- if (mode != spv::ExecutionModeMax)
- builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
-
- if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
- break;
-
- case EShLangCompute:
- builder.addCapability(spv::CapabilityShader);
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
- glslangIntermediate->getLocalSize(1),
- glslangIntermediate->getLocalSize(2));
-#ifdef NV_EXTENSIONS
- if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) {
- builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV);
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV);
- builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
- } else if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupLinear) {
- builder.addCapability(spv::CapabilityComputeDerivativeGroupLinearNV);
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupLinearNV);
- builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
- }
-#endif
- break;
-
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV:
case EShLangIntersectNV:
case EShLangAnyHitNV:
@@ -1536,8 +1632,10 @@ void TGlslangToSpvTraverser::finishSpv()
for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
entryPoint->addIdOperand(*it);
- // Add capabilities, extensions, remove unneeded decorations, etc.,
+ // 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();
}
@@ -1565,6 +1663,9 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
{
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();
@@ -1572,8 +1673,8 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
// Formal function parameters were mapped during makeFunctions().
spv::Id id = getSymbolId(symbol);
- // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
if (builder.isPointer(id)) {
+ // 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) {
@@ -1585,6 +1686,14 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
iOSet.insert(id);
}
}
+
+ // If the SPIR-V type is required to be different than the AST type,
+ // 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
@@ -1602,13 +1711,16 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
// 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())
+ 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()) {
@@ -1640,11 +1752,18 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
}
}
}
+#endif
}
bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node)
{
builder.setLine(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())
@@ -1734,7 +1853,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
// 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()->getBasicType() == glslang::EbtReference &&
+ if (node->getLeft()->isReference() &&
!node->getLeft()->getType().isArray() &&
node->getOp() == glslang::EOpIndexDirectStruct)
{
@@ -1749,9 +1868,12 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
{
// This may be, e.g., an anonymous block-member selection, which generally need
// index remapping due to hidden members in anonymous blocks.
- std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()];
- assert(remapper.size() > 0);
- spvIndex = remapper[glslangIndex];
+ int glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()];
+ if (memberRemapper.find(glslangId) != memberRemapper.end()) {
+ std::vector<int>& remapper = memberRemapper[glslangId];
+ assert(remapper.size() > 0);
+ spvIndex = remapper[glslangIndex];
+ }
}
// normal case for indexing array or structure or block
@@ -1860,6 +1982,71 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
}
}
+// Figure out what, if any, type changes are needed when accessing a specific built-in.
+// Returns <the type SPIR-V requires for declarion, the type to translate to on use>.
+// Also see comment for 'forceType', regarding tracking SPIR-V-required types.
+std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(spv::BuiltIn builtIn,
+ const glslang::TType& glslangType)
+{
+ switch(builtIn)
+ {
+ case spv::BuiltInSubgroupEqMask:
+ case spv::BuiltInSubgroupGeMask:
+ case spv::BuiltInSubgroupGtMask:
+ case spv::BuiltInSubgroupLeMask:
+ case spv::BuiltInSubgroupLtMask: {
+ // these require changing a 64-bit scaler -> a vector of 32-bit components
+ if (glslangType.isVector())
+ break;
+ std::pair<spv::Id, spv::Id> ret(builder.makeVectorType(builder.makeUintType(32), 4),
+ builder.makeUintType(64));
+ return ret;
+ }
+ default:
+ break;
+ }
+
+ std::pair<spv::Id, spv::Id> 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::DecorationMax, objectTypeId);
+ std::vector<spv::Id> 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::OpBitcast, desiredTypeId,
+ builder.createCompositeConstruct(vecType, components));
+ } else {
+ logger->missingFunctionality("forcing 32-bit vector type to non 64-bit scalar");
+ }
+ } else {
+ logger->missingFunctionality("forcing non 32-bit vector type");
+ }
+
+ return object;
+}
+
bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node)
{
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
@@ -1935,20 +2122,31 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
invertedType = getInvertedSwizzleType(*node->getOperand());
builder.clearAccessChain();
+ TIntermNode *operandNode;
if (invertedType != spv::NoType)
- node->getOperand()->getAsBinaryNode()->getLeft()->traverse(this);
+ operandNode = node->getOperand()->getAsBinaryNode()->getLeft();
else
- node->getOperand()->traverse(this);
+ operandNode = node->getOperand();
+
+ operandNode->traverse(this);
spv::Id operand = spv::NoResult;
+ spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags;
+
+#ifndef GLSLANG_WEB
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
node->getOp() == glslang::EOpAtomicCounter ||
- node->getOp() == glslang::EOpInterpolateAtCentroid)
+ node->getOp() == glslang::EOpInterpolateAtCentroid) {
operand = builder.accessChainGetLValue(); // Special case l-value operands
- else
+ lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
+ lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
+ } else
+#endif
+ {
operand = accessChainLoad(node->getOperand()->getType());
+ }
OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
TranslateNoContractionDecoration(node->getType().getQualifier()),
@@ -1960,12 +2158,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// if not, then possibly an operation
if (! result)
- result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType());
+ result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags);
if (result) {
if (invertedType) {
result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNonUniform(builder, result);
}
builder.clearAccessChain();
@@ -1985,6 +2183,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
spv::Id one = 0;
if (node->getBasicType() == glslang::EbtFloat)
one = builder.makeFloatConstant(1.0F);
+#ifndef GLSLANG_WEB
else if (node->getBasicType() == glslang::EbtDouble)
one = builder.makeDoubleConstant(1.0);
else if (node->getBasicType() == glslang::EbtFloat16)
@@ -1995,6 +2194,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
one = builder.makeInt16Constant(1);
else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64)
one = builder.makeInt64Constant(1);
+#endif
else
one = builder.makeIntConstant(1);
glslang::TOperator op;
@@ -2022,12 +2222,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
return false;
+#ifndef GLSLANG_WEB
case glslang::EOpEmitStreamVertex:
builder.createNoResultOp(spv::OpEmitStreamVertex, operand);
return false;
case glslang::EOpEndStreamPrimitive:
builder.createNoResultOp(spv::OpEndStreamPrimitive, operand);
return false;
+#endif
default:
logger->missingFunctionality("unknown glslang unary");
@@ -2035,6 +2237,39 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
}
}
+// Construct a composite object, recursively copying members if their types don't match
+spv::Id TGlslangToSpvTraverser::createCompositeConstruct(spv::Id resultTypeId, std::vector<spv::Id> 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::OpCopyLogical, lType, constituent);
+ } else if (builder.isStructType(rType)) {
+ std::vector<spv::Id> 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<spv::Id> 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);
@@ -2052,14 +2287,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.setAccessChainRValue(result);
return false;
- } else if (node->getOp() == glslang::EOpImageStore ||
-#ifdef AMD_EXTENSIONS
+ }
+#ifndef GLSLANG_WEB
+ else if (node->getOp() == glslang::EOpImageStore ||
node->getOp() == glslang::EOpImageStoreLod ||
-#endif
node->getOp() == glslang::EOpImageAtomicStore) {
// "imageStore" is a special case, which has no result
return false;
}
+#endif
glslang::TOperator binOp = glslang::EOpNull;
bool reduceComparison = true;
@@ -2067,6 +2303,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
bool noReturnValue = false;
bool atomic = false;
+ spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags;
+
assert(node->getOp());
spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
@@ -2264,7 +2502,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
{
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
std::vector<spv::Id> arguments;
- translateArguments(*node, arguments);
+ translateArguments(*node, arguments, lvalueCoherentFlags);
spv::Id constructed;
if (node->getOp() == glslang::EOpConstructTextureSampler)
constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments);
@@ -2274,7 +2512,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
std::vector<spv::Id> constituents;
for (int c = 0; c < (int)arguments.size(); ++c)
constituents.push_back(arguments[c]);
- constructed = builder.createCompositeConstruct(resultType(), constituents);
+ constructed = createCompositeConstruct(resultType(), constituents);
} else if (isMatrix)
constructed = builder.createMatrixConstructor(precision, arguments, resultType());
else
@@ -2327,6 +2565,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// which can be emitted by the one in createBinaryOperation()
binOp = glslang::EOpMod;
break;
+
case glslang::EOpEmitVertex:
case glslang::EOpEndPrimitive:
case glslang::EOpBarrier:
@@ -2350,10 +2589,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// These all have 0 operands and will naturally finish up in the code below for 0 operands
break;
- case glslang::EOpAtomicStore:
- noReturnValue = true;
- // fallthrough
- case glslang::EOpAtomicLoad:
case glslang::EOpAtomicAdd:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
@@ -2365,6 +2600,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
atomic = true;
break;
+#ifndef GLSLANG_WEB
+ case glslang::EOpAtomicStore:
+ noReturnValue = true;
+ // fallthrough
+ case glslang::EOpAtomicLoad:
+ atomic = true;
+ break;
+
case glslang::EOpAtomicCounterAdd:
case glslang::EOpAtomicCounterSubtract:
case glslang::EOpAtomicCounterMin:
@@ -2379,7 +2622,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
atomic = true;
break;
-#ifdef NV_EXTENSIONS
+ case glslang::EOpAbsDifference:
+ case glslang::EOpAddSaturate:
+ case glslang::EOpSubSaturate:
+ case glslang::EOpAverage:
+ case glslang::EOpAverageRounded:
+ case glslang::EOpMul32x16:
+ builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
+ builder.addExtension("SPV_INTEL_shader_integer_functions2");
+ binOp = node->getOp();
+ break;
+
case glslang::EOpIgnoreIntersectionNV:
case glslang::EOpTerminateRayNV:
case glslang::EOpTraceNV:
@@ -2387,11 +2640,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
noReturnValue = true;
break;
-#endif
case glslang::EOpCooperativeMatrixLoad:
case glslang::EOpCooperativeMatrixStore:
noReturnValue = true;
break;
+ case glslang::EOpBeginInvocationInterlock:
+ case glslang::EOpEndInvocationInterlock:
+ builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
+ noReturnValue = true;
+ break;
+#endif
default:
break;
@@ -2439,16 +2697,31 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// special case l-value operands; there are just a few
bool lvalue = false;
switch (node->getOp()) {
- case glslang::EOpFrexp:
case glslang::EOpModf:
if (arg == 1)
lvalue = true;
break;
+
+ case glslang::EOpAtomicAdd:
+ 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;
+
+#ifndef GLSLANG_WEB
+ case glslang::EOpFrexp:
+ if (arg == 1)
+ lvalue = true;
+ break;
case glslang::EOpInterpolateAtSample:
case glslang::EOpInterpolateAtOffset:
-#ifdef AMD_EXTENSIONS
case glslang::EOpInterpolateAtVertex:
-#endif
if (arg == 0) {
lvalue = true;
@@ -2459,14 +2732,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
invertedType = convertGlslangToSpvType(glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
}
break;
- case glslang::EOpAtomicAdd:
- case glslang::EOpAtomicMin:
- case glslang::EOpAtomicMax:
- case glslang::EOpAtomicAnd:
- case glslang::EOpAtomicOr:
- case glslang::EOpAtomicXor:
- case glslang::EOpAtomicExchange:
- case glslang::EOpAtomicCompSwap:
case glslang::EOpAtomicLoad:
case glslang::EOpAtomicStore:
case glslang::EOpAtomicCounterAdd:
@@ -2499,6 +2764,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if (arg == 1)
lvalue = true;
break;
+#endif
default:
break;
}
@@ -2508,6 +2774,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
else
glslangOperands[arg]->traverse(this);
+#ifndef GLSLANG_WEB
if (node->getOp() == glslang::EOpCooperativeMatrixLoad ||
node->getOp() == glslang::EOpCooperativeMatrixStore) {
@@ -2550,16 +2817,20 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
continue;
}
}
+#endif
- if (lvalue)
+ if (lvalue) {
operands.push_back(builder.accessChainGetLValue());
- else {
+ lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
+ lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType());
+ } else {
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
}
}
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
+#ifndef GLSLANG_WEB
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
std::vector<spv::IdImmediate> idImmOps;
@@ -2586,9 +2857,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
result = 0;
- } else if (atomic) {
+ } else
+#endif
+ if (atomic) {
// Handle all atomics
- result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType());
+ result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
} else {
// Pass through to generic operations.
switch (glslangOperands.size()) {
@@ -2603,7 +2876,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
result = createUnaryOperation(
node->getOp(), decorations,
resultType(), operands.front(),
- glslangOperands[0]->getAsTyped()->getBasicType());
+ glslangOperands[0]->getAsTyped()->getBasicType(), lvalueCoherentFlags);
}
break;
default:
@@ -2965,6 +3238,14 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
builder.clearAccessChain();
break;
+#ifndef GLSLANG_WEB
+ case glslang::EOpDemote:
+ builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT);
+ builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
+ builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
+ break;
+#endif
+
default:
assert(0);
break;
@@ -2973,7 +3254,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
return false;
}
-spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* node)
+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.
@@ -2986,51 +3267,57 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
// Now, handle actual variables
spv::StorageClass storageClass = TranslateStorageClass(node->getType());
- spv::Id spvType = convertGlslangToSpvType(node->getType());
+ spv::Id spvType = forcedType == spv::NoType ? convertGlslangToSpvType(node->getType())
+ : forcedType;
- const bool contains16BitType = node->getType().containsBasicType(glslang::EbtFloat16) ||
- node->getType().containsBasicType(glslang::EbtInt16) ||
- node->getType().containsBasicType(glslang::EbtUint16);
+ const bool contains16BitType = node->getType().contains16BitFloat() ||
+ node->getType().contains16BitInt();
if (contains16BitType) {
switch (storageClass) {
case spv::StorageClassInput:
case spv::StorageClassOutput:
- addPre13Extension(spv::E_SPV_KHR_16bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
builder.addCapability(spv::CapabilityStorageInputOutput16);
break;
- case spv::StorageClassPushConstant:
- addPre13Extension(spv::E_SPV_KHR_16bit_storage);
- builder.addCapability(spv::CapabilityStoragePushConstant16);
- break;
case spv::StorageClassUniform:
- addPre13Extension(spv::E_SPV_KHR_16bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
if (node->getType().getQualifier().storage == glslang::EvqBuffer)
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
else
builder.addCapability(spv::CapabilityStorageUniform16);
break;
+#ifndef GLSLANG_WEB
+ case spv::StorageClassPushConstant:
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
+ builder.addCapability(spv::CapabilityStoragePushConstant16);
+ break;
case spv::StorageClassStorageBuffer:
case spv::StorageClassPhysicalStorageBufferEXT:
- addPre13Extension(spv::E_SPV_KHR_16bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
break;
+#endif
default:
+ if (node->getType().contains16BitFloat())
+ builder.addCapability(spv::CapabilityFloat16);
+ if (node->getType().contains16BitInt())
+ builder.addCapability(spv::CapabilityInt16);
break;
}
}
- const bool contains8BitType = node->getType().containsBasicType(glslang::EbtInt8) ||
- node->getType().containsBasicType(glslang::EbtUint8);
- if (contains8BitType) {
+ if (node->getType().contains8BitInt()) {
if (storageClass == spv::StorageClassPushConstant) {
- builder.addExtension(spv::E_SPV_KHR_8bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
builder.addCapability(spv::CapabilityStoragePushConstant8);
} else if (storageClass == spv::StorageClassUniform) {
- builder.addExtension(spv::E_SPV_KHR_8bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
} else if (storageClass == spv::StorageClassStorageBuffer) {
- builder.addExtension(spv::E_SPV_KHR_8bit_storage);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
+ } else {
+ builder.addCapability(spv::CapabilityInt8);
}
}
@@ -3045,15 +3332,15 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
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);
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
case glslang::EbtFloat16:
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
builder.addCapability(spv::CapabilityFloat16ImageAMD);
return builder.makeFloatType(16);
#endif
- case glslang::EbtInt: return builder.makeIntType(32);
- case glslang::EbtUint: return builder.makeUintType(32);
default:
assert(0);
return builder.makeFloatType(32);
@@ -3111,23 +3398,30 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
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;
+#ifndef GLSLANG_WEB
case glslang::EbtDouble:
spvType = builder.makeFloatType(64);
break;
case glslang::EbtFloat16:
spvType = builder.makeFloatType(16);
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::EbtInt8:
spvType = builder.makeIntType(8);
break;
@@ -3140,12 +3434,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
case glslang::EbtUint16:
spvType = builder.makeUintType(16);
break;
- case glslang::EbtInt:
- spvType = builder.makeIntType(32);
- break;
- case glslang::EbtUint:
- spvType = builder.makeUintType(32);
- break;
case glslang::EbtInt64:
spvType = builder.makeIntType(64);
break;
@@ -3156,22 +3444,38 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
builder.addCapability(spv::CapabilityAtomicStorage);
spvType = builder.makeUintType(32);
break;
-#ifdef NV_EXTENSIONS
case glslang::EbtAccStructNV:
spvType = builder.makeAccelerationStructureNVType();
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::StorageClassPhysicalStorageBufferEXT);
+ forwardPointers[type.getReferentType()] = forwardId;
+ }
+ spvType = forwardPointers[type.getReferentType()];
+ if (!forwardReferenceOnly) {
+ spv::Id referentType = convertGlslangToSpvType(*type.getReferentType());
+ builder.makePointerFromForwardPointer(spv::StorageClassPhysicalStorageBufferEXT,
+ forwardPointers[type.getReferentType()],
+ referentType);
+ }
+ }
+ break;
#endif
case glslang::EbtSampler:
{
const glslang::TSampler& sampler = type.getSampler();
- if (sampler.sampler) {
- // pure sampler
+ if (sampler.isPureSampler()) {
spvType = builder.makeSamplerType();
} else {
// an image is present, make its type
- spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
- sampler.image ? 2 : 1, TranslateImageFormat(type));
- if (sampler.combined) {
+ spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler),
+ sampler.isShadow(), sampler.isArrayed(), sampler.isMultiSample(),
+ sampler.isImageClass() ? 2 : 1, TranslateImageFormat(type));
+ if (sampler.isCombined()) {
// already has both image and sampler, make the combined type
spvType = builder.makeSampledImageType(spvType);
}
@@ -3193,27 +3497,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
// else, we haven't seen it...
if (type.getBasicType() == glslang::EbtBlock)
- memberRemapper[glslangMembers].resize(glslangMembers->size());
+ memberRemapper[glslangTypeToIdMap[glslangMembers]].resize(glslangMembers->size());
spvType = convertGlslangStructToSpvType(type, glslangMembers, explicitLayout, qualifier);
}
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::StorageClassPhysicalStorageBufferEXT);
- forwardPointers[type.getReferentType()] = forwardId;
- }
- spvType = forwardPointers[type.getReferentType()];
- if (!forwardReferenceOnly) {
- spv::Id referentType = convertGlslangToSpvType(*type.getReferentType());
- builder.makePointerFromForwardPointer(spv::StorageClassPhysicalStorageBufferEXT,
- forwardPointers[type.getReferentType()],
- referentType);
- }
- }
- break;
default:
assert(0);
break;
@@ -3232,6 +3519,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
builder.addExtension(spv::E_SPV_NV_cooperative_matrix);
if (type.getBasicType() == glslang::EbtFloat16)
builder.addCapability(spv::CapabilityFloat16);
+ if (type.getBasicType() == glslang::EbtUint8 ||
+ type.getBasicType() == glslang::EbtInt8) {
+ builder.addCapability(spv::CapabilityInt8);
+ }
spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1);
spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2);
@@ -3278,10 +3569,12 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
if (type.isSizedArray())
spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride);
else {
+#ifndef GLSLANG_WEB
if (!lastBufferBlockMember) {
- builder.addExtension("SPV_EXT_descriptor_indexing");
+ builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
}
+#endif
spvType = builder.makeRuntimeArray(spvType);
}
if (stride > 0)
@@ -3297,7 +3590,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
//
bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member)
{
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
auto& extensions = glslangIntermediate->getRequestedExtensions();
if (member.getFieldName() == "gl_SecondaryViewportMaskNV" &&
@@ -3340,12 +3633,15 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
if (glslangMember.hiddenMember()) {
++memberDelta;
if (type.getBasicType() == glslang::EbtBlock)
- memberRemapper[glslangMembers][i] = -1;
+ memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1;
} else {
if (type.getBasicType() == glslang::EbtBlock) {
- memberRemapper[glslangMembers][i] = i - memberDelta;
- if (filterMember(glslangMember))
+ if (filterMember(glslangMember)) {
+ 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.getQualifier();
@@ -3361,7 +3657,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
// Make forward pointers for any pointer members, and create a list of members to
// convert to spirv types after creating the struct.
- if (glslangMember.getBasicType() == glslang::EbtReference) {
+ if (glslangMember.isReference()) {
if (forwardPointers.find(glslangMember.getReferentType()) == forwardPointers.end()) {
deferredForwardPointers.push_back(std::make_pair(&glslangMember, memberQualifier));
}
@@ -3403,7 +3699,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
glslang::TType& glslangMember = *(*glslangMembers)[i].type;
int member = i;
if (type.getBasicType() == glslang::EbtBlock) {
- member = memberRemapper[glslangMembers][i];
+ member = memberRemapper[glslangTypeToIdMap[glslangMembers]][i];
if (filterMember(glslangMember))
continue;
}
@@ -3428,13 +3724,14 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
glslangIntermediate->getSource() == glslang::EShSourceHlsl) {
builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier));
builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier));
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
addMeshNVDecoration(spvType, member, memberQualifier);
#endif
}
}
builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier));
+#ifndef GLSLANG_WEB
if (type.getBasicType() == glslang::EbtBlock &&
qualifier.storage == glslang::EvqBuffer) {
// Add memory decorations only to top-level members of shader storage block
@@ -3444,6 +3741,8 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
builder.addMemberDecoration(spvType, member, memory[i]);
}
+#endif
+
// 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
@@ -3480,6 +3779,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
if (builtIn != spv::BuiltInMax)
builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
+#ifndef GLSLANG_WEB
// nonuniform
builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier()));
@@ -3489,7 +3789,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
memberQualifier.semanticName);
}
-#ifdef NV_EXTENSIONS
if (builtIn == spv::BuiltInLayer) {
// SPV_NV_viewport_array2 extension
if (glslangMember.getQualifier().layoutViewportRelative){
@@ -3828,10 +4127,10 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
const glslang::TBuiltInVariable glslangBuiltIn = members[glslangMember].type->getQualifier().builtIn;
switch (glslangBuiltIn)
{
+ case glslang::EbvPointSize:
+#ifndef GLSLANG_WEB
case glslang::EbvClipDistance:
case glslang::EbvCullDistance:
- case glslang::EbvPointSize:
-#ifdef NV_EXTENSIONS
case glslang::EbvViewportMaskNV:
case glslang::EbvSecondaryPositionNV:
case glslang::EbvSecondaryViewportMaskNV:
@@ -3894,15 +4193,17 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
if (paramPrecision != spv::NoPrecision)
decorations.push_back(paramPrecision);
TranslateMemoryDecoration(type.getQualifier(), decorations, useVulkanMemoryModel);
- if (type.getBasicType() == glslang::EbtReference) {
+ 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)) {
- decorations.push_back(type.getQualifier().restrict ? spv::DecorationRestrict : spv::DecorationAliased);
+ decorations.push_back(type.getQualifier().isRestrict() ? spv::DecorationRestrict :
+ spv::DecorationAliased);
} else {
- decorations.push_back(type.getQualifier().restrict ? spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
+ decorations.push_back(type.getQualifier().isRestrict() ? spv::DecorationRestrictPointerEXT :
+ spv::DecorationAliasedPointerEXT);
}
}
};
@@ -3930,8 +4231,12 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
std::vector<std::vector<spv::Decoration>> 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) {
@@ -3963,6 +4268,14 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
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::CapabilityInt8);
+ if (paramType.contains16BitInt())
+ builder.addCapability(spv::CapabilityInt16);
+ if (paramType.contains16BitFloat())
+ builder.addCapability(spv::CapabilityFloat16);
}
}
}
@@ -4001,19 +4314,19 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate
builder.setBuildPoint(functionBlock);
}
-void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments)
+void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
const glslang::TIntermSequence& glslangArguments = node.getSequence();
glslang::TSampler sampler = {};
bool cubeCompare = false;
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
bool f16ShadowCompare = false;
#endif
if (node.isTexture() || node.isImage()) {
sampler = glslangArguments[0]->getAsTyped()->getType().getSampler();
cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16;
#endif
}
@@ -4022,6 +4335,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
builder.clearAccessChain();
glslangArguments[i]->traverse(this);
+#ifndef GLSLANG_WEB
// Special case l-value operands
bool lvalue = false;
switch (node.getOp()) {
@@ -4042,7 +4356,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if ((sampler.ms && i == 3) || (! sampler.ms && i == 2))
lvalue = true;
break;
-#ifdef AMD_EXTENSIONS
case glslang::EOpSparseTexture:
if (((cubeCompare || f16ShadowCompare) && i == 3) || (! (cubeCompare || f16ShadowCompare) && i == 2))
lvalue = true;
@@ -4056,21 +4369,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if ((f16ShadowCompare && i == 4) || (! f16ShadowCompare && i == 3))
lvalue = true;
break;
-#else
- case glslang::EOpSparseTexture:
- if ((cubeCompare && i == 3) || (! cubeCompare && i == 2))
- lvalue = true;
- break;
- case glslang::EOpSparseTextureClamp:
- if ((cubeCompare && i == 4) || (! cubeCompare && i == 3))
- lvalue = true;
- break;
- case glslang::EOpSparseTextureLod:
- case glslang::EOpSparseTextureOffset:
- if (i == 3)
- lvalue = true;
- break;
-#endif
case glslang::EOpSparseTextureFetch:
if ((sampler.dim != glslang::EsdRect && i == 3) || (sampler.dim == glslang::EsdRect && i == 2))
lvalue = true;
@@ -4079,7 +4377,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if ((sampler.dim != glslang::EsdRect && i == 4) || (sampler.dim == glslang::EsdRect && i == 3))
lvalue = true;
break;
-#ifdef AMD_EXTENSIONS
case glslang::EOpSparseTextureLodOffset:
case glslang::EOpSparseTextureGrad:
case glslang::EOpSparseTextureOffsetClamp:
@@ -4095,23 +4392,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if ((f16ShadowCompare && i == 7) || (! f16ShadowCompare && i == 6))
lvalue = true;
break;
-#else
- case glslang::EOpSparseTextureLodOffset:
- case glslang::EOpSparseTextureGrad:
- case glslang::EOpSparseTextureOffsetClamp:
- if (i == 4)
- lvalue = true;
- break;
- case glslang::EOpSparseTextureGradOffset:
- case glslang::EOpSparseTextureGradClamp:
- if (i == 5)
- lvalue = true;
- break;
- case glslang::EOpSparseTextureGradOffsetClamp:
- if (i == 6)
- lvalue = true;
- break;
-#endif
case glslang::EOpSparseTextureGather:
if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2))
lvalue = true;
@@ -4121,7 +4401,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if ((sampler.shadow && i == 4) || (! sampler.shadow && i == 3))
lvalue = true;
break;
-#ifdef AMD_EXTENSIONS
case glslang::EOpSparseTextureGatherLod:
if (i == 3)
lvalue = true;
@@ -4135,8 +4414,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if (i == 3)
lvalue = true;
break;
-#endif
-#ifdef NV_EXTENSIONS
case glslang::EOpImageSampleFootprintNV:
if (i == 4)
lvalue = true;
@@ -4154,14 +4431,16 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if (i == 7)
lvalue = true;
break;
-#endif
default:
break;
}
- if (lvalue)
+ if (lvalue) {
arguments.push_back(builder.accessChainGetLValue());
- else
+ lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
+ lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType());
+ } else
+#endif
arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType()));
}
}
@@ -4186,7 +4465,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()
: node->getAsUnaryNode()->getOperand()->getAsTyped()->getType();
const glslang::TSampler sampler = imageType.getSampler();
-#ifdef AMD_EXTENSIONS
+#ifdef GLSLANG_WEB
+ const bool f16ShadowCompare = false;
+#else
bool f16ShadowCompare = (sampler.shadow && node->getAsAggregate())
? node->getAsAggregate()->getSequence()[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16
: false;
@@ -4202,9 +4483,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
return spv::ImageOperandsMaskNone;
};
+ spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags;
+
std::vector<spv::Id> arguments;
if (node->getAsAggregate())
- translateArguments(*node->getAsAggregate(), arguments);
+ translateArguments(*node->getAsAggregate(), arguments, lvalueCoherentFlags);
else
translateArguments(*node->getAsUnaryNode(), arguments);
spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
@@ -4231,6 +4514,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params, isUnsignedResult);
} else
return builder.createTextureQueryCall(spv::OpImageQuerySize, params, isUnsignedResult);
+#ifndef GLSLANG_WEB
case glslang::EOpImageQuerySamples:
case glslang::EOpTextureQuerySamples:
return builder.createTextureQueryCall(spv::OpImageQuerySamples, params, isUnsignedResult);
@@ -4241,6 +4525,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
return builder.createTextureQueryCall(spv::OpImageQueryLevels, params, isUnsignedResult);
case glslang::EOpSparseTexelsResident:
return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]);
+#endif
default:
assert(0);
break;
@@ -4282,12 +4567,12 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
operands.push_back(coord);
spv::IdImmediate imageOperands = { false, spv::ImageOperandsMaskNone };
imageOperands.word = imageOperands.word | signExtensionMask();
- if (sampler.ms) {
+ if (sampler.isMultiSample()) {
imageOperands.word = imageOperands.word | spv::ImageOperandsSampleMask;
}
if (imageOperands.word != spv::ImageOperandsMaskNone) {
operands.push_back(imageOperands);
- if (sampler.ms) {
+ if (sampler.isMultiSample()) {
spv::IdImmediate imageOperand = { true, *(opIt++) };
operands.push_back(imageOperand);
}
@@ -4299,22 +4584,16 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
spv::IdImmediate coord = { true, *(opIt++) };
operands.push_back(coord);
-#ifdef AMD_EXTENSIONS
if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) {
-#else
- if (node->getOp() == glslang::EOpImageLoad) {
-#endif
spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone;
- if (sampler.ms) {
+ if (sampler.isMultiSample()) {
mask = mask | spv::ImageOperandsSampleMask;
}
-#ifdef AMD_EXTENSIONS
if (cracked.lod) {
builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
mask = mask | spv::ImageOperandsLodMask;
}
-#endif
mask = mask | TranslateImageOperands(TranslateCoherent(imageType));
mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMakeTexelAvailableKHRMask);
mask = mask | signExtensionMask();
@@ -4326,12 +4605,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#ifdef AMD_EXTENSIONS
if (mask & spv::ImageOperandsLodMask) {
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#endif
if (mask & spv::ImageOperandsMakeTexelVisibleKHRMask) {
spv::IdImmediate imageOperand = { true,
builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) };
@@ -4349,18 +4626,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType()));
return result[0];
-#ifdef AMD_EXTENSIONS
} else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) {
-#else
- } else if (node->getOp() == glslang::EOpImageStore) {
-#endif
// Push the texel value before the operands
-#ifdef AMD_EXTENSIONS
- if (sampler.ms || cracked.lod) {
-#else
- if (sampler.ms) {
-#endif
+ if (sampler.isMultiSample() || cracked.lod) {
spv::IdImmediate texel = { true, *(opIt + 1) };
operands.push_back(texel);
} else {
@@ -4369,16 +4638,14 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone;
- if (sampler.ms) {
+ if (sampler.isMultiSample()) {
mask = mask | spv::ImageOperandsSampleMask;
}
-#ifdef AMD_EXTENSIONS
if (cracked.lod) {
builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
mask = mask | spv::ImageOperandsLodMask;
}
-#endif
mask = mask | TranslateImageOperands(TranslateCoherent(imageType));
mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMakeTexelVisibleKHRMask);
mask = mask | signExtensionMask();
@@ -4390,12 +4657,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#ifdef AMD_EXTENSIONS
if (mask & spv::ImageOperandsLodMask) {
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#endif
if (mask & spv::ImageOperandsMakeTexelAvailableKHRMask) {
spv::IdImmediate imageOperand = { true,
builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) };
@@ -4406,28 +4671,22 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
if (builder.getImageTypeFormat(builder.getImageType(operands.front().word)) == spv::ImageFormatUnknown)
builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat);
return spv::NoResult;
-#ifdef AMD_EXTENSIONS
} else if (node->getOp() == glslang::EOpSparseImageLoad ||
node->getOp() == glslang::EOpSparseImageLoadLod) {
-#else
- } else if (node->getOp() == glslang::EOpSparseImageLoad) {
-#endif
builder.addCapability(spv::CapabilitySparseResidency);
if (builder.getImageTypeFormat(builder.getImageType(operands.front().word)) == spv::ImageFormatUnknown)
builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone;
- if (sampler.ms) {
+ if (sampler.isMultiSample()) {
mask = mask | spv::ImageOperandsSampleMask;
}
-#ifdef AMD_EXTENSIONS
if (cracked.lod) {
builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
mask = mask | spv::ImageOperandsLodMask;
}
-#endif
mask = mask | TranslateImageOperands(TranslateCoherent(imageType));
mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMakeTexelAvailableKHRMask);
mask = mask | signExtensionMask();
@@ -4439,12 +4698,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#ifdef AMD_EXTENSIONS
if (mask & spv::ImageOperandsLodMask) {
spv::IdImmediate imageOperand = { true, *opIt++ };
operands.push_back(imageOperand);
}
-#endif
if (mask & spv::ImageOperandsMakeTexelVisibleKHRMask) {
spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) };
operands.push_back(imageOperand);
@@ -4467,7 +4724,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// 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.ms ? *(opIt++) : builder.makeUintConstant(0) };
+ spv::IdImmediate sample = { true, sampler.isMultiSample() ? *(opIt++) : builder.makeUintConstant(0) };
operands.push_back(sample);
spv::Id resultTypeId;
@@ -4485,11 +4742,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
for (; opIt != arguments.end(); ++opIt)
operands.push_back(*opIt);
- return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType());
+ return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
}
}
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
// Check for fragment mask functions other than queries
if (cracked.fragMask) {
assert(sampler.ms);
@@ -4530,45 +4787,32 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// Check for texture functions other than queries
bool sparse = node->isSparseTexture();
-#ifdef NV_EXTENSIONS
bool imageFootprint = node->isImageFootprint();
-#endif
-
- bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
+ bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.isArrayed() && sampler.isShadow();
// check for bias argument
bool bias = false;
-#ifdef AMD_EXTENSIONS
if (! cracked.lod && ! cracked.grad && ! cracked.fetch && ! cubeCompare) {
-#else
- if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch && ! cubeCompare) {
-#endif
int nonBiasArgCount = 2;
-#ifdef AMD_EXTENSIONS
if (cracked.gather)
++nonBiasArgCount; // comp argument should be present when bias argument is present
if (f16ShadowCompare)
++nonBiasArgCount;
-#endif
if (cracked.offset)
++nonBiasArgCount;
-#ifdef AMD_EXTENSIONS
else if (cracked.offsets)
++nonBiasArgCount;
-#endif
if (cracked.grad)
nonBiasArgCount += 2;
if (cracked.lodClamp)
++nonBiasArgCount;
if (sparse)
++nonBiasArgCount;
-#ifdef NV_EXTENSIONS
if (imageFootprint)
//Following three extra arguments
// int granularity, bool coarse, out gl_TextureFootprint2DNV footprint
nonBiasArgCount += 3;
-#endif
if ((int)arguments.size() > nonBiasArgCount)
bias = true;
}
@@ -4580,7 +4824,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
}
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
if (cracked.gather) {
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
if (bias || cracked.lod ||
@@ -4598,11 +4842,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
bool noImplicitLod = false;
// sort out where Dref is coming from
-#ifdef AMD_EXTENSIONS
if (cubeCompare || f16ShadowCompare) {
-#else
- if (cubeCompare) {
-#endif
params.Dref = arguments[2];
++extraArgs;
} else if (sampler.shadow && cracked.gather) {
@@ -4623,19 +4863,15 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
if (cracked.lod) {
params.lod = arguments[2 + extraArgs];
++extraArgs;
- } else if (glslangIntermediate->getStage() != EShLangFragment
-#ifdef NV_EXTENSIONS
- // NV_compute_shader_derivatives layout qualifiers allow for implicit LODs
- && !(glslangIntermediate->getStage() == EShLangCompute &&
- (glslangIntermediate->getLayoutDerivativeModeNone() != glslang::LayoutDerivativeNone))
-#endif
- ) {
+ } 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.ms) {
+ if (sampler.isMultiSample()) {
params.sample = arguments[2 + extraArgs]; // For MS, "sample" should be specified
++extraArgs;
}
@@ -4656,6 +4892,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
++extraArgs;
}
+#ifndef GLSLANG_WEB
// lod clamp
if (cracked.lodClamp) {
params.lodClamp = arguments[2 + extraArgs];
@@ -4666,7 +4903,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
params.texelOut = arguments[2 + extraArgs];
++extraArgs;
}
-
// gather component
if (cracked.gather && ! sampler.shadow) {
// default component is 0, if missing, otherwise an argument
@@ -4676,7 +4912,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
} else
params.component = builder.makeIntConstant(0);
}
-#ifdef NV_EXTENSIONS
spv::Id resultStruct = spv::NoResult;
if (imageFootprint) {
//Following three extra arguments
@@ -4693,7 +4928,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
++extraArgs;
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
if (imageFootprint) {
builder.addExtension(spv::E_SPV_NV_shader_image_footprint);
builder.addCapability(spv::CapabilityImageFootprintNV);
@@ -4776,6 +5011,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
}
+#ifndef GLSLANG_WEB
// nonprivate
if (imageType.getQualifier().nonprivate) {
params.nonprivate = true;
@@ -4785,6 +5021,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
if (imageType.getQualifier().volatil) {
params.volatil = true;
}
+#endif
std::vector<spv::Id> result( 1,
builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather,
@@ -5019,6 +5256,30 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
binOp = spv::OpLogicalNotEqual;
break;
+ case glslang::EOpAbsDifference:
+ binOp = isUnsigned ? spv::OpAbsUSubINTEL : spv::OpAbsISubINTEL;
+ break;
+
+ case glslang::EOpAddSaturate:
+ binOp = isUnsigned ? spv::OpUAddSatINTEL : spv::OpIAddSatINTEL;
+ break;
+
+ case glslang::EOpSubSaturate:
+ binOp = isUnsigned ? spv::OpUSubSatINTEL : spv::OpISubSatINTEL;
+ break;
+
+ case glslang::EOpAverage:
+ binOp = isUnsigned ? spv::OpUAverageINTEL : spv::OpIAverageINTEL;
+ break;
+
+ case glslang::EOpAverageRounded:
+ binOp = isUnsigned ? spv::OpUAverageRoundedINTEL : spv::OpIAverageRoundedINTEL;
+ break;
+
+ case glslang::EOpMul32x16:
+ binOp = isUnsigned ? spv::OpUMul32x16INTEL : spv::OpIMul32x16INTEL;
+ break;
+
case glslang::EOpLessThan:
case glslang::EOpGreaterThan:
case glslang::EOpLessThanEqual:
@@ -5045,8 +5306,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
builder.promoteScalar(decorations.precision, left, right);
spv::Id result = builder.createBinOp(binOp, typeId, left, right);
- builder.addDecoration(result, decorations.noContraction);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNoContraction(builder, result);
+ decorations.addNonUniform(builder, result);
return builder.setPrecision(result, decorations.precision);
}
@@ -5058,7 +5319,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
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);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNonUniform(builder, result);
return result;
}
@@ -5119,8 +5380,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
if (binOp != spv::OpNop) {
spv::Id result = builder.createBinOp(binOp, typeId, left, right);
- builder.addDecoration(result, decorations.noContraction);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNoContraction(builder, result);
+ decorations.addNonUniform(builder, result);
return builder.setPrecision(result, decorations.precision);
}
@@ -5184,8 +5445,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
if (firstClass) {
spv::Id result = builder.createBinOp(op, typeId, left, right);
- builder.addDecoration(result, decorations.noContraction);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNoContraction(builder, result);
+ decorations.addNonUniform(builder, result);
return builder.setPrecision(result, decorations.precision);
}
@@ -5224,14 +5485,14 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
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);
- builder.addDecoration(result, decorations.noContraction);
- builder.addDecoration(result, decorations.nonUniform);
+ 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);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNonUniform(builder, result);
return result;
}
default:
@@ -5241,7 +5502,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
}
spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId,
- spv::Id operand, glslang::TBasicType typeProxy)
+ spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
spv::Op unaryOp = spv::OpNop;
int extBuiltins = -1;
@@ -5409,6 +5670,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpUnpackHalf2x16:
libCall = spv::GLSLstd450UnpackHalf2x16;
break;
+#ifndef GLSLANG_WEB
case glslang::EOpPackSnorm4x8:
libCall = spv::GLSLstd450PackSnorm4x8;
break;
@@ -5427,6 +5689,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpUnpackDouble2x32:
libCall = spv::GLSLstd450UnpackDouble2x32;
break;
+#endif
case glslang::EOpPackInt2x32:
case glslang::EOpUnpackInt2x32:
@@ -5460,6 +5723,28 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpFwidth:
unaryOp = spv::OpFwidth;
break;
+
+ case glslang::EOpAny:
+ unaryOp = spv::OpAny;
+ break;
+ case glslang::EOpAll:
+ unaryOp = spv::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;
+
+#ifndef GLSLANG_WEB
case glslang::EOpDPdxFine:
unaryOp = spv::OpDPdxFine;
break;
@@ -5479,32 +5764,10 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
unaryOp = spv::OpFwidthCoarse;
break;
case glslang::EOpInterpolateAtCentroid:
-#ifdef AMD_EXTENSIONS
if (typeProxy == glslang::EbtFloat16)
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
-#endif
libCall = spv::GLSLstd450InterpolateAtCentroid;
break;
- case glslang::EOpAny:
- unaryOp = spv::OpAny;
- break;
- case glslang::EOpAll:
- unaryOp = spv::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::EOpAtomicCounterIncrement:
case glslang::EOpAtomicCounterDecrement:
case glslang::EOpAtomicCounter:
@@ -5512,7 +5775,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
// Handle all of the atomics in one place, in createAtomicOperation()
std::vector<spv::Id> operands;
operands.push_back(operand);
- return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy);
+ return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy, lvalueCoherentFlags);
}
case glslang::EOpBitFieldReverse:
@@ -5531,12 +5794,23 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
libCall = spv::GLSLstd450FindSMsb;
break;
+ case glslang::EOpCountLeadingZeros:
+ builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
+ builder.addExtension("SPV_INTEL_shader_integer_functions2");
+ unaryOp = spv::OpUCountLeadingZerosINTEL;
+ break;
+
+ case glslang::EOpCountTrailingZeros:
+ builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
+ builder.addExtension("SPV_INTEL_shader_integer_functions2");
+ unaryOp = spv::OpUCountTrailingZerosINTEL;
+ break;
+
case glslang::EOpBallot:
case glslang::EOpReadFirstInvocation:
case glslang::EOpAnyInvocation:
case glslang::EOpAllInvocations:
case glslang::EOpAllInvocationsEqual:
-#ifdef AMD_EXTENSIONS
case glslang::EOpMinInvocations:
case glslang::EOpMaxInvocations:
case glslang::EOpAddInvocations:
@@ -5555,7 +5829,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpMinInvocationsExclusiveScanNonUniform:
case glslang::EOpMaxInvocationsExclusiveScanNonUniform:
case glslang::EOpAddInvocationsExclusiveScanNonUniform:
-#endif
{
std::vector<spv::Id> operands;
operands.push_back(operand);
@@ -5600,7 +5873,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
operands.push_back(operand);
return createSubgroupOperation(op, typeId, operands, typeProxy);
}
-#ifdef AMD_EXTENSIONS
case glslang::EOpMbcnt:
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot);
libCall = spv::MbcntAMD;
@@ -5615,15 +5887,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_gcn_shader);
libCall = spv::CubeFaceCoordAMD;
break;
-#endif
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartition:
unaryOp = spv::OpGroupNonUniformPartitionNV;
break;
-#endif
case glslang::EOpConstructReference:
unaryOp = spv::OpBitcast;
break;
+#endif
case glslang::EOpCopyObject:
unaryOp = spv::OpCopyObject;
@@ -5642,8 +5912,8 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
id = builder.createUnaryOp(unaryOp, typeId, operand);
}
- builder.addDecoration(id, decorations.noContraction);
- builder.addDecoration(id, decorations.nonUniform);
+ decorations.addNoContraction(builder, id);
+ decorations.addNonUniform(builder, id);
return builder.setPrecision(id, decorations.precision);
}
@@ -5671,14 +5941,14 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat
indexes.push_back(c);
spv::Id srcVec = builder.createCompositeExtract(operand, srcVecType, indexes);
spv::Id destVec = builder.createUnaryOp(op, destVecType, srcVec);
- builder.addDecoration(destVec, decorations.noContraction);
- builder.addDecoration(destVec, decorations.nonUniform);
+ 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);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNonUniform(builder, result);
return result;
}
@@ -5770,110 +6040,49 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
int vectorSize = builder.isVectorType(destType) ? builder.getNumTypeComponents(destType) : 0;
switch (op) {
- case glslang::EOpConvInt8ToBool:
- case glslang::EOpConvUint8ToBool:
- zero = builder.makeUint8Constant(0);
- zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
- case glslang::EOpConvInt16ToBool:
- case glslang::EOpConvUint16ToBool:
- zero = builder.makeUint16Constant(0);
- zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
case glslang::EOpConvIntToBool:
case glslang::EOpConvUintToBool:
zero = builder.makeUintConstant(0);
zero = makeSmearedConstant(zero, vectorSize);
return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
- case glslang::EOpConvInt64ToBool:
- case glslang::EOpConvUint64ToBool:
- zero = builder.makeUint64Constant(0);
- zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
-
case glslang::EOpConvFloatToBool:
zero = builder.makeFloatConstant(0.0F);
zero = makeSmearedConstant(zero, vectorSize);
return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
-
- case glslang::EOpConvDoubleToBool:
- zero = builder.makeDoubleConstant(0.0);
- zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
-
- case glslang::EOpConvFloat16ToBool:
- zero = builder.makeFloat16Constant(0.0F);
- zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
-
case glslang::EOpConvBoolToFloat:
convOp = spv::OpSelect;
zero = builder.makeFloatConstant(0.0F);
one = builder.makeFloatConstant(1.0F);
break;
- case glslang::EOpConvBoolToDouble:
- convOp = spv::OpSelect;
- zero = builder.makeDoubleConstant(0.0);
- one = builder.makeDoubleConstant(1.0);
- break;
-
- case glslang::EOpConvBoolToFloat16:
- convOp = spv::OpSelect;
- zero = builder.makeFloat16Constant(0.0F);
- one = builder.makeFloat16Constant(1.0F);
- break;
-
- case glslang::EOpConvBoolToInt8:
- zero = builder.makeInt8Constant(0);
- one = builder.makeInt8Constant(1);
- convOp = spv::OpSelect;
- break;
-
- case glslang::EOpConvBoolToUint8:
- zero = builder.makeUint8Constant(0);
- one = builder.makeUint8Constant(1);
- convOp = spv::OpSelect;
- break;
-
- case glslang::EOpConvBoolToInt16:
- zero = builder.makeInt16Constant(0);
- one = builder.makeInt16Constant(1);
- convOp = spv::OpSelect;
- break;
-
- case glslang::EOpConvBoolToUint16:
- zero = builder.makeUint16Constant(0);
- one = builder.makeUint16Constant(1);
- convOp = spv::OpSelect;
- break;
-
case glslang::EOpConvBoolToInt:
case glslang::EOpConvBoolToInt64:
- if (op == glslang::EOpConvBoolToInt64)
+#ifndef GLSLANG_WEB
+ if (op == glslang::EOpConvBoolToInt64) {
zero = builder.makeInt64Constant(0);
- else
- zero = builder.makeIntConstant(0);
-
- if (op == glslang::EOpConvBoolToInt64)
one = builder.makeInt64Constant(1);
- else
+ } else
+#endif
+ {
+ zero = builder.makeIntConstant(0);
one = builder.makeIntConstant(1);
+ }
convOp = spv::OpSelect;
break;
case glslang::EOpConvBoolToUint:
case glslang::EOpConvBoolToUint64:
- if (op == glslang::EOpConvBoolToUint64)
+#ifndef GLSLANG_WEB
+ if (op == glslang::EOpConvBoolToUint64) {
zero = builder.makeUint64Constant(0);
- else
- zero = builder.makeUintConstant(0);
-
- if (op == glslang::EOpConvBoolToUint64)
one = builder.makeUint64Constant(1);
- else
+ } else
+#endif
+ {
+ zero = builder.makeUintConstant(0);
one = builder.makeUintConstant(1);
+ }
convOp = spv::OpSelect;
break;
@@ -5908,17 +6117,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
convOp = spv::OpConvertUToF;
break;
- case glslang::EOpConvDoubleToFloat:
- case glslang::EOpConvFloatToDouble:
- case glslang::EOpConvDoubleToFloat16:
- case glslang::EOpConvFloat16ToDouble:
- case glslang::EOpConvFloatToFloat16:
- case glslang::EOpConvFloat16ToFloat:
- convOp = spv::OpFConvert;
- if (builder.isMatrixType(destType))
- return createUnaryMatrixOperation(convOp, decorations, destType, operand, typeProxy);
- break;
-
case glslang::EOpConvFloat16ToInt8:
case glslang::EOpConvFloatToInt8:
case glslang::EOpConvDoubleToInt8:
@@ -5944,13 +6142,16 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
case glslang::EOpConvInt64ToUint64:
if (builder.isInSpecConstCodeGenMode()) {
// Build zero scalar or vector for OpIAdd.
+#ifndef GLSLANG_WEB
if(op == glslang::EOpConvUint8ToInt8 || op == glslang::EOpConvInt8ToUint8) {
zero = builder.makeUint8Constant(0);
} else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) {
zero = builder.makeUint16Constant(0);
} else if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) {
zero = builder.makeUint64Constant(0);
- } else {
+ } else
+#endif
+ {
zero = builder.makeUintConstant(0);
}
zero = makeSmearedConstant(zero, vectorSize);
@@ -5977,6 +6178,71 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
convOp = spv::OpConvertFToU;
break;
+#ifndef GLSLANG_WEB
+ case glslang::EOpConvInt8ToBool:
+ case glslang::EOpConvUint8ToBool:
+ zero = builder.makeUint8Constant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
+ case glslang::EOpConvInt16ToBool:
+ case glslang::EOpConvUint16ToBool:
+ zero = builder.makeUint16Constant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
+ case glslang::EOpConvInt64ToBool:
+ case glslang::EOpConvUint64ToBool:
+ zero = builder.makeUint64Constant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
+ case glslang::EOpConvDoubleToBool:
+ zero = builder.makeDoubleConstant(0.0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+ case glslang::EOpConvFloat16ToBool:
+ zero = builder.makeFloat16Constant(0.0F);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+ case glslang::EOpConvBoolToDouble:
+ convOp = spv::OpSelect;
+ zero = builder.makeDoubleConstant(0.0);
+ one = builder.makeDoubleConstant(1.0);
+ break;
+ case glslang::EOpConvBoolToFloat16:
+ convOp = spv::OpSelect;
+ zero = builder.makeFloat16Constant(0.0F);
+ one = builder.makeFloat16Constant(1.0F);
+ break;
+ case glslang::EOpConvBoolToInt8:
+ zero = builder.makeInt8Constant(0);
+ one = builder.makeInt8Constant(1);
+ convOp = spv::OpSelect;
+ break;
+ case glslang::EOpConvBoolToUint8:
+ zero = builder.makeUint8Constant(0);
+ one = builder.makeUint8Constant(1);
+ convOp = spv::OpSelect;
+ break;
+ case glslang::EOpConvBoolToInt16:
+ zero = builder.makeInt16Constant(0);
+ one = builder.makeInt16Constant(1);
+ convOp = spv::OpSelect;
+ break;
+ case glslang::EOpConvBoolToUint16:
+ zero = builder.makeUint16Constant(0);
+ one = builder.makeUint16Constant(1);
+ convOp = spv::OpSelect;
+ break;
+ case glslang::EOpConvDoubleToFloat:
+ case glslang::EOpConvFloatToDouble:
+ case glslang::EOpConvDoubleToFloat16:
+ case glslang::EOpConvFloat16ToDouble:
+ case glslang::EOpConvFloatToFloat16:
+ case glslang::EOpConvFloat16ToFloat:
+ convOp = spv::OpFConvert;
+ if (builder.isMatrixType(destType))
+ return createUnaryMatrixOperation(convOp, decorations, destType, operand, typeProxy);
+ break;
+
case glslang::EOpConvInt8ToInt16:
case glslang::EOpConvInt8ToInt:
case glslang::EOpConvInt8ToInt64:
@@ -6087,6 +6353,15 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
case glslang::EOpConvPtrToUint64:
convOp = spv::OpConvertPtrToU;
break;
+ case glslang::EOpConvPtrToUvec2:
+ case glslang::EOpConvUvec2ToPtr:
+ if (builder.isVector(operand))
+ builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer,
+ spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
+ convOp = spv::OpBitcast;
+ break;
+#endif
+
default:
break;
}
@@ -6103,7 +6378,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
result = builder.createUnaryOp(convOp, destType, operand);
result = builder.setPrecision(result, decorations.precision);
- builder.addDecoration(result, decorations.nonUniform);
+ decorations.addNonUniform(builder, result);
return result;
}
@@ -6120,7 +6395,7 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector
}
// For glslang ops that map to SPV atomic opCodes
-spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
+spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
spv::Op opCode = spv::OpNop;
@@ -6206,7 +6481,9 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
scopeId = builder.makeUintConstant(spv::ScopeDevice);
}
// semantics default to relaxed
- spv::Id semanticsId = builder.makeUintConstant(spv::MemorySemanticsMaskNone);
+ spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ?
+ spv::MemorySemanticsVolatileMask :
+ spv::MemorySemanticsMaskNone);
spv::Id semanticsId2 = semanticsId;
pointerId = operands[0];
@@ -6236,7 +6513,10 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
// Check for capabilities
unsigned semanticsImmediate = builder.getConstantScalar(semanticsId) | builder.getConstantScalar(semanticsId2);
- if (semanticsImmediate & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) {
+ if (semanticsImmediate & (spv::MemorySemanticsMakeAvailableKHRMask |
+ spv::MemorySemanticsMakeVisibleKHRMask |
+ spv::MemorySemanticsOutputMemoryKHRMask |
+ spv::MemorySemanticsVolatileMask)) {
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
}
@@ -6274,10 +6554,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
// Create group invocation operations.
spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
{
-#ifdef AMD_EXTENSIONS
bool isUnsigned = isTypeUnsignedInt(typeProxy);
bool isFloat = isTypeFloat(typeProxy);
-#endif
spv::Op opCode = spv::OpNop;
std::vector<spv::IdImmediate> spvGroupOperands;
@@ -6294,7 +6572,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
builder.addCapability(spv::CapabilitySubgroupVoteKHR);
} else {
builder.addCapability(spv::CapabilityGroups);
-#ifdef AMD_EXTENSIONS
if (op == glslang::EOpMinInvocationsNonUniform ||
op == glslang::EOpMaxInvocationsNonUniform ||
op == glslang::EOpAddInvocationsNonUniform ||
@@ -6305,9 +6582,7 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
op == glslang::EOpMaxInvocationsExclusiveScanNonUniform ||
op == glslang::EOpAddInvocationsExclusiveScanNonUniform)
builder.addExtension(spv::E_SPV_AMD_shader_ballot);
-#endif
-#ifdef AMD_EXTENSIONS
switch (op) {
case glslang::EOpMinInvocations:
case glslang::EOpMaxInvocations:
@@ -6342,7 +6617,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
spv::IdImmediate groupOp = { false, (unsigned)groupOperation };
spvGroupOperands.push_back(groupOp);
}
-#endif
}
for (auto opIt = operands.begin(); opIt != operands.end(); ++opIt) {
@@ -6389,7 +6663,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
builder.createCompositeConstruct(uvec2Type, components));
}
-#ifdef AMD_EXTENSIONS
case glslang::EOpMinInvocations:
case glslang::EOpMaxInvocations:
case glslang::EOpAddInvocations:
@@ -6476,7 +6749,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
break;
-#endif
default:
logger->missingFunctionality("invocation operation");
return spv::NoResult;
@@ -6490,7 +6762,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation,
spv::Id typeId, std::vector<spv::Id>& operands)
{
-#ifdef AMD_EXTENSIONS
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
@@ -6498,12 +6769,6 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD || op == spv::OpGroupSMinNonUniformAMD ||
op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD || op == spv::OpGroupSMaxNonUniformAMD ||
op == spv::OpGroupFAddNonUniformAMD || op == spv::OpGroupIAddNonUniformAMD);
-#else
- assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
- op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
- op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
- op == spv::OpSubgroupReadInvocationKHR);
-#endif
// Handle group invocation operations scalar by scalar.
// The result type is the same type as the original type.
@@ -6627,7 +6892,6 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
builder.addCapability(spv::CapabilityGroupNonUniform);
builder.addCapability(spv::CapabilityGroupNonUniformQuad);
break;
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
@@ -6652,12 +6916,12 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned);
builder.addCapability(spv::CapabilityGroupNonUniformPartitionedNV);
break;
-#endif
default: assert(0 && "Unhandled subgroup operation!");
}
- const bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
- const bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
+
+ const bool isUnsigned = isTypeUnsignedInt(typeProxy);
+ const bool isFloat = isTypeFloat(typeProxy);
const bool isBool = typeProxy == glslang::EbtBool;
spv::Op opCode = spv::OpNop;
@@ -6686,11 +6950,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveAdd:
case glslang::EOpSubgroupExclusiveAdd:
case glslang::EOpSubgroupClusteredAdd:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedInclusiveAdd:
case glslang::EOpSubgroupPartitionedExclusiveAdd:
-#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFAdd;
} else {
@@ -6701,11 +6963,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMul:
case glslang::EOpSubgroupExclusiveMul:
case glslang::EOpSubgroupClusteredMul:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedInclusiveMul:
case glslang::EOpSubgroupPartitionedExclusiveMul:
-#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMul;
} else {
@@ -6716,11 +6976,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMin:
case glslang::EOpSubgroupExclusiveMin:
case glslang::EOpSubgroupClusteredMin:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMin:
case glslang::EOpSubgroupPartitionedInclusiveMin:
case glslang::EOpSubgroupPartitionedExclusiveMin:
-#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMin;
} else if (isUnsigned) {
@@ -6733,11 +6991,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMax:
case glslang::EOpSubgroupExclusiveMax:
case glslang::EOpSubgroupClusteredMax:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMax:
case glslang::EOpSubgroupPartitionedInclusiveMax:
case glslang::EOpSubgroupPartitionedExclusiveMax:
-#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMax;
} else if (isUnsigned) {
@@ -6750,11 +7006,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveAnd:
case glslang::EOpSubgroupExclusiveAnd:
case glslang::EOpSubgroupClusteredAnd:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAnd:
case glslang::EOpSubgroupPartitionedInclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveAnd:
-#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalAnd;
} else {
@@ -6765,11 +7019,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveOr:
case glslang::EOpSubgroupExclusiveOr:
case glslang::EOpSubgroupClusteredOr:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedOr:
case glslang::EOpSubgroupPartitionedInclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveOr:
-#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalOr;
} else {
@@ -6780,11 +7032,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveXor:
case glslang::EOpSubgroupExclusiveXor:
case glslang::EOpSubgroupClusteredXor:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedXor:
case glslang::EOpSubgroupPartitionedInclusiveXor:
case glslang::EOpSubgroupPartitionedExclusiveXor:
-#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalXor;
} else {
@@ -6842,7 +7092,6 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupClusteredXor:
groupOperation = spv::GroupOperationClusteredReduce;
break;
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
@@ -6870,7 +7119,6 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupPartitionedExclusiveXor:
groupOperation = spv::GroupOperationPartitionedExclusiveScanNV;
break;
-#endif
}
// build the instruction
@@ -6928,7 +7176,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
switch (op) {
case glslang::EOpMin:
if (isFloat)
- libCall = spv::GLSLstd450FMin;
+ libCall = nanMinMaxClamp ? spv::GLSLstd450NMin : spv::GLSLstd450FMin;
else if (isUnsigned)
libCall = spv::GLSLstd450UMin;
else
@@ -6940,7 +7188,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
break;
case glslang::EOpMax:
if (isFloat)
- libCall = spv::GLSLstd450FMax;
+ libCall = nanMinMaxClamp ? spv::GLSLstd450NMax : spv::GLSLstd450FMax;
else if (isUnsigned)
libCall = spv::GLSLstd450UMax;
else
@@ -6959,7 +7207,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpClamp:
if (isFloat)
- libCall = spv::GLSLstd450FClamp;
+ libCall = nanMinMaxClamp ? spv::GLSLstd450NClamp : spv::GLSLstd450FClamp;
else if (isUnsigned)
libCall = spv::GLSLstd450UClamp;
else
@@ -7002,18 +7250,57 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
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);
+ unsigned int executionScope = builder.getConstantScalar(operands[0]);
+ unsigned int memoryScope = builder.getConstantScalar(operands[1]);
+ unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]);
+ builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
+ if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
+ spv::MemorySemanticsMakeVisibleKHRMask |
+ spv::MemorySemanticsOutputMemoryKHRMask |
+ spv::MemorySemanticsVolatileMask)) {
+ builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
+ }
+ if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) {
+ builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
+ }
+ 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);
+ unsigned int memoryScope = builder.getConstantScalar(operands[0]);
+ unsigned int semantics = builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2]);
+ builder.createMemoryBarrier((spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
+ if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
+ spv::MemorySemanticsMakeVisibleKHRMask |
+ spv::MemorySemanticsOutputMemoryKHRMask |
+ spv::MemorySemanticsVolatileMask)) {
+ builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
+ }
+ if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::ScopeDevice) {
+ builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
+ }
+ return 0;
+ }
+ break;
+
+#ifndef GLSLANG_WEB
case glslang::EOpInterpolateAtSample:
-#ifdef AMD_EXTENSIONS
if (typeProxy == glslang::EbtFloat16)
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
-#endif
libCall = spv::GLSLstd450InterpolateAtSample;
break;
case glslang::EOpInterpolateAtOffset:
-#ifdef AMD_EXTENSIONS
if (typeProxy == glslang::EbtFloat16)
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
-#endif
libCall = spv::GLSLstd450InterpolateAtOffset;
break;
case glslang::EOpAddCarry:
@@ -7055,11 +7342,9 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
assert(builder.isPointerType(typeId1));
typeId1 = builder.getContainedTypeId(typeId1);
int width = builder.getScalarTypeWidth(typeId1);
-#ifdef AMD_EXTENSIONS
if (width == 16)
// Using 16-bit exp operand, enable extension SPV_AMD_gpu_shader_int16
builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16);
-#endif
if (builder.getNumComponents(operands[0]) == 1)
frexpIntType = builder.makeIntegerType(width, true);
else
@@ -7089,7 +7374,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpSubgroupClusteredOr:
case glslang::EOpSubgroupClusteredXor:
case glslang::EOpSubgroupQuadBroadcast:
-#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
@@ -7111,10 +7395,8 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpSubgroupPartitionedExclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveXor:
-#endif
return createSubgroupOperation(op, typeId, operands, typeProxy);
-#ifdef AMD_EXTENSIONS
case glslang::EOpSwizzleInvocations:
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot);
libCall = spv::SwizzleInvocationsAMD;
@@ -7168,44 +7450,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
libCall = spv::InterpolateAtVertexAMD;
break;
-#endif
- case glslang::EOpBarrier:
- {
- // This is for the extended controlBarrier function, with four operands.
- // The unextended barrier() goes through createNoArgOperation.
- assert(operands.size() == 4);
- unsigned int executionScope = builder.getConstantScalar(operands[0]);
- unsigned int memoryScope = builder.getConstantScalar(operands[1]);
- unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]);
- builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
- if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) {
- builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
- }
- if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) {
- builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
- }
- 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);
- unsigned int memoryScope = builder.getConstantScalar(operands[0]);
- unsigned int semantics = builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2]);
- builder.createMemoryBarrier((spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
- if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask | spv::MemorySemanticsMakeVisibleKHRMask | spv::MemorySemanticsOutputMemoryKHRMask)) {
- builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
- }
- if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::ScopeDevice) {
- builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
- }
- return 0;
- }
- break;
-#ifdef NV_EXTENSIONS
case glslang::EOpReportIntersectionNV:
{
typeId = builder.makeBoolType();
@@ -7227,11 +7472,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
return 0;
-#endif
case glslang::EOpCooperativeMatrixMulAdd:
opCode = spv::OpCooperativeMatrixMulAddNV;
break;
-
+#endif // GLSLANG_WEB
default:
return 0;
}
@@ -7252,7 +7496,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
id = builder.createCompositeExtract(mulOp, typeId, 0);
for (int i = 1; i < componentCount; ++i) {
builder.setPrecision(id, precision);
- id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(operands[0], typeId, i));
+ id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(mulOp, typeId, i));
}
} else {
switch (consumedOperands) {
@@ -7275,6 +7519,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
}
}
+#ifndef GLSLANG_WEB
// Decode the return types that were structures
switch (op) {
case glslang::EOpAddCarry:
@@ -7304,6 +7549,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
default:
break;
}
+#endif
return builder.setPrecision(id, precision);
}
@@ -7315,12 +7561,6 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
switch (op) {
- case glslang::EOpEmitVertex:
- builder.createNoResultOp(spv::OpEmitVertex);
- return 0;
- case glslang::EOpEndPrimitive:
- builder.createNoResultOp(spv::OpEndPrimitive);
- return 0;
case glslang::EOpBarrier:
if (glslangIntermediate->getStage() == EShLangTessControl) {
if (glslangIntermediate->usingVulkanMemoryModel()) {
@@ -7341,18 +7581,10 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAllMemory |
spv::MemorySemanticsAcquireReleaseMask);
return 0;
- case glslang::EOpMemoryBarrierAtomicCounter:
- builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask |
- spv::MemorySemanticsAcquireReleaseMask);
- return 0;
case glslang::EOpMemoryBarrierBuffer:
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsUniformMemoryMask |
spv::MemorySemanticsAcquireReleaseMask);
return 0;
- case glslang::EOpMemoryBarrierImage:
- builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsImageMemoryMask |
- spv::MemorySemanticsAcquireReleaseMask);
- return 0;
case glslang::EOpMemoryBarrierShared:
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsWorkgroupMemoryMask |
spv::MemorySemanticsAcquireReleaseMask);
@@ -7361,6 +7593,15 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory |
spv::MemorySemanticsAcquireReleaseMask);
return 0;
+#ifndef GLSLANG_WEB
+ case glslang::EOpMemoryBarrierAtomicCounter:
+ builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask |
+ spv::MemorySemanticsAcquireReleaseMask);
+ return 0;
+ case glslang::EOpMemoryBarrierImage:
+ builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsImageMemoryMask |
+ spv::MemorySemanticsAcquireReleaseMask);
+ return 0;
case glslang::EOpAllMemoryBarrierWithGroupSync:
builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice,
spv::MemorySemanticsAllMemory |
@@ -7405,30 +7646,69 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsWorkgroupMemoryMask |
spv::MemorySemanticsAcquireReleaseMask);
return spv::NoResult;
+
+ case glslang::EOpEmitVertex:
+ builder.createNoResultOp(spv::OpEmitVertex);
+ return 0;
+ case glslang::EOpEndPrimitive:
+ builder.createNoResultOp(spv::OpEndPrimitive);
+ return 0;
+
case glslang::EOpSubgroupElect: {
std::vector<spv::Id> operands;
return createSubgroupOperation(op, typeId, operands, glslang::EbtVoid);
}
-#ifdef AMD_EXTENSIONS
case glslang::EOpTime:
{
std::vector<spv::Id> args; // Dummy arguments
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
return builder.setPrecision(id, precision);
}
-#endif
-#ifdef NV_EXTENSIONS
case glslang::EOpIgnoreIntersectionNV:
builder.createNoResultOp(spv::OpIgnoreIntersectionNV);
return 0;
case glslang::EOpTerminateRayNV:
builder.createNoResultOp(spv::OpTerminateRayNV);
return 0;
+
+ case glslang::EOpBeginInvocationInterlock:
+ builder.createNoResultOp(spv::OpBeginInvocationInterlockEXT);
+ return 0;
+ case glslang::EOpEndInvocationInterlock:
+ builder.createNoResultOp(spv::OpEndInvocationInterlockEXT);
+ return 0;
+
+ case glslang::EOpIsHelperInvocation:
+ {
+ std::vector<spv::Id> args; // Dummy arguments
+ builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
+ builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
+ return builder.createOp(spv::OpIsHelperInvocationEXT, typeId, args);
+ }
+
+ case glslang::EOpReadClockSubgroupKHR: {
+ std::vector<spv::Id> args;
+ args.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
+ builder.addExtension(spv::E_SPV_KHR_shader_clock);
+ builder.addCapability(spv::CapabilityShaderClockKHR);
+ return builder.createOp(spv::OpReadClockKHR, typeId, args);
+ }
+
+ case glslang::EOpReadClockDeviceKHR: {
+ std::vector<spv::Id> args;
+ args.push_back(builder.makeUintConstant(spv::ScopeDevice));
+ builder.addExtension(spv::E_SPV_KHR_shader_clock);
+ builder.addCapability(spv::CapabilityShaderClockKHR);
+ return builder.createOp(spv::OpReadClockKHR, typeId, args);
+ }
#endif
default:
- logger->missingFunctionality("unknown operation with no arguments");
- return 0;
+ break;
}
+
+ logger->missingFunctionality("unknown operation with no arguments");
+
+ return 0;
}
spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol)
@@ -7441,22 +7721,26 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
}
// it was not found, create it
- id = createSpvVariable(symbol);
+ spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
+ auto forcedType = getForcedType(builtIn, symbol->getType());
+ id = createSpvVariable(symbol, forcedType.first);
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()));
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
addMeshNVDecoration(id, /*member*/ -1, symbol->getType().getQualifier());
+ if (symbol->getQualifier().hasComponent())
+ builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
+ if (symbol->getQualifier().hasIndex())
+ builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex);
#endif
if (symbol->getType().getQualifier().hasSpecConstantId())
builder.addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId);
- if (symbol->getQualifier().hasIndex())
- builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex);
- if (symbol->getQualifier().hasComponent())
- builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
// atomic counters use this:
if (symbol->getQualifier().hasOffset())
builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset);
@@ -7495,6 +7779,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset);
}
+ // add built-in variable decoration
+ if (builtIn != spv::BuiltInMax) {
+ builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
+ }
+
+#ifndef GLSLANG_WEB
if (symbol->getType().isImage()) {
std::vector<spv::Decoration> memory;
TranslateMemoryDecoration(symbol->getType().getQualifier(), memory, glslangIntermediate->usingVulkanMemoryModel());
@@ -7502,15 +7792,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addDecoration(id, memory[i]);
}
- // built-in variable decorations
- spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
- if (builtIn != spv::BuiltInMax)
- builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
-
// nonuniform
builder.addDecoration(id, TranslateNonUniformDecoration(symbol->getType().getQualifier()));
-#ifdef NV_EXTENSIONS
if (builtIn == spv::BuiltInSampleMask) {
spv::Decoration decoration;
// GL_NV_sample_mask_override_coverage extension
@@ -7520,6 +7804,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
decoration = (spv::Decoration)spv::DecorationMax;
builder.addDecoration(id, decoration);
if (decoration != spv::DecorationMax) {
+ builder.addCapability(spv::CapabilitySampleMaskOverrideCoverageNV);
builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage);
}
}
@@ -7548,7 +7833,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
}
-#endif
if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) {
builder.addExtension("SPV_GOOGLE_hlsl_functionality1");
@@ -7556,14 +7840,15 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
symbol->getType().getQualifier().semanticName);
}
- if (symbol->getBasicType() == glslang::EbtReference) {
+ if (symbol->isReference()) {
builder.addDecoration(id, symbol->getType().getQualifier().restrict ? spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
}
+#endif
return id;
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
// 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)
{
@@ -7699,6 +7984,19 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla
for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++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;
+#ifndef GLSLANG_WEB
case glslang::EbtInt8:
spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const()));
break;
@@ -7711,30 +8009,19 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla
case glslang::EbtUint16:
spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const()));
break;
- 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::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::EbtFloat:
- spvConsts.push_back(builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst()));
- break;
case glslang::EbtDouble:
spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst()));
break;
case glslang::EbtFloat16:
spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst()));
break;
- case glslang::EbtBool:
- spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst()));
- break;
+#endif
default:
assert(0);
break;
@@ -7746,6 +8033,19 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla
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;
+#ifndef GLSLANG_WEB
case glslang::EbtInt8:
scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant);
break;
@@ -7758,34 +8058,23 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla
case glslang::EbtUint16:
scalar = builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const(), specConstant);
break;
- 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::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::EbtFloat:
- scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant);
- break;
case glslang::EbtDouble:
scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant);
break;
case glslang::EbtFloat16:
scalar = builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant);
break;
- case glslang::EbtBool:
- scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant);
- break;
case glslang::EbtReference:
scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant);
scalar = builder.createUnaryOp(spv::OpBitcast, typeId, scalar);
break;
+#endif
default:
assert(0);
break;
@@ -7929,7 +8218,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan
return builder.createOp(spv::OpPhi, boolTypeId, phiOperands);
}
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
// 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)
@@ -7969,7 +8258,8 @@ int GetSpirvGeneratorVersion()
// 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 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent
+ return 8; // switch to new dead block eliminator; use OpUnreachable
}
// Write SPIR-V out to a binary file
@@ -7989,6 +8279,7 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
// Write SPIR-V out to a text file with 32-bit hexadecimal words
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
{
+#ifndef GLSLANG_WEB
std::ofstream out;
out.open(baseName, std::ios::binary | std::ios::out);
if (out.fail())
@@ -8016,6 +8307,7 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
out << "};";
}
out.close();
+#endif
}
//
@@ -8049,11 +8341,14 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>&
#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.
- if ((intermediate.getSource() == EShSourceHlsl || options->optimizeSize) && !options->disableOptimizer)
+ bool prelegalization = intermediate.getSource() == EShSourceHlsl;
+ if ((intermediate.getSource() == EShSourceHlsl || options->optimizeSize) && !options->disableOptimizer) {
SpirvToolsLegalize(intermediate, spirv, logger, options);
+ prelegalization = false;
+ }
if (options->validate)
- SpirvToolsValidate(intermediate, spirv, logger);
+ SpirvToolsValidate(intermediate, spirv, logger, prelegalization);
if (options->disassemble)
SpirvToolsDisassemble(std::cout, spirv);
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.h b/thirdparty/glslang/SPIRV/GlslangToSpv.h
index 86e1c23bf6..3907be43b7 100644..100755
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.h
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.h
@@ -40,7 +40,7 @@
#endif
#include "SpvTools.h"
-#include "../glslang/Include/intermediate.h"
+#include "glslang/Include/intermediate.h"
#include <string>
#include <vector>
diff --git a/thirdparty/glslang/SPIRV/InReadableOrder.cpp b/thirdparty/glslang/SPIRV/InReadableOrder.cpp
index 52b29613a4..9d9410be93 100644
--- a/thirdparty/glslang/SPIRV/InReadableOrder.cpp
+++ b/thirdparty/glslang/SPIRV/InReadableOrder.cpp
@@ -61,17 +61,22 @@ namespace {
// Use by calling visit() on the root block.
class ReadableOrderTraverser {
public:
- explicit ReadableOrderTraverser(std::function<void(Block*)> callback) : callback_(callback) {}
+ ReadableOrderTraverser(std::function<void(Block*, spv::ReachReason, Block*)> callback)
+ : callback_(callback) {}
// Visits the block if it hasn't been visited already and isn't currently
- // being delayed. Invokes callback(block), then descends into its
+ // 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.
- void visit(Block* block)
+ // 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);
+ callback_(block, why, header);
visited_.insert(block);
Block* mergeBlock = nullptr;
Block* continueBlock = nullptr;
@@ -87,27 +92,40 @@ public:
delayed_.insert(continueBlock);
}
}
- const auto successors = block->getSuccessors();
- for (auto it = successors.cbegin(); it != successors.cend(); ++it)
- visit(*it);
+ 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);
+ visit(continueBlock, continueWhy, block);
}
if (mergeBlock) {
+ const spv::ReachReason mergeWhy =
+ (reachableViaControlFlow_.count(mergeBlock) > 0)
+ ? spv::ReachViaControlFlow
+ : spv::ReachDeadMerge;
delayed_.erase(mergeBlock);
- visit(mergeBlock);
+ visit(mergeBlock, mergeWhy, block);
}
}
private:
- std::function<void(Block*)> callback_;
+ std::function<void(Block*, spv::ReachReason, Block*)> callback_;
// Whether a block has already been visited or is being delayed.
std::unordered_set<Block *> visited_, delayed_;
+
+ // The set of blocks that actually are reached via control flow.
+ std::unordered_set<Block *> reachableViaControlFlow_;
};
}
-void spv::inReadableOrder(Block* root, std::function<void(Block*)> callback)
+void spv::inReadableOrder(Block* root, std::function<void(Block*, spv::ReachReason, Block*)> callback)
{
- ReadableOrderTraverser(callback).visit(root);
+ ReadableOrderTraverser(callback).visit(root, spv::ReachViaControlFlow, nullptr);
}
diff --git a/thirdparty/glslang/SPIRV/Logger.cpp b/thirdparty/glslang/SPIRV/Logger.cpp
index 48bd4e3ade..7ea0c6342b 100644
--- a/thirdparty/glslang/SPIRV/Logger.cpp
+++ b/thirdparty/glslang/SPIRV/Logger.cpp
@@ -32,6 +32,8 @@
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
+#ifndef GLSLANG_WEB
+
#include "Logger.h"
#include <algorithm>
@@ -66,3 +68,5 @@ std::string SpvBuildLogger::getAllMessages() const {
}
} // end spv namespace
+
+#endif \ No newline at end of file
diff --git a/thirdparty/glslang/SPIRV/Logger.h b/thirdparty/glslang/SPIRV/Logger.h
index 2e4ddaf517..411367c030 100644
--- a/thirdparty/glslang/SPIRV/Logger.h
+++ b/thirdparty/glslang/SPIRV/Logger.h
@@ -46,6 +46,14 @@ class SpvBuildLogger {
public:
SpvBuildLogger() {}
+#ifdef GLSLANG_WEB
+ void tbdFunctionality(const std::string& f) { }
+ void missingFunctionality(const std::string& f) { }
+ void warning(const std::string& w) { }
+ void error(const std::string& e) { errors.push_back(e); }
+ std::string getAllMessages() { return ""; }
+#else
+
// Registers a TBD functionality.
void tbdFunctionality(const std::string& f);
// Registers a missing functionality.
@@ -59,6 +67,7 @@ public:
// Returns all messages accumulated in the order of:
// TBD functionalities, missing functionalities, warnings, errors.
std::string getAllMessages() const;
+#endif
private:
SpvBuildLogger(const SpvBuildLogger&);
diff --git a/thirdparty/glslang/SPIRV/SPVRemapper.h b/thirdparty/glslang/SPIRV/SPVRemapper.h
index fa61bb94d8..d6b9c346dd 100644
--- a/thirdparty/glslang/SPIRV/SPVRemapper.h
+++ b/thirdparty/glslang/SPIRV/SPVRemapper.h
@@ -195,7 +195,7 @@ private:
// 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 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
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.cpp b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
index 4ef7e5fe7f..bd208952e0 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.cpp
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
@@ -46,7 +46,9 @@
#include "SpvBuilder.h"
+#ifndef GLSLANG_WEB
#include "hex_float.h"
+#endif
#ifndef _WIN32
#include <cstdio>
@@ -230,6 +232,11 @@ Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardP
Id Builder::makeIntegerType(int width, bool hasSign)
{
+#ifdef GLSLANG_WEB
+ assert(width == 32);
+ width = 32;
+#endif
+
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeInt].size(); ++t) {
@@ -265,6 +272,11 @@ Id Builder::makeIntegerType(int width, bool hasSign)
Id Builder::makeFloatType(int width)
{
+#ifdef GLSLANG_WEB
+ assert(width == 32);
+ width = 32;
+#endif
+
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeFloat].size(); ++t) {
@@ -516,6 +528,7 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
+#ifndef GLSLANG_WEB
// deal with capabilities
switch (dim) {
case DimBuffer:
@@ -561,6 +574,7 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo
addCapability(CapabilityImageMSArray);
}
}
+#endif
return type->getResultId();
}
@@ -586,7 +600,7 @@ Id Builder::makeSampledImageType(Id imageType)
return type->getResultId();
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
Id Builder::makeAccelerationStructureNVType()
{
Instruction *type;
@@ -602,6 +616,7 @@ Id Builder::makeAccelerationStructureNVType()
return type->getResultId();
}
#endif
+
Id Builder::getDerefTypeId(Id resultId) const
{
Id typeId = getTypeId(resultId);
@@ -939,6 +954,10 @@ Id Builder::makeFloatConstant(float f, bool specConstant)
Id Builder::makeDoubleConstant(double d, bool specConstant)
{
+#ifdef GLSLANG_WEB
+ assert(0);
+ return NoResult;
+#else
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(64);
union { double db; unsigned long long ull; } u;
@@ -963,10 +982,15 @@ Id Builder::makeDoubleConstant(double d, bool specConstant)
module.mapInstruction(c);
return c->getResultId();
+#endif
}
Id Builder::makeFloat16Constant(float f16, bool specConstant)
{
+#ifdef GLSLANG_WEB
+ assert(0);
+ return NoResult;
+#else
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(16);
@@ -991,25 +1015,33 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
module.mapInstruction(c);
return c->getResultId();
+#endif
}
Id Builder::makeFpConstant(Id type, double d, bool specConstant)
{
- assert(isFloatType(type));
+#ifdef GLSLANG_WEB
+ const int width = 32;
+ assert(width == getScalarTypeWidth(type));
+#else
+ const int width = getScalarTypeWidth(type);
+#endif
- switch (getScalarTypeWidth(type)) {
- case 16:
- return makeFloat16Constant((float)d, specConstant);
- case 32:
- return makeFloatConstant((float)d, specConstant);
- case 64:
- return makeDoubleConstant(d, specConstant);
- default:
- break;
- }
+ assert(isFloatType(type));
- assert(false);
- return NoResult;
+ 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::findCompositeConstant(Op typeClass, Id typeId, const std::vector<Id>& comps)
@@ -1825,7 +1857,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
if (parameters.component != NoResult)
texArgs[numArgs++] = parameters.component;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
if (parameters.granularity != NoResult)
texArgs[numArgs++] = parameters.granularity;
if (parameters.coarse != NoResult)
@@ -1872,6 +1904,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
texArgs[numArgs++] = parameters.offsets;
}
+#ifndef GLSLANG_WEB
if (parameters.sample) {
mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask);
texArgs[numArgs++] = parameters.sample;
@@ -1889,6 +1922,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
if (parameters.volatil) {
mask = mask | ImageOperandsVolatileTexelKHRMask;
}
+#endif
mask = mask | signExtensionMask;
if (mask == ImageOperandsMaskNone)
--numArgs; // undo speculative reservation for the mask argument
@@ -1904,10 +1938,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
opCode = OpImageSparseFetch;
else
opCode = OpImageFetch;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
} else if (parameters.granularity && parameters.coarse) {
opCode = OpImageSampleFootprintNV;
-#endif
} else if (gather) {
if (parameters.Dref)
if (sparse)
@@ -1919,6 +1952,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
opCode = OpImageSparseGather;
else
opCode = OpImageGather;
+#endif
} else if (explicitLod) {
if (parameters.Dref) {
if (proj)
@@ -2067,11 +2101,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
break;
}
case OpImageQueryLod:
-#ifdef AMD_EXTENSIONS
resultType = makeVectorType(getScalarTypeId(getTypeId(parameters.coords)), 2);
-#else
- resultType = makeVectorType(makeFloatType(32), 2);
-#endif
break;
case OpImageQueryLevels:
case OpImageQuerySamples:
@@ -2089,6 +2119,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
if (parameters.lod)
query->addIdOperand(parameters.lod);
buildPoint->addInstruction(std::unique_ptr<Instruction>(query));
+ addCapability(CapabilityImageQuery);
return query->getResultId();
}
@@ -2282,7 +2313,12 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
int numRows = getTypeNumRows(resultTypeId);
Instruction* instr = module.getInstruction(componentTypeId);
- unsigned bitCount = instr->getImmediateOperand(0);
+#ifdef GLSLANG_WEB
+ const unsigned bitCount = 32;
+ assert(bitCount == instr->getImmediateOperand(0));
+#else
+ const unsigned bitCount = instr->getImmediateOperand(0);
+#endif
// Optimize matrix constructed from a bigger matrix
if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) {
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.h b/thirdparty/glslang/SPIRV/SpvBuilder.h
index faed8e8230..31fee975fc 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.h
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.h
@@ -67,6 +67,7 @@ typedef enum {
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),
} SpvVersion;
class Builder {
@@ -105,6 +106,20 @@ public:
void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
void setEmitOpLines() { emitOpLines = true; }
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<unsigned>(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);
@@ -201,7 +216,11 @@ public:
bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; }
bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; }
+#ifdef GLSLANG_WEB
+ bool isCooperativeMatrixType(Id typeId)const { return false; }
+#else
bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
+#endif
bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampler; }
@@ -557,6 +576,14 @@ public:
// Accumulate whether anything in the chain of structures has coherent decorations.
struct CoherentFlags {
+ CoherentFlags() { clear(); }
+#ifdef GLSLANG_WEB
+ void clear() { }
+ bool isVolatile() const { return false; }
+ CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
+#else
+ bool isVolatile() const { return volatil; }
+
unsigned coherent : 1;
unsigned devicecoherent : 1;
unsigned queuefamilycoherent : 1;
@@ -577,7 +604,6 @@ public:
isImage = 0;
}
- CoherentFlags() { clear(); }
CoherentFlags operator |=(const CoherentFlags &other) {
coherent |= other.coherent;
devicecoherent |= other.devicecoherent;
@@ -589,6 +615,7 @@ public:
isImage |= other.isImage;
return *this;
}
+#endif
};
CoherentFlags coherentFlags;
};
@@ -656,16 +683,21 @@ public:
// based on the type of the base and the chain of dereferences.
Id accessChainGetInferredType();
- // Add capabilities, extensions, remove unneeded decorations, etc.,
+ // Add capabilities, extensions, remove unneeded decorations, etc.,
// based on the resulting SPIR-V.
void postProcess();
+ // Prune unreachable blocks in the CFG and remove unneeded decorations.
+ void postProcessCFG();
+
+#ifndef GLSLANG_WEB
+ // 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 instruction in a reachable block in a function.
- void postProcessReachable(const Instruction&);
// Hook to visit each non-32-bit sized float/int operation in a block.
void postProcessType(const Instruction&, spv::Id typeId);
+#endif
void dump(std::vector<unsigned int>&) const;
diff --git a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
index 6e1f7cf61f..d40174d172 100644
--- a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
+++ b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
@@ -39,6 +39,7 @@
#include <cassert>
#include <cstdlib>
+#include <unordered_map>
#include <unordered_set>
#include <algorithm>
@@ -51,16 +52,13 @@ namespace spv {
#include "GLSL.std.450.h"
#include "GLSL.ext.KHR.h"
#include "GLSL.ext.EXT.h"
-#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
-#endif
-#ifdef NV_EXTENSIONS
#include "GLSL.ext.NV.h"
-#endif
}
namespace spv {
+#ifndef GLSLANG_WEB
// 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.
@@ -160,7 +158,6 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
}
break;
case OpExtInst:
-#if AMD_EXTENSIONS
switch (inst.getImmediateOperand(1)) {
case GLSLstd450Frexp:
case GLSLstd450FrexpStruct:
@@ -176,7 +173,6 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
default:
break;
}
-#endif
break;
default:
if (basicTypeOp == OpTypeFloat && width == 16)
@@ -222,12 +218,10 @@ void Builder::postProcess(Instruction& inst)
addCapability(CapabilityImageQuery);
break;
-#ifdef NV_EXTENSIONS
case OpGroupNonUniformPartitionNV:
addExtension(E_SPV_NV_shader_subgroup_partitioned);
addCapability(CapabilityGroupNonUniformPartitionedNV);
break;
-#endif
case OpLoad:
case OpStore:
@@ -326,17 +320,16 @@ void Builder::postProcess(Instruction& inst)
}
}
}
-
-// Called for each instruction in a reachable block.
-void Builder::postProcessReachable(const Instruction&)
-{
- // did have code here, but questionable to do so without deleting the instructions
-}
+#endif
// comment in header
-void Builder::postProcess()
+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<const Block*> reachableBlocks;
+ std::unordered_map<Block*, Block*> headerForUnreachableContinue;
+ std::unordered_set<Block*> unreachableMerges;
std::unordered_set<Id> unreachableDefinitions;
// Collect IDs defined in unreachable blocks. For each function, label the
// reachable blocks first. Then for each unreachable block, collect the
@@ -344,16 +337,41 @@ void Builder::postProcess()
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
Function* f = *fi;
Block* entry = f->getEntryBlock();
- inReadableOrder(entry, [&reachableBlocks](const Block* b) { reachableBlocks.insert(b); });
+ 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 (reachableBlocks.count(b) == 0) {
- for (auto ii = b->getInstructions().cbegin(); ii != b->getInstructions().cend(); ii++)
+ 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
decorations.erase(std::remove_if(decorations.begin(), decorations.end(),
[&unreachableDefinitions](std::unique_ptr<Instruction>& I) -> bool {
@@ -361,7 +379,11 @@ void Builder::postProcess()
return unreachableDefinitions.count(decoration_id) != 0;
}),
decorations.end());
+}
+#ifndef GLSLANG_WEB
+// 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
@@ -371,24 +393,17 @@ void Builder::postProcess()
Instruction* type = groupedTypes[OpTypePointer][t];
if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
- addExtension(spv::E_SPV_KHR_8bit_storage);
+ addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
addCapability(spv::CapabilityStorageBuffer8BitAccess);
}
if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
- addExtension(spv::E_SPV_KHR_16bit_storage);
+ addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
addCapability(spv::CapabilityStorageBuffer16BitAccess);
}
}
}
- // process all reachable instructions...
- for (auto bi = reachableBlocks.cbegin(); bi != reachableBlocks.cend(); ++bi) {
- const Block* block = *bi;
- const auto function = [this](const std::unique_ptr<Instruction>& inst) { postProcessReachable(*inst.get()); };
- std::for_each(block->getInstructions().begin(), block->getInstructions().end(), function);
- }
-
// process all block-contained instructions
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
Function* f = *fi;
@@ -422,5 +437,14 @@ void Builder::postProcess()
}
}
}
+#endif
+
+// comment in header
+void Builder::postProcess() {
+ postProcessCFG();
+#ifndef GLSLANG_WEB
+ postProcessFeatures();
+#endif
+}
}; // end spv namespace
diff --git a/thirdparty/glslang/SPIRV/SpvTools.cpp b/thirdparty/glslang/SPIRV/SpvTools.cpp
index db26d59089..97bd4e7427 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.cpp
+++ b/thirdparty/glslang/SPIRV/SpvTools.cpp
@@ -67,6 +67,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
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;
default:
break;
}
@@ -103,7 +105,7 @@ void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& s
// Apply the SPIRV-Tools validator to generated SPIR-V.
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
- spv::SpvBuildLogger* logger)
+ spv::SpvBuildLogger* logger, bool prelegalization)
{
// validate
spv_context context = spvContextCreate(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
@@ -111,6 +113,7 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
spv_diagnostic diagnostic = nullptr;
spv_validator_options options = spvValidatorOptionsCreate();
spvValidatorOptionsSetRelaxBlockLayout(options, intermediate.usingHlslOffsets());
+ spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization);
spvValidateWithOptions(context, options, &binary, &diagnostic);
// report
@@ -172,6 +175,7 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
if (options->generateDebugInfo) {
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
}
+ optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass());
optimizer.RegisterPass(spvtools::CreateMergeReturnPass());
optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass());
@@ -195,8 +199,6 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass());
if (options->optimizeSize) {
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
- // TODO(greg-lunarg): Add this when AMD driver issues are resolved
- // optimizer.RegisterPass(CreateCommonUniformElimPass());
}
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
diff --git a/thirdparty/glslang/SPIRV/SpvTools.h b/thirdparty/glslang/SPIRV/SpvTools.h
index 7e49ae0b30..59c914da0b 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.h
+++ b/thirdparty/glslang/SPIRV/SpvTools.h
@@ -41,10 +41,12 @@
#ifndef GLSLANG_SPV_TOOLS_H
#define GLSLANG_SPV_TOOLS_H
+#ifdef ENABLE_OPT
#include <vector>
#include <ostream>
+#endif
-#include "../glslang/MachineIndependent/localintermediate.h"
+#include "glslang/MachineIndependent/localintermediate.h"
#include "Logger.h"
namespace glslang {
@@ -59,14 +61,14 @@ struct SpvOptions {
bool validate;
};
-#if ENABLE_OPT
+#ifdef ENABLE_OPT
// Use the SPIRV-Tools disassembler to print SPIR-V.
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
// Apply the SPIRV-Tools validator to generated SPIR-V.
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
- spv::SpvBuildLogger*);
+ spv::SpvBuildLogger*, bool prelegalization);
// Apply the SPIRV-Tools optimizer to generated SPIR-V, for the purpose of
// legalizing HLSL SPIR-V.
diff --git a/thirdparty/glslang/SPIRV/disassemble.cpp b/thirdparty/glslang/SPIRV/disassemble.cpp
index 631173c0ec..930e799493 100644
--- a/thirdparty/glslang/SPIRV/disassemble.cpp
+++ b/thirdparty/glslang/SPIRV/disassemble.cpp
@@ -52,26 +52,16 @@ namespace spv {
extern "C" {
// Include C-based headers that don't have a namespace
#include "GLSL.std.450.h"
-#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
-#endif
-
-#ifdef NV_EXTENSIONS
#include "GLSL.ext.NV.h"
-#endif
}
}
const char* GlslStd450DebugNames[spv::GLSLstd450Count];
namespace spv {
-#ifdef AMD_EXTENSIONS
static const char* GLSLextAMDGetDebugNames(const char*, unsigned);
-#endif
-
-#ifdef NV_EXTENSIONS
static const char* GLSLextNVGetDebugNames(const char*, unsigned);
-#endif
static void Kill(std::ostream& out, const char* message)
{
@@ -82,15 +72,8 @@ static void Kill(std::ostream& out, const char* message)
// used to identify the extended instruction library imported when printing
enum ExtInstSet {
GLSL450Inst,
-
-#ifdef AMD_EXTENSIONS
GLSLextAMDInst,
-#endif
-
-#ifdef NV_EXTENSIONS
GLSLextNVInst,
-#endif
-
OpenCLExtInst,
};
@@ -499,37 +482,29 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
const char* name = idDescriptor[stream[word - 2]].c_str();
if (0 == memcmp("OpenCL", name, 6)) {
extInstSet = OpenCLExtInst;
-#ifdef AMD_EXTENSIONS
} 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;
-#endif
-#ifdef NV_EXTENSIONS
- }else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
+ } 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;
-#endif
}
unsigned entrypoint = stream[word - 1];
if (extInstSet == GLSL450Inst) {
if (entrypoint < GLSLstd450Count) {
out << "(" << GlslStd450DebugNames[entrypoint] << ")";
}
-#ifdef AMD_EXTENSIONS
} else if (extInstSet == GLSLextAMDInst) {
out << "(" << GLSLextAMDGetDebugNames(name, entrypoint) << ")";
-#endif
-#ifdef NV_EXTENSIONS
}
else if (extInstSet == GLSLextNVInst) {
out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
-#endif
}
}
break;
@@ -648,9 +623,11 @@ static void GLSLstd450GetDebugNames(const char** names)
names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid";
names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample";
names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset";
+ names[GLSLstd450NMin] = "NMin";
+ names[GLSLstd450NMax] = "NMax";
+ names[GLSLstd450NClamp] = "NClamp";
}
-#ifdef AMD_EXTENSIONS
static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint)
{
if (strcmp(name, spv::E_SPV_AMD_shader_ballot) == 0) {
@@ -692,18 +669,17 @@ static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint
return "Bad";
}
-#endif
-#ifdef NV_EXTENSIONS
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(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 ||
- strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 ||
- strcmp(name, spv::E_SPV_NV_mesh_shader) == 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 BuiltInViewportMaskNV: return "ViewportMaskNV";
@@ -729,6 +705,8 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
case CapabilityMeshShadingNV: return "MeshShadingNV";
+ case CapabilityImageFootprintNV: return "ImageFootprintNV";
+ case CapabilitySampleMaskOverrideCoverageNV:return "SampleMaskOverrideCoverageNV";
// NV Decorations
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
@@ -745,7 +723,6 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
}
return "Bad";
}
-#endif
void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
{
diff --git a/thirdparty/glslang/SPIRV/doc.cpp b/thirdparty/glslang/SPIRV/doc.cpp
index 3b85767216..bee5c79729 100644
--- a/thirdparty/glslang/SPIRV/doc.cpp
+++ b/thirdparty/glslang/SPIRV/doc.cpp
@@ -50,12 +50,8 @@ namespace spv {
// Include C-based headers that don't have a namespace
#include "GLSL.ext.KHR.h"
#include "GLSL.ext.EXT.h"
-#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
-#endif
-#ifdef NV_EXTENSIONS
#include "GLSL.ext.NV.h"
-#endif
}
}
@@ -98,22 +94,17 @@ const char* ExecutionModelString(int model)
case 4: return "Fragment";
case 5: return "GLCompute";
case 6: return "Kernel";
-#ifdef NV_EXTENSIONS
case ExecutionModelTaskNV: return "TaskNV";
case ExecutionModelMeshNV: return "MeshNV";
-#endif
default: return "Bad";
-#ifdef NV_EXTENSIONS
case ExecutionModelRayGenerationNV: return "RayGenerationNV";
case ExecutionModelIntersectionNV: return "IntersectionNV";
case ExecutionModelAnyHitNV: return "AnyHitNV";
case ExecutionModelClosestHitNV: return "ClosestHitNV";
case ExecutionModelMissNV: return "MissNV";
case ExecutionModelCallableNV: return "CallableNV";
-#endif
-
}
}
@@ -183,13 +174,18 @@ const char* ExecutionModeString(int mode)
case 4446: return "PostDepthCoverage";
-#ifdef NV_EXTENSIONS
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
case ExecutionModeOutputTrianglesNV: return "OutputTrianglesNV";
case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV";
case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV";
-#endif
+
+ case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT";
+ case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT";
+ case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT";
+ case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT";
+ case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT";
+ case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT";
case ExecutionModeCeiling:
default: return "Bad";
@@ -213,14 +209,12 @@ const char* StorageClassString(int StorageClass)
case 11: return "Image";
case 12: return "StorageBuffer";
-#ifdef NV_EXTENSIONS
case StorageClassRayPayloadNV: return "RayPayloadNV";
case StorageClassHitAttributeNV: return "HitAttributeNV";
case StorageClassIncomingRayPayloadNV: return "IncomingRayPayloadNV";
case StorageClassShaderRecordBufferNV: return "ShaderRecordBufferNV";
case StorageClassCallableDataNV: return "CallableDataNV";
case StorageClassIncomingCallableDataNV: return "IncomingCallableDataNV";
-#endif
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
@@ -282,10 +276,7 @@ const char* DecorationString(int decoration)
case DecorationCeiling:
default: return "Bad";
-#ifdef AMD_EXTENSIONS
case DecorationExplicitInterpAMD: return "ExplicitInterpAMD";
-#endif
-#ifdef NV_EXTENSIONS
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
case DecorationPassthroughNV: return "PassthroughNV";
case DecorationViewportRelativeNV: return "ViewportRelativeNV";
@@ -294,7 +285,6 @@ const char* DecorationString(int decoration)
case DecorationPerViewNV: return "PerViewNV";
case DecorationPerTaskNV: return "PerTaskNV";
case DecorationPerVertexNV: return "PerVertexNV";
-#endif
case DecorationNonUniformEXT: return "DecorationNonUniformEXT";
case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
@@ -364,7 +354,6 @@ const char* BuiltInString(int builtIn)
case 4426: return "DrawIndex";
case 5014: return "FragStencilRefEXT";
-#ifdef AMD_EXTENSIONS
case 4992: return "BaryCoordNoPerspAMD";
case 4993: return "BaryCoordNoPerspCentroidAMD";
case 4994: return "BaryCoordNoPerspSampleAMD";
@@ -372,9 +361,6 @@ const char* BuiltInString(int builtIn)
case 4996: return "BaryCoordSmoothCentroidAMD";
case 4997: return "BaryCoordSmoothSampleAMD";
case 4998: return "BaryCoordPullModelAMD";
-#endif
-
-#ifdef NV_EXTENSIONS
case BuiltInLaunchIdNV: return "LaunchIdNV";
case BuiltInLaunchSizeNV: return "LaunchSizeNV";
case BuiltInWorldRayOriginNV: return "WorldRayOriginNV";
@@ -398,15 +384,12 @@ const char* BuiltInString(int builtIn)
// case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
case BuiltInBaryCoordNV: return "BaryCoordNV";
case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
-#endif
case BuiltInFragSizeEXT: return "FragSizeEXT";
case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
case 5264: return "FullyCoveredEXT";
-
-#ifdef NV_EXTENSIONS
case BuiltInTaskCountNV: return "TaskCountNV";
case BuiltInPrimitiveCountNV: return "PrimitiveCountNV";
case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV";
@@ -415,7 +398,10 @@ const char* BuiltInString(int builtIn)
case BuiltInLayerPerViewNV: return "LayerPerViewNV";
case BuiltInMeshViewCountNV: return "MeshViewCountNV";
case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV";
-#endif
+ case BuiltInWarpsPerSMNV: return "WarpsPerSMNV";
+ case BuiltInSMCountNV: return "SMCountNV";
+ case BuiltInWarpIDNV: return "WarpIDNV";
+ case BuiltInSMIDNV: return "SMIDNV";
default: return "Bad";
}
@@ -770,11 +756,9 @@ const char* GroupOperationString(int gop)
case GroupOperationInclusiveScan: return "InclusiveScan";
case GroupOperationExclusiveScan: return "ExclusiveScan";
case GroupOperationClusteredReduce: return "ClusteredReduce";
-#ifdef NV_EXTENSIONS
case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV";
case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV";
case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV";
-#endif
default: return "Bad";
}
@@ -882,26 +866,23 @@ const char* CapabilityString(int info)
case CapabilityStoragePushConstant16: return "StoragePushConstant16";
case CapabilityStorageInputOutput16: return "StorageInputOutput16";
- case CapabilityStorageBuffer8BitAccess: return "CapabilityStorageBuffer8BitAccess";
- case CapabilityUniformAndStorageBuffer8BitAccess: return "CapabilityUniformAndStorageBuffer8BitAccess";
- case CapabilityStoragePushConstant8: return "CapabilityStoragePushConstant8";
+ case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess";
+ case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess";
+ case CapabilityStoragePushConstant8: return "StoragePushConstant8";
case CapabilityDeviceGroup: return "DeviceGroup";
case CapabilityMultiView: return "MultiView";
case CapabilityStencilExportEXT: return "StencilExportEXT";
-#ifdef AMD_EXTENSIONS
case CapabilityFloat16ImageAMD: return "Float16ImageAMD";
case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD";
case CapabilityFragmentMaskAMD: return "FragmentMaskAMD";
case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD";
-#endif
case CapabilityAtomicStorageOps: return "AtomicStorageOps";
case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage";
-#ifdef NV_EXTENSIONS
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
case CapabilityShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV";
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
@@ -913,33 +894,44 @@ const char* CapabilityString(int info)
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
case CapabilityMeshShadingNV: return "MeshShadingNV";
-// case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by CapabilityFragmentDensityEXT
-#endif
+ case CapabilityImageFootprintNV: return "ImageFootprintNV";
+// case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT
+ case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV";
case CapabilityFragmentDensityEXT: return "FragmentDensityEXT";
case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT";
- case CapabilityShaderNonUniformEXT: return "CapabilityShaderNonUniformEXT";
- case CapabilityRuntimeDescriptorArrayEXT: return "CapabilityRuntimeDescriptorArrayEXT";
- case CapabilityInputAttachmentArrayDynamicIndexingEXT: return "CapabilityInputAttachmentArrayDynamicIndexingEXT";
- case CapabilityUniformTexelBufferArrayDynamicIndexingEXT: return "CapabilityUniformTexelBufferArrayDynamicIndexingEXT";
- case CapabilityStorageTexelBufferArrayDynamicIndexingEXT: return "CapabilityStorageTexelBufferArrayDynamicIndexingEXT";
- case CapabilityUniformBufferArrayNonUniformIndexingEXT: return "CapabilityUniformBufferArrayNonUniformIndexingEXT";
- case CapabilitySampledImageArrayNonUniformIndexingEXT: return "CapabilitySampledImageArrayNonUniformIndexingEXT";
- case CapabilityStorageBufferArrayNonUniformIndexingEXT: return "CapabilityStorageBufferArrayNonUniformIndexingEXT";
- case CapabilityStorageImageArrayNonUniformIndexingEXT: return "CapabilityStorageImageArrayNonUniformIndexingEXT";
- case CapabilityInputAttachmentArrayNonUniformIndexingEXT: return "CapabilityInputAttachmentArrayNonUniformIndexingEXT";
- case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "CapabilityUniformTexelBufferArrayNonUniformIndexingEXT";
- case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "CapabilityStorageTexelBufferArrayNonUniformIndexingEXT";
+ case CapabilityShaderNonUniformEXT: return "ShaderNonUniformEXT";
+ case CapabilityRuntimeDescriptorArrayEXT: return "RuntimeDescriptorArrayEXT";
+ case CapabilityInputAttachmentArrayDynamicIndexingEXT: return "InputAttachmentArrayDynamicIndexingEXT";
+ case CapabilityUniformTexelBufferArrayDynamicIndexingEXT: return "UniformTexelBufferArrayDynamicIndexingEXT";
+ case CapabilityStorageTexelBufferArrayDynamicIndexingEXT: return "StorageTexelBufferArrayDynamicIndexingEXT";
+ case CapabilityUniformBufferArrayNonUniformIndexingEXT: return "UniformBufferArrayNonUniformIndexingEXT";
+ case CapabilitySampledImageArrayNonUniformIndexingEXT: return "SampledImageArrayNonUniformIndexingEXT";
+ case CapabilityStorageBufferArrayNonUniformIndexingEXT: return "StorageBufferArrayNonUniformIndexingEXT";
+ case CapabilityStorageImageArrayNonUniformIndexingEXT: return "StorageImageArrayNonUniformIndexingEXT";
+ case CapabilityInputAttachmentArrayNonUniformIndexingEXT: return "InputAttachmentArrayNonUniformIndexingEXT";
+ case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "UniformTexelBufferArrayNonUniformIndexingEXT";
+ case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "StorageTexelBufferArrayNonUniformIndexingEXT";
+
+ case CapabilityVulkanMemoryModelKHR: return "VulkanMemoryModelKHR";
+ case CapabilityVulkanMemoryModelDeviceScopeKHR: return "VulkanMemoryModelDeviceScopeKHR";
+
+ case CapabilityPhysicalStorageBufferAddressesEXT: return "PhysicalStorageBufferAddressesEXT";
- case CapabilityVulkanMemoryModelKHR: return "CapabilityVulkanMemoryModelKHR";
- case CapabilityVulkanMemoryModelDeviceScopeKHR: return "CapabilityVulkanMemoryModelDeviceScopeKHR";
+ case CapabilityVariablePointers: return "VariablePointers";
- case CapabilityPhysicalStorageBufferAddressesEXT: return "CapabilityPhysicalStorageBufferAddressesEXT";
+ case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV";
+ case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV";
- case CapabilityVariablePointers: return "CapabilityVariablePointers";
+ case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT";
+ case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
+ case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
- case CapabilityCooperativeMatrixNV: return "CapabilityCooperativeMatrixNV";
+ case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
+ case CapabilityShaderClockKHR: return "ShaderClockKHR";
+
+ case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
default: return "Bad";
}
@@ -1316,7 +1308,6 @@ const char* OpcodeString(int op)
case 4430: return "OpSubgroupAllEqualKHR";
case 4432: return "OpSubgroupReadInvocationKHR";
-#ifdef AMD_EXTENSIONS
case 5000: return "OpGroupIAddNonUniformAMD";
case 5001: return "OpGroupFAddNonUniformAMD";
case 5002: return "OpGroupFMinNonUniformAMD";
@@ -1328,12 +1319,12 @@ const char* OpcodeString(int op)
case 5011: return "OpFragmentMaskFetchAMD";
case 5012: return "OpFragmentFetchAMD";
-#endif
+
+ case OpReadClockKHR: return "OpReadClockKHR";
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
-#ifdef NV_EXTENSIONS
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
case OpReportIntersectionNV: return "OpReportIntersectionNV";
case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
@@ -1343,13 +1334,17 @@ const char* OpcodeString(int op)
case OpExecuteCallableNV: return "OpExecuteCallableNV";
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
-#endif
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV";
case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV";
+ case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT";
+ case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT";
+
+ case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
+ case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
default:
return "Bad";
@@ -1464,6 +1459,8 @@ void Parameterize()
InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
+ InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
+ InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
// Specific additional context-dependent operands
@@ -2656,7 +2653,6 @@ void Parameterize()
InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
-#ifdef AMD_EXTENSIONS
InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'");
@@ -2695,9 +2691,7 @@ void Parameterize()
InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
-#endif
-#ifdef NV_EXTENSIONS
InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
InstructionDesc[OpTypeAccelerationStructureNV].setResultAndType(true, false);
@@ -2735,7 +2729,6 @@ void Parameterize()
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
-#endif
InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
@@ -2762,6 +2755,10 @@ void Parameterize()
InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'");
InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
+
+ InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
+
+ InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
}
}; // end spv namespace
diff --git a/thirdparty/glslang/SPIRV/spirv.hpp b/thirdparty/glslang/SPIRV/spirv.hpp
index 5297fd3902..1e96f7b4a9 100644
--- a/thirdparty/glslang/SPIRV/spirv.hpp
+++ b/thirdparty/glslang/SPIRV/spirv.hpp
@@ -91,6 +91,7 @@ enum AddressingModel {
AddressingModelLogical = 0,
AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2,
+ AddressingModelPhysicalStorageBuffer64 = 5348,
AddressingModelPhysicalStorageBuffer64EXT = 5348,
AddressingModelMax = 0x7fffffff,
};
@@ -99,6 +100,7 @@ enum MemoryModel {
MemoryModelSimple = 0,
MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2,
+ MemoryModelVulkan = 3,
MemoryModelVulkanKHR = 3,
MemoryModelMax = 0x7fffffff,
};
@@ -154,6 +156,12 @@ enum ExecutionMode {
ExecutionModeDerivativeGroupQuadsNV = 5289,
ExecutionModeDerivativeGroupLinearNV = 5290,
ExecutionModeOutputTrianglesNV = 5298,
+ ExecutionModePixelInterlockOrderedEXT = 5366,
+ ExecutionModePixelInterlockUnorderedEXT = 5367,
+ ExecutionModeSampleInterlockOrderedEXT = 5368,
+ ExecutionModeSampleInterlockUnorderedEXT = 5369,
+ ExecutionModeShadingRateInterlockOrderedEXT = 5370,
+ ExecutionModeShadingRateInterlockUnorderedEXT = 5371,
ExecutionModeMax = 0x7fffffff,
};
@@ -177,6 +185,7 @@ enum StorageClass {
StorageClassHitAttributeNV = 5339,
StorageClassIncomingRayPayloadNV = 5342,
StorageClassShaderRecordBufferNV = 5343,
+ StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349,
StorageClassMax = 0x7fffffff,
};
@@ -305,9 +314,13 @@ enum ImageOperandsShift {
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,
@@ -324,9 +337,13 @@ enum ImageOperandsMask {
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,
@@ -442,13 +459,17 @@ enum Decoration {
DecorationPerViewNV = 5272,
DecorationPerTaskNV = 5273,
DecorationPerVertexNV = 5285,
+ DecorationNonUniform = 5300,
DecorationNonUniformEXT = 5300,
+ DecorationRestrictPointer = 5355,
DecorationRestrictPointerEXT = 5355,
+ DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356,
DecorationCounterBuffer = 5634,
DecorationHlslCounterBufferGOOGLE = 5634,
DecorationHlslSemanticGOOGLE = 5635,
DecorationUserSemantic = 5635,
+ DecorationUserTypeGOOGLE = 5636,
DecorationMax = 0x7fffffff,
};
@@ -551,6 +572,10 @@ enum BuiltIn {
BuiltInHitTNV = 5332,
BuiltInHitKindNV = 5333,
BuiltInIncomingRayFlagsNV = 5351,
+ BuiltInWarpsPerSMNV = 5374,
+ BuiltInSMCountNV = 5375,
+ BuiltInWarpIDNV = 5376,
+ BuiltInSMIDNV = 5377,
BuiltInMax = 0x7fffffff,
};
@@ -619,9 +644,13 @@ enum MemorySemanticsShift {
MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 11,
+ MemorySemanticsOutputMemoryShift = 12,
MemorySemanticsOutputMemoryKHRShift = 12,
+ MemorySemanticsMakeAvailableShift = 13,
MemorySemanticsMakeAvailableKHRShift = 13,
+ MemorySemanticsMakeVisibleShift = 14,
MemorySemanticsMakeVisibleKHRShift = 14,
+ MemorySemanticsVolatileShift = 15,
MemorySemanticsMax = 0x7fffffff,
};
@@ -637,17 +666,24 @@ enum MemorySemanticsMask {
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,
MemoryAccessMax = 0x7fffffff,
};
@@ -657,8 +693,11 @@ enum MemoryAccessMask {
MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002,
MemoryAccessNontemporalMask = 0x00000004,
+ MemoryAccessMakePointerAvailableMask = 0x00000008,
MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
+ MemoryAccessMakePointerVisibleMask = 0x00000010,
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
+ MemoryAccessNonPrivatePointerMask = 0x00000020,
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
};
@@ -668,6 +707,7 @@ enum Scope {
ScopeWorkgroup = 2,
ScopeSubgroup = 3,
ScopeInvocation = 4,
+ ScopeQueueFamily = 5,
ScopeQueueFamilyKHR = 5,
ScopeMax = 0x7fffffff,
};
@@ -768,6 +808,8 @@ enum Capability {
CapabilityGroupNonUniformShuffleRelative = 66,
CapabilityGroupNonUniformClustered = 67,
CapabilityGroupNonUniformQuad = 68,
+ CapabilityShaderLayer = 69,
+ CapabilityShaderViewportIndex = 70,
CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427,
CapabilitySubgroupVoteKHR = 4431,
@@ -796,6 +838,7 @@ enum Capability {
CapabilityFragmentMaskAMD = 5010,
CapabilityStencilExportEXT = 5013,
CapabilityImageReadWriteLodAMD = 5015,
+ CapabilityShaderClockKHR = 5055,
CapabilitySampleMaskOverrideCoverageNV = 5249,
CapabilityGeometryShaderPassthroughNV = 5251,
CapabilityShaderViewportIndexLayerEXT = 5254,
@@ -811,28 +854,49 @@ enum Capability {
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,
+ CapabilityVulkanMemoryModel = 5345,
CapabilityVulkanMemoryModelKHR = 5345,
+ CapabilityVulkanMemoryModelDeviceScope = 5346,
CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
+ CapabilityPhysicalStorageBufferAddresses = 5347,
CapabilityPhysicalStorageBufferAddressesEXT = 5347,
CapabilityComputeDerivativeGroupLinearNV = 5350,
CapabilityCooperativeMatrixNV = 5357,
+ CapabilityFragmentShaderSampleInterlockEXT = 5363,
+ CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
+ CapabilityShaderSMBuiltinsNV = 5373,
+ CapabilityFragmentShaderPixelInterlockEXT = 5378,
+ CapabilityDemoteToHelperInvocationEXT = 5379,
CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
+ CapabilityIntegerFunctions2INTEL = 5584,
CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1200,6 +1264,7 @@ enum Op {
OpGroupSMaxNonUniformAMD = 5007,
OpFragmentMaskFetchAMD = 5011,
OpFragmentFetchAMD = 5012,
+ OpReadClockKHR = 5056,
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
@@ -1214,6 +1279,10 @@ enum Op {
OpCooperativeMatrixStoreNV = 5360,
OpCooperativeMatrixMulAddNV = 5361,
OpCooperativeMatrixLengthNV = 5362,
+ OpBeginInvocationInterlockEXT = 5364,
+ OpEndInvocationInterlockEXT = 5365,
+ OpDemoteToHelperInvocationEXT = 5380,
+ OpIsHelperInvocationEXT = 5381,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1224,6 +1293,20 @@ enum Op {
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,
OpDecorateString = 5632,
OpDecorateStringGOOGLE = 5632,
OpMemberDecorateString = 5633,
@@ -1714,6 +1797,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
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 OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
@@ -1728,6 +1812,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
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 OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
+ case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -1738,10 +1826,22 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
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 OpDecorateString: *hasResult = false; *hasResultType = false; break;
- case OpDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
- case OpMemberDecorateStringGOOGLE: *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;
diff --git a/thirdparty/glslang/SPIRV/spvIR.h b/thirdparty/glslang/SPIRV/spvIR.h
index b3cd0b0613..cf6a71159a 100644..100755
--- a/thirdparty/glslang/SPIRV/spvIR.h
+++ b/thirdparty/glslang/SPIRV/spvIR.h
@@ -226,6 +226,36 @@ public:
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();
+ Instruction* unreachable = new Instruction(OpUnreachable);
+ addInstruction(std::unique_ptr<Instruction>(unreachable));
+ }
+ // 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(OpBranch);
+ branch->addIdOperand(header->getId());
+ addInstruction(std::unique_ptr<Instruction>(branch));
+ successors.push_back(header);
+ }
+
bool isTerminated() const
{
switch (instructions.back()->getOpCode()) {
@@ -235,6 +265,7 @@ public:
case OpKill:
case OpReturn:
case OpReturnValue:
+ case OpUnreachable:
return true;
default:
return false;
@@ -268,10 +299,24 @@ protected:
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.
-void inReadableOrder(Block* root, std::function<void(Block*)> callback);
+// 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<void(Block*, ReachReason, Block* header)> callback);
//
// SPIR-V IR Function.
@@ -321,7 +366,7 @@ public:
parameterInstructions[p]->dump(out);
// Blocks
- inReadableOrder(blocks[0], [&out](const Block* b) { b->dump(out); });
+ inReadableOrder(blocks[0], [&out](const Block* b, ReachReason, Block*) { b->dump(out); });
Instruction end(0, 0, OpFunctionEnd);
end.dump(out);
}
@@ -436,6 +481,6 @@ __inline void Block::addInstruction(std::unique_ptr<Instruction> inst)
parent.getParent().mapInstruction(raw_instruction);
}
-}; // end spv namespace
+} // end spv namespace
#endif // spvIR_H
diff --git a/thirdparty/glslang/glslang/Include/BaseTypes.h b/thirdparty/glslang/glslang/Include/BaseTypes.h
index 1827c49653..6d4b4ff8e3 100644
--- a/thirdparty/glslang/glslang/Include/BaseTypes.h
+++ b/thirdparty/glslang/glslang/Include/BaseTypes.h
@@ -61,11 +61,7 @@ enum TBasicType {
EbtSampler,
EbtStruct,
EbtBlock,
-
-#ifdef NV_EXTENSIONS
EbtAccStructNV,
-#endif
-
EbtReference,
// HLSL types that live only temporarily.
@@ -94,13 +90,11 @@ enum TStorageQualifier {
EvqBuffer, // read/write, shared with app
EvqShared, // compute shader's read/write 'shared' qualifier
-#ifdef NV_EXTENSIONS
EvqPayloadNV,
EvqPayloadInNV,
EvqHitAttrNV,
EvqCallableDataNV,
EvqCallableDataInNV,
-#endif
// parameters
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
@@ -221,7 +215,6 @@ enum TBuiltInVariable {
EbvSampleMask,
EbvHelperInvocation,
-#ifdef AMD_EXTENSIONS
EbvBaryCoordNoPersp,
EbvBaryCoordNoPerspCentroid,
EbvBaryCoordNoPerspSample,
@@ -229,7 +222,6 @@ enum TBuiltInVariable {
EbvBaryCoordSmoothCentroid,
EbvBaryCoordSmoothSample,
EbvBaryCoordPullModel,
-#endif
EbvViewIndex,
EbvDeviceIndex,
@@ -237,7 +229,6 @@ enum TBuiltInVariable {
EbvFragSizeEXT,
EbvFragInvocationCountEXT,
-#ifdef NV_EXTENSIONS
EbvViewportMaskNV,
EbvSecondaryPositionNV,
EbvSecondaryViewportMaskNV,
@@ -246,7 +237,7 @@ enum TBuiltInVariable {
EbvFragFullyCoveredNV,
EbvFragmentSizeNV,
EbvInvocationsPerPixelNV,
- // raytracing
+ // ray tracing
EbvLaunchIdNV,
EbvLaunchSizeNV,
EbvInstanceCustomIndexNV,
@@ -261,8 +252,10 @@ enum TBuiltInVariable {
EbvObjectToWorldNV,
EbvWorldToObjectNV,
EbvIncomingRayFlagsNV,
+ // barycentrics
EbvBaryCoordNV,
EbvBaryCoordNoPerspNV,
+ // mesh shaders
EbvTaskCountNV,
EbvPrimitiveCountNV,
EbvPrimitiveIndicesNV,
@@ -271,7 +264,12 @@ enum TBuiltInVariable {
EbvLayerPerViewNV,
EbvMeshViewCountNV,
EbvMeshViewIndicesNV,
-#endif
+
+ // sm builtins
+ EbvWarpsPerSM,
+ EbvSMCount,
+ EbvWarpID,
+ EbvSMID,
// HLSL built-ins that live only temporarily, until they get remapped
// to one of the above.
@@ -291,6 +289,19 @@ enum TBuiltInVariable {
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
+};
+
+#ifdef GLSLANG_WEB
+__inline const char* GetStorageQualifierString(TStorageQualifier q) { return ""; }
+__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { return ""; }
+#else
// These will show up in error messages
__inline const char* GetStorageQualifierString(TStorageQualifier q)
{
@@ -317,13 +328,11 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
case EvqPointCoord: return "gl_PointCoord"; break;
case EvqFragColor: return "fragColor"; break;
case EvqFragDepth: return "gl_FragDepth"; break;
-#ifdef NV_EXTENSIONS
case EvqPayloadNV: return "rayPayloadNV"; break;
case EvqPayloadInNV: return "rayPayloadInNV"; break;
case EvqHitAttrNV: return "hitAttributeNV"; break;
case EvqCallableDataNV: return "callableDataNV"; break;
case EvqCallableDataInNV: return "callableDataInNV"; break;
-#endif
default: return "unknown qualifier";
}
}
@@ -338,6 +347,8 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
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";
@@ -345,6 +356,13 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
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";
@@ -396,7 +414,6 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvSampleMask: return "SampleMaskIn";
case EbvHelperInvocation: return "HelperInvocation";
-#ifdef AMD_EXTENSIONS
case EbvBaryCoordNoPersp: return "BaryCoordNoPersp";
case EbvBaryCoordNoPerspCentroid: return "BaryCoordNoPerspCentroid";
case EbvBaryCoordNoPerspSample: return "BaryCoordNoPerspSample";
@@ -404,7 +421,6 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvBaryCoordSmoothCentroid: return "BaryCoordSmoothCentroid";
case EbvBaryCoordSmoothSample: return "BaryCoordSmoothSample";
case EbvBaryCoordPullModel: return "BaryCoordPullModel";
-#endif
case EbvViewIndex: return "ViewIndex";
case EbvDeviceIndex: return "DeviceIndex";
@@ -412,7 +428,6 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvFragSizeEXT: return "FragSizeEXT";
case EbvFragInvocationCountEXT: return "FragInvocationCountEXT";
-#ifdef NV_EXTENSIONS
case EbvViewportMaskNV: return "ViewportMaskNV";
case EbvSecondaryPositionNV: return "SecondaryPositionNV";
case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
@@ -438,6 +453,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvBaryCoordNV: return "BaryCoordNV";
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
+
case EbvTaskCountNV: return "TaskCountNV";
case EbvPrimitiveCountNV: return "PrimitiveCountNV";
case EbvPrimitiveIndicesNV: return "PrimitiveIndicesNV";
@@ -446,20 +462,16 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvLayerPerViewNV: return "LayerPerViewNV";
case EbvMeshViewCountNV: return "MeshViewCountNV";
case EbvMeshViewIndicesNV: return "MeshViewIndicesNV";
-#endif
+
+ case EbvWarpsPerSM: return "WarpsPerSMNV";
+ case EbvSMCount: return "SMCountNV";
+ case EbvWarpID: return "WarpIDNV";
+ case EbvSMID: return "SMIDNV";
+
default: return "unknown built-in variable";
}
}
-// 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
-};
-
__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
{
switch (p) {
@@ -470,6 +482,7 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
default: return "unknown precision qualifier";
}
}
+#endif
__inline bool isTypeSignedInt(TBasicType type)
{
@@ -514,7 +527,8 @@ __inline bool isTypeFloat(TBasicType type)
}
}
-__inline int getTypeRank(TBasicType type) {
+__inline int getTypeRank(TBasicType type)
+{
int res = -1;
switch(type) {
case EbtInt8:
diff --git a/thirdparty/glslang/glslang/Include/Common.h b/thirdparty/glslang/glslang/Include/Common.h
index a82c3af4dc..2c511bc1c5 100644
--- a/thirdparty/glslang/glslang/Include/Common.h
+++ b/thirdparty/glslang/glslang/Include/Common.h
@@ -51,7 +51,7 @@ std::string to_string(const T& val) {
#endif
// -- GODOT start --
-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) /* || defined MINGW_HAS_SECURE_API*/
+#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) /* || defined MINGW_HAS_SECURE_API */
// -- GODOT end --
#include <basetsd.h>
#ifndef snprintf
diff --git a/thirdparty/glslang/glslang/Include/ConstantUnion.h b/thirdparty/glslang/glslang/Include/ConstantUnion.h
index 3e93340151..76b2d9c08b 100644
--- a/thirdparty/glslang/glslang/Include/ConstantUnion.h
+++ b/thirdparty/glslang/glslang/Include/ConstantUnion.h
@@ -213,56 +213,59 @@ public:
return false;
switch (type) {
- case EbtInt16:
- if (constant.i16Const == i16Const)
+ case EbtInt:
+ if (constant.iConst == iConst)
return true;
break;
- case EbtUint16:
- if (constant.u16Const == u16Const)
+ case EbtUint:
+ if (constant.uConst == uConst)
return true;
break;
- case EbtInt8:
- if (constant.i8Const == i8Const)
+ case EbtBool:
+ if (constant.bConst == bConst)
return true;
break;
- case EbtUint8:
- if (constant.u8Const == u8Const)
+ case EbtDouble:
+ if (constant.dConst == dConst)
return true;
break;
- case EbtInt:
- if (constant.iConst == iConst)
+
+#ifndef GLSLANG_WEB
+ case EbtInt16:
+ if (constant.i16Const == i16Const)
return true;
break;
- case EbtUint:
- if (constant.uConst == uConst)
+ case EbtUint16:
+ if (constant.u16Const == u16Const)
return true;
break;
- case EbtInt64:
- if (constant.i64Const == i64Const)
+ case EbtInt8:
+ if (constant.i8Const == i8Const)
return true;
break;
- case EbtUint64:
- if (constant.u64Const == u64Const)
+ case EbtUint8:
+ if (constant.u8Const == u8Const)
return true;
break;
- case EbtDouble:
- if (constant.dConst == dConst)
+ case EbtInt64:
+ if (constant.i64Const == i64Const)
return true;
break;
- case EbtBool:
- if (constant.bConst == bConst)
+ case EbtUint64:
+ if (constant.u64Const == u64Const)
return true;
break;
+#endif
default:
assert(false && "Default missing");
}
@@ -329,6 +332,22 @@ public:
{
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;
+#ifndef GLSLANG_WEB
case EbtInt8:
if (i8Const > constant.i8Const)
return true;
@@ -349,16 +368,6 @@ public:
return true;
return false;
- case EbtInt:
- if (iConst > constant.iConst)
- return true;
-
- return false;
- case EbtUint:
- if (uConst > constant.uConst)
- return true;
-
- return false;
case EbtInt64:
if (i64Const > constant.i64Const)
return true;
@@ -369,11 +378,7 @@ public:
return true;
return false;
- case EbtDouble:
- if (dConst > constant.dConst)
- return true;
-
- return false;
+#endif
default:
assert(false && "Default missing");
return false;
@@ -384,6 +389,7 @@ public:
{
assert(type == constant.type);
switch (type) {
+#ifndef GLSLANG_WEB
case EbtInt8:
if (i8Const < constant.i8Const)
return true;
@@ -394,7 +400,7 @@ public:
return true;
return false;
- case EbtInt16:
+ case EbtInt16:
if (i16Const < constant.i16Const)
return true;
@@ -402,17 +408,6 @@ public:
case EbtUint16:
if (u16Const < constant.u16Const)
return true;
-
- return false;
- case EbtInt:
- if (iConst < constant.iConst)
- return true;
-
- return false;
- case EbtUint:
- if (uConst < constant.uConst)
- return true;
-
return false;
case EbtInt64:
if (i64Const < constant.i64Const)
@@ -424,11 +419,22 @@ public:
return true;
return false;
+#endif
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;
@@ -440,15 +446,17 @@ public:
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;
+#ifndef GLSLANG_WEB
case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break;
case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break;
- case EbtInt: returnValue.setIConst(iConst + constant.iConst); 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 EbtUint: returnValue.setUConst(uConst + constant.uConst); break;
case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break;
- case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break;
+#endif
default: assert(false && "Default missing");
}
@@ -460,15 +468,17 @@ public:
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;
+#ifndef GLSLANG_WEB
case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break;
case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break;
- case EbtInt: returnValue.setIConst(iConst - constant.iConst); 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 EbtUint: returnValue.setUConst(uConst - constant.uConst); break;
case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break;
- case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break;
+#endif
default: assert(false && "Default missing");
}
@@ -480,15 +490,17 @@ public:
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;
+#ifndef GLSLANG_WEB
case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break;
case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break;
- case EbtInt: returnValue.setIConst(iConst * constant.iConst); 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 EbtUint: returnValue.setUConst(uConst * constant.uConst); break;
case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break;
- case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break;
+#endif
default: assert(false && "Default missing");
}
@@ -500,14 +512,16 @@ public:
TConstUnion returnValue;
assert(type == constant.type);
switch (type) {
+ case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
+#ifndef GLSLANG_WEB
case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break;
case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break;
- case EbtInt: returnValue.setIConst(iConst % constant.iConst); 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 EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break;
+#endif
default: assert(false && "Default missing");
}
@@ -518,6 +532,7 @@ public:
{
TConstUnion returnValue;
switch (type) {
+#ifndef GLSLANG_WEB
case EbtInt8:
switch (constant.type) {
case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break;
@@ -570,32 +585,38 @@ public:
default: assert(false && "Default missing");
}
break;
+#endif
case EbtInt:
switch (constant.type) {
+ case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
+ case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
- case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break;
case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break;
case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break;
+#endif
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;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setUConst(uConst >> constant.iConst); break;
- case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break;
case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break;
case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break;
+#endif
default: assert(false && "Default missing");
}
break;
+#ifndef GLSLANG_WEB
case EbtInt64:
switch (constant.type) {
case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break;
@@ -622,6 +643,7 @@ public:
default: assert(false && "Default missing");
}
break;
+#endif
default: assert(false && "Default missing");
}
@@ -632,6 +654,7 @@ public:
{
TConstUnion returnValue;
switch (type) {
+#ifndef GLSLANG_WEB
case EbtInt8:
switch (constant.type) {
case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break;
@@ -684,32 +707,6 @@ public:
default: assert(false && "Default missing");
}
break;
- case EbtInt:
- switch (constant.type) {
- 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 EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
- case EbtUint: returnValue.setIConst(iConst << constant.uConst); 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 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 EbtInt: returnValue.setUConst(uConst << constant.iConst); break;
- case EbtUint: returnValue.setUConst(uConst << constant.uConst); 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;
@@ -736,6 +733,37 @@ public:
default: assert(false && "Default missing");
}
break;
+#endif
+ case EbtInt:
+ switch (constant.type) {
+ case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
+ case EbtUint: returnValue.setIConst(iConst << constant.uConst); break;
+#ifndef GLSLANG_WEB
+ 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;
+#endif
+ 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;
+#ifndef GLSLANG_WEB
+ 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;
+#endif
+ default: assert(false && "Default missing");
+ }
+ break;
default: assert(false && "Default missing");
}
@@ -747,14 +775,16 @@ public:
TConstUnion returnValue;
assert(type == constant.type);
switch (type) {
+ case EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst & constant.uConst); break;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
- case EbtUint: returnValue.setUConst(uConst & constant.uConst); break;
case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break;
case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break;
+#endif
default: assert(false && "Default missing");
}
@@ -766,14 +796,16 @@ public:
TConstUnion returnValue;
assert(type == constant.type);
switch (type) {
+ case EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst | constant.uConst); break;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
- case EbtUint: returnValue.setUConst(uConst | constant.uConst); break;
case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break;
case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break;
+#endif
default: assert(false && "Default missing");
}
@@ -785,14 +817,16 @@ public:
TConstUnion returnValue;
assert(type == constant.type);
switch (type) {
+ case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
- case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break;
case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break;
case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break;
+#endif
default: assert(false && "Default missing");
}
@@ -803,14 +837,16 @@ public:
{
TConstUnion returnValue;
switch (type) {
+ case EbtInt: returnValue.setIConst(~iConst); break;
+ case EbtUint: returnValue.setUConst(~uConst); break;
+#ifndef GLSLANG_WEB
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 EbtInt: returnValue.setIConst(~iConst); break;
- case EbtUint: returnValue.setUConst(~uConst); break;
case EbtInt64: returnValue.setI64Const(~i64Const); break;
case EbtUint64: returnValue.setU64Const(~u64Const); break;
+#endif
default: assert(false && "Default missing");
}
diff --git a/thirdparty/glslang/glslang/Include/PoolAlloc.h b/thirdparty/glslang/glslang/Include/PoolAlloc.h
index 0e237a6a2c..b8eccb8832 100644
--- a/thirdparty/glslang/glslang/Include/PoolAlloc.h
+++ b/thirdparty/glslang/glslang/Include/PoolAlloc.h
@@ -304,7 +304,6 @@ public:
size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
- void setAllocator(TPoolAllocator* a) { allocator = *a; }
TPoolAllocator& getAllocator() const { return allocator; }
protected:
diff --git a/thirdparty/glslang/glslang/Include/Types.h b/thirdparty/glslang/glslang/Include/Types.h
index 90341dcb27..3572099e3d 100644
--- a/thirdparty/glslang/glslang/Include/Types.h
+++ b/thirdparty/glslang/glslang/Include/Types.h
@@ -80,31 +80,59 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
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 external : 1; // GL_OES_EGL_image_external
- bool yuv : 1; // GL_EXT_YUV_target
- unsigned int vectorSize : 3; // vector return type size.
+#ifdef GLSLANG_WEB
+ bool is1D() const { return false; }
+ bool isBuffer() const { return false; }
+ bool isRect() const { return false; }
+ bool isSubpass() const { return false; }
+ bool isCombined() const { return true; }
+ bool isImage() const { return false; }
+ bool isImageClass() const { return false; }
+ bool isMultiSample() const { return false; }
+ bool isExternal() const { return false; }
+ void setExternal(bool e) { }
+ bool isYuv() const { return false; }
+#else
+ 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<<structReturnIndexBits)-1; // number of valid values
static const unsigned noReturnStruct = structReturnSlots; // value if no return struct type.
-
// Index into a language specific table of texture return structures.
unsigned int structReturnIndex : structReturnIndexBits;
- // Encapsulate getting members' vector sizes packed into the vectorSize bitfield.
+ bool external : 1; // GL_OES_EGL_image_external
+ bool yuv : 1; // GL_EXT_YUV_target
+
+#ifdef ENABLE_HLSL
unsigned int getVectorSize() const { return vectorSize; }
+ void clearReturnStruct() { structReturnIndex = noReturnStruct; }
+ bool hasReturnStruct() const { return structReturnIndex != noReturnStruct; }
+ unsigned getStructReturnIndex() const { return structReturnIndex; }
+#endif
- bool isImage() const { return image && dim != EsdSubpass; }
+ bool is1D() const { return dim == Esd1D; }
+ bool isBuffer() const { return dim == EsdBuffer; }
+ bool isRect() const { return dim == EsdRect; }
bool isSubpass() const { return dim == EsdSubpass; }
bool isCombined() const { return combined; }
- bool isPureSampler() const { return sampler; }
+ bool isImage() const { return image && !isSubpass(); }
+ bool isImageClass() const { return image; }
+ bool isMultiSample() const { return ms; }
+ bool isExternal() const { return external; }
+ void setExternal(bool e) { external = e; }
+ bool isYuv() const { return yuv; }
+#endif
bool isTexture() const { return !sampler && !image; }
+ bool isPureSampler() const { return sampler; }
+
+ void setCombined(bool c) { combined = c; }
+ void setBasicType(TBasicType t) { type = t; }
+ TBasicType getBasicType() const { return type; }
bool isShadow() const { return shadow; }
bool isArrayed() const { return arrayed; }
- bool isMultiSample() const { return ms; }
- bool hasReturnStruct() const { return structReturnIndex != noReturnStruct; }
void clear()
{
@@ -116,12 +144,16 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
image = false;
combined = false;
sampler = false;
+#ifndef GLSLANG_WEB
external = false;
yuv = false;
- structReturnIndex = noReturnStruct;
+#endif
+#ifdef ENABLE_HLSL
+ clearReturnStruct();
// by default, returns a single vec4;
vectorSize = 4;
+#endif
}
// make a combined sampler and texture
@@ -159,6 +191,15 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
ms = m;
}
+ // make a pure sampler, no texture, no image, nothing combined, the 'sampler' keyword
+ void setPureSampler(bool s)
+ {
+ clear();
+ sampler = true;
+ shadow = s;
+ }
+
+#ifndef GLSLANG_WEB
// make a subpass input attachment
void setSubpass(TBasicType t, bool m = false)
{
@@ -168,14 +209,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
dim = EsdSubpass;
ms = m;
}
-
- // make a pure sampler, no texture, no image, nothing combined, the 'sampler' keyword
- void setPureSampler(bool s)
- {
- clear();
- sampler = true;
- shadow = s;
- }
+#endif
bool operator==(const TSampler& right) const
{
@@ -183,14 +217,17 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
dim == right.dim &&
arrayed == right.arrayed &&
shadow == right.shadow &&
- ms == right.ms &&
- image == right.image &&
- combined == right.combined &&
- sampler == right.sampler &&
- external == right.external &&
- yuv == right.yuv &&
- vectorSize == right.vectorSize &&
- structReturnIndex == right.structReturnIndex;
+ isMultiSample() == right.isMultiSample() &&
+ isImageClass() == right.isImageClass() &&
+ isCombined() == right.isCombined() &&
+ isPureSampler() == right.isPureSampler() &&
+ isExternal() == right.isExternal() &&
+ isYuv() == right.isYuv()
+#ifdef ENABLE_HLSL
+ && getVectorSize() == right.getVectorSize() &&
+ getStructReturnIndex() == right.getStructReturnIndex()
+#endif
+ ;
}
bool operator!=(const TSampler& right) const
@@ -202,54 +239,55 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
{
TString s;
- if (sampler) {
+ if (isPureSampler()) {
s.append("sampler");
return s;
}
switch (type) {
- case EbtFloat: break;
-#ifdef AMD_EXTENSIONS
+ case EbtInt: s.append("i"); break;
+ case EbtUint: s.append("u"); break;
+#ifndef GLSLANG_WEB
case EbtFloat16: s.append("f16"); break;
-#endif
case EbtInt8: s.append("i8"); break;
case EbtUint16: s.append("u8"); break;
case EbtInt16: s.append("i16"); break;
case EbtUint8: s.append("u16"); break;
- case EbtInt: s.append("i"); break;
- case EbtUint: s.append("u"); break;
case EbtInt64: s.append("i64"); break;
case EbtUint64: s.append("u64"); break;
- default: break; // some compilers want this
+#endif
+ default: break;
}
- if (image) {
- if (dim == EsdSubpass)
+ if (isImageClass()) {
+ if (isSubpass())
s.append("subpass");
else
s.append("image");
- } else if (combined) {
+ } else if (isCombined()) {
s.append("sampler");
} else {
s.append("texture");
}
- if (external) {
+ if (isExternal()) {
s.append("ExternalOES");
return s;
}
- if (yuv) {
+ if (isYuv()) {
return "__" + s + "External2DY2YEXT";
}
switch (dim) {
- case Esd1D: s.append("1D"); break;
case Esd2D: s.append("2D"); break;
case Esd3D: s.append("3D"); break;
case EsdCube: s.append("Cube"); break;
+#ifndef GLSLANG_WEB
+ case Esd1D: s.append("1D"); break;
case EsdRect: s.append("2DRect"); break;
case EsdBuffer: s.append("Buffer"); break;
case EsdSubpass: s.append("Input"); break;
+#endif
default: break; // some compilers want this
}
- if (ms)
+ if (isMultiSample())
s.append("MS");
if (arrayed)
s.append("Array");
@@ -422,6 +460,18 @@ enum TBlendEquationShift {
EBlendCount
};
+enum TInterlockOrdering {
+ EioNone,
+ EioPixelInterlockOrdered,
+ EioPixelInterlockUnordered,
+ EioSampleInterlockOrdered,
+ EioSampleInterlockUnordered,
+ EioShadingRateInterlockOrdered,
+ EioShadingRateInterlockUnordered,
+
+ EioCount,
+};
+
class TQualifier {
public:
static const int layoutNotSet = -1;
@@ -430,9 +480,11 @@ public:
{
precision = EpqNone;
invariant = false;
- noContraction = false;
makeTemporary();
declaredBuiltIn = EbvNone;
+#ifndef GLSLANG_WEB
+ noContraction = false;
+#endif
}
// drop qualifiers that don't belong in a temporary variable
@@ -451,8 +503,10 @@ public:
void clearInterstage()
{
clearInterpolation();
+#ifndef GLSLANG_WEB
patch = false;
sample = false;
+#endif
}
void clearInterpolation()
@@ -460,11 +514,9 @@ public:
centroid = false;
smooth = false;
flat = false;
+#ifndef GLSLANG_WEB
nopersp = false;
-#ifdef AMD_EXTENSIONS
explicitInterp = false;
-#endif
-#ifdef NV_EXTENSIONS
pervertexNV = false;
perPrimitiveNV = false;
perViewNV = false;
@@ -474,6 +526,7 @@ public:
void clearMemory()
{
+#ifndef GLSLANG_WEB
coherent = false;
devicecoherent = false;
queuefamilycoherent = false;
@@ -484,57 +537,66 @@ public:
restrict = false;
readonly = false;
writeonly = false;
- }
-
- // Drop just the storage qualification, which perhaps should
- // never be done, as it is fundamentally inconsistent, but need to
- // explore what downstream consumers need.
- // E.g., in a dereference, it is an inconsistency between:
- // A) partially dereferenced resource is still in the storage class it started in
- // B) partially dereferenced resource is a new temporary object
- // If A, then nothing should change, if B, then everything should change, but this is half way.
- void makePartialTemporary()
- {
- storage = EvqTemporary;
- specConstant = false;
- nonUniform = false;
+#endif
}
const char* semanticName;
TStorageQualifier storage : 6;
- TBuiltInVariable builtIn : 8;
- TBuiltInVariable declaredBuiltIn : 8;
+ 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 noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
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;
+
+#ifdef GLSLANG_WEB
+ bool isWriteOnly() const { return false; }
+ bool isReadOnly() const { return false; }
+ bool isRestrict() const { return false; }
+ bool isCoherent() const { return false; }
+ bool isVolatile() const { return false; }
+ bool isSample() const { return false; }
+ bool isMemory() const { return false; }
+ bool isMemoryQualifierImageAndSSBOOnly() const { return false; }
+ bool bufferReferenceNeedsVulkanMemoryModel() const { return false; }
+ bool isInterpolation() const { return flat || smooth; }
+ bool isExplicitInterpolation() const { return false; }
+ bool isAuxiliary() const { return centroid; }
+ bool isPatch() const { return false; }
+ bool isNoContraction() const { return false; }
+ void setNoContraction() { }
+ bool isPervertexNV() const { return false; }
+#else
+ bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
bool nopersp : 1;
-#ifdef AMD_EXTENSIONS
bool explicitInterp : 1;
-#endif
-#ifdef NV_EXTENSIONS
bool pervertexNV : 1;
bool perPrimitiveNV : 1;
bool perViewNV : 1;
bool perTaskNV : 1;
-#endif
bool patch : 1;
bool sample : 1;
+ bool restrict : 1;
+ bool readonly : 1;
+ bool writeonly : 1;
bool coherent : 1;
+ bool volatil : 1;
bool devicecoherent : 1;
bool queuefamilycoherent : 1;
bool workgroupcoherent : 1;
bool subgroupcoherent : 1;
bool nonprivate : 1;
- bool volatil : 1;
- bool restrict : 1;
- bool readonly : 1;
- bool writeonly : 1;
- bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant
- bool nonUniform : 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 isSample() const { return sample; }
bool isMemory() const
{
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
@@ -548,31 +610,23 @@ public:
// include qualifiers that map to load/store availability/visibility/nonprivate memory access operands
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || nonprivate;
}
-
bool isInterpolation() const
{
-#ifdef AMD_EXTENSIONS
return flat || smooth || nopersp || explicitInterp;
-#else
- return flat || smooth || nopersp;
-#endif
}
-
-#ifdef AMD_EXTENSIONS
bool isExplicitInterpolation() const
{
return explicitInterp;
}
-#endif
-
bool isAuxiliary() const
{
-#ifdef NV_EXTENSIONS
return centroid || patch || sample || pervertexNV;
-#else
- return centroid || patch || sample;
-#endif
}
+ bool isPatch() const { return patch; }
+ bool isNoContraction() const { return noContraction; }
+ void setNoContraction() { noContraction = true; }
+ bool isPervertexNV() const { return pervertexNV; }
+#endif
bool isPipeInput() const
{
@@ -638,33 +692,6 @@ public:
}
}
- bool isPerPrimitive() const
- {
-#ifdef NV_EXTENSIONS
- return perPrimitiveNV;
-#else
- return false;
-#endif
- }
-
- bool isPerView() const
- {
-#ifdef NV_EXTENSIONS
- return perViewNV;
-#else
- return false;
-#endif
- }
-
- bool isTaskMemory() const
- {
-#ifdef NV_EXTENSIONS
- return perTaskNV;
-#else
- return false;
-#endif
- }
-
bool isIo() const
{
switch (storage) {
@@ -704,6 +731,15 @@ public:
}
}
+#ifdef GLSLANG_WEB
+ bool isPerView() const { return false; }
+ bool isTaskMemory() const { return false; }
+ bool isArrayedIo(EShLanguage language) const { return false; }
+#else
+ bool isPerPrimitive() const { return perPrimitiveNV; }
+ bool isPerView() const { return perViewNV; }
+ bool isTaskMemory() const { return perTaskNV; }
+
// True if this type of IO is supposed to be arrayed with extra level for per-vertex data
bool isArrayedIo(EShLanguage language) const
{
@@ -714,49 +750,50 @@ public:
return ! patch && (isPipeInput() || isPipeOutput());
case EShLangTessEvaluation:
return ! patch && isPipeInput();
-#ifdef NV_EXTENSIONS
case EShLangFragment:
return pervertexNV && isPipeInput();
case EShLangMeshNV:
return ! perTaskNV && isPipeOutput();
-#endif
default:
return false;
}
}
+#endif
// Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
void clearLayout() // all layout
{
clearUniformLayout();
+#ifndef GLSLANG_WEB
layoutPushConstant = false;
layoutBufferReference = false;
-#ifdef NV_EXTENSIONS
layoutPassthrough = false;
layoutViewportRelative = false;
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
layoutSecondaryViewportRelativeOffset = -2048;
layoutShaderRecordNV = false;
-#endif
-
layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd;
+ layoutFormat = ElfNone;
+#endif
clearInterstageLayout();
layoutSpecConstantId = layoutSpecConstantIdEnd;
-
- layoutFormat = ElfNone;
}
void clearInterstageLayout()
{
layoutLocation = layoutLocationEnd;
layoutComponent = layoutComponentEnd;
+#ifndef GLSLANG_WEB
layoutIndex = layoutIndexEnd;
clearStreamLayout();
clearXfbLayout();
+#endif
}
+
+#ifndef GLSLANG_WEB
void clearStreamLayout()
{
layoutStream = layoutStreamEnd;
@@ -767,6 +804,7 @@ public:
layoutXfbStride = layoutXfbStrideEnd;
layoutXfbOffset = layoutXfbOffsetEnd;
}
+#endif
bool hasNonXfbLayout() const
{
@@ -774,11 +812,9 @@ public:
hasAnyLocation() ||
hasStream() ||
hasFormat() ||
-#ifdef NV_EXTENSIONS
- layoutShaderRecordNV ||
-#endif
- layoutPushConstant ||
- layoutBufferReference;
+ isShaderRecordNV() ||
+ isPushConstant() ||
+ hasBufferReference();
}
bool hasLayout() const
{
@@ -823,6 +859,7 @@ public:
unsigned int layoutSpecConstantId : 11;
static const unsigned int layoutSpecConstantIdEnd = 0x7FF;
+#ifndef GLSLANG_WEB
// stored as log2 of the actual alignment value
unsigned int layoutBufferReferenceAlign : 6;
static const unsigned int layoutBufferReferenceAlignEnd = 0x3F;
@@ -831,8 +868,6 @@ public:
bool layoutPushConstant;
bool layoutBufferReference;
-
-#ifdef NV_EXTENSIONS
bool layoutPassthrough;
bool layoutViewportRelative;
int layoutSecondaryViewportRelativeOffset;
@@ -857,7 +892,9 @@ public:
layoutSet = layoutSetEnd;
layoutBinding = layoutBindingEnd;
+#ifndef GLSLANG_WEB
layoutAttachment = layoutAttachmentEnd;
+#endif
}
bool hasMatrix() const
@@ -868,10 +905,6 @@ public:
{
return layoutPacking != ElpNone;
}
- bool hasOffset() const
- {
- return layoutOffset != layoutNotSet;
- }
bool hasAlign() const
{
return layoutAlign != layoutNotSet;
@@ -886,14 +919,6 @@ public:
{
return layoutLocation != layoutLocationEnd;
}
- bool hasComponent() const
- {
- return layoutComponent != layoutComponentEnd;
- }
- bool hasIndex() const
- {
- return layoutIndex != layoutIndexEnd;
- }
bool hasSet() const
{
return layoutSet != layoutSetEnd;
@@ -902,6 +927,40 @@ public:
{
return layoutBinding != layoutBindingEnd;
}
+#ifdef GLSLANG_WEB
+ bool hasOffset() const { return false; }
+ bool isNonPerspective() const { return false; }
+ bool hasIndex() const { return false; }
+ unsigned getIndex() const { return 0; }
+ bool hasComponent() const { return false; }
+ bool hasStream() const { return false; }
+ bool hasFormat() const { return false; }
+ bool hasXfb() const { return false; }
+ bool hasXfbBuffer() const { return false; }
+ bool hasXfbStride() const { return false; }
+ bool hasXfbOffset() const { return false; }
+ bool hasAttachment() const { return false; }
+ TLayoutFormat getFormat() const { return ElfNone; }
+ bool isPushConstant() const { return false; }
+ bool isShaderRecordNV() const { return false; }
+ bool hasBufferReference() const { return false; }
+ bool hasBufferReferenceAlign() const { return false; }
+ bool isNonUniform() const { return false; }
+#else
+ 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;
@@ -932,16 +991,25 @@ public:
{
return layoutAttachment != layoutAttachmentEnd;
}
+ TLayoutFormat getFormat() const { return layoutFormat; }
+ bool isPushConstant() const { return layoutPushConstant; }
+ bool isShaderRecordNV() const { return layoutShaderRecordNV; }
+ bool hasBufferReference() const { return layoutBufferReference; }
+ bool hasBufferReferenceAlign() const
+ {
+ return layoutBufferReferenceAlign != layoutBufferReferenceAlignEnd;
+ }
+ bool isNonUniform() const
+ {
+ return nonUniform;
+ }
+#endif
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 hasBufferReferenceAlign() const
- {
- return layoutBufferReferenceAlign != layoutBufferReferenceAlignEnd;
- }
bool isSpecConstant() const
{
// True if type is a specialization constant, whether or not it
@@ -949,10 +1017,6 @@ public:
// true front-end constant.
return specConstant;
}
- bool isNonUniform() const
- {
- return nonUniform;
- }
bool isFrontEndConstant() const
{
// True if the front-end knows the final constant value.
@@ -972,11 +1036,13 @@ public:
static const char* getLayoutPackingString(TLayoutPacking packing)
{
switch (packing) {
+ case ElpStd140: return "std140";
+#ifndef GLSLANG_WEB
case ElpPacked: return "packed";
case ElpShared: return "shared";
- case ElpStd140: return "std140";
case ElpStd430: return "std430";
case ElpScalar: return "scalar";
+#endif
default: return "none";
}
}
@@ -988,6 +1054,9 @@ public:
default: return "none";
}
}
+#ifdef GLSLANG_WEB
+ static const char* getLayoutFormatString(TLayoutFormat f) { return "none"; }
+#else
static const char* getLayoutFormatString(TLayoutFormat f)
{
switch (f) {
@@ -1110,6 +1179,19 @@ public:
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";
+ }
+ }
+#endif
};
// Qualifiers that don't need to be keep per object. They have shader scope, not object scope.
@@ -1124,18 +1206,22 @@ struct TShaderQualifiers {
TVertexOrder order;
bool pointMode;
int localSize[3]; // compute shader
+ bool localSizeNotDefault[3]; // compute shader
int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize
+#ifndef GLSLANG_WEB
bool earlyFragmentTests; // fragment input
bool postDepthCoverage; // fragment input
TLayoutDepth layoutDepth;
bool blendEquation; // true if any blend equation was specified
int numViews; // multiview extenstions
-
-#ifdef NV_EXTENSIONS
+ 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
+ TLayoutDepth getDepth() const { return layoutDepth; }
+#else
+ TLayoutDepth getDepth() const { return EldNone; }
#endif
void init()
@@ -1151,22 +1237,32 @@ struct TShaderQualifiers {
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;
+#ifndef GLSLANG_WEB
earlyFragmentTests = false;
postDepthCoverage = false;
layoutDepth = EldNone;
blendEquation = false;
numViews = TQualifier::layoutNotSet;
-#ifdef NV_EXTENSIONS
layoutOverrideCoverage = false;
layoutDerivativeGroupQuads = false;
layoutDerivativeGroupLinear = false;
primitives = TQualifier::layoutNotSet;
+ interlockOrdering = EioNone;
#endif
}
+#ifdef GLSLANG_WEB
+ bool hasBlendEquation() const { return false; }
+#else
+ bool hasBlendEquation() const { return blendEquation; }
+#endif
+
// Merge in characteristics from the 'src' qualifier. They can override when
// set, but never erase when not set.
void merge(const TShaderQualifiers& src)
@@ -1192,9 +1288,13 @@ struct TShaderQualifiers {
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];
}
+#ifndef GLSLANG_WEB
if (src.earlyFragmentTests)
earlyFragmentTests = true;
if (src.postDepthCoverage)
@@ -1205,7 +1305,6 @@ struct TShaderQualifiers {
blendEquation = src.blendEquation;
if (src.numViews != TQualifier::layoutNotSet)
numViews = src.numViews;
-#ifdef NV_EXTENSIONS
if (src.layoutOverrideCoverage)
layoutOverrideCoverage = src.layoutOverrideCoverage;
if (src.layoutDerivativeGroupQuads)
@@ -1214,6 +1313,8 @@ struct TShaderQualifiers {
layoutDerivativeGroupLinear = src.layoutDerivativeGroupLinear;
if (src.primitives != TQualifier::layoutNotSet)
primitives = src.primitives;
+ if (src.interlockOrdering != EioNone)
+ interlockOrdering = src.interlockOrdering;
#endif
}
};
@@ -1241,6 +1342,12 @@ public:
TSourceLoc loc;
TArraySizes* typeParameters;
+#ifdef GLSLANG_WEB
+ bool isCoopmat() const { return false; }
+#else
+ bool isCoopmat() const { return coopmat; }
+#endif
+
void initType(const TSourceLoc& l)
{
basicType = EbtVoid;
@@ -1344,11 +1451,18 @@ public:
}
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
}
- if (p.coopmat && p.basicType == EbtFloat &&
- p.typeParameters && p.typeParameters->getNumDims() > 0 &&
- p.typeParameters->getDimSize(0) == 16) {
- basicType = EbtFloat16;
- qualifier.precision = EpqNone;
+ if (p.isCoopmat() && p.typeParameters && p.typeParameters->getNumDims() > 0) {
+ int numBits = p.typeParameters->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 == EbtInt && numBits == 8) {
+ basicType = EbtInt8;
+ qualifier.precision = EpqNone;
+ }
}
}
// for construction of sampler types
@@ -1453,7 +1567,7 @@ public:
referentType = copyOf.referentType;
}
typeParameters = copyOf.typeParameters;
- coopmat = copyOf.coopmat;
+ coopmat = copyOf.isCoopMat();
}
// Make complete copy of the whole type graph rooted at 'copyOf'.
@@ -1512,7 +1626,11 @@ public:
virtual int getOuterArraySize() const { return arraySizes->getOuterSize(); }
virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); }
virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); }
- virtual bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; }
+#ifdef GLSLANG_WEB
+ bool isArrayOfArrays() const { return false; }
+#else
+ bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; }
+#endif
virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); }
virtual const TArraySizes* getArraySizes() const { return arraySizes; }
virtual TArraySizes* getArraySizes() { return arraySizes; }
@@ -1550,9 +1668,9 @@ public:
}
return false;
}
- virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint
-#ifdef NV_EXTENSIONS
- || basicType == EbtAccStructNV
+ virtual bool isOpaque() const { return basicType == EbtSampler
+#ifndef GLSLANG_WEB
+ || basicType == EbtAtomicUint || basicType == EbtAccStructNV
#endif
; }
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
@@ -1561,8 +1679,18 @@ public:
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(); }
+ // 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; }
- virtual bool isCoopMat() const { return coopmat; }
+#ifdef GLSLANG_WEB
+ bool isAtomic() const { return false; }
+ bool isCoopMat() const { return false; }
+ bool isReference() const { return false; }
+#else
+ bool isAtomic() const { return basicType == EbtAtomicUint; }
+ bool isCoopMat() const { return coopmat; }
+ bool isReference() const { return getBasicType() == EbtReference; }
+#endif
// return true if this type contains any subtype which satisfies the given predicate.
template <typename P>
@@ -1643,20 +1771,44 @@ public:
return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } );
}
- virtual bool contains16BitInt() const
+#ifdef GLSLANG_WEB
+ bool containsDouble() const { return false; }
+ bool contains16BitFloat() const { return false; }
+ bool contains64BitInt() const { return false; }
+ bool contains16BitInt() const { return false; }
+ bool contains8BitInt() const { return false; }
+ bool containsCoopMat() const { return false; }
+ bool containsReference() const { return false; }
+#else
+ bool containsDouble() const
+ {
+ return containsBasicType(EbtDouble);
+ }
+ bool contains16BitFloat() const
+ {
+ return containsBasicType(EbtFloat16);
+ }
+ bool contains64BitInt() const
+ {
+ return containsBasicType(EbtInt64) || containsBasicType(EbtUint64);
+ }
+ bool contains16BitInt() const
{
return containsBasicType(EbtInt16) || containsBasicType(EbtUint16);
}
-
- virtual bool contains8BitInt() const
+ bool contains8BitInt() const
{
return containsBasicType(EbtInt8) || containsBasicType(EbtUint8);
}
-
- virtual bool containsCoopMat() const
+ bool containsCoopMat() const
{
return contains([](const TType* t) { return t->coopmat; } );
}
+ bool containsReference() const
+ {
+ return containsBasicType(EbtReference);
+ }
+#endif
// Array editing methods. Array descriptors can be shared across
// type instances. This allows all uses of the same array
@@ -1716,11 +1868,9 @@ public:
{
if (isUnsizedArray() && !(skipNonvariablyIndexed || isArrayVariablyIndexed()))
changeOuterArraySize(getImplicitArraySize());
-#ifdef NV_EXTENSIONS
// For multi-dim per-view arrays, set unsized inner dimension size to 1
if (qualifier.isPerView() && arraySizes && arraySizes->isInnerUnsized())
arraySizes->clearInnerUnsized();
-#endif
if (isStruct() && structure->size() > 0) {
int lastMember = (int)structure->size() - 1;
for (int i = 0; i < lastMember; ++i)
@@ -1778,31 +1928,38 @@ public:
static const char* getBasicString(TBasicType t)
{
switch (t) {
- case EbtVoid: return "void";
case EbtFloat: return "float";
+ case EbtInt: return "int";
+ case EbtUint: return "uint";
+ case EbtSampler: return "sampler/image";
+#ifndef GLSLANG_WEB
+ case EbtVoid: return "void";
case EbtDouble: return "double";
case EbtFloat16: return "float16_t";
case EbtInt8: return "int8_t";
case EbtUint8: return "uint8_t";
case EbtInt16: return "int16_t";
case EbtUint16: return "uint16_t";
- case EbtInt: return "int";
- case EbtUint: return "uint";
case EbtInt64: return "int64_t";
case EbtUint64: return "uint64_t";
case EbtBool: return "bool";
case EbtAtomicUint: return "atomic_uint";
- case EbtSampler: return "sampler/image";
case EbtStruct: return "structure";
case EbtBlock: return "block";
-#ifdef NV_EXTENSIONS
case EbtAccStructNV: return "accelerationStructureNV";
-#endif
case EbtReference: return "reference";
+#endif
default: return "unknown type";
}
}
+#ifdef GLSLANG_WEB
+ TString getCompleteString() const { return ""; }
+ const char* getStorageQualifierString() const { return ""; }
+ const char* getBuiltInVariableString() const { return ""; }
+ const char* getPrecisionQualifierString() const { return ""; }
+ TString getBasicTypeString() const { return ""; }
+#else
TString getCompleteString() const
{
TString typeString;
@@ -1891,7 +2048,6 @@ public:
appendUint(1u << qualifier.layoutBufferReferenceAlign);
}
-#ifdef NV_EXTENSIONS
if (qualifier.layoutPassthrough)
appendStr(" passthrough");
if (qualifier.layoutViewportRelative)
@@ -1902,7 +2058,6 @@ public:
}
if (qualifier.layoutShaderRecordNV)
appendStr(" shaderRecordNV");
-#endif
appendStr(")");
}
@@ -1920,11 +2075,8 @@ public:
appendStr(" flat");
if (qualifier.nopersp)
appendStr(" noperspective");
-#ifdef AMD_EXTENSIONS
if (qualifier.explicitInterp)
appendStr(" __explicitInterpAMD");
-#endif
-#ifdef NV_EXTENSIONS
if (qualifier.pervertexNV)
appendStr(" pervertexNV");
if (qualifier.perPrimitiveNV)
@@ -1933,7 +2085,6 @@ public:
appendStr(" perviewNV");
if (qualifier.perTaskNV)
appendStr(" taskNV");
-#endif
if (qualifier.patch)
appendStr(" patch");
if (qualifier.sample)
@@ -2020,13 +2171,15 @@ public:
// 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());
- if (i < structure->size() - 1)
- appendStr(", ");
+ hasHiddenMember = false;
}
}
appendStr("}");
@@ -2046,10 +2199,13 @@ public:
const char* getStorageQualifierString() const { return GetStorageQualifierString(qualifier.storage); }
const char* getBuiltInVariableString() const { return GetBuiltInVariableString(qualifier.builtIn); }
const char* getPrecisionQualifierString() const { return GetPrecisionQualifierString(qualifier.precision); }
+#endif
+
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; }
+
int computeNumComponents() const
{
int components = 0;
@@ -2112,12 +2268,12 @@ public:
return true;
}
- bool sameReferenceType(const TType& right) const
+ bool sameReferenceType(const TType& right) const
{
- if ((basicType == EbtReference) != (right.basicType == EbtReference))
+ if (isReference() != right.isReference())
return false;
- if ((basicType != EbtReference) && (right.basicType != EbtReference))
+ if (!isReference() && !right.isReference())
return true;
assert(referentType != nullptr);
@@ -2129,7 +2285,7 @@ public:
return *referentType == *right.referentType;
}
- // See if two types match, in all aspects except arrayness
+ // See if two types match, in all aspects except arrayness
bool sameElementType(const TType& right) const
{
return basicType == right.basicType && sameElementShape(right);
@@ -2164,7 +2320,7 @@ public:
matrixCols == right.matrixCols &&
matrixRows == right.matrixRows &&
vector1 == right.vector1 &&
- coopmat == right.coopmat &&
+ isCoopMat() == right.isCoopMat() &&
sameStructType(right) &&
sameReferenceType(right);
}
@@ -2173,10 +2329,24 @@ public:
// an OK function parameter
bool coopMatParameterOK(const TType& right) const
{
- return coopmat && right.coopmat &&
+ return isCoopMat() && right.isCoopMat() && (getBasicType() == right.getBasicType()) &&
typeParameters == nullptr && right.typeParameters != nullptr;
}
+ bool sameCoopMatBaseType(const TType &right) const {
+ bool rv = coopmat && right.coopmat;
+ if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16)
+ rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16;
+ else if (getBasicType() == EbtUint || getBasicType() == EbtUint8)
+ rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8;
+ else if (getBasicType() == EbtInt || getBasicType() == EbtInt8)
+ rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8;
+ else
+ rv = false;
+ return rv;
+ }
+
+
// See if two types match in all ways (just the actual type, not qualification)
bool operator==(const TType& right) const
{
@@ -2190,12 +2360,13 @@ public:
unsigned int getBufferReferenceAlignment() const
{
+#ifndef GLSLANG_WEB
if (getBasicType() == glslang::EbtReference) {
return getReferentType()->getQualifier().hasBufferReferenceAlign() ?
(1u << getReferentType()->getQualifier().layoutBufferReferenceAlign) : 16u;
- } else {
- return 0;
}
+#endif
+ return 0;
}
protected:
diff --git a/thirdparty/glslang/glslang/Include/intermediate.h b/thirdparty/glslang/glslang/Include/intermediate.h
index 89d1954959..29d58ca635 100644
--- a/thirdparty/glslang/glslang/Include/intermediate.h
+++ b/thirdparty/glslang/glslang/Include/intermediate.h
@@ -275,6 +275,10 @@ enum TOperator {
EOpConvUint64ToPtr,
EOpConvPtrToUint64,
+ // uvec2 <-> pointer
+ EOpConvUvec2ToPtr,
+ EOpConvPtrToUvec2,
+
//
// binary operations
//
@@ -422,11 +426,9 @@ enum TOperator {
EOpReflect,
EOpRefract,
-#ifdef AMD_EXTENSIONS
EOpMin3,
EOpMax3,
EOpMid3,
-#endif
EOpDPdx, // Fragment only
EOpDPdy, // Fragment only
@@ -441,10 +443,7 @@ enum TOperator {
EOpInterpolateAtCentroid, // Fragment only
EOpInterpolateAtSample, // Fragment only
EOpInterpolateAtOffset, // Fragment only
-
-#ifdef AMD_EXTENSIONS
EOpInterpolateAtVertex,
-#endif
EOpMatrixTimesMatrix,
EOpOuterProduct,
@@ -534,7 +533,6 @@ enum TOperator {
EOpSubgroupQuadSwapVertical,
EOpSubgroupQuadSwapDiagonal,
-#ifdef NV_EXTENSIONS
EOpSubgroupPartition,
EOpSubgroupPartitionedAdd,
EOpSubgroupPartitionedMul,
@@ -557,11 +555,9 @@ enum TOperator {
EOpSubgroupPartitionedExclusiveAnd,
EOpSubgroupPartitionedExclusiveOr,
EOpSubgroupPartitionedExclusiveXor,
-#endif
EOpSubgroupGuardStop,
-#ifdef AMD_EXTENSIONS
EOpMinInvocations,
EOpMaxInvocations,
EOpAddInvocations,
@@ -588,7 +584,6 @@ enum TOperator {
EOpCubeFaceIndex,
EOpCubeFaceCoord,
EOpTime,
-#endif
EOpAtomicAdd,
EOpAtomicMin,
@@ -621,6 +616,11 @@ enum TOperator {
EOpCooperativeMatrixStore,
EOpCooperativeMatrixMulAdd,
+ EOpBeginInvocationInterlock, // Fragment only
+ EOpEndInvocationInterlock, // Fragment only
+
+ EOpIsHelperInvocation,
+
//
// Branch
//
@@ -631,6 +631,7 @@ enum TOperator {
EOpContinue,
EOpCase,
EOpDefault,
+ EOpDemote, // Fragment only
//
// Constructors
@@ -648,9 +649,21 @@ enum TOperator {
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,
@@ -681,15 +694,6 @@ enum TOperator {
EOpConstructU64Vec2,
EOpConstructU64Vec3,
EOpConstructU64Vec4,
- EOpConstructMat2x2,
- EOpConstructMat2x3,
- EOpConstructMat2x4,
- EOpConstructMat3x2,
- EOpConstructMat3x3,
- EOpConstructMat3x4,
- EOpConstructMat4x2,
- EOpConstructMat4x3,
- EOpConstructMat4x4,
EOpConstructDMat2x2,
EOpConstructDMat2x3,
EOpConstructDMat2x4,
@@ -786,10 +790,8 @@ enum TOperator {
EOpImageQuerySamples,
EOpImageLoad,
EOpImageStore,
-#ifdef AMD_EXTENSIONS
EOpImageLoadLod,
EOpImageStoreLod,
-#endif
EOpImageAtomicAdd,
EOpImageAtomicMin,
EOpImageAtomicMax,
@@ -804,9 +806,7 @@ enum TOperator {
EOpSubpassLoad,
EOpSubpassLoadMS,
EOpSparseImageLoad,
-#ifdef AMD_EXTENSIONS
EOpSparseImageLoadLod,
-#endif
EOpImageGuardEnd,
@@ -844,13 +844,11 @@ enum TOperator {
EOpTextureOffsetClamp,
EOpTextureGradClamp,
EOpTextureGradOffsetClamp,
-#ifdef AMD_EXTENSIONS
EOpTextureGatherLod,
EOpTextureGatherLodOffset,
EOpTextureGatherLodOffsets,
EOpFragmentMaskFetch,
EOpFragmentFetch,
-#endif
EOpSparseTextureGuardBegin,
@@ -870,15 +868,12 @@ enum TOperator {
EOpSparseTextureOffsetClamp,
EOpSparseTextureGradClamp,
EOpSparseTextureGradOffsetClamp,
-#ifdef AMD_EXTENSIONS
EOpSparseTextureGatherLod,
EOpSparseTextureGatherLodOffset,
EOpSparseTextureGatherLodOffsets,
-#endif
EOpSparseTextureGuardEnd,
-#ifdef NV_EXTENSIONS
EOpImageFootprintGuardBegin,
EOpImageSampleFootprintNV,
EOpImageSampleFootprintClampNV,
@@ -886,7 +881,6 @@ enum TOperator {
EOpImageSampleFootprintGradNV,
EOpImageSampleFootprintGradClampNV,
EOpImageFootprintGuardEnd,
-#endif
EOpSamplingGuardEnd,
EOpTextureGuardEnd,
@@ -905,14 +899,21 @@ enum TOperator {
EOpFindLSB,
EOpFindMSB,
-#ifdef NV_EXTENSIONS
+ EOpCountLeadingZeros,
+ EOpCountTrailingZeros,
+ EOpAbsDifference,
+ EOpAddSaturate,
+ EOpSubSaturate,
+ EOpAverage,
+ EOpAverageRounded,
+ EOpMul32x16,
+
EOpTraceNV,
EOpReportIntersectionNV,
EOpIgnoreIntersectionNV,
EOpTerminateRayNV,
EOpExecuteCallableNV,
EOpWritePackedPrimitiveIndices4x8NV,
-#endif
//
// HLSL operations
//
@@ -996,6 +997,10 @@ enum TOperator {
EOpWaveGetLaneIndex, // Will decompose to gl_SubgroupInvocationID.
EOpWaveActiveCountBits, // Will decompose to subgroupBallotBitCount(subgroupBallot()).
EOpWavePrefixCountBits, // Will decompose to subgroupBallotInclusiveBitCount(subgroupBallot()).
+
+ // Shader Clock Ops
+ EOpReadClockSubgroupKHR,
+ EOpReadClockDeviceKHR,
};
class TIntermTraverser;
@@ -1097,6 +1102,8 @@ public:
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() const { return type.getCompleteString(); }
protected:
@@ -1191,6 +1198,7 @@ public:
virtual void traverse(TIntermTraverser*);
TOperator getFlowOp() const { return flowOp; }
TIntermTyped* getExpression() const { return expression; }
+ void setExpression(TIntermTyped* pExpression) { expression = pExpression; }
protected:
TOperator flowOp;
TIntermTyped* expression;
@@ -1224,7 +1232,7 @@ public:
// it is essential to use "symbol = sym" to assign to symbol
TIntermSymbol(int i, const TString& n, const TType& t)
: TIntermTyped(t), id(i),
-#ifdef ENABLE_HLSL
+#ifndef GLSLANG_WEB
flattenSubset(-1),
#endif
constSubtree(nullptr)
@@ -1239,7 +1247,7 @@ public:
const TConstUnionArray& getConstArray() const { return constArray; }
void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; }
TIntermTyped* getConstSubtree() const { return constSubtree; }
-#ifdef ENABLE_HLSL
+#ifndef GLSLANG_WEB
void setFlattenSubset(int subset) { flattenSubset = subset; }
int getFlattenSubset() const { return flattenSubset; } // -1 means full object
#endif
@@ -1250,7 +1258,7 @@ public:
protected:
int id; // the unique id of the symbol this node represents
-#ifdef ENABLE_HLSL
+#ifndef GLSLANG_WEB
int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced
#endif
TString name; // the name of the symbol this node represents
@@ -1290,9 +1298,7 @@ struct TCrackedTextureOp {
bool grad;
bool subpass;
bool lodClamp;
-#ifdef AMD_EXTENSIONS
bool fragMask;
-#endif
};
//
@@ -1308,12 +1314,19 @@ public:
bool isConstructor() const;
bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
+#ifdef GLSLANG_WEB
+ bool isImage() const { return false; }
+ bool isSparseTexture() const { return false; }
+ bool isImageFootprint() const { return false; }
+ bool isSparseImage() const { return false; }
+ bool isSubgroup() const { return false; }
+#else
bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
-#ifdef NV_EXTENSIONS
bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; }
-#endif
bool isSparseImage() const { return op == EOpSparseImageLoad; }
+ bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; }
+#endif
void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ?
@@ -1343,9 +1356,7 @@ public:
cracked.grad = false;
cracked.subpass = false;
cracked.lodClamp = false;
-#ifdef AMD_EXTENSIONS
cracked.fragMask = false;
-#endif
switch (op) {
case EOpImageQuerySize:
@@ -1360,10 +1371,6 @@ public:
case EOpTexture:
case EOpSparseTexture:
break;
- case EOpTextureClamp:
- case EOpSparseTextureClamp:
- cracked.lodClamp = true;
- break;
case EOpTextureProj:
cracked.proj = true;
break;
@@ -1375,22 +1382,17 @@ public:
case EOpSparseTextureOffset:
cracked.offset = true;
break;
- case EOpTextureOffsetClamp:
- case EOpSparseTextureOffsetClamp:
- cracked.offset = true;
- cracked.lodClamp = true;
- break;
case EOpTextureFetch:
case EOpSparseTextureFetch:
cracked.fetch = true;
- if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ 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.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ if (sampler.is1D() || (sampler.dim == Esd2D && ! sampler.isMultiSample()) || sampler.dim == Esd3D)
cracked.lod = true;
break;
case EOpTextureProjOffset:
@@ -1415,11 +1417,6 @@ public:
case EOpSparseTextureGrad:
cracked.grad = true;
break;
- case EOpTextureGradClamp:
- case EOpSparseTextureGradClamp:
- cracked.grad = true;
- cracked.lodClamp = true;
- break;
case EOpTextureGradOffset:
case EOpSparseTextureGradOffset:
cracked.grad = true;
@@ -1434,6 +1431,21 @@ public:
cracked.offset = true;
cracked.proj = true;
break;
+#ifndef GLSLANG_WEB
+ 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;
@@ -1454,7 +1466,6 @@ public:
cracked.gather = true;
cracked.offsets = true;
break;
-#ifdef AMD_EXTENSIONS
case EOpTextureGatherLod:
case EOpSparseTextureGatherLod:
cracked.gather = true;
@@ -1485,8 +1496,6 @@ public:
cracked.subpass = sampler.dim == EsdSubpass;
cracked.fragMask = true;
break;
-#endif
-#ifdef NV_EXTENSIONS
case EOpImageSampleFootprintNV:
break;
case EOpImageSampleFootprintClampNV:
@@ -1502,11 +1511,11 @@ public:
cracked.lodClamp = true;
cracked.grad = true;
break;
-#endif
case EOpSubpassLoad:
case EOpSubpassLoadMS:
cracked.subpass = true;
break;
+#endif
default:
break;
}
diff --git a/thirdparty/glslang/glslang/Include/revision.h b/thirdparty/glslang/glslang/Include/revision.h
index dd6c8da04f..a0e4b2066c 100644
--- a/thirdparty/glslang/glslang/Include/revision.h
+++ b/thirdparty/glslang/glslang/Include/revision.h
@@ -1,3 +1,3 @@
// This header is generated by the make-revision script.
-#define GLSLANG_PATCH_LEVEL 3226
+#define GLSLANG_PATCH_LEVEL 3559
diff --git a/thirdparty/glslang/glslang/Include/revision.template b/thirdparty/glslang/glslang/Include/revision.template
deleted file mode 100644
index 6c13630b27..0000000000
--- a/thirdparty/glslang/glslang/Include/revision.template
+++ /dev/null
@@ -1,13 +0,0 @@
-// The file revision.h should be updated to the latest version, somehow, on
-// check-in, if glslang has changed.
-//
-// revision.template is the source for revision.h when using SubWCRev as the
-// method of updating revision.h. You don't have to do it this way, the
-// requirement is only that revision.h gets updated.
-//
-// revision.h is under source control so that not all consumers of glslang
-// source have to figure out how to create revision.h just to get a build
-// going. However, if it is not updated, it can be a version behind.
-
-#define GLSLANG_REVISION "$WCREV$"
-#define GLSLANG_DATE "$WCDATE$"
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
index b75e3efb00..98c2666fbb 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
@@ -189,6 +189,24 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
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;
+
+#ifndef GLSLANG_WEB
case EbtInt8:
if (rightUnionArray[i] == (signed char)0)
newConstArray[i].setI8Const((signed char)0x7F);
@@ -221,22 +239,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
newConstArray[i].setU16Const(leftUnionArray[i].getU16Const() / rightUnionArray[i].getU16Const());
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 EbtInt64:
if (rightUnionArray[i] == 0ll)
newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll);
@@ -254,6 +256,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
break;
default:
return 0;
+#endif
}
}
break;
@@ -292,13 +295,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
newConstArray[i].setIConst(0);
break;
} else goto modulo_default;
-
+#ifndef GLSLANG_WEB
case EbtInt64:
if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) {
newConstArray[i].setI64Const(0);
break;
} else goto modulo_default;
-#ifdef AMD_EXTENSIONS
case EbtInt16:
if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == SHRT_MIN) {
newConstArray[i].setIConst(0);
@@ -415,8 +417,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
case EOpEmitStreamVertex:
case EOpEndStreamPrimitive:
- // These don't actually fold
- return 0;
+ // These don't fold
+ return nullptr;
case EOpPackSnorm2x16:
case EOpPackUnorm2x16:
@@ -491,8 +493,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
break;
}
- // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
-
case EOpPackSnorm2x16:
case EOpPackUnorm2x16:
case EOpPackHalf2x16:
@@ -510,7 +510,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
case EOpDeterminant:
case EOpMatrixInverse:
case EOpTranspose:
- return 0;
+ return nullptr;
default:
assert(componentWise);
@@ -529,16 +529,18 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
case EbtDouble:
case EbtFloat16:
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
+ case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
+ case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
+#ifndef GLSLANG_WEB
case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
case EbtUint8: newConstArray[i].setU8Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU8Const()))); break;
case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break;
case EbtUint16:newConstArray[i].setU16Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU16Const()))); break;
- case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
- case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break;
case EbtUint64: newConstArray[i].setU64Const(static_cast<unsigned long long>(-static_cast<long long>(unionArray[i].getU64Const()))); break;
+#endif
default:
- return 0;
+ return nullptr;
}
break;
case EOpLogicalNot:
@@ -546,7 +548,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
switch (getType().getBasicType()) {
case EbtBool: newConstArray[i].setBConst(!unionArray[i].getBConst()); break;
default:
- return 0;
+ return nullptr;
}
break;
case EOpBitwiseNot:
@@ -671,6 +673,48 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
break;
}
+ case EOpConvIntToBool:
+ newConstArray[i].setBConst(unionArray[i].getIConst() != 0); break;
+ case EOpConvUintToBool:
+ newConstArray[i].setBConst(unionArray[i].getUConst() != 0); break;
+ case EOpConvBoolToInt:
+ newConstArray[i].setIConst(unionArray[i].getBConst()); break;
+ case EOpConvBoolToUint:
+ newConstArray[i].setUConst(unionArray[i].getBConst()); break;
+ case EOpConvIntToUint:
+ newConstArray[i].setUConst(unionArray[i].getIConst()); break;
+ case EOpConvUintToInt:
+ newConstArray[i].setIConst(unionArray[i].getUConst()); break;
+
+ case EOpConvFloatToBool:
+ case EOpConvDoubleToBool:
+ newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
+
+ case EOpConvBoolToFloat:
+ case EOpConvBoolToDouble:
+ newConstArray[i].setDConst(unionArray[i].getBConst()); break;
+
+ case EOpConvIntToFloat:
+ case EOpConvIntToDouble:
+ newConstArray[i].setDConst(unionArray[i].getIConst()); break;
+
+ case EOpConvUintToFloat:
+ case EOpConvUintToDouble:
+ newConstArray[i].setDConst(unionArray[i].getUConst()); break;
+
+ case EOpConvDoubleToFloat:
+ case EOpConvFloatToDouble:
+ newConstArray[i].setDConst(unionArray[i].getDConst()); break;
+
+ case EOpConvFloatToUint:
+ case EOpConvDoubleToUint:
+ newConstArray[i].setUConst(static_cast<unsigned int>(unionArray[i].getDConst())); break;
+
+ case EOpConvFloatToInt:
+ case EOpConvDoubleToInt:
+ newConstArray[i].setIConst(static_cast<int>(unionArray[i].getDConst())); break;
+
+#ifndef GLSLANG_WEB
case EOpConvInt8ToBool:
newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break;
case EOpConvUint8ToBool:
@@ -679,20 +723,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setBConst(unionArray[i].getI16Const() != 0); break;
case EOpConvUint16ToBool:
newConstArray[i].setBConst(unionArray[i].getU16Const() != 0); break;
- case EOpConvIntToBool:
- newConstArray[i].setBConst(unionArray[i].getIConst() != 0); break;
- case EOpConvUintToBool:
- newConstArray[i].setBConst(unionArray[i].getUConst() != 0); break;
case EOpConvInt64ToBool:
newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break;
case EOpConvUint64ToBool:
newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break;
case EOpConvFloat16ToBool:
newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
- case EOpConvFloatToBool:
- newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
- case EOpConvDoubleToBool:
- newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
case EOpConvBoolToInt8:
newConstArray[i].setI8Const(unionArray[i].getBConst()); break;
@@ -702,20 +738,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setI16Const(unionArray[i].getBConst()); break;
case EOpConvBoolToUint16:
newConstArray[i].setU16Const(unionArray[i].getBConst()); break;
- case EOpConvBoolToInt:
- newConstArray[i].setIConst(unionArray[i].getBConst()); break;
- case EOpConvBoolToUint:
- newConstArray[i].setUConst(unionArray[i].getBConst()); break;
case EOpConvBoolToInt64:
newConstArray[i].setI64Const(unionArray[i].getBConst()); break;
case EOpConvBoolToUint64:
newConstArray[i].setU64Const(unionArray[i].getBConst()); break;
case EOpConvBoolToFloat16:
newConstArray[i].setDConst(unionArray[i].getBConst()); break;
- case EOpConvBoolToFloat:
- newConstArray[i].setDConst(unionArray[i].getBConst()); break;
- case EOpConvBoolToDouble:
- newConstArray[i].setDConst(unionArray[i].getBConst()); break;
case EOpConvInt8ToInt16:
newConstArray[i].setI16Const(unionArray[i].getI8Const()); break;
@@ -810,8 +838,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setU8Const((unsigned char)unionArray[i].getIConst()); break;
case EOpConvIntToUint16:
newConstArray[i].setU16Const((unsigned char)unionArray[i].getIConst()); break;
- case EOpConvIntToUint:
- newConstArray[i].setUConst(unionArray[i].getIConst()); break;
case EOpConvIntToUint64:
newConstArray[i].setU64Const(unionArray[i].getIConst()); break;
@@ -819,8 +845,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setI8Const((signed char)unionArray[i].getUConst()); break;
case EOpConvUintToInt16:
newConstArray[i].setI16Const((signed short)unionArray[i].getUConst()); break;
- case EOpConvUintToInt:
- newConstArray[i].setIConst(unionArray[i].getUConst()); break;
case EOpConvUintToInt64:
newConstArray[i].setI64Const(unionArray[i].getUConst()); break;
case EOpConvUintToUint8:
@@ -831,16 +855,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setU64Const(unionArray[i].getUConst()); break;
case EOpConvIntToFloat16:
newConstArray[i].setDConst(unionArray[i].getIConst()); break;
- case EOpConvIntToFloat:
- newConstArray[i].setDConst(unionArray[i].getIConst()); break;
- case EOpConvIntToDouble:
- newConstArray[i].setDConst(unionArray[i].getIConst()); break;
case EOpConvUintToFloat16:
newConstArray[i].setDConst(unionArray[i].getUConst()); break;
- case EOpConvUintToFloat:
- newConstArray[i].setDConst(unionArray[i].getUConst()); break;
- case EOpConvUintToDouble:
- newConstArray[i].setDConst(unionArray[i].getUConst()); break;
case EOpConvInt64ToInt8:
newConstArray[i].setI8Const(static_cast<signed char>(unionArray[i].getI64Const())); break;
case EOpConvInt64ToInt16:
@@ -905,48 +921,35 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setI8Const(static_cast<signed char>(unionArray[i].getDConst())); break;
case EOpConvFloatToInt16:
newConstArray[i].setI16Const(static_cast<signed short>(unionArray[i].getDConst())); break;
- case EOpConvFloatToInt:
- newConstArray[i].setIConst(static_cast<int>(unionArray[i].getDConst())); break;
case EOpConvFloatToInt64:
newConstArray[i].setI64Const(static_cast<long long>(unionArray[i].getDConst())); break;
case EOpConvFloatToUint8:
newConstArray[i].setU8Const(static_cast<unsigned char>(unionArray[i].getDConst())); break;
case EOpConvFloatToUint16:
newConstArray[i].setU16Const(static_cast<unsigned short>(unionArray[i].getDConst())); break;
- case EOpConvFloatToUint:
- newConstArray[i].setUConst(static_cast<unsigned int>(unionArray[i].getDConst())); break;
case EOpConvFloatToUint64:
newConstArray[i].setU64Const(static_cast<unsigned long long>(unionArray[i].getDConst())); break;
case EOpConvFloatToFloat16:
newConstArray[i].setDConst(unionArray[i].getDConst()); break;
- case EOpConvFloatToDouble:
- newConstArray[i].setDConst(unionArray[i].getDConst()); break;
case EOpConvDoubleToInt8:
newConstArray[i].setI8Const(static_cast<signed char>(unionArray[i].getDConst())); break;
case EOpConvDoubleToInt16:
newConstArray[i].setI16Const(static_cast<signed short>(unionArray[i].getDConst())); break;
- case EOpConvDoubleToInt:
- newConstArray[i].setIConst(static_cast<int>(unionArray[i].getDConst())); break;
case EOpConvDoubleToInt64:
newConstArray[i].setI64Const(static_cast<long long>(unionArray[i].getDConst())); break;
case EOpConvDoubleToUint8:
newConstArray[i].setU8Const(static_cast<unsigned char>(unionArray[i].getDConst())); break;
case EOpConvDoubleToUint16:
newConstArray[i].setU16Const(static_cast<unsigned short>(unionArray[i].getDConst())); break;
- case EOpConvDoubleToUint:
- newConstArray[i].setUConst(static_cast<unsigned int>(unionArray[i].getDConst())); break;
case EOpConvDoubleToUint64:
newConstArray[i].setU64Const(static_cast<unsigned long long>(unionArray[i].getDConst())); break;
case EOpConvDoubleToFloat16:
newConstArray[i].setDConst(unionArray[i].getDConst()); break;
- case EOpConvDoubleToFloat:
- newConstArray[i].setDConst(unionArray[i].getDConst()); break;
case EOpConvPtrToUint64:
case EOpConvUint64ToPtr:
case EOpConstructReference:
newConstArray[i].setU64Const(unionArray[i].getU64Const()); break;
-
-
+#endif
// TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
@@ -970,7 +973,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
case EOpInt16BitsToFloat16:
case EOpUint16BitsToFloat16:
default:
- return 0;
+ return nullptr;
}
}
@@ -1078,6 +1081,13 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
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;
+#ifndef GLSLANG_WEB
case EbtInt8:
newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
break;
@@ -1090,18 +1100,13 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
case EbtUint16:
newConstArray[comp].setU16Const(std::min(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const()));
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 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;
+#endif
default: assert(false && "Default missing");
}
break;
@@ -1112,6 +1117,13 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
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;
+#ifndef GLSLANG_WEB
case EbtInt8:
newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
break;
@@ -1124,18 +1136,13 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
case EbtUint16:
newConstArray[comp].setU16Const(std::max(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const()));
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 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;
+#endif
default: assert(false && "Default missing");
}
break;
@@ -1147,6 +1154,11 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
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;
+#ifndef GLSLANG_WEB
case EbtInt8:
newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()),
childConstUnions[2][arg2comp].getI8Const()));
@@ -1167,10 +1179,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
newConstArray[comp].setIConst(std::min(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()),
childConstUnions[2][arg2comp].getIConst()));
break;
- case EbtUint:
- newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()),
- childConstUnions[2][arg2comp].getUConst()));
- break;
case EbtInt64:
newConstArray[comp].setI64Const(std::min(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()),
childConstUnions[2][arg2comp].getI64Const()));
@@ -1179,6 +1187,7 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()),
childConstUnions[2][arg2comp].getU64Const()));
break;
+#endif
default: assert(false && "Default missing");
}
break;
@@ -1201,12 +1210,17 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
newConstArray[comp].setBConst(childConstUnions[0][arg0comp] != childConstUnions[1][arg1comp]);
break;
case EOpMix:
- 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());
+ 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);
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
index 0498b4871a..de55742649 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
@@ -64,6 +64,420 @@ const bool ForwardCompatibility = false;
// Using PureOperatorBuiltins=false is deprecated.
bool PureOperatorBuiltins = 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<ArgType>(TypeF | TypeI);
+const ArgType TypeFIB = static_cast<ArgType>(TypeF | TypeI | TypeB);
+const ArgType TypeIU = static_cast<ArgType>(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
+ ClassCV = 1 << 12, // first argument is 'coherent volatile'
+ ClassFO = 1 << 13, // first argument is output
+ ClassV3 = 1 << 14, // vec3 only
+};
+// Mixtures of the above, to help the function tables
+const ArgClass ClassV1FIOCV = (ArgClass)(ClassV1 | ClassFIO | ClassCV);
+const ArgClass ClassV1FOCV = (ArgClass)(ClassV1 | ClassFO | ClassCV);
+const ArgClass ClassV1CV = (ArgClass)(ClassV1 | ClassCV);
+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<EProfile>(ENoProfile | ECoreProfile | ECompatibilityProfile);
+
+// Declare pointers to put into the table for versioning.
+#ifdef GLSLANG_WEB
+ const Versioning* Es300Desktop130 = nullptr;
+ const Versioning* Es310Desktop430 = nullptr;
+#else
+ const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr },
+ { EDesktopProfile, 0, 130, 0, nullptr },
+ { EBadProfile } };
+ const Versioning* Es300Desktop130 = &Es300Desktop130Version[0];
+
+ const Versioning Es310Desktop430Version[] = { { EEsProfile, 0, 310, 0, nullptr },
+ { EDesktopProfile, 0, 430, 0, nullptr },
+ { EBadProfile } };
+ const Versioning* Es310Desktop430 = &Es310Desktop430Version[0];
+
+ const Versioning Es310Desktop450Version[] = { { EEsProfile, 0, 310, 0, nullptr },
+ { EDesktopProfile, 0, 450, 0, nullptr },
+ { EBadProfile } };
+ const Versioning* Es310Desktop450 = &Es310Desktop450Version[0];
+#endif
+
+// 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 Versioning* versioning; // nullptr 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 BuiltInFunction BaseFunctions[] = {
+// TOperator, name, arg-count, ArgType, ArgClass, versioning
+// --------- ---- --------- ------- -------- ----------
+ { EOpRadians, "radians", 1, TypeF, ClassRegular, nullptr },
+ { EOpDegrees, "degrees", 1, TypeF, ClassRegular, nullptr },
+ { EOpSin, "sin", 1, TypeF, ClassRegular, nullptr },
+ { EOpCos, "cos", 1, TypeF, ClassRegular, nullptr },
+ { EOpTan, "tan", 1, TypeF, ClassRegular, nullptr },
+ { EOpAsin, "asin", 1, TypeF, ClassRegular, nullptr },
+ { EOpAcos, "acos", 1, TypeF, ClassRegular, nullptr },
+ { EOpAtan, "atan", 2, TypeF, ClassRegular, nullptr },
+ { EOpAtan, "atan", 1, TypeF, ClassRegular, nullptr },
+ { EOpPow, "pow", 2, TypeF, ClassRegular, nullptr },
+ { EOpExp, "exp", 1, TypeF, ClassRegular, nullptr },
+ { EOpLog, "log", 1, TypeF, ClassRegular, nullptr },
+ { EOpExp2, "exp2", 1, TypeF, ClassRegular, nullptr },
+ { EOpLog2, "log2", 1, TypeF, ClassRegular, nullptr },
+ { EOpSqrt, "sqrt", 1, TypeF, ClassRegular, nullptr },
+ { EOpInverseSqrt, "inversesqrt", 1, TypeF, ClassRegular, nullptr },
+ { EOpAbs, "abs", 1, TypeF, ClassRegular, nullptr },
+ { EOpSign, "sign", 1, TypeF, ClassRegular, nullptr },
+ { EOpFloor, "floor", 1, TypeF, ClassRegular, nullptr },
+ { EOpCeil, "ceil", 1, TypeF, ClassRegular, nullptr },
+ { EOpFract, "fract", 1, TypeF, ClassRegular, nullptr },
+ { EOpMod, "mod", 2, TypeF, ClassLS, nullptr },
+ { EOpMin, "min", 2, TypeF, ClassLS, nullptr },
+ { EOpMax, "max", 2, TypeF, ClassLS, nullptr },
+ { EOpClamp, "clamp", 3, TypeF, ClassLS2, nullptr },
+ { EOpMix, "mix", 3, TypeF, ClassLS, nullptr },
+ { EOpStep, "step", 2, TypeF, ClassFS, nullptr },
+ { EOpSmoothStep, "smoothstep", 3, TypeF, ClassFS2, nullptr },
+ { EOpNormalize, "normalize", 1, TypeF, ClassRegular, nullptr },
+ { EOpFaceForward, "faceforward", 3, TypeF, ClassRegular, nullptr },
+ { EOpReflect, "reflect", 2, TypeF, ClassRegular, nullptr },
+ { EOpRefract, "refract", 3, TypeF, ClassXLS, nullptr },
+ { EOpLength, "length", 1, TypeF, ClassRS, nullptr },
+ { EOpDistance, "distance", 2, TypeF, ClassRS, nullptr },
+ { EOpDot, "dot", 2, TypeF, ClassRS, nullptr },
+ { EOpCross, "cross", 2, TypeF, ClassV3, nullptr },
+ { EOpLessThan, "lessThan", 2, TypeFI, ClassBNS, nullptr },
+ { EOpLessThanEqual, "lessThanEqual", 2, TypeFI, ClassBNS, nullptr },
+ { EOpGreaterThan, "greaterThan", 2, TypeFI, ClassBNS, nullptr },
+ { EOpGreaterThanEqual, "greaterThanEqual", 2, TypeFI, ClassBNS, nullptr },
+ { EOpVectorEqual, "equal", 2, TypeFIB, ClassBNS, nullptr },
+ { EOpVectorNotEqual, "notEqual", 2, TypeFIB, ClassBNS, nullptr },
+ { EOpAny, "any", 1, TypeB, ClassRSNS, nullptr },
+ { EOpAll, "all", 1, TypeB, ClassRSNS, nullptr },
+ { EOpVectorLogicalNot, "not", 1, TypeB, ClassNS, nullptr },
+ { EOpSinh, "sinh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpCosh, "cosh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpTanh, "tanh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpAsinh, "asinh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpAcosh, "acosh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpAtanh, "atanh", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpAbs, "abs", 1, TypeI, ClassRegular, Es300Desktop130 },
+ { EOpSign, "sign", 1, TypeI, ClassRegular, Es300Desktop130 },
+ { EOpTrunc, "trunc", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpRound, "round", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpRoundEven, "roundEven", 1, TypeF, ClassRegular, Es300Desktop130 },
+ { EOpModf, "modf", 2, TypeF, ClassLO, Es300Desktop130 },
+ { EOpMin, "min", 2, TypeIU, ClassLS, Es300Desktop130 },
+ { EOpMax, "max", 2, TypeIU, ClassLS, Es300Desktop130 },
+ { EOpClamp, "clamp", 3, TypeIU, ClassLS2, Es300Desktop130 },
+ { EOpMix, "mix", 3, TypeF, ClassLB, Es300Desktop130 },
+ { EOpIsInf, "isinf", 1, TypeF, ClassB, Es300Desktop130 },
+ { EOpIsNan, "isnan", 1, TypeF, ClassB, Es300Desktop130 },
+ { EOpLessThan, "lessThan", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpLessThanEqual, "lessThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpGreaterThan, "greaterThan", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpVectorEqual, "equal", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
+ { EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+#ifndef GLSLANG_WEB
+ { EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 },
+ { EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 },
+#endif
+
+ { EOpNull }
+};
+
+const BuiltInFunction DerivativeFunctions[] = {
+ { EOpDPdx, "dFdx", 1, TypeF, ClassRegular, nullptr },
+ { EOpDPdy, "dFdy", 1, TypeF, ClassRegular, nullptr },
+ { EOpFwidth, "fwidth", 1, TypeF, ClassRegular, nullptr },
+ { EOpNull }
+};
+
+// 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 Versioning* versioning; // nullptr means always a valid version
+};
+
+const CustomFunction CustomFunctions[] = {
+ { EOpBarrier, "barrier", nullptr },
+ { EOpMemoryBarrierShared, "memoryBarrierShared", nullptr },
+ { EOpGroupMemoryBarrier, "groupMemoryBarrier", nullptr },
+ { EOpMemoryBarrier, "memoryBarrier", nullptr },
+ { EOpMemoryBarrierBuffer, "memoryBarrierBuffer", nullptr },
+
+ { EOpPackSnorm2x16, "packSnorm2x16", nullptr },
+ { EOpUnpackSnorm2x16, "unpackSnorm2x16", nullptr },
+ { EOpPackUnorm2x16, "packUnorm2x16", nullptr },
+ { EOpUnpackUnorm2x16, "unpackUnorm2x16", nullptr },
+ { EOpPackHalf2x16, "packHalf2x16", nullptr },
+ { EOpUnpackHalf2x16, "unpackHalf2x16", nullptr },
+
+ { EOpMul, "matrixCompMult", nullptr },
+ { EOpOuterProduct, "outerProduct", nullptr },
+ { EOpTranspose, "transpose", nullptr },
+ { EOpDeterminant, "determinant", nullptr },
+ { EOpMatrixInverse, "inverse", nullptr },
+ { EOpFloatBitsToInt, "floatBitsToInt", nullptr },
+ { EOpFloatBitsToUint, "floatBitsToUint", nullptr },
+ { EOpIntBitsToFloat, "intBitsToFloat", nullptr },
+ { EOpUintBitsToFloat, "uintBitsToFloat", nullptr },
+
+ { EOpTextureQuerySize, "textureSize", nullptr },
+ { EOpTextureQueryLod, "textureQueryLod", nullptr },
+ { EOpTextureQueryLevels, "textureQueryLevels", nullptr },
+ { EOpTextureQuerySamples, "textureSamples", nullptr },
+ { EOpTexture, "texture", nullptr },
+ { EOpTextureProj, "textureProj", nullptr },
+ { EOpTextureLod, "textureLod", nullptr },
+ { EOpTextureOffset, "textureOffset", nullptr },
+ { EOpTextureFetch, "texelFetch", nullptr },
+ { EOpTextureFetchOffset, "texelFetchOffset", nullptr },
+ { EOpTextureProjOffset, "textureProjOffset", nullptr },
+ { EOpTextureLodOffset, "textureLodOffset", nullptr },
+ { EOpTextureProjLod, "textureProjLod", nullptr },
+ { EOpTextureProjLodOffset, "textureProjLodOffset", nullptr },
+ { EOpTextureGrad, "textureGrad", nullptr },
+ { EOpTextureGradOffset, "textureGradOffset", nullptr },
+ { EOpTextureProjGrad, "textureProjGrad", nullptr },
+ { EOpTextureProjGradOffset, "textureProjGradOffset", nullptr },
+
+ { EOpNull }
+};
+
+// 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) {
+#ifndef GLSLANG_WEB
+ if (function.classes & ClassCV)
+ decls.append("coherent volatile ");
+#endif
+ 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 */)
+{
+#ifdef GLSLANG_WEB
+ // all entries in table are valid
+ return true;
+#endif
+
+ // nullptr means always valid
+ if (function.versioning == nullptr)
+ return true;
+
+ // check for what is said about our current profile
+ for (const Versioning* v = function.versioning; v->profiles != EBadProfile; ++v) {
+ 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<class FunctionT>
+void RelateTabledBuiltins(const FunctionT* functions, TSymbolTable& symbolTable)
+{
+ while (functions->op != EOpNull) {
+ symbolTable.relateToOperator(functions->name, functions->op);
+ ++functions;
+ }
+}
+
+} // 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 BuiltInFunction* function) {
+ while (function->op != EOpNull) {
+ if (ValidVersion(*function, version, profile, spvVersion))
+ AddTabledBuiltin(decls, *function);
+ ++function;
+ }
+ };
+
+ 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 && ARBCompatibility) || profile == ECompatibilityProfile);
@@ -84,27 +498,30 @@ TBuiltIns::TBuiltIns()
// Set up textual representations for making all the permutations
// of texturing/imaging functions.
prefixes[EbtFloat] = "";
-#ifdef AMD_EXTENSIONS
+ prefixes[EbtInt] = "i";
+ prefixes[EbtUint] = "u";
+#ifndef GLSLANG_WEB
prefixes[EbtFloat16] = "f16";
-#endif
prefixes[EbtInt8] = "i8";
prefixes[EbtUint8] = "u8";
prefixes[EbtInt16] = "i16";
prefixes[EbtUint16] = "u16";
- prefixes[EbtInt] = "i";
- prefixes[EbtUint] = "u";
+#endif
+
postfixes[2] = "2";
postfixes[3] = "3";
postfixes[4] = "4";
// Map from symbolic class of texturing dimension to numeric dimensions.
- dimMap[Esd1D] = 1;
dimMap[Esd2D] = 2;
- dimMap[EsdRect] = 2;
dimMap[Esd3D] = 3;
dimMap[EsdCube] = 3;
+#ifndef GLSLANG_WEB
+ dimMap[Esd1D] = 1;
+ dimMap[EsdRect] = 2;
dimMap[EsdBuffer] = 1;
- dimMap[EsdSubpass] = 2; // potientially unused for now
+ dimMap[EsdSubpass] = 2; // potentially unused for now
+#endif
}
TBuiltIns::~TBuiltIns()
@@ -122,32 +539,22 @@ TBuiltIns::~TBuiltIns()
//
void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion)
{
+#ifdef GLSLANG_WEB
+ version = 310;
+ profile = EEsProfile;
+#endif
+ addTabledBuiltins(version, profile, spvVersion);
+
//============================================================================
//
// Prototypes for built-in functions used repeatly by different shaders
//
//============================================================================
+#ifndef GLSLANG_WEB
//
// Derivatives Functions.
//
- TString derivatives (
- "float dFdx(float p);"
- "vec2 dFdx(vec2 p);"
- "vec3 dFdx(vec3 p);"
- "vec4 dFdx(vec4 p);"
-
- "float dFdy(float p);"
- "vec2 dFdy(vec2 p);"
- "vec3 dFdy(vec3 p);"
- "vec4 dFdy(vec4 p);"
-
- "float fwidth(float p);"
- "vec2 fwidth(vec2 p);"
- "vec3 fwidth(vec3 p);"
- "vec4 fwidth(vec4 p);"
- );
-
TString derivativeControls (
"float dFdxFine(float p);"
"vec2 dFdxFine(vec2 p);"
@@ -281,321 +688,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
//============================================================================
//
- // Angle and Trigonometric Functions.
- //
- commonBuiltins.append(
- "float radians(float degrees);"
- "vec2 radians(vec2 degrees);"
- "vec3 radians(vec3 degrees);"
- "vec4 radians(vec4 degrees);"
-
- "float degrees(float radians);"
- "vec2 degrees(vec2 radians);"
- "vec3 degrees(vec3 radians);"
- "vec4 degrees(vec4 radians);"
-
- "float sin(float angle);"
- "vec2 sin(vec2 angle);"
- "vec3 sin(vec3 angle);"
- "vec4 sin(vec4 angle);"
-
- "float cos(float angle);"
- "vec2 cos(vec2 angle);"
- "vec3 cos(vec3 angle);"
- "vec4 cos(vec4 angle);"
-
- "float tan(float angle);"
- "vec2 tan(vec2 angle);"
- "vec3 tan(vec3 angle);"
- "vec4 tan(vec4 angle);"
-
- "float asin(float x);"
- "vec2 asin(vec2 x);"
- "vec3 asin(vec3 x);"
- "vec4 asin(vec4 x);"
-
- "float acos(float x);"
- "vec2 acos(vec2 x);"
- "vec3 acos(vec3 x);"
- "vec4 acos(vec4 x);"
-
- "float atan(float y, float x);"
- "vec2 atan(vec2 y, vec2 x);"
- "vec3 atan(vec3 y, vec3 x);"
- "vec4 atan(vec4 y, vec4 x);"
-
- "float atan(float y_over_x);"
- "vec2 atan(vec2 y_over_x);"
- "vec3 atan(vec3 y_over_x);"
- "vec4 atan(vec4 y_over_x);"
-
- "\n");
-
- if (version >= 130) {
- commonBuiltins.append(
- "float sinh(float angle);"
- "vec2 sinh(vec2 angle);"
- "vec3 sinh(vec3 angle);"
- "vec4 sinh(vec4 angle);"
-
- "float cosh(float angle);"
- "vec2 cosh(vec2 angle);"
- "vec3 cosh(vec3 angle);"
- "vec4 cosh(vec4 angle);"
-
- "float tanh(float angle);"
- "vec2 tanh(vec2 angle);"
- "vec3 tanh(vec3 angle);"
- "vec4 tanh(vec4 angle);"
-
- "float asinh(float x);"
- "vec2 asinh(vec2 x);"
- "vec3 asinh(vec3 x);"
- "vec4 asinh(vec4 x);"
-
- "float acosh(float x);"
- "vec2 acosh(vec2 x);"
- "vec3 acosh(vec3 x);"
- "vec4 acosh(vec4 x);"
-
- "float atanh(float y_over_x);"
- "vec2 atanh(vec2 y_over_x);"
- "vec3 atanh(vec3 y_over_x);"
- "vec4 atanh(vec4 y_over_x);"
-
- "\n");
- }
-
- //
- // Exponential Functions.
- //
- commonBuiltins.append(
- "float pow(float x, float y);"
- "vec2 pow(vec2 x, vec2 y);"
- "vec3 pow(vec3 x, vec3 y);"
- "vec4 pow(vec4 x, vec4 y);"
-
- "float exp(float x);"
- "vec2 exp(vec2 x);"
- "vec3 exp(vec3 x);"
- "vec4 exp(vec4 x);"
-
- "float log(float x);"
- "vec2 log(vec2 x);"
- "vec3 log(vec3 x);"
- "vec4 log(vec4 x);"
-
- "float exp2(float x);"
- "vec2 exp2(vec2 x);"
- "vec3 exp2(vec3 x);"
- "vec4 exp2(vec4 x);"
-
- "float log2(float x);"
- "vec2 log2(vec2 x);"
- "vec3 log2(vec3 x);"
- "vec4 log2(vec4 x);"
-
- "float sqrt(float x);"
- "vec2 sqrt(vec2 x);"
- "vec3 sqrt(vec3 x);"
- "vec4 sqrt(vec4 x);"
-
- "float inversesqrt(float x);"
- "vec2 inversesqrt(vec2 x);"
- "vec3 inversesqrt(vec3 x);"
- "vec4 inversesqrt(vec4 x);"
-
- "\n");
-
- //
- // Common Functions.
- //
- commonBuiltins.append(
- "float abs(float x);"
- "vec2 abs(vec2 x);"
- "vec3 abs(vec3 x);"
- "vec4 abs(vec4 x);"
-
- "float sign(float x);"
- "vec2 sign(vec2 x);"
- "vec3 sign(vec3 x);"
- "vec4 sign(vec4 x);"
-
- "float floor(float x);"
- "vec2 floor(vec2 x);"
- "vec3 floor(vec3 x);"
- "vec4 floor(vec4 x);"
-
- "float ceil(float x);"
- "vec2 ceil(vec2 x);"
- "vec3 ceil(vec3 x);"
- "vec4 ceil(vec4 x);"
-
- "float fract(float x);"
- "vec2 fract(vec2 x);"
- "vec3 fract(vec3 x);"
- "vec4 fract(vec4 x);"
-
- "float mod(float x, float y);"
- "vec2 mod(vec2 x, float y);"
- "vec3 mod(vec3 x, float y);"
- "vec4 mod(vec4 x, float y);"
- "vec2 mod(vec2 x, vec2 y);"
- "vec3 mod(vec3 x, vec3 y);"
- "vec4 mod(vec4 x, vec4 y);"
-
- "float min(float x, float y);"
- "vec2 min(vec2 x, float y);"
- "vec3 min(vec3 x, float y);"
- "vec4 min(vec4 x, float y);"
- "vec2 min(vec2 x, vec2 y);"
- "vec3 min(vec3 x, vec3 y);"
- "vec4 min(vec4 x, vec4 y);"
-
- "float max(float x, float y);"
- "vec2 max(vec2 x, float y);"
- "vec3 max(vec3 x, float y);"
- "vec4 max(vec4 x, float y);"
- "vec2 max(vec2 x, vec2 y);"
- "vec3 max(vec3 x, vec3 y);"
- "vec4 max(vec4 x, vec4 y);"
-
- "float clamp(float x, float minVal, float maxVal);"
- "vec2 clamp(vec2 x, float minVal, float maxVal);"
- "vec3 clamp(vec3 x, float minVal, float maxVal);"
- "vec4 clamp(vec4 x, float minVal, float maxVal);"
- "vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);"
- "vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);"
- "vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);"
-
- "float mix(float x, float y, float a);"
- "vec2 mix(vec2 x, vec2 y, float a);"
- "vec3 mix(vec3 x, vec3 y, float a);"
- "vec4 mix(vec4 x, vec4 y, float a);"
- "vec2 mix(vec2 x, vec2 y, vec2 a);"
- "vec3 mix(vec3 x, vec3 y, vec3 a);"
- "vec4 mix(vec4 x, vec4 y, vec4 a);"
-
- "float step(float edge, float x);"
- "vec2 step(vec2 edge, vec2 x);"
- "vec3 step(vec3 edge, vec3 x);"
- "vec4 step(vec4 edge, vec4 x);"
- "vec2 step(float edge, vec2 x);"
- "vec3 step(float edge, vec3 x);"
- "vec4 step(float edge, vec4 x);"
-
- "float smoothstep(float edge0, float edge1, float x);"
- "vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);"
- "vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);"
- "vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);"
- "vec2 smoothstep(float edge0, float edge1, vec2 x);"
- "vec3 smoothstep(float edge0, float edge1, vec3 x);"
- "vec4 smoothstep(float edge0, float edge1, vec4 x);"
-
- "\n");
-
- if (version >= 130) {
- commonBuiltins.append(
- " int abs( int x);"
- "ivec2 abs(ivec2 x);"
- "ivec3 abs(ivec3 x);"
- "ivec4 abs(ivec4 x);"
-
- " int sign( int x);"
- "ivec2 sign(ivec2 x);"
- "ivec3 sign(ivec3 x);"
- "ivec4 sign(ivec4 x);"
-
- "float trunc(float x);"
- "vec2 trunc(vec2 x);"
- "vec3 trunc(vec3 x);"
- "vec4 trunc(vec4 x);"
-
- "float round(float x);"
- "vec2 round(vec2 x);"
- "vec3 round(vec3 x);"
- "vec4 round(vec4 x);"
-
- "float roundEven(float x);"
- "vec2 roundEven(vec2 x);"
- "vec3 roundEven(vec3 x);"
- "vec4 roundEven(vec4 x);"
-
- "float modf(float, out float);"
- "vec2 modf(vec2, out vec2 );"
- "vec3 modf(vec3, out vec3 );"
- "vec4 modf(vec4, out vec4 );"
-
- " int min(int x, int y);"
- "ivec2 min(ivec2 x, int y);"
- "ivec3 min(ivec3 x, int y);"
- "ivec4 min(ivec4 x, int y);"
- "ivec2 min(ivec2 x, ivec2 y);"
- "ivec3 min(ivec3 x, ivec3 y);"
- "ivec4 min(ivec4 x, ivec4 y);"
-
- " uint min(uint x, uint y);"
- "uvec2 min(uvec2 x, uint y);"
- "uvec3 min(uvec3 x, uint y);"
- "uvec4 min(uvec4 x, uint y);"
- "uvec2 min(uvec2 x, uvec2 y);"
- "uvec3 min(uvec3 x, uvec3 y);"
- "uvec4 min(uvec4 x, uvec4 y);"
-
- " int max(int x, int y);"
- "ivec2 max(ivec2 x, int y);"
- "ivec3 max(ivec3 x, int y);"
- "ivec4 max(ivec4 x, int y);"
- "ivec2 max(ivec2 x, ivec2 y);"
- "ivec3 max(ivec3 x, ivec3 y);"
- "ivec4 max(ivec4 x, ivec4 y);"
-
- " uint max(uint x, uint y);"
- "uvec2 max(uvec2 x, uint y);"
- "uvec3 max(uvec3 x, uint y);"
- "uvec4 max(uvec4 x, uint y);"
- "uvec2 max(uvec2 x, uvec2 y);"
- "uvec3 max(uvec3 x, uvec3 y);"
- "uvec4 max(uvec4 x, uvec4 y);"
-
- "int clamp(int x, int minVal, int maxVal);"
- "ivec2 clamp(ivec2 x, int minVal, int maxVal);"
- "ivec3 clamp(ivec3 x, int minVal, int maxVal);"
- "ivec4 clamp(ivec4 x, int minVal, int maxVal);"
- "ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);"
- "ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);"
- "ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);"
-
- "uint clamp(uint x, uint minVal, uint maxVal);"
- "uvec2 clamp(uvec2 x, uint minVal, uint maxVal);"
- "uvec3 clamp(uvec3 x, uint minVal, uint maxVal);"
- "uvec4 clamp(uvec4 x, uint minVal, uint maxVal);"
- "uvec2 clamp(uvec2 x, uvec2 minVal, uvec2 maxVal);"
- "uvec3 clamp(uvec3 x, uvec3 minVal, uvec3 maxVal);"
- "uvec4 clamp(uvec4 x, uvec4 minVal, uvec4 maxVal);"
-
- "float mix(float x, float y, bool a);"
- "vec2 mix(vec2 x, vec2 y, bvec2 a);"
- "vec3 mix(vec3 x, vec3 y, bvec3 a);"
- "vec4 mix(vec4 x, vec4 y, bvec4 a);"
-
- "bool isnan(float x);"
- "bvec2 isnan(vec2 x);"
- "bvec3 isnan(vec3 x);"
- "bvec4 isnan(vec4 x);"
-
- "bool isinf(float x);"
- "bvec2 isinf(vec2 x);"
- "bvec3 isinf(vec3 x);"
- "bvec4 isinf(vec4 x);"
-
- "\n");
- }
-
- //
// double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack
//
- if (profile != EEsProfile && version >= 400) {
+ if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double sqrt(double);"
@@ -959,31 +1054,30 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bvec3 notEqual(u64vec3, u64vec3);"
"bvec4 notEqual(u64vec4, u64vec4);"
- "int findLSB(int64_t);"
- "ivec2 findLSB(i64vec2);"
- "ivec3 findLSB(i64vec3);"
- "ivec4 findLSB(i64vec4);"
+ "int64_t findLSB(int64_t);"
+ "i64vec2 findLSB(i64vec2);"
+ "i64vec3 findLSB(i64vec3);"
+ "i64vec4 findLSB(i64vec4);"
- "int findLSB(uint64_t);"
- "ivec2 findLSB(u64vec2);"
- "ivec3 findLSB(u64vec3);"
- "ivec4 findLSB(u64vec4);"
+ "int64_t findLSB(uint64_t);"
+ "i64vec2 findLSB(u64vec2);"
+ "i64vec3 findLSB(u64vec3);"
+ "i64vec4 findLSB(u64vec4);"
- "int findMSB(int64_t);"
- "ivec2 findMSB(i64vec2);"
- "ivec3 findMSB(i64vec3);"
- "ivec4 findMSB(i64vec4);"
+ "int64_t findMSB(int64_t);"
+ "i64vec2 findMSB(i64vec2);"
+ "i64vec3 findMSB(i64vec3);"
+ "i64vec4 findMSB(i64vec4);"
- "int findMSB(uint64_t);"
- "ivec2 findMSB(u64vec2);"
- "ivec3 findMSB(u64vec3);"
- "ivec4 findMSB(u64vec4);"
+ "int64_t findMSB(uint64_t);"
+ "i64vec2 findMSB(u64vec2);"
+ "i64vec3 findMSB(u64vec3);"
+ "i64vec4 findMSB(u64vec4);"
"\n"
);
}
-#ifdef AMD_EXTENSIONS
// GL_AMD_shader_trinary_minmax
if (profile != EEsProfile && version >= 430) {
commonBuiltins.append(
@@ -1080,48 +1174,31 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n"
);
}
-#endif
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 430)) {
commonBuiltins.append(
- "uint atomicAdd(coherent volatile inout uint, uint);"
- " int atomicAdd(coherent volatile inout int, int);"
"uint atomicAdd(coherent volatile inout uint, uint, int, int, int);"
" int atomicAdd(coherent volatile inout int, int, int, int, int);"
- "uint atomicMin(coherent volatile inout uint, uint);"
- " int atomicMin(coherent volatile inout int, int);"
"uint atomicMin(coherent volatile inout uint, uint, int, int, int);"
" int atomicMin(coherent volatile inout int, int, int, int, int);"
- "uint atomicMax(coherent volatile inout uint, uint);"
- " int atomicMax(coherent volatile inout int, int);"
"uint atomicMax(coherent volatile inout uint, uint, int, int, int);"
" int atomicMax(coherent volatile inout int, int, int, int, int);"
- "uint atomicAnd(coherent volatile inout uint, uint);"
- " int atomicAnd(coherent volatile inout int, int);"
"uint atomicAnd(coherent volatile inout uint, uint, int, int, int);"
" int atomicAnd(coherent volatile inout int, int, int, int, int);"
- "uint atomicOr (coherent volatile inout uint, uint);"
- " int atomicOr (coherent volatile inout int, int);"
"uint atomicOr (coherent volatile inout uint, uint, int, int, int);"
" int atomicOr (coherent volatile inout int, int, int, int, int);"
- "uint atomicXor(coherent volatile inout uint, uint);"
- " int atomicXor(coherent volatile inout int, int);"
"uint atomicXor(coherent volatile inout uint, uint, int, int, int);"
" int atomicXor(coherent volatile inout int, int, int, int, int);"
- "uint atomicExchange(coherent volatile inout uint, uint);"
- " int atomicExchange(coherent volatile inout int, int);"
"uint atomicExchange(coherent volatile inout uint, uint, int, int, int);"
" int atomicExchange(coherent volatile inout int, int, int, int, int);"
- "uint atomicCompSwap(coherent volatile inout uint, uint, uint);"
- " int atomicCompSwap(coherent volatile inout int, int, int);"
"uint atomicCompSwap(coherent volatile inout uint, uint, uint, int, int, int, int, int);"
" int atomicCompSwap(coherent volatile inout int, int, int, int, int, int, int, int);"
@@ -1183,27 +1260,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
"\n");
}
-
- if ((profile == EEsProfile && version >= 310) ||
- (profile != EEsProfile && version >= 450)) {
- commonBuiltins.append(
- "int mix(int x, int y, bool a);"
- "ivec2 mix(ivec2 x, ivec2 y, bvec2 a);"
- "ivec3 mix(ivec3 x, ivec3 y, bvec3 a);"
- "ivec4 mix(ivec4 x, ivec4 y, bvec4 a);"
-
- "uint mix(uint x, uint y, bool a);"
- "uvec2 mix(uvec2 x, uvec2 y, bvec2 a);"
- "uvec3 mix(uvec3 x, uvec3 y, bvec3 a);"
- "uvec4 mix(uvec4 x, uvec4 y, bvec4 a);"
-
- "bool mix(bool x, bool y, bool a);"
- "bvec2 mix(bvec2 x, bvec2 y, bvec2 a);"
- "bvec3 mix(bvec3 x, bvec3 y, bvec3 a);"
- "bvec4 mix(bvec4 x, bvec4 y, bvec4 a);"
-
- "\n");
- }
+#endif
if ((profile == EEsProfile && version >= 300) ||
(profile != EEsProfile && version >= 330)) {
@@ -1231,6 +1288,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_WEB
if ((profile != EEsProfile && version >= 400) ||
(profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5
@@ -1240,15 +1298,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec3 fma(vec3, vec3, vec3 );"
"vec4 fma(vec4, vec4, vec4 );"
"\n");
+ }
- if (profile != EEsProfile) {
+ 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) ||
@@ -1267,7 +1325,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
- if (profile != EEsProfile && version >= 400) {
+ if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double frexp(double, out int);"
"dvec2 frexp( dvec2, out ivec2);"
@@ -1284,6 +1342,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#endif
if ((profile == EEsProfile && version >= 300) ||
(profile != EEsProfile && version >= 400)) {
@@ -1312,6 +1371,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_WEB
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 400)) {
commonBuiltins.append(
@@ -1331,48 +1391,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec4 unpackUnorm4x8(highp uint);"
"\n");
}
-
- //
- // Geometric Functions.
- //
- commonBuiltins.append(
- "float length(float x);"
- "float length(vec2 x);"
- "float length(vec3 x);"
- "float length(vec4 x);"
-
- "float distance(float p0, float p1);"
- "float distance(vec2 p0, vec2 p1);"
- "float distance(vec3 p0, vec3 p1);"
- "float distance(vec4 p0, vec4 p1);"
-
- "float dot(float x, float y);"
- "float dot(vec2 x, vec2 y);"
- "float dot(vec3 x, vec3 y);"
- "float dot(vec4 x, vec4 y);"
-
- "vec3 cross(vec3 x, vec3 y);"
- "float normalize(float x);"
- "vec2 normalize(vec2 x);"
- "vec3 normalize(vec3 x);"
- "vec4 normalize(vec4 x);"
-
- "float faceforward(float N, float I, float Nref);"
- "vec2 faceforward(vec2 N, vec2 I, vec2 Nref);"
- "vec3 faceforward(vec3 N, vec3 I, vec3 Nref);"
- "vec4 faceforward(vec4 N, vec4 I, vec4 Nref);"
-
- "float reflect(float I, float N);"
- "vec2 reflect(vec2 I, vec2 N);"
- "vec3 reflect(vec3 I, vec3 N);"
- "vec4 reflect(vec4 I, vec4 N);"
-
- "float refract(float I, float N, float eta);"
- "vec2 refract(vec2 I, vec2 N, float eta);"
- "vec3 refract(vec3 I, vec3 N, float eta);"
- "vec4 refract(vec4 I, vec4 N, float eta);"
-
- "\n");
+#endif
//
// Matrix Functions.
@@ -1431,109 +1450,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
}
- //
- // Vector relational functions.
- //
- commonBuiltins.append(
- "bvec2 lessThan(vec2 x, vec2 y);"
- "bvec3 lessThan(vec3 x, vec3 y);"
- "bvec4 lessThan(vec4 x, vec4 y);"
-
- "bvec2 lessThan(ivec2 x, ivec2 y);"
- "bvec3 lessThan(ivec3 x, ivec3 y);"
- "bvec4 lessThan(ivec4 x, ivec4 y);"
-
- "bvec2 lessThanEqual(vec2 x, vec2 y);"
- "bvec3 lessThanEqual(vec3 x, vec3 y);"
- "bvec4 lessThanEqual(vec4 x, vec4 y);"
-
- "bvec2 lessThanEqual(ivec2 x, ivec2 y);"
- "bvec3 lessThanEqual(ivec3 x, ivec3 y);"
- "bvec4 lessThanEqual(ivec4 x, ivec4 y);"
-
- "bvec2 greaterThan(vec2 x, vec2 y);"
- "bvec3 greaterThan(vec3 x, vec3 y);"
- "bvec4 greaterThan(vec4 x, vec4 y);"
-
- "bvec2 greaterThan(ivec2 x, ivec2 y);"
- "bvec3 greaterThan(ivec3 x, ivec3 y);"
- "bvec4 greaterThan(ivec4 x, ivec4 y);"
-
- "bvec2 greaterThanEqual(vec2 x, vec2 y);"
- "bvec3 greaterThanEqual(vec3 x, vec3 y);"
- "bvec4 greaterThanEqual(vec4 x, vec4 y);"
-
- "bvec2 greaterThanEqual(ivec2 x, ivec2 y);"
- "bvec3 greaterThanEqual(ivec3 x, ivec3 y);"
- "bvec4 greaterThanEqual(ivec4 x, ivec4 y);"
-
- "bvec2 equal(vec2 x, vec2 y);"
- "bvec3 equal(vec3 x, vec3 y);"
- "bvec4 equal(vec4 x, vec4 y);"
-
- "bvec2 equal(ivec2 x, ivec2 y);"
- "bvec3 equal(ivec3 x, ivec3 y);"
- "bvec4 equal(ivec4 x, ivec4 y);"
-
- "bvec2 equal(bvec2 x, bvec2 y);"
- "bvec3 equal(bvec3 x, bvec3 y);"
- "bvec4 equal(bvec4 x, bvec4 y);"
-
- "bvec2 notEqual(vec2 x, vec2 y);"
- "bvec3 notEqual(vec3 x, vec3 y);"
- "bvec4 notEqual(vec4 x, vec4 y);"
-
- "bvec2 notEqual(ivec2 x, ivec2 y);"
- "bvec3 notEqual(ivec3 x, ivec3 y);"
- "bvec4 notEqual(ivec4 x, ivec4 y);"
-
- "bvec2 notEqual(bvec2 x, bvec2 y);"
- "bvec3 notEqual(bvec3 x, bvec3 y);"
- "bvec4 notEqual(bvec4 x, bvec4 y);"
-
- "bool any(bvec2 x);"
- "bool any(bvec3 x);"
- "bool any(bvec4 x);"
-
- "bool all(bvec2 x);"
- "bool all(bvec3 x);"
- "bool all(bvec4 x);"
-
- "bvec2 not(bvec2 x);"
- "bvec3 not(bvec3 x);"
- "bvec4 not(bvec4 x);"
-
- "\n");
-
- if (version >= 130) {
- commonBuiltins.append(
- "bvec2 lessThan(uvec2 x, uvec2 y);"
- "bvec3 lessThan(uvec3 x, uvec3 y);"
- "bvec4 lessThan(uvec4 x, uvec4 y);"
-
- "bvec2 lessThanEqual(uvec2 x, uvec2 y);"
- "bvec3 lessThanEqual(uvec3 x, uvec3 y);"
- "bvec4 lessThanEqual(uvec4 x, uvec4 y);"
-
- "bvec2 greaterThan(uvec2 x, uvec2 y);"
- "bvec3 greaterThan(uvec3 x, uvec3 y);"
- "bvec4 greaterThan(uvec4 x, uvec4 y);"
-
- "bvec2 greaterThanEqual(uvec2 x, uvec2 y);"
- "bvec3 greaterThanEqual(uvec3 x, uvec3 y);"
- "bvec4 greaterThanEqual(uvec4 x, uvec4 y);"
-
- "bvec2 equal(uvec2 x, uvec2 y);"
- "bvec3 equal(uvec3 x, uvec3 y);"
- "bvec4 equal(uvec4 x, uvec4 y);"
-
- "bvec2 notEqual(uvec2 x, uvec2 y);"
- "bvec3 notEqual(uvec3 x, uvec3 y);"
- "bvec4 notEqual(uvec4 x, uvec4 y);"
-
- "\n");
- }
-
+#ifndef GLSLANG_WEB
//
// Original-style texture functions existing in all stages.
// (Per-stage functions below.)
@@ -1884,58 +1801,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bool subgroupAll(bool);\n"
"bool subgroupAny(bool);\n"
-
- "bool subgroupAllEqual(float);\n"
- "bool subgroupAllEqual(vec2);\n"
- "bool subgroupAllEqual(vec3);\n"
- "bool subgroupAllEqual(vec4);\n"
- "bool subgroupAllEqual(int);\n"
- "bool subgroupAllEqual(ivec2);\n"
- "bool subgroupAllEqual(ivec3);\n"
- "bool subgroupAllEqual(ivec4);\n"
- "bool subgroupAllEqual(uint);\n"
- "bool subgroupAllEqual(uvec2);\n"
- "bool subgroupAllEqual(uvec3);\n"
- "bool subgroupAllEqual(uvec4);\n"
- "bool subgroupAllEqual(bool);\n"
- "bool subgroupAllEqual(bvec2);\n"
- "bool subgroupAllEqual(bvec3);\n"
- "bool subgroupAllEqual(bvec4);\n"
-
- "float subgroupBroadcast(float, uint);\n"
- "vec2 subgroupBroadcast(vec2, uint);\n"
- "vec3 subgroupBroadcast(vec3, uint);\n"
- "vec4 subgroupBroadcast(vec4, uint);\n"
- "int subgroupBroadcast(int, uint);\n"
- "ivec2 subgroupBroadcast(ivec2, uint);\n"
- "ivec3 subgroupBroadcast(ivec3, uint);\n"
- "ivec4 subgroupBroadcast(ivec4, uint);\n"
- "uint subgroupBroadcast(uint, uint);\n"
- "uvec2 subgroupBroadcast(uvec2, uint);\n"
- "uvec3 subgroupBroadcast(uvec3, uint);\n"
- "uvec4 subgroupBroadcast(uvec4, uint);\n"
- "bool subgroupBroadcast(bool, uint);\n"
- "bvec2 subgroupBroadcast(bvec2, uint);\n"
- "bvec3 subgroupBroadcast(bvec3, uint);\n"
- "bvec4 subgroupBroadcast(bvec4, uint);\n"
-
- "float subgroupBroadcastFirst(float);\n"
- "vec2 subgroupBroadcastFirst(vec2);\n"
- "vec3 subgroupBroadcastFirst(vec3);\n"
- "vec4 subgroupBroadcastFirst(vec4);\n"
- "int subgroupBroadcastFirst(int);\n"
- "ivec2 subgroupBroadcastFirst(ivec2);\n"
- "ivec3 subgroupBroadcastFirst(ivec3);\n"
- "ivec4 subgroupBroadcastFirst(ivec4);\n"
- "uint subgroupBroadcastFirst(uint);\n"
- "uvec2 subgroupBroadcastFirst(uvec2);\n"
- "uvec3 subgroupBroadcastFirst(uvec3);\n"
- "uvec4 subgroupBroadcastFirst(uvec4);\n"
- "bool subgroupBroadcastFirst(bool);\n"
- "bvec2 subgroupBroadcastFirst(bvec2);\n"
- "bvec3 subgroupBroadcastFirst(bvec3);\n"
- "bvec4 subgroupBroadcastFirst(bvec4);\n"
-
"uvec4 subgroupBallot(bool);\n"
"bool subgroupInverseBallot(uvec4);\n"
"bool subgroupBallotBitExtract(uvec4, uint);\n"
@@ -1944,1015 +1809,136 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"uint subgroupBallotExclusiveBitCount(uvec4);\n"
"uint subgroupBallotFindLSB(uvec4);\n"
"uint subgroupBallotFindMSB(uvec4);\n"
+ );
- "float subgroupShuffle(float, uint);\n"
- "vec2 subgroupShuffle(vec2, uint);\n"
- "vec3 subgroupShuffle(vec3, uint);\n"
- "vec4 subgroupShuffle(vec4, uint);\n"
- "int subgroupShuffle(int, uint);\n"
- "ivec2 subgroupShuffle(ivec2, uint);\n"
- "ivec3 subgroupShuffle(ivec3, uint);\n"
- "ivec4 subgroupShuffle(ivec4, uint);\n"
- "uint subgroupShuffle(uint, uint);\n"
- "uvec2 subgroupShuffle(uvec2, uint);\n"
- "uvec3 subgroupShuffle(uvec3, uint);\n"
- "uvec4 subgroupShuffle(uvec4, uint);\n"
- "bool subgroupShuffle(bool, uint);\n"
- "bvec2 subgroupShuffle(bvec2, uint);\n"
- "bvec3 subgroupShuffle(bvec3, uint);\n"
- "bvec4 subgroupShuffle(bvec4, uint);\n"
-
- "float subgroupShuffleXor(float, uint);\n"
- "vec2 subgroupShuffleXor(vec2, uint);\n"
- "vec3 subgroupShuffleXor(vec3, uint);\n"
- "vec4 subgroupShuffleXor(vec4, uint);\n"
- "int subgroupShuffleXor(int, uint);\n"
- "ivec2 subgroupShuffleXor(ivec2, uint);\n"
- "ivec3 subgroupShuffleXor(ivec3, uint);\n"
- "ivec4 subgroupShuffleXor(ivec4, uint);\n"
- "uint subgroupShuffleXor(uint, uint);\n"
- "uvec2 subgroupShuffleXor(uvec2, uint);\n"
- "uvec3 subgroupShuffleXor(uvec3, uint);\n"
- "uvec4 subgroupShuffleXor(uvec4, uint);\n"
- "bool subgroupShuffleXor(bool, uint);\n"
- "bvec2 subgroupShuffleXor(bvec2, uint);\n"
- "bvec3 subgroupShuffleXor(bvec3, uint);\n"
- "bvec4 subgroupShuffleXor(bvec4, uint);\n"
-
- "float subgroupShuffleUp(float, uint delta);\n"
- "vec2 subgroupShuffleUp(vec2, uint delta);\n"
- "vec3 subgroupShuffleUp(vec3, uint delta);\n"
- "vec4 subgroupShuffleUp(vec4, uint delta);\n"
- "int subgroupShuffleUp(int, uint delta);\n"
- "ivec2 subgroupShuffleUp(ivec2, uint delta);\n"
- "ivec3 subgroupShuffleUp(ivec3, uint delta);\n"
- "ivec4 subgroupShuffleUp(ivec4, uint delta);\n"
- "uint subgroupShuffleUp(uint, uint delta);\n"
- "uvec2 subgroupShuffleUp(uvec2, uint delta);\n"
- "uvec3 subgroupShuffleUp(uvec3, uint delta);\n"
- "uvec4 subgroupShuffleUp(uvec4, uint delta);\n"
- "bool subgroupShuffleUp(bool, uint delta);\n"
- "bvec2 subgroupShuffleUp(bvec2, uint delta);\n"
- "bvec3 subgroupShuffleUp(bvec3, uint delta);\n"
- "bvec4 subgroupShuffleUp(bvec4, uint delta);\n"
-
- "float subgroupShuffleDown(float, uint delta);\n"
- "vec2 subgroupShuffleDown(vec2, uint delta);\n"
- "vec3 subgroupShuffleDown(vec3, uint delta);\n"
- "vec4 subgroupShuffleDown(vec4, uint delta);\n"
- "int subgroupShuffleDown(int, uint delta);\n"
- "ivec2 subgroupShuffleDown(ivec2, uint delta);\n"
- "ivec3 subgroupShuffleDown(ivec3, uint delta);\n"
- "ivec4 subgroupShuffleDown(ivec4, uint delta);\n"
- "uint subgroupShuffleDown(uint, uint delta);\n"
- "uvec2 subgroupShuffleDown(uvec2, uint delta);\n"
- "uvec3 subgroupShuffleDown(uvec3, uint delta);\n"
- "uvec4 subgroupShuffleDown(uvec4, uint delta);\n"
- "bool subgroupShuffleDown(bool, uint delta);\n"
- "bvec2 subgroupShuffleDown(bvec2, uint delta);\n"
- "bvec3 subgroupShuffleDown(bvec3, uint delta);\n"
- "bvec4 subgroupShuffleDown(bvec4, uint delta);\n"
-
- "float subgroupAdd(float);\n"
- "vec2 subgroupAdd(vec2);\n"
- "vec3 subgroupAdd(vec3);\n"
- "vec4 subgroupAdd(vec4);\n"
- "int subgroupAdd(int);\n"
- "ivec2 subgroupAdd(ivec2);\n"
- "ivec3 subgroupAdd(ivec3);\n"
- "ivec4 subgroupAdd(ivec4);\n"
- "uint subgroupAdd(uint);\n"
- "uvec2 subgroupAdd(uvec2);\n"
- "uvec3 subgroupAdd(uvec3);\n"
- "uvec4 subgroupAdd(uvec4);\n"
-
- "float subgroupMul(float);\n"
- "vec2 subgroupMul(vec2);\n"
- "vec3 subgroupMul(vec3);\n"
- "vec4 subgroupMul(vec4);\n"
- "int subgroupMul(int);\n"
- "ivec2 subgroupMul(ivec2);\n"
- "ivec3 subgroupMul(ivec3);\n"
- "ivec4 subgroupMul(ivec4);\n"
- "uint subgroupMul(uint);\n"
- "uvec2 subgroupMul(uvec2);\n"
- "uvec3 subgroupMul(uvec3);\n"
- "uvec4 subgroupMul(uvec4);\n"
-
- "float subgroupMin(float);\n"
- "vec2 subgroupMin(vec2);\n"
- "vec3 subgroupMin(vec3);\n"
- "vec4 subgroupMin(vec4);\n"
- "int subgroupMin(int);\n"
- "ivec2 subgroupMin(ivec2);\n"
- "ivec3 subgroupMin(ivec3);\n"
- "ivec4 subgroupMin(ivec4);\n"
- "uint subgroupMin(uint);\n"
- "uvec2 subgroupMin(uvec2);\n"
- "uvec3 subgroupMin(uvec3);\n"
- "uvec4 subgroupMin(uvec4);\n"
-
- "float subgroupMax(float);\n"
- "vec2 subgroupMax(vec2);\n"
- "vec3 subgroupMax(vec3);\n"
- "vec4 subgroupMax(vec4);\n"
- "int subgroupMax(int);\n"
- "ivec2 subgroupMax(ivec2);\n"
- "ivec3 subgroupMax(ivec3);\n"
- "ivec4 subgroupMax(ivec4);\n"
- "uint subgroupMax(uint);\n"
- "uvec2 subgroupMax(uvec2);\n"
- "uvec3 subgroupMax(uvec3);\n"
- "uvec4 subgroupMax(uvec4);\n"
-
- "int subgroupAnd(int);\n"
- "ivec2 subgroupAnd(ivec2);\n"
- "ivec3 subgroupAnd(ivec3);\n"
- "ivec4 subgroupAnd(ivec4);\n"
- "uint subgroupAnd(uint);\n"
- "uvec2 subgroupAnd(uvec2);\n"
- "uvec3 subgroupAnd(uvec3);\n"
- "uvec4 subgroupAnd(uvec4);\n"
- "bool subgroupAnd(bool);\n"
- "bvec2 subgroupAnd(bvec2);\n"
- "bvec3 subgroupAnd(bvec3);\n"
- "bvec4 subgroupAnd(bvec4);\n"
-
- "int subgroupOr(int);\n"
- "ivec2 subgroupOr(ivec2);\n"
- "ivec3 subgroupOr(ivec3);\n"
- "ivec4 subgroupOr(ivec4);\n"
- "uint subgroupOr(uint);\n"
- "uvec2 subgroupOr(uvec2);\n"
- "uvec3 subgroupOr(uvec3);\n"
- "uvec4 subgroupOr(uvec4);\n"
- "bool subgroupOr(bool);\n"
- "bvec2 subgroupOr(bvec2);\n"
- "bvec3 subgroupOr(bvec3);\n"
- "bvec4 subgroupOr(bvec4);\n"
-
- "int subgroupXor(int);\n"
- "ivec2 subgroupXor(ivec2);\n"
- "ivec3 subgroupXor(ivec3);\n"
- "ivec4 subgroupXor(ivec4);\n"
- "uint subgroupXor(uint);\n"
- "uvec2 subgroupXor(uvec2);\n"
- "uvec3 subgroupXor(uvec3);\n"
- "uvec4 subgroupXor(uvec4);\n"
- "bool subgroupXor(bool);\n"
- "bvec2 subgroupXor(bvec2);\n"
- "bvec3 subgroupXor(bvec3);\n"
- "bvec4 subgroupXor(bvec4);\n"
-
- "float subgroupInclusiveAdd(float);\n"
- "vec2 subgroupInclusiveAdd(vec2);\n"
- "vec3 subgroupInclusiveAdd(vec3);\n"
- "vec4 subgroupInclusiveAdd(vec4);\n"
- "int subgroupInclusiveAdd(int);\n"
- "ivec2 subgroupInclusiveAdd(ivec2);\n"
- "ivec3 subgroupInclusiveAdd(ivec3);\n"
- "ivec4 subgroupInclusiveAdd(ivec4);\n"
- "uint subgroupInclusiveAdd(uint);\n"
- "uvec2 subgroupInclusiveAdd(uvec2);\n"
- "uvec3 subgroupInclusiveAdd(uvec3);\n"
- "uvec4 subgroupInclusiveAdd(uvec4);\n"
-
- "float subgroupInclusiveMul(float);\n"
- "vec2 subgroupInclusiveMul(vec2);\n"
- "vec3 subgroupInclusiveMul(vec3);\n"
- "vec4 subgroupInclusiveMul(vec4);\n"
- "int subgroupInclusiveMul(int);\n"
- "ivec2 subgroupInclusiveMul(ivec2);\n"
- "ivec3 subgroupInclusiveMul(ivec3);\n"
- "ivec4 subgroupInclusiveMul(ivec4);\n"
- "uint subgroupInclusiveMul(uint);\n"
- "uvec2 subgroupInclusiveMul(uvec2);\n"
- "uvec3 subgroupInclusiveMul(uvec3);\n"
- "uvec4 subgroupInclusiveMul(uvec4);\n"
-
- "float subgroupInclusiveMin(float);\n"
- "vec2 subgroupInclusiveMin(vec2);\n"
- "vec3 subgroupInclusiveMin(vec3);\n"
- "vec4 subgroupInclusiveMin(vec4);\n"
- "int subgroupInclusiveMin(int);\n"
- "ivec2 subgroupInclusiveMin(ivec2);\n"
- "ivec3 subgroupInclusiveMin(ivec3);\n"
- "ivec4 subgroupInclusiveMin(ivec4);\n"
- "uint subgroupInclusiveMin(uint);\n"
- "uvec2 subgroupInclusiveMin(uvec2);\n"
- "uvec3 subgroupInclusiveMin(uvec3);\n"
- "uvec4 subgroupInclusiveMin(uvec4);\n"
-
- "float subgroupInclusiveMax(float);\n"
- "vec2 subgroupInclusiveMax(vec2);\n"
- "vec3 subgroupInclusiveMax(vec3);\n"
- "vec4 subgroupInclusiveMax(vec4);\n"
- "int subgroupInclusiveMax(int);\n"
- "ivec2 subgroupInclusiveMax(ivec2);\n"
- "ivec3 subgroupInclusiveMax(ivec3);\n"
- "ivec4 subgroupInclusiveMax(ivec4);\n"
- "uint subgroupInclusiveMax(uint);\n"
- "uvec2 subgroupInclusiveMax(uvec2);\n"
- "uvec3 subgroupInclusiveMax(uvec3);\n"
- "uvec4 subgroupInclusiveMax(uvec4);\n"
-
- "int subgroupInclusiveAnd(int);\n"
- "ivec2 subgroupInclusiveAnd(ivec2);\n"
- "ivec3 subgroupInclusiveAnd(ivec3);\n"
- "ivec4 subgroupInclusiveAnd(ivec4);\n"
- "uint subgroupInclusiveAnd(uint);\n"
- "uvec2 subgroupInclusiveAnd(uvec2);\n"
- "uvec3 subgroupInclusiveAnd(uvec3);\n"
- "uvec4 subgroupInclusiveAnd(uvec4);\n"
- "bool subgroupInclusiveAnd(bool);\n"
- "bvec2 subgroupInclusiveAnd(bvec2);\n"
- "bvec3 subgroupInclusiveAnd(bvec3);\n"
- "bvec4 subgroupInclusiveAnd(bvec4);\n"
-
- "int subgroupInclusiveOr(int);\n"
- "ivec2 subgroupInclusiveOr(ivec2);\n"
- "ivec3 subgroupInclusiveOr(ivec3);\n"
- "ivec4 subgroupInclusiveOr(ivec4);\n"
- "uint subgroupInclusiveOr(uint);\n"
- "uvec2 subgroupInclusiveOr(uvec2);\n"
- "uvec3 subgroupInclusiveOr(uvec3);\n"
- "uvec4 subgroupInclusiveOr(uvec4);\n"
- "bool subgroupInclusiveOr(bool);\n"
- "bvec2 subgroupInclusiveOr(bvec2);\n"
- "bvec3 subgroupInclusiveOr(bvec3);\n"
- "bvec4 subgroupInclusiveOr(bvec4);\n"
-
- "int subgroupInclusiveXor(int);\n"
- "ivec2 subgroupInclusiveXor(ivec2);\n"
- "ivec3 subgroupInclusiveXor(ivec3);\n"
- "ivec4 subgroupInclusiveXor(ivec4);\n"
- "uint subgroupInclusiveXor(uint);\n"
- "uvec2 subgroupInclusiveXor(uvec2);\n"
- "uvec3 subgroupInclusiveXor(uvec3);\n"
- "uvec4 subgroupInclusiveXor(uvec4);\n"
- "bool subgroupInclusiveXor(bool);\n"
- "bvec2 subgroupInclusiveXor(bvec2);\n"
- "bvec3 subgroupInclusiveXor(bvec3);\n"
- "bvec4 subgroupInclusiveXor(bvec4);\n"
-
- "float subgroupExclusiveAdd(float);\n"
- "vec2 subgroupExclusiveAdd(vec2);\n"
- "vec3 subgroupExclusiveAdd(vec3);\n"
- "vec4 subgroupExclusiveAdd(vec4);\n"
- "int subgroupExclusiveAdd(int);\n"
- "ivec2 subgroupExclusiveAdd(ivec2);\n"
- "ivec3 subgroupExclusiveAdd(ivec3);\n"
- "ivec4 subgroupExclusiveAdd(ivec4);\n"
- "uint subgroupExclusiveAdd(uint);\n"
- "uvec2 subgroupExclusiveAdd(uvec2);\n"
- "uvec3 subgroupExclusiveAdd(uvec3);\n"
- "uvec4 subgroupExclusiveAdd(uvec4);\n"
-
- "float subgroupExclusiveMul(float);\n"
- "vec2 subgroupExclusiveMul(vec2);\n"
- "vec3 subgroupExclusiveMul(vec3);\n"
- "vec4 subgroupExclusiveMul(vec4);\n"
- "int subgroupExclusiveMul(int);\n"
- "ivec2 subgroupExclusiveMul(ivec2);\n"
- "ivec3 subgroupExclusiveMul(ivec3);\n"
- "ivec4 subgroupExclusiveMul(ivec4);\n"
- "uint subgroupExclusiveMul(uint);\n"
- "uvec2 subgroupExclusiveMul(uvec2);\n"
- "uvec3 subgroupExclusiveMul(uvec3);\n"
- "uvec4 subgroupExclusiveMul(uvec4);\n"
-
- "float subgroupExclusiveMin(float);\n"
- "vec2 subgroupExclusiveMin(vec2);\n"
- "vec3 subgroupExclusiveMin(vec3);\n"
- "vec4 subgroupExclusiveMin(vec4);\n"
- "int subgroupExclusiveMin(int);\n"
- "ivec2 subgroupExclusiveMin(ivec2);\n"
- "ivec3 subgroupExclusiveMin(ivec3);\n"
- "ivec4 subgroupExclusiveMin(ivec4);\n"
- "uint subgroupExclusiveMin(uint);\n"
- "uvec2 subgroupExclusiveMin(uvec2);\n"
- "uvec3 subgroupExclusiveMin(uvec3);\n"
- "uvec4 subgroupExclusiveMin(uvec4);\n"
-
- "float subgroupExclusiveMax(float);\n"
- "vec2 subgroupExclusiveMax(vec2);\n"
- "vec3 subgroupExclusiveMax(vec3);\n"
- "vec4 subgroupExclusiveMax(vec4);\n"
- "int subgroupExclusiveMax(int);\n"
- "ivec2 subgroupExclusiveMax(ivec2);\n"
- "ivec3 subgroupExclusiveMax(ivec3);\n"
- "ivec4 subgroupExclusiveMax(ivec4);\n"
- "uint subgroupExclusiveMax(uint);\n"
- "uvec2 subgroupExclusiveMax(uvec2);\n"
- "uvec3 subgroupExclusiveMax(uvec3);\n"
- "uvec4 subgroupExclusiveMax(uvec4);\n"
-
- "int subgroupExclusiveAnd(int);\n"
- "ivec2 subgroupExclusiveAnd(ivec2);\n"
- "ivec3 subgroupExclusiveAnd(ivec3);\n"
- "ivec4 subgroupExclusiveAnd(ivec4);\n"
- "uint subgroupExclusiveAnd(uint);\n"
- "uvec2 subgroupExclusiveAnd(uvec2);\n"
- "uvec3 subgroupExclusiveAnd(uvec3);\n"
- "uvec4 subgroupExclusiveAnd(uvec4);\n"
- "bool subgroupExclusiveAnd(bool);\n"
- "bvec2 subgroupExclusiveAnd(bvec2);\n"
- "bvec3 subgroupExclusiveAnd(bvec3);\n"
- "bvec4 subgroupExclusiveAnd(bvec4);\n"
-
- "int subgroupExclusiveOr(int);\n"
- "ivec2 subgroupExclusiveOr(ivec2);\n"
- "ivec3 subgroupExclusiveOr(ivec3);\n"
- "ivec4 subgroupExclusiveOr(ivec4);\n"
- "uint subgroupExclusiveOr(uint);\n"
- "uvec2 subgroupExclusiveOr(uvec2);\n"
- "uvec3 subgroupExclusiveOr(uvec3);\n"
- "uvec4 subgroupExclusiveOr(uvec4);\n"
- "bool subgroupExclusiveOr(bool);\n"
- "bvec2 subgroupExclusiveOr(bvec2);\n"
- "bvec3 subgroupExclusiveOr(bvec3);\n"
- "bvec4 subgroupExclusiveOr(bvec4);\n"
-
- "int subgroupExclusiveXor(int);\n"
- "ivec2 subgroupExclusiveXor(ivec2);\n"
- "ivec3 subgroupExclusiveXor(ivec3);\n"
- "ivec4 subgroupExclusiveXor(ivec4);\n"
- "uint subgroupExclusiveXor(uint);\n"
- "uvec2 subgroupExclusiveXor(uvec2);\n"
- "uvec3 subgroupExclusiveXor(uvec3);\n"
- "uvec4 subgroupExclusiveXor(uvec4);\n"
- "bool subgroupExclusiveXor(bool);\n"
- "bvec2 subgroupExclusiveXor(bvec2);\n"
- "bvec3 subgroupExclusiveXor(bvec3);\n"
- "bvec4 subgroupExclusiveXor(bvec4);\n"
-
- "float subgroupClusteredAdd(float, uint);\n"
- "vec2 subgroupClusteredAdd(vec2, uint);\n"
- "vec3 subgroupClusteredAdd(vec3, uint);\n"
- "vec4 subgroupClusteredAdd(vec4, uint);\n"
- "int subgroupClusteredAdd(int, uint);\n"
- "ivec2 subgroupClusteredAdd(ivec2, uint);\n"
- "ivec3 subgroupClusteredAdd(ivec3, uint);\n"
- "ivec4 subgroupClusteredAdd(ivec4, uint);\n"
- "uint subgroupClusteredAdd(uint, uint);\n"
- "uvec2 subgroupClusteredAdd(uvec2, uint);\n"
- "uvec3 subgroupClusteredAdd(uvec3, uint);\n"
- "uvec4 subgroupClusteredAdd(uvec4, uint);\n"
-
- "float subgroupClusteredMul(float, uint);\n"
- "vec2 subgroupClusteredMul(vec2, uint);\n"
- "vec3 subgroupClusteredMul(vec3, uint);\n"
- "vec4 subgroupClusteredMul(vec4, uint);\n"
- "int subgroupClusteredMul(int, uint);\n"
- "ivec2 subgroupClusteredMul(ivec2, uint);\n"
- "ivec3 subgroupClusteredMul(ivec3, uint);\n"
- "ivec4 subgroupClusteredMul(ivec4, uint);\n"
- "uint subgroupClusteredMul(uint, uint);\n"
- "uvec2 subgroupClusteredMul(uvec2, uint);\n"
- "uvec3 subgroupClusteredMul(uvec3, uint);\n"
- "uvec4 subgroupClusteredMul(uvec4, uint);\n"
-
- "float subgroupClusteredMin(float, uint);\n"
- "vec2 subgroupClusteredMin(vec2, uint);\n"
- "vec3 subgroupClusteredMin(vec3, uint);\n"
- "vec4 subgroupClusteredMin(vec4, uint);\n"
- "int subgroupClusteredMin(int, uint);\n"
- "ivec2 subgroupClusteredMin(ivec2, uint);\n"
- "ivec3 subgroupClusteredMin(ivec3, uint);\n"
- "ivec4 subgroupClusteredMin(ivec4, uint);\n"
- "uint subgroupClusteredMin(uint, uint);\n"
- "uvec2 subgroupClusteredMin(uvec2, uint);\n"
- "uvec3 subgroupClusteredMin(uvec3, uint);\n"
- "uvec4 subgroupClusteredMin(uvec4, uint);\n"
-
- "float subgroupClusteredMax(float, uint);\n"
- "vec2 subgroupClusteredMax(vec2, uint);\n"
- "vec3 subgroupClusteredMax(vec3, uint);\n"
- "vec4 subgroupClusteredMax(vec4, uint);\n"
- "int subgroupClusteredMax(int, uint);\n"
- "ivec2 subgroupClusteredMax(ivec2, uint);\n"
- "ivec3 subgroupClusteredMax(ivec3, uint);\n"
- "ivec4 subgroupClusteredMax(ivec4, uint);\n"
- "uint subgroupClusteredMax(uint, uint);\n"
- "uvec2 subgroupClusteredMax(uvec2, uint);\n"
- "uvec3 subgroupClusteredMax(uvec3, uint);\n"
- "uvec4 subgroupClusteredMax(uvec4, uint);\n"
-
- "int subgroupClusteredAnd(int, uint);\n"
- "ivec2 subgroupClusteredAnd(ivec2, uint);\n"
- "ivec3 subgroupClusteredAnd(ivec3, uint);\n"
- "ivec4 subgroupClusteredAnd(ivec4, uint);\n"
- "uint subgroupClusteredAnd(uint, uint);\n"
- "uvec2 subgroupClusteredAnd(uvec2, uint);\n"
- "uvec3 subgroupClusteredAnd(uvec3, uint);\n"
- "uvec4 subgroupClusteredAnd(uvec4, uint);\n"
- "bool subgroupClusteredAnd(bool, uint);\n"
- "bvec2 subgroupClusteredAnd(bvec2, uint);\n"
- "bvec3 subgroupClusteredAnd(bvec3, uint);\n"
- "bvec4 subgroupClusteredAnd(bvec4, uint);\n"
-
- "int subgroupClusteredOr(int, uint);\n"
- "ivec2 subgroupClusteredOr(ivec2, uint);\n"
- "ivec3 subgroupClusteredOr(ivec3, uint);\n"
- "ivec4 subgroupClusteredOr(ivec4, uint);\n"
- "uint subgroupClusteredOr(uint, uint);\n"
- "uvec2 subgroupClusteredOr(uvec2, uint);\n"
- "uvec3 subgroupClusteredOr(uvec3, uint);\n"
- "uvec4 subgroupClusteredOr(uvec4, uint);\n"
- "bool subgroupClusteredOr(bool, uint);\n"
- "bvec2 subgroupClusteredOr(bvec2, uint);\n"
- "bvec3 subgroupClusteredOr(bvec3, uint);\n"
- "bvec4 subgroupClusteredOr(bvec4, uint);\n"
-
- "int subgroupClusteredXor(int, uint);\n"
- "ivec2 subgroupClusteredXor(ivec2, uint);\n"
- "ivec3 subgroupClusteredXor(ivec3, uint);\n"
- "ivec4 subgroupClusteredXor(ivec4, uint);\n"
- "uint subgroupClusteredXor(uint, uint);\n"
- "uvec2 subgroupClusteredXor(uvec2, uint);\n"
- "uvec3 subgroupClusteredXor(uvec3, uint);\n"
- "uvec4 subgroupClusteredXor(uvec4, uint);\n"
- "bool subgroupClusteredXor(bool, uint);\n"
- "bvec2 subgroupClusteredXor(bvec2, uint);\n"
- "bvec3 subgroupClusteredXor(bvec3, uint);\n"
- "bvec4 subgroupClusteredXor(bvec4, uint);\n"
-
- "float subgroupQuadBroadcast(float, uint);\n"
- "vec2 subgroupQuadBroadcast(vec2, uint);\n"
- "vec3 subgroupQuadBroadcast(vec3, uint);\n"
- "vec4 subgroupQuadBroadcast(vec4, uint);\n"
- "int subgroupQuadBroadcast(int, uint);\n"
- "ivec2 subgroupQuadBroadcast(ivec2, uint);\n"
- "ivec3 subgroupQuadBroadcast(ivec3, uint);\n"
- "ivec4 subgroupQuadBroadcast(ivec4, uint);\n"
- "uint subgroupQuadBroadcast(uint, uint);\n"
- "uvec2 subgroupQuadBroadcast(uvec2, uint);\n"
- "uvec3 subgroupQuadBroadcast(uvec3, uint);\n"
- "uvec4 subgroupQuadBroadcast(uvec4, uint);\n"
- "bool subgroupQuadBroadcast(bool, uint);\n"
- "bvec2 subgroupQuadBroadcast(bvec2, uint);\n"
- "bvec3 subgroupQuadBroadcast(bvec3, uint);\n"
- "bvec4 subgroupQuadBroadcast(bvec4, uint);\n"
-
- "float subgroupQuadSwapHorizontal(float);\n"
- "vec2 subgroupQuadSwapHorizontal(vec2);\n"
- "vec3 subgroupQuadSwapHorizontal(vec3);\n"
- "vec4 subgroupQuadSwapHorizontal(vec4);\n"
- "int subgroupQuadSwapHorizontal(int);\n"
- "ivec2 subgroupQuadSwapHorizontal(ivec2);\n"
- "ivec3 subgroupQuadSwapHorizontal(ivec3);\n"
- "ivec4 subgroupQuadSwapHorizontal(ivec4);\n"
- "uint subgroupQuadSwapHorizontal(uint);\n"
- "uvec2 subgroupQuadSwapHorizontal(uvec2);\n"
- "uvec3 subgroupQuadSwapHorizontal(uvec3);\n"
- "uvec4 subgroupQuadSwapHorizontal(uvec4);\n"
- "bool subgroupQuadSwapHorizontal(bool);\n"
- "bvec2 subgroupQuadSwapHorizontal(bvec2);\n"
- "bvec3 subgroupQuadSwapHorizontal(bvec3);\n"
- "bvec4 subgroupQuadSwapHorizontal(bvec4);\n"
-
- "float subgroupQuadSwapVertical(float);\n"
- "vec2 subgroupQuadSwapVertical(vec2);\n"
- "vec3 subgroupQuadSwapVertical(vec3);\n"
- "vec4 subgroupQuadSwapVertical(vec4);\n"
- "int subgroupQuadSwapVertical(int);\n"
- "ivec2 subgroupQuadSwapVertical(ivec2);\n"
- "ivec3 subgroupQuadSwapVertical(ivec3);\n"
- "ivec4 subgroupQuadSwapVertical(ivec4);\n"
- "uint subgroupQuadSwapVertical(uint);\n"
- "uvec2 subgroupQuadSwapVertical(uvec2);\n"
- "uvec3 subgroupQuadSwapVertical(uvec3);\n"
- "uvec4 subgroupQuadSwapVertical(uvec4);\n"
- "bool subgroupQuadSwapVertical(bool);\n"
- "bvec2 subgroupQuadSwapVertical(bvec2);\n"
- "bvec3 subgroupQuadSwapVertical(bvec3);\n"
- "bvec4 subgroupQuadSwapVertical(bvec4);\n"
-
- "float subgroupQuadSwapDiagonal(float);\n"
- "vec2 subgroupQuadSwapDiagonal(vec2);\n"
- "vec3 subgroupQuadSwapDiagonal(vec3);\n"
- "vec4 subgroupQuadSwapDiagonal(vec4);\n"
- "int subgroupQuadSwapDiagonal(int);\n"
- "ivec2 subgroupQuadSwapDiagonal(ivec2);\n"
- "ivec3 subgroupQuadSwapDiagonal(ivec3);\n"
- "ivec4 subgroupQuadSwapDiagonal(ivec4);\n"
- "uint subgroupQuadSwapDiagonal(uint);\n"
- "uvec2 subgroupQuadSwapDiagonal(uvec2);\n"
- "uvec3 subgroupQuadSwapDiagonal(uvec3);\n"
- "uvec4 subgroupQuadSwapDiagonal(uvec4);\n"
- "bool subgroupQuadSwapDiagonal(bool);\n"
- "bvec2 subgroupQuadSwapDiagonal(bvec2);\n"
- "bvec3 subgroupQuadSwapDiagonal(bvec3);\n"
- "bvec4 subgroupQuadSwapDiagonal(bvec4);\n"
-
-#ifdef NV_EXTENSIONS
- "uvec4 subgroupPartitionNV(float);\n"
- "uvec4 subgroupPartitionNV(vec2);\n"
- "uvec4 subgroupPartitionNV(vec3);\n"
- "uvec4 subgroupPartitionNV(vec4);\n"
- "uvec4 subgroupPartitionNV(int);\n"
- "uvec4 subgroupPartitionNV(ivec2);\n"
- "uvec4 subgroupPartitionNV(ivec3);\n"
- "uvec4 subgroupPartitionNV(ivec4);\n"
- "uvec4 subgroupPartitionNV(uint);\n"
- "uvec4 subgroupPartitionNV(uvec2);\n"
- "uvec4 subgroupPartitionNV(uvec3);\n"
- "uvec4 subgroupPartitionNV(uvec4);\n"
- "uvec4 subgroupPartitionNV(bool);\n"
- "uvec4 subgroupPartitionNV(bvec2);\n"
- "uvec4 subgroupPartitionNV(bvec3);\n"
- "uvec4 subgroupPartitionNV(bvec4);\n"
-
- "float subgroupPartitionedAddNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedAddNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedAddNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedAddNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedAddNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedAddNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedAddNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedAddNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedAddNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedAddNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedAddNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedAddNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedMulNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedMulNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedMulNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedMulNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedMulNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedMulNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedMulNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedMulNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedMulNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedMulNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedMulNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedMulNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedMinNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedMinNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedMinNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedMinNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedMinNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedMinNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedMinNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedMinNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedMinNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedMinNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedMinNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedMinNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedMaxNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedMaxNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedMaxNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedMaxNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedMaxNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedMaxNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedMaxNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedMaxNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedMaxNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedMaxNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedMaxNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedMaxNV(uvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedAndNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedAndNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedAndNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedAndNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedAndNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedAndNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedAndNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedAndNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedAndNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedAndNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedAndNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedAndNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedOrNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedOrNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedOrNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedOrNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedOrNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedOrNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedOrNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedOrNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedOrNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedOrNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedOrNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedOrNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedXorNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedXorNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedXorNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedXorNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedXorNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedXorNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedXorNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedXorNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedXorNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedXorNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedXorNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedXorNV(bvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedInclusiveAddNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedInclusiveAddNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedInclusiveAddNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedInclusiveAddNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedInclusiveAddNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveAddNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveAddNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveAddNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveAddNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveAddNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveAddNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveAddNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedInclusiveMulNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedInclusiveMulNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedInclusiveMulNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedInclusiveMulNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedInclusiveMulNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveMulNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveMulNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveMulNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveMulNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveMulNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveMulNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveMulNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedInclusiveMinNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedInclusiveMinNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedInclusiveMinNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedInclusiveMinNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedInclusiveMinNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveMinNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveMinNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveMinNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveMinNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveMinNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveMinNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveMinNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedInclusiveMaxNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedInclusiveMaxNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedInclusiveMaxNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedInclusiveMaxNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedInclusiveMaxNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveMaxNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveMaxNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveMaxNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveMaxNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveMaxNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveMaxNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveMaxNV(uvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedInclusiveAndNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveAndNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveAndNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveAndNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveAndNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveAndNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveAndNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveAndNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedInclusiveAndNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedInclusiveAndNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedInclusiveAndNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedInclusiveAndNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedInclusiveOrNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveOrNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveOrNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveOrNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveOrNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveOrNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveOrNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveOrNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedInclusiveOrNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedInclusiveOrNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedInclusiveOrNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedInclusiveOrNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedInclusiveXorNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedInclusiveXorNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedInclusiveXorNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedInclusiveXorNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedInclusiveXorNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedInclusiveXorNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedInclusiveXorNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedInclusiveXorNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedInclusiveXorNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedInclusiveXorNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedInclusiveXorNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedInclusiveXorNV(bvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedExclusiveAddNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedExclusiveAddNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedExclusiveAddNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedExclusiveAddNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedExclusiveAddNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveAddNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveAddNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveAddNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveAddNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveAddNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveAddNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveAddNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedExclusiveMulNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedExclusiveMulNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedExclusiveMulNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedExclusiveMulNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedExclusiveMulNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveMulNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveMulNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveMulNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveMulNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveMulNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveMulNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveMulNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedExclusiveMinNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedExclusiveMinNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedExclusiveMinNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedExclusiveMinNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedExclusiveMinNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveMinNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveMinNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveMinNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveMinNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveMinNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveMinNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveMinNV(uvec4, uvec4 ballot);\n"
-
- "float subgroupPartitionedExclusiveMaxNV(float, uvec4 ballot);\n"
- "vec2 subgroupPartitionedExclusiveMaxNV(vec2, uvec4 ballot);\n"
- "vec3 subgroupPartitionedExclusiveMaxNV(vec3, uvec4 ballot);\n"
- "vec4 subgroupPartitionedExclusiveMaxNV(vec4, uvec4 ballot);\n"
- "int subgroupPartitionedExclusiveMaxNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveMaxNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveMaxNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveMaxNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveMaxNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveMaxNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveMaxNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveMaxNV(uvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedExclusiveAndNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveAndNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveAndNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveAndNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveAndNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveAndNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveAndNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveAndNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedExclusiveAndNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedExclusiveAndNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedExclusiveAndNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedExclusiveAndNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedExclusiveOrNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveOrNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveOrNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveOrNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveOrNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveOrNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveOrNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveOrNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedExclusiveOrNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedExclusiveOrNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedExclusiveOrNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedExclusiveOrNV(bvec4, uvec4 ballot);\n"
-
- "int subgroupPartitionedExclusiveXorNV(int, uvec4 ballot);\n"
- "ivec2 subgroupPartitionedExclusiveXorNV(ivec2, uvec4 ballot);\n"
- "ivec3 subgroupPartitionedExclusiveXorNV(ivec3, uvec4 ballot);\n"
- "ivec4 subgroupPartitionedExclusiveXorNV(ivec4, uvec4 ballot);\n"
- "uint subgroupPartitionedExclusiveXorNV(uint, uvec4 ballot);\n"
- "uvec2 subgroupPartitionedExclusiveXorNV(uvec2, uvec4 ballot);\n"
- "uvec3 subgroupPartitionedExclusiveXorNV(uvec3, uvec4 ballot);\n"
- "uvec4 subgroupPartitionedExclusiveXorNV(uvec4, uvec4 ballot);\n"
- "bool subgroupPartitionedExclusiveXorNV(bool, uvec4 ballot);\n"
- "bvec2 subgroupPartitionedExclusiveXorNV(bvec2, uvec4 ballot);\n"
- "bvec3 subgroupPartitionedExclusiveXorNV(bvec3, uvec4 ballot);\n"
- "bvec4 subgroupPartitionedExclusiveXorNV(bvec4, uvec4 ballot);\n"
-#endif
-
- "\n");
-
- if (profile != EEsProfile && version >= 400) {
- commonBuiltins.append(
- "bool subgroupAllEqual(double);\n"
- "bool subgroupAllEqual(dvec2);\n"
- "bool subgroupAllEqual(dvec3);\n"
- "bool subgroupAllEqual(dvec4);\n"
-
- "double subgroupBroadcast(double, uint);\n"
- "dvec2 subgroupBroadcast(dvec2, uint);\n"
- "dvec3 subgroupBroadcast(dvec3, uint);\n"
- "dvec4 subgroupBroadcast(dvec4, uint);\n"
-
- "double subgroupBroadcastFirst(double);\n"
- "dvec2 subgroupBroadcastFirst(dvec2);\n"
- "dvec3 subgroupBroadcastFirst(dvec3);\n"
- "dvec4 subgroupBroadcastFirst(dvec4);\n"
-
- "double subgroupShuffle(double, uint);\n"
- "dvec2 subgroupShuffle(dvec2, uint);\n"
- "dvec3 subgroupShuffle(dvec3, uint);\n"
- "dvec4 subgroupShuffle(dvec4, uint);\n"
-
- "double subgroupShuffleXor(double, uint);\n"
- "dvec2 subgroupShuffleXor(dvec2, uint);\n"
- "dvec3 subgroupShuffleXor(dvec3, uint);\n"
- "dvec4 subgroupShuffleXor(dvec4, uint);\n"
-
- "double subgroupShuffleUp(double, uint delta);\n"
- "dvec2 subgroupShuffleUp(dvec2, uint delta);\n"
- "dvec3 subgroupShuffleUp(dvec3, uint delta);\n"
- "dvec4 subgroupShuffleUp(dvec4, uint delta);\n"
-
- "double subgroupShuffleDown(double, uint delta);\n"
- "dvec2 subgroupShuffleDown(dvec2, uint delta);\n"
- "dvec3 subgroupShuffleDown(dvec3, uint delta);\n"
- "dvec4 subgroupShuffleDown(dvec4, uint delta);\n"
-
- "double subgroupAdd(double);\n"
- "dvec2 subgroupAdd(dvec2);\n"
- "dvec3 subgroupAdd(dvec3);\n"
- "dvec4 subgroupAdd(dvec4);\n"
-
- "double subgroupMul(double);\n"
- "dvec2 subgroupMul(dvec2);\n"
- "dvec3 subgroupMul(dvec3);\n"
- "dvec4 subgroupMul(dvec4);\n"
-
- "double subgroupMin(double);\n"
- "dvec2 subgroupMin(dvec2);\n"
- "dvec3 subgroupMin(dvec3);\n"
- "dvec4 subgroupMin(dvec4);\n"
-
- "double subgroupMax(double);\n"
- "dvec2 subgroupMax(dvec2);\n"
- "dvec3 subgroupMax(dvec3);\n"
- "dvec4 subgroupMax(dvec4);\n"
-
- "double subgroupInclusiveAdd(double);\n"
- "dvec2 subgroupInclusiveAdd(dvec2);\n"
- "dvec3 subgroupInclusiveAdd(dvec3);\n"
- "dvec4 subgroupInclusiveAdd(dvec4);\n"
-
- "double subgroupInclusiveMul(double);\n"
- "dvec2 subgroupInclusiveMul(dvec2);\n"
- "dvec3 subgroupInclusiveMul(dvec3);\n"
- "dvec4 subgroupInclusiveMul(dvec4);\n"
-
- "double subgroupInclusiveMin(double);\n"
- "dvec2 subgroupInclusiveMin(dvec2);\n"
- "dvec3 subgroupInclusiveMin(dvec3);\n"
- "dvec4 subgroupInclusiveMin(dvec4);\n"
-
- "double subgroupInclusiveMax(double);\n"
- "dvec2 subgroupInclusiveMax(dvec2);\n"
- "dvec3 subgroupInclusiveMax(dvec3);\n"
- "dvec4 subgroupInclusiveMax(dvec4);\n"
-
- "double subgroupExclusiveAdd(double);\n"
- "dvec2 subgroupExclusiveAdd(dvec2);\n"
- "dvec3 subgroupExclusiveAdd(dvec3);\n"
- "dvec4 subgroupExclusiveAdd(dvec4);\n"
-
- "double subgroupExclusiveMul(double);\n"
- "dvec2 subgroupExclusiveMul(dvec2);\n"
- "dvec3 subgroupExclusiveMul(dvec3);\n"
- "dvec4 subgroupExclusiveMul(dvec4);\n"
-
- "double subgroupExclusiveMin(double);\n"
- "dvec2 subgroupExclusiveMin(dvec2);\n"
- "dvec3 subgroupExclusiveMin(dvec3);\n"
- "dvec4 subgroupExclusiveMin(dvec4);\n"
-
- "double subgroupExclusiveMax(double);\n"
- "dvec2 subgroupExclusiveMax(dvec2);\n"
- "dvec3 subgroupExclusiveMax(dvec3);\n"
- "dvec4 subgroupExclusiveMax(dvec4);\n"
-
- "double subgroupClusteredAdd(double, uint);\n"
- "dvec2 subgroupClusteredAdd(dvec2, uint);\n"
- "dvec3 subgroupClusteredAdd(dvec3, uint);\n"
- "dvec4 subgroupClusteredAdd(dvec4, uint);\n"
-
- "double subgroupClusteredMul(double, uint);\n"
- "dvec2 subgroupClusteredMul(dvec2, uint);\n"
- "dvec3 subgroupClusteredMul(dvec3, uint);\n"
- "dvec4 subgroupClusteredMul(dvec4, uint);\n"
-
- "double subgroupClusteredMin(double, uint);\n"
- "dvec2 subgroupClusteredMin(dvec2, uint);\n"
- "dvec3 subgroupClusteredMin(dvec3, uint);\n"
- "dvec4 subgroupClusteredMin(dvec4, uint);\n"
-
- "double subgroupClusteredMax(double, uint);\n"
- "dvec2 subgroupClusteredMax(dvec2, uint);\n"
- "dvec3 subgroupClusteredMax(dvec3, uint);\n"
- "dvec4 subgroupClusteredMax(dvec4, uint);\n"
-
- "double subgroupQuadBroadcast(double, uint);\n"
- "dvec2 subgroupQuadBroadcast(dvec2, uint);\n"
- "dvec3 subgroupQuadBroadcast(dvec3, uint);\n"
- "dvec4 subgroupQuadBroadcast(dvec4, uint);\n"
-
- "double subgroupQuadSwapHorizontal(double);\n"
- "dvec2 subgroupQuadSwapHorizontal(dvec2);\n"
- "dvec3 subgroupQuadSwapHorizontal(dvec3);\n"
- "dvec4 subgroupQuadSwapHorizontal(dvec4);\n"
-
- "double subgroupQuadSwapVertical(double);\n"
- "dvec2 subgroupQuadSwapVertical(dvec2);\n"
- "dvec3 subgroupQuadSwapVertical(dvec3);\n"
- "dvec4 subgroupQuadSwapVertical(dvec4);\n"
-
- "double subgroupQuadSwapDiagonal(double);\n"
- "dvec2 subgroupQuadSwapDiagonal(dvec2);\n"
- "dvec3 subgroupQuadSwapDiagonal(dvec3);\n"
- "dvec4 subgroupQuadSwapDiagonal(dvec4);\n"
-
-
-#ifdef NV_EXTENSIONS
- "uvec4 subgroupPartitionNV(double);\n"
- "uvec4 subgroupPartitionNV(dvec2);\n"
- "uvec4 subgroupPartitionNV(dvec3);\n"
- "uvec4 subgroupPartitionNV(dvec4);\n"
-
- "double subgroupPartitionedAddNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedAddNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedAddNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedAddNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedMulNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedMulNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedMulNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedMulNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedMinNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedMinNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedMinNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedMinNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedMaxNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedMaxNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedMaxNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedMaxNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedInclusiveAddNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedInclusiveAddNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedInclusiveAddNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedInclusiveAddNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedInclusiveMulNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedInclusiveMulNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedInclusiveMulNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedInclusiveMulNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedInclusiveMinNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedInclusiveMinNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedInclusiveMinNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedInclusiveMinNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedInclusiveMaxNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedInclusiveMaxNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedInclusiveMaxNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedInclusiveMaxNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedExclusiveAddNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedExclusiveAddNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedExclusiveAddNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedExclusiveAddNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedExclusiveMulNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedExclusiveMulNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedExclusiveMulNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedExclusiveMulNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedExclusiveMinNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedExclusiveMinNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedExclusiveMinNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedExclusiveMinNV(dvec4, uvec4 ballot);\n"
-
- "double subgroupPartitionedExclusiveMaxNV(double, uvec4 ballot);\n"
- "dvec2 subgroupPartitionedExclusiveMaxNV(dvec2, uvec4 ballot);\n"
- "dvec3 subgroupPartitionedExclusiveMaxNV(dvec3, uvec4 ballot);\n"
- "dvec4 subgroupPartitionedExclusiveMaxNV(dvec4, uvec4 ballot);\n"
-#endif
-
- "\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 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"
);
-#ifdef NV_EXTENSIONS
stageBuiltins[EShLangMeshNV].append(
"void subgroupMemoryBarrierShared();"
"\n"
@@ -2961,7 +1947,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void subgroupMemoryBarrierShared();"
"\n"
);
-#endif
}
if (profile != EEsProfile && version >= 460) {
@@ -2973,7 +1958,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#ifdef AMD_EXTENSIONS
// GL_AMD_shader_ballot
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append(
@@ -3838,12 +2822,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
// GL_AMD_gcn_shader
- if (profile != EEsProfile && version >= 450) {
+ if (profile != EEsProfile && version >= 440) {
commonBuiltins.append(
"float cubeFaceIndexAMD(vec3);"
"vec2 cubeFaceCoordAMD(vec3);"
"uint64_t timeAMD();"
+ "in int gl_SIMDGroupSizeAMD;"
"\n");
}
@@ -3869,11 +2854,182 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#endif // AMD_EXTENSIONS
-
+ 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");
+ }
-#ifdef NV_EXTENSIONS
- if ((profile != EEsProfile && version >= 450) ||
+ if ((profile != EEsProfile && version >= 450) ||
(profile == EEsProfile && version >= 320)) {
commonBuiltins.append(
"struct gl_TextureFootprint2DNV {"
@@ -3906,7 +3062,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#endif // NV_EXTENSIONS
// GL_AMD_gpu_shader_half_float/Explicit types
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append(
@@ -4791,7 +3946,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
//
// Geometric Functions.
//
- if (IncludeLegacy(version, profile, spvVersion))
+ if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
stageBuiltins[EShLangVertex].append("vec4 ftransform();");
//
@@ -4873,6 +4028,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void EndPrimitive();"
"\n");
}
+#endif
//============================================================================
//
@@ -4888,7 +4044,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangCompute].append(
"void barrier();"
);
-#ifdef NV_EXTENSIONS
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
stageBuiltins[EShLangMeshNV].append(
"void barrier();"
@@ -4897,23 +4052,26 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void barrier();"
);
}
-#endif
if ((profile != EEsProfile && version >= 130) || esBarrier)
commonBuiltins.append(
"void memoryBarrier();"
);
if ((profile != EEsProfile && version >= 420) || esBarrier) {
commonBuiltins.append(
- "void memoryBarrierAtomicCounter();"
"void memoryBarrierBuffer();"
- "void memoryBarrierImage();"
);
stageBuiltins[EShLangCompute].append(
"void memoryBarrierShared();"
"void groupMemoryBarrier();"
);
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
+ if ((profile != EEsProfile && version >= 420) || esBarrier) {
+ commonBuiltins.append(
+ "void memoryBarrierAtomicCounter();"
+ "void memoryBarrierImage();"
+ );
+ }
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
stageBuiltins[EShLangMeshNV].append(
"void memoryBarrierShared();"
@@ -4924,7 +4082,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void groupMemoryBarrier();"
);
}
-#endif
commonBuiltins.append("void controlBarrier(int, int, int, int);\n"
"void memoryBarrier(int, int, int);\n");
@@ -4954,6 +4111,60 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void coopMatStoreNV(fcoopmatNV m, volatile coherent 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 int8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
+
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
+
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
+
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
+ "void coopMatStoreNV(ucoopmatNV m, volatile coherent 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"
);
}
@@ -4999,9 +4210,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
- stageBuiltins[EShLangFragment].append(derivatives);
- stageBuiltins[EShLangFragment].append("\n");
-
// GL_ARB_derivative_control
if (profile != EEsProfile && version >= 400) {
stageBuiltins[EShLangFragment].append(derivativeControls);
@@ -5030,7 +4238,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#ifdef AMD_EXTENSIONS
+ 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(
@@ -5081,6 +4296,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\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(
@@ -5094,9 +4319,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#endif
-
-#ifdef NV_EXTENSIONS
// Builtins for GL_NV_ray_tracing
if (profile != EEsProfile && version >= 460) {
@@ -5125,14 +4347,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
//E_SPV_NV_compute_shader_derivatives
-
- stageBuiltins[EShLangCompute].append(derivatives);
- stageBuiltins[EShLangCompute].append(derivativeControls);
- stageBuiltins[EShLangCompute].append("\n");
-
-
+ 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");
@@ -5142,7 +4361,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
stageBuiltins[EShLangMeshNV].append(
"void writePackedPrimitiveIndices4x8NV(uint, uint);"
- "\n");
+ "\n");
}
#endif
@@ -5166,11 +4385,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"highp float diff;" // f - n
);
} else {
+#ifndef GLSLANG_WEB
commonBuiltins.append(
"float near;" // n
"float far;" // f
"float diff;" // f - n
);
+#endif
}
commonBuiltins.append(
@@ -5179,6 +4400,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_WEB
if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
//
// Matrix state. p. 31, 32, 37, 39, 40.
@@ -5296,6 +4518,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#endif
//============================================================================
//
@@ -5325,7 +4548,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
//============================================================================
//
// Define the interface to the mesh/task shader.
@@ -5413,7 +4636,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
}
-#endif
//============================================================================
//
@@ -5547,7 +4769,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
);
}
-#ifdef NV_EXTENSIONS
if (version >= 450)
stageBuiltins[EShLangVertex].append(
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
@@ -5556,8 +4777,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
"out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes
);
-#endif
-
} else {
// ES profile
if (version == 100) {
@@ -5572,15 +4791,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in highp int gl_InstanceID;" // needs qualifier fixed later
);
if (spvVersion.vulkan > 0)
+#endif
stageBuiltins[EShLangVertex].append(
"in highp int gl_VertexIndex;"
"in highp int gl_InstanceIndex;"
);
+#ifndef GLSLANG_WEB
if (version < 310)
+#endif
stageBuiltins[EShLangVertex].append(
"highp vec4 gl_Position;" // needs qualifier fixed later
"highp float gl_PointSize;" // needs qualifier fixed later
);
+#ifndef GLSLANG_WEB
else
stageBuiltins[EShLangVertex].append(
"out gl_PerVertex {"
@@ -5632,10 +4855,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
if (version >= 450)
stageBuiltins[EShLangGeometry].append(
"float gl_CullDistance[];"
-#ifdef NV_EXTENSIONS
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
-#endif
);
stageBuiltins[EShLangGeometry].append(
"} gl_in[];"
@@ -5681,7 +4902,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in int gl_InvocationID;"
);
-#ifdef NV_EXTENSIONS
if (version >= 450)
stageBuiltins[EShLangGeometry].append(
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
@@ -5690,7 +4910,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
"out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes
);
-#endif
stageBuiltins[EShLangGeometry].append("\n");
} else if (profile == EEsProfile && version >= 310) {
@@ -5755,13 +4974,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
if (version >= 450)
stageBuiltins[EShLangTessControl].append(
"float gl_CullDistance[];"
-#ifdef NV_EXTENSIONS
"int gl_ViewportMask[];" // GL_NV_viewport_array2
"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
-#endif
);
stageBuiltins[EShLangTessControl].append(
"} gl_out[];"
@@ -5860,7 +5077,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"out int gl_Layer;"
"\n");
-#ifdef NV_EXTENSIONS
if (version >= 450)
stageBuiltins[EShLangTessEvaluation].append(
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
@@ -5869,7 +5085,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
"out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes
);
-#endif
} else if (profile == EEsProfile && version >= 310) {
// Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
@@ -5963,19 +5178,25 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"flat in int gl_PrimitiveID;"
);
- if (version >= 400) {
+ if (version >= 130) { // ARB_sample_shading
stageBuiltins[EShLangFragment].append(
"flat in int gl_SampleID;"
" in vec2 gl_SamplePosition;"
- "flat in int gl_SampleMaskIn[];"
" out int gl_SampleMask[];"
);
- if (spvVersion.spv == 0)
+
+ if (spvVersion.spv == 0) {
stageBuiltins[EShLangFragment].append(
"uniform int gl_NumSamples;"
- );
+ );
+ }
}
+ if (version >= 400)
+ stageBuiltins[EShLangFragment].append(
+ "flat in int gl_SampleMaskIn[];"
+ );
+
if (version >= 430)
stageBuiltins[EShLangFragment].append(
"flat in int gl_Layer;"
@@ -5994,7 +5215,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"flat in int gl_FragInvocationCountEXT;"
);
-#ifdef AMD_EXTENSIONS
if (version >= 450)
stageBuiltins[EShLangFragment].append(
"in vec2 gl_BaryCoordNoPerspAMD;"
@@ -6005,9 +5225,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in vec2 gl_BaryCoordSmoothSampleAMD;"
"in vec3 gl_BaryCoordPullModelAMD;"
);
-#endif
-#ifdef NV_EXTENSIONS
if (version >= 430)
stageBuiltins[EShLangFragment].append(
"in bool gl_FragFullyCoveredNV;"
@@ -6020,7 +5238,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in vec3 gl_BaryCoordNoPerspNV;"
);
-#endif
} else {
// ES profile
@@ -6032,6 +5249,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"mediump vec2 gl_PointCoord;" // needs qualifier fixed later
);
}
+#endif
if (version >= 300) {
stageBuiltins[EShLangFragment].append(
"highp vec4 gl_FragCoord;" // needs qualifier fixed later
@@ -6040,6 +5258,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"highp float gl_FragDepth;" // needs qualifier fixed later
);
}
+#ifndef GLSLANG_WEB
if (version >= 310) {
stageBuiltins[EShLangFragment].append(
"bool gl_HelperInvocation;" // needs qualifier fixed later
@@ -6067,7 +5286,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"flat in ivec2 gl_FragSizeEXT;"
"flat in int gl_FragInvocationCountEXT;"
);
-#ifdef NV_EXTENSIONS
if (version >= 320)
stageBuiltins[EShLangFragment].append( // GL_NV_shading_rate_image
"flat in ivec2 gl_FragmentSizeNV;"
@@ -6078,17 +5296,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in vec3 gl_BaryCoordNV;"
"in vec3 gl_BaryCoordNoPerspNV;"
);
+ }
#endif
- }
stageBuiltins[EShLangFragment].append("\n");
if (version >= 130)
add2ndGenerationSamplingImaging(version, profile, spvVersion);
+#ifndef GLSLANG_WEB
+
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
- const char* ballotDecls =
+ const char* ballotDecls =
"uniform uint gl_SubGroupSizeARB;"
"in uint gl_SubGroupInvocationARB;"
"in uint64_t gl_SubGroupEqMaskARB;"
@@ -6097,7 +5317,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in uint64_t gl_SubGroupLeMaskARB;"
"in uint64_t gl_SubGroupLtMaskARB;"
"\n";
- const char* fragmentBallotDecls =
+ const char* fragmentBallotDecls =
"uniform uint gl_SubGroupSizeARB;"
"flat in uint gl_SubGroupInvocationARB;"
"flat in uint64_t gl_SubGroupEqMaskARB;"
@@ -6112,10 +5332,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangGeometry] .append(ballotDecls);
stageBuiltins[EShLangCompute] .append(ballotDecls);
stageBuiltins[EShLangFragment] .append(fragmentBallotDecls);
-#ifdef NV_EXTENSIONS
stageBuiltins[EShLangMeshNV] .append(ballotDecls);
stageBuiltins[EShLangTaskNV] .append(ballotDecls);
-#endif
}
if ((profile != EEsProfile && version >= 140) ||
@@ -6129,7 +5347,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
// GL_KHR_shader_subgroup
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 140)) {
- const char* ballotDecls =
+ const char* subgroupDecls =
"in mediump uint gl_SubgroupSize;"
"in mediump uint gl_SubgroupInvocationID;"
"in highp uvec4 gl_SubgroupEqMask;"
@@ -6137,8 +5355,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"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;"
"\n";
- const char* fragmentBallotDecls =
+ const char* fragmentSubgroupDecls =
"flat in mediump uint gl_SubgroupSize;"
"flat in mediump uint gl_SubgroupInvocationID;"
"flat in highp uvec4 gl_SubgroupEqMask;"
@@ -6146,35 +5369,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"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;"
+ "\n";
+ const char* computeSubgroupDecls =
+ "in highp uint gl_NumSubgroups;"
+ "in highp uint gl_SubgroupID;"
"\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);
-#ifdef NV_EXTENSIONS
- stageBuiltins[EShLangMeshNV] .append(ballotDecls);
- stageBuiltins[EShLangTaskNV] .append(ballotDecls);
-#endif
- stageBuiltins[EShLangCompute].append(
- "highp in uint gl_NumSubgroups;"
- "highp in uint gl_SubgroupID;"
- "\n");
-#ifdef NV_EXTENSIONS
- stageBuiltins[EShLangMeshNV].append(
- "highp in uint gl_NumSubgroups;"
- "highp in uint gl_SubgroupID;"
- "\n");
- stageBuiltins[EShLangTaskNV].append(
- "highp in uint gl_NumSubgroups;"
- "highp in uint gl_SubgroupID;"
- "\n");
-#endif
+ 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[EShLangMeshNV] .append(subgroupDecls);
+ stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls);
+ stageBuiltins[EShLangTaskNV] .append(subgroupDecls);
+ stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls);
+ stageBuiltins[EShLangRayGenNV] .append(subgroupDecls);
+ stageBuiltins[EShLangIntersectNV] .append(subgroupDecls);
+ stageBuiltins[EShLangAnyHitNV] .append(subgroupDecls);
+ stageBuiltins[EShLangClosestHitNV] .append(subgroupDecls);
+ stageBuiltins[EShLangMissNV] .append(subgroupDecls);
+ stageBuiltins[EShLangCallableNV] .append(subgroupDecls);
}
-#ifdef NV_EXTENSIONS
// GL_NV_ray_tracing
if (profile != EEsProfile && version >= 460) {
@@ -6274,7 +5498,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangClosestHitNV].append(deviceIndex);
stageBuiltins[EShLangMissNV].append(deviceIndex);
}
-#endif
if (version >= 300 /* both ES and non-ES */) {
stageBuiltins[EShLangFragment].append(
@@ -6296,6 +5519,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
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");
@@ -6303,6 +5527,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append("const int gl_StorageSemanticsImage = 0x800;\n");
commonBuiltins.append("const int gl_StorageSemanticsOutput = 0x1000;\n");
}
+#endif
// printf("%s\n", commonBuiltins.c_str());
// printf("%s\n", stageBuiltins[EShLangFragment].c_str());
@@ -6318,19 +5543,27 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
// In this function proper, enumerate the types, then calls the next set of functions
// to enumerate all the uses for that type.
//
-#ifdef AMD_EXTENSIONS
- TBasicType bTypes[4] = { EbtFloat, EbtFloat16, EbtInt, EbtUint };
+
+ // enumerate all the types
+#ifdef GLSLANG_WEB
+ const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint };
+ bool skipBuffer = true;
+ bool skipCubeArrayed = true;
+ const int image = 0;
#else
- TBasicType bTypes[3] = { EbtFloat, EbtInt, EbtUint };
-#endif
+ 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);
-
- // enumerate all the types
- for (int image = 0; image <= 1; ++image) { // loop over "bool" image vs sampler
-
+ for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler
+#endif
+ {
for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not
- for (int ms = 0; ms <=1; ++ms) {
+#ifdef GLSLANG_WEB
+ const int ms = 0;
+#else
+ for (int ms = 0; ms <= 1; ++ms) // loop over "bool" multisample or not
+#endif
+ {
if ((ms || image) && shadow)
continue;
if (ms && profile != EEsProfile && version < 150)
@@ -6341,20 +5574,23 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
continue;
for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
- for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, 2D, ..., buffer
+#ifdef GLSLANG_WEB
+ for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
+#else
+ for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
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)
+ if (dim == EsdSubpass && spvVersion.vulkan == 0)
continue;
- if ((dim == Esd3D || dim == EsdRect) && arrayed)
+ if (dim == EsdSubpass && (image || shadow || arrayed))
continue;
- if (dim == Esd3D && shadow)
+ if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile)
continue;
- if (dim == EsdCube && arrayed && skipCubeArrayed)
+ if (dim != Esd2D && dim != EsdSubpass && ms)
continue;
if (dim == EsdBuffer && skipBuffer)
continue;
@@ -6362,31 +5598,35 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
continue;
if (ms && arrayed && profile == EEsProfile && version < 310)
continue;
-#ifdef AMD_EXTENSIONS
- for (int bType = 0; bType < 4; ++bType) { // float, float16, int, uint results
-
- if (shadow && bType > 1)
- continue;
+#endif
+ if (dim == Esd3D && shadow)
+ continue;
+ if (dim == EsdCube && arrayed && skipCubeArrayed)
+ continue;
+ if ((dim == Esd3D || dim == EsdRect) && arrayed)
+ continue;
- if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile ||version < 450))
+ // Loop over the bTypes
+ for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) {
+#ifndef GLSLANG_WEB
+ if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450))
continue;
-#else
- for (int bType = 0; bType < 3; ++bType) { // float, int, uint results
-
- if (shadow && bType > 0)
+ if (dim == EsdRect && version < 140 && bType > 0)
continue;
#endif
- if (dim == EsdRect && version < 140 && bType > 0)
+ if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint))
continue;
//
// Now, make all the function prototypes for the type we just built...
//
-
TSampler sampler;
+#ifndef GLSLANG_WEB
if (dim == EsdSubpass) {
sampler.setSubpass(bTypes[bType], ms ? true : false);
- } else if (image) {
+ } else
+#endif
+ if (image) {
sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false,
shadow ? true : false,
ms ? true : false);
@@ -6398,10 +5638,12 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
TString typeName = sampler.getString();
+#ifndef GLSLANG_WEB
if (dim == EsdSubpass) {
addSubpassSampling(sampler, typeName, version, profile);
continue;
}
+#endif
addQueryFunctions(sampler, typeName, version, profile);
@@ -6409,8 +5651,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
addImageFunctions(sampler, typeName, version, profile);
else {
addSamplingFunctions(sampler, typeName, version, profile);
+#ifndef GLSLANG_WEB
addGatherFunctions(sampler, typeName, version, profile);
-
if (spvVersion.vulkan > 0 && sampler.isCombined() && !sampler.shadow) {
// Base Vulkan allows texelFetch() for
// textureBuffer (i.e. without sampler).
@@ -6425,6 +5667,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
addSamplingFunctions(sampler, textureTypeName, version, profile);
addQueryFunctions(sampler, textureTypeName, version, profile);
}
+#endif
}
}
}
@@ -6436,7 +5679,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
//
// sparseTexelsResidentARB()
//
-
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append("bool sparseTexelsResidentARB(int code);\n");
}
@@ -6450,14 +5692,25 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
//
void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
- if (sampler.image && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430)))
- return;
-
//
// textureSize() and imageSize()
//
int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0);
+
+#ifdef GLSLANG_WEB
+ commonBuiltins.append("highp ");
+ commonBuiltins.append("ivec");
+ commonBuiltins.append(postfixes[sizeDims]);
+ commonBuiltins.append(" textureSize(");
+ commonBuiltins.append(typeName);
+ commonBuiltins.append(",int);\n");
+ return;
+#endif
+
+ if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430)))
+ return;
+
if (profile == EEsProfile)
commonBuiltins.append("highp ");
if (sizeDims == 1)
@@ -6466,12 +5719,12 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
commonBuiltins.append("ivec");
commonBuiltins.append(postfixes[sizeDims]);
}
- if (sampler.image)
+ if (sampler.isImage())
commonBuiltins.append(" imageSize(readonly writeonly volatile coherent ");
else
commonBuiltins.append(" textureSize(");
commonBuiltins.append(typeName);
- if (! sampler.image && sampler.dim != EsdRect && sampler.dim != EsdBuffer && ! sampler.ms)
+ if (! sampler.isImage() && ! sampler.isRect() && ! sampler.isBuffer() && ! sampler.isMultiSample())
commonBuiltins.append(",int);\n");
else
commonBuiltins.append(");\n");
@@ -6482,9 +5735,9 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
// 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.ms) {
+ if (profile != EEsProfile && version >= 430 && sampler.isMultiSample()) {
commonBuiltins.append("int ");
- if (sampler.image)
+ if (sampler.isImage())
commonBuiltins.append("imageSamples(readonly writeonly volatile coherent ");
else
commonBuiltins.append("textureSamples(");
@@ -6496,40 +5749,28 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
// textureQueryLod(), fragment stage only
//
- if (profile != EEsProfile && version >= 400 && sampler.combined && sampler.dim != EsdRect && ! sampler.ms && sampler.dim != EsdBuffer) {
-#ifdef AMD_EXTENSIONS
+ if (profile != EEsProfile && version >= 400 && sampler.isCombined() && sampler.dim != EsdRect &&
+ ! sampler.isMultiSample() && ! sampler.isBuffer()) {
for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) {
if (f16TexAddr && sampler.type != EbtFloat16)
continue;
-#endif
stageBuiltins[EShLangFragment].append("vec2 textureQueryLod(");
stageBuiltins[EShLangFragment].append(typeName);
if (dimMap[sampler.dim] == 1)
-#ifdef AMD_EXTENSIONS
if (f16TexAddr)
stageBuiltins[EShLangFragment].append(", float16_t");
else
stageBuiltins[EShLangFragment].append(", float");
-#else
- stageBuiltins[EShLangFragment].append(", float");
-#endif
else {
-#ifdef AMD_EXTENSIONS
if (f16TexAddr)
stageBuiltins[EShLangFragment].append(", f16vec");
else
stageBuiltins[EShLangFragment].append(", vec");
-#else
- stageBuiltins[EShLangFragment].append(", vec");
-#endif
stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]);
}
stageBuiltins[EShLangFragment].append(");\n");
-#ifdef AMD_EXTENSIONS
}
-#endif
-#ifdef NV_EXTENSIONS
stageBuiltins[EShLangCompute].append("vec2 textureQueryLod(");
stageBuiltins[EShLangCompute].append(typeName);
if (dimMap[sampler.dim] == 1)
@@ -6539,14 +5780,14 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]);
}
stageBuiltins[EShLangCompute].append(");\n");
-#endif
}
//
// textureQueryLevels()
//
- if (profile != EEsProfile && version >= 430 && ! sampler.image && sampler.dim != EsdRect && ! sampler.ms && sampler.dim != EsdBuffer) {
+ if (profile != EEsProfile && version >= 430 && ! sampler.isImage() && sampler.dim != EsdRect &&
+ ! sampler.isMultiSample() && ! sampler.isBuffer()) {
commonBuiltins.append("int textureQueryLevels(");
commonBuiltins.append(typeName);
commonBuiltins.append(");\n");
@@ -6573,7 +5814,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
imageParams.append(", ivec");
imageParams.append(postfixes[dims]);
}
- if (sampler.ms)
+ if (sampler.isMultiSample())
imageParams.append(", int");
if (profile == EEsProfile)
@@ -6589,7 +5830,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
commonBuiltins.append(prefixes[sampler.type]);
commonBuiltins.append("vec4);\n");
- if (sampler.dim != Esd1D && sampler.dim != EsdBuffer && profile != EEsProfile && version >= 450) {
+ if (! sampler.is1D() && ! sampler.isBuffer() && profile != EEsProfile && version >= 450) {
commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent ");
commonBuiltins.append(imageParams);
commonBuiltins.append(", out ");
@@ -6666,8 +5907,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
}
}
-#ifdef AMD_EXTENSIONS
- if (sampler.dim == EsdRect || sampler.dim == EsdBuffer || sampler.shadow || sampler.ms)
+ if (sampler.dim == EsdRect || sampler.dim == EsdBuffer || sampler.shadow || sampler.isMultiSample())
return;
if (profile == EEsProfile || version < 450)
@@ -6693,7 +5933,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
commonBuiltins.append(prefixes[sampler.type]);
commonBuiltins.append("vec4);\n");
- if (sampler.dim != Esd1D) {
+ if (! sampler.is1D()) {
commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent ");
commonBuiltins.append(imageLodParams);
commonBuiltins.append(", out ");
@@ -6701,7 +5941,6 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
commonBuiltins.append("vec4");
commonBuiltins.append(");\n");
}
-#endif
}
//
@@ -6716,7 +5955,7 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, in
stageBuiltins[EShLangFragment].append("vec4 subpassLoad");
stageBuiltins[EShLangFragment].append("(");
stageBuiltins[EShLangFragment].append(typeName.c_str());
- if (sampler.ms)
+ if (sampler.isMultiSample())
stageBuiltins[EShLangFragment].append(", int");
stageBuiltins[EShLangFragment].append(");\n");
}
@@ -6729,17 +5968,23 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, in
//
void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
+#ifdef GLSLANG_WEB
+ profile = EEsProfile;
+ version = 310;
+#endif
+
//
// texturing
//
for (int proj = 0; proj <= 1; ++proj) { // loop over "bool" projective or not
- if (proj && (sampler.dim == EsdCube || sampler.dim == EsdBuffer || sampler.arrayed || sampler.ms || !sampler.combined))
+ if (proj && (sampler.dim == EsdCube || sampler.isBuffer() || sampler.arrayed || sampler.isMultiSample()
+ || !sampler.isCombined()))
continue;
for (int lod = 0; lod <= 1; ++lod) {
- if (lod && (sampler.dim == EsdBuffer || sampler.dim == EsdRect || sampler.ms || !sampler.combined))
+ if (lod && (sampler.isBuffer() || sampler.isRect() || sampler.isMultiSample() || !sampler.isCombined()))
continue;
if (lod && sampler.dim == Esd2D && sampler.arrayed && sampler.shadow)
continue;
@@ -6748,18 +5993,18 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
for (int bias = 0; bias <= 1; ++bias) {
- if (bias && (lod || sampler.ms || !sampler.combined))
+ if (bias && (lod || sampler.isMultiSample() || !sampler.isCombined()))
continue;
if (bias && (sampler.dim == Esd2D || sampler.dim == EsdCube) && sampler.shadow && sampler.arrayed)
continue;
- if (bias && (sampler.dim == EsdRect || sampler.dim == EsdBuffer))
+ 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.dim == EsdBuffer || sampler.ms))
+ if (offset && (sampler.dim == EsdCube || sampler.isBuffer() || sampler.isMultiSample()))
continue;
for (int fetch = 0; fetch <= 1; ++fetch) { // loop over "bool" fetch or not
@@ -6770,14 +6015,15 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
continue;
if (fetch && (sampler.shadow || sampler.dim == EsdCube))
continue;
- if (fetch == 0 && (sampler.ms || sampler.dim == EsdBuffer || !sampler.combined))
+ 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.ms || !sampler.combined))
+ if (grad && (lod || bias || sampler.isMultiSample() || !sampler.isCombined()))
continue;
- if (grad && sampler.dim == EsdBuffer)
+ if (grad && sampler.isBuffer())
continue;
if (proj + offset + fetch + grad + bias + lod > 3)
continue;
@@ -6797,31 +6043,46 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
if (extraProj && ! proj)
continue;
- if (extraProj && (sampler.dim == Esd3D || sampler.shadow || !sampler.combined))
+ if (extraProj && (sampler.dim == Esd3D || sampler.shadow || !sampler.isCombined()))
continue;
-#ifdef AMD_EXTENSIONS
- for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing
+ // loop over 16-bit floating-point texel addressing
+#ifdef GLSLANG_WEB
+ const int f16TexAddr = 0;
+#else
+ for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
+#endif
+ {
if (f16TexAddr && sampler.type != EbtFloat16)
continue;
if (f16TexAddr && sampler.shadow && ! compare) {
compare = true; // compare argument is always present
totalDims--;
}
+ // loop over "bool" lod clamp
+#ifdef GLSLANG_WEB
+ const int lodClamp = 0;
+#else
+ for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
#endif
- for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { // loop over "bool" lod clamp
-
+ {
if (lodClamp && (profile == EEsProfile || version < 450))
continue;
if (lodClamp && (proj || lod || fetch))
continue;
- for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not
-
+ // loop over "bool" sparse or not
+#ifdef GLSLANG_WEB
+ const int sparse = 0;
+#else
+ for (int sparse = 0; sparse <= 1; ++sparse)
+#endif
+ {
if (sparse && (profile == EEsProfile || version < 450))
continue;
- // Sparse sampling is not for 1D/1D array texture, buffer texture, and projective texture
- if (sparse && (sampler.dim == Esd1D || sampler.dim == EsdBuffer || proj))
+ // Sparse sampling is not for 1D/1D array texture, buffer texture, and
+ // projective texture
+ if (sparse && (sampler.is1D() || sampler.isBuffer() || proj))
continue;
TString s;
@@ -6831,14 +6092,10 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append("int ");
else {
if (sampler.shadow)
-#ifdef AMD_EXTENSIONS
if (sampler.type == EbtFloat16)
s.append("float16_t ");
else
s.append("float ");
-#else
- s.append("float ");
-#endif
else {
s.append(prefixes[sampler.type]);
s.append("vec4 ");
@@ -6876,7 +6133,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
// sampler type
s.append(typeName);
-#ifdef AMD_EXTENSIONS
// P coordinate
if (extraProj) {
if (f16TexAddr)
@@ -6894,31 +6150,15 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append(postfixes[totalDims]);
}
}
-#else
- // P coordinate
- if (extraProj)
- s.append(",vec4");
- else {
- s.append(",");
- TBasicType t = fetch ? EbtInt : EbtFloat;
- if (totalDims == 1)
- s.append(TType::getBasicString(t));
- else {
- s.append(prefixes[t]);
- s.append("vec");
- s.append(postfixes[totalDims]);
- }
- }
-#endif
// 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.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) ||
- (sampler.ms && fetch))
+ if ((fetch && !sampler.isBuffer() &&
+ !sampler.isRect() && !sampler.isMultiSample())
+ || (sampler.isMultiSample() && fetch))
s.append(",int");
-#ifdef AMD_EXTENSIONS
// non-optional lod
if (lod) {
if (f16TexAddr)
@@ -6947,23 +6187,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append(postfixes[dimMap[sampler.dim]]);
}
}
-#else
- // non-optional lod
- if (lod)
- s.append(",float");
-
- // gradient arguments
- if (grad) {
- if (dimMap[sampler.dim] == 1)
- s.append(",float,float");
- else {
- s.append(",vec");
- s.append(postfixes[dimMap[sampler.dim]]);
- s.append(",vec");
- s.append(postfixes[dimMap[sampler.dim]]);
- }
- }
-#endif
// offset
if (offset) {
if (dimMap[sampler.dim] == 1)
@@ -6974,7 +6197,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
}
}
-#ifdef AMD_EXTENSIONS
// lod clamp
if (lodClamp) {
if (f16TexAddr)
@@ -6982,29 +6204,19 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
else
s.append(",float");
}
-#else
- // lod clamp
- if (lodClamp)
- s.append(",float");
-#endif
// texel out (for sparse texture)
if (sparse) {
s.append(",out ");
if (sampler.shadow)
-#ifdef AMD_EXTENSIONS
if (sampler.type == EbtFloat16)
s.append("float16_t");
else
s.append("float");
-#else
- s.append("float");
-#endif
else {
s.append(prefixes[sampler.type]);
s.append("vec4");
}
}
-#ifdef AMD_EXTENSIONS
// optional bias
if (bias) {
if (f16TexAddr)
@@ -7012,27 +6224,18 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
else
s.append(",float");
}
-#else
- // optional bias
- if (bias)
- s.append(",float");
-#endif
s.append(");\n");
// Add to the per-language set of built-ins
if (bias || lodClamp) {
stageBuiltins[EShLangFragment].append(s);
-#ifdef NV_EXTENSIONS
stageBuiltins[EShLangCompute].append(s);
-#endif
} else
commonBuiltins.append(s);
}
}
-#ifdef AMD_EXTENSIONS
}
-#endif
}
}
}
@@ -7050,6 +6253,11 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
//
void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
+#ifdef GLSLANG_WEB
+ profile = EEsProfile;
+ version = 310;
+#endif
+
switch (sampler.dim) {
case Esd2D:
case EsdRect:
@@ -7059,18 +6267,16 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
return;
}
- if (sampler.ms)
+ if (sampler.isMultiSample())
return;
if (version < 140 && sampler.dim == EsdRect && sampler.type != EbtFloat)
return;
-#ifdef AMD_EXTENSIONS
for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing
if (f16TexAddr && sampler.type != EbtFloat16)
continue;
-#endif
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
@@ -7118,14 +6324,10 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
s.append(typeName);
// P coordinate argument
-#ifdef AMD_EXTENSIONS
if (f16TexAddr)
s.append(",f16vec");
else
s.append(",vec");
-#else
- s.append(",vec");
-#endif
int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0);
s.append(postfixes[totalDims]);
@@ -7153,14 +6355,11 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
s.append(");\n");
commonBuiltins.append(s);
-#ifdef AMD_EXTENSIONS
}
-#endif
}
}
}
-#ifdef AMD_EXTENSIONS
if (sampler.dim == EsdRect || sampler.shadow)
return;
@@ -7286,7 +6485,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
}
}
}
-#endif
}
//
@@ -7298,6 +6496,11 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
//
void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language)
{
+#ifdef GLSLANG_WEB
+ version = 310;
+ profile = EEsProfile;
+#endif
+
//
// Initialize the context-dependent (resource-dependent) built-in strings for parsing.
//
@@ -7309,7 +6512,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
//============================================================================
TString& s = commonBuiltins;
- const int maxSize = 80;
+ const int maxSize = 200;
char builtInConstant[maxSize];
//
@@ -7355,6 +6558,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append(builtInConstant);
}
+#ifndef GLSLANG_WEB
if (version >= 310) {
// geometry
@@ -7413,10 +6617,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
"in gl_PerVertex {"
"highp vec4 gl_Position;"
"highp float gl_PointSize;"
-#ifdef NV_EXTENSIONS
"highp vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
"highp vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
-#endif
"} gl_in[gl_MaxPatchVertices];"
"\n");
}
@@ -7425,6 +6627,14 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
} 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_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
s.append(builtInConstant);
@@ -7603,10 +6813,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
if (profile != EEsProfile && version >= 450)
s.append(
"float gl_CullDistance[];"
-#ifdef NV_EXTENSIONS
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
-#endif
);
s.append(
"} gl_in[gl_MaxPatchVertices];"
@@ -7640,8 +6848,29 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents);
s.append(builtInConstant);
}
+#endif
+ }
+
+ // 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");
}
+#ifndef GLSLANG_WEB
// images (some in compute below)
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 130)) {
@@ -7657,6 +6886,18 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
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)) {
@@ -7694,31 +6935,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append("\n");
}
- // 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);
- 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");
- }
-
// GL_ARB_cull_distance
if (profile != EEsProfile && version >= 450) {
snprintf(builtInConstant, maxSize, "const int gl_MaxCullDistances = %d;", resources.maxCullDistances);
@@ -7734,15 +6950,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append(builtInConstant);
}
-#ifdef AMD_EXTENSIONS
- // GL_AMD_gcn_shader
- if (profile != EEsProfile && version >= 450) {
- snprintf(builtInConstant, maxSize, "const int gl_SIMDGroupSizeAMD = 64;");
- s.append(builtInConstant);
- }
-#endif
-
-#ifdef NV_EXTENSIONS
// SPV_NV_mesh_shader
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
@@ -7846,6 +7053,11 @@ static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVar
//
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable)
{
+#ifdef GLSLANG_WEB
+ version = 310;
+ profile = EEsProfile;
+#endif
+
//
// Tag built-in variables and functions with additional qualifier and extension information
// that cannot be declared with the text strings.
@@ -7860,6 +7072,17 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
switch(language) {
case EShLangVertex:
+ if (spvVersion.vulkan > 0) {
+ BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable);
+ BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable);
+ }
+
+#ifndef GLSLANG_WEB
+ if (spvVersion.vulkan == 0) {
+ SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable);
+ SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
+ }
+
if (profile != EEsProfile) {
if (version >= 440) {
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
@@ -7886,19 +7109,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("readInvocationARB", 1, &E_GL_ARB_shader_ballot);
symbolTable.setFunctionExtensions("readFirstInvocationARB", 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);
- else
- BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable);
-
if (version >= 430) {
symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote);
symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote);
@@ -7906,7 +7116,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
}
}
-#ifdef AMD_EXTENSIONS
+
if (profile != EEsProfile) {
symbolTable.setFunctionExtensions("minInvocationsAMD", 1, &E_GL_AMD_shader_ballot);
symbolTable.setFunctionExtensions("maxInvocationsAMD", 1, &E_GL_AMD_shader_ballot);
@@ -7940,6 +7150,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
}
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);
@@ -7949,15 +7162,21 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("fragmentMaskFetchAMD", 1, &E_GL_AMD_shader_fragment_mask);
symbolTable.setFunctionExtensions("fragmentFetchAMD", 1, &E_GL_AMD_shader_fragment_mask);
}
-#endif
-#ifdef NV_EXTENSIONS
+ 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);
-#endif
// Compatibility variables, vertex only
if (spvVersion.spv == 0) {
BuiltInVariable("gl_Color", EbvColor, symbolTable);
@@ -7998,16 +7217,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic);
}
- if (spvVersion.vulkan == 0) {
- SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable);
- SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
- }
-
- if (spvVersion.vulkan > 0) {
- BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable);
- BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, 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);
@@ -8017,7 +7226,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers);
symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers);
}
-
// Fall through
case EShLangTessControl:
@@ -8033,22 +7241,26 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_BoundingBox", EbvBoundingBox, symbolTable);
}
}
-
// Fall through
case EShLangTessEvaluation:
case EShLangGeometry:
+#endif
SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable);
SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable);
- SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable);
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);
BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable);
BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable);
+
+#ifndef GLSLANG_WEB
+ 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);
@@ -8060,19 +7272,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_Layer", EbvLayer, symbolTable);
BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable);
-#ifdef NV_EXTENSIONS
if (language != EShLangGeometry) {
symbolTable.setVariableExtensions("gl_Layer", Num_viewportEXTs, viewportEXTs);
symbolTable.setVariableExtensions("gl_ViewportIndex", Num_viewportEXTs, viewportEXTs);
}
-#else
- if (language != EShLangGeometry && version >= 410) {
- symbolTable.setVariableExtensions("gl_Layer", 1, &E_GL_ARB_shader_viewport_layer_array);
- symbolTable.setVariableExtensions("gl_ViewportIndex", 1, &E_GL_ARB_shader_viewport_layer_array);
- }
-#endif
-
-#ifdef NV_EXTENSIONS
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);
@@ -8085,7 +7288,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable);
BuiltInVariable("gl_ViewportMaskPerViewNV", EbvViewportMaskPerViewNV, symbolTable);
- if (language != EShLangVertex) {
+ 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);
@@ -8103,7 +7306,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_out", "gl_SecondaryViewportMaskNV", EbvSecondaryViewportMaskNV, symbolTable);
BuiltInVariable("gl_out", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable);
BuiltInVariable("gl_out", "gl_ViewportMaskPerViewNV", EbvViewportMaskPerViewNV, symbolTable);
-#endif
BuiltInVariable("gl_PatchVerticesIn", EbvPatchVertices, symbolTable);
BuiltInVariable("gl_TessLevelOuter", EbvTessLevelOuter, symbolTable);
@@ -8159,7 +7361,22 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
+ else
+ BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable);
+ }
+
// GL_KHR_shader_subgroup
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 140)) {
@@ -8178,8 +7395,18 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
+ }
+#endif
break;
case EShLangFragment:
@@ -8196,6 +7423,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
}
}
SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable);
+#ifndef GLSLANG_WEB
SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable);
SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable);
@@ -8208,18 +7436,29 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
}
- if ((profile != EEsProfile && version >= 400) ||
+ if ((profile != EEsProfile && version >= 130) ||
(profile == EEsProfile && version >= 310)) {
- BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
- BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
- BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
- BuiltInVariable("gl_SampleMask", 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_SampleID", EbvSampleId, symbolTable);
+ BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
+ BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable);
+
+ if (profile != EEsProfile && version < 400) {
+ 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);
+ }
}
}
@@ -8350,7 +7589,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("textureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
}
-#ifdef AMD_EXTENSIONS
// E_GL_AMD_shader_explicit_vertex_parameter
if (profile != EEsProfile) {
symbolTable.setVariableExtensions("gl_BaryCoordNoPerspAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter);
@@ -8388,9 +7626,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("imageStoreLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod);
symbolTable.setFunctionExtensions("sparseImageLoadLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod);
}
-#endif
-
-#ifdef NV_EXTENSIONS
if (profile != EEsProfile && version >= 430) {
symbolTable.setVariableExtensions("gl_FragFullyCoveredNV", 1, &E_GL_NV_conservative_raster_underestimation);
BuiltInVariable("gl_FragFullyCoveredNV", EbvFragFullyCoveredNV, symbolTable);
@@ -8406,20 +7641,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_BaryCoordNV", EbvBaryCoordNV, symbolTable);
BuiltInVariable("gl_BaryCoordNoPerspNV", EbvBaryCoordNoPerspNV, symbolTable);
}
- if (((profile != EEsProfile && version >= 450) ||
- (profile == EEsProfile && version >= 320)) &&
- language == EShLangCompute) {
- 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);
- }
-#endif
if ((profile != EEsProfile && version >= 450) ||
(profile == EEsProfile && version >= 310)) {
@@ -8431,6 +7652,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
@@ -8553,8 +7780,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
-
-#ifdef NV_EXTENSIONS
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);
@@ -8577,8 +7802,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
-#endif
+ // 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);
}
if (profile == EEsProfile) {
@@ -8598,6 +7831,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
@@ -8605,6 +7839,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
+#endif
break;
case EShLangCompute:
@@ -8614,6 +7851,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
+
+#ifndef GLSLANG_WEB
+ 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);
@@ -8683,14 +7929,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable);
BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable);
BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable);
- }
- 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);
+ // 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_KHR_shader_subgroup
@@ -8705,12 +7953,28 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic);
}
- symbolTable.setFunctionExtensions("coopMatLoadNV", 1, &E_GL_NV_cooperative_matrix);
- symbolTable.setFunctionExtensions("coopMatStoreNV", 1, &E_GL_NV_cooperative_matrix);
- symbolTable.setFunctionExtensions("coopMatMulAddNV", 1, &E_GL_NV_cooperative_matrix);
+ {
+ 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);
+ }
+ 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);
+ }
+#endif
break;
-#ifdef NV_EXTENSIONS
+
+#ifndef GLSLANG_WEB
case EShLangRayGenNV:
case EShLangIntersectNV:
case EShLangAnyHitNV:
@@ -8754,8 +8018,62 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObjectNV, symbolTable);
BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlagsNV, symbolTable);
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, 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);
+ 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);
+ }
break;
+
case EShLangMeshNV:
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
// per-vertex builtins
@@ -8887,6 +8205,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
}
break;
@@ -8977,6 +8305,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
}
break;
#endif
@@ -8992,74 +8330,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
// expected to be resolved through a library of functions, versus as
// operations.
//
- symbolTable.relateToOperator("not", EOpVectorLogicalNot);
- symbolTable.relateToOperator("matrixCompMult", EOpMul);
- // 120 and 150 are correct for both ES and desktop
- if (version >= 120) {
- symbolTable.relateToOperator("outerProduct", EOpOuterProduct);
- symbolTable.relateToOperator("transpose", EOpTranspose);
- if (version >= 150) {
- symbolTable.relateToOperator("determinant", EOpDeterminant);
- symbolTable.relateToOperator("inverse", EOpMatrixInverse);
- }
- }
+ relateTabledBuiltins(version, profile, spvVersion, language, symbolTable);
- symbolTable.relateToOperator("mod", EOpMod);
- symbolTable.relateToOperator("modf", EOpModf);
-
- symbolTable.relateToOperator("equal", EOpVectorEqual);
- symbolTable.relateToOperator("notEqual", EOpVectorNotEqual);
- symbolTable.relateToOperator("lessThan", EOpLessThan);
- symbolTable.relateToOperator("greaterThan", EOpGreaterThan);
- symbolTable.relateToOperator("lessThanEqual", EOpLessThanEqual);
- symbolTable.relateToOperator("greaterThanEqual", EOpGreaterThanEqual);
-
- symbolTable.relateToOperator("radians", EOpRadians);
- symbolTable.relateToOperator("degrees", EOpDegrees);
- symbolTable.relateToOperator("sin", EOpSin);
- symbolTable.relateToOperator("cos", EOpCos);
- symbolTable.relateToOperator("tan", EOpTan);
- symbolTable.relateToOperator("asin", EOpAsin);
- symbolTable.relateToOperator("acos", EOpAcos);
- symbolTable.relateToOperator("atan", EOpAtan);
- symbolTable.relateToOperator("sinh", EOpSinh);
- symbolTable.relateToOperator("cosh", EOpCosh);
- symbolTable.relateToOperator("tanh", EOpTanh);
- symbolTable.relateToOperator("asinh", EOpAsinh);
- symbolTable.relateToOperator("acosh", EOpAcosh);
- symbolTable.relateToOperator("atanh", EOpAtanh);
-
- symbolTable.relateToOperator("pow", EOpPow);
- symbolTable.relateToOperator("exp2", EOpExp2);
- symbolTable.relateToOperator("log", EOpLog);
- symbolTable.relateToOperator("exp", EOpExp);
- symbolTable.relateToOperator("log2", EOpLog2);
- symbolTable.relateToOperator("sqrt", EOpSqrt);
- symbolTable.relateToOperator("inversesqrt", EOpInverseSqrt);
-
- symbolTable.relateToOperator("abs", EOpAbs);
- symbolTable.relateToOperator("sign", EOpSign);
- symbolTable.relateToOperator("floor", EOpFloor);
- symbolTable.relateToOperator("trunc", EOpTrunc);
- symbolTable.relateToOperator("round", EOpRound);
- symbolTable.relateToOperator("roundEven", EOpRoundEven);
- symbolTable.relateToOperator("ceil", EOpCeil);
- symbolTable.relateToOperator("fract", EOpFract);
- symbolTable.relateToOperator("min", EOpMin);
- symbolTable.relateToOperator("max", EOpMax);
- symbolTable.relateToOperator("clamp", EOpClamp);
- symbolTable.relateToOperator("mix", EOpMix);
- symbolTable.relateToOperator("step", EOpStep);
- symbolTable.relateToOperator("smoothstep", EOpSmoothStep);
-
- symbolTable.relateToOperator("isnan", EOpIsNan);
- symbolTable.relateToOperator("isinf", EOpIsInf);
-
- symbolTable.relateToOperator("floatBitsToInt", EOpFloatBitsToInt);
- symbolTable.relateToOperator("floatBitsToUint", EOpFloatBitsToUint);
- symbolTable.relateToOperator("intBitsToFloat", EOpIntBitsToFloat);
- symbolTable.relateToOperator("uintBitsToFloat", EOpUintBitsToFloat);
+#ifndef GLSLANG_WEB
symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64);
symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64);
symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble);
@@ -9074,11 +8348,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("int16BitsToHalf", EOpInt16BitsToFloat16);
symbolTable.relateToOperator("uint16BitsToHalf", EOpUint16BitsToFloat16);
- symbolTable.relateToOperator("packSnorm2x16", EOpPackSnorm2x16);
- symbolTable.relateToOperator("unpackSnorm2x16", EOpUnpackSnorm2x16);
- symbolTable.relateToOperator("packUnorm2x16", EOpPackUnorm2x16);
- symbolTable.relateToOperator("unpackUnorm2x16", EOpUnpackUnorm2x16);
-
symbolTable.relateToOperator("packSnorm4x8", EOpPackSnorm4x8);
symbolTable.relateToOperator("unpackSnorm4x8", EOpUnpackSnorm4x8);
symbolTable.relateToOperator("packUnorm4x8", EOpPackUnorm4x8);
@@ -9087,9 +8356,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("packDouble2x32", EOpPackDouble2x32);
symbolTable.relateToOperator("unpackDouble2x32", EOpUnpackDouble2x32);
- symbolTable.relateToOperator("packHalf2x16", EOpPackHalf2x16);
- symbolTable.relateToOperator("unpackHalf2x16", EOpUnpackHalf2x16);
-
symbolTable.relateToOperator("packInt2x32", EOpPackInt2x32);
symbolTable.relateToOperator("unpackInt2x32", EOpUnpackInt2x32);
symbolTable.relateToOperator("packUint2x32", EOpPackUint2x32);
@@ -9115,33 +8381,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("unpack16", EOpUnpack16);
symbolTable.relateToOperator("unpack8", EOpUnpack8);
- symbolTable.relateToOperator("length", EOpLength);
- symbolTable.relateToOperator("distance", EOpDistance);
- symbolTable.relateToOperator("dot", EOpDot);
- symbolTable.relateToOperator("cross", EOpCross);
- symbolTable.relateToOperator("normalize", EOpNormalize);
- symbolTable.relateToOperator("faceforward", EOpFaceForward);
- symbolTable.relateToOperator("reflect", EOpReflect);
- symbolTable.relateToOperator("refract", EOpRefract);
-
- symbolTable.relateToOperator("any", EOpAny);
- symbolTable.relateToOperator("all", EOpAll);
-
- symbolTable.relateToOperator("barrier", EOpBarrier);
symbolTable.relateToOperator("controlBarrier", EOpBarrier);
- symbolTable.relateToOperator("memoryBarrier", EOpMemoryBarrier);
symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
- symbolTable.relateToOperator("memoryBarrierBuffer", EOpMemoryBarrierBuffer);
symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage);
- symbolTable.relateToOperator("atomicAdd", EOpAtomicAdd);
- symbolTable.relateToOperator("atomicMin", EOpAtomicMin);
- symbolTable.relateToOperator("atomicMax", EOpAtomicMax);
- symbolTable.relateToOperator("atomicAnd", EOpAtomicAnd);
- symbolTable.relateToOperator("atomicOr", EOpAtomicOr);
- symbolTable.relateToOperator("atomicXor", EOpAtomicXor);
- symbolTable.relateToOperator("atomicExchange", EOpAtomicExchange);
- symbolTable.relateToOperator("atomicCompSwap", EOpAtomicCompSwap);
symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad);
symbolTable.relateToOperator("atomicStore", EOpAtomicStore);
@@ -9149,6 +8392,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
+ symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR);
+ symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
+
+ symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR);
+ symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR);
+
if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd);
symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
@@ -9175,6 +8424,17 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
+
if (PureOperatorBuiltins) {
symbolTable.relateToOperator("imageSize", EOpImageQuerySize);
symbolTable.relateToOperator("imageSamples", EOpImageQuerySamples);
@@ -9194,24 +8454,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("subpassLoad", EOpSubpassLoad);
symbolTable.relateToOperator("subpassLoadMS", EOpSubpassLoadMS);
- symbolTable.relateToOperator("textureSize", EOpTextureQuerySize);
- symbolTable.relateToOperator("textureQueryLod", EOpTextureQueryLod);
- symbolTable.relateToOperator("textureQueryLevels", EOpTextureQueryLevels);
- symbolTable.relateToOperator("textureSamples", EOpTextureQuerySamples);
- symbolTable.relateToOperator("texture", EOpTexture);
- symbolTable.relateToOperator("textureProj", EOpTextureProj);
- symbolTable.relateToOperator("textureLod", EOpTextureLod);
- symbolTable.relateToOperator("textureOffset", EOpTextureOffset);
- symbolTable.relateToOperator("texelFetch", EOpTextureFetch);
- symbolTable.relateToOperator("texelFetchOffset", EOpTextureFetchOffset);
- symbolTable.relateToOperator("textureProjOffset", EOpTextureProjOffset);
- symbolTable.relateToOperator("textureLodOffset", EOpTextureLodOffset);
- symbolTable.relateToOperator("textureProjLod", EOpTextureProjLod);
- symbolTable.relateToOperator("textureProjLodOffset", EOpTextureProjLodOffset);
- symbolTable.relateToOperator("textureGrad", EOpTextureGrad);
- symbolTable.relateToOperator("textureGradOffset", EOpTextureGradOffset);
- symbolTable.relateToOperator("textureProjGrad", EOpTextureProjGrad);
- symbolTable.relateToOperator("textureProjGradOffset", EOpTextureProjGradOffset);
symbolTable.relateToOperator("textureGather", EOpTextureGather);
symbolTable.relateToOperator("textureGatherOffset", EOpTextureGatherOffset);
symbolTable.relateToOperator("textureGatherOffsets", EOpTextureGatherOffsets);
@@ -9221,17 +8463,17 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("noise3", EOpNoise);
symbolTable.relateToOperator("noise4", EOpNoise);
-#ifdef NV_EXTENSIONS
symbolTable.relateToOperator("textureFootprintNV", EOpImageSampleFootprintNV);
symbolTable.relateToOperator("textureFootprintClampNV", EOpImageSampleFootprintClampNV);
symbolTable.relateToOperator("textureFootprintLodNV", EOpImageSampleFootprintLodNV);
symbolTable.relateToOperator("textureFootprintGradNV", EOpImageSampleFootprintGradNV);
symbolTable.relateToOperator("textureFootprintGradClampNV", EOpImageSampleFootprintGradClampNV);
-#endif
+
+ 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("ftransform", EOpFtransform);
symbolTable.relateToOperator("texture1D", EOpTexture);
symbolTable.relateToOperator("texture1DGradARB", EOpTextureGrad);
@@ -9323,7 +8565,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("allInvocations", EOpAllInvocations);
symbolTable.relateToOperator("allInvocationsEqual", EOpAllInvocationsEqual);
}
-#ifdef AMD_EXTENSIONS
symbolTable.relateToOperator("minInvocationsAMD", EOpMinInvocations);
symbolTable.relateToOperator("maxInvocationsAMD", EOpMaxInvocations);
symbolTable.relateToOperator("addInvocationsAMD", EOpAddInvocations);
@@ -9368,7 +8609,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("fragmentMaskFetchAMD", EOpFragmentMaskFetch);
symbolTable.relateToOperator("fragmentFetchAMD", EOpFragmentFetch);
-#endif
}
// GL_KHR_shader_subgroup
@@ -9429,7 +8669,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("subgroupQuadSwapVertical", EOpSubgroupQuadSwapVertical);
symbolTable.relateToOperator("subgroupQuadSwapDiagonal", EOpSubgroupQuadSwapDiagonal);
-#ifdef NV_EXTENSIONS
symbolTable.relateToOperator("subgroupPartitionNV", EOpSubgroupPartition);
symbolTable.relateToOperator("subgroupPartitionedAddNV", EOpSubgroupPartitionedAdd);
symbolTable.relateToOperator("subgroupPartitionedMulNV", EOpSubgroupPartitionedMul);
@@ -9452,7 +8691,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("subgroupPartitionedExclusiveAndNV", EOpSubgroupPartitionedExclusiveAnd);
symbolTable.relateToOperator("subgroupPartitionedExclusiveOrNV", EOpSubgroupPartitionedExclusiveOr);
symbolTable.relateToOperator("subgroupPartitionedExclusiveXorNV", EOpSubgroupPartitionedExclusiveXor);
-#endif
}
if (profile == EEsProfile) {
@@ -9477,9 +8715,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
break;
case EShLangFragment:
- symbolTable.relateToOperator("dFdx", EOpDPdx);
- symbolTable.relateToOperator("dFdy", EOpDPdy);
- symbolTable.relateToOperator("fwidth", EOpFwidth);
if (profile != EEsProfile && version >= 400) {
symbolTable.relateToOperator("dFdxFine", EOpDPdxFine);
symbolTable.relateToOperator("dFdyFine", EOpDPdyFine);
@@ -9492,17 +8727,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
-#ifdef AMD_EXTENSIONS
if (profile != EEsProfile)
symbolTable.relateToOperator("interpolateAtVertexAMD", EOpInterpolateAtVertex);
-#endif
+
+ symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock);
+ symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock);
+
break;
case EShLangCompute:
- symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
- symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared);
-#ifdef NV_EXTENSIONS
if ((profile != EEsProfile && version >= 450) ||
(profile == EEsProfile && version >= 320)) {
symbolTable.relateToOperator("dFdx", EOpDPdx);
@@ -9515,13 +8749,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse);
}
-#endif
symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoad);
symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStore);
symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd);
break;
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV:
case EShLangClosestHitNV:
case EShLangMissNV:
@@ -9554,13 +8786,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
+ symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared);
}
break;
-#endif
default:
assert(false && "Language not supported");
}
+#endif
}
//
@@ -9574,6 +8807,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
//
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
{
+#ifndef GLSLANG_WEB
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);
@@ -9619,6 +8853,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
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);
@@ -9629,6 +8869,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
default:
break;
}
+#endif
}
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Initialize.h b/thirdparty/glslang/glslang/MachineIndependent/Initialize.h
index b5de324233..ac8ec33e99 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Initialize.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/Initialize.h
@@ -91,6 +91,8 @@ public:
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);
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
index 584d880501..d0f86e6389 100644..100755
--- a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
@@ -123,12 +123,12 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
if ((op == EOpAdd || op == EOpSub) && extensionRequested(E_GL_EXT_buffer_reference2)) {
// No addressing math on struct with unsized array.
- if ((left->getBasicType() == EbtReference && left->getType().getReferentType()->containsUnsizedArray()) ||
- (right->getBasicType() == EbtReference && right->getType().getReferentType()->containsUnsizedArray())) {
+ if ((left->isReference() && left->getType().getReferentType()->containsUnsizedArray()) ||
+ (right->isReference() && right->getType().getReferentType()->containsUnsizedArray())) {
return nullptr;
}
- if (left->getBasicType() == EbtReference && isTypeInt(right->getBasicType())) {
+ 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));
@@ -141,7 +141,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
return node;
}
- if (op == EOpAdd && right->getBasicType() == EbtReference && isTypeInt(left->getBasicType())) {
+ 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));
@@ -154,7 +154,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
return node;
}
- if (op == EOpSub && left->getBasicType() == EbtReference && right->getBasicType() == EbtReference) {
+ 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));
@@ -170,7 +170,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
}
// No other math operators supported on references
- if (left->getBasicType() == EbtReference || right->getBasicType() == EbtReference) {
+ if (left->isReference() || right->isReference()) {
return nullptr;
}
}
@@ -216,7 +216,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
node->getWritableType().getQualifier().makeSpecConstant();
// If must propagate nonuniform, make a nonuniform.
- if ((node->getLeft()->getQualifier().nonUniform || node->getRight()->getQualifier().nonUniform) &&
+ if ((node->getLeft()->getQualifier().isNonUniform() || node->getRight()->getQualifier().isNonUniform()) &&
isNonuniformPropagating(node->getOp()))
node->getWritableType().getQualifier().nonUniform = true;
@@ -290,7 +290,7 @@ TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TInterm
// 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->getBasicType() == EbtReference &&
+ if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference() &&
extensionRequested(E_GL_EXT_buffer_reference2)) {
if (!(right->getType().isScalar() && right->getType().isIntegerDomain()))
@@ -359,7 +359,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
switch (op) {
case EOpLogicalNot:
- if (source == EShSourceHlsl) {
+ if (getSource() == EShSourceHlsl) {
break; // HLSL can promote logical not
}
@@ -383,18 +383,20 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
//
TBasicType newType = EbtVoid;
switch (op) {
- case EOpConstructInt8: newType = EbtInt8; break;
- case EOpConstructUint8: newType = EbtUint8; break;
- case EOpConstructInt16: newType = EbtInt16; break;
- case EOpConstructUint16: newType = EbtUint16; break;
+ case EOpConstructBool: newType = EbtBool; break;
+ case EOpConstructFloat: newType = EbtFloat; break;
case EOpConstructInt: newType = EbtInt; break;
case EOpConstructUint: newType = EbtUint; break;
+#ifndef GLSLANG_WEB
+ 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 EOpConstructBool: newType = EbtBool; break;
- case EOpConstructFloat: newType = EbtFloat; break;
case EOpConstructDouble: newType = EbtDouble; break;
case EOpConstructFloat16: newType = EbtFloat16; break;
+#endif
default: break; // some compilers want this
}
@@ -449,7 +451,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
node->getWritableType().getQualifier().makeSpecConstant();
// If must propagate nonuniform, make a nonuniform.
- if (node->getOperand()->getQualifier().nonUniform && isNonuniformPropagating(node->getOp()))
+ if (node->getOperand()->getQualifier().isNonUniform() && isNonuniformPropagating(node->getOp()))
node->getWritableType().getQualifier().nonUniform = true;
return node;
@@ -536,15 +538,13 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
return false;
case EbtAtomicUint:
case EbtSampler:
-#ifdef NV_EXTENSIONS
case EbtAccStructNV:
-#endif
// opaque types can be passed to functions
if (op == EOpFunction)
break;
// HLSL can assign samplers directly (no constructor)
- if (source == EShSourceHlsl && node->getBasicType() == EbtSampler)
+ if (getSource() == EShSourceHlsl && node->getBasicType() == EbtSampler)
break;
// samplers can get assigned via a sampler constructor
@@ -562,107 +562,50 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
return true;
}
-// 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
+bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const
{
- //
- // Add a new newNode for the conversion.
- //
- TIntermUnary* newNode = nullptr;
-
- TOperator newOp = EOpNull;
-
- // Certain explicit conversions are allowed conditionally
- bool arithemeticInt8Enabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8);
-#ifdef AMD_EXTENSIONS
- bool arithemeticInt16Enabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16) ||
- extensionRequested(E_GL_AMD_gpu_shader_int16);
-
- bool arithemeticFloat16Enabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16) ||
- extensionRequested(E_GL_AMD_gpu_shader_half_float);
-#else
- bool arithemeticInt16Enabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
-
- bool arithemeticFloat16Enabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16);
-#endif
- 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 == EbtFloat || convertTo == EbtDouble);
-
- bool convertFromFloatTypes = (node->getBasicType() == EbtFloat16 ||
- node->getBasicType() == EbtFloat ||
- node->getBasicType() == EbtDouble);
-
- if (! arithemeticInt8Enabled) {
- if (((convertTo == EbtInt8 || convertTo == EbtUint8) && ! convertFromIntTypes) ||
- ((node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8) && ! convertToIntTypes))
- return nullptr;
- }
-
- if (! arithemeticInt16Enabled) {
- if (((convertTo == EbtInt16 || convertTo == EbtUint16) && ! convertFromIntTypes) ||
- ((node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16) && ! convertToIntTypes))
- return nullptr;
- }
-
- if (! arithemeticFloat16Enabled) {
- if ((convertTo == EbtFloat16 && ! convertFromFloatTypes) ||
- (node->getBasicType() == EbtFloat16 && ! convertToFloatTypes))
- return nullptr;
- }
-
- switch (convertTo) {
+ switch (dst) {
+#ifndef GLSLANG_WEB
case EbtDouble:
- switch (node->getBasicType()) {
+ switch (src) {
+ case EbtUint: newOp = EOpConvUintToDouble; break;
+ case EbtBool: newOp = EOpConvBoolToDouble; break;
+ case EbtFloat: newOp = EOpConvFloatToDouble; break;
+ case EbtInt: newOp = EOpConvIntToDouble; break;
case EbtInt8: newOp = EOpConvInt8ToDouble; break;
case EbtUint8: newOp = EOpConvUint8ToDouble; break;
case EbtInt16: newOp = EOpConvInt16ToDouble; break;
case EbtUint16: newOp = EOpConvUint16ToDouble; break;
- case EbtInt: newOp = EOpConvIntToDouble; break;
- case EbtUint: newOp = EOpConvUintToDouble; break;
- case EbtBool: newOp = EOpConvBoolToDouble; break;
- case EbtFloat: newOp = EOpConvFloatToDouble; break;
case EbtFloat16: newOp = EOpConvFloat16ToDouble; break;
case EbtInt64: newOp = EOpConvInt64ToDouble; break;
case EbtUint64: newOp = EOpConvUint64ToDouble; break;
default:
- return nullptr;
+ return false;
}
break;
+#endif
case EbtFloat:
- switch (node->getBasicType()) {
- case EbtInt8: newOp = EOpConvInt8ToFloat; break;
- case EbtUint8: newOp = EOpConvUint8ToFloat; break;
- case EbtInt16: newOp = EOpConvInt16ToFloat; break;
- case EbtUint16: newOp = EOpConvUint16ToFloat; break;
+ switch (src) {
case EbtInt: newOp = EOpConvIntToFloat; break;
case EbtUint: newOp = EOpConvUintToFloat; break;
case EbtBool: newOp = EOpConvBoolToFloat; break;
+#ifndef GLSLANG_WEB
case EbtDouble: newOp = EOpConvDoubleToFloat; break;
+ case EbtInt8: newOp = EOpConvInt8ToFloat; break;
+ case EbtUint8: newOp = EOpConvUint8ToFloat; break;
+ case EbtInt16: newOp = EOpConvInt16ToFloat; break;
+ case EbtUint16: newOp = EOpConvUint16ToFloat; break;
case EbtFloat16: newOp = EOpConvFloat16ToFloat; break;
case EbtInt64: newOp = EOpConvInt64ToFloat; break;
case EbtUint64: newOp = EOpConvUint64ToFloat; break;
+#endif
default:
- return nullptr;
+ return false;
}
break;
+#ifndef GLSLANG_WEB
case EbtFloat16:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtInt8: newOp = EOpConvInt8ToFloat16; break;
case EbtUint8: newOp = EOpConvUint8ToFloat16; break;
case EbtInt16: newOp = EOpConvInt16ToFloat16; break;
@@ -675,28 +618,32 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtInt64: newOp = EOpConvInt64ToFloat16; break;
case EbtUint64: newOp = EOpConvUint64ToFloat16; break;
default:
- return nullptr;
+ return false;
}
break;
+#endif
case EbtBool:
- switch (node->getBasicType()) {
- case EbtInt8: newOp = EOpConvInt8ToBool; break;
- case EbtUint8: newOp = EOpConvUint8ToBool; break;
- case EbtInt16: newOp = EOpConvInt16ToBool; break;
- case EbtUint16: newOp = EOpConvUint16ToBool; break;
+ switch (src) {
case EbtInt: newOp = EOpConvIntToBool; break;
case EbtUint: newOp = EOpConvUintToBool; break;
case EbtFloat: newOp = EOpConvFloatToBool; break;
+#ifndef GLSLANG_WEB
case EbtDouble: newOp = EOpConvDoubleToBool; break;
+ case EbtInt8: newOp = EOpConvInt8ToBool; break;
+ case EbtUint8: newOp = EOpConvUint8ToBool; break;
+ case EbtInt16: newOp = EOpConvInt16ToBool; break;
+ case EbtUint16: newOp = EOpConvUint16ToBool; break;
case EbtFloat16: newOp = EOpConvFloat16ToBool; break;
case EbtInt64: newOp = EOpConvInt64ToBool; break;
case EbtUint64: newOp = EOpConvUint64ToBool; break;
+#endif
default:
- return nullptr;
+ return false;
}
break;
+#ifndef GLSLANG_WEB
case EbtInt8:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtUint8: newOp = EOpConvUint8ToInt8; break;
case EbtInt16: newOp = EOpConvInt16ToInt8; break;
case EbtUint16: newOp = EOpConvUint16ToInt8; break;
@@ -709,11 +656,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtDouble: newOp = EOpConvDoubleToInt8; break;
case EbtFloat16: newOp = EOpConvFloat16ToInt8; break;
default:
- return nullptr;
+ return false;
}
break;
case EbtUint8:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtInt8: newOp = EOpConvInt8ToUint8; break;
case EbtInt16: newOp = EOpConvInt16ToUint8; break;
case EbtUint16: newOp = EOpConvUint16ToUint8; break;
@@ -726,12 +673,12 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtDouble: newOp = EOpConvDoubleToUint8; break;
case EbtFloat16: newOp = EOpConvFloat16ToUint8; break;
default:
- return nullptr;
+ return false;
}
break;
case EbtInt16:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtUint8: newOp = EOpConvUint8ToInt16; break;
case EbtInt8: newOp = EOpConvInt8ToInt16; break;
case EbtUint16: newOp = EOpConvUint16ToInt16; break;
@@ -744,11 +691,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtDouble: newOp = EOpConvDoubleToInt16; break;
case EbtFloat16: newOp = EOpConvFloat16ToInt16; break;
default:
- return nullptr;
+ return false;
}
break;
case EbtUint16:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtInt8: newOp = EOpConvInt8ToUint16; break;
case EbtUint8: newOp = EOpConvUint8ToUint16; break;
case EbtInt16: newOp = EOpConvInt16ToUint16; break;
@@ -761,46 +708,52 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtDouble: newOp = EOpConvDoubleToUint16; break;
case EbtFloat16: newOp = EOpConvFloat16ToUint16; break;
default:
- return nullptr;
+ return false;
}
break;
+#endif
case EbtInt:
- switch (node->getBasicType()) {
+ switch (src) {
+ case EbtUint: newOp = EOpConvUintToInt; break;
+ case EbtBool: newOp = EOpConvBoolToInt; break;
+ case EbtFloat: newOp = EOpConvFloatToInt; break;
+#ifndef GLSLANG_WEB
case EbtInt8: newOp = EOpConvInt8ToInt; break;
case EbtUint8: newOp = EOpConvUint8ToInt; break;
case EbtInt16: newOp = EOpConvInt16ToInt; break;
case EbtUint16: newOp = EOpConvUint16ToInt; break;
- case EbtUint: newOp = EOpConvUintToInt; break;
- case EbtBool: newOp = EOpConvBoolToInt; break;
- case EbtFloat: newOp = EOpConvFloatToInt; break;
case EbtDouble: newOp = EOpConvDoubleToInt; break;
case EbtFloat16: newOp = EOpConvFloat16ToInt; break;
case EbtInt64: newOp = EOpConvInt64ToInt; break;
case EbtUint64: newOp = EOpConvUint64ToInt; break;
+#endif
default:
- return nullptr;
+ return false;
}
break;
case EbtUint:
- switch (node->getBasicType()) {
+ switch (src) {
+ case EbtInt: newOp = EOpConvIntToUint; break;
+ case EbtBool: newOp = EOpConvBoolToUint; break;
+ case EbtFloat: newOp = EOpConvFloatToUint; break;
+#ifndef GLSLANG_WEB
case EbtInt8: newOp = EOpConvInt8ToUint; break;
case EbtUint8: newOp = EOpConvUint8ToUint; break;
case EbtInt16: newOp = EOpConvInt16ToUint; break;
case EbtUint16: newOp = EOpConvUint16ToUint; break;
- case EbtInt: newOp = EOpConvIntToUint; break;
- case EbtBool: newOp = EOpConvBoolToUint; break;
- case EbtFloat: newOp = EOpConvFloatToUint; break;
case EbtDouble: newOp = EOpConvDoubleToUint; break;
case EbtFloat16: newOp = EOpConvFloat16ToUint; break;
case EbtInt64: newOp = EOpConvInt64ToUint; break;
case EbtUint64: newOp = EOpConvUint64ToUint; break;
+#endif
default:
- return nullptr;
+ return false;
}
break;
+#ifndef GLSLANG_WEB
case EbtInt64:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtInt8: newOp = EOpConvInt8ToInt64; break;
case EbtUint8: newOp = EOpConvUint8ToInt64; break;
case EbtInt16: newOp = EOpConvInt16ToInt64; break;
@@ -813,11 +766,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtFloat16: newOp = EOpConvFloat16ToInt64; break;
case EbtUint64: newOp = EOpConvUint64ToInt64; break;
default:
- return nullptr;
+ return false;
}
break;
case EbtUint64:
- switch (node->getBasicType()) {
+ switch (src) {
case EbtInt8: newOp = EOpConvInt8ToUint64; break;
case EbtUint8: newOp = EOpConvUint8ToUint64; break;
case EbtInt16: newOp = EOpConvInt16ToUint64; break;
@@ -830,10 +783,64 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
case EbtFloat16: newOp = EOpConvFloat16ToUint64; break;
case EbtInt64: newOp = EOpConvInt64ToUint64; break;
default:
- return nullptr;
+ return false;
}
break;
+#endif
default:
+ return false;
+ }
+ return true;
+}
+
+// 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.
+ //
+
+#ifndef GLSLANG_WEB
+ 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 == EbtFloat || convertTo == EbtDouble);
+
+ bool convertFromFloatTypes = (node->getBasicType() == EbtFloat16 ||
+ node->getBasicType() == EbtFloat ||
+ node->getBasicType() == EbtDouble);
+
+ if (! getArithemeticInt8Enabled()) {
+ if (((convertTo == EbtInt8 || convertTo == EbtUint8) && ! convertFromIntTypes) ||
+ ((node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8) && ! convertToIntTypes))
+ return nullptr;
+ }
+
+ if (! getArithemeticInt16Enabled()) {
+ if (((convertTo == EbtInt16 || convertTo == EbtUint16) && ! convertFromIntTypes) ||
+ ((node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16) && ! convertToIntTypes))
+ return nullptr;
+ }
+
+ if (! getArithemeticFloat16Enabled()) {
+ if ((convertTo == EbtFloat16 && ! convertFromFloatTypes) ||
+ (node->getBasicType() == EbtFloat16 && ! convertToFloatTypes))
+ return nullptr;
+ }
+#endif
+
+ TIntermUnary* newNode = nullptr;
+ TOperator newOp = EOpNull;
+ if (!buildConvertOp(convertTo, node->getBasicType(), newOp)) {
return nullptr;
}
@@ -841,9 +848,18 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
newNode = addUnaryNode(newOp, node, node->getLoc(), newType);
if (node->getAsConstantUnion()) {
- TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType);
- if (folded)
- return folded;
+#ifndef GLSLANG_WEB
+ // 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)))
+#endif
+ {
+ TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType);
+ if (folded)
+ return folded;
+ }
}
// Propagate specialization-constant-ness, if allowed
@@ -933,7 +949,7 @@ TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* no
case EOpLogicalAnd:
case EOpLogicalOr:
case EOpLogicalXor:
- if (source == EShSourceHlsl)
+ if (getSource() == EShSourceHlsl)
promoteTo = std::make_tuple(EbtBool, EbtBool);
else
return std::make_tuple(node0, node1);
@@ -944,7 +960,7 @@ TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* no
// HLSL can promote bools to ints to make this work.
case EOpLeftShift:
case EOpRightShift:
- if (source == EShSourceHlsl) {
+ if (getSource() == EShSourceHlsl) {
TBasicType node0BasicType = node0->getBasicType();
if (node0BasicType == EbtBool)
node0BasicType = EbtInt;
@@ -1039,6 +1055,13 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpConstructFloat:
promoteTo = EbtFloat;
break;
+ case EOpConstructInt:
+ promoteTo = EbtInt;
+ break;
+ case EOpConstructUint:
+ promoteTo = EbtUint;
+ break;
+#ifndef GLSLANG_WEB
case EOpConstructDouble:
promoteTo = EbtDouble;
break;
@@ -1067,18 +1090,13 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
break;
- case EOpConstructInt:
- promoteTo = EbtInt;
- break;
- case EOpConstructUint:
- promoteTo = EbtUint;
- break;
case EOpConstructInt64:
promoteTo = EbtInt64;
break;
case EOpConstructUint64:
promoteTo = EbtUint64;
break;
+#endif
case EOpLogicalNot:
@@ -1111,6 +1129,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpLit:
case EOpMax:
case EOpMin:
+ case EOpMod:
case EOpModf:
case EOpPow:
case EOpReflect:
@@ -1122,7 +1141,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpConstructStruct:
case EOpConstructCooperativeMatrix:
- if (type.getBasicType() == EbtReference || node->getType().getBasicType() == EbtReference) {
+ if (type.isReference() || node->getType().isReference()) {
// types must match to assign a reference
if (type == node->getType())
return node;
@@ -1145,7 +1164,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpLeftShiftAssign:
case EOpRightShiftAssign:
{
- if (source == EShSourceHlsl && node->getType().getBasicType() == EbtBool)
+ if (getSource() == EShSourceHlsl && node->getType().getBasicType() == EbtBool)
promoteTo = type.getBasicType();
else {
if (isTypeInt(type.getBasicType()) && isTypeInt(node->getBasicType()))
@@ -1191,7 +1210,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
TIntermTyped* TIntermediate::addUniShapeConversion(TOperator op, const TType& type, TIntermTyped* node)
{
// some source languages don't do this
- switch (source) {
+ switch (getSource()) {
case EShSourceHlsl:
break;
case EShSourceGlsl:
@@ -1244,7 +1263,7 @@ TIntermTyped* TIntermediate::addUniShapeConversion(TOperator op, const TType& ty
void TIntermediate::addBiShapeConversion(TOperator op, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode)
{
// some source languages don't do this
- switch (source) {
+ switch (getSource()) {
case EShSourceHlsl:
break;
case EShSourceGlsl:
@@ -1347,7 +1366,7 @@ TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped*
// The new node that handles the conversion
TOperator constructorOp = mapTypeToConstructorOp(type);
- if (source == EShSourceHlsl) {
+ 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)
@@ -1460,13 +1479,15 @@ bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const
bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
{
+#ifdef GLSLANG_WEB
+ return false;
+#endif
+
switch (from) {
- case EbtInt8:
- switch (to) {
- case EbtUint8:
- case EbtInt16:
- case EbtUint16:
+ case EbtInt:
+ switch(to) {
case EbtUint:
+ return version >= 400 || getSource() == EShSourceHlsl;
case EbtInt64:
case EbtUint64:
return true;
@@ -1474,11 +1495,8 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtUint8:
- switch (to) {
- case EbtInt16:
- case EbtUint16:
- case EbtUint:
+ case EbtUint:
+ switch(to) {
case EbtInt64:
case EbtUint64:
return true;
@@ -1486,8 +1504,10 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtInt16:
- switch(to) {
+ case EbtInt8:
+ switch (to) {
+ case EbtUint8:
+ case EbtInt16:
case EbtUint16:
case EbtUint:
case EbtInt64:
@@ -1497,8 +1517,10 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtUint16:
- switch(to) {
+ case EbtUint8:
+ switch (to) {
+ case EbtInt16:
+ case EbtUint16:
case EbtUint:
case EbtInt64:
case EbtUint64:
@@ -1507,10 +1529,10 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtInt:
+ case EbtInt16:
switch(to) {
+ case EbtUint16:
case EbtUint:
- return version >= 400 || (source == EShSourceHlsl);
case EbtInt64:
case EbtUint64:
return true;
@@ -1518,8 +1540,9 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtUint:
+ case EbtUint16:
switch(to) {
+ case EbtUint:
case EbtInt64:
case EbtUint64:
return true;
@@ -1540,6 +1563,10 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const
{
+#ifdef GLSLANG_WEB
+ return false;
+#endif
+
if (to == EbtFloat && from == EbtFloat16) {
return true;
} else {
@@ -1550,12 +1577,9 @@ bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const
bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
{
switch (from) {
- case EbtInt8:
- case EbtUint8:
- case EbtInt16:
- case EbtUint16:
- switch (to) {
- case EbtFloat16:
+ case EbtInt:
+ case EbtUint:
+ switch(to) {
case EbtFloat:
case EbtDouble:
return true;
@@ -1563,9 +1587,13 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
break;
}
break;
- case EbtInt:
- case EbtUint:
- switch(to) {
+#ifndef GLSLANG_WEB
+ case EbtInt8:
+ case EbtUint8:
+ case EbtInt16:
+ case EbtUint16:
+ switch (to) {
+ case EbtFloat16:
case EbtFloat:
case EbtDouble:
return true;
@@ -1579,7 +1607,7 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
return true;
}
break;
-
+#endif
default:
break;
}
@@ -1592,7 +1620,7 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
//
bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op) const
{
- if (profile == EEsProfile || version == 110)
+ if (isEsProfile() || version == 110)
return false;
if (from == to)
@@ -1600,7 +1628,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
// TODO: Move more policies into language-specific handlers.
// Some languages allow more general (or potentially, more specific) conversions under some conditions.
- if (source == EShSourceHlsl) {
+ 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);
@@ -1667,7 +1695,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
}
// hlsl supported conversions
- if (source == EShSourceHlsl) {
+ if (getSource() == EShSourceHlsl) {
if (from == EbtBool && (to == EbtInt || to == EbtUint || to == EbtFloat))
return true;
}
@@ -1682,13 +1710,11 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtFloat:
case EbtDouble:
return true;
-#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
case EbtFloat16:
return extensionRequested(E_GL_AMD_gpu_shader_half_float);
-#endif
default:
return false;
}
@@ -1699,34 +1725,28 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtFloat:
return true;
case EbtBool:
- return (source == EShSourceHlsl);
-#ifdef AMD_EXTENSIONS
+ return getSource() == EShSourceHlsl;
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
-#endif
case EbtFloat16:
return
-#ifdef AMD_EXTENSIONS
extensionRequested(E_GL_AMD_gpu_shader_half_float) ||
-#endif
- (source == EShSourceHlsl);
+ getSource() == EShSourceHlsl;
default:
return false;
}
case EbtUint:
switch (from) {
case EbtInt:
- return version >= 400 || (source == EShSourceHlsl);
+ return version >= 400 || getSource() == EShSourceHlsl;
case EbtUint:
return true;
case EbtBool:
- return (source == EShSourceHlsl);
-#ifdef AMD_EXTENSIONS
+ return getSource() == EShSourceHlsl;
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
-#endif
default:
return false;
}
@@ -1735,11 +1755,9 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt:
return true;
case EbtBool:
- return (source == EShSourceHlsl);
-#ifdef AMD_EXTENSIONS
+ return getSource() == EShSourceHlsl;
case EbtInt16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
-#endif
default:
return false;
}
@@ -1750,11 +1768,9 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt64:
case EbtUint64:
return true;
-#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
-#endif
default:
return false;
}
@@ -1763,15 +1779,12 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt:
case EbtInt64:
return true;
-#ifdef AMD_EXTENSIONS
case EbtInt16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
-#endif
default:
return false;
}
case EbtFloat16:
-#ifdef AMD_EXTENSIONS
switch (from) {
case EbtInt16:
case EbtUint16:
@@ -1781,10 +1794,8 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
default:
break;
}
-#endif
return false;
case EbtUint16:
-#ifdef AMD_EXTENSIONS
switch (from) {
case EbtInt16:
case EbtUint16:
@@ -1792,7 +1803,6 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
default:
break;
}
-#endif
return false;
default:
return false;
@@ -1802,7 +1812,12 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
return false;
}
-static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType) {
+static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType)
+{
+#ifdef GLSLANG_WEB
+ return false;
+#endif
+
switch(sintType) {
case EbtInt8:
switch(uintType) {
@@ -1861,7 +1876,13 @@ static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBas
}
-static TBasicType getCorrespondingUnsignedType(TBasicType type) {
+static TBasicType getCorrespondingUnsignedType(TBasicType type)
+{
+#ifdef GLSLANG_WEB
+ assert(type == EbtInt);
+ return EbtUint;
+#endif
+
switch(type) {
case EbtInt8:
return EbtUint8;
@@ -1910,10 +1931,10 @@ std::tuple<TBasicType, TBasicType> TIntermediate::getConversionDestinatonType(TB
TBasicType res0 = EbtNumTypes;
TBasicType res1 = EbtNumTypes;
- if (profile == EEsProfile || version == 110)
- return std::make_tuple(res0, res1);;
+ if (isEsProfile() || version == 110)
+ return std::make_tuple(res0, res1);
- if (source == EShSourceHlsl) {
+ if (getSource() == EShSourceHlsl) {
if (canImplicitlyPromote(type1, type0, op)) {
res0 = type0;
res1 = type0;
@@ -1982,7 +2003,7 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
{
TOperator op = EOpNull;
- if (type.getQualifier().nonUniform)
+ if (type.getQualifier().isNonUniform())
return EOpConstructNonuniform;
if (type.isCoopMat())
@@ -1993,7 +2014,7 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
op = EOpConstructStruct;
break;
case EbtSampler:
- if (type.getSampler().combined)
+ if (type.getSampler().isCombined())
op = EOpConstructTextureSampler;
break;
case EbtFloat:
@@ -2035,6 +2056,121 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
}
}
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;
+#ifndef GLSLANG_WEB
case EbtDouble:
if (type.getMatrixCols()) {
switch (type.getMatrixCols()) {
@@ -2148,82 +2284,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
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 EbtInt64:
switch(type.getVectorSize()) {
case 1: op = EOpConstructInt64; break;
@@ -2242,47 +2302,10 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
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 EbtReference:
op = EOpConstructReference;
break;
+#endif
default:
break;
}
@@ -2741,6 +2764,7 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
if (aggRoot && aggRoot->getOp() == EOpNull)
aggRoot->setOperator(EOpSequence);
+#ifndef GLSLANG_WEB
// Propagate 'noContraction' label in backward from 'precise' variables.
glslang::PropagateNoContraction(*this);
@@ -2751,6 +2775,7 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
performTextureUpgradeAndSamplerRemovalTransformation(root);
break;
}
+#endif
return true;
}
@@ -3788,217 +3813,54 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
TConstUnionArray leftUnionArray(size);
for (int i=0; i < size; i++) {
- switch (promoteTo) {
- case EbtFloat:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- default:
- return node;
- }
- break;
- case EbtDouble:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- default:
- return node;
- }
- break;
- case EbtFloat16:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- default:
- return node;
- }
- break;
- case EbtInt:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- case EbtUint:
- leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getDConst()));
- break;
- default:
- return node;
- }
- break;
- case EbtUint:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- case EbtInt64:
- leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getDConst()));
- break;
- default:
- return node;
- }
- break;
- case EbtBool:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setBConst(rightUnionArray[i].getIConst() != 0);
- break;
- case EbtUint:
- leftUnionArray[i].setBConst(rightUnionArray[i].getUConst() != 0);
- break;
- case EbtInt64:
- leftUnionArray[i].setBConst(rightUnionArray[i].getI64Const() != 0);
- break;
- case EbtUint64:
- leftUnionArray[i].setBConst(rightUnionArray[i].getU64Const() != 0);
- break;
- case EbtBool:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i].setBConst(rightUnionArray[i].getDConst() != 0.0);
- break;
- default:
- return node;
- }
- break;
- case EbtInt64:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- case EbtUint64:
- leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getU64Const()));
- break;
- case EbtBool:
- leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getDConst()));
- break;
- default:
- return node;
- }
- break;
- case EbtUint64:
- switch (node->getType().getBasicType()) {
- case EbtInt:
- leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getIConst()));
- break;
- case EbtUint:
- leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getUConst()));
- break;
- case EbtInt64:
- leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getI64Const()));
- break;
- case EbtUint64:
- leftUnionArray[i] = rightUnionArray[i];
- break;
- case EbtBool:
- leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getBConst()));
- break;
- case EbtFloat:
- case EbtDouble:
- case EbtFloat16:
- leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getDConst()));
- break;
- default:
- return node;
- }
- break;
- default:
- return node;
+
+#define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast<CType>(rightUnionArray[i].Get()))
+#define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0)
+
+#ifdef GLSLANG_WEB
+#define TO_ALL(Get) \
+ switch (promoteTo) { \
+ case EbtFloat: PROMOTE(setDConst, double, Get); break; \
+ case EbtInt: PROMOTE(setIConst, int, Get); break; \
+ case EbtUint: PROMOTE(setUConst, unsigned int, Get); break; \
+ case EbtBool: PROMOTE_TO_BOOL(Get); break; \
+ default: return node; \
+ }
+#else
+#define TO_ALL(Get) \
+ switch (promoteTo) { \
+ 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, 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; \
+ }
+#endif
+
+ 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;
+#ifndef GLSLANG_WEB
+ case EbtFloat16: 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;
+#endif
+ default: return node;
}
}
@@ -4027,7 +3889,7 @@ bool TIntermediate::specConstantPropagates(const TIntermTyped& node1, const TInt
struct TextureUpgradeAndSamplerRemovalTransform : public TIntermTraverser {
void visitSymbol(TIntermSymbol* symbol) override {
if (symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isTexture()) {
- symbol->getWritableType().getSampler().combined = true;
+ symbol->getWritableType().getSampler().setCombined(true);
}
}
bool visitAggregate(TVisit, TIntermAggregate* ag) override {
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
index c9ddaeadb0..282ecca0e0 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
@@ -67,6 +67,8 @@ void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReaso
}
}
+#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL)
+
void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, ...)
{
@@ -113,6 +115,8 @@ void C_DECL TParseContextBase::ppWarn(const TSourceLoc& loc, const char* szReaso
va_end(args);
}
+#endif
+
//
// 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.
@@ -149,15 +153,13 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
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;
+#ifndef GLSLANG_WEB
case EvqBuffer:
- if (node->getQualifier().readonly)
+ if (node->getQualifier().isReadOnly())
message = "can't modify a readonly buffer";
-#ifdef NV_EXTENSIONS
- if (node->getQualifier().layoutShaderRecordNV)
+ if (node->getQualifier().isShaderRecordNV())
message = "can't modify a shaderrecordnv qualified buffer";
-#endif
break;
-#ifdef NV_EXTENSIONS
case EvqHitAttrNV:
if (language != EShLangIntersectNV)
message = "cannot modify hitAttributeNV in this stage";
@@ -172,13 +174,13 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
case EbtSampler:
message = "can't modify a sampler";
break;
- case EbtAtomicUint:
- message = "can't modify an atomic_uint";
- break;
case EbtVoid:
message = "can't modify void";
break;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
+ case EbtAtomicUint:
+ message = "can't modify an atomic_uint";
+ break;
case EbtAccStructNV:
message = "can't modify accelerationStructureNV";
break;
@@ -234,7 +236,7 @@ void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op,
}
TIntermSymbol* symNode = node->getAsSymbolNode();
- if (symNode && symNode->getQualifier().writeonly)
+ if (symNode && symNode->getQualifier().isWriteOnly())
error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str());
}
@@ -254,11 +256,17 @@ void TParseContextBase::trackLinkage(TSymbol& symbol)
// 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() && index >= type.getOuterArraySize()) {
+ if (type.isSizedArray() && !sizeIsSpecializationExpression() &&
+ index >= type.getOuterArraySize()) {
error(loc, "", "[", "array index out of range '%d'", index);
index = type.getOuterArraySize() - 1;
}
@@ -568,6 +576,7 @@ void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TStrin
selector.push_back(0);
}
+#ifdef ENABLE_HLSL
//
// Make the passed-in variable information become a member of the
// global uniform block. If this doesn't exist yet, make it.
@@ -612,6 +621,7 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
++firstNewMember;
}
+#endif
void TParseContextBase::finish()
{
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
index 6a8d379b09..a2224e1609 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
@@ -2,7 +2,7 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2015 LunarG, Inc.
// Copyright (C) 2015-2018 Google, Inc.
-// Copyright (C) 2017 ARM Limited.
+// Copyright (C) 2017, 2019 ARM Limited.
//
// All rights reserved.
//
@@ -56,13 +56,16 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
infoSink, forwardCompatible, messages, entryPoint),
inMain(false),
blockName(nullptr),
- limits(resources.limits),
+ limits(resources.limits)
+#ifndef GLSLANG_WEB
+ ,
atomicUintOffsets(nullptr), anyIndexLimits(false)
+#endif
{
// decide whether precision qualifiers should be ignored or respected
- if (profile == EEsProfile || spvVersion.vulkan > 0) {
+ if (isEsProfile() || spvVersion.vulkan > 0) {
precisionManager.respectPrecisionQualifiers();
- if (! parsingBuiltins && language == EShLangFragment && profile != EEsProfile && spvVersion.vulkan > 0)
+ if (! parsingBuiltins && language == EShLangFragment && !isEsProfile() && spvVersion.vulkan > 0)
precisionManager.warnAboutDefaults();
}
@@ -83,6 +86,7 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
globalInputDefaults.clear();
globalOutputDefaults.clear();
+#ifndef GLSLANG_WEB
// "Shaders in the transform
// feedback capturing mode have an initial global default of
// layout(xfb_buffer = 0) out;"
@@ -94,6 +98,7 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
if (language == EShLangGeometry)
globalOutputDefaults.layoutStream = 0;
+#endif
if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main")
infoSink.info.message(EPrefixError, "Source entry point must be \"main\"");
@@ -101,7 +106,9 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
TParseContext::~TParseContext()
{
+#ifndef GLSLANG_WEB
delete [] atomicUintOffsets;
+#endif
}
// Set up all default precisions as needed by the current environment.
@@ -121,7 +128,7 @@ void TParseContext::setPrecisionDefaults()
// replace with real precision defaults for those that have them
if (obeyPrecisionQualifiers()) {
- if (profile == EEsProfile) {
+ if (isEsProfile()) {
// Most don't have defaults, a few default to lowp.
TSampler sampler;
sampler.set(EbtFloat, Esd2D);
@@ -129,7 +136,7 @@ void TParseContext::setPrecisionDefaults()
sampler.set(EbtFloat, EsdCube);
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
sampler.set(EbtFloat, Esd2D);
- sampler.external = true;
+ sampler.setExternal(true);
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
}
@@ -138,7 +145,7 @@ void TParseContext::setPrecisionDefaults()
// 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 (profile == EEsProfile && language == EShLangFragment) {
+ if (isEsProfile() && language == EShLangFragment) {
defaultPrecision[EbtInt] = EpqMedium;
defaultPrecision[EbtUint] = EpqMedium;
} else {
@@ -147,7 +154,7 @@ void TParseContext::setPrecisionDefaults()
defaultPrecision[EbtFloat] = EpqHigh;
}
- if (profile != EEsProfile) {
+ if (!isEsProfile()) {
// Non-ES profile
// All sampler precisions default to highp.
for (int type = 0; type < maxSamplerIndex; ++type)
@@ -163,7 +170,9 @@ void TParseContext::setPrecisionDefaults()
void TParseContext::setLimits(const TBuiltInResource& r)
{
resources = r;
+ intermediate.setLimits(r);
+#ifndef GLSLANG_WEB
anyIndexLimits = ! limits.generalAttributeMatrixVectorIndexing ||
! limits.generalConstantMatrixVectorIndexing ||
! limits.generalSamplerIndexing ||
@@ -171,7 +180,6 @@ void TParseContext::setLimits(const TBuiltInResource& r)
! limits.generalVariableIndexing ||
! limits.generalVaryingIndexing;
- intermediate.setLimits(resources);
// "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
@@ -179,6 +187,7 @@ void TParseContext::setLimits(const TBuiltInResource& r)
atomicUintOffsets = new int[resources.maxAtomicCounterBindings];
for (int b = 0; b < resources.maxAtomicCounterBindings; ++b)
atomicUintOffsets[b] = 0;
+#endif
}
//
@@ -213,6 +222,7 @@ void TParseContext::parserError(const char* s)
void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
{
+#ifndef GLSLANG_WEB
if (pragmaCallback)
pragmaCallback(loc.line, tokens);
@@ -285,6 +295,7 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
warn(loc, "not implemented", "#pragma once", "");
} else if (tokens[0].compare("glslang_binary_double_output") == 0)
intermediate.setBinaryDoubleOutput();
+#endif
}
//
@@ -298,6 +309,7 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
if (symbol && symbol->getNumExtensions())
requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str());
+#ifndef GLSLANG_WEB
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,
@@ -307,11 +319,17 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
// 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.
- if (symbol->getType().containsUnsizedArray() ||
- (symbol->getAsAnonMember() &&
- symbol->getAsAnonMember()->getAnonContainer().getType().containsUnsizedArray()))
- makeEditable(symbol);
+ //
+ // 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);
+ }
}
+#endif
const TVariable* variable;
const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr;
@@ -334,8 +352,7 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
// See if it was a variable.
variable = symbol ? symbol->getAsVariable() : nullptr;
if (variable) {
- if ((variable->getType().getBasicType() == EbtBlock ||
- variable->getType().getBasicType() == EbtStruct) && variable->getType().getStruct() == nullptr) {
+ if (variable->getType().isUnusableName()) {
error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), "");
variable = nullptr;
}
@@ -357,7 +374,7 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
if (variable->getType().getQualifier().isIo())
intermediate.addIoAccessed(*string);
- if (variable->getType().getBasicType() == EbtReference &&
+ if (variable->getType().isReference() &&
variable->getType().getQualifier().bufferReferenceNeedsVulkanMemoryModel()) {
intermediate.setUseVulkanMemoryModel();
}
@@ -378,7 +395,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
variableCheck(base);
if (! base->isArray() && ! base->isMatrix() && ! base->isVector() && ! base->getType().isCoopMat() &&
- base->getBasicType() != EbtReference) {
+ ! base->isReference()) {
if (base->getAsSymbolNode())
error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), "");
else
@@ -389,7 +406,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
}
if (!base->isArray() && base->isVector()) {
- if (base->getType().containsBasicType(EbtFloat16))
+ 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");
@@ -407,23 +424,24 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
// at least one of base and index is not a front-end constant variable...
TIntermTyped* result = nullptr;
- if (base->getBasicType() == EbtReference && ! base->isArray()) {
+#ifndef GLSLANG_WEB
+ if (base->isReference() && ! base->isArray()) {
requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference indexing");
result = intermediate.addBinaryMath(EOpAdd, base, index, loc);
result->setType(base->getType());
return result;
}
+ if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
+ handleIoResizeArrayAccess(loc, base);
+#endif
if (index->getQualifier().isFrontEndConstant())
checkIndex(loc, base->getType(), indexValue);
- if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
- handleIoResizeArrayAccess(loc, base);
-
if (index->getQualifier().isFrontEndConstant()) {
+#ifndef GLSLANG_WEB
if (base->getType().isUnsizedArray()) {
base->getWritableType().updateImplicitArraySize(indexValue + 1);
-#ifdef NV_EXTENSIONS
// 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();
@@ -434,11 +452,12 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
arraySizes.setDimSize(1, std::max(arraySizes.getDimSize(1), indexValue + 1));
}
}
-#endif
} else
+#endif
checkIndex(loc, base->getType(), indexValue);
result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
} else {
+#ifndef GLSLANG_WEB
if (base->getType().isUnsizedArray()) {
// we have a variable index into an unsized array, which is okay,
// depending on the situation
@@ -450,6 +469,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
}
base->getWritableType().setArrayVariablyIndexed();
}
+#endif
if (base->getBasicType() == EbtBlock) {
if (base->getQualifier().storage == EvqBuffer)
requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array");
@@ -457,7 +477,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5,
"variable indexing uniform block array");
else {
- // input/output blocks either don't exist or can be variable indexed
+ // input/output blocks either don't exist or can't be variably indexed
}
} else if (language == EShLangFragment && base->getQualifier().isPipeOutput())
requireProfile(base->getLoc(), ~EEsProfile, "variable indexing fragment shader output array");
@@ -471,8 +491,8 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
result = intermediate.addIndex(EOpIndexIndirect, base, index, loc);
}
- // Insert valid dereferenced result
- TType newType(base->getType(), 0); // dereferenced type
+ // 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.
@@ -480,20 +500,27 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
newType.getQualifier().makeSpecConstant();
}
} else {
- newType.getQualifier().makePartialTemporary();
+ newType.getQualifier().storage = EvqTemporary;
+ newType.getQualifier().specConstant = false;
}
result->setType(newType);
+#ifndef GLSLANG_WEB
+ 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);
+#endif
return result;
}
+#ifndef GLSLANG_WEB
+
// 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)
{
@@ -530,14 +557,12 @@ 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)
-#ifdef NV_EXTENSIONS
- ||
- (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && type.getQualifier().pervertexNV) ||
- (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)
-
-#endif
- );
+ (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut &&
+ ! type.getQualifier().patch) ||
+ (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
+ type.getQualifier().pervertexNV) ||
+ (language == EShLangMeshNV && 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
@@ -566,11 +591,7 @@ void TParseContext::fixIoArraySize(const TSourceLoc& loc, TType& type)
void TParseContext::ioArrayCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
if (! type.isArray() && ! symbolTable.atBuiltInLevel()) {
- if (type.getQualifier().isArrayedIo(language)
-#ifdef NV_EXTENSIONS
- && !type.getQualifier().layoutPassthrough
-#endif
- )
+ if (type.getQualifier().isArrayedIo(language) && !type.getQualifier().layoutPassthrough)
error(loc, "type must be an array:", type.getStorageQualifierString(), identifier.c_str());
}
}
@@ -617,12 +638,7 @@ void TParseContext::checkIoArraysConsistency(const TSourceLoc &loc, bool tailOnl
// 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
-#ifdef NV_EXTENSIONS
- || (language == EShLangMeshNV)
-#endif
- )
- {
+ if (firstIteration || (language == EShLangMeshNV)) {
requiredSize = getIoArrayImplicitSize(type.getQualifier(), &featureString);
if (requiredSize == 0)
break;
@@ -647,14 +663,11 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
else if (language == EShLangTessControl) {
expectedSize = maxVertices;
str = "vertices";
- }
-#ifdef NV_EXTENSIONS
- else if (language == EShLangFragment) {
+ } else if (language == EShLangFragment) {
// Number of vertices for Fragment shader is always three.
expectedSize = 3;
str = "vertices";
- }
- else if (language == EShLangMeshNV) {
+ } else if (language == EShLangMeshNV) {
unsigned int maxPrimitives =
intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
if (qualifier.builtIn == EbvPrimitiveIndicesNV) {
@@ -671,7 +684,6 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
str = "max_vertices";
}
}
-#endif
if (featureString)
*featureString = str;
return expectedSize;
@@ -686,19 +698,19 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS
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());
-#ifdef NV_EXTENSIONS
else if (language == EShLangFragment) {
if (type.getOuterArraySize() > requiredSize)
error(loc, " cannot be greater than 3 for pervertexNV", feature, name.c_str());
}
else if (language == EShLangMeshNV)
error(loc, "inconsistent output array size of", feature, name.c_str());
-#endif
else
assert(0);
}
}
+#endif // GLSLANG_WEB
+
// 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)
@@ -721,7 +733,7 @@ TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char*
break;
}
- if (((left->getType().containsBasicType(EbtFloat16) || right->getType().containsBasicType(EbtFloat16)) && !float16Arithmetic()) ||
+ if (((left->getType().contains16BitFloat() || right->getType().contains16BitFloat()) && !float16Arithmetic()) ||
((left->getType().contains16BitInt() || right->getType().contains16BitInt()) && !int16Arithmetic()) ||
((left->getType().contains8BitInt() || right->getType().contains8BitInt()) && !int8Arithmetic())) {
allowed = false;
@@ -743,14 +755,13 @@ TIntermTyped* TParseContext::handleUnaryMath(const TSourceLoc& loc, const char*
rValueErrorCheck(loc, str, childNode);
bool allowed = true;
- if ((childNode->getType().containsBasicType(EbtFloat16) && !float16Arithmetic()) ||
+ if ((childNode->getType().contains16BitFloat() && !float16Arithmetic()) ||
(childNode->getType().contains16BitInt() && !int16Arithmetic()) ||
(childNode->getType().contains8BitInt() && !int8Arithmetic())) {
allowed = false;
}
TIntermTyped* result = nullptr;
-
if (allowed)
result = intermediate.addUnaryMath(op, childNode, loc);
@@ -819,7 +830,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
TSwizzleSelectors<TVectorSelector> selectors;
parseSwizzleSelector(loc, field, base->getVectorSize(), selectors);
- if (base->isVector() && selectors.size() != 1 && base->getType().containsBasicType(EbtFloat16))
+ 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");
@@ -854,12 +865,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
if (base->getType().getQualifier().isSpecConstant())
result->getWritableType().getQualifier().makeSpecConstant();
}
- } else if (base->getBasicType() == EbtStruct ||
- base->getBasicType() == EbtBlock ||
- base->getBasicType() == EbtReference) {
- const TTypeList* fields = base->getBasicType() == EbtReference ?
- base->getType().getReferentType()->getStruct() :
- base->getType().getStruct();
+ } 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) {
@@ -879,14 +888,15 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
if ((*fields)[member].type->getQualifier().isIo())
intermediate.addIoAccessed(field);
}
+ inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier());
} 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().c_str());
// Propagate noContraction up the dereference chain
- if (base->getQualifier().noContraction)
- result->getWritableType().getQualifier().noContraction = true;
+ if (base->getQualifier().isNoContraction())
+ result->getWritableType().getQualifier().setNoContraction();
// Propagate nonuniform
if (base->getQualifier().isNonUniform())
@@ -1126,7 +1136,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (builtIn && fnCandidate->getNumExtensions())
requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str());
- if (builtIn && fnCandidate->getType().containsBasicType(EbtFloat16))
+ 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");
@@ -1146,9 +1156,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped()))
error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
}
- TQualifier& argQualifier = arg->getAsTyped()->getQualifier();
- if (argQualifier.isMemory()) {
+ const TType& argType = arg->getAsTyped()->getType();
+ const TQualifier& argQualifier = argType.getQualifier();
+ if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) {
const char* message = "argument cannot drop memory qualifier when passed to formal parameter";
+#ifndef GLSLANG_WEB
if (argQualifier.volatil && ! formalQualifier.volatil)
error(arguments->getLoc(), message, "volatile", "");
if (argQualifier.coherent && ! (formalQualifier.devicecoherent || formalQualifier.coherent))
@@ -1165,18 +1177,19 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
error(arguments->getLoc(), message, "readonly", "");
if (argQualifier.writeonly && ! formalQualifier.writeonly)
error(arguments->getLoc(), message, "writeonly", "");
- if (!builtIn && argQualifier.restrict && ! formalQualifier.restrict)
- error(arguments->getLoc(), message, "restrict", "");
+ // 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..."
+#endif
}
- if (!builtIn && argQualifier.layoutFormat != formalQualifier.layoutFormat) {
+ 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.writeonly || (formalQualifier.layoutFormat != ElfNone &&
- argQualifier.layoutFormat != ElfNone))
+ if (!formalQualifier.isWriteOnly() || (formalQualifier.getFormat() != ElfNone &&
+ argQualifier.getFormat() != ElfNone))
error(arguments->getLoc(), "image formats must match", "format", "");
}
-
- if (builtIn && arg->getAsTyped()->getType().containsBasicType(EbtFloat16))
+ 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");
@@ -1216,9 +1229,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName());
}
+#ifndef GLSLANG_WEB
if (builtIn)
nonOpBuiltInCheck(loc, *fnCandidate, *call);
else
+#endif
userFunctionCallCheck(loc, *call);
}
@@ -1347,13 +1362,9 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction
operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision);
}
// compute the result precision
-#ifdef AMD_EXTENSIONS
if (agg->isSampling() ||
agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore ||
agg->getOp() == EOpImageLoadLod || agg->getOp() == EOpImageStoreLod)
-#else
- if (agg->isSampling() || agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore)
-#endif
resultPrecision = sequence[0]->getAsTyped()->getQualifier().precision;
else if (function.getType().getBasicType() != EbtBool)
resultPrecision = function.getType().getQualifier().precision == EpqNone ?
@@ -1374,7 +1385,9 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction
TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value)
{
+#ifndef GLSLANG_WEB
storage16BitAssignmentCheck(loc, value->getType(), "return");
+#endif
functionReturnsValue = true;
if (currentFunctionType->getBasicType() == EbtVoid) {
@@ -1399,6 +1412,7 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType
// See if the operation is being done in an illegal location.
void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op)
{
+#ifndef GLSLANG_WEB
switch (op) {
case EOpBarrier:
if (language == EShLangTessControl) {
@@ -1410,9 +1424,48 @@ void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op)
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;
}
+#endif
}
// Finish processing object.length(). This started earlier in handleDotDereference(), where
@@ -1430,29 +1483,28 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction
const TType& type = intermNode->getAsTyped()->getType();
if (type.isArray()) {
if (type.isUnsizedArray()) {
+#ifndef GLSLANG_WEB
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"
-#ifdef NV_EXTENSIONS
- || name == "gl_MeshVerticesNV"
- || name == "gl_MeshPrimitivesNV"
-#endif
- )
- {
+ if (name == "gl_in" || name == "gl_out" || name == "gl_MeshVerticesNV" ||
+ name == "gl_MeshPrimitivesNV") {
length = getIoArrayImplicitSize(type.getQualifier());
}
}
+#endif
if (length == 0) {
+#ifndef GLSLANG_WEB
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
+#endif
error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method");
}
} else if (type.getOuterArrayNode()) {
@@ -1485,6 +1537,7 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction
//
void TParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const
{
+#ifndef GLSLANG_WEB
TIntermAggregate* aggregate = arguments->getAsAggregate();
// Process each argument's conversion
@@ -1512,6 +1565,7 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
}
}
}
+#endif
}
//
@@ -1523,6 +1577,9 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
//
TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const
{
+#ifdef GLSLANG_WEB
+ return &intermNode;
+#else
TIntermSequence& arguments = intermNode.getSequence();
// Will there be any output conversions?
@@ -1590,6 +1647,7 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct
conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc());
return conversionTree;
+#endif
}
void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& fnCandidate, const TIntermOperator& callNode)
@@ -1602,6 +1660,7 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
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;
@@ -1691,7 +1750,8 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
gl_SemanticsRelease |
gl_SemanticsAcquireRelease |
gl_SemanticsMakeAvailable |
- gl_SemanticsMakeVisible))) {
+ gl_SemanticsMakeVisible |
+ gl_SemanticsVolatile))) {
error(loc, "Invalid semantics value", fnCandidate.getName().c_str(), "");
}
if (((storageClassSemantics | storageClassSemantics2) & ~(gl_StorageSemanticsBuffer |
@@ -1743,10 +1803,18 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
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.
@@ -1774,6 +1842,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
TString featureString;
const char* feature = nullptr;
switch (callNode.getOp()) {
+#ifndef GLSLANG_WEB
case EOpTextureGather:
case EOpTextureGatherOffset:
case EOpTextureGatherOffsets:
@@ -1830,7 +1899,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
error(loc, "must be a compile-time constant:", feature, "component argument");
}
-#ifdef AMD_EXTENSIONS
bool bias = false;
if (callNode.getOp() == EOpTextureGather)
bias = fnCandidate.getParamCount() > 3;
@@ -1845,12 +1913,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
}
-#endif
-
break;
}
-
-#ifdef AMD_EXTENSIONS
case EOpSparseTextureGather:
case EOpSparseTextureGatherOffset:
case EOpSparseTextureGatherOffsets:
@@ -1928,7 +1992,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
int arg = -1;
switch (callNode.getOp()) {
case EOpTextureOffset: arg = 2; break;
- case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().dim != EsdRect) ? 3 : 2; break;
+ case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().isRect()) ? 2 : 3; break;
case EOpTextureProjOffset: arg = 2; break;
case EOpTextureLodOffset: arg = 3; break;
case EOpTextureProjLodOffset: arg = 3; break;
@@ -1941,7 +2005,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (arg > 0) {
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow;
if (f16ShadowCompare)
++arg;
@@ -1961,7 +2025,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
break;
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
case EOpTraceNV:
if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", "");
@@ -1970,7 +2034,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "callable data number", "");
break;
-#endif
case EOpTextureQuerySamples:
case EOpImageQuerySamples:
@@ -1992,12 +2055,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
// 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) {
- if (imageType.getQualifier().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui)
+ 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().layoutFormat != ElfR32f && profile == EEsProfile)
+ else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
}
@@ -2025,13 +2088,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str());
memorySemanticsCheck(loc, fnCandidate, callNode);
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
-#ifdef NV_EXTENSIONS
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
- requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_int64, fnCandidate.getName().c_str());
-#endif
}
break;
}
@@ -2039,9 +2098,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
case EOpInterpolateAtCentroid:
case EOpInterpolateAtSample:
case EOpInterpolateAtOffset:
-#ifdef AMD_EXTENSIONS
case EOpInterpolateAtVertex:
-#endif
// Make sure the first argument is an interpolant, or an array element of an interpolant
if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
// It might still be an array element.
@@ -2051,13 +2108,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
//
// ES and desktop 4.3 and earlier: swizzles may not be used
// desktop 4.4 and later: swizzles may be used
- bool swizzleOkay = (profile != EEsProfile) && (version >= 440);
+ bool swizzleOkay = (!isEsProfile()) && (version >= 440);
const TIntermTyped* base = TIntermediate::findLValueBase(arg0, swizzleOkay);
if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), "");
}
-#ifdef AMD_EXTENSIONS
if (callNode.getOp() == EOpInterpolateAtVertex) {
if (!arg0->getType().getQualifier().isExplicitInterpolation())
error(loc, "argument must be qualified as __explicitInterpAMD in", "interpolant", "");
@@ -2071,8 +2127,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
}
}
}
-#endif
-
break;
case EOpEmitStreamVertex:
@@ -2103,9 +2157,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
break;
case EOpSubgroupBroadcast:
- // <id> must be an integral constant expression.
- if ((*argp)[1]->getAsConstantUnion() == nullptr)
- error(loc, "argument must be compile-time constant", "id", "");
+ case EOpSubgroupQuadBroadcast:
+ if (spvVersion.spv < EShTargetSpv_1_5) {
+ // <id> must be an integral constant expression.
+ if ((*argp)[1]->getAsConstantUnion() == nullptr)
+ error(loc, "argument must be compile-time constant", "id", "");
+ }
break;
case EOpBarrier:
@@ -2115,6 +2172,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
memorySemanticsCheck(loc, fnCandidate, callNode);
}
break;
+#endif
default:
break;
@@ -2132,7 +2190,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
const TSampler& sampler = fnCandidate[0].type->getSampler();
const bool isTexture = sampler.isTexture() && !sampler.isCombined();
- const bool isBuffer = sampler.dim == EsdBuffer;
+ const bool isBuffer = sampler.isBuffer();
const bool isFetch = callNode.getOp() == EOpTextureFetch || callNode.getOp() == EOpTextureFetchOffset;
if (isTexture && (!isBuffer || !isFetch))
@@ -2145,13 +2203,39 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
break;
}
- if (callNode.getOp() > EOpSubgroupGuardStart && callNode.getOp() < EOpSubgroupGuardStop) {
+ 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();
+ switch (type.getBasicType()) {
+ default:
+ break;
+ case EbtInt8:
+ case EbtUint8:
+ requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int8, type.getCompleteString().c_str());
+ break;
+ case EbtInt16:
+ case EbtUint16:
+ requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int16, type.getCompleteString().c_str());
+ break;
+ case EbtInt64:
+ case EbtUint64:
+ requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int64, type.getCompleteString().c_str());
+ break;
+ case EbtFloat16:
+ requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_float16, type.getCompleteString().c_str());
+ break;
+ }
+ }
}
}
+#ifndef GLSLANG_WEB
+
extern bool PureOperatorBuiltins;
// Deprecated! Use PureOperatorBuiltins == true instead, in which case this
@@ -2267,17 +2351,19 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn
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().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui)
+ 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().layoutFormat != ElfR32f && profile == EEsProfile)
+ else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
}
}
}
+#endif
+
//
// Do any extra checking for a user function call.
//
@@ -2425,6 +2511,7 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
bool errorReturn = false;
switch(binaryNode->getOp()) {
+#ifndef GLSLANG_WEB
case EOpIndexDirect:
case EOpIndexIndirect:
// ... tessellation control shader ...
@@ -2440,10 +2527,8 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
error(loc, "tessellation-control per-vertex output l-value must be indexed with gl_InvocationID", "[]", "");
}
}
-
- break; // left node is checked by base class
- case EOpIndexDirectStruct:
break; // left node is checked by base class
+#endif
case EOpVectorSwizzle:
errorReturn = lValueErrorCheck(loc, op, binaryNode->getLeft());
if (!errorReturn) {
@@ -2475,8 +2560,7 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
}
}
- if (binaryNode && binaryNode->getOp() == EOpIndexDirectStruct &&
- binaryNode->getLeft()->getBasicType() == EbtReference)
+ if (binaryNode && binaryNode->getOp() == EOpIndexDirectStruct && binaryNode->getLeft()->isReference())
return false;
// Let the base class check errors
@@ -2499,7 +2583,7 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
case EvqFragDepth:
intermediate.setDepthReplacing();
// "In addition, it is an error to statically write to gl_FragDepth in the fragment shader."
- if (profile == EEsProfile && intermediate.getEarlyFragmentTests())
+ if (isEsProfile() && intermediate.getEarlyFragmentTests())
message = "can't modify gl_FragDepth if using early_fragment_tests";
break;
@@ -2536,12 +2620,10 @@ void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
// Let the base class check errors
TParseContextBase::rValueErrorCheck(loc, op, node);
-#ifdef AMD_EXTENSIONS
TIntermSymbol* symNode = node->getAsSymbolNode();
- if (!(symNode && symNode->getQualifier().writeonly)) // base class checks
- if (symNode && symNode->getQualifier().explicitInterp)
+ 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());
-#endif
}
//
@@ -2587,14 +2669,14 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
if (builtInName(identifier))
error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
- // "__" are not supposed to be an error. ES 310 (and desktop) added the clarification:
+ // "__" 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) {
- if (profile == EEsProfile && version <= 300)
- error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version <= 300", identifier.c_str(), "");
+ 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(), "");
}
@@ -2606,7 +2688,7 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
//
void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* identifier, const char* op)
{
- // "__" are not supposed to be an error. ES 310 (and desktop) added the clarification:
+ // "__" 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
@@ -2618,14 +2700,14 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
else if (strncmp(identifier, "defined", 8) == 0)
ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
else if (strstr(identifier, "__") != 0) {
- if (profile == EEsProfile && version >= 300 &&
+ 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 (profile == EEsProfile && version <= 300)
- ppError(loc, "names containing consecutive underscores are reserved, and an error if version <= 300:", op, identifier);
+ if (isEsProfile() && version < 300)
+ 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);
}
@@ -2639,10 +2721,14 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
//
bool TParseContext::lineContinuationCheck(const TSourceLoc& loc, bool endOfComment)
{
+#ifdef GLSLANG_WEB
+ return true;
+#endif
+
const char* message = "line continuation";
- bool lineContinuationAllowed = (profile == EEsProfile && version >= 300) ||
- (profile != EEsProfile && (version >= 420 || extensionTurnedOn(E_GL_ARB_shading_language_420pack)));
+ bool lineContinuationAllowed = (isEsProfile() && version >= 300) ||
+ (!isEsProfile() && (version >= 420 || extensionTurnedOn(E_GL_ARB_shading_language_420pack)));
if (endOfComment) {
if (lineContinuationAllowed)
@@ -2691,10 +2777,27 @@ bool TParseContext::builtInName(const TString& identifier)
//
bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, TFunction& function, TOperator op, TType& type)
{
- type.shallowCopy(function.getType());
+ // 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) {
+#ifndef GLSLANG_WEB
+ case EOpConstructNonuniform:
+ if (node != nullptr && node->getAsTyped() != nullptr) {
+ type.shallowCopy(node->getAsTyped()->getType());
+ type.getQualifier().makeTemporary();
+ type.getQualifier().nonUniform = true;
+ }
+ break;
+#endif
+ default:
+ type.shallowCopy(function.getType());
+ break;
+ }
+ // See if it's a matrix
bool constructingMatrix = false;
- switch(op) {
+ switch (op) {
case EOpConstructTextureSampler:
return constructorTextureSamplerError(loc, function);
case EOpConstructMat2x2:
@@ -2706,6 +2809,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
case EOpConstructMat4x2:
case EOpConstructMat4x3:
case EOpConstructMat4x4:
+#ifndef GLSLANG_WEB
case EOpConstructDMat2x2:
case EOpConstructDMat2x3:
case EOpConstructDMat2x4:
@@ -2724,6 +2828,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
case EOpConstructF16Mat4x2:
case EOpConstructF16Mat4x3:
case EOpConstructF16Mat4x4:
+#endif
constructingMatrix = true;
break;
default:
@@ -2773,20 +2878,21 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
if (function[arg].type->isFloatingDomain())
floatArgument = true;
if (type.isStruct()) {
- if (function[arg].type->containsBasicType(EbtFloat16)) {
+ if (function[arg].type->contains16BitFloat()) {
requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type");
}
- if (function[arg].type->containsBasicType(EbtUint16) ||
- function[arg].type->containsBasicType(EbtInt16)) {
+ if (function[arg].type->contains16BitInt()) {
requireInt16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type");
}
- if (function[arg].type->containsBasicType(EbtUint8) ||
- function[arg].type->containsBasicType(EbtInt8)) {
+ if (function[arg].type->contains8BitInt()) {
requireInt8Arithmetic(loc, "constructor", "can't construct structure containing 8-bit type");
}
}
}
+ if (op == EOpConstructNonuniform)
+ constType = false;
+#ifndef GLSLANG_WEB
switch (op) {
case EOpConstructFloat16:
case EOpConstructF16Vec2:
@@ -2826,6 +2932,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
default:
break;
}
+#endif
// inherit constness from children
if (constType) {
@@ -2834,17 +2941,24 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
if (specConstType) {
switch (op) {
case EOpConstructInt8:
- case EOpConstructUint8:
- case EOpConstructInt16:
- case EOpConstructUint16:
case EOpConstructInt:
case EOpConstructUint:
- case EOpConstructInt64:
- case EOpConstructUint64:
case EOpConstructBool:
case EOpConstructBVec2:
case EOpConstructBVec3:
case EOpConstructBVec4:
+ case EOpConstructIVec2:
+ case EOpConstructIVec3:
+ case EOpConstructIVec4:
+ case EOpConstructUVec2:
+ case EOpConstructUVec3:
+ case EOpConstructUVec4:
+#ifndef GLSLANG_WEB
+ case EOpConstructUint8:
+ case EOpConstructInt16:
+ case EOpConstructUint16:
+ case EOpConstructInt64:
+ case EOpConstructUint64:
case EOpConstructI8Vec2:
case EOpConstructI8Vec3:
case EOpConstructI8Vec4:
@@ -2857,18 +2971,13 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
case EOpConstructU16Vec2:
case EOpConstructU16Vec3:
case EOpConstructU16Vec4:
- case EOpConstructIVec2:
- case EOpConstructIVec3:
- case EOpConstructIVec4:
- case EOpConstructUVec2:
- case EOpConstructUVec3:
- case EOpConstructUVec4:
case EOpConstructI64Vec2:
case EOpConstructI64Vec3:
case EOpConstructI64Vec4:
case EOpConstructU64Vec2:
case EOpConstructU64Vec3:
case EOpConstructU64Vec4:
+#endif
// This was the list of valid ones, if they aren't converting from float
// and aren't making an array.
makeSpecConst = ! floatArgument && ! type.isArray();
@@ -2978,7 +3087,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
error(loc, "cannot convert a sampler", "constructor", "");
return true;
}
- if (op != EOpConstructStruct && typed->getBasicType() == EbtAtomicUint) {
+ if (op != EOpConstructStruct && typed->isAtomic()) {
error(loc, "cannot convert an atomic_uint", "constructor", "");
return true;
}
@@ -3024,7 +3133,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
}
// 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.combined = false;
+ texture.setCombined(false);
texture.shadow = false;
if (texture != function[0].type->getSampler()) {
error(loc, "sampler-constructor first argument must match type and dimensionality of constructor type", token, "");
@@ -3076,14 +3185,14 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const
{
// 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().external) {
+ 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().yuv) {
+ if (type.getSampler().isYuv()) {
requireExtensions(loc, 1, &E_GL_EXT_YUV_target, "__samplerExternal2DY2YEXT");
}
@@ -3100,6 +3209,8 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const
}
}
+#ifndef GLSLANG_WEB
+
void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
if (type.getQualifier().storage == EvqUniform)
@@ -3110,7 +3221,7 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co
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());
}
-#ifdef NV_EXTENSIONS
+
void TParseContext::accStructNVCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
if (type.getQualifier().storage == EvqUniform)
@@ -3123,7 +3234,8 @@ void TParseContext::accStructNVCheck(const TSourceLoc& loc, const TType& type, c
type.getBasicTypeString().c_str(), identifier.c_str());
}
-#endif
+
+#endif // GLSLANG_WEB
void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
@@ -3188,7 +3300,7 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
break;
}
- if (!nonuniformOkay && qualifier.nonUniform)
+ if (!nonuniformOkay && qualifier.isNonUniform())
error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
invariantCheck(loc, qualifier);
@@ -3202,7 +3314,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
if (! symbolTable.atGlobalLevel())
return;
- if (!(publicType.userDef && publicType.userDef->getBasicType() == EbtReference)) {
+ if (!(publicType.userDef && publicType.userDef->isReference())) {
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()) {
@@ -3212,13 +3324,13 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
if (qualifier.storage == EvqBuffer &&
publicType.basicType != EbtBlock &&
- !qualifier.layoutBufferReference)
+ !qualifier.hasBufferReference())
error(loc, "buffers can be declared only as blocks", "buffer", "");
if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut)
return;
- if (publicType.shaderQualifiers.blendEquation)
+ 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
@@ -3231,25 +3343,15 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble)
profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
- if (!qualifier.flat
-#ifdef AMD_EXTENSIONS
- && !qualifier.explicitInterp
-#endif
-#ifdef NV_EXTENSIONS
- && !qualifier.pervertexNV
-#endif
- ) {
+ if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV()) {
if (isTypeInt(publicType.basicType) ||
publicType.basicType == EbtDouble ||
- (publicType.userDef && (publicType.userDef->containsBasicType(EbtInt8) ||
- publicType.userDef->containsBasicType(EbtUint8) ||
- publicType.userDef->containsBasicType(EbtInt16) ||
- publicType.userDef->containsBasicType(EbtUint16) ||
- publicType.userDef->containsBasicType(EbtInt) ||
- publicType.userDef->containsBasicType(EbtUint) ||
- publicType.userDef->containsBasicType(EbtInt64) ||
- publicType.userDef->containsBasicType(EbtUint64) ||
- publicType.userDef->containsBasicType(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)
@@ -3257,13 +3359,11 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
}
}
- if (qualifier.patch && qualifier.isInterpolation())
+ if (qualifier.isPatch() && qualifier.isInterpolation())
error(loc, "cannot use interpolation qualifiers with patch", "patch", "");
-#ifdef NV_EXTENSIONS
- if (qualifier.perTaskNV && publicType.basicType != EbtBlock)
+ if (qualifier.isTaskMemory() && publicType.basicType != EbtBlock)
error(loc, "taskNV variables can be declared only as blocks", "taskNV", "");
-#endif
if (qualifier.storage == EvqVaryingIn) {
switch (language) {
@@ -3281,18 +3381,6 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
if (qualifier.isAuxiliary() || qualifier.isInterpolation() || qualifier.isMemory() || qualifier.invariant)
error(loc, "vertex input cannot be further qualified", "", "");
break;
-
- case EShLangTessControl:
- if (qualifier.patch)
- error(loc, "can only use on output in tessellation-control shader", "patch", "");
- break;
-
- case EShLangTessEvaluation:
- break;
-
- case EShLangGeometry:
- break;
-
case EShLangFragment:
if (publicType.userDef) {
profileRequires(loc, EEsProfile, 300, nullptr, "fragment-shader struct input");
@@ -3303,12 +3391,16 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
requireProfile(loc, ~EEsProfile, "fragment-shader struct input containing an array");
}
break;
-
- case EShLangCompute:
+ case EShLangCompute:
if (! symbolTable.atBuiltInLevel())
error(loc, "global storage input qualifier cannot be used in a compute shader", "in", "");
break;
-
+#ifndef GLSLANG_WEB
+ case EShLangTessControl:
+ if (qualifier.patch)
+ error(loc, "can only use on output in tessellation-control shader", "patch", "");
+ break;
+#endif
default:
break;
}
@@ -3326,18 +3418,6 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
}
break;
-
- case EShLangTessControl:
- break;
-
- case EShLangTessEvaluation:
- if (qualifier.patch)
- error(loc, "can only use on input in tessellation-evaluation shader", "patch", "");
- break;
-
- case EShLangGeometry:
- break;
-
case EShLangFragment:
profileRequires(loc, EEsProfile, 300, nullptr, "fragment shader output");
if (publicType.basicType == EbtStruct) {
@@ -3359,7 +3439,12 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
case EShLangCompute:
error(loc, "global storage output qualifier cannot be used in a compute shader", "out", "");
break;
-
+#ifndef GLSLANG_WEB
+ case EShLangTessEvaluation:
+ if (qualifier.patch)
+ error(loc, "can only use on input in tessellation-evaluation shader", "patch", "");
+ break;
+#endif
default:
break;
}
@@ -3383,18 +3468,14 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
// Multiple interpolation qualifiers (mostly done later by 'individual qualifiers')
if (src.isInterpolation() && dst.isInterpolation())
-#ifdef AMD_EXTENSIONS
error(loc, "can only have one interpolation qualifier (flat, smooth, noperspective, __explicitInterpAMD)", "", "");
-#else
- error(loc, "can only have one interpolation qualifier (flat, smooth, noperspective)", "", "");
-#endif
// Ordering
- if (! force && ((profile != EEsProfile && version < 420) ||
- (profile == EEsProfile && version < 310))
+ if (! force && ((!isEsProfile() && version < 420) ||
+ (isEsProfile() && version < 310))
&& ! extensionTurnedOn(E_GL_ARB_shading_language_420pack)) {
// non-function parameters
- if (src.noContraction && (dst.invariant || dst.isInterpolation() || dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone))
+ 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 ", "", "");
@@ -3406,7 +3487,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
error(loc, "precision qualifier must appear as last qualifier", "", "");
// function parameters
- if (src.noContraction && (dst.storage == EvqConst || dst.storage == EvqIn || dst.storage == EvqOut))
+ 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", "", "");
@@ -3431,6 +3512,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
if (dst.precision == EpqNone || (force && src.precision != EpqNone))
dst.precision = src.precision;
+#ifndef GLSLANG_WEB
if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
(src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
(src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
@@ -3438,6 +3520,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
(src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent)))) {
error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), "");
}
+#endif
// Layout qualifiers
mergeObjectLayoutQualifiers(dst, src, false);
@@ -3445,19 +3528,17 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
bool repeated = false;
#define MERGE_SINGLETON(field) repeated |= dst.field && src.field; dst.field |= src.field;
MERGE_SINGLETON(invariant);
- MERGE_SINGLETON(noContraction);
MERGE_SINGLETON(centroid);
MERGE_SINGLETON(smooth);
MERGE_SINGLETON(flat);
+ MERGE_SINGLETON(specConstant);
+#ifndef GLSLANG_WEB
+ MERGE_SINGLETON(noContraction);
MERGE_SINGLETON(nopersp);
-#ifdef AMD_EXTENSIONS
MERGE_SINGLETON(explicitInterp);
-#endif
-#ifdef NV_EXTENSIONS
MERGE_SINGLETON(perPrimitiveNV);
MERGE_SINGLETON(perViewNV);
MERGE_SINGLETON(perTaskNV);
-#endif
MERGE_SINGLETON(patch);
MERGE_SINGLETON(sample);
MERGE_SINGLETON(coherent);
@@ -3470,8 +3551,8 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
MERGE_SINGLETON(restrict);
MERGE_SINGLETON(readonly);
MERGE_SINGLETON(writeonly);
- MERGE_SINGLETON(specConstant);
MERGE_SINGLETON(nonUniform);
+#endif
if (repeated)
error(loc, "replicated qualifiers", "", "");
@@ -3514,11 +3595,11 @@ void TParseContext::setDefaultPrecision(const TSourceLoc& loc, TPublicType& publ
// 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.external? 1 : 0;
- int imageIndex = sampler.image ? 1 : 0;
- int msIndex = sampler.ms ? 1 : 0;
+ 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;
@@ -3542,8 +3623,10 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba
if (! obeyPrecisionQualifiers() || parsingBuiltins)
return;
+#ifndef GLSLANG_WEB
if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh)
error(loc, "atomic counters can only be highp", "atomic_uint", "");
+#endif
if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) {
if (qualifier.precision == EpqNone) {
@@ -3562,8 +3645,7 @@ void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier
{
if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque())
error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), "");
-
- if (!parsingBuiltins && type.containsBasicType(EbtFloat16))
+ 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");
@@ -3726,51 +3808,53 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
(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", "[]", "");
+#ifndef GLSLANG_WEB
+
// desktop always allows outer-dimension-unsized variable arrays,
- if (profile != EEsProfile)
+ if (!isEsProfile())
return;
// for ES, if size isn't coming from an initializer, it has to be explicitly declared now,
// with very few exceptions
- // last member of ssbo block exception:
- if (qualifier.storage == EvqBuffer && lastMember)
- return;
-
// implicitly-sized io exceptions:
switch (language) {
case EShLangGeometry:
if (qualifier.storage == EvqVaryingIn)
- if ((profile == EEsProfile && version >= 320) ||
+ if ((isEsProfile() && version >= 320) ||
extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader))
return;
break;
case EShLangTessControl:
if ( qualifier.storage == EvqVaryingIn ||
- (qualifier.storage == EvqVaryingOut && ! qualifier.patch))
- if ((profile == EEsProfile && version >= 320) ||
+ (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.patch) ||
+ if ((qualifier.storage == EvqVaryingIn && ! qualifier.isPatch()) ||
qualifier.storage == EvqVaryingOut)
- if ((profile == EEsProfile && version >= 320) ||
+ if ((isEsProfile() && version >= 320) ||
extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
return;
break;
-#ifdef NV_EXTENSIONS
case EShLangMeshNV:
if (qualifier.storage == EvqVaryingOut)
- if ((profile == EEsProfile && version >= 320) ||
+ if ((isEsProfile() && version >= 320) ||
extensionTurnedOn(E_GL_NV_mesh_shader))
return;
break;
-#endif
default:
break;
}
+#endif
+
+ // last member of ssbo block exception:
+ if (qualifier.storage == EvqBuffer && lastMember)
+ return;
+
arraySizeRequiredCheck(loc, *arraySizes);
}
@@ -3811,6 +3895,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
if (symbolTable.atGlobalLevel())
trackLinkage(*symbol);
+#ifndef GLSLANG_WEB
if (! symbolTable.atBuiltInLevel()) {
if (isIoResizeArray(type)) {
ioArraySymbolResizeList.push_back(symbol);
@@ -3818,6 +3903,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
} else
fixIoArraySize(loc, symbol->getWritableType());
}
+#endif
return;
}
@@ -3855,6 +3941,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
return;
}
+#ifndef GLSLANG_WEB
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()))
@@ -3868,8 +3955,11 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
if (isIoResizeArray(type))
checkIoArraysConsistency(loc);
+#endif
}
+#ifndef GLSLANG_WEB
+
// Policy and error check for needing a runtime sized array.
void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base)
{
@@ -3883,7 +3973,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
const TIntermBinary* binary = base.getAsBinaryNode();
if (binary != nullptr &&
binary->getOp() == EOpIndexDirectStruct &&
- binary->getLeft()->getBasicType() == EbtReference) {
+ binary->getLeft()->isReference()) {
const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
const int memberCount = (int)binary->getLeft()->getType().getReferentType()->getStruct()->size();
@@ -3893,8 +3983,8 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
}
// check for additional things allowed by GL_EXT_nonuniform_qualifier
- if (base.getBasicType() == EbtSampler ||
- (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
+ if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStructNV ||
+ (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");
@@ -3910,7 +4000,7 @@ bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
// is it the last member?
const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
- if (binary->getLeft()->getBasicType() == EbtReference)
+ if (binary->getLeft()->isReference())
return false;
const int memberCount = (int)binary->getLeft()->getType().getStruct()->size();
@@ -3922,27 +4012,34 @@ bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
return false;
}
-#ifdef NV_EXTENSIONS
-// Fix mesh view output array dimension
-void TParseContext::resizeMeshViewDimension(const TSourceLoc& loc, TType& type)
+// 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()) {
- // since we don't have the maxMeshViewCountNV set during parsing builtins, we hardcode the value
+ 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 (! type.isArray()) {
- error(loc, "requires an view array dimension", "perviewNV", "");
- }
- else if (!type.isUnsizedArray() && type.getOuterArraySize() != maxViewCount) {
+ if (viewDimSize != UnsizedArraySize && viewDimSize != maxViewCount)
error(loc, "mesh view output array size must be gl_MaxMeshViewCountNV or implicitly sized", "[]", "");
- }
- else if (type.isUnsizedArray()) {
- type.changeOuterArraySize(maxViewCount);
- }
+ else if (viewDimSize == UnsizedArraySize)
+ type.getArraySizes()->setDimSize(viewDim, maxViewCount);
+ }
+ else {
+ error(loc, "requires a view array dimension", "perviewNV", "");
}
}
-#endif
+
+#endif // GLSLANG_WEB
// Returns true if the first argument to the #line directive is the line number for the next line.
//
@@ -3955,7 +4052,7 @@ void TParseContext::resizeMeshViewDimension(const TSourceLoc& loc, TType& type)
// source string number source-string-number.
bool TParseContext::lineDirectiveShouldSetNextLine() const
{
- return profile == EEsProfile || version >= 330;
+ return isEsProfile() || version >= 330;
}
//
@@ -3986,18 +4083,19 @@ void TParseContext::nonInitConstCheck(const TSourceLoc& loc, TString& identifier
TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier,
const TQualifier& qualifier, const TShaderQualifiers& publicType)
{
+#ifndef GLSLANG_WEB
if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel())
return nullptr;
- bool nonEsRedecls = (profile != EEsProfile && (version >= 130 || identifier == "gl_TexCoord"));
- bool esRedecls = (profile == EEsProfile &&
+ 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 (profile != EEsProfile && version <= 140 && extensionTurnedOn(E_GL_ARB_separate_shader_objects)) {
+ if (!isEsProfile() && version <= 140 && extensionTurnedOn(E_GL_ARB_separate_shader_objects)) {
if (identifier == "gl_Position" ||
identifier == "gl_PointSize" ||
identifier == "gl_ClipVertex" ||
@@ -4020,11 +4118,9 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
(identifier == "gl_Color" && language == EShLangFragment) ||
(identifier == "gl_FragStencilRefARB" && (nonEsRedecls && version >= 140)
&& language == EShLangFragment) ||
-#ifdef NV_EXTENSIONS
identifier == "gl_SampleMask" ||
identifier == "gl_Layer" ||
identifier == "gl_PrimitiveIndicesNV" ||
-#endif
identifier == "gl_TexCoord") {
// Find the existing symbol, if any.
@@ -4104,16 +4200,13 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
}
}
else if (
-#ifdef NV_EXTENSIONS
identifier == "gl_PrimitiveIndicesNV" ||
-#endif
identifier == "gl_FragStencilRefARB") {
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());
}
-#ifdef NV_EXTENSIONS
else if (identifier == "gl_SampleMask") {
if (!publicType.layoutOverrideCoverage) {
error(loc, "redeclaration only allowed for override_coverage layout", "redeclaration", symbol->getName().c_str());
@@ -4126,12 +4219,12 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
symbolQualifier.layoutViewportRelative = qualifier.layoutViewportRelative;
symbolQualifier.layoutSecondaryViewportRelativeOffset = qualifier.layoutSecondaryViewportRelativeOffset;
}
-#endif
// TODO: semantics quality: separate smooth from nothing declared, then use IsInterpolation for several tests above
return symbol;
}
+#endif
return nullptr;
}
@@ -4143,16 +4236,13 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName,
const TString* instanceName, TArraySizes* arraySizes)
{
+#ifndef GLSLANG_WEB
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"
-#ifdef NV_EXTENSIONS
- && blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV"
-#endif
- )
- {
+ if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment" &&
+ blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV") {
error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str());
return;
}
@@ -4211,7 +4301,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
TType& type = block->getWritableType();
-#ifdef NV_EXTENSIONS
// 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
@@ -4221,7 +4310,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
type.getQualifier().layoutStream = currentBlockQualifier.layoutStream;
type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer;
}
-#endif
TTypeList::iterator member = type.getWritableStruct()->begin();
size_t numOriginalMembersFound = 0;
@@ -4254,7 +4342,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
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());
-#ifdef NV_EXTENSIONS
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())
@@ -4274,7 +4361,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
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(), "");
-#endif
if (newType.getQualifier().isMemory())
error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), "");
if (newType.getQualifier().hasNonXfbLayout())
@@ -4365,6 +4451,7 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
// Save it in the AST for linker use.
trackLinkage(*block);
+#endif // GLSLANG_WEB
}
void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type)
@@ -4392,6 +4479,7 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu
void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type)
{
+#ifndef GLSLANG_WEB
if (qualifier.isMemory()) {
type.getQualifier().volatil = qualifier.volatil;
type.getQualifier().coherent = qualifier.coherent;
@@ -4404,6 +4492,7 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
type.getQualifier().writeonly = qualifier.writeonly;
type.getQualifier().restrict = qualifier.restrict;
}
+#endif
if (qualifier.isAuxiliary() ||
qualifier.isInterpolation())
@@ -4412,9 +4501,9 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
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.noContraction) {
+ if (qualifier.isNoContraction()) {
if (qualifier.isParamOutput())
- type.getQualifier().noContraction = true;
+ type.getQualifier().setNoContraction();
else
warn(loc, "qualifier has no effect on non-output parameters", "precise", "");
}
@@ -4455,12 +4544,15 @@ void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const
void TParseContext::referenceCheck(const TSourceLoc& loc, const TType& type, const char* op)
{
+#ifndef GLSLANG_WEB
if (containsFieldWithBasicType(type, EbtReference))
error(loc, "can't use with reference types", op, "");
+#endif
}
void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TType& type, const char* op)
{
+#ifndef GLSLANG_WEB
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtFloat16))
requireFloat16Arithmetic(loc, op, "can't use with structs containing float16");
@@ -4490,6 +4582,7 @@ void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TTy
if (type.isArray() && type.getBasicType() == EbtUint8)
requireInt8Arithmetic(loc, op, "can't use with arrays containing uint8");
+#endif
}
void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op)
@@ -4541,6 +4634,7 @@ void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publ
//
void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, TIntermLoop* loop)
{
+#ifndef GLSLANG_WEB
// 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)
@@ -4636,8 +4730,10 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init,
// the body
inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable);
+#endif
}
+#ifndef GLSLANG_WEB
// Do limit checks for built-in arrays.
void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size)
{
@@ -4647,13 +4743,12 @@ void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identi
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");
-#ifdef NV_EXTENSIONS
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");
-#endif
}
+#endif // GLSLANG_WEB
// 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.
@@ -4667,6 +4762,8 @@ void TParseContext::limitCheck(const TSourceLoc& loc, int value, const char* lim
error(loc, "must be less than or equal to", feature, "%s (%d)", limit, constArray[0].getIConst());
}
+#ifndef GLSLANG_WEB
+
//
// Do any additional error checking, etc., once we know the parsing is done.
//
@@ -4688,33 +4785,30 @@ void TParseContext::finish()
// about the stage itself.
switch (language) {
case EShLangGeometry:
- if (profile == EEsProfile && version == 310)
+ if (isEsProfile() && version == 310)
requireExtensions(getCurrentLoc(), Num_AEP_geometry_shader, AEP_geometry_shader, "geometry shaders");
break;
case EShLangTessControl:
case EShLangTessEvaluation:
- if (profile == EEsProfile && version == 310)
+ if (isEsProfile() && version == 310)
requireExtensions(getCurrentLoc(), Num_AEP_tessellation_shader, AEP_tessellation_shader, "tessellation shaders");
- else if (profile != EEsProfile && version < 400)
+ else if (!isEsProfile() && version < 400)
requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_tessellation_shader, "tessellation shaders");
break;
case EShLangCompute:
- if (profile != EEsProfile && version < 430)
+ if (!isEsProfile() && version < 430)
requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_compute_shader, "compute shaders");
break;
-#ifdef NV_EXTENSIONS
case EShLangTaskNV:
requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "task shaders");
break;
case EShLangMeshNV:
requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "mesh shaders");
break;
-#endif
default:
break;
}
-#ifdef NV_EXTENSIONS
// Set default outputs for GL_NV_geometry_shader_passthrough
if (language == EShLangGeometry && extensionTurnedOn(E_SPV_NV_geometry_shader_passthrough)) {
if (intermediate.getOutputPrimitive() == ElgNone) {
@@ -4734,8 +4828,8 @@ void TParseContext::finish()
}
}
}
-#endif
}
+#endif // GLSLANG_WEB
//
// Layout qualifier stuff.
@@ -4771,6 +4865,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
publicType.qualifier.layoutPacking = ElpStd140;
return;
}
+#ifndef GLSLANG_WEB
if (id == TQualifier::getLayoutPackingString(ElpStd430)) {
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430");
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "std430");
@@ -4810,20 +4905,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
intermediate.setUsePhysicalStorageBuffer();
return;
}
- if (language == EShLangGeometry || language == EShLangTessEvaluation
-#ifdef NV_EXTENSIONS
- || language == EShLangMeshNV
-#endif
- ) {
+ if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMeshNV) {
if (id == TQualifier::getGeometryString(ElgTriangles)) {
publicType.shaderQualifiers.geometry = ElgTriangles;
return;
}
- if (language == EShLangGeometry
-#ifdef NV_EXTENSIONS
- || language == EShLangMeshNV
-#endif
- ) {
+ if (language == EShLangGeometry || language == EShLangMeshNV) {
if (id == TQualifier::getGeometryString(ElgPoints)) {
publicType.shaderQualifiers.geometry = ElgPoints;
return;
@@ -4832,10 +4919,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
publicType.shaderQualifiers.geometry = ElgLines;
return;
}
-#ifdef NV_EXTENSIONS
- if (language == EShLangGeometry)
-#endif
- {
+ if (language == EShLangGeometry) {
if (id == TQualifier::getGeometryString(ElgLineStrip)) {
publicType.shaderQualifiers.geometry = ElgLineStrip;
return;
@@ -4852,14 +4936,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
publicType.shaderQualifiers.geometry = ElgTriangleStrip;
return;
}
-#ifdef NV_EXTENSIONS
if (id == "passthrough") {
requireExtensions(loc, 1, &E_SPV_NV_geometry_shader_passthrough, "geometry shader passthrough");
publicType.qualifier.layoutPassthrough = true;
intermediate.setGeoPassthroughEXT();
return;
}
-#endif
}
} else {
assert(language == EShLangTessEvaluation);
@@ -4942,6 +5024,17 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
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)) {
@@ -4958,7 +5051,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
error(loc, "unknown blend equation", "blend_support", "");
return;
}
-#ifdef NV_EXTENSIONS
if (id == "override_coverage") {
requireExtensions(loc, 1, &E_GL_NV_sample_mask_override_coverage, "sample mask override coverage");
publicType.shaderQualifiers.layoutOverrideCoverage = true;
@@ -4996,9 +5088,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
}
}
-#else
- }
#endif
+
error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), "");
}
@@ -5063,7 +5154,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
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 };
+ 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(), "");
@@ -5083,8 +5175,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
error(loc, "needs a literal integer", "set", "");
return;
} else if (id == "binding") {
+#ifndef GLSLANG_WEB
profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, "binding");
profileRequires(loc, EEsProfile, 310, nullptr, "binding");
+#endif
if ((unsigned int)value >= TQualifier::layoutBindingEnd)
error(loc, "binding is too large", id.c_str(), "");
else
@@ -5092,7 +5186,23 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if (nonLiteral)
error(loc, "needs a literal integer", "binding", "");
return;
- } else if (id == "component") {
+ }
+ 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;
+ }
+#ifndef GLSLANG_WEB
+ if (id == "component") {
requireProfile(loc, ECoreProfile | ECompatibilityProfile, "component");
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "component");
if ((unsigned)value >= TQualifier::layoutComponentEnd)
@@ -5102,7 +5212,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if (nonLiteral)
error(loc, "needs a literal integer", "component", "");
return;
- } else if (id.compare(0, 4, "xfb_") == 0) {
+ }
+ 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
@@ -5148,7 +5259,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
return;
}
}
-
if (id == "input_attachment_index") {
requireVulkan(loc, "input_attachment_index");
if (value >= (int)TQualifier::layoutAttachmentEnd)
@@ -5159,20 +5269,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
error(loc, "needs a literal integer", "input_attachment_index", "");
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 == "num_views") {
requireExtensions(loc, Num_OVR_multiview_EXTs, OVR_multiview_EXTs, "num_views");
publicType.shaderQualifiers.numViews = value;
@@ -5180,8 +5276,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
error(loc, "needs a literal integer", "num_views", "");
return;
}
-
-#if NV_EXTENSIONS
if (language == EShLangVertex ||
language == EShLangTessControl ||
language == EShLangTessEvaluation ||
@@ -5194,7 +5288,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
return;
}
}
-#endif
if (id == "buffer_reference_align") {
requireExtensions(loc, 1, &E_GL_EXT_buffer_reference, "buffer_reference_align");
@@ -5206,11 +5299,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
error(loc, "needs a literal integer", "buffer_reference_align", "");
return;
}
+#endif
switch (language) {
- case EShLangVertex:
- break;
-
+#ifndef GLSLANG_WEB
case EShLangTessControl:
if (id == "vertices") {
if (value == 0)
@@ -5223,9 +5315,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
break;
- case EShLangTessEvaluation:
- break;
-
case EShLangGeometry:
if (id == "invocations") {
profileRequires(loc, ECompatibilityProfile | ECoreProfile, 400, nullptr, "invocations");
@@ -5275,7 +5364,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
break;
-#ifdef NV_EXTENSIONS
case EShLangMeshNV:
if (id == "max_vertices") {
requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "max_vertices");
@@ -5302,16 +5390,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
#endif
case EShLangCompute:
if (id.compare(0, 11, "local_size_") == 0) {
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
if (language == EShLangMeshNV || language == EShLangTaskNV) {
requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "gl_WorkGroupSize");
- }
- else
-#endif
- {
+ } else {
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
}
+#endif
if (nonLiteral)
error(loc, "needs a literal integer", "local_size", "");
if (id.size() == 12 && value == 0) {
@@ -5320,14 +5406,17 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
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) {
@@ -5375,53 +5464,50 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
if (src.hasPacking())
dst.layoutPacking = src.layoutPacking;
+#ifndef GLSLANG_WEB
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;
+#endif
if (src.hasAlign())
dst.layoutAlign = src.layoutAlign;
- if (src.hasBufferReferenceAlign())
- dst.layoutBufferReferenceAlign = src.layoutBufferReferenceAlign;
-
if (! inheritOnly) {
if (src.hasLocation())
dst.layoutLocation = src.layoutLocation;
- if (src.hasComponent())
- dst.layoutComponent = src.layoutComponent;
- if (src.hasIndex())
- dst.layoutIndex = src.layoutIndex;
-
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;
+
+#ifndef GLSLANG_WEB
+ 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.hasSpecConstantId())
- dst.layoutSpecConstantId = src.layoutSpecConstantId;
-
if (src.layoutPushConstant)
dst.layoutPushConstant = true;
if (src.layoutBufferReference)
dst.layoutBufferReference = true;
-#ifdef NV_EXTENSIONS
if (src.layoutPassthrough)
dst.layoutPassthrough = true;
if (src.layoutViewportRelative)
@@ -5490,17 +5576,15 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
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.getBasicType() != EbtAtomicUint)
+ 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.layoutPushConstant)
+ if (qualifier.isPushConstant())
error(loc, "can only specify on a uniform block", "push_constant", "");
-#ifdef NV_EXTENSIONS
- if (qualifier.layoutShaderRecordNV)
+ if (qualifier.isShaderRecordNV())
error(loc, "can only specify on a buffer block", "shaderRecordNV", "");
-#endif
}
break;
default:
@@ -5564,17 +5648,15 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
case EvqVaryingOut:
if (type.getBasicType() == EbtBlock)
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "location qualifier on in/out block");
-#ifdef NV_EXTENSIONS
if (type.getQualifier().isTaskMemory())
error(loc, "cannot apply to taskNV in/out blocks", "location", "");
-#endif
break;
case EvqUniform:
case EvqBuffer:
if (type.getBasicType() == EbtBlock)
error(loc, "cannot apply to uniform or buffer block", "location", "");
break;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
case EvqPayloadNV:
case EvqPayloadInNV:
case EvqHitAttrNV:
@@ -5597,6 +5679,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated);
}
+#ifndef GLSLANG_WEB
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
int repeated = intermediate.addXfbBufferOffset(type);
if (repeated >= 0)
@@ -5608,25 +5691,20 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
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", "");
-#ifdef AMD_EXTENSIONS
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.containsBasicType(EbtFloat16) || type.containsBasicType(EbtInt16) || type.containsBasicType(EbtUint16)) &&
+ 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", "");
-#else
- else if (! IsMultipleOfPow2(qualifier.layoutXfbOffset, 4))
- error(loc, "must be a multiple of size of first component", "xfb_offset", "");
-#endif
}
-
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);
}
+#endif
if (qualifier.hasBinding()) {
// Binding checking, from the spec:
@@ -5649,15 +5727,19 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
lastBinding += type.getCumulativeArraySize();
else {
lastBinding += 1;
+#ifndef GLSLANG_WEB
if (spvVersion.vulkan == 0)
warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
+#endif
}
}
}
+#ifndef GLSLANG_WEB
if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits)
error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
+#endif
}
- if (type.getBasicType() == EbtAtomicUint) {
+ if (type.isAtomic()) {
if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", "");
return;
@@ -5667,18 +5749,16 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
// some types require bindings
// atomic_uint
- if (type.getBasicType() == EbtAtomicUint)
+ 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.layoutPushConstant &&
-#ifdef NV_EXTENSIONS
- !qualifier.layoutShaderRecordNV &&
-#endif
- !qualifier.layoutAttachment &&
- !qualifier.layoutBufferReference)
+ if (type.getBasicType() == EbtBlock && !qualifier.isPushConstant() &&
+ !qualifier.isShaderRecordNV() &&
+ !qualifier.hasAttachment() &&
+ !qualifier.hasBufferReference())
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler)
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
@@ -5703,40 +5783,38 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
// Image format
if (qualifier.hasFormat()) {
if (! type.isImage())
- error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.getFormat()), "");
else {
- if (type.getSampler().type == EbtFloat && qualifier.layoutFormat > ElfFloatGuard)
- error(loc, "does not apply to floating point images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
- if (type.getSampler().type == EbtInt && (qualifier.layoutFormat < ElfFloatGuard || qualifier.layoutFormat > ElfIntGuard))
- error(loc, "does not apply to signed integer images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
- if (type.getSampler().type == EbtUint && qualifier.layoutFormat < ElfIntGuard)
- error(loc, "does not apply to unsigned integer images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
-
- if (profile == EEsProfile) {
+ 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.layoutFormat == ElfR32f || qualifier.layoutFormat == ElfR32i || qualifier.layoutFormat == ElfR32ui)) {
- if (! qualifier.readonly && ! qualifier.writeonly)
- error(loc, "format requires readonly or writeonly memory qualifier", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ 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.writeonly) {
+ } else if (type.isImage() && ! qualifier.isWriteOnly()) {
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.layoutPushConstant && type.getBasicType() != EbtBlock)
+ if (qualifier.isPushConstant() && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "push_constant", "");
- if (qualifier.layoutBufferReference && type.getBasicType() != EbtBlock)
+ if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "buffer_reference", "");
-#ifdef NV_EXTENSIONS
- if (qualifier.layoutShaderRecordNV && type.getBasicType() != EbtBlock)
+ if (qualifier.isShaderRecordNV() && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "shaderRecordNV", "");
-#endif
// input attachment
if (type.isSubpass()) {
@@ -5793,10 +5871,11 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
// output block declarations, and output block member declarations."
switch (qualifier.storage) {
+#ifndef GLSLANG_WEB
case EvqVaryingIn:
{
const char* feature = "location qualifier on input";
- if (profile == EEsProfile && version < 310)
+ if (isEsProfile() && version < 310)
requireStage(loc, EShLangVertex, feature);
else
requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature);
@@ -5813,7 +5892,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
case EvqVaryingOut:
{
const char* feature = "location qualifier on output";
- if (profile == EEsProfile && version < 310)
+ if (isEsProfile() && version < 310)
requireStage(loc, EShLangFragment, feature);
else
requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature);
@@ -5827,12 +5906,14 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
}
break;
}
+#endif
case EvqUniform:
case EvqBuffer:
{
const char* feature = "location qualifier on uniform or buffer";
- requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature);
- profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature);
+ 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;
}
@@ -5867,18 +5948,17 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
error(loc, "offset/align can only be used on a uniform or buffer", "layout", "");
}
}
- if (qualifier.layoutPushConstant) {
+ 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.layoutBufferReference) {
+ if (qualifier.hasBufferReference()) {
if (qualifier.storage != EvqBuffer)
error(loc, "can only be used with buffer", "buffer_reference", "");
}
-#ifdef NV_EXTENSIONS
- if (qualifier.layoutShaderRecordNV) {
+ if (qualifier.isShaderRecordNV()) {
if (qualifier.storage != EvqBuffer)
error(loc, "can only be used with a buffer", "shaderRecordNV", "");
if (qualifier.hasBinding())
@@ -5890,12 +5970,12 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
if (qualifier.storage == EvqHitAttrNV && qualifier.hasLayout()) {
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
}
-#endif
}
// For places that can't have shader-level layout qualifiers
void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQualifiers& shaderQualifiers)
{
+#ifndef GLSLANG_WEB
const char* message = "can only apply to a standalone qualifier";
if (shaderQualifiers.geometry != ElgNone)
@@ -5908,10 +5988,6 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
error(loc, message, "point_mode", "");
if (shaderQualifiers.invocations != TQualifier::layoutNotSet)
error(loc, message, "invocations", "");
- if (shaderQualifiers.earlyFragmentTests)
- error(loc, message, "early_fragment_tests", "");
- if (shaderQualifiers.postDepthCoverage)
- error(loc, message, "post_depth_coverage", "");
for (int i = 0; i < 3; ++i) {
if (shaderQualifiers.localSize[i] > 1)
error(loc, message, "local_size", "");
@@ -5919,36 +5995,38 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
error(loc, message, "local_size id", "");
}
if (shaderQualifiers.vertices != TQualifier::layoutNotSet) {
- if (language == EShLangGeometry
-#ifdef NV_EXTENSIONS
- || language == EShLangMeshNV
-#endif
- )
+ if (language == EShLangGeometry || language == EShLangMeshNV)
error(loc, message, "max_vertices", "");
else if (language == EShLangTessControl)
error(loc, message, "vertices", "");
else
assert(0);
}
-#ifdef NV_EXTENSIONS
+ if (shaderQualifiers.earlyFragmentTests)
+ error(loc, message, "early_fragment_tests", "");
+ if (shaderQualifiers.postDepthCoverage)
+ error(loc, message, "post_depth_coverage", "");
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
if (language == EShLangMeshNV)
error(loc, message, "max_primitives", "");
else
assert(0);
}
-#endif
- if (shaderQualifiers.blendEquation)
+ 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), "");
+#endif
}
// 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().getBasicType() == EbtAtomicUint) {
+#ifndef GLSLANG_WEB
+ if (symbol.getType().isAtomic()) {
if (qualifier.hasBinding() && (int)qualifier.layoutBinding < resources.maxAtomicCounterBindings) {
// Set the offset
@@ -5957,6 +6035,10 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
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
@@ -5977,6 +6059,7 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
atomicUintOffsets[qualifier.layoutBinding] = offset + numOffsets;
}
}
+#endif
}
//
@@ -5986,13 +6069,16 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
//
const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
{
- const TFunction* function = nullptr;
-
if (symbolTable.isFunctionNameVariable(call.getName())) {
error(loc, "can't use function syntax on variable", call.getName().c_str(), "");
return nullptr;
}
+#ifdef GLSLANG_WEB
+ return findFunctionExact(loc, call, builtIn);
+#endif
+
+ const TFunction* function = nullptr;
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) ||
@@ -6002,10 +6088,10 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32) ||
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64);
- if (profile == EEsProfile || version < 120)
+ if (isEsProfile() || version < 120)
function = findFunctionExact(loc, call, builtIn);
else if (version < 400)
- function = findFunction120(loc, call, builtIn);
+ function = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn);
else if (explicitTypesEnabled)
function = findFunctionExplicitTypes(loc, call, builtIn);
else
@@ -6164,6 +6250,8 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
}
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
return false;
+ if (from.isCoopMat() && to.isCoopMat())
+ return from.sameCoopMatBaseType(to);
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
};
@@ -6238,6 +6326,8 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
}
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
return false;
+ if (from.isCoopMat() && to.isCoopMat())
+ return from.sameCoopMatBaseType(to);
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
};
@@ -6289,21 +6379,26 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
return bestMatch;
}
-// When a declaration includes a type, but not a variable name, it can be
+// 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() && publicType.qualifier.hasOffset()) {
+#ifndef GLSLANG_WEB
+ 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;
}
- atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset;
+
+ if(publicType.qualifier.hasOffset()) {
+ atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset;
+ }
return;
}
- if (publicType.qualifier.hasLayout() && !publicType.qualifier.layoutBufferReference)
+ if (publicType.qualifier.hasLayout() && !publicType.qualifier.hasBufferReference())
warn(loc, "useless application of layout qualifier", "layout", "");
+#endif
}
//
@@ -6334,12 +6429,20 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) {
error(loc, "expected four type parameters", identifier.c_str(), "");
}
- if (publicType.typeParameters &&
- publicType.typeParameters->getDimSize(0) != 16 &&
- publicType.typeParameters->getDimSize(0) != 32 &&
- publicType.typeParameters->getDimSize(0) != 64) {
- error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
+ if (publicType.typeParameters) {
+ if (isTypeFloat(publicType.basicType) &&
+ publicType.typeParameters->getDimSize(0) != 16 &&
+ publicType.typeParameters->getDimSize(0) != 32 &&
+ publicType.typeParameters->getDimSize(0) != 64) {
+ error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
+ }
+ if (isTypeInt(publicType.basicType) &&
+ publicType.typeParameters->getDimSize(0) != 8 &&
+ publicType.typeParameters->getDimSize(0) != 32) {
+ error(loc, "expected 8 or 32 bits for first type parameter", identifier.c_str(), "");
+ }
}
+
} else {
if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) {
error(loc, "unexpected type parameters", identifier.c_str(), "");
@@ -6355,17 +6458,18 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
nonInitConstCheck(loc, identifier, type);
samplerCheck(loc, type, identifier, initializer);
- atomicUintCheck(loc, type, identifier);
transparentOpaqueCheck(loc, type, identifier);
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
+ atomicUintCheck(loc, type, identifier);
accStructNVCheck(loc, type, identifier);
+ checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
#endif
- if (type.getQualifier().storage == EvqConst && type.containsBasicType(EbtReference)) {
+ 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.containsBasicType(EbtFloat16))
+ 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");
@@ -6373,13 +6477,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
requireInt8Arithmetic(loc, "qualifier", "(u)int8 types can only be in uniform block or buffer storage");
}
- if (type.getQualifier().storage == EvqShared &&
- type.containsCoopMat())
+ if (type.getQualifier().storage == EvqShared && type.containsCoopMat())
error(loc, "qualifier", "Cooperative matrix types must not be used in shared memory", "");
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.layoutDepth != EldNone)
+ if (identifier != "gl_FragDepth" && publicType.shaderQualifiers.getDepth() != EldNone)
error(loc, "can only apply depth layout to gl_FragDepth", "layout qualifier", "");
// Check for redeclaration of built-ins and/or attempting to declare a reserved name
@@ -6435,12 +6538,14 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
// Pick up global defaults from the provide global defaults into dst.
void TParseContext::inheritGlobalDefaults(TQualifier& dst) const
{
+#ifndef GLSLANG_WEB
if (dst.storage == EvqVaryingOut) {
if (! dst.hasStream() && language == EShLangGeometry)
dst.layoutStream = globalOutputDefaults.layoutStream;
if (! dst.hasXfbBuffer())
dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer;
}
+#endif
}
//
@@ -6469,7 +6574,9 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString&
// make a new variable
TVariable* variable = new TVariable(&identifier, type);
+#ifndef GLSLANG_WEB
ioArrayCheck(loc, type, identifier);
+#endif
// add variable to symbol table
if (symbolTable.insert(*variable)) {
@@ -6496,7 +6603,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
//
TStorageQualifier qualifier = variable->getType().getQualifier().storage;
if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst ||
- (qualifier == EvqUniform && profile != EEsProfile && version >= 120))) {
+ (qualifier == EvqUniform && !isEsProfile() && version >= 120))) {
error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
return nullptr;
}
@@ -6514,7 +6621,9 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
TType skeletalType;
skeletalType.shallowCopy(variable->getType());
skeletalType.getQualifier().makeTemporary();
+#ifndef GLSLANG_WEB
initializer = convertInitializerList(loc, skeletalType, initializer);
+#endif
if (! initializer) {
// error recovery; don't leave const without constant values
if (qualifier == EvqConst)
@@ -6568,7 +6677,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
// 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 (profile == EEsProfile) {
+ if (isEsProfile()) {
if (relaxedErrors() && ! extensionTurnedOn(E_GL_EXT_shader_non_constant_global_initializers))
warn(loc, "not allowed in this version", initFeature, "");
else
@@ -6819,7 +6928,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
// 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 aggregious case of creating integer matrices.
+ // 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());
@@ -6850,6 +6959,35 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
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;
+ }
+ case EOpConstructUVec3:
+ case EOpConstructUVec4:
+ case EOpConstructUint:
+ basicOp = EOpConstructUint;
+ break;
+
+ case EOpConstructBVec2:
+ case EOpConstructBVec3:
+ case EOpConstructBVec4:
+ case EOpConstructBool:
+ basicOp = EOpConstructBool;
+ break;
+
+#ifndef GLSLANG_WEB
+
case EOpConstructDVec2:
case EOpConstructDVec3:
case EOpConstructDVec4:
@@ -6880,6 +7018,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructF16Mat4x4:
case EOpConstructFloat16:
basicOp = EOpConstructFloat16;
+ // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
+ // so construct a 32-bit type and convert
+ if (!intermediate.getArithemeticFloat16Enabled()) {
+ 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 EOpConstructI8Vec2:
@@ -6887,6 +7041,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructI8Vec4:
case EOpConstructInt8:
basicOp = EOpConstructInt8;
+ // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
+ // so construct a 32-bit type and convert
+ if (!intermediate.getArithemeticInt8Enabled()) {
+ 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:
@@ -6894,6 +7064,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructU8Vec4:
case EOpConstructUint8:
basicOp = EOpConstructUint8;
+ // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
+ // so construct a 32-bit type and convert
+ if (!intermediate.getArithemeticInt8Enabled()) {
+ 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:
@@ -6901,6 +7087,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructI16Vec4:
case EOpConstructInt16:
basicOp = EOpConstructInt16;
+ // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
+ // so construct a 32-bit type and convert
+ if (!intermediate.getArithemeticInt16Enabled()) {
+ 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:
@@ -6908,20 +7110,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
case EOpConstructU16Vec4:
case EOpConstructUint16:
basicOp = EOpConstructUint16;
- break;
-
- case EOpConstructIVec2:
- case EOpConstructIVec3:
- case EOpConstructIVec4:
- case EOpConstructInt:
- basicOp = EOpConstructInt;
- break;
-
- case EOpConstructUVec2:
- case EOpConstructUVec3:
- case EOpConstructUVec4:
- case EOpConstructUint:
- basicOp = EOpConstructUint;
+ // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types,
+ // so construct a 32-bit type and convert
+ if (!intermediate.getArithemeticInt16Enabled()) {
+ 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:
@@ -6932,7 +7136,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
break;
case EOpConstructUint64:
- if (type.isScalar() && node->getType().getBasicType() == EbtReference) {
+ if (type.isScalar() && node->getType().isReference()) {
TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUint64, true, node, type);
return newNode;
}
@@ -6943,27 +7147,27 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
basicOp = EOpConstructUint64;
break;
- case EOpConstructBVec2:
- case EOpConstructBVec3:
- case EOpConstructBVec4:
- case EOpConstructBool:
- basicOp = EOpConstructBool;
- break;
-
case EOpConstructNonuniform:
// Make a nonuniform copy of node
- newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpCopyObject, true, node, node->getType());
- newNode->getWritableType().getQualifier().nonUniform = true;
+ newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpCopyObject, true, node, type);
return newNode;
case EOpConstructReference:
// construct reference from reference
- if (node->getType().getBasicType() == EbtReference) {
+ 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);
+ 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;
@@ -6976,19 +7180,75 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
}
node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc());
} else {
+ TOperator op = EOpNull;
switch (type.getBasicType()) {
default:
assert(0);
break;
+ case EbtInt:
+ switch (node->getType().getBasicType()) {
+ case EbtFloat: op = EOpConvFloatToInt; break;
+ case EbtFloat16: op = EOpConvFloat16ToInt; break;
+ case EbtUint8: op = EOpConvUint8ToInt; break;
+ case EbtInt8: op = EOpConvInt8ToInt; break;
+ case EbtUint: op = EOpConvUintToInt; break;
+ default: assert(0);
+ }
+ break;
+ case EbtUint:
+ switch (node->getType().getBasicType()) {
+ case EbtFloat: op = EOpConvFloatToUint; break;
+ case EbtFloat16: op = EOpConvFloat16ToUint; break;
+ case EbtUint8: op = EOpConvUint8ToUint; break;
+ case EbtInt8: op = EOpConvInt8ToUint; break;
+ case EbtInt: op = EOpConvIntToUint; break;
+ case EbtUint: op = EOpConvUintToInt8; break;
+ default: assert(0);
+ }
+ break;
+ case EbtInt8:
+ switch (node->getType().getBasicType()) {
+ case EbtFloat: op = EOpConvFloatToInt8; break;
+ case EbtFloat16: op = EOpConvFloat16ToInt8; break;
+ case EbtUint8: op = EOpConvUint8ToInt8; break;
+ case EbtInt: op = EOpConvIntToInt8; break;
+ case EbtUint: op = EOpConvUintToInt8; break;
+ default: assert(0);
+ }
+ break;
+ case EbtUint8:
+ switch (node->getType().getBasicType()) {
+ case EbtFloat: op = EOpConvFloatToUint8; break;
+ case EbtFloat16: op = EOpConvFloat16ToUint8; break;
+ case EbtInt8: op = EOpConvInt8ToUint8; break;
+ case EbtInt: op = EOpConvIntToUint8; break;
+ case EbtUint: op = EOpConvUintToUint8; break;
+ default: assert(0);
+ }
+ break;
case EbtFloat:
- assert(node->getType().getBasicType() == EbtFloat16);
- node = intermediate.addUnaryNode(EOpConvFloat16ToFloat, node, node->getLoc(), type);
+ switch (node->getType().getBasicType()) {
+ case EbtFloat16: op = EOpConvFloat16ToFloat; break;
+ case EbtInt8: op = EOpConvInt8ToFloat; break;
+ case EbtUint8: op = EOpConvUint8ToFloat; break;
+ case EbtInt: op = EOpConvIntToFloat; break;
+ case EbtUint: op = EOpConvUintToFloat; break;
+ default: assert(0);
+ }
break;
case EbtFloat16:
- assert(node->getType().getBasicType() == EbtFloat);
- node = intermediate.addUnaryNode(EOpConvFloatToFloat16, node, node->getLoc(), type);
+ switch (node->getType().getBasicType()) {
+ case EbtFloat: op = EOpConvFloatToFloat16; break;
+ case EbtInt8: op = EOpConvInt8ToFloat16; break;
+ case EbtUint8: op = EOpConvUint8ToFloat16; break;
+ case EbtInt: op = EOpConvIntToFloat16; break;
+ case EbtUint: op = EOpConvUintToFloat16; break;
+ default: assert(0);
+ }
break;
}
+
+ 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());
@@ -6996,6 +7256,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
return node;
+#endif // GLSLANG_WEB
+
default:
error(loc, "unsupported construction", "", "");
@@ -7037,6 +7299,23 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType&
return converted;
}
+// If a memory qualifier is present in 'to', also make it present in 'from'.
+void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to)
+{
+#ifndef GLSLANG_WEB
+ 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.restrict)
+ to.restrict = from.restrict;
+#endif
+}
+
//
// Do everything needed to add an interface block.
//
@@ -7052,7 +7331,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
requireProfile(loc, ~EEsProfile, "array-of-array of block");
}
- // fix and check for member storage qualifiers and types that don't belong within a 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();
@@ -7061,7 +7340,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
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;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
+ inheritMemoryQualifiers(currentBlockQualifier, memberQualifier);
if (currentBlockQualifier.perPrimitiveNV)
memberQualifier.perPrimitiveNV = currentBlockQualifier.perPrimitiveNV;
if (currentBlockQualifier.perViewNV)
@@ -7114,18 +7394,13 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
// 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.layoutPushConstant && !currentBlockQualifier.hasPacking())
-#ifdef NV_EXTENSIONS
- || (currentBlockQualifier.layoutShaderRecordNV && !currentBlockQualifier.hasPacking())
-#endif
- )
+ if ((currentBlockQualifier.isPushConstant() && !currentBlockQualifier.hasPacking()) ||
+ (currentBlockQualifier.isShaderRecordNV() && !currentBlockQualifier.hasPacking()))
currentBlockQualifier.layoutPacking = ElpStd430;
-#ifdef NV_EXTENSIONS
// Special case for "taskNV in/out", which has a default of std430,
- if (currentBlockQualifier.perTaskNV && !currentBlockQualifier.hasPacking())
+ if (currentBlockQualifier.isTaskMemory() && !currentBlockQualifier.hasPacking())
currentBlockQualifier.layoutPacking = ElpStd430;
-#endif
// fix and check for member layout qualifiers
@@ -7143,12 +7418,11 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
bool memberWithLocation = false;
bool memberWithoutLocation = false;
-#ifdef NV_EXTENSIONS
bool memberWithPerViewQualifier = false;
-#endif
for (unsigned int member = 0; member < typeList.size(); ++member) {
TQualifier& memberQualifier = typeList[member].type->getQualifier();
const TSourceLoc& memberLoc = typeList[member].loc;
+#ifndef GLSLANG_WEB
if (memberQualifier.hasStream()) {
if (defaultQualification.layoutStream != memberQualifier.layoutStream)
error(memberLoc, "member cannot contradict block", "stream", "");
@@ -7162,12 +7436,14 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer)
error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", "");
}
+#endif
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) {
+#ifndef GLSLANG_WEB
case EvqVaryingIn:
case EvqVaryingOut:
requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature);
@@ -7175,6 +7451,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
memberWithLocation = true;
break;
+#endif
default:
error(memberLoc, "can only use in an in/out block", feature, "");
break;
@@ -7191,11 +7468,9 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
error(memberLoc, "can only be used with std140, std430, or scalar layout packing", "offset/align", "");
}
-#ifdef NV_EXTENSIONS
if (memberQualifier.isPerView()) {
memberWithPerViewQualifier = true;
}
-#endif
TQualifier newMemberQualification = defaultQualification;
mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
@@ -7204,6 +7479,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
layoutMemberLocationArrayCheck(loc, memberWithLocation, arraySizes);
+#ifndef GLSLANG_WEB
// 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
@@ -7213,6 +7489,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
if (!currentBlockQualifier.hasXfbBuffer() && currentBlockQualifier.hasXfbOffset())
currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer;
}
+#endif
// Process the members
fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation);
@@ -7221,10 +7498,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
for (unsigned int member = 0; member < typeList.size(); ++member)
layoutTypeCheck(typeList[member].loc, *typeList[member].type);
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
if (memberWithPerViewQualifier) {
for (unsigned int member = 0; member < typeList.size(); ++member) {
- resizeMeshViewDimension(typeList[member].loc, *typeList[member].type);
+ checkAndResizeMeshViewDim(typeList[member].loc, *typeList[member].type, /*isBlockMember*/ true);
}
}
#endif
@@ -7240,10 +7517,11 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
TType blockType(&typeList, *blockName, currentBlockQualifier);
if (arraySizes != nullptr)
blockType.transferArraySizes(arraySizes);
- else
- ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName);
- if (currentBlockQualifier.layoutBufferReference) {
+#ifndef GLSLANG_WEB
+ 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", "");
@@ -7255,7 +7533,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
TVariable* blockNameVar = new TVariable(blockName, blockNameType, true);
if (! symbolTable.insert(*blockNameVar)) {
TSymbol* existingName = symbolTable.find(*blockName);
- if (existingName->getType().getBasicType() == EbtReference &&
+ if (existingName->getType().isReference() &&
existingName->getType().getReferentType()->getStruct() &&
existingName->getType().getReferentType()->getStruct()->size() == 0 &&
existingName->getType().getQualifier().storage == blockType.getQualifier().storage) {
@@ -7267,7 +7545,9 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
if (!instanceName) {
return;
}
- } else {
+ } else
+#endif
+ {
//
// 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.
@@ -7315,12 +7595,14 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
// Check for general layout qualifier errors
layoutObjectCheck(loc, variable);
+#ifndef GLSLANG_WEB
// fix up
if (isIoResizeArray(blockType)) {
ioArraySymbolResizeList.push_back(&variable);
checkIoArraysConsistency(loc, true);
} else
fixIoArraySize(loc, variable.getWritableType());
+#endif
// Save it in the AST for linker use.
trackLinkage(variable);
@@ -7333,8 +7615,8 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
switch (qualifier.storage) {
case EvqUniform:
profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
- profileRequires(loc, ENoProfile, 140, nullptr, "uniform block");
- if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.layoutPushConstant)
+ 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:
@@ -7346,41 +7628,28 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
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
-#ifdef NV_EXTENSIONS
- |EShLangMeshNVMask
-#endif
- ), "input block");
+ requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|
+ EShLangFragmentMask|EShLangMeshNVMask), "input block");
if (language == EShLangFragment) {
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
- }
-#ifdef NV_EXTENSIONS
- else if (language == EShLangMeshNV && ! qualifier.isTaskMemory()) {
+ } else if (language == EShLangMeshNV && ! qualifier.isTaskMemory()) {
error(loc, "input blocks cannot be used in a mesh shader", "out", "");
}
-#endif
break;
case EvqVaryingOut:
profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block");
- requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask
-#ifdef NV_EXTENSIONS
- |EShLangMeshNVMask|EShLangTaskNVMask
-#endif
- ), "output block");
+ requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|
+ EShLangGeometryMask|EShLangMeshNVMask|EShLangTaskNVMask), "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");
- }
-#ifdef NV_EXTENSIONS
- else if (language == EShLangMeshNV && qualifier.isTaskMemory()) {
+ } else if (language == EShLangMeshNV && qualifier.isTaskMemory()) {
error(loc, "can only use on input blocks in mesh shader", "taskNV", "");
- }
- else if (language == EShLangTaskNV && ! qualifier.isTaskMemory()) {
+ } else if (language == EShLangTaskNV && ! qualifier.isTaskMemory()) {
error(loc, "output blocks cannot be used in a task shader", "out", "");
}
-#endif
break;
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
case EvqPayloadNV:
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV block");
requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
@@ -7435,18 +7704,16 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
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.sample)
+ 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.layoutPushConstant)
+ if (qualifier.isPushConstant())
intermediate.addPushConstantCount();
-#ifdef NV_EXTENSIONS
- if (qualifier.layoutShaderRecordNV)
+ if (qualifier.isShaderRecordNV())
intermediate.addShaderRecordNVCount();
- if (qualifier.perTaskNV)
+ if (qualifier.isTaskMemory())
intermediate.addTaskNVCount();
-#endif
}
//
@@ -7495,6 +7762,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi
void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
{
+#ifndef GLSLANG_WEB
// "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
@@ -7507,24 +7775,18 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
for (unsigned int member = 0; member < typeList.size(); ++member) {
TQualifier& memberQualifier = typeList[member].type->getQualifier();
bool contains64BitType = false;
-#ifdef AMD_EXTENSIONS
bool contains32BitType = false;
bool contains16BitType = false;
int memberSize = intermediate.computeTypeXfbSize(*typeList[member].type, contains64BitType, contains32BitType, contains16BitType);
-#else
- int memberSize = intermediate.computeTypeXfbSize(*typeList[member].type, contains64BitType);
-#endif
// 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);
-#ifdef AMD_EXTENSIONS
else if (contains32BitType)
RoundToPow2(nextOffset, 4);
else if (contains16BitType)
RoundToPow2(nextOffset, 2);
-#endif
memberQualifier.layoutXfbOffset = nextOffset;
} else
nextOffset = memberQualifier.layoutXfbOffset;
@@ -7534,6 +7796,7 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
// 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;
+#endif
}
// Calculate and save the offset of each block member, using the recursively
@@ -7610,7 +7873,7 @@ void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qua
// 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.layoutBufferReference) {
+ if (!symbol && qualifier.hasBufferReference()) {
TTypeList typeList;
TType blockType(&typeList, identifier, qualifier);;
TType blockNameType(EbtReference, blockType, identifier);
@@ -7650,10 +7913,10 @@ void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qua
error(loc, "cannot change qualification after use", "invariant", "");
symbol->getWritableType().getQualifier().invariant = true;
invariantCheck(loc, symbol->getType().getQualifier());
- } else if (qualifier.noContraction) {
+ } else if (qualifier.isNoContraction()) {
if (intermediate.inIoAccessed(identifier))
error(loc, "cannot change qualification after use", "precise", "");
- symbol->getWritableType().getQualifier().noContraction = true;
+ symbol->getWritableType().getQualifier().setNoContraction();
} else if (qualifier.specConstant) {
symbol->getWritableType().getQualifier().makeSpecConstant();
if (qualifier.hasSpecConstantId())
@@ -7676,7 +7939,7 @@ void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qual
bool pipeOut = qualifier.isPipeOutput();
bool pipeIn = qualifier.isPipeInput();
- if (version >= 300 || (profile != EEsProfile && version >= 420)) {
+ if (version >= 300 || (!isEsProfile() && version >= 420)) {
if (! pipeOut)
error(loc, "can only apply to an output", "invariant", "");
} else {
@@ -7691,12 +7954,9 @@ void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qual
//
void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType)
{
+#ifndef GLSLANG_WEB
if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) {
-#ifdef NV_EXTENSIONS
assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMeshNV);
-#else
- assert(language == EShLangTessControl || language == EShLangGeometry);
-#endif
const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices";
if (publicType.qualifier.storage != EvqVaryingOut)
@@ -7707,7 +7967,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
if (language == EShLangTessControl)
checkIoArraysConsistency(loc);
}
-#ifdef NV_EXTENSIONS
if (publicType.shaderQualifiers.primitives != TQualifier::layoutNotSet) {
assert(language == EShLangMeshNV);
const char* id = "max_primitives";
@@ -7717,7 +7976,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
if (! intermediate.setPrimitives(publicType.shaderQualifiers.primitives))
error(loc, "cannot change previously set layout value", id, "");
}
-#endif
if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) {
if (publicType.qualifier.storage != EvqVaryingIn)
error(loc, "can only apply to 'in'", "invocations", "");
@@ -7734,12 +7992,10 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
case ElgTrianglesAdjacency:
case ElgQuads:
case ElgIsolines:
-#ifdef NV_EXTENSIONS
if (language == EShLangMeshNV) {
error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
break;
}
-#endif
if (intermediate.setInputPrimitive(publicType.shaderQualifiers.geometry)) {
if (language == EShLangGeometry)
checkIoArraysConsistency(loc);
@@ -7751,14 +8007,12 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
}
} else if (publicType.qualifier.storage == EvqVaryingOut) {
switch (publicType.shaderQualifiers.geometry) {
-#ifdef NV_EXTENSIONS
case ElgLines:
case ElgTriangles:
if (language != EShLangMeshNV) {
error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
break;
}
-#endif
// Fall through
case ElgPoints:
case ElgLineStrip:
@@ -7792,8 +8046,9 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
else
error(loc, "can only apply to 'in'", "point_mode", "");
}
+#endif
for (int i = 0; i < 3; ++i) {
- if (publicType.shaderQualifiers.localSize[i] > 1) {
+ 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", "");
@@ -7809,7 +8064,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
if (intermediate.getLocalSize(i) > (unsigned int)max)
error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
}
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
else if (language == EShLangMeshNV) {
switch (i) {
case 0: max = resources.maxMeshWorkGroupSizeX_NV; break;
@@ -7819,8 +8074,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
}
if (intermediate.getLocalSize(i) > (unsigned int)max)
error(loc, "too large; see gl_MaxMeshWorkGroupSizeNV", "local_size", "");
- }
- else if (language == EShLangTaskNV) {
+ } else if (language == EShLangTaskNV) {
switch (i) {
case 0: max = resources.maxTaskWorkGroupSizeX_NV; break;
case 1: max = resources.maxTaskWorkGroupSizeY_NV; break;
@@ -7855,6 +8109,8 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
workGroupSize->getWritableType().getQualifier().specConstant = true;
}
}
+
+#ifndef GLSLANG_WEB
if (publicType.shaderQualifiers.earlyFragmentTests) {
if (publicType.qualifier.storage == EvqVaryingIn)
intermediate.setEarlyFragmentTests();
@@ -7867,12 +8123,19 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
else
error(loc, "can only apply to 'in'", "post_coverage_coverage", "");
}
- if (publicType.shaderQualifiers.blendEquation) {
+ 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), "");
+ }
-#ifdef NV_EXTENSIONS
if (publicType.shaderQualifiers.layoutDerivativeGroupQuads &&
publicType.shaderQualifiers.layoutDerivativeGroupLinear) {
error(loc, "cannot be both specified", "derivative_group_quadsNV and derivative_group_linearNV", "");
@@ -7917,6 +8180,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
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() ||
@@ -7941,6 +8205,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
case EvqVaryingIn:
break;
case EvqVaryingOut:
+#ifndef GLSLANG_WEB
if (qualifier.hasStream())
globalOutputDefaults.layoutStream = qualifier.layoutStream;
if (qualifier.hasXfbBuffer())
@@ -7949,6 +8214,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride))
error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer);
}
+#endif
break;
default:
error(loc, "default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification", "", "");
@@ -7961,16 +8227,14 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
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.layoutPushConstant)
+ if (qualifier.isPushConstant())
error(loc, "cannot declare a default, can only be used on a block", "push_constant", "");
- if (qualifier.layoutBufferReference)
+ 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", "");
-#ifdef NV_EXTENSIONS
- if (qualifier.layoutShaderRecordNV)
+ if (qualifier.isShaderRecordNV())
error(loc, "cannot declare a default, can only be used on a block", "shaderRecordNV", "");
-#endif
}
//
@@ -8037,7 +8301,7 @@ TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expre
// "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 (profile == EEsProfile && version <= 300 && ! relaxedErrors())
+ if (isEsProfile() && version <= 300 && ! relaxedErrors())
error(loc, "last case/default label not followed by statements", "switch", "");
else
warn(loc, "last case/default label not followed by statements", "switch", "");
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
index a1ffe64dbf..39363f1a2a 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
@@ -85,6 +85,7 @@ public:
statementNestingLevel(0), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0),
postEntryPointReturn(false),
contextPragma(true, false),
+ beginInvocationInterlockCount(0), endInvocationInterlockCount(0),
parsingBuiltins(parsingBuiltins), scanContext(nullptr), ppContext(nullptr),
limits(resources.limits),
globalUniformBlock(nullptr),
@@ -96,6 +97,7 @@ public:
}
virtual ~TParseContextBase() { }
+#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL)
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,
@@ -104,6 +106,7 @@ public:
const char* szExtraInfoFormat, ...);
virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, ...);
+#endif
virtual void setLimits(const TBuiltInResource&) = 0;
@@ -149,8 +152,10 @@ public:
extensionCallback(line, extension, behavior);
}
+#ifdef ENABLE_HLSL
// Manage the global uniform block (default uniforms in GLSL, $Global in HLSL)
virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
+#endif
// Potentially rename shader entry point function
void renameShaderFunction(TString*& name) const
@@ -182,6 +187,8 @@ public:
// the statementNestingLevel the current switch statement is at, which must match the level of its case statements
TList<int> switchLevel;
struct TPragma contextPragma;
+ int beginInvocationInterlockCount;
+ int endInvocationInterlockCount;
protected:
TParseContextBase(TParseContextBase&);
@@ -276,7 +283,7 @@ public:
const TString* entryPoint = nullptr);
virtual ~TParseContext();
- bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); };
+ bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); }
void setPrecisionDefaults();
void setLimits(const TBuiltInResource&) override;
@@ -294,10 +301,12 @@ public:
TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
+#ifndef GLSLANG_WEB
void makeEditable(TSymbol*&) override;
+ void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
+#endif
bool isIoResizeArray(const TType&) const;
void fixIoArraySize(const TSourceLoc&, TType&);
- void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false);
int getIoArrayImplicitSize(const TQualifier&, TString* featureString = nullptr) const;
@@ -401,6 +410,7 @@ public:
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 = 0, TArraySizes* arraySizes = 0);
void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
@@ -414,6 +424,7 @@ public:
void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
+#ifndef GLSLANG_WEB
TAttributeType attributeFromName(const TString& name) const;
TAttributes* makeAttributes(const TString& identifier) const;
TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const;
@@ -422,11 +433,11 @@ public:
// 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*);
+#endif
- void resizeMeshViewDimension(const TSourceLoc&, TType&);
+ void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
protected:
void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type);
@@ -438,7 +449,9 @@ protected:
bool isRuntimeLength(const TIntermTyped&) const;
TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
+#ifndef GLSLANG_WEB
void finish() override;
+#endif
public:
//
@@ -464,10 +477,11 @@ protected:
TQualifier globalUniformDefaults;
TQualifier globalInputDefaults;
TQualifier globalOutputDefaults;
- int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point
TString currentCaller; // name of last function body entered (not valid when at global scope)
- TIdSetType inductiveLoopIds;
+#ifndef GLSLANG_WEB
+ int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point
bool anyIndexLimits;
+ TIdSetType inductiveLoopIds;
TVector<TIntermTyped*> needsIndexLimitationChecking;
//
@@ -503,6 +517,7 @@ protected:
// array-sizing declarations
//
TVector<TSymbol*> ioArraySymbolResizeList;
+#endif
};
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
index 482f6ba271..fd18fd4d7d 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
@@ -324,7 +324,9 @@ struct str_hash
// A single global usable by all threads, by all versions, by all languages.
// After a single process-level initialization, this is read only and thread safe
std::unordered_map<const char*, int, str_hash, str_eq>* KeywordMap = nullptr;
+#ifndef GLSLANG_WEB
std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
+#endif
};
@@ -341,9 +343,15 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["const"] = CONST;
(*KeywordMap)["uniform"] = UNIFORM;
- (*KeywordMap)["nonuniformEXT"] = NONUNIFORM;
+ (*KeywordMap)["buffer"] = BUFFER;
(*KeywordMap)["in"] = IN;
(*KeywordMap)["out"] = OUT;
+ (*KeywordMap)["smooth"] = SMOOTH;
+ (*KeywordMap)["flat"] = FLAT;
+ (*KeywordMap)["centroid"] = CENTROID;
+ (*KeywordMap)["invariant"] = INVARIANT;
+ (*KeywordMap)["packed"] = PACKED;
+ (*KeywordMap)["resource"] = RESOURCE;
(*KeywordMap)["inout"] = INOUT;
(*KeywordMap)["struct"] = STRUCT;
(*KeywordMap)["break"] = BREAK;
@@ -376,9 +384,33 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["mat4"] = MAT4;
(*KeywordMap)["true"] = BOOLCONSTANT;
(*KeywordMap)["false"] = BOOLCONSTANT;
+ (*KeywordMap)["layout"] = LAYOUT;
+ (*KeywordMap)["shared"] = SHARED;
+ (*KeywordMap)["highp"] = HIGH_PRECISION;
+ (*KeywordMap)["mediump"] = MEDIUM_PRECISION;
+ (*KeywordMap)["lowp"] = LOW_PRECISION;
+ (*KeywordMap)["superp"] = SUPERP;
+ (*KeywordMap)["precision"] = PRECISION;
+ (*KeywordMap)["mat2x2"] = MAT2X2;
+ (*KeywordMap)["mat2x3"] = MAT2X3;
+ (*KeywordMap)["mat2x4"] = MAT2X4;
+ (*KeywordMap)["mat3x2"] = MAT3X2;
+ (*KeywordMap)["mat3x3"] = MAT3X3;
+ (*KeywordMap)["mat3x4"] = MAT3X4;
+ (*KeywordMap)["mat4x2"] = MAT4X2;
+ (*KeywordMap)["mat4x3"] = MAT4X3;
+ (*KeywordMap)["mat4x4"] = MAT4X4;
+ (*KeywordMap)["uint"] = UINT;
+ (*KeywordMap)["uvec2"] = UVEC2;
+ (*KeywordMap)["uvec3"] = UVEC3;
+ (*KeywordMap)["uvec4"] = UVEC4;
+
+#ifndef GLSLANG_WEB
+ (*KeywordMap)["nonuniformEXT"] = NONUNIFORM;
+ (*KeywordMap)["demote"] = DEMOTE;
(*KeywordMap)["attribute"] = ATTRIBUTE;
(*KeywordMap)["varying"] = VARYING;
- (*KeywordMap)["buffer"] = BUFFER;
+ (*KeywordMap)["noperspective"] = NOPERSPECTIVE;
(*KeywordMap)["coherent"] = COHERENT;
(*KeywordMap)["devicecoherent"] = DEVICECOHERENT;
(*KeywordMap)["queuefamilycoherent"] = QUEUEFAMILYCOHERENT;
@@ -390,24 +422,9 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["writeonly"] = WRITEONLY;
(*KeywordMap)["atomic_uint"] = ATOMIC_UINT;
(*KeywordMap)["volatile"] = VOLATILE;
- (*KeywordMap)["layout"] = LAYOUT;
- (*KeywordMap)["shared"] = SHARED;
(*KeywordMap)["patch"] = PATCH;
(*KeywordMap)["sample"] = SAMPLE;
(*KeywordMap)["subroutine"] = SUBROUTINE;
- (*KeywordMap)["highp"] = HIGH_PRECISION;
- (*KeywordMap)["mediump"] = MEDIUM_PRECISION;
- (*KeywordMap)["lowp"] = LOW_PRECISION;
- (*KeywordMap)["precision"] = PRECISION;
- (*KeywordMap)["mat2x2"] = MAT2X2;
- (*KeywordMap)["mat2x3"] = MAT2X3;
- (*KeywordMap)["mat2x4"] = MAT2X4;
- (*KeywordMap)["mat3x2"] = MAT3X2;
- (*KeywordMap)["mat3x3"] = MAT3X3;
- (*KeywordMap)["mat3x4"] = MAT3X4;
- (*KeywordMap)["mat4x2"] = MAT4X2;
- (*KeywordMap)["mat4x3"] = MAT4X3;
- (*KeywordMap)["mat4x4"] = MAT4X4;
(*KeywordMap)["dmat2"] = DMAT2;
(*KeywordMap)["dmat3"] = DMAT3;
(*KeywordMap)["dmat4"] = DMAT4;
@@ -457,11 +474,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["dvec2"] = DVEC2;
(*KeywordMap)["dvec3"] = DVEC3;
(*KeywordMap)["dvec4"] = DVEC4;
- (*KeywordMap)["uint"] = UINT;
- (*KeywordMap)["uvec2"] = UVEC2;
- (*KeywordMap)["uvec3"] = UVEC3;
- (*KeywordMap)["uvec4"] = UVEC4;
-
(*KeywordMap)["int64_t"] = INT64_T;
(*KeywordMap)["uint64_t"] = UINT64_T;
(*KeywordMap)["i64vec2"] = I64VEC2;
@@ -548,19 +560,10 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["f64mat4x2"] = F64MAT4X2;
(*KeywordMap)["f64mat4x3"] = F64MAT4X3;
(*KeywordMap)["f64mat4x4"] = F64MAT4X4;
+#endif
(*KeywordMap)["sampler2D"] = SAMPLER2D;
(*KeywordMap)["samplerCube"] = SAMPLERCUBE;
- (*KeywordMap)["samplerCubeArray"] = SAMPLERCUBEARRAY;
- (*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW;
- (*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY;
- (*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY;
- (*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW;
- (*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY;
- (*KeywordMap)["usampler1D"] = USAMPLER1D;
- (*KeywordMap)["isampler1D"] = ISAMPLER1D;
- (*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY;
- (*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER;
(*KeywordMap)["samplerCubeShadow"] = SAMPLERCUBESHADOW;
(*KeywordMap)["sampler2DArray"] = SAMPLER2DARRAY;
(*KeywordMap)["sampler2DArrayShadow"] = SAMPLER2DARRAYSHADOW;
@@ -572,6 +575,39 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usampler3D"] = USAMPLER3D;
(*KeywordMap)["usamplerCube"] = USAMPLERCUBE;
(*KeywordMap)["usampler2DArray"] = USAMPLER2DARRAY;
+ (*KeywordMap)["sampler3D"] = SAMPLER3D;
+ (*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW;
+
+ (*KeywordMap)["texture2D"] = TEXTURE2D;
+ (*KeywordMap)["textureCube"] = TEXTURECUBE;
+ (*KeywordMap)["texture2DArray"] = TEXTURE2DARRAY;
+ (*KeywordMap)["itexture2D"] = ITEXTURE2D;
+ (*KeywordMap)["itexture3D"] = ITEXTURE3D;
+ (*KeywordMap)["itextureCube"] = ITEXTURECUBE;
+ (*KeywordMap)["itexture2DArray"] = ITEXTURE2DARRAY;
+ (*KeywordMap)["utexture2D"] = UTEXTURE2D;
+ (*KeywordMap)["utexture3D"] = UTEXTURE3D;
+ (*KeywordMap)["utextureCube"] = UTEXTURECUBE;
+ (*KeywordMap)["utexture2DArray"] = UTEXTURE2DARRAY;
+ (*KeywordMap)["texture3D"] = TEXTURE3D;
+
+ (*KeywordMap)["sampler"] = SAMPLER;
+ (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW;
+
+#ifndef GLSLANG_WEB
+ (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY;
+ (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY;
+ (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY;
+ (*KeywordMap)["samplerCubeArray"] = SAMPLERCUBEARRAY;
+ (*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW;
+ (*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY;
+ (*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY;
+ (*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW;
+ (*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY;
+ (*KeywordMap)["usampler1D"] = USAMPLER1D;
+ (*KeywordMap)["isampler1D"] = ISAMPLER1D;
+ (*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY;
+ (*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER;
(*KeywordMap)["isampler2DRect"] = ISAMPLER2DRECT;
(*KeywordMap)["usampler2DRect"] = USAMPLER2DRECT;
(*KeywordMap)["isamplerBuffer"] = ISAMPLERBUFFER;
@@ -584,8 +620,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usampler2DMSArray"] = USAMPLER2DMSARRAY;
(*KeywordMap)["sampler1D"] = SAMPLER1D;
(*KeywordMap)["sampler1DShadow"] = SAMPLER1DSHADOW;
- (*KeywordMap)["sampler3D"] = SAMPLER3D;
- (*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW;
(*KeywordMap)["sampler2DRect"] = SAMPLER2DRECT;
(*KeywordMap)["sampler2DRectShadow"] = SAMPLER2DRECTSHADOW;
(*KeywordMap)["sampler1DArray"] = SAMPLER1DARRAY;
@@ -594,28 +628,11 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["__samplerExternal2DY2YEXT"] = SAMPLEREXTERNAL2DY2YEXT; // GL_EXT_YUV_target
- (*KeywordMap)["sampler"] = SAMPLER;
- (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW;
-
- (*KeywordMap)["texture2D"] = TEXTURE2D;
- (*KeywordMap)["textureCube"] = TEXTURECUBE;
- (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY;
- (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY;
- (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY;
(*KeywordMap)["itexture1DArray"] = ITEXTURE1DARRAY;
(*KeywordMap)["utexture1D"] = UTEXTURE1D;
(*KeywordMap)["itexture1D"] = ITEXTURE1D;
(*KeywordMap)["utexture1DArray"] = UTEXTURE1DARRAY;
(*KeywordMap)["textureBuffer"] = TEXTUREBUFFER;
- (*KeywordMap)["texture2DArray"] = TEXTURE2DARRAY;
- (*KeywordMap)["itexture2D"] = ITEXTURE2D;
- (*KeywordMap)["itexture3D"] = ITEXTURE3D;
- (*KeywordMap)["itextureCube"] = ITEXTURECUBE;
- (*KeywordMap)["itexture2DArray"] = ITEXTURE2DARRAY;
- (*KeywordMap)["utexture2D"] = UTEXTURE2D;
- (*KeywordMap)["utexture3D"] = UTEXTURE3D;
- (*KeywordMap)["utextureCube"] = UTEXTURECUBE;
- (*KeywordMap)["utexture2DArray"] = UTEXTURE2DARRAY;
(*KeywordMap)["itexture2DRect"] = ITEXTURE2DRECT;
(*KeywordMap)["utexture2DRect"] = UTEXTURE2DRECT;
(*KeywordMap)["itextureBuffer"] = ITEXTUREBUFFER;
@@ -627,7 +644,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["itexture2DMSArray"] = ITEXTURE2DMSARRAY;
(*KeywordMap)["utexture2DMSArray"] = UTEXTURE2DMSARRAY;
(*KeywordMap)["texture1D"] = TEXTURE1D;
- (*KeywordMap)["texture3D"] = TEXTURE3D;
(*KeywordMap)["texture2DRect"] = TEXTURE2DRECT;
(*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY;
@@ -638,7 +654,6 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["usubpassInput"] = USUBPASSINPUT;
(*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS;
-#ifdef AMD_EXTENSIONS
(*KeywordMap)["f16sampler1D"] = F16SAMPLER1D;
(*KeywordMap)["f16sampler2D"] = F16SAMPLER2D;
(*KeywordMap)["f16sampler3D"] = F16SAMPLER3D;
@@ -684,25 +699,10 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["f16subpassInput"] = F16SUBPASSINPUT;
(*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS;
-#endif
-
- (*KeywordMap)["noperspective"] = NOPERSPECTIVE;
- (*KeywordMap)["smooth"] = SMOOTH;
- (*KeywordMap)["flat"] = FLAT;
-#ifdef AMD_EXTENSIONS
(*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD;
-#endif
- (*KeywordMap)["centroid"] = CENTROID;
-#ifdef NV_EXTENSIONS
(*KeywordMap)["pervertexNV"] = PERVERTEXNV;
-#endif
(*KeywordMap)["precise"] = PRECISE;
- (*KeywordMap)["invariant"] = INVARIANT;
- (*KeywordMap)["packed"] = PACKED;
- (*KeywordMap)["resource"] = RESOURCE;
- (*KeywordMap)["superp"] = SUPERP;
-#ifdef NV_EXTENSIONS
(*KeywordMap)["rayPayloadNV"] = PAYLOADNV;
(*KeywordMap)["rayPayloadInNV"] = PAYLOADINNV;
(*KeywordMap)["hitAttributeNV"] = HITATTRNV;
@@ -712,9 +712,10 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
(*KeywordMap)["perviewNV"] = PERVIEWNV;
(*KeywordMap)["taskNV"] = PERTASKNV;
-#endif
(*KeywordMap)["fcoopmatNV"] = FCOOPMATNV;
+ (*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
+ (*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
@@ -755,14 +756,17 @@ void TScanContext::fillInKeywordMap()
ReservedSet->insert("cast");
ReservedSet->insert("namespace");
ReservedSet->insert("using");
+#endif
}
void TScanContext::deleteKeywordMap()
{
delete KeywordMap;
KeywordMap = nullptr;
+#ifndef GLSLANG_WEB
delete ReservedSet;
ReservedSet = nullptr;
+#endif
}
// Called by yylex to get the next token.
@@ -841,13 +845,15 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
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;
+#ifndef GLSLANG_WEB
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 PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT;
case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT;
+#endif
case PpAtomIdentifier:
{
int token = tokenizeIdentifier();
@@ -869,8 +875,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
int TScanContext::tokenizeIdentifier()
{
+#ifndef GLSLANG_WEB
if (ReservedSet->find(tokenText) != ReservedSet->end())
return reservedWord();
+#endif
auto it = KeywordMap->find(tokenText);
if (it == KeywordMap->end()) {
@@ -897,20 +905,21 @@ int TScanContext::tokenizeIdentifier()
case CASE:
return keyword;
+ case BUFFER:
+ afterBuffer = true;
+ if ((parseContext.isEsProfile() && parseContext.version < 310) ||
+ (!parseContext.isEsProfile() && parseContext.version < 430))
+ return identifierOrType();
+ return keyword;
+
case STRUCT:
afterStruct = true;
return keyword;
- case NONUNIFORM:
- if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier))
- return keyword;
- else
- return identifierOrType();
-
case SWITCH:
case DEFAULT:
- if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 130))
+ if ((parseContext.isEsProfile() && parseContext.version < 300) ||
+ (!parseContext.isEsProfile() && parseContext.version < 130))
reservedWord();
return keyword;
@@ -942,20 +951,59 @@ int TScanContext::tokenizeIdentifier()
parserToken->sType.lex.b = false;
return keyword;
- case ATTRIBUTE:
- case VARYING:
- if (parseContext.profile == EEsProfile && parseContext.version >= 300)
+ 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 BUFFER:
- afterBuffer = true;
- if ((parseContext.profile == EEsProfile && parseContext.version < 310) ||
- (parseContext.profile != EEsProfile && parseContext.version < 430))
+ 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 < 330))
+ 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);
+ }
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
+ 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:
@@ -963,14 +1011,11 @@ int TScanContext::tokenizeIdentifier()
case CALLDATAINNV:
case ACCSTRUCTNV:
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && parseContext.version >= 460
- && parseContext.extensionTurnedOn(E_GL_NV_ray_tracing)))
+ parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))
return keyword;
return identifierOrType();
-#endif
-
case ATOMIC_UINT:
- if ((parseContext.profile == EEsProfile && parseContext.version >= 310) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
return keyword;
return es30ReservedFromGLSL(420);
@@ -984,53 +1029,51 @@ int TScanContext::tokenizeIdentifier()
case RESTRICT:
case READONLY:
case WRITEONLY:
- if (parseContext.profile == EEsProfile && parseContext.version >= 310)
+ 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.profile == EEsProfile && parseContext.version >= 310)
+ if (parseContext.isEsProfile() && parseContext.version >= 310)
return keyword;
- if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile ||
+ if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.isEsProfile() ||
(parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))))
reservedWord();
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.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 140 &&
- ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
- return identifierOrType();
- return keyword;
- }
- case SHARED:
- if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 140))
- return identifierOrType();
- return keyword;
-
case PATCH:
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile == EEsProfile &&
+ (parseContext.isEsProfile() &&
(parseContext.version >= 320 ||
parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))) ||
- (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader)))
+ (!parseContext.isEsProfile() && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader)))
return keyword;
return es30ReservedFromGLSL(400);
case SAMPLE:
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation))
return keyword;
return es30ReservedFromGLSL(400);
case SUBROUTINE:
return es30ReservedFromGLSL(400);
+#endif
+ 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:
@@ -1049,6 +1092,7 @@ int TScanContext::tokenizeIdentifier()
case MAT4X4:
return matNxM();
+#ifndef GLSLANG_WEB
case DMAT2:
case DMAT3:
case DMAT4:
@@ -1079,7 +1123,7 @@ int TScanContext::tokenizeIdentifier()
case IIMAGEBUFFER:
case UIMAGEBUFFER:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
return keyword;
return firstGenerationImage(false);
@@ -1103,7 +1147,7 @@ int TScanContext::tokenizeIdentifier()
case IIMAGECUBEARRAY:
case UIMAGECUBEARRAY:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
return keyword;
return secondGenerationImage();
@@ -1122,7 +1166,10 @@ int TScanContext::tokenizeIdentifier()
case DVEC3:
case DVEC4:
afterType = true;
- if (parseContext.profile == EEsProfile || parseContext.version < 400)
+ if (parseContext.isEsProfile() || parseContext.version < 150 ||
+ (!parseContext.symbolTable.atBuiltInLevel() &&
+ parseContext.version < 400 &&
+ !parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)))
reservedWord();
return keyword;
@@ -1136,10 +1183,9 @@ int TScanContext::tokenizeIdentifier()
case U64VEC4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
- (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64))))
+ parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64))
return keyword;
return identifierOrType();
@@ -1153,10 +1199,9 @@ int TScanContext::tokenizeIdentifier()
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_EXT_shader_explicit_arithmetic_types_int8)) &&
- parseContext.profile != EEsProfile && parseContext.version >= 450))
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_8bit_storage) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8))
return keyword;
return identifierOrType();
@@ -1170,14 +1215,10 @@ int TScanContext::tokenizeIdentifier()
case U16VEC4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
- (
-#ifdef AMD_EXTENSIONS
- parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) ||
-#endif
- parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16))))
+ 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_EXT_shader_explicit_arithmetic_types_int16))
return keyword;
return identifierOrType();
case INT32_T:
@@ -1190,9 +1231,8 @@ int TScanContext::tokenizeIdentifier()
case U32VEC4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- ((parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32)) &&
- parseContext.profile != EEsProfile && parseContext.version >= 450))
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32))
return keyword;
return identifierOrType();
case FLOAT32_T:
@@ -1213,9 +1253,8 @@ int TScanContext::tokenizeIdentifier()
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)) &&
- parseContext.profile != EEsProfile && parseContext.version >= 450))
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32))
return keyword;
return identifierOrType();
@@ -1237,9 +1276,8 @@ int TScanContext::tokenizeIdentifier()
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)) &&
- parseContext.profile != EEsProfile && parseContext.version >= 450))
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64))
return keyword;
return identifierOrType();
@@ -1249,14 +1287,10 @@ int TScanContext::tokenizeIdentifier()
case F16VEC4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
- (
-#ifdef AMD_EXTENSIONS
- parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
-#endif
- parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16))))
+ 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_EXT_shader_explicit_arithmetic_types_float16))
return keyword;
return identifierOrType();
@@ -1275,13 +1309,9 @@ int TScanContext::tokenizeIdentifier()
case F16MAT4X4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
- (
-#ifdef AMD_EXTENSIONS
- parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
-#endif
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
- parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16))))
+ 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();
@@ -1291,20 +1321,21 @@ int TScanContext::tokenizeIdentifier()
case ISAMPLERCUBEARRAY:
case USAMPLERCUBEARRAY:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
return keyword;
- if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array)))
+ if (parseContext.isEsProfile() || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array)))
reservedWord();
return keyword;
- case ISAMPLER1D:
- case ISAMPLER1DARRAY:
- case SAMPLER1DARRAYSHADOW:
- case USAMPLER1D:
- case USAMPLER1DARRAY:
- afterType = true;
- return es30ReservedFromGLSL(130);
+ case TEXTURECUBEARRAY:
+ case ITEXTURECUBEARRAY:
+ case UTEXTURECUBEARRAY:
+ if (parseContext.spvVersion.vulkan > 0)
+ return keyword;
+ else
+ return identifierOrType();
+#endif
case UINT:
case UVEC2:
@@ -1324,6 +1355,49 @@ int TScanContext::tokenizeIdentifier()
afterType = true;
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();
+
+#ifndef GLSLANG_WEB
+ case ISAMPLER1D:
+ case ISAMPLER1DARRAY:
+ case SAMPLER1DARRAYSHADOW:
+ case USAMPLER1D:
+ case USAMPLER1DARRAY:
+ afterType = true;
+ return es30ReservedFromGLSL(130);
case ISAMPLER2DRECT:
case USAMPLER2DRECT:
afterType = true;
@@ -1331,7 +1405,7 @@ int TScanContext::tokenizeIdentifier()
case SAMPLERBUFFER:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
return keyword;
return es30ReservedFromGLSL(130);
@@ -1339,7 +1413,7 @@ int TScanContext::tokenizeIdentifier()
case ISAMPLERBUFFER:
case USAMPLERBUFFER:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
return keyword;
return es30ReservedFromGLSL(140);
@@ -1348,7 +1422,10 @@ int TScanContext::tokenizeIdentifier()
case ISAMPLER2DMS:
case USAMPLER2DMS:
afterType = true;
- if (parseContext.profile == EEsProfile && parseContext.version >= 310)
+ 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);
@@ -1356,38 +1433,25 @@ int TScanContext::tokenizeIdentifier()
case ISAMPLER2DMSARRAY:
case USAMPLER2DMSARRAY:
afterType = true;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ 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.profile == EEsProfile)
+ if (parseContext.isEsProfile())
reservedWord();
return keyword;
- case SAMPLER3D:
- afterType = true;
- if (parseContext.profile == EEsProfile && parseContext.version < 300) {
- if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D))
- reservedWord();
- }
- return keyword;
-
- case SAMPLER2DSHADOW:
- afterType = true;
- if (parseContext.profile == EEsProfile && parseContext.version < 300) {
- if (!parseContext.extensionTurnedOn(E_GL_EXT_shadow_samplers))
- reservedWord();
- }
- return keyword;
-
case SAMPLER2DRECT:
case SAMPLER2DRECTSHADOW:
afterType = true;
- if (parseContext.profile == EEsProfile)
+ if (parseContext.isEsProfile())
reservedWord();
else if (parseContext.version < 140 && ! parseContext.symbolTable.atBuiltInLevel() && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_rectangle)) {
if (parseContext.relaxedErrors())
@@ -1399,10 +1463,10 @@ int TScanContext::tokenizeIdentifier()
case SAMPLER1DARRAY:
afterType = true;
- if (parseContext.profile == EEsProfile && parseContext.version == 300)
+ if (parseContext.isEsProfile() && parseContext.version == 300)
reservedWord();
- else if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 130))
+ else if ((parseContext.isEsProfile() && parseContext.version < 300) ||
+ (!parseContext.isEsProfile() && parseContext.version < 130))
return identifierOrType();
return keyword;
@@ -1421,25 +1485,11 @@ int TScanContext::tokenizeIdentifier()
return keyword;
return identifierOrType();
- case TEXTURE2D:
- case TEXTURECUBE:
- case TEXTURECUBEARRAY:
- case ITEXTURECUBEARRAY:
- case UTEXTURECUBEARRAY:
case ITEXTURE1DARRAY:
case UTEXTURE1D:
case ITEXTURE1D:
case UTEXTURE1DARRAY:
case TEXTUREBUFFER:
- case TEXTURE2DARRAY:
- case ITEXTURE2D:
- case ITEXTURE3D:
- case ITEXTURECUBE:
- case ITEXTURE2DARRAY:
- case UTEXTURE2D:
- case UTEXTURE3D:
- case UTEXTURECUBE:
- case UTEXTURE2DARRAY:
case ITEXTURE2DRECT:
case UTEXTURE2DRECT:
case ITEXTUREBUFFER:
@@ -1451,11 +1501,8 @@ int TScanContext::tokenizeIdentifier()
case ITEXTURE2DMSARRAY:
case UTEXTURE2DMSARRAY:
case TEXTURE1D:
- case TEXTURE3D:
case TEXTURE2DRECT:
case TEXTURE1DARRAY:
- case SAMPLER:
- case SAMPLERSHADOW:
if (parseContext.spvVersion.vulkan > 0)
return keyword;
else
@@ -1472,7 +1519,6 @@ int TScanContext::tokenizeIdentifier()
else
return identifierOrType();
-#ifdef AMD_EXTENSIONS
case F16SAMPLER1D:
case F16SAMPLER2D:
case F16SAMPLER3D:
@@ -1520,99 +1566,40 @@ int TScanContext::tokenizeIdentifier()
case F16SUBPASSINPUTMS:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float_fetch) &&
- parseContext.profile != EEsProfile && parseContext.version >= 450))
+ parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float_fetch))
return keyword;
return identifierOrType();
-#endif
-
- case NOPERSPECTIVE:
-#ifdef NV_EXTENSIONS
- if (parseContext.profile == EEsProfile && parseContext.version >= 300 &&
- parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation))
- return keyword;
-#endif
- return es30ReservedFromGLSL(130);
- case SMOOTH:
- if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 130))
- return identifierOrType();
- return keyword;
-
-#ifdef AMD_EXTENSIONS
case EXPLICITINTERPAMD:
- if (parseContext.profile != EEsProfile && parseContext.version >= 450 &&
- parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter))
+ if (parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter))
return keyword;
return identifierOrType();
-#endif
-#ifdef NV_EXTENSIONS
case PERVERTEXNV:
- if (((parseContext.profile != EEsProfile && parseContext.version >= 450) ||
- (parseContext.profile == EEsProfile && parseContext.version >= 320)) &&
+ if ((!parseContext.isEsProfile() && parseContext.version >= 450) ||
parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric))
return keyword;
return identifierOrType();
-#endif
-
- case FLAT:
- if (parseContext.profile == EEsProfile && parseContext.version < 300)
- reservedWord();
- else if (parseContext.profile != EEsProfile && parseContext.version < 130)
- return identifierOrType();
- return keyword;
-
- case CENTROID:
- if (parseContext.version < 120)
- return identifierOrType();
- return keyword;
case PRECISE:
- if ((parseContext.profile == EEsProfile &&
+ if ((parseContext.isEsProfile() &&
(parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) ||
- (parseContext.profile != EEsProfile && parseContext.version >= 400))
+ (!parseContext.isEsProfile() && parseContext.version >= 400))
return keyword;
- if (parseContext.profile == EEsProfile && parseContext.version == 310) {
+ if (parseContext.isEsProfile() && parseContext.version == 310) {
reservedWord();
return keyword;
}
return identifierOrType();
- case INVARIANT:
- if (parseContext.profile != EEsProfile && parseContext.version < 120)
- return identifierOrType();
- return keyword;
-
- case PACKED:
- if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < 330))
- return reservedWord();
- return identifierOrType();
-
- case RESOURCE:
- {
- bool reserved = (parseContext.profile == EEsProfile && parseContext.version >= 300) ||
- (parseContext.profile != EEsProfile && parseContext.version >= 420);
- return identifierOrReserved(reserved);
- }
- case SUPERP:
- {
- bool reserved = parseContext.profile == EEsProfile || parseContext.version >= 130;
- return identifierOrReserved(reserved);
- }
-
-#ifdef NV_EXTENSIONS
case PERPRIMITIVENV:
case PERVIEWNV:
case PERTASKNV:
- if ((parseContext.profile != EEsProfile && parseContext.version >= 450) ||
- (parseContext.profile == EEsProfile && parseContext.version >= 320) ||
+ if ((!parseContext.isEsProfile() && parseContext.version >= 450) ||
+ (parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionTurnedOn(E_GL_NV_mesh_shader))
return keyword;
return identifierOrType();
-#endif
case FCOOPMATNV:
afterType = true;
@@ -1621,6 +1608,21 @@ int TScanContext::tokenizeIdentifier()
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 DEMOTE:
+ if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
+ return keyword;
+ else
+ return identifierOrType();
+#endif
+
default:
parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
return 0;
@@ -1638,7 +1640,7 @@ int TScanContext::identifierOrType()
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().getBasicType() == EbtReference && afterBuffer)) {
+ !(variable->getType().isReference() && afterBuffer)) {
afterType = true;
return TYPE_NAME;
@@ -1668,7 +1670,7 @@ int TScanContext::identifierOrReserved(bool reserved)
return 0;
}
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future reserved keyword", tokenText, "");
return identifierOrType();
@@ -1681,13 +1683,13 @@ int TScanContext::es30ReservedFromGLSL(int version)
if (parseContext.symbolTable.atBuiltInLevel())
return keyword;
- if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
- (parseContext.profile != EEsProfile && parseContext.version < version)) {
- if (parseContext.forwardCompatible)
+ 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.profile == EEsProfile && parseContext.version >= 300)
+ } else if (parseContext.isEsProfile() && parseContext.version >= 300)
reservedWord();
return keyword;
@@ -1697,9 +1699,9 @@ int TScanContext::es30ReservedFromGLSL(int version)
// showed up, both in an es version and a non-ES version.
int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion)
{
- if ((parseContext.profile == EEsProfile && parseContext.version < esVersion) ||
- (parseContext.profile != EEsProfile && parseContext.version < nonEsVersion)) {
- if (parseContext.forwardCompatible)
+ if ((parseContext.isEsProfile() && parseContext.version < esVersion) ||
+ (!parseContext.isEsProfile() && parseContext.version < nonEsVersion)) {
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future keyword", tokenText, "");
return identifierOrType();
@@ -1710,10 +1712,10 @@ int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion)
int TScanContext::precisionKeyword()
{
- if (parseContext.profile == EEsProfile || parseContext.version >= 130)
+ if (parseContext.isEsProfile() || parseContext.version >= 130)
return keyword;
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using ES precision qualifier keyword", tokenText, "");
return identifierOrType();
@@ -1726,7 +1728,7 @@ int TScanContext::matNxM()
if (parseContext.version > 110)
return keyword;
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future non-square matrix type keyword", tokenText, "");
return identifierOrType();
@@ -1736,16 +1738,18 @@ int TScanContext::dMat()
{
afterType = true;
- if (parseContext.profile == EEsProfile && parseContext.version >= 300) {
+ if (parseContext.isEsProfile() && parseContext.version >= 300) {
reservedWord();
return keyword;
}
- if (parseContext.profile != EEsProfile && parseContext.version >= 400)
+ if (!parseContext.isEsProfile() && (parseContext.version >= 400 ||
+ parseContext.symbolTable.atBuiltInLevel() ||
+ (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64))))
return keyword;
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future type keyword", tokenText, "");
return identifierOrType();
@@ -1754,19 +1758,19 @@ int TScanContext::dMat()
int TScanContext::firstGenerationImage(bool inEs310)
{
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile && (parseContext.version >= 420 ||
+ (!parseContext.isEsProfile() && (parseContext.version >= 420 ||
parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) ||
- (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310))
+ (inEs310 && parseContext.isEsProfile() && parseContext.version >= 310))
return keyword;
- if ((parseContext.profile == EEsProfile && parseContext.version >= 300) ||
- (parseContext.profile != EEsProfile && parseContext.version >= 130)) {
+ if ((parseContext.isEsProfile() && parseContext.version >= 300) ||
+ (!parseContext.isEsProfile() && parseContext.version >= 130)) {
reservedWord();
return keyword;
}
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future type keyword", tokenText, "");
return identifierOrType();
@@ -1774,17 +1778,17 @@ int TScanContext::firstGenerationImage(bool inEs310)
int TScanContext::secondGenerationImage()
{
- if (parseContext.profile == EEsProfile && parseContext.version >= 310) {
+ if (parseContext.isEsProfile() && parseContext.version >= 310) {
reservedWord();
return keyword;
}
if (parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.profile != EEsProfile &&
+ (!parseContext.isEsProfile() &&
(parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))))
return keyword;
- if (parseContext.forwardCompatible)
+ if (parseContext.isForwardCompatible())
parseContext.warn(loc, "using future type keyword", tokenText, "");
return identifierOrType();
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
index 6f9db0195c..44ce1c19d1 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
@@ -288,6 +288,11 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable,
TSymbolTable** symbolTables)
{
+#ifdef GLSLANG_WEB
+ profile = EEsProfile;
+ version = 310;
+#endif
+
(*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source,
infoSink, *symbolTables[language]);
@@ -304,6 +309,11 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
//
bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source)
{
+#ifdef GLSLANG_WEB
+ profile = EEsProfile;
+ version = 310;
+#endif
+
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
if (builtInParseables == nullptr)
@@ -326,6 +336,7 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source,
infoSink, commonTable, symbolTables);
+#ifndef GLSLANG_WEB
// check for tessellation
if ((profile != EEsProfile && version >= 150) ||
(profile == EEsProfile && version >= 310)) {
@@ -340,6 +351,7 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
(profile == EEsProfile && version >= 310))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangGeometry, source,
infoSink, commonTable, symbolTables);
+#endif
// check for compute
if ((profile != EEsProfile && version >= 420) ||
@@ -347,7 +359,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
infoSink, commonTable, symbolTables);
-#ifdef NV_EXTENSIONS
// check for ray tracing stages
if (profile != EEsProfile && version >= 450) {
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGenNV, source,
@@ -375,9 +386,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
infoSink, commonTable, symbolTables);
-#endif
-
-
return true;
}
@@ -479,11 +487,13 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
// Function to Print all builtins
void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
{
+#ifndef GLSLANG_WEB
infoSink.debug << "BuiltinSymbolTable {\n";
symbolTable.dump(infoSink, true);
infoSink.debug << "}\n";
+#endif
}
// Return true if the shader was correctly specified for version/profile/stage.
@@ -581,6 +591,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
}
+#ifndef GLSLANG_WEB
// Correct for stage type...
switch (stage) {
case EShLangGeometry:
@@ -612,7 +623,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
version = profile == EEsProfile ? 310 : 420;
}
break;
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV:
case EShLangIntersectNV:
case EShLangAnyHitNV:
@@ -633,7 +643,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
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;
}
-#endif
default:
break;
}
@@ -646,15 +655,10 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
// Check for SPIR-V compatibility
if (spvVersion.spv != 0) {
switch (profile) {
- case EEsProfile:
- if (spvVersion.vulkan > 0 && version < 310) {
+ case EEsProfile:
+ if (version < 310) {
correct = false;
- infoSink.info.message(EPrefixError, "#version: ES shaders for Vulkan SPIR-V require version 310 or higher");
- version = 310;
- }
- if (spvVersion.openGl >= 100) {
- correct = false;
- infoSink.info.message(EPrefixError, "#version: ES shaders for OpenGL SPIR-V are not supported");
+ infoSink.info.message(EPrefixError, "#version: ES shaders for SPIR-V require version 310 or higher");
version = 310;
}
break;
@@ -675,6 +679,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
}
}
+#endif
return correct;
}
@@ -833,13 +838,17 @@ bool ProcessDeferred(
// Get all the stages, languages, clients, and other environment
// stuff sorted out.
- EShSource source = (messages & EShMsgReadHlsl) != 0 ? EShSourceHlsl : EShSourceGlsl;
+ EShSource sourceGuess = (messages & EShMsgReadHlsl) != 0 ? EShSourceHlsl : EShSourceGlsl;
SpvVersion spvVersion;
EShLanguage stage = compiler->getLanguage();
- TranslateEnvironment(environment, messages, source, stage, spvVersion);
+ 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.
@@ -852,6 +861,7 @@ bool ProcessDeferred(
: userInput.scanVersion(version, profile, versionNotFirstToken);
bool versionNotFound = version == 0;
if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
+#ifndef GLSLANG_WEB
if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
(version != defaultVersion || profile != defaultProfile)) {
compiler->infoSink.info << "Warning, (version, profile) forced to be ("
@@ -859,7 +869,7 @@ bool ProcessDeferred(
<< "), while in source code it is ("
<< version << ", " << ProfileName(profile) << ")\n";
}
-
+#endif
if (versionNotFound) {
versionNotFirstToken = false;
versionNotFirst = false;
@@ -871,7 +881,13 @@ bool ProcessDeferred(
bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage,
versionNotFirst, defaultVersion, source, version, profile, spvVersion);
+#ifdef GLSLANG_WEB
+ profile = EEsProfile;
+ version = 310;
+#endif
+
bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
+#ifndef GLSLANG_WEB
bool warnVersionNotFirst = false;
if (! versionWillBeError && versionNotFirstToken) {
if (messages & EShMsgRelaxedErrors)
@@ -879,6 +895,7 @@ bool ProcessDeferred(
else
versionWillBeError = true;
}
+#endif
intermediate.setSource(source);
intermediate.setVersion(version);
@@ -887,8 +904,10 @@ bool ProcessDeferred(
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) {
@@ -938,11 +957,13 @@ bool ProcessDeferred(
parseContext->setLimits(*resources);
if (! goodVersion)
parseContext->addError();
+#ifndef GLSLANG_WEB
if (warnVersionNotFirst) {
TSourceLoc loc;
loc.init();
parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", "");
}
+#endif
parseContext->initializeExtensionBehavior();
@@ -973,6 +994,8 @@ bool ProcessDeferred(
return success;
}
+#ifndef GLSLANG_WEB
+
// 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.
@@ -1169,6 +1192,8 @@ struct DoPreprocessing {
std::string* outputString;
};
+#endif
+
// DoFullParse is a valid ProcessingConext template argument for fully
// parsing the shader. It populates the "intermediate" with the AST.
struct DoFullParse{
@@ -1199,6 +1224,7 @@ struct DoFullParse{
}
};
+#ifndef GLSLANG_WEB
// 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
@@ -1231,6 +1257,7 @@ bool PreprocessDeferred(
forwardCompatible, messages, intermediate, parser,
false, includer);
}
+#endif
//
// do a partial compile on the given strings for a single compilation unit
@@ -1749,6 +1776,11 @@ void TShader::addProcesses(const std::vector<std::string>& p)
intermediate->addProcesses(p);
}
+void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); }
+void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); }
+
+#ifndef GLSLANG_WEB
+
// Set binding base for given resource type
void TShader::setShiftBinding(TResourceType res, unsigned int base) {
intermediate->setShiftBinding(res, base);
@@ -1776,7 +1808,7 @@ void TShader::setShiftSsboBinding(unsigned int base) { setShiftBinding(EResSs
// Enables binding automapping using TIoMapper
void TShader::setAutoMapBindings(bool map) { intermediate->setAutoMapBindings(map); }
// Enables position.Y output negation in vertex shader
-void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); }
+
// 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)
@@ -1787,12 +1819,16 @@ void TShader::setUniformLocationBase(int base)
{
intermediate->setUniformLocationBase(base);
}
-// See comment above TDefaultHlslIoMapper in iomapper.cpp:
-void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); }
-void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlattenUniformArrays(flatten); }
void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); }
void TShader::setResourceSetBinding(const std::vector<std::string>& base) { intermediate->setResourceSetBinding(base); }
void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
+#endif
+
+#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.
@@ -1816,6 +1852,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
&environment);
}
+#ifndef GLSLANG_WEB
// Fill in a string with the result of preprocessing ShaderStrings
// Returns true if all extensions, pragmas and version strings were valid.
//
@@ -1840,6 +1877,7 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
defaultProfile, forceDefaultVersionAndProfile,
forwardCompatible, message, includer, *intermediate, output_string);
}
+#endif
const char* TShader::getInfoLog()
{
@@ -1851,7 +1889,11 @@ const char* TShader::getInfoDebugLog()
return infoSink->debug.c_str();
}
-TProgram::TProgram() : reflection(0), ioMapper(nullptr), linked(false)
+TProgram::TProgram() :
+#ifndef GLSLANG_WEB
+ reflection(0),
+#endif
+ linked(false)
{
pool = new TPoolAllocator;
infoSink = new TInfoSink;
@@ -1863,9 +1905,10 @@ TProgram::TProgram() : reflection(0), ioMapper(nullptr), linked(false)
TProgram::~TProgram()
{
- delete ioMapper;
delete infoSink;
+#ifndef GLSLANG_WEB
delete reflection;
+#endif
for (int s = 0; s < EShLangCount; ++s)
if (newedIntermediate[s])
@@ -1910,6 +1953,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
if (stages[stage].size() == 0)
return true;
+#ifndef GLSLANG_WEB
int numEsShaders = 0, numNonEsShaders = 0;
for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
if ((*it)->intermediate->getProfile() == EEsProfile) {
@@ -1958,7 +2002,9 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
for (it = stages[stage].begin(); it != stages[stage].end(); ++it)
intermediate[stage]->merge(*infoSink, *(*it)->intermediate);
}
-
+#else
+ intermediate[stage] = stages[stage].front()->intermediate;
+#endif
intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
if (messages & EShMsgAST)
@@ -1977,13 +2023,15 @@ const char* TProgram::getInfoDebugLog()
return infoSink->debug.c_str();
}
+#ifndef GLSLANG_WEB
+
//
// Reflection implementation.
//
bool TProgram::buildReflection(int opts)
{
- if (! linked || reflection)
+ if (! linked || reflection != nullptr)
return false;
int firstStage = EShLangVertex, lastStage = EShLangFragment;
@@ -2013,8 +2061,10 @@ bool TProgram::buildReflection(int opts)
return true;
}
-unsigned TProgram::getLocalSize(int dim) const { return reflection->getLocalSize(dim); }
-int TProgram::getReflectionIndex(const char* name) const { return reflection->getIndex(name); }
+unsigned TProgram::getLocalSize(int dim) const { return reflection->getLocalSize(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); }
@@ -2030,27 +2080,31 @@ int TProgram::getNumBufferBlocks() const { return r
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() { reflection->dump(); }
+void TProgram::dumpReflection() { if (reflection != nullptr) reflection->dump(); }
//
// I/O mapping implementation.
//
-bool TProgram::mapIO(TIoMapResolver* resolver)
+bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
{
- if (! linked || ioMapper)
+ if (! linked)
return false;
-
- ioMapper = new TIoMapper;
-
+ 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, resolver))
+ if (! ioMapper->addStage((EShLanguage)s, *intermediate[s], *infoSink, pResolver))
return false;
}
}
- return true;
+ return ioMapper->doMap(pResolver, *infoSink);
}
+#endif // GLSLANG_WEB
+
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
index c0a02e68a7..44682379f7 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
@@ -61,63 +61,66 @@ void TType::buildMangledName(TString& mangledName) const
switch (basicType) {
case EbtFloat: mangledName += 'f'; break;
- case EbtDouble: mangledName += 'd'; break;
- case EbtFloat16: mangledName += "f16"; break;
case EbtInt: mangledName += 'i'; break;
case EbtUint: mangledName += 'u'; break;
+ case EbtBool: mangledName += 'b'; break;
+#ifndef GLSLANG_WEB
+ case EbtDouble: mangledName += 'd'; break;
+ case EbtFloat16: mangledName += "f16"; 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 EbtBool: mangledName += 'b'; break;
case EbtAtomicUint: mangledName += "au"; break;
-#ifdef NV_EXTENSIONS
case EbtAccStructNV: mangledName += "asnv"; break;
#endif
case EbtSampler:
switch (sampler.type) {
-#ifdef AMD_EXTENSIONS
+#ifndef GLSLANG_WEB
case EbtFloat16: mangledName += "f16"; break;
#endif
case EbtInt: mangledName += "i"; break;
case EbtUint: mangledName += "u"; break;
default: break; // some compilers want this
}
- if (sampler.image)
- mangledName += "I"; // a normal image
- else if (sampler.sampler)
+ if (sampler.isImageClass())
+ mangledName += "I"; // a normal image or subpass
+ else if (sampler.isPureSampler())
mangledName += "p"; // a "pure" sampler
- else if (!sampler.combined)
+ else if (!sampler.isCombined())
mangledName += "t"; // a "pure" texture
else
mangledName += "s"; // traditional combined sampler
- if (sampler.arrayed)
+ if (sampler.isArrayed())
mangledName += "A";
- if (sampler.shadow)
+ if (sampler.isShadow())
mangledName += "S";
- if (sampler.external)
+ if (sampler.isExternal())
mangledName += "E";
- if (sampler.yuv)
+ if (sampler.isYuv())
mangledName += "Y";
switch (sampler.dim) {
- case Esd1D: mangledName += "1"; break;
case Esd2D: mangledName += "2"; break;
case Esd3D: mangledName += "3"; break;
case EsdCube: mangledName += "C"; break;
+#ifndef GLSLANG_WEB
+ case Esd1D: mangledName += "1"; break;
case EsdRect: mangledName += "R2"; break;
case EsdBuffer: mangledName += "B"; break;
case EsdSubpass: mangledName += "P"; break;
+#endif
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), "%d-", sampler.structReturnIndex);
+ snprintf(text, sizeof(text), "%d-", sampler.getStructReturnIndex());
mangledName += text;
} else {
switch (sampler.getVectorSize()) {
@@ -127,8 +130,9 @@ void TType::buildMangledName(TString& mangledName) const
case 4: break; // default to prior name mangle behavior
}
}
+#endif
- if (sampler.ms)
+ if (sampler.isMultiSample())
mangledName += "M";
break;
case EbtStruct:
@@ -172,6 +176,8 @@ void TType::buildMangledName(TString& mangledName) const
}
}
+#ifndef GLSLANG_WEB
+
//
// Dump functions.
//
@@ -184,7 +190,7 @@ void TSymbol::dumpExtensions(TInfoSink& infoSink) const
for (int i = 0; i < numExtensions; i++)
infoSink.debug << getExtensions()[i] << ",";
-
+
infoSink.debug << ">";
}
}
@@ -229,7 +235,7 @@ void TFunction::dump(TInfoSink& infoSink, bool complete) const
infoSink.debug << "\n";
}
-void TAnonMember::dump(TInfoSink& TInfoSink, bool complete) const
+void TAnonMember::dump(TInfoSink& TInfoSink, bool) const
{
TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str()
<< "\n";
@@ -250,6 +256,8 @@ void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const
}
}
+#endif
+
//
// Functions have buried pointers to delete.
//
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
index f3873cff02..40ca3da532 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
@@ -116,8 +116,11 @@ public:
}
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
virtual const char** getExtensions() const { return extensions->data(); }
+
+#ifndef GLSLANG_WEB
virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
void dumpExtensions(TInfoSink& infoSink) const;
+#endif
virtual bool isReadOnly() const { return ! writable; }
virtual void makeReadOnly() { writable = false; }
@@ -193,7 +196,9 @@ public:
}
virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
+#ifndef GLSLANG_WEB
virtual void dump(TInfoSink& infoSink, bool complete = false) const;
+#endif
protected:
explicit TVariable(const TVariable&);
@@ -314,7 +319,9 @@ public:
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
virtual const TParameter& operator[](int i) const { return parameters[i]; }
+#ifndef GLSLANG_WEB
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
+#endif
protected:
explicit TFunction(const TFunction&);
@@ -374,7 +381,9 @@ public:
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
virtual int getAnonId() const { return anonId; }
+#ifndef GLSLANG_WEB
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
+#endif
protected:
explicit TAnonMember(const TAnonMember&);
@@ -542,7 +551,9 @@ public:
void relateToOperator(const char* name, TOperator op);
void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
+#ifndef GLSLANG_WEB
void dump(TInfoSink& infoSink, bool complete = false) const;
+#endif
TSymbolTableLevel* clone() const;
void readOnly();
@@ -843,7 +854,9 @@ public:
}
int getMaxSymbolId() { return uniqueId; }
+#ifndef GLSLANG_WEB
void dump(TInfoSink& infoSink, bool complete = false) const;
+#endif
void copyTable(const TSymbolTable& copyOf);
void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
index f19c38502d..e549074df8 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
@@ -145,6 +145,8 @@
namespace glslang {
+#ifndef GLSLANG_WEB
+
//
// Initialize all extensions, almost always to 'disable', as once their features
// are incorporated into a core version, their features are supported through allowing that
@@ -170,8 +172,10 @@ void TParseVersions::initializeExtensionBehavior()
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_draw_parameters] = EBhDisable;
@@ -180,6 +184,7 @@ void TParseVersions::initializeExtensionBehavior()
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;
@@ -187,6 +192,10 @@ void TParseVersions::initializeExtensionBehavior()
// 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_KHR_shader_subgroup_basic] = EBhDisable;
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
@@ -210,6 +219,8 @@ void TParseVersions::initializeExtensionBehavior()
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_shader_16bit_storage] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
@@ -218,7 +229,6 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
-#ifdef AMD_EXTENSIONS
extensionBehavior[E_GL_AMD_shader_ballot] = EBhDisable;
extensionBehavior[E_GL_AMD_shader_trinary_minmax] = EBhDisable;
extensionBehavior[E_GL_AMD_shader_explicit_vertex_parameter] = EBhDisable;
@@ -229,9 +239,9 @@ void TParseVersions::initializeExtensionBehavior()
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;
-#endif
-#ifdef NV_EXTENSIONS
+ 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;
@@ -247,9 +257,10 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable;
extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable;
extensionBehavior[E_GL_NV_mesh_shader] = EBhDisable;
-#endif
extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable;
+ extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable;
+ extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable;
// AEP
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
@@ -282,6 +293,7 @@ void TParseVersions::initializeExtensionBehavior()
// EXT extensions
extensionBehavior[E_GL_EXT_device_group] = EBhDisable;
extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
// OVR extensions
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
@@ -296,16 +308,26 @@ void TParseVersions::initializeExtensionBehavior()
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;
}
+#endif // GLSLANG_WEB
// 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 (profile == EEsProfile) {
+ if (isEsProfile()) {
preamble =
"#define GL_ES 1\n"
"#define GL_FRAGMENT_PRECISION_HIGH 1\n"
+#ifdef GLSLANG_WEB
+ ;
+#else
"#define GL_OES_texture_3D 1\n"
"#define GL_OES_standard_derivatives 1\n"
"#define GL_EXT_frag_depth 1\n"
@@ -317,7 +339,6 @@ void TParseVersions::getPreamble(std::string& preamble)
// AEP
"#define GL_ANDROID_extension_pack_es31a 1\n"
- "#define GL_KHR_blend_equation_advanced 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"
@@ -345,11 +366,9 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
;
-#ifdef NV_EXTENSIONS
- if (profile == EEsProfile && version >= 300) {
+ if (isEsProfile() && version >= 300) {
preamble += "#define GL_NV_shader_noperspective_interpolation 1\n";
}
-#endif
} else {
preamble =
@@ -363,8 +382,10 @@ void TParseVersions::getPreamble(std::string& preamble)
"#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"
@@ -373,12 +394,16 @@ void TParseVersions::getPreamble(std::string& preamble)
"#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_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_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"
@@ -391,6 +416,8 @@ void TParseVersions::getPreamble(std::string& preamble)
"#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"
// GL_KHR_shader_subgroup
"#define GL_KHR_shader_subgroup_basic 1\n"
@@ -403,8 +430,8 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_KHR_shader_subgroup_quad 1\n"
"#define E_GL_EXT_shader_atomic_int64 1\n"
+ "#define E_GL_EXT_shader_realtime_clock 1\n"
-#ifdef AMD_EXTENSIONS
"#define GL_AMD_shader_ballot 1\n"
"#define GL_AMD_shader_trinary_minmax 1\n"
"#define GL_AMD_shader_explicit_vertex_parameter 1\n"
@@ -415,9 +442,9 @@ void TParseVersions::getPreamble(std::string& preamble)
"#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"
-#endif
-#ifdef NV_EXTENSIONS
+ "#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"
@@ -430,8 +457,8 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_NV_compute_shader_derivatives 1\n"
"#define GL_NV_shader_texture_footprint 1\n"
"#define GL_NV_mesh_shader 1\n"
-#endif
"#define GL_NV_cooperative_matrix 1\n"
+ "#define GL_NV_integer_cooperative_matrix 1\n"
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
@@ -441,6 +468,11 @@ void TParseVersions::getPreamble(std::string& preamble)
"#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"
;
if (version >= 150) {
@@ -450,13 +482,16 @@ void TParseVersions::getPreamble(std::string& preamble)
if (profile == ECompatibilityProfile)
preamble += "#define GL_compatibility_profile 1\n";
}
+#endif // GLSLANG_WEB
}
- if ((profile != EEsProfile && version >= 140) ||
- (profile == EEsProfile && version >= 310)) {
+#ifndef GLSLANG_WEB
+ 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"
;
}
@@ -471,7 +506,9 @@ void TParseVersions::getPreamble(std::string& preamble)
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"
;
+#endif
// #define VULKAN XXXX
const int numberBufSize = 12;
@@ -482,6 +519,8 @@ void TParseVersions::getPreamble(std::string& preamble)
preamble += numberBuf;
preamble += "\n";
}
+
+#ifndef GLSLANG_WEB
// #define GL_SPIRV XXXX
if (spvVersion.openGl > 0) {
preamble += "#define GL_SPIRV ";
@@ -489,22 +528,7 @@ void TParseVersions::getPreamble(std::string& preamble)
preamble += numberBuf;
preamble += "\n";
}
-
-}
-
-//
-// 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));
+#endif
}
//
@@ -514,12 +538,12 @@ const char* StageName(EShLanguage stage)
{
switch(stage) {
case EShLangVertex: return "vertex";
+ case EShLangFragment: return "fragment";
+ case EShLangCompute: return "compute";
+#ifndef GLSLANG_WEB
case EShLangTessControl: return "tessellation control";
case EShLangTessEvaluation: return "tessellation evaluation";
case EShLangGeometry: return "geometry";
- case EShLangFragment: return "fragment";
- case EShLangCompute: return "compute";
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV: return "ray-generation";
case EShLangIntersectNV: return "intersection";
case EShLangAnyHitNV: return "any-hit";
@@ -534,6 +558,42 @@ const char* StageName(EShLanguage 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<EShLanguageMask>(1 << stage), featureDesc);
+}
+
+#ifndef GLSLANG_WEB
+//
+// 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
@@ -550,12 +610,12 @@ const char* StageName(EShLanguage stage)
//
// 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)
+void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
+ const char* const extensions[], const char* featureDesc)
{
if (profile & profileMask) {
- bool okay = false;
- if (minVersion > 0 && version >= minVersion)
- okay = true;
+ bool okay = minVersion > 0 && version >= minVersion;
+#ifndef GLSLANG_WEB
for (int i = 0; i < numExtensions; ++i) {
switch (getExtensionBehavior(extensions[i])) {
case EBhWarn:
@@ -568,36 +628,22 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int
default: break; // some compilers want this
}
}
-
+#endif
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)
+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);
}
-//
-// 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)
+void TParseVersions::unimplemented(const TSourceLoc& loc, const char* featureDesc)
{
- requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
+ error(loc, "feature not yet implemented", featureDesc, "");
}
//
@@ -633,11 +679,6 @@ void TParseVersions::requireNotRemoved(const TSourceLoc& loc, int profileMask, i
}
}
-void TParseVersions::unimplemented(const TSourceLoc& loc, const char* featureDesc)
-{
- error(loc, "feature not yet implemented", featureDesc, "");
-}
-
// 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)
@@ -806,12 +847,22 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
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);
-#ifdef NV_EXTENSIONS
else if (strcmp(extension, "GL_NV_shader_subgroup_partitioned") == 0)
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
-#endif
- else if (strcmp(extension, "GL_EXT_buffer_reference2") == 0)
+ 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);
+ // 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);
}
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
@@ -857,7 +908,6 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
// Check if extension is used with correct shader stage.
void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * const extension)
{
-#ifdef NV_EXTENSIONS
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
if (strcmp(extension, "GL_NV_mesh_shader") == 0) {
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask | EShLangFragmentMask),
@@ -865,7 +915,6 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_NV_mesh_shader");
profileRequires(loc, EEsProfile, 320, 0, "#extension GL_NV_mesh_shader");
}
-#endif
}
// Call for any operation needing full GLSL integer data-type support.
@@ -878,8 +927,8 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* 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);
- profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
+ //requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op);
}
// Call for any operation needing GLSL float16 data-type support.
@@ -887,9 +936,7 @@ void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool bu
{
if (!builtIn) {
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_float16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
@@ -899,9 +946,7 @@ void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool bu
bool TParseVersions::float16Arithmetic()
{
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_float16};
return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions);
@@ -910,9 +955,7 @@ bool TParseVersions::float16Arithmetic()
bool TParseVersions::int16Arithmetic()
{
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_int16};
return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions);
@@ -934,9 +977,7 @@ void TParseVersions::requireFloat16Arithmetic(const TSourceLoc& loc, const char*
combined += featureDesc;
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_float16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str());
@@ -950,9 +991,7 @@ void TParseVersions::requireInt16Arithmetic(const TSourceLoc& loc, const char* o
combined += featureDesc;
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_int16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str());
@@ -975,9 +1014,7 @@ void TParseVersions::float16ScalarVectorCheck(const TSourceLoc& loc, const char*
{
if (!builtIn) {
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
-#endif
E_GL_EXT_shader_16bit_storage,
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_float16};
@@ -1017,7 +1054,6 @@ void TParseVersions::explicitInt8Check(const TSourceLoc& loc, const char* op, bo
}
}
-#ifdef AMD_EXTENSIONS
// Call for any operation needing GLSL float16 opaque-type support
void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, bool builtIn)
{
@@ -1027,16 +1063,13 @@ void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, b
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
}
}
-#endif
// 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[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
-#endif
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_int16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
@@ -1047,9 +1080,7 @@ void TParseVersions::int16ScalarVectorCheck(const TSourceLoc& loc, const char* o
{
if (! builtIn) {
const char* const extensions[] = {
-#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
-#endif
E_GL_EXT_shader_16bit_storage,
E_GL_EXT_shader_explicit_arithmetic_types,
E_GL_EXT_shader_explicit_arithmetic_types_int16};
@@ -1099,6 +1130,14 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b
}
}
+void TParseVersions::intcoopmatCheck(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);
+ }
+}
+#endif // GLSLANG_WEB
// Call for any operation removed because SPIR-V is in use.
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
{
@@ -1116,15 +1155,19 @@ void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
// Call for any operation that requires Vulkan.
void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op)
{
+#ifndef GLSLANG_WEB
if (spvVersion.vulkan == 0)
error(loc, "only allowed when using GLSL for Vulkan", op, "");
+#endif
}
// Call for any operation that requires SPIR-V.
void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
{
+#ifndef GLSLANG_WEB
if (spvVersion.spv == 0)
error(loc, "only allowed when generating SPIR-V", op, "");
+#endif
}
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.h b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
index bff082709f..58558e595a 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
@@ -124,8 +124,10 @@ 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_draw_parameters = "GL_ARB_shader_draw_parameters";
@@ -134,6 +136,7 @@ const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_con
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";
@@ -141,6 +144,10 @@ const char* const E_GL_ARB_shader_stencil_export = "GL_ARB_shader_stencil
// 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_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
@@ -172,6 +179,9 @@ const char* const E_GL_EXT_scalar_block_layout = "GL_EXT_scalar_blo
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";
// Arrays of extensions for the above viewportEXTs duplications
@@ -189,7 +199,6 @@ const int Num_OVR_multiview_EXTs = sizeof(OVR_multiview_EXTs) / sizeof(OVR_multi
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";
-#ifdef AMD_EXTENSIONS
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";
@@ -200,9 +209,8 @@ const char* const E_GL_AMD_gpu_shader_int16 = "GL_AMD_gpu_sh
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";
-#endif
-#ifdef NV_EXTENSIONS
+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";
@@ -224,9 +232,10 @@ const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_sh
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]);
-#endif
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";
// AEP
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
@@ -256,7 +265,7 @@ const char* const E_GL_OES_tessellation_point_size = "GL_OES_tessel
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";
-// KHX
+// 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";
@@ -266,6 +275,11 @@ const char* const E_GL_EXT_shader_explicit_arithmetic_types_float16 = "GL_EXT_s
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";
+
// Arrays of extensions for the above AEP duplications
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
index d4a23f39de..9585518349 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
@@ -34,6 +34,8 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#include "attribute.h"
#include "../Include/intermediate.h"
#include "ParseHelper.h"
@@ -339,5 +341,6 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN
}
}
-
} // end namespace glslang
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.h b/thirdparty/glslang/glslang/MachineIndependent/attribute.h
index 844ce45806..38a943d283 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/attribute.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.h
@@ -76,7 +76,49 @@ namespace glslang {
EatMaxIterations,
EatIterationMultiple,
EatPeelCount,
- EatPartialCount
+ 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
};
class TIntermAggregate;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
index c9fee9ecce..b6f613bced 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
@@ -78,7 +78,6 @@
#define GL_DOUBLE_MAT4x2 0x8F4D
#define GL_DOUBLE_MAT4x3 0x8F4E
-#ifdef AMD_EXTENSIONS
// Those constants are borrowed from extension NV_gpu_shader5
#define GL_FLOAT16_NV 0x8FF8
#define GL_FLOAT16_VEC2_NV 0x8FF9
@@ -94,7 +93,6 @@
#define GL_FLOAT16_MAT3x4_AMD 0x91CB
#define GL_FLOAT16_MAT4x2_AMD 0x91CC
#define GL_FLOAT16_MAT4x3_AMD 0x91CD
-#endif
#define GL_SAMPLER_1D 0x8B5D
#define GL_SAMPLER_2D 0x8B5E
@@ -117,7 +115,6 @@
#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
-#ifdef AMD_EXTENSIONS
#define GL_FLOAT16_SAMPLER_1D_AMD 0x91CE
#define GL_FLOAT16_SAMPLER_2D_AMD 0x91CF
#define GL_FLOAT16_SAMPLER_3D_AMD 0x91D0
@@ -149,7 +146,6 @@
#define GL_FLOAT16_IMAGE_BUFFER_AMD 0x91E8
#define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD 0x91E9
#define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD 0x91EA
-#endif
#define GL_INT_SAMPLER_1D 0x8DC9
#define GL_INT_SAMPLER_2D 0x8DCA
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang.y b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
index b5691a29fd..9f30fdb2ab 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang.y
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
@@ -36,6 +36,31 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+//
+// Do not edit the .y file, only edit the .m4 file.
+// The .y bison file is not a source file, it is a derivative of the .m4 file.
+// The m4 file needs to be processed by m4 to generate the .y bison file.
+//
+// Code sandwiched between a pair:
+//
+// GLSLANG_WEB_EXCLUDE_ON
+// ...
+// ...
+// ...
+// GLSLANG_WEB_EXCLUDE_OFF
+//
+// Will be excluded from the grammar when m4 is executed as:
+//
+// m4 -P -DGLSLANG_WEB
+//
+// It will be included when m4 is executed as:
+//
+// m4 -P
+//
+
+
+
+
/**
* This is bison grammar and productions for parsing all versions of the
* GLSL shading languages.
@@ -125,13 +150,34 @@ extern int yylex(YYSTYPE*, TParseContext&);
%pure-parser // enable thread safety
%expect 1 // One shift reduce conflict because of if | else
-%token <lex> ATTRIBUTE VARYING
-%token <lex> FLOAT16_T FLOAT FLOAT32_T DOUBLE FLOAT64_T
-%token <lex> CONST BOOL INT UINT INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T
-%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE
+%token <lex> CONST BOOL INT UINT FLOAT
%token <lex> BVEC2 BVEC3 BVEC4
%token <lex> IVEC2 IVEC3 IVEC4
%token <lex> UVEC2 UVEC3 UVEC4
+%token <lex> VEC2 VEC3 VEC4
+%token <lex> MAT2 MAT3 MAT4
+%token <lex> MAT2X2 MAT2X3 MAT2X4
+%token <lex> MAT3X2 MAT3X3 MAT3X4
+%token <lex> MAT4X2 MAT4X3 MAT4X4
+
+// combined image/sampler
+%token <lex> SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER2DSHADOW
+%token <lex> SAMPLERCUBESHADOW SAMPLER2DARRAY
+%token <lex> SAMPLER2DARRAYSHADOW ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
+%token <lex> ISAMPLER2DARRAY USAMPLER2D USAMPLER3D
+%token <lex> USAMPLERCUBE USAMPLER2DARRAY
+
+// separate image/sampler
+%token <lex> SAMPLER SAMPLERSHADOW
+%token <lex> TEXTURE2D TEXTURE3D TEXTURECUBE TEXTURE2DARRAY
+%token <lex> ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY
+%token <lex> UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY
+
+
+
+%token <lex> ATTRIBUTE VARYING
+%token <lex> FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T
+%token <lex> INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T
%token <lex> I64VEC2 I64VEC3 I64VEC4
%token <lex> U64VEC2 U64VEC3 U64VEC4
%token <lex> I32VEC2 I32VEC3 I32VEC4
@@ -140,19 +186,10 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> U16VEC2 U16VEC3 U16VEC4
%token <lex> I8VEC2 I8VEC3 I8VEC4
%token <lex> U8VEC2 U8VEC3 U8VEC4
-%token <lex> VEC2 VEC3 VEC4
-%token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
-%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
-%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT SUBGROUPCOHERENT NONPRIVATE
%token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
%token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4
%token <lex> F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4
%token <lex> F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4
-%token <lex> NOPERSPECTIVE FLAT SMOOTH LAYOUT EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
-
-%token <lex> MAT2X2 MAT2X3 MAT2X4
-%token <lex> MAT3X2 MAT3X3 MAT3X4
-%token <lex> MAT4X2 MAT4X3 MAT4X4
%token <lex> DMAT2X2 DMAT2X3 DMAT2X4
%token <lex> DMAT3X2 DMAT3X3 DMAT3X4
%token <lex> DMAT4X2 DMAT4X3 DMAT4X4
@@ -167,41 +204,47 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
%token <lex> ATOMIC_UINT
%token <lex> ACCSTRUCTNV
-%token <lex> FCOOPMATNV
+%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
// combined image/sampler
-%token <lex> SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW
-%token <lex> SAMPLERCUBESHADOW SAMPLER1DARRAY SAMPLER2DARRAY SAMPLER1DARRAYSHADOW
-%token <lex> SAMPLER2DARRAYSHADOW ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
-%token <lex> ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
-%token <lex> USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
-%token <lex> SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT
-%token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
%token <lex> ISAMPLERCUBEARRAY USAMPLERCUBEARRAY
+%token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
+%token <lex> SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT
+%token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
%token <lex> SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS
%token <lex> SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
%token <lex> SAMPLEREXTERNALOES
%token <lex> SAMPLEREXTERNAL2DY2YEXT
-
+%token <lex> ISAMPLER1DARRAY USAMPLER1D USAMPLER1DARRAY
%token <lex> F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE
%token <lex> F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY
%token <lex> F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY
%token <lex> F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW
%token <lex> F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW
-// pure sampler
-%token <lex> SAMPLER SAMPLERSHADOW
+// images
+%token <lex> IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D
+%token <lex> UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D
+%token <lex> IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT
+%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
+%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
+%token <lex> IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY
+%token <lex> IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
+%token <lex> IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY
+%token <lex> IMAGE2DMS IIMAGE2DMS UIMAGE2DMS
+%token <lex> IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY
+
+%token <lex> F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT
+%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
+%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
// texture without sampler
-%token <lex> TEXTURE1D TEXTURE2D TEXTURE3D TEXTURECUBE
-%token <lex> TEXTURE1DARRAY TEXTURE2DARRAY
-%token <lex> ITEXTURE1D ITEXTURE2D ITEXTURE3D ITEXTURECUBE
-%token <lex> ITEXTURE1DARRAY ITEXTURE2DARRAY UTEXTURE1D UTEXTURE2D UTEXTURE3D
-%token <lex> UTEXTURECUBE UTEXTURE1DARRAY UTEXTURE2DARRAY
+%token <lex> TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY
+%token <lex> TEXTURE1D ITEXTURE1D UTEXTURE1D
+%token <lex> TEXTURE1DARRAY ITEXTURE1DARRAY UTEXTURE1DARRAY
%token <lex> TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT
%token <lex> TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER
-%token <lex> TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY
%token <lex> TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS
%token <lex> TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY
@@ -213,25 +256,8 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
-%token <lex> IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D
-%token <lex> UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D
-%token <lex> IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT
-%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
-%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
-%token <lex> IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY
-%token <lex> IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
-%token <lex> IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY
-%token <lex> IMAGE2DMS IIMAGE2DMS UIMAGE2DMS
-%token <lex> IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY
-%token <lex> F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT
-%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
-%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
-
-%token <lex> STRUCT VOID WHILE
-%token <lex> IDENTIFIER TYPE_NAME
-%token <lex> FLOATCONSTANT DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT INT32CONSTANT UINT32CONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT FLOAT16CONSTANT
%token <lex> LEFT_OP RIGHT_OP
%token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
@@ -242,11 +268,30 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT
%token <lex> LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION
-%token <lex> INVARIANT PRECISE
+%token <lex> INVARIANT
%token <lex> HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION
-
%token <lex> PACKED RESOURCE SUPERP
+%token <lex> FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT
+%token <lex> IDENTIFIER TYPE_NAME
+%token <lex> CENTROID IN OUT INOUT
+%token <lex> STRUCT VOID WHILE
+%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
+%token <lex> UNIFORM SHARED BUFFER
+%token <lex> FLAT SMOOTH LAYOUT
+
+
+%token <lex> DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT
+%token <lex> INT64CONSTANT UINT64CONSTANT
+%token <lex> SUBROUTINE DEMOTE
+%token <lex> PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
+%token <lex> PATCH SAMPLE NONUNIFORM
+%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
+%token <lex> SUBGROUPCOHERENT NONPRIVATE
+%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
+%token <lex> PRECISE
+
+
%type <interm> assignment_operator unary_operator
%type <interm.intermTypedNode> variable_identifier primary_expression postfix_expression
%type <interm.intermTypedNode> expression integer_expression assignment_expression
@@ -255,7 +300,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.intermTypedNode> conditional_expression constant_expression
%type <interm.intermTypedNode> logical_or_expression logical_xor_expression logical_and_expression
%type <interm.intermTypedNode> shift_expression and_expression exclusive_or_expression inclusive_or_expression
-%type <interm.intermTypedNode> function_call initializer initializer_list condition conditionopt
+%type <interm.intermTypedNode> function_call initializer condition conditionopt
%type <interm.intermNode> translation_unit function_definition
%type <interm.intermNode> statement simple_statement
@@ -271,9 +316,8 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm> parameter_declaration parameter_declarator parameter_type_specifier
%type <interm> array_specifier
-%type <interm.type> precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
+%type <interm.type> invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
%type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id
-%type <interm.type> non_uniform_qualifier
%type <interm.typeParameters> type_parameter_specifier
%type <interm.typeParameters> type_parameter_specifier_opt
@@ -284,7 +328,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.type> type_specifier_nonarray
%type <interm.type> struct_specifier
%type <interm.typeLine> struct_declarator
-%type <interm.typeList> struct_declarator_list struct_declaration struct_declaration_list type_name_list
+%type <interm.typeList> struct_declarator_list struct_declaration struct_declaration_list
%type <interm> block_structure
%type <interm.function> function_header function_declarator
%type <interm.function> function_header_with_parameters
@@ -293,7 +337,13 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.identifierList> identifier_list
+
+%type <interm.type> precise_qualifier non_uniform_qualifier
+%type <interm.typeList> type_name_list
%type <interm.attributes> attribute attribute_list single_attribute
+%type <interm.intermNode> demote_statement
+%type <interm.intermTypedNode> initializer_list
+
%start translation_unit
%%
@@ -308,13 +358,13 @@ primary_expression
: variable_identifier {
$$ = $1;
}
- | INT32CONSTANT {
- parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
- $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
+ | LEFT_PAREN expression RIGHT_PAREN {
+ $$ = $2;
+ if ($$->getAsConstantUnion())
+ $$->getAsConstantUnion()->setExpression();
}
- | UINT32CONSTANT {
- parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
- $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
+ | FLOATCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
}
| INTCONSTANT {
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
@@ -323,6 +373,18 @@ primary_expression
parseContext.fullIntegerCheck($1.loc, "unsigned literal");
$$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
}
+ | BOOLCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
+ }
+
+ | INT32CONSTANT {
+ parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
+ }
+ | UINT32CONSTANT {
+ parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
+ }
| INT64CONSTANT {
parseContext.int64Check($1.loc, "64-bit integer literal");
$$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true);
@@ -339,25 +401,17 @@ primary_expression
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal");
$$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true);
}
- | FLOATCONSTANT {
- $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
- }
| DOUBLECONSTANT {
- parseContext.doubleCheck($1.loc, "double literal");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true);
}
| FLOAT16CONSTANT {
parseContext.float16Check($1.loc, "half float literal");
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true);
}
- | BOOLCONSTANT {
- $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
- }
- | LEFT_PAREN expression RIGHT_PAREN {
- $$ = $2;
- if ($$->getAsConstantUnion())
- $$->getAsConstantUnion()->setExpression();
- }
+
;
postfix_expression
@@ -483,11 +537,13 @@ function_identifier
$$.function = new TFunction(empty, TType(EbtVoid), EOpNull);
}
}
+
| non_uniform_qualifier {
// Constructor
$$.intermNode = 0;
$$.function = parseContext.handleConstructorCall($1.loc, $1);
}
+
;
unary_expression
@@ -804,7 +860,6 @@ declaration
}
| PRECISION precision_qualifier type_specifier SEMICOLON {
parseContext.profileRequires($1.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($1.loc, $3, $2.qualifier.precision);
@@ -1048,7 +1103,9 @@ single_declaration
: fully_specified_type {
$$.type = $1;
$$.intermNode = 0;
+
parseContext.declareTypeDefaults($$.loc, $$.type);
+
}
| fully_specified_type IDENTIFIER {
$$.type = $1;
@@ -1082,7 +1139,6 @@ fully_specified_type
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
}
-
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier);
}
| type_qualifier type_specifier {
@@ -1135,38 +1191,30 @@ interpolation_qualifier
$$.init($1.loc);
$$.qualifier.flat = true;
}
+
| NOPERSPECTIVE {
parseContext.globalCheck($1.loc, "noperspective");
-#ifdef NV_EXTENSIONS
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
-#else
- parseContext.requireProfile($1.loc, ~EEsProfile, "noperspective");
-#endif
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective");
$$.init($1.loc);
$$.qualifier.nopersp = true;
}
| EXPLICITINTERPAMD {
-#ifdef AMD_EXTENSIONS
parseContext.globalCheck($1.loc, "__explicitInterpAMD");
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
$$.init($1.loc);
$$.qualifier.explicitInterp = true;
-#endif
}
| PERVERTEXNV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "pervertexNV");
parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
$$.init($1.loc);
$$.qualifier.pervertexNV = true;
-#endif
}
| PERPRIMITIVENV {
-#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "perprimitiveNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV");
@@ -1175,26 +1223,22 @@ interpolation_qualifier
parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV");
$$.init($1.loc);
$$.qualifier.perPrimitiveNV = true;
-#endif
}
| PERVIEWNV {
-#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "perviewNV");
parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV");
$$.init($1.loc);
$$.qualifier.perViewNV = true;
-#endif
}
| PERTASKNV {
-#ifdef NV_EXTENSIONS
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck($1.loc, "taskNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
$$.init($1.loc);
$$.qualifier.perTaskNV = true;
-#endif
}
+
;
layout_qualifier
@@ -1229,6 +1273,7 @@ layout_qualifier_id
}
;
+
precise_qualifier
: PRECISE {
parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
@@ -1238,6 +1283,7 @@ precise_qualifier
}
;
+
type_qualifier
: single_type_qualifier {
$$ = $1;
@@ -1271,6 +1317,7 @@ single_type_qualifier
// allow inheritance of storage qualifier from block declaration
$$ = $1;
}
+
| precise_qualifier {
// allow inheritance of storage qualifier from block declaration
$$ = $1;
@@ -1278,6 +1325,7 @@ single_type_qualifier
| non_uniform_qualifier {
$$ = $1;
}
+
;
storage_qualifier
@@ -1285,6 +1333,49 @@ storage_qualifier
$$.init($1.loc);
$$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
}
+ | INOUT {
+ parseContext.globalCheck($1.loc, "inout");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqInOut;
+ }
+ | IN {
+ parseContext.globalCheck($1.loc, "in");
+ $$.init($1.loc);
+ // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
+ $$.qualifier.storage = EvqIn;
+ }
+ | OUT {
+ parseContext.globalCheck($1.loc, "out");
+ $$.init($1.loc);
+ // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
+ $$.qualifier.storage = EvqOut;
+ }
+ | CENTROID {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid");
+ parseContext.globalCheck($1.loc, "centroid");
+ $$.init($1.loc);
+ $$.qualifier.centroid = true;
+ }
+ | UNIFORM {
+ parseContext.globalCheck($1.loc, "uniform");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqUniform;
+ }
+ | SHARED {
+ parseContext.globalCheck($1.loc, "shared");
+ parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
+ parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqShared;
+ }
+ | BUFFER {
+ parseContext.globalCheck($1.loc, "buffer");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqBuffer;
+ }
+
| ATTRIBUTE {
parseContext.requireStage($1.loc, EShLangVertex, "attribute");
parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute");
@@ -1311,30 +1402,6 @@ storage_qualifier
else
$$.qualifier.storage = EvqVaryingIn;
}
- | INOUT {
- parseContext.globalCheck($1.loc, "inout");
- $$.init($1.loc);
- $$.qualifier.storage = EvqInOut;
- }
- | IN {
- parseContext.globalCheck($1.loc, "in");
- $$.init($1.loc);
- // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
- $$.qualifier.storage = EvqIn;
- }
- | OUT {
- parseContext.globalCheck($1.loc, "out");
- $$.init($1.loc);
- // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
- $$.qualifier.storage = EvqOut;
- }
- | CENTROID {
- parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid");
- parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid");
- parseContext.globalCheck($1.loc, "centroid");
- $$.init($1.loc);
- $$.qualifier.centroid = true;
- }
| PATCH {
parseContext.globalCheck($1.loc, "patch");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
@@ -1346,76 +1413,44 @@ storage_qualifier
$$.init($1.loc);
$$.qualifier.sample = true;
}
- | UNIFORM {
- parseContext.globalCheck($1.loc, "uniform");
- $$.init($1.loc);
- $$.qualifier.storage = EvqUniform;
- }
- | BUFFER {
- parseContext.globalCheck($1.loc, "buffer");
- $$.init($1.loc);
- $$.qualifier.storage = EvqBuffer;
- }
| HITATTRNV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "hitAttributeNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
| EShLangAnyHitNVMask), "hitAttributeNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
$$.init($1.loc);
$$.qualifier.storage = EvqHitAttrNV;
-#endif
}
| PAYLOADNV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "rayPayloadNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
$$.init($1.loc);
$$.qualifier.storage = EvqPayloadNV;
-#endif
}
| PAYLOADINNV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "rayPayloadInNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
$$.init($1.loc);
$$.qualifier.storage = EvqPayloadInNV;
-#endif
}
| CALLDATANV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "callableDataNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask |
EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
$$.init($1.loc);
$$.qualifier.storage = EvqCallableDataNV;
-#endif
}
| CALLDATAINNV {
-#ifdef NV_EXTENSIONS
parseContext.globalCheck($1.loc, "callableDataInNV");
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
$$.init($1.loc);
$$.qualifier.storage = EvqCallableDataInNV;
-#endif
- }
- | SHARED {
- parseContext.globalCheck($1.loc, "shared");
- parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
- parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
-#ifdef NV_EXTENSIONS
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
-#else
- parseContext.requireStage($1.loc, EShLangCompute, "shared");
-#endif
- $$.init($1.loc);
- $$.qualifier.storage = EvqShared;
}
| COHERENT {
$$.init($1.loc);
@@ -1474,8 +1509,10 @@ storage_qualifier
parseContext.unimplemented($1.loc, "subroutine");
$$.init($1.loc);
}
+
;
+
non_uniform_qualifier
: NONUNIFORM {
$$.init($1.loc);
@@ -1494,6 +1531,7 @@ type_name_list
}
;
+
type_specifier
: type_specifier_nonarray type_parameter_specifier_opt {
$$ = $1;
@@ -1577,8 +1615,147 @@ type_specifier_nonarray
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat;
}
+ | INT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ }
+ | UINT {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ }
+ | BOOL {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ }
+ | VEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(2);
+ }
+ | VEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(3);
+ }
+ | VEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(4);
+ }
+ | BVEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(2);
+ }
+ | BVEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(3);
+ }
+ | BVEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(4);
+ }
+ | IVEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(2);
+ }
+ | IVEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(3);
+ }
+ | IVEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(4);
+ }
+ | UVEC2 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(2);
+ }
+ | UVEC3 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(3);
+ }
+ | UVEC4 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(4);
+ }
+ | MAT2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 2);
+ }
+ | MAT3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 3);
+ }
+ | MAT4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 4);
+ }
+ | MAT2X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 2);
+ }
+ | MAT2X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 3);
+ }
+ | MAT2X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 4);
+ }
+ | MAT3X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 2);
+ }
+ | MAT3X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 3);
+ }
+ | MAT3X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 4);
+ }
+ | MAT4X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 2);
+ }
+ | MAT4X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 3);
+ }
+ | MAT4X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 4);
+ }
+
| DOUBLE {
- parseContext.doubleCheck($1.loc, "double");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
}
@@ -1597,15 +1774,6 @@ type_specifier_nonarray
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
}
- | INT {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtInt;
- }
- | UINT {
- parseContext.fullIntegerCheck($1.loc, "unsigned integer");
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtUint;
- }
| INT8_T {
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -1646,39 +1814,26 @@ type_specifier_nonarray
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint64;
}
- | BOOL {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtBool;
- }
- | VEC2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setVector(2);
- }
- | VEC3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setVector(3);
- }
- | VEC4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setVector(4);
- }
| DVEC2 {
- parseContext.doubleCheck($1.loc, "double vector");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(2);
}
| DVEC3 {
- parseContext.doubleCheck($1.loc, "double vector");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(3);
}
| DVEC4 {
- parseContext.doubleCheck($1.loc, "double vector");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double vector");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(4);
@@ -1737,36 +1892,6 @@ type_specifier_nonarray
$$.basicType = EbtDouble;
$$.setVector(4);
}
- | BVEC2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtBool;
- $$.setVector(2);
- }
- | BVEC3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtBool;
- $$.setVector(3);
- }
- | BVEC4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtBool;
- $$.setVector(4);
- }
- | IVEC2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtInt;
- $$.setVector(2);
- }
- | IVEC3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtInt;
- $$.setVector(3);
- }
- | IVEC4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtInt;
- $$.setVector(4);
- }
| I8VEC2 {
parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -1839,24 +1964,6 @@ type_specifier_nonarray
$$.basicType = EbtInt64;
$$.setVector(4);
}
- | UVEC2 {
- parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtUint;
- $$.setVector(2);
- }
- | UVEC3 {
- parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtUint;
- $$.setVector(3);
- }
- | UVEC4 {
- parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtUint;
- $$.setVector(4);
- }
| U8VEC2 {
parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -1929,134 +2036,98 @@ type_specifier_nonarray
$$.basicType = EbtUint64;
$$.setVector(4);
}
- | MAT2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(2, 2);
- }
- | MAT3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(3, 3);
- }
- | MAT4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(4, 4);
- }
- | MAT2X2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(2, 2);
- }
- | MAT2X3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(2, 3);
- }
- | MAT2X4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(2, 4);
- }
- | MAT3X2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(3, 2);
- }
- | MAT3X3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(3, 3);
- }
- | MAT3X4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(3, 4);
- }
- | MAT4X2 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(4, 2);
- }
- | MAT4X3 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(4, 3);
- }
- | MAT4X4 {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtFloat;
- $$.setMatrix(4, 4);
- }
| DMAT2 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 2);
}
| DMAT3 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 3);
}
| DMAT4 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 4);
}
| DMAT2X2 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 2);
}
| DMAT2X3 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 3);
}
| DMAT2X4 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 4);
}
| DMAT3X2 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 2);
}
| DMAT3X3 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 3);
}
| DMAT3X4 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 4);
}
| DMAT4X2 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 2);
}
| DMAT4X3 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 3);
}
| DMAT4X4 {
- parseContext.doubleCheck($1.loc, "double matrix");
+ parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix");
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.doubleCheck($1.loc, "double matrix");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 4);
@@ -2278,10 +2349,8 @@ type_specifier_nonarray
$$.setMatrix(4, 4);
}
| ACCSTRUCTNV {
-#ifdef NV_EXTENSIONS
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtAccStructNV;
-#endif
}
| ATOMIC_UINT {
parseContext.vulkanRemoved($1.loc, "atomic counter types");
@@ -2293,6 +2362,7 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, Esd1D);
}
+
| SAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
@@ -2308,11 +2378,6 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdCube);
}
- | SAMPLER1DSHADOW {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.set(EbtFloat, Esd1D, false, true);
- }
| SAMPLER2DSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
@@ -2323,25 +2388,31 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdCube, false, true);
}
- | SAMPLER1DARRAY {
+ | SAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtFloat, Esd1D, true);
+ $$.sampler.set(EbtFloat, Esd2D, true);
}
- | SAMPLER2DARRAY {
+ | SAMPLER2DARRAYSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtFloat, Esd2D, true);
+ $$.sampler.set(EbtFloat, Esd2D, true, true);
}
- | SAMPLER1DARRAYSHADOW {
+
+ | SAMPLER1DSHADOW {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtFloat, Esd1D, true, true);
+ $$.sampler.set(EbtFloat, Esd1D, false, true);
}
- | SAMPLER2DARRAYSHADOW {
+ | SAMPLER1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtFloat, Esd2D, true, true);
+ $$.sampler.set(EbtFloat, Esd1D, true);
+ }
+ | SAMPLER1DARRAYSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd1D, true, true);
}
| SAMPLERCUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2354,114 +2425,89 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, EsdCube, true, true);
}
| F16SAMPLER1D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D);
-#endif
}
| F16SAMPLER2D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D);
-#endif
}
| F16SAMPLER3D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd3D);
-#endif
}
| F16SAMPLERCUBE {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube);
-#endif
}
| F16SAMPLER1DSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, false, true);
-#endif
}
| F16SAMPLER2DSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, false, true);
-#endif
}
| F16SAMPLERCUBESHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, false, true);
-#endif
}
| F16SAMPLER1DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, true);
-#endif
}
| F16SAMPLER2DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true);
-#endif
}
| F16SAMPLER1DARRAYSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd1D, true, true);
-#endif
}
| F16SAMPLER2DARRAYSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true, true);
-#endif
}
| F16SAMPLERCUBEARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, true);
-#endif
}
| F16SAMPLERCUBEARRAYSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdCube, true, true);
-#endif
}
| ISAMPLER1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtInt, Esd1D);
}
+
| ISAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
@@ -2477,15 +2523,31 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtInt, EsdCube);
}
- | ISAMPLER1DARRAY {
+ | ISAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtInt, Esd1D, true);
+ $$.sampler.set(EbtInt, Esd2D, true);
}
- | ISAMPLER2DARRAY {
+ | USAMPLER2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtInt, Esd2D, true);
+ $$.sampler.set(EbtUint, Esd2D);
+ }
+ | USAMPLER3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd3D);
+ }
+ | USAMPLERCUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, EsdCube);
+ }
+
+ | ISAMPLER1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd1D, true);
}
| ISAMPLERCUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2497,36 +2559,108 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtUint, Esd1D);
}
- | USAMPLER2D {
+ | USAMPLER1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtUint, Esd2D);
+ $$.sampler.set(EbtUint, Esd1D, true);
}
- | USAMPLER3D {
+ | USAMPLERCUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtUint, Esd3D);
+ $$.sampler.set(EbtUint, EsdCube, true);
}
- | USAMPLERCUBE {
+ | TEXTURECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtUint, EsdCube);
+ $$.sampler.setTexture(EbtFloat, EsdCube, true);
}
- | USAMPLER1DARRAY {
+ | ITEXTURECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtUint, Esd1D, true);
+ $$.sampler.setTexture(EbtInt, EsdCube, true);
}
+ | UTEXTURECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdCube, true);
+ }
+
| USAMPLER2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtUint, Esd2D, true);
}
- | USAMPLERCUBEARRAY {
+ | TEXTURE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
- $$.sampler.set(EbtUint, EsdCube, true);
+ $$.sampler.setTexture(EbtFloat, Esd2D);
+ }
+ | TEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd3D);
+ }
+ | TEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd2D, true);
}
+ | TEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, EsdCube);
+ }
+ | ITEXTURE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D);
+ }
+ | ITEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd3D);
+ }
+ | ITEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, EsdCube);
+ }
+ | ITEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D, true);
+ }
+ | UTEXTURE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D);
+ }
+ | UTEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd3D);
+ }
+ | UTEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdCube);
+ }
+ | UTEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D, true);
+ }
+ | SAMPLER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setPureSampler(false);
+ }
+ | SAMPLERSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setPureSampler(true);
+ }
+
| SAMPLER2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
@@ -2538,20 +2672,16 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, EsdRect, false, true);
}
| F16SAMPLER2DRECT {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdRect);
-#endif
}
| F16SAMPLER2DRECTSHADOW {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdRect, false, true);
-#endif
}
| ISAMPLER2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2569,12 +2699,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, EsdBuffer);
}
| F16SAMPLERBUFFER {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, EsdBuffer);
-#endif
}
| ISAMPLERBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2592,12 +2720,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, Esd2D, false, false, true);
}
| F16SAMPLER2DMS {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, false, false, true);
-#endif
}
| ISAMPLER2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2615,12 +2741,10 @@ type_specifier_nonarray
$$.sampler.set(EbtFloat, Esd2D, true, false, true);
}
| F16SAMPLER2DMSARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.set(EbtFloat16, Esd2D, true, false, true);
-#endif
}
| ISAMPLER2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2632,67 +2756,34 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.set(EbtUint, Esd2D, true, false, true);
}
- | SAMPLER {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setPureSampler(false);
- }
- | SAMPLERSHADOW {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setPureSampler(true);
- }
| TEXTURE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat, Esd1D);
}
| F16TEXTURE1D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd1D);
-#endif
- }
- | TEXTURE2D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtFloat, Esd2D);
}
| F16TEXTURE2D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D);
-#endif
- }
- | TEXTURE3D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtFloat, Esd3D);
}
| F16TEXTURE3D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd3D);
-#endif
- }
- | TEXTURECUBE {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtFloat, EsdCube);
}
| F16TEXTURECUBE {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdCube);
-#endif
}
| TEXTURE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2700,121 +2791,53 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd1D, true);
}
| F16TEXTURE1DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd1D, true);
-#endif
- }
- | TEXTURE2DARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtFloat, Esd2D, true);
}
| F16TEXTURE2DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, true);
-#endif
- }
- | TEXTURECUBEARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtFloat, EsdCube, true);
}
| F16TEXTURECUBEARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdCube, true);
-#endif
}
| ITEXTURE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtInt, Esd1D);
}
- | ITEXTURE2D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtInt, Esd2D);
- }
- | ITEXTURE3D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtInt, Esd3D);
- }
- | ITEXTURECUBE {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtInt, EsdCube);
- }
| ITEXTURE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtInt, Esd1D, true);
}
- | ITEXTURE2DARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtInt, Esd2D, true);
- }
- | ITEXTURECUBEARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtInt, EsdCube, true);
- }
| UTEXTURE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtUint, Esd1D);
}
- | UTEXTURE2D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtUint, Esd2D);
- }
- | UTEXTURE3D {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtUint, Esd3D);
- }
- | UTEXTURECUBE {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtUint, EsdCube);
- }
| UTEXTURE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtUint, Esd1D, true);
}
- | UTEXTURE2DARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtUint, Esd2D, true);
- }
- | UTEXTURECUBEARRAY {
- $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtSampler;
- $$.sampler.setTexture(EbtUint, EsdCube, true);
- }
| TEXTURE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat, EsdRect);
}
| F16TEXTURE2DRECT {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdRect);
-#endif
}
| ITEXTURE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2832,12 +2855,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, EsdBuffer);
}
| F16TEXTUREBUFFER {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, EsdBuffer);
-#endif
}
| ITEXTUREBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2855,12 +2876,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D, false, false, true);
}
| F16TEXTURE2DMS {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true);
-#endif
}
| ITEXTURE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2878,12 +2897,10 @@ type_specifier_nonarray
$$.sampler.setTexture(EbtFloat, Esd2D, true, false, true);
}
| F16TEXTURE2DMSARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true);
-#endif
}
| ITEXTURE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2901,12 +2918,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd1D);
}
| F16IMAGE1D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd1D);
-#endif
}
| IIMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2924,12 +2939,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D);
}
| F16IMAGE2D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D);
-#endif
}
| IIMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2947,12 +2960,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd3D);
}
| F16IMAGE3D {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd3D);
-#endif
}
| IIMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2970,12 +2981,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdRect);
}
| F16IMAGE2DRECT {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdRect);
-#endif
}
| IIMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -2993,12 +3002,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdCube);
}
| F16IMAGECUBE {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdCube);
-#endif
}
| IIMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3016,12 +3023,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdBuffer);
}
| F16IMAGEBUFFER {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdBuffer);
-#endif
}
| IIMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3039,12 +3044,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd1D, true);
}
| F16IMAGE1DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd1D, true);
-#endif
}
| IIMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3062,12 +3065,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, true);
}
| F16IMAGE2DARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, true);
-#endif
}
| IIMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3085,12 +3086,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, EsdCube, true);
}
| F16IMAGECUBEARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, EsdCube, true);
-#endif
}
| IIMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3108,12 +3107,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, false, false, true);
}
| F16IMAGE2DMS {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, false, false, true);
-#endif
}
| IIMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3131,12 +3128,10 @@ type_specifier_nonarray
$$.sampler.setImage(EbtFloat, Esd2D, true, false, true);
}
| F16IMAGE2DMSARRAY {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtFloat16, Esd2D, true, false, true);
-#endif
}
| IIMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
@@ -3173,22 +3168,18 @@ type_specifier_nonarray
$$.sampler.setSubpass(EbtFloat, true);
}
| F16SUBPASSINPUT {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setSubpass(EbtFloat16);
-#endif
}
| F16SUBPASSINPUTMS {
-#ifdef AMD_EXTENSIONS
parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setSubpass(EbtFloat16, true);
-#endif
}
| ISUBPASSINPUT {
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
@@ -3220,6 +3211,19 @@ type_specifier_nonarray
$$.basicType = EbtFloat;
$$.coopmat = true;
}
+ | ICOOPMATNV {
+ parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.coopmat = true;
+ }
+ | UCOOPMATNV {
+ parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.coopmat = true;
+ }
+
| struct_specifier {
$$ = $1;
$$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
@@ -3300,7 +3304,7 @@ struct_declaration
if ($1.arraySizes) {
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
- if (parseContext.profile == EEsProfile)
+ if (parseContext.isEsProfile())
parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
}
@@ -3322,7 +3326,7 @@ struct_declaration
if ($2.arraySizes) {
parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type");
- if (parseContext.profile == EEsProfile)
+ if (parseContext.isEsProfile())
parseContext.arraySizeRequiredCheck($2.loc, *$2.arraySizes);
}
@@ -3374,6 +3378,7 @@ initializer
: assignment_expression {
$$ = $1;
}
+
| LEFT_BRACE initializer_list RIGHT_BRACE {
const char* initFeature = "{ } style initializers";
parseContext.requireProfile($1.loc, ~EEsProfile, initFeature);
@@ -3386,8 +3391,10 @@ initializer
parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
$$ = $2;
}
+
;
+
initializer_list
: initializer {
$$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc());
@@ -3397,6 +3404,7 @@ initializer_list
}
;
+
declaration_statement
: declaration { $$ = $1; }
;
@@ -3416,8 +3424,21 @@ simple_statement
| case_label { $$ = $1; }
| iteration_statement { $$ = $1; }
| jump_statement { $$ = $1; }
+
+ | demote_statement { $$ = $1; }
+
;
+
+demote_statement
+ : DEMOTE SEMICOLON {
+ parseContext.requireStage($1.loc, EShLangFragment, "demote");
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote");
+ $$ = parseContext.intermediate.addBranch(EOpDemote, $1.loc);
+ }
+ ;
+
+
compound_statement
: LEFT_BRACE RIGHT_BRACE { $$ = 0; }
| LEFT_BRACE {
@@ -3500,11 +3521,13 @@ selection_statement
: selection_statement_nonattributed {
$$ = $1;
}
+
| attribute selection_statement_nonattributed {
parseContext.handleSelectionAttributes(*$1, $2);
$$ = $2;
}
+
selection_statement_nonattributed
: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement {
parseContext.boolCheck($1.loc, $3);
@@ -3545,11 +3568,13 @@ switch_statement
: switch_statement_nonattributed {
$$ = $1;
}
+
| attribute switch_statement_nonattributed {
parseContext.handleSwitchAttributes(*$1, $2);
$$ = $2;
}
+
switch_statement_nonattributed
: SWITCH LEFT_PAREN expression RIGHT_PAREN {
// start new switch sequence on the switch stack
@@ -3607,11 +3632,13 @@ iteration_statement
: iteration_statement_nonattributed {
$$ = $1;
}
+
| attribute iteration_statement_nonattributed {
parseContext.handleLoopAttributes(*$1, $2);
$$ = $2;
}
+
iteration_statement_nonattributed
: WHILE LEFT_PAREN {
if (! parseContext.limits.whileLoops)
@@ -3742,11 +3769,13 @@ external_declaration
| declaration {
$$ = $1;
}
+
| SEMICOLON {
parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon");
parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
$$ = nullptr;
}
+
;
function_definition
@@ -3771,6 +3800,7 @@ function_definition
}
;
+
attribute
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
$$ = $3;
@@ -3793,4 +3823,5 @@ single_attribute
$$ = parseContext.makeAttributes(*$1.string, $3);
}
+
%%
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
index 07feffea60..2a47faada4 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
@@ -62,7 +62,7 @@
/* Copy the first part of user declarations. */
-#line 43 "MachineIndependent/glslang.y" /* yacc.c:339 */
+#line 68 "MachineIndependent/glslang.y" /* yacc.c:339 */
/* Based on:
@@ -123,271 +123,271 @@ extern int yydebug;
# define YYTOKENTYPE
enum yytokentype
{
- ATTRIBUTE = 258,
- VARYING = 259,
- FLOAT16_T = 260,
- FLOAT = 261,
- FLOAT32_T = 262,
- DOUBLE = 263,
- FLOAT64_T = 264,
- CONST = 265,
- BOOL = 266,
- INT = 267,
- UINT = 268,
- INT64_T = 269,
- UINT64_T = 270,
- INT32_T = 271,
- UINT32_T = 272,
- INT16_T = 273,
- UINT16_T = 274,
- INT8_T = 275,
- UINT8_T = 276,
- BREAK = 277,
- CONTINUE = 278,
- DO = 279,
- ELSE = 280,
- FOR = 281,
- IF = 282,
- DISCARD = 283,
- RETURN = 284,
- SWITCH = 285,
- CASE = 286,
- DEFAULT = 287,
- SUBROUTINE = 288,
- BVEC2 = 289,
- BVEC3 = 290,
- BVEC4 = 291,
- IVEC2 = 292,
- IVEC3 = 293,
- IVEC4 = 294,
- UVEC2 = 295,
- UVEC3 = 296,
- UVEC4 = 297,
- I64VEC2 = 298,
- I64VEC3 = 299,
- I64VEC4 = 300,
- U64VEC2 = 301,
- U64VEC3 = 302,
- U64VEC4 = 303,
- I32VEC2 = 304,
- I32VEC3 = 305,
- I32VEC4 = 306,
- U32VEC2 = 307,
- U32VEC3 = 308,
- U32VEC4 = 309,
- I16VEC2 = 310,
- I16VEC3 = 311,
- I16VEC4 = 312,
- U16VEC2 = 313,
- U16VEC3 = 314,
- U16VEC4 = 315,
- I8VEC2 = 316,
- I8VEC3 = 317,
- I8VEC4 = 318,
- U8VEC2 = 319,
- U8VEC3 = 320,
- U8VEC4 = 321,
- VEC2 = 322,
- VEC3 = 323,
- VEC4 = 324,
- MAT2 = 325,
- MAT3 = 326,
- MAT4 = 327,
- CENTROID = 328,
- IN = 329,
- OUT = 330,
- INOUT = 331,
- UNIFORM = 332,
- PATCH = 333,
- SAMPLE = 334,
- BUFFER = 335,
- SHARED = 336,
- NONUNIFORM = 337,
- PAYLOADNV = 338,
- PAYLOADINNV = 339,
- HITATTRNV = 340,
- CALLDATANV = 341,
- CALLDATAINNV = 342,
- COHERENT = 343,
- VOLATILE = 344,
- RESTRICT = 345,
- READONLY = 346,
- WRITEONLY = 347,
- DEVICECOHERENT = 348,
- QUEUEFAMILYCOHERENT = 349,
- WORKGROUPCOHERENT = 350,
- SUBGROUPCOHERENT = 351,
- NONPRIVATE = 352,
- DVEC2 = 353,
- DVEC3 = 354,
- DVEC4 = 355,
- DMAT2 = 356,
- DMAT3 = 357,
- DMAT4 = 358,
- F16VEC2 = 359,
- F16VEC3 = 360,
- F16VEC4 = 361,
- F16MAT2 = 362,
- F16MAT3 = 363,
- F16MAT4 = 364,
- F32VEC2 = 365,
- F32VEC3 = 366,
- F32VEC4 = 367,
- F32MAT2 = 368,
- F32MAT3 = 369,
- F32MAT4 = 370,
- F64VEC2 = 371,
- F64VEC3 = 372,
- F64VEC4 = 373,
- F64MAT2 = 374,
- F64MAT3 = 375,
- F64MAT4 = 376,
- NOPERSPECTIVE = 377,
- FLAT = 378,
- SMOOTH = 379,
- LAYOUT = 380,
- EXPLICITINTERPAMD = 381,
- PERVERTEXNV = 382,
- PERPRIMITIVENV = 383,
- PERVIEWNV = 384,
- PERTASKNV = 385,
- MAT2X2 = 386,
- MAT2X3 = 387,
- MAT2X4 = 388,
- MAT3X2 = 389,
- MAT3X3 = 390,
- MAT3X4 = 391,
- MAT4X2 = 392,
- MAT4X3 = 393,
- MAT4X4 = 394,
- DMAT2X2 = 395,
- DMAT2X3 = 396,
- DMAT2X4 = 397,
- DMAT3X2 = 398,
- DMAT3X3 = 399,
- DMAT3X4 = 400,
- DMAT4X2 = 401,
- DMAT4X3 = 402,
- DMAT4X4 = 403,
- F16MAT2X2 = 404,
- F16MAT2X3 = 405,
- F16MAT2X4 = 406,
- F16MAT3X2 = 407,
- F16MAT3X3 = 408,
- F16MAT3X4 = 409,
- F16MAT4X2 = 410,
- F16MAT4X3 = 411,
- F16MAT4X4 = 412,
- F32MAT2X2 = 413,
- F32MAT2X3 = 414,
- F32MAT2X4 = 415,
- F32MAT3X2 = 416,
- F32MAT3X3 = 417,
- F32MAT3X4 = 418,
- F32MAT4X2 = 419,
- F32MAT4X3 = 420,
- F32MAT4X4 = 421,
- F64MAT2X2 = 422,
- F64MAT2X3 = 423,
- F64MAT2X4 = 424,
- F64MAT3X2 = 425,
- F64MAT3X3 = 426,
- F64MAT3X4 = 427,
- F64MAT4X2 = 428,
- F64MAT4X3 = 429,
- F64MAT4X4 = 430,
- ATOMIC_UINT = 431,
- ACCSTRUCTNV = 432,
- FCOOPMATNV = 433,
- SAMPLER1D = 434,
- SAMPLER2D = 435,
- SAMPLER3D = 436,
- SAMPLERCUBE = 437,
- SAMPLER1DSHADOW = 438,
- SAMPLER2DSHADOW = 439,
- SAMPLERCUBESHADOW = 440,
- SAMPLER1DARRAY = 441,
- SAMPLER2DARRAY = 442,
- SAMPLER1DARRAYSHADOW = 443,
- SAMPLER2DARRAYSHADOW = 444,
- ISAMPLER1D = 445,
- ISAMPLER2D = 446,
- ISAMPLER3D = 447,
- ISAMPLERCUBE = 448,
- ISAMPLER1DARRAY = 449,
- ISAMPLER2DARRAY = 450,
- USAMPLER1D = 451,
- USAMPLER2D = 452,
- USAMPLER3D = 453,
- USAMPLERCUBE = 454,
- USAMPLER1DARRAY = 455,
- USAMPLER2DARRAY = 456,
- SAMPLER2DRECT = 457,
- SAMPLER2DRECTSHADOW = 458,
- ISAMPLER2DRECT = 459,
- USAMPLER2DRECT = 460,
- SAMPLERBUFFER = 461,
- ISAMPLERBUFFER = 462,
- USAMPLERBUFFER = 463,
- SAMPLERCUBEARRAY = 464,
- SAMPLERCUBEARRAYSHADOW = 465,
- ISAMPLERCUBEARRAY = 466,
- USAMPLERCUBEARRAY = 467,
- SAMPLER2DMS = 468,
- ISAMPLER2DMS = 469,
- USAMPLER2DMS = 470,
- SAMPLER2DMSARRAY = 471,
- ISAMPLER2DMSARRAY = 472,
- USAMPLER2DMSARRAY = 473,
- SAMPLEREXTERNALOES = 474,
- SAMPLEREXTERNAL2DY2YEXT = 475,
- F16SAMPLER1D = 476,
- F16SAMPLER2D = 477,
- F16SAMPLER3D = 478,
- F16SAMPLER2DRECT = 479,
- F16SAMPLERCUBE = 480,
- F16SAMPLER1DARRAY = 481,
- F16SAMPLER2DARRAY = 482,
- F16SAMPLERCUBEARRAY = 483,
- F16SAMPLERBUFFER = 484,
- F16SAMPLER2DMS = 485,
- F16SAMPLER2DMSARRAY = 486,
- F16SAMPLER1DSHADOW = 487,
- F16SAMPLER2DSHADOW = 488,
- F16SAMPLER1DARRAYSHADOW = 489,
- F16SAMPLER2DARRAYSHADOW = 490,
- F16SAMPLER2DRECTSHADOW = 491,
- F16SAMPLERCUBESHADOW = 492,
- F16SAMPLERCUBEARRAYSHADOW = 493,
- SAMPLER = 494,
- SAMPLERSHADOW = 495,
- TEXTURE1D = 496,
- TEXTURE2D = 497,
- TEXTURE3D = 498,
- TEXTURECUBE = 499,
- TEXTURE1DARRAY = 500,
- TEXTURE2DARRAY = 501,
- ITEXTURE1D = 502,
- ITEXTURE2D = 503,
- ITEXTURE3D = 504,
- ITEXTURECUBE = 505,
- ITEXTURE1DARRAY = 506,
- ITEXTURE2DARRAY = 507,
- UTEXTURE1D = 508,
- UTEXTURE2D = 509,
- UTEXTURE3D = 510,
- UTEXTURECUBE = 511,
- UTEXTURE1DARRAY = 512,
- UTEXTURE2DARRAY = 513,
- TEXTURE2DRECT = 514,
- ITEXTURE2DRECT = 515,
- UTEXTURE2DRECT = 516,
- TEXTUREBUFFER = 517,
- ITEXTUREBUFFER = 518,
- UTEXTUREBUFFER = 519,
- TEXTURECUBEARRAY = 520,
- ITEXTURECUBEARRAY = 521,
- UTEXTURECUBEARRAY = 522,
+ CONST = 258,
+ BOOL = 259,
+ INT = 260,
+ UINT = 261,
+ FLOAT = 262,
+ BVEC2 = 263,
+ BVEC3 = 264,
+ BVEC4 = 265,
+ IVEC2 = 266,
+ IVEC3 = 267,
+ IVEC4 = 268,
+ UVEC2 = 269,
+ UVEC3 = 270,
+ UVEC4 = 271,
+ VEC2 = 272,
+ VEC3 = 273,
+ VEC4 = 274,
+ MAT2 = 275,
+ MAT3 = 276,
+ MAT4 = 277,
+ MAT2X2 = 278,
+ MAT2X3 = 279,
+ MAT2X4 = 280,
+ MAT3X2 = 281,
+ MAT3X3 = 282,
+ MAT3X4 = 283,
+ MAT4X2 = 284,
+ MAT4X3 = 285,
+ MAT4X4 = 286,
+ SAMPLER2D = 287,
+ SAMPLER3D = 288,
+ SAMPLERCUBE = 289,
+ SAMPLER2DSHADOW = 290,
+ SAMPLERCUBESHADOW = 291,
+ SAMPLER2DARRAY = 292,
+ SAMPLER2DARRAYSHADOW = 293,
+ ISAMPLER2D = 294,
+ ISAMPLER3D = 295,
+ ISAMPLERCUBE = 296,
+ ISAMPLER2DARRAY = 297,
+ USAMPLER2D = 298,
+ USAMPLER3D = 299,
+ USAMPLERCUBE = 300,
+ USAMPLER2DARRAY = 301,
+ SAMPLER = 302,
+ SAMPLERSHADOW = 303,
+ TEXTURE2D = 304,
+ TEXTURE3D = 305,
+ TEXTURECUBE = 306,
+ TEXTURE2DARRAY = 307,
+ ITEXTURE2D = 308,
+ ITEXTURE3D = 309,
+ ITEXTURECUBE = 310,
+ ITEXTURE2DARRAY = 311,
+ UTEXTURE2D = 312,
+ UTEXTURE3D = 313,
+ UTEXTURECUBE = 314,
+ UTEXTURE2DARRAY = 315,
+ ATTRIBUTE = 316,
+ VARYING = 317,
+ FLOAT16_T = 318,
+ FLOAT32_T = 319,
+ DOUBLE = 320,
+ FLOAT64_T = 321,
+ INT64_T = 322,
+ UINT64_T = 323,
+ INT32_T = 324,
+ UINT32_T = 325,
+ INT16_T = 326,
+ UINT16_T = 327,
+ INT8_T = 328,
+ UINT8_T = 329,
+ I64VEC2 = 330,
+ I64VEC3 = 331,
+ I64VEC4 = 332,
+ U64VEC2 = 333,
+ U64VEC3 = 334,
+ U64VEC4 = 335,
+ I32VEC2 = 336,
+ I32VEC3 = 337,
+ I32VEC4 = 338,
+ U32VEC2 = 339,
+ U32VEC3 = 340,
+ U32VEC4 = 341,
+ I16VEC2 = 342,
+ I16VEC3 = 343,
+ I16VEC4 = 344,
+ U16VEC2 = 345,
+ U16VEC3 = 346,
+ U16VEC4 = 347,
+ I8VEC2 = 348,
+ I8VEC3 = 349,
+ I8VEC4 = 350,
+ U8VEC2 = 351,
+ U8VEC3 = 352,
+ U8VEC4 = 353,
+ DVEC2 = 354,
+ DVEC3 = 355,
+ DVEC4 = 356,
+ DMAT2 = 357,
+ DMAT3 = 358,
+ DMAT4 = 359,
+ F16VEC2 = 360,
+ F16VEC3 = 361,
+ F16VEC4 = 362,
+ F16MAT2 = 363,
+ F16MAT3 = 364,
+ F16MAT4 = 365,
+ F32VEC2 = 366,
+ F32VEC3 = 367,
+ F32VEC4 = 368,
+ F32MAT2 = 369,
+ F32MAT3 = 370,
+ F32MAT4 = 371,
+ F64VEC2 = 372,
+ F64VEC3 = 373,
+ F64VEC4 = 374,
+ F64MAT2 = 375,
+ F64MAT3 = 376,
+ F64MAT4 = 377,
+ DMAT2X2 = 378,
+ DMAT2X3 = 379,
+ DMAT2X4 = 380,
+ DMAT3X2 = 381,
+ DMAT3X3 = 382,
+ DMAT3X4 = 383,
+ DMAT4X2 = 384,
+ DMAT4X3 = 385,
+ DMAT4X4 = 386,
+ F16MAT2X2 = 387,
+ F16MAT2X3 = 388,
+ F16MAT2X4 = 389,
+ F16MAT3X2 = 390,
+ F16MAT3X3 = 391,
+ F16MAT3X4 = 392,
+ F16MAT4X2 = 393,
+ F16MAT4X3 = 394,
+ F16MAT4X4 = 395,
+ F32MAT2X2 = 396,
+ F32MAT2X3 = 397,
+ F32MAT2X4 = 398,
+ F32MAT3X2 = 399,
+ F32MAT3X3 = 400,
+ F32MAT3X4 = 401,
+ F32MAT4X2 = 402,
+ F32MAT4X3 = 403,
+ F32MAT4X4 = 404,
+ F64MAT2X2 = 405,
+ F64MAT2X3 = 406,
+ F64MAT2X4 = 407,
+ F64MAT3X2 = 408,
+ F64MAT3X3 = 409,
+ F64MAT3X4 = 410,
+ F64MAT4X2 = 411,
+ F64MAT4X3 = 412,
+ F64MAT4X4 = 413,
+ ATOMIC_UINT = 414,
+ ACCSTRUCTNV = 415,
+ FCOOPMATNV = 416,
+ ICOOPMATNV = 417,
+ UCOOPMATNV = 418,
+ SAMPLERCUBEARRAY = 419,
+ SAMPLERCUBEARRAYSHADOW = 420,
+ ISAMPLERCUBEARRAY = 421,
+ USAMPLERCUBEARRAY = 422,
+ SAMPLER1D = 423,
+ SAMPLER1DARRAY = 424,
+ SAMPLER1DARRAYSHADOW = 425,
+ ISAMPLER1D = 426,
+ SAMPLER1DSHADOW = 427,
+ SAMPLER2DRECT = 428,
+ SAMPLER2DRECTSHADOW = 429,
+ ISAMPLER2DRECT = 430,
+ USAMPLER2DRECT = 431,
+ SAMPLERBUFFER = 432,
+ ISAMPLERBUFFER = 433,
+ USAMPLERBUFFER = 434,
+ SAMPLER2DMS = 435,
+ ISAMPLER2DMS = 436,
+ USAMPLER2DMS = 437,
+ SAMPLER2DMSARRAY = 438,
+ ISAMPLER2DMSARRAY = 439,
+ USAMPLER2DMSARRAY = 440,
+ SAMPLEREXTERNALOES = 441,
+ SAMPLEREXTERNAL2DY2YEXT = 442,
+ ISAMPLER1DARRAY = 443,
+ USAMPLER1D = 444,
+ USAMPLER1DARRAY = 445,
+ F16SAMPLER1D = 446,
+ F16SAMPLER2D = 447,
+ F16SAMPLER3D = 448,
+ F16SAMPLER2DRECT = 449,
+ F16SAMPLERCUBE = 450,
+ F16SAMPLER1DARRAY = 451,
+ F16SAMPLER2DARRAY = 452,
+ F16SAMPLERCUBEARRAY = 453,
+ F16SAMPLERBUFFER = 454,
+ F16SAMPLER2DMS = 455,
+ F16SAMPLER2DMSARRAY = 456,
+ F16SAMPLER1DSHADOW = 457,
+ F16SAMPLER2DSHADOW = 458,
+ F16SAMPLER1DARRAYSHADOW = 459,
+ F16SAMPLER2DARRAYSHADOW = 460,
+ F16SAMPLER2DRECTSHADOW = 461,
+ F16SAMPLERCUBESHADOW = 462,
+ F16SAMPLERCUBEARRAYSHADOW = 463,
+ IMAGE1D = 464,
+ IIMAGE1D = 465,
+ UIMAGE1D = 466,
+ IMAGE2D = 467,
+ IIMAGE2D = 468,
+ UIMAGE2D = 469,
+ IMAGE3D = 470,
+ IIMAGE3D = 471,
+ UIMAGE3D = 472,
+ IMAGE2DRECT = 473,
+ IIMAGE2DRECT = 474,
+ UIMAGE2DRECT = 475,
+ IMAGECUBE = 476,
+ IIMAGECUBE = 477,
+ UIMAGECUBE = 478,
+ IMAGEBUFFER = 479,
+ IIMAGEBUFFER = 480,
+ UIMAGEBUFFER = 481,
+ IMAGE1DARRAY = 482,
+ IIMAGE1DARRAY = 483,
+ UIMAGE1DARRAY = 484,
+ IMAGE2DARRAY = 485,
+ IIMAGE2DARRAY = 486,
+ UIMAGE2DARRAY = 487,
+ IMAGECUBEARRAY = 488,
+ IIMAGECUBEARRAY = 489,
+ UIMAGECUBEARRAY = 490,
+ IMAGE2DMS = 491,
+ IIMAGE2DMS = 492,
+ UIMAGE2DMS = 493,
+ IMAGE2DMSARRAY = 494,
+ IIMAGE2DMSARRAY = 495,
+ UIMAGE2DMSARRAY = 496,
+ F16IMAGE1D = 497,
+ F16IMAGE2D = 498,
+ F16IMAGE3D = 499,
+ F16IMAGE2DRECT = 500,
+ F16IMAGECUBE = 501,
+ F16IMAGE1DARRAY = 502,
+ F16IMAGE2DARRAY = 503,
+ F16IMAGECUBEARRAY = 504,
+ F16IMAGEBUFFER = 505,
+ F16IMAGE2DMS = 506,
+ F16IMAGE2DMSARRAY = 507,
+ TEXTURECUBEARRAY = 508,
+ ITEXTURECUBEARRAY = 509,
+ UTEXTURECUBEARRAY = 510,
+ TEXTURE1D = 511,
+ ITEXTURE1D = 512,
+ UTEXTURE1D = 513,
+ TEXTURE1DARRAY = 514,
+ ITEXTURE1DARRAY = 515,
+ UTEXTURE1DARRAY = 516,
+ TEXTURE2DRECT = 517,
+ ITEXTURE2DRECT = 518,
+ UTEXTURE2DRECT = 519,
+ TEXTUREBUFFER = 520,
+ ITEXTUREBUFFER = 521,
+ UTEXTUREBUFFER = 522,
TEXTURE2DMS = 523,
ITEXTURE2DMS = 524,
UTEXTURE2DMS = 525,
@@ -413,121 +413,124 @@ extern int yydebug;
USUBPASSINPUTMS = 545,
F16SUBPASSINPUT = 546,
F16SUBPASSINPUTMS = 547,
- IMAGE1D = 548,
- IIMAGE1D = 549,
- UIMAGE1D = 550,
- IMAGE2D = 551,
- IIMAGE2D = 552,
- UIMAGE2D = 553,
- IMAGE3D = 554,
- IIMAGE3D = 555,
- UIMAGE3D = 556,
- IMAGE2DRECT = 557,
- IIMAGE2DRECT = 558,
- UIMAGE2DRECT = 559,
- IMAGECUBE = 560,
- IIMAGECUBE = 561,
- UIMAGECUBE = 562,
- IMAGEBUFFER = 563,
- IIMAGEBUFFER = 564,
- UIMAGEBUFFER = 565,
- IMAGE1DARRAY = 566,
- IIMAGE1DARRAY = 567,
- UIMAGE1DARRAY = 568,
- IMAGE2DARRAY = 569,
- IIMAGE2DARRAY = 570,
- UIMAGE2DARRAY = 571,
- IMAGECUBEARRAY = 572,
- IIMAGECUBEARRAY = 573,
- UIMAGECUBEARRAY = 574,
- IMAGE2DMS = 575,
- IIMAGE2DMS = 576,
- UIMAGE2DMS = 577,
- IMAGE2DMSARRAY = 578,
- IIMAGE2DMSARRAY = 579,
- UIMAGE2DMSARRAY = 580,
- F16IMAGE1D = 581,
- F16IMAGE2D = 582,
- F16IMAGE3D = 583,
- F16IMAGE2DRECT = 584,
- F16IMAGECUBE = 585,
- F16IMAGE1DARRAY = 586,
- F16IMAGE2DARRAY = 587,
- F16IMAGECUBEARRAY = 588,
- F16IMAGEBUFFER = 589,
- F16IMAGE2DMS = 590,
- F16IMAGE2DMSARRAY = 591,
- STRUCT = 592,
- VOID = 593,
- WHILE = 594,
- IDENTIFIER = 595,
- TYPE_NAME = 596,
- FLOATCONSTANT = 597,
- DOUBLECONSTANT = 598,
- INT16CONSTANT = 599,
- UINT16CONSTANT = 600,
- INT32CONSTANT = 601,
- UINT32CONSTANT = 602,
- INTCONSTANT = 603,
- UINTCONSTANT = 604,
- INT64CONSTANT = 605,
- UINT64CONSTANT = 606,
- BOOLCONSTANT = 607,
- FLOAT16CONSTANT = 608,
- LEFT_OP = 609,
- RIGHT_OP = 610,
- INC_OP = 611,
- DEC_OP = 612,
- LE_OP = 613,
- GE_OP = 614,
- EQ_OP = 615,
- NE_OP = 616,
- AND_OP = 617,
- OR_OP = 618,
- XOR_OP = 619,
- MUL_ASSIGN = 620,
- DIV_ASSIGN = 621,
- ADD_ASSIGN = 622,
- MOD_ASSIGN = 623,
- LEFT_ASSIGN = 624,
- RIGHT_ASSIGN = 625,
- AND_ASSIGN = 626,
- XOR_ASSIGN = 627,
- OR_ASSIGN = 628,
- SUB_ASSIGN = 629,
- LEFT_PAREN = 630,
- RIGHT_PAREN = 631,
- LEFT_BRACKET = 632,
- RIGHT_BRACKET = 633,
- LEFT_BRACE = 634,
- RIGHT_BRACE = 635,
- DOT = 636,
- COMMA = 637,
- COLON = 638,
- EQUAL = 639,
- SEMICOLON = 640,
- BANG = 641,
- DASH = 642,
- TILDE = 643,
- PLUS = 644,
- STAR = 645,
- SLASH = 646,
- PERCENT = 647,
- LEFT_ANGLE = 648,
- RIGHT_ANGLE = 649,
- VERTICAL_BAR = 650,
- CARET = 651,
- AMPERSAND = 652,
- QUESTION = 653,
- INVARIANT = 654,
- PRECISE = 655,
- HIGH_PRECISION = 656,
- MEDIUM_PRECISION = 657,
- LOW_PRECISION = 658,
- PRECISION = 659,
- PACKED = 660,
- RESOURCE = 661,
- SUPERP = 662
+ LEFT_OP = 548,
+ RIGHT_OP = 549,
+ INC_OP = 550,
+ DEC_OP = 551,
+ LE_OP = 552,
+ GE_OP = 553,
+ EQ_OP = 554,
+ NE_OP = 555,
+ AND_OP = 556,
+ OR_OP = 557,
+ XOR_OP = 558,
+ MUL_ASSIGN = 559,
+ DIV_ASSIGN = 560,
+ ADD_ASSIGN = 561,
+ MOD_ASSIGN = 562,
+ LEFT_ASSIGN = 563,
+ RIGHT_ASSIGN = 564,
+ AND_ASSIGN = 565,
+ XOR_ASSIGN = 566,
+ OR_ASSIGN = 567,
+ SUB_ASSIGN = 568,
+ LEFT_PAREN = 569,
+ RIGHT_PAREN = 570,
+ LEFT_BRACKET = 571,
+ RIGHT_BRACKET = 572,
+ LEFT_BRACE = 573,
+ RIGHT_BRACE = 574,
+ DOT = 575,
+ COMMA = 576,
+ COLON = 577,
+ EQUAL = 578,
+ SEMICOLON = 579,
+ BANG = 580,
+ DASH = 581,
+ TILDE = 582,
+ PLUS = 583,
+ STAR = 584,
+ SLASH = 585,
+ PERCENT = 586,
+ LEFT_ANGLE = 587,
+ RIGHT_ANGLE = 588,
+ VERTICAL_BAR = 589,
+ CARET = 590,
+ AMPERSAND = 591,
+ QUESTION = 592,
+ INVARIANT = 593,
+ HIGH_PRECISION = 594,
+ MEDIUM_PRECISION = 595,
+ LOW_PRECISION = 596,
+ PRECISION = 597,
+ PACKED = 598,
+ RESOURCE = 599,
+ SUPERP = 600,
+ FLOATCONSTANT = 601,
+ INTCONSTANT = 602,
+ UINTCONSTANT = 603,
+ BOOLCONSTANT = 604,
+ IDENTIFIER = 605,
+ TYPE_NAME = 606,
+ CENTROID = 607,
+ IN = 608,
+ OUT = 609,
+ INOUT = 610,
+ STRUCT = 611,
+ VOID = 612,
+ WHILE = 613,
+ BREAK = 614,
+ CONTINUE = 615,
+ DO = 616,
+ ELSE = 617,
+ FOR = 618,
+ IF = 619,
+ DISCARD = 620,
+ RETURN = 621,
+ SWITCH = 622,
+ CASE = 623,
+ DEFAULT = 624,
+ UNIFORM = 625,
+ SHARED = 626,
+ BUFFER = 627,
+ FLAT = 628,
+ SMOOTH = 629,
+ LAYOUT = 630,
+ DOUBLECONSTANT = 631,
+ INT16CONSTANT = 632,
+ UINT16CONSTANT = 633,
+ FLOAT16CONSTANT = 634,
+ INT32CONSTANT = 635,
+ UINT32CONSTANT = 636,
+ INT64CONSTANT = 637,
+ UINT64CONSTANT = 638,
+ SUBROUTINE = 639,
+ DEMOTE = 640,
+ PAYLOADNV = 641,
+ PAYLOADINNV = 642,
+ HITATTRNV = 643,
+ CALLDATANV = 644,
+ CALLDATAINNV = 645,
+ PATCH = 646,
+ SAMPLE = 647,
+ NONUNIFORM = 648,
+ COHERENT = 649,
+ VOLATILE = 650,
+ RESTRICT = 651,
+ READONLY = 652,
+ WRITEONLY = 653,
+ DEVICECOHERENT = 654,
+ QUEUEFAMILYCOHERENT = 655,
+ WORKGROUPCOHERENT = 656,
+ SUBGROUPCOHERENT = 657,
+ NONPRIVATE = 658,
+ NOPERSPECTIVE = 659,
+ EXPLICITINTERPAMD = 660,
+ PERVERTEXNV = 661,
+ PERPRIMITIVENV = 662,
+ PERVIEWNV = 663,
+ PERTASKNV = 664,
+ PRECISE = 665
};
#endif
@@ -536,7 +539,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 71 "MachineIndependent/glslang.y" /* yacc.c:355 */
+#line 96 "MachineIndependent/glslang.y" /* yacc.c:355 */
struct {
glslang::TSourceLoc loc;
@@ -572,7 +575,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
-#line 576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */
+#line 579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
@@ -587,7 +590,7 @@ int yyparse (glslang::TParseContext* pParseContext);
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
/* Copy the second part of user declarations. */
-#line 107 "MachineIndependent/glslang.y" /* yacc.c:358 */
+#line 132 "MachineIndependent/glslang.y" /* yacc.c:358 */
/* windows only pragma */
@@ -603,7 +606,7 @@ int yyparse (glslang::TParseContext* pParseContext);
extern int yylex(YYSTYPE*, TParseContext&);
-#line 607 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */
+#line 610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */
#ifdef short
# undef short
@@ -843,23 +846,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 384
+#define YYFINAL 386
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 9348
+#define YYLAST 9369
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 408
+#define YYNTOKENS 411
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 110
+#define YYNNTS 111
/* YYNRULES -- Number of rules. */
-#define YYNRULES 578
+#define YYNRULES 582
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 722
+#define YYNSTATES 727
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 662
+#define YYMAXUTOK 665
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -934,71 +937,72 @@ static const yytype_uint16 yytranslate[] =
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
+ 405, 406, 407, 408, 409, 410
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 302, 302, 308, 311, 315, 319, 322, 326, 330,
- 334, 338, 342, 345, 349, 353, 356, 364, 367, 370,
- 373, 376, 381, 389, 396, 403, 409, 413, 420, 423,
- 429, 436, 446, 454, 459, 486, 494, 500, 504, 508,
- 528, 529, 530, 531, 537, 538, 543, 548, 557, 558,
- 563, 571, 572, 578, 587, 588, 593, 598, 603, 611,
- 612, 621, 633, 634, 643, 644, 653, 654, 663, 664,
- 672, 673, 681, 682, 690, 691, 691, 709, 710, 726,
- 730, 734, 738, 743, 747, 751, 755, 759, 763, 767,
- 774, 777, 788, 795, 800, 805, 813, 817, 821, 825,
- 830, 835, 844, 844, 855, 859, 866, 873, 876, 883,
- 891, 911, 934, 949, 974, 985, 995, 1005, 1015, 1024,
- 1027, 1031, 1035, 1040, 1048, 1053, 1058, 1063, 1068, 1077,
- 1088, 1115, 1124, 1131, 1138, 1149, 1158, 1168, 1180, 1189,
- 1201, 1207, 1210, 1217, 1221, 1225, 1233, 1242, 1245, 1256,
- 1259, 1262, 1266, 1270, 1274, 1278, 1284, 1288, 1300, 1314,
- 1319, 1325, 1331, 1338, 1344, 1349, 1354, 1359, 1369, 1379,
- 1389, 1399, 1408, 1420, 1424, 1429, 1434, 1439, 1444, 1449,
- 1453, 1457, 1461, 1465, 1471, 1480, 1487, 1490, 1498, 1503,
- 1513, 1518, 1526, 1530, 1540, 1543, 1549, 1555, 1562, 1572,
- 1576, 1580, 1585, 1590, 1595, 1600, 1604, 1609, 1614, 1619,
- 1624, 1629, 1634, 1639, 1644, 1649, 1653, 1658, 1663, 1668,
- 1674, 1680, 1686, 1692, 1698, 1704, 1710, 1716, 1722, 1728,
- 1734, 1740, 1745, 1750, 1755, 1760, 1765, 1770, 1776, 1782,
- 1788, 1794, 1800, 1806, 1812, 1818, 1824, 1830, 1836, 1842,
- 1848, 1854, 1860, 1866, 1872, 1878, 1884, 1890, 1896, 1902,
- 1908, 1914, 1920, 1926, 1932, 1937, 1942, 1947, 1952, 1957,
- 1962, 1967, 1972, 1977, 1982, 1987, 1992, 1998, 2004, 2010,
- 2016, 2022, 2028, 2034, 2040, 2046, 2052, 2058, 2064, 2070,
- 2076, 2082, 2088, 2094, 2100, 2106, 2112, 2118, 2124, 2130,
- 2136, 2142, 2148, 2154, 2160, 2166, 2172, 2178, 2184, 2190,
- 2196, 2202, 2208, 2214, 2220, 2226, 2232, 2238, 2244, 2250,
- 2256, 2262, 2268, 2274, 2280, 2286, 2291, 2296, 2301, 2306,
- 2311, 2316, 2321, 2326, 2331, 2336, 2341, 2346, 2351, 2356,
- 2364, 2372, 2380, 2388, 2396, 2404, 2412, 2420, 2428, 2436,
- 2444, 2452, 2460, 2465, 2470, 2475, 2480, 2485, 2490, 2495,
- 2500, 2505, 2510, 2515, 2520, 2525, 2530, 2535, 2540, 2548,
- 2556, 2561, 2566, 2571, 2579, 2584, 2589, 2594, 2602, 2607,
- 2612, 2617, 2625, 2630, 2635, 2640, 2645, 2650, 2658, 2663,
- 2671, 2676, 2684, 2689, 2697, 2702, 2710, 2715, 2723, 2728,
- 2736, 2741, 2746, 2751, 2756, 2761, 2766, 2771, 2776, 2781,
- 2786, 2791, 2796, 2801, 2806, 2811, 2819, 2824, 2829, 2834,
- 2842, 2847, 2852, 2857, 2865, 2870, 2875, 2880, 2888, 2893,
- 2898, 2903, 2911, 2916, 2921, 2926, 2934, 2939, 2944, 2949,
- 2957, 2962, 2967, 2972, 2980, 2985, 2990, 2995, 3003, 3008,
- 3013, 3018, 3026, 3031, 3036, 3041, 3049, 3054, 3059, 3064,
- 3072, 3077, 3082, 3087, 3095, 3100, 3105, 3110, 3118, 3123,
- 3128, 3133, 3141, 3146, 3151, 3157, 3163, 3169, 3175, 3184,
- 3193, 3199, 3205, 3211, 3217, 3223, 3228, 3244, 3249, 3254,
- 3262, 3262, 3273, 3273, 3283, 3286, 3299, 3321, 3348, 3352,
- 3358, 3363, 3374, 3377, 3383, 3392, 3395, 3401, 3405, 3406,
- 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3422, 3423, 3427,
- 3423, 3439, 3440, 3444, 3444, 3451, 3451, 3465, 3468, 3476,
- 3484, 3495, 3496, 3500, 3503, 3509, 3516, 3520, 3528, 3532,
- 3545, 3548, 3554, 3554, 3574, 3577, 3583, 3595, 3607, 3610,
- 3616, 3616, 3631, 3631, 3647, 3647, 3668, 3671, 3677, 3680,
- 3686, 3690, 3697, 3702, 3707, 3714, 3717, 3726, 3730, 3739,
- 3742, 3745, 3753, 3753, 3775, 3781, 3784, 3789, 3792
+ 0, 352, 352, 358, 361, 366, 369, 372, 376, 380,
+ 384, 388, 392, 396, 400, 404, 408, 416, 419, 422,
+ 425, 428, 433, 441, 448, 455, 461, 465, 472, 475,
+ 481, 488, 498, 506, 511, 539, 548, 554, 558, 562,
+ 582, 583, 584, 585, 591, 592, 597, 602, 611, 612,
+ 617, 625, 626, 632, 641, 642, 647, 652, 657, 665,
+ 666, 675, 687, 688, 697, 698, 707, 708, 717, 718,
+ 726, 727, 735, 736, 744, 745, 745, 763, 764, 780,
+ 784, 788, 792, 797, 801, 805, 809, 813, 817, 821,
+ 828, 831, 842, 849, 854, 859, 866, 870, 874, 878,
+ 883, 888, 897, 897, 908, 912, 919, 926, 929, 936,
+ 944, 964, 987, 1002, 1027, 1038, 1048, 1058, 1068, 1077,
+ 1080, 1084, 1088, 1093, 1101, 1108, 1113, 1118, 1123, 1132,
+ 1142, 1169, 1178, 1185, 1193, 1200, 1207, 1215, 1225, 1232,
+ 1243, 1249, 1252, 1259, 1263, 1267, 1276, 1286, 1289, 1300,
+ 1303, 1306, 1310, 1314, 1319, 1323, 1330, 1334, 1339, 1345,
+ 1351, 1358, 1363, 1371, 1377, 1389, 1403, 1409, 1414, 1422,
+ 1430, 1438, 1446, 1453, 1457, 1462, 1467, 1472, 1477, 1482,
+ 1486, 1490, 1494, 1498, 1504, 1515, 1522, 1525, 1534, 1539,
+ 1549, 1554, 1562, 1566, 1576, 1579, 1585, 1591, 1598, 1608,
+ 1612, 1616, 1620, 1625, 1629, 1634, 1639, 1644, 1649, 1654,
+ 1659, 1664, 1669, 1674, 1680, 1686, 1692, 1697, 1702, 1707,
+ 1712, 1717, 1722, 1727, 1732, 1737, 1742, 1747, 1753, 1758,
+ 1763, 1768, 1773, 1778, 1783, 1788, 1793, 1798, 1803, 1808,
+ 1813, 1819, 1825, 1831, 1837, 1843, 1849, 1855, 1861, 1867,
+ 1873, 1879, 1885, 1891, 1897, 1903, 1909, 1915, 1921, 1927,
+ 1933, 1939, 1945, 1951, 1957, 1963, 1969, 1975, 1981, 1987,
+ 1993, 1999, 2005, 2011, 2017, 2023, 2029, 2035, 2041, 2047,
+ 2053, 2059, 2065, 2071, 2077, 2083, 2089, 2095, 2101, 2107,
+ 2113, 2119, 2125, 2131, 2137, 2143, 2149, 2155, 2161, 2167,
+ 2173, 2179, 2185, 2191, 2197, 2203, 2209, 2215, 2221, 2227,
+ 2233, 2239, 2245, 2251, 2257, 2263, 2269, 2275, 2281, 2287,
+ 2293, 2299, 2305, 2311, 2317, 2321, 2326, 2332, 2337, 2342,
+ 2347, 2352, 2357, 2362, 2368, 2373, 2378, 2383, 2388, 2393,
+ 2399, 2405, 2411, 2417, 2423, 2429, 2435, 2441, 2447, 2453,
+ 2459, 2465, 2471, 2477, 2482, 2487, 2492, 2497, 2502, 2507,
+ 2513, 2518, 2523, 2528, 2533, 2538, 2543, 2548, 2554, 2559,
+ 2564, 2569, 2574, 2579, 2584, 2589, 2594, 2599, 2604, 2609,
+ 2614, 2619, 2624, 2630, 2635, 2640, 2646, 2652, 2657, 2662,
+ 2667, 2673, 2678, 2683, 2688, 2694, 2699, 2704, 2709, 2715,
+ 2720, 2725, 2730, 2736, 2742, 2748, 2754, 2759, 2765, 2771,
+ 2777, 2782, 2787, 2792, 2797, 2802, 2808, 2813, 2818, 2823,
+ 2829, 2834, 2839, 2844, 2850, 2855, 2860, 2865, 2871, 2876,
+ 2881, 2886, 2892, 2897, 2902, 2907, 2913, 2918, 2923, 2928,
+ 2934, 2939, 2944, 2949, 2955, 2960, 2965, 2970, 2976, 2981,
+ 2986, 2991, 2997, 3002, 3007, 3012, 3018, 3023, 3028, 3033,
+ 3039, 3044, 3049, 3054, 3060, 3065, 3070, 3075, 3081, 3086,
+ 3091, 3096, 3102, 3107, 3112, 3118, 3124, 3130, 3136, 3143,
+ 3150, 3156, 3162, 3168, 3174, 3180, 3186, 3193, 3198, 3214,
+ 3219, 3224, 3232, 3232, 3243, 3243, 3253, 3256, 3269, 3291,
+ 3318, 3322, 3328, 3333, 3344, 3348, 3354, 3365, 3368, 3375,
+ 3379, 3380, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3394,
+ 3400, 3409, 3410, 3414, 3410, 3426, 3427, 3431, 3431, 3438,
+ 3438, 3452, 3455, 3463, 3471, 3482, 3483, 3487, 3491, 3498,
+ 3505, 3509, 3517, 3521, 3534, 3538, 3545, 3545, 3565, 3568,
+ 3574, 3586, 3598, 3602, 3609, 3609, 3624, 3624, 3640, 3640,
+ 3661, 3664, 3670, 3673, 3679, 3683, 3690, 3695, 3700, 3707,
+ 3710, 3719, 3723, 3732, 3735, 3739, 3748, 3748, 3771, 3777,
+ 3780, 3785, 3788
};
#endif
@@ -1007,69 +1011,49 @@ static const yytype_uint16 yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "FLOAT16_T",
- "FLOAT", "FLOAT32_T", "DOUBLE", "FLOAT64_T", "CONST", "BOOL", "INT",
- "UINT", "INT64_T", "UINT64_T", "INT32_T", "UINT32_T", "INT16_T",
- "UINT16_T", "INT8_T", "UINT8_T", "BREAK", "CONTINUE", "DO", "ELSE",
- "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT",
- "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4",
- "UVEC2", "UVEC3", "UVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "U64VEC2",
- "U64VEC3", "U64VEC4", "I32VEC2", "I32VEC3", "I32VEC4", "U32VEC2",
- "U32VEC3", "U32VEC4", "I16VEC2", "I16VEC3", "I16VEC4", "U16VEC2",
- "U16VEC3", "U16VEC4", "I8VEC2", "I8VEC3", "I8VEC4", "U8VEC2", "U8VEC3",
- "U8VEC4", "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID",
- "IN", "OUT", "INOUT", "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED",
- "NONUNIFORM", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", "CALLDATANV",
- "CALLDATAINNV", "COHERENT", "VOLATILE", "RESTRICT", "READONLY",
- "WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT",
- "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", "DVEC2", "DVEC3",
- "DVEC4", "DMAT2", "DMAT3", "DMAT4", "F16VEC2", "F16VEC3", "F16VEC4",
- "F16MAT2", "F16MAT3", "F16MAT4", "F32VEC2", "F32VEC3", "F32VEC4",
- "F32MAT2", "F32MAT3", "F32MAT4", "F64VEC2", "F64VEC3", "F64VEC4",
- "F64MAT2", "F64MAT3", "F64MAT4", "NOPERSPECTIVE", "FLAT", "SMOOTH",
- "LAYOUT", "EXPLICITINTERPAMD", "PERVERTEXNV", "PERPRIMITIVENV",
- "PERVIEWNV", "PERTASKNV", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2",
- "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "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",
- "FCOOPMATNV", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE",
- "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW",
- "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW",
- "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D",
- "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D",
- "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY",
- "USAMPLER2DARRAY", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW",
- "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER",
- "USAMPLERBUFFER", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW",
- "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS",
- "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY",
+ "$end", "error", "$undefined", "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", "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", "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", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV",
+ "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY",
+ "USAMPLERCUBEARRAY", "SAMPLER1D", "SAMPLER1DARRAY",
+ "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", "SAMPLER1DSHADOW", "SAMPLER2DRECT",
+ "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT",
+ "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS",
+ "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY",
"USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT",
- "F16SAMPLER1D", "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT",
- "F16SAMPLERCUBE", "F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY",
- "F16SAMPLERCUBEARRAY", "F16SAMPLERBUFFER", "F16SAMPLER2DMS",
- "F16SAMPLER2DMSARRAY", "F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW",
- "F16SAMPLER1DARRAYSHADOW", "F16SAMPLER2DARRAYSHADOW",
- "F16SAMPLER2DRECTSHADOW", "F16SAMPLERCUBESHADOW",
- "F16SAMPLERCUBEARRAYSHADOW", "SAMPLER", "SAMPLERSHADOW", "TEXTURE1D",
- "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY",
- "TEXTURE2DARRAY", "ITEXTURE1D", "ITEXTURE2D", "ITEXTURE3D",
- "ITEXTURECUBE", "ITEXTURE1DARRAY", "ITEXTURE2DARRAY", "UTEXTURE1D",
- "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", "UTEXTURE1DARRAY",
- "UTEXTURE2DARRAY", "TEXTURE2DRECT", "ITEXTURE2DRECT", "UTEXTURE2DRECT",
- "TEXTUREBUFFER", "ITEXTUREBUFFER", "UTEXTUREBUFFER", "TEXTURECUBEARRAY",
- "ITEXTURECUBEARRAY", "UTEXTURECUBEARRAY", "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", "IMAGE1D",
+ "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",
@@ -1080,11 +1064,18 @@ static const char *const yytname[] =
"F16IMAGE1D", "F16IMAGE2D", "F16IMAGE3D", "F16IMAGE2DRECT",
"F16IMAGECUBE", "F16IMAGE1DARRAY", "F16IMAGE2DARRAY",
"F16IMAGECUBEARRAY", "F16IMAGEBUFFER", "F16IMAGE2DMS",
- "F16IMAGE2DMSARRAY", "STRUCT", "VOID", "WHILE", "IDENTIFIER",
- "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT", "INT16CONSTANT",
- "UINT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INTCONSTANT",
- "UINTCONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "BOOLCONSTANT",
- "FLOAT16CONSTANT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP",
+ "F16IMAGE2DMSARRAY", "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", "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", "LEFT_PAREN",
@@ -1092,11 +1083,24 @@ static const char *const yytname[] =
"RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG",
"DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE",
"RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION",
- "INVARIANT", "PRECISE", "HIGH_PRECISION", "MEDIUM_PRECISION",
- "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", "$accept",
- "variable_identifier", "primary_expression", "postfix_expression",
- "integer_expression", "function_call", "function_call_or_method",
- "function_call_generic", "function_call_header_no_parameters",
+ "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", "UNIFORM", "SHARED", "BUFFER", "FLAT", "SMOOTH",
+ "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", "UINT16CONSTANT",
+ "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INT64CONSTANT",
+ "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "PAYLOADNV", "PAYLOADINNV",
+ "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PATCH", "SAMPLE",
+ "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY",
+ "WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT",
+ "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", "NOPERSPECTIVE",
+ "EXPLICITINTERPAMD", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV",
+ "PERTASKNV", "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",
@@ -1120,8 +1124,8 @@ static const char *const yytname[] =
"$@3", "$@4", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer",
"initializer_list", "declaration_statement", "statement",
- "simple_statement", "compound_statement", "$@5", "$@6",
- "statement_no_new_scope", "statement_scoped", "$@7", "$@8",
+ "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",
@@ -1180,16 +1184,17 @@ static const yytype_uint16 yytoknum[] =
625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
- 655, 656, 657, 658, 659, 660, 661, 662
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665
};
# endif
-#define YYPACT_NINF -659
+#define YYPACT_NINF -453
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-659)))
+ (!!((Yystate) == (-453)))
-#define YYTABLE_NINF -524
+#define YYTABLE_NINF -528
#define yytable_value_is_error(Yytable_value) \
0
@@ -1198,79 +1203,79 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 3535, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -331, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -324, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -319, -659, -659, -659, -659, -659,
- -659, -659, -659, -256, -659, -314, -351, -309, -306, 5942,
- -257, -659, -217, -659, -659, -659, -659, 4338, -659, -659,
- -659, -659, -241, -659, -659, 721, -659, -659, -204, -71,
- -219, -659, 9007, -349, -659, -659, -215, -659, 5942, -659,
- -659, -659, 5942, -178, -172, -659, -337, -267, -659, -659,
- -659, 8237, -207, -659, -659, -659, -659, -341, -659, -211,
- -330, -659, -659, 5942, -210, 6697, -659, -322, 1123, -659,
- -659, -659, -659, -207, -328, -659, 7082, -304, -659, -163,
- -659, -252, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -659, -659, -659, 8237, 8237, 8237, -659, -659,
- -659, -659, -659, -659, -303, -659, -659, -659, -196, -299,
- 8622, -194, -659, 8237, -659, -659, -355, -195, -659, -157,
- 8237, -659, -71, 5942, 5942, -155, 4739, -659, -659, -659,
- -659, -242, -236, -249, -335, -206, -191, -187, -209, -149,
- -150, -333, -162, 7467, -659, -170, -168, -659, -154, -153,
- -167, 7852, -152, 8237, -159, -148, -151, -160, -659, -659,
- -274, -659, -659, -251, -659, -351, -147, -144, -659, -659,
- -659, -659, 1525, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -19, -195, 7082, -302, 7082, -659, -659, 7082,
- 5942, -659, -115, -659, -659, -659, -292, -659, -659, 8237,
- -108, -659, -659, 8237, -143, -659, -659, -659, 8237, -659,
- -659, -659, -659, -659, 5140, -155, -207, -250, -659, -659,
- -659, 8237, 8237, 8237, 8237, 8237, 8237, 8237, 8237, 8237,
- 8237, 8237, 8237, 8237, 8237, 8237, 8237, 8237, 8237, 8237,
- -659, -659, -659, -142, -659, -659, 1927, -659, 8237, -659,
- -659, -245, 8237, -226, -659, -659, -106, -659, 1927, -659,
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- 8237, 8237, -659, -659, -659, -659, -659, -659, -659, 7082,
- -659, -238, -659, 5541, -659, -659, -141, -140, -659, -659,
- -659, -659, -244, -195, -155, -659, -659, -659, -659, -242,
- -242, -236, -236, -249, -249, -249, -249, -335, -335, -206,
- -191, -187, -209, -149, -150, 8237, -659, -104, 3133, -263,
- -659, -260, -659, 3937, -136, -297, -659, 1927, -659, -659,
- -659, -659, 6312, -659, -659, -659, -659, -224, -135, -659,
- -659, 3937, -138, -659, -140, -97, 5942, -132, 8237, -133,
- -106, -134, -659, -659, 8237, 8237, -659, -137, -129, 224,
- -128, 2731, -659, -127, -131, 2329, -126, -659, -659, -659,
- -659, -255, 8237, 2329, -138, -659, -659, 1927, 7082, -659,
- -659, -659, -659, -130, -140, -659, -659, 1927, -123, -659,
- -659, -659
+ 3994, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, 97, -453, -453, -453,
+ -453, -453, 6, -453, -453, -453, -453, -453, -453, -307,
+ -241, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -3, 95, 36,
+ 125, 6034, 82, -453, -22, -453, -453, -453, -453, 4402,
+ -453, -453, -453, -453, 131, -453, -453, 730, -453, -453,
+ 11, -453, 153, -28, 127, -453, 7, -453, 157, -453,
+ 6034, -453, -453, -453, 6034, 129, 134, -453, 13, -453,
+ 73, -453, -453, 8391, 162, -453, -453, -453, 161, 6034,
+ -453, 163, -453, -309, -453, -453, 27, 6831, -453, 16,
+ 1138, -453, -453, -453, -453, 162, 23, -453, 7221, 49,
+ -453, 138, -453, 87, 8391, 8391, 8391, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, 68, -453, -453, -453,
+ 174, 60, 8781, 176, -453, 8391, -453, -453, -320, 175,
+ -453, 6034, 142, 4810, -453, 6034, 8391, -453, -28, -453,
+ 143, -453, -453, 119, 128, 32, 21, 38, 158, 160,
+ 165, 195, 194, 18, 183, 7611, -453, 185, 184, -453,
+ -453, 188, 180, 181, -453, 196, 197, 190, 8001, 198,
+ 8391, 187, 193, 122, -453, -453, 91, -453, 95, 204,
+ 205, -453, -453, -453, -453, -453, 1546, -453, -453, -453,
+ -453, -453, -453, -453, -453, -453, -353, 175, 7221, 69,
+ 7221, -453, -453, 7221, 6034, -453, 170, -453, -453, -453,
+ 78, -453, -453, 8391, 171, -453, -453, 8391, 207, -453,
+ -453, -453, 8391, -453, 142, 162, 93, -453, -453, -453,
+ 5218, -453, -453, -453, -453, 8391, 8391, 8391, 8391, 8391,
+ 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391,
+ 8391, 8391, 8391, 8391, -453, -453, -453, 206, 177, -453,
+ 1954, -453, -453, -453, 1954, -453, 8391, -453, -453, 100,
+ 8391, 144, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, -453, -453, -453, 8391, 8391, -453, -453, -453,
+ -453, -453, -453, -453, 7221, -453, 140, -453, 5626, -453,
+ -453, 209, 208, -453, -453, -453, 123, 175, 142, -453,
+ -453, -453, -453, -453, 119, 119, 128, 128, 32, 32,
+ 32, 32, 21, 21, 38, 158, 160, 165, 195, 194,
+ 8391, -453, 214, 56, -453, 1954, 3586, 172, 3178, 80,
+ -453, 81, -453, -453, -453, -453, -453, 6441, -453, -453,
+ -453, -453, 146, 8391, 215, 177, 212, 208, 186, 6034,
+ 219, 221, -453, -453, 3586, 220, -453, -453, -453, 8391,
+ 222, -453, -453, -453, 216, 2362, 8391, -453, 217, 227,
+ 182, 225, 2770, -453, 229, -453, -453, 7221, -453, -453,
+ -453, 89, 8391, 2362, 220, -453, -453, 1954, -453, 224,
+ 208, -453, -453, 1954, 226, -453, -453
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1278,111 +1283,113 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 157, 158, 202, 200, 203, 201, 204, 156, 215,
- 205, 206, 213, 214, 211, 212, 209, 210, 207, 208,
- 183, 231, 232, 233, 234, 235, 236, 249, 250, 251,
- 246, 247, 248, 261, 262, 263, 243, 244, 245, 258,
- 259, 260, 240, 241, 242, 255, 256, 257, 237, 238,
- 239, 252, 253, 254, 216, 217, 218, 264, 265, 266,
- 162, 160, 161, 159, 165, 163, 164, 166, 172, 185,
- 168, 169, 167, 170, 171, 173, 179, 180, 181, 182,
- 174, 175, 176, 177, 178, 219, 220, 221, 276, 277,
- 278, 222, 223, 224, 288, 289, 290, 225, 226, 227,
- 300, 301, 302, 228, 229, 230, 312, 313, 314, 134,
- 133, 132, 0, 135, 136, 137, 138, 139, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 303, 304, 305, 306, 307,
- 308, 309, 310, 311, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 325, 324, 484, 326, 327, 328, 329,
- 330, 331, 332, 333, 334, 335, 336, 352, 353, 354,
- 355, 356, 357, 359, 360, 361, 362, 363, 364, 366,
- 367, 370, 371, 372, 374, 375, 337, 338, 358, 365,
- 376, 378, 379, 380, 382, 383, 474, 475, 339, 340,
- 341, 368, 342, 346, 347, 350, 373, 377, 381, 343,
- 344, 348, 349, 369, 345, 351, 384, 385, 386, 388,
- 390, 392, 394, 396, 400, 401, 402, 403, 404, 405,
- 407, 408, 409, 410, 411, 412, 414, 416, 417, 418,
- 420, 421, 398, 406, 413, 422, 424, 425, 426, 428,
- 429, 387, 389, 391, 415, 393, 395, 397, 399, 419,
- 423, 427, 476, 477, 480, 481, 482, 483, 478, 479,
- 430, 432, 433, 434, 436, 437, 438, 440, 441, 442,
- 444, 445, 446, 448, 449, 450, 452, 453, 454, 456,
- 457, 458, 460, 461, 462, 464, 465, 466, 468, 469,
- 470, 472, 473, 431, 435, 439, 443, 447, 455, 459,
- 463, 451, 467, 471, 0, 199, 486, 571, 131, 146,
- 487, 488, 489, 0, 570, 0, 572, 0, 108, 107,
- 0, 119, 124, 153, 152, 150, 154, 0, 147, 149,
- 155, 129, 195, 151, 485, 0, 567, 569, 0, 0,
- 0, 492, 0, 0, 96, 93, 0, 106, 0, 115,
- 109, 117, 0, 118, 0, 94, 125, 0, 99, 148,
- 130, 0, 188, 194, 1, 568, 186, 0, 145, 143,
- 0, 141, 490, 0, 0, 0, 97, 0, 0, 573,
- 110, 114, 116, 112, 120, 111, 0, 126, 102, 0,
- 100, 0, 2, 12, 13, 10, 11, 4, 5, 6,
- 7, 8, 9, 15, 14, 0, 0, 0, 42, 41,
- 43, 40, 3, 17, 36, 19, 24, 25, 0, 0,
- 29, 0, 197, 0, 35, 33, 0, 189, 184, 0,
- 0, 140, 0, 0, 0, 0, 0, 494, 95, 190,
- 44, 48, 51, 54, 59, 62, 64, 66, 68, 70,
- 72, 74, 0, 0, 98, 0, 0, 552, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 518, 527, 531,
- 44, 77, 90, 0, 507, 0, 155, 129, 510, 529,
- 509, 508, 0, 511, 512, 533, 513, 540, 514, 515,
- 548, 516, 0, 113, 0, 121, 0, 502, 128, 0,
- 0, 104, 0, 101, 37, 38, 0, 21, 22, 0,
- 0, 27, 26, 0, 199, 30, 32, 39, 0, 196,
- 187, 92, 144, 142, 0, 0, 500, 0, 498, 493,
- 495, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 156, 203, 201, 202, 200, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 204, 205, 206, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 327, 328, 329, 330, 331, 332, 333, 353, 354, 355,
+ 356, 357, 358, 359, 368, 381, 382, 369, 370, 372,
+ 371, 373, 374, 375, 376, 377, 378, 379, 380, 164,
+ 165, 229, 230, 228, 231, 238, 239, 236, 237, 234,
+ 235, 232, 233, 261, 262, 263, 273, 274, 275, 258,
+ 259, 260, 270, 271, 272, 255, 256, 257, 267, 268,
+ 269, 252, 253, 254, 264, 265, 266, 240, 241, 242,
+ 276, 277, 278, 243, 244, 245, 288, 289, 290, 246,
+ 247, 248, 300, 301, 302, 249, 250, 251, 312, 313,
+ 314, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 325, 324, 484,
+ 485, 486, 337, 338, 361, 364, 326, 335, 336, 352,
+ 334, 383, 384, 387, 388, 389, 391, 392, 393, 395,
+ 396, 397, 399, 400, 474, 475, 360, 362, 363, 339,
+ 340, 341, 385, 342, 346, 347, 350, 390, 394, 398,
+ 343, 344, 348, 349, 386, 345, 351, 430, 432, 433,
+ 434, 436, 437, 438, 440, 441, 442, 444, 445, 446,
+ 448, 449, 450, 452, 453, 454, 456, 457, 458, 460,
+ 461, 462, 464, 465, 466, 468, 469, 470, 472, 473,
+ 431, 435, 439, 443, 447, 455, 459, 463, 451, 467,
+ 471, 365, 366, 367, 401, 410, 412, 406, 411, 413,
+ 414, 416, 417, 418, 420, 421, 422, 424, 425, 426,
+ 428, 429, 402, 403, 404, 415, 405, 407, 408, 409,
+ 419, 423, 427, 476, 477, 480, 481, 482, 483, 478,
+ 479, 575, 131, 489, 490, 491, 0, 488, 160, 158,
+ 159, 157, 0, 199, 161, 162, 163, 133, 132, 0,
+ 183, 169, 170, 168, 171, 172, 166, 167, 185, 173,
+ 179, 180, 181, 182, 174, 175, 176, 177, 178, 134,
+ 135, 136, 137, 138, 139, 146, 574, 0, 576, 0,
+ 108, 107, 0, 119, 124, 153, 152, 150, 154, 0,
+ 147, 149, 155, 129, 195, 151, 487, 0, 571, 573,
+ 0, 494, 0, 0, 0, 96, 0, 93, 0, 106,
+ 0, 115, 109, 117, 0, 118, 0, 94, 125, 99,
+ 0, 148, 130, 0, 188, 194, 1, 572, 0, 0,
+ 492, 143, 145, 0, 141, 186, 0, 0, 97, 0,
+ 0, 577, 110, 114, 116, 112, 120, 111, 0, 126,
+ 102, 0, 100, 0, 0, 0, 0, 42, 41, 43,
+ 40, 5, 6, 7, 8, 2, 15, 13, 14, 16,
+ 9, 10, 11, 12, 3, 17, 36, 19, 24, 25,
+ 0, 0, 29, 0, 197, 0, 35, 33, 0, 189,
+ 95, 0, 0, 0, 496, 0, 0, 140, 0, 184,
+ 0, 190, 44, 48, 51, 54, 59, 62, 64, 66,
+ 68, 70, 72, 74, 0, 0, 98, 0, 522, 531,
+ 535, 0, 0, 0, 556, 0, 0, 0, 0, 0,
+ 0, 0, 0, 44, 77, 90, 0, 509, 0, 155,
+ 129, 512, 533, 511, 519, 510, 0, 513, 514, 537,
+ 515, 544, 516, 517, 552, 518, 0, 113, 0, 121,
+ 0, 504, 128, 0, 0, 104, 0, 101, 37, 38,
+ 0, 21, 22, 0, 0, 27, 26, 0, 199, 30,
+ 32, 39, 0, 196, 0, 502, 0, 500, 495, 497,
+ 0, 92, 144, 142, 187, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 75, 191, 192, 0, 563, 562, 0, 554, 0, 566,
- 564, 0, 0, 0, 547, 550, 0, 517, 0, 80,
- 81, 83, 82, 85, 86, 87, 88, 89, 84, 79,
- 0, 0, 532, 528, 530, 534, 541, 549, 123, 0,
- 505, 0, 127, 0, 105, 16, 0, 23, 20, 31,
- 198, 491, 0, 501, 0, 496, 45, 46, 47, 50,
- 49, 52, 53, 57, 58, 55, 56, 60, 61, 63,
- 65, 67, 69, 71, 73, 0, 193, 0, 0, 0,
- 565, 0, 546, 0, 577, 0, 575, 519, 78, 91,
- 122, 503, 0, 103, 18, 497, 499, 0, 0, 557,
- 556, 559, 525, 542, 538, 0, 0, 0, 0, 0,
- 0, 0, 504, 506, 0, 0, 558, 0, 0, 537,
- 0, 0, 535, 0, 0, 0, 0, 574, 576, 520,
- 76, 0, 560, 0, 525, 524, 526, 544, 0, 522,
- 551, 521, 578, 0, 561, 555, 536, 545, 0, 539,
- 553, 543
+ 0, 0, 0, 0, 75, 191, 192, 0, 0, 521,
+ 0, 554, 567, 566, 0, 558, 0, 570, 568, 0,
+ 0, 0, 551, 520, 80, 81, 83, 82, 85, 86,
+ 87, 88, 89, 84, 79, 0, 0, 536, 532, 534,
+ 538, 545, 553, 123, 0, 507, 0, 127, 0, 105,
+ 4, 0, 23, 20, 31, 198, 0, 503, 0, 498,
+ 493, 45, 46, 47, 50, 49, 52, 53, 57, 58,
+ 55, 56, 60, 61, 63, 65, 67, 69, 71, 73,
+ 0, 193, 581, 0, 579, 523, 0, 0, 0, 0,
+ 569, 0, 550, 78, 91, 122, 505, 0, 103, 18,
+ 499, 501, 0, 0, 0, 0, 0, 542, 0, 0,
+ 0, 0, 561, 560, 563, 529, 546, 506, 508, 0,
+ 0, 578, 580, 524, 0, 0, 0, 562, 0, 0,
+ 541, 0, 0, 539, 0, 76, 582, 0, 526, 555,
+ 525, 0, 564, 0, 529, 528, 530, 548, 543, 0,
+ 565, 559, 540, 549, 0, 557, 547
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -659, -659, -659, -659, -659, -659, -659, -659, -659, -659,
- -659, -659, -364, -659, -389, -385, -457, -384, -310, -307,
- -305, -308, -301, -298, -659, -386, -659, -390, -659, -415,
- -418, 1, -659, -659, -659, 2, -659, -659, -659, -110,
- -105, -107, -659, -659, -628, -659, -659, -659, -659, -188,
- -659, -336, -343, -659, 6, -659, 0, -334, -659, -659,
- -659, -659, -67, -659, -659, -659, -431, -437, -277, -350,
- -501, -659, -375, -488, -658, -414, -659, -659, -428, -426,
- -659, -659, -87, -568, -368, -659, -231, -659, -388, -659,
- -230, -659, -659, -659, -659, -228, -659, -659, -659, -659,
- -659, -659, -659, -659, -70, -659, -659, -659, -659, -394
+ -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
+ -453, -453, 8696, -453, -89, -88, -122, -84, -19, -18,
+ -17, -16, -20, -15, -453, -85, -453, -98, -453, -110,
+ -119, 2, -453, -453, -453, 4, -453, -453, -453, 189,
+ 191, 192, -453, -453, -339, -453, -453, -453, -453, 98,
+ -453, -37, -44, -453, 9, -453, 0, -71, -453, -453,
+ -453, -453, 261, -453, -453, -453, -452, -137, 20, -68,
+ -209, -453, -96, -198, -326, -453, -136, -453, -453, -146,
+ -144, -453, -453, 200, -265, -87, -453, 57, -453, -112,
+ -453, 59, -453, -453, -453, -453, 61, -453, -453, -453,
+ -453, -453, -453, -453, -453, 228, -453, -453, -453, -453,
+ -99
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 432, 433, 434, 616, 435, 436, 437, 438, 439,
- 440, 441, 490, 443, 461, 462, 463, 464, 465, 466,
- 467, 468, 469, 470, 471, 491, 645, 492, 600, 493,
- 542, 494, 335, 520, 411, 495, 337, 338, 339, 369,
- 370, 371, 340, 341, 342, 343, 344, 345, 390, 391,
- 346, 347, 348, 349, 444, 387, 445, 397, 382, 383,
- 446, 352, 353, 354, 453, 393, 456, 457, 547, 548,
- 518, 611, 498, 499, 500, 501, 588, 681, 710, 689,
- 690, 691, 711, 502, 503, 504, 505, 692, 677, 506,
- 507, 693, 718, 508, 509, 510, 653, 576, 648, 671,
- 687, 688, 511, 355, 356, 357, 366, 512, 655, 656
+ -1, 434, 435, 436, 621, 437, 438, 439, 440, 441,
+ 442, 443, 493, 445, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 494, 650, 495, 605, 496,
+ 552, 497, 337, 524, 413, 498, 339, 340, 341, 371,
+ 372, 373, 342, 343, 344, 345, 346, 347, 393, 394,
+ 348, 349, 350, 351, 446, 396, 447, 399, 384, 385,
+ 448, 354, 355, 356, 455, 389, 453, 454, 546, 547,
+ 522, 616, 501, 502, 503, 504, 505, 580, 676, 709,
+ 700, 701, 702, 710, 506, 507, 508, 509, 703, 680,
+ 510, 511, 704, 724, 512, 513, 514, 656, 584, 658,
+ 684, 698, 699, 515, 357, 358, 359, 368, 516, 653,
+ 654
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1390,82 +1397,245 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 351, 334, 336, 372, 379, 477, 350, 478, 479, 472,
- 388, 482, 526, 608, 604, 610, 517, 442, 612, 550,
- 657, 360, 544, 558, 559, 675, 363, 538, 395, 379,
- 569, 460, 372, 706, 365, 448, 396, 709, 405, 539,
- 395, 449, 407, 675, 358, 709, 451, 406, 447, 395,
- 535, 359, 452, 527, 528, 473, 514, 454, 560, 561,
- 361, 524, 525, 474, 541, 570, 581, 367, 583, 513,
- 515, 364, -34, 473, 529, 473, 368, 532, 530, 537,
- 519, 679, 609, 533, 615, 680, 460, 573, 647, 613,
- 601, 589, 590, 591, 592, 593, 594, 595, 596, 597,
- 598, 633, 634, 635, 636, 556, 557, 550, 660, 460,
- 599, 379, 408, 672, 617, 409, 673, 454, 410, 601,
- 454, 713, 601, 376, 517, 374, 517, 601, 375, 517,
- 522, 601, 624, 523, 602, 625, 386, 601, 624, 717,
- 650, 665, 661, 619, 662, 330, 331, 332, 551, 552,
- 553, 554, 381, 555, 562, 563, 601, 652, 601, 684,
- 392, 683, 403, 649, 398, 629, 630, 651, 404, 604,
- 395, 631, 632, 450, 620, 458, 550, 521, 637, 638,
- 531, 536, 473, 540, 454, 546, 566, 626, 627, 628,
- 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
- 460, 460, 460, 460, 460, 460, 564, 719, 454, 565,
- 658, 659, 623, 567, 568, 574, 571, 575, 579, 517,
- 587, 577, 578, 582, 584, 614, 586, 585, -35, 604,
- 667, -33, 618, -28, 654, 668, 646, 664, 674, 678,
- 685, -523, 601, 694, 695, 697, 699, 703, 702, 704,
- 712, 487, 707, 708, 639, 720, 674, 721, 640, 642,
- 696, 641, 401, 400, 543, 402, 362, 643, 622, 389,
- 701, 644, 517, 669, 666, 715, 705, 454, 716, 399,
- 670, 605, 606, 686, 607, 385, 698, 714, 0, 0,
- 0, 0, 541, 0, 700, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 460, 0, 0, 676, 517, 0,
- 485, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 379, 0, 676, 0, 0, 0, 373,
- 0, 0, 0, 0, 0, 350, 0, 380, 0, 0,
- 0, 0, 0, 350, 0, 351, 334, 336, 0, 0,
- 0, 350, 394, 0, 0, 0, 0, 0, 373, 0,
- 0, 0, 373, 0, 350, 0, 0, 0, 350, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 455, 0, 0, 0, 0, 497, 350,
- 0, 0, 0, 0, 496, 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, 455, 545, 0, 455, 0, 0, 350,
- 350, 0, 350, 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, 497, 0, 0, 0, 0, 0, 496, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 455, 0, 0, 0, 0, 0, 350, 0, 0, 0,
+ 353, 542, 336, 550, 338, 481, 457, 363, 484, 352,
+ 485, 486, 458, 543, 489, 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, 618, 364, 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, 374, 381, 530, 409, 609, 613,
+ 521, 615, 474, 449, 617, 655, 549, 678, 562, 563,
+ 573, 365, 391, 397, 361, 560, 561, 407, 378, 397,
+ 381, 398, 475, 374, 517, 519, 408, 566, 567, 397,
+ 476, 375, 459, 392, 539, 678, 518, 366, 460, 382,
+ 352, 369, 451, 564, 565, 574, 362, 353, 352, 336,
+ 388, 338, 297, 531, 532, 475, 352, 302, 303, 708,
+ 375, 551, 523, 674, 375, 536, 716, 675, 589, 352,
+ 591, 537, -34, 352, 533, 475, 657, 708, 534, 452,
+ 577, 410, 614, 620, 411, 685, 686, 412, 352, 606,
+ 500, 606, 606, 376, 719, 665, 377, 381, 526, 499,
+ 606, 527, 606, 549, 628, 607, 451, 629, 451, 367,
+ 521, 606, 521, 622, 660, 521, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 293, 294, 295, 624,
+ 638, 639, 640, 641, 628, 604, 370, 670, 555, 556,
+ 557, 544, 723, 452, 558, 452, 559, 609, 688, 666,
+ 352, 667, 352, 383, 352, 606, 662, 606, 689, 634,
+ 635, 390, 636, 637, 627, 400, 659, 395, 397, 405,
+ 661, 549, 642, 643, 406, 450, 456, 451, 525, 535,
+ 540, 475, 545, 554, 568, 569, 571, 572, 718, 570,
+ 575, 578, 581, 579, 582, 583, 500, 663, 664, 592,
+ 585, 586, 590, 451, 587, 499, 521, 593, -35, -33,
+ 619, 623, -28, 651, 452, 609, 669, 652, 673, 606,
+ 681, 693, 691, 352, 695, 696, 694, 706, -527, 707,
+ 672, 712, 713, 478, 714, 726, 677, 717, 725, 644,
+ 452, 645, 648, 646, 690, 647, 553, 360, 649, 352,
+ 671, 402, 682, 403, 626, 715, 404, 721, 401, 521,
+ 722, 683, 697, 610, 677, 611, 692, 612, 0, 0,
+ 500, 451, 0, 0, 500, 387, 711, 0, 551, 499,
+ 0, 705, 0, 499, 0, 0, 0, 0, 0, 0,
+ 0, 0, 720, 0, 0, 0, 0, 0, 0, 521,
+ 0, 0, 0, 0, 0, 0, 0, 0, 452, 679,
+ 0, 0, 0, 0, 0, 0, 0, 352, 0, 0,
+ 0, 0, 0, 0, 0, 381, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 679, 0, 0,
+ 0, 0, 0, 0, 0, 500, 500, 0, 500, 0,
+ 0, 0, 0, 0, 499, 499, 0, 499, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 382,
+ 0, 0, 0, 0, 500, 0, 0, 0, 352, 0,
+ 0, 0, 0, 499, 0, 500, 0, 0, 0, 0,
+ 0, 0, 500, 0, 499, 0, 0, 0, 0, 0,
+ 0, 499, 0, 500, 0, 0, 0, 500, 0, 0,
+ 0, 0, 499, 500, 0, 0, 499, 0, 0, 0,
+ 386, 0, 499, 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, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 455, 0, 0, 0, 0, 0,
- 350, 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, 497, 0, 0, 0,
- 0, 0, 496, 0, 0, 0, 0, 0, 497, 0,
- 0, 0, 0, 0, 496, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 291, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
+ 294, 295, 296, 0, 0, 0, 0, 0, 0, 0,
+ 0, 297, 298, 299, 300, 301, 302, 303, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 455, 0, 0, 0, 0, 0, 350,
+ 304, 305, 306, 307, 308, 309, 0, 0, 0, 0,
+ 0, 0, 0, 0, 310, 0, 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, 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, 0, 0, 414, 415, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 416, 0, 477, 0, 478, 479, 0, 0,
+ 0, 0, 480, 417, 418, 419, 420, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
+ 296, 0, 0, 0, 421, 422, 423, 424, 425, 297,
+ 298, 299, 300, 301, 302, 303, 481, 482, 483, 484,
+ 0, 485, 486, 487, 488, 489, 490, 491, 304, 305,
+ 306, 307, 308, 309, 426, 427, 428, 429, 430, 431,
+ 432, 433, 310, 492, 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, 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, 0,
+ 0, 414, 415, 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, 497, 0,
- 0, 0, 0, 497, 496, 0, 0, 497, 0, 496,
- 0, 0, 0, 496, 0, 0, 0, 0, 0, 0,
- 0, 497, 0, 0, 0, 0, 380, 496, 0, 0,
- 0, 0, 350, 0, 0, 0, 0, 0, 0, 0,
- 0, 497, 0, 0, 0, 497, 0, 496, 0, 0,
- 0, 496, 0, 497, 0, 0, 0, 497, 0, 496,
- 0, 0, 0, 496, 0, 0, 0, 497, 0, 0,
- 0, 384, 0, 496, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
+ 416, 0, 477, 0, 478, 608, 0, 0, 0, 0,
+ 480, 417, 418, 419, 420, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 292, 293, 294, 295, 296, 0,
+ 0, 0, 421, 422, 423, 424, 425, 297, 298, 299,
+ 300, 301, 302, 303, 481, 482, 483, 484, 0, 485,
+ 486, 487, 488, 489, 490, 491, 304, 305, 306, 307,
+ 308, 309, 426, 427, 428, 429, 430, 431, 432, 433,
+ 310, 492, 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, 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, 0, 0, 414,
+ 415, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 416, 0,
+ 477, 0, 478, 0, 0, 0, 0, 0, 480, 417,
+ 418, 419, 420, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 292, 293, 294, 295, 296, 0, 0, 0,
+ 421, 422, 423, 424, 425, 297, 298, 299, 300, 301,
+ 302, 303, 481, 482, 483, 484, 0, 485, 486, 487,
+ 488, 489, 490, 491, 304, 305, 306, 307, 308, 309,
+ 426, 427, 428, 429, 430, 431, 432, 433, 310, 492,
+ 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, 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,
@@ -1492,20 +1662,143 @@ static const yytype_int16 yytable[] =
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,
- 0, 0, 326, 0, 0, 0, 0, 0, 0, 0,
+ 286, 287, 288, 289, 290, 0, 0, 414, 415, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 416, 0, 477, 0,
+ 400, 0, 0, 0, 0, 0, 480, 417, 418, 419,
+ 420, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 292, 293, 294, 295, 296, 0, 0, 0, 421, 422,
+ 423, 424, 425, 297, 298, 299, 300, 301, 302, 303,
+ 481, 482, 483, 484, 0, 485, 486, 487, 488, 489,
+ 490, 491, 304, 305, 306, 307, 308, 309, 426, 427,
+ 428, 429, 430, 431, 432, 433, 310, 492, 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, 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, 0, 0, 414, 415, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 416, 0, 477, 0, 0, 0,
+ 0, 0, 0, 0, 480, 417, 418, 419, 420, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
+ 294, 295, 296, 0, 0, 0, 421, 422, 423, 424,
+ 425, 297, 298, 299, 300, 301, 302, 303, 481, 482,
+ 483, 484, 0, 485, 486, 487, 488, 489, 490, 491,
+ 304, 305, 306, 307, 308, 309, 426, 427, 428, 429,
+ 430, 431, 432, 433, 310, 492, 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, 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, 0, 0, 414, 415, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 327, 0, 0, 0,
+ 0, 0, 416, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 480, 417, 418, 419, 420, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
+ 296, 0, 0, 0, 421, 422, 423, 424, 425, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 304, 305,
+ 306, 307, 308, 309, 426, 427, 428, 429, 430, 431,
+ 432, 433, 310, 0, 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, 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, 0,
+ 0, 414, 415, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 328, 329, 330, 331, 332, 333, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 475, 476, 477, 0, 478,
- 479, 480, 481, 482, 483, 484, 20, 21, 22, 23,
+ 416, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 417, 418, 419, 420, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 292, 293, 294, 295, 0, 0,
+ 0, 0, 421, 422, 423, 424, 425, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 304, 305, 306, 307,
+ 308, 309, 426, 427, 428, 429, 430, 431, 432, 433,
+ 310, 0, 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, 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,
@@ -1532,141 +1825,21 @@ static const yytype_int16 yytable[] =
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, 485, 412, 326, 413, 414, 415, 416, 417,
- 418, 419, 420, 421, 422, 423, 424, 0, 0, 425,
- 426, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 427, 0,
- 486, 0, 487, 488, 0, 0, 0, 0, 489, 428,
- 429, 430, 431, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 328, 329, 330, 331, 332, 333, 1, 2,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 475, 476, 477,
- 0, 478, 479, 480, 481, 482, 483, 484, 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, 485, 412, 326, 413, 414, 415,
- 416, 417, 418, 419, 420, 421, 422, 423, 424, 0,
- 0, 425, 426, 0, 0, 0, 0, 0, 0, 0,
+ 284, 285, 286, 287, 288, 289, 290, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 427, 0, 486, 0, 487, 603, 0, 0, 0, 0,
- 489, 428, 429, 430, 431, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 328, 329, 330, 331, 332, 333,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 475,
- 476, 477, 0, 478, 479, 480, 481, 482, 483, 484,
- 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, 485, 412, 326, 413,
- 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
- 424, 0, 0, 425, 426, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 427, 0, 486, 0, 487, 0, 0, 0,
- 0, 0, 489, 428, 429, 430, 431, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 328, 329, 330, 331,
- 332, 333, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 475, 476, 477, 0, 478, 479, 480, 481, 482,
- 483, 484, 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, 485, 412,
- 326, 413, 414, 415, 416, 417, 418, 419, 420, 421,
- 422, 423, 424, 0, 0, 425, 426, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 291, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 427, 0, 486, 0, 398, 0,
- 0, 0, 0, 0, 489, 428, 429, 430, 431, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 328, 329,
- 330, 331, 332, 333, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 475, 476, 477, 0, 478, 479, 480,
- 481, 482, 483, 484, 20, 21, 22, 23, 24, 25,
+ 0, 0, 292, 293, 294, 295, 296, 0, 0, 0,
+ 0, 0, 0, 0, 0, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
+ 0, 0, 0, 0, 0, 0, 0, 0, 310, 0,
+ 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, 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,
@@ -1693,100 +1866,61 @@ static const yytype_int16 yytable[] =
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,
- 485, 412, 326, 413, 414, 415, 416, 417, 418, 419,
- 420, 421, 422, 423, 424, 0, 0, 425, 426, 0,
+ 286, 287, 288, 289, 290, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 427, 0, 486, 0,
- 0, 0, 0, 0, 0, 0, 489, 428, 429, 430,
- 431, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 328, 329, 330, 331, 332, 333, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 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, 0, 412, 326, 413, 414, 415, 416, 417,
- 418, 419, 420, 421, 422, 423, 424, 0, 0, 425,
- 426, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 427, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 489, 428,
- 429, 430, 431, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 328, 329, 330, 331, 332, 333, 1, 2,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 326, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 379, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 292, 293, 294, 295, 0, 0, 0, 0, 0, 0,
+ 0, 0, 380, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 304, 305, 306, 307, 308, 309, 0, 0,
+ 0, 0, 0, 0, 0, 0, 310, 0, 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, 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, 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, 548,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 327, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 328, 329, 330, 331, 332, 333,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
+ 294, 295, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 297, 298, 299, 300, 301, 302, 303, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 304, 305, 306, 307, 308, 309, 0, 0, 0, 0,
+ 0, 0, 0, 0, 310, 0, 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, 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,
@@ -1814,104 +1948,106 @@ static const yytype_int16 yytable[] =
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, 0, 412, 326, 413,
- 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
- 424, 0, 0, 425, 426, 0, 0, 0, 0, 0,
+ 290, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 427, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 428, 429, 430, 431, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 328, 329, 330, 331,
- 332, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 0, 0, 0, 0, 0, 0, 0, 630, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 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, 0, 377, 326,
+ 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 304, 305,
+ 306, 307, 308, 309, 0, 0, 0, 0, 0, 0,
+ 0, 0, 310, 0, 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, 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, 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, 668, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 292, 293, 294, 295, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 304, 305, 306, 307,
+ 308, 309, 0, 0, 0, 0, 0, 0, 0, 0,
+ 310, 0, 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, 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, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 378, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 328, 329, 330,
- 331, 332, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 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, 0, 0,
- 326, 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, 549,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 328, 329,
- 330, 331, 332, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
+ 0, 0, 292, 293, 294, 295, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
+ 0, 0, 0, 0, 0, 0, 0, 0, 310, 0,
+ 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, 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,
+ 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,
@@ -1934,222 +2070,359 @@ static const yytype_int16 yytable[] =
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, 0,
- 0, 326, 0, 0, 0, 0, 0, 0, 0, 0,
+ 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 0, 520,
+ 687, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 621, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 328,
- 329, 330, 331, 332, 1, 2, 3, 4, 5, 6,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 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,
- 0, 0, 326, 0, 0, 0, 0, 0, 0, 0,
+ 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, 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, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 461, 0,
+ 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 663, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 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, 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, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 328, 329, 330, 331, 332, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 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, 0, 0, 326, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 0, 520,
+ 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 3, 4, 5,
- 6, 7, 0, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
- 0, 328, 329, 330, 331, 332, 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, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 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, 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, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 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, 0, 412, 326, 413, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 0, 0, 425, 426,
+ 0, 0, 0, 0, 0, 416, 0, 0, 576, 0,
+ 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 427, 0, 0,
- 0, 516, 682, 0, 0, 0, 0, 0, 428, 429,
- 430, 431, 3, 4, 5, 6, 7, 0, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 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,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 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, 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, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, 108, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 412, 326, 413,
- 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
- 424, 0, 0, 425, 426, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 588, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 427, 0, 0, 459, 0, 0, 0, 0,
- 0, 0, 0, 428, 429, 430, 431, 3, 4, 5,
- 6, 7, 0, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 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, 0, 412, 326, 413, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 0, 0, 425, 426,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 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, 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, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 427, 0, 0,
- 0, 516, 0, 0, 0, 0, 0, 0, 428, 429,
- 430, 431, 3, 4, 5, 6, 7, 0, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 318, 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, 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, 0, 0, 414, 415, 0, 444,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 462, 0, 416, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
+ 528, 529, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
+ 424, 425, 297, 0, 0, 0, 0, 302, 538, 0,
+ 0, 541, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 462, 0, 0, 0, 0, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
+ 0, 462, 0, 0, 318, 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, 0, 0, 625, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 631, 632, 633, 462, 462, 462, 462, 462, 462,
+ 462, 462, 462, 462, 462, 462, 462, 462, 462, 462,
+ 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, 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, 462
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 0, 321, 0, 455, 0, 358, 315, 314, 361, 0,
+ 363, 364, 321, 333, 367, 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, 524, 314, 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, 341, 349, 416, 378, 506, 518,
+ 408, 520, 397, 384, 523, 580, 453, 656, 297, 298,
+ 302, 324, 350, 316, 318, 293, 294, 314, 350, 316,
+ 374, 324, 316, 370, 405, 406, 323, 299, 300, 316,
+ 324, 341, 315, 371, 442, 684, 323, 350, 321, 349,
+ 341, 315, 389, 332, 333, 337, 350, 357, 349, 357,
+ 360, 357, 351, 295, 296, 316, 357, 356, 357, 695,
+ 370, 456, 323, 317, 374, 315, 702, 321, 488, 370,
+ 490, 321, 314, 374, 316, 316, 584, 713, 320, 389,
+ 475, 318, 323, 315, 321, 315, 315, 324, 389, 321,
+ 400, 321, 321, 321, 315, 614, 324, 451, 321, 400,
+ 321, 324, 321, 550, 321, 324, 453, 324, 455, 324,
+ 518, 321, 520, 533, 324, 523, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 339, 340, 341, 537,
+ 562, 563, 564, 565, 321, 323, 321, 324, 329, 330,
+ 331, 451, 717, 453, 326, 455, 328, 655, 667, 319,
+ 451, 321, 453, 332, 455, 321, 322, 321, 322, 558,
+ 559, 318, 560, 561, 545, 318, 586, 350, 316, 350,
+ 590, 618, 566, 567, 350, 324, 323, 524, 350, 315,
+ 314, 316, 350, 350, 336, 335, 301, 303, 707, 334,
+ 317, 316, 314, 319, 324, 324, 506, 605, 606, 322,
+ 314, 314, 314, 550, 324, 506, 614, 324, 314, 314,
+ 350, 350, 315, 317, 524, 723, 317, 350, 314, 321,
+ 358, 319, 317, 524, 315, 314, 350, 315, 318, 323,
+ 650, 324, 315, 318, 362, 319, 656, 318, 324, 568,
+ 550, 569, 572, 570, 673, 571, 458, 296, 573, 550,
+ 628, 370, 658, 374, 544, 701, 374, 713, 368, 667,
+ 714, 658, 684, 516, 684, 516, 675, 516, -1, -1,
+ 580, 618, -1, -1, 584, 357, 696, -1, 673, 580,
+ -1, 689, -1, 584, -1, -1, -1, -1, -1, -1,
+ -1, -1, 712, -1, -1, -1, -1, -1, -1, 707,
+ -1, -1, -1, -1, -1, -1, -1, -1, 618, 656,
+ -1, -1, -1, -1, -1, -1, -1, 618, -1, -1,
+ -1, -1, -1, -1, -1, 679, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 684, -1, -1,
+ -1, -1, -1, -1, -1, 655, 656, -1, 658, -1,
+ -1, -1, -1, -1, 655, 656, -1, 658, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 679,
+ -1, -1, -1, -1, 684, -1, -1, -1, 679, -1,
+ -1, -1, -1, 684, -1, 695, -1, -1, -1, -1,
+ -1, -1, 702, -1, 695, -1, -1, -1, -1, -1,
+ -1, 702, -1, 713, -1, -1, -1, 717, -1, -1,
+ -1, -1, 713, 723, -1, -1, 717, -1, -1, -1,
+ 0, -1, 723, 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,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 85, 86, 87, 88, 89,
+ 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, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 118, 119,
+ 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,
@@ -2167,66 +2440,193 @@ static const yytype_int16 yytable[] =
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, 0, 412, 326, 413,
- 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
- 424, 0, 0, 425, 426, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 427, 0, 0, 572, 0, 0, 0, 0,
- 0, 0, 0, 428, 429, 430, 431, 3, 4, 5,
- 6, 7, 0, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 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, 0, 412, 326, 413, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 0, 0, 425, 426,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 427, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 580, 428, 429,
- 430, 431, 3, 4, 5, 6, 7, 0, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 290, 291, 292, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 324, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
+ 340, 341, 342, -1, -1, -1, -1, -1, -1, -1,
+ -1, 351, 352, 353, 354, 355, 356, 357, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 370, 371, 372, 373, 374, 375, -1, -1, -1, -1,
+ -1, -1, -1, -1, 384, -1, 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, 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, -1, -1, 295, 296, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 314, -1, 316, -1, 318, 319, -1, -1,
+ -1, -1, 324, 325, 326, 327, 328, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
+ 342, -1, -1, -1, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ -1, 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, 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, -1,
+ -1, 295, 296, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 314, -1, 316, -1, 318, 319, -1, -1, -1, -1,
+ 324, 325, 326, 327, 328, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 338, 339, 340, 341, 342, -1,
+ -1, -1, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, -1, 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, 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, -1, -1, 295,
+ 296, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 314, -1,
+ 316, -1, 318, -1, -1, -1, -1, -1, 324, 325,
+ 326, 327, 328, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 338, 339, 340, 341, 342, -1, -1, -1,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, -1, 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, 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, -1, -1, 295, 296, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 314, -1, 316, -1,
+ 318, -1, -1, -1, -1, -1, 324, 325, 326, 327,
+ 328, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 338, 339, 340, 341, 342, -1, -1, -1, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, -1, 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, 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,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 85, 86, 87, 88, 89,
+ 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, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 118, 119,
+ 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,
@@ -2244,66 +2644,193 @@ static const yytype_int16 yytable[] =
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, 0, 412, 326, 413,
- 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
- 424, 0, 0, 425, 426, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 427, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 428, 429, 430, 431, 3, 4, 5,
- 6, 7, 0, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 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,
- 534, 0, 412, 326, 413, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 0, 0, 425, 426,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 427, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 428, 429,
- 430, 431, 3, 4, 5, 6, 7, 0, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 290, 291, 292, -1, -1, 295, 296, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 314, -1, 316, -1, -1, -1,
+ -1, -1, -1, -1, 324, 325, 326, 327, 328, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
+ 340, 341, 342, -1, -1, -1, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, -1, 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, 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, -1, -1, 295, 296, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 314, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 324, 325, 326, 327, 328, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
+ 342, -1, -1, -1, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, -1, 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, 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, -1,
+ -1, 295, 296, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 314, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 325, 326, 327, 328, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 338, 339, 340, 341, -1, -1,
+ -1, -1, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, -1, 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, 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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 324, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 338, 339, 340, 341, 342, -1, -1, -1,
+ -1, -1, -1, -1, -1, 351, 352, 353, 354, 355,
+ 356, 357, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 370, 371, 372, 373, 374, 375,
+ -1, -1, -1, -1, -1, -1, -1, -1, 384, -1,
+ 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, 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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 324, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 338, 339, 340, 341, -1, -1, -1, -1, -1, -1,
+ -1, -1, 350, 351, 352, 353, 354, 355, 356, 357,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 370, 371, 372, 373, 374, 375, -1, -1,
+ -1, -1, -1, -1, -1, -1, 384, -1, 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, 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,
- 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, 85, 86, 87, 88, 89,
+ 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, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 118, 119,
+ 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,
@@ -2321,93 +2848,147 @@ static const yytype_int16 yytable[] =
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, 0, 0, 326
-};
-
-static const yytype_int16 yycheck[] =
-{
- 0, 0, 0, 339, 347, 24, 0, 26, 27, 395,
- 81, 30, 427, 514, 502, 516, 406, 381, 519, 456,
- 588, 340, 453, 358, 359, 653, 340, 382, 377, 372,
- 363, 395, 368, 691, 385, 376, 385, 695, 375, 394,
- 377, 382, 376, 671, 375, 703, 376, 384, 382, 377,
- 440, 375, 382, 356, 357, 377, 384, 393, 393, 394,
- 379, 425, 426, 385, 450, 398, 481, 376, 483, 403,
- 404, 385, 375, 377, 377, 377, 382, 376, 381, 443,
- 384, 378, 384, 382, 376, 382, 450, 473, 576, 520,
- 382, 365, 366, 367, 368, 369, 370, 371, 372, 373,
- 374, 558, 559, 560, 561, 354, 355, 544, 609, 473,
- 384, 454, 379, 376, 529, 382, 376, 453, 385, 382,
- 456, 376, 382, 340, 514, 382, 516, 382, 385, 519,
- 382, 382, 382, 385, 385, 385, 340, 382, 382, 707,
- 385, 385, 380, 533, 382, 401, 402, 403, 390, 391,
- 392, 387, 393, 389, 360, 361, 382, 383, 382, 383,
- 379, 662, 340, 578, 379, 554, 555, 582, 340, 657,
- 377, 556, 557, 384, 538, 385, 613, 340, 562, 563,
- 376, 375, 377, 340, 520, 340, 395, 551, 552, 553,
- 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
- 564, 565, 566, 567, 568, 569, 397, 708, 544, 396,
- 600, 601, 546, 362, 364, 385, 378, 385, 385, 609,
- 380, 375, 375, 375, 383, 340, 377, 375, 375, 717,
- 645, 375, 340, 376, 340, 339, 378, 378, 653, 375,
- 375, 379, 382, 340, 376, 378, 380, 376, 385, 25,
- 376, 379, 379, 384, 564, 385, 671, 380, 565, 567,
- 678, 566, 372, 368, 452, 372, 333, 568, 545, 340,
- 685, 569, 662, 648, 624, 703, 690, 613, 704, 366,
- 648, 512, 512, 671, 512, 355, 680, 702, -1, -1,
- -1, -1, 678, -1, 684, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 678, -1, -1, 653, 708, -1,
- 339, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 676, -1, 671, -1, -1, -1, 339,
- -1, -1, -1, -1, -1, 339, -1, 347, -1, -1,
- -1, -1, -1, 347, -1, 355, 355, 355, -1, -1,
- -1, 355, 362, -1, -1, -1, -1, -1, 368, -1,
- -1, -1, 372, -1, 368, -1, -1, -1, 372, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 393, -1, -1, -1, -1, 398, 393,
- -1, -1, -1, -1, 398, -1, -1, -1, -1, -1,
+ 290, 291, 292, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 319,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
+ 340, 341, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 351, 352, 353, 354, 355, 356, 357, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 370, 371, 372, 373, 374, 375, -1, -1, -1, -1,
+ -1, -1, -1, -1, 384, -1, 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, 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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 453, 454, -1, 456, -1, -1, 453,
- 454, -1, 456, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 319, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 351,
+ 352, 353, 354, 355, 356, 357, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 370, 371,
+ 372, 373, 374, 375, -1, -1, -1, -1, -1, -1,
+ -1, -1, 384, -1, 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, 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, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 502, -1, -1, -1, -1, -1, 502, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 520, -1, -1, -1, -1, -1, 520, -1, -1, -1,
+ -1, -1, -1, -1, -1, 319, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 544, -1, -1, -1, -1, -1,
- 544, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 338, 339, 340, 341, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 351, 352, 353,
+ 354, 355, 356, 357, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 370, 371, 372, 373,
+ 374, 375, -1, -1, -1, -1, -1, -1, -1, -1,
+ 384, -1, 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, 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, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 576, -1, -1, -1,
- -1, -1, 576, -1, -1, -1, -1, -1, 588, -1,
- -1, -1, -1, -1, 588, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 613, -1, -1, -1, -1, -1, 613,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 648, -1,
- -1, -1, -1, 653, 648, -1, -1, 657, -1, 653,
- -1, -1, -1, 657, -1, -1, -1, -1, -1, -1,
- -1, 671, -1, -1, -1, -1, 676, 671, -1, -1,
- -1, -1, 676, -1, -1, -1, -1, -1, -1, -1,
- -1, 691, -1, -1, -1, 695, -1, 691, -1, -1,
- -1, 695, -1, 703, -1, -1, -1, 707, -1, 703,
- -1, -1, -1, 707, -1, -1, -1, 717, -1, -1,
- -1, 0, -1, 717, 3, 4, 5, 6, 7, 8,
+ -1, -1, 338, 339, 340, 341, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 351, 352, 353, 354, 355,
+ 356, 357, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 370, 371, 372, 373, 374, 375,
+ -1, -1, -1, -1, -1, -1, -1, -1, 384, -1,
+ 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, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 33, 34, 35, 36, 37, 38,
+ 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,
+ 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,
@@ -2430,185 +3011,23 @@ static const yytype_int16 yycheck[] =
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,
- -1, -1, 341, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 385, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 399, 400, 401, 402, 403, 404, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, -1, 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, -1, -1, 356,
- 357, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 375, -1,
- 377, -1, 379, 380, -1, -1, -1, -1, 385, 386,
- 387, 388, 389, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 399, 400, 401, 402, 403, 404, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, 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, -1,
- -1, 356, 357, -1, -1, -1, -1, -1, -1, -1,
+ 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 375, -1, 377, -1, 379, 380, -1, -1, -1, -1,
- 385, 386, 387, 388, 389, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 399, 400, 401, 402, 403, 404,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, -1, 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, -1, -1, 356, 357, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, -1, 318,
+ 319, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 375, -1, 377, -1, 379, -1, -1, -1,
- -1, -1, 385, 386, 387, 388, 389, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 399, 400, 401, 402,
- 403, 404, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, -1, 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, -1, -1, 356, 357, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 375, -1, 377, -1, 379, -1,
- -1, -1, -1, -1, 385, 386, 387, 388, 389, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 399, 400,
- 401, 402, 403, 404, 3, 4, 5, 6, 7, 8,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, -1, 26, 27, 28,
+ 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,
+ 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,
@@ -2631,265 +3050,62 @@ static const yytype_int16 yycheck[] =
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, -1, -1, 356, 357, -1,
+ 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 375, -1, 377, -1,
- -1, -1, -1, -1, -1, -1, 385, 386, 387, 388,
- 389, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 399, 400, 401, 402, 403, 404, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 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, -1, 340, 341, 342, 343, 344, 345, 346,
- 347, 348, 349, 350, 351, 352, 353, -1, -1, 356,
- 357, -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, 385, 386,
- 387, 388, 389, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 399, 400, 401, 402, 403, 404, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, -1, 341, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 385, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 399, 400, 401, 402, 403, 404,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, 317, -1,
+ -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 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, -1, 340, 341, 342,
- 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
- 353, -1, -1, 356, 357, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 375, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 386, 387, 388, 389, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 399, 400, 401, 402,
- 403, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 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, -1, 340, 341,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 385, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 399, 400, 401,
- 402, 403, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 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, -1, -1,
- 341, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -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, -1, -1, -1, -1, -1, 399, 400,
- 401, 402, 403, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 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, -1,
- -1, 341, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 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, 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, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, -1, 318,
+ -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -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, -1, -1, -1, -1, -1, 399,
- 400, 401, 402, 403, 3, 4, 5, 6, 7, 8,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 33, 34, 35, 36, 37, 38,
+ 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,
+ 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,
@@ -2912,358 +3128,153 @@ static const yytype_int16 yycheck[] =
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,
- -1, -1, 341, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, 317, -1,
+ -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-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, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 399, 400, 401, 402, 403, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 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, -1, -1, 341, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 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, 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, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 324, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 5, 6, 7,
- 8, 9, -1, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
- -1, 399, 400, 401, 402, 403, 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, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 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, -1, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, -1, -1, 356, 357,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 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, 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, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 375, -1, -1,
- -1, 379, 380, -1, -1, -1, -1, -1, 386, 387,
- 388, 389, 5, 6, 7, 8, 9, -1, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, 314, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 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,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 340, 341, 342,
- 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
- 353, -1, -1, 356, 357, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 393, 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, 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, -1, -1, 295, 296, -1, 383,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 375, -1, -1, 378, -1, -1, -1, -1,
- -1, -1, -1, 386, 387, 388, 389, 5, 6, 7,
- 8, 9, -1, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, -1, 397, -1, 314, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
+ 414, 415, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
+ 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
+ -1, 445, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 456, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
+ -1, 475, -1, -1, 393, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 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, -1, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, -1, -1, 356, 357,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 375, -1, -1,
- -1, 379, -1, -1, -1, -1, -1, -1, 386, 387,
- 388, 389, 5, 6, 7, 8, 9, -1, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 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,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 340, 341, 342,
- 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
- 353, -1, -1, 356, 357, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 375, -1, -1, 378, -1, -1, -1, -1,
- -1, -1, -1, 386, 387, 388, 389, 5, 6, 7,
- 8, 9, -1, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 542, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 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, -1, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, -1, -1, 356, 357,
+ -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
-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, 385, 386, 387,
- 388, 389, 5, 6, 7, 8, 9, -1, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 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,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 340, 341, 342,
- 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
- 353, -1, -1, 356, 357, -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, 386, 387, 388, 389, 5, 6, 7,
- 8, 9, -1, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 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, -1, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, -1, -1, 356, 357,
-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, 386, 387,
- 388, 389, 5, 6, 7, 8, 9, -1, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 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,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, -1, 341
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 673
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -3272,147 +3283,148 @@ static const yytype_uint16 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 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, 341, 385, 399, 400,
- 401, 402, 403, 404, 439, 440, 443, 444, 445, 446,
- 450, 451, 452, 453, 454, 455, 458, 459, 460, 461,
- 462, 464, 469, 470, 471, 511, 512, 513, 375, 375,
- 340, 379, 470, 340, 385, 385, 514, 376, 382, 447,
- 448, 449, 459, 464, 382, 385, 340, 340, 385, 460,
- 464, 393, 466, 467, 0, 512, 340, 463, 81, 340,
- 456, 457, 379, 473, 464, 377, 385, 465, 379, 490,
- 448, 447, 449, 340, 340, 375, 384, 465, 379, 382,
- 385, 442, 340, 342, 343, 344, 345, 346, 347, 348,
- 349, 350, 351, 352, 353, 356, 357, 375, 386, 387,
- 388, 389, 409, 410, 411, 413, 414, 415, 416, 417,
- 418, 419, 420, 421, 462, 464, 468, 465, 376, 382,
- 384, 376, 382, 472, 459, 464, 474, 475, 385, 378,
- 420, 422, 423, 424, 425, 426, 427, 428, 429, 430,
- 431, 432, 433, 377, 385, 22, 23, 24, 26, 27,
- 28, 29, 30, 31, 32, 339, 377, 379, 380, 385,
- 420, 433, 435, 437, 439, 443, 462, 464, 480, 481,
- 482, 483, 491, 492, 493, 494, 497, 498, 501, 502,
- 503, 510, 515, 465, 384, 465, 379, 435, 478, 384,
- 441, 340, 382, 385, 420, 420, 437, 356, 357, 377,
- 381, 376, 376, 382, 338, 435, 375, 420, 382, 394,
- 340, 433, 438, 457, 474, 464, 340, 476, 477, 380,
- 475, 390, 391, 392, 387, 389, 354, 355, 358, 359,
- 393, 394, 360, 361, 397, 396, 395, 362, 364, 363,
- 398, 378, 378, 433, 385, 385, 505, 375, 375, 385,
- 385, 437, 375, 437, 383, 375, 377, 380, 484, 365,
- 366, 367, 368, 369, 370, 371, 372, 373, 374, 384,
- 436, 382, 385, 380, 481, 494, 498, 503, 478, 384,
- 478, 479, 478, 474, 340, 376, 412, 437, 340, 435,
- 420, 380, 476, 465, 382, 385, 420, 420, 420, 422,
- 422, 423, 423, 424, 424, 424, 424, 425, 425, 426,
- 427, 428, 429, 430, 431, 434, 378, 481, 506, 437,
- 385, 437, 383, 504, 340, 516, 517, 491, 435, 435,
- 478, 380, 382, 380, 378, 385, 477, 437, 339, 480,
- 492, 507, 376, 376, 437, 452, 459, 496, 375, 378,
- 382, 485, 380, 478, 383, 375, 496, 508, 509, 487,
- 488, 489, 495, 499, 340, 376, 438, 378, 517, 380,
- 435, 437, 385, 376, 25, 483, 482, 379, 384, 482,
- 486, 490, 376, 376, 437, 486, 487, 491, 500, 478,
- 385, 380
+ 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, 324, 338, 339, 340, 341, 342, 351, 352, 353,
+ 354, 355, 356, 357, 370, 371, 372, 373, 374, 375,
+ 384, 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, 442, 443, 446, 447,
+ 448, 449, 453, 454, 455, 456, 457, 458, 461, 462,
+ 463, 464, 465, 467, 472, 473, 474, 515, 516, 517,
+ 473, 318, 350, 314, 314, 324, 350, 324, 518, 315,
+ 321, 450, 451, 452, 462, 467, 321, 324, 350, 324,
+ 350, 463, 467, 332, 469, 470, 0, 516, 467, 476,
+ 318, 350, 371, 459, 460, 350, 466, 316, 324, 468,
+ 318, 494, 451, 450, 452, 350, 350, 314, 323, 468,
+ 318, 321, 324, 445, 295, 296, 314, 325, 326, 327,
+ 328, 346, 347, 348, 349, 350, 376, 377, 378, 379,
+ 380, 381, 382, 383, 412, 413, 414, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 465, 467, 471, 468,
+ 324, 462, 467, 477, 478, 475, 323, 315, 321, 315,
+ 321, 317, 423, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 316, 324, 316, 318, 319,
+ 324, 358, 359, 360, 361, 363, 364, 365, 366, 367,
+ 368, 369, 385, 423, 436, 438, 440, 442, 446, 465,
+ 467, 483, 484, 485, 486, 487, 495, 496, 497, 498,
+ 501, 502, 505, 506, 507, 514, 519, 468, 323, 468,
+ 318, 438, 481, 323, 444, 350, 321, 324, 423, 423,
+ 440, 295, 296, 316, 320, 315, 315, 321, 357, 438,
+ 314, 423, 321, 333, 467, 350, 479, 480, 319, 478,
+ 477, 436, 441, 460, 350, 329, 330, 331, 326, 328,
+ 293, 294, 297, 298, 332, 333, 299, 300, 336, 335,
+ 334, 301, 303, 302, 337, 317, 317, 436, 316, 319,
+ 488, 314, 324, 324, 509, 314, 314, 324, 324, 440,
+ 314, 440, 322, 324, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 323, 439, 321, 324, 319, 484,
+ 498, 502, 507, 481, 323, 481, 482, 481, 477, 350,
+ 315, 415, 440, 350, 438, 423, 479, 468, 321, 324,
+ 319, 423, 423, 423, 425, 425, 426, 426, 427, 427,
+ 427, 427, 428, 428, 429, 430, 431, 432, 433, 434,
+ 437, 317, 350, 520, 521, 495, 508, 484, 510, 440,
+ 324, 440, 322, 438, 438, 481, 319, 321, 319, 317,
+ 324, 480, 440, 314, 317, 321, 489, 440, 455, 462,
+ 500, 358, 483, 496, 511, 315, 315, 319, 481, 322,
+ 441, 317, 521, 319, 350, 315, 314, 500, 512, 513,
+ 491, 492, 493, 499, 503, 438, 315, 323, 485, 490,
+ 494, 440, 324, 315, 362, 487, 485, 318, 481, 315,
+ 440, 490, 491, 495, 504, 324, 319
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 408, 409, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 411, 411, 411,
- 411, 411, 411, 412, 413, 414, 415, 415, 416, 416,
- 417, 417, 418, 419, 419, 419, 420, 420, 420, 420,
- 421, 421, 421, 421, 422, 422, 422, 422, 423, 423,
- 423, 424, 424, 424, 425, 425, 425, 425, 425, 426,
- 426, 426, 427, 427, 428, 428, 429, 429, 430, 430,
- 431, 431, 432, 432, 433, 434, 433, 435, 435, 436,
- 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
- 437, 437, 438, 439, 439, 439, 439, 439, 439, 439,
- 439, 439, 441, 440, 442, 442, 443, 444, 444, 445,
- 445, 446, 447, 447, 448, 448, 448, 448, 449, 450,
- 450, 450, 450, 450, 451, 451, 451, 451, 451, 452,
- 452, 453, 454, 454, 454, 454, 454, 454, 454, 454,
- 455, 456, 456, 457, 457, 457, 458, 459, 459, 460,
- 460, 460, 460, 460, 460, 460, 461, 461, 461, 461,
- 461, 461, 461, 461, 461, 461, 461, 461, 461, 461,
- 461, 461, 461, 461, 461, 461, 461, 461, 461, 461,
- 461, 461, 461, 461, 461, 462, 463, 463, 464, 464,
- 465, 465, 465, 465, 466, 466, 467, 468, 468, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 470, 470, 470,
- 472, 471, 473, 471, 474, 474, 475, 475, 476, 476,
- 477, 477, 478, 478, 478, 479, 479, 480, 481, 481,
- 482, 482, 482, 482, 482, 482, 482, 483, 484, 485,
- 483, 486, 486, 488, 487, 489, 487, 490, 490, 491,
- 491, 492, 492, 493, 493, 494, 495, 495, 496, 496,
- 497, 497, 499, 498, 500, 500, 501, 501, 502, 502,
- 504, 503, 505, 503, 506, 503, 507, 507, 508, 508,
- 509, 509, 510, 510, 510, 510, 510, 511, 511, 512,
- 512, 512, 514, 513, 515, 516, 516, 517, 517
+ 0, 411, 412, 413, 413, 413, 413, 413, 413, 413,
+ 413, 413, 413, 413, 413, 413, 413, 414, 414, 414,
+ 414, 414, 414, 415, 416, 417, 418, 418, 419, 419,
+ 420, 420, 421, 422, 422, 422, 423, 423, 423, 423,
+ 424, 424, 424, 424, 425, 425, 425, 425, 426, 426,
+ 426, 427, 427, 427, 428, 428, 428, 428, 428, 429,
+ 429, 429, 430, 430, 431, 431, 432, 432, 433, 433,
+ 434, 434, 435, 435, 436, 437, 436, 438, 438, 439,
+ 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
+ 440, 440, 441, 442, 442, 442, 442, 442, 442, 442,
+ 442, 442, 444, 443, 445, 445, 446, 447, 447, 448,
+ 448, 449, 450, 450, 451, 451, 451, 451, 452, 453,
+ 453, 453, 453, 453, 454, 454, 454, 454, 454, 455,
+ 455, 456, 457, 457, 457, 457, 457, 457, 457, 457,
+ 458, 459, 459, 460, 460, 460, 461, 462, 462, 463,
+ 463, 463, 463, 463, 463, 463, 464, 464, 464, 464,
+ 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
+ 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
+ 464, 464, 464, 464, 464, 465, 466, 466, 467, 467,
+ 468, 468, 468, 468, 469, 469, 470, 471, 471, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 473,
+ 473, 473, 475, 474, 476, 474, 477, 477, 478, 478,
+ 479, 479, 480, 480, 481, 481, 481, 482, 482, 483,
+ 484, 484, 485, 485, 485, 485, 485, 485, 485, 485,
+ 486, 487, 488, 489, 487, 490, 490, 492, 491, 493,
+ 491, 494, 494, 495, 495, 496, 496, 497, 497, 498,
+ 499, 499, 500, 500, 501, 501, 503, 502, 504, 504,
+ 505, 505, 506, 506, 508, 507, 509, 507, 510, 507,
+ 511, 511, 512, 512, 513, 513, 514, 514, 514, 514,
+ 514, 515, 515, 516, 516, 516, 518, 517, 519, 520,
+ 520, 521, 521
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 1, 4, 1,
+ 0, 2, 1, 1, 3, 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,
@@ -3460,15 +3472,16 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 1, 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, 1, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 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, 1, 2, 1,
- 1, 1, 0, 3, 5, 1, 3, 1, 4
+ 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
+ 1, 3, 1, 2, 1, 3, 4, 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, 1, 2, 1, 1, 1, 0, 3, 5, 1,
+ 3, 1, 4
};
@@ -4151,250 +4164,252 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 302 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 352 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string);
}
-#line 4159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4172 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 3:
-#line 308 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 358 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 4:
-#line 311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 361 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
+ if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
+ (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
-#line 4176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 5:
-#line 315 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 366 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
}
-#line 4185 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 6:
-#line 319 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 369 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4193 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 7:
-#line 322 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 372 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4202 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4215 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 8:
-#line 326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 376 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
}
-#line 4211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4223 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 9:
-#line 330 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 380 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ 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 4220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 10:
-#line 334 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 384 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ 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 4229 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 11:
-#line 338 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ 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 4238 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 12:
-#line 342 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
+ 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 4246 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 13:
-#line 345 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 396 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
- (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
+ 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 4255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 14:
-#line 349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 400 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ 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 4264 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 15:
-#line 353 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
+ 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 4272 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 16:
-#line 356 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 408 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
- if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
- (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
+ 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 4282 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4295 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 17:
-#line 364 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 416 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4290 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 18:
-#line 367 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 419 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode));
}
-#line 4298 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 19:
-#line 370 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4319 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 20:
-#line 373 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 425 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string);
}
-#line 4314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 21:
-#line 376 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 428 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 22:
-#line 381 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 433 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4334 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4347 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 23:
-#line 389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 441 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 24:
-#line 396 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode);
delete (yyvsp[0].interm).function;
}
-#line 4352 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 25:
-#line 403 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 455 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4373 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 26:
-#line 409 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 461 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4382 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 27:
-#line 413 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 28:
-#line 420 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 29:
-#line 423 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 475 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 30:
-#line 429 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 481 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4402,11 +4417,11 @@ yyreduce:
(yyval.interm).function = (yyvsp[-1].interm).function;
(yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
}
-#line 4406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 31:
-#line 436 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 488 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4414,29 +4429,29 @@ yyreduce:
(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 4418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 32:
-#line 446 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 33:
-#line 454 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 506 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 34:
-#line 459 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 511 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// Should be a method or subroutine call, but we haven't recognized the arguments yet.
@@ -4464,50 +4479,50 @@ yyreduce:
(yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull);
}
}
-#line 4468 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4481 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 35:
-#line 486 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 539 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4491 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 36:
-#line 494 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4502 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 37:
-#line 500 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 38:
-#line 504 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 39:
-#line 508 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm).op != EOpNull) {
char errorOp[2] = {0, 0};
@@ -4524,179 +4539,179 @@ yyreduce:
(yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
}
-#line 4528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 40:
-#line 528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 582 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; }
-#line 4534 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 41:
-#line 529 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 583 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; }
-#line 4540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 42:
-#line 530 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 584 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; }
-#line 4546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 43:
-#line 531 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot;
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); }
-#line 4553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 44:
-#line 537 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 591 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 45:
-#line 538 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 592 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 46:
-#line 543 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 597 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 47:
-#line 548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 48:
-#line 557 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 49:
-#line 558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 50:
-#line 563 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 51:
-#line 571 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 625 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4622 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4635 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 52:
-#line 572 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 626 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4633 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 53:
-#line 578 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 632 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4644 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 54:
-#line 587 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 641 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 55:
-#line 588 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 56:
-#line 593 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 647 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 57:
-#line 598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 58:
-#line 603 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 657 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 59:
-#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 665 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 60:
-#line 612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 666 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "==");
@@ -4706,11 +4721,11 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 61:
-#line 621 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!=");
@@ -4720,124 +4735,124 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4724 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 62:
-#line 633 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 687 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4743 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 63:
-#line 634 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4754 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 64:
-#line 643 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 65:
-#line 644 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 66:
-#line 653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4777 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 67:
-#line 654 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 4775 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 68:
-#line 663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4794 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 69:
-#line 664 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4791 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4804 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 70:
-#line 672 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 726 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 71:
-#line 673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 727 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4807 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 72:
-#line 681 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 735 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 73:
-#line 682 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 4823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 74:
-#line 690 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 744 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 75:
-#line 691 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.controlFlowNestingLevel;
}
-#line 4837 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 76:
-#line 694 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.controlFlowNestingLevel;
parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode));
@@ -4850,17 +4865,17 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 4854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4867 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 77:
-#line 709 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4873 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 78:
-#line 710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 764 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment");
parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
@@ -4874,119 +4889,119 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
}
-#line 4878 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 79:
-#line 726 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 780 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAssign;
}
-#line 4887 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 80:
-#line 730 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 784 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpMulAssign;
}
-#line 4896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4909 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 81:
-#line 734 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpDivAssign;
}
-#line 4905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 82:
-#line 738 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 792 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%=");
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpModAssign;
}
-#line 4915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 83:
-#line 743 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 797 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAddAssign;
}
-#line 4924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 84:
-#line 747 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 801 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpSubAssign;
}
-#line 4933 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 85:
-#line 751 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 805 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign;
}
-#line 4942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 86:
-#line 755 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 809 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign;
}
-#line 4951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4964 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 87:
-#line 759 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign;
}
-#line 4960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 88:
-#line 763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 817 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign;
}
-#line 4969 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 89:
-#line 767 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 821 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign;
}
-#line 4978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 90:
-#line 774 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 828 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 91:
-#line 777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 831 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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);
@@ -4995,117 +5010,116 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 4999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 92:
-#line 788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), "");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 5008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 93:
-#line 795 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 849 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 94:
-#line 800 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 854 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 95:
-#line 805 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5053 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 96:
-#line 813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 866 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList);
(yyval.interm.intermNode) = 0;
}
-#line 5050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 97:
-#line 817 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 870 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string);
(yyval.interm.intermNode) = 0;
}
-#line 5059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 98:
-#line 821 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 874 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes);
(yyval.interm.intermNode) = 0;
}
-#line 5068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 99:
-#line 825 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 878 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5078 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 100:
-#line 830 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 883 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5088 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 101:
-#line 835 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 888 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5099 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 102:
-#line 844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); }
-#line 5105 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5117 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 103:
-#line 844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.structNestingLevel;
parseContext.blockName = (yyvsp[-4].lex).string;
@@ -5115,54 +5129,54 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-5].interm.type).loc;
(yyval.interm).typeList = (yyvsp[-1].interm.typeList);
}
-#line 5119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5131 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 104:
-#line 855 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 908 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.identifierList) = new TIdentifierList;
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5128 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 105:
-#line 859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 912 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList);
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5137 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 106:
-#line 866 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 919 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).function = (yyvsp[-1].interm.function);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 5146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 107:
-#line 873 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 926 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5154 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 108:
-#line 876 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 929 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 109:
-#line 883 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 936 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Add the parameter
(yyval.interm.function) = (yyvsp[-1].interm.function);
@@ -5171,11 +5185,11 @@ yyreduce:
else
delete (yyvsp[0].interm).param.type;
}
-#line 5175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5187 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 110:
-#line 891 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// Only first parameter of one-parameter functions can be void
@@ -5193,11 +5207,11 @@ yyreduce:
(yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
}
}
-#line 5197 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 111:
-#line 911 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 964 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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",
@@ -5217,11 +5231,11 @@ yyreduce:
function = new TFunction((yyvsp[-1].lex).string, type);
(yyval.interm.function) = function;
}
-#line 5221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 112:
-#line 934 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 987 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5237,11 +5251,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).param = param;
}
-#line 5241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 113:
-#line 949 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1002 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5261,11 +5275,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).param = param;
}
-#line 5265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 114:
-#line 974 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1027 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5277,11 +5291,11 @@ yyreduce:
parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
}
-#line 5281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 115:
-#line 985 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1038 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5289,11 +5303,11 @@ yyreduce:
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());
}
-#line 5293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5305 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 116:
-#line 995 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1048 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5304,11 +5318,11 @@ yyreduce:
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 5308 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 117:
-#line 1005 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5316,118 +5330,120 @@ yyreduce:
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());
}
-#line 5320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5332 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 118:
-#line 1015 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1068 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 119:
-#line 1024 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 5339 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 120:
-#line 1027 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1080 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-2].interm);
parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type);
}
-#line 5348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 121:
-#line 1031 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1084 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-3].interm);
parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes);
}
-#line 5357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 122:
-#line 1035 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5367 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5379 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 123:
-#line 1040 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1093 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5377 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 124:
-#line 1048 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1101 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[0].interm.type);
(yyval.interm).intermNode = 0;
+
parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type);
+
}
-#line 5387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 125:
-#line 1053 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1108 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5397 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 126:
-#line 1058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1113 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 127:
-#line 1063 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 128:
-#line 1068 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5427 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 129:
-#line 1077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1132 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
@@ -5436,14 +5452,13 @@ yyreduce:
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);
}
-#line 5443 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 130:
-#line 1088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1142 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type));
@@ -5468,22 +5483,22 @@ yyreduce:
(parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn)))
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5472 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 131:
-#line 1115 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1169 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5483 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 132:
-#line 1124 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1178 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "smooth");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth");
@@ -5491,11 +5506,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 133:
-#line 1131 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1185 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "flat");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat");
@@ -5503,58 +5518,49 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.flat = true;
}
-#line 5507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 134:
-#line 1138 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective");
-#ifdef NV_EXTENSIONS
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
-#else
- parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective");
-#endif
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 5523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5532 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 135:
-#line 1149 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1200 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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;
-#endif
}
-#line 5537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5544 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 136:
-#line 1158 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1207 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
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;
-#endif
}
-#line 5552 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5557 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 137:
-#line 1168 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1215 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
// 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 | EShLangMeshNVMask), "perprimitiveNV");
@@ -5563,114 +5569,109 @@ yyreduce:
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;
-#endif
}
-#line 5569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 138:
-#line 1180 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1225 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
// 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, EShLangMeshNV, "perviewNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perViewNV = true;
-#endif
}
-#line 5583 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5584 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 139:
-#line 1189 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
// 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)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perTaskNV = true;
-#endif
}
-#line 5597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 140:
-#line 1201 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
}
-#line 5605 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5604 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 141:
-#line 1207 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1249 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 142:
-#line 1210 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1252 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5622 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 143:
-#line 1217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1259 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string);
}
-#line 5632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5631 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 144:
-#line 1221 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1263 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 145:
-#line 1225 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // 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 5651 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 146:
-#line 1233 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1276 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 5662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 147:
-#line 1242 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1286 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 148:
-#line 1245 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1289 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
if ((yyval.interm.type).basicType == EbtVoid)
@@ -5679,446 +5680,432 @@ yyreduce:
(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 5683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 149:
-#line 1256 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1300 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 150:
-#line 1259 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1303 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 151:
-#line 1262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1306 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision);
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5708 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 152:
-#line 1266 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1310 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 153:
-#line 1270 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1314 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 154:
-#line 1274 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1319 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5735 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5734 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 155:
-#line 1278 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1323 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5743 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 156:
-#line 1284 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1330 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5752 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 157:
-#line 1288 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1334 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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");
-
+ parseContext.globalCheck((yyvsp[0].lex).loc, "inout");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqVaryingIn;
+ (yyval.interm.type).qualifier.storage = EvqInOut;
}
-#line 5769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 158:
-#line 1300 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1339 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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");
-
+ parseContext.globalCheck((yyvsp[0].lex).loc, "in");
(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;
+ // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
+ (yyval.interm.type).qualifier.storage = EvqIn;
}
-#line 5788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 159:
-#line 1314 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1345 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "inout");
+ parseContext.globalCheck((yyvsp[0].lex).loc, "out");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqInOut;
+ // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
+ (yyval.interm.type).qualifier.storage = EvqOut;
}
-#line 5798 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 160:
-#line 1319 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1351 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "in");
+ 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);
- // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
- (yyval.interm.type).qualifier.storage = EvqIn;
+ (yyval.interm.type).qualifier.centroid = true;
}
-#line 5809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 161:
-#line 1325 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1358 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "out");
+ parseContext.globalCheck((yyvsp[0].lex).loc, "uniform");
(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;
+ (yyval.interm.type).qualifier.storage = EvqUniform;
}
-#line 5820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 162:
-#line 1331 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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");
+ 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 | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.centroid = true;
+ (yyval.interm.type).qualifier.storage = EvqShared;
}
-#line 5832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 163:
-#line 1338 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1371 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "patch");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
+ parseContext.globalCheck((yyvsp[0].lex).loc, "buffer");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.patch = true;
+ (yyval.interm.type).qualifier.storage = EvqBuffer;
}
-#line 5843 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5828 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 164:
-#line 1344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1377 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "sample");
+ 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.sample = true;
+ (yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 5853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5845 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 165:
-#line 1349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "uniform");
+ 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);
- (yyval.interm.type).qualifier.storage = EvqUniform;
+ if (parseContext.language == EShLangVertex)
+ (yyval.interm.type).qualifier.storage = EvqVaryingOut;
+ else
+ (yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 5863 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 166:
-#line 1354 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1403 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.globalCheck((yyvsp[0].lex).loc, "buffer");
+ 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.storage = EvqBuffer;
+ (yyval.interm.type).qualifier.patch = true;
}
-#line 5873 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 167:
-#line 1359 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1409 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "sample");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.sample = true;
+ }
+#line 5885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 168:
+#line 1414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
| EShLangAnyHitNVMask), "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 = EvqHitAttrNV;
-#endif
}
-#line 5888 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5898 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 168:
-#line 1369 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 169:
+#line 1422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "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 = EvqPayloadNV;
-#endif
}
-#line 5903 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 169:
-#line 1379 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 170:
+#line 1430 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitNVMask |
EShLangAnyHitNVMask | EShLangMissNVMask), "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 = EvqPayloadInNV;
-#endif
}
-#line 5918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 170:
-#line 1389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 171:
+#line 1438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenNVMask |
EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "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 = EvqCallableDataNV;
-#endif
}
-#line 5933 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 171:
-#line 1399 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 172:
+#line 1446 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableNVMask), "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 = EvqCallableDataInNV;
-#endif
- }
-#line 5947 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
- break;
-
- case 172:
-#line 1408 "MachineIndependent/glslang.y" /* yacc.c:1646 */
- {
- 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");
-#ifdef NV_EXTENSIONS
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
-#else
- parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared");
-#endif
- (yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqShared;
}
-#line 5964 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5949 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 173:
-#line 1420 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1453 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.coherent = true;
}
-#line 5973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 174:
-#line 1424 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1457 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5983 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 175:
-#line 1429 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1462 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 5993 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 176:
-#line 1434 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1467 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 6003 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5988 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 177:
-#line 1439 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 6013 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5998 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 178:
-#line 1444 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 6023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 179:
-#line 1449 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.volatil = true;
}
-#line 6032 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 180:
-#line 1453 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1486 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.restrict = true;
}
-#line 6041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 181:
-#line 1457 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1490 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.readonly = true;
}
-#line 6050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6035 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 182:
-#line 1461 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1494 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.writeonly = true;
}
-#line 6059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6044 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 183:
-#line 1465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 6070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 184:
-#line 1471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1504 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 6081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 185:
-#line 1480 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1515 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.nonUniform = true;
}
-#line 6090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 186:
-#line 1487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1522 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// TODO
}
-#line 6098 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 187:
-#line 1490 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1525 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// 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 6108 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 188:
-#line 1498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1534 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
}
-#line 6118 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 189:
-#line 1503 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1539 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes);
(yyval.interm.type) = (yyvsp[-2].interm.type);
@@ -6126,21 +6113,21 @@ yyreduce:
(yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters);
(yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
}
-#line 6130 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6115 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 190:
-#line 1513 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1549 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6125 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 191:
-#line 1518 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[-2].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
@@ -6149,20 +6136,20 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6153 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6138 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 192:
-#line 1526 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-2].interm);
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 193:
-#line 1530 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1566 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-3].interm);
@@ -6170,35 +6157,35 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 194:
-#line 1540 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters);
}
-#line 6182 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 195:
-#line 1543 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = 0;
}
-#line 6190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 196:
-#line 1549 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters);
}
-#line 6198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6183 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 197:
-#line 1555 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1591 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = new TArraySizes;
@@ -6206,11 +6193,11 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 198:
-#line 1562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters);
@@ -6218,1985 +6205,1974 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6207 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 199:
-#line 1572 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1608 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtVoid;
}
-#line 6231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 200:
-#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
}
-#line 6240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 201:
-#line 1580 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1616 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).basicType = EbtInt;
}
-#line 6250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 202:
-#line 1585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1620 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel());
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtFloat16;
+ (yyval.interm.type).basicType = EbtUint;
}
-#line 6260 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 203:
-#line 1590 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1625 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtBool;
}
-#line 6270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 204:
-#line 1595 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1629 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(2);
}
-#line 6280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 205:
-#line 1600 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1634 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(3);
}
-#line 6289 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6273 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 206:
-#line 1604 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1639 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(4);
}
-#line 6299 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 207:
-#line 1609 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1644 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(2);
}
-#line 6309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 208:
-#line 1614 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1649 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(3);
}
-#line 6319 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 209:
-#line 1619 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1654 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(4);
}
-#line 6329 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 210:
-#line 1624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1659 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).setVector(2);
}
-#line 6339 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6323 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 211:
-#line 1629 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1664 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).setVector(3);
}
-#line 6349 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 212:
-#line 1634 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1669 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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;
+ (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).setVector(4);
}
-#line 6359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 213:
-#line 1639 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1674 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtInt64;
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(2);
}
-#line 6369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6354 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 214:
-#line 1644 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1680 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(3);
}
-#line 6379 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 215:
-#line 1649 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1686 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(4);
}
-#line 6388 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 216:
-#line 1653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1692 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
- (yyval.interm.type).setVector(2);
+ (yyval.interm.type).setMatrix(2, 2);
}
-#line 6398 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 217:
-#line 1658 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
- (yyval.interm.type).setVector(3);
+ (yyval.interm.type).setMatrix(3, 3);
}
-#line 6408 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 218:
-#line 1663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1702 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
- (yyval.interm.type).setVector(4);
+ (yyval.interm.type).setMatrix(4, 4);
}
-#line 6418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 219:
-#line 1668 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 2);
}
-#line 6429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 220:
-#line 1674 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1712 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 3);
}
-#line 6440 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 221:
-#line 1680 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 4);
}
-#line 6451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 222:
-#line 1686 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1722 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 2);
}
-#line 6462 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 223:
-#line 1692 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1727 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 3);
}
-#line 6473 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 224:
-#line 1698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1732 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 4);
}
-#line 6484 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 225:
-#line 1704 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1737 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).setMatrix(4, 2);
}
-#line 6495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 226:
-#line 1710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1742 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).setMatrix(4, 3);
}
-#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 227:
-#line 1716 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1747 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- 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);
+ (yyval.interm.type).setMatrix(4, 4);
}
-#line 6517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 228:
-#line 1722 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1753 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
+ 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;
- (yyval.interm.type).setVector(2);
}
-#line 6528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 229:
-#line 1728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1758 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtDouble;
- (yyval.interm.type).setVector(3);
+ (yyval.interm.type).basicType = EbtFloat16;
}
-#line 6539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 230:
-#line 1734 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtDouble;
- (yyval.interm.type).setVector(4);
+ (yyval.interm.type).basicType = EbtFloat;
}
-#line 6550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 231:
-#line 1740 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1768 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtBool;
- (yyval.interm.type).setVector(2);
+ (yyval.interm.type).basicType = EbtDouble;
}
-#line 6560 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 232:
-#line 1745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1773 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtBool;
- (yyval.interm.type).setVector(3);
+ (yyval.interm.type).basicType = EbtInt8;
}
-#line 6570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 233:
-#line 1750 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1778 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtBool;
- (yyval.interm.type).setVector(4);
+ (yyval.interm.type).basicType = EbtUint8;
}
-#line 6580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 234:
-#line 1755 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1783 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtInt;
- (yyval.interm.type).setVector(2);
+ (yyval.interm.type).basicType = EbtInt16;
}
-#line 6590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 235:
-#line 1760 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtInt;
- (yyval.interm.type).setVector(3);
+ (yyval.interm.type).basicType = EbtUint16;
}
-#line 6600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 236:
-#line 1765 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1793 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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;
- (yyval.interm.type).setVector(4);
}
-#line 6610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 237:
-#line 1770 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt8;
- (yyval.interm.type).setVector(2);
+ (yyval.interm.type).basicType = EbtUint;
}
-#line 6621 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 238:
-#line 1776 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1803 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt8;
- (yyval.interm.type).setVector(3);
+ (yyval.interm.type).basicType = EbtInt64;
}
-#line 6632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 239:
-#line 1782 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1808 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt8;
- (yyval.interm.type).setVector(4);
+ (yyval.interm.type).basicType = EbtUint64;
}
-#line 6643 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 240:
-#line 1788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt16;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 6654 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6627 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 241:
-#line 1794 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt16;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 6665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6638 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 242:
-#line 1800 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1825 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt16;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 6676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 243:
-#line 1806 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1831 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt;
+ (yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(2);
}
-#line 6687 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 244:
-#line 1812 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1837 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt;
+ (yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(3);
}
-#line 6698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6671 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 245:
-#line 1818 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1843 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt;
+ (yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(4);
}
-#line 6709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 246:
-#line 1824 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1849 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt64;
+ (yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(2);
}
-#line 6720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 247:
-#line 1830 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1855 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt64;
+ (yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(3);
}
-#line 6731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6704 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 248:
-#line 1836 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1861 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtInt64;
+ (yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(4);
}
-#line 6742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6715 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 249:
-#line 1842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1867 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 6753 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 250:
-#line 1848 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1873 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 6764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 251:
-#line 1854 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1879 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 6775 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6748 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 252:
-#line 1860 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1885 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint8;
+ (yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(2);
}
-#line 6786 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 253:
-#line 1866 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1891 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint8;
+ (yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(3);
}
-#line 6797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 254:
-#line 1872 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint8;
+ (yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(4);
}
-#line 6808 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 255:
-#line 1878 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1903 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint16;
+ (yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(2);
}
-#line 6819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 256:
-#line 1884 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1909 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint16;
+ (yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(3);
}
-#line 6830 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 257:
-#line 1890 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1915 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint16;
+ (yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(4);
}
-#line 6841 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6814 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 258:
-#line 1896 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1921 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(2);
}
-#line 6852 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6825 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 259:
-#line 1902 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1927 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(3);
}
-#line 6863 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 260:
-#line 1908 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1933 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint;
+ (yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(4);
}
-#line 6874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6847 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 261:
-#line 1914 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint64;
+ (yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(2);
}
-#line 6885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6858 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 262:
-#line 1920 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1945 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint64;
+ (yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(3);
}
-#line 6896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 263:
-#line 1926 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1951 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ 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 = EbtUint64;
+ (yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(4);
}
-#line 6907 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 264:
-#line 1932 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1957 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(2, 2);
+ (yyval.interm.type).basicType = EbtUint8;
+ (yyval.interm.type).setVector(2);
}
-#line 6917 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 265:
-#line 1937 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1963 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(3, 3);
+ (yyval.interm.type).basicType = EbtUint8;
+ (yyval.interm.type).setVector(3);
}
-#line 6927 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 266:
-#line 1942 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1969 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(4, 4);
+ (yyval.interm.type).basicType = EbtUint8;
+ (yyval.interm.type).setVector(4);
}
-#line 6937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 267:
-#line 1947 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1975 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(2, 2);
+ (yyval.interm.type).basicType = EbtUint16;
+ (yyval.interm.type).setVector(2);
}
-#line 6947 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 268:
-#line 1952 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1981 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(2, 3);
+ (yyval.interm.type).basicType = EbtUint16;
+ (yyval.interm.type).setVector(3);
}
-#line 6957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 269:
-#line 1957 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1987 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(2, 4);
+ (yyval.interm.type).basicType = EbtUint16;
+ (yyval.interm.type).setVector(4);
}
-#line 6967 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 270:
-#line 1962 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1993 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(3, 2);
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(2);
}
-#line 6977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 271:
-#line 1967 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1999 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(3, 3);
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(3);
}
-#line 6987 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 272:
-#line 1972 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2005 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(3, 4);
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(4);
}
-#line 6997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 273:
-#line 1977 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2011 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(4, 2);
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(2);
}
-#line 7007 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 274:
-#line 1982 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2017 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(4, 3);
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(3);
}
-#line 7017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 275:
-#line 1987 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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 = EbtFloat;
- (yyval.interm.type).setMatrix(4, 4);
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(4);
}
-#line 7027 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 276:
-#line 1992 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7038 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 277:
-#line 1998 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2035 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7049 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 278:
-#line 2004 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2041 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 279:
-#line 2010 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2047 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 280:
-#line 2016 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7082 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 281:
-#line 2022 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7078 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 282:
-#line 2028 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7104 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7089 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 283:
-#line 2034 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2071 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7115 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 284:
-#line 2040 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7126 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 285:
-#line 2046 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7137 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 286:
-#line 2052 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7148 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 287:
-#line 2058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2095 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ 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 7159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7144 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 288:
-#line 2064 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2101 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7170 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 289:
-#line 2070 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2107 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 290:
-#line 2076 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2113 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7192 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 291:
-#line 2082 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2119 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7203 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7188 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 292:
-#line 2088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2125 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7214 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 293:
-#line 2094 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2131 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 294:
-#line 2100 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2137 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7236 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 295:
-#line 2106 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2143 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7247 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 296:
-#line 2112 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2149 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7258 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 297:
-#line 2118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2155 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 298:
-#line 2124 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2161 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 299:
-#line 2130 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2167 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 300:
-#line 2136 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2173 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7302 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7287 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 301:
-#line 2142 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2179 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7298 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 302:
-#line 2148 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2185 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 303:
-#line 2154 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2191 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7335 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 304:
-#line 2160 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2197 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 305:
-#line 2166 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2203 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 306:
-#line 2172 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2209 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7368 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7353 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 307:
-#line 2178 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2215 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7379 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 308:
-#line 2184 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2221 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7390 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 309:
-#line 2190 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2227 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 310:
-#line 2196 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2233 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7412 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7397 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 311:
-#line 2202 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2239 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7423 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7408 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 312:
-#line 2208 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2245 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 313:
-#line 2214 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2251 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7445 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7430 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 314:
-#line 2220 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2257 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 315:
-#line 2226 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2263 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7452 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 316:
-#line 2232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2269 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 317:
-#line 2238 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2275 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 318:
-#line 2244 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2281 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 319:
-#line 2250 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2287 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 320:
-#line 2256 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2293 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7522 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 321:
-#line 2262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2299 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7518 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 322:
-#line 2268 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2305 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7544 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 323:
-#line 2274 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7555 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 324:
-#line 2280 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2317 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef NV_EXTENSIONS
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtAccStructNV;
-#endif
}
-#line 7566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 325:
-#line 2286 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2321 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 7576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 326:
-#line 2291 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D);
}
-#line 7586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 327:
-#line 2296 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2332 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
}
-#line 7596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 328:
-#line 2301 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd3D);
}
-#line 7606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 329:
-#line 2306 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2342 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube);
}
-#line 7616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 330:
-#line 2311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2347 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true);
}
-#line 7626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 331:
-#line 2316 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2352 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true);
}
-#line 7636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 332:
-#line 2321 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2357 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
}
-#line 7646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 333:
-#line 2326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2362 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true);
}
-#line 7656 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 334:
-#line 2331 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2368 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true);
}
-#line 7666 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 335:
-#line 2336 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2373 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
}
-#line 7676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 336:
-#line 2341 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2378 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true);
}
-#line 7686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 337:
-#line 2346 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2383 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 7696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 338:
-#line 2351 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 7706 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 339:
-#line 2356 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2393 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 340:
-#line 2364 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2399 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7732 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 341:
-#line 2372 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2405 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7745 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 342:
-#line 2380 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2411 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7733 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 343:
-#line 2388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2417 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7744 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 344:
-#line 2396 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2423 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7784 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7755 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 345:
-#line 2404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2429 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7766 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 346:
-#line 2412 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2435 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7777 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 347:
-#line 2420 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2441 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 348:
-#line 2428 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2447 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 349:
-#line 2436 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2453 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7849 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 350:
-#line 2444 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2459 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7821 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 351:
-#line 2452 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 7875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 352:
-#line 2460 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd1D);
}
-#line 7885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 353:
-#line 2465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D);
}
-#line 7895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7852 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 354:
-#line 2470 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd3D);
}
-#line 7905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 355:
-#line 2475 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdCube);
}
-#line 7915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 356:
-#line 2480 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2492 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
}
-#line 7925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7882 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 357:
-#line 2485 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2497 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D);
}
-#line 7935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 358:
-#line 2490 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2502 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
+ (yyval.interm.type).sampler.set(EbtUint, Esd3D);
}
-#line 7945 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 359:
-#line 2495 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2507 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, Esd1D);
+ (yyval.interm.type).sampler.set(EbtUint, EsdCube);
}
-#line 7955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7912 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 360:
-#line 2500 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2513 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, Esd2D);
+ (yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
}
-#line 7965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 361:
-#line 2505 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2518 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, Esd3D);
+ (yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
}
-#line 7975 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7932 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 362:
-#line 2510 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2523 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, EsdCube);
+ (yyval.interm.type).sampler.set(EbtUint, Esd1D);
}
-#line 7985 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 363:
-#line 2515 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 7995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 364:
-#line 2520 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2533 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
+ (yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
}
-#line 8005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 365:
-#line 2525 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2538 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true);
}
-#line 8015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 366:
-#line 2530 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2543 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtFloat, EsdRect);
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
}
-#line 8025 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 367:
-#line 2535 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
}
-#line 8035 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 368:
-#line 2540 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
}
-#line 8048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8002 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 369:
-#line 2548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2559 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
}
-#line 8061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 370:
-#line 2556 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2564 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtInt, EsdRect);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D);
}
-#line 8071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8022 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 371:
-#line 2561 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2569 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, EsdRect);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
}
-#line 8081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8032 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 372:
-#line 2566 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
}
-#line 8091 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8042 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 373:
-#line 2571 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
}
-#line 8104 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8052 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 374:
-#line 2579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2584 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D);
}
-#line 8114 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 375:
-#line 2584 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube);
}
-#line 8124 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 376:
-#line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2594 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true);
}
-#line 8134 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8082 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 377:
-#line 2594 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2599 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D);
}
-#line 8147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 378:
-#line 2602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2604 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D);
}
-#line 8157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8102 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 379:
-#line 2607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2609 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
}
-#line 8167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 380:
-#line 2612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2614 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
}
-#line 8177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 381:
-#line 2617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2619 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.setPureSampler(false);
}
-#line 8190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 382:
-#line 2625 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
+ (yyval.interm.type).sampler.setPureSampler(true);
}
-#line 8200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8142 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 383:
@@ -8204,9 +8180,9 @@ yyreduce:
{
(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);
+ (yyval.interm.type).sampler.set(EbtFloat, EsdRect);
}
-#line 8210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8152 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 384:
@@ -8214,1106 +8190,1085 @@ yyreduce:
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setPureSampler(false);
+ (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true);
}
-#line 8220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 385:
#line 2640 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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.setPureSampler(true);
+ (yyval.interm.type).sampler.set(EbtFloat16, EsdRect);
}
-#line 8230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 386:
-#line 2645 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2646 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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.setTexture(EbtFloat, Esd1D);
+ (yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true);
}
-#line 8240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8184 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 387:
-#line 2650 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtInt, EsdRect);
}
-#line 8253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8194 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 388:
-#line 2658 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2657 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
+ (yyval.interm.type).sampler.set(EbtUint, EsdRect);
}
-#line 8263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8204 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 389:
-#line 2663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
}
-#line 8276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8214 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 390:
-#line 2671 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2667 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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.setTexture(EbtFloat, Esd3D);
+ (yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer);
}
-#line 8286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 391:
-#line 2676 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
}
-#line 8299 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8235 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 392:
-#line 2684 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2678 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
+ (yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
}
-#line 8309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8245 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 393:
-#line 2689 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true);
}
-#line 8322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 394:
-#line 2697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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.setTexture(EbtFloat, Esd1D, true);
+ (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true);
}
-#line 8332 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8266 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 395:
-#line 2702 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2694 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true);
}
-#line 8345 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 396:
-#line 2710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2699 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true);
}
-#line 8355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 397:
-#line 2715 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2704 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true);
}
-#line 8368 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 398:
-#line 2723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2709 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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.setTexture(EbtFloat, EsdCube, true);
+ (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true);
}
-#line 8378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8307 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 399:
-#line 2728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2715 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
- 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);
-#endif
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true);
}
-#line 8391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 400:
-#line 2736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2720 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true);
}
-#line 8401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 401:
-#line 2741 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2725 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D);
}
-#line 8411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 402:
-#line 2746 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2730 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtInt, Esd3D);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D);
}
-#line 8421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 403:
-#line 2751 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtInt, EsdCube);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D);
}
-#line 8431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 404:
-#line 2756 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2742 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtInt, Esd1D, true);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D);
}
-#line 8441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 405:
-#line 2761 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtInt, Esd2D, true);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube);
}
-#line 8451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 406:
-#line 2766 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2754 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true);
}
-#line 8461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 407:
-#line 2771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2759 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtUint, Esd1D);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true);
}
-#line 8471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 408:
-#line 2776 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2765 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtUint, Esd2D);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true);
}
-#line 8481 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 409:
-#line 2781 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ 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(EbtUint, Esd3D);
+ (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true);
}
-#line 8491 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 410:
-#line 2786 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
}
-#line 8501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 411:
-#line 2791 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2782 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true);
}
-#line 8511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 412:
-#line 2796 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2787 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D);
}
-#line 8521 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8454 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 413:
-#line 2801 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2792 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
- (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
}
-#line 8531 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8464 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 414:
-#line 2806 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2797 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect);
}
-#line 8541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 415:
-#line 2811 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2802 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8554 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 416:
-#line 2819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2808 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdRect);
}
-#line 8564 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 417:
-#line 2824 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdRect);
}
-#line 8574 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 418:
-#line 2829 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2818 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer);
}
-#line 8584 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8515 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 419:
-#line 2834 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2823 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 420:
-#line 2842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2829 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer);
}
-#line 8607 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 421:
-#line 2847 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2834 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer);
}
-#line 8617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 422:
-#line 2852 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2839 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8627 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 423:
-#line 2857 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 424:
-#line 2865 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2850 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8577 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 425:
-#line 2870 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2855 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 426:
-#line 2875 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2860 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 427:
-#line 2880 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2865 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 428:
-#line 2888 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2871 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8618 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 429:
-#line 2893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2876 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 430:
-#line 2898 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2881 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd1D);
}
-#line 8713 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8638 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 431:
-#line 2903 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2886 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 432:
-#line 2911 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2892 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd1D);
}
-#line 8736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 433:
-#line 2916 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd1D);
}
-#line 8746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 434:
-#line 2921 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2902 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D);
}
-#line 8756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 435:
-#line 2926 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2907 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 436:
-#line 2934 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2913 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D);
}
-#line 8779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 437:
-#line 2939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2918 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D);
}
-#line 8789 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 438:
-#line 2944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd3D);
}
-#line 8799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 439:
-#line 2949 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2928 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8812 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 440:
-#line 2957 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2934 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd3D);
}
-#line 8822 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 441:
-#line 2962 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd3D);
}
-#line 8832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 442:
-#line 2967 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdRect);
}
-#line 8842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 443:
-#line 2972 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2949 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8855 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 444:
-#line 2980 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2955 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdRect);
}
-#line 8865 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8782 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 445:
-#line 2985 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2960 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdRect);
}
-#line 8875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 446:
-#line 2990 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2965 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdCube);
}
-#line 8885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 447:
-#line 2995 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2970 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8898 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 448:
-#line 3003 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2976 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdCube);
}
-#line 8908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 449:
-#line 3008 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2981 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdCube);
}
-#line 8918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 450:
-#line 3013 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2986 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer);
}
-#line 8928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8843 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 451:
-#line 3018 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2991 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 452:
-#line 3026 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 2997 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer);
}
-#line 8951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 453:
-#line 3031 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3002 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer);
}
-#line 8961 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 454:
-#line 3036 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3007 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8971 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 455:
-#line 3041 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3012 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 8984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 456:
-#line 3049 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3018 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 8994 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 457:
-#line 3054 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 458:
-#line 3059 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3028 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 459:
-#line 3064 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3033 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9027 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8936 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 460:
-#line 3072 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3039 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9037 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 461:
-#line 3077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3044 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9047 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 462:
-#line 3082 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3049 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9057 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 463:
-#line 3087 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3054 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 464:
-#line 3095 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3060 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8987 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 465:
-#line 3100 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 466:
-#line 3105 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3070 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9007 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 467:
-#line 3110 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3075 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9113 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 468:
-#line 3118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3081 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 469:
-#line 3123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3086 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9038 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 470:
-#line 3128 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3091 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9143 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 471:
-#line 3133 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3096 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 472:
-#line 3141 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3102 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9069 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 473:
-#line 3146 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3107 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9079 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 474:
-#line 3151 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3112 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // 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 9187 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 475:
-#line 3157 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // 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 9198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 476:
-#line 3163 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3124 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 477:
-#line 3169 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3130 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 478:
-#line 3175 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3136 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9135 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 479:
-#line 3184 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3143 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
-#ifdef AMD_EXTENSIONS
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);
-#endif
}
-#line 9248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 480:
-#line 3193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3150 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 481:
-#line 3199 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3156 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9169 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 482:
-#line 3205 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3162 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 483:
-#line 3211 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3168 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9292 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 484:
-#line 3217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3174 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fcoopmatCheck((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).coopmat = true;
}
-#line 9303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9202 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 485:
-#line 3223 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3180 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.intcoopmatCheck((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).coopmat = true;
+ }
+#line 9213 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 486:
+#line 3186 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.intcoopmatCheck((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).coopmat = true;
+ }
+#line 9224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 487:
+#line 3193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 486:
-#line 3228 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 488:
+#line 3198 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// This is for user defined type names. The lexical phase looked up the
@@ -9327,47 +9282,47 @@ yyreduce:
} else
parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), "");
}
-#line 9331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9252 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 487:
-#line 3244 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 489:
+#line 3214 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9341 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9262 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 488:
-#line 3249 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 490:
+#line 3219 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9272 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 489:
-#line 3254 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 491:
+#line 3224 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9282 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 490:
-#line 3262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 492:
+#line 3232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedStructCheck((yyvsp[-2].lex).loc); }
-#line 9367 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 491:
-#line 3262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 493:
+#line 3232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string);
parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure);
@@ -9379,17 +9334,17 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 9383 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 492:
-#line 3273 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 494:
+#line 3243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedStructCheck((yyvsp[-1].lex).loc); }
-#line 9389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9310 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 493:
-#line 3273 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 495:
+#line 3243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TType* structure = new TType((yyvsp[-1].interm.typeList), TString(""));
(yyval.interm.type).init((yyvsp[-4].lex).loc);
@@ -9397,19 +9352,19 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 9401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 494:
-#line 3283 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 496:
+#line 3253 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = (yyvsp[0].interm.typeList);
}
-#line 9409 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 495:
-#line 3286 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 497:
+#line 3256 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) {
@@ -9420,16 +9375,16 @@ yyreduce:
(yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]);
}
}
-#line 9424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9345 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 496:
-#line 3299 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 498:
+#line 3269 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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.profile == EEsProfile)
+ if (parseContext.isEsProfile())
parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
}
@@ -9447,16 +9402,16 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 9451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9372 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 497:
-#line 3321 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 499:
+#line 3291 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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.profile == EEsProfile)
+ if (parseContext.isEsProfile())
parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
}
@@ -9476,38 +9431,38 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 9480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 498:
-#line 3348 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 500:
+#line 3318 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = new TTypeList;
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 9489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 499:
-#line 3352 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 501:
+#line 3322 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 9497 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 500:
-#line 3358 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 502:
+#line 3328 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 9507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9428 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 501:
-#line 3363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 503:
+#line 3333 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes);
@@ -9516,219 +9471,235 @@ yyreduce:
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string);
(yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes);
}
-#line 9520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 502:
-#line 3374 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 504:
+#line 3344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 9528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 503:
-#line 3377 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 505:
+#line 3348 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 504:
-#line 3383 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 506:
+#line 3354 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 505:
-#line 3392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 507:
+#line 3365 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc());
}
-#line 9558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 506:
-#line 3395 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 508:
+#line 3368 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
}
-#line 9566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
- break;
-
- case 507:
-#line 3401 "MachineIndependent/glslang.y" /* yacc.c:1646 */
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
- break;
-
- case 508:
-#line 3405 "MachineIndependent/glslang.y" /* yacc.c:1646 */
- { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 509:
-#line 3406 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3375 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9584 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9493 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 510:
-#line 3412 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3379 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9499 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 511:
-#line 3413 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3380 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 512:
-#line 3414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3386 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 513:
-#line 3415 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3387 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 514:
-#line 3416 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 515:
-#line 3417 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 516:
-#line 3418 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3390 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9535 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 517:
-#line 3422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
- { (yyval.interm.intermNode) = 0; }
-#line 9632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 3391 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 9541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 518:
-#line 3423 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 3392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 9547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 519:
+#line 3394 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 9553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 520:
+#line 3400 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ 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 9563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 521:
+#line 3409 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = 0; }
+#line 9569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 522:
+#line 3410 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
}
-#line 9641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 519:
-#line 3427 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 523:
+#line 3414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
}
-#line 9650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 520:
-#line 3431 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 524:
+#line 3418 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate())
(yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode);
}
-#line 9660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 521:
-#line 3439 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 525:
+#line 3426 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9666 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 522:
-#line 3440 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 526:
+#line 3427 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9672 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 523:
-#line 3444 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 527:
+#line 3431 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.controlFlowNestingLevel;
}
-#line 9680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 524:
-#line 3447 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 528:
+#line 3434 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 525:
-#line 3451 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 529:
+#line 3438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 526:
-#line 3456 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 530:
+#line 3443 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9647 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 527:
-#line 3465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 531:
+#line 3452 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
}
-#line 9718 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9655 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 528:
-#line 3468 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 532:
+#line 3455 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 529:
-#line 3476 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 533:
+#line 3463 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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 ||
@@ -9737,11 +9708,11 @@ yyreduce:
(yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case
}
}
-#line 9741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 530:
-#line 3484 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 534:
+#line 3471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
(yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) {
@@ -9750,76 +9721,76 @@ yyreduce:
} else
(yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
}
-#line 9754 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 531:
-#line 3495 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 535:
+#line 3482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = 0; }
-#line 9760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 532:
-#line 3496 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 536:
+#line 3483 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
-#line 9766 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 533:
-#line 3500 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 537:
+#line 3487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 534:
-#line 3503 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 538:
+#line 3491 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 535:
-#line 3509 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 539:
+#line 3498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 9792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 536:
-#line 3516 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 540:
+#line 3505 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
}
-#line 9801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 537:
-#line 3520 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 541:
+#line 3509 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 9810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 538:
-#line 3528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 542:
+#line 3517 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode));
}
-#line 9819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 539:
-#line 3532 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 543:
+#line 3521 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type));
@@ -9830,28 +9801,28 @@ yyreduce:
else
(yyval.interm.intermTypedNode) = 0;
}
-#line 9834 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 540:
-#line 3545 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 544:
+#line 3534 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 541:
-#line 3548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 545:
+#line 3538 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9851 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 542:
-#line 3554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 546:
+#line 3545 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// start new switch sequence on the switch stack
++parseContext.controlFlowNestingLevel;
@@ -9860,11 +9831,11 @@ yyreduce:
parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
parseContext.symbolTable.push();
}
-#line 9864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 543:
-#line 3562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 547:
+#line 3553 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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();
@@ -9874,27 +9845,27 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9878 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 544:
-#line 3574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 548:
+#line 3565 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
}
-#line 9886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 545:
-#line 3577 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 549:
+#line 3568 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9894 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 546:
-#line 3583 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 550:
+#line 3574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -9907,11 +9878,11 @@ yyreduce:
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
}
}
-#line 9911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9848 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 547:
-#line 3595 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 551:
+#line 3586 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -9921,28 +9892,28 @@ yyreduce:
else
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc);
}
-#line 9925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 548:
-#line 3607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 552:
+#line 3598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9933 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 549:
-#line 3610 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 553:
+#line 3602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 550:
-#line 3616 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 554:
+#line 3609 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", "");
@@ -9951,11 +9922,11 @@ yyreduce:
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 551:
-#line 3624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 555:
+#line 3617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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);
@@ -9963,21 +9934,21 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9967 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 552:
-#line 3631 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 556:
+#line 3624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 553:
-#line 3636 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 557:
+#line 3629 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", "");
@@ -9989,22 +9960,22 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9993 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9930 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 554:
-#line 3647 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 558:
+#line 3640 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 10004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 555:
-#line 3653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 559:
+#line 3646 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
(yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc);
@@ -10017,81 +9988,81 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 10021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 556:
-#line 3668 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 560:
+#line 3661 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10029 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 557:
-#line 3671 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 561:
+#line 3664 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10037 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 558:
-#line 3677 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 562:
+#line 3670 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 10045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 559:
-#line 3680 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 563:
+#line 3673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = 0;
}
-#line 10053 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 560:
-#line 3686 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 564:
+#line 3679 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 10062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 561:
-#line 3690 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 565:
+#line 3683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
}
-#line 10071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 562:
-#line 3697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 566:
+#line 3690 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 10081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 563:
-#line 3702 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 567:
+#line 3695 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 10091 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 564:
-#line 3707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 568:
+#line 3700 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc);
if (parseContext.currentFunctionType->getBasicType() != EbtVoid)
@@ -10099,83 +10070,83 @@ yyreduce:
if (parseContext.inMain)
parseContext.postEntryPointReturn = true;
}
-#line 10103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 565:
-#line 3714 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 569:
+#line 3707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 566:
-#line 3717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 570:
+#line 3710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc);
}
-#line 10120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10057 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 567:
-#line 3726 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 571:
+#line 3719 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
}
-#line 10129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 568:
-#line 3730 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 572:
+#line 3723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 10140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 569:
-#line 3739 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 573:
+#line 3732 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10148 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10085 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 570:
-#line 3742 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 574:
+#line 3735 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 571:
-#line 3745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 575:
+#line 3739 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
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 10166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 572:
-#line 3753 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 576:
+#line 3748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(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);
}
-#line 10175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 573:
-#line 3757 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 577:
+#line 3752 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// May be best done as post process phase on intermediate code
if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
@@ -10191,52 +10162,52 @@ yyreduce:
(yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
(yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable);
}
-#line 10195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 574:
-#line 3775 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 578:
+#line 3771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = (yyvsp[-2].interm.attributes);
parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
}
-#line 10204 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 575:
-#line 3781 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 579:
+#line 3777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = (yyvsp[0].interm.attributes);
}
-#line 10212 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 576:
-#line 3784 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 580:
+#line 3780 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes));
}
-#line 10220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 577:
-#line 3789 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 581:
+#line 3785 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string);
}
-#line 10228 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10165 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 578:
-#line 3792 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 582:
+#line 3788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10236 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
-#line 10240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -10464,5 +10435,5 @@ yyreturn:
#endif
return yyresult;
}
-#line 3796 "MachineIndependent/glslang.y" /* yacc.c:1906 */
+#line 3793 "MachineIndependent/glslang.y" /* yacc.c:1906 */
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
index a467db644b..f4f4114730 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
@@ -45,271 +45,271 @@ extern int yydebug;
# define YYTOKENTYPE
enum yytokentype
{
- ATTRIBUTE = 258,
- VARYING = 259,
- FLOAT16_T = 260,
- FLOAT = 261,
- FLOAT32_T = 262,
- DOUBLE = 263,
- FLOAT64_T = 264,
- CONST = 265,
- BOOL = 266,
- INT = 267,
- UINT = 268,
- INT64_T = 269,
- UINT64_T = 270,
- INT32_T = 271,
- UINT32_T = 272,
- INT16_T = 273,
- UINT16_T = 274,
- INT8_T = 275,
- UINT8_T = 276,
- BREAK = 277,
- CONTINUE = 278,
- DO = 279,
- ELSE = 280,
- FOR = 281,
- IF = 282,
- DISCARD = 283,
- RETURN = 284,
- SWITCH = 285,
- CASE = 286,
- DEFAULT = 287,
- SUBROUTINE = 288,
- BVEC2 = 289,
- BVEC3 = 290,
- BVEC4 = 291,
- IVEC2 = 292,
- IVEC3 = 293,
- IVEC4 = 294,
- UVEC2 = 295,
- UVEC3 = 296,
- UVEC4 = 297,
- I64VEC2 = 298,
- I64VEC3 = 299,
- I64VEC4 = 300,
- U64VEC2 = 301,
- U64VEC3 = 302,
- U64VEC4 = 303,
- I32VEC2 = 304,
- I32VEC3 = 305,
- I32VEC4 = 306,
- U32VEC2 = 307,
- U32VEC3 = 308,
- U32VEC4 = 309,
- I16VEC2 = 310,
- I16VEC3 = 311,
- I16VEC4 = 312,
- U16VEC2 = 313,
- U16VEC3 = 314,
- U16VEC4 = 315,
- I8VEC2 = 316,
- I8VEC3 = 317,
- I8VEC4 = 318,
- U8VEC2 = 319,
- U8VEC3 = 320,
- U8VEC4 = 321,
- VEC2 = 322,
- VEC3 = 323,
- VEC4 = 324,
- MAT2 = 325,
- MAT3 = 326,
- MAT4 = 327,
- CENTROID = 328,
- IN = 329,
- OUT = 330,
- INOUT = 331,
- UNIFORM = 332,
- PATCH = 333,
- SAMPLE = 334,
- BUFFER = 335,
- SHARED = 336,
- NONUNIFORM = 337,
- PAYLOADNV = 338,
- PAYLOADINNV = 339,
- HITATTRNV = 340,
- CALLDATANV = 341,
- CALLDATAINNV = 342,
- COHERENT = 343,
- VOLATILE = 344,
- RESTRICT = 345,
- READONLY = 346,
- WRITEONLY = 347,
- DEVICECOHERENT = 348,
- QUEUEFAMILYCOHERENT = 349,
- WORKGROUPCOHERENT = 350,
- SUBGROUPCOHERENT = 351,
- NONPRIVATE = 352,
- DVEC2 = 353,
- DVEC3 = 354,
- DVEC4 = 355,
- DMAT2 = 356,
- DMAT3 = 357,
- DMAT4 = 358,
- F16VEC2 = 359,
- F16VEC3 = 360,
- F16VEC4 = 361,
- F16MAT2 = 362,
- F16MAT3 = 363,
- F16MAT4 = 364,
- F32VEC2 = 365,
- F32VEC3 = 366,
- F32VEC4 = 367,
- F32MAT2 = 368,
- F32MAT3 = 369,
- F32MAT4 = 370,
- F64VEC2 = 371,
- F64VEC3 = 372,
- F64VEC4 = 373,
- F64MAT2 = 374,
- F64MAT3 = 375,
- F64MAT4 = 376,
- NOPERSPECTIVE = 377,
- FLAT = 378,
- SMOOTH = 379,
- LAYOUT = 380,
- EXPLICITINTERPAMD = 381,
- PERVERTEXNV = 382,
- PERPRIMITIVENV = 383,
- PERVIEWNV = 384,
- PERTASKNV = 385,
- MAT2X2 = 386,
- MAT2X3 = 387,
- MAT2X4 = 388,
- MAT3X2 = 389,
- MAT3X3 = 390,
- MAT3X4 = 391,
- MAT4X2 = 392,
- MAT4X3 = 393,
- MAT4X4 = 394,
- DMAT2X2 = 395,
- DMAT2X3 = 396,
- DMAT2X4 = 397,
- DMAT3X2 = 398,
- DMAT3X3 = 399,
- DMAT3X4 = 400,
- DMAT4X2 = 401,
- DMAT4X3 = 402,
- DMAT4X4 = 403,
- F16MAT2X2 = 404,
- F16MAT2X3 = 405,
- F16MAT2X4 = 406,
- F16MAT3X2 = 407,
- F16MAT3X3 = 408,
- F16MAT3X4 = 409,
- F16MAT4X2 = 410,
- F16MAT4X3 = 411,
- F16MAT4X4 = 412,
- F32MAT2X2 = 413,
- F32MAT2X3 = 414,
- F32MAT2X4 = 415,
- F32MAT3X2 = 416,
- F32MAT3X3 = 417,
- F32MAT3X4 = 418,
- F32MAT4X2 = 419,
- F32MAT4X3 = 420,
- F32MAT4X4 = 421,
- F64MAT2X2 = 422,
- F64MAT2X3 = 423,
- F64MAT2X4 = 424,
- F64MAT3X2 = 425,
- F64MAT3X3 = 426,
- F64MAT3X4 = 427,
- F64MAT4X2 = 428,
- F64MAT4X3 = 429,
- F64MAT4X4 = 430,
- ATOMIC_UINT = 431,
- ACCSTRUCTNV = 432,
- FCOOPMATNV = 433,
- SAMPLER1D = 434,
- SAMPLER2D = 435,
- SAMPLER3D = 436,
- SAMPLERCUBE = 437,
- SAMPLER1DSHADOW = 438,
- SAMPLER2DSHADOW = 439,
- SAMPLERCUBESHADOW = 440,
- SAMPLER1DARRAY = 441,
- SAMPLER2DARRAY = 442,
- SAMPLER1DARRAYSHADOW = 443,
- SAMPLER2DARRAYSHADOW = 444,
- ISAMPLER1D = 445,
- ISAMPLER2D = 446,
- ISAMPLER3D = 447,
- ISAMPLERCUBE = 448,
- ISAMPLER1DARRAY = 449,
- ISAMPLER2DARRAY = 450,
- USAMPLER1D = 451,
- USAMPLER2D = 452,
- USAMPLER3D = 453,
- USAMPLERCUBE = 454,
- USAMPLER1DARRAY = 455,
- USAMPLER2DARRAY = 456,
- SAMPLER2DRECT = 457,
- SAMPLER2DRECTSHADOW = 458,
- ISAMPLER2DRECT = 459,
- USAMPLER2DRECT = 460,
- SAMPLERBUFFER = 461,
- ISAMPLERBUFFER = 462,
- USAMPLERBUFFER = 463,
- SAMPLERCUBEARRAY = 464,
- SAMPLERCUBEARRAYSHADOW = 465,
- ISAMPLERCUBEARRAY = 466,
- USAMPLERCUBEARRAY = 467,
- SAMPLER2DMS = 468,
- ISAMPLER2DMS = 469,
- USAMPLER2DMS = 470,
- SAMPLER2DMSARRAY = 471,
- ISAMPLER2DMSARRAY = 472,
- USAMPLER2DMSARRAY = 473,
- SAMPLEREXTERNALOES = 474,
- SAMPLEREXTERNAL2DY2YEXT = 475,
- F16SAMPLER1D = 476,
- F16SAMPLER2D = 477,
- F16SAMPLER3D = 478,
- F16SAMPLER2DRECT = 479,
- F16SAMPLERCUBE = 480,
- F16SAMPLER1DARRAY = 481,
- F16SAMPLER2DARRAY = 482,
- F16SAMPLERCUBEARRAY = 483,
- F16SAMPLERBUFFER = 484,
- F16SAMPLER2DMS = 485,
- F16SAMPLER2DMSARRAY = 486,
- F16SAMPLER1DSHADOW = 487,
- F16SAMPLER2DSHADOW = 488,
- F16SAMPLER1DARRAYSHADOW = 489,
- F16SAMPLER2DARRAYSHADOW = 490,
- F16SAMPLER2DRECTSHADOW = 491,
- F16SAMPLERCUBESHADOW = 492,
- F16SAMPLERCUBEARRAYSHADOW = 493,
- SAMPLER = 494,
- SAMPLERSHADOW = 495,
- TEXTURE1D = 496,
- TEXTURE2D = 497,
- TEXTURE3D = 498,
- TEXTURECUBE = 499,
- TEXTURE1DARRAY = 500,
- TEXTURE2DARRAY = 501,
- ITEXTURE1D = 502,
- ITEXTURE2D = 503,
- ITEXTURE3D = 504,
- ITEXTURECUBE = 505,
- ITEXTURE1DARRAY = 506,
- ITEXTURE2DARRAY = 507,
- UTEXTURE1D = 508,
- UTEXTURE2D = 509,
- UTEXTURE3D = 510,
- UTEXTURECUBE = 511,
- UTEXTURE1DARRAY = 512,
- UTEXTURE2DARRAY = 513,
- TEXTURE2DRECT = 514,
- ITEXTURE2DRECT = 515,
- UTEXTURE2DRECT = 516,
- TEXTUREBUFFER = 517,
- ITEXTUREBUFFER = 518,
- UTEXTUREBUFFER = 519,
- TEXTURECUBEARRAY = 520,
- ITEXTURECUBEARRAY = 521,
- UTEXTURECUBEARRAY = 522,
+ CONST = 258,
+ BOOL = 259,
+ INT = 260,
+ UINT = 261,
+ FLOAT = 262,
+ BVEC2 = 263,
+ BVEC3 = 264,
+ BVEC4 = 265,
+ IVEC2 = 266,
+ IVEC3 = 267,
+ IVEC4 = 268,
+ UVEC2 = 269,
+ UVEC3 = 270,
+ UVEC4 = 271,
+ VEC2 = 272,
+ VEC3 = 273,
+ VEC4 = 274,
+ MAT2 = 275,
+ MAT3 = 276,
+ MAT4 = 277,
+ MAT2X2 = 278,
+ MAT2X3 = 279,
+ MAT2X4 = 280,
+ MAT3X2 = 281,
+ MAT3X3 = 282,
+ MAT3X4 = 283,
+ MAT4X2 = 284,
+ MAT4X3 = 285,
+ MAT4X4 = 286,
+ SAMPLER2D = 287,
+ SAMPLER3D = 288,
+ SAMPLERCUBE = 289,
+ SAMPLER2DSHADOW = 290,
+ SAMPLERCUBESHADOW = 291,
+ SAMPLER2DARRAY = 292,
+ SAMPLER2DARRAYSHADOW = 293,
+ ISAMPLER2D = 294,
+ ISAMPLER3D = 295,
+ ISAMPLERCUBE = 296,
+ ISAMPLER2DARRAY = 297,
+ USAMPLER2D = 298,
+ USAMPLER3D = 299,
+ USAMPLERCUBE = 300,
+ USAMPLER2DARRAY = 301,
+ SAMPLER = 302,
+ SAMPLERSHADOW = 303,
+ TEXTURE2D = 304,
+ TEXTURE3D = 305,
+ TEXTURECUBE = 306,
+ TEXTURE2DARRAY = 307,
+ ITEXTURE2D = 308,
+ ITEXTURE3D = 309,
+ ITEXTURECUBE = 310,
+ ITEXTURE2DARRAY = 311,
+ UTEXTURE2D = 312,
+ UTEXTURE3D = 313,
+ UTEXTURECUBE = 314,
+ UTEXTURE2DARRAY = 315,
+ ATTRIBUTE = 316,
+ VARYING = 317,
+ FLOAT16_T = 318,
+ FLOAT32_T = 319,
+ DOUBLE = 320,
+ FLOAT64_T = 321,
+ INT64_T = 322,
+ UINT64_T = 323,
+ INT32_T = 324,
+ UINT32_T = 325,
+ INT16_T = 326,
+ UINT16_T = 327,
+ INT8_T = 328,
+ UINT8_T = 329,
+ I64VEC2 = 330,
+ I64VEC3 = 331,
+ I64VEC4 = 332,
+ U64VEC2 = 333,
+ U64VEC3 = 334,
+ U64VEC4 = 335,
+ I32VEC2 = 336,
+ I32VEC3 = 337,
+ I32VEC4 = 338,
+ U32VEC2 = 339,
+ U32VEC3 = 340,
+ U32VEC4 = 341,
+ I16VEC2 = 342,
+ I16VEC3 = 343,
+ I16VEC4 = 344,
+ U16VEC2 = 345,
+ U16VEC3 = 346,
+ U16VEC4 = 347,
+ I8VEC2 = 348,
+ I8VEC3 = 349,
+ I8VEC4 = 350,
+ U8VEC2 = 351,
+ U8VEC3 = 352,
+ U8VEC4 = 353,
+ DVEC2 = 354,
+ DVEC3 = 355,
+ DVEC4 = 356,
+ DMAT2 = 357,
+ DMAT3 = 358,
+ DMAT4 = 359,
+ F16VEC2 = 360,
+ F16VEC3 = 361,
+ F16VEC4 = 362,
+ F16MAT2 = 363,
+ F16MAT3 = 364,
+ F16MAT4 = 365,
+ F32VEC2 = 366,
+ F32VEC3 = 367,
+ F32VEC4 = 368,
+ F32MAT2 = 369,
+ F32MAT3 = 370,
+ F32MAT4 = 371,
+ F64VEC2 = 372,
+ F64VEC3 = 373,
+ F64VEC4 = 374,
+ F64MAT2 = 375,
+ F64MAT3 = 376,
+ F64MAT4 = 377,
+ DMAT2X2 = 378,
+ DMAT2X3 = 379,
+ DMAT2X4 = 380,
+ DMAT3X2 = 381,
+ DMAT3X3 = 382,
+ DMAT3X4 = 383,
+ DMAT4X2 = 384,
+ DMAT4X3 = 385,
+ DMAT4X4 = 386,
+ F16MAT2X2 = 387,
+ F16MAT2X3 = 388,
+ F16MAT2X4 = 389,
+ F16MAT3X2 = 390,
+ F16MAT3X3 = 391,
+ F16MAT3X4 = 392,
+ F16MAT4X2 = 393,
+ F16MAT4X3 = 394,
+ F16MAT4X4 = 395,
+ F32MAT2X2 = 396,
+ F32MAT2X3 = 397,
+ F32MAT2X4 = 398,
+ F32MAT3X2 = 399,
+ F32MAT3X3 = 400,
+ F32MAT3X4 = 401,
+ F32MAT4X2 = 402,
+ F32MAT4X3 = 403,
+ F32MAT4X4 = 404,
+ F64MAT2X2 = 405,
+ F64MAT2X3 = 406,
+ F64MAT2X4 = 407,
+ F64MAT3X2 = 408,
+ F64MAT3X3 = 409,
+ F64MAT3X4 = 410,
+ F64MAT4X2 = 411,
+ F64MAT4X3 = 412,
+ F64MAT4X4 = 413,
+ ATOMIC_UINT = 414,
+ ACCSTRUCTNV = 415,
+ FCOOPMATNV = 416,
+ ICOOPMATNV = 417,
+ UCOOPMATNV = 418,
+ SAMPLERCUBEARRAY = 419,
+ SAMPLERCUBEARRAYSHADOW = 420,
+ ISAMPLERCUBEARRAY = 421,
+ USAMPLERCUBEARRAY = 422,
+ SAMPLER1D = 423,
+ SAMPLER1DARRAY = 424,
+ SAMPLER1DARRAYSHADOW = 425,
+ ISAMPLER1D = 426,
+ SAMPLER1DSHADOW = 427,
+ SAMPLER2DRECT = 428,
+ SAMPLER2DRECTSHADOW = 429,
+ ISAMPLER2DRECT = 430,
+ USAMPLER2DRECT = 431,
+ SAMPLERBUFFER = 432,
+ ISAMPLERBUFFER = 433,
+ USAMPLERBUFFER = 434,
+ SAMPLER2DMS = 435,
+ ISAMPLER2DMS = 436,
+ USAMPLER2DMS = 437,
+ SAMPLER2DMSARRAY = 438,
+ ISAMPLER2DMSARRAY = 439,
+ USAMPLER2DMSARRAY = 440,
+ SAMPLEREXTERNALOES = 441,
+ SAMPLEREXTERNAL2DY2YEXT = 442,
+ ISAMPLER1DARRAY = 443,
+ USAMPLER1D = 444,
+ USAMPLER1DARRAY = 445,
+ F16SAMPLER1D = 446,
+ F16SAMPLER2D = 447,
+ F16SAMPLER3D = 448,
+ F16SAMPLER2DRECT = 449,
+ F16SAMPLERCUBE = 450,
+ F16SAMPLER1DARRAY = 451,
+ F16SAMPLER2DARRAY = 452,
+ F16SAMPLERCUBEARRAY = 453,
+ F16SAMPLERBUFFER = 454,
+ F16SAMPLER2DMS = 455,
+ F16SAMPLER2DMSARRAY = 456,
+ F16SAMPLER1DSHADOW = 457,
+ F16SAMPLER2DSHADOW = 458,
+ F16SAMPLER1DARRAYSHADOW = 459,
+ F16SAMPLER2DARRAYSHADOW = 460,
+ F16SAMPLER2DRECTSHADOW = 461,
+ F16SAMPLERCUBESHADOW = 462,
+ F16SAMPLERCUBEARRAYSHADOW = 463,
+ IMAGE1D = 464,
+ IIMAGE1D = 465,
+ UIMAGE1D = 466,
+ IMAGE2D = 467,
+ IIMAGE2D = 468,
+ UIMAGE2D = 469,
+ IMAGE3D = 470,
+ IIMAGE3D = 471,
+ UIMAGE3D = 472,
+ IMAGE2DRECT = 473,
+ IIMAGE2DRECT = 474,
+ UIMAGE2DRECT = 475,
+ IMAGECUBE = 476,
+ IIMAGECUBE = 477,
+ UIMAGECUBE = 478,
+ IMAGEBUFFER = 479,
+ IIMAGEBUFFER = 480,
+ UIMAGEBUFFER = 481,
+ IMAGE1DARRAY = 482,
+ IIMAGE1DARRAY = 483,
+ UIMAGE1DARRAY = 484,
+ IMAGE2DARRAY = 485,
+ IIMAGE2DARRAY = 486,
+ UIMAGE2DARRAY = 487,
+ IMAGECUBEARRAY = 488,
+ IIMAGECUBEARRAY = 489,
+ UIMAGECUBEARRAY = 490,
+ IMAGE2DMS = 491,
+ IIMAGE2DMS = 492,
+ UIMAGE2DMS = 493,
+ IMAGE2DMSARRAY = 494,
+ IIMAGE2DMSARRAY = 495,
+ UIMAGE2DMSARRAY = 496,
+ F16IMAGE1D = 497,
+ F16IMAGE2D = 498,
+ F16IMAGE3D = 499,
+ F16IMAGE2DRECT = 500,
+ F16IMAGECUBE = 501,
+ F16IMAGE1DARRAY = 502,
+ F16IMAGE2DARRAY = 503,
+ F16IMAGECUBEARRAY = 504,
+ F16IMAGEBUFFER = 505,
+ F16IMAGE2DMS = 506,
+ F16IMAGE2DMSARRAY = 507,
+ TEXTURECUBEARRAY = 508,
+ ITEXTURECUBEARRAY = 509,
+ UTEXTURECUBEARRAY = 510,
+ TEXTURE1D = 511,
+ ITEXTURE1D = 512,
+ UTEXTURE1D = 513,
+ TEXTURE1DARRAY = 514,
+ ITEXTURE1DARRAY = 515,
+ UTEXTURE1DARRAY = 516,
+ TEXTURE2DRECT = 517,
+ ITEXTURE2DRECT = 518,
+ UTEXTURE2DRECT = 519,
+ TEXTUREBUFFER = 520,
+ ITEXTUREBUFFER = 521,
+ UTEXTUREBUFFER = 522,
TEXTURE2DMS = 523,
ITEXTURE2DMS = 524,
UTEXTURE2DMS = 525,
@@ -335,121 +335,124 @@ extern int yydebug;
USUBPASSINPUTMS = 545,
F16SUBPASSINPUT = 546,
F16SUBPASSINPUTMS = 547,
- IMAGE1D = 548,
- IIMAGE1D = 549,
- UIMAGE1D = 550,
- IMAGE2D = 551,
- IIMAGE2D = 552,
- UIMAGE2D = 553,
- IMAGE3D = 554,
- IIMAGE3D = 555,
- UIMAGE3D = 556,
- IMAGE2DRECT = 557,
- IIMAGE2DRECT = 558,
- UIMAGE2DRECT = 559,
- IMAGECUBE = 560,
- IIMAGECUBE = 561,
- UIMAGECUBE = 562,
- IMAGEBUFFER = 563,
- IIMAGEBUFFER = 564,
- UIMAGEBUFFER = 565,
- IMAGE1DARRAY = 566,
- IIMAGE1DARRAY = 567,
- UIMAGE1DARRAY = 568,
- IMAGE2DARRAY = 569,
- IIMAGE2DARRAY = 570,
- UIMAGE2DARRAY = 571,
- IMAGECUBEARRAY = 572,
- IIMAGECUBEARRAY = 573,
- UIMAGECUBEARRAY = 574,
- IMAGE2DMS = 575,
- IIMAGE2DMS = 576,
- UIMAGE2DMS = 577,
- IMAGE2DMSARRAY = 578,
- IIMAGE2DMSARRAY = 579,
- UIMAGE2DMSARRAY = 580,
- F16IMAGE1D = 581,
- F16IMAGE2D = 582,
- F16IMAGE3D = 583,
- F16IMAGE2DRECT = 584,
- F16IMAGECUBE = 585,
- F16IMAGE1DARRAY = 586,
- F16IMAGE2DARRAY = 587,
- F16IMAGECUBEARRAY = 588,
- F16IMAGEBUFFER = 589,
- F16IMAGE2DMS = 590,
- F16IMAGE2DMSARRAY = 591,
- STRUCT = 592,
- VOID = 593,
- WHILE = 594,
- IDENTIFIER = 595,
- TYPE_NAME = 596,
- FLOATCONSTANT = 597,
- DOUBLECONSTANT = 598,
- INT16CONSTANT = 599,
- UINT16CONSTANT = 600,
- INT32CONSTANT = 601,
- UINT32CONSTANT = 602,
- INTCONSTANT = 603,
- UINTCONSTANT = 604,
- INT64CONSTANT = 605,
- UINT64CONSTANT = 606,
- BOOLCONSTANT = 607,
- FLOAT16CONSTANT = 608,
- LEFT_OP = 609,
- RIGHT_OP = 610,
- INC_OP = 611,
- DEC_OP = 612,
- LE_OP = 613,
- GE_OP = 614,
- EQ_OP = 615,
- NE_OP = 616,
- AND_OP = 617,
- OR_OP = 618,
- XOR_OP = 619,
- MUL_ASSIGN = 620,
- DIV_ASSIGN = 621,
- ADD_ASSIGN = 622,
- MOD_ASSIGN = 623,
- LEFT_ASSIGN = 624,
- RIGHT_ASSIGN = 625,
- AND_ASSIGN = 626,
- XOR_ASSIGN = 627,
- OR_ASSIGN = 628,
- SUB_ASSIGN = 629,
- LEFT_PAREN = 630,
- RIGHT_PAREN = 631,
- LEFT_BRACKET = 632,
- RIGHT_BRACKET = 633,
- LEFT_BRACE = 634,
- RIGHT_BRACE = 635,
- DOT = 636,
- COMMA = 637,
- COLON = 638,
- EQUAL = 639,
- SEMICOLON = 640,
- BANG = 641,
- DASH = 642,
- TILDE = 643,
- PLUS = 644,
- STAR = 645,
- SLASH = 646,
- PERCENT = 647,
- LEFT_ANGLE = 648,
- RIGHT_ANGLE = 649,
- VERTICAL_BAR = 650,
- CARET = 651,
- AMPERSAND = 652,
- QUESTION = 653,
- INVARIANT = 654,
- PRECISE = 655,
- HIGH_PRECISION = 656,
- MEDIUM_PRECISION = 657,
- LOW_PRECISION = 658,
- PRECISION = 659,
- PACKED = 660,
- RESOURCE = 661,
- SUPERP = 662
+ LEFT_OP = 548,
+ RIGHT_OP = 549,
+ INC_OP = 550,
+ DEC_OP = 551,
+ LE_OP = 552,
+ GE_OP = 553,
+ EQ_OP = 554,
+ NE_OP = 555,
+ AND_OP = 556,
+ OR_OP = 557,
+ XOR_OP = 558,
+ MUL_ASSIGN = 559,
+ DIV_ASSIGN = 560,
+ ADD_ASSIGN = 561,
+ MOD_ASSIGN = 562,
+ LEFT_ASSIGN = 563,
+ RIGHT_ASSIGN = 564,
+ AND_ASSIGN = 565,
+ XOR_ASSIGN = 566,
+ OR_ASSIGN = 567,
+ SUB_ASSIGN = 568,
+ LEFT_PAREN = 569,
+ RIGHT_PAREN = 570,
+ LEFT_BRACKET = 571,
+ RIGHT_BRACKET = 572,
+ LEFT_BRACE = 573,
+ RIGHT_BRACE = 574,
+ DOT = 575,
+ COMMA = 576,
+ COLON = 577,
+ EQUAL = 578,
+ SEMICOLON = 579,
+ BANG = 580,
+ DASH = 581,
+ TILDE = 582,
+ PLUS = 583,
+ STAR = 584,
+ SLASH = 585,
+ PERCENT = 586,
+ LEFT_ANGLE = 587,
+ RIGHT_ANGLE = 588,
+ VERTICAL_BAR = 589,
+ CARET = 590,
+ AMPERSAND = 591,
+ QUESTION = 592,
+ INVARIANT = 593,
+ HIGH_PRECISION = 594,
+ MEDIUM_PRECISION = 595,
+ LOW_PRECISION = 596,
+ PRECISION = 597,
+ PACKED = 598,
+ RESOURCE = 599,
+ SUPERP = 600,
+ FLOATCONSTANT = 601,
+ INTCONSTANT = 602,
+ UINTCONSTANT = 603,
+ BOOLCONSTANT = 604,
+ IDENTIFIER = 605,
+ TYPE_NAME = 606,
+ CENTROID = 607,
+ IN = 608,
+ OUT = 609,
+ INOUT = 610,
+ STRUCT = 611,
+ VOID = 612,
+ WHILE = 613,
+ BREAK = 614,
+ CONTINUE = 615,
+ DO = 616,
+ ELSE = 617,
+ FOR = 618,
+ IF = 619,
+ DISCARD = 620,
+ RETURN = 621,
+ SWITCH = 622,
+ CASE = 623,
+ DEFAULT = 624,
+ UNIFORM = 625,
+ SHARED = 626,
+ BUFFER = 627,
+ FLAT = 628,
+ SMOOTH = 629,
+ LAYOUT = 630,
+ DOUBLECONSTANT = 631,
+ INT16CONSTANT = 632,
+ UINT16CONSTANT = 633,
+ FLOAT16CONSTANT = 634,
+ INT32CONSTANT = 635,
+ UINT32CONSTANT = 636,
+ INT64CONSTANT = 637,
+ UINT64CONSTANT = 638,
+ SUBROUTINE = 639,
+ DEMOTE = 640,
+ PAYLOADNV = 641,
+ PAYLOADINNV = 642,
+ HITATTRNV = 643,
+ CALLDATANV = 644,
+ CALLDATAINNV = 645,
+ PATCH = 646,
+ SAMPLE = 647,
+ NONUNIFORM = 648,
+ COHERENT = 649,
+ VOLATILE = 650,
+ RESTRICT = 651,
+ READONLY = 652,
+ WRITEONLY = 653,
+ DEVICECOHERENT = 654,
+ QUEUEFAMILYCOHERENT = 655,
+ WORKGROUPCOHERENT = 656,
+ SUBGROUPCOHERENT = 657,
+ NONPRIVATE = 658,
+ NOPERSPECTIVE = 659,
+ EXPLICITINTERPAMD = 660,
+ PERVERTEXNV = 661,
+ PERPRIMITIVENV = 662,
+ PERVIEWNV = 663,
+ PERTASKNV = 664,
+ PRECISE = 665
};
#endif
@@ -458,7 +461,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 71 "MachineIndependent/glslang.y" /* yacc.c:1909 */
+#line 96 "MachineIndependent/glslang.y" /* yacc.c:1909 */
struct {
glslang::TSourceLoc loc;
@@ -494,7 +497,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
-#line 498 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
+#line 501 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
index 5e2eed16ed..3a93aedafb 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
@@ -35,6 +35,8 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#include "localintermediate.h"
#include "../Include/InfoSink.h"
@@ -174,7 +176,7 @@ bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
case EOpIndexIndirect: out.debug << "indirect index"; break;
case EOpIndexDirectStruct:
{
- bool reference = node->getLeft()->getType().getBasicType() == EbtReference;
+ 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;
@@ -211,6 +213,13 @@ bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
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 << "<unknown op>";
}
@@ -555,6 +564,9 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
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;
@@ -615,7 +627,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break;
case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break;
-#ifdef NV_EXTENSIONS
case EOpSubgroupPartition: out.debug << "subgroupPartitionNV"; break;
case EOpSubgroupPartitionedAdd: out.debug << "subgroupPartitionedAddNV"; break;
case EOpSubgroupPartitionedMul: out.debug << "subgroupPartitionedMulNV"; break;
@@ -638,7 +649,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpSubgroupPartitionedExclusiveAnd: out.debug << "subgroupPartitionedExclusiveAndNV"; break;
case EOpSubgroupPartitionedExclusiveOr: out.debug << "subgroupPartitionedExclusiveOrNV"; break;
case EOpSubgroupPartitionedExclusiveXor: out.debug << "subgroupPartitionedExclusiveXorNV"; break;
-#endif
case EOpClip: out.debug << "clip"; break;
case EOpIsFinite: out.debug << "isfinite"; break;
@@ -648,7 +658,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpSparseTexelsResident: out.debug << "sparseTexelsResident"; break;
-#ifdef AMD_EXTENSIONS
case EOpMinInvocations: out.debug << "minInvocations"; break;
case EOpMaxInvocations: out.debug << "maxInvocations"; break;
case EOpAddInvocations: out.debug << "addInvocations"; break;
@@ -677,7 +686,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break;
case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break;
-#endif
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
@@ -863,7 +871,6 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpReadInvocation: out.debug << "readInvocation"; break;
-#ifdef AMD_EXTENSIONS
case EOpSwizzleInvocations: out.debug << "swizzleInvocations"; break;
case EOpSwizzleInvocationsMasked: out.debug << "swizzleInvocationsMasked"; break;
case EOpWriteInvocation: out.debug << "writeInvocation"; break;
@@ -871,9 +878,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpMin3: out.debug << "min3"; break;
case EOpMax3: out.debug << "max3"; break;
case EOpMid3: out.debug << "mid3"; break;
-
case EOpTime: out.debug << "time"; break;
-#endif
case EOpAtomicAdd: out.debug << "AtomicAdd"; break;
case EOpAtomicMin: out.debug << "AtomicMin"; break;
@@ -910,10 +915,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break;
case EOpImageAtomicLoad: out.debug << "imageAtomicLoad"; break;
case EOpImageAtomicStore: out.debug << "imageAtomicStore"; break;
-#ifdef AMD_EXTENSIONS
case EOpImageLoadLod: out.debug << "imageLoadLod"; break;
case EOpImageStoreLod: out.debug << "imageStoreLod"; break;
-#endif
case EOpTextureQuerySize: out.debug << "textureSize"; break;
case EOpTextureQueryLod: out.debug << "textureQueryLod"; break;
@@ -940,11 +943,9 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpTextureOffsetClamp: out.debug << "textureOffsetClamp"; break;
case EOpTextureGradClamp: out.debug << "textureGradClamp"; break;
case EOpTextureGradOffsetClamp: out.debug << "textureGradOffsetClamp"; break;
-#ifdef AMD_EXTENSIONS
case EOpTextureGatherLod: out.debug << "textureGatherLod"; break;
case EOpTextureGatherLodOffset: out.debug << "textureGatherLodOffset"; break;
case EOpTextureGatherLodOffsets: out.debug << "textureGatherLodOffsets"; break;
-#endif
case EOpSparseTexture: out.debug << "sparseTexture"; break;
case EOpSparseTextureOffset: out.debug << "sparseTextureOffset"; break;
@@ -962,19 +963,15 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpSparseTextureOffsetClamp: out.debug << "sparseTextureOffsetClamp"; break;
case EOpSparseTextureGradClamp: out.debug << "sparseTextureGradClamp"; break;
case EOpSparseTextureGradOffsetClamp: out.debug << "sparseTextureGradOffsetClam"; break;
-#ifdef AMD_EXTENSIONS
case EOpSparseTextureGatherLod: out.debug << "sparseTextureGatherLod"; break;
case EOpSparseTextureGatherLodOffset: out.debug << "sparseTextureGatherLodOffset"; break;
case EOpSparseTextureGatherLodOffsets: out.debug << "sparseTextureGatherLodOffsets"; break;
case EOpSparseImageLoadLod: out.debug << "sparseImageLoadLod"; break;
-#endif
-#ifdef NV_EXTENSIONS
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;
-#endif
case EOpAddCarry: out.debug << "addCarry"; break;
case EOpSubBorrow: out.debug << "subBorrow"; break;
case EOpUMulExtended: out.debug << "uMulExtended"; break;
@@ -988,9 +985,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpInterpolateAtSample: out.debug << "interpolateAtSample"; break;
case EOpInterpolateAtOffset: out.debug << "interpolateAtOffset"; break;
-#ifdef AMD_EXTENSIONS
case EOpInterpolateAtVertex: out.debug << "interpolateAtVertex"; break;
-#endif
case EOpSinCos: out.debug << "sincos"; break;
case EOpGenMul: out.debug << "mul"; break;
@@ -1057,22 +1052,45 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break;
case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; 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;
-#ifdef NV_EXTENSIONS
case EOpTraceNV: out.debug << "traceNV"; break;
case EOpReportIntersectionNV: out.debug << "reportIntersectionNV"; break;
case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break;
case EOpTerminateRayNV: out.debug << "terminateRayNV"; break;
case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break;
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
-#endif
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
+ case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
+
default: out.debug.message(EPrefixError, "Bad aggregation op");
}
@@ -1367,6 +1385,7 @@ bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node)
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;
}
@@ -1477,18 +1496,17 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
}
infoSink.debug << "\n";
}
+ if (interlockOrdering != EioNone)
+ infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n";
break;
-#ifdef NV_EXTENSIONS
case EShLangMeshNV:
infoSink.debug << "max_vertices = " << vertices << "\n";
infoSink.debug << "max_primitives = " << primitives << "\n";
infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
// Fall through
-
case EShLangTaskNV:
// Fall through
-#endif
case EShLangCompute:
infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
{
@@ -1517,3 +1535,5 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
}
} // end namespace glslang
+
+#endif // not GLSLANG_WEB \ No newline at end of file
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
index 46c7558378..3262c0a203 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
@@ -33,16 +33,13 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#include "../Include/Common.h"
#include "../Include/InfoSink.h"
-#include "iomapper.h"
-#include "LiveTraverser.h"
-#include "localintermediate.h"
#include "gl_types.h"
-
-#include <unordered_set>
-#include <unordered_map>
+#include "iomapper.h"
//
// Map IO bindings.
@@ -61,60 +58,9 @@
// c. implicit dead bindings are left un-bound.
//
-
namespace glslang {
-struct TVarEntryInfo
-{
- int id;
- TIntermSymbol* symbol;
- bool live;
- int newBinding;
- int newSet;
- int newLocation;
- int newComponent;
- int newIndex;
-
- 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;
- }
- };
-};
-
-
-
-typedef std::vector<TVarEntryInfo> TVarLiveMap;
-
-class TVarGatherTraverser : public TLiveTraverser
-{
+class TVarGatherTraverser : public TLiveTraverser {
public:
TVarGatherTraverser(const TIntermediate& i, bool traverseDeadCode, TVarLiveMap& inList, TVarLiveMap& outList, TVarLiveMap& uniformList)
: TLiveTraverser(i, traverseDeadCode, true, true, false)
@@ -124,7 +70,6 @@ public:
{
}
-
virtual void visitSymbol(TIntermSymbol* base)
{
TVarLiveMap* target = nullptr;
@@ -132,16 +77,17 @@ public:
target = &inputList;
else if (base->getQualifier().storage == EvqVaryingOut)
target = &outputList;
- else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().layoutPushConstant)
+ else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant())
target = &uniformList;
-
if (target) {
- TVarEntryInfo ent = { base->getId(), base, !traverseAll };
- TVarLiveMap::iterator at = std::lower_bound(target->begin(), target->end(), ent, TVarEntryInfo::TOrderById());
- if (at != target->end() && at->id == ent.id)
- at->live = at->live || !traverseAll; // update live state
+ TVarEntryInfo ent = {base->getId(), base, ! traverseAll};
+ ent.stage = intermediate.getStage();
+ TVarLiveMap::iterator at = target->find(
+ ent.symbol->getName()); // 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->insert(at, ent);
+ (*target)[ent.symbol->getName()] = ent;
}
}
@@ -162,9 +108,7 @@ public:
{
}
-
- virtual void visitSymbol(TIntermSymbol* base)
- {
+ virtual void visitSymbol(TIntermSymbol* base) {
const TVarLiveMap* source;
if (base->getQualifier().storage == EvqVaryingIn)
source = &inputList;
@@ -176,23 +120,23 @@ public:
return;
TVarEntryInfo ent = { base->getId() };
- TVarLiveMap::const_iterator at = std::lower_bound(source->begin(), source->end(), ent, TVarEntryInfo::TOrderById());
+ TVarLiveMap::const_iterator at = source->find(base->getName());
if (at == source->end())
return;
- if (at->id != ent.id)
+ if (at->second.id != ent.id)
return;
- if (at->newBinding != -1)
- base->getWritableType().getQualifier().layoutBinding = at->newBinding;
- if (at->newSet != -1)
- base->getWritableType().getQualifier().layoutSet = at->newSet;
- if (at->newLocation != -1)
- base->getWritableType().getQualifier().layoutLocation = at->newLocation;
- if (at->newComponent != -1)
- base->getWritableType().getQualifier().layoutComponent = at->newComponent;
- if (at->newIndex != -1)
- base->getWritableType().getQualifier().layoutIndex = at->newIndex;
+ 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;
}
private:
@@ -210,10 +154,12 @@ struct TNotifyUniformAdaptor
, resolver(r)
{
}
- inline void operator()(TVarEntryInfo& ent)
+
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey)
{
- resolver.notifyBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
+ resolver.notifyBinding(stage, entKey.second);
}
+
private:
TNotifyUniformAdaptor& operator=(TNotifyUniformAdaptor&);
};
@@ -222,49 +168,46 @@ struct TNotifyInOutAdaptor
{
EShLanguage stage;
TIoMapResolver& resolver;
- inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r)
+ inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r)
: stage(s)
, resolver(r)
{
}
- inline void operator()(TVarEntryInfo& ent)
+
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey)
{
- resolver.notifyInOut(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
+ resolver.notifyInOut(stage, entKey.second);
}
+
private:
TNotifyInOutAdaptor& operator=(TNotifyInOutAdaptor&);
};
-struct TResolverUniformAdaptor
-{
- TResolverUniformAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e, TIntermediate& interm)
+struct TResolverUniformAdaptor {
+ TResolverUniformAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e)
: stage(s)
, resolver(r)
, infoSink(i)
, error(e)
- , intermediate(interm)
{
}
- inline void operator()(TVarEntryInfo& ent)
- {
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey) {
+ TVarEntryInfo& ent = entKey.second;
ent.newLocation = -1;
ent.newComponent = -1;
ent.newBinding = -1;
ent.newSet = -1;
ent.newIndex = -1;
- const bool isValid = resolver.validateBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(),
- ent.live);
+ const bool isValid = resolver.validateBinding(stage, ent);
if (isValid) {
- ent.newBinding = resolver.resolveBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(),
- ent.live);
- ent.newSet = resolver.resolveSet(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
- ent.newLocation = resolver.resolveUniformLocation(stage, ent.symbol->getName().c_str(),
- ent.symbol->getType(), ent.live);
+ resolver.resolveBinding(stage, ent);
+ resolver.resolveSet(stage, ent);
+ resolver.resolveUniformLocation(stage, ent);
if (ent.newBinding != -1) {
if (ent.newBinding >= int(TQualifier::layoutBindingEnd)) {
- TString err = "mapped binding out of range: " + ent.symbol->getName();
+ TString err = "mapped binding out of range: " + entKey.first;
infoSink.info.message(EPrefixInternalError, err.c_str());
error = true;
@@ -272,64 +215,52 @@ struct TResolverUniformAdaptor
}
if (ent.newSet != -1) {
if (ent.newSet >= int(TQualifier::layoutSetEnd)) {
- TString err = "mapped set out of range: " + ent.symbol->getName();
+ TString err = "mapped set out of range: " + entKey.first;
infoSink.info.message(EPrefixInternalError, err.c_str());
error = true;
}
}
} else {
- TString errorMsg = "Invalid binding: " + ent.symbol->getName();
+ 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;
- TIntermediate& intermediate;
private:
TResolverUniformAdaptor& operator=(TResolverUniformAdaptor&);
};
-struct TResolverInOutAdaptor
-{
- TResolverInOutAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e, TIntermediate& interm)
+struct TResolverInOutAdaptor {
+ TResolverInOutAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e)
: stage(s)
, resolver(r)
, infoSink(i)
, error(e)
- , intermediate(interm)
{
}
- inline void operator()(TVarEntryInfo& ent)
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey)
{
+ TVarEntryInfo& ent = entKey.second;
ent.newLocation = -1;
ent.newComponent = -1;
ent.newBinding = -1;
ent.newSet = -1;
ent.newIndex = -1;
- const bool isValid = resolver.validateInOut(stage,
- ent.symbol->getName().c_str(),
- ent.symbol->getType(),
- ent.live);
+ const bool isValid = resolver.validateInOut(stage, ent);
if (isValid) {
- ent.newLocation = resolver.resolveInOutLocation(stage,
- ent.symbol->getName().c_str(),
- ent.symbol->getType(),
- ent.live);
- ent.newComponent = resolver.resolveInOutComponent(stage,
- ent.symbol->getName().c_str(),
- ent.symbol->getType(),
- ent.live);
- ent.newIndex = resolver.resolveInOutIndex(stage,
- ent.symbol->getName().c_str(),
- ent.symbol->getType(),
- ent.live);
+ resolver.resolveInOutLocation(stage, ent);
+ resolver.resolveInOutComponent(stage, ent);
+ resolver.resolveInOutIndex(stage, ent);
} else {
TString errorMsg;
if (ent.symbol->getType().getQualifier().semanticName != nullptr) {
@@ -344,218 +275,621 @@ struct TResolverInOutAdaptor
}
}
+ inline void setStage(EShLanguage s) { stage = s; }
+
EShLanguage stage;
TIoMapResolver& resolver;
TInfoSink& infoSink;
bool& error;
- TIntermediate& intermediate;
private:
TResolverInOutAdaptor& operator=(TResolverInOutAdaptor&);
};
-// Base class for shared TIoMapResolver services, used by several derivations.
-struct TDefaultIoResolverBase : public glslang::TIoMapResolver
-{
- TDefaultIoResolverBase(const TIntermediate &intermediate) :
- intermediate(intermediate),
- nextUniformLocation(intermediate.getUniformLocationBase()),
- nextInputLocation(0),
- nextOutputLocation(0)
- { }
+// The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings
- int getBaseBinding(TResourceType res, unsigned int set) const {
- return selectBaseBinding(intermediate.getShiftBinding(res),
- intermediate.getShiftBindingForSet(res, set));
+struct TSymbolValidater
+{
+ TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount],
+ TVarLiveMap* uniform[EShLangCount], bool& hadError)
+ : preStage(EShLangCount)
+ , currentStage(EShLangCount)
+ , nextStage(EShLangCount)
+ , resolver(r)
+ , infoSink(i)
+ , hadError(hadError)
+ {
+ memcpy(inVarMaps, in, EShLangCount * (sizeof(TVarLiveMap*)));
+ memcpy(outVarMaps, out, EShLangCount * (sizeof(TVarLiveMap*)));
+ memcpy(uniformVarMap, uniform, EShLangCount * (sizeof(TVarLiveMap*)));
}
- const std::vector<std::string>& getResourceSetBinding() const { return intermediate.getResourceSetBinding(); }
-
- bool doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
- bool doAutoLocationMapping() const { return intermediate.getAutoMapLocations(); }
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey) {
+ TVarEntryInfo& ent1 = entKey.second;
+ TIntermSymbol* base = ent1.symbol;
+ const TType& type = ent1.symbol->getType();
+ const TString& name = entKey.first;
+ TString mangleName1, mangleName2;
+ type.appendMangledName(mangleName1);
+ EShLanguage stage = ent1.stage;
+ if (currentStage != stage) {
+ preStage = currentStage;
+ currentStage = stage;
+ nextStage = EShLangCount;
+ for (int i = currentStage + 1; i < EShLangCount; i++) {
+ if (inVarMaps[i] != nullptr)
+ nextStage = static_cast<EShLanguage>(i);
+ }
+ }
+ if (base->getQualifier().storage == EvqVaryingIn) {
+ // validate stage in;
+ if (preStage == EShLangCount)
+ return;
+ if (outVarMaps[preStage] != nullptr) {
+ auto ent2 = outVarMaps[preStage]->find(name);
+ if (ent2 != outVarMaps[preStage]->end()) {
+ 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().storage == EvqVaryingOut) {
+ // validate stage out;
+ if (nextStage == EShLangCount)
+ return;
+ if (outVarMaps[nextStage] != nullptr) {
+ auto ent2 = inVarMaps[nextStage]->find(name);
+ if (ent2 != inVarMaps[nextStage]->end()) {
+ 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) {
+ TString err = "Invalid Uniform variable type : " + entKey.first;
+ infoSink.info.message(EPrefixInternalError, err.c_str());
+ hadError = true;
+ }
+ mangleName2.clear();
+ }
+ }
+ }
+ }
+ }
+ TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount];
+ // Use for mark pre stage, to get more interface symbol information.
+ EShLanguage preStage, currentStage, nextStage;
+ // Use for mark current shader stage for resolver
+ TIoMapResolver& resolver;
+ TInfoSink& infoSink;
+ bool& hadError;
- typedef std::vector<int> TSlotSet;
- typedef std::unordered_map<int, TSlotSet> TSlotSetMap;
- TSlotSetMap slots;
+private:
+ TSymbolValidater& operator=(TSymbolValidater&);
+};
- TSlotSet::iterator findSlot(int set, int slot)
- {
- return std::lower_bound(slots[set].begin(), slots[set].end(), slot);
- }
+struct TSlotCollector {
+ TSlotCollector(TIoMapResolver& r, TInfoSink& i) : resolver(r), infoSink(i) { }
- bool checkEmpty(int set, int slot)
- {
- TSlotSet::iterator at = findSlot(set, slot);
- return !(at != slots[set].end() && *at == slot);
+ inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey) {
+ resolver.reserverStorageSlot(entKey.second, infoSink);
+ resolver.reserverResourceSlot(entKey.second, infoSink);
}
+ TIoMapResolver& resolver;
+ TInfoSink& infoSink;
- int reserveSlot(int set, int slot, int size = 1)
- {
- TSlotSet::iterator at = findSlot(set, slot);
+private:
+ TSlotCollector& operator=(TSlotCollector&);
+};
- // 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;
- }
+TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate)
+ : intermediate(intermediate)
+ , nextUniformLocation(intermediate.getUniformLocationBase())
+ , nextInputLocation(0)
+ , nextOutputLocation(0)
+{
+ memset(stageMask, false, sizeof(bool) * (EShLangCount + 1));
+}
- return slot;
- }
+int TDefaultIoResolverBase::getBaseBinding(TResourceType res, unsigned int set) const {
+ return selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
+}
- int getFreeSlot(int set, int base, int size = 1)
- {
- TSlotSet::iterator at = findSlot(set, base);
- if (at == slots[set].end())
- return reserveSlot(set, base, size);
+const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding() const {
+ return intermediate.getResourceSetBinding();
+}
- // 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);
- }
+bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
- virtual bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override = 0;
+bool TDefaultIoResolverBase::doAutoLocationMapping() const { return intermediate.getAutoMapLocations(); }
- virtual int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override = 0;
+TDefaultIoResolverBase::TSlotSet::iterator TDefaultIoResolverBase::findSlot(int set, int slot) {
+ return std::lower_bound(slots[set].begin(), slots[set].end(), slot);
+}
- int resolveSet(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override
- {
- if (type.getQualifier().hasSet())
- return type.getQualifier().layoutSet;
+bool TDefaultIoResolverBase::checkEmpty(int set, int slot) {
+ TSlotSet::iterator at = findSlot(set, slot);
+ return ! (at != slots[set].end() && *at == slot);
+}
- // If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN)
- if (getResourceSetBinding().size() == 1)
- return atoi(getResourceSetBinding()[0].c_str());
+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;
+}
- return 0;
+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;
}
- int resolveUniformLocation(EShLanguage /*stage*/, const char* name, const glslang::TType& type, bool /*is_live*/) override
- {
- // kick out of not doing this
- if (!doAutoLocationMapping())
- return -1;
+ return reserveSlot(set, base, size);
+}
- // 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.getBasicType() == EbtAtomicUint ||
- (type.containsOpaque() && intermediate.getSpv().openGl == 0))
- return -1;
+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().size() == 1) {
+ return ent.newSet = atoi(getResourceSetBinding()[0].c_str());
+ }
+ return ent.newSet = 0;
+}
- // no locations on blocks of built-in variables
- if (type.isStruct()) {
- if (type.getStruct()->size() < 1)
- return -1;
- if ((*type.getStruct())[0].type->isBuiltIn())
- return -1;
+int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+ const TType& type = ent.symbol->getType();
+ const char* name = ent.symbol->getName().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.containsOpaque() && intermediate.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 = intermediate.getUniformLocationOverride(name);
+ if (location != -1) {
+ return ent.newLocation = location;
+ }
+ location = nextUniformLocation;
+ nextUniformLocation += TIntermediate::computeTypeUniformLocationSize(type);
+ return ent.newLocation = location;
+}
- int location = intermediate.getUniformLocationOverride(name);
- if (location != -1)
- return 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, or a built-in variable
+ if (type.getQualifier().hasLocation() || type.isBuiltIn()) {
+ 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;
+}
- location = nextUniformLocation;
+int TDefaultIoResolverBase::resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+ return ent.newComponent = -1;
+}
- nextUniformLocation += TIntermediate::computeTypeUniformLocationSize(type);
+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;
+}
- return location;
+//TDefaultGlslIoResolver
+TResourceType TDefaultGlslIoResolver::getResourceType(const glslang::TType& type) {
+ if (isImageType(type)) {
+ return EResImage;
}
- bool validateInOut(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
- {
- return true;
+ if (isTextureType(type)) {
+ return EResTexture;
}
- int resolveInOutLocation(EShLanguage stage, const char* /*name*/, const TType& type, bool /*is_live*/) override
- {
- // kick out of not doing this
- if (!doAutoLocationMapping())
- return -1;
+ if (isSsboType(type)) {
+ return EResSsbo;
+ }
+ if (isSamplerType(type)) {
+ return EResSampler;
+ }
+ if (isUboType(type)) {
+ return EResUbo;
+ }
+ return EResCount;
+}
- // no locations added if already present, or a built-in variable
- if (type.getQualifier().hasLocation() || type.isBuiltIn())
- return -1;
+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->getName();
+ if (currentStage != stage) {
+ preStage = currentStage;
+ currentStage = stage;
+ }
+ // 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()) {
+ return ent.newLocation = type.getQualifier().layoutLocation;
+ }
+ // no locations added if already present, or a built-in variable
+ if (type.isBuiltIn()) {
+ 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 declarated 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->getName();
+ // 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.containsOpaque() && intermediate.getSpv().openGl == 0)) {
+ return ent.newLocation = -1;
+ }
// no locations on blocks of built-in variables
if (type.isStruct()) {
- if (type.getStruct()->size() < 1)
- return -1;
- if ((*type.getStruct())[0].type->isBuiltIn())
- return -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.
- if (type.getQualifier().isArrayedIo(stage)) {
- TType elementType(type, 0);
- typeLocationSize = TIntermediate::computeTypeLocationSize(elementType, stage);
- } else {
- typeLocationSize = TIntermediate::computeTypeLocationSize(type, stage);
+ if (type.getStruct()->size() < 1) {
+ return ent.newLocation = -1;
+ }
+ if ((*type.getStruct())[0].type->isBuiltIn()) {
+ return ent.newLocation = -1;
+ }
}
- nextLocation += typeLocationSize;
-
- return location;
}
- int resolveInOutComponent(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
- {
- return -1;
+ int location = intermediate.getUniformLocationOverride(name.c_str());
+ if (location != -1) {
+ return ent.newLocation = location;
}
- int resolveInOutIndex(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
- {
- return -1;
+
+ 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 declarated in other stage.
+ //
+ // vs: uniform vec4 a;
+ // fs: layout(..., location = 3,...) uniform vec4 a;
+ hasLocation = true;
+ location = iter->second;
+ }
+ if (! hasLocation) {
+ // No explicit location declaraten 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 declarated in a program.
+ TVarSlotMap varSlotMap;
+ location = getFreeSlot(resourceKey, 0, size);
+ varSlotMap[name] = location;
+ storageSlotMap[resourceKey] = varSlotMap;
}
+ return ent.newLocation = location;
+}
- void notifyBinding(EShLanguage, const char* /*name*/, const TType&, bool /*is_live*/) override {}
- void notifyInOut(EShLanguage, const char* /*name*/, const TType&, bool /*is_live*/) override {}
- void endNotifications(EShLanguage) override {}
- void beginNotifications(EShLanguage) override {}
- void beginResolve(EShLanguage) override {}
- void endResolve(EShLanguage) override {}
+int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+ const TType& type = ent.symbol->getType();
+ const TString& name = ent.symbol->getName();
+ // On OpenGL arrays of opaque types take a seperate binding for each element
+ int numBindings = intermediate.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 = resource;
+ if (resource < EResCount) {
+ if (type.getQualifier().hasBinding()) {
+ ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
+ return ent.newBinding;
+ } else if (ent.live && doAutoBindingMapping()) {
+ // 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;
+ if (! resourceSlotMap[resource].empty()) {
+ TVarSlotMap::iterator iter = resourceSlotMap[resource].find(name);
+ if (iter != resourceSlotMap[resource].end()) {
+ hasBinding = true;
+ ent.newBinding = iter->second;
+ }
+ }
+ if (! hasBinding) {
+ TVarSlotMap varSlotMap;
+ // 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(resource, getBaseBinding(resource, set), numBindings);
+ varSlotMap[name] = binding;
+ resourceSlotMap[resource] = varSlotMap;
+ ent.newBinding = binding;
+ }
+ return ent.newBinding;
+ }
+ }
+ return ent.newBinding = -1;
+}
-protected:
- TDefaultIoResolverBase(TDefaultIoResolverBase&);
- TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&);
+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;
+ }
+}
- const TIntermediate &intermediate;
- int nextUniformLocation;
- int nextInputLocation;
- int nextOutputLocation;
+void TDefaultGlslIoResolver::endResolve(EShLanguage /*stage*/) {
+ // TODO nothing
+}
- // 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;
+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;
}
+}
- static int getLayoutSet(const glslang::TType& type) {
- if (type.getQualifier().hasSet())
- return type.getQualifier().layoutSet;
- else
- return 0;
- }
+void TDefaultGlslIoResolver::endCollect(EShLanguage /*stage*/) {
+ // TODO nothing
+}
- static bool isSamplerType(const glslang::TType& type) {
- return type.getBasicType() == glslang::EbtSampler && type.getSampler().isPureSampler();
+void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
+ const TType& type = ent.symbol->getType();
+ const TString& name = ent.symbol->getName();
+ 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());
+ }
+ }
+ }
+ 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());
+ }
+ }
+ }
+ break;
+ default:
+ break;
}
+}
- static bool isTextureType(const glslang::TType& type) {
- return (type.getBasicType() == glslang::EbtSampler &&
- (type.getSampler().isTexture() || type.getSampler().isSubpass()));
+void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
+ const TType& type = ent.symbol->getType();
+ const TString& name = ent.symbol->getName();
+ int resource = getResourceType(type);
+ if (type.getQualifier().hasBinding()) {
+ TVarSlotMap& varSlotMap = resourceSlotMap[resource];
+ TVarSlotMap::iterator iter = varSlotMap.find(name);
+ int binding = type.getQualifier().layoutBinding;
+ if (iter == varSlotMap.end()) {
+ // Reserve the slots for the ubo, ssbo and opaques who has explicit binding
+ int numBindings = type.isSizedArray() ? type.getCumulativeArraySize() : 1;
+ varSlotMap[name] = binding;
+ reserveSlot(resource, 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());
+ }
+ }
}
+}
- static bool isUboType(const glslang::TType& type) {
- return type.getQualifier().storage == EvqUniform;
- }
-};
+//TDefaultGlslIoResolver end
/*
* Basic implementation of glslang::TIoMapResolver that replaces the
@@ -567,69 +901,51 @@ protected:
/*
* Default resolver
*/
-struct TDefaultIoResolver : public TDefaultIoResolverBase
-{
- TDefaultIoResolver(const TIntermediate &intermediate) : TDefaultIoResolverBase(intermediate) { }
+struct TDefaultIoResolver : public TDefaultIoResolverBase {
+ TDefaultIoResolver(const TIntermediate& intermediate) : TDefaultIoResolverBase(intermediate) { }
- bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& /*type*/, bool /*is_live*/) override
- {
- return true;
+ 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*/, const char* /*name*/, const glslang::TType& type, bool is_live) override
- {
+ 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 = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
-
- if (type.getQualifier().hasBinding()) {
- if (isImageType(type))
- return reserveSlot(set, getBaseBinding(EResImage, set) + type.getQualifier().layoutBinding, numBindings);
-
- if (isTextureType(type))
- return reserveSlot(set, getBaseBinding(EResTexture, set) + type.getQualifier().layoutBinding, numBindings);
-
- if (isSsboType(type))
- return reserveSlot(set, getBaseBinding(EResSsbo, set) + type.getQualifier().layoutBinding, numBindings);
-
- if (isSamplerType(type))
- return reserveSlot(set, getBaseBinding(EResSampler, set) + type.getQualifier().layoutBinding, numBindings);
-
- if (isUboType(type))
- return reserveSlot(set, getBaseBinding(EResUbo, set) + type.getQualifier().layoutBinding, numBindings);
- } else if (is_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
-
- if (isImageType(type))
- return getFreeSlot(set, getBaseBinding(EResImage, set), numBindings);
-
- if (isTextureType(type))
- return getFreeSlot(set, getBaseBinding(EResTexture, set), numBindings);
-
- if (isSsboType(type))
- return getFreeSlot(set, getBaseBinding(EResSsbo, set), numBindings);
-
- if (isSamplerType(type))
- return getFreeSlot(set, getBaseBinding(EResSampler, set), numBindings);
-
- if (isUboType(type))
- return getFreeSlot(set, getBaseBinding(EResUbo, set), numBindings);
+ TResourceType resource = getResourceType(type);
+ if (resource < EResCount) {
+ if (type.getQualifier().hasBinding()) {
+ return ent.newBinding = reserveSlot(
+ set, getBaseBinding(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(resource, set), numBindings);
+ }
}
-
- return -1;
- }
-
-protected:
- 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 ent.newBinding = -1;
}
};
+#ifdef ENABLE_HLSL
/********************************************************************************
The following IO resolver maps types in HLSL register space, as follows:
@@ -647,7 +963,7 @@ t - for shader resource views (SRV)
BYTEADDRESSBUFFER
BUFFER
TBUFFER
-
+
s - for samplers
SAMPLER
SAMPLER1D
@@ -673,98 +989,69 @@ b - for constant buffer views (CBV)
CBUFFER
CONSTANTBUFFER
********************************************************************************/
-struct TDefaultHlslIoResolver : public TDefaultIoResolverBase
-{
- TDefaultHlslIoResolver(const TIntermediate &intermediate) : TDefaultIoResolverBase(intermediate) { }
-
- bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& /*type*/, bool /*is_live*/) override
- {
- return true;
- }
-
- int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override
- {
- const int set = getLayoutSet(type);
-
- if (type.getQualifier().hasBinding()) {
- if (isUavType(type))
- return reserveSlot(set, getBaseBinding(EResUav, set) + type.getQualifier().layoutBinding);
-
- if (isSrvType(type))
- return reserveSlot(set, getBaseBinding(EResTexture, set) + type.getQualifier().layoutBinding);
+struct TDefaultHlslIoResolver : public TDefaultIoResolverBase {
+ TDefaultHlslIoResolver(const TIntermediate& intermediate) : TDefaultIoResolverBase(intermediate) { }
- if (isSamplerType(type))
- return reserveSlot(set, getBaseBinding(EResSampler, set) + type.getQualifier().layoutBinding);
+ bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; }
- if (isUboType(type))
- return reserveSlot(set, getBaseBinding(EResUbo, set) + type.getQualifier().layoutBinding);
- } else if (is_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
-
- if (isUavType(type))
- return getFreeSlot(set, getBaseBinding(EResUav, set));
-
- if (isSrvType(type))
- return getFreeSlot(set, getBaseBinding(EResTexture, set));
-
- if (isSamplerType(type))
- return getFreeSlot(set, getBaseBinding(EResSampler, set));
-
- if (isUboType(type))
- return getFreeSlot(set, getBaseBinding(EResUbo, set));
+ TResourceType getResourceType(const glslang::TType& type) override {
+ if (isUavType(type)) {
+ return EResUav;
}
-
- return -1;
- }
-
-protected:
- // 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;
+ if (isSrvType(type)) {
+ return EResTexture;
+ }
+ if (isSamplerType(type)) {
+ return EResSampler;
+ }
+ if (isUboType(type)) {
+ return EResUbo;
+ }
+ return EResCount;
}
- // Return true if this is a UAV (unordered access view) type:
- static bool isUavType(const glslang::TType& type) {
- if (type.getQualifier().readonly)
- return false;
-
- return (type.getBasicType() == glslang::EbtSampler && type.getSampler().isImage()) ||
- (type.getQualifier().storage == EvqBuffer);
+ 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(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(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();
-
- for (int res = 0; res < EResCount; ++res) {
- somethingToDo = somethingToDo ||
- (intermediate.getShiftBinding(TResourceType(res)) != 0) ||
- intermediate.hasShiftBindingForSet(TResourceType(res));
+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)
+ 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())
@@ -772,47 +1059,191 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSi
else
resolver = &defaultResolver;
}
+ resolver->addStage(stage);
+#else
+ resolver = &defaultResolver;
+#endif
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.functions.empty()) {
+ while (! iter_binding_live.functions.empty()) {
TIntermNode* function = iter_binding_live.functions.back();
iter_binding_live.functions.pop_back();
function->traverse(&iter_binding_live);
}
-
// sort entries by priority. see TVarEntryInfo::TOrderByPriority for info.
- std::sort(uniformVarMap.begin(), uniformVarMap.end(), TVarEntryInfo::TOrderByPriority());
-
+ std::for_each(inVarMap.begin(), inVarMap.end(),
+ [&inVector](TVarLivePair p) { inVector.push_back(p); });
+ std::sort(inVector.begin(), inVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+ std::for_each(outVarMap.begin(), outVarMap.end(),
+ [&outVector](TVarLivePair p) { outVector.push_back(p); });
+ std::sort(outVector.begin(), outVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+ std::for_each(uniformVarMap.begin(), uniformVarMap.end(),
+ [&uniformVector](TVarLivePair p) { uniformVector.push_back(p); });
+ std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
bool hadError = false;
TNotifyInOutAdaptor inOutNotify(stage, *resolver);
TNotifyUniformAdaptor uniformNotify(stage, *resolver);
- TResolverUniformAdaptor uniformResolve(stage, *resolver, infoSink, hadError, intermediate);
- TResolverInOutAdaptor inOutResolve(stage, *resolver, infoSink, hadError, intermediate);
+ TResolverUniformAdaptor uniformResolve(stage, *resolver, infoSink, hadError);
+ TResolverInOutAdaptor inOutResolve(stage, *resolver, infoSink, hadError);
resolver->beginNotifications(stage);
- std::for_each(inVarMap.begin(), inVarMap.end(), inOutNotify);
- std::for_each(outVarMap.begin(), outVarMap.end(), inOutNotify);
- std::for_each(uniformVarMap.begin(), uniformVarMap.end(), uniformNotify);
+ 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);
- std::for_each(inVarMap.begin(), inVarMap.end(), inOutResolve);
- std::for_each(outVarMap.begin(), outVarMap.end(), inOutResolve);
- std::for_each(uniformVarMap.begin(), uniformVarMap.end(), uniformResolve);
+ std::for_each(inVector.begin(), inVector.end(), inOutResolve);
+ std::for_each(inVector.begin(), inVector.end(), [&inVarMap](TVarLivePair p) {
+ auto at = inVarMap.find(p.second.symbol->getName());
+ if (at != inVarMap.end())
+ at->second = p.second;
+ });
+ std::for_each(outVector.begin(), outVector.end(), inOutResolve);
+ std::for_each(outVector.begin(), outVector.end(), [&outVarMap](TVarLivePair p) {
+ auto at = outVarMap.find(p.second.symbol->getName());
+ if (at != outVarMap.end())
+ 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->getName());
+ if (at != uniformVarMap.end())
+ at->second = p.second;
+ });
resolver->endResolve(stage);
-
if (!hadError) {
- // sort by id again, so we can use lower bound to find entries
- std::sort(uniformVarMap.begin(), uniformVarMap.end(), TVarEntryInfo::TOrderById());
TVarSetTraverser iter_iomap(intermediate, inVarMap, outVarMap, uniformVarMap);
root->traverse(&iter_iomap);
}
+ return !hadError;
+}
+// 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();
+ // 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);
+ if (resolver == nullptr) {
+ resolver = &defaultResolver;
+ }
+ resolver->addStage(stage);
+ 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.functions.empty()) {
+ TIntermNode* function = iter_binding_live.functions.back();
+ iter_binding_live.functions.pop_back();
+ function->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, infoSink, hadError);
+ TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError);
+ TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps, outVarMaps, uniformVarMap, hadError);
+ TVarLiveVector uniformVector;
+ resolver->beginResolve(EShLangCount);
+ for (int stage = EShLangVertex; stage < EShLangCount; stage++) {
+ if (inVarMaps[stage] != nullptr) {
+ inOutResolve.setStage(EShLanguage(stage));
+ std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), symbolValidater);
+ std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), inOutResolve);
+ std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), symbolValidater);
+ std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), inOutResolve);
+ }
+ if (uniformVarMap[stage] != nullptr) {
+ uniformResolve.setStage(EShLanguage(stage));
+ // sort entries by priority. see TVarEntryInfo::TOrderByPriority for info.
+ std::for_each(uniformVarMap[stage]->begin(), uniformVarMap[stage]->end(),
+ [&uniformVector](TVarLivePair p) { uniformVector.push_back(p); });
+ }
+ }
+ std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+ std::for_each(uniformVector.begin(), uniformVector.end(), symbolValidater);
+ std::for_each(uniformVector.begin(), uniformVector.end(), uniformResolve);
+ std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+ resolver->endResolve(EShLangCount);
+ 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
+ TVarLiveMap** pUniformVarMap = uniformVarMap;
+ std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) {
+ auto at = pUniformVarMap[stage]->find(p.second.symbol->getName());
+ if (at != pUniformVarMap[stage]->end())
+ at->second = p.second;
+ });
+ TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage],
+ *uniformVarMap[stage]);
+ intermediates[stage]->getTreeRoot()->traverse(&iter_iomap);
+ }
+ }
+ return !hadError;
+ } else {
+ return false;
+ }
+}
+
} // end namespace glslang
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
index 5e0d4391cc..684e88d571 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
@@ -33,11 +33,15 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#ifndef _IOMAPPER_INCLUDED
#define _IOMAPPER_INCLUDED
-#include "../Public/ShaderLang.h"
-
+#include <cstdint>
+#include "LiveTraverser.h"
+#include <unordered_map>
+#include <unordered_set>
//
// A reflection database and its interface, consistent with the OpenGL API reflection queries.
//
@@ -47,17 +51,249 @@ class TInfoSink;
namespace glslang {
class TIntermediate;
+struct TVarEntryInfo {
+ int id;
+ TIntermSymbol* symbol;
+ bool live;
+ int newBinding;
+ int newSet;
+ int newLocation;
+ int newComponent;
+ int newIndex;
+ EShLanguage stage;
+ 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;
+ }
+ };
+};
+
+// Base class for shared TIoMapResolver services, used by several derivations.
+struct TDefaultIoResolverBase : public glslang::TIoMapResolver {
+public:
+ TDefaultIoResolverBase(const TIntermediate& intermediate);
+ typedef std::vector<int> TSlotSet;
+ typedef std::unordered_map<int, TSlotSet> 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(TResourceType res, unsigned int set) const;
+ const std::vector<std::string>& getResourceSetBinding() 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) override {
+ if (stage < EShLangCount)
+ stageMask[stage] = true;
+ }
+ uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
+
+ TSlotSetMap slots;
+
+protected:
+ TDefaultIoResolverBase(TDefaultIoResolverBase&);
+ TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&);
+ const TIntermediate& intermediate;
+ int nextUniformLocation;
+ int nextInputLocation;
+ int nextOutputLocation;
+ bool stageMask[EShLangCount + 1];
+ // 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);
+ }
+};
+
+// Defaulf I/O resolver for OpenGL
+struct TDefaultGlslIoResolver : public TDefaultIoResolverBase {
+public:
+ typedef std::map<TString, int> TVarSlotMap; // <resourceName, location/binding>
+ typedef std::map<int, TVarSlotMap> TSlotMap; // <resourceKey, TVarSlotMap>
+ 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<uint32_t>(stage) <= 0x0000ffff && static_cast<uint32_t>(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<TString, TVarEntryInfo> TVarLiveMap;
+
+// override function "operator=", if a vector<const _Kty, _Ty> 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<const TString, TVarEntryInfo> {
+ TVarLivePair(std::pair<const TString, TVarEntryInfo>& _Right) : pair(_Right.first, _Right.second) {}
+ TVarLivePair& operator=(const TVarLivePair& _Right) {
+ const_cast<TString&>(first) = _Right.first;
+ second = _Right.second;
+ return (*this);
+ }
+};
+typedef std::vector<TVarLivePair> TVarLiveVector;
// 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; }
+};
+// I/O mapper for OpenGL
+class TGlslIoMapper : public TIoMapper {
+public:
+ TGlslIoMapper() {
+ memset(inVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
+ memset(outVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
+ memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
+ memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1));
+ }
+ virtual ~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;
+ }
+ }
// grow the reflection stage by stage
- bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*);
+ bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override;
+ bool doMap(TIoMapResolver*, TInfoSink&) override;
+ TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount],
+ *uniformVarMap[EShLangCount];
+ TIntermediate* intermediates[EShLangCount];
+ bool hadError = false;
};
} // end namespace glslang
#endif // _IOMAPPER_INCLUDED
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
index 64d191b472..51d9300341 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
@@ -187,12 +187,14 @@ bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
//
void TParseContext::constantIndexExpressionCheck(TIntermNode* index)
{
+#ifndef GLSLANG_WEB
TIndexTraverser it(inductiveLoopIds);
index->traverse(&it);
if (it.bad)
error(it.badLoc, "Non-constant-index-expression", "limitations", "");
+#endif
}
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
index f935d4a629..fe51ec93ff 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
@@ -56,8 +56,10 @@ namespace glslang {
//
void TIntermediate::error(TInfoSink& infoSink, const char* message)
{
+#ifndef GLSLANG_WEB
infoSink.info.prefix(EPrefixError);
infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
+#endif
++numErrors;
}
@@ -65,8 +67,10 @@ void TIntermediate::error(TInfoSink& infoSink, const char* message)
// Link-time warning.
void TIntermediate::warn(TInfoSink& infoSink, const char* message)
{
+#ifndef GLSLANG_WEB
infoSink.info.prefix(EPrefixWarning);
infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
+#endif
}
// TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block
@@ -78,9 +82,11 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message)
//
void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
{
+#ifndef GLSLANG_WEB
mergeCallGraphs(infoSink, unit);
mergeModes(infoSink, unit);
mergeTrees(infoSink, unit);
+#endif
}
void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
@@ -98,6 +104,8 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
}
+#ifndef GLSLANG_WEB
+
#define MERGE_MAX(member) member = std::max(member, unit.member)
#define MERGE_TRUE(member) if (unit.member) member = unit.member;
@@ -106,9 +114,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
if (language != unit.language)
error(infoSink, "stages must match when linking into a single stage");
- if (source == EShSourceNone)
- source = unit.source;
- if (source != unit.source)
+ if (getSource() == EShSourceNone)
+ setSource(unit.getSource());
+ if (getSource() != unit.getSource())
error(infoSink, "can't link compilation units from different source languages");
if (treeRoot == nullptr) {
@@ -116,7 +124,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
version = unit.version;
requestedExtensions = unit.requestedExtensions;
} else {
- if ((profile == EEsProfile) != (unit.profile == EEsProfile))
+ if ((isEsProfile()) != (unit.isEsProfile()))
error(infoSink, "Cannot cross link ES and desktop profiles");
else if (unit.profile == ECompatibilityProfile)
profile = ECompatibilityProfile;
@@ -142,18 +150,13 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
if (vertices == TQualifier::layoutNotSet)
vertices = unit.vertices;
else if (vertices != unit.vertices) {
- if (language == EShLangGeometry
-#ifdef NV_EXTENSIONS
- || language == EShLangMeshNV
-#endif
- )
+ if (language == EShLangGeometry || language == EShLangMeshNV)
error(infoSink, "Contradictory layout max_vertices values");
else if (language == EShLangTessControl)
error(infoSink, "Contradictory layout vertices values");
else
assert(0);
}
-#ifdef NV_EXTENSIONS
if (primitives == TQualifier::layoutNotSet)
primitives = unit.primitives;
else if (primitives != unit.primitives) {
@@ -162,7 +165,6 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
else
assert(0);
}
-#endif
if (inputPrimitive == ElgNone)
inputPrimitive = unit.inputPrimitive;
@@ -190,12 +192,14 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
MERGE_TRUE(pointMode);
for (int i = 0; i < 3; ++i) {
- if (localSize[i] > 1)
+ if (!localSizeNotDefault[i] && unit.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)
+ if (localSizeSpecId[i] == TQualifier::layoutNotSet)
localSizeSpecId[i] = unit.localSizeSpecId[i];
else if (localSizeSpecId[i] != unit.localSizeSpecId[i])
error(infoSink, "Contradictory local size specialization ids");
@@ -224,21 +228,16 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
xfbBuffers[b].implicitStride = std::max(xfbBuffers[b].implicitStride, unit.xfbBuffers[b].implicitStride);
if (unit.xfbBuffers[b].contains64BitType)
xfbBuffers[b].contains64BitType = true;
-#ifdef AMD_EXTENSIONS
if (unit.xfbBuffers[b].contains32BitType)
xfbBuffers[b].contains32BitType = true;
if (unit.xfbBuffers[b].contains16BitType)
xfbBuffers[b].contains16BitType = true;
-#endif
// TODO: 4.4 link: enhanced layouts: compare ranges
}
MERGE_TRUE(multiStream);
-
-#ifdef NV_EXTENSIONS
MERGE_TRUE(layoutOverrideCoverage);
MERGE_TRUE(geoPassthroughEXT);
-#endif
for (unsigned int i = 0; i < unit.shiftBinding.size(); ++i) {
if (unit.shiftBinding[i] > 0)
@@ -287,13 +286,8 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
}
// Getting this far means we have two existing trees to merge...
-#ifdef NV_EXTENSIONS
numShaderRecordNVBlocks += unit.numShaderRecordNVBlocks;
-#endif
-
-#ifdef NV_EXTENSIONS
numTaskNVBlocks += unit.numTaskNVBlocks;
-#endif
// Get the top-level globals of each unit
TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence();
@@ -315,6 +309,8 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
}
+#endif
+
// Traverser that seeds an ID map with all built-ins, and tracks the
// maximum ID used.
// (It would be nice to put this in a function, but that causes warnings
@@ -502,6 +498,7 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
//
void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
{
+#ifndef GLSLANG_WEB
bool writeTypeComparison = false;
// Types have to match
@@ -536,7 +533,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
}
// Precise...
- if (! crossStage && symbol.getQualifier().noContraction != unitSymbol.getQualifier().noContraction) {
+ if (! crossStage && symbol.getQualifier().isNoContraction() != unitSymbol.getQualifier().isNoContraction()) {
error(infoSink, "Presence of precise qualifier must match:");
writeTypeComparison = true;
}
@@ -545,9 +542,9 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth ||
symbol.getQualifier().flat != unitSymbol.getQualifier().flat ||
- symbol.getQualifier().sample != unitSymbol.getQualifier().sample ||
- symbol.getQualifier().patch != unitSymbol.getQualifier().patch ||
- symbol.getQualifier().nopersp != unitSymbol.getQualifier().nopersp) {
+ 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:");
writeTypeComparison = true;
}
@@ -595,6 +592,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
if (writeTypeComparison)
infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus \"" <<
unitSymbol.getType().getCompleteString() << "\"\n";
+#endif
}
//
@@ -609,15 +607,12 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
return;
if (numEntryPoints < 1) {
- if (source == EShSourceGlsl)
+ if (getSource() == EShSourceGlsl)
error(infoSink, "Missing entry point: Each stage requires one entry point");
else
warn(infoSink, "Entry point not found");
}
- if (numPushConstants > 1)
- error(infoSink, "Only one push_constant block is allowed per stage");
-
// recursion and missing body checking
checkCallGraphCycles(infoSink);
checkCallGraphBodies(infoSink, keepUncalled);
@@ -625,6 +620,10 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
// overlap/alias/missing I/O, etc.
inOutLocationCheck(infoSink);
+#ifndef GLSLANG_WEB
+ if (getNumPushConstants() > 1)
+ error(infoSink, "Only one push_constant block is allowed per stage");
+
// invocations
if (invocations == TQualifier::layoutNotSet)
invocations = 1;
@@ -642,12 +641,10 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
for (size_t b = 0; b < xfbBuffers.size(); ++b) {
if (xfbBuffers[b].contains64BitType)
RoundToPow2(xfbBuffers[b].implicitStride, 8);
-#ifdef AMD_EXTENSIONS
else if (xfbBuffers[b].contains32BitType)
RoundToPow2(xfbBuffers[b].implicitStride, 4);
else if (xfbBuffers[b].contains16BitType)
RoundToPow2(xfbBuffers[b].implicitStride, 2);
-#endif
// "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
@@ -668,16 +665,11 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
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";
-#ifdef AMD_EXTENSIONS
} else if (xfbBuffers[b].contains32BitType && ! IsMultipleOfPow2(xfbBuffers[b].stride, 4)) {
-#else
- } else if (! IsMultipleOfPow2(xfbBuffers[b].stride, 4)) {
-#endif
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";
}
-#ifdef AMD_EXTENSIONS
// "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)) {
@@ -686,7 +678,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n";
}
-#endif
// "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)) {
@@ -704,7 +695,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
error(infoSink, "At least one shader must specify an output layout(vertices=...)");
break;
case EShLangTessEvaluation:
- if (source == EShSourceGlsl) {
+ if (getSource() == EShSourceGlsl) {
if (inputPrimitive == ElgNone)
error(infoSink, "At least one shader must specify an input layout primitive");
if (vertexSpacing == EvsNone)
@@ -730,8 +721,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
break;
case EShLangCompute:
break;
-
-#ifdef NV_EXTENSIONS
case EShLangRayGenNV:
case EShLangIntersectNV:
case EShLangAnyHitNV:
@@ -764,8 +753,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
if (numTaskNVBlocks > 1)
error(infoSink, "Only one taskNV interface block is allowed per shader");
break;
-#endif
-
default:
error(infoSink, "Unknown Stage.");
break;
@@ -787,6 +774,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
} finalLinkTraverser;
treeRoot->traverse(&finalLinkTraverser);
+#endif
}
//
@@ -973,7 +961,7 @@ void TIntermediate::inOutLocationCheck(TInfoSink& infoSink)
}
}
- if (profile == EEsProfile) {
+ if (isEsProfile()) {
if (numFragOut > 1 && fragOutWithNoLocation)
error(infoSink, "when more than one fragment shader output, all must have location qualifiers");
}
@@ -1066,6 +1054,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
// So, for the case of dvec3, we need two independent ioRanges.
int collision = -1; // no collision
+#ifndef GLSLANG_WEB
if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 &&
(qualifier.isPipeInput() || qualifier.isPipeOutput())) {
// Dealing with dvec3 in/out split across two locations.
@@ -1092,7 +1081,9 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
if (collision < 0)
usedIo[set].push_back(range2);
}
- } else {
+ } else
+#endif
+ {
// Not a dvec3 in/out split across two locations, generic path.
// Need a single IO-range block.
@@ -1106,10 +1097,10 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
}
// combine location and component ranges
- TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.layoutIndex : 0);
+ TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0);
// check for collisions, except for vertex inputs on desktop targeting OpenGL
- if (! (profile != EEsProfile && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
+ if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
collision = checkLocationRange(set, range, type, typeCollision);
if (collision < 0)
@@ -1187,14 +1178,10 @@ int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage)
// 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()
-#ifdef NV_EXTENSIONS
- && !type.getQualifier().isPerView()
-#endif
- )
+ if (type.isSizedArray() && !type.getQualifier().isPerView())
return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage);
else {
-#ifdef NV_EXTENSIONS
+#ifndef GLSLANG_WEB
// unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];"
elementType.getQualifier().perViewNV = false;
#endif
@@ -1273,6 +1260,8 @@ int TIntermediate::computeTypeUniformLocationSize(const TType& type)
return 1;
}
+#ifndef GLSLANG_WEB
+
// 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.
@@ -1285,11 +1274,7 @@ int TIntermediate::addXfbBufferOffset(const TType& type)
TXfbBuffer& buffer = xfbBuffers[qualifier.layoutXfbBuffer];
// compute the range
-#ifdef AMD_EXTENSIONS
unsigned int size = computeTypeXfbSize(type, buffer.contains64BitType, buffer.contains32BitType, buffer.contains16BitType);
-#else
- unsigned int size = computeTypeXfbSize(type, buffer.contains64BitType);
-#endif
buffer.implicitStride = std::max(buffer.implicitStride, qualifier.layoutXfbOffset + size);
TRange range(qualifier.layoutXfbOffset, qualifier.layoutXfbOffset + size - 1);
@@ -1309,15 +1294,10 @@ int TIntermediate::addXfbBufferOffset(const TType& type)
// 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.
-#ifdef AMD_EXTENSIONS
// 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
-#else
-// N.B. Caller must set contains64BitType to false before calling.
-unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains64BitType) const
-#endif
{
// "...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.
@@ -1330,44 +1310,32 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
// TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
assert(type.isSizedArray());
TType elementType(type, 0);
-#ifdef AMD_EXTENSIONS
return type.getOuterArraySize() * computeTypeXfbSize(elementType, contains64BitType, contains16BitType, contains16BitType);
-#else
- return type.getOuterArraySize() * computeTypeXfbSize(elementType, contains64BitType);
-#endif
}
if (type.isStruct()) {
unsigned int size = 0;
bool structContains64BitType = false;
-#ifdef AMD_EXTENSIONS
bool structContains32BitType = false;
bool structContains16BitType = false;
-#endif
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;
-#ifdef AMD_EXTENSIONS
bool memberContains32BitType = false;
bool memberContains16BitType = false;
int memberSize = computeTypeXfbSize(memberType, memberContains64BitType, memberContains32BitType, memberContains16BitType);
-#else
- int memberSize = computeTypeXfbSize(memberType, memberContains64BitType);
-#endif
if (memberContains64BitType) {
structContains64BitType = true;
RoundToPow2(size, 8);
-#ifdef AMD_EXTENSIONS
} else if (memberContains32BitType) {
structContains32BitType = true;
RoundToPow2(size, 4);
} else if (memberContains16BitType) {
structContains16BitType = true;
RoundToPow2(size, 2);
-#endif
}
size += memberSize;
}
@@ -1375,14 +1343,12 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
if (structContains64BitType) {
contains64BitType = true;
RoundToPow2(size, 8);
-#ifdef AMD_EXTENSIONS
} else if (structContains32BitType) {
contains32BitType = true;
RoundToPow2(size, 4);
} else if (structContains16BitType) {
contains16BitType = true;
RoundToPow2(size, 2);
-#endif
}
return size;
}
@@ -1402,7 +1368,6 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
if (type.getBasicType() == EbtDouble || type.getBasicType() == EbtInt64 || type.getBasicType() == EbtUint64) {
contains64BitType = true;
return 8 * numComponents;
-#ifdef AMD_EXTENSIONS
} else if (type.getBasicType() == EbtFloat16 || type.getBasicType() == EbtInt16 || type.getBasicType() == EbtUint16) {
contains16BitType = true;
return 2 * numComponents;
@@ -1412,12 +1377,10 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
contains32BitType = true;
return 4 * numComponents;
}
-#else
- } else
- return 4 * numComponents;
-#endif
}
+#endif
+
const int baseAlignmentVec4Std140 = 16;
// Return the size and alignment of a component of the given type.
@@ -1425,6 +1388,10 @@ const int baseAlignmentVec4Std140 = 16;
// Return value is the alignment..
int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
{
+#ifdef GLSLANG_WEB
+ size = 4; return 4;
+#endif
+
switch (type.getBasicType()) {
case EbtInt64:
case EbtUint64:
@@ -1741,7 +1708,7 @@ int TIntermediate::getBlockSize(const TType& blockType)
int TIntermediate::computeBufferReferenceTypeSize(const TType& type)
{
- assert(type.getBasicType() == EbtReference);
+ assert(type.isReference());
int size = getBlockSize(*type.getReferentType());
int align = type.getBufferReferenceAlignment();
diff --git a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
index f29c93c08e..683290af74 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
@@ -147,23 +147,19 @@ struct TOffsetRange {
TRange offset;
};
+#ifndef GLSLANG_WEB
// Things that need to be tracked per xfb buffer.
struct TXfbBuffer {
-#ifdef AMD_EXTENSIONS
TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false),
contains32BitType(false), contains16BitType(false) { }
-#else
- TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false) { }
-#endif
std::vector<TRange> ranges; // byte offsets that have already been assigned
unsigned int stride;
unsigned int implicitStride;
bool contains64BitType;
-#ifdef AMD_EXTENSIONS
bool contains32BitType;
bool contains16BitType;
-#endif
};
+#endif
// Track a set of strings describing how the module was processed.
// Using the form:
@@ -217,7 +213,6 @@ class TSymbolTable;
class TSymbol;
class TVariable;
-#ifdef NV_EXTENSIONS
//
// Texture and Sampler transformation mode.
//
@@ -226,7 +221,6 @@ enum ComputeDerivativeMode {
LayoutDerivativeGroupQuads, // derivative_group_quadsNV
LayoutDerivativeGroupLinear, // derivative_group_linearNV
};
-#endif
//
// Set of helper functions to help parse and build the tree.
@@ -234,32 +228,36 @@ enum ComputeDerivativeMode {
class TIntermediate {
public:
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
- implicitThisName("@this"), implicitCounterName("@count"),
- language(l), source(EShSourceNone), profile(p), version(v), treeRoot(0),
+ language(l),
+ profile(p), version(v), treeRoot(0),
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
+ invertY(false),
+ useStorageBuffer(false),
+ nanMinMaxClamp(false),
+ depthReplacing(false)
+#ifndef GLSLANG_WEB
+ ,
+ implicitThisName("@this"), implicitCounterName("@count"),
+ source(EShSourceNone),
+ useVulkanMemoryModel(false),
invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet),
inputPrimitive(ElgNone), outputPrimitive(ElgNone),
pixelCenterInteger(false), originUpperLeft(false),
- vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false),
- postDepthCoverage(false), depthLayout(EldNone), depthReplacing(false),
+ vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
+ postDepthCoverage(false), depthLayout(EldNone),
hlslFunctionality1(false),
blendEquations(0), xfbMode(false), multiStream(false),
-#ifdef NV_EXTENSIONS
layoutOverrideCoverage(false),
geoPassthroughEXT(false),
numShaderRecordNVBlocks(0),
computeDerivativeMode(LayoutDerivativeNone),
primitives(TQualifier::layoutNotSet),
numTaskNVBlocks(0),
-#endif
autoMapBindings(false),
autoMapLocations(false),
- invertY(false),
flattenUniformArrays(false),
useUnknownFormat(false),
hlslOffsets(false),
- useStorageBuffer(false),
- useVulkanMemoryModel(false),
hlslIoMapping(false),
useVariablePointers(false),
textureSamplerTransformMode(EShTexSampTransKeep),
@@ -267,160 +265,22 @@ public:
binaryDoubleOutput(false),
usePhysicalStorageBuffer(false),
uniformLocationBase(0)
+#endif
{
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;
+#ifndef GLSLANG_WEB
xfbBuffers.resize(TQualifier::layoutXfbBufferEnd);
-
shiftBinding.fill(0);
+#endif
}
- void setLimits(const TBuiltInResource& r) { resources = r; }
-
- bool postProcess(TIntermNode*, EShLanguage);
- void output(TInfoSink&, bool tree);
- void removeTree();
-
- void setSource(EShSource s) { source = s; }
- EShSource getSource() const { return source; }
- 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 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<std::string>& 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<std::string>& 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; }
- void setInvertY(bool invert)
- {
- invertY = invert;
- if (invertY)
- processes.addProcess("invert-y");
- }
- bool getInvertY() const { return invertY; }
-
- void setFlattenUniformArrays(bool flatten)
- {
- flattenUniformArrays = flatten;
- if (flattenUniformArrays)
- processes.addProcess("flatten-uniform-arrays");
- }
- bool getFlattenUniformArrays() const { return flattenUniformArrays; }
- void setNoStorageFormat(bool b)
- {
- useUnknownFormat = b;
- if (useUnknownFormat)
- processes.addProcess("no-storage-format");
- }
- bool getNoStorageFormat() const { return useUnknownFormat; }
- void setHlslOffsets()
- {
- hlslOffsets = true;
- if (hlslOffsets)
- processes.addProcess("hlsl-offsets");
- }
- bool usingHlslOffsets() const { return hlslOffsets; }
- void setUseStorageBuffer()
- {
- useStorageBuffer = true;
- processes.addProcess("use-storage-buffer");
- }
- bool usingStorageBuffer() const { return useStorageBuffer; }
- void setHlslIoMapping(bool b)
- {
- hlslIoMapping = b;
- if (hlslIoMapping)
- processes.addProcess("hlsl-iomap");
- }
- bool usingHlslIoMapping() { return hlslIoMapping; }
- 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 setUseVariablePointers()
- {
- useVariablePointers = true;
- processes.addProcess("use-variable-pointers");
- }
- bool usingVariablePointers() const { return useVariablePointers; }
-
- template<class T> 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;
- }
-
- void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
void setVersion(int v) { version = v; }
int getVersion() const { return version; }
@@ -451,6 +311,12 @@ public:
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;
default:
processes.addProcess("target-env spirvUnknown");
break;
@@ -466,6 +332,9 @@ public:
case EShTargetVulkan_1_1:
processes.addProcess("target-env vulkan1.1");
break;
+ case EShTargetVulkan_1_2:
+ processes.addProcess("target-env vulkan1.2");
+ break;
default:
processes.addProcess("target-env vulkanUnknown");
break;
@@ -484,9 +353,35 @@ public:
int getNumEntryPoints() const { return numEntryPoints; }
int getNumErrors() const { return numErrors; }
void addPushConstantCount() { ++numPushConstants; }
-#ifdef NV_EXTENSIONS
- void addShaderRecordNVCount() { ++numShaderRecordNVBlocks; }
- void addTaskNVCount() { ++numTaskNVBlocks; }
+ void setLimits(const TBuiltInResource& r) { resources = r; }
+
+ 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 setInvertY(bool invert)
+ {
+ invertY = invert;
+ if (invertY)
+ processes.addProcess("invert-y");
+ }
+ bool getInvertY() const { return invertY; }
+
+#ifdef ENABLE_HLSL
+ void setSource(EShSource s) { source = s; }
+ EShSource getSource() const { return source; }
+#else
+ void setSource(EShSource s) { assert(s == EShSourceGlsl); }
+ EShSource getSource() const { return EShSourceGlsl; }
#endif
bool isRecursive() const { return recursive; }
@@ -565,6 +460,169 @@ public:
void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
+ void setUseStorageBuffer()
+ {
+ useStorageBuffer = true;
+ processes.addProcess("use-storage-buffer");
+ }
+ bool usingStorageBuffer() const { return useStorageBuffer; }
+ void setDepthReplacing() { depthReplacing = true; }
+ bool isDepthReplacing() const { return depthReplacing; }
+ 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 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]; }
+#ifdef GLSLANG_WEB
+ void output(TInfoSink&, bool tree) { }
+
+ bool isEsProfile() const { return false; }
+ bool getXfbMode() const { return false; }
+ bool isMultiStream() const { return false; }
+ TLayoutGeometry getOutputPrimitive() const { return ElgNone; }
+ bool getPostDepthCoverage() const { return false; }
+ bool getEarlyFragmentTests() const { return false; }
+ TLayoutDepth getDepth() const { return EldNone; }
+ bool getPixelCenterInteger() const { return false; }
+ void setOriginUpperLeft() { }
+ bool getOriginUpperLeft() const { return true; }
+ TInterlockOrdering getInterlockOrdering() const { return EioNone; }
+
+ bool getAutoMapBindings() const { return false; }
+ bool getAutoMapLocations() const { return false; }
+ int getNumPushConstants() const { return 0; }
+ void addShaderRecordNVCount() { }
+ void addTaskNVCount() { }
+ void setUseVulkanMemoryModel() { }
+ bool usingVulkanMemoryModel() const { return false; }
+ bool usingPhysicalStorageBuffer() const { return false; }
+ bool usingVariablePointers() const { return false; }
+ unsigned getXfbStride(int buffer) const { return 0; }
+ bool hasLayoutDerivativeModeNone() const { return false; }
+ ComputeDerivativeMode getLayoutDerivativeModeNone() const { return LayoutDerivativeNone; }
+#else
+ void output(TInfoSink&, bool tree);
+
+ bool isEsProfile() const { return profile == EEsProfile; }
+
+ 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<std::string>& 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<std::string>& 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 setUseVariablePointers()
+ {
+ useVariablePointers = true;
+ processes.addProcess("use-variable-pointers");
+ }
+ bool usingVariablePointers() const { return useVariablePointers; }
+
+#ifdef ENABLE_HLSL
+ template<class T> 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 addShaderRecordNVCount() { ++numShaderRecordNVBlocks; }
+ void addTaskNVCount() { ++numTaskNVBlocks; }
+
bool setInvocations(int i)
{
if (invocations != TQualifier::layoutNotSet)
@@ -608,23 +666,14 @@ public:
void setPointMode() { pointMode = true; }
bool getPointMode() const { return pointMode; }
- bool setLocalSize(int dim, int size)
- {
- if (localSize[dim] > 1)
- return size == localSize[dim];
- localSize[dim] = size;
- return true;
- }
- unsigned int getLocalSize(int dim) const { return localSize[dim]; }
-
- bool setLocalSizeSpecId(int dim, int id)
+ bool setInterlockOrdering(TInterlockOrdering o)
{
- if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
- return id == localSizeSpecId[dim];
- localSizeSpecId[dim] = id;
+ if (interlockOrdering != EioNone)
+ return interlockOrdering == o;
+ interlockOrdering = o;
return true;
}
- int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
+ TInterlockOrdering getInterlockOrdering() const { return interlockOrdering; }
void setXfbMode() { xfbMode = true; }
bool getXfbMode() const { return xfbMode; }
@@ -638,14 +687,10 @@ public:
return true;
}
TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
- void setOriginUpperLeft() { originUpperLeft = true; }
- bool getOriginUpperLeft() const { return originUpperLeft; }
- void setPixelCenterInteger() { pixelCenterInteger = true; }
- bool getPixelCenterInteger() const { return pixelCenterInteger; }
- void setEarlyFragmentTests() { earlyFragmentTests = true; }
- bool getEarlyFragmentTests() const { return earlyFragmentTests; }
void setPostDepthCoverage() { postDepthCoverage = true; }
bool getPostDepthCoverage() const { return postDepthCoverage; }
+ void setEarlyFragmentTests() { earlyFragmentTests = true; }
+ bool getEarlyFragmentTests() const { return earlyFragmentTests; }
bool setDepth(TLayoutDepth d)
{
if (depthLayout != EldNone)
@@ -654,29 +699,12 @@ public:
return true;
}
TLayoutDepth getDepth() const { return depthLayout; }
- void setDepthReplacing() { depthReplacing = true; }
- bool isDepthReplacing() const { return depthReplacing; }
-
- void setHlslFunctionality1() { hlslFunctionality1 = true; }
- bool getHlslFunctionality1() const { return hlslFunctionality1; }
-
+ void setOriginUpperLeft() { originUpperLeft = true; }
+ bool getOriginUpperLeft() const { return originUpperLeft; }
+ void setPixelCenterInteger() { pixelCenterInteger = true; }
+ bool getPixelCenterInteger() const { return pixelCenterInteger; }
void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); }
unsigned int getBlendEquations() const { return blendEquations; }
-
- void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee);
- void merge(TInfoSink&, TIntermediate&);
- void finalCheck(TInfoSink&, bool keepUncalled);
-
- void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
- bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
-
- int addUsedLocation(const TQualifier&, const TType&, bool& typeCollision);
- int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision);
- int addUsedOffsets(int binding, int offset, int numOffsets);
- bool addUsedConstantId(int id);
- static int computeTypeLocationSize(const TType&, EShLanguage);
- static int computeTypeUniformLocationSize(const TType&);
-
bool setXfbBufferStride(int buffer, unsigned stride)
{
if (xfbBuffers[buffer].stride != TQualifier::layoutXfbStrideEnd)
@@ -686,28 +714,14 @@ public:
}
unsigned getXfbStride(int buffer) const { return xfbBuffers[buffer].stride; }
int addXfbBufferOffset(const TType&);
-#ifdef AMD_EXTENSIONS
unsigned int computeTypeXfbSize(const TType&, bool& contains64BitType, bool& contains32BitType, bool& contains16BitType) const;
-#else
unsigned int computeTypeXfbSize(const TType&, bool& contains64BitType) const;
-#endif
- 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);
- 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&);
- bool promote(TIntermOperator*);
-
-#ifdef NV_EXTENSIONS
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; }
bool setPrimitives(int m)
{
@@ -717,28 +731,10 @@ public:
return true;
}
int getPrimitives() const { return primitives; }
-#endif
-
const char* addSemanticName(const TString& name)
{
return semanticNameSet.insert(name).first->c_str();
}
-
- 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<std::string, std::string>& 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<std::string>& 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<std::string>& getProcesses() const { return processes.getProcesses(); }
-
void addUniformLocationOverride(const char* nameStr, int location)
{
std::string name = nameStr;
@@ -763,9 +759,98 @@ public:
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
+#endif // GLSLANG_WEB
- const char* const implicitThisName;
- const char* const implicitCounterName;
+#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
+
+ void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee);
+ void merge(TInfoSink&, TIntermediate&);
+ void finalCheck(TInfoSink&, bool keepUncalled);
+
+ 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(const TQualifier&, const TType&, bool& typeCollision);
+ int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision);
+ int addUsedOffsets(int binding, int offset, int numOffsets);
+ bool addUsedConstantId(int id);
+ 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);
+ 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&);
+ 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<std::string, std::string>& 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<std::string>& 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<std::string>& getProcesses() const { return processes.getProcesses(); }
+
+ // Certain explicit conversions are allowed conditionally
+#ifdef GLSLANG_WEB
+ bool getArithemeticInt8Enabled() const { return false; }
+ bool getArithemeticInt16Enabled() const { return false; }
+ bool getArithemeticFloat16Enabled() const { return false; }
+#else
+ bool getArithemeticInt8Enabled() const {
+ return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8);
+ }
+ bool getArithemeticInt16Enabled() const {
+ return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ extensionRequested(E_GL_AMD_gpu_shader_int16) ||
+ extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
+ }
+
+ bool getArithemeticFloat16Enabled() const {
+ return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
+ extensionRequested(E_GL_AMD_gpu_shader_half_float) ||
+ extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16);
+ }
+#endif
protected:
TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
@@ -796,13 +881,21 @@ protected:
bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&);
void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root);
bool isConversionAllowed(TOperator op, TIntermTyped* node) const;
- TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
std::tuple<TBasicType, TBasicType> getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const;
+
+ // JohnK: I think this function should go away.
+ // This data structure is just a log to pass on to back ends.
+ // Versioning and extensions are handled in Version.cpp, with a rich
+ // set of functions for querying stages, versions, extension enable/disabled, etc.
+#ifdef GLSLANG_WEB
+ bool extensionRequested(const char *extension) const { return false; }
+#else
bool extensionRequested(const char *extension) const {return requestedExtensions.find(extension) != requestedExtensions.end();}
+#endif
+
static const char* getResourceName(TResourceType);
const EShLanguage language; // stage, known at construction time
- EShSource source; // source language, known a bit later
std::string entryPointName;
std::string entryPointMangledName;
typedef std::list<TCall> TGraph;
@@ -818,6 +911,20 @@ protected:
int numErrors;
int numPushConstants;
bool recursive;
+ bool invertY;
+ bool useStorageBuffer;
+ bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN
+ bool depthReplacing;
+ int localSize[3];
+ bool localSizeNotDefault[3];
+ int localSizeSpecId[3];
+#ifndef GLSLANG_WEB
+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;
@@ -826,27 +933,22 @@ protected:
bool originUpperLeft;
TVertexSpacing vertexSpacing;
TVertexOrder vertexOrder;
+ TInterlockOrdering interlockOrdering;
bool pointMode;
- int localSize[3];
- int localSizeSpecId[3];
bool earlyFragmentTests;
bool postDepthCoverage;
TLayoutDepth depthLayout;
- bool depthReplacing;
bool hlslFunctionality1;
int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift
bool xfbMode;
std::vector<TXfbBuffer> xfbBuffers; // all the data we need to track per xfb buffer
bool multiStream;
-
-#ifdef NV_EXTENSIONS
bool layoutOverrideCoverage;
bool geoPassthroughEXT;
int numShaderRecordNVBlocks;
ComputeDerivativeMode computeDerivativeMode;
int primitives;
int numTaskNVBlocks;
-#endif
// Base shift values
std::array<unsigned int, EResCount> shiftBinding;
@@ -857,23 +959,29 @@ protected:
std::vector<std::string> resourceSetBinding;
bool autoMapBindings;
bool autoMapLocations;
- bool invertY;
bool flattenUniformArrays;
bool useUnknownFormat;
bool hlslOffsets;
- bool useStorageBuffer;
- bool useVulkanMemoryModel;
bool hlslIoMapping;
bool useVariablePointers;
- std::set<TString> ioAccessed; // set of names of statically read/written I/O that might need extra checking
- std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers
- std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
- std::unordered_set<int> usedConstantId; // specialization constant ids used
std::set<TString> semanticNameSet;
EShTextureSamplerTransformMode textureSamplerTransformMode;
+ bool needToLegalize;
+ bool binaryDoubleOutput;
+ bool usePhysicalStorageBuffer;
+
+ std::unordered_map<std::string, int> uniformLocationOverrides;
+ int uniformLocationBase;
+#endif
+
+ std::unordered_set<int> usedConstantId; // specialization constant ids used
+ std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
+ std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers
+ // set of names of statically read/written I/O that might need extra checking
+ std::set<TString> ioAccessed;
// source code of shader, useful as part of debug information
std::string sourceFile;
std::string sourceText;
@@ -884,13 +992,6 @@ protected:
// for OpModuleProcessed, or equivalent
TProcesses processes;
- bool needToLegalize;
- bool binaryDoubleOutput;
- bool usePhysicalStorageBuffer;
-
- std::unordered_map<std::string, int> uniformLocationOverrides;
- int uniformLocationBase;
-
private:
void operator=(TIntermediate&); // prevent assignments
};
diff --git a/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h b/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
index 02af76a8a3..aa1964fc2e 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
@@ -57,26 +57,91 @@ public:
TParseVersions(TIntermediate& interm, int version, EProfile profile,
const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
bool forwardCompatible, EShMessages messages)
- : infoSink(infoSink), version(version), profile(profile), language(language),
- spvVersion(spvVersion), forwardCompatible(forwardCompatible),
- intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { }
+ :
+#ifndef GLSLANG_WEB
+ forwardCompatible(forwardCompatible),
+ profile(profile),
+#endif
+ infoSink(infoSink), version(version),
+ language(language),
+ spvVersion(spvVersion),
+ intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { }
virtual ~TParseVersions() { }
+ void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
+ void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
+#ifdef GLSLANG_WEB
+ const EProfile profile = EEsProfile;
+ bool isEsProfile() const { return true; }
+ void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc)
+ {
+ if (! (EEsProfile & profileMask))
+ error(loc, "not supported with this profile:", featureDesc, ProfileName(profile));
+ }
+ void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
+ const char* const extensions[], const char* featureDesc)
+ {
+ if ((EEsProfile & profileMask) && (minVersion == 0 || version < minVersion))
+ error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
+ }
+ void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension,
+ const char* featureDesc)
+ {
+ profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc);
+ }
+ void initializeExtensionBehavior() { }
+ void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { }
+ void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { }
+ void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
+ const char* featureDesc) { }
+ void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
+ const char* featureDesc) { }
+ TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; }
+ bool extensionTurnedOn(const char* const extension) { return false; }
+ bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; }
+ void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { }
+ void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { }
+ void checkExtensionStage(const TSourceLoc&, const char* const extension) { }
+ void fullIntegerCheck(const TSourceLoc&, const char* op) { }
+ void doubleCheck(const TSourceLoc&, const char* op) { }
+ bool float16Arithmetic() { return false; }
+ void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
+ bool int16Arithmetic() { return false; }
+ void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
+ bool int8Arithmetic() { return false; }
+ void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
+ void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
+ void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
+ void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
+ bool relaxedErrors() const { return false; }
+ bool suppressWarnings() const { return true; }
+ bool isForwardCompatible() const { return false; }
+#else
+ 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 requireProfile(const TSourceLoc&, int queryProfiles, const char* featureDesc);
- virtual void profileRequires(const TSourceLoc&, int queryProfiles, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc);
- virtual void profileRequires(const TSourceLoc&, int queryProfiles, int minVersion, const char* const extension, const char* featureDesc);
- virtual void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
- virtual void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
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 unimplemented(const TSourceLoc&, 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);
+ 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);
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 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);
@@ -88,24 +153,35 @@ public:
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);
-#ifdef AMD_EXTENSIONS
virtual void float16OpaqueCheck(const TSourceLoc&, const char* op, bool builtIn = false);
-#endif
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 fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
+ virtual void intcoopmatCheck(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; }
+#endif // GLSLANG_WEB
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 bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
- virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
- virtual void checkExtensionStage(const TSourceLoc&, const char* const extension);
- virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
+
+#if defined(GLSLANG_WEB) && !defined(GLSLANG_WEB_DEVEL)
+ void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) { addError(); }
+ void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) { }
+ void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) { addError(); }
+ void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) { }
+#else
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,
@@ -114,6 +190,7 @@ public:
const char* szExtraInfoFormat, ...) = 0;
virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, ...) = 0;
+#endif
void addError() { ++numErrors; }
int getNumErrors() const { return numErrors; }
@@ -127,20 +204,20 @@ public:
void setCurrentString(int string) { currentScanner->setString(string); }
void getPreamble(std::string&);
- bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
- bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
+#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
- EProfile profile; // the declared profile in the shader (core by default)
EShLanguage language; // really the stage
SpvVersion spvVersion;
- bool forwardCompatible; // true if errors are to be given for use of deprecated features
TIntermediate& intermediate; // helper for making and hooking up pieces of the parse tree
protected:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
index c74e44f0fd..d7ff485c0a 100644..100755
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
@@ -545,7 +545,7 @@ int TPpContext::evalToToken(int token, bool shortCircuit, int& res, bool& err, T
case MacroExpandStarted:
break;
case MacroExpandUndef:
- if (! shortCircuit && parseContext.profile == EEsProfile) {
+ 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);
@@ -722,6 +722,7 @@ int TPpContext::CPPline(TPpToken* ppToken)
parseContext.setCurrentLine(lineRes);
if (token != '\n') {
+#ifndef GLSLANG_WEB
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
@@ -731,7 +732,9 @@ int TPpContext::CPPline(TPpToken* ppToken)
parseContext.setCurrentSourceName(sourceName);
hasFile = true;
token = scanToken(ppToken);
- } else {
+ } else
+#endif
+ {
token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken);
if (! fileErr) {
parseContext.setCurrentString(fileRes);
@@ -792,10 +795,8 @@ int TPpContext::CPPpragma(TPpToken* ppToken)
case PpAtomConstUint:
case PpAtomConstInt64:
case PpAtomConstUint64:
-#ifdef AMD_EXTENSIONS
case PpAtomConstInt16:
case PpAtomConstUint16:
-#endif
case PpAtomConstFloat:
case PpAtomConstDouble:
case PpAtomConstFloat16:
@@ -954,18 +955,20 @@ int TPpContext::readCPPline(TPpToken* ppToken)
case PpAtomIfndef:
token = CPPifdef(0, ppToken);
break;
+ case PpAtomLine:
+ token = CPPline(ppToken);
+ break;
+#ifndef GLSLANG_WEB
case PpAtomInclude:
if(!parseContext.isReadingHLSL()) {
parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include");
}
token = CPPinclude(ppToken);
break;
- case PpAtomLine:
- token = CPPline(ppToken);
- break;
case PpAtomPragma:
token = CPPpragma(ppToken);
break;
+#endif
case PpAtomUndef:
token = CPPundef(ppToken);
break;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
index cc003a8d12..cc003a8d12 100644..100755
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
index f6f52d7d55..c293af3c1e 100644..100755
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
@@ -142,6 +142,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
ch = getChar();
int firstDecimal = len;
+#ifdef ENABLE_HLSL
// 1.#INF or -1.#INF
if (ch == '#' && (ifdepth > 0 || parseContext.intermediate.getSource() == EShSourceHlsl)) {
if ((len < 2) ||
@@ -169,6 +170,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
}
}
}
+#endif
// Consume leading-zero digits after the decimal point
while (ch == '0') {
@@ -257,6 +259,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
// Suffix:
bool isDouble = false;
bool isFloat16 = false;
+#ifndef GLSLANG_WEB
if (ch == 'l' || ch == 'L') {
if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl)
parseContext.doubleCheck(ppToken->loc, "double floating-point suffix");
@@ -295,11 +298,15 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
saveName(ch);
isFloat16 = true;
}
- } else if (ch == 'f' || ch == 'F') {
+ } else
+#endif
+ if (ch == 'f' || ch == 'F') {
+#ifndef GLSLANG_WEB
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");
+#endif
if (ifdepth == 0 && !hasDecimalOrExponent)
parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
saveName(ch);
@@ -468,9 +475,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
static const int Num_Int64_Extensions = sizeof(Int64_Extensions) / sizeof(Int64_Extensions[0]);
static const char* const Int16_Extensions[] = {
-#ifdef AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
-#endif
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]);
@@ -579,6 +584,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
ppToken->name[len++] = (char)ch;
isUnsigned = true;
+#ifndef GLSLANG_WEB
int nextCh = getch();
if (nextCh == 'l' || nextCh == 'L') {
if (len < MaxTokenLength)
@@ -587,7 +593,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
} else
ungetch();
-#ifdef AMD_EXTENSIONS
nextCh = getch();
if ((nextCh == 's' || nextCh == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
@@ -596,12 +601,10 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
isInt16 = true;
} else
ungetch();
-#endif
} else if (ch == 'l' || ch == 'L') {
if (len < MaxTokenLength)
ppToken->name[len++] = (char)ch;
isInt64 = true;
-#ifdef AMD_EXTENSIONS
} else if ((ch == 's' || ch == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
if (len < MaxTokenLength)
@@ -689,6 +692,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
ppToken->name[len++] = (char)ch;
isUnsigned = true;
+#ifndef GLSLANG_WEB
int nextCh = getch();
if (nextCh == 'l' || nextCh == 'L') {
if (len < MaxTokenLength)
@@ -697,7 +701,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
} else
ungetch();
-#ifdef AMD_EXTENSIONS
nextCh = getch();
if ((nextCh == 's' || nextCh == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
@@ -706,12 +709,10 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
isInt16 = true;
} else
ungetch();
-#endif
} else if (ch == 'l' || ch == 'L') {
if (len < MaxTokenLength)
ppToken->name[len++] = (char)ch;
isInt64 = true;
-#ifdef AMD_EXTENSIONS
} else if ((ch == 's' || ch == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
if (len < MaxTokenLength)
@@ -780,6 +781,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
ppToken->name[len++] = (char)ch;
isUnsigned = true;
+#ifndef GLSLANG_WEB
int nextCh = getch();
if (nextCh == 'l' || nextCh == 'L') {
if (len < MaxTokenLength)
@@ -788,7 +790,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
} else
ungetch();
-#ifdef AMD_EXTENSIONS
nextCh = getch();
if ((nextCh == 's' || nextCh == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
@@ -797,12 +798,10 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
isInt16 = true;
} else
ungetch();
-#endif
} else if (ch == 'l' || ch == 'L') {
if (len < MaxTokenLength)
ppToken->name[len++] = (char)ch;
isInt64 = true;
-#ifdef AMD_EXTENSIONS
} else if ((ch == 's' || ch == 'S') &&
pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
if (len < MaxTokenLength)
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
index ac9d8ac351..7ed58703f2 100644..100755
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
@@ -116,6 +116,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken
int atom = stream[currentPos++].get(*ppToken);
ppToken->loc = parseContext.getCurrentLoc();
+#ifndef GLSLANG_WEB
// Check for ##, unless the current # is the last character
if (atom == '#') {
if (peekToken('#')) {
@@ -125,6 +126,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken
atom = PpAtomPaste;
}
}
+#endif
return atom;
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp b/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
index ae95688ae8..83a3230f51 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
@@ -37,6 +37,8 @@
// propagate the 'noContraction' qualifier.
//
+#ifndef GLSLANG_WEB
+
#include "propagateNoContraction.h"
#include <cstdlib>
@@ -79,7 +81,7 @@ typedef std::unordered_set<glslang::TIntermBranch*> ReturnBranchNodeSet;
// the node has 'noContraction' qualifier, otherwise false.
bool isPreciseObjectNode(glslang::TIntermTyped* node)
{
- return node->getType().getQualifier().noContraction;
+ return node->getType().getQualifier().isNoContraction();
}
// Returns true if the opcode is a dereferencing one.
@@ -864,3 +866,5 @@ void PropagateNoContraction(const glslang::TIntermediate& intermediate)
}
}
};
+
+#endif // GLSLANG_WEB \ No newline at end of file
diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
index a09a04880e..b09367113c 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
@@ -33,6 +33,8 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#include "../Include/Common.h"
#include "reflection.h"
#include "LiveTraverser.h"
@@ -110,6 +112,10 @@ public:
TReflection::TMapIndexToReflection &ioItems =
input ? reflection.indexToPipeInput : reflection.indexToPipeOutput;
+
+ TReflection::TNameToIndex &ioMapper =
+ input ? reflection.pipeInNameToIndex : reflection.pipeOutNameToIndex;
+
if (reflection.options & EShReflectionUnwrapIOBlocks) {
bool anonymous = IsAnonymous(name);
@@ -127,12 +133,13 @@ public:
blowUpIOAggregate(input, baseName, type);
}
} else {
- TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name.c_str());
- if (it == reflection.nameToIndex.end()) {
- reflection.nameToIndex[name.c_str()] = (int)ioItems.size();
+ 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<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<EShLanguageMask>(stages | 1 << intermediate.getStage());
} else {
@@ -396,7 +403,7 @@ public:
topLevelArrayStride = variables.back().arrayStride;
}
- if ((reflection.options & EShReflectionSeparateBuffers) && terminalType->getBasicType() == EbtAtomicUint)
+ if ((reflection.options & EShReflectionSeparateBuffers) && terminalType->isAtomic())
reflection.atomicCounterUniformIndices.push_back(uniformIndex);
variables.back().topLevelArrayStride = topLevelArrayStride;
@@ -554,15 +561,18 @@ public:
bool blockParent = (base->getType().getBasicType() == EbtBlock && base->getQualifier().storage == EvqBuffer);
if (strictArraySuffix && blockParent) {
- const TTypeList& typeList = *base->getType().getStruct();
+ TType structDerefType(base->getType(), 0);
+
+ const TType &structType = base->getType().isArray() ? structDerefType : base->getType();
+ const TTypeList& typeList = *structType.getStruct();
TVector<int> memberOffsets;
memberOffsets.resize(typeList.size());
- getOffsets(base->getType(), memberOffsets);
+ getOffsets(structType, memberOffsets);
for (int i = 0; i < (int)typeList.size(); ++i) {
- TType derefType(base->getType(), i);
+ TType derefType(structType, i);
TString name = baseName;
if (name.size() > 0)
name.append(".");
@@ -573,7 +583,7 @@ public:
if (derefType.isArray() && derefType.isStruct()) {
name.append("[0]");
blowUpActiveAggregate(TType(derefType, 0), name, derefs, derefs.end(), memberOffsets[i],
- blockIndex, 0, getArrayStride(base->getType(), derefType),
+ blockIndex, 0, getArrayStride(structType, derefType),
base->getQualifier().storage, false);
} else {
blowUpActiveAggregate(derefType, name, derefs, derefs.end(), memberOffsets[i], blockIndex,
@@ -701,7 +711,6 @@ public:
case EsdBuffer:
return GL_SAMPLER_BUFFER;
}
-#ifdef AMD_EXTENSIONS
case EbtFloat16:
switch ((int)sampler.dim) {
case Esd1D:
@@ -730,7 +739,6 @@ public:
case EsdBuffer:
return GL_FLOAT16_SAMPLER_BUFFER_AMD;
}
-#endif
case EbtInt:
switch ((int)sampler.dim) {
case Esd1D:
@@ -793,7 +801,6 @@ public:
case EsdBuffer:
return GL_IMAGE_BUFFER;
}
-#ifdef AMD_EXTENSIONS
case EbtFloat16:
switch ((int)sampler.dim) {
case Esd1D:
@@ -812,7 +819,6 @@ public:
case EsdBuffer:
return GL_FLOAT16_IMAGE_BUFFER_AMD;
}
-#endif
case EbtInt:
switch ((int)sampler.dim) {
case Esd1D:
@@ -878,9 +884,7 @@ public:
switch (type.getBasicType()) {
case EbtFloat: return GL_FLOAT_VEC2 + offset;
case EbtDouble: return GL_DOUBLE_VEC2 + offset;
-#ifdef AMD_EXTENSIONS
case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset;
-#endif
case EbtInt: return GL_INT_VEC2 + offset;
case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset;
case EbtInt64: return GL_INT64_ARB + offset;
@@ -940,7 +944,6 @@ public:
default: return 0;
}
}
-#ifdef AMD_EXTENSIONS
case EbtFloat16:
switch (type.getMatrixCols()) {
case 2:
@@ -965,7 +968,6 @@ public:
default: return 0;
}
}
-#endif
default:
return 0;
}
@@ -974,9 +976,7 @@ public:
switch (type.getBasicType()) {
case EbtFloat: return GL_FLOAT;
case EbtDouble: return GL_DOUBLE;
-#ifdef AMD_EXTENSIONS
case EbtFloat16: return GL_FLOAT16_NV;
-#endif
case EbtInt: return GL_INT;
case EbtUint: return GL_UNSIGNED_INT;
case EbtInt64: return GL_INT64_ARB;
@@ -1093,6 +1093,7 @@ void TReflection::buildAttributeReflection(EShLanguage stage, const TIntermediat
// 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());
@@ -1101,6 +1102,7 @@ void TReflection::buildCounterIndices(const TIntermediate& intermediate)
if (index >= 0)
indexToUniformBlock[i].counterIndex = index;
}
+#endif
}
// build Shader Stages mask for all uniforms
@@ -1198,3 +1200,5 @@ void TReflection::dump()
}
} // end namespace glslang
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.h b/thirdparty/glslang/glslang/MachineIndependent/reflection.h
index 44b17a05ad..efdc8934fb 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/reflection.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.h
@@ -33,6 +33,8 @@
// POSSIBILITY OF SUCH DAMAGE.
//
+#ifndef GLSLANG_WEB
+
#ifndef _REFLECTION_INCLUDED
#define _REFLECTION_INCLUDED
@@ -150,6 +152,20 @@ public:
// 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; }
@@ -187,6 +203,8 @@ protected:
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;
@@ -201,3 +219,5 @@ protected:
} // end namespace glslang
#endif // _REFLECTION_INCLUDED
+
+#endif // GLSLANG_WEB \ No newline at end of file
diff --git a/thirdparty/glslang/glslang/OSDependent/Web/glslang.after.js b/thirdparty/glslang/glslang/OSDependent/Web/glslang.after.js
new file mode 100644
index 0000000000..c2cfc35a48
--- /dev/null
+++ b/thirdparty/glslang/glslang/OSDependent/Web/glslang.after.js
@@ -0,0 +1,26 @@
+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;
+ };
+})();
diff --git a/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp b/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp
new file mode 100644
index 0000000000..6cb93fe27e
--- /dev/null
+++ b/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp
@@ -0,0 +1,269 @@
+//
+// 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 <cstdio>
+#include <cstdint>
+#include <memory>
+
+#ifdef __EMSCRIPTEN__
+#include <emscripten.h>
+#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,
+
+ /* .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, 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<EShLanguage>(stage_int);
+
+ 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_1);
+ shader.setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_3);
+ 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<uint32_t>* output = new std::vector<uint32_t>;
+ 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<std::vector<uint32_t>*>(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, &output, &output_len);
+ assert(output != nullptr);
+ assert(output_len != 0);
+ destroy_output_buffer(id);
+ return 0;
+}
+#endif // ifndef __EMSCRIPTEN__
diff --git a/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js b/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js
new file mode 100644
index 0000000000..7d3fd0234c
--- /dev/null
+++ b/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js
@@ -0,0 +1,45 @@
+Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug) {
+ gen_debug = !!gen_debug;
+
+ var shader_stage_int;
+ if (shader_stage === 'vertex') {
+ shader_stage_int = 0;
+ } else if (shader_stage === 'fragment') {
+ shader_stage_int = 4;
+ } else if (shader_stage === 'compute') {
+ shader_stage_int = 5;
+ } else {
+ throw new Error("shader_stage must be 'vertex', 'fragment', or 'compute'");
+ }
+
+ var p_output = Module['_malloc'](4);
+ var p_output_len = Module['_malloc'](4);
+ var id = ccall('convert_glsl_to_spirv',
+ 'number',
+ ['string', 'number', 'boolean', 'number', 'number'],
+ [glsl, shader_stage_int, gen_debug, 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) {
+ var compiled = Module['compileGLSLZeroCopy'](glsl, shader_stage, gen_debug);
+ var ret = compiled['data'].slice()
+ compiled['free']();
+ return ret;
+};
diff --git a/thirdparty/glslang/glslang/Public/ShaderLang.h b/thirdparty/glslang/glslang/Public/ShaderLang.h
index 33f05e2cdf..4fe5c7df19 100644..100755
--- a/thirdparty/glslang/glslang/Public/ShaderLang.h
+++ b/thirdparty/glslang/glslang/Public/ShaderLang.h
@@ -68,7 +68,7 @@
// This should always increase, as some paths to do not consume
// a more major number.
// It should increment by one when new functionality is added.
-#define GLSLANG_MINOR_VERSION 12
+#define GLSLANG_MINOR_VERSION 13
//
// Call before doing any other compiler/linker operations.
@@ -126,36 +126,38 @@ class TType;
typedef enum {
EShSourceNone,
- EShSourceGlsl,
- EShSourceHlsl,
-} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead
+ EShSourceGlsl, // GLSL, includes ESSL (OpenGL ES GLSL)
+ EShSourceHlsl, // HLSL
+} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead
typedef enum {
- EShClientNone,
+ EShClientNone, // use when there is no client, e.g. for validation
EShClientVulkan,
EShClientOpenGL,
} EShClient;
typedef enum {
EShTargetNone,
- EShTargetSpv, // preferred spelling
+ EShTargetSpv, // SPIR-V (preferred spelling)
EshTargetSpv = EShTargetSpv, // legacy spelling
} EShTargetLanguage;
typedef enum {
- EShTargetVulkan_1_0 = (1 << 22),
- EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),
- EShTargetOpenGL_450 = 450,
+ 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
+ EShTargetOpenGL_450 = 450, // OpenGL
} EShTargetClientVersion;
typedef EShTargetClientVersion EshTargetClientVersion;
typedef enum {
- EShTargetSpv_1_0 = (1 << 16),
- EShTargetSpv_1_1 = (1 << 16) | (1 << 8),
- EShTargetSpv_1_2 = (1 << 16) | (2 << 8),
- EShTargetSpv_1_3 = (1 << 16) | (3 << 8),
- EShTargetSpv_1_4 = (1 << 16) | (4 << 8),
+ 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
} EShTargetLanguageVersion;
struct TInputLanguage {
@@ -432,15 +434,42 @@ public:
void addUniformLocationOverride(const char* name, int loc);
void setUniformLocationBase(int base);
void setInvertY(bool invert);
+#ifdef ENABLE_HLSL
void setHlslIoMapping(bool hlslIoMap);
void setFlattenUniformArrays(bool flatten);
+#endif
void setNoStorageFormat(bool useUnknownFormat);
+ void setNanMinMaxClamp(bool nanMinMaxClamp);
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
// 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 the 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.
+ //
+ // See the definitions of TEnvironment, EShSource, EShLanguage,
+ // and EShClient for choices and more detail.
+ //
+ // setEnvClient: The client that will be hosting the execution, and it's 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;
@@ -458,8 +487,15 @@ public:
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
// Interface to #include handlers.
//
@@ -610,6 +646,8 @@ private:
TShader& operator=(TShader&);
};
+#ifndef GLSLANG_WEB
+
//
// A reflection database and its interface, consistent with the OpenGL API reflection queries.
//
@@ -645,8 +683,9 @@ protected:
const TType* type;
};
-class TReflection;
-class TIoMapper;
+class TReflection;
+class TIoMapper;
+struct TVarEntryInfo;
// Allows to customize the binding layout after linking.
// All used uniform variables will invoke at least validateBinding.
@@ -667,53 +706,65 @@ class TIoMapper;
// 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.
+// 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 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, const char* name, const TType& type, bool is_live) = 0;
- // Notification of a uniform variable
- virtual void notifyBinding(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0;
- // Notification of a in or out variable
- virtual void notifyInOut(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0;
- // Called by mapIO when it has finished the notify pass
- virtual void endNotifications(EShLanguage stage) = 0;
- // Called by mapIO when it starts its notify pass for the given stage
- virtual void beginNotifications(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;
+ 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) = 0;
};
+#endif // GLSLANG_WEB
+
// 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().
@@ -725,7 +776,7 @@ public:
TProgram();
virtual ~TProgram();
void addShader(TShader* shader) { stages[shader->stage].push_back(shader); }
-
+ std::list<TShader*>& getShaders(EShLanguage stage) { return stages[stage]; }
// Link Validation interface
bool link(EShMessages);
const char* getInfoLog();
@@ -733,14 +784,15 @@ public:
TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
+#ifndef GLSLANG_WEB
+
// Reflection Interface
// call first, to do liveness analysis, index mapping, etc.; returns false on failure
- bool buildReflection(int opts = EShReflectionDefault);
-
+ bool buildReflection(int opts = EShReflectionDefault);
unsigned getLocalSize(int dim) const; // return dim'th local size
int getReflectionIndex(const char *name) const;
-
+ int getReflectionPipeIOIndex(const char* name, const bool inOrOut) const;
int getNumUniformVariables() const;
const TObjectReflection& getUniform(int index) const;
int getNumUniformBlocks() const;
@@ -770,6 +822,9 @@ public:
// 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(); }
@@ -819,11 +874,11 @@ public:
const TType *getAttributeTType(int index) const { return getPipeInput(index).getType(); }
void dumpReflection();
-
// 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.
- bool mapIO(TIoMapResolver* resolver = NULL);
+ bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
+#endif
protected:
bool linkStage(EShLanguage, EShMessages);
@@ -833,8 +888,9 @@ protected:
TIntermediate* intermediate[EShLangCount];
bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
TInfoSink* infoSink;
+#ifndef GLSLANG_WEB
TReflection* reflection;
- TIoMapper* ioMapper;
+#endif
bool linked;
private:
diff --git a/thirdparty/glslang/patches/fix-mingw-snprintf.patch b/thirdparty/glslang/patches/fix-mingw-snprintf.patch
new file mode 100644
index 0000000000..2a51bc1f22
--- /dev/null
+++ b/thirdparty/glslang/patches/fix-mingw-snprintf.patch
@@ -0,0 +1,15 @@
+diff --git a/thirdparty/glslang/glslang/Include/Common.h b/thirdparty/glslang/glslang/Include/Common.h
+index 733a790cfd..2c511bc1c5 100644
+--- a/thirdparty/glslang/glslang/Include/Common.h
++++ b/thirdparty/glslang/glslang/Include/Common.h
+@@ -50,7 +50,9 @@ std::string to_string(const T& val) {
+ }
+ #endif
+
+-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
++// -- GODOT start --
++#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) /* || defined MINGW_HAS_SECURE_API */
++// -- GODOT end --
+ #include <basetsd.h>
+ #ifndef snprintf
+ #define snprintf sprintf_s
diff --git a/thirdparty/mbedtls/include/mbedtls/config.h b/thirdparty/mbedtls/include/mbedtls/config.h
index 8d9c31a504..834cced87f 100644
--- a/thirdparty/mbedtls/include/mbedtls/config.h
+++ b/thirdparty/mbedtls/include/mbedtls/config.h
@@ -2542,9 +2542,7 @@
*
* This modules adds support for the VIA PadLock on x86.
*/
-// -- GODOT start --
-// #define MBEDTLS_PADLOCK_C
-// -- GODOT end --
+#define MBEDTLS_PADLOCK_C
/**
* \def MBEDTLS_PEM_PARSE_C
diff --git a/thirdparty/mbedtls/include/mbedtls/version.h b/thirdparty/mbedtls/include/mbedtls/version.h
index aeffb16699..8e2ce03c32 100644
--- a/thirdparty/mbedtls/include/mbedtls/version.h
+++ b/thirdparty/mbedtls/include/mbedtls/version.h
@@ -40,16 +40,16 @@
*/
#define MBEDTLS_VERSION_MAJOR 2
#define MBEDTLS_VERSION_MINOR 16
-#define MBEDTLS_VERSION_PATCH 4
+#define MBEDTLS_VERSION_PATCH 5
/**
* The single version number has the following structure:
* MMNNPP00
* Major version | Minor version | Patch version
*/
-#define MBEDTLS_VERSION_NUMBER 0x02100400
-#define MBEDTLS_VERSION_STRING "2.16.4"
-#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.16.4"
+#define MBEDTLS_VERSION_NUMBER 0x02100500
+#define MBEDTLS_VERSION_STRING "2.16.5"
+#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.16.5"
#if defined(MBEDTLS_VERSION_C)
diff --git a/thirdparty/mbedtls/library/bignum.c b/thirdparty/mbedtls/library/bignum.c
index 6713bcbf6f..87ccf42fad 100644
--- a/thirdparty/mbedtls/library/bignum.c
+++ b/thirdparty/mbedtls/library/bignum.c
@@ -157,9 +157,10 @@ int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs )
if( nblimbs > MBEDTLS_MPI_MAX_LIMBS )
return( MBEDTLS_ERR_MPI_ALLOC_FAILED );
- /* Actually resize up in this case */
+ /* Actually resize up if there are currently fewer than nblimbs limbs. */
if( X->n <= nblimbs )
return( mbedtls_mpi_grow( X, nblimbs ) );
+ /* After this point, then X->n > nblimbs and in particular X->n > 0. */
for( i = X->n - 1; i > 0; i-- )
if( X->p[i] != 0 )
@@ -198,7 +199,7 @@ int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y )
if( X == Y )
return( 0 );
- if( Y->p == NULL )
+ if( Y->n == 0 )
{
mbedtls_mpi_free( X );
return( 0 );
diff --git a/thirdparty/mbedtls/library/cipher.c b/thirdparty/mbedtls/library/cipher.c
index 273997577b..8d010b59ac 100644
--- a/thirdparty/mbedtls/library/cipher.c
+++ b/thirdparty/mbedtls/library/cipher.c
@@ -361,6 +361,10 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
*olen = 0;
block_size = mbedtls_cipher_get_block_size( ctx );
+ if ( 0 == block_size )
+ {
+ return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
+ }
if( ctx->cipher_info->mode == MBEDTLS_MODE_ECB )
{
@@ -396,11 +400,6 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
}
#endif
- if ( 0 == block_size )
- {
- return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
- }
-
if( input == output &&
( ctx->unprocessed_len != 0 || ilen % block_size ) )
{
@@ -459,11 +458,6 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
*/
if( 0 != ilen )
{
- if( 0 == block_size )
- {
- return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
- }
-
/* Encryption: only cache partial blocks
* Decryption w/ padding: always keep at least one whole block
* Decryption w/o padding: only cache partial blocks
diff --git a/thirdparty/mbedtls/library/ecdsa.c b/thirdparty/mbedtls/library/ecdsa.c
index 3cf3d7cc4f..6b72e0d927 100644
--- a/thirdparty/mbedtls/library/ecdsa.c
+++ b/thirdparty/mbedtls/library/ecdsa.c
@@ -297,7 +297,7 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
*p_sign_tries = 0;
do
{
- if( *p_sign_tries++ > 10 )
+ if( (*p_sign_tries)++ > 10 )
{
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
goto cleanup;
@@ -310,7 +310,7 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
*p_key_tries = 0;
do
{
- if( *p_key_tries++ > 10 )
+ if( (*p_key_tries)++ > 10 )
{
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
goto cleanup;
diff --git a/thirdparty/mbedtls/library/entropy_poll.c b/thirdparty/mbedtls/library/entropy_poll.c
index ba56b70f77..4556f88a55 100644
--- a/thirdparty/mbedtls/library/entropy_poll.c
+++ b/thirdparty/mbedtls/library/entropy_poll.c
@@ -61,43 +61,28 @@
#define _WIN32_WINNT 0x0400
#endif
#include <windows.h>
-#include <bcrypt.h>
-#if defined(_MSC_VER) && _MSC_VER <= 1600
-/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and
- * <intsafe.h> are included, as they redefine a number of <TYPE>_MAX constants.
- * These constants are guaranteed to be the same, though, so we suppress the
- * warning when including intsafe.h.
- */
-#pragma warning( push )
-#pragma warning( disable : 4005 )
-#endif
-#include <intsafe.h>
-#if defined(_MSC_VER) && _MSC_VER <= 1600
-#pragma warning( pop )
-#endif
+#include <wincrypt.h>
int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len,
size_t *olen )
{
- ULONG len_as_ulong = 0;
+ HCRYPTPROV provider;
((void) data);
*olen = 0;
- /*
- * BCryptGenRandom takes ULONG for size, which is smaller than size_t on
- * 64-bit Windows platforms. Ensure len's value can be safely converted into
- * a ULONG.
- */
- if ( FAILED( SizeTToULong( len, &len_as_ulong ) ) )
+ if( CryptAcquireContext( &provider, NULL, NULL,
+ PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) == FALSE )
{
return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
}
- if ( !BCRYPT_SUCCESS( BCryptGenRandom( NULL, output, len_as_ulong, BCRYPT_USE_SYSTEM_PREFERRED_RNG ) ) )
+ if( CryptGenRandom( provider, (DWORD) len, output ) == FALSE )
{
+ CryptReleaseContext( provider, 0 );
return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
}
+ CryptReleaseContext( provider, 0 );
*olen = len;
return( 0 );
diff --git a/thirdparty/mbedtls/library/pkparse.c b/thirdparty/mbedtls/library/pkparse.c
index ae210bca6a..d5004577a1 100644
--- a/thirdparty/mbedtls/library/pkparse.c
+++ b/thirdparty/mbedtls/library/pkparse.c
@@ -678,6 +678,32 @@ int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
#if defined(MBEDTLS_RSA_C)
/*
+ * Wrapper around mbedtls_asn1_get_mpi() that rejects zero.
+ *
+ * The value zero is:
+ * - never a valid value for an RSA parameter
+ * - interpreted as "omitted, please reconstruct" by mbedtls_rsa_complete().
+ *
+ * Since values can't be omitted in PKCS#1, passing a zero value to
+ * rsa_complete() would be incorrect, so reject zero values early.
+ */
+static int asn1_get_nonzero_mpi( unsigned char **p,
+ const unsigned char *end,
+ mbedtls_mpi *X )
+{
+ int ret;
+
+ ret = mbedtls_asn1_get_mpi( p, end, X );
+ if( ret != 0 )
+ return( ret );
+
+ if( mbedtls_mpi_cmp_int( X, 0 ) == 0 )
+ return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
+
+ return( 0 );
+}
+
+/*
* Parse a PKCS#1 encoded private RSA key
*/
static int pk_parse_key_pkcs1_der( mbedtls_rsa_context *rsa,
@@ -729,54 +755,84 @@ static int pk_parse_key_pkcs1_der( mbedtls_rsa_context *rsa,
}
/* Import N */
- if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
- MBEDTLS_ASN1_INTEGER ) ) != 0 ||
- ( ret = mbedtls_rsa_import_raw( rsa, p, len, NULL, 0, NULL, 0,
- NULL, 0, NULL, 0 ) ) != 0 )
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_rsa_import( rsa, &T, NULL, NULL,
+ NULL, NULL ) ) != 0 )
goto cleanup;
- p += len;
/* Import E */
- if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
- MBEDTLS_ASN1_INTEGER ) ) != 0 ||
- ( ret = mbedtls_rsa_import_raw( rsa, NULL, 0, NULL, 0, NULL, 0,
- NULL, 0, p, len ) ) != 0 )
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_rsa_import( rsa, NULL, NULL, NULL,
+ NULL, &T ) ) != 0 )
goto cleanup;
- p += len;
/* Import D */
- if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
- MBEDTLS_ASN1_INTEGER ) ) != 0 ||
- ( ret = mbedtls_rsa_import_raw( rsa, NULL, 0, NULL, 0, NULL, 0,
- p, len, NULL, 0 ) ) != 0 )
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_rsa_import( rsa, NULL, NULL, NULL,
+ &T, NULL ) ) != 0 )
goto cleanup;
- p += len;
/* Import P */
- if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
- MBEDTLS_ASN1_INTEGER ) ) != 0 ||
- ( ret = mbedtls_rsa_import_raw( rsa, NULL, 0, p, len, NULL, 0,
- NULL, 0, NULL, 0 ) ) != 0 )
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_rsa_import( rsa, NULL, &T, NULL,
+ NULL, NULL ) ) != 0 )
goto cleanup;
- p += len;
/* Import Q */
- if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
- MBEDTLS_ASN1_INTEGER ) ) != 0 ||
- ( ret = mbedtls_rsa_import_raw( rsa, NULL, 0, NULL, 0, p, len,
- NULL, 0, NULL, 0 ) ) != 0 )
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_rsa_import( rsa, NULL, NULL, &T,
+ NULL, NULL ) ) != 0 )
goto cleanup;
- p += len;
- /* Complete the RSA private key */
- if( ( ret = mbedtls_rsa_complete( rsa ) ) != 0 )
- goto cleanup;
+#if !defined(MBEDTLS_RSA_NO_CRT) && !defined(MBEDTLS_RSA_ALT)
+ /*
+ * The RSA CRT parameters DP, DQ and QP are nominally redundant, in
+ * that they can be easily recomputed from D, P and Q. However by
+ * parsing them from the PKCS1 structure it is possible to avoid
+ * recalculating them which both reduces the overhead of loading
+ * RSA private keys into memory and also avoids side channels which
+ * can arise when computing those values, since all of D, P, and Q
+ * are secret. See https://eprint.iacr.org/2020/055 for a
+ * description of one such attack.
+ */
+
+ /* Import DP */
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_mpi_copy( &rsa->DP, &T ) ) != 0 )
+ goto cleanup;
+
+ /* Import DQ */
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_mpi_copy( &rsa->DQ, &T ) ) != 0 )
+ goto cleanup;
+
+ /* Import QP */
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = mbedtls_mpi_copy( &rsa->QP, &T ) ) != 0 )
+ goto cleanup;
+
+#else
+ /* Verify existance of the CRT params */
+ if( ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 ||
+ ( ret = asn1_get_nonzero_mpi( &p, end, &T ) ) != 0 )
+ goto cleanup;
+#endif
- /* Check optional parameters */
- if( ( ret = mbedtls_asn1_get_mpi( &p, end, &T ) ) != 0 ||
- ( ret = mbedtls_asn1_get_mpi( &p, end, &T ) ) != 0 ||
- ( ret = mbedtls_asn1_get_mpi( &p, end, &T ) ) != 0 )
+ /* rsa_complete() doesn't complete anything with the default
+ * implementation but is still called:
+ * - for the benefit of alternative implementation that may want to
+ * pre-compute stuff beyond what's provided (eg Montgomery factors)
+ * - as is also sanity-checks the key
+ *
+ * Furthermore, we also check the public part for consistency with
+ * mbedtls_pk_parse_pubkey(), as it includes size minima for example.
+ */
+ if( ( ret = mbedtls_rsa_complete( rsa ) ) != 0 ||
+ ( ret = mbedtls_rsa_check_pubkey( rsa ) ) != 0 )
+ {
goto cleanup;
+ }
if( p != end )
{
diff --git a/thirdparty/mbedtls/library/rsa.c b/thirdparty/mbedtls/library/rsa.c
index af1a878599..09fd379fdb 100644
--- a/thirdparty/mbedtls/library/rsa.c
+++ b/thirdparty/mbedtls/library/rsa.c
@@ -249,6 +249,9 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
{
int ret = 0;
int have_N, have_P, have_Q, have_D, have_E;
+#if !defined(MBEDTLS_RSA_NO_CRT)
+ int have_DP, have_DQ, have_QP;
+#endif
int n_missing, pq_missing, d_missing, is_pub, is_priv;
RSA_VALIDATE_RET( ctx != NULL );
@@ -259,6 +262,12 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
have_D = ( mbedtls_mpi_cmp_int( &ctx->D, 0 ) != 0 );
have_E = ( mbedtls_mpi_cmp_int( &ctx->E, 0 ) != 0 );
+#if !defined(MBEDTLS_RSA_NO_CRT)
+ have_DP = ( mbedtls_mpi_cmp_int( &ctx->DP, 0 ) != 0 );
+ have_DQ = ( mbedtls_mpi_cmp_int( &ctx->DQ, 0 ) != 0 );
+ have_QP = ( mbedtls_mpi_cmp_int( &ctx->QP, 0 ) != 0 );
+#endif
+
/*
* Check whether provided parameters are enough
* to deduce all others. The following incomplete
@@ -324,7 +333,7 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
*/
#if !defined(MBEDTLS_RSA_NO_CRT)
- if( is_priv )
+ if( is_priv && ! ( have_DP && have_DQ && have_QP ) )
{
ret = mbedtls_rsa_deduce_crt( &ctx->P, &ctx->Q, &ctx->D,
&ctx->DP, &ctx->DQ, &ctx->QP );
diff --git a/thirdparty/mbedtls/library/x509_crt.c b/thirdparty/mbedtls/library/x509_crt.c
index a3697f13f9..9c2e36547e 100644
--- a/thirdparty/mbedtls/library/x509_crt.c
+++ b/thirdparty/mbedtls/library/x509_crt.c
@@ -65,19 +65,6 @@
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#include <windows.h>
-#if defined(_MSC_VER) && _MSC_VER <= 1600
-/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and
- * <intsafe.h> are included, as they redefine a number of <TYPE>_MAX constants.
- * These constants are guaranteed to be the same, though, so we suppress the
- * warning when including intsafe.h.
- */
-#pragma warning( push )
-#pragma warning( disable : 4005 )
-#endif
-#include <intsafe.h>
-#if defined(_MSC_VER) && _MSC_VER <= 1600
-#pragma warning( pop )
-#endif
#else
#include <time.h>
#endif
@@ -1290,7 +1277,6 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
char filename[MAX_PATH];
char *p;
size_t len = strlen( path );
- int lengthAsInt = 0;
WIN32_FIND_DATAW file_data;
HANDLE hFind;
@@ -1305,18 +1291,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
p = filename + len;
filename[len++] = '*';
- if ( FAILED ( SizeTToInt( len, &lengthAsInt ) ) )
- return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
-
- /*
- * Note this function uses the code page CP_ACP, and assumes the incoming
- * string is encoded in ANSI, before translating it into Unicode. If the
- * incoming string were changed to be UTF-8, then the length check needs to
- * change to check the number of characters, not the number of bytes, in the
- * incoming string are less than MAX_PATH to avoid a buffer overrun with
- * MultiByteToWideChar().
- */
- w_ret = MultiByteToWideChar( CP_ACP, 0, filename, lengthAsInt, szDir,
+ w_ret = MultiByteToWideChar( CP_ACP, 0, filename, (int)len, szDir,
MAX_PATH - 3 );
if( w_ret == 0 )
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
@@ -1333,11 +1308,8 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
if( file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
continue;
- if ( FAILED( SizeTToInt( wcslen( file_data.cFileName ), &lengthAsInt ) ) )
- return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
-
w_ret = WideCharToMultiByte( CP_ACP, 0, file_data.cFileName,
- lengthAsInt,
+ lstrlenW( file_data.cFileName ),
p, (int) len - 1,
NULL, NULL );
if( w_ret == 0 )
diff --git a/thirdparty/mbedtls/library/x509write_csr.c b/thirdparty/mbedtls/library/x509write_csr.c
index b65a11c6aa..7406a97542 100644
--- a/thirdparty/mbedtls/library/x509write_csr.c
+++ b/thirdparty/mbedtls/library/x509write_csr.c
@@ -226,7 +226,9 @@ int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, s
/*
* Prepare signature
*/
- mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash );
+ ret = mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash );
+ if( ret != 0 )
+ return( ret );
if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len,
f_rng, p_rng ) ) != 0 )
diff --git a/thirdparty/mbedtls/patches/padlock.diff b/thirdparty/mbedtls/patches/padlock.diff
deleted file mode 100644
index 6ace48891c..0000000000
--- a/thirdparty/mbedtls/patches/padlock.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/thirdparty/mbedtls/include/mbedtls/config.h
-+++ b/thirdparty/mbedtls/include/mbedtls/config.h
-@@ -2477,7 +2477,9 @@
- *
- * This modules adds support for the VIA PadLock on x86.
- */
--#define MBEDTLS_PADLOCK_C
-+// -- GODOT start --
-+// #define MBEDTLS_PADLOCK_C
-+// -- GODOT end --
-
- /**
- * \def MBEDTLS_PEM_PARSE_C
diff --git a/thirdparty/miniupnpc/miniupnpc/minissdpc.c b/thirdparty/miniupnpc/miniupnpc/minissdpc.c
index ea9af02e1f..36244dedec 100644
--- a/thirdparty/miniupnpc/miniupnpc/minissdpc.c
+++ b/thirdparty/miniupnpc/miniupnpc/minissdpc.c
@@ -62,13 +62,13 @@ struct sockaddr_un {
#include "miniupnpc_socketdef.h"
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
+#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__) && !defined(__HAIKU__)
#define HAS_IP_MREQN
#endif
#if !defined(HAS_IP_MREQN) && !defined(_WIN32)
#include <sys/ioctl.h>
-#if defined(__sun)
+#if defined(__sun) || defined(__HAIKU__)
#include <sys/sockio.h>
#endif
#endif
diff --git a/thirdparty/miniupnpc/miniupnpc/portlistingparse.c b/thirdparty/miniupnpc/miniupnpc/portlistingparse.c
index 55859f2714..18d967b877 100644
--- a/thirdparty/miniupnpc/miniupnpc/portlistingparse.c
+++ b/thirdparty/miniupnpc/miniupnpc/portlistingparse.c
@@ -1,7 +1,7 @@
/* $Id: portlistingparse.c,v 1.9 2015/07/15 12:41:13 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
- * (c) 2011-2016 Thomas Bernard
+ * (c) 2011-2020 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
#include <string.h>
@@ -12,6 +12,11 @@
#include "portlistingparse.h"
#include "minixml.h"
+#if defined(__HAIKU__)
+/* rename our private function because Haiku already defines a atoui() function */
+#define atoui atoui2
+#endif
+
/* list of the elements */
static const struct {
const portMappingElt code;
diff --git a/thirdparty/miniupnpc/miniupnpc/upnpc.c b/thirdparty/miniupnpc/miniupnpc/upnpc.c
index 4325658bee..cb7f18b5f6 100644
--- a/thirdparty/miniupnpc/miniupnpc/upnpc.c
+++ b/thirdparty/miniupnpc/miniupnpc/upnpc.c
@@ -1,7 +1,7 @@
/* $Id: upnpc.c,v 1.119 2018/03/13 23:34:46 nanard Exp $ */
/* Project : miniupnp
* Author : Thomas Bernard
- * Copyright (c) 2005-2019 Thomas Bernard
+ * Copyright (c) 2005-2020 Thomas Bernard
* This software is subject to the conditions detailed in the
* LICENCE file provided in this distribution. */
@@ -580,7 +580,7 @@ int main(int argc, char ** argv)
}
#endif
printf("upnpc : miniupnpc library test client, version %s.\n", MINIUPNPC_VERSION_STRING);
- printf(" (c) 2005-2019 Thomas Bernard.\n");
+ printf(" (c) 2005-2020 Thomas Bernard.\n");
printf("Go to http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/\n"
"for more information.\n");
/* command line processing */
diff --git a/thirdparty/vulkan/include/vulkan/vulkan.hpp b/thirdparty/vulkan/include/vulkan/vulkan.hpp
index c56dc796f0..441869898f 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015-2019 The Khronos Group Inc.
+// Copyright (c) 2015-2020 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.
@@ -56,11 +56,21 @@
# define VULKAN_HPP_ASSERT assert
#endif
-#if defined(__linux__) || defined(__APPLE__)
-# include <dlfcn.h>
+#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL)
+# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1
+#endif
+
+#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
+# if defined(__linux__) || defined(__APPLE__)
+# include <dlfcn.h>
+# endif
+
+# if defined(_WIN32)
+# include <windows.h>
+# endif
#endif
-static_assert( VK_HEADER_VERSION == 127 , "Wrong VK_HEADER_VERSION!" );
+static_assert( VK_HEADER_VERSION == 131 , "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for 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
@@ -81,7 +91,7 @@ static_assert( VK_HEADER_VERSION == 127 , "Wrong VK_HEADER_VERSION!" );
#endif
// Windows defines MemoryBarrier which is deprecated and collides
-// with the vk::MemoryBarrier struct.
+// with the VULKAN_HPP_NAMESPACE::MemoryBarrier struct.
#if defined(MemoryBarrier)
#undef MemoryBarrier
#endif
@@ -259,6 +269,7 @@ namespace VULKAN_HPP_NAMESPACE
class Flags
{
public:
+ // constructors
VULKAN_HPP_CONSTEXPR Flags() VULKAN_HPP_NOEXCEPT
: m_mask(0)
{}
@@ -267,7 +278,7 @@ namespace VULKAN_HPP_NAMESPACE
: m_mask(static_cast<MaskType>(bit))
{}
- VULKAN_HPP_CONSTEXPR Flags(Flags<BitType> const& rhs) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Flags(Flags<BitType, MaskType> const& rhs) VULKAN_HPP_NOEXCEPT
: m_mask(rhs.m_mask)
{}
@@ -275,65 +286,90 @@ namespace VULKAN_HPP_NAMESPACE
: m_mask(flags)
{}
- Flags<BitType> & operator=(Flags<BitType> const& rhs) VULKAN_HPP_NOEXCEPT
+ // relational operators
+ VULKAN_HPP_CONSTEXPR bool operator<(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- m_mask = rhs.m_mask;
- return *this;
+ return m_mask < rhs.m_mask;
}
- Flags<BitType> & operator|=(Flags<BitType> const& rhs) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR bool operator<=(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- m_mask |= rhs.m_mask;
- return *this;
+ return m_mask <= rhs.m_mask;
}
- Flags<BitType> & operator&=(Flags<BitType> const& rhs) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR bool operator>(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- m_mask &= rhs.m_mask;
- return *this;
+ return m_mask > rhs.m_mask;
}
- Flags<BitType> & operator^=(Flags<BitType> const& rhs) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR bool operator>=(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- m_mask ^= rhs.m_mask;
- return *this;
+ return m_mask >= rhs.m_mask;
}
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator|(Flags<BitType> const& rhs) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR bool operator==(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- return Flags<BitType>(m_mask | rhs.m_mask);
+ return m_mask == rhs.m_mask;
}
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator&(Flags<BitType> const& rhs) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR bool operator!=(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- return Flags<BitType>(m_mask & rhs.m_mask);
+ return m_mask != rhs.m_mask;
}
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator^(Flags<BitType> const& rhs) const VULKAN_HPP_NOEXCEPT
+ // logical operator
+ VULKAN_HPP_CONSTEXPR bool operator!() const VULKAN_HPP_NOEXCEPT
{
- return Flags<BitType>(m_mask ^ rhs.m_mask);
+ return !m_mask;
}
- VULKAN_HPP_CONSTEXPR bool operator!() const VULKAN_HPP_NOEXCEPT
+ // bitwise operators
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator&(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- return !m_mask;
+ return Flags<BitType, MaskType>(m_mask & rhs.m_mask);
}
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator~() const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator|(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- return Flags<BitType>(m_mask ^ FlagTraits<BitType>::allFlags);
+ return Flags<BitType, MaskType>(m_mask | rhs.m_mask);
}
- VULKAN_HPP_CONSTEXPR bool operator==(Flags<BitType> const& rhs) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator^(Flags<BitType, MaskType> const& rhs) const VULKAN_HPP_NOEXCEPT
{
- return m_mask == rhs.m_mask;
+ return Flags<BitType, MaskType>(m_mask ^ rhs.m_mask);
}
- VULKAN_HPP_CONSTEXPR bool operator!=(Flags<BitType> const& rhs) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator~() const VULKAN_HPP_NOEXCEPT
{
- return m_mask != rhs.m_mask;
+ return Flags<BitType, MaskType>(m_mask ^ FlagTraits<BitType>::allFlags);
+ }
+
+ // assignment operators
+ Flags<BitType, MaskType> & operator=(Flags<BitType, MaskType> const& rhs) VULKAN_HPP_NOEXCEPT
+ {
+ m_mask = rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType, MaskType> & operator|=(Flags<BitType, MaskType> const& rhs) VULKAN_HPP_NOEXCEPT
+ {
+ m_mask |= rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType, MaskType> & operator&=(Flags<BitType, MaskType> const& rhs) VULKAN_HPP_NOEXCEPT
+ {
+ m_mask &= rhs.m_mask;
+ return *this;
}
+ Flags<BitType, MaskType> & operator^=(Flags<BitType, MaskType> 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;
@@ -348,36 +384,62 @@ namespace VULKAN_HPP_NAMESPACE
MaskType m_mask;
};
- template <typename BitType>
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator|(BitType bit, Flags<BitType> const& flags) VULKAN_HPP_NOEXCEPT
+ // relational operators
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator<(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
{
- return flags | bit;
+ return flags > bit;
}
- template <typename BitType>
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator&(BitType bit, Flags<BitType> const& flags) VULKAN_HPP_NOEXCEPT
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator<=(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
{
- return flags & bit;
+ return flags >= bit;
}
- template <typename BitType>
- VULKAN_HPP_CONSTEXPR Flags<BitType> operator^(BitType bit, Flags<BitType> const& flags) VULKAN_HPP_NOEXCEPT
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator>(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
{
- return flags ^ bit;
+ return flags < bit;
}
- template <typename BitType>
- VULKAN_HPP_CONSTEXPR bool operator==(BitType bit, Flags<BitType> const& flags) VULKAN_HPP_NOEXCEPT
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator>=(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
+ {
+ return flags <= bit;
+ }
+
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator==(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
{
return flags == bit;
}
- template <typename BitType>
- VULKAN_HPP_CONSTEXPR bool operator!=(BitType bit, Flags<BitType> const& flags) VULKAN_HPP_NOEXCEPT
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR bool operator!=(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
{
return flags != bit;
}
+ // bitwise operators
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator&(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
+ {
+ return flags & bit;
+ }
+
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator|(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
+ {
+ return flags | bit;
+ }
+
+ template <typename BitType, typename MaskType = VkFlags>
+ VULKAN_HPP_CONSTEXPR Flags<BitType, MaskType> operator^(BitType bit, Flags<BitType, MaskType> const& flags) VULKAN_HPP_NOEXCEPT
+ {
+ return flags ^ bit;
+ }
+
template <typename RefType>
class Optional
{
@@ -421,6 +483,18 @@ namespace VULKAN_HPP_NAMESPACE
static const bool valid = true;
};
+ template<typename Type, class...>
+ struct isPartOfStructureChain
+ {
+ static const bool valid = false;
+ };
+
+ template<typename Type, typename Head, typename... Tail>
+ struct isPartOfStructureChain<Type, Head, Tail...>
+ {
+ static const bool valid = std::is_same<Type, Head>::value || isPartOfStructureChain<Type, Tail...>::valid;
+ };
+
template <class Element>
class StructureChainElement
{
@@ -467,6 +541,45 @@ namespace VULKAN_HPP_NAMESPACE
);
}
+ template<typename ClassType>
+ void unlink() VULKAN_HPP_NOEXCEPT
+ {
+ static_assert(isPartOfStructureChain<ClassType, StructureElements...>::valid, "Can't unlink Structure that's not part of this StructureChain!");
+ static_assert(!std::is_same<ClassType, typename std::tuple_element<0, std::tuple<StructureElements...>>::type>::value, "It's not allowed to unlink the first element!");
+ VkBaseOutStructure * ptr = reinterpret_cast<VkBaseOutStructure*>(&get<ClassType>());
+ assert(ptr != nullptr);
+ VkBaseOutStructure ** ppNext = &(reinterpret_cast<VkBaseOutStructure*>(this)->pNext);
+ assert(*ppNext != nullptr);
+ while (*ppNext != ptr)
+ {
+ ppNext = &(*ppNext)->pNext;
+ assert(*ppNext != nullptr); // fires, if the ClassType member has already been unlinked !
+ }
+ assert(*ppNext == ptr);
+ *ppNext = (*ppNext)->pNext;
+ }
+
+ template <typename ClassType>
+ void relink() VULKAN_HPP_NOEXCEPT
+ {
+ static_assert(isPartOfStructureChain<ClassType, StructureElements...>::valid, "Can't relink Structure that's not part of this StructureChain!");
+ static_assert(!std::is_same<ClassType, typename std::tuple_element<0, std::tuple<StructureElements...>>::type>::value, "It's not allowed to have the first element unlinked!");
+ VkBaseOutStructure * ptr = reinterpret_cast<VkBaseOutStructure*>(&get<ClassType>());
+ assert(ptr != nullptr);
+ VkBaseOutStructure ** ppNext = &(reinterpret_cast<VkBaseOutStructure*>(this)->pNext);
+ assert(*ppNext != nullptr);
+#if !defined(NDEBUG)
+ while (*ppNext)
+ {
+ assert(*ppNext != ptr); // fires, if the ClassType member has not been unlinked before
+ ppNext = &(*ppNext)->pNext;
+ }
+ ppNext = &(reinterpret_cast<VkBaseOutStructure*>(this)->pNext);
+#endif
+ ptr->pNext = *ppNext;
+ *ppNext = ptr;
+ }
+
private:
template<typename List, typename X>
void link() VULKAN_HPP_NOEXCEPT
@@ -533,7 +646,12 @@ namespace VULKAN_HPP_NAMESPACE
public:
using element_type = Type;
- explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
+ UniqueHandle()
+ : Deleter()
+ , m_value()
+ {}
+
+ explicit UniqueHandle( Type const& value, Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
: Deleter( deleter)
, m_value( value )
{}
@@ -689,7 +807,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdBeginRenderPass( commandBuffer, pRenderPassBegin, contents );
}
- void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT
+ void vkCmdBeginRenderPass2( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkCmdBeginRenderPass2( commandBuffer, pRenderPassBegin, pSubpassBeginInfo );
+ }
+
+ void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT
{
return ::vkCmdBeginRenderPass2KHR( commandBuffer, pRenderPassBegin, pSubpassBeginInfo );
}
@@ -834,6 +957,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, 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 );
+ }
+
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 );
@@ -854,6 +982,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdDrawIndirectByteCountEXT( commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride );
}
+ 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 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 );
@@ -904,7 +1037,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdEndRenderPass( commandBuffer );
}
- void vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
+ void vkCmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkCmdEndRenderPass2( commandBuffer, pSubpassEndInfo );
+ }
+
+ void vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
{
return ::vkCmdEndRenderPass2KHR( commandBuffer, pSubpassEndInfo );
}
@@ -934,7 +1072,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdNextSubpass( commandBuffer, contents );
}
- void vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
+ void vkCmdNextSubpass2( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkCmdNextSubpass2( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo );
+ }
+
+ void vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT
{
return ::vkCmdNextSubpass2KHR( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo );
}
@@ -1161,6 +1304,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkAcquirePerformanceConfigurationINTEL( device, pAcquireInfo, pConfiguration );
}
+ VkResult vkAcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkAcquireProfilingLockKHR( device, pInfo );
+ }
+
VkResult vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers ) const VULKAN_HPP_NOEXCEPT
{
return ::vkAllocateCommandBuffers( device, pAllocateInfo, pCommandBuffers );
@@ -1326,7 +1474,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCreateRenderPass( device, pCreateInfo, pAllocator, pRenderPass );
}
- VkResult vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const VULKAN_HPP_NOEXCEPT
+ VkResult vkCreateRenderPass2( VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkCreateRenderPass2( device, pCreateInfo, pAllocator, pRenderPass );
+ }
+
+ VkResult vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const VULKAN_HPP_NOEXCEPT
{
return ::vkCreateRenderPass2KHR( device, pCreateInfo, pAllocator, pRenderPass );
}
@@ -1568,11 +1721,21 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- VkDeviceAddress vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo ) const VULKAN_HPP_NOEXCEPT
+ VkDeviceAddress vkGetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetBufferDeviceAddress( device, pInfo );
+ }
+
+ VkDeviceAddress vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetBufferDeviceAddressEXT( device, pInfo );
}
+ VkDeviceAddress vkGetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetBufferDeviceAddressKHR( device, pInfo );
+ }
+
void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetBufferMemoryRequirements( device, buffer, pMemoryRequirements );
@@ -1588,6 +1751,16 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetBufferMemoryRequirements2KHR( device, pInfo, pMemoryRequirements );
}
+ uint64_t vkGetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetBufferOpaqueCaptureAddress( device, pInfo );
+ }
+
+ uint64_t vkGetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetBufferOpaqueCaptureAddressKHR( device, pInfo );
+ }
+
VkResult vkGetCalibratedTimestampsEXT( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetCalibratedTimestampsEXT( device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation );
@@ -1635,6 +1808,16 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes );
}
+ uint64_t vkGetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetDeviceMemoryOpaqueCaptureAddress( device, pInfo );
+ }
+
+ uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetDeviceMemoryOpaqueCaptureAddressKHR( device, pInfo );
+ }
+
PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char* pName ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetDeviceProcAddr( device, pName );
@@ -1810,6 +1993,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetRenderAreaGranularity( device, renderPass, pGranularity );
}
+ VkResult vkGetSemaphoreCounterValue( VkDevice device, VkSemaphore semaphore, uint64_t* pValue ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetSemaphoreCounterValue( device, semaphore, pValue );
+ }
+
VkResult vkGetSemaphoreCounterValueKHR( VkDevice device, VkSemaphore semaphore, uint64_t* pValue ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetSemaphoreCounterValueKHR( device, semaphore, pValue );
@@ -1928,6 +2116,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkReleasePerformanceConfigurationINTEL( device, configuration );
}
+ void vkReleaseProfilingLockKHR( VkDevice device ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkReleaseProfilingLockKHR( device );
+ }
+
VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT
{
return ::vkResetCommandPool( device, commandPool, flags );
@@ -1948,6 +2141,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkResetFences( device, fenceCount, pFences );
}
+ void vkResetQueryPool( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkResetQueryPool( device, queryPool, firstQuery, queryCount );
+ }
+
void vkResetQueryPoolEXT( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT
{
return ::vkResetQueryPoolEXT( device, queryPool, firstQuery, queryCount );
@@ -1978,7 +2176,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkSetLocalDimmingAMD( device, swapChain, localDimmingEnable );
}
- VkResult vkSignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfoKHR* pSignalInfo ) const VULKAN_HPP_NOEXCEPT
+ VkResult vkSignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkSignalSemaphore( device, pSignalInfo );
+ }
+
+ VkResult vkSignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo ) const VULKAN_HPP_NOEXCEPT
{
return ::vkSignalSemaphoreKHR( device, pSignalInfo );
}
@@ -2028,7 +2231,12 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout );
}
- VkResult vkWaitSemaphoresKHR( VkDevice device, const VkSemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT
+ VkResult vkWaitSemaphores( VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkWaitSemaphores( device, pWaitInfo, timeout );
+ }
+
+ VkResult vkWaitSemaphoresKHR( VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT
{
return ::vkWaitSemaphoresKHR( device, pWaitInfo, timeout );
}
@@ -2207,6 +2415,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, pProperties );
}
+ 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 );
+ }
+
VkResult vkGetDisplayModeProperties2KHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetDisplayModeProperties2KHR( physicalDevice, display, pPropertyCount, pProperties );
@@ -2387,6 +2600,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetPhysicalDeviceProperties2KHR( physicalDevice, pProperties );
}
+ void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( physicalDevice, pPerformanceQueryCreateInfo, pNumPasses );
+ }
+
void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT
{
return ::vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties );
@@ -2464,6 +2682,11 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported );
}
+ VkResult vkGetPhysicalDeviceToolPropertiesEXT( VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolPropertiesEXT* pToolProperties ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetPhysicalDeviceToolPropertiesEXT( physicalDevice, pToolCount, pToolProperties );
+ }
+
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display ) const VULKAN_HPP_NOEXCEPT
{
@@ -2562,20 +2785,20 @@ namespace VULKAN_HPP_NAMESPACE
#if !defined(VULKAN_HPP_DEFAULT_DISPATCHER)
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
-# define VULKAN_HPP_DEFAULT_DISPATCHER ::vk::defaultDispatchLoaderDynamic
-# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE namespace vk { DispatchLoaderDynamic defaultDispatchLoaderDynamic; }
+# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic
+# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE namespace VULKAN_HPP_NAMESPACE { DispatchLoaderDynamic defaultDispatchLoaderDynamic; }
extern DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# else
-# define VULKAN_HPP_DEFAULT_DISPATCHER ::vk::DispatchLoaderStatic()
+# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic()
# 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 ::vk::DispatchLoaderDynamic
+ #define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic
# else
-# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::vk::DispatchLoaderStatic
+# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic
# endif
#endif
@@ -2585,7 +2808,13 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectDestroy
{
public:
- ObjectDestroy( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ ObjectDestroy()
+ : m_owner()
+ , m_allocationCallbacks( nullptr )
+ , m_dispatch( nullptr )
+ {}
+
+ ObjectDestroy( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -2598,6 +2827,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename T>
void destroy(T t) VULKAN_HPP_NOEXCEPT
{
+ assert( m_owner && m_dispatch );
m_owner.destroy( t, m_allocationCallbacks, *m_dispatch );
}
@@ -2613,7 +2843,12 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectDestroy<NoParent,Dispatch>
{
public:
- ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ ObjectDestroy()
+ : m_allocationCallbacks( nullptr )
+ , m_dispatch( nullptr )
+ {}
+
+ ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
: m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
{}
@@ -2624,6 +2859,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename T>
void destroy(T t) VULKAN_HPP_NOEXCEPT
{
+ assert( m_dispatch );
t.destroy( m_allocationCallbacks, *m_dispatch );
}
@@ -2636,7 +2872,13 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectFree
{
public:
- ObjectFree( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ ObjectFree()
+ : m_owner()
+ , m_allocationCallbacks( nullptr )
+ , m_dispatch( nullptr )
+ {}
+
+ ObjectFree( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -2649,6 +2891,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename T>
void destroy(T t) VULKAN_HPP_NOEXCEPT
{
+ assert( m_owner && m_dispatch );
m_owner.free( t, m_allocationCallbacks, *m_dispatch );
}
@@ -2685,23 +2928,51 @@ namespace VULKAN_HPP_NAMESPACE
};
template <typename T, size_t N, size_t I>
- class ConstExpressionArrayCopy
+ class ConstExpression1DArrayCopy
{
public:
VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N], std::array<T,N> const& src) VULKAN_HPP_NOEXCEPT
{
dst[I-1] = src[I-1];
- ConstExpressionArrayCopy<T, N, I - 1>::copy(dst, src);
+ ConstExpression1DArrayCopy<T, N, I - 1>::copy(dst, src);
}
};
template <typename T, size_t N>
- class ConstExpressionArrayCopy<T, N, 0>
+ class ConstExpression1DArrayCopy<T, N, 0>
{
public:
VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N], std::array<T,N> const& /*src*/) VULKAN_HPP_NOEXCEPT {}
};
+ template <typename T, size_t N, size_t M, size_t I, size_t J>
+ class ConstExpression2DArrayCopy
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], std::array<std::array<T,M>, N> const& src) VULKAN_HPP_NOEXCEPT
+ {
+ dst[I - 1][J - 1] = src[I - 1][J - 1];
+ ConstExpression2DArrayCopy<T, N, M, I, J - 1>::copy(dst, src);
+ }
+ };
+
+ template <typename T, size_t N, size_t M, size_t I>
+ class ConstExpression2DArrayCopy<T, N, M, I, 0>
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR_14 static void copy(T dst[N][M], std::array<std::array<T, M>, N> const& src) VULKAN_HPP_NOEXCEPT
+ {
+ ConstExpression2DArrayCopy<T, N, M, I - 1, M>::copy(dst, src);
+ }
+ };
+
+ template <typename T, size_t N, size_t M>
+ class ConstExpression2DArrayCopy<T, N, M, 0, 0>
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR_14 static void copy(T /*dst*/[N][M], std::array<std::array<T, M>, N> const& /*src*/) VULKAN_HPP_NOEXCEPT {}
+ };
+
using Bool32 = uint32_t;
using DeviceAddress = uint64_t;
using DeviceSize = uint64_t;
@@ -2741,6 +3012,96 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class AccessFlagBits
+ {
+ 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,
+ 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,
+ eCommandProcessReadNVX = VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX,
+ eCommandProcessWriteNVX = VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX,
+ eColorAttachmentReadNoncoherentEXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT,
+ eShadingRateImageReadNV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV,
+ eAccelerationStructureReadNV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV,
+ eAccelerationStructureWriteNV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV,
+ eFragmentDensityMapReadEXT = VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT
+ };
+
+ 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::eTransformFeedbackWriteEXT : return "TransformFeedbackWriteEXT";
+ case AccessFlagBits::eTransformFeedbackCounterReadEXT : return "TransformFeedbackCounterReadEXT";
+ case AccessFlagBits::eTransformFeedbackCounterWriteEXT : return "TransformFeedbackCounterWriteEXT";
+ case AccessFlagBits::eConditionalRenderingReadEXT : return "ConditionalRenderingReadEXT";
+ case AccessFlagBits::eCommandProcessReadNVX : return "CommandProcessReadNVX";
+ case AccessFlagBits::eCommandProcessWriteNVX : return "CommandProcessWriteNVX";
+ case AccessFlagBits::eColorAttachmentReadNoncoherentEXT : return "ColorAttachmentReadNoncoherentEXT";
+ case AccessFlagBits::eShadingRateImageReadNV : return "ShadingRateImageReadNV";
+ case AccessFlagBits::eAccelerationStructureReadNV : return "AccelerationStructureReadNV";
+ case AccessFlagBits::eAccelerationStructureWriteNV : return "AccelerationStructureWriteNV";
+ case AccessFlagBits::eFragmentDensityMapReadEXT : return "FragmentDensityMapReadEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class AcquireProfilingLockFlagBitsKHR
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagBitsKHR )
+ {
+ return "(void)";
+ }
+
+ enum class AttachmentDescriptionFlagBits
+ {
+ eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlagBits value )
+ {
+ switch ( value )
+ {
+ case AttachmentDescriptionFlagBits::eMayAlias : return "MayAlias";
+ default: return "invalid";
+ }
+ }
+
enum class AttachmentLoadOp
{
eLoad = VK_ATTACHMENT_LOAD_OP_LOAD,
@@ -2981,13 +3342,108 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class BufferCreateFlagBits
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ enum class BufferUsageFlagBits
+ {
+ 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,
+ 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,
+ eRayTracingNV = VK_BUFFER_USAGE_RAY_TRACING_BIT_NV,
+ eShaderDeviceAddressEXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT,
+ eShaderDeviceAddressKHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR
+ };
+
+ 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::eTransformFeedbackBufferEXT : return "TransformFeedbackBufferEXT";
+ case BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT : return "TransformFeedbackCounterBufferEXT";
+ case BufferUsageFlagBits::eConditionalRenderingEXT : return "ConditionalRenderingEXT";
+ case BufferUsageFlagBits::eRayTracingNV : return "RayTracingNV";
+ default: return "invalid";
+ }
+ }
+
+ enum class BufferViewCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class BuildAccelerationStructureFlagBitsNV
+ {
+ eAllowUpdate = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV,
+ eAllowCompaction = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV,
+ ePreferFastTrace = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV,
+ ePreferFastBuild = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV,
+ eLowMemory = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagBitsNV value )
+ {
+ switch ( value )
+ {
+ case BuildAccelerationStructureFlagBitsNV::eAllowUpdate : return "AllowUpdate";
+ case BuildAccelerationStructureFlagBitsNV::eAllowCompaction : return "AllowCompaction";
+ case BuildAccelerationStructureFlagBitsNV::ePreferFastTrace : return "PreferFastTrace";
+ case BuildAccelerationStructureFlagBitsNV::ePreferFastBuild : return "PreferFastBuild";
+ case BuildAccelerationStructureFlagBitsNV::eLowMemory : return "LowMemory";
+ default: return "invalid";
+ }
+ }
+
enum class ChromaLocation
{
eCositedEven = VK_CHROMA_LOCATION_COSITED_EVEN,
- eMidpoint = VK_CHROMA_LOCATION_MIDPOINT,
- eCositedEvenKHR = VK_CHROMA_LOCATION_COSITED_EVEN_KHR,
- eMidpointKHR = VK_CHROMA_LOCATION_MIDPOINT_KHR
+ eMidpoint = VK_CHROMA_LOCATION_MIDPOINT
};
+ using ChromaLocationKHR = ChromaLocation;
VULKAN_HPP_INLINE std::string to_string( ChromaLocation value )
{
@@ -3019,6 +3475,26 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ColorComponentFlagBits
+ {
+ eR = VK_COLOR_COMPONENT_R_BIT,
+ eG = VK_COLOR_COMPONENT_G_BIT,
+ eB = VK_COLOR_COMPONENT_B_BIT,
+ eA = VK_COLOR_COMPONENT_A_BIT
+ };
+
+ 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";
+ }
+ }
+
enum class ColorSpaceKHR
{
eSrgbNonlinear = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
@@ -3081,6 +3557,70 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class CommandBufferResetFlagBits
+ {
+ eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlagBits value )
+ {
+ switch ( value )
+ {
+ case CommandBufferResetFlagBits::eReleaseResources : return "ReleaseResources";
+ default: return "invalid";
+ }
+ }
+
+ enum class CommandBufferUsageFlagBits
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class CommandPoolCreateFlagBits
+ {
+ eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT,
+ eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
+ eProtected = VK_COMMAND_POOL_CREATE_PROTECTED_BIT
+ };
+
+ 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";
+ }
+ }
+
+ enum class CommandPoolResetFlagBits
+ {
+ eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlagBits value )
+ {
+ switch ( value )
+ {
+ case CommandPoolResetFlagBits::eReleaseResources : return "ReleaseResources";
+ default: return "invalid";
+ }
+ }
+
enum class CompareOp
{
eNever = VK_COMPARE_OP_NEVER,
@@ -3169,6 +3709,40 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class CompositeAlphaFlagBitsKHR
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class ConditionalRenderingFlagBitsEXT
+ {
+ eInverted = VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagBitsEXT value )
+ {
+ switch ( value )
+ {
+ case ConditionalRenderingFlagBitsEXT::eInverted : return "Inverted";
+ default: return "invalid";
+ }
+ }
+
enum class ConservativeRasterizationModeEXT
{
eDisabled = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT,
@@ -3239,6 +3813,48 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class CullModeFlagBits
+ {
+ eNone = VK_CULL_MODE_NONE,
+ eFront = VK_CULL_MODE_FRONT_BIT,
+ eBack = VK_CULL_MODE_BACK_BIT,
+ eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK
+ };
+
+ 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";
+ }
+ }
+
+ enum class DebugReportFlagBitsEXT
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
enum class DebugReportObjectTypeEXT
{
eUnknown = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
@@ -3329,6 +3945,119 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DebugUtilsMessageSeverityFlagBitsEXT
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class DebugUtilsMessageTypeFlagBitsEXT
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ enum class DependencyFlagBits
+ {
+ eByRegion = VK_DEPENDENCY_BY_REGION_BIT,
+ eDeviceGroup = VK_DEPENDENCY_DEVICE_GROUP_BIT,
+ eViewLocal = VK_DEPENDENCY_VIEW_LOCAL_BIT,
+ eViewLocalKHR = VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR,
+ eDeviceGroupKHR = VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ enum class DescriptorBindingFlagBits
+ {
+ 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;
+
+ 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";
+ }
+ }
+
+ enum class DescriptorPoolCreateFlagBits
+ {
+ 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
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case DescriptorPoolCreateFlagBits::eFreeDescriptorSet : return "FreeDescriptorSet";
+ case DescriptorPoolCreateFlagBits::eUpdateAfterBind : return "UpdateAfterBind";
+ default: return "invalid";
+ }
+ }
+
+ enum class DescriptorSetLayoutCreateFlagBits
+ {
+ eUpdateAfterBindPool = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT,
+ ePushDescriptorKHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
+ eUpdateAfterBindPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool : return "UpdateAfterBindPool";
+ case DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR : return "PushDescriptorKHR";
+ default: return "invalid";
+ }
+ }
+
enum class DescriptorType
{
eSampler = VK_DESCRIPTOR_TYPE_SAMPLER,
@@ -3370,9 +4099,9 @@ namespace VULKAN_HPP_NAMESPACE
enum class DescriptorUpdateTemplateType
{
eDescriptorSet = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
- ePushDescriptorsKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,
- eDescriptorSetKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR
+ ePushDescriptorsKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
};
+ using DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType;
VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateType value )
{
@@ -3384,6 +4113,14 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DeviceCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class DeviceEventTypeEXT
{
eDisplayHotplug = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT
@@ -3398,6 +4135,40 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DeviceGroupPresentModeFlagBitsKHR
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class DeviceQueueCreateFlagBits
+ {
+ eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case DeviceQueueCreateFlagBits::eProtected : return "Protected";
+ default: return "invalid";
+ }
+ }
+
enum class DiscardRectangleModeEXT
{
eInclusive = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT,
@@ -3428,6 +4199,26 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DisplayPlaneAlphaFlagBitsKHR
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
enum class DisplayPowerStateEXT
{
eOff = VK_DISPLAY_POWER_STATE_OFF_EXT,
@@ -3446,38 +4237,40 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class DriverIdKHR
+ enum class DriverId
{
- eAmdProprietary = VK_DRIVER_ID_AMD_PROPRIETARY_KHR,
- eAmdOpenSource = VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR,
- eMesaRadv = VK_DRIVER_ID_MESA_RADV_KHR,
- eNvidiaProprietary = VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR,
- eIntelProprietaryWindows = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR,
- eIntelOpenSourceMESA = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR,
- eImaginationProprietary = VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR,
- eQualcommProprietary = VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR,
- eArmProprietary = VK_DRIVER_ID_ARM_PROPRIETARY_KHR,
- eGoogleSwiftshader = VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR,
- eGgpProprietary = VK_DRIVER_ID_GGP_PROPRIETARY_KHR,
- eBroadcomProprietary = VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR
+ 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,
+ eIntelOpenSourceMesa = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR
};
+ using DriverIdKHR = DriverId;
- VULKAN_HPP_INLINE std::string to_string( DriverIdKHR value )
+ VULKAN_HPP_INLINE std::string to_string( DriverId value )
{
switch ( value )
{
- case DriverIdKHR::eAmdProprietary : return "AmdProprietary";
- case DriverIdKHR::eAmdOpenSource : return "AmdOpenSource";
- case DriverIdKHR::eMesaRadv : return "MesaRadv";
- case DriverIdKHR::eNvidiaProprietary : return "NvidiaProprietary";
- case DriverIdKHR::eIntelProprietaryWindows : return "IntelProprietaryWindows";
- case DriverIdKHR::eIntelOpenSourceMESA : return "IntelOpenSourceMESA";
- case DriverIdKHR::eImaginationProprietary : return "ImaginationProprietary";
- case DriverIdKHR::eQualcommProprietary : return "QualcommProprietary";
- case DriverIdKHR::eArmProprietary : return "ArmProprietary";
- case DriverIdKHR::eGoogleSwiftshader : return "GoogleSwiftshader";
- case DriverIdKHR::eGgpProprietary : return "GgpProprietary";
- case DriverIdKHR::eBroadcomProprietary : return "BroadcomProprietary";
+ 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";
default: return "invalid";
}
}
@@ -3526,6 +4319,205 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ExternalFenceFeatureFlagBits
+ {
+ eExportable = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT,
+ eImportable = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT
+ };
+ using ExternalFenceFeatureFlagBitsKHR = ExternalFenceFeatureFlagBits;
+
+ VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlagBits value )
+ {
+ switch ( value )
+ {
+ case ExternalFenceFeatureFlagBits::eExportable : return "Exportable";
+ case ExternalFenceFeatureFlagBits::eImportable : return "Importable";
+ default: return "invalid";
+ }
+ }
+
+ enum class ExternalFenceHandleTypeFlagBits
+ {
+ 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;
+
+ 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";
+ }
+ }
+
+ enum class ExternalMemoryFeatureFlagBits
+ {
+ 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;
+
+ 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";
+ }
+ }
+
+ enum class ExternalMemoryFeatureFlagBitsNV
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class ExternalMemoryHandleTypeFlagBits
+ {
+ 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,
+ eAndroidHardwareBufferANDROID = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
+ eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT,
+ eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT
+ };
+ using ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits;
+
+ 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";
+ case ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID : return "AndroidHardwareBufferANDROID";
+ case ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT : return "HostAllocationEXT";
+ case ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT : return "HostMappedForeignMemoryEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class ExternalMemoryHandleTypeFlagBitsNV
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class ExternalSemaphoreFeatureFlagBits
+ {
+ eExportable = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT,
+ eImportable = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT
+ };
+ using ExternalSemaphoreFeatureFlagBitsKHR = ExternalSemaphoreFeatureFlagBits;
+
+ VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlagBits value )
+ {
+ switch ( value )
+ {
+ case ExternalSemaphoreFeatureFlagBits::eExportable : return "Exportable";
+ case ExternalSemaphoreFeatureFlagBits::eImportable : return "Importable";
+ default: return "invalid";
+ }
+ }
+
+ enum class ExternalSemaphoreHandleTypeFlagBits
+ {
+ 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,
+ eSyncFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT
+ };
+ using ExternalSemaphoreHandleTypeFlagBitsKHR = ExternalSemaphoreHandleTypeFlagBits;
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ enum class FenceCreateFlagBits
+ {
+ eSignaled = VK_FENCE_CREATE_SIGNALED_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( FenceCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case FenceCreateFlagBits::eSignaled : return "Signaled";
+ default: return "invalid";
+ }
+ }
+
+ enum class FenceImportFlagBits
+ {
+ eTemporary = VK_FENCE_IMPORT_TEMPORARY_BIT
+ };
+ using FenceImportFlagBitsKHR = FenceImportFlagBits;
+
+ VULKAN_HPP_INLINE std::string to_string( FenceImportFlagBits value )
+ {
+ switch ( value )
+ {
+ case FenceImportFlagBits::eTemporary : return "Temporary";
+ default: return "invalid";
+ }
+ }
+
enum class Filter
{
eNearest = VK_FILTER_NEAREST,
@@ -4073,6 +5065,94 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class FormatFeatureFlagBits
+ {
+ 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,
+ eTransferDst = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
+ eMidpointChromaSamples = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,
+ eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,
+ eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,
+ eDisjoint = VK_FORMAT_FEATURE_DISJOINT_BIT,
+ eCositedChromaSamples = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,
+ eSampledImageFilterMinmax = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT,
+ eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG,
+ eFragmentDensityMapEXT = VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT,
+ eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR,
+ eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR,
+ eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT,
+ eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR,
+ eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR,
+ eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR,
+ eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT_KHR,
+ eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR,
+ eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
+ };
+
+ 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::eSampledImageFilterCubicIMG : return "SampledImageFilterCubicIMG";
+ case FormatFeatureFlagBits::eFragmentDensityMapEXT : return "FragmentDensityMapEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class FramebufferCreateFlagBits
+ {
+ eImageless = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT,
+ eImagelessKHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case FramebufferCreateFlagBits::eImageless : return "Imageless";
+ default: return "invalid";
+ }
+ }
+
enum class FrontFace
{
eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE,
@@ -4111,6 +5191,42 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ enum class GeometryFlagBitsNV
+ {
+ eOpaque = VK_GEOMETRY_OPAQUE_BIT_NV,
+ eNoDuplicateAnyHitInvocation = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( GeometryFlagBitsNV value )
+ {
+ switch ( value )
+ {
+ case GeometryFlagBitsNV::eOpaque : return "Opaque";
+ case GeometryFlagBitsNV::eNoDuplicateAnyHitInvocation : return "NoDuplicateAnyHitInvocation";
+ default: return "invalid";
+ }
+ }
+
+ enum class GeometryInstanceFlagBitsNV
+ {
+ eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV,
+ eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV,
+ eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV,
+ eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagBitsNV value )
+ {
+ switch ( value )
+ {
+ case GeometryInstanceFlagBitsNV::eTriangleCullDisable : return "TriangleCullDisable";
+ case GeometryInstanceFlagBitsNV::eTriangleFrontCounterclockwise : return "TriangleFrontCounterclockwise";
+ case GeometryInstanceFlagBitsNV::eForceOpaque : return "ForceOpaque";
+ case GeometryInstanceFlagBitsNV::eForceNoOpaque : return "ForceNoOpaque";
+ default: return "invalid";
+ }
+ }
+
enum class GeometryTypeNV
{
eTriangles = VK_GEOMETRY_TYPE_TRIANGLES_NV,
@@ -4127,6 +5243,91 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ImageAspectFlagBits
+ {
+ 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,
+ ePlane1 = VK_IMAGE_ASPECT_PLANE_1_BIT,
+ ePlane2 = VK_IMAGE_ASPECT_PLANE_2_BIT,
+ 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,
+ ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR,
+ ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR,
+ ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR
+ };
+
+ 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::eMemoryPlane0EXT : return "MemoryPlane0EXT";
+ case ImageAspectFlagBits::eMemoryPlane1EXT : return "MemoryPlane1EXT";
+ case ImageAspectFlagBits::eMemoryPlane2EXT : return "MemoryPlane2EXT";
+ case ImageAspectFlagBits::eMemoryPlane3EXT : return "MemoryPlane3EXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class ImageCreateFlagBits
+ {
+ 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,
+ eSplitInstanceBindRegions = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
+ e2DArrayCompatible = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
+ eBlockTexelViewCompatible = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
+ eExtendedUsage = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
+ eProtected = VK_IMAGE_CREATE_PROTECTED_BIT,
+ eDisjoint = VK_IMAGE_CREATE_DISJOINT_BIT,
+ 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,
+ eSplitInstanceBindRegionsKHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR,
+ e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR,
+ eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR,
+ eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR,
+ eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT_KHR,
+ eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT_KHR
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class ImageLayout
{
eUndefined = VK_IMAGE_LAYOUT_UNDEFINED,
@@ -4140,16 +5341,20 @@ namespace VULKAN_HPP_NAMESPACE
ePreinitialized = VK_IMAGE_LAYOUT_PREINITIALIZED,
eDepthReadOnlyStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
eDepthAttachmentStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
+ eDepthAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
+ eDepthReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,
+ eStencilAttachmentOptimal = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL,
+ eStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,
ePresentSrcKHR = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
eShadingRateOptimalNV = VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV,
eFragmentDensityMapOptimalEXT = VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT,
+ eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR,
+ eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR,
eDepthAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR,
eDepthReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR,
eStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR,
- eStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR,
- eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR,
- eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR
+ eStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR
};
VULKAN_HPP_INLINE std::string to_string( ImageLayout value )
@@ -4167,14 +5372,14 @@ namespace VULKAN_HPP_NAMESPACE
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::ePresentSrcKHR : return "PresentSrcKHR";
case ImageLayout::eSharedPresentKHR : return "SharedPresentKHR";
case ImageLayout::eShadingRateOptimalNV : return "ShadingRateOptimalNV";
case ImageLayout::eFragmentDensityMapOptimalEXT : return "FragmentDensityMapOptimalEXT";
- case ImageLayout::eDepthAttachmentOptimalKHR : return "DepthAttachmentOptimalKHR";
- case ImageLayout::eDepthReadOnlyOptimalKHR : return "DepthReadOnlyOptimalKHR";
- case ImageLayout::eStencilAttachmentOptimalKHR : return "StencilAttachmentOptimalKHR";
- case ImageLayout::eStencilReadOnlyOptimalKHR : return "StencilReadOnlyOptimalKHR";
default: return "invalid";
}
}
@@ -4215,6 +5420,52 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ImageUsageFlagBits
+ {
+ 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,
+ eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,
+ eFragmentDensityMapEXT = VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
+ };
+
+ 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::eShadingRateImageNV : return "ShadingRateImageNV";
+ case ImageUsageFlagBits::eFragmentDensityMapEXT : return "FragmentDensityMapEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class ImageViewCreateFlagBits
+ {
+ eFragmentDensityMapDynamicEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT : return "FragmentDensityMapDynamicEXT";
+ default: return "invalid";
+ }
+ }
+
enum class ImageViewType
{
e1D = VK_IMAGE_VIEW_TYPE_1D,
@@ -4261,6 +5512,26 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class IndirectCommandsLayoutUsageFlagBitsNVX
+ {
+ eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX,
+ eSparseSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX,
+ eEmptyExecutions = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX,
+ eIndexedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagBitsNVX value )
+ {
+ switch ( value )
+ {
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eUnorderedSequences : return "UnorderedSequences";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eSparseSequences : return "SparseSequences";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eEmptyExecutions : return "EmptyExecutions";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eIndexedSequences : return "IndexedSequences";
+ default: return "invalid";
+ }
+ }
+
enum class IndirectCommandsTokenTypeNVX
{
ePipeline = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX,
@@ -4289,6 +5560,14 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class InstanceCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class InternalAllocationType
{
eExecutable = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
@@ -4367,6 +5646,42 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class MemoryAllocateFlagBits
+ {
+ 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;
+
+ 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";
+ }
+ }
+
+ enum class MemoryHeapFlagBits
+ {
+ eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT,
+ eMultiInstance = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT,
+ eMultiInstanceKHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlagBits value )
+ {
+ switch ( value )
+ {
+ case MemoryHeapFlagBits::eDeviceLocal : return "DeviceLocal";
+ case MemoryHeapFlagBits::eMultiInstance : return "MultiInstance";
+ default: return "invalid";
+ }
+ }
+
enum class MemoryOverallocationBehaviorAMD
{
eDefault = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD,
@@ -4385,6 +5700,34 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class MemoryPropertyFlagBits
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class ObjectEntryTypeNVX
{
eDescriptorSet = VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX,
@@ -4407,6 +5750,22 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ObjectEntryUsageFlagBitsNVX
+ {
+ eGraphics = VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX,
+ eCompute = VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( ObjectEntryUsageFlagBitsNVX value )
+ {
+ switch ( value )
+ {
+ case ObjectEntryUsageFlagBitsNVX::eGraphics : return "Graphics";
+ case ObjectEntryUsageFlagBitsNVX::eCompute : return "Compute";
+ default: return "invalid";
+ }
+ }
+
enum class ObjectType
{
eUnknown = VK_OBJECT_TYPE_UNKNOWN,
@@ -4499,6 +5858,27 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PeerMemoryFeatureFlagBits
+ {
+ 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;
+
+ 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";
+ }
+ }
+
enum class PerformanceConfigurationTypeINTEL
{
eCommandQueueMetricsDiscoveryActivated = VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL
@@ -4513,6 +5893,101 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PerformanceCounterDescriptionFlagBitsKHR
+ {
+ ePerformanceImpacting = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR,
+ eConcurrentlyImpacted = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagBitsKHR value )
+ {
+ switch ( value )
+ {
+ case PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting : return "PerformanceImpacting";
+ case PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted : return "ConcurrentlyImpacted";
+ default: return "invalid";
+ }
+ }
+
+ enum class PerformanceCounterScopeKHR
+ {
+ eCommandBuffer = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
+ eRenderPass = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
+ eCommand = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
+ eVkQueryScopeCommandBuffer = VK_QUERY_SCOPE_COMMAND_BUFFER_KHR,
+ eVkQueryScopeRenderPass = VK_QUERY_SCOPE_RENDER_PASS_KHR,
+ eVkQueryScopeCommand = VK_QUERY_SCOPE_COMMAND_KHR
+ };
+
+ 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";
+ }
+ }
+
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ 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
+ };
+
+ 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";
+ }
+ }
+
enum class PerformanceOverrideTypeINTEL
{
eNullHardware = VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL,
@@ -4607,6 +6082,14 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PipelineCacheCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class PipelineCacheHeaderVersion
{
eOne = VK_PIPELINE_CACHE_HEADER_VERSION_ONE
@@ -4621,6 +6104,86 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PipelineColorBlendStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineCompilerControlFlagBitsAMD
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagBitsAMD )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineCreateFlagBits
+ {
+ 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,
+ eDispatchBase = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT,
+ eDeferCompileNV = VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV,
+ eCaptureStatisticsKHR = VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR,
+ eCaptureInternalRepresentationsKHR = VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR,
+ eViewIndexFromDeviceIndexKHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR,
+ eDispatchBaseKHR = VK_PIPELINE_CREATE_DISPATCH_BASE_KHR
+ };
+
+ 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::eDeferCompileNV : return "DeferCompileNV";
+ case PipelineCreateFlagBits::eCaptureStatisticsKHR : return "CaptureStatisticsKHR";
+ case PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR : return "CaptureInternalRepresentationsKHR";
+ default: return "invalid";
+ }
+ }
+
+ enum class PipelineCreationFeedbackFlagBitsEXT
+ {
+ eValid = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT,
+ eApplicationPipelineCacheHit = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT,
+ eBasePipelineAcceleration = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlagBitsEXT value )
+ {
+ switch ( value )
+ {
+ case PipelineCreationFeedbackFlagBitsEXT::eValid : return "Valid";
+ case PipelineCreationFeedbackFlagBitsEXT::eApplicationPipelineCacheHit : return "ApplicationPipelineCacheHit";
+ case PipelineCreationFeedbackFlagBitsEXT::eBasePipelineAcceleration : return "BasePipelineAcceleration";
+ default: return "invalid";
+ }
+ }
+
+ enum class PipelineDepthStencilStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineDynamicStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class PipelineExecutableStatisticFormatKHR
{
eBool32 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR,
@@ -4641,13 +6204,148 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PipelineInputAssemblyStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineLayoutCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineMultisampleStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineRasterizationStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineShaderStageCreateFlagBits
+ {
+ eAllowVaryingSubgroupSizeEXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT,
+ eRequireFullSubgroupsEXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSizeEXT : return "AllowVaryingSubgroupSizeEXT";
+ case PipelineShaderStageCreateFlagBits::eRequireFullSubgroupsEXT : return "RequireFullSubgroupsEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class PipelineStageFlagBits
+ {
+ 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,
+ eTransformFeedbackEXT = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT,
+ eConditionalRenderingEXT = VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT,
+ eCommandProcessNVX = VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX,
+ eShadingRateImageNV = VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV,
+ eRayTracingShaderNV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV,
+ eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV,
+ eTaskShaderNV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV,
+ eMeshShaderNV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV,
+ eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
+ };
+
+ 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::eTransformFeedbackEXT : return "TransformFeedbackEXT";
+ case PipelineStageFlagBits::eConditionalRenderingEXT : return "ConditionalRenderingEXT";
+ case PipelineStageFlagBits::eCommandProcessNVX : return "CommandProcessNVX";
+ case PipelineStageFlagBits::eShadingRateImageNV : return "ShadingRateImageNV";
+ case PipelineStageFlagBits::eRayTracingShaderNV : return "RayTracingShaderNV";
+ case PipelineStageFlagBits::eAccelerationStructureBuildNV : return "AccelerationStructureBuildNV";
+ case PipelineStageFlagBits::eTaskShaderNV : return "TaskShaderNV";
+ case PipelineStageFlagBits::eMeshShaderNV : return "MeshShaderNV";
+ case PipelineStageFlagBits::eFragmentDensityProcessEXT : return "FragmentDensityProcessEXT";
+ default: return "invalid";
+ }
+ }
+
+ enum class PipelineTessellationStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineVertexInputStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineViewportStateCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class PointClippingBehavior
{
eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
- eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,
- eAllClipPlanesKHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR,
- eUserClipPlanesOnlyKHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR
+ eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
};
+ using PointClippingBehaviorKHR = PointClippingBehavior;
VULKAN_HPP_INLINE std::string to_string( PointClippingBehavior value )
{
@@ -4737,6 +6435,62 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class QueryControlFlagBits
+ {
+ ePrecise = VK_QUERY_CONTROL_PRECISE_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( QueryControlFlagBits value )
+ {
+ switch ( value )
+ {
+ case QueryControlFlagBits::ePrecise : return "Precise";
+ default: return "invalid";
+ }
+ }
+
+ enum class QueryPipelineStatisticFlagBits
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ enum class QueryPoolCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class QueryPoolSamplingModeINTEL
{
eManual = VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL
@@ -4751,12 +6505,33 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class QueryResultFlagBits
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class QueryType
{
eOcclusion = VK_QUERY_TYPE_OCCLUSION,
ePipelineStatistics = VK_QUERY_TYPE_PIPELINE_STATISTICS,
eTimestamp = VK_QUERY_TYPE_TIMESTAMP,
eTransformFeedbackStreamEXT = VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT,
+ ePerformanceQueryKHR = VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR,
eAccelerationStructureCompactedSizeNV = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV,
ePerformanceQueryINTEL = VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL
};
@@ -4769,12 +6544,35 @@ namespace VULKAN_HPP_NAMESPACE
case QueryType::ePipelineStatistics : return "PipelineStatistics";
case QueryType::eTimestamp : return "Timestamp";
case QueryType::eTransformFeedbackStreamEXT : return "TransformFeedbackStreamEXT";
+ case QueryType::ePerformanceQueryKHR : return "PerformanceQueryKHR";
case QueryType::eAccelerationStructureCompactedSizeNV : return "AccelerationStructureCompactedSizeNV";
case QueryType::ePerformanceQueryINTEL : return "PerformanceQueryINTEL";
default: return "invalid";
}
}
+ enum class QueueFlagBits
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class QueueGlobalPriorityEXT
{
eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT,
@@ -4829,6 +6627,37 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class RenderPassCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class ResolveModeFlagBits
+ {
+ 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
+ };
+ using ResolveModeFlagBitsKHR = ResolveModeFlagBits;
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class Result
{
eSuccess = VK_SUCCESS,
@@ -4849,8 +6678,11 @@ namespace VULKAN_HPP_NAMESPACE
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,
eErrorInvalidExternalHandle = VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ eErrorFragmentation = VK_ERROR_FRAGMENTATION,
+ eErrorInvalidOpaqueCaptureAddress = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS,
eErrorSurfaceLostKHR = VK_ERROR_SURFACE_LOST_KHR,
eErrorNativeWindowInUseKHR = VK_ERROR_NATIVE_WINDOW_IN_USE_KHR,
eSuboptimalKHR = VK_SUBOPTIMAL_KHR,
@@ -4859,12 +6691,13 @@ namespace VULKAN_HPP_NAMESPACE
eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT,
eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV,
eErrorInvalidDrmFormatModifierPlaneLayoutEXT = VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT,
- eErrorFragmentationEXT = VK_ERROR_FRAGMENTATION_EXT,
eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT,
- eErrorInvalidDeviceAddressEXT = VK_ERROR_INVALID_DEVICE_ADDRESS_EXT,
eErrorFullScreenExclusiveModeLostEXT = VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT,
eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR,
- eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR
+ eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ eErrorFragmentationEXT = VK_ERROR_FRAGMENTATION_EXT,
+ eErrorInvalidDeviceAddressEXT = VK_ERROR_INVALID_DEVICE_ADDRESS_EXT,
+ eErrorInvalidOpaqueCaptureAddressKHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
};
VULKAN_HPP_INLINE std::string to_string( Result value )
@@ -4889,8 +6722,11 @@ namespace VULKAN_HPP_NAMESPACE
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::eErrorSurfaceLostKHR : return "ErrorSurfaceLostKHR";
case Result::eErrorNativeWindowInUseKHR : return "ErrorNativeWindowInUseKHR";
case Result::eSuboptimalKHR : return "SuboptimalKHR";
@@ -4899,14 +6735,38 @@ namespace VULKAN_HPP_NAMESPACE
case Result::eErrorValidationFailedEXT : return "ErrorValidationFailedEXT";
case Result::eErrorInvalidShaderNV : return "ErrorInvalidShaderNV";
case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT : return "ErrorInvalidDrmFormatModifierPlaneLayoutEXT";
- case Result::eErrorFragmentationEXT : return "ErrorFragmentationEXT";
case Result::eErrorNotPermittedEXT : return "ErrorNotPermittedEXT";
- case Result::eErrorInvalidDeviceAddressEXT : return "ErrorInvalidDeviceAddressEXT";
case Result::eErrorFullScreenExclusiveModeLostEXT : return "ErrorFullScreenExclusiveModeLostEXT";
default: return "invalid";
}
}
+ enum class SampleCountFlagBits
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
enum class SamplerAddressMode
{
eRepeat = VK_SAMPLER_ADDRESS_MODE_REPEAT,
@@ -4930,6 +6790,22 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class SamplerCreateFlagBits
+ {
+ eSubsampledEXT = VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT,
+ eSubsampledCoarseReconstructionEXT = VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case SamplerCreateFlagBits::eSubsampledEXT : return "SubsampledEXT";
+ case SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT : return "SubsampledCoarseReconstructionEXT";
+ default: return "invalid";
+ }
+ }
+
enum class SamplerMipmapMode
{
eNearest = VK_SAMPLER_MIPMAP_MODE_NEAREST,
@@ -4946,20 +6822,21 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class SamplerReductionModeEXT
+ enum class SamplerReductionMode
{
- eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT,
- eMin = VK_SAMPLER_REDUCTION_MODE_MIN_EXT,
- eMax = VK_SAMPLER_REDUCTION_MODE_MAX_EXT
+ eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE,
+ eMin = VK_SAMPLER_REDUCTION_MODE_MIN,
+ eMax = VK_SAMPLER_REDUCTION_MODE_MAX
};
+ using SamplerReductionModeEXT = SamplerReductionMode;
- VULKAN_HPP_INLINE std::string to_string( SamplerReductionModeEXT value )
+ VULKAN_HPP_INLINE std::string to_string( SamplerReductionMode value )
{
switch ( value )
{
- case SamplerReductionModeEXT::eWeightedAverage : return "WeightedAverage";
- case SamplerReductionModeEXT::eMin : return "Min";
- case SamplerReductionModeEXT::eMax : return "Max";
+ case SamplerReductionMode::eWeightedAverage : return "WeightedAverage";
+ case SamplerReductionMode::eMin : return "Min";
+ case SamplerReductionMode::eMax : return "Max";
default: return "invalid";
}
}
@@ -4970,13 +6847,9 @@ namespace VULKAN_HPP_NAMESPACE
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,
- eRgbIdentityKHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR,
- eYcbcrIdentityKHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR,
- eYcbcr709KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR,
- eYcbcr601KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR,
- eYcbcr2020KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR
+ eYcbcr2020 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020
};
+ using SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion;
VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrModelConversion value )
{
@@ -4994,10 +6867,9 @@ namespace VULKAN_HPP_NAMESPACE
enum class SamplerYcbcrRange
{
eItuFull = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
- eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW,
- eItuFullKHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR,
- eItuNarrowKHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR
+ eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW
};
+ using SamplerYcbcrRangeKHR = SamplerYcbcrRange;
VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrRange value )
{
@@ -5029,36 +6901,84 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class SemaphoreTypeKHR
+ enum class SemaphoreCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class SemaphoreImportFlagBits
+ {
+ eTemporary = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT
+ };
+ using SemaphoreImportFlagBitsKHR = SemaphoreImportFlagBits;
+
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlagBits value )
+ {
+ switch ( value )
+ {
+ case SemaphoreImportFlagBits::eTemporary : return "Temporary";
+ default: return "invalid";
+ }
+ }
+
+ enum class SemaphoreType
{
- eBinary = VK_SEMAPHORE_TYPE_BINARY_KHR,
- eTimeline = VK_SEMAPHORE_TYPE_TIMELINE_KHR
+ eBinary = VK_SEMAPHORE_TYPE_BINARY,
+ eTimeline = VK_SEMAPHORE_TYPE_TIMELINE
};
+ using SemaphoreTypeKHR = SemaphoreType;
- VULKAN_HPP_INLINE std::string to_string( SemaphoreTypeKHR value )
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreType value )
{
switch ( value )
{
- case SemaphoreTypeKHR::eBinary : return "Binary";
- case SemaphoreTypeKHR::eTimeline : return "Timeline";
+ case SemaphoreType::eBinary : return "Binary";
+ case SemaphoreType::eTimeline : return "Timeline";
default: return "invalid";
}
}
- enum class ShaderFloatControlsIndependenceKHR
+ enum class SemaphoreWaitFlagBits
+ {
+ eAny = VK_SEMAPHORE_WAIT_ANY_BIT
+ };
+ using SemaphoreWaitFlagBitsKHR = SemaphoreWaitFlagBits;
+
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlagBits value )
+ {
+ switch ( value )
+ {
+ case SemaphoreWaitFlagBits::eAny : return "Any";
+ default: return "invalid";
+ }
+ }
+
+ enum class ShaderCorePropertiesFlagBitsAMD
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagBitsAMD )
+ {
+ return "(void)";
+ }
+
+ enum class ShaderFloatControlsIndependence
{
- e32BitOnly = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR,
- eAll = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR,
- eNone = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR
+ 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;
- VULKAN_HPP_INLINE std::string to_string( ShaderFloatControlsIndependenceKHR value )
+ VULKAN_HPP_INLINE std::string to_string( ShaderFloatControlsIndependence value )
{
switch ( value )
{
- case ShaderFloatControlsIndependenceKHR::e32BitOnly : return "32BitOnly";
- case ShaderFloatControlsIndependenceKHR::eAll : return "All";
- case ShaderFloatControlsIndependenceKHR::eNone : return "None";
+ case ShaderFloatControlsIndependence::e32BitOnly : return "32BitOnly";
+ case ShaderFloatControlsIndependence::eAll : return "All";
+ case ShaderFloatControlsIndependence::eNone : return "None";
default: return "invalid";
}
}
@@ -5081,6 +7001,58 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ShaderModuleCreateFlagBits
+ {};
+
+ VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class ShaderStageFlagBits
+ {
+ 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,
+ eRaygenNV = VK_SHADER_STAGE_RAYGEN_BIT_NV,
+ eAnyHitNV = VK_SHADER_STAGE_ANY_HIT_BIT_NV,
+ eClosestHitNV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV,
+ eMissNV = VK_SHADER_STAGE_MISS_BIT_NV,
+ eIntersectionNV = VK_SHADER_STAGE_INTERSECTION_BIT_NV,
+ eCallableNV = VK_SHADER_STAGE_CALLABLE_BIT_NV,
+ eTaskNV = VK_SHADER_STAGE_TASK_BIT_NV,
+ eMeshNV = VK_SHADER_STAGE_MESH_BIT_NV
+ };
+
+ 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::eRaygenNV : return "RaygenNV";
+ case ShaderStageFlagBits::eAnyHitNV : return "AnyHitNV";
+ case ShaderStageFlagBits::eClosestHitNV : return "ClosestHitNV";
+ case ShaderStageFlagBits::eMissNV : return "MissNV";
+ case ShaderStageFlagBits::eIntersectionNV : return "IntersectionNV";
+ case ShaderStageFlagBits::eCallableNV : return "CallableNV";
+ case ShaderStageFlagBits::eTaskNV : return "TaskNV";
+ case ShaderStageFlagBits::eMeshNV : return "MeshNV";
+ default: return "invalid";
+ }
+ }
+
enum class ShadingRatePaletteEntryNV
{
eNoInvocations = VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV,
@@ -5133,6 +7105,57 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class SparseImageFormatFlagBits
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class SparseMemoryBindFlagBits
+ {
+ eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlagBits value )
+ {
+ switch ( value )
+ {
+ case SparseMemoryBindFlagBits::eMetadata : return "Metadata";
+ default: return "invalid";
+ }
+ }
+
+ enum class StencilFaceFlagBits
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
enum class StencilOp
{
eKeep = VK_STENCIL_OP_KEEP,
@@ -5277,6 +7300,56 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceMaintenance3Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
eDescriptorSetLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
ePhysicalDeviceShaderDrawParametersFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_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,
+ eAttachmentDescription2 = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2,
+ eAttachmentReference2 = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2,
+ eSubpassDescription2 = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2,
+ eSubpassDependency2 = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2,
+ eRenderPassCreateInfo2 = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2,
+ eSubpassBeginInfo = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO,
+ eSubpassEndInfo = VK_STRUCTURE_TYPE_SUBPASS_END_INFO,
+ ePhysicalDevice8BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES,
+ ePhysicalDeviceDriverProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES,
+ ePhysicalDeviceShaderAtomicInt64Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES,
+ ePhysicalDeviceShaderFloat16Int8Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES,
+ ePhysicalDeviceFloatControlsProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES,
+ eDescriptorSetLayoutBindingFlagsCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO,
+ ePhysicalDeviceDescriptorIndexingFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES,
+ ePhysicalDeviceDescriptorIndexingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES,
+ eDescriptorSetVariableDescriptorCountAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO,
+ eDescriptorSetVariableDescriptorCountLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT,
+ ePhysicalDeviceDepthStencilResolveProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES,
+ eSubpassDescriptionDepthStencilResolve = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE,
+ ePhysicalDeviceScalarBlockLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES,
+ eImageStencilUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO,
+ ePhysicalDeviceSamplerFilterMinmaxProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES,
+ eSamplerReductionModeCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO,
+ ePhysicalDeviceVulkanMemoryModelFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES,
+ ePhysicalDeviceImagelessFramebufferFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES,
+ eFramebufferAttachmentsCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO,
+ eFramebufferAttachmentImageInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO,
+ eRenderPassAttachmentBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO,
+ ePhysicalDeviceUniformBufferStandardLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES,
+ ePhysicalDeviceShaderSubgroupExtendedTypesFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES,
+ ePhysicalDeviceSeparateDepthStencilLayoutsFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES,
+ eAttachmentReferenceStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT,
+ eAttachmentDescriptionStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT,
+ ePhysicalDeviceHostQueryResetFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
+ ePhysicalDeviceTimelineSemaphoreFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES,
+ ePhysicalDeviceTimelineSemaphoreProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES,
+ eSemaphoreTypeCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO,
+ eTimelineSemaphoreSubmitInfo = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO,
+ eSemaphoreWaitInfo = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
+ eSemaphoreSignalInfo = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO,
+ ePhysicalDeviceBufferDeviceAddressFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES,
+ eBufferDeviceAddressInfo = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO,
+ eBufferOpaqueCaptureAddressCreateInfo = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO,
+ eMemoryOpaqueCaptureAddressAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO,
+ eDeviceMemoryOpaqueCaptureAddressInfo = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO,
eSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
ePresentInfoKHR = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
eDeviceGroupPresentCapabilitiesKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR,
@@ -5336,7 +7409,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceShaderFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR,
ePresentRegionsKHR = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR,
eObjectTableCreateInfoNVX = VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX,
eIndirectCommandsLayoutCreateInfoNVX = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX,
@@ -5360,23 +7432,19 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceImagelessFramebufferFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR,
- eFramebufferAttachmentsCreateInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR,
- eFramebufferAttachmentImageInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR,
- eRenderPassAttachmentBeginInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR,
- eAttachmentDescription2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR,
- eAttachmentReference2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR,
- eSubpassDescription2KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR,
- eSubpassDependency2KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR,
- eRenderPassCreateInfo2KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR,
- eSubpassBeginInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR,
- eSubpassEndInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR,
eSharedPresentSurfaceCapabilitiesKHR = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_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,
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,
@@ -5398,8 +7466,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT,
- eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT,
ePhysicalDeviceInlineUniformBlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT,
ePhysicalDeviceInlineUniformBlockPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT,
eWriteDescriptorSetInlineUniformBlockEXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT,
@@ -5409,7 +7475,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR,
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,
@@ -5425,11 +7490,6 @@ namespace VULKAN_HPP_NAMESPACE
eImageDrmFormatModifierPropertiesEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT,
eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT,
eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT,
- eDescriptorSetLayoutBindingFlagsCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT,
- ePhysicalDeviceDescriptorIndexingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT,
- ePhysicalDeviceDescriptorIndexingPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT,
- eDescriptorSetVariableDescriptorCountAllocateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT,
- eDescriptorSetVariableDescriptorCountLayoutSupportEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT,
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,
@@ -5450,12 +7510,9 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceImageViewImageFormatInfoEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT,
eFilterCubicImageViewImageFormatPropertiesEXT = VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT,
eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT,
- ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR,
- ePhysicalDevice8BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR,
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,
- ePhysicalDeviceShaderAtomicInt64FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR,
ePhysicalDeviceShaderClockFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR,
ePipelineCompilerControlCreateInfoAMD = VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD,
eCalibratedTimestampInfoEXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT,
@@ -5466,10 +7523,6 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceVertexAttributeDivisorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT,
ePresentFrameTokenGGP = VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP,
ePipelineCreationFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT,
- ePhysicalDeviceDriverPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR,
- ePhysicalDeviceFloatControlsPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR,
- ePhysicalDeviceDepthStencilResolvePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR,
- eSubpassDescriptionDepthStencilResolveKHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR,
ePhysicalDeviceComputeShaderDerivativesFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV,
ePhysicalDeviceMeshShaderFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV,
ePhysicalDeviceMeshShaderPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV,
@@ -5479,12 +7532,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceTimelineSemaphoreFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR,
- ePhysicalDeviceTimelineSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR,
- eSemaphoreTypeCreateInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR,
- eTimelineSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR,
- eSemaphoreWaitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR,
- eSemaphoreSignalInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR,
ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL,
eQueryPoolCreateInfoINTEL = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL,
eInitializePerformanceApiInfoINTEL = VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL,
@@ -5492,7 +7539,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceVulkanMemoryModelFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR,
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,
@@ -5501,7 +7547,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceScalarBlockLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT,
ePhysicalDeviceSubgroupSizeControlPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT,
ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT,
ePhysicalDeviceSubgroupSizeControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT,
@@ -5512,13 +7557,9 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR,
- eAttachmentReferenceStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR,
- eAttachmentDescriptionStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR,
ePhysicalDeviceBufferDeviceAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT,
- eBufferDeviceAddressInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT,
eBufferDeviceAddressCreateInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT,
- eImageStencilUsageCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT,
+ ePhysicalDeviceToolPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT,
eValidationFeaturesEXT = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT,
ePhysicalDeviceCooperativeMatrixFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV,
eCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV,
@@ -5528,7 +7569,6 @@ namespace VULKAN_HPP_NAMESPACE
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,
- ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_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,
@@ -5536,7 +7576,6 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceLineRasterizationFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT,
ePipelineRasterizationLineStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT,
ePhysicalDeviceLineRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT,
- ePhysicalDeviceHostQueryResetFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT,
ePhysicalDeviceIndexTypeUint8FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT,
ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR,
ePipelineInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR,
@@ -5582,9 +7621,21 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceExternalSemaphoreInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR,
eExternalSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR,
eExportSemaphoreCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR,
+ ePhysicalDeviceShaderFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR,
ePhysicalDeviceFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR,
ePhysicalDevice16BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR,
eDescriptorUpdateTemplateCreateInfoKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR,
+ ePhysicalDeviceImagelessFramebufferFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR,
+ eFramebufferAttachmentsCreateInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR,
+ eFramebufferAttachmentImageInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR,
+ eRenderPassAttachmentBeginInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR,
+ eAttachmentDescription2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR,
+ eAttachmentReference2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR,
+ eSubpassDescription2KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR,
+ eSubpassDependency2KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR,
+ eRenderPassCreateInfo2KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR,
+ eSubpassBeginInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR,
+ eSubpassEndInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR,
ePhysicalDeviceExternalFenceInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR,
eExternalFencePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR,
eExportFenceCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR,
@@ -5596,11 +7647,14 @@ namespace VULKAN_HPP_NAMESPACE
ePhysicalDeviceVariablePointersFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR,
eMemoryDedicatedRequirementsKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR,
eMemoryDedicatedAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR,
+ ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT,
+ eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT,
eBufferMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR,
eImageMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR,
eImageSparseMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR,
eMemoryRequirements2KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR,
eSparseImageMemoryRequirements2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR,
+ eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR,
eSamplerYcbcrConversionCreateInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR,
eSamplerYcbcrConversionInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR,
eBindImagePlaneMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR,
@@ -5609,9 +7663,41 @@ namespace VULKAN_HPP_NAMESPACE
eSamplerYcbcrConversionImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR,
eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR,
+ eDescriptorSetLayoutBindingFlagsCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT,
+ ePhysicalDeviceDescriptorIndexingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT,
+ ePhysicalDeviceDescriptorIndexingPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT,
+ eDescriptorSetVariableDescriptorCountAllocateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT,
+ eDescriptorSetVariableDescriptorCountLayoutSupportEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT,
ePhysicalDeviceMaintenance3PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR,
eDescriptorSetLayoutSupportKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR,
- ePhysicalDeviceBufferAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT
+ ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR,
+ ePhysicalDevice8BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR,
+ ePhysicalDeviceShaderAtomicInt64FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR,
+ ePhysicalDeviceDriverPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR,
+ ePhysicalDeviceFloatControlsPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR,
+ ePhysicalDeviceDepthStencilResolvePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR,
+ eSubpassDescriptionDepthStencilResolveKHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR,
+ ePhysicalDeviceTimelineSemaphoreFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR,
+ ePhysicalDeviceTimelineSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR,
+ eSemaphoreTypeCreateInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR,
+ eTimelineSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR,
+ eSemaphoreWaitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR,
+ eSemaphoreSignalInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR,
+ ePhysicalDeviceVulkanMemoryModelFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR,
+ ePhysicalDeviceScalarBlockLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT,
+ ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR,
+ eAttachmentReferenceStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR,
+ eAttachmentDescriptionStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR,
+ ePhysicalDeviceBufferAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT,
+ eBufferDeviceAddressInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT,
+ eImageStencilUsageCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT,
+ ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR,
+ ePhysicalDeviceBufferDeviceAddressFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR,
+ eBufferDeviceAddressInfoKHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR,
+ eBufferOpaqueCaptureAddressCreateInfoKHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR,
+ eMemoryOpaqueCaptureAddressAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR,
+ eDeviceMemoryOpaqueCaptureAddressInfoKHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR,
+ ePhysicalDeviceHostQueryResetFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT
};
VULKAN_HPP_INLINE std::string to_string( StructureType value )
@@ -5732,6 +7818,56 @@ namespace VULKAN_HPP_NAMESPACE
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::eSwapchainCreateInfoKHR : return "SwapchainCreateInfoKHR";
case StructureType::ePresentInfoKHR : return "PresentInfoKHR";
case StructureType::eDeviceGroupPresentCapabilitiesKHR : return "DeviceGroupPresentCapabilitiesKHR";
@@ -5791,7 +7927,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT : return "CommandBufferInheritanceConditionalRenderingInfoEXT";
case StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT : return "PhysicalDeviceConditionalRenderingFeaturesEXT";
case StructureType::eConditionalRenderingBeginInfoEXT : return "ConditionalRenderingBeginInfoEXT";
- case StructureType::ePhysicalDeviceShaderFloat16Int8FeaturesKHR : return "PhysicalDeviceShaderFloat16Int8FeaturesKHR";
case StructureType::ePresentRegionsKHR : return "PresentRegionsKHR";
case StructureType::eObjectTableCreateInfoNVX : return "ObjectTableCreateInfoNVX";
case StructureType::eIndirectCommandsLayoutCreateInfoNVX : return "IndirectCommandsLayoutCreateInfoNVX";
@@ -5815,23 +7950,19 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT : return "PhysicalDeviceDepthClipEnableFeaturesEXT";
case StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT : return "PipelineRasterizationDepthClipStateCreateInfoEXT";
case StructureType::eHdrMetadataEXT : return "HdrMetadataEXT";
- case StructureType::ePhysicalDeviceImagelessFramebufferFeaturesKHR : return "PhysicalDeviceImagelessFramebufferFeaturesKHR";
- case StructureType::eFramebufferAttachmentsCreateInfoKHR : return "FramebufferAttachmentsCreateInfoKHR";
- case StructureType::eFramebufferAttachmentImageInfoKHR : return "FramebufferAttachmentImageInfoKHR";
- case StructureType::eRenderPassAttachmentBeginInfoKHR : return "RenderPassAttachmentBeginInfoKHR";
- case StructureType::eAttachmentDescription2KHR : return "AttachmentDescription2KHR";
- case StructureType::eAttachmentReference2KHR : return "AttachmentReference2KHR";
- case StructureType::eSubpassDescription2KHR : return "SubpassDescription2KHR";
- case StructureType::eSubpassDependency2KHR : return "SubpassDependency2KHR";
- case StructureType::eRenderPassCreateInfo2KHR : return "RenderPassCreateInfo2KHR";
- case StructureType::eSubpassBeginInfoKHR : return "SubpassBeginInfoKHR";
- case StructureType::eSubpassEndInfoKHR : return "SubpassEndInfoKHR";
case StructureType::eSharedPresentSurfaceCapabilitiesKHR : return "SharedPresentSurfaceCapabilitiesKHR";
case StructureType::eImportFenceWin32HandleInfoKHR : return "ImportFenceWin32HandleInfoKHR";
case StructureType::eExportFenceWin32HandleInfoKHR : return "ExportFenceWin32HandleInfoKHR";
case StructureType::eFenceGetWin32HandleInfoKHR : return "FenceGetWin32HandleInfoKHR";
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";
@@ -5853,8 +7984,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eImportAndroidHardwareBufferInfoANDROID : return "ImportAndroidHardwareBufferInfoANDROID";
case StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID : return "MemoryGetAndroidHardwareBufferInfoANDROID";
case StructureType::eExternalFormatANDROID : return "ExternalFormatANDROID";
- case StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT : return "PhysicalDeviceSamplerFilterMinmaxPropertiesEXT";
- case StructureType::eSamplerReductionModeCreateInfoEXT : return "SamplerReductionModeCreateInfoEXT";
case StructureType::ePhysicalDeviceInlineUniformBlockFeaturesEXT : return "PhysicalDeviceInlineUniformBlockFeaturesEXT";
case StructureType::ePhysicalDeviceInlineUniformBlockPropertiesEXT : return "PhysicalDeviceInlineUniformBlockPropertiesEXT";
case StructureType::eWriteDescriptorSetInlineUniformBlockEXT : return "WriteDescriptorSetInlineUniformBlockEXT";
@@ -5864,7 +7993,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePipelineSampleLocationsStateCreateInfoEXT : return "PipelineSampleLocationsStateCreateInfoEXT";
case StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT : return "PhysicalDeviceSampleLocationsPropertiesEXT";
case StructureType::eMultisamplePropertiesEXT : return "MultisamplePropertiesEXT";
- case StructureType::eImageFormatListCreateInfoKHR : return "ImageFormatListCreateInfoKHR";
case StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT : return "PhysicalDeviceBlendOperationAdvancedFeaturesEXT";
case StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT : return "PhysicalDeviceBlendOperationAdvancedPropertiesEXT";
case StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT : return "PipelineColorBlendAdvancedStateCreateInfoEXT";
@@ -5880,11 +8008,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eImageDrmFormatModifierPropertiesEXT : return "ImageDrmFormatModifierPropertiesEXT";
case StructureType::eValidationCacheCreateInfoEXT : return "ValidationCacheCreateInfoEXT";
case StructureType::eShaderModuleValidationCacheCreateInfoEXT : return "ShaderModuleValidationCacheCreateInfoEXT";
- case StructureType::eDescriptorSetLayoutBindingFlagsCreateInfoEXT : return "DescriptorSetLayoutBindingFlagsCreateInfoEXT";
- case StructureType::ePhysicalDeviceDescriptorIndexingFeaturesEXT : return "PhysicalDeviceDescriptorIndexingFeaturesEXT";
- case StructureType::ePhysicalDeviceDescriptorIndexingPropertiesEXT : return "PhysicalDeviceDescriptorIndexingPropertiesEXT";
- case StructureType::eDescriptorSetVariableDescriptorCountAllocateInfoEXT : return "DescriptorSetVariableDescriptorCountAllocateInfoEXT";
- case StructureType::eDescriptorSetVariableDescriptorCountLayoutSupportEXT : return "DescriptorSetVariableDescriptorCountLayoutSupportEXT";
case StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV : return "PipelineViewportShadingRateImageStateCreateInfoNV";
case StructureType::ePhysicalDeviceShadingRateImageFeaturesNV : return "PhysicalDeviceShadingRateImageFeaturesNV";
case StructureType::ePhysicalDeviceShadingRateImagePropertiesNV : return "PhysicalDeviceShadingRateImagePropertiesNV";
@@ -5905,12 +8028,9 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT : return "PhysicalDeviceImageViewImageFormatInfoEXT";
case StructureType::eFilterCubicImageViewImageFormatPropertiesEXT : return "FilterCubicImageViewImageFormatPropertiesEXT";
case StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT : return "DeviceQueueGlobalPriorityCreateInfoEXT";
- case StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR : return "PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR";
- case StructureType::ePhysicalDevice8BitStorageFeaturesKHR : return "PhysicalDevice8BitStorageFeaturesKHR";
case StructureType::eImportMemoryHostPointerInfoEXT : return "ImportMemoryHostPointerInfoEXT";
case StructureType::eMemoryHostPointerPropertiesEXT : return "MemoryHostPointerPropertiesEXT";
case StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT : return "PhysicalDeviceExternalMemoryHostPropertiesEXT";
- case StructureType::ePhysicalDeviceShaderAtomicInt64FeaturesKHR : return "PhysicalDeviceShaderAtomicInt64FeaturesKHR";
case StructureType::ePhysicalDeviceShaderClockFeaturesKHR : return "PhysicalDeviceShaderClockFeaturesKHR";
case StructureType::ePipelineCompilerControlCreateInfoAMD : return "PipelineCompilerControlCreateInfoAMD";
case StructureType::eCalibratedTimestampInfoEXT : return "CalibratedTimestampInfoEXT";
@@ -5921,10 +8041,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT : return "PhysicalDeviceVertexAttributeDivisorFeaturesEXT";
case StructureType::ePresentFrameTokenGGP : return "PresentFrameTokenGGP";
case StructureType::ePipelineCreationFeedbackCreateInfoEXT : return "PipelineCreationFeedbackCreateInfoEXT";
- case StructureType::ePhysicalDeviceDriverPropertiesKHR : return "PhysicalDeviceDriverPropertiesKHR";
- case StructureType::ePhysicalDeviceFloatControlsPropertiesKHR : return "PhysicalDeviceFloatControlsPropertiesKHR";
- case StructureType::ePhysicalDeviceDepthStencilResolvePropertiesKHR : return "PhysicalDeviceDepthStencilResolvePropertiesKHR";
- case StructureType::eSubpassDescriptionDepthStencilResolveKHR : return "SubpassDescriptionDepthStencilResolveKHR";
case StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV : return "PhysicalDeviceComputeShaderDerivativesFeaturesNV";
case StructureType::ePhysicalDeviceMeshShaderFeaturesNV : return "PhysicalDeviceMeshShaderFeaturesNV";
case StructureType::ePhysicalDeviceMeshShaderPropertiesNV : return "PhysicalDeviceMeshShaderPropertiesNV";
@@ -5934,12 +8050,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV : return "PhysicalDeviceExclusiveScissorFeaturesNV";
case StructureType::eCheckpointDataNV : return "CheckpointDataNV";
case StructureType::eQueueFamilyCheckpointPropertiesNV : return "QueueFamilyCheckpointPropertiesNV";
- case StructureType::ePhysicalDeviceTimelineSemaphoreFeaturesKHR : return "PhysicalDeviceTimelineSemaphoreFeaturesKHR";
- case StructureType::ePhysicalDeviceTimelineSemaphorePropertiesKHR : return "PhysicalDeviceTimelineSemaphorePropertiesKHR";
- case StructureType::eSemaphoreTypeCreateInfoKHR : return "SemaphoreTypeCreateInfoKHR";
- case StructureType::eTimelineSemaphoreSubmitInfoKHR : return "TimelineSemaphoreSubmitInfoKHR";
- case StructureType::eSemaphoreWaitInfoKHR : return "SemaphoreWaitInfoKHR";
- case StructureType::eSemaphoreSignalInfoKHR : return "SemaphoreSignalInfoKHR";
case StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL : return "PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL";
case StructureType::eQueryPoolCreateInfoINTEL : return "QueryPoolCreateInfoINTEL";
case StructureType::eInitializePerformanceApiInfoINTEL : return "InitializePerformanceApiInfoINTEL";
@@ -5947,7 +8057,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePerformanceStreamMarkerInfoINTEL : return "PerformanceStreamMarkerInfoINTEL";
case StructureType::ePerformanceOverrideInfoINTEL : return "PerformanceOverrideInfoINTEL";
case StructureType::ePerformanceConfigurationAcquireInfoINTEL : return "PerformanceConfigurationAcquireInfoINTEL";
- case StructureType::ePhysicalDeviceVulkanMemoryModelFeaturesKHR : return "PhysicalDeviceVulkanMemoryModelFeaturesKHR";
case StructureType::ePhysicalDevicePciBusInfoPropertiesEXT : return "PhysicalDevicePciBusInfoPropertiesEXT";
case StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD : return "DisplayNativeHdrSurfaceCapabilitiesAMD";
case StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD : return "SwapchainDisplayNativeHdrCreateInfoAMD";
@@ -5956,7 +8065,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT : return "PhysicalDeviceFragmentDensityMapFeaturesEXT";
case StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT : return "PhysicalDeviceFragmentDensityMapPropertiesEXT";
case StructureType::eRenderPassFragmentDensityMapCreateInfoEXT : return "RenderPassFragmentDensityMapCreateInfoEXT";
- case StructureType::ePhysicalDeviceScalarBlockLayoutFeaturesEXT : return "PhysicalDeviceScalarBlockLayoutFeaturesEXT";
case StructureType::ePhysicalDeviceSubgroupSizeControlPropertiesEXT : return "PhysicalDeviceSubgroupSizeControlPropertiesEXT";
case StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT : return "PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT";
case StructureType::ePhysicalDeviceSubgroupSizeControlFeaturesEXT : return "PhysicalDeviceSubgroupSizeControlFeaturesEXT";
@@ -5967,13 +8075,9 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eMemoryPriorityAllocateInfoEXT : return "MemoryPriorityAllocateInfoEXT";
case StructureType::eSurfaceProtectedCapabilitiesKHR : return "SurfaceProtectedCapabilitiesKHR";
case StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV : return "PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV";
- case StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR : return "PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR";
- case StructureType::eAttachmentReferenceStencilLayoutKHR : return "AttachmentReferenceStencilLayoutKHR";
- case StructureType::eAttachmentDescriptionStencilLayoutKHR : return "AttachmentDescriptionStencilLayoutKHR";
case StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT : return "PhysicalDeviceBufferDeviceAddressFeaturesEXT";
- case StructureType::eBufferDeviceAddressInfoEXT : return "BufferDeviceAddressInfoEXT";
case StructureType::eBufferDeviceAddressCreateInfoEXT : return "BufferDeviceAddressCreateInfoEXT";
- case StructureType::eImageStencilUsageCreateInfoEXT : return "ImageStencilUsageCreateInfoEXT";
+ case StructureType::ePhysicalDeviceToolPropertiesEXT : return "PhysicalDeviceToolPropertiesEXT";
case StructureType::eValidationFeaturesEXT : return "ValidationFeaturesEXT";
case StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV : return "PhysicalDeviceCooperativeMatrixFeaturesNV";
case StructureType::eCooperativeMatrixPropertiesNV : return "CooperativeMatrixPropertiesNV";
@@ -5983,7 +8087,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eFramebufferMixedSamplesCombinationNV : return "FramebufferMixedSamplesCombinationNV";
case StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT : return "PhysicalDeviceFragmentShaderInterlockFeaturesEXT";
case StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT : return "PhysicalDeviceYcbcrImageArraysFeaturesEXT";
- case StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR : return "PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR";
case StructureType::eSurfaceFullScreenExclusiveInfoEXT : return "SurfaceFullScreenExclusiveInfoEXT";
case StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT : return "SurfaceCapabilitiesFullScreenExclusiveEXT";
case StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT : return "SurfaceFullScreenExclusiveWin32InfoEXT";
@@ -5991,7 +8094,6 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT : return "PhysicalDeviceLineRasterizationFeaturesEXT";
case StructureType::ePipelineRasterizationLineStateCreateInfoEXT : return "PipelineRasterizationLineStateCreateInfoEXT";
case StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT : return "PhysicalDeviceLineRasterizationPropertiesEXT";
- case StructureType::ePhysicalDeviceHostQueryResetFeaturesEXT : return "PhysicalDeviceHostQueryResetFeaturesEXT";
case StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT : return "PhysicalDeviceIndexTypeUint8FeaturesEXT";
case StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR : return "PhysicalDevicePipelineExecutablePropertiesFeaturesKHR";
case StructureType::ePipelineInfoKHR : return "PipelineInfoKHR";
@@ -6006,6 +8108,36 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class SubgroupFeatureFlagBits
+ {
+ 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,
+ ePartitionedNV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV
+ };
+
+ 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::ePartitionedNV : return "PartitionedNV";
+ default: return "invalid";
+ }
+ }
+
enum class SubpassContents
{
eInline = VK_SUBPASS_CONTENTS_INLINE,
@@ -6022,6 +8154,84 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class SubpassDescriptionFlagBits
+ {
+ ePerViewAttributesNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX,
+ ePerViewPositionXOnlyNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlagBits value )
+ {
+ switch ( value )
+ {
+ case SubpassDescriptionFlagBits::ePerViewAttributesNVX : return "PerViewAttributesNVX";
+ case SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX : return "PerViewPositionXOnlyNVX";
+ default: return "invalid";
+ }
+ }
+
+ enum class SurfaceCounterFlagBitsEXT
+ {
+ eVblank = VK_SURFACE_COUNTER_VBLANK_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagBitsEXT value )
+ {
+ switch ( value )
+ {
+ case SurfaceCounterFlagBitsEXT::eVblank : return "Vblank";
+ default: return "invalid";
+ }
+ }
+
+ enum class SurfaceTransformFlagBitsKHR
+ {
+ 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
+ };
+
+ 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";
+ }
+ }
+
+ enum class SwapchainCreateFlagBitsKHR
+ {
+ 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
+ };
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
enum class SystemAllocationScope
{
eCommand = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND,
@@ -6047,10 +8257,9 @@ namespace VULKAN_HPP_NAMESPACE
enum class TessellationDomainOrigin
{
eUpperLeft = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
- eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT,
- eUpperLeftKHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR,
- eLowerLeftKHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR
+ eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT
};
+ using TessellationDomainOriginKHR = TessellationDomainOrigin;
VULKAN_HPP_INLINE std::string to_string( TessellationDomainOrigin value )
{
@@ -6082,6 +8291,32 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class ToolPurposeFlagBitsEXT
+ {
+ eValidation = VK_TOOL_PURPOSE_VALIDATION_BIT_EXT,
+ eProfiling = VK_TOOL_PURPOSE_PROFILING_BIT_EXT,
+ eTracing = VK_TOOL_PURPOSE_TRACING_BIT_EXT,
+ eAdditionalFeatures = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT,
+ eModifyingFeatures = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT,
+ eDebugReporting = VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT,
+ eDebugMarkers = VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlagBitsEXT value )
+ {
+ switch ( value )
+ {
+ case ToolPurposeFlagBitsEXT::eValidation : return "Validation";
+ case ToolPurposeFlagBitsEXT::eProfiling : return "Profiling";
+ case ToolPurposeFlagBitsEXT::eTracing : return "Tracing";
+ case ToolPurposeFlagBitsEXT::eAdditionalFeatures : return "AdditionalFeatures";
+ case ToolPurposeFlagBitsEXT::eModifyingFeatures : return "ModifyingFeatures";
+ case ToolPurposeFlagBitsEXT::eDebugReporting : return "DebugReporting";
+ case ToolPurposeFlagBitsEXT::eDebugMarkers : return "DebugMarkers";
+ default: return "invalid";
+ }
+ }
+
enum class ValidationCacheHeaderVersionEXT
{
eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT
@@ -6223,74 +8458,6 @@ namespace VULKAN_HPP_NAMESPACE
{
};
- enum class AccessFlagBits
- {
- 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,
- 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,
- eCommandProcessReadNVX = VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX,
- eCommandProcessWriteNVX = VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX,
- eColorAttachmentReadNoncoherentEXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT,
- eShadingRateImageReadNV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV,
- eAccelerationStructureReadNV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV,
- eAccelerationStructureWriteNV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV,
- eFragmentDensityMapReadEXT = VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT
- };
-
- 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::eTransformFeedbackWriteEXT : return "TransformFeedbackWriteEXT";
- case AccessFlagBits::eTransformFeedbackCounterReadEXT : return "TransformFeedbackCounterReadEXT";
- case AccessFlagBits::eTransformFeedbackCounterWriteEXT : return "TransformFeedbackCounterWriteEXT";
- case AccessFlagBits::eConditionalRenderingReadEXT : return "ConditionalRenderingReadEXT";
- case AccessFlagBits::eCommandProcessReadNVX : return "CommandProcessReadNVX";
- case AccessFlagBits::eCommandProcessWriteNVX : return "CommandProcessWriteNVX";
- case AccessFlagBits::eColorAttachmentReadNoncoherentEXT : return "ColorAttachmentReadNoncoherentEXT";
- case AccessFlagBits::eShadingRateImageReadNV : return "ShadingRateImageReadNV";
- case AccessFlagBits::eAccelerationStructureReadNV : return "AccelerationStructureReadNV";
- case AccessFlagBits::eAccelerationStructureWriteNV : return "AccelerationStructureWriteNV";
- case AccessFlagBits::eFragmentDensityMapReadEXT : return "FragmentDensityMapReadEXT";
- default: return "invalid";
- }
- }
-
using AccessFlags = Flags<AccessFlagBits, VkAccessFlags>;
template <> struct FlagTraits<AccessFlagBits>
@@ -6321,16 +8488,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( AccessFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( AccessFlagBits bit0, AccessFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return AccessFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( AccessFlagBits bit0, AccessFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return AccessFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( AccessFlags value )
{
if ( !value ) return "{}";
@@ -6367,6 +8524,13 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
+ using AcquireProfilingLockFlagsKHR = Flags<AcquireProfilingLockFlagBitsKHR, VkAcquireProfilingLockFlagsKHR>;
+
+ VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagsKHR )
+ {
+ return "{}";
+ }
+
#ifdef VK_USE_PLATFORM_ANDROID_KHR
enum class AndroidSurfaceCreateFlagBitsKHR
{};
@@ -6384,20 +8548,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- enum class AttachmentDescriptionFlagBits
- {
- eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlagBits value )
- {
- switch ( value )
- {
- case AttachmentDescriptionFlagBits::eMayAlias : return "MayAlias";
- default: return "invalid";
- }
- }
-
using AttachmentDescriptionFlags = Flags<AttachmentDescriptionFlagBits, VkAttachmentDescriptionFlags>;
template <> struct FlagTraits<AttachmentDescriptionFlagBits>
@@ -6428,16 +8578,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( AttachmentDescriptionFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( AttachmentDescriptionFlagBits bit0, AttachmentDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return AttachmentDescriptionFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( AttachmentDescriptionFlagBits bit0, AttachmentDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return AttachmentDescriptionFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlags value )
{
if ( !value ) return "{}";
@@ -6447,35 +8587,13 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class BufferCreateFlagBits
- {
- 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,
- eDeviceAddressCaptureReplayEXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
- };
-
- 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::eDeviceAddressCaptureReplayEXT : return "DeviceAddressCaptureReplayEXT";
- default: return "invalid";
- }
- }
-
using BufferCreateFlags = Flags<BufferCreateFlagBits, VkBufferCreateFlags>;
template <> struct FlagTraits<BufferCreateFlagBits>
{
enum
{
- allFlags = VkFlags(BufferCreateFlagBits::eSparseBinding) | VkFlags(BufferCreateFlagBits::eSparseResidency) | VkFlags(BufferCreateFlagBits::eSparseAliased) | VkFlags(BufferCreateFlagBits::eProtected) | VkFlags(BufferCreateFlagBits::eDeviceAddressCaptureReplayEXT)
+ allFlags = VkFlags(BufferCreateFlagBits::eSparseBinding) | VkFlags(BufferCreateFlagBits::eSparseResidency) | VkFlags(BufferCreateFlagBits::eSparseAliased) | VkFlags(BufferCreateFlagBits::eProtected) | VkFlags(BufferCreateFlagBits::eDeviceAddressCaptureReplay)
};
};
@@ -6499,16 +8617,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( BufferCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BufferCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BufferCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( BufferCreateFlags value )
{
if ( !value ) return "{}";
@@ -6518,57 +8626,17 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & BufferCreateFlagBits::eSparseResidency ) result += "SparseResidency | ";
if ( value & BufferCreateFlagBits::eSparseAliased ) result += "SparseAliased | ";
if ( value & BufferCreateFlagBits::eProtected ) result += "Protected | ";
- if ( value & BufferCreateFlagBits::eDeviceAddressCaptureReplayEXT ) result += "DeviceAddressCaptureReplayEXT | ";
+ if ( value & BufferCreateFlagBits::eDeviceAddressCaptureReplay ) result += "DeviceAddressCaptureReplay | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class BufferUsageFlagBits
- {
- 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,
- 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,
- eRayTracingNV = VK_BUFFER_USAGE_RAY_TRACING_BIT_NV,
- eShaderDeviceAddressEXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
- };
-
- 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::eTransformFeedbackBufferEXT : return "TransformFeedbackBufferEXT";
- case BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT : return "TransformFeedbackCounterBufferEXT";
- case BufferUsageFlagBits::eConditionalRenderingEXT : return "ConditionalRenderingEXT";
- case BufferUsageFlagBits::eRayTracingNV : return "RayTracingNV";
- case BufferUsageFlagBits::eShaderDeviceAddressEXT : return "ShaderDeviceAddressEXT";
- default: return "invalid";
- }
- }
-
using BufferUsageFlags = Flags<BufferUsageFlagBits, VkBufferUsageFlags>;
template <> struct FlagTraits<BufferUsageFlagBits>
{
enum
{
- allFlags = VkFlags(BufferUsageFlagBits::eTransferSrc) | VkFlags(BufferUsageFlagBits::eTransferDst) | VkFlags(BufferUsageFlagBits::eUniformTexelBuffer) | VkFlags(BufferUsageFlagBits::eStorageTexelBuffer) | VkFlags(BufferUsageFlagBits::eUniformBuffer) | VkFlags(BufferUsageFlagBits::eStorageBuffer) | VkFlags(BufferUsageFlagBits::eIndexBuffer) | VkFlags(BufferUsageFlagBits::eVertexBuffer) | VkFlags(BufferUsageFlagBits::eIndirectBuffer) | VkFlags(BufferUsageFlagBits::eTransformFeedbackBufferEXT) | VkFlags(BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT) | VkFlags(BufferUsageFlagBits::eConditionalRenderingEXT) | VkFlags(BufferUsageFlagBits::eRayTracingNV) | VkFlags(BufferUsageFlagBits::eShaderDeviceAddressEXT)
+ allFlags = VkFlags(BufferUsageFlagBits::eTransferSrc) | VkFlags(BufferUsageFlagBits::eTransferDst) | VkFlags(BufferUsageFlagBits::eUniformTexelBuffer) | VkFlags(BufferUsageFlagBits::eStorageTexelBuffer) | VkFlags(BufferUsageFlagBits::eUniformBuffer) | VkFlags(BufferUsageFlagBits::eStorageBuffer) | VkFlags(BufferUsageFlagBits::eIndexBuffer) | VkFlags(BufferUsageFlagBits::eVertexBuffer) | VkFlags(BufferUsageFlagBits::eIndirectBuffer) | VkFlags(BufferUsageFlagBits::eShaderDeviceAddress) | VkFlags(BufferUsageFlagBits::eTransformFeedbackBufferEXT) | VkFlags(BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT) | VkFlags(BufferUsageFlagBits::eConditionalRenderingEXT) | VkFlags(BufferUsageFlagBits::eRayTracingNV)
};
};
@@ -6592,16 +8660,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( BufferUsageFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BufferUsageFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BufferUsageFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( BufferUsageFlags value )
{
if ( !value ) return "{}";
@@ -6616,22 +8674,14 @@ namespace VULKAN_HPP_NAMESPACE
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::eTransformFeedbackBufferEXT ) result += "TransformFeedbackBufferEXT | ";
if ( value & BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) result += "TransformFeedbackCounterBufferEXT | ";
if ( value & BufferUsageFlagBits::eConditionalRenderingEXT ) result += "ConditionalRenderingEXT | ";
if ( value & BufferUsageFlagBits::eRayTracingNV ) result += "RayTracingNV | ";
- if ( value & BufferUsageFlagBits::eShaderDeviceAddressEXT ) result += "ShaderDeviceAddressEXT | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class BufferViewCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits )
- {
- return "(void)";
- }
-
using BufferViewCreateFlags = Flags<BufferViewCreateFlagBits, VkBufferViewCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlags )
@@ -6639,28 +8689,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class BuildAccelerationStructureFlagBitsNV
- {
- eAllowUpdate = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV,
- eAllowCompaction = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV,
- ePreferFastTrace = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV,
- ePreferFastBuild = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV,
- eLowMemory = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
- };
-
- VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagBitsNV value )
- {
- switch ( value )
- {
- case BuildAccelerationStructureFlagBitsNV::eAllowUpdate : return "AllowUpdate";
- case BuildAccelerationStructureFlagBitsNV::eAllowCompaction : return "AllowCompaction";
- case BuildAccelerationStructureFlagBitsNV::ePreferFastTrace : return "PreferFastTrace";
- case BuildAccelerationStructureFlagBitsNV::ePreferFastBuild : return "PreferFastBuild";
- case BuildAccelerationStructureFlagBitsNV::eLowMemory : return "LowMemory";
- default: return "invalid";
- }
- }
-
using BuildAccelerationStructureFlagsNV = Flags<BuildAccelerationStructureFlagBitsNV, VkBuildAccelerationStructureFlagsNV>;
template <> struct FlagTraits<BuildAccelerationStructureFlagBitsNV>
@@ -6691,16 +8719,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( BuildAccelerationStructureFlagsNV( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( BuildAccelerationStructureFlagBitsNV bit0, BuildAccelerationStructureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BuildAccelerationStructureFlagsNV( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( BuildAccelerationStructureFlagBitsNV bit0, BuildAccelerationStructureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return BuildAccelerationStructureFlagsNV( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagsNV value )
{
if ( !value ) return "{}";
@@ -6714,26 +8732,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ColorComponentFlagBits
- {
- eR = VK_COLOR_COMPONENT_R_BIT,
- eG = VK_COLOR_COMPONENT_G_BIT,
- eB = VK_COLOR_COMPONENT_B_BIT,
- eA = VK_COLOR_COMPONENT_A_BIT
- };
-
- 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";
- }
- }
-
using ColorComponentFlags = Flags<ColorComponentFlagBits, VkColorComponentFlags>;
template <> struct FlagTraits<ColorComponentFlagBits>
@@ -6764,16 +8762,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ColorComponentFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ColorComponentFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ColorComponentFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ColorComponentFlags value )
{
if ( !value ) return "{}";
@@ -6786,20 +8774,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class CommandBufferResetFlagBits
- {
- eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlagBits value )
- {
- switch ( value )
- {
- case CommandBufferResetFlagBits::eReleaseResources : return "ReleaseResources";
- default: return "invalid";
- }
- }
-
using CommandBufferResetFlags = Flags<CommandBufferResetFlagBits, VkCommandBufferResetFlags>;
template <> struct FlagTraits<CommandBufferResetFlagBits>
@@ -6830,16 +8804,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CommandBufferResetFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CommandBufferResetFlagBits bit0, CommandBufferResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandBufferResetFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CommandBufferResetFlagBits bit0, CommandBufferResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandBufferResetFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlags value )
{
if ( !value ) return "{}";
@@ -6849,24 +8813,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class CommandBufferUsageFlagBits
- {
- 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
- };
-
- 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";
- }
- }
-
using CommandBufferUsageFlags = Flags<CommandBufferUsageFlagBits, VkCommandBufferUsageFlags>;
template <> struct FlagTraits<CommandBufferUsageFlagBits>
@@ -6897,16 +8843,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CommandBufferUsageFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CommandBufferUsageFlagBits bit0, CommandBufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandBufferUsageFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CommandBufferUsageFlagBits bit0, CommandBufferUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandBufferUsageFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CommandBufferUsageFlags value )
{
if ( !value ) return "{}";
@@ -6918,24 +8854,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class CommandPoolCreateFlagBits
- {
- eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT,
- eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
- eProtected = VK_COMMAND_POOL_CREATE_PROTECTED_BIT
- };
-
- 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";
- }
- }
-
using CommandPoolCreateFlags = Flags<CommandPoolCreateFlagBits, VkCommandPoolCreateFlags>;
template <> struct FlagTraits<CommandPoolCreateFlagBits>
@@ -6966,16 +8884,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CommandPoolCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandPoolCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandPoolCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CommandPoolCreateFlags value )
{
if ( !value ) return "{}";
@@ -6987,20 +8895,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class CommandPoolResetFlagBits
- {
- eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlagBits value )
- {
- switch ( value )
- {
- case CommandPoolResetFlagBits::eReleaseResources : return "ReleaseResources";
- default: return "invalid";
- }
- }
-
using CommandPoolResetFlags = Flags<CommandPoolResetFlagBits, VkCommandPoolResetFlags>;
template <> struct FlagTraits<CommandPoolResetFlagBits>
@@ -7031,16 +8925,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CommandPoolResetFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandPoolResetFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CommandPoolResetFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlags value )
{
if ( !value ) return "{}";
@@ -7067,26 +8951,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class CompositeAlphaFlagBitsKHR
- {
- 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
- };
-
- 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";
- }
- }
-
using CompositeAlphaFlagsKHR = Flags<CompositeAlphaFlagBitsKHR, VkCompositeAlphaFlagsKHR>;
template <> struct FlagTraits<CompositeAlphaFlagBitsKHR>
@@ -7117,16 +8981,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CompositeAlphaFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CompositeAlphaFlagsKHR( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CompositeAlphaFlagsKHR( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CompositeAlphaFlagsKHR value )
{
if ( !value ) return "{}";
@@ -7139,20 +8993,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ConditionalRenderingFlagBitsEXT
- {
- eInverted = VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagBitsEXT value )
- {
- switch ( value )
- {
- case ConditionalRenderingFlagBitsEXT::eInverted : return "Inverted";
- default: return "invalid";
- }
- }
-
using ConditionalRenderingFlagsEXT = Flags<ConditionalRenderingFlagBitsEXT, VkConditionalRenderingFlagsEXT>;
template <> struct FlagTraits<ConditionalRenderingFlagBitsEXT>
@@ -7183,16 +9023,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ConditionalRenderingFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ConditionalRenderingFlagBitsEXT bit0, ConditionalRenderingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ConditionalRenderingFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ConditionalRenderingFlagBitsEXT bit0, ConditionalRenderingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ConditionalRenderingFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagsEXT value )
{
if ( !value ) return "{}";
@@ -7202,26 +9032,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class CullModeFlagBits
- {
- eNone = VK_CULL_MODE_NONE,
- eFront = VK_CULL_MODE_FRONT_BIT,
- eBack = VK_CULL_MODE_BACK_BIT,
- eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK
- };
-
- 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";
- }
- }
-
using CullModeFlags = Flags<CullModeFlagBits, VkCullModeFlags>;
template <> struct FlagTraits<CullModeFlagBits>
@@ -7252,16 +9062,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( CullModeFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( CullModeFlagBits bit0, CullModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CullModeFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( CullModeFlagBits bit0, CullModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return CullModeFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( CullModeFlags value )
{
if ( !value ) return "{}";
@@ -7272,28 +9072,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class DebugReportFlagBitsEXT
- {
- 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
- };
-
- 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";
- }
- }
-
using DebugReportFlagsEXT = Flags<DebugReportFlagBitsEXT, VkDebugReportFlagsEXT>;
template <> struct FlagTraits<DebugReportFlagBitsEXT>
@@ -7324,16 +9102,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DebugReportFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugReportFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugReportFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DebugReportFlagsEXT value )
{
if ( !value ) return "{}";
@@ -7347,26 +9115,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class DebugUtilsMessageSeverityFlagBitsEXT
- {
- 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
- };
-
- 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";
- }
- }
-
using DebugUtilsMessageSeverityFlagsEXT = Flags<DebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageSeverityFlagsEXT>;
template <> struct FlagTraits<DebugUtilsMessageSeverityFlagBitsEXT>
@@ -7397,16 +9145,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DebugUtilsMessageSeverityFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DebugUtilsMessageSeverityFlagBitsEXT bit0, DebugUtilsMessageSeverityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugUtilsMessageSeverityFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DebugUtilsMessageSeverityFlagBitsEXT bit0, DebugUtilsMessageSeverityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugUtilsMessageSeverityFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageSeverityFlagsEXT value )
{
if ( !value ) return "{}";
@@ -7419,24 +9157,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class DebugUtilsMessageTypeFlagBitsEXT
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using DebugUtilsMessageTypeFlagsEXT = Flags<DebugUtilsMessageTypeFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT>;
template <> struct FlagTraits<DebugUtilsMessageTypeFlagBitsEXT>
@@ -7467,16 +9187,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DebugUtilsMessageTypeFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DebugUtilsMessageTypeFlagBitsEXT bit0, DebugUtilsMessageTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugUtilsMessageTypeFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DebugUtilsMessageTypeFlagBitsEXT bit0, DebugUtilsMessageTypeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DebugUtilsMessageTypeFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageTypeFlagsEXT value )
{
if ( !value ) return "{}";
@@ -7518,26 +9228,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class DependencyFlagBits
- {
- eByRegion = VK_DEPENDENCY_BY_REGION_BIT,
- eDeviceGroup = VK_DEPENDENCY_DEVICE_GROUP_BIT,
- eViewLocal = VK_DEPENDENCY_VIEW_LOCAL_BIT,
- eViewLocalKHR = VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR,
- eDeviceGroupKHR = VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using DependencyFlags = Flags<DependencyFlagBits, VkDependencyFlags>;
template <> struct FlagTraits<DependencyFlagBits>
@@ -7568,16 +9258,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DependencyFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DependencyFlagBits bit0, DependencyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DependencyFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DependencyFlagBits bit0, DependencyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DependencyFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DependencyFlags value )
{
if ( !value ) return "{}";
@@ -7589,101 +9269,57 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class DescriptorBindingFlagBitsEXT
- {
- eUpdateAfterBind = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT,
- eUpdateUnusedWhilePending = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT,
- ePartiallyBound = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT,
- eVariableDescriptorCount = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT
- };
+ using DescriptorBindingFlags = Flags<DescriptorBindingFlagBits, VkDescriptorBindingFlags>;
- VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlagBitsEXT value )
- {
- switch ( value )
- {
- case DescriptorBindingFlagBitsEXT::eUpdateAfterBind : return "UpdateAfterBind";
- case DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending : return "UpdateUnusedWhilePending";
- case DescriptorBindingFlagBitsEXT::ePartiallyBound : return "PartiallyBound";
- case DescriptorBindingFlagBitsEXT::eVariableDescriptorCount : return "VariableDescriptorCount";
- default: return "invalid";
- }
- }
-
- using DescriptorBindingFlagsEXT = Flags<DescriptorBindingFlagBitsEXT, VkDescriptorBindingFlagsEXT>;
-
- template <> struct FlagTraits<DescriptorBindingFlagBitsEXT>
+ template <> struct FlagTraits<DescriptorBindingFlagBits>
{
enum
{
- allFlags = VkFlags(DescriptorBindingFlagBitsEXT::eUpdateAfterBind) | VkFlags(DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending) | VkFlags(DescriptorBindingFlagBitsEXT::ePartiallyBound) | VkFlags(DescriptorBindingFlagBitsEXT::eVariableDescriptorCount)
+ allFlags = VkFlags(DescriptorBindingFlagBits::eUpdateAfterBind) | VkFlags(DescriptorBindingFlagBits::eUpdateUnusedWhilePending) | VkFlags(DescriptorBindingFlagBits::ePartiallyBound) | VkFlags(DescriptorBindingFlagBits::eVariableDescriptorCount)
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlagsEXT operator|( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator|( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return DescriptorBindingFlagsEXT( bit0 ) | bit1;
+ return DescriptorBindingFlags( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlagsEXT operator&( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator&( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return DescriptorBindingFlagsEXT( bit0 ) & bit1;
+ return DescriptorBindingFlags( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlagsEXT operator^( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator^( DescriptorBindingFlagBits bit0, DescriptorBindingFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return DescriptorBindingFlagsEXT( bit0 ) ^ bit1;
+ return DescriptorBindingFlags( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlagsEXT operator~( DescriptorBindingFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR DescriptorBindingFlags operator~( DescriptorBindingFlagBits bits ) VULKAN_HPP_NOEXCEPT
{
- return ~( DescriptorBindingFlagsEXT( bits ) );
+ return ~( DescriptorBindingFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorBindingFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorBindingFlagsEXT( bit0 ) != bit1;
- }
+ using DescriptorBindingFlagsEXT = DescriptorBindingFlags;
- VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlagsEXT value )
+ VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlags value )
{
if ( !value ) return "{}";
std::string result;
- if ( value & DescriptorBindingFlagBitsEXT::eUpdateAfterBind ) result += "UpdateAfterBind | ";
- if ( value & DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending ) result += "UpdateUnusedWhilePending | ";
- if ( value & DescriptorBindingFlagBitsEXT::ePartiallyBound ) result += "PartiallyBound | ";
- if ( value & DescriptorBindingFlagBitsEXT::eVariableDescriptorCount ) result += "VariableDescriptorCount | ";
+ 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) + " }";
}
- enum class DescriptorPoolCreateFlagBits
- {
- eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
- eUpdateAfterBindEXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlagBits value )
- {
- switch ( value )
- {
- case DescriptorPoolCreateFlagBits::eFreeDescriptorSet : return "FreeDescriptorSet";
- case DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT : return "UpdateAfterBindEXT";
- default: return "invalid";
- }
- }
-
using DescriptorPoolCreateFlags = Flags<DescriptorPoolCreateFlagBits, VkDescriptorPoolCreateFlags>;
template <> struct FlagTraits<DescriptorPoolCreateFlagBits>
{
enum
{
- allFlags = VkFlags(DescriptorPoolCreateFlagBits::eFreeDescriptorSet) | VkFlags(DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT)
+ allFlags = VkFlags(DescriptorPoolCreateFlagBits::eFreeDescriptorSet) | VkFlags(DescriptorPoolCreateFlagBits::eUpdateAfterBind)
};
};
@@ -7707,23 +9343,13 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DescriptorPoolCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DescriptorPoolCreateFlagBits bit0, DescriptorPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorPoolCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DescriptorPoolCreateFlagBits bit0, DescriptorPoolCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorPoolCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlags value )
{
if ( !value ) return "{}";
std::string result;
if ( value & DescriptorPoolCreateFlagBits::eFreeDescriptorSet ) result += "FreeDescriptorSet | ";
- if ( value & DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT ) result += "UpdateAfterBindEXT | ";
+ if ( value & DescriptorPoolCreateFlagBits::eUpdateAfterBind ) result += "UpdateAfterBind | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
@@ -7742,29 +9368,13 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class DescriptorSetLayoutCreateFlagBits
- {
- ePushDescriptorKHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
- eUpdateAfterBindPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlagBits value )
- {
- switch ( value )
- {
- case DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR : return "PushDescriptorKHR";
- case DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT : return "UpdateAfterBindPoolEXT";
- default: return "invalid";
- }
- }
-
using DescriptorSetLayoutCreateFlags = Flags<DescriptorSetLayoutCreateFlagBits, VkDescriptorSetLayoutCreateFlags>;
template <> struct FlagTraits<DescriptorSetLayoutCreateFlagBits>
{
enum
{
- allFlags = VkFlags(DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR) | VkFlags(DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT)
+ allFlags = VkFlags(DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool) | VkFlags(DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR)
};
};
@@ -7788,23 +9398,13 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DescriptorSetLayoutCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DescriptorSetLayoutCreateFlagBits bit0, DescriptorSetLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorSetLayoutCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DescriptorSetLayoutCreateFlagBits bit0, DescriptorSetLayoutCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DescriptorSetLayoutCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlags value )
{
if ( !value ) return "{}";
std::string result;
+ if ( value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool ) result += "UpdateAfterBindPool | ";
if ( value & DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR ) result += "PushDescriptorKHR | ";
- if ( value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT ) result += "UpdateAfterBindPoolEXT | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
@@ -7825,14 +9425,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class DeviceCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits )
- {
- return "(void)";
- }
-
using DeviceCreateFlags = Flags<DeviceCreateFlagBits, VkDeviceCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlags )
@@ -7840,26 +9432,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class DeviceGroupPresentModeFlagBitsKHR
- {
- 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
- };
-
- 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";
- }
- }
-
using DeviceGroupPresentModeFlagsKHR = Flags<DeviceGroupPresentModeFlagBitsKHR, VkDeviceGroupPresentModeFlagsKHR>;
template <> struct FlagTraits<DeviceGroupPresentModeFlagBitsKHR>
@@ -7890,16 +9462,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DeviceGroupPresentModeFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DeviceGroupPresentModeFlagBitsKHR bit0, DeviceGroupPresentModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DeviceGroupPresentModeFlagsKHR( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DeviceGroupPresentModeFlagBitsKHR bit0, DeviceGroupPresentModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DeviceGroupPresentModeFlagsKHR( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DeviceGroupPresentModeFlagsKHR value )
{
if ( !value ) return "{}";
@@ -7912,20 +9474,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class DeviceQueueCreateFlagBits
- {
- eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value )
- {
- switch ( value )
- {
- case DeviceQueueCreateFlagBits::eProtected : return "Protected";
- default: return "invalid";
- }
- }
-
using DeviceQueueCreateFlags = Flags<DeviceQueueCreateFlagBits, VkDeviceQueueCreateFlags>;
template <> struct FlagTraits<DeviceQueueCreateFlagBits>
@@ -7956,16 +9504,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DeviceQueueCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DeviceQueueCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DeviceQueueCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlags value )
{
if ( !value ) return "{}";
@@ -7990,26 +9528,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class DisplayPlaneAlphaFlagBitsKHR
- {
- 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
- };
-
- 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";
- }
- }
-
using DisplayPlaneAlphaFlagsKHR = Flags<DisplayPlaneAlphaFlagBitsKHR, VkDisplayPlaneAlphaFlagsKHR>;
template <> struct FlagTraits<DisplayPlaneAlphaFlagBitsKHR>
@@ -8040,16 +9558,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( DisplayPlaneAlphaFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( DisplayPlaneAlphaFlagBitsKHR bit0, DisplayPlaneAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DisplayPlaneAlphaFlagsKHR( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( DisplayPlaneAlphaFlagBitsKHR bit0, DisplayPlaneAlphaFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return DisplayPlaneAlphaFlagsKHR( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( DisplayPlaneAlphaFlagsKHR value )
{
if ( !value ) return "{}";
@@ -8092,24 +9600,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class ExternalFenceFeatureFlagBits
- {
- eExportable = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT,
- eImportable = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT,
- eExportableKHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR,
- eImportableKHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlagBits value )
- {
- switch ( value )
- {
- case ExternalFenceFeatureFlagBits::eExportable : return "Exportable";
- case ExternalFenceFeatureFlagBits::eImportable : return "Importable";
- default: return "invalid";
- }
- }
-
using ExternalFenceFeatureFlags = Flags<ExternalFenceFeatureFlagBits, VkExternalFenceFeatureFlags>;
template <> struct FlagTraits<ExternalFenceFeatureFlagBits>
@@ -8140,16 +9630,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalFenceFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalFenceFeatureFlagBits bit0, ExternalFenceFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalFenceFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalFenceFeatureFlagBits bit0, ExternalFenceFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalFenceFeatureFlags( bit0 ) != bit1;
- }
-
using ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlags value )
@@ -8162,30 +9642,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalFenceHandleTypeFlagBits
- {
- 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,
- eOpaqueFdKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR,
- eOpaqueWin32KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR,
- eOpaqueWin32KmtKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR,
- eSyncFdKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR
- };
-
- 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";
- }
- }
-
using ExternalFenceHandleTypeFlags = Flags<ExternalFenceHandleTypeFlagBits, VkExternalFenceHandleTypeFlags>;
template <> struct FlagTraits<ExternalFenceHandleTypeFlagBits>
@@ -8216,16 +9672,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalFenceHandleTypeFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalFenceHandleTypeFlagBits bit0, ExternalFenceHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalFenceHandleTypeFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalFenceHandleTypeFlagBits bit0, ExternalFenceHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalFenceHandleTypeFlags( bit0 ) != bit1;
- }
-
using ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalFenceHandleTypeFlags value )
@@ -8240,27 +9686,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalMemoryFeatureFlagBits
- {
- eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT,
- eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT,
- eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT,
- eDedicatedOnlyKHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR,
- eExportableKHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR,
- eImportableKHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR
- };
-
- 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";
- }
- }
-
using ExternalMemoryFeatureFlags = Flags<ExternalMemoryFeatureFlagBits, VkExternalMemoryFeatureFlags>;
template <> struct FlagTraits<ExternalMemoryFeatureFlagBits>
@@ -8291,16 +9716,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalMemoryFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalMemoryFeatureFlagBits bit0, ExternalMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalMemoryFeatureFlagBits bit0, ExternalMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryFeatureFlags( bit0 ) != bit1;
- }
-
using ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlags value )
@@ -8314,24 +9729,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalMemoryFeatureFlagBitsNV
- {
- 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
- };
-
- 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";
- }
- }
-
using ExternalMemoryFeatureFlagsNV = Flags<ExternalMemoryFeatureFlagBitsNV, VkExternalMemoryFeatureFlagsNV>;
template <> struct FlagTraits<ExternalMemoryFeatureFlagBitsNV>
@@ -8362,16 +9759,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalMemoryFeatureFlagsNV( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalMemoryFeatureFlagBitsNV bit0, ExternalMemoryFeatureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryFeatureFlagsNV( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalMemoryFeatureFlagBitsNV bit0, ExternalMemoryFeatureFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryFeatureFlagsNV( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagsNV value )
{
if ( !value ) return "{}";
@@ -8383,47 +9770,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalMemoryHandleTypeFlagBits
- {
- 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,
- eAndroidHardwareBufferANDROID = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
- eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT,
- eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT,
- eOpaqueFdKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR,
- eOpaqueWin32KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR,
- eOpaqueWin32KmtKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR,
- eD3D11TextureKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR,
- eD3D11TextureKmtKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR,
- eD3D12HeapKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR,
- eD3D12ResourceKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR
- };
-
- 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";
- case ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID : return "AndroidHardwareBufferANDROID";
- case ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT : return "HostAllocationEXT";
- case ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT : return "HostMappedForeignMemoryEXT";
- default: return "invalid";
- }
- }
-
using ExternalMemoryHandleTypeFlags = Flags<ExternalMemoryHandleTypeFlagBits, VkExternalMemoryHandleTypeFlags>;
template <> struct FlagTraits<ExternalMemoryHandleTypeFlagBits>
@@ -8454,16 +9800,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalMemoryHandleTypeFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalMemoryHandleTypeFlagBits bit0, ExternalMemoryHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryHandleTypeFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalMemoryHandleTypeFlagBits bit0, ExternalMemoryHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryHandleTypeFlags( bit0 ) != bit1;
- }
-
using ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlags value )
@@ -8485,26 +9821,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalMemoryHandleTypeFlagBitsNV
- {
- 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
- };
-
- 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";
- }
- }
-
using ExternalMemoryHandleTypeFlagsNV = Flags<ExternalMemoryHandleTypeFlagBitsNV, VkExternalMemoryHandleTypeFlagsNV>;
template <> struct FlagTraits<ExternalMemoryHandleTypeFlagBitsNV>
@@ -8535,16 +9851,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalMemoryHandleTypeFlagsNV( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalMemoryHandleTypeFlagBitsNV bit0, ExternalMemoryHandleTypeFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryHandleTypeFlagsNV( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalMemoryHandleTypeFlagBitsNV bit0, ExternalMemoryHandleTypeFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalMemoryHandleTypeFlagsNV( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagsNV value )
{
if ( !value ) return "{}";
@@ -8557,24 +9863,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalSemaphoreFeatureFlagBits
- {
- eExportable = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT,
- eImportable = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT,
- eExportableKHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR,
- eImportableKHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlagBits value )
- {
- switch ( value )
- {
- case ExternalSemaphoreFeatureFlagBits::eExportable : return "Exportable";
- case ExternalSemaphoreFeatureFlagBits::eImportable : return "Importable";
- default: return "invalid";
- }
- }
-
using ExternalSemaphoreFeatureFlags = Flags<ExternalSemaphoreFeatureFlagBits, VkExternalSemaphoreFeatureFlags>;
template <> struct FlagTraits<ExternalSemaphoreFeatureFlagBits>
@@ -8605,16 +9893,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalSemaphoreFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalSemaphoreFeatureFlagBits bit0, ExternalSemaphoreFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalSemaphoreFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalSemaphoreFeatureFlagBits bit0, ExternalSemaphoreFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalSemaphoreFeatureFlags( bit0 ) != bit1;
- }
-
using ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlags value )
@@ -8627,33 +9905,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ExternalSemaphoreHandleTypeFlagBits
- {
- 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,
- eSyncFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
- eOpaqueFdKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR,
- eOpaqueWin32KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR,
- eOpaqueWin32KmtKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR,
- eD3D12FenceKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR,
- eSyncFdKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using ExternalSemaphoreHandleTypeFlags = Flags<ExternalSemaphoreHandleTypeFlagBits, VkExternalSemaphoreHandleTypeFlags>;
template <> struct FlagTraits<ExternalSemaphoreHandleTypeFlagBits>
@@ -8684,16 +9935,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ExternalSemaphoreHandleTypeFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ExternalSemaphoreHandleTypeFlagBits bit0, ExternalSemaphoreHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalSemaphoreHandleTypeFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ExternalSemaphoreHandleTypeFlagBits bit0, ExternalSemaphoreHandleTypeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ExternalSemaphoreHandleTypeFlags( bit0 ) != bit1;
- }
-
using ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags;
VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreHandleTypeFlags value )
@@ -8709,20 +9950,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class FenceCreateFlagBits
- {
- eSignaled = VK_FENCE_CREATE_SIGNALED_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( FenceCreateFlagBits value )
- {
- switch ( value )
- {
- case FenceCreateFlagBits::eSignaled : return "Signaled";
- default: return "invalid";
- }
- }
-
using FenceCreateFlags = Flags<FenceCreateFlagBits, VkFenceCreateFlags>;
template <> struct FlagTraits<FenceCreateFlagBits>
@@ -8753,16 +9980,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( FenceCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FenceCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FenceCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( FenceCreateFlags value )
{
if ( !value ) return "{}";
@@ -8772,21 +9989,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class FenceImportFlagBits
- {
- eTemporary = VK_FENCE_IMPORT_TEMPORARY_BIT,
- eTemporaryKHR = VK_FENCE_IMPORT_TEMPORARY_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( FenceImportFlagBits value )
- {
- switch ( value )
- {
- case FenceImportFlagBits::eTemporary : return "Temporary";
- default: return "invalid";
- }
- }
-
using FenceImportFlags = Flags<FenceImportFlagBits, VkFenceImportFlags>;
template <> struct FlagTraits<FenceImportFlagBits>
@@ -8817,16 +10019,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( FenceImportFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( FenceImportFlagBits bit0, FenceImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FenceImportFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( FenceImportFlagBits bit0, FenceImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FenceImportFlags( bit0 ) != bit1;
- }
-
using FenceImportFlagsKHR = FenceImportFlags;
VULKAN_HPP_INLINE std::string to_string( FenceImportFlags value )
@@ -8838,85 +10030,13 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class FormatFeatureFlagBits
- {
- 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,
- eTransferDst = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
- eMidpointChromaSamples = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,
- eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,
- eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,
- eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT,
- eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,
- eDisjoint = VK_FORMAT_FEATURE_DISJOINT_BIT,
- eCositedChromaSamples = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,
- eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG,
- eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT,
- eFragmentDensityMapEXT = VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT,
- eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR,
- eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR,
- eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR,
- eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR,
- eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR,
- eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR,
- eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR,
- eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT_KHR,
- eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR,
- eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- };
-
- 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::eSampledImageFilterCubicIMG : return "SampledImageFilterCubicIMG";
- case FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT : return "SampledImageFilterMinmaxEXT";
- case FormatFeatureFlagBits::eFragmentDensityMapEXT : return "FragmentDensityMapEXT";
- default: return "invalid";
- }
- }
-
using FormatFeatureFlags = Flags<FormatFeatureFlagBits, VkFormatFeatureFlags>;
template <> struct FlagTraits<FormatFeatureFlagBits>
{
enum
{
- allFlags = VkFlags(FormatFeatureFlagBits::eSampledImage) | VkFlags(FormatFeatureFlagBits::eStorageImage) | VkFlags(FormatFeatureFlagBits::eStorageImageAtomic) | VkFlags(FormatFeatureFlagBits::eUniformTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBufferAtomic) | VkFlags(FormatFeatureFlagBits::eVertexBuffer) | VkFlags(FormatFeatureFlagBits::eColorAttachment) | VkFlags(FormatFeatureFlagBits::eColorAttachmentBlend) | VkFlags(FormatFeatureFlagBits::eDepthStencilAttachment) | VkFlags(FormatFeatureFlagBits::eBlitSrc) | VkFlags(FormatFeatureFlagBits::eBlitDst) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterLinear) | VkFlags(FormatFeatureFlagBits::eTransferSrc) | VkFlags(FormatFeatureFlagBits::eTransferDst) | VkFlags(FormatFeatureFlagBits::eMidpointChromaSamples) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable) | VkFlags(FormatFeatureFlagBits::eDisjoint) | VkFlags(FormatFeatureFlagBits::eCositedChromaSamples) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterCubicIMG) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT) | VkFlags(FormatFeatureFlagBits::eFragmentDensityMapEXT)
+ allFlags = VkFlags(FormatFeatureFlagBits::eSampledImage) | VkFlags(FormatFeatureFlagBits::eStorageImage) | VkFlags(FormatFeatureFlagBits::eStorageImageAtomic) | VkFlags(FormatFeatureFlagBits::eUniformTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBufferAtomic) | VkFlags(FormatFeatureFlagBits::eVertexBuffer) | VkFlags(FormatFeatureFlagBits::eColorAttachment) | VkFlags(FormatFeatureFlagBits::eColorAttachmentBlend) | VkFlags(FormatFeatureFlagBits::eDepthStencilAttachment) | VkFlags(FormatFeatureFlagBits::eBlitSrc) | VkFlags(FormatFeatureFlagBits::eBlitDst) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterLinear) | VkFlags(FormatFeatureFlagBits::eTransferSrc) | VkFlags(FormatFeatureFlagBits::eTransferDst) | VkFlags(FormatFeatureFlagBits::eMidpointChromaSamples) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable) | VkFlags(FormatFeatureFlagBits::eDisjoint) | VkFlags(FormatFeatureFlagBits::eCositedChromaSamples) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterMinmax) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterCubicIMG) | VkFlags(FormatFeatureFlagBits::eFragmentDensityMapEXT)
};
};
@@ -8940,16 +10060,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( FormatFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FormatFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FormatFeatureFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlags value )
{
if ( !value ) return "{}";
@@ -8977,33 +10087,19 @@ namespace VULKAN_HPP_NAMESPACE
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::eSampledImageFilterCubicIMG ) result += "SampledImageFilterCubicIMG | ";
- if ( value & FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT ) result += "SampledImageFilterMinmaxEXT | ";
if ( value & FormatFeatureFlagBits::eFragmentDensityMapEXT ) result += "FragmentDensityMapEXT | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class FramebufferCreateFlagBits
- {
- eImagelessKHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlagBits value )
- {
- switch ( value )
- {
- case FramebufferCreateFlagBits::eImagelessKHR : return "ImagelessKHR";
- default: return "invalid";
- }
- }
-
using FramebufferCreateFlags = Flags<FramebufferCreateFlagBits, VkFramebufferCreateFlags>;
template <> struct FlagTraits<FramebufferCreateFlagBits>
{
enum
{
- allFlags = VkFlags(FramebufferCreateFlagBits::eImagelessKHR)
+ allFlags = VkFlags(FramebufferCreateFlagBits::eImageless)
};
};
@@ -9027,41 +10123,15 @@ namespace VULKAN_HPP_NAMESPACE
return ~( FramebufferCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( FramebufferCreateFlagBits bit0, FramebufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FramebufferCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( FramebufferCreateFlagBits bit0, FramebufferCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return FramebufferCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlags value )
{
if ( !value ) return "{}";
std::string result;
- if ( value & FramebufferCreateFlagBits::eImagelessKHR ) result += "ImagelessKHR | ";
+ if ( value & FramebufferCreateFlagBits::eImageless ) result += "Imageless | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class GeometryFlagBitsNV
- {
- eOpaque = VK_GEOMETRY_OPAQUE_BIT_NV,
- eNoDuplicateAnyHitInvocation = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
- };
-
- VULKAN_HPP_INLINE std::string to_string( GeometryFlagBitsNV value )
- {
- switch ( value )
- {
- case GeometryFlagBitsNV::eOpaque : return "Opaque";
- case GeometryFlagBitsNV::eNoDuplicateAnyHitInvocation : return "NoDuplicateAnyHitInvocation";
- default: return "invalid";
- }
- }
-
using GeometryFlagsNV = Flags<GeometryFlagBitsNV, VkGeometryFlagsNV>;
template <> struct FlagTraits<GeometryFlagBitsNV>
@@ -9092,16 +10162,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( GeometryFlagsNV( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( GeometryFlagBitsNV bit0, GeometryFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return GeometryFlagsNV( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( GeometryFlagBitsNV bit0, GeometryFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return GeometryFlagsNV( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( GeometryFlagsNV value )
{
if ( !value ) return "{}";
@@ -9112,26 +10172,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class GeometryInstanceFlagBitsNV
- {
- eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV,
- eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV,
- eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV,
- eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
- };
-
- VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagBitsNV value )
- {
- switch ( value )
- {
- case GeometryInstanceFlagBitsNV::eTriangleCullDisable : return "TriangleCullDisable";
- case GeometryInstanceFlagBitsNV::eTriangleFrontCounterclockwise : return "TriangleFrontCounterclockwise";
- case GeometryInstanceFlagBitsNV::eForceOpaque : return "ForceOpaque";
- case GeometryInstanceFlagBitsNV::eForceNoOpaque : return "ForceNoOpaque";
- default: return "invalid";
- }
- }
-
using GeometryInstanceFlagsNV = Flags<GeometryInstanceFlagBitsNV, VkGeometryInstanceFlagsNV>;
template <> struct FlagTraits<GeometryInstanceFlagBitsNV>
@@ -9162,16 +10202,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( GeometryInstanceFlagsNV( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( GeometryInstanceFlagBitsNV bit0, GeometryInstanceFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return GeometryInstanceFlagsNV( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( GeometryInstanceFlagBitsNV bit0, GeometryInstanceFlagBitsNV bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return GeometryInstanceFlagsNV( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagsNV value )
{
if ( !value ) return "{}";
@@ -9216,43 +10246,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_IOS_MVK*/
- enum class ImageAspectFlagBits
- {
- 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,
- ePlane1 = VK_IMAGE_ASPECT_PLANE_1_BIT,
- ePlane2 = VK_IMAGE_ASPECT_PLANE_2_BIT,
- 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,
- ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR,
- ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR,
- ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR
- };
-
- 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::eMemoryPlane0EXT : return "MemoryPlane0EXT";
- case ImageAspectFlagBits::eMemoryPlane1EXT : return "MemoryPlane1EXT";
- case ImageAspectFlagBits::eMemoryPlane2EXT : return "MemoryPlane2EXT";
- case ImageAspectFlagBits::eMemoryPlane3EXT : return "MemoryPlane3EXT";
- default: return "invalid";
- }
- }
-
using ImageAspectFlags = Flags<ImageAspectFlagBits, VkImageAspectFlags>;
template <> struct FlagTraits<ImageAspectFlagBits>
@@ -9283,16 +10276,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ImageAspectFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageAspectFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageAspectFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value )
{
if ( !value ) return "{}";
@@ -9312,54 +10295,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ImageCreateFlagBits
- {
- 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,
- eSplitInstanceBindRegions = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
- e2DArrayCompatible = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
- eBlockTexelViewCompatible = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
- eExtendedUsage = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
- eProtected = VK_IMAGE_CREATE_PROTECTED_BIT,
- eDisjoint = VK_IMAGE_CREATE_DISJOINT_BIT,
- 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,
- eSplitInstanceBindRegionsKHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR,
- e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR,
- eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR,
- eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR,
- eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT_KHR,
- eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT_KHR
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using ImageCreateFlags = Flags<ImageCreateFlagBits, VkImageCreateFlags>;
template <> struct FlagTraits<ImageCreateFlagBits>
@@ -9390,16 +10325,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ImageCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ImageCreateFlags value )
{
if ( !value ) return "{}";
@@ -9440,38 +10365,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- enum class ImageUsageFlagBits
- {
- 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,
- eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,
- eFragmentDensityMapEXT = VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
- };
-
- 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::eShadingRateImageNV : return "ShadingRateImageNV";
- case ImageUsageFlagBits::eFragmentDensityMapEXT : return "FragmentDensityMapEXT";
- default: return "invalid";
- }
- }
-
using ImageUsageFlags = Flags<ImageUsageFlagBits, VkImageUsageFlags>;
template <> struct FlagTraits<ImageUsageFlagBits>
@@ -9502,16 +10395,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ImageUsageFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageUsageFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageUsageFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ImageUsageFlags value )
{
if ( !value ) return "{}";
@@ -9530,20 +10413,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ImageViewCreateFlagBits
- {
- eFragmentDensityMapDynamicEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlagBits value )
- {
- switch ( value )
- {
- case ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT : return "FragmentDensityMapDynamicEXT";
- default: return "invalid";
- }
- }
-
using ImageViewCreateFlags = Flags<ImageViewCreateFlagBits, VkImageViewCreateFlags>;
template <> struct FlagTraits<ImageViewCreateFlagBits>
@@ -9574,16 +10443,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ImageViewCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ImageViewCreateFlagBits bit0, ImageViewCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageViewCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ImageViewCreateFlagBits bit0, ImageViewCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ImageViewCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlags value )
{
if ( !value ) return "{}";
@@ -9593,26 +10452,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class IndirectCommandsLayoutUsageFlagBitsNVX
- {
- eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX,
- eSparseSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX,
- eEmptyExecutions = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX,
- eIndexedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX
- };
-
- VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagBitsNVX value )
- {
- switch ( value )
- {
- case IndirectCommandsLayoutUsageFlagBitsNVX::eUnorderedSequences : return "UnorderedSequences";
- case IndirectCommandsLayoutUsageFlagBitsNVX::eSparseSequences : return "SparseSequences";
- case IndirectCommandsLayoutUsageFlagBitsNVX::eEmptyExecutions : return "EmptyExecutions";
- case IndirectCommandsLayoutUsageFlagBitsNVX::eIndexedSequences : return "IndexedSequences";
- default: return "invalid";
- }
- }
-
using IndirectCommandsLayoutUsageFlagsNVX = Flags<IndirectCommandsLayoutUsageFlagBitsNVX, VkIndirectCommandsLayoutUsageFlagsNVX>;
template <> struct FlagTraits<IndirectCommandsLayoutUsageFlagBitsNVX>
@@ -9643,16 +10482,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( IndirectCommandsLayoutUsageFlagsNVX( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( IndirectCommandsLayoutUsageFlagBitsNVX bit0, IndirectCommandsLayoutUsageFlagBitsNVX bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return IndirectCommandsLayoutUsageFlagsNVX( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( IndirectCommandsLayoutUsageFlagBitsNVX bit0, IndirectCommandsLayoutUsageFlagBitsNVX bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return IndirectCommandsLayoutUsageFlagsNVX( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagsNVX value )
{
if ( !value ) return "{}";
@@ -9665,14 +10494,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class InstanceCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits )
- {
- return "(void)";
- }
-
using InstanceCreateFlags = Flags<InstanceCreateFlagBits, VkInstanceCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlags )
@@ -9697,28 +10518,13 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_MACOS_MVK*/
- enum class MemoryAllocateFlagBits
- {
- eDeviceMask = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
- eDeviceMaskKHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlagBits value )
- {
- switch ( value )
- {
- case MemoryAllocateFlagBits::eDeviceMask : return "DeviceMask";
- default: return "invalid";
- }
- }
-
using MemoryAllocateFlags = Flags<MemoryAllocateFlagBits, VkMemoryAllocateFlags>;
template <> struct FlagTraits<MemoryAllocateFlagBits>
{
enum
{
- allFlags = VkFlags(MemoryAllocateFlagBits::eDeviceMask)
+ allFlags = VkFlags(MemoryAllocateFlagBits::eDeviceMask) | VkFlags(MemoryAllocateFlagBits::eDeviceAddress) | VkFlags(MemoryAllocateFlagBits::eDeviceAddressCaptureReplay)
};
};
@@ -9742,16 +10548,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( MemoryAllocateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryAllocateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryAllocateFlags( bit0 ) != bit1;
- }
-
using MemoryAllocateFlagsKHR = MemoryAllocateFlags;
VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlags value )
@@ -9760,26 +10556,11 @@ namespace VULKAN_HPP_NAMESPACE
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) + " }";
}
- enum class MemoryHeapFlagBits
- {
- eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT,
- eMultiInstance = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT,
- eMultiInstanceKHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlagBits value )
- {
- switch ( value )
- {
- case MemoryHeapFlagBits::eDeviceLocal : return "DeviceLocal";
- case MemoryHeapFlagBits::eMultiInstance : return "MultiInstance";
- default: return "invalid";
- }
- }
-
using MemoryHeapFlags = Flags<MemoryHeapFlagBits, VkMemoryHeapFlags>;
template <> struct FlagTraits<MemoryHeapFlagBits>
@@ -9810,16 +10591,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( MemoryHeapFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryHeapFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryHeapFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlags value )
{
if ( !value ) return "{}";
@@ -9845,34 +10616,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class MemoryPropertyFlagBits
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using MemoryPropertyFlags = Flags<MemoryPropertyFlagBits, VkMemoryPropertyFlags>;
template <> struct FlagTraits<MemoryPropertyFlagBits>
@@ -9903,16 +10646,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( MemoryPropertyFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryPropertyFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return MemoryPropertyFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlags value )
{
if ( !value ) return "{}";
@@ -9946,22 +10679,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_METAL_EXT*/
- enum class ObjectEntryUsageFlagBitsNVX
- {
- eGraphics = VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX,
- eCompute = VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
- };
-
- VULKAN_HPP_INLINE std::string to_string( ObjectEntryUsageFlagBitsNVX value )
- {
- switch ( value )
- {
- case ObjectEntryUsageFlagBitsNVX::eGraphics : return "Graphics";
- case ObjectEntryUsageFlagBitsNVX::eCompute : return "Compute";
- default: return "invalid";
- }
- }
-
using ObjectEntryUsageFlagsNVX = Flags<ObjectEntryUsageFlagBitsNVX, VkObjectEntryUsageFlagsNVX>;
template <> struct FlagTraits<ObjectEntryUsageFlagBitsNVX>
@@ -9992,16 +10709,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ObjectEntryUsageFlagsNVX( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ObjectEntryUsageFlagBitsNVX bit0, ObjectEntryUsageFlagBitsNVX bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ObjectEntryUsageFlagsNVX( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ObjectEntryUsageFlagBitsNVX bit0, ObjectEntryUsageFlagBitsNVX bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ObjectEntryUsageFlagsNVX( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ObjectEntryUsageFlagsNVX value )
{
if ( !value ) return "{}";
@@ -10012,30 +10719,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PeerMemoryFeatureFlagBits
- {
- 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,
- eCopySrcKHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR,
- eCopyDstKHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR,
- eGenericSrcKHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR,
- eGenericDstKHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR
- };
-
- 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";
- }
- }
-
using PeerMemoryFeatureFlags = Flags<PeerMemoryFeatureFlagBits, VkPeerMemoryFeatureFlags>;
template <> struct FlagTraits<PeerMemoryFeatureFlagBits>
@@ -10066,16 +10749,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( PeerMemoryFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PeerMemoryFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PeerMemoryFeatureFlags( bit0 ) != bit1;
- }
-
using PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags;
VULKAN_HPP_INLINE std::string to_string( PeerMemoryFeatureFlags value )
@@ -10090,42 +10763,58 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PipelineCacheCreateFlagBits
- {};
+ using PerformanceCounterDescriptionFlagsKHR = Flags<PerformanceCounterDescriptionFlagBitsKHR, VkPerformanceCounterDescriptionFlagsKHR>;
- VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits )
+ template <> struct FlagTraits<PerformanceCounterDescriptionFlagBitsKHR>
{
- return "(void)";
+ enum
+ {
+ allFlags = VkFlags(PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting) | VkFlags(PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted)
+ };
+ };
+
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator|( PerformanceCounterDescriptionFlagBitsKHR bit0, PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ {
+ return PerformanceCounterDescriptionFlagsKHR( bit0 ) | bit1;
}
- using PipelineCacheCreateFlags = Flags<PipelineCacheCreateFlagBits, VkPipelineCacheCreateFlags>;
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator&( PerformanceCounterDescriptionFlagBitsKHR bit0, PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ {
+ return PerformanceCounterDescriptionFlagsKHR( bit0 ) & bit1;
+ }
- VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlags )
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator^( PerformanceCounterDescriptionFlagBitsKHR bit0, PerformanceCounterDescriptionFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
{
- return "{}";
+ return PerformanceCounterDescriptionFlagsKHR( bit0 ) ^ bit1;
}
- enum class PipelineColorBlendStateCreateFlagBits
- {};
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR PerformanceCounterDescriptionFlagsKHR operator~( PerformanceCounterDescriptionFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT
+ {
+ return ~( PerformanceCounterDescriptionFlagsKHR( bits ) );
+ }
- VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits )
+ VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagsKHR value )
{
- return "(void)";
+ 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) + " }";
}
- using PipelineColorBlendStateCreateFlags = Flags<PipelineColorBlendStateCreateFlagBits, VkPipelineColorBlendStateCreateFlags>;
+ using PipelineCacheCreateFlags = Flags<PipelineCacheCreateFlagBits, VkPipelineCacheCreateFlags>;
- VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlags )
+ VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlags )
{
return "{}";
}
- enum class PipelineCompilerControlFlagBitsAMD
- {};
+ using PipelineColorBlendStateCreateFlags = Flags<PipelineColorBlendStateCreateFlagBits, VkPipelineColorBlendStateCreateFlags>;
- VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagBitsAMD )
+ VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlags )
{
- return "(void)";
+ return "{}";
}
using PipelineCompilerControlFlagsAMD = Flags<PipelineCompilerControlFlagBitsAMD, VkPipelineCompilerControlFlagsAMD>;
@@ -10180,36 +10869,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineCreateFlagBits
- {
- 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,
- eDispatchBase = VK_PIPELINE_CREATE_DISPATCH_BASE,
- eDeferCompileNV = VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV,
- eCaptureStatisticsKHR = VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR,
- eCaptureInternalRepresentationsKHR = VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR,
- eViewIndexFromDeviceIndexKHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR,
- eDispatchBaseKHR = VK_PIPELINE_CREATE_DISPATCH_BASE_KHR
- };
-
- 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::eDeferCompileNV : return "DeferCompileNV";
- case PipelineCreateFlagBits::eCaptureStatisticsKHR : return "CaptureStatisticsKHR";
- case PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR : return "CaptureInternalRepresentationsKHR";
- default: return "invalid";
- }
- }
-
using PipelineCreateFlags = Flags<PipelineCreateFlagBits, VkPipelineCreateFlags>;
template <> struct FlagTraits<PipelineCreateFlagBits>
@@ -10240,16 +10899,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( PipelineCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlags value )
{
if ( !value ) return "{}";
@@ -10266,24 +10915,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PipelineCreationFeedbackFlagBitsEXT
- {
- eValid = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT,
- eApplicationPipelineCacheHit = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT,
- eBasePipelineAcceleration = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlagBitsEXT value )
- {
- switch ( value )
- {
- case PipelineCreationFeedbackFlagBitsEXT::eValid : return "Valid";
- case PipelineCreationFeedbackFlagBitsEXT::eApplicationPipelineCacheHit : return "ApplicationPipelineCacheHit";
- case PipelineCreationFeedbackFlagBitsEXT::eBasePipelineAcceleration : return "BasePipelineAcceleration";
- default: return "invalid";
- }
- }
-
using PipelineCreationFeedbackFlagsEXT = Flags<PipelineCreationFeedbackFlagBitsEXT, VkPipelineCreationFeedbackFlagsEXT>;
template <> struct FlagTraits<PipelineCreationFeedbackFlagBitsEXT>
@@ -10314,16 +10945,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( PipelineCreationFeedbackFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( PipelineCreationFeedbackFlagBitsEXT bit0, PipelineCreationFeedbackFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineCreationFeedbackFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( PipelineCreationFeedbackFlagBitsEXT bit0, PipelineCreationFeedbackFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineCreationFeedbackFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlagsEXT value )
{
if ( !value ) return "{}";
@@ -10335,14 +10956,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PipelineDepthStencilStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineDepthStencilStateCreateFlags = Flags<PipelineDepthStencilStateCreateFlagBits, VkPipelineDepthStencilStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlags )
@@ -10365,14 +10978,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineDynamicStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineDynamicStateCreateFlags = Flags<PipelineDynamicStateCreateFlagBits, VkPipelineDynamicStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlags )
@@ -10380,14 +10985,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineInputAssemblyStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineInputAssemblyStateCreateFlags = Flags<PipelineInputAssemblyStateCreateFlagBits, VkPipelineInputAssemblyStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlags )
@@ -10395,14 +10992,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineLayoutCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineLayoutCreateFlags = Flags<PipelineLayoutCreateFlagBits, VkPipelineLayoutCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlags )
@@ -10410,14 +10999,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineMultisampleStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineMultisampleStateCreateFlags = Flags<PipelineMultisampleStateCreateFlagBits, VkPipelineMultisampleStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlags )
@@ -10455,14 +11036,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineRasterizationStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineRasterizationStateCreateFlags = Flags<PipelineRasterizationStateCreateFlagBits, VkPipelineRasterizationStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlags )
@@ -10485,22 +11058,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineShaderStageCreateFlagBits
- {
- eAllowVaryingSubgroupSizeEXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT,
- eRequireFullSubgroupsEXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlagBits value )
- {
- switch ( value )
- {
- case PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSizeEXT : return "AllowVaryingSubgroupSizeEXT";
- case PipelineShaderStageCreateFlagBits::eRequireFullSubgroupsEXT : return "RequireFullSubgroupsEXT";
- default: return "invalid";
- }
- }
-
using PipelineShaderStageCreateFlags = Flags<PipelineShaderStageCreateFlagBits, VkPipelineShaderStageCreateFlags>;
template <> struct FlagTraits<PipelineShaderStageCreateFlagBits>
@@ -10531,16 +11088,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( PipelineShaderStageCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( PipelineShaderStageCreateFlagBits bit0, PipelineShaderStageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineShaderStageCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( PipelineShaderStageCreateFlagBits bit0, PipelineShaderStageCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineShaderStageCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlags value )
{
if ( !value ) return "{}";
@@ -10551,70 +11098,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PipelineStageFlagBits
- {
- 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,
- eTransformFeedbackEXT = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT,
- eConditionalRenderingEXT = VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT,
- eCommandProcessNVX = VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX,
- eShadingRateImageNV = VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV,
- eRayTracingShaderNV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV,
- eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV,
- eTaskShaderNV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV,
- eMeshShaderNV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV,
- eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
- };
-
- 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::eTransformFeedbackEXT : return "TransformFeedbackEXT";
- case PipelineStageFlagBits::eConditionalRenderingEXT : return "ConditionalRenderingEXT";
- case PipelineStageFlagBits::eCommandProcessNVX : return "CommandProcessNVX";
- case PipelineStageFlagBits::eShadingRateImageNV : return "ShadingRateImageNV";
- case PipelineStageFlagBits::eRayTracingShaderNV : return "RayTracingShaderNV";
- case PipelineStageFlagBits::eAccelerationStructureBuildNV : return "AccelerationStructureBuildNV";
- case PipelineStageFlagBits::eTaskShaderNV : return "TaskShaderNV";
- case PipelineStageFlagBits::eMeshShaderNV : return "MeshShaderNV";
- case PipelineStageFlagBits::eFragmentDensityProcessEXT : return "FragmentDensityProcessEXT";
- default: return "invalid";
- }
- }
-
using PipelineStageFlags = Flags<PipelineStageFlagBits, VkPipelineStageFlags>;
template <> struct FlagTraits<PipelineStageFlagBits>
@@ -10645,16 +11128,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( PipelineStageFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineStageFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return PipelineStageFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value )
{
if ( !value ) return "{}";
@@ -10689,14 +11162,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class PipelineTessellationStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineTessellationStateCreateFlags = Flags<PipelineTessellationStateCreateFlagBits, VkPipelineTessellationStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlags )
@@ -10704,14 +11169,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineVertexInputStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineVertexInputStateCreateFlags = Flags<PipelineVertexInputStateCreateFlagBits, VkPipelineVertexInputStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlags )
@@ -10719,14 +11176,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class PipelineViewportStateCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits )
- {
- return "(void)";
- }
-
using PipelineViewportStateCreateFlags = Flags<PipelineViewportStateCreateFlagBits, VkPipelineViewportStateCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlags )
@@ -10749,20 +11198,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class QueryControlFlagBits
- {
- ePrecise = VK_QUERY_CONTROL_PRECISE_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( QueryControlFlagBits value )
- {
- switch ( value )
- {
- case QueryControlFlagBits::ePrecise : return "Precise";
- default: return "invalid";
- }
- }
-
using QueryControlFlags = Flags<QueryControlFlagBits, VkQueryControlFlags>;
template <> struct FlagTraits<QueryControlFlagBits>
@@ -10793,16 +11228,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( QueryControlFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryControlFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryControlFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( QueryControlFlags value )
{
if ( !value ) return "{}";
@@ -10812,40 +11237,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class QueryPipelineStatisticFlagBits
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using QueryPipelineStatisticFlags = Flags<QueryPipelineStatisticFlagBits, VkQueryPipelineStatisticFlags>;
template <> struct FlagTraits<QueryPipelineStatisticFlagBits>
@@ -10876,16 +11267,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( QueryPipelineStatisticFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( QueryPipelineStatisticFlagBits bit0, QueryPipelineStatisticFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryPipelineStatisticFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( QueryPipelineStatisticFlagBits bit0, QueryPipelineStatisticFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryPipelineStatisticFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( QueryPipelineStatisticFlags value )
{
if ( !value ) return "{}";
@@ -10905,14 +11286,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class QueryPoolCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits )
- {
- return "(void)";
- }
-
using QueryPoolCreateFlags = Flags<QueryPoolCreateFlagBits, VkQueryPoolCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlags )
@@ -10920,26 +11293,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class QueryResultFlagBits
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using QueryResultFlags = Flags<QueryResultFlagBits, VkQueryResultFlags>;
template <> struct FlagTraits<QueryResultFlagBits>
@@ -10970,16 +11323,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( QueryResultFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryResultFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueryResultFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( QueryResultFlags value )
{
if ( !value ) return "{}";
@@ -10992,28 +11335,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class QueueFlagBits
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using QueueFlags = Flags<QueueFlagBits, VkQueueFlags>;
template <> struct FlagTraits<QueueFlagBits>
@@ -11044,16 +11365,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( QueueFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( QueueFlagBits bit0, QueueFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueueFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( QueueFlagBits bit0, QueueFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return QueueFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( QueueFlags value )
{
if ( !value ) return "{}";
@@ -11067,14 +11378,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class RenderPassCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlagBits )
- {
- return "(void)";
- }
-
using RenderPassCreateFlags = Flags<RenderPassCreateFlagBits, VkRenderPassCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlags )
@@ -11082,106 +11385,50 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class ResolveModeFlagBitsKHR
- {
- eNone = VK_RESOLVE_MODE_NONE_KHR,
- eSampleZero = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR,
- eAverage = VK_RESOLVE_MODE_AVERAGE_BIT_KHR,
- eMin = VK_RESOLVE_MODE_MIN_BIT_KHR,
- eMax = VK_RESOLVE_MODE_MAX_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( ResolveModeFlagBitsKHR value )
- {
- switch ( value )
- {
- case ResolveModeFlagBitsKHR::eNone : return "None";
- case ResolveModeFlagBitsKHR::eSampleZero : return "SampleZero";
- case ResolveModeFlagBitsKHR::eAverage : return "Average";
- case ResolveModeFlagBitsKHR::eMin : return "Min";
- case ResolveModeFlagBitsKHR::eMax : return "Max";
- default: return "invalid";
- }
- }
-
- using ResolveModeFlagsKHR = Flags<ResolveModeFlagBitsKHR, VkResolveModeFlagsKHR>;
+ using ResolveModeFlags = Flags<ResolveModeFlagBits, VkResolveModeFlags>;
- template <> struct FlagTraits<ResolveModeFlagBitsKHR>
+ template <> struct FlagTraits<ResolveModeFlagBits>
{
enum
{
- allFlags = VkFlags(ResolveModeFlagBitsKHR::eNone) | VkFlags(ResolveModeFlagBitsKHR::eSampleZero) | VkFlags(ResolveModeFlagBitsKHR::eAverage) | VkFlags(ResolveModeFlagBitsKHR::eMin) | VkFlags(ResolveModeFlagBitsKHR::eMax)
+ allFlags = VkFlags(ResolveModeFlagBits::eNone) | VkFlags(ResolveModeFlagBits::eSampleZero) | VkFlags(ResolveModeFlagBits::eAverage) | VkFlags(ResolveModeFlagBits::eMin) | VkFlags(ResolveModeFlagBits::eMax)
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlagsKHR operator|( ResolveModeFlagBitsKHR bit0, ResolveModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator|( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return ResolveModeFlagsKHR( bit0 ) | bit1;
+ return ResolveModeFlags( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlagsKHR operator&( ResolveModeFlagBitsKHR bit0, ResolveModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator&( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return ResolveModeFlagsKHR( bit0 ) & bit1;
+ return ResolveModeFlags( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlagsKHR operator^( ResolveModeFlagBitsKHR bit0, ResolveModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator^( ResolveModeFlagBits bit0, ResolveModeFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return ResolveModeFlagsKHR( bit0 ) ^ bit1;
+ return ResolveModeFlags( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlagsKHR operator~( ResolveModeFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ResolveModeFlags operator~( ResolveModeFlagBits bits ) VULKAN_HPP_NOEXCEPT
{
- return ~( ResolveModeFlagsKHR( bits ) );
+ return ~( ResolveModeFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ResolveModeFlagBitsKHR bit0, ResolveModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ResolveModeFlagsKHR( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ResolveModeFlagBitsKHR bit0, ResolveModeFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ResolveModeFlagsKHR( bit0 ) != bit1;
- }
+ using ResolveModeFlagsKHR = ResolveModeFlags;
- VULKAN_HPP_INLINE std::string to_string( ResolveModeFlagsKHR value )
+ VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value )
{
if ( !value ) return "{}";
std::string result;
- if ( value & ResolveModeFlagBitsKHR::eSampleZero ) result += "SampleZero | ";
- if ( value & ResolveModeFlagBitsKHR::eAverage ) result += "Average | ";
- if ( value & ResolveModeFlagBitsKHR::eMin ) result += "Min | ";
- if ( value & ResolveModeFlagBitsKHR::eMax ) result += "Max | ";
+ if ( value & ResolveModeFlagBits::eSampleZero ) result += "SampleZero | ";
+ if ( value & ResolveModeFlagBits::eAverage ) result += "Average | ";
+ if ( value & ResolveModeFlagBits::eMin ) result += "Min | ";
+ if ( value & ResolveModeFlagBits::eMax ) result += "Max | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SampleCountFlagBits
- {
- 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
- };
-
- 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";
- }
- }
-
using SampleCountFlags = Flags<SampleCountFlagBits, VkSampleCountFlags>;
template <> struct FlagTraits<SampleCountFlagBits>
@@ -11212,16 +11459,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SampleCountFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SampleCountFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SampleCountFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SampleCountFlags value )
{
if ( !value ) return "{}";
@@ -11237,22 +11474,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SamplerCreateFlagBits
- {
- eSubsampledEXT = VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT,
- eSubsampledCoarseReconstructionEXT = VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlagBits value )
- {
- switch ( value )
- {
- case SamplerCreateFlagBits::eSubsampledEXT : return "SubsampledEXT";
- case SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT : return "SubsampledCoarseReconstructionEXT";
- default: return "invalid";
- }
- }
-
using SamplerCreateFlags = Flags<SamplerCreateFlagBits, VkSamplerCreateFlags>;
template <> struct FlagTraits<SamplerCreateFlagBits>
@@ -11283,16 +11504,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SamplerCreateFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SamplerCreateFlagBits bit0, SamplerCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SamplerCreateFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SamplerCreateFlagBits bit0, SamplerCreateFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SamplerCreateFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlags value )
{
if ( !value ) return "{}";
@@ -11303,14 +11514,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SemaphoreCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits )
- {
- return "(void)";
- }
-
using SemaphoreCreateFlags = Flags<SemaphoreCreateFlagBits, VkSemaphoreCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlags )
@@ -11318,21 +11521,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class SemaphoreImportFlagBits
- {
- eTemporary = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
- eTemporaryKHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlagBits value )
- {
- switch ( value )
- {
- case SemaphoreImportFlagBits::eTemporary : return "Temporary";
- default: return "invalid";
- }
- }
-
using SemaphoreImportFlags = Flags<SemaphoreImportFlagBits, VkSemaphoreImportFlags>;
template <> struct FlagTraits<SemaphoreImportFlagBits>
@@ -11363,16 +11551,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SemaphoreImportFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SemaphoreImportFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SemaphoreImportFlags( bit0 ) != bit1;
- }
-
using SemaphoreImportFlagsKHR = SemaphoreImportFlags;
VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlags value )
@@ -11384,77 +11562,47 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SemaphoreWaitFlagBitsKHR
- {
- eAny = VK_SEMAPHORE_WAIT_ANY_BIT_KHR
- };
-
- VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlagBitsKHR value )
- {
- switch ( value )
- {
- case SemaphoreWaitFlagBitsKHR::eAny : return "Any";
- default: return "invalid";
- }
- }
-
- using SemaphoreWaitFlagsKHR = Flags<SemaphoreWaitFlagBitsKHR, VkSemaphoreWaitFlagsKHR>;
+ using SemaphoreWaitFlags = Flags<SemaphoreWaitFlagBits, VkSemaphoreWaitFlags>;
- template <> struct FlagTraits<SemaphoreWaitFlagBitsKHR>
+ template <> struct FlagTraits<SemaphoreWaitFlagBits>
{
enum
{
- allFlags = VkFlags(SemaphoreWaitFlagBitsKHR::eAny)
+ allFlags = VkFlags(SemaphoreWaitFlagBits::eAny)
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlagsKHR operator|( SemaphoreWaitFlagBitsKHR bit0, SemaphoreWaitFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SemaphoreWaitFlagsKHR( bit0 ) | bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlagsKHR operator&( SemaphoreWaitFlagBitsKHR bit0, SemaphoreWaitFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator|( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return SemaphoreWaitFlagsKHR( bit0 ) & bit1;
+ return SemaphoreWaitFlags( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlagsKHR operator^( SemaphoreWaitFlagBitsKHR bit0, SemaphoreWaitFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator&( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return SemaphoreWaitFlagsKHR( bit0 ) ^ bit1;
+ return SemaphoreWaitFlags( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlagsKHR operator~( SemaphoreWaitFlagBitsKHR bits ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator^( SemaphoreWaitFlagBits bit0, SemaphoreWaitFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
{
- return ~( SemaphoreWaitFlagsKHR( bits ) );
+ return SemaphoreWaitFlags( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SemaphoreWaitFlagBitsKHR bit0, SemaphoreWaitFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR SemaphoreWaitFlags operator~( SemaphoreWaitFlagBits bits ) VULKAN_HPP_NOEXCEPT
{
- return SemaphoreWaitFlagsKHR( bit0 ) == bit1;
+ return ~( SemaphoreWaitFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SemaphoreWaitFlagBitsKHR bit0, SemaphoreWaitFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SemaphoreWaitFlagsKHR( bit0 ) != bit1;
- }
+ using SemaphoreWaitFlagsKHR = SemaphoreWaitFlags;
- VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlagsKHR value )
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlags value )
{
if ( !value ) return "{}";
std::string result;
- if ( value & SemaphoreWaitFlagBitsKHR::eAny ) result += "Any | ";
+ if ( value & SemaphoreWaitFlagBits::eAny ) result += "Any | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class ShaderCorePropertiesFlagBitsAMD
- {};
-
- VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagBitsAMD )
- {
- return "(void)";
- }
-
using ShaderCorePropertiesFlagsAMD = Flags<ShaderCorePropertiesFlagBitsAMD, VkShaderCorePropertiesFlagsAMD>;
VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagsAMD )
@@ -11462,14 +11610,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class ShaderModuleCreateFlagBits
- {};
-
- VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlagBits )
- {
- return "(void)";
- }
-
using ShaderModuleCreateFlags = Flags<ShaderModuleCreateFlagBits, VkShaderModuleCreateFlags>;
VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlags )
@@ -11477,50 +11617,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
}
- enum class ShaderStageFlagBits
- {
- 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,
- eRaygenNV = VK_SHADER_STAGE_RAYGEN_BIT_NV,
- eAnyHitNV = VK_SHADER_STAGE_ANY_HIT_BIT_NV,
- eClosestHitNV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV,
- eMissNV = VK_SHADER_STAGE_MISS_BIT_NV,
- eIntersectionNV = VK_SHADER_STAGE_INTERSECTION_BIT_NV,
- eCallableNV = VK_SHADER_STAGE_CALLABLE_BIT_NV,
- eTaskNV = VK_SHADER_STAGE_TASK_BIT_NV,
- eMeshNV = VK_SHADER_STAGE_MESH_BIT_NV
- };
-
- 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::eRaygenNV : return "RaygenNV";
- case ShaderStageFlagBits::eAnyHitNV : return "AnyHitNV";
- case ShaderStageFlagBits::eClosestHitNV : return "ClosestHitNV";
- case ShaderStageFlagBits::eMissNV : return "MissNV";
- case ShaderStageFlagBits::eIntersectionNV : return "IntersectionNV";
- case ShaderStageFlagBits::eCallableNV : return "CallableNV";
- case ShaderStageFlagBits::eTaskNV : return "TaskNV";
- case ShaderStageFlagBits::eMeshNV : return "MeshNV";
- default: return "invalid";
- }
- }
-
using ShaderStageFlags = Flags<ShaderStageFlagBits, VkShaderStageFlags>;
template <> struct FlagTraits<ShaderStageFlagBits>
@@ -11551,16 +11647,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( ShaderStageFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ShaderStageFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return ShaderStageFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( ShaderStageFlags value )
{
if ( !value ) return "{}";
@@ -11583,24 +11669,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SparseImageFormatFlagBits
- {
- 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
- };
-
- 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";
- }
- }
-
using SparseImageFormatFlags = Flags<SparseImageFormatFlagBits, VkSparseImageFormatFlags>;
template <> struct FlagTraits<SparseImageFormatFlagBits>
@@ -11631,16 +11699,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SparseImageFormatFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SparseImageFormatFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SparseImageFormatFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SparseImageFormatFlags value )
{
if ( !value ) return "{}";
@@ -11652,20 +11710,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SparseMemoryBindFlagBits
- {
- eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT
- };
-
- VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlagBits value )
- {
- switch ( value )
- {
- case SparseMemoryBindFlagBits::eMetadata : return "Metadata";
- default: return "invalid";
- }
- }
-
using SparseMemoryBindFlags = Flags<SparseMemoryBindFlagBits, VkSparseMemoryBindFlags>;
template <> struct FlagTraits<SparseMemoryBindFlagBits>
@@ -11696,16 +11740,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SparseMemoryBindFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SparseMemoryBindFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SparseMemoryBindFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlags value )
{
if ( !value ) return "{}";
@@ -11715,25 +11749,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class StencilFaceFlagBits
- {
- 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
- };
-
- 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";
- }
- }
-
using StencilFaceFlags = Flags<StencilFaceFlagBits, VkStencilFaceFlags>;
template <> struct FlagTraits<StencilFaceFlagBits>
@@ -11764,16 +11779,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( StencilFaceFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return StencilFaceFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return StencilFaceFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( StencilFaceFlags value )
{
if ( !value ) return "{}";
@@ -11801,36 +11806,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VK_USE_PLATFORM_GGP*/
- enum class SubgroupFeatureFlagBits
- {
- 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,
- ePartitionedNV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV
- };
-
- 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::ePartitionedNV : return "PartitionedNV";
- default: return "invalid";
- }
- }
-
using SubgroupFeatureFlags = Flags<SubgroupFeatureFlagBits, VkSubgroupFeatureFlags>;
template <> struct FlagTraits<SubgroupFeatureFlagBits>
@@ -11861,16 +11836,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SubgroupFeatureFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SubgroupFeatureFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SubgroupFeatureFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SubgroupFeatureFlags value )
{
if ( !value ) return "{}";
@@ -11888,22 +11853,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SubpassDescriptionFlagBits
- {
- ePerViewAttributesNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX,
- ePerViewPositionXOnlyNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
- };
-
- VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlagBits value )
- {
- switch ( value )
- {
- case SubpassDescriptionFlagBits::ePerViewAttributesNVX : return "PerViewAttributesNVX";
- case SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX : return "PerViewPositionXOnlyNVX";
- default: return "invalid";
- }
- }
-
using SubpassDescriptionFlags = Flags<SubpassDescriptionFlagBits, VkSubpassDescriptionFlags>;
template <> struct FlagTraits<SubpassDescriptionFlagBits>
@@ -11934,16 +11883,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SubpassDescriptionFlags( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SubpassDescriptionFlagBits bit0, SubpassDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SubpassDescriptionFlags( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SubpassDescriptionFlagBits bit0, SubpassDescriptionFlagBits bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SubpassDescriptionFlags( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlags value )
{
if ( !value ) return "{}";
@@ -11954,20 +11893,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SurfaceCounterFlagBitsEXT
- {
- eVblank = VK_SURFACE_COUNTER_VBLANK_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagBitsEXT value )
- {
- switch ( value )
- {
- case SurfaceCounterFlagBitsEXT::eVblank : return "Vblank";
- default: return "invalid";
- }
- }
-
using SurfaceCounterFlagsEXT = Flags<SurfaceCounterFlagBitsEXT, VkSurfaceCounterFlagsEXT>;
template <> struct FlagTraits<SurfaceCounterFlagBitsEXT>
@@ -11998,16 +11923,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SurfaceCounterFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SurfaceCounterFlagsEXT( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SurfaceCounterFlagsEXT( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagsEXT value )
{
if ( !value ) return "{}";
@@ -12017,36 +11932,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SurfaceTransformFlagBitsKHR
- {
- 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
- };
-
- 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";
- }
- }
-
using SurfaceTransformFlagsKHR = Flags<SurfaceTransformFlagBitsKHR, VkSurfaceTransformFlagsKHR>;
template <> struct FlagTraits<SurfaceTransformFlagBitsKHR>
@@ -12077,16 +11962,6 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SurfaceTransformFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SurfaceTransformFlagBitsKHR bit0, SurfaceTransformFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SurfaceTransformFlagsKHR( bit0 ) == bit1;
- }
-
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SurfaceTransformFlagBitsKHR bit0, SurfaceTransformFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
- {
- return SurfaceTransformFlagsKHR( bit0 ) != bit1;
- }
-
VULKAN_HPP_INLINE std::string to_string( SurfaceTransformFlagsKHR value )
{
if ( !value ) return "{}";
@@ -12104,24 +11979,6 @@ namespace VULKAN_HPP_NAMESPACE
return "{ " + result.substr(0, result.size() - 3) + " }";
}
- enum class SwapchainCreateFlagBitsKHR
- {
- 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
- };
-
- 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";
- default: return "invalid";
- }
- }
-
using SwapchainCreateFlagsKHR = Flags<SwapchainCreateFlagBitsKHR, VkSwapchainCreateFlagsKHR>;
template <> struct FlagTraits<SwapchainCreateFlagBitsKHR>
@@ -12152,24 +12009,59 @@ namespace VULKAN_HPP_NAMESPACE
return ~( SwapchainCreateFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( SwapchainCreateFlagBitsKHR bit0, SwapchainCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ 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 | ";
+ return "{ " + result.substr(0, result.size() - 3) + " }";
+ }
+
+ using ToolPurposeFlagsEXT = Flags<ToolPurposeFlagBitsEXT, VkToolPurposeFlagsEXT>;
+
+ template <> struct FlagTraits<ToolPurposeFlagBitsEXT>
{
- return SwapchainCreateFlagsKHR( bit0 ) == bit1;
+ enum
+ {
+ allFlags = VkFlags(ToolPurposeFlagBitsEXT::eValidation) | VkFlags(ToolPurposeFlagBitsEXT::eProfiling) | VkFlags(ToolPurposeFlagBitsEXT::eTracing) | VkFlags(ToolPurposeFlagBitsEXT::eAdditionalFeatures) | VkFlags(ToolPurposeFlagBitsEXT::eModifyingFeatures) | VkFlags(ToolPurposeFlagBitsEXT::eDebugReporting) | VkFlags(ToolPurposeFlagBitsEXT::eDebugMarkers)
+ };
+ };
+
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlagsEXT operator|( ToolPurposeFlagBitsEXT bit0, ToolPurposeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ {
+ return ToolPurposeFlagsEXT( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( SwapchainCreateFlagBitsKHR bit0, SwapchainCreateFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlagsEXT operator&( ToolPurposeFlagBitsEXT bit0, ToolPurposeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
{
- return SwapchainCreateFlagsKHR( bit0 ) != bit1;
+ return ToolPurposeFlagsEXT( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE std::string to_string( SwapchainCreateFlagsKHR value )
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlagsEXT operator^( ToolPurposeFlagBitsEXT bit0, ToolPurposeFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ {
+ return ToolPurposeFlagsEXT( bit0 ) ^ bit1;
+ }
+
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR ToolPurposeFlagsEXT operator~( ToolPurposeFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
+ {
+ return ~( ToolPurposeFlagsEXT( bits ) );
+ }
+
+ VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlagsEXT 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 & ToolPurposeFlagBitsEXT::eValidation ) result += "Validation | ";
+ if ( value & ToolPurposeFlagBitsEXT::eProfiling ) result += "Profiling | ";
+ if ( value & ToolPurposeFlagBitsEXT::eTracing ) result += "Tracing | ";
+ if ( value & ToolPurposeFlagBitsEXT::eAdditionalFeatures ) result += "AdditionalFeatures | ";
+ if ( value & ToolPurposeFlagBitsEXT::eModifyingFeatures ) result += "ModifyingFeatures | ";
+ if ( value & ToolPurposeFlagBitsEXT::eDebugReporting ) result += "DebugReporting | ";
+ if ( value & ToolPurposeFlagBitsEXT::eDebugMarkers ) result += "DebugMarkers | ";
return "{ " + result.substr(0, result.size() - 3) + " }";
}
@@ -12274,12 +12166,14 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_XLIB_KHR*/
} // namespace VULKAN_HPP_NAMESPACE
+#ifndef VULKAN_HPP_NO_EXCEPTIONS
namespace std
{
template <>
struct is_error_code_enum<VULKAN_HPP_NAMESPACE::Result> : public true_type
{};
}
+#endif
namespace VULKAN_HPP_NAMESPACE
{
@@ -12455,6 +12349,15 @@ namespace VULKAN_HPP_NAMESPACE
: 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:
@@ -12473,6 +12376,24 @@ namespace VULKAN_HPP_NAMESPACE
: 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 SurfaceLostKHRError : public SystemError
{
public:
@@ -12536,15 +12457,6 @@ namespace VULKAN_HPP_NAMESPACE
: SystemError( make_error_code( Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT ), message ) {}
};
- class FragmentationEXTError : public SystemError
- {
- public:
- FragmentationEXTError( std::string const& message )
- : SystemError( make_error_code( Result::eErrorFragmentationEXT ), message ) {}
- FragmentationEXTError( char const * message )
- : SystemError( make_error_code( Result::eErrorFragmentationEXT ), message ) {}
- };
-
class NotPermittedEXTError : public SystemError
{
public:
@@ -12554,15 +12466,6 @@ namespace VULKAN_HPP_NAMESPACE
: SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {}
};
- class InvalidDeviceAddressEXTError : public SystemError
- {
- public:
- InvalidDeviceAddressEXTError( std::string const& message )
- : SystemError( make_error_code( Result::eErrorInvalidDeviceAddressEXT ), message ) {}
- InvalidDeviceAddressEXTError( char const * message )
- : SystemError( make_error_code( Result::eErrorInvalidDeviceAddressEXT ), message ) {}
- };
-
class FullScreenExclusiveModeLostEXTError : public SystemError
{
public:
@@ -12572,7 +12475,7 @@ namespace VULKAN_HPP_NAMESPACE
: SystemError( make_error_code( Result::eErrorFullScreenExclusiveModeLostEXT ), message ) {}
};
- VULKAN_HPP_INLINE void throwResultException( Result result, char const * message )
+ [[noreturn]] static void throwResultException( Result result, char const * message )
{
switch ( result )
{
@@ -12588,8 +12491,11 @@ namespace VULKAN_HPP_NAMESPACE
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::eErrorSurfaceLostKHR: throw SurfaceLostKHRError( message );
case Result::eErrorNativeWindowInUseKHR: throw NativeWindowInUseKHRError( message );
case Result::eErrorOutOfDateKHR: throw OutOfDateKHRError( message );
@@ -12597,9 +12503,7 @@ namespace VULKAN_HPP_NAMESPACE
case Result::eErrorValidationFailedEXT: throw ValidationFailedEXTError( message );
case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError( message );
case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: throw InvalidDrmFormatModifierPlaneLayoutEXTError( message );
- case Result::eErrorFragmentationEXT: throw FragmentationEXTError( message );
case Result::eErrorNotPermittedEXT: throw NotPermittedEXTError( message );
- case Result::eErrorInvalidDeviceAddressEXT: throw InvalidDeviceAddressEXTError( message );
case Result::eErrorFullScreenExclusiveModeLostEXT: throw FullScreenExclusiveModeLostEXTError( message );
default: throw SystemError( make_error_code( result ) );
}
@@ -12736,6 +12640,7 @@ namespace VULKAN_HPP_NAMESPACE
struct AccelerationStructureInfoNV;
struct AccelerationStructureMemoryRequirementsInfoNV;
struct AcquireNextImageInfoKHR;
+ struct AcquireProfilingLockInfoKHR;
struct AllocationCallbacks;
#ifdef VK_USE_PLATFORM_ANDROID_KHR
struct AndroidHardwareBufferFormatPropertiesANDROID;
@@ -12751,11 +12656,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
struct ApplicationInfo;
struct AttachmentDescription;
- struct AttachmentDescription2KHR;
- struct AttachmentDescriptionStencilLayoutKHR;
+ struct AttachmentDescription2;
+ using AttachmentDescription2KHR = AttachmentDescription2;
+ struct AttachmentDescriptionStencilLayout;
+ using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout;
struct AttachmentReference;
- struct AttachmentReference2KHR;
- struct AttachmentReferenceStencilLayoutKHR;
+ struct AttachmentReference2;
+ using AttachmentReference2KHR = AttachmentReference2;
+ struct AttachmentReferenceStencilLayout;
+ using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout;
struct AttachmentSampleLocationsEXT;
struct BaseInStructure;
struct BaseOutStructure;
@@ -12775,11 +12684,15 @@ namespace VULKAN_HPP_NAMESPACE
struct BufferCopy;
struct BufferCreateInfo;
struct BufferDeviceAddressCreateInfoEXT;
- struct BufferDeviceAddressInfoEXT;
+ struct BufferDeviceAddressInfo;
+ using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo;
+ using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo;
struct BufferImageCopy;
struct BufferMemoryBarrier;
struct BufferMemoryRequirementsInfo2;
using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2;
+ struct BufferOpaqueCaptureAddressCreateInfo;
+ using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo;
struct BufferViewCreateInfo;
struct CalibratedTimestampInfoEXT;
struct CheckpointDataNV;
@@ -12800,7 +12713,8 @@ namespace VULKAN_HPP_NAMESPACE
struct ComponentMapping;
struct ComputePipelineCreateInfo;
struct ConditionalRenderingBeginInfoEXT;
- struct ConformanceVersionKHR;
+ struct ConformanceVersion;
+ using ConformanceVersionKHR = ConformanceVersion;
struct CooperativeMatrixPropertiesNV;
struct CopyDescriptorSet;
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -12825,12 +12739,15 @@ namespace VULKAN_HPP_NAMESPACE
struct DescriptorPoolSize;
struct DescriptorSetAllocateInfo;
struct DescriptorSetLayoutBinding;
- struct DescriptorSetLayoutBindingFlagsCreateInfoEXT;
+ struct DescriptorSetLayoutBindingFlagsCreateInfo;
+ using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo;
struct DescriptorSetLayoutCreateInfo;
struct DescriptorSetLayoutSupport;
using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport;
- struct DescriptorSetVariableDescriptorCountAllocateInfoEXT;
- struct DescriptorSetVariableDescriptorCountLayoutSupportEXT;
+ struct DescriptorSetVariableDescriptorCountAllocateInfo;
+ using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo;
+ struct DescriptorSetVariableDescriptorCountLayoutSupport;
+ using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport;
struct DescriptorUpdateTemplateCreateInfo;
using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo;
struct DescriptorUpdateTemplateEntry;
@@ -12852,6 +12769,8 @@ namespace VULKAN_HPP_NAMESPACE
struct DeviceGroupSubmitInfo;
using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo;
struct DeviceGroupSwapchainCreateInfoKHR;
+ struct DeviceMemoryOpaqueCaptureAddressInfo;
+ using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo;
struct DeviceMemoryOverallocationCreateInfoAMD;
struct DeviceQueueCreateInfo;
struct DeviceQueueGlobalPriorityCreateInfoEXT;
@@ -12929,8 +12848,10 @@ namespace VULKAN_HPP_NAMESPACE
struct FormatProperties;
struct FormatProperties2;
using FormatProperties2KHR = FormatProperties2;
- struct FramebufferAttachmentImageInfoKHR;
- struct FramebufferAttachmentsCreateInfoKHR;
+ struct FramebufferAttachmentImageInfo;
+ using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo;
+ struct FramebufferAttachmentsCreateInfo;
+ using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo;
struct FramebufferCreateInfo;
struct FramebufferMixedSamplesCombinationNV;
struct GeometryAABBNV;
@@ -12949,7 +12870,8 @@ namespace VULKAN_HPP_NAMESPACE
struct ImageDrmFormatModifierExplicitCreateInfoEXT;
struct ImageDrmFormatModifierListCreateInfoEXT;
struct ImageDrmFormatModifierPropertiesEXT;
- struct ImageFormatListCreateInfoKHR;
+ struct ImageFormatListCreateInfo;
+ using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo;
struct ImageFormatProperties;
struct ImageFormatProperties2;
using ImageFormatProperties2KHR = ImageFormatProperties2;
@@ -12964,7 +12886,8 @@ namespace VULKAN_HPP_NAMESPACE
struct ImageResolve;
struct ImageSparseMemoryRequirementsInfo2;
using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2;
- struct ImageStencilUsageCreateInfoEXT;
+ struct ImageStencilUsageCreateInfo;
+ using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo;
struct ImageSubresource;
struct ImageSubresourceLayers;
struct ImageSubresourceRange;
@@ -13023,6 +12946,8 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
struct MemoryHeap;
struct MemoryHostPointerPropertiesEXT;
+ struct MemoryOpaqueCaptureAddressAllocateInfo;
+ using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo;
struct MemoryPriorityAllocateInfoEXT;
struct MemoryRequirements;
struct MemoryRequirements2;
@@ -13046,17 +12971,24 @@ namespace VULKAN_HPP_NAMESPACE
struct Offset3D;
struct PastPresentationTimingGOOGLE;
struct PerformanceConfigurationAcquireInfoINTEL;
+ struct PerformanceCounterDescriptionKHR;
+ struct PerformanceCounterKHR;
+ union PerformanceCounterResultKHR;
struct PerformanceMarkerInfoINTEL;
struct PerformanceOverrideInfoINTEL;
+ struct PerformanceQuerySubmitInfoKHR;
struct PerformanceStreamMarkerInfoINTEL;
union PerformanceValueDataINTEL;
struct PerformanceValueINTEL;
struct PhysicalDevice16BitStorageFeatures;
using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures;
- struct PhysicalDevice8BitStorageFeaturesKHR;
+ struct PhysicalDevice8BitStorageFeatures;
+ using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures;
struct PhysicalDeviceASTCDecodeFeaturesEXT;
struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT;
struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT;
+ struct PhysicalDeviceBufferDeviceAddressFeatures;
+ using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures;
struct PhysicalDeviceBufferDeviceAddressFeaturesEXT;
using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT;
struct PhysicalDeviceCoherentMemoryFeaturesAMD;
@@ -13069,11 +13001,15 @@ namespace VULKAN_HPP_NAMESPACE
struct PhysicalDeviceCoverageReductionModeFeaturesNV;
struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
struct PhysicalDeviceDepthClipEnableFeaturesEXT;
- struct PhysicalDeviceDepthStencilResolvePropertiesKHR;
- struct PhysicalDeviceDescriptorIndexingFeaturesEXT;
- struct PhysicalDeviceDescriptorIndexingPropertiesEXT;
+ struct PhysicalDeviceDepthStencilResolveProperties;
+ using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties;
+ struct PhysicalDeviceDescriptorIndexingFeatures;
+ using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures;
+ struct PhysicalDeviceDescriptorIndexingProperties;
+ using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties;
struct PhysicalDeviceDiscardRectanglePropertiesEXT;
- struct PhysicalDeviceDriverPropertiesKHR;
+ struct PhysicalDeviceDriverProperties;
+ using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties;
struct PhysicalDeviceExclusiveScissorFeaturesNV;
struct PhysicalDeviceExternalBufferInfo;
using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo;
@@ -13087,21 +13023,24 @@ namespace VULKAN_HPP_NAMESPACE
struct PhysicalDeviceFeatures;
struct PhysicalDeviceFeatures2;
using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2;
- struct PhysicalDeviceFloatControlsPropertiesKHR;
+ struct PhysicalDeviceFloatControlsProperties;
+ using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties;
struct PhysicalDeviceFragmentDensityMapFeaturesEXT;
struct PhysicalDeviceFragmentDensityMapPropertiesEXT;
struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV;
struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT;
struct PhysicalDeviceGroupProperties;
using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties;
- struct PhysicalDeviceHostQueryResetFeaturesEXT;
+ struct PhysicalDeviceHostQueryResetFeatures;
+ using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures;
struct PhysicalDeviceIDProperties;
using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties;
struct PhysicalDeviceImageDrmFormatModifierInfoEXT;
struct PhysicalDeviceImageFormatInfo2;
using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2;
struct PhysicalDeviceImageViewImageFormatInfoEXT;
- struct PhysicalDeviceImagelessFramebufferFeaturesKHR;
+ struct PhysicalDeviceImagelessFramebufferFeatures;
+ using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures;
struct PhysicalDeviceIndexTypeUint8FeaturesEXT;
struct PhysicalDeviceInlineUniformBlockFeaturesEXT;
struct PhysicalDeviceInlineUniformBlockPropertiesEXT;
@@ -13123,6 +13062,8 @@ namespace VULKAN_HPP_NAMESPACE
struct PhysicalDeviceMultiviewProperties;
using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties;
struct PhysicalDevicePCIBusInfoPropertiesEXT;
+ struct PhysicalDevicePerformanceQueryFeaturesKHR;
+ struct PhysicalDevicePerformanceQueryPropertiesKHR;
struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR;
struct PhysicalDevicePointClippingProperties;
using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties;
@@ -13135,25 +13076,31 @@ namespace VULKAN_HPP_NAMESPACE
struct PhysicalDeviceRayTracingPropertiesNV;
struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV;
struct PhysicalDeviceSampleLocationsPropertiesEXT;
- struct PhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
+ struct PhysicalDeviceSamplerFilterMinmaxProperties;
+ using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties;
struct PhysicalDeviceSamplerYcbcrConversionFeatures;
using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures;
- struct PhysicalDeviceScalarBlockLayoutFeaturesEXT;
- struct PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR;
- struct PhysicalDeviceShaderAtomicInt64FeaturesKHR;
+ struct PhysicalDeviceScalarBlockLayoutFeatures;
+ using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures;
+ struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ struct PhysicalDeviceShaderAtomicInt64Features;
+ using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features;
struct PhysicalDeviceShaderClockFeaturesKHR;
struct PhysicalDeviceShaderCoreProperties2AMD;
struct PhysicalDeviceShaderCorePropertiesAMD;
struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;
struct PhysicalDeviceShaderDrawParametersFeatures;
using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures;
- struct PhysicalDeviceShaderFloat16Int8FeaturesKHR;
- using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8FeaturesKHR;
+ struct PhysicalDeviceShaderFloat16Int8Features;
+ using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
+ using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
struct PhysicalDeviceShaderImageFootprintFeaturesNV;
struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;
struct PhysicalDeviceShaderSMBuiltinsFeaturesNV;
struct PhysicalDeviceShaderSMBuiltinsPropertiesNV;
- struct PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;
+ struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
+ using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
struct PhysicalDeviceShadingRateImageFeaturesNV;
struct PhysicalDeviceShadingRateImagePropertiesNV;
struct PhysicalDeviceSparseImageFormatInfo2;
@@ -13166,18 +13113,27 @@ namespace VULKAN_HPP_NAMESPACE
struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT;
struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT;
struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT;
- struct PhysicalDeviceTimelineSemaphoreFeaturesKHR;
- struct PhysicalDeviceTimelineSemaphorePropertiesKHR;
+ struct PhysicalDeviceTimelineSemaphoreFeatures;
+ using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures;
+ struct PhysicalDeviceTimelineSemaphoreProperties;
+ using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties;
+ struct PhysicalDeviceToolPropertiesEXT;
struct PhysicalDeviceTransformFeedbackFeaturesEXT;
struct PhysicalDeviceTransformFeedbackPropertiesEXT;
- struct PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR;
+ struct PhysicalDeviceUniformBufferStandardLayoutFeatures;
+ using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures;
struct PhysicalDeviceVariablePointersFeatures;
using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures;
struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT;
struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT;
- struct PhysicalDeviceVulkanMemoryModelFeaturesKHR;
+ struct PhysicalDeviceVulkan11Features;
+ struct PhysicalDeviceVulkan11Properties;
+ struct PhysicalDeviceVulkan12Features;
+ struct PhysicalDeviceVulkan12Properties;
+ struct PhysicalDeviceVulkanMemoryModelFeatures;
+ using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures;
struct PhysicalDeviceYcbcrImageArraysFeaturesEXT;
struct PipelineCacheCreateInfo;
struct PipelineColorBlendAdvancedStateCreateInfoEXT;
@@ -13234,6 +13190,7 @@ namespace VULKAN_HPP_NAMESPACE
struct PushConstantRange;
struct QueryPoolCreateInfo;
struct QueryPoolCreateInfoINTEL;
+ struct QueryPoolPerformanceCreateInfoKHR;
struct QueueFamilyCheckpointPropertiesNV;
struct QueueFamilyProperties;
struct QueueFamilyProperties2;
@@ -13243,10 +13200,12 @@ namespace VULKAN_HPP_NAMESPACE
struct Rect2D;
struct RectLayerKHR;
struct RefreshCycleDurationGOOGLE;
- struct RenderPassAttachmentBeginInfoKHR;
+ struct RenderPassAttachmentBeginInfo;
+ using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo;
struct RenderPassBeginInfo;
struct RenderPassCreateInfo;
- struct RenderPassCreateInfo2KHR;
+ struct RenderPassCreateInfo2;
+ using RenderPassCreateInfo2KHR = RenderPassCreateInfo2;
struct RenderPassFragmentDensityMapCreateInfoEXT;
struct RenderPassInputAttachmentAspectCreateInfo;
using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo;
@@ -13256,7 +13215,8 @@ namespace VULKAN_HPP_NAMESPACE
struct SampleLocationEXT;
struct SampleLocationsInfoEXT;
struct SamplerCreateInfo;
- struct SamplerReductionModeCreateInfoEXT;
+ struct SamplerReductionModeCreateInfo;
+ using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo;
struct SamplerYcbcrConversionCreateInfo;
using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo;
struct SamplerYcbcrConversionImageFormatProperties;
@@ -13268,9 +13228,12 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
struct SemaphoreGetWin32HandleInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct SemaphoreSignalInfoKHR;
- struct SemaphoreTypeCreateInfoKHR;
- struct SemaphoreWaitInfoKHR;
+ struct SemaphoreSignalInfo;
+ using SemaphoreSignalInfoKHR = SemaphoreSignalInfo;
+ struct SemaphoreTypeCreateInfo;
+ using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo;
+ struct SemaphoreWaitInfo;
+ using SemaphoreWaitInfoKHR = SemaphoreWaitInfo;
struct ShaderModuleCreateInfo;
struct ShaderModuleValidationCacheCreateInfoEXT;
struct ShaderResourceUsageAMD;
@@ -13295,13 +13258,18 @@ namespace VULKAN_HPP_NAMESPACE
struct StreamDescriptorSurfaceCreateInfoGGP;
#endif /*VK_USE_PLATFORM_GGP*/
struct SubmitInfo;
- struct SubpassBeginInfoKHR;
+ struct SubpassBeginInfo;
+ using SubpassBeginInfoKHR = SubpassBeginInfo;
struct SubpassDependency;
- struct SubpassDependency2KHR;
+ struct SubpassDependency2;
+ using SubpassDependency2KHR = SubpassDependency2;
struct SubpassDescription;
- struct SubpassDescription2KHR;
- struct SubpassDescriptionDepthStencilResolveKHR;
- struct SubpassEndInfoKHR;
+ struct SubpassDescription2;
+ using SubpassDescription2KHR = SubpassDescription2;
+ struct SubpassDescriptionDepthStencilResolve;
+ using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve;
+ struct SubpassEndInfo;
+ using SubpassEndInfoKHR = SubpassEndInfo;
struct SubpassSampleLocationsEXT;
struct SubresourceLayout;
struct SurfaceCapabilities2EXT;
@@ -13323,7 +13291,8 @@ namespace VULKAN_HPP_NAMESPACE
struct SwapchainCreateInfoKHR;
struct SwapchainDisplayNativeHdrCreateInfoAMD;
struct TextureLODGatherFormatPropertiesAMD;
- struct TimelineSemaphoreSubmitInfoKHR;
+ struct TimelineSemaphoreSubmitInfo;
+ using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo;
struct ValidationCacheCreateInfoEXT;
struct ValidationFeaturesEXT;
struct ValidationFlagsEXT;
@@ -14760,154 +14729,161 @@ namespace VULKAN_HPP_NAMESPACE
}
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result begin( const vk::CommandBufferBeginInfo* pBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo* pBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginConditionalRenderingEXT( const vk::ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginQuery( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, uint32_t index, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginRenderPass( const vk::RenderPassBeginInfo* pRenderPassBegin, vk::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo* pRenderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, vk::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginRenderPass2KHR( const vk::RenderPassBeginInfo* pRenderPassBegin, const vk::SubpassBeginInfoKHR* pSubpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo* pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo* pSubpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfoKHR & subpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginRenderPass2( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfo & subpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const vk::Buffer* pCounterBuffers, const vk::DeviceSize* pCounterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo* pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo* pSubpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const vk::Buffer> counterBuffers, ArrayProxy<const vk::DeviceSize> counterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ void beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfo & subpassBeginInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindDescriptorSets( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindDescriptorSets( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t firstSet, ArrayProxy<const vk::DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> counterBuffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> counterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindIndexBuffer( vk::Buffer buffer, vk::DeviceSize offset, vk::IndexType indexType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindPipeline( vk::PipelineBindPoint pipelineBindPoint, vk::Pipeline pipeline, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindShadingRateImageNV( vk::ImageView imageView, vk::ImageLayout imageLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const vk::Buffer* pBuffers, const vk::DeviceSize* pOffsets, const vk::DeviceSize* pSizes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const vk::Buffer> buffers, ArrayProxy<const vk::DeviceSize> offsets, ArrayProxy<const vk::DeviceSize> sizes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> buffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> offsets, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> sizes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const vk::Buffer* pBuffers, const vk::DeviceSize* pOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const vk::Buffer> buffers, ArrayProxy<const vk::DeviceSize> offsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ void bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> buffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> offsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void blitImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageBlit* pRegions, vk::Filter filter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageBlit* pRegions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void blitImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageBlit> regions, vk::Filter filter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageBlit> regions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void buildAccelerationStructureNV( const vk::AccelerationStructureInfoNV* pInfo, vk::Buffer instanceData, vk::DeviceSize instanceOffset, vk::Bool32 update, vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::Buffer scratch, vk::DeviceSize scratchOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void buildAccelerationStructureNV( const AccelerationStructureInfoNV & info, vk::Buffer instanceData, vk::DeviceSize instanceOffset, vk::Bool32 update, vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::Buffer scratch, vk::DeviceSize scratchOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void buildAccelerationStructureNV( const 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 ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearAttachments( uint32_t attachmentCount, const vk::ClearAttachment* pAttachments, uint32_t rectCount, const vk::ClearRect* pRects, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearAttachments( ArrayProxy<const vk::ClearAttachment> attachments, ArrayProxy<const vk::ClearRect> rects, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void clearAttachments( ArrayProxy<const VULKAN_HPP_NAMESPACE::ClearAttachment> attachments, ArrayProxy<const VULKAN_HPP_NAMESPACE::ClearRect> rects, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearColorImage( vk::Image image, vk::ImageLayout imageLayout, const vk::ClearColorValue* pColor, uint32_t rangeCount, const vk::ImageSubresourceRange* pRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearColorImage( vk::Image image, vk::ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const vk::ImageSubresourceRange> ranges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> ranges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearDepthStencilImage( vk::Image image, vk::ImageLayout imageLayout, const vk::ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const vk::ImageSubresourceRange* pRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void clearDepthStencilImage( vk::Image image, vk::ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const vk::ImageSubresourceRange> ranges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> ranges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyAccelerationStructureNV( vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::CopyAccelerationStructureModeNV mode, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeNV mode, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyBuffer( vk::Buffer srcBuffer, vk::Buffer dstBuffer, uint32_t regionCount, const vk::BufferCopy* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyBuffer( vk::Buffer srcBuffer, vk::Buffer dstBuffer, ArrayProxy<const vk::BufferCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyBufferToImage( vk::Buffer srcBuffer, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::BufferImageCopy* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyBufferToImage( vk::Buffer srcBuffer, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::BufferImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageCopy* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageCopy* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyImageToBuffer( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Buffer dstBuffer, uint32_t regionCount, const vk::BufferImageCopy* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyImageToBuffer( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Buffer dstBuffer, ArrayProxy<const vk::BufferImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void copyQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void debugMarkerBeginEXT( const vk::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
@@ -14917,7 +14893,7 @@ namespace VULKAN_HPP_NAMESPACE
void debugMarkerEndEXT(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void debugMarkerInsertEXT( const vk::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
@@ -14933,7 +14909,7 @@ namespace VULKAN_HPP_NAMESPACE
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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void dispatchIndirect( vk::Buffer buffer, vk::DeviceSize offset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
@@ -14942,31 +14918,37 @@ namespace VULKAN_HPP_NAMESPACE
void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndexedIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndexedIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndexedIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, vk::Buffer counterBuffer, vk::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawMeshTasksIndirectCountNV( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void drawMeshTasksIndirectNV( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
@@ -14978,104 +14960,118 @@ namespace VULKAN_HPP_NAMESPACE
void endDebugUtilsLabelEXT(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endQuery( vk::QueryPool queryPool, uint32_t query, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void endRenderPass(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endRenderPass2KHR( const vk::SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endRenderPass2KHR( const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endRenderPass2( const SubpassEndInfo & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const vk::Buffer* pCounterBuffers, const vk::DeviceSize* pCounterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const vk::Buffer> counterBuffers, ArrayProxy<const vk::DeviceSize> counterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ void endRenderPass2KHR( const SubpassEndInfo & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void executeCommands( uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void executeCommands( ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> counterBuffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> counterBufferOffsets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void fillBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize size, uint32_t data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void executeCommands( uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void executeCommands( ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void insertDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void nextSubpass( vk::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo* pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void nextSubpass2( const SubpassBeginInfo & subpassBeginInfo, const SubpassEndInfo & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void nextSubpass2KHR( const vk::SubpassBeginInfoKHR* pSubpassBeginInfo, const vk::SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo* pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void nextSubpass2KHR( const SubpassBeginInfoKHR & subpassBeginInfo, const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void nextSubpass2KHR( const SubpassBeginInfo & subpassBeginInfo, const SubpassEndInfo & subpassEndInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pipelineBarrier( vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, vk::DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const vk::MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const vk::BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const vk::ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pipelineBarrier( vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, vk::DependencyFlags dependencyFlags, ArrayProxy<const vk::MemoryBarrier> memoryBarriers, ArrayProxy<const vk::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const vk::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, ArrayProxy<const VULKAN_HPP_NAMESPACE::MemoryBarrier> memoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void processCommandsNVX( const vk::CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void processCommandsNVX( const VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pushConstants( vk::PipelineLayout layout, vk::ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pushConstants( vk::PipelineLayout layout, vk::ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pushDescriptorSetKHR( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const vk::WriteDescriptorSet* pDescriptorWrites, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pushDescriptorSetKHR( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t set, ArrayProxy<const vk::WriteDescriptorSet> descriptorWrites, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, ArrayProxy<const VULKAN_HPP_NAMESPACE::WriteDescriptorSet> descriptorWrites, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void pushDescriptorSetWithTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, vk::PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void reserveSpaceForCommandsNVX( const vk::CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void reserveSpaceForCommandsNVX( const VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void resetEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void resetQueryPool( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void resolveImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageResolve* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageResolve* pRegions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void resolveImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageResolve> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageResolve> regions, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -15085,10 +15081,10 @@ namespace VULKAN_HPP_NAMESPACE
void setCheckpointNV( const void* pCheckpointMarker, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setCoarseSampleOrderNV( vk::CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV* pCustomSampleOrders, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setCoarseSampleOrderNV( vk::CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const vk::CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -15104,20 +15100,20 @@ namespace VULKAN_HPP_NAMESPACE
void setDeviceMaskKHR( uint32_t deviceMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const vk::Rect2D* pDiscardRectangles, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VULKAN_HPP_NAMESPACE::Rect2D* pDiscardRectangles, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const vk::Rect2D> discardRectangles, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> discardRectangles, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const vk::Rect2D* pExclusiveScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VULKAN_HPP_NAMESPACE::Rect2D* pExclusiveScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const vk::Rect2D> exclusiveScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> exclusiveScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -15127,114 +15123,114 @@ namespace VULKAN_HPP_NAMESPACE
void setLineWidth( float lineWidth, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setPerformanceMarkerINTEL( const vk::PerformanceMarkerInfoINTEL* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setPerformanceMarkerINTEL( const PerformanceMarkerInfoINTEL & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setPerformanceMarkerINTEL( const PerformanceMarkerInfoINTEL & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setPerformanceOverrideINTEL( const vk::PerformanceOverrideInfoINTEL* pOverrideInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL* pOverrideInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setPerformanceOverrideINTEL( const PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setPerformanceOverrideINTEL( const PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setPerformanceStreamMarkerINTEL( const vk::PerformanceStreamMarkerInfoINTEL* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL* pMarkerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setPerformanceStreamMarkerINTEL( const PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setPerformanceStreamMarkerINTEL( const PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setSampleLocationsEXT( const vk::SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setScissor( uint32_t firstScissor, uint32_t scissorCount, const vk::Rect2D* pScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setScissor( uint32_t firstScissor, uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D* pScissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setScissor( uint32_t firstScissor, ArrayProxy<const vk::Rect2D> scissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setScissor( uint32_t firstScissor, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> scissors, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setStencilCompareMask( vk::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setStencilReference( vk::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setStencilWriteMask( vk::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewport( uint32_t firstViewport, uint32_t viewportCount, const vk::Viewport* pViewports, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewport( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport* pViewports, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewport( uint32_t firstViewport, ArrayProxy<const vk::Viewport> viewports, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewport( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::Viewport> viewports, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const vk::ShadingRatePaletteNV* pShadingRatePalettes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV* pShadingRatePalettes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const vk::ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const vk::ViewportWScalingNV* pViewportWScalings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ViewportWScalingNV* pViewportWScalings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const vk::ViewportWScalingNV> viewportWScalings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::ViewportWScalingNV> viewportWScalings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void traceRaysNV( vk::Buffer raygenShaderBindingTableBuffer, vk::DeviceSize raygenShaderBindingOffset, vk::Buffer missShaderBindingTableBuffer, vk::DeviceSize missShaderBindingOffset, vk::DeviceSize missShaderBindingStride, vk::Buffer hitShaderBindingTableBuffer, vk::DeviceSize hitShaderBindingOffset, vk::DeviceSize hitShaderBindingStride, vk::Buffer callableShaderBindingTableBuffer, vk::DeviceSize callableShaderBindingOffset, vk::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) 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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize dataSize, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void waitEvents( uint32_t eventCount, const vk::Event* pEvents, vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const vk::MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const vk::BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const vk::ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void waitEvents( ArrayProxy<const vk::Event> events, vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, ArrayProxy<const vk::MemoryBarrier> memoryBarriers, ArrayProxy<const vk::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const vk::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void waitEvents( ArrayProxy<const VULKAN_HPP_NAMESPACE::Event> events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, ArrayProxy<const VULKAN_HPP_NAMESPACE::MemoryBarrier> memoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const vk::AccelerationStructureNV* pAccelerationStructures, vk::QueryType queryType, vk::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void writeAccelerationStructuresPropertiesNV( ArrayProxy<const vk::AccelerationStructureNV> accelerationStructures, vk::QueryType queryType, vk::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void writeAccelerationStructuresPropertiesNV( ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureNV> accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void writeBufferMarkerAMD( vk::PipelineStageFlagBits pipelineStage, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, uint32_t marker, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void writeTimestamp( vk::PipelineStageFlagBits pipelineStage, vk::QueryPool queryPool, uint32_t query, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result end(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result end(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type end(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type end(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result reset( vk::CommandBufferResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type reset( vk::CommandBufferResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandBuffer() const VULKAN_HPP_NOEXCEPT
@@ -16364,7 +16360,7 @@ namespace VULKAN_HPP_NAMESPACE
}
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getCheckpointDataNV( uint32_t* pCheckpointDataCount, vk::CheckpointDataNV* pCheckpointData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getCheckpointDataNV( uint32_t* pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointDataNV* pCheckpointData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<CheckpointDataNV>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<CheckpointDataNV,Allocator> getCheckpointDataNV(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16373,31 +16369,31 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void beginDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindSparse( uint32_t bindInfoCount, const vk::BindSparseInfo* pBindInfo, vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindSparse( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindSparseInfo* pBindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindSparse( ArrayProxy<const vk::BindSparseInfo> bindInfo, vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindSparse( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindSparseInfo> bindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void endDebugUtilsLabelEXT(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void insertDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result presentKHR( const vk::PresentInfoKHR* pPresentInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR* pPresentInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
Result presentKHR( const PresentInfoKHR & presentInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16405,25 +16401,25 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setPerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setPerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result submit( uint32_t submitCount, const vk::SubmitInfo* pSubmits, vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result submit( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo* pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type submit( ArrayProxy<const vk::SubmitInfo> submits, vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type submit( ArrayProxy<const VULKAN_HPP_NAMESPACE::SubmitInfo> submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueue() const VULKAN_HPP_NOEXCEPT
@@ -16472,6 +16468,7 @@ namespace VULKAN_HPP_NAMESPACE
using UniqueDescriptorSetLayout = UniqueHandle<DescriptorSetLayout, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<DescriptorUpdateTemplate, Dispatch> { public: using deleter = ObjectDestroy<Device, Dispatch>; };
using UniqueDescriptorUpdateTemplate = UniqueHandle<DescriptorUpdateTemplate, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
+ using UniqueDescriptorUpdateTemplateKHR = UniqueHandle<DescriptorUpdateTemplate, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<DeviceMemory, Dispatch> { public: using deleter = ObjectFree<Device, Dispatch>; };
using UniqueDeviceMemory = UniqueHandle<DeviceMemory, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<Event, Dispatch> { public: using deleter = ObjectDestroy<Device, Dispatch>; };
@@ -16502,6 +16499,7 @@ namespace VULKAN_HPP_NAMESPACE
using UniqueSampler = UniqueHandle<Sampler, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<SamplerYcbcrConversion, Dispatch> { public: using deleter = ObjectDestroy<Device, Dispatch>; };
using UniqueSamplerYcbcrConversion = UniqueHandle<SamplerYcbcrConversion, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
+ using UniqueSamplerYcbcrConversionKHR = UniqueHandle<SamplerYcbcrConversion, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<Semaphore, Dispatch> { public: using deleter = ObjectDestroy<Device, Dispatch>; };
using UniqueSemaphore = UniqueHandle<Semaphore, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>;
template <typename Dispatch> class UniqueHandleTraits<ShaderModule, Dispatch> { public: using deleter = ObjectDestroy<Device, Dispatch>; };
@@ -16564,36 +16562,43 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result acquireFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type acquireFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result acquireNextImage2KHR( const vk::AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ResultValue<uint32_t> acquireNextImage2KHR( const AcquireNextImageInfoKHR & acquireInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result acquireNextImageKHR( vk::SwapchainKHR swapchain, uint64_t timeout, vk::Semaphore semaphore, vk::Fence fence, uint32_t* pImageIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ ResultValue<uint32_t> acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL* pConfiguration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValue<uint32_t> acquireNextImageKHR( vk::SwapchainKHR swapchain, uint64_t timeout, vk::Semaphore semaphore, vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL>::type acquirePerformanceConfigurationINTEL( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result acquirePerformanceConfigurationINTEL( const vk::PerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, vk::PerformanceConfigurationINTEL* pConfiguration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::PerformanceConfigurationINTEL>::type acquirePerformanceConfigurationINTEL( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type acquireProfilingLockKHR( const AcquireProfilingLockInfoKHR & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result allocateCommandBuffers( const vk::CommandBufferAllocateInfo* pAllocateInfo, vk::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo* pAllocateInfo, VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<CommandBuffer>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16608,7 +16613,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result allocateDescriptorSets( const vk::DescriptorSetAllocateInfo* pAllocateInfo, vk::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo* pAllocateInfo, VULKAN_HPP_NAMESPACE::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DescriptorSet>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16623,10 +16628,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result allocateMemory( const vk::MemoryAllocateInfo* pAllocateInfo, const vk::AllocationCallbacks* pAllocator, vk::DeviceMemory* pMemory, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DeviceMemory>::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceMemory>::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DeviceMemory,Dispatch>>::type allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16634,69 +16639,69 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const vk::BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindAccelerationStructureMemoryNV( ArrayProxy<const vk::BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindAccelerationStructureMemoryNV( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindBufferMemory( vk::Buffer buffer, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindBufferMemory( vk::Buffer buffer, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindBufferMemory2( uint32_t bindInfoCount, const vk::BindBufferMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindBufferMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindBufferMemory2( ArrayProxy<const vk::BindBufferMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindBufferMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindBufferMemory2KHR( uint32_t bindInfoCount, const vk::BindBufferMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindBufferMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindBufferMemory2KHR( ArrayProxy<const vk::BindBufferMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindBufferMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindImageMemory( vk::Image image, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindImageMemory( vk::Image image, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindImageMemory2( uint32_t bindInfoCount, const vk::BindImageMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindImageMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindImageMemory2( ArrayProxy<const vk::BindImageMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindImageMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result bindImageMemory2KHR( uint32_t bindInfoCount, const vk::BindImageMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result bindImageMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo* pBindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type bindImageMemory2KHR( ArrayProxy<const vk::BindImageMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type bindImageMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> bindInfos, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result compileDeferredNV( vk::Pipeline pipeline, uint32_t shader, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type compileDeferredNV( vk::Pipeline pipeline, uint32_t shader, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createAccelerationStructureNV( const vk::AccelerationStructureCreateInfoNV* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::AccelerationStructureNV* pAccelerationStructure, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::AccelerationStructureNV>::type createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::AccelerationStructureNV>::type createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<AccelerationStructureNV,Dispatch>>::type createAccelerationStructureNVUnique( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16704,10 +16709,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createBuffer( const vk::BufferCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Buffer* pBuffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Buffer>::type createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Buffer>::type createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Buffer,Dispatch>>::type createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16715,10 +16720,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createBufferView( const vk::BufferViewCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::BufferView* pView, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::BufferView>::type createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::BufferView>::type createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<BufferView,Dispatch>>::type createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16726,10 +16731,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createCommandPool( const vk::CommandPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::CommandPool* pCommandPool, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::CommandPool>::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::CommandPool>::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<CommandPool,Dispatch>>::type createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16737,29 +16742,29 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createComputePipelines( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::ComputePipelineCreateInfo* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<Pipeline>::type createComputePipeline( vk::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<Pipeline>::type createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createComputePipelineUnique( vk::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDescriptorPool( const vk::DescriptorPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorPool* pDescriptorPool, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DescriptorPool>::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorPool>::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DescriptorPool,Dispatch>>::type createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16767,10 +16772,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDescriptorSetLayout( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorSetLayout* pSetLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DescriptorSetLayout>::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorSetLayout>::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DescriptorSetLayout,Dispatch>>::type createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16778,10 +16783,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDescriptorUpdateTemplate( const vk::DescriptorUpdateTemplateCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DescriptorUpdateTemplate>::type createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>::type createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type createDescriptorUpdateTemplateUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16789,10 +16794,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDescriptorUpdateTemplateKHR( const vk::DescriptorUpdateTemplateCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DescriptorUpdateTemplate>::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16800,10 +16805,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createEvent( const vk::EventCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Event* pEvent, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Event>::type createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Event>::type createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Event,Dispatch>>::type createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16811,10 +16816,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createFence( const vk::FenceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Fence>::type createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16822,10 +16827,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createFramebuffer( const vk::FramebufferCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Framebuffer* pFramebuffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Framebuffer>::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Framebuffer>::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Framebuffer,Dispatch>>::type createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16833,29 +16838,29 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createGraphicsPipelines( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::GraphicsPipelineCreateInfo* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<Pipeline>::type createGraphicsPipeline( vk::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<Pipeline>::type createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createGraphicsPipelineUnique( vk::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createImage( const vk::ImageCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Image* pImage, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Image>::type createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Image>::type createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Image,Dispatch>>::type createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16863,10 +16868,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createImageView( const vk::ImageViewCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ImageView* pView, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ImageView>::type createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageView>::type createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<ImageView,Dispatch>>::type createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16874,10 +16879,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createIndirectCommandsLayoutNVX( const vk::IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result createIndirectCommandsLayoutNVX( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::IndirectCommandsLayoutNVX>::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX>::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<IndirectCommandsLayoutNVX,Dispatch>>::type createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16885,10 +16890,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createObjectTableNVX( const vk::ObjectTableCreateInfoNVX* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ObjectTableNVX* pObjectTable, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result createObjectTableNVX( const VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX* pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, VULKAN_HPP_NAMESPACE::ObjectTableNVX* pObjectTable, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ObjectTableNVX>::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ObjectTableNVX>::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<ObjectTableNVX,Dispatch>>::type createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16896,10 +16901,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createPipelineCache( const vk::PipelineCacheCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::PipelineCache* pPipelineCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::PipelineCache>::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::PipelineCache>::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<PipelineCache,Dispatch>>::type createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16907,10 +16912,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createPipelineLayout( const vk::PipelineLayoutCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::PipelineLayout* pPipelineLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::PipelineLayout>::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::PipelineLayout>::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<PipelineLayout,Dispatch>>::type createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16918,10 +16923,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createQueryPool( const vk::QueryPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::QueryPool* pQueryPool, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::QueryPool>::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::QueryPool>::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<QueryPool,Dispatch>>::type createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16929,29 +16934,29 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::RayTracingPipelineCreateInfoNV* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<Pipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<Pipeline>::type createRayTracingPipelineNV( vk::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<Pipeline>::type createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createRayTracingPipelineNVUnique( vk::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createRenderPass( const vk::RenderPassCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::RenderPass* pRenderPass, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::RenderPass>::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16959,21 +16964,32 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createRenderPass2KHR( const vk::RenderPassCreateInfo2KHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::RenderPass* pRenderPass, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::RenderPass>::type createRenderPass2KHR( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type createRenderPass2( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPass2KHRUnique( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPass2Unique( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSampler( const vk::SamplerCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Sampler* pSampler, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Sampler>::type createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type createRenderPass2KHR( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPass2KHRUnique( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Sampler>::type createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Sampler,Dispatch>>::type createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16981,10 +16997,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSamplerYcbcrConversion( const vk::SamplerYcbcrConversionCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SamplerYcbcrConversion>::type createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>::type createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type createSamplerYcbcrConversionUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -16992,10 +17008,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSamplerYcbcrConversionKHR( const vk::SamplerYcbcrConversionCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SamplerYcbcrConversion>::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17003,10 +17019,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSemaphore( const vk::SemaphoreCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Semaphore* pSemaphore, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Semaphore>::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Semaphore>::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Semaphore,Dispatch>>::type createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17014,10 +17030,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createShaderModule( const vk::ShaderModuleCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ShaderModule* pShaderModule, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ShaderModule>::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ShaderModule>::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<ShaderModule,Dispatch>>::type createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17025,29 +17041,29 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSharedSwapchainsKHR( uint32_t swapchainCount, const vk::SwapchainCreateInfoKHR* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::SwapchainKHR* pSwapchains, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SwapchainKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<SwapchainKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator = std::allocator<UniqueSwapchainKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<UniqueSwapchainKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createSwapchainKHR( const vk::SwapchainCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SwapchainKHR* pSwapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SwapchainKHR>::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SwapchainKHR>::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17055,10 +17071,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createValidationCacheEXT( const vk::ValidationCacheCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ValidationCacheEXT* pValidationCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ValidationCacheEXT>::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ValidationCacheEXT>::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<ValidationCacheEXT,Dispatch>>::type createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17066,580 +17082,622 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result debugMarkerSetObjectNameEXT( const vk::DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result debugMarkerSetObjectTagEXT( const vk::DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyAccelerationStructureNV( vk::AccelerationStructureNV accelerationStructure, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyAccelerationStructureNV( vk::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::AccelerationStructureNV accelerationStructure, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyBuffer( vk::Buffer buffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyBuffer( vk::Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Buffer buffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyBufferView( vk::BufferView bufferView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyBufferView( vk::BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::BufferView bufferView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyCommandPool( vk::CommandPool commandPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyCommandPool( vk::CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::CommandPool commandPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorPool( vk::DescriptorPool descriptorPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorPool( vk::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorPool descriptorPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorSetLayout( vk::DescriptorSetLayout descriptorSetLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorSetLayout( vk::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorSetLayout descriptorSetLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorUpdateTemplate( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorUpdateTemplate( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorUpdateTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDescriptorUpdateTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void destroy( Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyEvent( vk::Event event, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyEvent( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyEvent( vk::Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyEvent( VULKAN_HPP_NAMESPACE::Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Event event, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyFence( vk::Fence fence, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyFence( vk::Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Fence fence, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyFramebuffer( vk::Framebuffer framebuffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyFramebuffer( vk::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Framebuffer framebuffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyImage( vk::Image image, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyImage( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyImage( vk::Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyImage( VULKAN_HPP_NAMESPACE::Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Image image, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyImageView( vk::ImageView imageView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyImageView( vk::ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ImageView imageView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyIndirectCommandsLayoutNVX( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyIndirectCommandsLayoutNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyIndirectCommandsLayoutNVX( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyIndirectCommandsLayoutNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyObjectTableNVX( vk::ObjectTableNVX objectTable, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyObjectTableNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyObjectTableNVX( vk::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyObjectTableNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ObjectTableNVX objectTable, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipeline( vk::Pipeline pipeline, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipeline( vk::Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Pipeline pipeline, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipelineCache( vk::PipelineCache pipelineCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipelineCache( vk::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::PipelineCache pipelineCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipelineLayout( vk::PipelineLayout pipelineLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyPipelineLayout( vk::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::PipelineLayout pipelineLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyQueryPool( vk::QueryPool queryPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyQueryPool( vk::QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::QueryPool queryPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyRenderPass( vk::RenderPass renderPass, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyRenderPass( vk::RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::RenderPass renderPass, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySampler( vk::Sampler sampler, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySampler( vk::Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Sampler sampler, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySamplerYcbcrConversion( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySamplerYcbcrConversion( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySamplerYcbcrConversionKHR( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySamplerYcbcrConversionKHR( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySemaphore( vk::Semaphore semaphore, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySemaphore( vk::Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Semaphore semaphore, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyShaderModule( vk::ShaderModule shaderModule, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyShaderModule( vk::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ShaderModule shaderModule, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySwapchainKHR( vk::SwapchainKHR swapchain, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySwapchainKHR( vk::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SwapchainKHR swapchain, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyValidationCacheEXT( vk::ValidationCacheEXT validationCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyValidationCacheEXT( vk::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ValidationCacheEXT validationCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type waitIdle(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result displayPowerControlEXT( vk::DisplayKHR display, const vk::DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type displayPowerControlEXT( vk::DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const vk::MappedMemoryRange* pMemoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange* pMemoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type flushMappedMemoryRanges( ArrayProxy<const vk::MappedMemoryRange> memoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type flushMappedMemoryRanges( ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> memoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void freeCommandBuffers( vk::CommandPool commandPool, uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void freeCommandBuffers( vk::CommandPool commandPool, ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void free( vk::CommandPool commandPool, uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void free( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void free( vk::CommandPool commandPool, ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void free( VULKAN_HPP_NAMESPACE::CommandPool commandPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result freeDescriptorSets( vk::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type freeDescriptorSets( vk::DescriptorPool descriptorPool, ArrayProxy<const vk::DescriptorSet> descriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result free( vk::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result free( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet* pDescriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type free( vk::DescriptorPool descriptorPool, ArrayProxy<const vk::DescriptorSet> descriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type free( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void freeMemory( vk::DeviceMemory memory, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void freeMemory( vk::DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void free( vk::DeviceMemory memory, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void free( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void free( vk::DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void free( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getAccelerationStructureHandleNV( vk::AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type getAccelerationStructureHandleNV( vk::AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getAccelerationStructureMemoryRequirementsNV( const vk::AccelerationStructureMemoryRequirementsInfoNV* pInfo, vk::MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, vk::AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::AndroidHardwareBufferPropertiesANDROID>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<StructureChain<X, Y, Z...>>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- DeviceAddress getBufferAddressEXT( const vk::BufferDeviceAddressInfoEXT* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- DeviceAddress getBufferAddressEXT( const BufferDeviceAddressInfoEXT & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddress( const BufferDeviceAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getBufferMemoryRequirements( vk::Buffer buffer, vk::MemoryRequirements* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements getBufferMemoryRequirements( vk::Buffer buffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddressEXT( const BufferDeviceAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getBufferMemoryRequirements2( const vk::BufferMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements2 getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ DeviceAddress getBufferAddressKHR( const BufferDeviceAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::MemoryRequirements* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NAMESPACE::MemoryRequirements getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getBufferMemoryRequirements2KHR( const vk::BufferMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements2 getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getCalibratedTimestampsEXT( uint32_t timestampCount, const vk::CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<uint64_t>::type getCalibratedTimestampsEXT( ArrayProxy<const vk::CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ uint64_t getBufferOpaqueCaptureAddress( const BufferDeviceAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getDescriptorSetLayoutSupport( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, vk::DescriptorSetLayoutSupport* pSupport, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ uint64_t getBufferOpaqueCaptureAddressKHR( const BufferDeviceAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getCalibratedTimestampsEXT( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<uint64_t>::type getCalibratedTimestampsEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo* pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport* pSupport, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getDescriptorSetLayoutSupportKHR( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, vk::DescriptorSetLayoutSupport* pSupport, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo* pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport* pSupport, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, vk::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PeerMemoryFeatureFlags getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, vk::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PeerMemoryFeatureFlags getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getGroupPresentCapabilitiesKHR( vk::DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getGroupPresentCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DeviceGroupPresentCapabilitiesKHR>::type getGroupPresentCapabilitiesKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR>::type getGroupPresentCapabilitiesKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getGroupSurfacePresentModes2EXT( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, vk::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DeviceGroupPresentModeFlagsKHR>::type getGroupSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR>::type getGroupSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getGroupSurfacePresentModesKHR( vk::SurfaceKHR surface, vk::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR>::type getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize* pCommittedMemoryInBytes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NAMESPACE::DeviceSize getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DeviceGroupPresentModeFlagsKHR>::type getGroupSurfacePresentModesKHR( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ uint64_t getMemoryOpaqueCaptureAddress( const DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getMemoryCommitment( vk::DeviceMemory memory, vk::DeviceSize* pCommittedMemoryInBytes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::DeviceSize getMemoryCommitment( vk::DeviceMemory memory, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ uint64_t getMemoryOpaqueCaptureAddressKHR( const DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -17650,84 +17708,94 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, vk::Queue* pQueue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, VULKAN_HPP_NAMESPACE::Queue* pQueue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getQueue2( const vk::DeviceQueueInfo2* pQueueInfo, vk::Queue* pQueue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2* pQueueInfo, VULKAN_HPP_NAMESPACE::Queue* pQueue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::Queue getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::Queue getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getEventStatus( vk::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getFenceFdKHR( const vk::FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<int>::type getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<int>::type getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getFenceStatus( vk::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getFenceWin32HandleKHR( const vk::FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<HANDLE>::type getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<HANDLE>::type getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getImageDrmFormatModifierPropertiesEXT( vk::Image image, vk::ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ImageDrmFormatModifierPropertiesEXT>::type getImageDrmFormatModifierPropertiesEXT( vk::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT>::type getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageMemoryRequirements( vk::Image image, vk::MemoryRequirements* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::MemoryRequirements* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements getImageMemoryRequirements( vk::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageMemoryRequirements2( const vk::ImageMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements2 getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageMemoryRequirements2KHR( const vk::ImageMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MemoryRequirements2 getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageSparseMemoryRequirements( vk::Image image, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, uint32_t* pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageMemoryRequirements>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( vk::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<SparseImageMemoryRequirements>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( vk::Image image, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageSparseMemoryRequirements2( const vk::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17736,7 +17804,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageSparseMemoryRequirements2KHR( const vk::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17745,14 +17813,14 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getImageSubresourceLayout( vk::Image image, const vk::ImageSubresource* pSubresource, vk::SubresourceLayout* pLayout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::SubresourceLayout getImageSubresourceLayout( vk::Image image, const ImageSubresource & subresource, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::SubresourceLayout getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const ImageSubresource & subresource, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- uint32_t getImageViewHandleNVX( const vk::ImageViewHandleInfoNVX* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
uint32_t getImageViewHandleNVX( const ImageViewHandleInfoNVX & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
@@ -17760,88 +17828,88 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryAndroidHardwareBufferANDROID( const vk::MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<struct AHardwareBuffer*>::type getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<struct AHardwareBuffer*>::type getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryFdKHR( const vk::MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<int>::type getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<int>::type getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryFdPropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, int fd, vk::MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::MemoryFdPropertiesKHR>::type getMemoryFdPropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR>::type getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryHostPointerPropertiesEXT( vk::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, vk::MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::MemoryHostPointerPropertiesEXT>::type getMemoryHostPointerPropertiesEXT( vk::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT>::type getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryWin32HandleKHR( const vk::MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<HANDLE>::type getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<HANDLE>::type getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryWin32HandleNV( vk::DeviceMemory memory, vk::ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<HANDLE>::type getMemoryWin32HandleNV( vk::DeviceMemory memory, vk::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<HANDLE>::type getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getMemoryWin32HandlePropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, vk::MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::MemoryWin32HandlePropertiesKHR>::type getMemoryWin32HandlePropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR>::type getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, vk::PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PastPresentationTimingGOOGLE>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<PastPresentationTimingGOOGLE>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPerformanceParameterINTEL( vk::PerformanceParameterTypeINTEL parameter, vk::PerformanceValueINTEL* pValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, VULKAN_HPP_NAMESPACE::PerformanceValueINTEL* pValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::PerformanceValueINTEL>::type getPerformanceParameterINTEL( vk::PerformanceParameterTypeINTEL parameter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::PerformanceValueINTEL>::type getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPipelineCacheData( vk::PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( vk::PipelineCache pipelineCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( vk::PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPipelineExecutableInternalRepresentationsKHR( const vk::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, vk::PipelineExecutableInternalRepresentationKHR* pInternalRepresentations, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR* pInternalRepresentations, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PipelineExecutableInternalRepresentationKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PipelineExecutableInternalRepresentationKHR,Allocator>>::type getPipelineExecutableInternalRepresentationsKHR( const PipelineExecutableInfoKHR & executableInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17850,7 +17918,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPipelineExecutablePropertiesKHR( const vk::PipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, vk::PipelineExecutablePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PipelineExecutablePropertiesKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PipelineExecutablePropertiesKHR,Allocator>>::type getPipelineExecutablePropertiesKHR( const PipelineInfoKHR & pipelineInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17859,7 +17927,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPipelineExecutableStatisticsKHR( const vk::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, vk::PipelineExecutableStatisticKHR* pStatistics, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR* pStatistics, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PipelineExecutableStatisticKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PipelineExecutableStatisticKHR,Allocator>>::type getPipelineExecutableStatisticsKHR( const PipelineExecutableInfoKHR & executableInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -17868,316 +17936,356 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getRayTracingShaderGroupHandlesNV( vk::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type getRayTracingShaderGroupHandlesNV( vk::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getRefreshCycleDurationGOOGLE( vk::SwapchainKHR swapchain, vk::RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::RefreshCycleDurationGOOGLE>::type getRefreshCycleDurationGOOGLE( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE>::type getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getRenderAreaGranularity( vk::RenderPass renderPass, vk::Extent2D* pGranularity, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, VULKAN_HPP_NAMESPACE::Extent2D* pGranularity, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::Extent2D getRenderAreaGranularity( vk::RenderPass renderPass, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSemaphoreCounterValueKHR( vk::Semaphore semaphore, uint64_t* pValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t* pValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<uint64_t>::type getSemaphoreCounterValueKHR( vk::Semaphore semaphore, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<uint64_t>::type getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSemaphoreFdKHR( const vk::SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t* pValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<int>::type getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<uint64_t>::type getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<int>::type getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSemaphoreWin32HandleKHR( const vk::SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<HANDLE>::type getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<HANDLE>::type getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSwapchainCounterEXT( vk::SwapchainKHR swapchain, vk::SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<uint64_t>::type getSwapchainCounterEXT( vk::SwapchainKHR swapchain, vk::SurfaceCounterFlagBitsEXT counter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<uint64_t>::type getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSwapchainImagesKHR( vk::SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, vk::Image* pSwapchainImages, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VULKAN_HPP_NAMESPACE::Image* pSwapchainImages, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( vk::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSwapchainStatusKHR( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result importFenceFdKHR( const vk::ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result importFenceWin32HandleKHR( const vk::ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result importSemaphoreFdKHR( const vk::ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result importSemaphoreWin32HandleKHR( const vk::ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result initializePerformanceApiINTEL( const vk::InitializePerformanceApiInfoINTEL* pInitializeInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL* pInitializeInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type initializePerformanceApiINTEL( const InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type initializePerformanceApiINTEL( const InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const vk::MappedMemoryRange* pMemoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange* pMemoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type invalidateMappedMemoryRanges( ArrayProxy<const vk::MappedMemoryRange> memoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type invalidateMappedMemoryRanges( ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> memoryRanges, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result mapMemory( vk::DeviceMemory memory, vk::DeviceSize offset, vk::DeviceSize size, vk::MemoryMapFlags flags, void** ppData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void*>::type mapMemory( vk::DeviceMemory memory, vk::DeviceSize offset, vk::DeviceSize size, vk::MemoryMapFlags flags = MemoryMapFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void*>::type mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags = MemoryMapFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result mergePipelineCaches( vk::PipelineCache dstCache, uint32_t srcCacheCount, const vk::PipelineCache* pSrcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::PipelineCache* pSrcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type mergePipelineCaches( vk::PipelineCache dstCache, ArrayProxy<const vk::PipelineCache> srcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::PipelineCache> srcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result mergeValidationCachesEXT( vk::ValidationCacheEXT dstCache, uint32_t srcCacheCount, const vk::ValidationCacheEXT* pSrcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::ValidationCacheEXT* pSrcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type mergeValidationCachesEXT( vk::ValidationCacheEXT dstCache, ArrayProxy<const vk::ValidationCacheEXT> srcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> srcCaches, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result registerEventEXT( const vk::DeviceEventInfoEXT* pDeviceEventInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Fence>::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type registerEventEXTUnique( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result registerDisplayEventEXT( vk::DisplayKHR display, const vk::DisplayEventInfoEXT* pDisplayEventInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Fence>::type registerDisplayEventEXT( vk::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result registerObjectsNVX( vk::ObjectTableNVX objectTable, uint32_t objectCount, const vk::ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result registerObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, uint32_t objectCount, const VULKAN_HPP_NAMESPACE::ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type registerObjectsNVX( vk::ObjectTableNVX objectTable, ArrayProxy<const vk::ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type registerObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, ArrayProxy<const VULKAN_HPP_NAMESPACE::ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result releaseFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type releaseFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result releasePerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type releasePerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void releaseProfilingLockKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result resetCommandPool( vk::CommandPool commandPool, vk::CommandPoolResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type resetCommandPool( vk::CommandPool commandPool, vk::CommandPoolResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result resetDescriptorPool( vk::DescriptorPool descriptorPool, vk::DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type resetDescriptorPool( vk::DescriptorPool descriptorPool, vk::DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result resetEvent( vk::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type resetEvent( vk::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result resetFences( uint32_t fenceCount, const vk::Fence* pFences, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result resetFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence* pFences, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type resetFences( ArrayProxy<const vk::Fence> fences, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type resetFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> fences, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void resetQueryPoolEXT( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setDebugUtilsObjectNameEXT( const vk::DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setDebugUtilsObjectTagEXT( const vk::DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result setEvent( vk::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type setEvent( vk::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setHdrMetadataEXT( uint32_t swapchainCount, const vk::SwapchainKHR* pSwapchains, const vk::HdrMetadataEXT* pMetadata, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setHdrMetadataEXT( uint32_t swapchainCount, const VULKAN_HPP_NAMESPACE::SwapchainKHR* pSwapchains, const VULKAN_HPP_NAMESPACE::HdrMetadataEXT* pMetadata, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setHdrMetadataEXT( ArrayProxy<const vk::SwapchainKHR> swapchains, ArrayProxy<const vk::HdrMetadataEXT> metadata, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ void setHdrMetadataEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainKHR> swapchains, ArrayProxy<const VULKAN_HPP_NAMESPACE::HdrMetadataEXT> metadata, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void setLocalDimmingAMD( vk::SwapchainKHR swapChain, vk::Bool32 localDimmingEnable, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result signalSemaphoreKHR( const vk::SemaphoreSignalInfoKHR* pSignalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo* pSignalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type signalSemaphoreKHR( const SemaphoreSignalInfoKHR & signalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type signalSemaphore( const SemaphoreSignalInfo & signalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void trimCommandPool( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ Result signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo* pSignalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<void>::type signalSemaphoreKHR( const SemaphoreSignalInfo & signalInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void trimCommandPoolKHR( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void uninitializePerformanceApiINTEL(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void unmapMemory( vk::DeviceMemory memory, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result unregisterObjectsNVX( vk::ObjectTableNVX objectTable, uint32_t objectCount, const vk::ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result unregisterObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, uint32_t objectCount, const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type unregisterObjectsNVX( vk::ObjectTableNVX objectTable, ArrayProxy<const vk::ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type unregisterObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, ArrayProxy<const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateDescriptorSetWithTemplate( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateDescriptorSetWithTemplateKHR( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void updateDescriptorSets( ArrayProxy<const VULKAN_HPP_NAMESPACE::WriteDescriptorSet> descriptorWrites, ArrayProxy<const VULKAN_HPP_NAMESPACE::CopyDescriptorSet> descriptorCopies, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateDescriptorSets( uint32_t descriptorWriteCount, const vk::WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const vk::CopyDescriptorSet* pDescriptorCopies, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void updateDescriptorSets( ArrayProxy<const vk::WriteDescriptorSet> descriptorWrites, ArrayProxy<const vk::CopyDescriptorSet> descriptorCopies, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ Result waitForFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitForFences( uint32_t fenceCount, const vk::Fence* pFences, vk::Bool32 waitAll, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo* pWaitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitForFences( ArrayProxy<const vk::Fence> fences, vk::Bool32 waitAll, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitSemaphores( const SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitSemaphoresKHR( const vk::SemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo* pWaitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result waitSemaphoresKHR( const SemaphoreWaitInfoKHR & waitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result waitSemaphoresKHR( const SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const VULKAN_HPP_NOEXCEPT
@@ -18337,18 +18445,18 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result acquireXlibDisplayEXT( Display* dpy, vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result acquireXlibDisplayEXT( Display* dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<Display>::type acquireXlibDisplayEXT( vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<Display>::type acquireXlibDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDevice( const vk::DeviceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Device* pDevice, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Device>::type createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Device>::type createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Device,Dispatch>>::type createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18356,14 +18464,14 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDisplayModeKHR( vk::DisplayKHR display, const vk::DisplayModeCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DisplayModeKHR* pMode, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DisplayModeKHR>::type createDisplayModeKHR( vk::DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayModeKHR>::type createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, vk::ExtensionProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18372,7 +18480,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, vk::LayerProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<LayerProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18381,39 +18489,48 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayModeProperties2KHR( vk::DisplayKHR display, uint32_t* pPropertyCount, vk::DisplayModeProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Allocator = std::allocator<PerformanceCounterDescriptionKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR,Allocator>>::type enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> counters, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ template<typename Allocator = std::allocator<PerformanceCounterDescriptionKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR,Allocator>>::type enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> counters, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayModeProperties2KHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<DisplayModeProperties2KHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( vk::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayModePropertiesKHR( vk::DisplayKHR display, uint32_t* pPropertyCount, vk::DisplayModePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayModePropertiesKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<DisplayModePropertiesKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( vk::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPlaneCapabilities2KHR( const vk::DisplayPlaneInfo2KHR* pDisplayPlaneInfo, vk::DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR* pDisplayPlaneInfo, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DisplayPlaneCapabilities2KHR>::type getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR>::type getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPlaneCapabilitiesKHR( vk::DisplayModeKHR mode, uint32_t planeIndex, vk::DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DisplayPlaneCapabilitiesKHR>::type getDisplayPlaneCapabilitiesKHR( vk::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR>::type getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, vk::DisplayKHR* pDisplays, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, VULKAN_HPP_NAMESPACE::DisplayKHR* pDisplays, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18422,7 +18539,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, vk::TimeDomainEXT* pTimeDomains, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainEXT* pTimeDomains, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<TimeDomainEXT>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<TimeDomainEXT,Allocator>>::type getCalibrateableTimeDomainsEXT(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18431,7 +18548,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, vk::CooperativeMatrixPropertiesNV* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<CooperativeMatrixPropertiesNV>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<CooperativeMatrixPropertiesNV,Allocator>>::type getCooperativeMatrixPropertiesNV(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18440,7 +18557,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, vk::DisplayPlaneProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayPlaneProperties2KHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DisplayPlaneProperties2KHR,Allocator>>::type getDisplayPlaneProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18449,7 +18566,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, vk::DisplayPlanePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayPlanePropertiesKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18458,7 +18575,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayProperties2KHR( uint32_t* pPropertyCount, vk::DisplayProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayProperties2KHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayProperties2KHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayProperties2KHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DisplayProperties2KHR,Allocator>>::type getDisplayProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18467,7 +18584,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, vk::DisplayPropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<DisplayPropertiesKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18476,204 +18593,211 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalBufferProperties( const vk::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, vk::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalBufferProperties getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalBufferPropertiesKHR( const vk::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, vk::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalBufferProperties getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalFenceProperties( const vk::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, vk::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalFenceProperties getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalFencePropertiesKHR( const vk::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, vk::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalFenceProperties getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getExternalImageFormatPropertiesNV( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ExternalMemoryHandleTypeFlagsNV externalHandleType, vk::ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ExternalImageFormatPropertiesNV>::type getExternalImageFormatPropertiesNV( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV>::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_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalSemaphoreProperties( const vk::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, vk::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalSemaphoreProperties getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getExternalSemaphorePropertiesKHR( const vk::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, vk::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::ExternalSemaphoreProperties getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFeatures( vk::PhysicalDeviceFeatures* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceFeatures getFeatures(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFeatures2( vk::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceFeatures2 getFeatures2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getFeatures2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFeatures2KHR( vk::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceFeatures2 getFeatures2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getFeatures2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFormatProperties( vk::Format format, vk::FormatProperties* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::FormatProperties getFormatProperties( vk::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::FormatProperties getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFormatProperties2( vk::Format format, vk::FormatProperties2* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::FormatProperties2 getFormatProperties2( vk::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- StructureChain<X, Y, Z...> getFormatProperties2( vk::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ StructureChain<X, Y, Z...> getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getFormatProperties2KHR( vk::Format format, vk::FormatProperties2* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2* pFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::FormatProperties2 getFormatProperties2KHR( vk::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- StructureChain<X, Y, Z...> getFormatProperties2KHR( vk::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ StructureChain<X, Y, Z...> getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getGeneratedCommandsPropertiesNVX( vk::DeviceGeneratedCommandsFeaturesNVX* pFeatures, vk::DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getGeneratedCommandsPropertiesNVX( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX* pFeatures, VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getImageFormatProperties( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ImageFormatProperties* pImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ImageFormatProperties>::type getImageFormatProperties( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties>::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, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getImageFormatProperties2( const vk::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, vk::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ImageFormatProperties2>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<StructureChain<X, Y, Z...>>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getImageFormatProperties2KHR( const vk::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, vk::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::ImageFormatProperties2>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<StructureChain<X, Y, Z...>>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getMemoryProperties( vk::PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceMemoryProperties getMemoryProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getMemoryProperties2( vk::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceMemoryProperties2 getMemoryProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getMemoryProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getMemoryProperties2KHR( vk::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getMemoryProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getMultisamplePropertiesEXT( vk::SampleCountFlagBits samples, vk::MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::MultisamplePropertiesEXT getMultisamplePropertiesEXT( vk::SampleCountFlagBits samples, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getPresentRectanglesKHR( vk::SurfaceKHR surface, uint32_t* pRectCount, vk::Rect2D* pRects, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t* pRectCount, VULKAN_HPP_NAMESPACE::Rect2D* pRects, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<Rect2D>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<Rect2D>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getProperties( vk::PhysicalDeviceProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceProperties getProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties getProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getProperties2( vk::PhysicalDeviceProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceProperties2 getProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getProperties2KHR( vk::PhysicalDeviceProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- vk::PhysicalDeviceProperties2 getProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
StructureChain<X, Y, Z...> getProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ uint32_t getQueueFamilyPerformanceQueryPassesKHR( const QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<QueueFamilyProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18682,7 +18806,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18695,7 +18819,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2KHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18708,16 +18832,16 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, uint32_t* pPropertyCount, vk::SparseImageFormatProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageFormatProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ std::vector<SparseImageFormatProperties,Allocator> 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 ) const;
template<typename Allocator = std::allocator<SparseImageFormatProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ std::vector<SparseImageFormatProperties,Allocator> 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, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getSparseImageFormatProperties2( const vk::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, vk::SparseImageFormatProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18726,7 +18850,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void getSparseImageFormatProperties2KHR( const vk::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, vk::SparseImageFormatProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18735,7 +18859,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t* pCombinationCount, vk::FramebufferMixedSamplesCombinationNV* pCombinations, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t* pCombinationCount, VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV* pCombinations, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<FramebufferMixedSamplesCombinationNV>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<FramebufferMixedSamplesCombinationNV,Allocator>>::type getSupportedFramebufferMixedSamplesCombinationsNV(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18744,30 +18868,30 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceCapabilities2EXT( vk::SurfaceKHR surface, vk::SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceCapabilities2KHR( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, vk::SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceCapabilities2KHR>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename X, typename Y, typename ...Z, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<StructureChain<X, Y, Z...>>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceCapabilitiesKHR( vk::SurfaceKHR surface, vk::SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceCapabilitiesKHR>::type getSurfaceCapabilitiesKHR( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR>::type getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceFormats2KHR( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, vk::SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SurfaceFormat2KHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18776,17 +18900,17 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceFormatsKHR( vk::SurfaceKHR surface, uint32_t* pSurfaceFormatCount, vk::SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t* pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<SurfaceFormatKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<SurfaceFormatKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfacePresentModes2EXT( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, vk::PresentModeKHR* pPresentModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR* pPresentModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PresentModeKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18796,19 +18920,28 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfacePresentModesKHR( vk::SurfaceKHR surface, uint32_t* pPresentModeCount, vk::PresentModeKHR* pPresentModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t* pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR* pPresentModes, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PresentModeKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
template<typename Allocator = std::allocator<PresentModeKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, vk::SurfaceKHR surface, vk::Bool32* pSupported, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::Bool32* pSupported, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Bool32>::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, vk::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Bool32>::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ Result getToolPropertiesEXT( uint32_t* pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT* pToolProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Allocator = std::allocator<PhysicalDeviceToolPropertiesEXT>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<std::vector<PhysicalDeviceToolPropertiesEXT,Allocator>>::type getToolPropertiesEXT(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ template<typename Allocator = std::allocator<PhysicalDeviceToolPropertiesEXT>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<std::vector<PhysicalDeviceToolPropertiesEXT,Allocator>>::type getToolPropertiesEXT(Allocator const& vectorAllocator, Dispatch const &d ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
@@ -18845,19 +18978,19 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, vk::DisplayKHR* pDisplay, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, VULKAN_HPP_NAMESPACE::DisplayKHR* pDisplay, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DisplayKHR>::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayKHR>::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result releaseDisplayEXT( vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#else
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<void>::type releaseDisplayEXT( vk::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<void>::type releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPhysicalDevice() const VULKAN_HPP_NOEXCEPT
@@ -18947,10 +19080,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createAndroidSurfaceKHR( const vk::AndroidSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18959,10 +19092,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDebugReportCallbackEXT( const vk::DebugReportCallbackCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DebugReportCallbackEXT* pCallback, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DebugReportCallbackEXT>::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT>::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DebugReportCallbackEXT,Dispatch>>::type createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18970,10 +19103,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDebugUtilsMessengerEXT( const vk::DebugUtilsMessengerCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DebugUtilsMessengerEXT* pMessenger, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::DebugUtilsMessengerEXT>::type createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT>::type createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<DebugUtilsMessengerEXT,Dispatch>>::type createDebugUtilsMessengerEXTUnique( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18981,10 +19114,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createDisplayPlaneSurfaceKHR( const vk::DisplaySurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -18992,10 +19125,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createHeadlessSurfaceEXT( const vk::HeadlessSurfaceCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createHeadlessSurfaceEXT( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createHeadlessSurfaceEXT( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createHeadlessSurfaceEXTUnique( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19004,10 +19137,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_IOS_MVK
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createIOSSurfaceMVK( const vk::IOSSurfaceCreateInfoMVK* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19017,10 +19150,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_FUCHSIA
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createImagePipeSurfaceFUCHSIA( const vk::ImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createImagePipeSurfaceFUCHSIAUnique( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19030,10 +19163,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_MACOS_MVK
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createMacOSSurfaceMVK( const vk::MacOSSurfaceCreateInfoMVK* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19043,10 +19176,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_METAL_EXT
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createMetalSurfaceEXT( const vk::MetalSurfaceCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createMetalSurfaceEXT( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createMetalSurfaceEXT( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createMetalSurfaceEXTUnique( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19056,10 +19189,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_GGP
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createStreamDescriptorSurfaceGGP( const vk::StreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createStreamDescriptorSurfaceGGP( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createStreamDescriptorSurfaceGGP( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createStreamDescriptorSurfaceGGPUnique( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19069,10 +19202,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_VI_NN
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createViSurfaceNN( const vk::ViSurfaceCreateInfoNN* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19082,10 +19215,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createWaylandSurfaceKHR( const vk::WaylandSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19095,10 +19228,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createWin32SurfaceKHR( const vk::Win32SurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19108,10 +19241,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XCB_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createXcbSurfaceKHR( const vk::XcbSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19121,10 +19254,10 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_KHR
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createXlibSurfaceKHR( const vk::XlibSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::SurfaceKHR>::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19133,63 +19266,63 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_XLIB_KHR*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void debugReportMessageEXT( vk::DebugReportFlagsEXT flags, vk::DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void debugReportMessageEXT( vk::DebugReportFlagsEXT flags, vk::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 ) const;
+ 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 ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDebugReportCallbackEXT( vk::DebugReportCallbackEXT callback, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDebugReportCallbackEXT( vk::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DebugReportCallbackEXT callback, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDebugUtilsMessengerEXT( vk::DebugUtilsMessengerEXT messenger, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroyDebugUtilsMessengerEXT( vk::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DebugUtilsMessengerEXT messenger, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void destroy( Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySurfaceKHR( vk::SurfaceKHR surface, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroySurfaceKHR( vk::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SurfaceKHR surface, const vk::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void destroy( vk::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, vk::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroups(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19198,7 +19331,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, vk::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroupsKHR(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19207,7 +19340,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, vk::PhysicalDevice* pPhysicalDevices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
+ Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, VULKAN_HPP_NAMESPACE::PhysicalDevice* pPhysicalDevices, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<PhysicalDevice>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const;
@@ -19223,10 +19356,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void submitDebugUtilsMessageEXT( vk::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, vk::DebugUtilsMessageTypeFlagsEXT messageTypes, const vk::DebugUtilsMessengerCallbackDataEXT* pCallbackData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ 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 ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- void submitDebugUtilsMessageEXT( vk::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, vk::DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
+ void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkInstance() const VULKAN_HPP_NOEXCEPT
@@ -19261,10 +19394,10 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result createInstance( const vk::InstanceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Instance* pInstance, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+ 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 ) VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<vk::Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<UniqueHandle<Instance,Dispatch>>::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
@@ -19272,7 +19405,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, vk::ExtensionProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+ Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
@@ -19281,7 +19414,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, vk::LayerProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+ Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties* pProperties, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator = std::allocator<LayerProperties>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
@@ -19290,93 +19423,52 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+ Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+ typename ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d = VULKAN_HPP_DEFAULT_DISPATCHER );
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ struct GeometryTrianglesNV
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : vertexData( vertexData_ )
+ , vertexOffset( vertexOffset_ )
+ , vertexCount( vertexCount_ )
+ , vertexStride( vertexStride_ )
+ , vertexFormat( vertexFormat_ )
+ , indexData( indexData_ )
+ , indexOffset( indexOffset_ )
+ , indexCount( indexCount_ )
+ , indexType( indexType_ )
+ , transformData( transformData_ )
+ , transformOffset( transformOffset_ )
+ {}
- namespace layout
- {
- struct GeometryTrianglesNV
+ VULKAN_HPP_NAMESPACE::GeometryTrianglesNV & operator=( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( vk::Buffer vertexData_ = vk::Buffer(),
- vk::DeviceSize vertexOffset_ = 0,
- uint32_t vertexCount_ = 0,
- vk::DeviceSize vertexStride_ = 0,
- vk::Format vertexFormat_ = vk::Format::eUndefined,
- vk::Buffer indexData_ = vk::Buffer(),
- vk::DeviceSize indexOffset_ = 0,
- uint32_t indexCount_ = 0,
- vk::IndexType indexType_ = vk::IndexType::eUint16,
- vk::Buffer transformData_ = vk::Buffer(),
- vk::DeviceSize transformOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : vertexData( vertexData_ )
- , vertexOffset( vertexOffset_ )
- , vertexCount( vertexCount_ )
- , vertexStride( vertexStride_ )
- , vertexFormat( vertexFormat_ )
- , indexData( indexData_ )
- , indexOffset( indexOffset_ )
- , indexCount( indexCount_ )
- , indexType( indexType_ )
- , transformData( transformData_ )
- , transformOffset( transformOffset_ )
- {}
-
- GeometryTrianglesNV( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryTrianglesNV*>(this) = rhs;
- }
-
- GeometryTrianglesNV& operator=( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryTrianglesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eGeometryTrianglesNV;
- const void* pNext = nullptr;
- vk::Buffer vertexData;
- vk::DeviceSize vertexOffset;
- uint32_t vertexCount;
- vk::DeviceSize vertexStride;
- vk::Format vertexFormat;
- vk::Buffer indexData;
- vk::DeviceSize indexOffset;
- uint32_t indexCount;
- vk::IndexType indexType;
- vk::Buffer transformData;
- vk::DeviceSize transformOffset;
- };
- static_assert( sizeof( GeometryTrianglesNV ) == sizeof( VkGeometryTrianglesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct GeometryTrianglesNV : public layout::GeometryTrianglesNV
- {
- VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( vk::Buffer vertexData_ = vk::Buffer(),
- vk::DeviceSize vertexOffset_ = 0,
- uint32_t vertexCount_ = 0,
- vk::DeviceSize vertexStride_ = 0,
- vk::Format vertexFormat_ = vk::Format::eUndefined,
- vk::Buffer indexData_ = vk::Buffer(),
- vk::DeviceSize indexOffset_ = 0,
- uint32_t indexCount_ = 0,
- vk::IndexType indexType_ = vk::IndexType::eUint16,
- vk::Buffer transformData_ = vk::Buffer(),
- vk::DeviceSize transformOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryTrianglesNV( vertexData_, vertexOffset_, vertexCount_, vertexStride_, vertexFormat_, indexData_, indexOffset_, indexCount_, indexType_, transformData_, transformOffset_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV ) - offsetof( GeometryTrianglesNV, pNext ) );
+ return *this;
+ }
GeometryTrianglesNV( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryTrianglesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
GeometryTrianglesNV& operator=( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::GeometryTrianglesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const *>(&rhs);
return *this;
}
@@ -19386,13 +19478,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryTrianglesNV & setVertexData( vk::Buffer vertexData_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setVertexData( VULKAN_HPP_NAMESPACE::Buffer vertexData_ ) VULKAN_HPP_NOEXCEPT
{
vertexData = vertexData_;
return *this;
}
- GeometryTrianglesNV & setVertexOffset( vk::DeviceSize vertexOffset_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setVertexOffset( VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset_ ) VULKAN_HPP_NOEXCEPT
{
vertexOffset = vertexOffset_;
return *this;
@@ -19404,25 +19496,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryTrianglesNV & setVertexStride( vk::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT
{
vertexStride = vertexStride_;
return *this;
}
- GeometryTrianglesNV & setVertexFormat( vk::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT
{
vertexFormat = vertexFormat_;
return *this;
}
- GeometryTrianglesNV & setIndexData( vk::Buffer indexData_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setIndexData( VULKAN_HPP_NAMESPACE::Buffer indexData_ ) VULKAN_HPP_NOEXCEPT
{
indexData = indexData_;
return *this;
}
- GeometryTrianglesNV & setIndexOffset( vk::DeviceSize indexOffset_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize indexOffset_ ) VULKAN_HPP_NOEXCEPT
{
indexOffset = indexOffset_;
return *this;
@@ -19434,19 +19526,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryTrianglesNV & setIndexType( vk::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT
{
indexType = indexType_;
return *this;
}
- GeometryTrianglesNV & setTransformData( vk::Buffer transformData_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setTransformData( VULKAN_HPP_NAMESPACE::Buffer transformData_ ) VULKAN_HPP_NOEXCEPT
{
transformData = transformData_;
return *this;
}
- GeometryTrianglesNV & setTransformOffset( vk::DeviceSize transformOffset_ ) VULKAN_HPP_NOEXCEPT
+ GeometryTrianglesNV & setTransformOffset( VULKAN_HPP_NAMESPACE::DeviceSize transformOffset_ ) VULKAN_HPP_NOEXCEPT
{
transformOffset = transformOffset_;
return *this;
@@ -19484,65 +19576,50 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::GeometryTrianglesNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( GeometryTrianglesNV ) == sizeof( VkGeometryTrianglesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<GeometryTrianglesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct GeometryAABBNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR GeometryAABBNV( vk::Buffer aabbData_ = vk::Buffer(),
- uint32_t numAABBs_ = 0,
- uint32_t stride_ = 0,
- vk::DeviceSize offset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : aabbData( aabbData_ )
- , numAABBs( numAABBs_ )
- , stride( stride_ )
- , offset( offset_ )
- {}
-
- GeometryAABBNV( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryAABBNV*>(this) = rhs;
- }
-
- GeometryAABBNV& operator=( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryAABBNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eGeometryAabbNV;
- const void* pNext = nullptr;
- vk::Buffer aabbData;
- uint32_t numAABBs;
- uint32_t stride;
- vk::DeviceSize offset;
- };
- static_assert( sizeof( GeometryAABBNV ) == sizeof( VkGeometryAABBNV ), "layout struct and wrapper have different size!" );
- }
-
- struct GeometryAABBNV : public layout::GeometryAABBNV
+ struct GeometryAABBNV
{
- VULKAN_HPP_CONSTEXPR GeometryAABBNV( vk::Buffer aabbData_ = vk::Buffer(),
- uint32_t numAABBs_ = 0,
- uint32_t stride_ = 0,
- vk::DeviceSize offset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryAABBNV( aabbData_, numAABBs_, stride_, offset_ )
+ VULKAN_HPP_CONSTEXPR GeometryAABBNV( VULKAN_HPP_NAMESPACE::Buffer aabbData_ = {},
+ uint32_t numAABBs_ = {},
+ uint32_t stride_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {} ) VULKAN_HPP_NOEXCEPT
+ : aabbData( aabbData_ )
+ , numAABBs( numAABBs_ )
+ , stride( stride_ )
+ , offset( offset_ )
{}
+ VULKAN_HPP_NAMESPACE::GeometryAABBNV & operator=( VULKAN_HPP_NAMESPACE::GeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::GeometryAABBNV ) - offsetof( GeometryAABBNV, pNext ) );
+ return *this;
+ }
+
GeometryAABBNV( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryAABBNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
GeometryAABBNV& operator=( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::GeometryAABBNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::GeometryAABBNV const *>(&rhs);
return *this;
}
@@ -19552,7 +19629,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryAABBNV & setAabbData( vk::Buffer aabbData_ ) VULKAN_HPP_NOEXCEPT
+ GeometryAABBNV & setAabbData( VULKAN_HPP_NAMESPACE::Buffer aabbData_ ) VULKAN_HPP_NOEXCEPT
{
aabbData = aabbData_;
return *this;
@@ -19570,7 +19647,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryAABBNV & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ GeometryAABBNV & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
@@ -19601,38 +19678,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::GeometryAABBNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( GeometryAABBNV ) == sizeof( VkGeometryAABBNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<GeometryAABBNV>::value, "struct wrapper is not a standard layout!" );
struct GeometryDataNV
{
- VULKAN_HPP_CONSTEXPR GeometryDataNV( vk::GeometryTrianglesNV triangles_ = vk::GeometryTrianglesNV(),
- vk::GeometryAABBNV aabbs_ = vk::GeometryAABBNV() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR GeometryDataNV( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles_ = {},
+ VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs_ = {} ) VULKAN_HPP_NOEXCEPT
: triangles( triangles_ )
, aabbs( aabbs_ )
{}
GeometryDataNV( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkGeometryDataNV*>(this) = rhs;
+ *this = rhs;
}
GeometryDataNV& operator=( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkGeometryDataNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::GeometryDataNV const *>(&rhs);
return *this;
}
- GeometryDataNV & setTriangles( vk::GeometryTrianglesNV triangles_ ) VULKAN_HPP_NOEXCEPT
+ GeometryDataNV & setTriangles( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles_ ) VULKAN_HPP_NOEXCEPT
{
triangles = triangles_;
return *this;
}
- GeometryDataNV & setAabbs( vk::GeometryAABBNV aabbs_ ) VULKAN_HPP_NOEXCEPT
+ GeometryDataNV & setAabbs( VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs_ ) VULKAN_HPP_NOEXCEPT
{
aabbs = aabbs_;
return *this;
@@ -19660,61 +19742,36 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::GeometryTrianglesNV triangles;
- vk::GeometryAABBNV aabbs;
+ VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles = {};
+ VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs = {};
};
static_assert( sizeof( GeometryDataNV ) == sizeof( VkGeometryDataNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<GeometryDataNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct GeometryNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR GeometryNV( vk::GeometryTypeNV geometryType_ = vk::GeometryTypeNV::eTriangles,
- vk::GeometryDataNV geometry_ = vk::GeometryDataNV(),
- vk::GeometryFlagsNV flags_ = vk::GeometryFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : geometryType( geometryType_ )
- , geometry( geometry_ )
- , flags( flags_ )
- {}
-
- GeometryNV( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryNV*>(this) = rhs;
- }
-
- GeometryNV& operator=( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGeometryNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eGeometryNV;
- const void* pNext = nullptr;
- vk::GeometryTypeNV geometryType;
- vk::GeometryDataNV geometry;
- vk::GeometryFlagsNV flags;
- };
- static_assert( sizeof( GeometryNV ) == sizeof( VkGeometryNV ), "layout struct and wrapper have different size!" );
- }
-
- struct GeometryNV : public layout::GeometryNV
+ struct GeometryNV
{
- VULKAN_HPP_CONSTEXPR GeometryNV( vk::GeometryTypeNV geometryType_ = vk::GeometryTypeNV::eTriangles,
- vk::GeometryDataNV geometry_ = vk::GeometryDataNV(),
- vk::GeometryFlagsNV flags_ = vk::GeometryFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryNV( geometryType_, geometry_, flags_ )
+ VULKAN_HPP_CONSTEXPR GeometryNV( VULKAN_HPP_NAMESPACE::GeometryTypeNV geometryType_ = VULKAN_HPP_NAMESPACE::GeometryTypeNV::eTriangles,
+ VULKAN_HPP_NAMESPACE::GeometryDataNV geometry_ = {},
+ VULKAN_HPP_NAMESPACE::GeometryFlagsNV flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : geometryType( geometryType_ )
+ , geometry( geometry_ )
+ , flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::GeometryNV & operator=( VULKAN_HPP_NAMESPACE::GeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::GeometryNV ) - offsetof( GeometryNV, pNext ) );
+ return *this;
+ }
+
GeometryNV( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::GeometryNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
GeometryNV& operator=( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::GeometryNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::GeometryNV const *>(&rhs);
return *this;
}
@@ -19724,19 +19781,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GeometryNV & setGeometryType( vk::GeometryTypeNV geometryType_ ) VULKAN_HPP_NOEXCEPT
+ GeometryNV & setGeometryType( VULKAN_HPP_NAMESPACE::GeometryTypeNV geometryType_ ) VULKAN_HPP_NOEXCEPT
{
geometryType = geometryType_;
return *this;
}
- GeometryNV & setGeometry( vk::GeometryDataNV geometry_ ) VULKAN_HPP_NOEXCEPT
+ GeometryNV & setGeometry( VULKAN_HPP_NAMESPACE::GeometryDataNV geometry_ ) VULKAN_HPP_NOEXCEPT
{
geometry = geometry_;
return *this;
}
- GeometryNV & setFlags( vk::GeometryFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ GeometryNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -19766,69 +19823,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::GeometryNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::GeometryTypeNV geometryType = VULKAN_HPP_NAMESPACE::GeometryTypeNV::eTriangles;
+ VULKAN_HPP_NAMESPACE::GeometryDataNV geometry = {};
+ VULKAN_HPP_NAMESPACE::GeometryFlagsNV flags = {};
};
static_assert( sizeof( GeometryNV ) == sizeof( VkGeometryNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<GeometryNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct AccelerationStructureInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( vk::AccelerationStructureTypeNV type_ = vk::AccelerationStructureTypeNV::eTopLevel,
- vk::BuildAccelerationStructureFlagsNV flags_ = vk::BuildAccelerationStructureFlagsNV(),
- uint32_t instanceCount_ = 0,
- uint32_t geometryCount_ = 0,
- const vk::GeometryNV* pGeometries_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : type( type_ )
- , flags( flags_ )
- , instanceCount( instanceCount_ )
- , geometryCount( geometryCount_ )
- , pGeometries( pGeometries_ )
- {}
-
- AccelerationStructureInfoNV( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureInfoNV*>(this) = rhs;
- }
-
- AccelerationStructureInfoNV& operator=( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAccelerationStructureInfoNV;
- const void* pNext = nullptr;
- vk::AccelerationStructureTypeNV type;
- vk::BuildAccelerationStructureFlagsNV flags;
- uint32_t instanceCount;
- uint32_t geometryCount;
- const vk::GeometryNV* pGeometries;
- };
- static_assert( sizeof( AccelerationStructureInfoNV ) == sizeof( VkAccelerationStructureInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct AccelerationStructureInfoNV : public layout::AccelerationStructureInfoNV
+ struct AccelerationStructureInfoNV
{
- VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( vk::AccelerationStructureTypeNV type_ = vk::AccelerationStructureTypeNV::eTopLevel,
- vk::BuildAccelerationStructureFlagsNV flags_ = vk::BuildAccelerationStructureFlagsNV(),
- uint32_t instanceCount_ = 0,
- uint32_t geometryCount_ = 0,
- const vk::GeometryNV* pGeometries_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureInfoNV( type_, flags_, instanceCount_, geometryCount_, pGeometries_ )
+ VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV::eTopLevel,
+ VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ = {},
+ uint32_t instanceCount_ = {},
+ uint32_t geometryCount_ = {},
+ const VULKAN_HPP_NAMESPACE::GeometryNV* pGeometries_ = {} ) VULKAN_HPP_NOEXCEPT
+ : type( type_ )
+ , flags( flags_ )
+ , instanceCount( instanceCount_ )
+ , geometryCount( geometryCount_ )
+ , pGeometries( pGeometries_ )
{}
+ VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & operator=( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV ) - offsetof( AccelerationStructureInfoNV, pNext ) );
+ return *this;
+ }
+
AccelerationStructureInfoNV( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
AccelerationStructureInfoNV& operator=( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AccelerationStructureInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const *>(&rhs);
return *this;
}
@@ -19838,13 +19870,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AccelerationStructureInfoNV & setType( vk::AccelerationStructureTypeNV type_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureInfoNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- AccelerationStructureInfoNV & setFlags( vk::BuildAccelerationStructureFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureInfoNV & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -19862,7 +19894,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AccelerationStructureInfoNV & setPGeometries( const vk::GeometryNV* pGeometries_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureInfoNV & setPGeometries( const VULKAN_HPP_NAMESPACE::GeometryNV* pGeometries_ ) VULKAN_HPP_NOEXCEPT
{
pGeometries = pGeometries_;
return *this;
@@ -19894,57 +19926,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AccelerationStructureInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV::eTopLevel;
+ VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags = {};
+ uint32_t instanceCount = {};
+ uint32_t geometryCount = {};
+ const VULKAN_HPP_NAMESPACE::GeometryNV* pGeometries = {};
};
static_assert( sizeof( AccelerationStructureInfoNV ) == sizeof( VkAccelerationStructureInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AccelerationStructureInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct AccelerationStructureCreateInfoNV
{
- struct AccelerationStructureCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( vk::DeviceSize compactedSize_ = 0,
- vk::AccelerationStructureInfoNV info_ = vk::AccelerationStructureInfoNV() ) VULKAN_HPP_NOEXCEPT
- : compactedSize( compactedSize_ )
- , info( info_ )
- {}
-
- AccelerationStructureCreateInfoNV( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureCreateInfoNV*>(this) = rhs;
- }
-
- AccelerationStructureCreateInfoNV& operator=( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAccelerationStructureCreateInfoNV;
- const void* pNext = nullptr;
- vk::DeviceSize compactedSize;
- vk::AccelerationStructureInfoNV info;
- };
- static_assert( sizeof( AccelerationStructureCreateInfoNV ) == sizeof( VkAccelerationStructureCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct AccelerationStructureCreateInfoNV : public layout::AccelerationStructureCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( vk::DeviceSize compactedSize_ = 0,
- vk::AccelerationStructureInfoNV info_ = vk::AccelerationStructureInfoNV() ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureCreateInfoNV( compactedSize_, info_ )
+ VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ = {},
+ VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info_ = {} ) VULKAN_HPP_NOEXCEPT
+ : compactedSize( compactedSize_ )
+ , info( info_ )
{}
+ VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV ) - offsetof( AccelerationStructureCreateInfoNV, pNext ) );
+ return *this;
+ }
+
AccelerationStructureCreateInfoNV( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
AccelerationStructureCreateInfoNV& operator=( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AccelerationStructureCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const *>(&rhs);
return *this;
}
@@ -19954,13 +19969,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AccelerationStructureCreateInfoNV & setCompactedSize( vk::DeviceSize compactedSize_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureCreateInfoNV & setCompactedSize( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ ) VULKAN_HPP_NOEXCEPT
{
compactedSize = compactedSize_;
return *this;
}
- AccelerationStructureCreateInfoNV & setInfo( vk::AccelerationStructureInfoNV info_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureCreateInfoNV & setInfo( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info_ ) VULKAN_HPP_NOEXCEPT
{
info = info_;
return *this;
@@ -19989,57 +20004,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AccelerationStructureCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize compactedSize = {};
+ VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info = {};
};
static_assert( sizeof( AccelerationStructureCreateInfoNV ) == sizeof( VkAccelerationStructureCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AccelerationStructureCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct AccelerationStructureMemoryRequirementsInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( vk::AccelerationStructureMemoryRequirementsTypeNV type_ = vk::AccelerationStructureMemoryRequirementsTypeNV::eObject,
- vk::AccelerationStructureNV accelerationStructure_ = vk::AccelerationStructureNV() ) VULKAN_HPP_NOEXCEPT
- : type( type_ )
- , accelerationStructure( accelerationStructure_ )
- {}
-
- AccelerationStructureMemoryRequirementsInfoNV( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureMemoryRequirementsInfoNV*>(this) = rhs;
- }
-
- AccelerationStructureMemoryRequirementsInfoNV& operator=( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAccelerationStructureMemoryRequirementsInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV;
- const void* pNext = nullptr;
- vk::AccelerationStructureMemoryRequirementsTypeNV type;
- vk::AccelerationStructureNV accelerationStructure;
- };
- static_assert( sizeof( AccelerationStructureMemoryRequirementsInfoNV ) == sizeof( VkAccelerationStructureMemoryRequirementsInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct AccelerationStructureMemoryRequirementsInfoNV : public layout::AccelerationStructureMemoryRequirementsInfoNV
+ struct AccelerationStructureMemoryRequirementsInfoNV
{
- VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( vk::AccelerationStructureMemoryRequirementsTypeNV type_ = vk::AccelerationStructureMemoryRequirementsTypeNV::eObject,
- vk::AccelerationStructureNV accelerationStructure_ = vk::AccelerationStructureNV() ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureMemoryRequirementsInfoNV( type_, accelerationStructure_ )
+ VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV::eObject,
+ VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ = {} ) VULKAN_HPP_NOEXCEPT
+ : type( type_ )
+ , accelerationStructure( accelerationStructure_ )
{}
+ VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & operator=( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV ) - offsetof( AccelerationStructureMemoryRequirementsInfoNV, pNext ) );
+ return *this;
+ }
+
AccelerationStructureMemoryRequirementsInfoNV( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AccelerationStructureMemoryRequirementsInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
AccelerationStructureMemoryRequirementsInfoNV& operator=( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AccelerationStructureMemoryRequirementsInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV const *>(&rhs);
return *this;
}
@@ -20049,13 +20044,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AccelerationStructureMemoryRequirementsInfoNV & setType( vk::AccelerationStructureMemoryRequirementsTypeNV type_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureMemoryRequirementsInfoNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- AccelerationStructureMemoryRequirementsInfoNV & setAccelerationStructure( vk::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT
+ AccelerationStructureMemoryRequirementsInfoNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT
{
accelerationStructure = accelerationStructure_;
return *this;
@@ -20084,69 +20079,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AccelerationStructureMemoryRequirementsInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( AccelerationStructureMemoryRequirementsInfoNV ) == sizeof( VkAccelerationStructureMemoryRequirementsInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AccelerationStructureMemoryRequirementsInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct AcquireNextImageInfoKHR
{
- struct AcquireNextImageInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR(),
- uint64_t timeout_ = 0,
- vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::Fence fence_ = vk::Fence(),
- uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : swapchain( swapchain_ )
- , timeout( timeout_ )
- , semaphore( semaphore_ )
- , fence( fence_ )
- , deviceMask( deviceMask_ )
- {}
-
- AcquireNextImageInfoKHR( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAcquireNextImageInfoKHR*>(this) = rhs;
- }
-
- AcquireNextImageInfoKHR& operator=( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAcquireNextImageInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAcquireNextImageInfoKHR;
- const void* pNext = nullptr;
- vk::SwapchainKHR swapchain;
- uint64_t timeout;
- vk::Semaphore semaphore;
- vk::Fence fence;
- uint32_t deviceMask;
- };
- static_assert( sizeof( AcquireNextImageInfoKHR ) == sizeof( VkAcquireNextImageInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AcquireNextImageInfoKHR : public layout::AcquireNextImageInfoKHR
- {
- VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR(),
- uint64_t timeout_ = 0,
- vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::Fence fence_ = vk::Fence(),
- uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::AcquireNextImageInfoKHR( swapchain_, timeout_, semaphore_, fence_, deviceMask_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchain( swapchain_ )
+ , timeout( timeout_ )
+ , semaphore( semaphore_ )
+ , fence( fence_ )
+ , deviceMask( deviceMask_ )
{}
+ VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & operator=( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR ) - offsetof( AcquireNextImageInfoKHR, pNext ) );
+ return *this;
+ }
+
AcquireNextImageInfoKHR( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AcquireNextImageInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
AcquireNextImageInfoKHR& operator=( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AcquireNextImageInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR const *>(&rhs);
return *this;
}
@@ -20156,7 +20125,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AcquireNextImageInfoKHR & setSwapchain( vk::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
+ AcquireNextImageInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
{
swapchain = swapchain_;
return *this;
@@ -20168,13 +20137,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AcquireNextImageInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ AcquireNextImageInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- AcquireNextImageInfoKHR & setFence( vk::Fence fence_ ) VULKAN_HPP_NOEXCEPT
+ AcquireNextImageInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT
{
fence = fence_;
return *this;
@@ -20212,20 +20181,101 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AcquireNextImageInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( AcquireNextImageInfoKHR ) == sizeof( VkAcquireNextImageInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AcquireNextImageInfoKHR>::value, "struct wrapper is not a standard layout!" );
+ struct AcquireProfilingLockInfoKHR
+ {
+ VULKAN_HPP_CONSTEXPR AcquireProfilingLockInfoKHR( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ = {},
+ uint64_t timeout_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , timeout( timeout_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & operator=( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR ) - offsetof( AcquireProfilingLockInfoKHR, pNext ) );
+ return *this;
+ }
+
+ AcquireProfilingLockInfoKHR( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ AcquireProfilingLockInfoKHR& operator=( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR const *>(&rhs);
+ return *this;
+ }
+
+ AcquireProfilingLockInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AcquireProfilingLockInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ AcquireProfilingLockInfoKHR & setTimeout( uint64_t timeout_ ) VULKAN_HPP_NOEXCEPT
+ {
+ timeout = timeout_;
+ return *this;
+ }
+
+ operator VkAcquireProfilingLockInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkAcquireProfilingLockInfoKHR*>( this );
+ }
+
+ operator VkAcquireProfilingLockInfoKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkAcquireProfilingLockInfoKHR*>( this );
+ }
+
+ bool operator==( AcquireProfilingLockInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( timeout == rhs.timeout );
+ }
+
+ bool operator!=( AcquireProfilingLockInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAcquireProfilingLockInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags = {};
+ uint64_t timeout = {};
+ };
+ static_assert( sizeof( AcquireProfilingLockInfoKHR ) == sizeof( VkAcquireProfilingLockInfoKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<AcquireProfilingLockInfoKHR>::value, "struct wrapper is not a standard layout!" );
+
struct AllocationCallbacks
{
- VULKAN_HPP_CONSTEXPR AllocationCallbacks( void* pUserData_ = nullptr,
- PFN_vkAllocationFunction pfnAllocation_ = nullptr,
- PFN_vkReallocationFunction pfnReallocation_ = nullptr,
- PFN_vkFreeFunction pfnFree_ = nullptr,
- PFN_vkInternalAllocationNotification pfnInternalAllocation_ = nullptr,
- PFN_vkInternalFreeNotification pfnInternalFree_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR AllocationCallbacks( void* pUserData_ = {},
+ PFN_vkAllocationFunction pfnAllocation_ = {},
+ PFN_vkReallocationFunction pfnReallocation_ = {},
+ PFN_vkFreeFunction pfnFree_ = {},
+ PFN_vkInternalAllocationNotification pfnInternalAllocation_ = {},
+ PFN_vkInternalFreeNotification pfnInternalFree_ = {} ) VULKAN_HPP_NOEXCEPT
: pUserData( pUserData_ )
, pfnAllocation( pfnAllocation_ )
, pfnReallocation( pfnReallocation_ )
@@ -20236,12 +20286,12 @@ namespace VULKAN_HPP_NAMESPACE
AllocationCallbacks( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAllocationCallbacks*>(this) = rhs;
+ *this = rhs;
}
AllocationCallbacks& operator=( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAllocationCallbacks*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AllocationCallbacks const *>(&rhs);
return *this;
}
@@ -20307,22 +20357,22 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- void* pUserData;
- PFN_vkAllocationFunction pfnAllocation;
- PFN_vkReallocationFunction pfnReallocation;
- PFN_vkFreeFunction pfnFree;
- PFN_vkInternalAllocationNotification pfnInternalAllocation;
- PFN_vkInternalFreeNotification pfnInternalFree;
+ void* pUserData = {};
+ PFN_vkAllocationFunction pfnAllocation = {};
+ PFN_vkReallocationFunction pfnReallocation = {};
+ PFN_vkFreeFunction pfnFree = {};
+ PFN_vkInternalAllocationNotification pfnInternalAllocation = {};
+ PFN_vkInternalFreeNotification pfnInternalFree = {};
};
static_assert( sizeof( AllocationCallbacks ) == sizeof( VkAllocationCallbacks ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AllocationCallbacks>::value, "struct wrapper is not a standard layout!" );
struct ComponentMapping
{
- VULKAN_HPP_CONSTEXPR ComponentMapping( vk::ComponentSwizzle r_ = vk::ComponentSwizzle::eIdentity,
- vk::ComponentSwizzle g_ = vk::ComponentSwizzle::eIdentity,
- vk::ComponentSwizzle b_ = vk::ComponentSwizzle::eIdentity,
- vk::ComponentSwizzle a_ = vk::ComponentSwizzle::eIdentity ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -20331,34 +20381,34 @@ namespace VULKAN_HPP_NAMESPACE
ComponentMapping( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkComponentMapping*>(this) = rhs;
+ *this = rhs;
}
ComponentMapping& operator=( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkComponentMapping*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ComponentMapping const *>(&rhs);
return *this;
}
- ComponentMapping & setR( vk::ComponentSwizzle r_ ) VULKAN_HPP_NOEXCEPT
+ ComponentMapping & setR( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ ) VULKAN_HPP_NOEXCEPT
{
r = r_;
return *this;
}
- ComponentMapping & setG( vk::ComponentSwizzle g_ ) VULKAN_HPP_NOEXCEPT
+ ComponentMapping & setG( VULKAN_HPP_NAMESPACE::ComponentSwizzle g_ ) VULKAN_HPP_NOEXCEPT
{
g = g_;
return *this;
}
- ComponentMapping & setB( vk::ComponentSwizzle b_ ) VULKAN_HPP_NOEXCEPT
+ ComponentMapping & setB( VULKAN_HPP_NAMESPACE::ComponentSwizzle b_ ) VULKAN_HPP_NOEXCEPT
{
b = b_;
return *this;
}
- ComponentMapping & setA( vk::ComponentSwizzle a_ ) VULKAN_HPP_NOEXCEPT
+ ComponentMapping & setA( VULKAN_HPP_NAMESPACE::ComponentSwizzle a_ ) VULKAN_HPP_NOEXCEPT
{
a = a_;
return *this;
@@ -20388,63 +20438,50 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ComponentSwizzle r;
- vk::ComponentSwizzle g;
- vk::ComponentSwizzle b;
- vk::ComponentSwizzle a;
+ 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;
};
static_assert( sizeof( ComponentMapping ) == sizeof( VkComponentMapping ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ComponentMapping>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
+ struct AndroidHardwareBufferFormatPropertiesANDROID
{
- struct AndroidHardwareBufferFormatPropertiesANDROID
- {
- protected:
- AndroidHardwareBufferFormatPropertiesANDROID() VULKAN_HPP_NOEXCEPT
- {}
-
- AndroidHardwareBufferFormatPropertiesANDROID( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(this) = rhs;
- }
-
- AndroidHardwareBufferFormatPropertiesANDROID& operator=( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID;
- void* pNext = nullptr;
- vk::Format format;
- uint64_t externalFormat;
- vk::FormatFeatureFlags formatFeatures;
- vk::ComponentMapping samplerYcbcrConversionComponents;
- vk::SamplerYcbcrModelConversion suggestedYcbcrModel;
- vk::SamplerYcbcrRange suggestedYcbcrRange;
- vk::ChromaLocation suggestedXChromaOffset;
- vk::ChromaLocation suggestedYChromaOffset;
- };
- static_assert( sizeof( AndroidHardwareBufferFormatPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferFormatPropertiesANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct AndroidHardwareBufferFormatPropertiesANDROID : public layout::AndroidHardwareBufferFormatPropertiesANDROID
- {
- AndroidHardwareBufferFormatPropertiesANDROID() VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferFormatPropertiesANDROID()
+ 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 ) VULKAN_HPP_NOEXCEPT
+ : format( format_ )
+ , externalFormat( externalFormat_ )
+ , formatFeatures( formatFeatures_ )
+ , samplerYcbcrConversionComponents( samplerYcbcrConversionComponents_ )
+ , suggestedYcbcrModel( suggestedYcbcrModel_ )
+ , suggestedYcbcrRange( suggestedYcbcrRange_ )
+ , suggestedXChromaOffset( suggestedXChromaOffset_ )
+ , suggestedYChromaOffset( suggestedYChromaOffset_ )
{}
+ VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID & operator=( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID ) - offsetof( AndroidHardwareBufferFormatPropertiesANDROID, pNext ) );
+ return *this;
+ }
+
AndroidHardwareBufferFormatPropertiesANDROID( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferFormatPropertiesANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
AndroidHardwareBufferFormatPropertiesANDROID& operator=( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AndroidHardwareBufferFormatPropertiesANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID const *>(&rhs);
return *this;
}
@@ -20477,8 +20514,17 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AndroidHardwareBufferFormatPropertiesANDROID::sType;
+ public:
+ const 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;
};
static_assert( sizeof( AndroidHardwareBufferFormatPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferFormatPropertiesANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AndroidHardwareBufferFormatPropertiesANDROID>::value, "struct wrapper is not a standard layout!" );
@@ -20486,47 +20532,28 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
- {
- struct AndroidHardwareBufferPropertiesANDROID
- {
- protected:
- AndroidHardwareBufferPropertiesANDROID() VULKAN_HPP_NOEXCEPT
- {}
-
- AndroidHardwareBufferPropertiesANDROID( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>(this) = rhs;
- }
-
- AndroidHardwareBufferPropertiesANDROID& operator=( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAndroidHardwareBufferPropertiesANDROID;
- void* pNext = nullptr;
- vk::DeviceSize allocationSize;
- uint32_t memoryTypeBits;
- };
- static_assert( sizeof( AndroidHardwareBufferPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferPropertiesANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct AndroidHardwareBufferPropertiesANDROID : public layout::AndroidHardwareBufferPropertiesANDROID
+ struct AndroidHardwareBufferPropertiesANDROID
{
- AndroidHardwareBufferPropertiesANDROID() VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferPropertiesANDROID()
+ AndroidHardwareBufferPropertiesANDROID( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {},
+ uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : allocationSize( allocationSize_ )
+ , memoryTypeBits( memoryTypeBits_ )
{}
+ VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & operator=( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID ) - offsetof( AndroidHardwareBufferPropertiesANDROID, pNext ) );
+ return *this;
+ }
+
AndroidHardwareBufferPropertiesANDROID( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferPropertiesANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
AndroidHardwareBufferPropertiesANDROID& operator=( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AndroidHardwareBufferPropertiesANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID const *>(&rhs);
return *this;
}
@@ -20553,8 +20580,11 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AndroidHardwareBufferPropertiesANDROID::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferPropertiesANDROID;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {};
+ uint32_t memoryTypeBits = {};
};
static_assert( sizeof( AndroidHardwareBufferPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferPropertiesANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AndroidHardwareBufferPropertiesANDROID>::value, "struct wrapper is not a standard layout!" );
@@ -20562,46 +20592,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
- {
- struct AndroidHardwareBufferUsageANDROID
- {
- protected:
- AndroidHardwareBufferUsageANDROID() VULKAN_HPP_NOEXCEPT
- {}
-
- AndroidHardwareBufferUsageANDROID( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(this) = rhs;
- }
-
- AndroidHardwareBufferUsageANDROID& operator=( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAndroidHardwareBufferUsageANDROID;
- void* pNext = nullptr;
- uint64_t androidHardwareBufferUsage;
- };
- static_assert( sizeof( AndroidHardwareBufferUsageANDROID ) == sizeof( VkAndroidHardwareBufferUsageANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct AndroidHardwareBufferUsageANDROID : public layout::AndroidHardwareBufferUsageANDROID
+ struct AndroidHardwareBufferUsageANDROID
{
- AndroidHardwareBufferUsageANDROID() VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferUsageANDROID()
+ AndroidHardwareBufferUsageANDROID( uint64_t androidHardwareBufferUsage_ = {} ) VULKAN_HPP_NOEXCEPT
+ : androidHardwareBufferUsage( androidHardwareBufferUsage_ )
{}
+ VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID & operator=( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID ) - offsetof( AndroidHardwareBufferUsageANDROID, pNext ) );
+ return *this;
+ }
+
AndroidHardwareBufferUsageANDROID( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AndroidHardwareBufferUsageANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
AndroidHardwareBufferUsageANDROID& operator=( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AndroidHardwareBufferUsageANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID const *>(&rhs);
return *this;
}
@@ -20627,8 +20637,10 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AndroidHardwareBufferUsageANDROID::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferUsageANDROID;
+ void* pNext = {};
+ uint64_t androidHardwareBufferUsage = {};
};
static_assert( sizeof( AndroidHardwareBufferUsageANDROID ) == sizeof( VkAndroidHardwareBufferUsageANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AndroidHardwareBufferUsageANDROID>::value, "struct wrapper is not a standard layout!" );
@@ -20636,51 +20648,28 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
+ struct AndroidSurfaceCreateInfoKHR
{
- struct AndroidSurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( vk::AndroidSurfaceCreateFlagsKHR flags_ = vk::AndroidSurfaceCreateFlagsKHR(),
- struct ANativeWindow* window_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , window( window_ )
- {}
-
- AndroidSurfaceCreateInfoKHR( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidSurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- AndroidSurfaceCreateInfoKHR& operator=( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAndroidSurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::AndroidSurfaceCreateFlagsKHR flags;
- struct ANativeWindow* window;
- };
- static_assert( sizeof( AndroidSurfaceCreateInfoKHR ) == sizeof( VkAndroidSurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AndroidSurfaceCreateInfoKHR : public layout::AndroidSurfaceCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( vk::AndroidSurfaceCreateFlagsKHR flags_ = vk::AndroidSurfaceCreateFlagsKHR(),
- struct ANativeWindow* window_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::AndroidSurfaceCreateInfoKHR( flags_, window_ )
+ VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ = {},
+ struct ANativeWindow* window_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , window( window_ )
{}
+ VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR ) - offsetof( AndroidSurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
AndroidSurfaceCreateInfoKHR( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AndroidSurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
AndroidSurfaceCreateInfoKHR& operator=( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AndroidSurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -20690,7 +20679,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AndroidSurfaceCreateInfoKHR & setFlags( vk::AndroidSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ AndroidSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -20725,70 +20714,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::AndroidSurfaceCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags = {};
+ struct ANativeWindow* window = {};
};
static_assert( sizeof( AndroidSurfaceCreateInfoKHR ) == sizeof( VkAndroidSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AndroidSurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- namespace layout
+ struct ApplicationInfo
{
- struct ApplicationInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ApplicationInfo( const char* pApplicationName_ = nullptr,
- uint32_t applicationVersion_ = 0,
- const char* pEngineName_ = nullptr,
- uint32_t engineVersion_ = 0,
- uint32_t apiVersion_ = 0 ) VULKAN_HPP_NOEXCEPT
- : pApplicationName( pApplicationName_ )
- , applicationVersion( applicationVersion_ )
- , pEngineName( pEngineName_ )
- , engineVersion( engineVersion_ )
- , apiVersion( apiVersion_ )
- {}
-
- ApplicationInfo( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkApplicationInfo*>(this) = rhs;
- }
-
- ApplicationInfo& operator=( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkApplicationInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eApplicationInfo;
- const void* pNext = nullptr;
- const char* pApplicationName;
- uint32_t applicationVersion;
- const char* pEngineName;
- uint32_t engineVersion;
- uint32_t apiVersion;
- };
- static_assert( sizeof( ApplicationInfo ) == sizeof( VkApplicationInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ApplicationInfo : public layout::ApplicationInfo
- {
- VULKAN_HPP_CONSTEXPR ApplicationInfo( const char* pApplicationName_ = nullptr,
- uint32_t applicationVersion_ = 0,
- const char* pEngineName_ = nullptr,
- uint32_t engineVersion_ = 0,
- uint32_t apiVersion_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ApplicationInfo( pApplicationName_, applicationVersion_, pEngineName_, engineVersion_, apiVersion_ )
+ VULKAN_HPP_CONSTEXPR ApplicationInfo( const char* pApplicationName_ = {},
+ uint32_t applicationVersion_ = {},
+ const char* pEngineName_ = {},
+ uint32_t engineVersion_ = {},
+ uint32_t apiVersion_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pApplicationName( pApplicationName_ )
+ , applicationVersion( applicationVersion_ )
+ , pEngineName( pEngineName_ )
+ , engineVersion( engineVersion_ )
+ , apiVersion( apiVersion_ )
{}
+ VULKAN_HPP_NAMESPACE::ApplicationInfo & operator=( VULKAN_HPP_NAMESPACE::ApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ApplicationInfo ) - offsetof( ApplicationInfo, pNext ) );
+ return *this;
+ }
+
ApplicationInfo( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ApplicationInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ApplicationInfo& operator=( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ApplicationInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ApplicationInfo const *>(&rhs);
return *this;
}
@@ -20854,23 +20817,29 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ApplicationInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ApplicationInfo ) == sizeof( VkApplicationInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ApplicationInfo>::value, "struct wrapper is not a standard layout!" );
struct AttachmentDescription
{
- VULKAN_HPP_CONSTEXPR AttachmentDescription( vk::AttachmentDescriptionFlags flags_ = vk::AttachmentDescriptionFlags(),
- vk::Format format_ = vk::Format::eUndefined,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::AttachmentLoadOp loadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp storeOp_ = vk::AttachmentStoreOp::eStore,
- vk::AttachmentLoadOp stencilLoadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp stencilStoreOp_ = vk::AttachmentStoreOp::eStore,
- vk::ImageLayout initialLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout finalLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -20884,64 +20853,64 @@ namespace VULKAN_HPP_NAMESPACE
AttachmentDescription( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentDescription*>(this) = rhs;
+ *this = rhs;
}
AttachmentDescription& operator=( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentDescription*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentDescription const *>(&rhs);
return *this;
}
- AttachmentDescription & setFlags( vk::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- AttachmentDescription & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- AttachmentDescription & setSamples( vk::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
{
samples = samples_;
return *this;
}
- AttachmentDescription & setLoadOp( vk::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT
{
loadOp = loadOp_;
return *this;
}
- AttachmentDescription & setStoreOp( vk::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT
{
storeOp = storeOp_;
return *this;
}
- AttachmentDescription & setStencilLoadOp( vk::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT
{
stencilLoadOp = stencilLoadOp_;
return *this;
}
- AttachmentDescription & setStencilStoreOp( vk::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT
{
stencilStoreOp = stencilStoreOp_;
return *this;
}
- AttachmentDescription & setInitialLayout( vk::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
{
initialLayout = initialLayout_;
return *this;
}
- AttachmentDescription & setFinalLayout( vk::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT
{
finalLayout = finalLayout_;
return *this;
@@ -20961,7 +20930,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( flags == rhs.flags )
&& ( format == rhs.format )
- && vk::operator==( samples, rhs.samples )
+ && ( samples == rhs.samples )
&& ( loadOp == rhs.loadOp )
&& ( storeOp == rhs.storeOp )
&& ( stencilLoadOp == rhs.stencilLoadOp )
@@ -20976,172 +20945,135 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::AttachmentDescriptionFlags flags;
- vk::Format format;
- vk::SampleCountFlagBits samples;
- vk::AttachmentLoadOp loadOp;
- vk::AttachmentStoreOp storeOp;
- vk::AttachmentLoadOp stencilLoadOp;
- vk::AttachmentStoreOp stencilStoreOp;
- vk::ImageLayout initialLayout;
- vk::ImageLayout finalLayout;
+ 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;
};
static_assert( sizeof( AttachmentDescription ) == sizeof( VkAttachmentDescription ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AttachmentDescription>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct AttachmentDescription2KHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AttachmentDescription2KHR( vk::AttachmentDescriptionFlags flags_ = vk::AttachmentDescriptionFlags(),
- vk::Format format_ = vk::Format::eUndefined,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::AttachmentLoadOp loadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp storeOp_ = vk::AttachmentStoreOp::eStore,
- vk::AttachmentLoadOp stencilLoadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp stencilStoreOp_ = vk::AttachmentStoreOp::eStore,
- vk::ImageLayout initialLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout finalLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , format( format_ )
- , samples( samples_ )
- , loadOp( loadOp_ )
- , storeOp( storeOp_ )
- , stencilLoadOp( stencilLoadOp_ )
- , stencilStoreOp( stencilStoreOp_ )
- , initialLayout( initialLayout_ )
- , finalLayout( finalLayout_ )
- {}
-
- AttachmentDescription2KHR( VkAttachmentDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentDescription2KHR*>(this) = rhs;
- }
-
- AttachmentDescription2KHR& operator=( VkAttachmentDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentDescription2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAttachmentDescription2KHR;
- const void* pNext = nullptr;
- vk::AttachmentDescriptionFlags flags;
- vk::Format format;
- vk::SampleCountFlagBits samples;
- vk::AttachmentLoadOp loadOp;
- vk::AttachmentStoreOp storeOp;
- vk::AttachmentLoadOp stencilLoadOp;
- vk::AttachmentStoreOp stencilStoreOp;
- vk::ImageLayout initialLayout;
- vk::ImageLayout finalLayout;
- };
- static_assert( sizeof( AttachmentDescription2KHR ) == sizeof( VkAttachmentDescription2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AttachmentDescription2KHR : public layout::AttachmentDescription2KHR
- {
- VULKAN_HPP_CONSTEXPR AttachmentDescription2KHR( vk::AttachmentDescriptionFlags flags_ = vk::AttachmentDescriptionFlags(),
- vk::Format format_ = vk::Format::eUndefined,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::AttachmentLoadOp loadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp storeOp_ = vk::AttachmentStoreOp::eStore,
- vk::AttachmentLoadOp stencilLoadOp_ = vk::AttachmentLoadOp::eLoad,
- vk::AttachmentStoreOp stencilStoreOp_ = vk::AttachmentStoreOp::eStore,
- vk::ImageLayout initialLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout finalLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentDescription2KHR( flags_, format_, samples_, loadOp_, storeOp_, stencilLoadOp_, stencilStoreOp_, initialLayout_, finalLayout_ )
+ struct AttachmentDescription2
+ {
+ 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 ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , format( format_ )
+ , samples( samples_ )
+ , loadOp( loadOp_ )
+ , storeOp( storeOp_ )
+ , stencilLoadOp( stencilLoadOp_ )
+ , stencilStoreOp( stencilStoreOp_ )
+ , initialLayout( initialLayout_ )
+ , finalLayout( finalLayout_ )
{}
- AttachmentDescription2KHR( VkAttachmentDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentDescription2KHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::AttachmentDescription2 & operator=( VULKAN_HPP_NAMESPACE::AttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescription2 ) - offsetof( AttachmentDescription2, pNext ) );
+ return *this;
+ }
+
+ AttachmentDescription2( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- AttachmentDescription2KHR& operator=( VkAttachmentDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2& operator=( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AttachmentDescription2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentDescription2 const *>(&rhs);
return *this;
}
- AttachmentDescription2KHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- AttachmentDescription2KHR & setFlags( vk::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- AttachmentDescription2KHR & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- AttachmentDescription2KHR & setSamples( vk::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
{
samples = samples_;
return *this;
}
- AttachmentDescription2KHR & setLoadOp( vk::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT
{
loadOp = loadOp_;
return *this;
}
- AttachmentDescription2KHR & setStoreOp( vk::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT
{
storeOp = storeOp_;
return *this;
}
- AttachmentDescription2KHR & setStencilLoadOp( vk::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT
{
stencilLoadOp = stencilLoadOp_;
return *this;
}
- AttachmentDescription2KHR & setStencilStoreOp( vk::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT
{
stencilStoreOp = stencilStoreOp_;
return *this;
}
- AttachmentDescription2KHR & setInitialLayout( vk::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
{
initialLayout = initialLayout_;
return *this;
}
- AttachmentDescription2KHR & setFinalLayout( vk::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescription2 & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT
{
finalLayout = finalLayout_;
return *this;
}
- operator VkAttachmentDescription2KHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentDescription2 const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkAttachmentDescription2KHR*>( this );
+ return *reinterpret_cast<const VkAttachmentDescription2*>( this );
}
- operator VkAttachmentDescription2KHR &() VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentDescription2 &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkAttachmentDescription2KHR*>( this );
+ return *reinterpret_cast<VkAttachmentDescription2*>( this );
}
- bool operator==( AttachmentDescription2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( AttachmentDescription2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( flags == rhs.flags )
&& ( format == rhs.format )
- && vk::operator==( samples, rhs.samples )
+ && ( samples == rhs.samples )
&& ( loadOp == rhs.loadOp )
&& ( storeOp == rhs.storeOp )
&& ( stencilLoadOp == rhs.stencilLoadOp )
@@ -21150,94 +21082,81 @@ namespace VULKAN_HPP_NAMESPACE
&& ( finalLayout == rhs.finalLayout );
}
- bool operator!=( AttachmentDescription2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( AttachmentDescription2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::AttachmentDescription2KHR::sType;
+ public:
+ const 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;
};
- static_assert( sizeof( AttachmentDescription2KHR ) == sizeof( VkAttachmentDescription2KHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<AttachmentDescription2KHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( AttachmentDescription2 ) == sizeof( VkAttachmentDescription2 ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<AttachmentDescription2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct AttachmentDescriptionStencilLayout
{
- struct AttachmentDescriptionStencilLayoutKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayoutKHR( vk::ImageLayout stencilInitialLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout stencilFinalLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : stencilInitialLayout( stencilInitialLayout_ )
- , stencilFinalLayout( stencilFinalLayout_ )
- {}
-
- AttachmentDescriptionStencilLayoutKHR( VkAttachmentDescriptionStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentDescriptionStencilLayoutKHR*>(this) = rhs;
- }
-
- AttachmentDescriptionStencilLayoutKHR& operator=( VkAttachmentDescriptionStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentDescriptionStencilLayoutKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAttachmentDescriptionStencilLayoutKHR;
- void* pNext = nullptr;
- vk::ImageLayout stencilInitialLayout;
- vk::ImageLayout stencilFinalLayout;
- };
- static_assert( sizeof( AttachmentDescriptionStencilLayoutKHR ) == sizeof( VkAttachmentDescriptionStencilLayoutKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AttachmentDescriptionStencilLayoutKHR : public layout::AttachmentDescriptionStencilLayoutKHR
- {
- VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayoutKHR( vk::ImageLayout stencilInitialLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout stencilFinalLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentDescriptionStencilLayoutKHR( stencilInitialLayout_, stencilFinalLayout_ )
+ VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined,
+ VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
+ : stencilInitialLayout( stencilInitialLayout_ )
+ , stencilFinalLayout( stencilFinalLayout_ )
{}
- AttachmentDescriptionStencilLayoutKHR( VkAttachmentDescriptionStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentDescriptionStencilLayoutKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout & operator=( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout ) - offsetof( AttachmentDescriptionStencilLayout, pNext ) );
+ return *this;
+ }
- AttachmentDescriptionStencilLayoutKHR& operator=( VkAttachmentDescriptionStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescriptionStencilLayout( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AttachmentDescriptionStencilLayoutKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ AttachmentDescriptionStencilLayout& operator=( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout const *>(&rhs);
return *this;
}
- AttachmentDescriptionStencilLayoutKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescriptionStencilLayout & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- AttachmentDescriptionStencilLayoutKHR & setStencilInitialLayout( vk::ImageLayout stencilInitialLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescriptionStencilLayout & setStencilInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ ) VULKAN_HPP_NOEXCEPT
{
stencilInitialLayout = stencilInitialLayout_;
return *this;
}
- AttachmentDescriptionStencilLayoutKHR & setStencilFinalLayout( vk::ImageLayout stencilFinalLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentDescriptionStencilLayout & setStencilFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ ) VULKAN_HPP_NOEXCEPT
{
stencilFinalLayout = stencilFinalLayout_;
return *this;
}
- operator VkAttachmentDescriptionStencilLayoutKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentDescriptionStencilLayout const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkAttachmentDescriptionStencilLayoutKHR*>( this );
+ return *reinterpret_cast<const VkAttachmentDescriptionStencilLayout*>( this );
}
- operator VkAttachmentDescriptionStencilLayoutKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentDescriptionStencilLayout &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkAttachmentDescriptionStencilLayoutKHR*>( this );
+ return *reinterpret_cast<VkAttachmentDescriptionStencilLayout*>( this );
}
- bool operator==( AttachmentDescriptionStencilLayoutKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( AttachmentDescriptionStencilLayout const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -21245,33 +21164,36 @@ namespace VULKAN_HPP_NAMESPACE
&& ( stencilFinalLayout == rhs.stencilFinalLayout );
}
- bool operator!=( AttachmentDescriptionStencilLayoutKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( AttachmentDescriptionStencilLayout const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::AttachmentDescriptionStencilLayoutKHR::sType;
+ public:
+ const 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;
};
- static_assert( sizeof( AttachmentDescriptionStencilLayoutKHR ) == sizeof( VkAttachmentDescriptionStencilLayoutKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<AttachmentDescriptionStencilLayoutKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( AttachmentDescriptionStencilLayout ) == sizeof( VkAttachmentDescriptionStencilLayout ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<AttachmentDescriptionStencilLayout>::value, "struct wrapper is not a standard layout!" );
struct AttachmentReference
{
- VULKAN_HPP_CONSTEXPR AttachmentReference( uint32_t attachment_ = 0,
- vk::ImageLayout layout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR AttachmentReference( uint32_t attachment_ = {},
+ VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
: attachment( attachment_ )
, layout( layout_ )
{}
AttachmentReference( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentReference*>(this) = rhs;
+ *this = rhs;
}
AttachmentReference& operator=( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentReference*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentReference const *>(&rhs);
return *this;
}
@@ -21281,7 +21203,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AttachmentReference & setLayout( vk::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT
{
layout = layout_;
return *this;
@@ -21309,99 +21231,74 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t attachment;
- vk::ImageLayout layout;
+ uint32_t attachment = {};
+ VULKAN_HPP_NAMESPACE::ImageLayout layout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined;
};
static_assert( sizeof( AttachmentReference ) == sizeof( VkAttachmentReference ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AttachmentReference>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct AttachmentReference2
{
- struct AttachmentReference2KHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AttachmentReference2KHR( uint32_t attachment_ = 0,
- vk::ImageLayout layout_ = vk::ImageLayout::eUndefined,
- vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags() ) VULKAN_HPP_NOEXCEPT
- : attachment( attachment_ )
- , layout( layout_ )
- , aspectMask( aspectMask_ )
- {}
-
- AttachmentReference2KHR( VkAttachmentReference2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentReference2KHR*>(this) = rhs;
- }
-
- AttachmentReference2KHR& operator=( VkAttachmentReference2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentReference2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eAttachmentReference2KHR;
- const void* pNext = nullptr;
- uint32_t attachment;
- vk::ImageLayout layout;
- vk::ImageAspectFlags aspectMask;
- };
- static_assert( sizeof( AttachmentReference2KHR ) == sizeof( VkAttachmentReference2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AttachmentReference2KHR : public layout::AttachmentReference2KHR
- {
- VULKAN_HPP_CONSTEXPR AttachmentReference2KHR( uint32_t attachment_ = 0,
- vk::ImageLayout layout_ = vk::ImageLayout::eUndefined,
- vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentReference2KHR( attachment_, layout_, aspectMask_ )
+ VULKAN_HPP_CONSTEXPR AttachmentReference2( uint32_t attachment_ = {},
+ VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined,
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {} ) VULKAN_HPP_NOEXCEPT
+ : attachment( attachment_ )
+ , layout( layout_ )
+ , aspectMask( aspectMask_ )
{}
- AttachmentReference2KHR( VkAttachmentReference2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentReference2KHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::AttachmentReference2 & operator=( VULKAN_HPP_NAMESPACE::AttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AttachmentReference2 ) - offsetof( AttachmentReference2, pNext ) );
+ return *this;
+ }
- AttachmentReference2KHR& operator=( VkAttachmentReference2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference2( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AttachmentReference2KHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ AttachmentReference2& operator=( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentReference2 const *>(&rhs);
return *this;
}
- AttachmentReference2KHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference2 & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- AttachmentReference2KHR & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference2 & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT
{
attachment = attachment_;
return *this;
}
- AttachmentReference2KHR & setLayout( vk::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference2 & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT
{
layout = layout_;
return *this;
}
- AttachmentReference2KHR & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReference2 & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
}
- operator VkAttachmentReference2KHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentReference2 const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkAttachmentReference2KHR*>( this );
+ return *reinterpret_cast<const VkAttachmentReference2*>( this );
}
- operator VkAttachmentReference2KHR &() VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentReference2 &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkAttachmentReference2KHR*>( this );
+ return *reinterpret_cast<VkAttachmentReference2*>( this );
}
- bool operator==( AttachmentReference2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( AttachmentReference2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -21410,117 +21307,102 @@ namespace VULKAN_HPP_NAMESPACE
&& ( aspectMask == rhs.aspectMask );
}
- bool operator!=( AttachmentReference2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( AttachmentReference2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::AttachmentReference2KHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( AttachmentReference2KHR ) == sizeof( VkAttachmentReference2KHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<AttachmentReference2KHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct AttachmentReferenceStencilLayoutKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayoutKHR( vk::ImageLayout stencilLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : stencilLayout( stencilLayout_ )
- {}
-
- AttachmentReferenceStencilLayoutKHR( VkAttachmentReferenceStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentReferenceStencilLayoutKHR*>(this) = rhs;
- }
-
- AttachmentReferenceStencilLayoutKHR& operator=( VkAttachmentReferenceStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkAttachmentReferenceStencilLayoutKHR*>(this) = rhs;
- return *this;
- }
+ static_assert( sizeof( AttachmentReference2 ) == sizeof( VkAttachmentReference2 ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<AttachmentReference2>::value, "struct wrapper is not a standard layout!" );
- public:
- vk::StructureType sType = StructureType::eAttachmentReferenceStencilLayoutKHR;
- void* pNext = nullptr;
- vk::ImageLayout stencilLayout;
- };
- static_assert( sizeof( AttachmentReferenceStencilLayoutKHR ) == sizeof( VkAttachmentReferenceStencilLayoutKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct AttachmentReferenceStencilLayoutKHR : public layout::AttachmentReferenceStencilLayoutKHR
+ struct AttachmentReferenceStencilLayout
{
- VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayoutKHR( vk::ImageLayout stencilLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentReferenceStencilLayoutKHR( stencilLayout_ )
+ VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
+ : stencilLayout( stencilLayout_ )
{}
- AttachmentReferenceStencilLayoutKHR( VkAttachmentReferenceStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::AttachmentReferenceStencilLayoutKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout & operator=( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout ) - offsetof( AttachmentReferenceStencilLayout, pNext ) );
+ return *this;
+ }
- AttachmentReferenceStencilLayoutKHR& operator=( VkAttachmentReferenceStencilLayoutKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ AttachmentReferenceStencilLayout( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::AttachmentReferenceStencilLayoutKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ AttachmentReferenceStencilLayout& operator=( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout const *>(&rhs);
return *this;
}
- AttachmentReferenceStencilLayoutKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReferenceStencilLayout & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- AttachmentReferenceStencilLayoutKHR & setStencilLayout( vk::ImageLayout stencilLayout_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentReferenceStencilLayout & setStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ ) VULKAN_HPP_NOEXCEPT
{
stencilLayout = stencilLayout_;
return *this;
}
- operator VkAttachmentReferenceStencilLayoutKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentReferenceStencilLayout const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkAttachmentReferenceStencilLayoutKHR*>( this );
+ return *reinterpret_cast<const VkAttachmentReferenceStencilLayout*>( this );
}
- operator VkAttachmentReferenceStencilLayoutKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkAttachmentReferenceStencilLayout &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkAttachmentReferenceStencilLayoutKHR*>( this );
+ return *reinterpret_cast<VkAttachmentReferenceStencilLayout*>( this );
}
- bool operator==( AttachmentReferenceStencilLayoutKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( AttachmentReferenceStencilLayout const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( stencilLayout == rhs.stencilLayout );
}
- bool operator!=( AttachmentReferenceStencilLayoutKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( AttachmentReferenceStencilLayout const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::AttachmentReferenceStencilLayoutKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentReferenceStencilLayout;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined;
};
- static_assert( sizeof( AttachmentReferenceStencilLayoutKHR ) == sizeof( VkAttachmentReferenceStencilLayoutKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<AttachmentReferenceStencilLayoutKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( AttachmentReferenceStencilLayout ) == sizeof( VkAttachmentReferenceStencilLayout ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<AttachmentReferenceStencilLayout>::value, "struct wrapper is not a standard layout!" );
struct Extent2D
{
- VULKAN_HPP_CONSTEXPR Extent2D( uint32_t width_ = 0,
- uint32_t height_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Extent2D( uint32_t width_ = {},
+ uint32_t height_ = {} ) VULKAN_HPP_NOEXCEPT
: width( width_ )
, height( height_ )
{}
Extent2D( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtent2D*>(this) = rhs;
+ *this = rhs;
}
Extent2D& operator=( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtent2D*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Extent2D const *>(&rhs);
return *this;
}
@@ -21558,28 +21440,28 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t width;
- uint32_t height;
+ uint32_t width = {};
+ uint32_t height = {};
};
static_assert( sizeof( Extent2D ) == sizeof( VkExtent2D ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Extent2D>::value, "struct wrapper is not a standard layout!" );
struct SampleLocationEXT
{
- VULKAN_HPP_CONSTEXPR SampleLocationEXT( float x_ = 0,
- float y_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR SampleLocationEXT( float x_ = {},
+ float y_ = {} ) VULKAN_HPP_NOEXCEPT
: x( x_ )
, y( y_ )
{}
SampleLocationEXT( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSampleLocationEXT*>(this) = rhs;
+ *this = rhs;
}
SampleLocationEXT& operator=( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSampleLocationEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SampleLocationEXT const *>(&rhs);
return *this;
}
@@ -21617,65 +21499,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- float x;
- float y;
+ float x = {};
+ float y = {};
};
static_assert( sizeof( SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SampleLocationEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SampleLocationsInfoEXT
{
- struct SampleLocationsInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SampleLocationsInfoEXT( vk::SampleCountFlagBits sampleLocationsPerPixel_ = vk::SampleCountFlagBits::e1,
- vk::Extent2D sampleLocationGridSize_ = vk::Extent2D(),
- uint32_t sampleLocationsCount_ = 0,
- const vk::SampleLocationEXT* pSampleLocations_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : sampleLocationsPerPixel( sampleLocationsPerPixel_ )
- , sampleLocationGridSize( sampleLocationGridSize_ )
- , sampleLocationsCount( sampleLocationsCount_ )
- , pSampleLocations( pSampleLocations_ )
- {}
-
- SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSampleLocationsInfoEXT*>(this) = rhs;
- }
-
- SampleLocationsInfoEXT& operator=( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSampleLocationsInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSampleLocationsInfoEXT;
- const void* pNext = nullptr;
- vk::SampleCountFlagBits sampleLocationsPerPixel;
- vk::Extent2D sampleLocationGridSize;
- uint32_t sampleLocationsCount;
- const vk::SampleLocationEXT* pSampleLocations;
- };
- static_assert( sizeof( SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SampleLocationsInfoEXT : public layout::SampleLocationsInfoEXT
- {
- VULKAN_HPP_CONSTEXPR SampleLocationsInfoEXT( vk::SampleCountFlagBits sampleLocationsPerPixel_ = vk::SampleCountFlagBits::e1,
- vk::Extent2D sampleLocationGridSize_ = vk::Extent2D(),
- uint32_t sampleLocationsCount_ = 0,
- const vk::SampleLocationEXT* pSampleLocations_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::SampleLocationsInfoEXT( sampleLocationsPerPixel_, sampleLocationGridSize_, sampleLocationsCount_, pSampleLocations_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : sampleLocationsPerPixel( sampleLocationsPerPixel_ )
+ , sampleLocationGridSize( sampleLocationGridSize_ )
+ , sampleLocationsCount( sampleLocationsCount_ )
+ , pSampleLocations( pSampleLocations_ )
{}
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & operator=( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT ) - offsetof( SampleLocationsInfoEXT, pNext ) );
+ return *this;
+ }
+
SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SampleLocationsInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SampleLocationsInfoEXT& operator=( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SampleLocationsInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const *>(&rhs);
return *this;
}
@@ -21685,13 +21540,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SampleLocationsInfoEXT & setSampleLocationsPerPixel( vk::SampleCountFlagBits sampleLocationsPerPixel_ ) VULKAN_HPP_NOEXCEPT
+ SampleLocationsInfoEXT & setSampleLocationsPerPixel( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationsPerPixel = sampleLocationsPerPixel_;
return *this;
}
- SampleLocationsInfoEXT & setSampleLocationGridSize( vk::Extent2D sampleLocationGridSize_ ) VULKAN_HPP_NOEXCEPT
+ SampleLocationsInfoEXT & setSampleLocationGridSize( VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationGridSize = sampleLocationGridSize_;
return *this;
@@ -21703,7 +21558,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SampleLocationsInfoEXT & setPSampleLocations( const vk::SampleLocationEXT* pSampleLocations_ ) VULKAN_HPP_NOEXCEPT
+ SampleLocationsInfoEXT & setPSampleLocations( const VULKAN_HPP_NAMESPACE::SampleLocationEXT* pSampleLocations_ ) VULKAN_HPP_NOEXCEPT
{
pSampleLocations = pSampleLocations_;
return *this;
@@ -21723,7 +21578,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( sampleLocationsPerPixel, rhs.sampleLocationsPerPixel )
+ && ( sampleLocationsPerPixel == rhs.sampleLocationsPerPixel )
&& ( sampleLocationGridSize == rhs.sampleLocationGridSize )
&& ( sampleLocationsCount == rhs.sampleLocationsCount )
&& ( pSampleLocations == rhs.pSampleLocations );
@@ -21734,28 +21589,33 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SampleLocationsInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SampleLocationsInfoEXT>::value, "struct wrapper is not a standard layout!" );
struct AttachmentSampleLocationsEXT
{
- VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = 0,
- vk::SampleLocationsInfoEXT sampleLocationsInfo_ = vk::SampleLocationsInfoEXT() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = {},
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT
: attachmentIndex( attachmentIndex_ )
, sampleLocationsInfo( sampleLocationsInfo_ )
{}
AttachmentSampleLocationsEXT( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentSampleLocationsEXT*>(this) = rhs;
+ *this = rhs;
}
AttachmentSampleLocationsEXT& operator=( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkAttachmentSampleLocationsEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT const *>(&rhs);
return *this;
}
@@ -21765,7 +21625,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- AttachmentSampleLocationsEXT & setSampleLocationsInfo( vk::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
+ AttachmentSampleLocationsEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
@@ -21793,55 +21653,29 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t attachmentIndex;
- vk::SampleLocationsInfoEXT sampleLocationsInfo;
+ uint32_t attachmentIndex = {};
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {};
};
static_assert( sizeof( AttachmentSampleLocationsEXT ) == sizeof( VkAttachmentSampleLocationsEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<AttachmentSampleLocationsEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BaseInStructure
- {
- protected:
- BaseInStructure() VULKAN_HPP_NOEXCEPT
- {}
-
- BaseInStructure( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBaseInStructure*>(this) = rhs;
- }
-
- BaseInStructure& operator=( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBaseInStructure*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType;
- const struct vk::BaseInStructure* pNext = nullptr;
- };
- static_assert( sizeof( BaseInStructure ) == sizeof( VkBaseInStructure ), "layout struct and wrapper have different size!" );
- }
-
- struct BaseInStructure : public layout::BaseInStructure
+ struct BaseInStructure
{
BaseInStructure() VULKAN_HPP_NOEXCEPT
- : layout::BaseInStructure()
{}
BaseInStructure( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BaseInStructure( rhs )
- {}
+ {
+ *this = rhs;
+ }
BaseInStructure& operator=( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BaseInStructure::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BaseInStructure const *>(&rhs);
return *this;
}
- BaseInStructure & setPNext( const struct vk::BaseInStructure* pNext_ ) VULKAN_HPP_NOEXCEPT
+ BaseInStructure & setPNext( const struct VULKAN_HPP_NAMESPACE::BaseInStructure* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
@@ -21868,55 +21702,30 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BaseInStructure::sType;
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = {};
+ const struct VULKAN_HPP_NAMESPACE::BaseInStructure* pNext = {};
};
static_assert( sizeof( BaseInStructure ) == sizeof( VkBaseInStructure ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BaseInStructure>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BaseOutStructure
- {
- protected:
- BaseOutStructure() VULKAN_HPP_NOEXCEPT
- {}
-
- BaseOutStructure( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBaseOutStructure*>(this) = rhs;
- }
-
- BaseOutStructure& operator=( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBaseOutStructure*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType;
- struct vk::BaseOutStructure* pNext = nullptr;
- };
- static_assert( sizeof( BaseOutStructure ) == sizeof( VkBaseOutStructure ), "layout struct and wrapper have different size!" );
- }
-
- struct BaseOutStructure : public layout::BaseOutStructure
+ struct BaseOutStructure
{
BaseOutStructure() VULKAN_HPP_NOEXCEPT
- : layout::BaseOutStructure()
{}
BaseOutStructure( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BaseOutStructure( rhs )
- {}
+ {
+ *this = rhs;
+ }
BaseOutStructure& operator=( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BaseOutStructure::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BaseOutStructure const *>(&rhs);
return *this;
}
- BaseOutStructure & setPNext( struct vk::BaseOutStructure* pNext_ ) VULKAN_HPP_NOEXCEPT
+ BaseOutStructure & setPNext( struct VULKAN_HPP_NAMESPACE::BaseOutStructure* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
@@ -21943,69 +21752,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BaseOutStructure::sType;
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = {};
+ struct VULKAN_HPP_NAMESPACE::BaseOutStructure* pNext = {};
};
static_assert( sizeof( BaseOutStructure ) == sizeof( VkBaseOutStructure ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BaseOutStructure>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BindAccelerationStructureMemoryInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( vk::AccelerationStructureNV accelerationStructure_ = vk::AccelerationStructureNV(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0,
- uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : accelerationStructure( accelerationStructure_ )
- , memory( memory_ )
- , memoryOffset( memoryOffset_ )
- , deviceIndexCount( deviceIndexCount_ )
- , pDeviceIndices( pDeviceIndices_ )
- {}
-
- BindAccelerationStructureMemoryInfoNV( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindAccelerationStructureMemoryInfoNV*>(this) = rhs;
- }
-
- BindAccelerationStructureMemoryInfoNV& operator=( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindAccelerationStructureMemoryInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindAccelerationStructureMemoryInfoNV;
- const void* pNext = nullptr;
- vk::AccelerationStructureNV accelerationStructure;
- vk::DeviceMemory memory;
- vk::DeviceSize memoryOffset;
- uint32_t deviceIndexCount;
- const uint32_t* pDeviceIndices;
- };
- static_assert( sizeof( BindAccelerationStructureMemoryInfoNV ) == sizeof( VkBindAccelerationStructureMemoryInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct BindAccelerationStructureMemoryInfoNV : public layout::BindAccelerationStructureMemoryInfoNV
+ struct BindAccelerationStructureMemoryInfoNV
{
- VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( vk::AccelerationStructureNV accelerationStructure_ = vk::AccelerationStructureNV(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0,
- uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::BindAccelerationStructureMemoryInfoNV( accelerationStructure_, memory_, memoryOffset_, deviceIndexCount_, pDeviceIndices_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : accelerationStructure( accelerationStructure_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ , deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
{}
+ VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV & operator=( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV ) - offsetof( BindAccelerationStructureMemoryInfoNV, pNext ) );
+ return *this;
+ }
+
BindAccelerationStructureMemoryInfoNV( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindAccelerationStructureMemoryInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindAccelerationStructureMemoryInfoNV& operator=( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindAccelerationStructureMemoryInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV const *>(&rhs);
return *this;
}
@@ -22015,19 +21796,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindAccelerationStructureMemoryInfoNV & setAccelerationStructure( vk::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT
+ BindAccelerationStructureMemoryInfoNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT
{
accelerationStructure = accelerationStructure_;
return *this;
}
- BindAccelerationStructureMemoryInfoNV & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ BindAccelerationStructureMemoryInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- BindAccelerationStructureMemoryInfoNV & setMemoryOffset( vk::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
+ BindAccelerationStructureMemoryInfoNV & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
{
memoryOffset = memoryOffset_;
return *this;
@@ -22071,57 +21852,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindAccelerationStructureMemoryInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BindAccelerationStructureMemoryInfoNV ) == sizeof( VkBindAccelerationStructureMemoryInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindAccelerationStructureMemoryInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BindBufferMemoryDeviceGroupInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : deviceIndexCount( deviceIndexCount_ )
- , pDeviceIndices( pDeviceIndices_ )
- {}
-
- BindBufferMemoryDeviceGroupInfo( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(this) = rhs;
- }
-
- BindBufferMemoryDeviceGroupInfo& operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfo;
- const void* pNext = nullptr;
- uint32_t deviceIndexCount;
- const uint32_t* pDeviceIndices;
- };
- static_assert( sizeof( BindBufferMemoryDeviceGroupInfo ) == sizeof( VkBindBufferMemoryDeviceGroupInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindBufferMemoryDeviceGroupInfo : public layout::BindBufferMemoryDeviceGroupInfo
+ struct BindBufferMemoryDeviceGroupInfo
{
- VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::BindBufferMemoryDeviceGroupInfo( deviceIndexCount_, pDeviceIndices_ )
+ VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {},
+ const uint32_t* pDeviceIndices_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
{}
+ VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo & operator=( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo ) - offsetof( BindBufferMemoryDeviceGroupInfo, pNext ) );
+ return *this;
+ }
+
BindBufferMemoryDeviceGroupInfo( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindBufferMemoryDeviceGroupInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindBufferMemoryDeviceGroupInfo& operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindBufferMemoryDeviceGroupInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo const *>(&rhs);
return *this;
}
@@ -22166,61 +21930,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindBufferMemoryDeviceGroupInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfo;
+ const void* pNext = {};
+ uint32_t deviceIndexCount = {};
+ const uint32_t* pDeviceIndices = {};
};
static_assert( sizeof( BindBufferMemoryDeviceGroupInfo ) == sizeof( VkBindBufferMemoryDeviceGroupInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindBufferMemoryDeviceGroupInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BindBufferMemoryInfo
{
- struct BindBufferMemoryInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : buffer( buffer_ )
- , memory( memory_ )
- , memoryOffset( memoryOffset_ )
- {}
-
- BindBufferMemoryInfo( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindBufferMemoryInfo*>(this) = rhs;
- }
-
- BindBufferMemoryInfo& operator=( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindBufferMemoryInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindBufferMemoryInfo;
- const void* pNext = nullptr;
- vk::Buffer buffer;
- vk::DeviceMemory memory;
- vk::DeviceSize memoryOffset;
- };
- static_assert( sizeof( BindBufferMemoryInfo ) == sizeof( VkBindBufferMemoryInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindBufferMemoryInfo : public layout::BindBufferMemoryInfo
- {
- VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BindBufferMemoryInfo( buffer_, memory_, memoryOffset_ )
+ VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {} ) VULKAN_HPP_NOEXCEPT
+ : buffer( buffer_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
{}
+ VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo & operator=( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo ) - offsetof( BindBufferMemoryInfo, pNext ) );
+ return *this;
+ }
+
BindBufferMemoryInfo( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindBufferMemoryInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindBufferMemoryInfo& operator=( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindBufferMemoryInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo const *>(&rhs);
return *this;
}
@@ -22230,19 +21972,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindBufferMemoryInfo & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ BindBufferMemoryInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- BindBufferMemoryInfo & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ BindBufferMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- BindBufferMemoryInfo & setMemoryOffset( vk::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
+ BindBufferMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
{
memoryOffset = memoryOffset_;
return *this;
@@ -22272,28 +22014,32 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindBufferMemoryInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BindBufferMemoryInfo ) == sizeof( VkBindBufferMemoryInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindBufferMemoryInfo>::value, "struct wrapper is not a standard layout!" );
struct Offset2D
{
- VULKAN_HPP_CONSTEXPR Offset2D( int32_t x_ = 0,
- int32_t y_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Offset2D( int32_t x_ = {},
+ int32_t y_ = {} ) VULKAN_HPP_NOEXCEPT
: x( x_ )
, y( y_ )
{}
Offset2D( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkOffset2D*>(this) = rhs;
+ *this = rhs;
}
Offset2D& operator=( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkOffset2D*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Offset2D const *>(&rhs);
return *this;
}
@@ -22331,38 +22077,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- int32_t x;
- int32_t y;
+ int32_t x = {};
+ int32_t y = {};
};
static_assert( sizeof( Offset2D ) == sizeof( VkOffset2D ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Offset2D>::value, "struct wrapper is not a standard layout!" );
struct Rect2D
{
- VULKAN_HPP_CONSTEXPR Rect2D( vk::Offset2D offset_ = vk::Offset2D(),
- vk::Extent2D extent_ = vk::Extent2D() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Rect2D( VULKAN_HPP_NAMESPACE::Offset2D offset_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D extent_ = {} ) VULKAN_HPP_NOEXCEPT
: offset( offset_ )
, extent( extent_ )
{}
Rect2D( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRect2D*>(this) = rhs;
+ *this = rhs;
}
Rect2D& operator=( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRect2D*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Rect2D const *>(&rhs);
return *this;
}
- Rect2D & setOffset( vk::Offset2D offset_ ) VULKAN_HPP_NOEXCEPT
+ Rect2D & setOffset( VULKAN_HPP_NAMESPACE::Offset2D offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- Rect2D & setExtent( vk::Extent2D extent_ ) VULKAN_HPP_NOEXCEPT
+ Rect2D & setExtent( VULKAN_HPP_NAMESPACE::Extent2D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
@@ -22390,65 +22136,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Offset2D offset;
- vk::Extent2D extent;
+ VULKAN_HPP_NAMESPACE::Offset2D offset = {};
+ VULKAN_HPP_NAMESPACE::Extent2D extent = {};
};
static_assert( sizeof( Rect2D ) == sizeof( VkRect2D ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Rect2D>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BindImageMemoryDeviceGroupInfo
{
- struct BindImageMemoryDeviceGroupInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr,
- uint32_t splitInstanceBindRegionCount_ = 0,
- const vk::Rect2D* pSplitInstanceBindRegions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : deviceIndexCount( deviceIndexCount_ )
- , pDeviceIndices( pDeviceIndices_ )
- , splitInstanceBindRegionCount( splitInstanceBindRegionCount_ )
- , pSplitInstanceBindRegions( pSplitInstanceBindRegions_ )
- {}
-
- BindImageMemoryDeviceGroupInfo( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(this) = rhs;
- }
-
- BindImageMemoryDeviceGroupInfo& operator=( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfo;
- const void* pNext = nullptr;
- uint32_t deviceIndexCount;
- const uint32_t* pDeviceIndices;
- uint32_t splitInstanceBindRegionCount;
- const vk::Rect2D* pSplitInstanceBindRegions;
- };
- static_assert( sizeof( BindImageMemoryDeviceGroupInfo ) == sizeof( VkBindImageMemoryDeviceGroupInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindImageMemoryDeviceGroupInfo : public layout::BindImageMemoryDeviceGroupInfo
- {
- VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
- const uint32_t* pDeviceIndices_ = nullptr,
- uint32_t splitInstanceBindRegionCount_ = 0,
- const vk::Rect2D* pSplitInstanceBindRegions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemoryDeviceGroupInfo( deviceIndexCount_, pDeviceIndices_, splitInstanceBindRegionCount_, pSplitInstanceBindRegions_ )
+ VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {},
+ const uint32_t* pDeviceIndices_ = {},
+ uint32_t splitInstanceBindRegionCount_ = {},
+ const VULKAN_HPP_NAMESPACE::Rect2D* pSplitInstanceBindRegions_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
+ , splitInstanceBindRegionCount( splitInstanceBindRegionCount_ )
+ , pSplitInstanceBindRegions( pSplitInstanceBindRegions_ )
{}
+ VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo & operator=( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo ) - offsetof( BindImageMemoryDeviceGroupInfo, pNext ) );
+ return *this;
+ }
+
BindImageMemoryDeviceGroupInfo( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemoryDeviceGroupInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindImageMemoryDeviceGroupInfo& operator=( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindImageMemoryDeviceGroupInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo const *>(&rhs);
return *this;
}
@@ -22476,7 +22195,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindImageMemoryDeviceGroupInfo & setPSplitInstanceBindRegions( const vk::Rect2D* pSplitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT
+ BindImageMemoryDeviceGroupInfo & setPSplitInstanceBindRegions( const VULKAN_HPP_NAMESPACE::Rect2D* pSplitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT
{
pSplitInstanceBindRegions = pSplitInstanceBindRegions_;
return *this;
@@ -22507,61 +22226,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindImageMemoryDeviceGroupInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BindImageMemoryDeviceGroupInfo ) == sizeof( VkBindImageMemoryDeviceGroupInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindImageMemoryDeviceGroupInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BindImageMemoryInfo
{
- struct BindImageMemoryInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( vk::Image image_ = vk::Image(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : image( image_ )
- , memory( memory_ )
- , memoryOffset( memoryOffset_ )
- {}
-
- BindImageMemoryInfo( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemoryInfo*>(this) = rhs;
- }
-
- BindImageMemoryInfo& operator=( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemoryInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindImageMemoryInfo;
- const void* pNext = nullptr;
- vk::Image image;
- vk::DeviceMemory memory;
- vk::DeviceSize memoryOffset;
- };
- static_assert( sizeof( BindImageMemoryInfo ) == sizeof( VkBindImageMemoryInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindImageMemoryInfo : public layout::BindImageMemoryInfo
- {
- VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( vk::Image image_ = vk::Image(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemoryInfo( image_, memory_, memoryOffset_ )
+ VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( VULKAN_HPP_NAMESPACE::Image image_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {} ) VULKAN_HPP_NOEXCEPT
+ : image( image_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
{}
+ VULKAN_HPP_NAMESPACE::BindImageMemoryInfo & operator=( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo ) - offsetof( BindImageMemoryInfo, pNext ) );
+ return *this;
+ }
+
BindImageMemoryInfo( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemoryInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindImageMemoryInfo& operator=( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindImageMemoryInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindImageMemoryInfo const *>(&rhs);
return *this;
}
@@ -22571,19 +22270,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindImageMemoryInfo & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ BindImageMemoryInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
}
- BindImageMemoryInfo & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ BindImageMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- BindImageMemoryInfo & setMemoryOffset( vk::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
+ BindImageMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
{
memoryOffset = memoryOffset_;
return *this;
@@ -22613,57 +22312,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindImageMemoryInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BindImageMemoryInfo ) == sizeof( VkBindImageMemoryInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindImageMemoryInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BindImageMemorySwapchainInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR(),
- uint32_t imageIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : swapchain( swapchain_ )
- , imageIndex( imageIndex_ )
- {}
-
- BindImageMemorySwapchainInfoKHR( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(this) = rhs;
- }
-
- BindImageMemorySwapchainInfoKHR& operator=( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHR;
- const void* pNext = nullptr;
- vk::SwapchainKHR swapchain;
- uint32_t imageIndex;
- };
- static_assert( sizeof( BindImageMemorySwapchainInfoKHR ) == sizeof( VkBindImageMemorySwapchainInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct BindImageMemorySwapchainInfoKHR : public layout::BindImageMemorySwapchainInfoKHR
+ struct BindImageMemorySwapchainInfoKHR
{
- VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR(),
- uint32_t imageIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemorySwapchainInfoKHR( swapchain_, imageIndex_ )
+ VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {},
+ uint32_t imageIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchain( swapchain_ )
+ , imageIndex( imageIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR & operator=( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR ) - offsetof( BindImageMemorySwapchainInfoKHR, pNext ) );
+ return *this;
+ }
+
BindImageMemorySwapchainInfoKHR( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindImageMemorySwapchainInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindImageMemorySwapchainInfoKHR& operator=( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindImageMemorySwapchainInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR const *>(&rhs);
return *this;
}
@@ -22673,7 +22353,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindImageMemorySwapchainInfoKHR & setSwapchain( vk::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
+ BindImageMemorySwapchainInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
{
swapchain = swapchain_;
return *this;
@@ -22708,53 +22388,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindImageMemorySwapchainInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {};
+ uint32_t imageIndex = {};
};
static_assert( sizeof( BindImageMemorySwapchainInfoKHR ) == sizeof( VkBindImageMemorySwapchainInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindImageMemorySwapchainInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BindImagePlaneMemoryInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( vk::ImageAspectFlagBits planeAspect_ = vk::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
- : planeAspect( planeAspect_ )
- {}
-
- BindImagePlaneMemoryInfo( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImagePlaneMemoryInfo*>(this) = rhs;
- }
-
- BindImagePlaneMemoryInfo& operator=( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindImagePlaneMemoryInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindImagePlaneMemoryInfo;
- const void* pNext = nullptr;
- vk::ImageAspectFlagBits planeAspect;
- };
- static_assert( sizeof( BindImagePlaneMemoryInfo ) == sizeof( VkBindImagePlaneMemoryInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindImagePlaneMemoryInfo : public layout::BindImagePlaneMemoryInfo
+ struct BindImagePlaneMemoryInfo
{
- VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( vk::ImageAspectFlagBits planeAspect_ = vk::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
- : layout::BindImagePlaneMemoryInfo( planeAspect_ )
+ VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
+ : planeAspect( planeAspect_ )
{}
+ VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo & operator=( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo ) - offsetof( BindImagePlaneMemoryInfo, pNext ) );
+ return *this;
+ }
+
BindImagePlaneMemoryInfo( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindImagePlaneMemoryInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindImagePlaneMemoryInfo& operator=( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindImagePlaneMemoryInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo const *>(&rhs);
return *this;
}
@@ -22764,7 +22426,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindImagePlaneMemoryInfo & setPlaneAspect( vk::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT
+ BindImagePlaneMemoryInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT
{
planeAspect = planeAspect_;
return *this;
@@ -22784,7 +22446,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( planeAspect, rhs.planeAspect );
+ && ( planeAspect == rhs.planeAspect );
}
bool operator!=( BindImagePlaneMemoryInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -22792,19 +22454,21 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindImagePlaneMemoryInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImagePlaneMemoryInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor;
};
static_assert( sizeof( BindImagePlaneMemoryInfo ) == sizeof( VkBindImagePlaneMemoryInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindImagePlaneMemoryInfo>::value, "struct wrapper is not a standard layout!" );
struct SparseMemoryBind
{
- VULKAN_HPP_CONSTEXPR SparseMemoryBind( vk::DeviceSize resourceOffset_ = 0,
- vk::DeviceSize size_ = 0,
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0,
- vk::SparseMemoryBindFlags flags_ = vk::SparseMemoryBindFlags() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -22814,40 +22478,40 @@ namespace VULKAN_HPP_NAMESPACE
SparseMemoryBind( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseMemoryBind*>(this) = rhs;
+ *this = rhs;
}
SparseMemoryBind& operator=( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseMemoryBind*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseMemoryBind const *>(&rhs);
return *this;
}
- SparseMemoryBind & setResourceOffset( vk::DeviceSize resourceOffset_ ) VULKAN_HPP_NOEXCEPT
+ SparseMemoryBind & setResourceOffset( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ ) VULKAN_HPP_NOEXCEPT
{
resourceOffset = resourceOffset_;
return *this;
}
- SparseMemoryBind & setSize( vk::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
+ SparseMemoryBind & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
{
size = size_;
return *this;
}
- SparseMemoryBind & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ SparseMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- SparseMemoryBind & setMemoryOffset( vk::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
+ SparseMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
{
memoryOffset = memoryOffset_;
return *this;
}
- SparseMemoryBind & setFlags( vk::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SparseMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -22878,20 +22542,20 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize resourceOffset;
- vk::DeviceSize size;
- vk::DeviceMemory memory;
- vk::DeviceSize memoryOffset;
- vk::SparseMemoryBindFlags flags;
+ 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 = {};
};
static_assert( sizeof( SparseMemoryBind ) == sizeof( VkSparseMemoryBind ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseMemoryBind>::value, "struct wrapper is not a standard layout!" );
struct SparseBufferMemoryBindInfo
{
- VULKAN_HPP_CONSTEXPR SparseBufferMemoryBindInfo( vk::Buffer buffer_ = vk::Buffer(),
- uint32_t bindCount_ = 0,
- const vk::SparseMemoryBind* pBinds_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -22899,16 +22563,16 @@ namespace VULKAN_HPP_NAMESPACE
SparseBufferMemoryBindInfo( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseBufferMemoryBindInfo*>(this) = rhs;
+ *this = rhs;
}
SparseBufferMemoryBindInfo& operator=( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseBufferMemoryBindInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo const *>(&rhs);
return *this;
}
- SparseBufferMemoryBindInfo & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ SparseBufferMemoryBindInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
@@ -22920,7 +22584,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SparseBufferMemoryBindInfo & setPBinds( const vk::SparseMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
+ SparseBufferMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
{
pBinds = pBinds_;
return *this;
@@ -22949,18 +22613,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Buffer buffer;
- uint32_t bindCount;
- const vk::SparseMemoryBind* pBinds;
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
+ uint32_t bindCount = {};
+ const VULKAN_HPP_NAMESPACE::SparseMemoryBind* pBinds = {};
};
static_assert( sizeof( SparseBufferMemoryBindInfo ) == sizeof( VkSparseBufferMemoryBindInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseBufferMemoryBindInfo>::value, "struct wrapper is not a standard layout!" );
struct SparseImageOpaqueMemoryBindInfo
{
- VULKAN_HPP_CONSTEXPR SparseImageOpaqueMemoryBindInfo( vk::Image image_ = vk::Image(),
- uint32_t bindCount_ = 0,
- const vk::SparseMemoryBind* pBinds_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -22968,16 +22632,16 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageOpaqueMemoryBindInfo( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageOpaqueMemoryBindInfo*>(this) = rhs;
+ *this = rhs;
}
SparseImageOpaqueMemoryBindInfo& operator=( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageOpaqueMemoryBindInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo const *>(&rhs);
return *this;
}
- SparseImageOpaqueMemoryBindInfo & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageOpaqueMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
@@ -22989,7 +22653,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SparseImageOpaqueMemoryBindInfo & setPBinds( const vk::SparseMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageOpaqueMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
{
pBinds = pBinds_;
return *this;
@@ -23018,18 +22682,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Image image;
- uint32_t bindCount;
- const vk::SparseMemoryBind* pBinds;
+ VULKAN_HPP_NAMESPACE::Image image = {};
+ uint32_t bindCount = {};
+ const VULKAN_HPP_NAMESPACE::SparseMemoryBind* pBinds = {};
};
static_assert( sizeof( SparseImageOpaqueMemoryBindInfo ) == sizeof( VkSparseImageOpaqueMemoryBindInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageOpaqueMemoryBindInfo>::value, "struct wrapper is not a standard layout!" );
struct ImageSubresource
{
- VULKAN_HPP_CONSTEXPR ImageSubresource( vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags(),
- uint32_t mipLevel_ = 0,
- uint32_t arrayLayer_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ImageSubresource( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {},
+ uint32_t mipLevel_ = {},
+ uint32_t arrayLayer_ = {} ) VULKAN_HPP_NOEXCEPT
: aspectMask( aspectMask_ )
, mipLevel( mipLevel_ )
, arrayLayer( arrayLayer_ )
@@ -23037,16 +22701,16 @@ namespace VULKAN_HPP_NAMESPACE
ImageSubresource( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresource*>(this) = rhs;
+ *this = rhs;
}
ImageSubresource& operator=( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresource*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageSubresource const *>(&rhs);
return *this;
}
- ImageSubresource & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ ImageSubresource & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
@@ -23087,25 +22751,25 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageAspectFlags aspectMask;
- uint32_t mipLevel;
- uint32_t arrayLayer;
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
+ uint32_t mipLevel = {};
+ uint32_t arrayLayer = {};
};
static_assert( sizeof( ImageSubresource ) == sizeof( VkImageSubresource ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageSubresource>::value, "struct wrapper is not a standard layout!" );
struct Offset3D
{
- VULKAN_HPP_CONSTEXPR Offset3D( int32_t x_ = 0,
- int32_t y_ = 0,
- int32_t z_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Offset3D( int32_t x_ = {},
+ int32_t y_ = {},
+ int32_t z_ = {} ) VULKAN_HPP_NOEXCEPT
: x( x_ )
, y( y_ )
, z( z_ )
{}
explicit Offset3D( Offset2D const& offset2D,
- int32_t z_ = 0 )
+ int32_t z_ = {} )
: x( offset2D.x )
, y( offset2D.y )
, z( z_ )
@@ -23113,12 +22777,12 @@ namespace VULKAN_HPP_NAMESPACE
Offset3D( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkOffset3D*>(this) = rhs;
+ *this = rhs;
}
Offset3D& operator=( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkOffset3D*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Offset3D const *>(&rhs);
return *this;
}
@@ -23163,25 +22827,25 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- int32_t x;
- int32_t y;
- int32_t z;
+ int32_t x = {};
+ int32_t y = {};
+ int32_t z = {};
};
static_assert( sizeof( Offset3D ) == sizeof( VkOffset3D ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Offset3D>::value, "struct wrapper is not a standard layout!" );
struct Extent3D
{
- VULKAN_HPP_CONSTEXPR Extent3D( uint32_t width_ = 0,
- uint32_t height_ = 0,
- uint32_t depth_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR Extent3D( uint32_t width_ = {},
+ uint32_t height_ = {},
+ uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT
: width( width_ )
, height( height_ )
, depth( depth_ )
{}
explicit Extent3D( Extent2D const& extent2D,
- uint32_t depth_ = 0 )
+ uint32_t depth_ = {} )
: width( extent2D.width )
, height( extent2D.height )
, depth( depth_ )
@@ -23189,12 +22853,12 @@ namespace VULKAN_HPP_NAMESPACE
Extent3D( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtent3D*>(this) = rhs;
+ *this = rhs;
}
Extent3D& operator=( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtent3D*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Extent3D const *>(&rhs);
return *this;
}
@@ -23239,21 +22903,21 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t width;
- uint32_t height;
- uint32_t depth;
+ uint32_t width = {};
+ uint32_t height = {};
+ uint32_t depth = {};
};
static_assert( sizeof( Extent3D ) == sizeof( VkExtent3D ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Extent3D>::value, "struct wrapper is not a standard layout!" );
struct SparseImageMemoryBind
{
- VULKAN_HPP_CONSTEXPR SparseImageMemoryBind( vk::ImageSubresource subresource_ = vk::ImageSubresource(),
- vk::Offset3D offset_ = vk::Offset3D(),
- vk::Extent3D extent_ = vk::Extent3D(),
- vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize memoryOffset_ = 0,
- vk::SparseMemoryBindFlags flags_ = vk::SparseMemoryBindFlags() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -23264,46 +22928,46 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageMemoryBind( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryBind*>(this) = rhs;
+ *this = rhs;
}
SparseImageMemoryBind& operator=( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryBind*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageMemoryBind const *>(&rhs);
return *this;
}
- SparseImageMemoryBind & setSubresource( vk::ImageSubresource subresource_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource subresource_ ) VULKAN_HPP_NOEXCEPT
{
subresource = subresource_;
return *this;
}
- SparseImageMemoryBind & setOffset( vk::Offset3D offset_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setOffset( VULKAN_HPP_NAMESPACE::Offset3D offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- SparseImageMemoryBind & setExtent( vk::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setExtent( VULKAN_HPP_NAMESPACE::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
}
- SparseImageMemoryBind & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- SparseImageMemoryBind & setMemoryOffset( vk::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT
{
memoryOffset = memoryOffset_;
return *this;
}
- SparseImageMemoryBind & setFlags( vk::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -23335,21 +22999,21 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageSubresource subresource;
- vk::Offset3D offset;
- vk::Extent3D extent;
- vk::DeviceMemory memory;
- vk::DeviceSize memoryOffset;
- vk::SparseMemoryBindFlags flags;
+ 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 = {};
};
static_assert( sizeof( SparseImageMemoryBind ) == sizeof( VkSparseImageMemoryBind ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageMemoryBind>::value, "struct wrapper is not a standard layout!" );
struct SparseImageMemoryBindInfo
{
- VULKAN_HPP_CONSTEXPR SparseImageMemoryBindInfo( vk::Image image_ = vk::Image(),
- uint32_t bindCount_ = 0,
- const vk::SparseImageMemoryBind* pBinds_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -23357,16 +23021,16 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageMemoryBindInfo( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryBindInfo*>(this) = rhs;
+ *this = rhs;
}
SparseImageMemoryBindInfo& operator=( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryBindInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo const *>(&rhs);
return *this;
}
- SparseImageMemoryBindInfo & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
@@ -23378,7 +23042,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SparseImageMemoryBindInfo & setPBinds( const vk::SparseImageMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
+ SparseImageMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind* pBinds_ ) VULKAN_HPP_NOEXCEPT
{
pBinds = pBinds_;
return *this;
@@ -23407,90 +23071,51 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Image image;
- uint32_t bindCount;
- const vk::SparseImageMemoryBind* pBinds;
+ VULKAN_HPP_NAMESPACE::Image image = {};
+ uint32_t bindCount = {};
+ const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind* pBinds = {};
};
static_assert( sizeof( SparseImageMemoryBindInfo ) == sizeof( VkSparseImageMemoryBindInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageMemoryBindInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BindSparseInfo
{
- struct BindSparseInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BindSparseInfo( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- uint32_t bufferBindCount_ = 0,
- const vk::SparseBufferMemoryBindInfo* pBufferBinds_ = nullptr,
- uint32_t imageOpaqueBindCount_ = 0,
- const vk::SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ = nullptr,
- uint32_t imageBindCount_ = 0,
- const vk::SparseImageMemoryBindInfo* pImageBinds_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const vk::Semaphore* pSignalSemaphores_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreCount( waitSemaphoreCount_ )
- , pWaitSemaphores( pWaitSemaphores_ )
- , bufferBindCount( bufferBindCount_ )
- , pBufferBinds( pBufferBinds_ )
- , imageOpaqueBindCount( imageOpaqueBindCount_ )
- , pImageOpaqueBinds( pImageOpaqueBinds_ )
- , imageBindCount( imageBindCount_ )
- , pImageBinds( pImageBinds_ )
- , signalSemaphoreCount( signalSemaphoreCount_ )
- , pSignalSemaphores( pSignalSemaphores_ )
- {}
-
- BindSparseInfo( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindSparseInfo*>(this) = rhs;
- }
-
- BindSparseInfo& operator=( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBindSparseInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBindSparseInfo;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreCount;
- const vk::Semaphore* pWaitSemaphores;
- uint32_t bufferBindCount;
- const vk::SparseBufferMemoryBindInfo* pBufferBinds;
- uint32_t imageOpaqueBindCount;
- const vk::SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds;
- uint32_t imageBindCount;
- const vk::SparseImageMemoryBindInfo* pImageBinds;
- uint32_t signalSemaphoreCount;
- const vk::Semaphore* pSignalSemaphores;
- };
- static_assert( sizeof( BindSparseInfo ) == sizeof( VkBindSparseInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BindSparseInfo : public layout::BindSparseInfo
- {
- VULKAN_HPP_CONSTEXPR BindSparseInfo( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- uint32_t bufferBindCount_ = 0,
- const vk::SparseBufferMemoryBindInfo* pBufferBinds_ = nullptr,
- uint32_t imageOpaqueBindCount_ = 0,
- const vk::SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ = nullptr,
- uint32_t imageBindCount_ = 0,
- const vk::SparseImageMemoryBindInfo* pImageBinds_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const vk::Semaphore* pSignalSemaphores_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::BindSparseInfo( waitSemaphoreCount_, pWaitSemaphores_, bufferBindCount_, pBufferBinds_, imageOpaqueBindCount_, pImageOpaqueBinds_, imageBindCount_, pImageBinds_, signalSemaphoreCount_, pSignalSemaphores_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , bufferBindCount( bufferBindCount_ )
+ , pBufferBinds( pBufferBinds_ )
+ , imageOpaqueBindCount( imageOpaqueBindCount_ )
+ , pImageOpaqueBinds( pImageOpaqueBinds_ )
+ , imageBindCount( imageBindCount_ )
+ , pImageBinds( pImageBinds_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphores( pSignalSemaphores_ )
{}
+ VULKAN_HPP_NAMESPACE::BindSparseInfo & operator=( VULKAN_HPP_NAMESPACE::BindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BindSparseInfo ) - offsetof( BindSparseInfo, pNext ) );
+ return *this;
+ }
+
BindSparseInfo( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BindSparseInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BindSparseInfo& operator=( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BindSparseInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BindSparseInfo const *>(&rhs);
return *this;
}
@@ -23506,7 +23131,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindSparseInfo & setPWaitSemaphores( const vk::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ BindSparseInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pWaitSemaphores = pWaitSemaphores_;
return *this;
@@ -23518,7 +23143,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindSparseInfo & setPBufferBinds( const vk::SparseBufferMemoryBindInfo* pBufferBinds_ ) VULKAN_HPP_NOEXCEPT
+ BindSparseInfo & setPBufferBinds( const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo* pBufferBinds_ ) VULKAN_HPP_NOEXCEPT
{
pBufferBinds = pBufferBinds_;
return *this;
@@ -23530,7 +23155,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindSparseInfo & setPImageOpaqueBinds( const vk::SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT
+ BindSparseInfo & setPImageOpaqueBinds( const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT
{
pImageOpaqueBinds = pImageOpaqueBinds_;
return *this;
@@ -23542,7 +23167,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindSparseInfo & setPImageBinds( const vk::SparseImageMemoryBindInfo* pImageBinds_ ) VULKAN_HPP_NOEXCEPT
+ BindSparseInfo & setPImageBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo* pImageBinds_ ) VULKAN_HPP_NOEXCEPT
{
pImageBinds = pImageBinds_;
return *this;
@@ -23554,7 +23179,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BindSparseInfo & setPSignalSemaphores( const vk::Semaphore* pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ BindSparseInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pSignalSemaphores = pSignalSemaphores_;
return *this;
@@ -23591,17 +23216,28 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BindSparseInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BindSparseInfo ) == sizeof( VkBindSparseInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BindSparseInfo>::value, "struct wrapper is not a standard layout!" );
struct BufferCopy
{
- VULKAN_HPP_CONSTEXPR BufferCopy( vk::DeviceSize srcOffset_ = 0,
- vk::DeviceSize dstOffset_ = 0,
- vk::DeviceSize size_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -23609,28 +23245,28 @@ namespace VULKAN_HPP_NAMESPACE
BufferCopy( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkBufferCopy*>(this) = rhs;
+ *this = rhs;
}
BufferCopy& operator=( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkBufferCopy*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferCopy const *>(&rhs);
return *this;
}
- BufferCopy & setSrcOffset( vk::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT
+ BufferCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT
{
srcOffset = srcOffset_;
return *this;
}
- BufferCopy & setDstOffset( vk::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT
+ BufferCopy & setDstOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT
{
dstOffset = dstOffset_;
return *this;
}
- BufferCopy & setSize( vk::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
+ BufferCopy & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
{
size = size_;
return *this;
@@ -23659,74 +23295,43 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize srcOffset;
- vk::DeviceSize dstOffset;
- vk::DeviceSize size;
+ VULKAN_HPP_NAMESPACE::DeviceSize srcOffset = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize dstOffset = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize size = {};
};
static_assert( sizeof( BufferCopy ) == sizeof( VkBufferCopy ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferCopy>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BufferCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR BufferCreateInfo( vk::BufferCreateFlags flags_ = vk::BufferCreateFlags(),
- vk::DeviceSize size_ = 0,
- vk::BufferUsageFlags usage_ = vk::BufferUsageFlags(),
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , size( size_ )
- , usage( usage_ )
- , sharingMode( sharingMode_ )
- , queueFamilyIndexCount( queueFamilyIndexCount_ )
- , pQueueFamilyIndices( pQueueFamilyIndices_ )
- {}
-
- BufferCreateInfo( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferCreateInfo*>(this) = rhs;
- }
-
- BufferCreateInfo& operator=( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBufferCreateInfo;
- const void* pNext = nullptr;
- vk::BufferCreateFlags flags;
- vk::DeviceSize size;
- vk::BufferUsageFlags usage;
- vk::SharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- };
- static_assert( sizeof( BufferCreateInfo ) == sizeof( VkBufferCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct BufferCreateInfo : public layout::BufferCreateInfo
+ struct BufferCreateInfo
{
- VULKAN_HPP_CONSTEXPR BufferCreateInfo( vk::BufferCreateFlags flags_ = vk::BufferCreateFlags(),
- vk::DeviceSize size_ = 0,
- vk::BufferUsageFlags usage_ = vk::BufferUsageFlags(),
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::BufferCreateInfo( flags_, size_, usage_, sharingMode_, queueFamilyIndexCount_, pQueueFamilyIndices_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , size( size_ )
+ , usage( usage_ )
+ , sharingMode( sharingMode_ )
+ , queueFamilyIndexCount( queueFamilyIndexCount_ )
+ , pQueueFamilyIndices( pQueueFamilyIndices_ )
{}
+ VULKAN_HPP_NAMESPACE::BufferCreateInfo & operator=( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferCreateInfo ) - offsetof( BufferCreateInfo, pNext ) );
+ return *this;
+ }
+
BufferCreateInfo( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BufferCreateInfo& operator=( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferCreateInfo const *>(&rhs);
return *this;
}
@@ -23736,25 +23341,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferCreateInfo & setFlags( vk::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ BufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- BufferCreateInfo & setSize( vk::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
+ BufferCreateInfo & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
{
size = size_;
return *this;
}
- BufferCreateInfo & setUsage( vk::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ BufferCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- BufferCreateInfo & setSharingMode( vk::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
+ BufferCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
{
sharingMode = sharingMode_;
return *this;
@@ -23799,53 +23404,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BufferCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BufferCreateInfo ) == sizeof( VkBufferCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct BufferDeviceAddressCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( vk::DeviceAddress deviceAddress_ = 0 ) VULKAN_HPP_NOEXCEPT
- : deviceAddress( deviceAddress_ )
- {}
-
- BufferDeviceAddressCreateInfoEXT( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferDeviceAddressCreateInfoEXT*>(this) = rhs;
- }
-
- BufferDeviceAddressCreateInfoEXT& operator=( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferDeviceAddressCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBufferDeviceAddressCreateInfoEXT;
- const void* pNext = nullptr;
- vk::DeviceAddress deviceAddress;
- };
- static_assert( sizeof( BufferDeviceAddressCreateInfoEXT ) == sizeof( VkBufferDeviceAddressCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct BufferDeviceAddressCreateInfoEXT : public layout::BufferDeviceAddressCreateInfoEXT
+ struct BufferDeviceAddressCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( vk::DeviceAddress deviceAddress_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BufferDeviceAddressCreateInfoEXT( deviceAddress_ )
+ VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceAddress( deviceAddress_ )
{}
+ VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT ) - offsetof( BufferDeviceAddressCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
BufferDeviceAddressCreateInfoEXT( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferDeviceAddressCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
BufferDeviceAddressCreateInfoEXT& operator=( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferDeviceAddressCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -23855,7 +23446,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferDeviceAddressCreateInfoEXT & setDeviceAddress( vk::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT
+ BufferDeviceAddressCreateInfoEXT & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT
{
deviceAddress = deviceAddress_;
return *this;
@@ -23883,102 +23474,85 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BufferDeviceAddressCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {};
};
static_assert( sizeof( BufferDeviceAddressCreateInfoEXT ) == sizeof( VkBufferDeviceAddressCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferDeviceAddressCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BufferDeviceAddressInfo
{
- struct BufferDeviceAddressInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfoEXT( vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : buffer( buffer_ )
- {}
-
- BufferDeviceAddressInfoEXT( VkBufferDeviceAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferDeviceAddressInfoEXT*>(this) = rhs;
- }
-
- BufferDeviceAddressInfoEXT& operator=( VkBufferDeviceAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferDeviceAddressInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBufferDeviceAddressInfoEXT;
- const void* pNext = nullptr;
- vk::Buffer buffer;
- };
- static_assert( sizeof( BufferDeviceAddressInfoEXT ) == sizeof( VkBufferDeviceAddressInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct BufferDeviceAddressInfoEXT : public layout::BufferDeviceAddressInfoEXT
- {
- VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfoEXT( vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : layout::BufferDeviceAddressInfoEXT( buffer_ )
+ VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : buffer( buffer_ )
{}
- BufferDeviceAddressInfoEXT( VkBufferDeviceAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferDeviceAddressInfoEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & operator=( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo ) - offsetof( BufferDeviceAddressInfo, pNext ) );
+ return *this;
+ }
+
+ BufferDeviceAddressInfo( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- BufferDeviceAddressInfoEXT& operator=( VkBufferDeviceAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ BufferDeviceAddressInfo& operator=( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferDeviceAddressInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo const *>(&rhs);
return *this;
}
- BufferDeviceAddressInfoEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ BufferDeviceAddressInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- BufferDeviceAddressInfoEXT & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ BufferDeviceAddressInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- operator VkBufferDeviceAddressInfoEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkBufferDeviceAddressInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkBufferDeviceAddressInfoEXT*>( this );
+ return *reinterpret_cast<const VkBufferDeviceAddressInfo*>( this );
}
- operator VkBufferDeviceAddressInfoEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkBufferDeviceAddressInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkBufferDeviceAddressInfoEXT*>( this );
+ return *reinterpret_cast<VkBufferDeviceAddressInfo*>( this );
}
- bool operator==( BufferDeviceAddressInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( BufferDeviceAddressInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( buffer == rhs.buffer );
}
- bool operator!=( BufferDeviceAddressInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( BufferDeviceAddressInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::BufferDeviceAddressInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
};
- static_assert( sizeof( BufferDeviceAddressInfoEXT ) == sizeof( VkBufferDeviceAddressInfoEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<BufferDeviceAddressInfoEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( BufferDeviceAddressInfo ) == sizeof( VkBufferDeviceAddressInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<BufferDeviceAddressInfo>::value, "struct wrapper is not a standard layout!" );
struct ImageSubresourceLayers
{
- VULKAN_HPP_CONSTEXPR ImageSubresourceLayers( vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags(),
- uint32_t mipLevel_ = 0,
- uint32_t baseArrayLayer_ = 0,
- uint32_t layerCount_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -23987,16 +23561,16 @@ namespace VULKAN_HPP_NAMESPACE
ImageSubresourceLayers( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresourceLayers*>(this) = rhs;
+ *this = rhs;
}
ImageSubresourceLayers& operator=( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresourceLayers*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const *>(&rhs);
return *this;
}
- ImageSubresourceLayers & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ ImageSubresourceLayers & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
@@ -24044,22 +23618,22 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageAspectFlags aspectMask;
- uint32_t mipLevel;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
+ uint32_t mipLevel = {};
+ uint32_t baseArrayLayer = {};
+ uint32_t layerCount = {};
};
static_assert( sizeof( ImageSubresourceLayers ) == sizeof( VkImageSubresourceLayers ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageSubresourceLayers>::value, "struct wrapper is not a standard layout!" );
struct BufferImageCopy
{
- VULKAN_HPP_CONSTEXPR BufferImageCopy( vk::DeviceSize bufferOffset_ = 0,
- uint32_t bufferRowLength_ = 0,
- uint32_t bufferImageHeight_ = 0,
- vk::ImageSubresourceLayers imageSubresource_ = vk::ImageSubresourceLayers(),
- vk::Offset3D imageOffset_ = vk::Offset3D(),
- vk::Extent3D imageExtent_ = vk::Extent3D() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -24070,16 +23644,16 @@ namespace VULKAN_HPP_NAMESPACE
BufferImageCopy( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkBufferImageCopy*>(this) = rhs;
+ *this = rhs;
}
BufferImageCopy& operator=( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkBufferImageCopy*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferImageCopy const *>(&rhs);
return *this;
}
- BufferImageCopy & setBufferOffset( vk::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT
+ BufferImageCopy & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT
{
bufferOffset = bufferOffset_;
return *this;
@@ -24097,19 +23671,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferImageCopy & setImageSubresource( vk::ImageSubresourceLayers imageSubresource_ ) VULKAN_HPP_NOEXCEPT
+ BufferImageCopy & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ ) VULKAN_HPP_NOEXCEPT
{
imageSubresource = imageSubresource_;
return *this;
}
- BufferImageCopy & setImageOffset( vk::Offset3D imageOffset_ ) VULKAN_HPP_NOEXCEPT
+ BufferImageCopy & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ ) VULKAN_HPP_NOEXCEPT
{
imageOffset = imageOffset_;
return *this;
}
- BufferImageCopy & setImageExtent( vk::Extent3D imageExtent_ ) VULKAN_HPP_NOEXCEPT
+ BufferImageCopy & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ ) VULKAN_HPP_NOEXCEPT
{
imageExtent = imageExtent_;
return *this;
@@ -24141,81 +23715,48 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize bufferOffset;
- uint32_t bufferRowLength;
- uint32_t bufferImageHeight;
- vk::ImageSubresourceLayers imageSubresource;
- vk::Offset3D imageOffset;
- vk::Extent3D imageExtent;
+ 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 = {};
};
static_assert( sizeof( BufferImageCopy ) == sizeof( VkBufferImageCopy ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferImageCopy>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BufferMemoryBarrier
{
- struct BufferMemoryBarrier
- {
- protected:
- VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- uint32_t srcQueueFamilyIndex_ = 0,
- uint32_t dstQueueFamilyIndex_ = 0,
- vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize size_ = 0 ) VULKAN_HPP_NOEXCEPT
- : srcAccessMask( srcAccessMask_ )
- , dstAccessMask( dstAccessMask_ )
- , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
- , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
- , buffer( buffer_ )
- , offset( offset_ )
- , size( size_ )
- {}
-
- BufferMemoryBarrier( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferMemoryBarrier*>(this) = rhs;
- }
-
- BufferMemoryBarrier& operator=( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferMemoryBarrier*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBufferMemoryBarrier;
- const void* pNext = nullptr;
- vk::AccessFlags srcAccessMask;
- vk::AccessFlags dstAccessMask;
- uint32_t srcQueueFamilyIndex;
- uint32_t dstQueueFamilyIndex;
- vk::Buffer buffer;
- vk::DeviceSize offset;
- vk::DeviceSize size;
- };
- static_assert( sizeof( BufferMemoryBarrier ) == sizeof( VkBufferMemoryBarrier ), "layout struct and wrapper have different size!" );
- }
-
- struct BufferMemoryBarrier : public layout::BufferMemoryBarrier
- {
- VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- uint32_t srcQueueFamilyIndex_ = 0,
- uint32_t dstQueueFamilyIndex_ = 0,
- vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize size_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BufferMemoryBarrier( srcAccessMask_, dstAccessMask_, srcQueueFamilyIndex_, dstQueueFamilyIndex_, buffer_, offset_, size_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
+ , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
+ , buffer( buffer_ )
+ , offset( offset_ )
+ , size( size_ )
{}
+ VULKAN_HPP_NAMESPACE::BufferMemoryBarrier & operator=( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier ) - offsetof( BufferMemoryBarrier, pNext ) );
+ return *this;
+ }
+
BufferMemoryBarrier( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferMemoryBarrier( rhs )
- {}
+ {
+ *this = rhs;
+ }
BufferMemoryBarrier& operator=( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferMemoryBarrier::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferMemoryBarrier const *>(&rhs);
return *this;
}
@@ -24225,13 +23766,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferMemoryBarrier & setSrcAccessMask( vk::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
srcAccessMask = srcAccessMask_;
return *this;
}
- BufferMemoryBarrier & setDstAccessMask( vk::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
dstAccessMask = dstAccessMask_;
return *this;
@@ -24249,19 +23790,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferMemoryBarrier & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryBarrier & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- BufferMemoryBarrier & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryBarrier & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- BufferMemoryBarrier & setSize( vk::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryBarrier & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
{
size = size_;
return *this;
@@ -24295,53 +23836,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BufferMemoryBarrier::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BufferMemoryBarrier ) == sizeof( VkBufferMemoryBarrier ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferMemoryBarrier>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BufferMemoryRequirementsInfo2
{
- struct BufferMemoryRequirementsInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : buffer( buffer_ )
- {}
-
- BufferMemoryRequirementsInfo2( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferMemoryRequirementsInfo2*>(this) = rhs;
- }
-
- BufferMemoryRequirementsInfo2& operator=( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferMemoryRequirementsInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eBufferMemoryRequirementsInfo2;
- const void* pNext = nullptr;
- vk::Buffer buffer;
- };
- static_assert( sizeof( BufferMemoryRequirementsInfo2 ) == sizeof( VkBufferMemoryRequirementsInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct BufferMemoryRequirementsInfo2 : public layout::BufferMemoryRequirementsInfo2
- {
- VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : layout::BufferMemoryRequirementsInfo2( buffer_ )
+ VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : buffer( buffer_ )
{}
+ VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & operator=( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 ) - offsetof( BufferMemoryRequirementsInfo2, pNext ) );
+ return *this;
+ }
+
BufferMemoryRequirementsInfo2( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferMemoryRequirementsInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
BufferMemoryRequirementsInfo2& operator=( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferMemoryRequirementsInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 const *>(&rhs);
return *this;
}
@@ -24351,7 +23879,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferMemoryRequirementsInfo2 & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ BufferMemoryRequirementsInfo2 & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
@@ -24379,69 +23907,107 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BufferMemoryRequirementsInfo2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryRequirementsInfo2;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
};
static_assert( sizeof( BufferMemoryRequirementsInfo2 ) == sizeof( VkBufferMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferMemoryRequirementsInfo2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct BufferOpaqueCaptureAddressCreateInfo
{
- struct BufferViewCreateInfo
+ VULKAN_HPP_CONSTEXPR BufferOpaqueCaptureAddressCreateInfo( uint64_t opaqueCaptureAddress_ = {} ) VULKAN_HPP_NOEXCEPT
+ : opaqueCaptureAddress( opaqueCaptureAddress_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo & operator=( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( vk::BufferViewCreateFlags flags_ = vk::BufferViewCreateFlags(),
- vk::Buffer buffer_ = vk::Buffer(),
- vk::Format format_ = vk::Format::eUndefined,
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize range_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , buffer( buffer_ )
- , format( format_ )
- , offset( offset_ )
- , range( range_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo ) - offsetof( BufferOpaqueCaptureAddressCreateInfo, pNext ) );
+ return *this;
+ }
- BufferViewCreateInfo( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferViewCreateInfo*>(this) = rhs;
- }
+ BufferOpaqueCaptureAddressCreateInfo( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- BufferViewCreateInfo& operator=( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkBufferViewCreateInfo*>(this) = rhs;
- return *this;
- }
+ BufferOpaqueCaptureAddressCreateInfo& operator=( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::eBufferViewCreateInfo;
- const void* pNext = nullptr;
- vk::BufferViewCreateFlags flags;
- vk::Buffer buffer;
- vk::Format format;
- vk::DeviceSize offset;
- vk::DeviceSize range;
- };
- static_assert( sizeof( BufferViewCreateInfo ) == sizeof( VkBufferViewCreateInfo ), "layout struct and wrapper have different size!" );
- }
+ BufferOpaqueCaptureAddressCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BufferOpaqueCaptureAddressCreateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT
+ {
+ opaqueCaptureAddress = opaqueCaptureAddress_;
+ return *this;
+ }
- struct BufferViewCreateInfo : public layout::BufferViewCreateInfo
+ operator VkBufferOpaqueCaptureAddressCreateInfo const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkBufferOpaqueCaptureAddressCreateInfo*>( this );
+ }
+
+ operator VkBufferOpaqueCaptureAddressCreateInfo &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkBufferOpaqueCaptureAddressCreateInfo*>( this );
+ }
+
+ bool operator==( BufferOpaqueCaptureAddressCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress );
+ }
+
+ bool operator!=( BufferOpaqueCaptureAddressCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferOpaqueCaptureAddressCreateInfo;
+ const void* pNext = {};
+ uint64_t opaqueCaptureAddress = {};
+ };
+ static_assert( sizeof( BufferOpaqueCaptureAddressCreateInfo ) == sizeof( VkBufferOpaqueCaptureAddressCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<BufferOpaqueCaptureAddressCreateInfo>::value, "struct wrapper is not a standard layout!" );
+
+ struct BufferViewCreateInfo
{
- VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( vk::BufferViewCreateFlags flags_ = vk::BufferViewCreateFlags(),
- vk::Buffer buffer_ = vk::Buffer(),
- vk::Format format_ = vk::Format::eUndefined,
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize range_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::BufferViewCreateInfo( flags_, buffer_, format_, offset_, range_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , buffer( buffer_ )
+ , format( format_ )
+ , offset( offset_ )
+ , range( range_ )
{}
+ VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & operator=( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo ) - offsetof( BufferViewCreateInfo, pNext ) );
+ return *this;
+ }
+
BufferViewCreateInfo( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::BufferViewCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
BufferViewCreateInfo& operator=( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::BufferViewCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const *>(&rhs);
return *this;
}
@@ -24451,31 +24017,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- BufferViewCreateInfo & setFlags( vk::BufferViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ BufferViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- BufferViewCreateInfo & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ BufferViewCreateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- BufferViewCreateInfo & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ BufferViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- BufferViewCreateInfo & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ BufferViewCreateInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- BufferViewCreateInfo & setRange( vk::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT
+ BufferViewCreateInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT
{
range = range_;
return *this;
@@ -24507,53 +24073,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::BufferViewCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( BufferViewCreateInfo ) == sizeof( VkBufferViewCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<BufferViewCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct CalibratedTimestampInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoEXT( vk::TimeDomainEXT timeDomain_ = vk::TimeDomainEXT::eDevice ) VULKAN_HPP_NOEXCEPT
- : timeDomain( timeDomain_ )
- {}
-
- CalibratedTimestampInfoEXT( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCalibratedTimestampInfoEXT*>(this) = rhs;
- }
-
- CalibratedTimestampInfoEXT& operator=( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCalibratedTimestampInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCalibratedTimestampInfoEXT;
- const void* pNext = nullptr;
- vk::TimeDomainEXT timeDomain;
- };
- static_assert( sizeof( CalibratedTimestampInfoEXT ) == sizeof( VkCalibratedTimestampInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct CalibratedTimestampInfoEXT : public layout::CalibratedTimestampInfoEXT
+ struct CalibratedTimestampInfoEXT
{
- VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoEXT( vk::TimeDomainEXT timeDomain_ = vk::TimeDomainEXT::eDevice ) VULKAN_HPP_NOEXCEPT
- : layout::CalibratedTimestampInfoEXT( timeDomain_ )
+ VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoEXT( VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain_ = VULKAN_HPP_NAMESPACE::TimeDomainEXT::eDevice ) VULKAN_HPP_NOEXCEPT
+ : timeDomain( timeDomain_ )
{}
+ VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT & operator=( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT ) - offsetof( CalibratedTimestampInfoEXT, pNext ) );
+ return *this;
+ }
+
CalibratedTimestampInfoEXT( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CalibratedTimestampInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
CalibratedTimestampInfoEXT& operator=( VkCalibratedTimestampInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CalibratedTimestampInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT const *>(&rhs);
return *this;
}
@@ -24563,7 +24114,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CalibratedTimestampInfoEXT & setTimeDomain( vk::TimeDomainEXT timeDomain_ ) VULKAN_HPP_NOEXCEPT
+ CalibratedTimestampInfoEXT & setTimeDomain( VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain_ ) VULKAN_HPP_NOEXCEPT
{
timeDomain = timeDomain_;
return *this;
@@ -24591,53 +24142,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CalibratedTimestampInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCalibratedTimestampInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::TimeDomainEXT timeDomain = VULKAN_HPP_NAMESPACE::TimeDomainEXT::eDevice;
};
static_assert( sizeof( CalibratedTimestampInfoEXT ) == sizeof( VkCalibratedTimestampInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CalibratedTimestampInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct CheckpointDataNV
{
- struct CheckpointDataNV
- {
- protected:
- CheckpointDataNV() VULKAN_HPP_NOEXCEPT
- {}
-
- CheckpointDataNV( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCheckpointDataNV*>(this) = rhs;
- }
-
- CheckpointDataNV& operator=( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCheckpointDataNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCheckpointDataNV;
- void* pNext = nullptr;
- vk::PipelineStageFlagBits stage;
- void* pCheckpointMarker;
- };
- static_assert( sizeof( CheckpointDataNV ) == sizeof( VkCheckpointDataNV ), "layout struct and wrapper have different size!" );
- }
-
- struct CheckpointDataNV : public layout::CheckpointDataNV
- {
- CheckpointDataNV() VULKAN_HPP_NOEXCEPT
- : layout::CheckpointDataNV()
+ CheckpointDataNV( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe,
+ void* pCheckpointMarker_ = {} ) VULKAN_HPP_NOEXCEPT
+ : stage( stage_ )
+ , pCheckpointMarker( pCheckpointMarker_ )
{}
+ VULKAN_HPP_NAMESPACE::CheckpointDataNV & operator=( VULKAN_HPP_NAMESPACE::CheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CheckpointDataNV ) - offsetof( CheckpointDataNV, pNext ) );
+ return *this;
+ }
+
CheckpointDataNV( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CheckpointDataNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
CheckpointDataNV& operator=( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CheckpointDataNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CheckpointDataNV const *>(&rhs);
return *this;
}
@@ -24655,7 +24189,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( stage, rhs.stage )
+ && ( stage == rhs.stage )
&& ( pCheckpointMarker == rhs.pCheckpointMarker );
}
@@ -24664,15 +24198,18 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CheckpointDataNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointDataNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe;
+ void* pCheckpointMarker = {};
};
static_assert( sizeof( CheckpointDataNV ) == sizeof( VkCheckpointDataNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CheckpointDataNV>::value, "struct wrapper is not a standard layout!" );
union ClearColorValue
{
- ClearColorValue( const std::array<float,4>& float32_ = { { 0 } } )
+ ClearColorValue( const std::array<float,4>& float32_ = {} )
{
memcpy( float32, float32_.data(), 4 * sizeof( float ) );
}
@@ -24704,6 +24241,13 @@ namespace VULKAN_HPP_NAMESPACE
memcpy( uint32, uint32_.data(), 4 * sizeof( uint32_t ) );
return *this;
}
+
+ VULKAN_HPP_NAMESPACE::ClearColorValue & operator=( VULKAN_HPP_NAMESPACE::ClearColorValue const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( this, &rhs, sizeof( VULKAN_HPP_NAMESPACE::ClearColorValue ) );
+ return *this;
+ }
+
operator VkClearColorValue const&() const
{
return *reinterpret_cast<const VkClearColorValue*>(this);
@@ -24721,20 +24265,20 @@ namespace VULKAN_HPP_NAMESPACE
struct ClearDepthStencilValue
{
- VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( float depth_ = 0,
- uint32_t stencil_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( float depth_ = {},
+ uint32_t stencil_ = {} ) VULKAN_HPP_NOEXCEPT
: depth( depth_ )
, stencil( stencil_ )
{}
ClearDepthStencilValue( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearDepthStencilValue*>(this) = rhs;
+ *this = rhs;
}
ClearDepthStencilValue& operator=( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearDepthStencilValue*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ClearDepthStencilValue const *>(&rhs);
return *this;
}
@@ -24772,35 +24316,42 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- float depth;
- uint32_t stencil;
+ float depth = {};
+ uint32_t stencil = {};
};
static_assert( sizeof( ClearDepthStencilValue ) == sizeof( VkClearDepthStencilValue ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ClearDepthStencilValue>::value, "struct wrapper is not a standard layout!" );
union ClearValue
{
- ClearValue( vk::ClearColorValue color_ = vk::ClearColorValue() )
+ ClearValue( VULKAN_HPP_NAMESPACE::ClearColorValue color_ = {} )
{
color = color_;
}
- ClearValue( vk::ClearDepthStencilValue depthStencil_ )
+ ClearValue( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil_ )
{
depthStencil = depthStencil_;
}
- ClearValue & setColor( vk::ClearColorValue color_ ) VULKAN_HPP_NOEXCEPT
+ ClearValue & setColor( VULKAN_HPP_NAMESPACE::ClearColorValue color_ ) VULKAN_HPP_NOEXCEPT
{
color = color_;
return *this;
}
- ClearValue & setDepthStencil( vk::ClearDepthStencilValue depthStencil_ ) VULKAN_HPP_NOEXCEPT
+ ClearValue & setDepthStencil( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil_ ) VULKAN_HPP_NOEXCEPT
{
depthStencil = depthStencil_;
return *this;
}
+
+ VULKAN_HPP_NAMESPACE::ClearValue & operator=( VULKAN_HPP_NAMESPACE::ClearValue const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( this, &rhs, sizeof( VULKAN_HPP_NAMESPACE::ClearValue ) );
+ return *this;
+ }
+
operator VkClearValue const&() const
{
return *reinterpret_cast<const VkClearValue*>(this);
@@ -24812,8 +24363,8 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
- vk::ClearColorValue color;
- vk::ClearDepthStencilValue depthStencil;
+ VULKAN_HPP_NAMESPACE::ClearColorValue color;
+ VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil;
#else
VkClearColorValue color;
VkClearDepthStencilValue depthStencil;
@@ -24822,9 +24373,9 @@ namespace VULKAN_HPP_NAMESPACE
struct ClearAttachment
{
- ClearAttachment( vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags(),
- uint32_t colorAttachment_ = 0,
- vk::ClearValue clearValue_ = vk::ClearValue() ) VULKAN_HPP_NOEXCEPT
+ ClearAttachment( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {},
+ uint32_t colorAttachment_ = {},
+ VULKAN_HPP_NAMESPACE::ClearValue clearValue_ = {} ) VULKAN_HPP_NOEXCEPT
: aspectMask( aspectMask_ )
, colorAttachment( colorAttachment_ )
, clearValue( clearValue_ )
@@ -24832,16 +24383,16 @@ namespace VULKAN_HPP_NAMESPACE
ClearAttachment( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearAttachment*>(this) = rhs;
+ *this = rhs;
}
ClearAttachment& operator=( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearAttachment*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ClearAttachment const *>(&rhs);
return *this;
}
- ClearAttachment & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ ClearAttachment & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
@@ -24853,7 +24404,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ClearAttachment & setClearValue( vk::ClearValue clearValue_ ) VULKAN_HPP_NOEXCEPT
+ ClearAttachment & setClearValue( VULKAN_HPP_NAMESPACE::ClearValue clearValue_ ) VULKAN_HPP_NOEXCEPT
{
clearValue = clearValue_;
return *this;
@@ -24870,18 +24421,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageAspectFlags aspectMask;
- uint32_t colorAttachment;
- vk::ClearValue clearValue;
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
+ uint32_t colorAttachment = {};
+ VULKAN_HPP_NAMESPACE::ClearValue clearValue = {};
};
static_assert( sizeof( ClearAttachment ) == sizeof( VkClearAttachment ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ClearAttachment>::value, "struct wrapper is not a standard layout!" );
struct ClearRect
{
- VULKAN_HPP_CONSTEXPR ClearRect( vk::Rect2D rect_ = vk::Rect2D(),
- uint32_t baseArrayLayer_ = 0,
- uint32_t layerCount_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ClearRect( VULKAN_HPP_NAMESPACE::Rect2D rect_ = {},
+ uint32_t baseArrayLayer_ = {},
+ uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT
: rect( rect_ )
, baseArrayLayer( baseArrayLayer_ )
, layerCount( layerCount_ )
@@ -24889,16 +24440,16 @@ namespace VULKAN_HPP_NAMESPACE
ClearRect( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearRect*>(this) = rhs;
+ *this = rhs;
}
ClearRect& operator=( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkClearRect*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ClearRect const *>(&rhs);
return *this;
}
- ClearRect & setRect( vk::Rect2D rect_ ) VULKAN_HPP_NOEXCEPT
+ ClearRect & setRect( VULKAN_HPP_NAMESPACE::Rect2D rect_ ) VULKAN_HPP_NOEXCEPT
{
rect = rect_;
return *this;
@@ -24939,18 +24490,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Rect2D rect;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
+ VULKAN_HPP_NAMESPACE::Rect2D rect = {};
+ uint32_t baseArrayLayer = {};
+ uint32_t layerCount = {};
};
static_assert( sizeof( ClearRect ) == sizeof( VkClearRect ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ClearRect>::value, "struct wrapper is not a standard layout!" );
struct IndirectCommandsTokenNVX
{
- VULKAN_HPP_CONSTEXPR IndirectCommandsTokenNVX( vk::IndirectCommandsTokenTypeNVX tokenType_ = vk::IndirectCommandsTokenTypeNVX::ePipeline,
- vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR IndirectCommandsTokenNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType_ = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX::ePipeline,
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {} ) VULKAN_HPP_NOEXCEPT
: tokenType( tokenType_ )
, buffer( buffer_ )
, offset( offset_ )
@@ -24958,28 +24509,28 @@ namespace VULKAN_HPP_NAMESPACE
IndirectCommandsTokenNVX( VkIndirectCommandsTokenNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkIndirectCommandsTokenNVX*>(this) = rhs;
+ *this = rhs;
}
IndirectCommandsTokenNVX& operator=( VkIndirectCommandsTokenNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkIndirectCommandsTokenNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::IndirectCommandsTokenNVX const *>(&rhs);
return *this;
}
- IndirectCommandsTokenNVX & setTokenType( vk::IndirectCommandsTokenTypeNVX tokenType_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsTokenNVX & setTokenType( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType_ ) VULKAN_HPP_NOEXCEPT
{
tokenType = tokenType_;
return *this;
}
- IndirectCommandsTokenNVX & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsTokenNVX & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- IndirectCommandsTokenNVX & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsTokenNVX & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
@@ -25008,90 +24559,51 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::IndirectCommandsTokenTypeNVX tokenType;
- vk::Buffer buffer;
- vk::DeviceSize offset;
+ VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX::ePipeline;
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize offset = {};
};
static_assert( sizeof( IndirectCommandsTokenNVX ) == sizeof( VkIndirectCommandsTokenNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<IndirectCommandsTokenNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct CmdProcessCommandsInfoNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR CmdProcessCommandsInfoNVX( vk::ObjectTableNVX objectTable_ = vk::ObjectTableNVX(),
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ = vk::IndirectCommandsLayoutNVX(),
- uint32_t indirectCommandsTokenCount_ = 0,
- const vk::IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr,
- uint32_t maxSequencesCount_ = 0,
- vk::CommandBuffer targetCommandBuffer_ = vk::CommandBuffer(),
- vk::Buffer sequencesCountBuffer_ = vk::Buffer(),
- vk::DeviceSize sequencesCountOffset_ = 0,
- vk::Buffer sequencesIndexBuffer_ = vk::Buffer(),
- vk::DeviceSize sequencesIndexOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : objectTable( objectTable_ )
- , indirectCommandsLayout( indirectCommandsLayout_ )
- , indirectCommandsTokenCount( indirectCommandsTokenCount_ )
- , pIndirectCommandsTokens( pIndirectCommandsTokens_ )
- , maxSequencesCount( maxSequencesCount_ )
- , targetCommandBuffer( targetCommandBuffer_ )
- , sequencesCountBuffer( sequencesCountBuffer_ )
- , sequencesCountOffset( sequencesCountOffset_ )
- , sequencesIndexBuffer( sequencesIndexBuffer_ )
- , sequencesIndexOffset( sequencesIndexOffset_ )
- {}
-
- CmdProcessCommandsInfoNVX( VkCmdProcessCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCmdProcessCommandsInfoNVX*>(this) = rhs;
- }
-
- CmdProcessCommandsInfoNVX& operator=( VkCmdProcessCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCmdProcessCommandsInfoNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCmdProcessCommandsInfoNVX;
- const void* pNext = nullptr;
- vk::ObjectTableNVX objectTable;
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout;
- uint32_t indirectCommandsTokenCount;
- const vk::IndirectCommandsTokenNVX* pIndirectCommandsTokens;
- uint32_t maxSequencesCount;
- vk::CommandBuffer targetCommandBuffer;
- vk::Buffer sequencesCountBuffer;
- vk::DeviceSize sequencesCountOffset;
- vk::Buffer sequencesIndexBuffer;
- vk::DeviceSize sequencesIndexOffset;
- };
- static_assert( sizeof( CmdProcessCommandsInfoNVX ) == sizeof( VkCmdProcessCommandsInfoNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct CmdProcessCommandsInfoNVX : public layout::CmdProcessCommandsInfoNVX
+ struct CmdProcessCommandsInfoNVX
{
- VULKAN_HPP_CONSTEXPR CmdProcessCommandsInfoNVX( vk::ObjectTableNVX objectTable_ = vk::ObjectTableNVX(),
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ = vk::IndirectCommandsLayoutNVX(),
- uint32_t indirectCommandsTokenCount_ = 0,
- const vk::IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr,
- uint32_t maxSequencesCount_ = 0,
- vk::CommandBuffer targetCommandBuffer_ = vk::CommandBuffer(),
- vk::Buffer sequencesCountBuffer_ = vk::Buffer(),
- vk::DeviceSize sequencesCountOffset_ = 0,
- vk::Buffer sequencesIndexBuffer_ = vk::Buffer(),
- vk::DeviceSize sequencesIndexOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CmdProcessCommandsInfoNVX( objectTable_, indirectCommandsLayout_, indirectCommandsTokenCount_, pIndirectCommandsTokens_, maxSequencesCount_, targetCommandBuffer_, sequencesCountBuffer_, sequencesCountOffset_, sequencesIndexBuffer_, sequencesIndexOffset_ )
+ VULKAN_HPP_CONSTEXPR CmdProcessCommandsInfoNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable_ = {},
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout_ = {},
+ uint32_t indirectCommandsTokenCount_ = {},
+ const VULKAN_HPP_NAMESPACE::IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = {},
+ uint32_t maxSequencesCount_ = {},
+ VULKAN_HPP_NAMESPACE::CommandBuffer targetCommandBuffer_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectTable( objectTable_ )
+ , indirectCommandsLayout( indirectCommandsLayout_ )
+ , indirectCommandsTokenCount( indirectCommandsTokenCount_ )
+ , pIndirectCommandsTokens( pIndirectCommandsTokens_ )
+ , maxSequencesCount( maxSequencesCount_ )
+ , targetCommandBuffer( targetCommandBuffer_ )
+ , sequencesCountBuffer( sequencesCountBuffer_ )
+ , sequencesCountOffset( sequencesCountOffset_ )
+ , sequencesIndexBuffer( sequencesIndexBuffer_ )
+ , sequencesIndexOffset( sequencesIndexOffset_ )
{}
+ VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX & operator=( VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX ) - offsetof( CmdProcessCommandsInfoNVX, pNext ) );
+ return *this;
+ }
+
CmdProcessCommandsInfoNVX( VkCmdProcessCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CmdProcessCommandsInfoNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
CmdProcessCommandsInfoNVX& operator=( VkCmdProcessCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CmdProcessCommandsInfoNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX const *>(&rhs);
return *this;
}
@@ -25101,13 +24613,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CmdProcessCommandsInfoNVX & setObjectTable( vk::ObjectTableNVX objectTable_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setObjectTable( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable_ ) VULKAN_HPP_NOEXCEPT
{
objectTable = objectTable_;
return *this;
}
- CmdProcessCommandsInfoNVX & setIndirectCommandsLayout( vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT
{
indirectCommandsLayout = indirectCommandsLayout_;
return *this;
@@ -25119,7 +24631,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CmdProcessCommandsInfoNVX & setPIndirectCommandsTokens( const vk::IndirectCommandsTokenNVX* pIndirectCommandsTokens_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setPIndirectCommandsTokens( const VULKAN_HPP_NAMESPACE::IndirectCommandsTokenNVX* pIndirectCommandsTokens_ ) VULKAN_HPP_NOEXCEPT
{
pIndirectCommandsTokens = pIndirectCommandsTokens_;
return *this;
@@ -25131,31 +24643,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CmdProcessCommandsInfoNVX & setTargetCommandBuffer( vk::CommandBuffer targetCommandBuffer_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setTargetCommandBuffer( VULKAN_HPP_NAMESPACE::CommandBuffer targetCommandBuffer_ ) VULKAN_HPP_NOEXCEPT
{
targetCommandBuffer = targetCommandBuffer_;
return *this;
}
- CmdProcessCommandsInfoNVX & setSequencesCountBuffer( vk::Buffer sequencesCountBuffer_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setSequencesCountBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ ) VULKAN_HPP_NOEXCEPT
{
sequencesCountBuffer = sequencesCountBuffer_;
return *this;
}
- CmdProcessCommandsInfoNVX & setSequencesCountOffset( vk::DeviceSize sequencesCountOffset_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setSequencesCountOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ ) VULKAN_HPP_NOEXCEPT
{
sequencesCountOffset = sequencesCountOffset_;
return *this;
}
- CmdProcessCommandsInfoNVX & setSequencesIndexBuffer( vk::Buffer sequencesIndexBuffer_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setSequencesIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ ) VULKAN_HPP_NOEXCEPT
{
sequencesIndexBuffer = sequencesIndexBuffer_;
return *this;
}
- CmdProcessCommandsInfoNVX & setSequencesIndexOffset( vk::DeviceSize sequencesIndexOffset_ ) VULKAN_HPP_NOEXCEPT
+ CmdProcessCommandsInfoNVX & setSequencesIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ ) VULKAN_HPP_NOEXCEPT
{
sequencesIndexOffset = sequencesIndexOffset_;
return *this;
@@ -25192,61 +24704,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CmdProcessCommandsInfoNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCmdProcessCommandsInfoNVX;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable = {};
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout = {};
+ uint32_t indirectCommandsTokenCount = {};
+ const VULKAN_HPP_NAMESPACE::IndirectCommandsTokenNVX* pIndirectCommandsTokens = {};
+ uint32_t maxSequencesCount = {};
+ VULKAN_HPP_NAMESPACE::CommandBuffer targetCommandBuffer = {};
+ VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset = {};
+ VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset = {};
};
static_assert( sizeof( CmdProcessCommandsInfoNVX ) == sizeof( VkCmdProcessCommandsInfoNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CmdProcessCommandsInfoNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct CmdReserveSpaceForCommandsInfoNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR CmdReserveSpaceForCommandsInfoNVX( vk::ObjectTableNVX objectTable_ = vk::ObjectTableNVX(),
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ = vk::IndirectCommandsLayoutNVX(),
- uint32_t maxSequencesCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : objectTable( objectTable_ )
- , indirectCommandsLayout( indirectCommandsLayout_ )
- , maxSequencesCount( maxSequencesCount_ )
- {}
-
- CmdReserveSpaceForCommandsInfoNVX( VkCmdReserveSpaceForCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCmdReserveSpaceForCommandsInfoNVX*>(this) = rhs;
- }
-
- CmdReserveSpaceForCommandsInfoNVX& operator=( VkCmdReserveSpaceForCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCmdReserveSpaceForCommandsInfoNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCmdReserveSpaceForCommandsInfoNVX;
- const void* pNext = nullptr;
- vk::ObjectTableNVX objectTable;
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout;
- uint32_t maxSequencesCount;
- };
- static_assert( sizeof( CmdReserveSpaceForCommandsInfoNVX ) == sizeof( VkCmdReserveSpaceForCommandsInfoNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct CmdReserveSpaceForCommandsInfoNVX : public layout::CmdReserveSpaceForCommandsInfoNVX
+ struct CmdReserveSpaceForCommandsInfoNVX
{
- VULKAN_HPP_CONSTEXPR CmdReserveSpaceForCommandsInfoNVX( vk::ObjectTableNVX objectTable_ = vk::ObjectTableNVX(),
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ = vk::IndirectCommandsLayoutNVX(),
- uint32_t maxSequencesCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CmdReserveSpaceForCommandsInfoNVX( objectTable_, indirectCommandsLayout_, maxSequencesCount_ )
+ VULKAN_HPP_CONSTEXPR CmdReserveSpaceForCommandsInfoNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable_ = {},
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout_ = {},
+ uint32_t maxSequencesCount_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectTable( objectTable_ )
+ , indirectCommandsLayout( indirectCommandsLayout_ )
+ , maxSequencesCount( maxSequencesCount_ )
{}
+ VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX & operator=( VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX ) - offsetof( CmdReserveSpaceForCommandsInfoNVX, pNext ) );
+ return *this;
+ }
+
CmdReserveSpaceForCommandsInfoNVX( VkCmdReserveSpaceForCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CmdReserveSpaceForCommandsInfoNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
CmdReserveSpaceForCommandsInfoNVX& operator=( VkCmdReserveSpaceForCommandsInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CmdReserveSpaceForCommandsInfoNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX const *>(&rhs);
return *this;
}
@@ -25256,13 +24754,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CmdReserveSpaceForCommandsInfoNVX & setObjectTable( vk::ObjectTableNVX objectTable_ ) VULKAN_HPP_NOEXCEPT
+ CmdReserveSpaceForCommandsInfoNVX & setObjectTable( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable_ ) VULKAN_HPP_NOEXCEPT
{
objectTable = objectTable_;
return *this;
}
- CmdReserveSpaceForCommandsInfoNVX & setIndirectCommandsLayout( vk::IndirectCommandsLayoutNVX indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT
+ CmdReserveSpaceForCommandsInfoNVX & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT
{
indirectCommandsLayout = indirectCommandsLayout_;
return *this;
@@ -25298,17 +24796,21 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CmdReserveSpaceForCommandsInfoNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCmdReserveSpaceForCommandsInfoNVX;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable = {};
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout = {};
+ uint32_t maxSequencesCount = {};
};
static_assert( sizeof( CmdReserveSpaceForCommandsInfoNVX ) == sizeof( VkCmdReserveSpaceForCommandsInfoNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CmdReserveSpaceForCommandsInfoNVX>::value, "struct wrapper is not a standard layout!" );
struct CoarseSampleLocationNV
{
- VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( uint32_t pixelX_ = 0,
- uint32_t pixelY_ = 0,
- uint32_t sample_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( uint32_t pixelX_ = {},
+ uint32_t pixelY_ = {},
+ uint32_t sample_ = {} ) VULKAN_HPP_NOEXCEPT
: pixelX( pixelX_ )
, pixelY( pixelY_ )
, sample( sample_ )
@@ -25316,12 +24818,12 @@ namespace VULKAN_HPP_NAMESPACE
CoarseSampleLocationNV( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkCoarseSampleLocationNV*>(this) = rhs;
+ *this = rhs;
}
CoarseSampleLocationNV& operator=( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkCoarseSampleLocationNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV const *>(&rhs);
return *this;
}
@@ -25366,19 +24868,19 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t pixelX;
- uint32_t pixelY;
- uint32_t sample;
+ uint32_t pixelX = {};
+ uint32_t pixelY = {};
+ uint32_t sample = {};
};
static_assert( sizeof( CoarseSampleLocationNV ) == sizeof( VkCoarseSampleLocationNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CoarseSampleLocationNV>::value, "struct wrapper is not a standard layout!" );
struct CoarseSampleOrderCustomNV
{
- VULKAN_HPP_CONSTEXPR CoarseSampleOrderCustomNV( vk::ShadingRatePaletteEntryNV shadingRate_ = vk::ShadingRatePaletteEntryNV::eNoInvocations,
- uint32_t sampleCount_ = 0,
- uint32_t sampleLocationCount_ = 0,
- const vk::CoarseSampleLocationNV* pSampleLocations_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -25387,16 +24889,16 @@ namespace VULKAN_HPP_NAMESPACE
CoarseSampleOrderCustomNV( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkCoarseSampleOrderCustomNV*>(this) = rhs;
+ *this = rhs;
}
CoarseSampleOrderCustomNV& operator=( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkCoarseSampleOrderCustomNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV const *>(&rhs);
return *this;
}
- CoarseSampleOrderCustomNV & setShadingRate( vk::ShadingRatePaletteEntryNV shadingRate_ ) VULKAN_HPP_NOEXCEPT
+ CoarseSampleOrderCustomNV & setShadingRate( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ ) VULKAN_HPP_NOEXCEPT
{
shadingRate = shadingRate_;
return *this;
@@ -25414,7 +24916,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CoarseSampleOrderCustomNV & setPSampleLocations( const vk::CoarseSampleLocationNV* pSampleLocations_ ) VULKAN_HPP_NOEXCEPT
+ CoarseSampleOrderCustomNV & setPSampleLocations( const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV* pSampleLocations_ ) VULKAN_HPP_NOEXCEPT
{
pSampleLocations = pSampleLocations_;
return *this;
@@ -25444,63 +24946,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ShadingRatePaletteEntryNV shadingRate;
- uint32_t sampleCount;
- uint32_t sampleLocationCount;
- const vk::CoarseSampleLocationNV* pSampleLocations;
+ VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate = VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV::eNoInvocations;
+ uint32_t sampleCount = {};
+ uint32_t sampleLocationCount = {};
+ const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV* pSampleLocations = {};
};
static_assert( sizeof( CoarseSampleOrderCustomNV ) == sizeof( VkCoarseSampleOrderCustomNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CoarseSampleOrderCustomNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct CommandBufferAllocateInfo
{
- struct CommandBufferAllocateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( vk::CommandPool commandPool_ = vk::CommandPool(),
- vk::CommandBufferLevel level_ = vk::CommandBufferLevel::ePrimary,
- uint32_t commandBufferCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : commandPool( commandPool_ )
- , level( level_ )
- , commandBufferCount( commandBufferCount_ )
- {}
-
- CommandBufferAllocateInfo( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferAllocateInfo*>(this) = rhs;
- }
-
- CommandBufferAllocateInfo& operator=( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferAllocateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCommandBufferAllocateInfo;
- const void* pNext = nullptr;
- vk::CommandPool commandPool;
- vk::CommandBufferLevel level;
- uint32_t commandBufferCount;
- };
- static_assert( sizeof( CommandBufferAllocateInfo ) == sizeof( VkCommandBufferAllocateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct CommandBufferAllocateInfo : public layout::CommandBufferAllocateInfo
- {
- VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( vk::CommandPool commandPool_ = vk::CommandPool(),
- vk::CommandBufferLevel level_ = vk::CommandBufferLevel::ePrimary,
- uint32_t commandBufferCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferAllocateInfo( commandPool_, level_, commandBufferCount_ )
+ VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ = {},
+ VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ = VULKAN_HPP_NAMESPACE::CommandBufferLevel::ePrimary,
+ uint32_t commandBufferCount_ = {} ) VULKAN_HPP_NOEXCEPT
+ : commandPool( commandPool_ )
+ , level( level_ )
+ , commandBufferCount( commandBufferCount_ )
{}
+ VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo ) - offsetof( CommandBufferAllocateInfo, pNext ) );
+ return *this;
+ }
+
CommandBufferAllocateInfo( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferAllocateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
CommandBufferAllocateInfo& operator=( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CommandBufferAllocateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const *>(&rhs);
return *this;
}
@@ -25510,13 +24987,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandBufferAllocateInfo & setCommandPool( vk::CommandPool commandPool_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferAllocateInfo & setCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ ) VULKAN_HPP_NOEXCEPT
{
commandPool = commandPool_;
return *this;
}
- CommandBufferAllocateInfo & setLevel( vk::CommandBufferLevel level_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferAllocateInfo & setLevel( VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ ) VULKAN_HPP_NOEXCEPT
{
level = level_;
return *this;
@@ -25552,73 +25029,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CommandBufferAllocateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( CommandBufferAllocateInfo ) == sizeof( VkCommandBufferAllocateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CommandBufferAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct CommandBufferInheritanceInfo
{
- struct CommandBufferInheritanceInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t subpass_ = 0,
- vk::Framebuffer framebuffer_ = vk::Framebuffer(),
- vk::Bool32 occlusionQueryEnable_ = 0,
- vk::QueryControlFlags queryFlags_ = vk::QueryControlFlags(),
- vk::QueryPipelineStatisticFlags pipelineStatistics_ = vk::QueryPipelineStatisticFlags() ) VULKAN_HPP_NOEXCEPT
- : renderPass( renderPass_ )
- , subpass( subpass_ )
- , framebuffer( framebuffer_ )
- , occlusionQueryEnable( occlusionQueryEnable_ )
- , queryFlags( queryFlags_ )
- , pipelineStatistics( pipelineStatistics_ )
- {}
-
- CommandBufferInheritanceInfo( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferInheritanceInfo*>(this) = rhs;
- }
-
- CommandBufferInheritanceInfo& operator=( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferInheritanceInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCommandBufferInheritanceInfo;
- const void* pNext = nullptr;
- vk::RenderPass renderPass;
- uint32_t subpass;
- vk::Framebuffer framebuffer;
- vk::Bool32 occlusionQueryEnable;
- vk::QueryControlFlags queryFlags;
- vk::QueryPipelineStatisticFlags pipelineStatistics;
- };
- static_assert( sizeof( CommandBufferInheritanceInfo ) == sizeof( VkCommandBufferInheritanceInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct CommandBufferInheritanceInfo : public layout::CommandBufferInheritanceInfo
- {
- VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t subpass_ = 0,
- vk::Framebuffer framebuffer_ = vk::Framebuffer(),
- vk::Bool32 occlusionQueryEnable_ = 0,
- vk::QueryControlFlags queryFlags_ = vk::QueryControlFlags(),
- vk::QueryPipelineStatisticFlags pipelineStatistics_ = vk::QueryPipelineStatisticFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferInheritanceInfo( renderPass_, subpass_, framebuffer_, occlusionQueryEnable_, queryFlags_, pipelineStatistics_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : renderPass( renderPass_ )
+ , subpass( subpass_ )
+ , framebuffer( framebuffer_ )
+ , occlusionQueryEnable( occlusionQueryEnable_ )
+ , queryFlags( queryFlags_ )
+ , pipelineStatistics( pipelineStatistics_ )
{}
+ VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo & operator=( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo ) - offsetof( CommandBufferInheritanceInfo, pNext ) );
+ return *this;
+ }
+
CommandBufferInheritanceInfo( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferInheritanceInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
CommandBufferInheritanceInfo& operator=( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CommandBufferInheritanceInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo const *>(&rhs);
return *this;
}
@@ -25628,7 +25078,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandBufferInheritanceInfo & setRenderPass( vk::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
{
renderPass = renderPass_;
return *this;
@@ -25640,25 +25090,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandBufferInheritanceInfo & setFramebuffer( vk::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT
{
framebuffer = framebuffer_;
return *this;
}
- CommandBufferInheritanceInfo & setOcclusionQueryEnable( vk::Bool32 occlusionQueryEnable_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceInfo & setOcclusionQueryEnable( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable_ ) VULKAN_HPP_NOEXCEPT
{
occlusionQueryEnable = occlusionQueryEnable_;
return *this;
}
- CommandBufferInheritanceInfo & setQueryFlags( vk::QueryControlFlags queryFlags_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceInfo & setQueryFlags( VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags_ ) VULKAN_HPP_NOEXCEPT
{
queryFlags = queryFlags_;
return *this;
}
- CommandBufferInheritanceInfo & setPipelineStatistics( vk::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceInfo & setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT
{
pipelineStatistics = pipelineStatistics_;
return *this;
@@ -25691,57 +25141,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CommandBufferInheritanceInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( CommandBufferInheritanceInfo ) == sizeof( VkCommandBufferInheritanceInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CommandBufferInheritanceInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct CommandBufferBeginInfo
{
- struct CommandBufferBeginInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( vk::CommandBufferUsageFlags flags_ = vk::CommandBufferUsageFlags(),
- const vk::CommandBufferInheritanceInfo* pInheritanceInfo_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pInheritanceInfo( pInheritanceInfo_ )
- {}
-
- CommandBufferBeginInfo( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferBeginInfo*>(this) = rhs;
- }
-
- CommandBufferBeginInfo& operator=( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferBeginInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCommandBufferBeginInfo;
- const void* pNext = nullptr;
- vk::CommandBufferUsageFlags flags;
- const vk::CommandBufferInheritanceInfo* pInheritanceInfo;
- };
- static_assert( sizeof( CommandBufferBeginInfo ) == sizeof( VkCommandBufferBeginInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct CommandBufferBeginInfo : public layout::CommandBufferBeginInfo
- {
- VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( vk::CommandBufferUsageFlags flags_ = vk::CommandBufferUsageFlags(),
- const vk::CommandBufferInheritanceInfo* pInheritanceInfo_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferBeginInfo( flags_, pInheritanceInfo_ )
+ VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ = {},
+ const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo* pInheritanceInfo_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pInheritanceInfo( pInheritanceInfo_ )
{}
+ VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & operator=( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo ) - offsetof( CommandBufferBeginInfo, pNext ) );
+ return *this;
+ }
+
CommandBufferBeginInfo( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferBeginInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
CommandBufferBeginInfo& operator=( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CommandBufferBeginInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo const *>(&rhs);
return *this;
}
@@ -25751,13 +25185,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandBufferBeginInfo & setFlags( vk::CommandBufferUsageFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferBeginInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- CommandBufferBeginInfo & setPInheritanceInfo( const vk::CommandBufferInheritanceInfo* pInheritanceInfo_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferBeginInfo & setPInheritanceInfo( const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo* pInheritanceInfo_ ) VULKAN_HPP_NOEXCEPT
{
pInheritanceInfo = pInheritanceInfo_;
return *this;
@@ -25786,53 +25220,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CommandBufferBeginInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferBeginInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags = {};
+ const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo* pInheritanceInfo = {};
};
static_assert( sizeof( CommandBufferBeginInfo ) == sizeof( VkCommandBufferBeginInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CommandBufferBeginInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct CommandBufferInheritanceConditionalRenderingInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( vk::Bool32 conditionalRenderingEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : conditionalRenderingEnable( conditionalRenderingEnable_ )
- {}
-
- CommandBufferInheritanceConditionalRenderingInfoEXT( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(this) = rhs;
- }
-
- CommandBufferInheritanceConditionalRenderingInfoEXT& operator=( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT;
- const void* pNext = nullptr;
- vk::Bool32 conditionalRenderingEnable;
- };
- static_assert( sizeof( CommandBufferInheritanceConditionalRenderingInfoEXT ) == sizeof( VkCommandBufferInheritanceConditionalRenderingInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct CommandBufferInheritanceConditionalRenderingInfoEXT : public layout::CommandBufferInheritanceConditionalRenderingInfoEXT
+ struct CommandBufferInheritanceConditionalRenderingInfoEXT
{
- VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( vk::Bool32 conditionalRenderingEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferInheritanceConditionalRenderingInfoEXT( conditionalRenderingEnable_ )
+ VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : conditionalRenderingEnable( conditionalRenderingEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT & operator=( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT ) - offsetof( CommandBufferInheritanceConditionalRenderingInfoEXT, pNext ) );
+ return *this;
+ }
+
CommandBufferInheritanceConditionalRenderingInfoEXT( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CommandBufferInheritanceConditionalRenderingInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
CommandBufferInheritanceConditionalRenderingInfoEXT& operator=( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CommandBufferInheritanceConditionalRenderingInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT const *>(&rhs);
return *this;
}
@@ -25842,7 +25258,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandBufferInheritanceConditionalRenderingInfoEXT & setConditionalRenderingEnable( vk::Bool32 conditionalRenderingEnable_ ) VULKAN_HPP_NOEXCEPT
+ CommandBufferInheritanceConditionalRenderingInfoEXT & setConditionalRenderingEnable( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ ) VULKAN_HPP_NOEXCEPT
{
conditionalRenderingEnable = conditionalRenderingEnable_;
return *this;
@@ -25870,57 +25286,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CommandBufferInheritanceConditionalRenderingInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable = {};
};
static_assert( sizeof( CommandBufferInheritanceConditionalRenderingInfoEXT ) == sizeof( VkCommandBufferInheritanceConditionalRenderingInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CommandBufferInheritanceConditionalRenderingInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct CommandPoolCreateInfo
{
- struct CommandPoolCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( vk::CommandPoolCreateFlags flags_ = vk::CommandPoolCreateFlags(),
- uint32_t queueFamilyIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , queueFamilyIndex( queueFamilyIndex_ )
- {}
-
- CommandPoolCreateInfo( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandPoolCreateInfo*>(this) = rhs;
- }
-
- CommandPoolCreateInfo& operator=( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCommandPoolCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCommandPoolCreateInfo;
- const void* pNext = nullptr;
- vk::CommandPoolCreateFlags flags;
- uint32_t queueFamilyIndex;
- };
- static_assert( sizeof( CommandPoolCreateInfo ) == sizeof( VkCommandPoolCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct CommandPoolCreateInfo : public layout::CommandPoolCreateInfo
- {
- VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( vk::CommandPoolCreateFlags flags_ = vk::CommandPoolCreateFlags(),
- uint32_t queueFamilyIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CommandPoolCreateInfo( flags_, queueFamilyIndex_ )
+ VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ = {},
+ uint32_t queueFamilyIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & operator=( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo ) - offsetof( CommandPoolCreateInfo, pNext ) );
+ return *this;
+ }
+
CommandPoolCreateInfo( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CommandPoolCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
CommandPoolCreateInfo& operator=( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CommandPoolCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const *>(&rhs);
return *this;
}
@@ -25930,7 +25325,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CommandPoolCreateInfo & setFlags( vk::CommandPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ CommandPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -25965,17 +25360,20 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CommandPoolCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandPoolCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags = {};
+ uint32_t queueFamilyIndex = {};
};
static_assert( sizeof( CommandPoolCreateInfo ) == sizeof( VkCommandPoolCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CommandPoolCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct SpecializationMapEntry
{
- VULKAN_HPP_CONSTEXPR SpecializationMapEntry( uint32_t constantID_ = 0,
- uint32_t offset_ = 0,
- size_t size_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR SpecializationMapEntry( uint32_t constantID_ = {},
+ uint32_t offset_ = {},
+ size_t size_ = {} ) VULKAN_HPP_NOEXCEPT
: constantID( constantID_ )
, offset( offset_ )
, size( size_ )
@@ -25983,12 +25381,12 @@ namespace VULKAN_HPP_NAMESPACE
SpecializationMapEntry( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSpecializationMapEntry*>(this) = rhs;
+ *this = rhs;
}
SpecializationMapEntry& operator=( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSpecializationMapEntry*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SpecializationMapEntry const *>(&rhs);
return *this;
}
@@ -26033,19 +25431,19 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t constantID;
- uint32_t offset;
- size_t size;
+ uint32_t constantID = {};
+ uint32_t offset = {};
+ size_t size = {};
};
static_assert( sizeof( SpecializationMapEntry ) == sizeof( VkSpecializationMapEntry ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SpecializationMapEntry>::value, "struct wrapper is not a standard layout!" );
struct SpecializationInfo
{
- VULKAN_HPP_CONSTEXPR SpecializationInfo( uint32_t mapEntryCount_ = 0,
- const vk::SpecializationMapEntry* pMapEntries_ = nullptr,
- size_t dataSize_ = 0,
- const void* pData_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -26054,12 +25452,12 @@ namespace VULKAN_HPP_NAMESPACE
SpecializationInfo( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSpecializationInfo*>(this) = rhs;
+ *this = rhs;
}
SpecializationInfo& operator=( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSpecializationInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SpecializationInfo const *>(&rhs);
return *this;
}
@@ -26069,7 +25467,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SpecializationInfo & setPMapEntries( const vk::SpecializationMapEntry* pMapEntries_ ) VULKAN_HPP_NOEXCEPT
+ SpecializationInfo & setPMapEntries( const VULKAN_HPP_NAMESPACE::SpecializationMapEntry* pMapEntries_ ) VULKAN_HPP_NOEXCEPT
{
pMapEntries = pMapEntries_;
return *this;
@@ -26111,71 +25509,42 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t mapEntryCount;
- const vk::SpecializationMapEntry* pMapEntries;
- size_t dataSize;
- const void* pData;
+ uint32_t mapEntryCount = {};
+ const VULKAN_HPP_NAMESPACE::SpecializationMapEntry* pMapEntries = {};
+ size_t dataSize = {};
+ const void* pData = {};
};
static_assert( sizeof( SpecializationInfo ) == sizeof( VkSpecializationInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SpecializationInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineShaderStageCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags flags_ = vk::PipelineShaderStageCreateFlags(),
- vk::ShaderStageFlagBits stage_ = vk::ShaderStageFlagBits::eVertex,
- vk::ShaderModule module_ = vk::ShaderModule(),
- const char* pName_ = nullptr,
- const vk::SpecializationInfo* pSpecializationInfo_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , stage( stage_ )
- , module( module_ )
- , pName( pName_ )
- , pSpecializationInfo( pSpecializationInfo_ )
- {}
-
- PipelineShaderStageCreateInfo( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineShaderStageCreateInfo*>(this) = rhs;
- }
-
- PipelineShaderStageCreateInfo& operator=( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineShaderStageCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineShaderStageCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineShaderStageCreateFlags flags;
- vk::ShaderStageFlagBits stage;
- vk::ShaderModule module;
- const char* pName;
- const vk::SpecializationInfo* pSpecializationInfo;
- };
- static_assert( sizeof( PipelineShaderStageCreateInfo ) == sizeof( VkPipelineShaderStageCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineShaderStageCreateInfo : public layout::PipelineShaderStageCreateInfo
+ struct PipelineShaderStageCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags flags_ = vk::PipelineShaderStageCreateFlags(),
- vk::ShaderStageFlagBits stage_ = vk::ShaderStageFlagBits::eVertex,
- vk::ShaderModule module_ = vk::ShaderModule(),
- const char* pName_ = nullptr,
- const vk::SpecializationInfo* pSpecializationInfo_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineShaderStageCreateInfo( flags_, stage_, module_, pName_, pSpecializationInfo_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , stage( stage_ )
+ , module( module_ )
+ , pName( pName_ )
+ , pSpecializationInfo( pSpecializationInfo_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo ) - offsetof( PipelineShaderStageCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineShaderStageCreateInfo( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineShaderStageCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineShaderStageCreateInfo& operator=( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineShaderStageCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const *>(&rhs);
return *this;
}
@@ -26185,19 +25554,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineShaderStageCreateInfo & setFlags( vk::PipelineShaderStageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineShaderStageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineShaderStageCreateInfo & setStage( vk::ShaderStageFlagBits stage_ ) VULKAN_HPP_NOEXCEPT
+ PipelineShaderStageCreateInfo & setStage( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ ) VULKAN_HPP_NOEXCEPT
{
stage = stage_;
return *this;
}
- PipelineShaderStageCreateInfo & setModule( vk::ShaderModule module_ ) VULKAN_HPP_NOEXCEPT
+ PipelineShaderStageCreateInfo & setModule( VULKAN_HPP_NAMESPACE::ShaderModule module_ ) VULKAN_HPP_NOEXCEPT
{
module = module_;
return *this;
@@ -26209,7 +25578,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineShaderStageCreateInfo & setPSpecializationInfo( const vk::SpecializationInfo* pSpecializationInfo_ ) VULKAN_HPP_NOEXCEPT
+ PipelineShaderStageCreateInfo & setPSpecializationInfo( const VULKAN_HPP_NAMESPACE::SpecializationInfo* pSpecializationInfo_ ) VULKAN_HPP_NOEXCEPT
{
pSpecializationInfo = pSpecializationInfo_;
return *this;
@@ -26230,7 +25599,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( flags == rhs.flags )
- && vk::operator==( stage, rhs.stage )
+ && ( stage == rhs.stage )
&& ( module == rhs.module )
&& ( pName == rhs.pName )
&& ( pSpecializationInfo == rhs.pSpecializationInfo );
@@ -26241,69 +25610,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineShaderStageCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineShaderStageCreateInfo ) == sizeof( VkPipelineShaderStageCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineShaderStageCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ComputePipelineCreateInfo
{
- struct ComputePipelineCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- vk::PipelineShaderStageCreateInfo stage_ = vk::PipelineShaderStageCreateInfo(),
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , stage( stage_ )
- , layout( layout_ )
- , basePipelineHandle( basePipelineHandle_ )
- , basePipelineIndex( basePipelineIndex_ )
- {}
-
- ComputePipelineCreateInfo( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkComputePipelineCreateInfo*>(this) = rhs;
- }
-
- ComputePipelineCreateInfo& operator=( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkComputePipelineCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eComputePipelineCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineCreateFlags flags;
- vk::PipelineShaderStageCreateInfo stage;
- vk::PipelineLayout layout;
- vk::Pipeline basePipelineHandle;
- int32_t basePipelineIndex;
- };
- static_assert( sizeof( ComputePipelineCreateInfo ) == sizeof( VkComputePipelineCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ComputePipelineCreateInfo : public layout::ComputePipelineCreateInfo
- {
- VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- vk::PipelineShaderStageCreateInfo stage_ = vk::PipelineShaderStageCreateInfo(),
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ComputePipelineCreateInfo( flags_, stage_, layout_, basePipelineHandle_, basePipelineIndex_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , stage( stage_ )
+ , layout( layout_ )
+ , basePipelineHandle( basePipelineHandle_ )
+ , basePipelineIndex( basePipelineIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo ) - offsetof( ComputePipelineCreateInfo, pNext ) );
+ return *this;
+ }
+
ComputePipelineCreateInfo( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ComputePipelineCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ComputePipelineCreateInfo& operator=( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ComputePipelineCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const *>(&rhs);
return *this;
}
@@ -26313,25 +25659,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ComputePipelineCreateInfo & setFlags( vk::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ComputePipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ComputePipelineCreateInfo & setStage( vk::PipelineShaderStageCreateInfo stage_ ) VULKAN_HPP_NOEXCEPT
+ ComputePipelineCreateInfo & setStage( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo stage_ ) VULKAN_HPP_NOEXCEPT
{
stage = stage_;
return *this;
}
- ComputePipelineCreateInfo & setLayout( vk::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
+ ComputePipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
{
layout = layout_;
return *this;
}
- ComputePipelineCreateInfo & setBasePipelineHandle( vk::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
+ ComputePipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
{
basePipelineHandle = basePipelineHandle_;
return *this;
@@ -26369,61 +25715,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ComputePipelineCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ComputePipelineCreateInfo ) == sizeof( VkComputePipelineCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ComputePipelineCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ConditionalRenderingBeginInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0,
- vk::ConditionalRenderingFlagsEXT flags_ = vk::ConditionalRenderingFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : buffer( buffer_ )
- , offset( offset_ )
- , flags( flags_ )
- {}
-
- ConditionalRenderingBeginInfoEXT( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkConditionalRenderingBeginInfoEXT*>(this) = rhs;
- }
-
- ConditionalRenderingBeginInfoEXT& operator=( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkConditionalRenderingBeginInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eConditionalRenderingBeginInfoEXT;
- const void* pNext = nullptr;
- vk::Buffer buffer;
- vk::DeviceSize offset;
- vk::ConditionalRenderingFlagsEXT flags;
- };
- static_assert( sizeof( ConditionalRenderingBeginInfoEXT ) == sizeof( VkConditionalRenderingBeginInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ConditionalRenderingBeginInfoEXT : public layout::ConditionalRenderingBeginInfoEXT
+ struct ConditionalRenderingBeginInfoEXT
{
- VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0,
- vk::ConditionalRenderingFlagsEXT flags_ = vk::ConditionalRenderingFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : layout::ConditionalRenderingBeginInfoEXT( buffer_, offset_, flags_ )
+ VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {},
+ VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : buffer( buffer_ )
+ , offset( offset_ )
+ , flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT ) - offsetof( ConditionalRenderingBeginInfoEXT, pNext ) );
+ return *this;
+ }
+
ConditionalRenderingBeginInfoEXT( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ConditionalRenderingBeginInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ConditionalRenderingBeginInfoEXT& operator=( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ConditionalRenderingBeginInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT const *>(&rhs);
return *this;
}
@@ -26433,19 +25760,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ConditionalRenderingBeginInfoEXT & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ ConditionalRenderingBeginInfoEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- ConditionalRenderingBeginInfoEXT & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ ConditionalRenderingBeginInfoEXT & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- ConditionalRenderingBeginInfoEXT & setFlags( vk::ConditionalRenderingFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ ConditionalRenderingBeginInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -26475,70 +25802,74 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ConditionalRenderingBeginInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ConditionalRenderingBeginInfoEXT ) == sizeof( VkConditionalRenderingBeginInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ConditionalRenderingBeginInfoEXT>::value, "struct wrapper is not a standard layout!" );
- struct ConformanceVersionKHR
+ struct ConformanceVersion
{
- VULKAN_HPP_CONSTEXPR ConformanceVersionKHR( uint8_t major_ = 0,
- uint8_t minor_ = 0,
- uint8_t subminor_ = 0,
- uint8_t patch_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
- ConformanceVersionKHR( VkConformanceVersionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkConformanceVersionKHR*>(this) = rhs;
+ *this = rhs;
}
- ConformanceVersionKHR& operator=( VkConformanceVersionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion& operator=( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkConformanceVersionKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ConformanceVersion const *>(&rhs);
return *this;
}
- ConformanceVersionKHR & setMajor( uint8_t major_ ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion & setMajor( uint8_t major_ ) VULKAN_HPP_NOEXCEPT
{
major = major_;
return *this;
}
- ConformanceVersionKHR & setMinor( uint8_t minor_ ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion & setMinor( uint8_t minor_ ) VULKAN_HPP_NOEXCEPT
{
minor = minor_;
return *this;
}
- ConformanceVersionKHR & setSubminor( uint8_t subminor_ ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion & setSubminor( uint8_t subminor_ ) VULKAN_HPP_NOEXCEPT
{
subminor = subminor_;
return *this;
}
- ConformanceVersionKHR & setPatch( uint8_t patch_ ) VULKAN_HPP_NOEXCEPT
+ ConformanceVersion & setPatch( uint8_t patch_ ) VULKAN_HPP_NOEXCEPT
{
patch = patch_;
return *this;
}
- operator VkConformanceVersionKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkConformanceVersion const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkConformanceVersionKHR*>( this );
+ return *reinterpret_cast<const VkConformanceVersion*>( this );
}
- operator VkConformanceVersionKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkConformanceVersion &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkConformanceVersionKHR*>( this );
+ return *reinterpret_cast<VkConformanceVersion*>( this );
}
- bool operator==( ConformanceVersionKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( ConformanceVersion const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( major == rhs.major )
&& ( minor == rhs.minor )
@@ -26546,89 +25877,54 @@ namespace VULKAN_HPP_NAMESPACE
&& ( patch == rhs.patch );
}
- bool operator!=( ConformanceVersionKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( ConformanceVersion const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
public:
- uint8_t major;
- uint8_t minor;
- uint8_t subminor;
- uint8_t patch;
+ uint8_t major = {};
+ uint8_t minor = {};
+ uint8_t subminor = {};
+ uint8_t patch = {};
};
- static_assert( sizeof( ConformanceVersionKHR ) == sizeof( VkConformanceVersionKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<ConformanceVersionKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct CooperativeMatrixPropertiesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( uint32_t MSize_ = 0,
- uint32_t NSize_ = 0,
- uint32_t KSize_ = 0,
- vk::ComponentTypeNV AType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV BType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV CType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV DType_ = vk::ComponentTypeNV::eFloat16,
- vk::ScopeNV scope_ = vk::ScopeNV::eDevice ) VULKAN_HPP_NOEXCEPT
- : MSize( MSize_ )
- , NSize( NSize_ )
- , KSize( KSize_ )
- , AType( AType_ )
- , BType( BType_ )
- , CType( CType_ )
- , DType( DType_ )
- , scope( scope_ )
- {}
-
- CooperativeMatrixPropertiesNV( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCooperativeMatrixPropertiesNV*>(this) = rhs;
- }
-
- CooperativeMatrixPropertiesNV& operator=( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCooperativeMatrixPropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCooperativeMatrixPropertiesNV;
- void* pNext = nullptr;
- uint32_t MSize;
- uint32_t NSize;
- uint32_t KSize;
- vk::ComponentTypeNV AType;
- vk::ComponentTypeNV BType;
- vk::ComponentTypeNV CType;
- vk::ComponentTypeNV DType;
- vk::ScopeNV scope;
- };
- static_assert( sizeof( CooperativeMatrixPropertiesNV ) == sizeof( VkCooperativeMatrixPropertiesNV ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( ConformanceVersion ) == sizeof( VkConformanceVersion ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<ConformanceVersion>::value, "struct wrapper is not a standard layout!" );
- struct CooperativeMatrixPropertiesNV : public layout::CooperativeMatrixPropertiesNV
+ struct CooperativeMatrixPropertiesNV
{
- VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( uint32_t MSize_ = 0,
- uint32_t NSize_ = 0,
- uint32_t KSize_ = 0,
- vk::ComponentTypeNV AType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV BType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV CType_ = vk::ComponentTypeNV::eFloat16,
- vk::ComponentTypeNV DType_ = vk::ComponentTypeNV::eFloat16,
- vk::ScopeNV scope_ = vk::ScopeNV::eDevice ) VULKAN_HPP_NOEXCEPT
- : layout::CooperativeMatrixPropertiesNV( MSize_, NSize_, KSize_, AType_, BType_, CType_, DType_, scope_ )
+ VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( uint32_t MSize_ = {},
+ uint32_t NSize_ = {},
+ uint32_t KSize_ = {},
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV AType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16,
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV BType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16,
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV CType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16,
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV DType_ = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16,
+ VULKAN_HPP_NAMESPACE::ScopeNV scope_ = VULKAN_HPP_NAMESPACE::ScopeNV::eDevice ) VULKAN_HPP_NOEXCEPT
+ : MSize( MSize_ )
+ , NSize( NSize_ )
+ , KSize( KSize_ )
+ , AType( AType_ )
+ , BType( BType_ )
+ , CType( CType_ )
+ , DType( DType_ )
+ , scope( scope_ )
{}
+ VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV ) - offsetof( CooperativeMatrixPropertiesNV, pNext ) );
+ return *this;
+ }
+
CooperativeMatrixPropertiesNV( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CooperativeMatrixPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
CooperativeMatrixPropertiesNV& operator=( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CooperativeMatrixPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV const *>(&rhs);
return *this;
}
@@ -26656,31 +25952,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CooperativeMatrixPropertiesNV & setAType( vk::ComponentTypeNV AType_ ) VULKAN_HPP_NOEXCEPT
+ CooperativeMatrixPropertiesNV & setAType( VULKAN_HPP_NAMESPACE::ComponentTypeNV AType_ ) VULKAN_HPP_NOEXCEPT
{
AType = AType_;
return *this;
}
- CooperativeMatrixPropertiesNV & setBType( vk::ComponentTypeNV BType_ ) VULKAN_HPP_NOEXCEPT
+ CooperativeMatrixPropertiesNV & setBType( VULKAN_HPP_NAMESPACE::ComponentTypeNV BType_ ) VULKAN_HPP_NOEXCEPT
{
BType = BType_;
return *this;
}
- CooperativeMatrixPropertiesNV & setCType( vk::ComponentTypeNV CType_ ) VULKAN_HPP_NOEXCEPT
+ CooperativeMatrixPropertiesNV & setCType( VULKAN_HPP_NAMESPACE::ComponentTypeNV CType_ ) VULKAN_HPP_NOEXCEPT
{
CType = CType_;
return *this;
}
- CooperativeMatrixPropertiesNV & setDType( vk::ComponentTypeNV DType_ ) VULKAN_HPP_NOEXCEPT
+ CooperativeMatrixPropertiesNV & setDType( VULKAN_HPP_NAMESPACE::ComponentTypeNV DType_ ) VULKAN_HPP_NOEXCEPT
{
DType = DType_;
return *this;
}
- CooperativeMatrixPropertiesNV & setScope( vk::ScopeNV scope_ ) VULKAN_HPP_NOEXCEPT
+ CooperativeMatrixPropertiesNV & setScope( VULKAN_HPP_NAMESPACE::ScopeNV scope_ ) VULKAN_HPP_NOEXCEPT
{
scope = scope_;
return *this;
@@ -26715,77 +26011,53 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CooperativeMatrixPropertiesNV::sType;
+ public:
+ const 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::eFloat16;
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV BType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16;
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV CType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16;
+ VULKAN_HPP_NAMESPACE::ComponentTypeNV DType = VULKAN_HPP_NAMESPACE::ComponentTypeNV::eFloat16;
+ VULKAN_HPP_NAMESPACE::ScopeNV scope = VULKAN_HPP_NAMESPACE::ScopeNV::eDevice;
};
static_assert( sizeof( CooperativeMatrixPropertiesNV ) == sizeof( VkCooperativeMatrixPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CooperativeMatrixPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct CopyDescriptorSet
- {
- protected:
- VULKAN_HPP_CONSTEXPR CopyDescriptorSet( vk::DescriptorSet srcSet_ = vk::DescriptorSet(),
- uint32_t srcBinding_ = 0,
- uint32_t srcArrayElement_ = 0,
- vk::DescriptorSet dstSet_ = vk::DescriptorSet(),
- uint32_t dstBinding_ = 0,
- uint32_t dstArrayElement_ = 0,
- uint32_t descriptorCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : srcSet( srcSet_ )
- , srcBinding( srcBinding_ )
- , srcArrayElement( srcArrayElement_ )
- , dstSet( dstSet_ )
- , dstBinding( dstBinding_ )
- , dstArrayElement( dstArrayElement_ )
- , descriptorCount( descriptorCount_ )
- {}
-
- CopyDescriptorSet( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCopyDescriptorSet*>(this) = rhs;
- }
-
- CopyDescriptorSet& operator=( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkCopyDescriptorSet*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eCopyDescriptorSet;
- const void* pNext = nullptr;
- vk::DescriptorSet srcSet;
- uint32_t srcBinding;
- uint32_t srcArrayElement;
- vk::DescriptorSet dstSet;
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- };
- static_assert( sizeof( CopyDescriptorSet ) == sizeof( VkCopyDescriptorSet ), "layout struct and wrapper have different size!" );
- }
-
- struct CopyDescriptorSet : public layout::CopyDescriptorSet
- {
- VULKAN_HPP_CONSTEXPR CopyDescriptorSet( vk::DescriptorSet srcSet_ = vk::DescriptorSet(),
- uint32_t srcBinding_ = 0,
- uint32_t srcArrayElement_ = 0,
- vk::DescriptorSet dstSet_ = vk::DescriptorSet(),
- uint32_t dstBinding_ = 0,
- uint32_t dstArrayElement_ = 0,
- uint32_t descriptorCount_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::CopyDescriptorSet( srcSet_, srcBinding_, srcArrayElement_, dstSet_, dstBinding_, dstArrayElement_, descriptorCount_ )
+ struct CopyDescriptorSet
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcSet( srcSet_ )
+ , srcBinding( srcBinding_ )
+ , srcArrayElement( srcArrayElement_ )
+ , dstSet( dstSet_ )
+ , dstBinding( dstBinding_ )
+ , dstArrayElement( dstArrayElement_ )
+ , descriptorCount( descriptorCount_ )
{}
+ VULKAN_HPP_NAMESPACE::CopyDescriptorSet & operator=( VULKAN_HPP_NAMESPACE::CopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::CopyDescriptorSet ) - offsetof( CopyDescriptorSet, pNext ) );
+ return *this;
+ }
+
CopyDescriptorSet( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::CopyDescriptorSet( rhs )
- {}
+ {
+ *this = rhs;
+ }
CopyDescriptorSet& operator=( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::CopyDescriptorSet::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::CopyDescriptorSet const *>(&rhs);
return *this;
}
@@ -26795,7 +26067,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CopyDescriptorSet & setSrcSet( vk::DescriptorSet srcSet_ ) VULKAN_HPP_NOEXCEPT
+ CopyDescriptorSet & setSrcSet( VULKAN_HPP_NAMESPACE::DescriptorSet srcSet_ ) VULKAN_HPP_NOEXCEPT
{
srcSet = srcSet_;
return *this;
@@ -26813,7 +26085,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- CopyDescriptorSet & setDstSet( vk::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT
+ CopyDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT
{
dstSet = dstSet_;
return *this;
@@ -26865,67 +26137,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::CopyDescriptorSet::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( CopyDescriptorSet ) == sizeof( VkCopyDescriptorSet ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<CopyDescriptorSet>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct D3D12FenceSubmitInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = 0,
- const uint64_t* pWaitSemaphoreValues_ = nullptr,
- uint32_t signalSemaphoreValuesCount_ = 0,
- const uint64_t* pSignalSemaphoreValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreValuesCount( waitSemaphoreValuesCount_ )
- , pWaitSemaphoreValues( pWaitSemaphoreValues_ )
- , signalSemaphoreValuesCount( signalSemaphoreValuesCount_ )
- , pSignalSemaphoreValues( pSignalSemaphoreValues_ )
- {}
-
- D3D12FenceSubmitInfoKHR( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(this) = rhs;
- }
-
- D3D12FenceSubmitInfoKHR& operator=( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreValuesCount;
- const uint64_t* pWaitSemaphoreValues;
- uint32_t signalSemaphoreValuesCount;
- const uint64_t* pSignalSemaphoreValues;
- };
- static_assert( sizeof( D3D12FenceSubmitInfoKHR ) == sizeof( VkD3D12FenceSubmitInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct D3D12FenceSubmitInfoKHR : public layout::D3D12FenceSubmitInfoKHR
+ struct D3D12FenceSubmitInfoKHR
{
- VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = 0,
- const uint64_t* pWaitSemaphoreValues_ = nullptr,
- uint32_t signalSemaphoreValuesCount_ = 0,
- const uint64_t* pSignalSemaphoreValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::D3D12FenceSubmitInfoKHR( waitSemaphoreValuesCount_, pWaitSemaphoreValues_, signalSemaphoreValuesCount_, pSignalSemaphoreValues_ )
+ VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = {},
+ const uint64_t* pWaitSemaphoreValues_ = {},
+ uint32_t signalSemaphoreValuesCount_ = {},
+ const uint64_t* pSignalSemaphoreValues_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreValuesCount( waitSemaphoreValuesCount_ )
+ , pWaitSemaphoreValues( pWaitSemaphoreValues_ )
+ , signalSemaphoreValuesCount( signalSemaphoreValuesCount_ )
+ , pSignalSemaphoreValues( pSignalSemaphoreValues_ )
{}
+ VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR & operator=( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR ) - offsetof( D3D12FenceSubmitInfoKHR, pNext ) );
+ return *this;
+ }
+
D3D12FenceSubmitInfoKHR( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::D3D12FenceSubmitInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
D3D12FenceSubmitInfoKHR& operator=( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::D3D12FenceSubmitInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR const *>(&rhs);
return *this;
}
@@ -26984,60 +26237,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::D3D12FenceSubmitInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR;
+ const void* pNext = {};
+ uint32_t waitSemaphoreValuesCount = {};
+ const uint64_t* pWaitSemaphoreValues = {};
+ uint32_t signalSemaphoreValuesCount = {};
+ const uint64_t* pSignalSemaphoreValues = {};
};
static_assert( sizeof( D3D12FenceSubmitInfoKHR ) == sizeof( VkD3D12FenceSubmitInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<D3D12FenceSubmitInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct DebugMarkerMarkerInfoEXT
{
- struct DebugMarkerMarkerInfoEXT
+ VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( const char* pMarkerName_ = {},
+ std::array<float,4> const& color_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pMarkerName( pMarkerName_ )
+ , color{}
{
- protected:
- VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( const char* pMarkerName_ = nullptr,
- std::array<float,4> const& color_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : pMarkerName( pMarkerName_ )
- , color{}
- {
- vk::ConstExpressionArrayCopy<float,4,4>::copy( color, color_ );
- }
-
- DebugMarkerMarkerInfoEXT( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>(this) = rhs;
- }
-
- DebugMarkerMarkerInfoEXT& operator=( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT;
- const void* pNext = nullptr;
- const char* pMarkerName;
- float color[4];
- };
- static_assert( sizeof( DebugMarkerMarkerInfoEXT ) == sizeof( VkDebugMarkerMarkerInfoEXT ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,4,4>::copy( color, color_ );
+ }
- struct DebugMarkerMarkerInfoEXT : public layout::DebugMarkerMarkerInfoEXT
- {
- VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( const char* pMarkerName_ = nullptr,
- std::array<float,4> const& color_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerMarkerInfoEXT( pMarkerName_, color_ )
- {}
+ VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT ) - offsetof( DebugMarkerMarkerInfoEXT, pNext ) );
+ return *this;
+ }
DebugMarkerMarkerInfoEXT( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerMarkerInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugMarkerMarkerInfoEXT& operator=( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugMarkerMarkerInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT const *>(&rhs);
return *this;
}
@@ -27082,61 +26317,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugMarkerMarkerInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT;
+ const void* pNext = {};
+ const char* pMarkerName = {};
+ float color[4] = {};
};
static_assert( sizeof( DebugMarkerMarkerInfoEXT ) == sizeof( VkDebugMarkerMarkerInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugMarkerMarkerInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DebugMarkerObjectNameInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( vk::DebugReportObjectTypeEXT objectType_ = vk::DebugReportObjectTypeEXT::eUnknown,
- uint64_t object_ = 0,
- const char* pObjectName_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : objectType( objectType_ )
- , object( object_ )
- , pObjectName( pObjectName_ )
- {}
-
- DebugMarkerObjectNameInfoEXT( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>(this) = rhs;
- }
-
- DebugMarkerObjectNameInfoEXT& operator=( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT;
- const void* pNext = nullptr;
- vk::DebugReportObjectTypeEXT objectType;
- uint64_t object;
- const char* pObjectName;
- };
- static_assert( sizeof( DebugMarkerObjectNameInfoEXT ) == sizeof( VkDebugMarkerObjectNameInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugMarkerObjectNameInfoEXT : public layout::DebugMarkerObjectNameInfoEXT
+ struct DebugMarkerObjectNameInfoEXT
{
- VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( vk::DebugReportObjectTypeEXT objectType_ = vk::DebugReportObjectTypeEXT::eUnknown,
- uint64_t object_ = 0,
- const char* pObjectName_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerObjectNameInfoEXT( objectType_, object_, pObjectName_ )
+ VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown,
+ uint64_t object_ = {},
+ const char* pObjectName_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectType( objectType_ )
+ , object( object_ )
+ , pObjectName( pObjectName_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT ) - offsetof( DebugMarkerObjectNameInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugMarkerObjectNameInfoEXT( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerObjectNameInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugMarkerObjectNameInfoEXT& operator=( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugMarkerObjectNameInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT const *>(&rhs);
return *this;
}
@@ -27146,7 +26359,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugMarkerObjectNameInfoEXT & setObjectType( vk::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT
+ DebugMarkerObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT
{
objectType = objectType_;
return *this;
@@ -27188,69 +26401,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugMarkerObjectNameInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DebugMarkerObjectNameInfoEXT ) == sizeof( VkDebugMarkerObjectNameInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugMarkerObjectNameInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DebugMarkerObjectTagInfoEXT
{
- struct DebugMarkerObjectTagInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugMarkerObjectTagInfoEXT( vk::DebugReportObjectTypeEXT objectType_ = vk::DebugReportObjectTypeEXT::eUnknown,
- uint64_t object_ = 0,
- uint64_t tagName_ = 0,
- size_t tagSize_ = 0,
- const void* pTag_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : objectType( objectType_ )
- , object( object_ )
- , tagName( tagName_ )
- , tagSize( tagSize_ )
- , pTag( pTag_ )
- {}
-
- DebugMarkerObjectTagInfoEXT( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>(this) = rhs;
- }
-
- DebugMarkerObjectTagInfoEXT& operator=( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT;
- const void* pNext = nullptr;
- vk::DebugReportObjectTypeEXT objectType;
- uint64_t object;
- uint64_t tagName;
- size_t tagSize;
- const void* pTag;
- };
- static_assert( sizeof( DebugMarkerObjectTagInfoEXT ) == sizeof( VkDebugMarkerObjectTagInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugMarkerObjectTagInfoEXT : public layout::DebugMarkerObjectTagInfoEXT
- {
- VULKAN_HPP_CONSTEXPR DebugMarkerObjectTagInfoEXT( vk::DebugReportObjectTypeEXT objectType_ = vk::DebugReportObjectTypeEXT::eUnknown,
- uint64_t object_ = 0,
- uint64_t tagName_ = 0,
- size_t tagSize_ = 0,
- const void* pTag_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerObjectTagInfoEXT( objectType_, object_, tagName_, tagSize_, pTag_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectType( objectType_ )
+ , object( object_ )
+ , tagName( tagName_ )
+ , tagSize( tagSize_ )
+ , pTag( pTag_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT ) - offsetof( DebugMarkerObjectTagInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugMarkerObjectTagInfoEXT( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugMarkerObjectTagInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugMarkerObjectTagInfoEXT& operator=( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugMarkerObjectTagInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT const *>(&rhs);
return *this;
}
@@ -27260,7 +26448,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugMarkerObjectTagInfoEXT & setObjectType( vk::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT
+ DebugMarkerObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT
{
objectType = objectType_;
return *this;
@@ -27316,61 +26504,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugMarkerObjectTagInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DebugMarkerObjectTagInfoEXT ) == sizeof( VkDebugMarkerObjectTagInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugMarkerObjectTagInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DebugReportCallbackCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( vk::DebugReportFlagsEXT flags_ = vk::DebugReportFlagsEXT(),
- PFN_vkDebugReportCallbackEXT pfnCallback_ = nullptr,
- void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pfnCallback( pfnCallback_ )
- , pUserData( pUserData_ )
- {}
-
- DebugReportCallbackCreateInfoEXT( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(this) = rhs;
- }
-
- DebugReportCallbackCreateInfoEXT& operator=( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT;
- const void* pNext = nullptr;
- vk::DebugReportFlagsEXT flags;
- PFN_vkDebugReportCallbackEXT pfnCallback;
- void* pUserData;
- };
- static_assert( sizeof( DebugReportCallbackCreateInfoEXT ) == sizeof( VkDebugReportCallbackCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugReportCallbackCreateInfoEXT : public layout::DebugReportCallbackCreateInfoEXT
+ struct DebugReportCallbackCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( vk::DebugReportFlagsEXT flags_ = vk::DebugReportFlagsEXT(),
- PFN_vkDebugReportCallbackEXT pfnCallback_ = nullptr,
- void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugReportCallbackCreateInfoEXT( flags_, pfnCallback_, pUserData_ )
+ VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ = {},
+ PFN_vkDebugReportCallbackEXT pfnCallback_ = {},
+ void* pUserData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pfnCallback( pfnCallback_ )
+ , pUserData( pUserData_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT ) - offsetof( DebugReportCallbackCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugReportCallbackCreateInfoEXT( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugReportCallbackCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugReportCallbackCreateInfoEXT& operator=( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugReportCallbackCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -27380,7 +26549,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugReportCallbackCreateInfoEXT & setFlags( vk::DebugReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ DebugReportCallbackCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -27422,59 +26591,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugReportCallbackCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags = {};
+ PFN_vkDebugReportCallbackEXT pfnCallback = {};
+ void* pUserData = {};
};
static_assert( sizeof( DebugReportCallbackCreateInfoEXT ) == sizeof( VkDebugReportCallbackCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugReportCallbackCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DebugUtilsLabelEXT
{
- struct DebugUtilsLabelEXT
+ VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( const char* pLabelName_ = {},
+ std::array<float,4> const& color_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pLabelName( pLabelName_ )
+ , color{}
{
- protected:
- VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( const char* pLabelName_ = nullptr,
- std::array<float,4> const& color_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : pLabelName( pLabelName_ )
- , color{}
- {
- vk::ConstExpressionArrayCopy<float,4,4>::copy( color, color_ );
- }
-
- DebugUtilsLabelEXT( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsLabelEXT*>(this) = rhs;
- }
-
- DebugUtilsLabelEXT& operator=( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsLabelEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugUtilsLabelEXT;
- const void* pNext = nullptr;
- const char* pLabelName;
- float color[4];
- };
- static_assert( sizeof( DebugUtilsLabelEXT ) == sizeof( VkDebugUtilsLabelEXT ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,4,4>::copy( color, color_ );
+ }
- struct DebugUtilsLabelEXT : public layout::DebugUtilsLabelEXT
- {
- VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( const char* pLabelName_ = nullptr,
- std::array<float,4> const& color_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsLabelEXT( pLabelName_, color_ )
- {}
+ VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & operator=( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT ) - offsetof( DebugUtilsLabelEXT, pNext ) );
+ return *this;
+ }
DebugUtilsLabelEXT( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsLabelEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugUtilsLabelEXT& operator=( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugUtilsLabelEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT const *>(&rhs);
return *this;
}
@@ -27519,61 +26669,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugUtilsLabelEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsLabelEXT;
+ const void* pNext = {};
+ const char* pLabelName = {};
+ float color[4] = {};
};
static_assert( sizeof( DebugUtilsLabelEXT ) == sizeof( VkDebugUtilsLabelEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugUtilsLabelEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DebugUtilsObjectNameInfoEXT
{
- struct DebugUtilsObjectNameInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( vk::ObjectType objectType_ = vk::ObjectType::eUnknown,
- uint64_t objectHandle_ = 0,
- const char* pObjectName_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : objectType( objectType_ )
- , objectHandle( objectHandle_ )
- , pObjectName( pObjectName_ )
- {}
-
- DebugUtilsObjectNameInfoEXT( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsObjectNameInfoEXT*>(this) = rhs;
- }
-
- DebugUtilsObjectNameInfoEXT& operator=( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsObjectNameInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugUtilsObjectNameInfoEXT;
- const void* pNext = nullptr;
- vk::ObjectType objectType;
- uint64_t objectHandle;
- const char* pObjectName;
- };
- static_assert( sizeof( DebugUtilsObjectNameInfoEXT ) == sizeof( VkDebugUtilsObjectNameInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugUtilsObjectNameInfoEXT : public layout::DebugUtilsObjectNameInfoEXT
- {
- VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( vk::ObjectType objectType_ = vk::ObjectType::eUnknown,
- uint64_t objectHandle_ = 0,
- const char* pObjectName_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsObjectNameInfoEXT( objectType_, objectHandle_, pObjectName_ )
+ VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown,
+ uint64_t objectHandle_ = {},
+ const char* pObjectName_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectType( objectType_ )
+ , objectHandle( objectHandle_ )
+ , pObjectName( pObjectName_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT ) - offsetof( DebugUtilsObjectNameInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugUtilsObjectNameInfoEXT( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsObjectNameInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugUtilsObjectNameInfoEXT& operator=( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugUtilsObjectNameInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT const *>(&rhs);
return *this;
}
@@ -27583,7 +26711,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsObjectNameInfoEXT & setObjectType( vk::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT
{
objectType = objectType_;
return *this;
@@ -27625,89 +26753,54 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugUtilsObjectNameInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DebugUtilsObjectNameInfoEXT ) == sizeof( VkDebugUtilsObjectNameInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugUtilsObjectNameInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DebugUtilsMessengerCallbackDataEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCallbackDataEXT( vk::DebugUtilsMessengerCallbackDataFlagsEXT flags_ = vk::DebugUtilsMessengerCallbackDataFlagsEXT(),
- const char* pMessageIdName_ = nullptr,
- int32_t messageIdNumber_ = 0,
- const char* pMessage_ = nullptr,
- uint32_t queueLabelCount_ = 0,
- const vk::DebugUtilsLabelEXT* pQueueLabels_ = nullptr,
- uint32_t cmdBufLabelCount_ = 0,
- const vk::DebugUtilsLabelEXT* pCmdBufLabels_ = nullptr,
- uint32_t objectCount_ = 0,
- const vk::DebugUtilsObjectNameInfoEXT* pObjects_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pMessageIdName( pMessageIdName_ )
- , messageIdNumber( messageIdNumber_ )
- , pMessage( pMessage_ )
- , queueLabelCount( queueLabelCount_ )
- , pQueueLabels( pQueueLabels_ )
- , cmdBufLabelCount( cmdBufLabelCount_ )
- , pCmdBufLabels( pCmdBufLabels_ )
- , objectCount( objectCount_ )
- , pObjects( pObjects_ )
- {}
-
- DebugUtilsMessengerCallbackDataEXT( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsMessengerCallbackDataEXT*>(this) = rhs;
- }
-
- DebugUtilsMessengerCallbackDataEXT& operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsMessengerCallbackDataEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugUtilsMessengerCallbackDataEXT;
- const void* pNext = nullptr;
- vk::DebugUtilsMessengerCallbackDataFlagsEXT flags;
- const char* pMessageIdName;
- int32_t messageIdNumber;
- const char* pMessage;
- uint32_t queueLabelCount;
- const vk::DebugUtilsLabelEXT* pQueueLabels;
- uint32_t cmdBufLabelCount;
- const vk::DebugUtilsLabelEXT* pCmdBufLabels;
- uint32_t objectCount;
- const vk::DebugUtilsObjectNameInfoEXT* pObjects;
- };
- static_assert( sizeof( DebugUtilsMessengerCallbackDataEXT ) == sizeof( VkDebugUtilsMessengerCallbackDataEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugUtilsMessengerCallbackDataEXT : public layout::DebugUtilsMessengerCallbackDataEXT
- {
- VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCallbackDataEXT( vk::DebugUtilsMessengerCallbackDataFlagsEXT flags_ = vk::DebugUtilsMessengerCallbackDataFlagsEXT(),
- const char* pMessageIdName_ = nullptr,
- int32_t messageIdNumber_ = 0,
- const char* pMessage_ = nullptr,
- uint32_t queueLabelCount_ = 0,
- const vk::DebugUtilsLabelEXT* pQueueLabels_ = nullptr,
- uint32_t cmdBufLabelCount_ = 0,
- const vk::DebugUtilsLabelEXT* pCmdBufLabels_ = nullptr,
- uint32_t objectCount_ = 0,
- const vk::DebugUtilsObjectNameInfoEXT* pObjects_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsMessengerCallbackDataEXT( flags_, pMessageIdName_, messageIdNumber_, pMessage_, queueLabelCount_, pQueueLabels_, cmdBufLabelCount_, pCmdBufLabels_, objectCount_, pObjects_ )
+ struct DebugUtilsMessengerCallbackDataEXT
+ {
+ VULKAN_HPP_CONSTEXPR 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pMessageIdName( pMessageIdName_ )
+ , messageIdNumber( messageIdNumber_ )
+ , pMessage( pMessage_ )
+ , queueLabelCount( queueLabelCount_ )
+ , pQueueLabels( pQueueLabels_ )
+ , cmdBufLabelCount( cmdBufLabelCount_ )
+ , pCmdBufLabels( pCmdBufLabels_ )
+ , objectCount( objectCount_ )
+ , pObjects( pObjects_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & operator=( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT ) - offsetof( DebugUtilsMessengerCallbackDataEXT, pNext ) );
+ return *this;
+ }
+
DebugUtilsMessengerCallbackDataEXT( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsMessengerCallbackDataEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugUtilsMessengerCallbackDataEXT& operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugUtilsMessengerCallbackDataEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT const *>(&rhs);
return *this;
}
@@ -27717,7 +26810,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsMessengerCallbackDataEXT & setFlags( vk::DebugUtilsMessengerCallbackDataFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCallbackDataEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -27747,7 +26840,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsMessengerCallbackDataEXT & setPQueueLabels( const vk::DebugUtilsLabelEXT* pQueueLabels_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCallbackDataEXT & setPQueueLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pQueueLabels_ ) VULKAN_HPP_NOEXCEPT
{
pQueueLabels = pQueueLabels_;
return *this;
@@ -27759,7 +26852,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsMessengerCallbackDataEXT & setPCmdBufLabels( const vk::DebugUtilsLabelEXT* pCmdBufLabels_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCallbackDataEXT & setPCmdBufLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pCmdBufLabels_ ) VULKAN_HPP_NOEXCEPT
{
pCmdBufLabels = pCmdBufLabels_;
return *this;
@@ -27771,7 +26864,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsMessengerCallbackDataEXT & setPObjects( const vk::DebugUtilsObjectNameInfoEXT* pObjects_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCallbackDataEXT & setPObjects( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT* pObjects_ ) VULKAN_HPP_NOEXCEPT
{
pObjects = pObjects_;
return *this;
@@ -27808,69 +26901,51 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugUtilsMessengerCallbackDataEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DebugUtilsMessengerCallbackDataEXT ) == sizeof( VkDebugUtilsMessengerCallbackDataEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugUtilsMessengerCallbackDataEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DebugUtilsMessengerCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( vk::DebugUtilsMessengerCreateFlagsEXT flags_ = vk::DebugUtilsMessengerCreateFlagsEXT(),
- vk::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = vk::DebugUtilsMessageSeverityFlagsEXT(),
- vk::DebugUtilsMessageTypeFlagsEXT messageType_ = vk::DebugUtilsMessageTypeFlagsEXT(),
- PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ = nullptr,
- void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , messageSeverity( messageSeverity_ )
- , messageType( messageType_ )
- , pfnUserCallback( pfnUserCallback_ )
- , pUserData( pUserData_ )
- {}
-
- DebugUtilsMessengerCreateInfoEXT( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(this) = rhs;
- }
-
- DebugUtilsMessengerCreateInfoEXT& operator=( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugUtilsMessengerCreateInfoEXT;
- const void* pNext = nullptr;
- vk::DebugUtilsMessengerCreateFlagsEXT flags;
- vk::DebugUtilsMessageSeverityFlagsEXT messageSeverity;
- vk::DebugUtilsMessageTypeFlagsEXT messageType;
- PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback;
- void* pUserData;
- };
- static_assert( sizeof( DebugUtilsMessengerCreateInfoEXT ) == sizeof( VkDebugUtilsMessengerCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugUtilsMessengerCreateInfoEXT : public layout::DebugUtilsMessengerCreateInfoEXT
+ struct DebugUtilsMessengerCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( vk::DebugUtilsMessengerCreateFlagsEXT flags_ = vk::DebugUtilsMessengerCreateFlagsEXT(),
- vk::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = vk::DebugUtilsMessageSeverityFlagsEXT(),
- vk::DebugUtilsMessageTypeFlagsEXT messageType_ = vk::DebugUtilsMessageTypeFlagsEXT(),
- PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ = nullptr,
- void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsMessengerCreateInfoEXT( flags_, messageSeverity_, messageType_, pfnUserCallback_, pUserData_ )
+ VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ = {},
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = {},
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ = {},
+ PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ = {},
+ void* pUserData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , messageSeverity( messageSeverity_ )
+ , messageType( messageType_ )
+ , pfnUserCallback( pfnUserCallback_ )
+ , pUserData( pUserData_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT ) - offsetof( DebugUtilsMessengerCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugUtilsMessengerCreateInfoEXT( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsMessengerCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugUtilsMessengerCreateInfoEXT& operator=( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugUtilsMessengerCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -27880,19 +26955,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsMessengerCreateInfoEXT & setFlags( vk::DebugUtilsMessengerCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- DebugUtilsMessengerCreateInfoEXT & setMessageSeverity( vk::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCreateInfoEXT & setMessageSeverity( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ ) VULKAN_HPP_NOEXCEPT
{
messageSeverity = messageSeverity_;
return *this;
}
- DebugUtilsMessengerCreateInfoEXT & setMessageType( vk::DebugUtilsMessageTypeFlagsEXT messageType_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsMessengerCreateInfoEXT & setMessageType( VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ ) VULKAN_HPP_NOEXCEPT
{
messageType = messageType_;
return *this;
@@ -27936,69 +27011,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugUtilsMessengerCreateInfoEXT::sType;
+ public:
+ const 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 = {};
+ PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback = {};
+ void* pUserData = {};
};
static_assert( sizeof( DebugUtilsMessengerCreateInfoEXT ) == sizeof( VkDebugUtilsMessengerCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugUtilsMessengerCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DebugUtilsObjectTagInfoEXT
{
- struct DebugUtilsObjectTagInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( vk::ObjectType objectType_ = vk::ObjectType::eUnknown,
- uint64_t objectHandle_ = 0,
- uint64_t tagName_ = 0,
- size_t tagSize_ = 0,
- const void* pTag_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : objectType( objectType_ )
- , objectHandle( objectHandle_ )
- , tagName( tagName_ )
- , tagSize( tagSize_ )
- , pTag( pTag_ )
- {}
-
- DebugUtilsObjectTagInfoEXT( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsObjectTagInfoEXT*>(this) = rhs;
- }
-
- DebugUtilsObjectTagInfoEXT& operator=( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDebugUtilsObjectTagInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDebugUtilsObjectTagInfoEXT;
- const void* pNext = nullptr;
- vk::ObjectType objectType;
- uint64_t objectHandle;
- uint64_t tagName;
- size_t tagSize;
- const void* pTag;
- };
- static_assert( sizeof( DebugUtilsObjectTagInfoEXT ) == sizeof( VkDebugUtilsObjectTagInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DebugUtilsObjectTagInfoEXT : public layout::DebugUtilsObjectTagInfoEXT
- {
- VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( vk::ObjectType objectType_ = vk::ObjectType::eUnknown,
- uint64_t objectHandle_ = 0,
- uint64_t tagName_ = 0,
- size_t tagSize_ = 0,
- const void* pTag_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsObjectTagInfoEXT( objectType_, objectHandle_, tagName_, tagSize_, pTag_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectType( objectType_ )
+ , objectHandle( objectHandle_ )
+ , tagName( tagName_ )
+ , tagSize( tagSize_ )
+ , pTag( pTag_ )
{}
+ VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT ) - offsetof( DebugUtilsObjectTagInfoEXT, pNext ) );
+ return *this;
+ }
+
DebugUtilsObjectTagInfoEXT( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DebugUtilsObjectTagInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DebugUtilsObjectTagInfoEXT& operator=( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DebugUtilsObjectTagInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT const *>(&rhs);
return *this;
}
@@ -28008,7 +27060,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DebugUtilsObjectTagInfoEXT & setObjectType( vk::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT
+ DebugUtilsObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT
{
objectType = objectType_;
return *this;
@@ -28064,53 +27116,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DebugUtilsObjectTagInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DebugUtilsObjectTagInfoEXT ) == sizeof( VkDebugUtilsObjectTagInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DebugUtilsObjectTagInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DedicatedAllocationBufferCreateInfoNV
{
- struct DedicatedAllocationBufferCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( vk::Bool32 dedicatedAllocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : dedicatedAllocation( dedicatedAllocation_ )
- {}
-
- DedicatedAllocationBufferCreateInfoNV( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(this) = rhs;
- }
-
- DedicatedAllocationBufferCreateInfoNV& operator=( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV;
- const void* pNext = nullptr;
- vk::Bool32 dedicatedAllocation;
- };
- static_assert( sizeof( DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct DedicatedAllocationBufferCreateInfoNV : public layout::DedicatedAllocationBufferCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( vk::Bool32 dedicatedAllocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationBufferCreateInfoNV( dedicatedAllocation_ )
+ VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : dedicatedAllocation( dedicatedAllocation_ )
{}
+ VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV ) - offsetof( DedicatedAllocationBufferCreateInfoNV, pNext ) );
+ return *this;
+ }
+
DedicatedAllocationBufferCreateInfoNV( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationBufferCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
DedicatedAllocationBufferCreateInfoNV& operator=( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DedicatedAllocationBufferCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV const *>(&rhs);
return *this;
}
@@ -28120,7 +27157,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DedicatedAllocationBufferCreateInfoNV & setDedicatedAllocation( vk::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT
+ DedicatedAllocationBufferCreateInfoNV & setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT
{
dedicatedAllocation = dedicatedAllocation_;
return *this;
@@ -28148,53 +27185,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DedicatedAllocationBufferCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {};
};
static_assert( sizeof( DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DedicatedAllocationBufferCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DedicatedAllocationImageCreateInfoNV
{
- struct DedicatedAllocationImageCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( vk::Bool32 dedicatedAllocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : dedicatedAllocation( dedicatedAllocation_ )
- {}
-
- DedicatedAllocationImageCreateInfoNV( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(this) = rhs;
- }
-
- DedicatedAllocationImageCreateInfoNV& operator=( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV;
- const void* pNext = nullptr;
- vk::Bool32 dedicatedAllocation;
- };
- static_assert( sizeof( DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct DedicatedAllocationImageCreateInfoNV : public layout::DedicatedAllocationImageCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( vk::Bool32 dedicatedAllocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationImageCreateInfoNV( dedicatedAllocation_ )
+ VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : dedicatedAllocation( dedicatedAllocation_ )
{}
+ VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV ) - offsetof( DedicatedAllocationImageCreateInfoNV, pNext ) );
+ return *this;
+ }
+
DedicatedAllocationImageCreateInfoNV( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationImageCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
DedicatedAllocationImageCreateInfoNV& operator=( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DedicatedAllocationImageCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV const *>(&rhs);
return *this;
}
@@ -28204,7 +27222,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DedicatedAllocationImageCreateInfoNV & setDedicatedAllocation( vk::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT
+ DedicatedAllocationImageCreateInfoNV & setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT
{
dedicatedAllocation = dedicatedAllocation_;
return *this;
@@ -28232,57 +27250,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DedicatedAllocationImageCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {};
};
static_assert( sizeof( DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DedicatedAllocationImageCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DedicatedAllocationMemoryAllocateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( vk::Image image_ = vk::Image(),
- vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : image( image_ )
- , buffer( buffer_ )
- {}
-
- DedicatedAllocationMemoryAllocateInfoNV( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(this) = rhs;
- }
-
- DedicatedAllocationMemoryAllocateInfoNV& operator=( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV;
- const void* pNext = nullptr;
- vk::Image image;
- vk::Buffer buffer;
- };
- static_assert( sizeof( DedicatedAllocationMemoryAllocateInfoNV ) == sizeof( VkDedicatedAllocationMemoryAllocateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct DedicatedAllocationMemoryAllocateInfoNV : public layout::DedicatedAllocationMemoryAllocateInfoNV
+ struct DedicatedAllocationMemoryAllocateInfoNV
{
- VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( vk::Image image_ = vk::Image(),
- vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationMemoryAllocateInfoNV( image_, buffer_ )
+ VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::Image image_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : image( image_ )
+ , buffer( buffer_ )
{}
+ VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV & operator=( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV ) - offsetof( DedicatedAllocationMemoryAllocateInfoNV, pNext ) );
+ return *this;
+ }
+
DedicatedAllocationMemoryAllocateInfoNV( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DedicatedAllocationMemoryAllocateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
DedicatedAllocationMemoryAllocateInfoNV& operator=( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DedicatedAllocationMemoryAllocateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV const *>(&rhs);
return *this;
}
@@ -28292,13 +27289,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DedicatedAllocationMemoryAllocateInfoNV & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ DedicatedAllocationMemoryAllocateInfoNV & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
}
- DedicatedAllocationMemoryAllocateInfoNV & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ DedicatedAllocationMemoryAllocateInfoNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
@@ -28327,17 +27324,20 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DedicatedAllocationMemoryAllocateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Image image = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
};
static_assert( sizeof( DedicatedAllocationMemoryAllocateInfoNV ) == sizeof( VkDedicatedAllocationMemoryAllocateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DedicatedAllocationMemoryAllocateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct DescriptorBufferInfo
{
- VULKAN_HPP_CONSTEXPR DescriptorBufferInfo( vk::Buffer buffer_ = vk::Buffer(),
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize range_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -28345,28 +27345,28 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorBufferInfo( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorBufferInfo*>(this) = rhs;
+ *this = rhs;
}
DescriptorBufferInfo& operator=( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorBufferInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorBufferInfo const *>(&rhs);
return *this;
}
- DescriptorBufferInfo & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorBufferInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- DescriptorBufferInfo & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorBufferInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- DescriptorBufferInfo & setRange( vk::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorBufferInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT
{
range = range_;
return *this;
@@ -28395,18 +27395,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Buffer buffer;
- vk::DeviceSize offset;
- vk::DeviceSize range;
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize offset = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize range = {};
};
static_assert( sizeof( DescriptorBufferInfo ) == sizeof( VkDescriptorBufferInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorBufferInfo>::value, "struct wrapper is not a standard layout!" );
struct DescriptorImageInfo
{
- VULKAN_HPP_CONSTEXPR DescriptorImageInfo( vk::Sampler sampler_ = vk::Sampler(),
- vk::ImageView imageView_ = vk::ImageView(),
- vk::ImageLayout imageLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -28414,28 +27414,28 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorImageInfo( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorImageInfo*>(this) = rhs;
+ *this = rhs;
}
DescriptorImageInfo& operator=( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorImageInfo*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorImageInfo const *>(&rhs);
return *this;
}
- DescriptorImageInfo & setSampler( vk::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorImageInfo & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT
{
sampler = sampler_;
return *this;
}
- DescriptorImageInfo & setImageView( vk::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorImageInfo & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT
{
imageView = imageView_;
return *this;
}
- DescriptorImageInfo & setImageLayout( vk::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorImageInfo & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT
{
imageLayout = imageLayout_;
return *this;
@@ -28464,33 +27464,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Sampler sampler;
- vk::ImageView imageView;
- vk::ImageLayout imageLayout;
+ VULKAN_HPP_NAMESPACE::Sampler sampler = {};
+ VULKAN_HPP_NAMESPACE::ImageView imageView = {};
+ VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined;
};
static_assert( sizeof( DescriptorImageInfo ) == sizeof( VkDescriptorImageInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorImageInfo>::value, "struct wrapper is not a standard layout!" );
struct DescriptorPoolSize
{
- VULKAN_HPP_CONSTEXPR DescriptorPoolSize( vk::DescriptorType type_ = vk::DescriptorType::eSampler,
- uint32_t descriptorCount_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR DescriptorPoolSize( VULKAN_HPP_NAMESPACE::DescriptorType type_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler,
+ uint32_t descriptorCount_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, descriptorCount( descriptorCount_ )
{}
DescriptorPoolSize( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorPoolSize*>(this) = rhs;
+ *this = rhs;
}
DescriptorPoolSize& operator=( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorPoolSize*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorPoolSize const *>(&rhs);
return *this;
}
- DescriptorPoolSize & setType( vk::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorPoolSize & setType( VULKAN_HPP_NAMESPACE::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
@@ -28524,65 +27524,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DescriptorType type;
- uint32_t descriptorCount;
+ VULKAN_HPP_NAMESPACE::DescriptorType type = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler;
+ uint32_t descriptorCount = {};
};
static_assert( sizeof( DescriptorPoolSize ) == sizeof( VkDescriptorPoolSize ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorPoolSize>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DescriptorPoolCreateInfo
{
- struct DescriptorPoolCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlags flags_ = vk::DescriptorPoolCreateFlags(),
- uint32_t maxSets_ = 0,
- uint32_t poolSizeCount_ = 0,
- const vk::DescriptorPoolSize* pPoolSizes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , maxSets( maxSets_ )
- , poolSizeCount( poolSizeCount_ )
- , pPoolSizes( pPoolSizes_ )
- {}
-
- DescriptorPoolCreateInfo( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorPoolCreateInfo*>(this) = rhs;
- }
-
- DescriptorPoolCreateInfo& operator=( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorPoolCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorPoolCreateInfo;
- const void* pNext = nullptr;
- vk::DescriptorPoolCreateFlags flags;
- uint32_t maxSets;
- uint32_t poolSizeCount;
- const vk::DescriptorPoolSize* pPoolSizes;
- };
- static_assert( sizeof( DescriptorPoolCreateInfo ) == sizeof( VkDescriptorPoolCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorPoolCreateInfo : public layout::DescriptorPoolCreateInfo
- {
- VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlags flags_ = vk::DescriptorPoolCreateFlags(),
- uint32_t maxSets_ = 0,
- uint32_t poolSizeCount_ = 0,
- const vk::DescriptorPoolSize* pPoolSizes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorPoolCreateInfo( flags_, maxSets_, poolSizeCount_, pPoolSizes_ )
+ VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ = {},
+ uint32_t maxSets_ = {},
+ uint32_t poolSizeCount_ = {},
+ const VULKAN_HPP_NAMESPACE::DescriptorPoolSize* pPoolSizes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , maxSets( maxSets_ )
+ , poolSizeCount( poolSizeCount_ )
+ , pPoolSizes( pPoolSizes_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo ) - offsetof( DescriptorPoolCreateInfo, pNext ) );
+ return *this;
+ }
+
DescriptorPoolCreateInfo( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorPoolCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorPoolCreateInfo& operator=( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorPoolCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const *>(&rhs);
return *this;
}
@@ -28592,7 +27565,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorPoolCreateInfo & setFlags( vk::DescriptorPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -28610,7 +27583,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorPoolCreateInfo & setPPoolSizes( const vk::DescriptorPoolSize* pPoolSizes_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorPoolCreateInfo & setPPoolSizes( const VULKAN_HPP_NAMESPACE::DescriptorPoolSize* pPoolSizes_ ) VULKAN_HPP_NOEXCEPT
{
pPoolSizes = pPoolSizes_;
return *this;
@@ -28641,53 +27614,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorPoolCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DescriptorPoolCreateInfo ) == sizeof( VkDescriptorPoolCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorPoolCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DescriptorPoolInlineUniformBlockCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfoEXT( uint32_t maxInlineUniformBlockBindings_ = 0 ) VULKAN_HPP_NOEXCEPT
- : maxInlineUniformBlockBindings( maxInlineUniformBlockBindings_ )
- {}
-
- DescriptorPoolInlineUniformBlockCreateInfoEXT( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorPoolInlineUniformBlockCreateInfoEXT*>(this) = rhs;
- }
-
- DescriptorPoolInlineUniformBlockCreateInfoEXT& operator=( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorPoolInlineUniformBlockCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfoEXT;
- const void* pNext = nullptr;
- uint32_t maxInlineUniformBlockBindings;
- };
- static_assert( sizeof( DescriptorPoolInlineUniformBlockCreateInfoEXT ) == sizeof( VkDescriptorPoolInlineUniformBlockCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorPoolInlineUniformBlockCreateInfoEXT : public layout::DescriptorPoolInlineUniformBlockCreateInfoEXT
+ struct DescriptorPoolInlineUniformBlockCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfoEXT( uint32_t maxInlineUniformBlockBindings_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorPoolInlineUniformBlockCreateInfoEXT( maxInlineUniformBlockBindings_ )
+ VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfoEXT( uint32_t maxInlineUniformBlockBindings_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxInlineUniformBlockBindings( maxInlineUniformBlockBindings_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfoEXT ) - offsetof( DescriptorPoolInlineUniformBlockCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
DescriptorPoolInlineUniformBlockCreateInfoEXT( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorPoolInlineUniformBlockCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorPoolInlineUniformBlockCreateInfoEXT& operator=( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorPoolInlineUniformBlockCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -28725,61 +27682,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorPoolInlineUniformBlockCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfoEXT;
+ const void* pNext = {};
+ uint32_t maxInlineUniformBlockBindings = {};
};
static_assert( sizeof( DescriptorPoolInlineUniformBlockCreateInfoEXT ) == sizeof( VkDescriptorPoolInlineUniformBlockCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorPoolInlineUniformBlockCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DescriptorSetAllocateInfo
{
- struct DescriptorSetAllocateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( vk::DescriptorPool descriptorPool_ = vk::DescriptorPool(),
- uint32_t descriptorSetCount_ = 0,
- const vk::DescriptorSetLayout* pSetLayouts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : descriptorPool( descriptorPool_ )
- , descriptorSetCount( descriptorSetCount_ )
- , pSetLayouts( pSetLayouts_ )
- {}
-
- DescriptorSetAllocateInfo( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetAllocateInfo*>(this) = rhs;
- }
-
- DescriptorSetAllocateInfo& operator=( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetAllocateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetAllocateInfo;
- const void* pNext = nullptr;
- vk::DescriptorPool descriptorPool;
- uint32_t descriptorSetCount;
- const vk::DescriptorSetLayout* pSetLayouts;
- };
- static_assert( sizeof( DescriptorSetAllocateInfo ) == sizeof( VkDescriptorSetAllocateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorSetAllocateInfo : public layout::DescriptorSetAllocateInfo
- {
- VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( vk::DescriptorPool descriptorPool_ = vk::DescriptorPool(),
- uint32_t descriptorSetCount_ = 0,
- const vk::DescriptorSetLayout* pSetLayouts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetAllocateInfo( descriptorPool_, descriptorSetCount_, pSetLayouts_ )
+ VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ = {},
+ uint32_t descriptorSetCount_ = {},
+ const VULKAN_HPP_NAMESPACE::DescriptorSetLayout* pSetLayouts_ = {} ) VULKAN_HPP_NOEXCEPT
+ : descriptorPool( descriptorPool_ )
+ , descriptorSetCount( descriptorSetCount_ )
+ , pSetLayouts( pSetLayouts_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo ) - offsetof( DescriptorSetAllocateInfo, pNext ) );
+ return *this;
+ }
+
DescriptorSetAllocateInfo( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetAllocateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorSetAllocateInfo& operator=( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetAllocateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const *>(&rhs);
return *this;
}
@@ -28789,7 +27723,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetAllocateInfo & setDescriptorPool( vk::DescriptorPool descriptorPool_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetAllocateInfo & setDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ ) VULKAN_HPP_NOEXCEPT
{
descriptorPool = descriptorPool_;
return *this;
@@ -28801,7 +27735,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetAllocateInfo & setPSetLayouts( const vk::DescriptorSetLayout* pSetLayouts_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetAllocateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout* pSetLayouts_ ) VULKAN_HPP_NOEXCEPT
{
pSetLayouts = pSetLayouts_;
return *this;
@@ -28831,19 +27765,23 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetAllocateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetAllocateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool = {};
+ uint32_t descriptorSetCount = {};
+ const VULKAN_HPP_NAMESPACE::DescriptorSetLayout* pSetLayouts = {};
};
static_assert( sizeof( DescriptorSetAllocateInfo ) == sizeof( VkDescriptorSetAllocateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorSetAllocateInfo>::value, "struct wrapper is not a standard layout!" );
struct DescriptorSetLayoutBinding
{
- VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBinding( uint32_t binding_ = 0,
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- uint32_t descriptorCount_ = 0,
- vk::ShaderStageFlags stageFlags_ = vk::ShaderStageFlags(),
- const vk::Sampler* pImmutableSamplers_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -28853,12 +27791,12 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorSetLayoutBinding( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorSetLayoutBinding*>(this) = rhs;
+ *this = rhs;
}
DescriptorSetLayoutBinding& operator=( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorSetLayoutBinding*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding const *>(&rhs);
return *this;
}
@@ -28868,7 +27806,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetLayoutBinding & setDescriptorType( vk::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBinding & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
{
descriptorType = descriptorType_;
return *this;
@@ -28880,13 +27818,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetLayoutBinding & setStageFlags( vk::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBinding & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
{
stageFlags = stageFlags_;
return *this;
}
- DescriptorSetLayoutBinding & setPImmutableSamplers( const vk::Sampler* pImmutableSamplers_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBinding & setPImmutableSamplers( const VULKAN_HPP_NAMESPACE::Sampler* pImmutableSamplers_ ) VULKAN_HPP_NOEXCEPT
{
pImmutableSamplers = pImmutableSamplers_;
return *this;
@@ -28917,92 +27855,69 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t binding;
- vk::DescriptorType descriptorType;
- uint32_t descriptorCount;
- vk::ShaderStageFlags stageFlags;
- const vk::Sampler* pImmutableSamplers;
+ 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 = {};
};
static_assert( sizeof( DescriptorSetLayoutBinding ) == sizeof( VkDescriptorSetLayoutBinding ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorSetLayoutBinding>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DescriptorSetLayoutBindingFlagsCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfoEXT( uint32_t bindingCount_ = 0,
- const vk::DescriptorBindingFlagsEXT* pBindingFlags_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : bindingCount( bindingCount_ )
- , pBindingFlags( pBindingFlags_ )
- {}
-
- DescriptorSetLayoutBindingFlagsCreateInfoEXT( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(this) = rhs;
- }
-
- DescriptorSetLayoutBindingFlagsCreateInfoEXT& operator=( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfoEXT;
- const void* pNext = nullptr;
- uint32_t bindingCount;
- const vk::DescriptorBindingFlagsEXT* pBindingFlags;
- };
- static_assert( sizeof( DescriptorSetLayoutBindingFlagsCreateInfoEXT ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorSetLayoutBindingFlagsCreateInfoEXT : public layout::DescriptorSetLayoutBindingFlagsCreateInfoEXT
+ struct DescriptorSetLayoutBindingFlagsCreateInfo
{
- VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfoEXT( uint32_t bindingCount_ = 0,
- const vk::DescriptorBindingFlagsEXT* pBindingFlags_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutBindingFlagsCreateInfoEXT( bindingCount_, pBindingFlags_ )
+ VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfo( uint32_t bindingCount_ = {},
+ const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags* pBindingFlags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : bindingCount( bindingCount_ )
+ , pBindingFlags( pBindingFlags_ )
{}
- DescriptorSetLayoutBindingFlagsCreateInfoEXT( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutBindingFlagsCreateInfoEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo ) - offsetof( DescriptorSetLayoutBindingFlagsCreateInfo, pNext ) );
+ return *this;
+ }
- DescriptorSetLayoutBindingFlagsCreateInfoEXT& operator=( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBindingFlagsCreateInfo( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetLayoutBindingFlagsCreateInfoEXT::operator=(rhs);
+ *this = rhs;
+ }
+
+ DescriptorSetLayoutBindingFlagsCreateInfo& operator=( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo const *>(&rhs);
return *this;
}
- DescriptorSetLayoutBindingFlagsCreateInfoEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBindingFlagsCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- DescriptorSetLayoutBindingFlagsCreateInfoEXT & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBindingFlagsCreateInfo & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT
{
bindingCount = bindingCount_;
return *this;
}
- DescriptorSetLayoutBindingFlagsCreateInfoEXT & setPBindingFlags( const vk::DescriptorBindingFlagsEXT* pBindingFlags_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutBindingFlagsCreateInfo & setPBindingFlags( const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags* pBindingFlags_ ) VULKAN_HPP_NOEXCEPT
{
pBindingFlags = pBindingFlags_;
return *this;
}
- operator VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetLayoutBindingFlagsCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>( this );
+ return *reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfo*>( this );
}
- operator VkDescriptorSetLayoutBindingFlagsCreateInfoEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetLayoutBindingFlagsCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>( this );
+ return *reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfo*>( this );
}
- bool operator==( DescriptorSetLayoutBindingFlagsCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( DescriptorSetLayoutBindingFlagsCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -29010,66 +27925,44 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pBindingFlags == rhs.pBindingFlags );
}
- bool operator!=( DescriptorSetLayoutBindingFlagsCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( DescriptorSetLayoutBindingFlagsCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetLayoutBindingFlagsCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo;
+ const void* pNext = {};
+ uint32_t bindingCount = {};
+ const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags* pBindingFlags = {};
};
- static_assert( sizeof( DescriptorSetLayoutBindingFlagsCreateInfoEXT ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<DescriptorSetLayoutBindingFlagsCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct DescriptorSetLayoutCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags flags_ = vk::DescriptorSetLayoutCreateFlags(),
- uint32_t bindingCount_ = 0,
- const vk::DescriptorSetLayoutBinding* pBindings_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , bindingCount( bindingCount_ )
- , pBindings( pBindings_ )
- {}
-
- DescriptorSetLayoutCreateInfo( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutCreateInfo*>(this) = rhs;
- }
-
- DescriptorSetLayoutCreateInfo& operator=( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo;
- const void* pNext = nullptr;
- vk::DescriptorSetLayoutCreateFlags flags;
- uint32_t bindingCount;
- const vk::DescriptorSetLayoutBinding* pBindings;
- };
- static_assert( sizeof( DescriptorSetLayoutCreateInfo ) == sizeof( VkDescriptorSetLayoutCreateInfo ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( DescriptorSetLayoutBindingFlagsCreateInfo ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<DescriptorSetLayoutBindingFlagsCreateInfo>::value, "struct wrapper is not a standard layout!" );
- struct DescriptorSetLayoutCreateInfo : public layout::DescriptorSetLayoutCreateInfo
+ struct DescriptorSetLayoutCreateInfo
{
- VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags flags_ = vk::DescriptorSetLayoutCreateFlags(),
- uint32_t bindingCount_ = 0,
- const vk::DescriptorSetLayoutBinding* pBindings_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutCreateInfo( flags_, bindingCount_, pBindings_ )
+ VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ = {},
+ uint32_t bindingCount_ = {},
+ const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding* pBindings_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , bindingCount( bindingCount_ )
+ , pBindings( pBindings_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo ) - offsetof( DescriptorSetLayoutCreateInfo, pNext ) );
+ return *this;
+ }
+
DescriptorSetLayoutCreateInfo( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorSetLayoutCreateInfo& operator=( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetLayoutCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const *>(&rhs);
return *this;
}
@@ -29079,7 +27972,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetLayoutCreateInfo & setFlags( vk::DescriptorSetLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -29091,7 +27984,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorSetLayoutCreateInfo & setPBindings( const vk::DescriptorSetLayoutBinding* pBindings_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetLayoutCreateInfo & setPBindings( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding* pBindings_ ) VULKAN_HPP_NOEXCEPT
{
pBindings = pBindings_;
return *this;
@@ -29121,52 +28014,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetLayoutCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags = {};
+ uint32_t bindingCount = {};
+ const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding* pBindings = {};
};
static_assert( sizeof( DescriptorSetLayoutCreateInfo ) == sizeof( VkDescriptorSetLayoutCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorSetLayoutCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DescriptorSetLayoutSupport
- {
- protected:
- DescriptorSetLayoutSupport() VULKAN_HPP_NOEXCEPT
- {}
-
- DescriptorSetLayoutSupport( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutSupport*>(this) = rhs;
- }
-
- DescriptorSetLayoutSupport& operator=( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetLayoutSupport*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetLayoutSupport;
- void* pNext = nullptr;
- vk::Bool32 supported;
- };
- static_assert( sizeof( DescriptorSetLayoutSupport ) == sizeof( VkDescriptorSetLayoutSupport ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorSetLayoutSupport : public layout::DescriptorSetLayoutSupport
+ struct DescriptorSetLayoutSupport
{
- DescriptorSetLayoutSupport() VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutSupport()
+ DescriptorSetLayoutSupport( VULKAN_HPP_NAMESPACE::Bool32 supported_ = {} ) VULKAN_HPP_NOEXCEPT
+ : supported( supported_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport ) - offsetof( DescriptorSetLayoutSupport, pNext ) );
+ return *this;
+ }
+
DescriptorSetLayoutSupport( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetLayoutSupport( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorSetLayoutSupport& operator=( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetLayoutSupport::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport const *>(&rhs);
return *this;
}
@@ -29192,89 +28069,68 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetLayoutSupport::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutSupport;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 supported = {};
};
static_assert( sizeof( DescriptorSetLayoutSupport ) == sizeof( VkDescriptorSetLayoutSupport ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorSetLayoutSupport>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DescriptorSetVariableDescriptorCountAllocateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfoEXT( uint32_t descriptorSetCount_ = 0,
- const uint32_t* pDescriptorCounts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : descriptorSetCount( descriptorSetCount_ )
- , pDescriptorCounts( pDescriptorCounts_ )
- {}
-
- DescriptorSetVariableDescriptorCountAllocateInfoEXT( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(this) = rhs;
- }
-
- DescriptorSetVariableDescriptorCountAllocateInfoEXT& operator=( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfoEXT;
- const void* pNext = nullptr;
- uint32_t descriptorSetCount;
- const uint32_t* pDescriptorCounts;
- };
- static_assert( sizeof( DescriptorSetVariableDescriptorCountAllocateInfoEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorSetVariableDescriptorCountAllocateInfoEXT : public layout::DescriptorSetVariableDescriptorCountAllocateInfoEXT
+ struct DescriptorSetVariableDescriptorCountAllocateInfo
{
- VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfoEXT( uint32_t descriptorSetCount_ = 0,
- const uint32_t* pDescriptorCounts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetVariableDescriptorCountAllocateInfoEXT( descriptorSetCount_, pDescriptorCounts_ )
+ VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfo( uint32_t descriptorSetCount_ = {},
+ const uint32_t* pDescriptorCounts_ = {} ) VULKAN_HPP_NOEXCEPT
+ : descriptorSetCount( descriptorSetCount_ )
+ , pDescriptorCounts( pDescriptorCounts_ )
{}
- DescriptorSetVariableDescriptorCountAllocateInfoEXT( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetVariableDescriptorCountAllocateInfoEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo ) - offsetof( DescriptorSetVariableDescriptorCountAllocateInfo, pNext ) );
+ return *this;
+ }
- DescriptorSetVariableDescriptorCountAllocateInfoEXT& operator=( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetVariableDescriptorCountAllocateInfo( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetVariableDescriptorCountAllocateInfoEXT::operator=(rhs);
+ *this = rhs;
+ }
+
+ DescriptorSetVariableDescriptorCountAllocateInfo& operator=( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo const *>(&rhs);
return *this;
}
- DescriptorSetVariableDescriptorCountAllocateInfoEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetVariableDescriptorCountAllocateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- DescriptorSetVariableDescriptorCountAllocateInfoEXT & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetVariableDescriptorCountAllocateInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT
{
descriptorSetCount = descriptorSetCount_;
return *this;
}
- DescriptorSetVariableDescriptorCountAllocateInfoEXT & setPDescriptorCounts( const uint32_t* pDescriptorCounts_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetVariableDescriptorCountAllocateInfo & setPDescriptorCounts( const uint32_t* pDescriptorCounts_ ) VULKAN_HPP_NOEXCEPT
{
pDescriptorCounts = pDescriptorCounts_;
return *this;
}
- operator VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetVariableDescriptorCountAllocateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>( this );
+ return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfo*>( this );
}
- operator VkDescriptorSetVariableDescriptorCountAllocateInfoEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetVariableDescriptorCountAllocateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>( this );
+ return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfo*>( this );
}
- bool operator==( DescriptorSetVariableDescriptorCountAllocateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( DescriptorSetVariableDescriptorCountAllocateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -29282,96 +28138,81 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pDescriptorCounts == rhs.pDescriptorCounts );
}
- bool operator!=( DescriptorSetVariableDescriptorCountAllocateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( DescriptorSetVariableDescriptorCountAllocateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetVariableDescriptorCountAllocateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo;
+ const void* pNext = {};
+ uint32_t descriptorSetCount = {};
+ const uint32_t* pDescriptorCounts = {};
};
- static_assert( sizeof( DescriptorSetVariableDescriptorCountAllocateInfoEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<DescriptorSetVariableDescriptorCountAllocateInfoEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( DescriptorSetVariableDescriptorCountAllocateInfo ) == sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<DescriptorSetVariableDescriptorCountAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DescriptorSetVariableDescriptorCountLayoutSupport
{
- struct DescriptorSetVariableDescriptorCountLayoutSupportEXT
- {
- protected:
- DescriptorSetVariableDescriptorCountLayoutSupportEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- DescriptorSetVariableDescriptorCountLayoutSupportEXT( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(this) = rhs;
- }
-
- DescriptorSetVariableDescriptorCountLayoutSupportEXT& operator=( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupportEXT;
- void* pNext = nullptr;
- uint32_t maxVariableDescriptorCount;
- };
- static_assert( sizeof( DescriptorSetVariableDescriptorCountLayoutSupportEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorSetVariableDescriptorCountLayoutSupportEXT : public layout::DescriptorSetVariableDescriptorCountLayoutSupportEXT
- {
- DescriptorSetVariableDescriptorCountLayoutSupportEXT() VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetVariableDescriptorCountLayoutSupportEXT()
+ DescriptorSetVariableDescriptorCountLayoutSupport( uint32_t maxVariableDescriptorCount_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxVariableDescriptorCount( maxVariableDescriptorCount_ )
{}
- DescriptorSetVariableDescriptorCountLayoutSupportEXT( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorSetVariableDescriptorCountLayoutSupportEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport & operator=( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport ) - offsetof( DescriptorSetVariableDescriptorCountLayoutSupport, pNext ) );
+ return *this;
+ }
- DescriptorSetVariableDescriptorCountLayoutSupportEXT& operator=( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ DescriptorSetVariableDescriptorCountLayoutSupport( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorSetVariableDescriptorCountLayoutSupportEXT::operator=(rhs);
+ *this = rhs;
+ }
+
+ DescriptorSetVariableDescriptorCountLayoutSupport& operator=( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport const *>(&rhs);
return *this;
}
- operator VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetVariableDescriptorCountLayoutSupport const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>( this );
+ return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupport*>( this );
}
- operator VkDescriptorSetVariableDescriptorCountLayoutSupportEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkDescriptorSetVariableDescriptorCountLayoutSupport &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>( this );
+ return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupport*>( this );
}
- bool operator==( DescriptorSetVariableDescriptorCountLayoutSupportEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( DescriptorSetVariableDescriptorCountLayoutSupport const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( maxVariableDescriptorCount == rhs.maxVariableDescriptorCount );
}
- bool operator!=( DescriptorSetVariableDescriptorCountLayoutSupportEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( DescriptorSetVariableDescriptorCountLayoutSupport const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::DescriptorSetVariableDescriptorCountLayoutSupportEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport;
+ void* pNext = {};
+ uint32_t maxVariableDescriptorCount = {};
};
- static_assert( sizeof( DescriptorSetVariableDescriptorCountLayoutSupportEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<DescriptorSetVariableDescriptorCountLayoutSupportEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( DescriptorSetVariableDescriptorCountLayoutSupport ) == sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupport ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<DescriptorSetVariableDescriptorCountLayoutSupport>::value, "struct wrapper is not a standard layout!" );
struct DescriptorUpdateTemplateEntry
{
- VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateEntry( uint32_t dstBinding_ = 0,
- uint32_t dstArrayElement_ = 0,
- uint32_t descriptorCount_ = 0,
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- size_t offset_ = 0,
- size_t stride_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -29382,12 +28223,12 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorUpdateTemplateEntry( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorUpdateTemplateEntry*>(this) = rhs;
+ *this = rhs;
}
DescriptorUpdateTemplateEntry& operator=( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDescriptorUpdateTemplateEntry*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry const *>(&rhs);
return *this;
}
@@ -29409,7 +28250,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorUpdateTemplateEntry & setDescriptorType( vk::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateEntry & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
{
descriptorType = descriptorType_;
return *this;
@@ -29453,85 +28294,50 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- vk::DescriptorType descriptorType;
- size_t offset;
- size_t stride;
+ 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 = {};
};
static_assert( sizeof( DescriptorUpdateTemplateEntry ) == sizeof( VkDescriptorUpdateTemplateEntry ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorUpdateTemplateEntry>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DescriptorUpdateTemplateCreateInfo
{
- struct DescriptorUpdateTemplateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( vk::DescriptorUpdateTemplateCreateFlags flags_ = vk::DescriptorUpdateTemplateCreateFlags(),
- uint32_t descriptorUpdateEntryCount_ = 0,
- const vk::DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ = nullptr,
- vk::DescriptorUpdateTemplateType templateType_ = vk::DescriptorUpdateTemplateType::eDescriptorSet,
- vk::DescriptorSetLayout descriptorSetLayout_ = vk::DescriptorSetLayout(),
- vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- uint32_t set_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , descriptorUpdateEntryCount( descriptorUpdateEntryCount_ )
- , pDescriptorUpdateEntries( pDescriptorUpdateEntries_ )
- , templateType( templateType_ )
- , descriptorSetLayout( descriptorSetLayout_ )
- , pipelineBindPoint( pipelineBindPoint_ )
- , pipelineLayout( pipelineLayout_ )
- , set( set_ )
- {}
-
- DescriptorUpdateTemplateCreateInfo( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorUpdateTemplateCreateInfo*>(this) = rhs;
- }
-
- DescriptorUpdateTemplateCreateInfo& operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDescriptorUpdateTemplateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfo;
- const void* pNext = nullptr;
- vk::DescriptorUpdateTemplateCreateFlags flags;
- uint32_t descriptorUpdateEntryCount;
- const vk::DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries;
- vk::DescriptorUpdateTemplateType templateType;
- vk::DescriptorSetLayout descriptorSetLayout;
- vk::PipelineBindPoint pipelineBindPoint;
- vk::PipelineLayout pipelineLayout;
- uint32_t set;
- };
- static_assert( sizeof( DescriptorUpdateTemplateCreateInfo ) == sizeof( VkDescriptorUpdateTemplateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DescriptorUpdateTemplateCreateInfo : public layout::DescriptorUpdateTemplateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( vk::DescriptorUpdateTemplateCreateFlags flags_ = vk::DescriptorUpdateTemplateCreateFlags(),
- uint32_t descriptorUpdateEntryCount_ = 0,
- const vk::DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ = nullptr,
- vk::DescriptorUpdateTemplateType templateType_ = vk::DescriptorUpdateTemplateType::eDescriptorSet,
- vk::DescriptorSetLayout descriptorSetLayout_ = vk::DescriptorSetLayout(),
- vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- uint32_t set_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorUpdateTemplateCreateInfo( flags_, descriptorUpdateEntryCount_, pDescriptorUpdateEntries_, templateType_, descriptorSetLayout_, pipelineBindPoint_, pipelineLayout_, set_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , descriptorUpdateEntryCount( descriptorUpdateEntryCount_ )
+ , pDescriptorUpdateEntries( pDescriptorUpdateEntries_ )
+ , templateType( templateType_ )
+ , descriptorSetLayout( descriptorSetLayout_ )
+ , pipelineBindPoint( pipelineBindPoint_ )
+ , pipelineLayout( pipelineLayout_ )
+ , set( set_ )
{}
+ VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo ) - offsetof( DescriptorUpdateTemplateCreateInfo, pNext ) );
+ return *this;
+ }
+
DescriptorUpdateTemplateCreateInfo( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DescriptorUpdateTemplateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DescriptorUpdateTemplateCreateInfo& operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DescriptorUpdateTemplateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const *>(&rhs);
return *this;
}
@@ -29541,7 +28347,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setFlags( vk::DescriptorUpdateTemplateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -29553,31 +28359,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setPDescriptorUpdateEntries( const vk::DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setPDescriptorUpdateEntries( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT
{
pDescriptorUpdateEntries = pDescriptorUpdateEntries_;
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setTemplateType( vk::DescriptorUpdateTemplateType templateType_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setTemplateType( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ ) VULKAN_HPP_NOEXCEPT
{
templateType = templateType_;
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setDescriptorSetLayout( vk::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT
{
descriptorSetLayout = descriptorSetLayout_;
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setPipelineBindPoint( vk::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
{
pipelineBindPoint = pipelineBindPoint_;
return *this;
}
- DescriptorUpdateTemplateCreateInfo & setPipelineLayout( vk::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
+ DescriptorUpdateTemplateCreateInfo & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
{
pipelineLayout = pipelineLayout_;
return *this;
@@ -29618,65 +28424,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DescriptorUpdateTemplateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DescriptorUpdateTemplateCreateInfo ) == sizeof( VkDescriptorUpdateTemplateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DescriptorUpdateTemplateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceQueueCreateInfo
{
- struct DeviceQueueCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( vk::DeviceQueueCreateFlags flags_ = vk::DeviceQueueCreateFlags(),
- uint32_t queueFamilyIndex_ = 0,
- uint32_t queueCount_ = 0,
- const float* pQueuePriorities_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , queueFamilyIndex( queueFamilyIndex_ )
- , queueCount( queueCount_ )
- , pQueuePriorities( pQueuePriorities_ )
- {}
-
- DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueCreateInfo*>(this) = rhs;
- }
-
- DeviceQueueCreateInfo& operator=( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceQueueCreateInfo;
- const void* pNext = nullptr;
- vk::DeviceQueueCreateFlags flags;
- uint32_t queueFamilyIndex;
- uint32_t queueCount;
- const float* pQueuePriorities;
- };
- static_assert( sizeof( DeviceQueueCreateInfo ) == sizeof( VkDeviceQueueCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceQueueCreateInfo : public layout::DeviceQueueCreateInfo
- {
- VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( vk::DeviceQueueCreateFlags flags_ = vk::DeviceQueueCreateFlags(),
- uint32_t queueFamilyIndex_ = 0,
- uint32_t queueCount_ = 0,
- const float* pQueuePriorities_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueCreateInfo( flags_, queueFamilyIndex_, queueCount_, pQueuePriorities_ )
+ VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {},
+ uint32_t queueFamilyIndex_ = {},
+ uint32_t queueCount_ = {},
+ const float* pQueuePriorities_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
+ , queueCount( queueCount_ )
+ , pQueuePriorities( pQueuePriorities_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo ) - offsetof( DeviceQueueCreateInfo, pNext ) );
+ return *this;
+ }
+
DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceQueueCreateInfo& operator=( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceQueueCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo const *>(&rhs);
return *this;
}
@@ -29686,7 +28474,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceQueueCreateInfo & setFlags( vk::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DeviceQueueCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -29735,69 +28523,74 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceQueueCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {};
+ uint32_t queueFamilyIndex = {};
+ uint32_t queueCount = {};
+ const float* pQueuePriorities = {};
};
static_assert( sizeof( DeviceQueueCreateInfo ) == sizeof( VkDeviceQueueCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceQueueCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct PhysicalDeviceFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures( vk::Bool32 robustBufferAccess_ = 0,
- vk::Bool32 fullDrawIndexUint32_ = 0,
- vk::Bool32 imageCubeArray_ = 0,
- vk::Bool32 independentBlend_ = 0,
- vk::Bool32 geometryShader_ = 0,
- vk::Bool32 tessellationShader_ = 0,
- vk::Bool32 sampleRateShading_ = 0,
- vk::Bool32 dualSrcBlend_ = 0,
- vk::Bool32 logicOp_ = 0,
- vk::Bool32 multiDrawIndirect_ = 0,
- vk::Bool32 drawIndirectFirstInstance_ = 0,
- vk::Bool32 depthClamp_ = 0,
- vk::Bool32 depthBiasClamp_ = 0,
- vk::Bool32 fillModeNonSolid_ = 0,
- vk::Bool32 depthBounds_ = 0,
- vk::Bool32 wideLines_ = 0,
- vk::Bool32 largePoints_ = 0,
- vk::Bool32 alphaToOne_ = 0,
- vk::Bool32 multiViewport_ = 0,
- vk::Bool32 samplerAnisotropy_ = 0,
- vk::Bool32 textureCompressionETC2_ = 0,
- vk::Bool32 textureCompressionASTC_LDR_ = 0,
- vk::Bool32 textureCompressionBC_ = 0,
- vk::Bool32 occlusionQueryPrecise_ = 0,
- vk::Bool32 pipelineStatisticsQuery_ = 0,
- vk::Bool32 vertexPipelineStoresAndAtomics_ = 0,
- vk::Bool32 fragmentStoresAndAtomics_ = 0,
- vk::Bool32 shaderTessellationAndGeometryPointSize_ = 0,
- vk::Bool32 shaderImageGatherExtended_ = 0,
- vk::Bool32 shaderStorageImageExtendedFormats_ = 0,
- vk::Bool32 shaderStorageImageMultisample_ = 0,
- vk::Bool32 shaderStorageImageReadWithoutFormat_ = 0,
- vk::Bool32 shaderStorageImageWriteWithoutFormat_ = 0,
- vk::Bool32 shaderUniformBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderSampledImageArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderStorageBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderStorageImageArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderClipDistance_ = 0,
- vk::Bool32 shaderCullDistance_ = 0,
- vk::Bool32 shaderFloat64_ = 0,
- vk::Bool32 shaderInt64_ = 0,
- vk::Bool32 shaderInt16_ = 0,
- vk::Bool32 shaderResourceResidency_ = 0,
- vk::Bool32 shaderResourceMinLod_ = 0,
- vk::Bool32 sparseBinding_ = 0,
- vk::Bool32 sparseResidencyBuffer_ = 0,
- vk::Bool32 sparseResidencyImage2D_ = 0,
- vk::Bool32 sparseResidencyImage3D_ = 0,
- vk::Bool32 sparseResidency2Samples_ = 0,
- vk::Bool32 sparseResidency4Samples_ = 0,
- vk::Bool32 sparseResidency8Samples_ = 0,
- vk::Bool32 sparseResidency16Samples_ = 0,
- vk::Bool32 sparseResidencyAliased_ = 0,
- vk::Bool32 variableMultisampleRate_ = 0,
- vk::Bool32 inheritedQueries_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -29857,340 +28650,340 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDeviceFeatures( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceFeatures*>(this) = rhs;
+ *this = rhs;
}
PhysicalDeviceFeatures& operator=( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceFeatures*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceFeatures & setRobustBufferAccess( vk::Bool32 robustBufferAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ ) VULKAN_HPP_NOEXCEPT
{
robustBufferAccess = robustBufferAccess_;
return *this;
}
- PhysicalDeviceFeatures & setFullDrawIndexUint32( vk::Bool32 fullDrawIndexUint32_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setFullDrawIndexUint32( VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32_ ) VULKAN_HPP_NOEXCEPT
{
fullDrawIndexUint32 = fullDrawIndexUint32_;
return *this;
}
- PhysicalDeviceFeatures & setImageCubeArray( vk::Bool32 imageCubeArray_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setImageCubeArray( VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray_ ) VULKAN_HPP_NOEXCEPT
{
imageCubeArray = imageCubeArray_;
return *this;
}
- PhysicalDeviceFeatures & setIndependentBlend( vk::Bool32 independentBlend_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setIndependentBlend( VULKAN_HPP_NAMESPACE::Bool32 independentBlend_ ) VULKAN_HPP_NOEXCEPT
{
independentBlend = independentBlend_;
return *this;
}
- PhysicalDeviceFeatures & setGeometryShader( vk::Bool32 geometryShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 geometryShader_ ) VULKAN_HPP_NOEXCEPT
{
geometryShader = geometryShader_;
return *this;
}
- PhysicalDeviceFeatures & setTessellationShader( vk::Bool32 tessellationShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 tessellationShader_ ) VULKAN_HPP_NOEXCEPT
{
tessellationShader = tessellationShader_;
return *this;
}
- PhysicalDeviceFeatures & setSampleRateShading( vk::Bool32 sampleRateShading_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSampleRateShading( VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading_ ) VULKAN_HPP_NOEXCEPT
{
sampleRateShading = sampleRateShading_;
return *this;
}
- PhysicalDeviceFeatures & setDualSrcBlend( vk::Bool32 dualSrcBlend_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setDualSrcBlend( VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend_ ) VULKAN_HPP_NOEXCEPT
{
dualSrcBlend = dualSrcBlend_;
return *this;
}
- PhysicalDeviceFeatures & setLogicOp( vk::Bool32 logicOp_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setLogicOp( VULKAN_HPP_NAMESPACE::Bool32 logicOp_ ) VULKAN_HPP_NOEXCEPT
{
logicOp = logicOp_;
return *this;
}
- PhysicalDeviceFeatures & setMultiDrawIndirect( vk::Bool32 multiDrawIndirect_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setMultiDrawIndirect( VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect_ ) VULKAN_HPP_NOEXCEPT
{
multiDrawIndirect = multiDrawIndirect_;
return *this;
}
- PhysicalDeviceFeatures & setDrawIndirectFirstInstance( vk::Bool32 drawIndirectFirstInstance_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setDrawIndirectFirstInstance( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance_ ) VULKAN_HPP_NOEXCEPT
{
drawIndirectFirstInstance = drawIndirectFirstInstance_;
return *this;
}
- PhysicalDeviceFeatures & setDepthClamp( vk::Bool32 depthClamp_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setDepthClamp( VULKAN_HPP_NAMESPACE::Bool32 depthClamp_ ) VULKAN_HPP_NOEXCEPT
{
depthClamp = depthClamp_;
return *this;
}
- PhysicalDeviceFeatures & setDepthBiasClamp( vk::Bool32 depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setDepthBiasClamp( VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT
{
depthBiasClamp = depthBiasClamp_;
return *this;
}
- PhysicalDeviceFeatures & setFillModeNonSolid( vk::Bool32 fillModeNonSolid_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setFillModeNonSolid( VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid_ ) VULKAN_HPP_NOEXCEPT
{
fillModeNonSolid = fillModeNonSolid_;
return *this;
}
- PhysicalDeviceFeatures & setDepthBounds( vk::Bool32 depthBounds_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setDepthBounds( VULKAN_HPP_NAMESPACE::Bool32 depthBounds_ ) VULKAN_HPP_NOEXCEPT
{
depthBounds = depthBounds_;
return *this;
}
- PhysicalDeviceFeatures & setWideLines( vk::Bool32 wideLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setWideLines( VULKAN_HPP_NAMESPACE::Bool32 wideLines_ ) VULKAN_HPP_NOEXCEPT
{
wideLines = wideLines_;
return *this;
}
- PhysicalDeviceFeatures & setLargePoints( vk::Bool32 largePoints_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setLargePoints( VULKAN_HPP_NAMESPACE::Bool32 largePoints_ ) VULKAN_HPP_NOEXCEPT
{
largePoints = largePoints_;
return *this;
}
- PhysicalDeviceFeatures & setAlphaToOne( vk::Bool32 alphaToOne_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setAlphaToOne( VULKAN_HPP_NAMESPACE::Bool32 alphaToOne_ ) VULKAN_HPP_NOEXCEPT
{
alphaToOne = alphaToOne_;
return *this;
}
- PhysicalDeviceFeatures & setMultiViewport( vk::Bool32 multiViewport_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setMultiViewport( VULKAN_HPP_NAMESPACE::Bool32 multiViewport_ ) VULKAN_HPP_NOEXCEPT
{
multiViewport = multiViewport_;
return *this;
}
- PhysicalDeviceFeatures & setSamplerAnisotropy( vk::Bool32 samplerAnisotropy_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSamplerAnisotropy( VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy_ ) VULKAN_HPP_NOEXCEPT
{
samplerAnisotropy = samplerAnisotropy_;
return *this;
}
- PhysicalDeviceFeatures & setTextureCompressionETC2( vk::Bool32 textureCompressionETC2_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setTextureCompressionETC2( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2_ ) VULKAN_HPP_NOEXCEPT
{
textureCompressionETC2 = textureCompressionETC2_;
return *this;
}
- PhysicalDeviceFeatures & setTextureCompressionASTC_LDR( vk::Bool32 textureCompressionASTC_LDR_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setTextureCompressionASTC_LDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR_ ) VULKAN_HPP_NOEXCEPT
{
textureCompressionASTC_LDR = textureCompressionASTC_LDR_;
return *this;
}
- PhysicalDeviceFeatures & setTextureCompressionBC( vk::Bool32 textureCompressionBC_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setTextureCompressionBC( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC_ ) VULKAN_HPP_NOEXCEPT
{
textureCompressionBC = textureCompressionBC_;
return *this;
}
- PhysicalDeviceFeatures & setOcclusionQueryPrecise( vk::Bool32 occlusionQueryPrecise_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setOcclusionQueryPrecise( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise_ ) VULKAN_HPP_NOEXCEPT
{
occlusionQueryPrecise = occlusionQueryPrecise_;
return *this;
}
- PhysicalDeviceFeatures & setPipelineStatisticsQuery( vk::Bool32 pipelineStatisticsQuery_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setPipelineStatisticsQuery( VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery_ ) VULKAN_HPP_NOEXCEPT
{
pipelineStatisticsQuery = pipelineStatisticsQuery_;
return *this;
}
- PhysicalDeviceFeatures & setVertexPipelineStoresAndAtomics( vk::Bool32 vertexPipelineStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setVertexPipelineStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT
{
vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics_;
return *this;
}
- PhysicalDeviceFeatures & setFragmentStoresAndAtomics( vk::Bool32 fragmentStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setFragmentStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT
{
fragmentStoresAndAtomics = fragmentStoresAndAtomics_;
return *this;
}
- PhysicalDeviceFeatures & setShaderTessellationAndGeometryPointSize( vk::Bool32 shaderTessellationAndGeometryPointSize_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderTessellationAndGeometryPointSize( VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize_ ) VULKAN_HPP_NOEXCEPT
{
shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize_;
return *this;
}
- PhysicalDeviceFeatures & setShaderImageGatherExtended( vk::Bool32 shaderImageGatherExtended_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderImageGatherExtended( VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended_ ) VULKAN_HPP_NOEXCEPT
{
shaderImageGatherExtended = shaderImageGatherExtended_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageImageExtendedFormats( vk::Bool32 shaderStorageImageExtendedFormats_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageImageExtendedFormats( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageImageMultisample( vk::Bool32 shaderStorageImageMultisample_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageImageMultisample( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageMultisample = shaderStorageImageMultisample_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageImageReadWithoutFormat( vk::Bool32 shaderStorageImageReadWithoutFormat_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageImageReadWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageImageWriteWithoutFormat( vk::Bool32 shaderStorageImageWriteWithoutFormat_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageImageWriteWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat_;
return *this;
}
- PhysicalDeviceFeatures & setShaderUniformBufferArrayDynamicIndexing( vk::Bool32 shaderUniformBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderUniformBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceFeatures & setShaderSampledImageArrayDynamicIndexing( vk::Bool32 shaderSampledImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderSampledImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageBufferArrayDynamicIndexing( vk::Bool32 shaderStorageBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceFeatures & setShaderStorageImageArrayDynamicIndexing( vk::Bool32 shaderStorageImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderStorageImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceFeatures & setShaderClipDistance( vk::Bool32 shaderClipDistance_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderClipDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance_ ) VULKAN_HPP_NOEXCEPT
{
shaderClipDistance = shaderClipDistance_;
return *this;
}
- PhysicalDeviceFeatures & setShaderCullDistance( vk::Bool32 shaderCullDistance_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderCullDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance_ ) VULKAN_HPP_NOEXCEPT
{
shaderCullDistance = shaderCullDistance_;
return *this;
}
- PhysicalDeviceFeatures & setShaderFloat64( vk::Bool32 shaderFloat64_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64_ ) VULKAN_HPP_NOEXCEPT
{
shaderFloat64 = shaderFloat64_;
return *this;
}
- PhysicalDeviceFeatures & setShaderInt64( vk::Bool32 shaderInt64_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderInt64( VULKAN_HPP_NAMESPACE::Bool32 shaderInt64_ ) VULKAN_HPP_NOEXCEPT
{
shaderInt64 = shaderInt64_;
return *this;
}
- PhysicalDeviceFeatures & setShaderInt16( vk::Bool32 shaderInt16_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderInt16( VULKAN_HPP_NAMESPACE::Bool32 shaderInt16_ ) VULKAN_HPP_NOEXCEPT
{
shaderInt16 = shaderInt16_;
return *this;
}
- PhysicalDeviceFeatures & setShaderResourceResidency( vk::Bool32 shaderResourceResidency_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderResourceResidency( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency_ ) VULKAN_HPP_NOEXCEPT
{
shaderResourceResidency = shaderResourceResidency_;
return *this;
}
- PhysicalDeviceFeatures & setShaderResourceMinLod( vk::Bool32 shaderResourceMinLod_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setShaderResourceMinLod( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod_ ) VULKAN_HPP_NOEXCEPT
{
shaderResourceMinLod = shaderResourceMinLod_;
return *this;
}
- PhysicalDeviceFeatures & setSparseBinding( vk::Bool32 sparseBinding_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseBinding( VULKAN_HPP_NAMESPACE::Bool32 sparseBinding_ ) VULKAN_HPP_NOEXCEPT
{
sparseBinding = sparseBinding_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidencyBuffer( vk::Bool32 sparseResidencyBuffer_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidencyBuffer( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidencyBuffer = sparseResidencyBuffer_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidencyImage2D( vk::Bool32 sparseResidencyImage2D_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidencyImage2D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidencyImage2D = sparseResidencyImage2D_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidencyImage3D( vk::Bool32 sparseResidencyImage3D_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidencyImage3D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidencyImage3D = sparseResidencyImage3D_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidency2Samples( vk::Bool32 sparseResidency2Samples_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidency2Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidency2Samples = sparseResidency2Samples_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidency4Samples( vk::Bool32 sparseResidency4Samples_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidency4Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidency4Samples = sparseResidency4Samples_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidency8Samples( vk::Bool32 sparseResidency8Samples_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidency8Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidency8Samples = sparseResidency8Samples_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidency16Samples( vk::Bool32 sparseResidency16Samples_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidency16Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidency16Samples = sparseResidency16Samples_;
return *this;
}
- PhysicalDeviceFeatures & setSparseResidencyAliased( vk::Bool32 sparseResidencyAliased_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setSparseResidencyAliased( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased_ ) VULKAN_HPP_NOEXCEPT
{
sparseResidencyAliased = sparseResidencyAliased_;
return *this;
}
- PhysicalDeviceFeatures & setVariableMultisampleRate( vk::Bool32 variableMultisampleRate_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setVariableMultisampleRate( VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate_ ) VULKAN_HPP_NOEXCEPT
{
variableMultisampleRate = variableMultisampleRate_;
return *this;
}
- PhysicalDeviceFeatures & setInheritedQueries( vk::Bool32 inheritedQueries_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures & setInheritedQueries( VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries_ ) VULKAN_HPP_NOEXCEPT
{
inheritedQueries = inheritedQueries_;
return *this;
@@ -30271,134 +29064,99 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Bool32 robustBufferAccess;
- vk::Bool32 fullDrawIndexUint32;
- vk::Bool32 imageCubeArray;
- vk::Bool32 independentBlend;
- vk::Bool32 geometryShader;
- vk::Bool32 tessellationShader;
- vk::Bool32 sampleRateShading;
- vk::Bool32 dualSrcBlend;
- vk::Bool32 logicOp;
- vk::Bool32 multiDrawIndirect;
- vk::Bool32 drawIndirectFirstInstance;
- vk::Bool32 depthClamp;
- vk::Bool32 depthBiasClamp;
- vk::Bool32 fillModeNonSolid;
- vk::Bool32 depthBounds;
- vk::Bool32 wideLines;
- vk::Bool32 largePoints;
- vk::Bool32 alphaToOne;
- vk::Bool32 multiViewport;
- vk::Bool32 samplerAnisotropy;
- vk::Bool32 textureCompressionETC2;
- vk::Bool32 textureCompressionASTC_LDR;
- vk::Bool32 textureCompressionBC;
- vk::Bool32 occlusionQueryPrecise;
- vk::Bool32 pipelineStatisticsQuery;
- vk::Bool32 vertexPipelineStoresAndAtomics;
- vk::Bool32 fragmentStoresAndAtomics;
- vk::Bool32 shaderTessellationAndGeometryPointSize;
- vk::Bool32 shaderImageGatherExtended;
- vk::Bool32 shaderStorageImageExtendedFormats;
- vk::Bool32 shaderStorageImageMultisample;
- vk::Bool32 shaderStorageImageReadWithoutFormat;
- vk::Bool32 shaderStorageImageWriteWithoutFormat;
- vk::Bool32 shaderUniformBufferArrayDynamicIndexing;
- vk::Bool32 shaderSampledImageArrayDynamicIndexing;
- vk::Bool32 shaderStorageBufferArrayDynamicIndexing;
- vk::Bool32 shaderStorageImageArrayDynamicIndexing;
- vk::Bool32 shaderClipDistance;
- vk::Bool32 shaderCullDistance;
- vk::Bool32 shaderFloat64;
- vk::Bool32 shaderInt64;
- vk::Bool32 shaderInt16;
- vk::Bool32 shaderResourceResidency;
- vk::Bool32 shaderResourceMinLod;
- vk::Bool32 sparseBinding;
- vk::Bool32 sparseResidencyBuffer;
- vk::Bool32 sparseResidencyImage2D;
- vk::Bool32 sparseResidencyImage3D;
- vk::Bool32 sparseResidency2Samples;
- vk::Bool32 sparseResidency4Samples;
- vk::Bool32 sparseResidency8Samples;
- vk::Bool32 sparseResidency16Samples;
- vk::Bool32 sparseResidencyAliased;
- vk::Bool32 variableMultisampleRate;
- vk::Bool32 inheritedQueries;
+ 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 = {};
};
static_assert( sizeof( PhysicalDeviceFeatures ) == sizeof( VkPhysicalDeviceFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceCreateInfo( vk::DeviceCreateFlags flags_ = vk::DeviceCreateFlags(),
- uint32_t queueCreateInfoCount_ = 0,
- const vk::DeviceQueueCreateInfo* pQueueCreateInfos_ = nullptr,
- uint32_t enabledLayerCount_ = 0,
- const char* const* ppEnabledLayerNames_ = nullptr,
- uint32_t enabledExtensionCount_ = 0,
- const char* const* ppEnabledExtensionNames_ = nullptr,
- const vk::PhysicalDeviceFeatures* pEnabledFeatures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , queueCreateInfoCount( queueCreateInfoCount_ )
- , pQueueCreateInfos( pQueueCreateInfos_ )
- , enabledLayerCount( enabledLayerCount_ )
- , ppEnabledLayerNames( ppEnabledLayerNames_ )
- , enabledExtensionCount( enabledExtensionCount_ )
- , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
- , pEnabledFeatures( pEnabledFeatures_ )
- {}
-
- DeviceCreateInfo( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceCreateInfo*>(this) = rhs;
- }
-
- DeviceCreateInfo& operator=( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceCreateInfo;
- const void* pNext = nullptr;
- vk::DeviceCreateFlags flags;
- uint32_t queueCreateInfoCount;
- const vk::DeviceQueueCreateInfo* pQueueCreateInfos;
- uint32_t enabledLayerCount;
- const char* const* ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char* const* ppEnabledExtensionNames;
- const vk::PhysicalDeviceFeatures* pEnabledFeatures;
- };
- static_assert( sizeof( DeviceCreateInfo ) == sizeof( VkDeviceCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceCreateInfo : public layout::DeviceCreateInfo
+ struct DeviceCreateInfo
{
- VULKAN_HPP_CONSTEXPR DeviceCreateInfo( vk::DeviceCreateFlags flags_ = vk::DeviceCreateFlags(),
- uint32_t queueCreateInfoCount_ = 0,
- const vk::DeviceQueueCreateInfo* pQueueCreateInfos_ = nullptr,
- uint32_t enabledLayerCount_ = 0,
- const char* const* ppEnabledLayerNames_ = nullptr,
- uint32_t enabledExtensionCount_ = 0,
- const char* const* ppEnabledExtensionNames_ = nullptr,
- const vk::PhysicalDeviceFeatures* pEnabledFeatures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceCreateInfo( flags_, queueCreateInfoCount_, pQueueCreateInfos_, enabledLayerCount_, ppEnabledLayerNames_, enabledExtensionCount_, ppEnabledExtensionNames_, pEnabledFeatures_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , queueCreateInfoCount( queueCreateInfoCount_ )
+ , pQueueCreateInfos( pQueueCreateInfos_ )
+ , enabledLayerCount( enabledLayerCount_ )
+ , ppEnabledLayerNames( ppEnabledLayerNames_ )
+ , enabledExtensionCount( enabledExtensionCount_ )
+ , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
+ , pEnabledFeatures( pEnabledFeatures_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceCreateInfo ) - offsetof( DeviceCreateInfo, pNext ) );
+ return *this;
+ }
+
DeviceCreateInfo( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceCreateInfo& operator=( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceCreateInfo const *>(&rhs);
return *this;
}
@@ -30408,7 +29166,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceCreateInfo & setFlags( vk::DeviceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DeviceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -30420,7 +29178,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceCreateInfo & setPQueueCreateInfos( const vk::DeviceQueueCreateInfo* pQueueCreateInfos_ ) VULKAN_HPP_NOEXCEPT
+ DeviceCreateInfo & setPQueueCreateInfos( const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo* pQueueCreateInfos_ ) VULKAN_HPP_NOEXCEPT
{
pQueueCreateInfos = pQueueCreateInfos_;
return *this;
@@ -30450,7 +29208,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceCreateInfo & setPEnabledFeatures( const vk::PhysicalDeviceFeatures* pEnabledFeatures_ ) VULKAN_HPP_NOEXCEPT
+ DeviceCreateInfo & setPEnabledFeatures( const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures* pEnabledFeatures_ ) VULKAN_HPP_NOEXCEPT
{
pEnabledFeatures = pEnabledFeatures_;
return *this;
@@ -30485,53 +29243,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DeviceCreateInfo ) == sizeof( VkDeviceCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceEventInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( vk::DeviceEventTypeEXT deviceEvent_ = vk::DeviceEventTypeEXT::eDisplayHotplug ) VULKAN_HPP_NOEXCEPT
- : deviceEvent( deviceEvent_ )
- {}
-
- DeviceEventInfoEXT( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceEventInfoEXT*>(this) = rhs;
- }
-
- DeviceEventInfoEXT& operator=( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceEventInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceEventInfoEXT;
- const void* pNext = nullptr;
- vk::DeviceEventTypeEXT deviceEvent;
- };
- static_assert( sizeof( DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceEventInfoEXT : public layout::DeviceEventInfoEXT
+ struct DeviceEventInfoEXT
{
- VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( vk::DeviceEventTypeEXT deviceEvent_ = vk::DeviceEventTypeEXT::eDisplayHotplug ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceEventInfoEXT( deviceEvent_ )
+ VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug ) VULKAN_HPP_NOEXCEPT
+ : deviceEvent( deviceEvent_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT ) - offsetof( DeviceEventInfoEXT, pNext ) );
+ return *this;
+ }
+
DeviceEventInfoEXT( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceEventInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceEventInfoEXT& operator=( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceEventInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const *>(&rhs);
return *this;
}
@@ -30541,7 +29287,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceEventInfoEXT & setDeviceEvent( vk::DeviceEventTypeEXT deviceEvent_ ) VULKAN_HPP_NOEXCEPT
+ DeviceEventInfoEXT & setDeviceEvent( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ ) VULKAN_HPP_NOEXCEPT
{
deviceEvent = deviceEvent_;
return *this;
@@ -30569,53 +29315,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceEventInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceEventInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug;
};
static_assert( sizeof( DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceEventInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGeneratedCommandsFeaturesNVX
{
- struct DeviceGeneratedCommandsFeaturesNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsFeaturesNVX( vk::Bool32 computeBindingPointSupport_ = 0 ) VULKAN_HPP_NOEXCEPT
- : computeBindingPointSupport( computeBindingPointSupport_ )
- {}
-
- DeviceGeneratedCommandsFeaturesNVX( VkDeviceGeneratedCommandsFeaturesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>(this) = rhs;
- }
-
- DeviceGeneratedCommandsFeaturesNVX& operator=( VkDeviceGeneratedCommandsFeaturesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGeneratedCommandsFeaturesNVX;
- const void* pNext = nullptr;
- vk::Bool32 computeBindingPointSupport;
- };
- static_assert( sizeof( DeviceGeneratedCommandsFeaturesNVX ) == sizeof( VkDeviceGeneratedCommandsFeaturesNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGeneratedCommandsFeaturesNVX : public layout::DeviceGeneratedCommandsFeaturesNVX
- {
- VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsFeaturesNVX( vk::Bool32 computeBindingPointSupport_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGeneratedCommandsFeaturesNVX( computeBindingPointSupport_ )
+ VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsFeaturesNVX( VULKAN_HPP_NAMESPACE::Bool32 computeBindingPointSupport_ = {} ) VULKAN_HPP_NOEXCEPT
+ : computeBindingPointSupport( computeBindingPointSupport_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX & operator=( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX ) - offsetof( DeviceGeneratedCommandsFeaturesNVX, pNext ) );
+ return *this;
+ }
+
DeviceGeneratedCommandsFeaturesNVX( VkDeviceGeneratedCommandsFeaturesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGeneratedCommandsFeaturesNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGeneratedCommandsFeaturesNVX& operator=( VkDeviceGeneratedCommandsFeaturesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGeneratedCommandsFeaturesNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX const *>(&rhs);
return *this;
}
@@ -30625,7 +29352,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceGeneratedCommandsFeaturesNVX & setComputeBindingPointSupport( vk::Bool32 computeBindingPointSupport_ ) VULKAN_HPP_NOEXCEPT
+ DeviceGeneratedCommandsFeaturesNVX & setComputeBindingPointSupport( VULKAN_HPP_NAMESPACE::Bool32 computeBindingPointSupport_ ) VULKAN_HPP_NOEXCEPT
{
computeBindingPointSupport = computeBindingPointSupport_;
return *this;
@@ -30653,69 +29380,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGeneratedCommandsFeaturesNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGeneratedCommandsFeaturesNVX;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 computeBindingPointSupport = {};
};
static_assert( sizeof( DeviceGeneratedCommandsFeaturesNVX ) == sizeof( VkDeviceGeneratedCommandsFeaturesNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGeneratedCommandsFeaturesNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGeneratedCommandsLimitsNVX
{
- struct DeviceGeneratedCommandsLimitsNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsLimitsNVX( uint32_t maxIndirectCommandsLayoutTokenCount_ = 0,
- uint32_t maxObjectEntryCounts_ = 0,
- uint32_t minSequenceCountBufferOffsetAlignment_ = 0,
- uint32_t minSequenceIndexBufferOffsetAlignment_ = 0,
- uint32_t minCommandsTokenBufferOffsetAlignment_ = 0 ) VULKAN_HPP_NOEXCEPT
- : maxIndirectCommandsLayoutTokenCount( maxIndirectCommandsLayoutTokenCount_ )
- , maxObjectEntryCounts( maxObjectEntryCounts_ )
- , minSequenceCountBufferOffsetAlignment( minSequenceCountBufferOffsetAlignment_ )
- , minSequenceIndexBufferOffsetAlignment( minSequenceIndexBufferOffsetAlignment_ )
- , minCommandsTokenBufferOffsetAlignment( minCommandsTokenBufferOffsetAlignment_ )
- {}
-
- DeviceGeneratedCommandsLimitsNVX( VkDeviceGeneratedCommandsLimitsNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>(this) = rhs;
- }
-
- DeviceGeneratedCommandsLimitsNVX& operator=( VkDeviceGeneratedCommandsLimitsNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGeneratedCommandsLimitsNVX;
- const void* pNext = nullptr;
- uint32_t maxIndirectCommandsLayoutTokenCount;
- uint32_t maxObjectEntryCounts;
- uint32_t minSequenceCountBufferOffsetAlignment;
- uint32_t minSequenceIndexBufferOffsetAlignment;
- uint32_t minCommandsTokenBufferOffsetAlignment;
- };
- static_assert( sizeof( DeviceGeneratedCommandsLimitsNVX ) == sizeof( VkDeviceGeneratedCommandsLimitsNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGeneratedCommandsLimitsNVX : public layout::DeviceGeneratedCommandsLimitsNVX
- {
- VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsLimitsNVX( uint32_t maxIndirectCommandsLayoutTokenCount_ = 0,
- uint32_t maxObjectEntryCounts_ = 0,
- uint32_t minSequenceCountBufferOffsetAlignment_ = 0,
- uint32_t minSequenceIndexBufferOffsetAlignment_ = 0,
- uint32_t minCommandsTokenBufferOffsetAlignment_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGeneratedCommandsLimitsNVX( maxIndirectCommandsLayoutTokenCount_, maxObjectEntryCounts_, minSequenceCountBufferOffsetAlignment_, minSequenceIndexBufferOffsetAlignment_, minCommandsTokenBufferOffsetAlignment_ )
+ VULKAN_HPP_CONSTEXPR DeviceGeneratedCommandsLimitsNVX( uint32_t maxIndirectCommandsLayoutTokenCount_ = {},
+ uint32_t maxObjectEntryCounts_ = {},
+ uint32_t minSequenceCountBufferOffsetAlignment_ = {},
+ uint32_t minSequenceIndexBufferOffsetAlignment_ = {},
+ uint32_t minCommandsTokenBufferOffsetAlignment_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxIndirectCommandsLayoutTokenCount( maxIndirectCommandsLayoutTokenCount_ )
+ , maxObjectEntryCounts( maxObjectEntryCounts_ )
+ , minSequenceCountBufferOffsetAlignment( minSequenceCountBufferOffsetAlignment_ )
+ , minSequenceIndexBufferOffsetAlignment( minSequenceIndexBufferOffsetAlignment_ )
+ , minCommandsTokenBufferOffsetAlignment( minCommandsTokenBufferOffsetAlignment_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX & operator=( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX ) - offsetof( DeviceGeneratedCommandsLimitsNVX, pNext ) );
+ return *this;
+ }
+
DeviceGeneratedCommandsLimitsNVX( VkDeviceGeneratedCommandsLimitsNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGeneratedCommandsLimitsNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGeneratedCommandsLimitsNVX& operator=( VkDeviceGeneratedCommandsLimitsNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGeneratedCommandsLimitsNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX const *>(&rhs);
return *this;
}
@@ -30781,57 +29481,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGeneratedCommandsLimitsNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGeneratedCommandsLimitsNVX;
+ const void* pNext = {};
+ uint32_t maxIndirectCommandsLayoutTokenCount = {};
+ uint32_t maxObjectEntryCounts = {};
+ uint32_t minSequenceCountBufferOffsetAlignment = {};
+ uint32_t minSequenceIndexBufferOffsetAlignment = {};
+ uint32_t minCommandsTokenBufferOffsetAlignment = {};
};
static_assert( sizeof( DeviceGeneratedCommandsLimitsNVX ) == sizeof( VkDeviceGeneratedCommandsLimitsNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGeneratedCommandsLimitsNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceGroupBindSparseInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = 0,
- uint32_t memoryDeviceIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : resourceDeviceIndex( resourceDeviceIndex_ )
- , memoryDeviceIndex( memoryDeviceIndex_ )
- {}
-
- DeviceGroupBindSparseInfo( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupBindSparseInfo*>(this) = rhs;
- }
-
- DeviceGroupBindSparseInfo& operator=( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupBindSparseInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupBindSparseInfo;
- const void* pNext = nullptr;
- uint32_t resourceDeviceIndex;
- uint32_t memoryDeviceIndex;
- };
- static_assert( sizeof( DeviceGroupBindSparseInfo ) == sizeof( VkDeviceGroupBindSparseInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupBindSparseInfo : public layout::DeviceGroupBindSparseInfo
+ struct DeviceGroupBindSparseInfo
{
- VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = 0,
- uint32_t memoryDeviceIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupBindSparseInfo( resourceDeviceIndex_, memoryDeviceIndex_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = {},
+ uint32_t memoryDeviceIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : resourceDeviceIndex( resourceDeviceIndex_ )
+ , memoryDeviceIndex( memoryDeviceIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo ) - offsetof( DeviceGroupBindSparseInfo, pNext ) );
+ return *this;
+ }
+
DeviceGroupBindSparseInfo( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupBindSparseInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupBindSparseInfo& operator=( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupBindSparseInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo const *>(&rhs);
return *this;
}
@@ -30876,53 +29559,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupBindSparseInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupBindSparseInfo;
+ const void* pNext = {};
+ uint32_t resourceDeviceIndex = {};
+ uint32_t memoryDeviceIndex = {};
};
static_assert( sizeof( DeviceGroupBindSparseInfo ) == sizeof( VkDeviceGroupBindSparseInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupBindSparseInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGroupCommandBufferBeginInfo
{
- struct DeviceGroupCommandBufferBeginInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : deviceMask( deviceMask_ )
- {}
-
- DeviceGroupCommandBufferBeginInfo( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(this) = rhs;
- }
-
- DeviceGroupCommandBufferBeginInfo& operator=( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfo;
- const void* pNext = nullptr;
- uint32_t deviceMask;
- };
- static_assert( sizeof( DeviceGroupCommandBufferBeginInfo ) == sizeof( VkDeviceGroupCommandBufferBeginInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupCommandBufferBeginInfo : public layout::DeviceGroupCommandBufferBeginInfo
- {
- VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupCommandBufferBeginInfo( deviceMask_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceMask( deviceMask_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo ) - offsetof( DeviceGroupCommandBufferBeginInfo, pNext ) );
+ return *this;
+ }
+
DeviceGroupCommandBufferBeginInfo( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupCommandBufferBeginInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupCommandBufferBeginInfo& operator=( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupCommandBufferBeginInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo const *>(&rhs);
return *this;
}
@@ -30960,57 +29625,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupCommandBufferBeginInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfo;
+ const void* pNext = {};
+ uint32_t deviceMask = {};
};
static_assert( sizeof( DeviceGroupCommandBufferBeginInfo ) == sizeof( VkDeviceGroupCommandBufferBeginInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupCommandBufferBeginInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceGroupDeviceCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = 0,
- const vk::PhysicalDevice* pPhysicalDevices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : physicalDeviceCount( physicalDeviceCount_ )
- , pPhysicalDevices( pPhysicalDevices_ )
- {}
-
- DeviceGroupDeviceCreateInfo( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(this) = rhs;
- }
-
- DeviceGroupDeviceCreateInfo& operator=( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupDeviceCreateInfo;
- const void* pNext = nullptr;
- uint32_t physicalDeviceCount;
- const vk::PhysicalDevice* pPhysicalDevices;
- };
- static_assert( sizeof( DeviceGroupDeviceCreateInfo ) == sizeof( VkDeviceGroupDeviceCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupDeviceCreateInfo : public layout::DeviceGroupDeviceCreateInfo
+ struct DeviceGroupDeviceCreateInfo
{
- VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = 0,
- const vk::PhysicalDevice* pPhysicalDevices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupDeviceCreateInfo( physicalDeviceCount_, pPhysicalDevices_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = {},
+ const VULKAN_HPP_NAMESPACE::PhysicalDevice* pPhysicalDevices_ = {} ) VULKAN_HPP_NOEXCEPT
+ : physicalDeviceCount( physicalDeviceCount_ )
+ , pPhysicalDevices( pPhysicalDevices_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo ) - offsetof( DeviceGroupDeviceCreateInfo, pNext ) );
+ return *this;
+ }
+
DeviceGroupDeviceCreateInfo( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupDeviceCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupDeviceCreateInfo& operator=( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupDeviceCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo const *>(&rhs);
return *this;
}
@@ -31026,7 +29670,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceGroupDeviceCreateInfo & setPPhysicalDevices( const vk::PhysicalDevice* pPhysicalDevices_ ) VULKAN_HPP_NOEXCEPT
+ DeviceGroupDeviceCreateInfo & setPPhysicalDevices( const VULKAN_HPP_NAMESPACE::PhysicalDevice* pPhysicalDevices_ ) VULKAN_HPP_NOEXCEPT
{
pPhysicalDevices = pPhysicalDevices_;
return *this;
@@ -31055,53 +29699,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupDeviceCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupDeviceCreateInfo;
+ const void* pNext = {};
+ uint32_t physicalDeviceCount = {};
+ const VULKAN_HPP_NAMESPACE::PhysicalDevice* pPhysicalDevices = {};
};
static_assert( sizeof( DeviceGroupDeviceCreateInfo ) == sizeof( VkDeviceGroupDeviceCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupDeviceCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGroupPresentCapabilitiesKHR
{
- struct DeviceGroupPresentCapabilitiesKHR
+ DeviceGroupPresentCapabilitiesKHR( std::array<uint32_t,VK_MAX_DEVICE_GROUP_SIZE> const& presentMask_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : presentMask{}
+ , modes( modes_ )
{
- protected:
- DeviceGroupPresentCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- DeviceGroupPresentCapabilitiesKHR( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>(this) = rhs;
- }
-
- DeviceGroupPresentCapabilitiesKHR& operator=( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR;
- const void* pNext = nullptr;
- uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE];
- vk::DeviceGroupPresentModeFlagsKHR modes;
- };
- static_assert( sizeof( DeviceGroupPresentCapabilitiesKHR ) == sizeof( VkDeviceGroupPresentCapabilitiesKHR ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,VK_MAX_DEVICE_GROUP_SIZE,VK_MAX_DEVICE_GROUP_SIZE>::copy( presentMask, presentMask_ );
+ }
- struct DeviceGroupPresentCapabilitiesKHR : public layout::DeviceGroupPresentCapabilitiesKHR
- {
- DeviceGroupPresentCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupPresentCapabilitiesKHR()
- {}
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR ) - offsetof( DeviceGroupPresentCapabilitiesKHR, pNext ) );
+ return *this;
+ }
DeviceGroupPresentCapabilitiesKHR( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupPresentCapabilitiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupPresentCapabilitiesKHR& operator=( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupPresentCapabilitiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR const *>(&rhs);
return *this;
}
@@ -31128,61 +29758,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupPresentCapabilitiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR;
+ const void* pNext = {};
+ uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {};
};
static_assert( sizeof( DeviceGroupPresentCapabilitiesKHR ) == sizeof( VkDeviceGroupPresentCapabilitiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupPresentCapabilitiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGroupPresentInfoKHR
{
- struct DeviceGroupPresentInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( uint32_t swapchainCount_ = 0,
- const uint32_t* pDeviceMasks_ = nullptr,
- vk::DeviceGroupPresentModeFlagBitsKHR mode_ = vk::DeviceGroupPresentModeFlagBitsKHR::eLocal ) VULKAN_HPP_NOEXCEPT
- : swapchainCount( swapchainCount_ )
- , pDeviceMasks( pDeviceMasks_ )
- , mode( mode_ )
- {}
-
- DeviceGroupPresentInfoKHR( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(this) = rhs;
- }
-
- DeviceGroupPresentInfoKHR& operator=( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupPresentInfoKHR;
- const void* pNext = nullptr;
- uint32_t swapchainCount;
- const uint32_t* pDeviceMasks;
- vk::DeviceGroupPresentModeFlagBitsKHR mode;
- };
- static_assert( sizeof( DeviceGroupPresentInfoKHR ) == sizeof( VkDeviceGroupPresentInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupPresentInfoKHR : public layout::DeviceGroupPresentInfoKHR
- {
- VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( uint32_t swapchainCount_ = 0,
- const uint32_t* pDeviceMasks_ = nullptr,
- vk::DeviceGroupPresentModeFlagBitsKHR mode_ = vk::DeviceGroupPresentModeFlagBitsKHR::eLocal ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupPresentInfoKHR( swapchainCount_, pDeviceMasks_, mode_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( uint32_t swapchainCount_ = {},
+ const uint32_t* pDeviceMasks_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal ) VULKAN_HPP_NOEXCEPT
+ : swapchainCount( swapchainCount_ )
+ , pDeviceMasks( pDeviceMasks_ )
+ , mode( mode_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR ) - offsetof( DeviceGroupPresentInfoKHR, pNext ) );
+ return *this;
+ }
+
DeviceGroupPresentInfoKHR( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupPresentInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupPresentInfoKHR& operator=( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupPresentInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR const *>(&rhs);
return *this;
}
@@ -31204,7 +29812,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceGroupPresentInfoKHR & setMode( vk::DeviceGroupPresentModeFlagBitsKHR mode_ ) VULKAN_HPP_NOEXCEPT
+ DeviceGroupPresentInfoKHR & setMode( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ ) VULKAN_HPP_NOEXCEPT
{
mode = mode_;
return *this;
@@ -31226,7 +29834,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( swapchainCount == rhs.swapchainCount )
&& ( pDeviceMasks == rhs.pDeviceMasks )
- && vk::operator==( mode, rhs.mode );
+ && ( mode == rhs.mode );
}
bool operator!=( DeviceGroupPresentInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -31234,61 +29842,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupPresentInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( DeviceGroupPresentInfoKHR ) == sizeof( VkDeviceGroupPresentInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupPresentInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceGroupRenderPassBeginInfo
{
- struct DeviceGroupRenderPassBeginInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = 0,
- uint32_t deviceRenderAreaCount_ = 0,
- const vk::Rect2D* pDeviceRenderAreas_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : deviceMask( deviceMask_ )
- , deviceRenderAreaCount( deviceRenderAreaCount_ )
- , pDeviceRenderAreas( pDeviceRenderAreas_ )
- {}
-
- DeviceGroupRenderPassBeginInfo( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(this) = rhs;
- }
-
- DeviceGroupRenderPassBeginInfo& operator=( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfo;
- const void* pNext = nullptr;
- uint32_t deviceMask;
- uint32_t deviceRenderAreaCount;
- const vk::Rect2D* pDeviceRenderAreas;
- };
- static_assert( sizeof( DeviceGroupRenderPassBeginInfo ) == sizeof( VkDeviceGroupRenderPassBeginInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupRenderPassBeginInfo : public layout::DeviceGroupRenderPassBeginInfo
- {
- VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = 0,
- uint32_t deviceRenderAreaCount_ = 0,
- const vk::Rect2D* pDeviceRenderAreas_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupRenderPassBeginInfo( deviceMask_, deviceRenderAreaCount_, pDeviceRenderAreas_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = {},
+ uint32_t deviceRenderAreaCount_ = {},
+ const VULKAN_HPP_NAMESPACE::Rect2D* pDeviceRenderAreas_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceMask( deviceMask_ )
+ , deviceRenderAreaCount( deviceRenderAreaCount_ )
+ , pDeviceRenderAreas( pDeviceRenderAreas_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo ) - offsetof( DeviceGroupRenderPassBeginInfo, pNext ) );
+ return *this;
+ }
+
DeviceGroupRenderPassBeginInfo( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupRenderPassBeginInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupRenderPassBeginInfo& operator=( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupRenderPassBeginInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo const *>(&rhs);
return *this;
}
@@ -31310,7 +29897,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceGroupRenderPassBeginInfo & setPDeviceRenderAreas( const vk::Rect2D* pDeviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT
+ DeviceGroupRenderPassBeginInfo & setPDeviceRenderAreas( const VULKAN_HPP_NAMESPACE::Rect2D* pDeviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT
{
pDeviceRenderAreas = pDeviceRenderAreas_;
return *this;
@@ -31340,73 +29927,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupRenderPassBeginInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfo;
+ const void* pNext = {};
+ uint32_t deviceMask = {};
+ uint32_t deviceRenderAreaCount = {};
+ const VULKAN_HPP_NAMESPACE::Rect2D* pDeviceRenderAreas = {};
};
static_assert( sizeof( DeviceGroupRenderPassBeginInfo ) == sizeof( VkDeviceGroupRenderPassBeginInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupRenderPassBeginInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceGroupSubmitInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( uint32_t waitSemaphoreCount_ = 0,
- const uint32_t* pWaitSemaphoreDeviceIndices_ = nullptr,
- uint32_t commandBufferCount_ = 0,
- const uint32_t* pCommandBufferDeviceMasks_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const uint32_t* pSignalSemaphoreDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreCount( waitSemaphoreCount_ )
- , pWaitSemaphoreDeviceIndices( pWaitSemaphoreDeviceIndices_ )
- , commandBufferCount( commandBufferCount_ )
- , pCommandBufferDeviceMasks( pCommandBufferDeviceMasks_ )
- , signalSemaphoreCount( signalSemaphoreCount_ )
- , pSignalSemaphoreDeviceIndices( pSignalSemaphoreDeviceIndices_ )
- {}
-
- DeviceGroupSubmitInfo( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupSubmitInfo*>(this) = rhs;
- }
-
- DeviceGroupSubmitInfo& operator=( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupSubmitInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupSubmitInfo;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreCount;
- const uint32_t* pWaitSemaphoreDeviceIndices;
- uint32_t commandBufferCount;
- const uint32_t* pCommandBufferDeviceMasks;
- uint32_t signalSemaphoreCount;
- const uint32_t* pSignalSemaphoreDeviceIndices;
- };
- static_assert( sizeof( DeviceGroupSubmitInfo ) == sizeof( VkDeviceGroupSubmitInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupSubmitInfo : public layout::DeviceGroupSubmitInfo
+ struct DeviceGroupSubmitInfo
{
- VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( uint32_t waitSemaphoreCount_ = 0,
- const uint32_t* pWaitSemaphoreDeviceIndices_ = nullptr,
- uint32_t commandBufferCount_ = 0,
- const uint32_t* pCommandBufferDeviceMasks_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const uint32_t* pSignalSemaphoreDeviceIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupSubmitInfo( waitSemaphoreCount_, pWaitSemaphoreDeviceIndices_, commandBufferCount_, pCommandBufferDeviceMasks_, signalSemaphoreCount_, pSignalSemaphoreDeviceIndices_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphoreDeviceIndices( pWaitSemaphoreDeviceIndices_ )
+ , commandBufferCount( commandBufferCount_ )
+ , pCommandBufferDeviceMasks( pCommandBufferDeviceMasks_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphoreDeviceIndices( pSignalSemaphoreDeviceIndices_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo ) - offsetof( DeviceGroupSubmitInfo, pNext ) );
+ return *this;
+ }
+
DeviceGroupSubmitInfo( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupSubmitInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupSubmitInfo& operator=( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupSubmitInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo const *>(&rhs);
return *this;
}
@@ -31479,53 +30039,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupSubmitInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DeviceGroupSubmitInfo ) == sizeof( VkDeviceGroupSubmitInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupSubmitInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceGroupSwapchainCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( vk::DeviceGroupPresentModeFlagsKHR modes_ = vk::DeviceGroupPresentModeFlagsKHR() ) VULKAN_HPP_NOEXCEPT
- : modes( modes_ )
- {}
-
- DeviceGroupSwapchainCreateInfoKHR( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(this) = rhs;
- }
-
- DeviceGroupSwapchainCreateInfoKHR& operator=( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHR;
- const void* pNext = nullptr;
- vk::DeviceGroupPresentModeFlagsKHR modes;
- };
- static_assert( sizeof( DeviceGroupSwapchainCreateInfoKHR ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceGroupSwapchainCreateInfoKHR : public layout::DeviceGroupSwapchainCreateInfoKHR
+ struct DeviceGroupSwapchainCreateInfoKHR
{
- VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( vk::DeviceGroupPresentModeFlagsKHR modes_ = vk::DeviceGroupPresentModeFlagsKHR() ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupSwapchainCreateInfoKHR( modes_ )
+ VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : modes( modes_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR ) - offsetof( DeviceGroupSwapchainCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
DeviceGroupSwapchainCreateInfoKHR( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceGroupSwapchainCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceGroupSwapchainCreateInfoKHR& operator=( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceGroupSwapchainCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -31535,7 +30081,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceGroupSwapchainCreateInfoKHR & setModes( vk::DeviceGroupPresentModeFlagsKHR modes_ ) VULKAN_HPP_NOEXCEPT
+ DeviceGroupSwapchainCreateInfoKHR & setModes( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ ) VULKAN_HPP_NOEXCEPT
{
modes = modes_;
return *this;
@@ -31563,53 +30109,99 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceGroupSwapchainCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {};
};
static_assert( sizeof( DeviceGroupSwapchainCreateInfoKHR ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceGroupSwapchainCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceMemoryOpaqueCaptureAddressInfo
{
- struct DeviceMemoryOverallocationCreateInfoAMD
+ VULKAN_HPP_CONSTEXPR DeviceMemoryOpaqueCaptureAddressInfo( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & operator=( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( vk::MemoryOverallocationBehaviorAMD overallocationBehavior_ = vk::MemoryOverallocationBehaviorAMD::eDefault ) VULKAN_HPP_NOEXCEPT
- : overallocationBehavior( overallocationBehavior_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo ) - offsetof( DeviceMemoryOpaqueCaptureAddressInfo, pNext ) );
+ return *this;
+ }
- DeviceMemoryOverallocationCreateInfoAMD( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceMemoryOverallocationCreateInfoAMD*>(this) = rhs;
- }
+ DeviceMemoryOpaqueCaptureAddressInfo( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- DeviceMemoryOverallocationCreateInfoAMD& operator=( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceMemoryOverallocationCreateInfoAMD*>(this) = rhs;
- return *this;
- }
+ DeviceMemoryOpaqueCaptureAddressInfo& operator=( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD;
- const void* pNext = nullptr;
- vk::MemoryOverallocationBehaviorAMD overallocationBehavior;
- };
- static_assert( sizeof( DeviceMemoryOverallocationCreateInfoAMD ) == sizeof( VkDeviceMemoryOverallocationCreateInfoAMD ), "layout struct and wrapper have different size!" );
- }
+ DeviceMemoryOpaqueCaptureAddressInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
- struct DeviceMemoryOverallocationCreateInfoAMD : public layout::DeviceMemoryOverallocationCreateInfoAMD
+ DeviceMemoryOpaqueCaptureAddressInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ operator VkDeviceMemoryOpaqueCaptureAddressInfo const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo*>( this );
+ }
+
+ operator VkDeviceMemoryOpaqueCaptureAddressInfo &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkDeviceMemoryOpaqueCaptureAddressInfo*>( this );
+ }
+
+ bool operator==( DeviceMemoryOpaqueCaptureAddressInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memory == rhs.memory );
+ }
+
+ bool operator!=( DeviceMemoryOpaqueCaptureAddressInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOpaqueCaptureAddressInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory = {};
+ };
+ static_assert( sizeof( DeviceMemoryOpaqueCaptureAddressInfo ) == sizeof( VkDeviceMemoryOpaqueCaptureAddressInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<DeviceMemoryOpaqueCaptureAddressInfo>::value, "struct wrapper is not a standard layout!" );
+
+ struct DeviceMemoryOverallocationCreateInfoAMD
{
- VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( vk::MemoryOverallocationBehaviorAMD overallocationBehavior_ = vk::MemoryOverallocationBehaviorAMD::eDefault ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceMemoryOverallocationCreateInfoAMD( overallocationBehavior_ )
+ VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault ) VULKAN_HPP_NOEXCEPT
+ : overallocationBehavior( overallocationBehavior_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD & operator=( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD ) - offsetof( DeviceMemoryOverallocationCreateInfoAMD, pNext ) );
+ return *this;
+ }
+
DeviceMemoryOverallocationCreateInfoAMD( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceMemoryOverallocationCreateInfoAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceMemoryOverallocationCreateInfoAMD& operator=( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceMemoryOverallocationCreateInfoAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD const *>(&rhs);
return *this;
}
@@ -31619,7 +30211,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceMemoryOverallocationCreateInfoAMD & setOverallocationBehavior( vk::MemoryOverallocationBehaviorAMD overallocationBehavior_ ) VULKAN_HPP_NOEXCEPT
+ DeviceMemoryOverallocationCreateInfoAMD & setOverallocationBehavior( VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ ) VULKAN_HPP_NOEXCEPT
{
overallocationBehavior = overallocationBehavior_;
return *this;
@@ -31647,53 +30239,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceMemoryOverallocationCreateInfoAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault;
};
static_assert( sizeof( DeviceMemoryOverallocationCreateInfoAMD ) == sizeof( VkDeviceMemoryOverallocationCreateInfoAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceMemoryOverallocationCreateInfoAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DeviceQueueGlobalPriorityCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfoEXT( vk::QueueGlobalPriorityEXT globalPriority_ = vk::QueueGlobalPriorityEXT::eLow ) VULKAN_HPP_NOEXCEPT
- : globalPriority( globalPriority_ )
- {}
-
- DeviceQueueGlobalPriorityCreateInfoEXT( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(this) = rhs;
- }
-
- DeviceQueueGlobalPriorityCreateInfoEXT& operator=( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT;
- const void* pNext = nullptr;
- vk::QueueGlobalPriorityEXT globalPriority;
- };
- static_assert( sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceQueueGlobalPriorityCreateInfoEXT : public layout::DeviceQueueGlobalPriorityCreateInfoEXT
+ struct DeviceQueueGlobalPriorityCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfoEXT( vk::QueueGlobalPriorityEXT globalPriority_ = vk::QueueGlobalPriorityEXT::eLow ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueGlobalPriorityCreateInfoEXT( globalPriority_ )
+ VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfoEXT( VULKAN_HPP_NAMESPACE::QueueGlobalPriorityEXT globalPriority_ = VULKAN_HPP_NAMESPACE::QueueGlobalPriorityEXT::eLow ) VULKAN_HPP_NOEXCEPT
+ : globalPriority( globalPriority_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoEXT ) - offsetof( DeviceQueueGlobalPriorityCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
DeviceQueueGlobalPriorityCreateInfoEXT( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueGlobalPriorityCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceQueueGlobalPriorityCreateInfoEXT& operator=( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceQueueGlobalPriorityCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -31703,7 +30276,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceQueueGlobalPriorityCreateInfoEXT & setGlobalPriority( vk::QueueGlobalPriorityEXT globalPriority_ ) VULKAN_HPP_NOEXCEPT
+ DeviceQueueGlobalPriorityCreateInfoEXT & setGlobalPriority( VULKAN_HPP_NAMESPACE::QueueGlobalPriorityEXT globalPriority_ ) VULKAN_HPP_NOEXCEPT
{
globalPriority = globalPriority_;
return *this;
@@ -31731,61 +30304,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceQueueGlobalPriorityCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::QueueGlobalPriorityEXT globalPriority = VULKAN_HPP_NAMESPACE::QueueGlobalPriorityEXT::eLow;
};
static_assert( sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceQueueGlobalPriorityCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DeviceQueueInfo2
{
- struct DeviceQueueInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( vk::DeviceQueueCreateFlags flags_ = vk::DeviceQueueCreateFlags(),
- uint32_t queueFamilyIndex_ = 0,
- uint32_t queueIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , queueFamilyIndex( queueFamilyIndex_ )
- , queueIndex( queueIndex_ )
- {}
-
- DeviceQueueInfo2( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueInfo2*>(this) = rhs;
- }
-
- DeviceQueueInfo2& operator=( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDeviceQueueInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDeviceQueueInfo2;
- const void* pNext = nullptr;
- vk::DeviceQueueCreateFlags flags;
- uint32_t queueFamilyIndex;
- uint32_t queueIndex;
- };
- static_assert( sizeof( DeviceQueueInfo2 ) == sizeof( VkDeviceQueueInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct DeviceQueueInfo2 : public layout::DeviceQueueInfo2
- {
- VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( vk::DeviceQueueCreateFlags flags_ = vk::DeviceQueueCreateFlags(),
- uint32_t queueFamilyIndex_ = 0,
- uint32_t queueIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueInfo2( flags_, queueFamilyIndex_, queueIndex_ )
+ VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {},
+ uint32_t queueFamilyIndex_ = {},
+ uint32_t queueIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
+ , queueIndex( queueIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 & operator=( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 ) - offsetof( DeviceQueueInfo2, pNext ) );
+ return *this;
+ }
+
DeviceQueueInfo2( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DeviceQueueInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
DeviceQueueInfo2& operator=( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DeviceQueueInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const *>(&rhs);
return *this;
}
@@ -31795,7 +30345,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DeviceQueueInfo2 & setFlags( vk::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ DeviceQueueInfo2 & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -31837,17 +30387,21 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DeviceQueueInfo2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueInfo2;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {};
+ uint32_t queueFamilyIndex = {};
+ uint32_t queueIndex = {};
};
static_assert( sizeof( DeviceQueueInfo2 ) == sizeof( VkDeviceQueueInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DeviceQueueInfo2>::value, "struct wrapper is not a standard layout!" );
struct DispatchIndirectCommand
{
- VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( uint32_t x_ = 0,
- uint32_t y_ = 0,
- uint32_t z_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( uint32_t x_ = {},
+ uint32_t y_ = {},
+ uint32_t z_ = {} ) VULKAN_HPP_NOEXCEPT
: x( x_ )
, y( y_ )
, z( z_ )
@@ -31855,12 +30409,12 @@ namespace VULKAN_HPP_NAMESPACE
DispatchIndirectCommand( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDispatchIndirectCommand*>(this) = rhs;
+ *this = rhs;
}
DispatchIndirectCommand& operator=( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDispatchIndirectCommand*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DispatchIndirectCommand const *>(&rhs);
return *this;
}
@@ -31905,54 +30459,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t x;
- uint32_t y;
- uint32_t z;
+ uint32_t x = {};
+ uint32_t y = {};
+ uint32_t z = {};
};
static_assert( sizeof( DispatchIndirectCommand ) == sizeof( VkDispatchIndirectCommand ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DispatchIndirectCommand>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DisplayEventInfoEXT
{
- struct DisplayEventInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( vk::DisplayEventTypeEXT displayEvent_ = vk::DisplayEventTypeEXT::eFirstPixelOut ) VULKAN_HPP_NOEXCEPT
- : displayEvent( displayEvent_ )
- {}
-
- DisplayEventInfoEXT( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayEventInfoEXT*>(this) = rhs;
- }
-
- DisplayEventInfoEXT& operator=( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayEventInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayEventInfoEXT;
- const void* pNext = nullptr;
- vk::DisplayEventTypeEXT displayEvent;
- };
- static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayEventInfoEXT : public layout::DisplayEventInfoEXT
- {
- VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( vk::DisplayEventTypeEXT displayEvent_ = vk::DisplayEventTypeEXT::eFirstPixelOut ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayEventInfoEXT( displayEvent_ )
+ VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut ) VULKAN_HPP_NOEXCEPT
+ : displayEvent( displayEvent_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT ) - offsetof( DisplayEventInfoEXT, pNext ) );
+ return *this;
+ }
+
DisplayEventInfoEXT( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayEventInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayEventInfoEXT& operator=( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayEventInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const *>(&rhs);
return *this;
}
@@ -31962,7 +30495,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplayEventInfoEXT & setDisplayEvent( vk::DisplayEventTypeEXT displayEvent_ ) VULKAN_HPP_NOEXCEPT
+ DisplayEventInfoEXT & setDisplayEvent( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ ) VULKAN_HPP_NOEXCEPT
{
displayEvent = displayEvent_;
return *this;
@@ -31990,32 +30523,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayEventInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayEventInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut;
};
static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayEventInfoEXT>::value, "struct wrapper is not a standard layout!" );
struct DisplayModeParametersKHR
{
- VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( vk::Extent2D visibleRegion_ = vk::Extent2D(),
- uint32_t refreshRate_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( VULKAN_HPP_NAMESPACE::Extent2D visibleRegion_ = {},
+ uint32_t refreshRate_ = {} ) VULKAN_HPP_NOEXCEPT
: visibleRegion( visibleRegion_ )
, refreshRate( refreshRate_ )
{}
DisplayModeParametersKHR( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayModeParametersKHR*>(this) = rhs;
+ *this = rhs;
}
DisplayModeParametersKHR& operator=( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayModeParametersKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR const *>(&rhs);
return *this;
}
- DisplayModeParametersKHR & setVisibleRegion( vk::Extent2D visibleRegion_ ) VULKAN_HPP_NOEXCEPT
+ DisplayModeParametersKHR & setVisibleRegion( VULKAN_HPP_NAMESPACE::Extent2D visibleRegion_ ) VULKAN_HPP_NOEXCEPT
{
visibleRegion = visibleRegion_;
return *this;
@@ -32049,57 +30584,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Extent2D visibleRegion;
- uint32_t refreshRate;
+ VULKAN_HPP_NAMESPACE::Extent2D visibleRegion = {};
+ uint32_t refreshRate = {};
};
static_assert( sizeof( DisplayModeParametersKHR ) == sizeof( VkDisplayModeParametersKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayModeParametersKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DisplayModeCreateInfoKHR
{
- struct DisplayModeCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( vk::DisplayModeCreateFlagsKHR flags_ = vk::DisplayModeCreateFlagsKHR(),
- vk::DisplayModeParametersKHR parameters_ = vk::DisplayModeParametersKHR() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , parameters( parameters_ )
- {}
-
- DisplayModeCreateInfoKHR( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayModeCreateInfoKHR*>(this) = rhs;
- }
-
- DisplayModeCreateInfoKHR& operator=( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayModeCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayModeCreateInfoKHR;
- const void* pNext = nullptr;
- vk::DisplayModeCreateFlagsKHR flags;
- vk::DisplayModeParametersKHR parameters;
- };
- static_assert( sizeof( DisplayModeCreateInfoKHR ) == sizeof( VkDisplayModeCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayModeCreateInfoKHR : public layout::DisplayModeCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( vk::DisplayModeCreateFlagsKHR flags_ = vk::DisplayModeCreateFlagsKHR(),
- vk::DisplayModeParametersKHR parameters_ = vk::DisplayModeParametersKHR() ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayModeCreateInfoKHR( flags_, parameters_ )
+ VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ = {},
+ VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , parameters( parameters_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR ) - offsetof( DisplayModeCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
DisplayModeCreateInfoKHR( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayModeCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayModeCreateInfoKHR& operator=( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayModeCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -32109,13 +30621,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplayModeCreateInfoKHR & setFlags( vk::DisplayModeCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ DisplayModeCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- DisplayModeCreateInfoKHR & setParameters( vk::DisplayModeParametersKHR parameters_ ) VULKAN_HPP_NOEXCEPT
+ DisplayModeCreateInfoKHR & setParameters( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ ) VULKAN_HPP_NOEXCEPT
{
parameters = parameters_;
return *this;
@@ -32144,25 +30656,31 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayModeCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags = {};
+ VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {};
};
static_assert( sizeof( DisplayModeCreateInfoKHR ) == sizeof( VkDisplayModeCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayModeCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
struct DisplayModePropertiesKHR
{
- DisplayModePropertiesKHR() VULKAN_HPP_NOEXCEPT
+ DisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ = {},
+ VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {} ) VULKAN_HPP_NOEXCEPT
+ : displayMode( displayMode_ )
+ , parameters( parameters_ )
{}
DisplayModePropertiesKHR( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayModePropertiesKHR*>(this) = rhs;
+ *this = rhs;
}
DisplayModePropertiesKHR& operator=( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayModePropertiesKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR const *>(&rhs);
return *this;
}
@@ -32188,52 +30706,32 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DisplayModeKHR displayMode;
- vk::DisplayModeParametersKHR parameters;
+ VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode = {};
+ VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {};
};
static_assert( sizeof( DisplayModePropertiesKHR ) == sizeof( VkDisplayModePropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayModePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayModeProperties2KHR
- {
- protected:
- DisplayModeProperties2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- DisplayModeProperties2KHR( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayModeProperties2KHR*>(this) = rhs;
- }
-
- DisplayModeProperties2KHR& operator=( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayModeProperties2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayModeProperties2KHR;
- void* pNext = nullptr;
- vk::DisplayModePropertiesKHR displayModeProperties;
- };
- static_assert( sizeof( DisplayModeProperties2KHR ) == sizeof( VkDisplayModeProperties2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayModeProperties2KHR : public layout::DisplayModeProperties2KHR
+ struct DisplayModeProperties2KHR
{
- DisplayModeProperties2KHR() VULKAN_HPP_NOEXCEPT
- : layout::DisplayModeProperties2KHR()
+ DisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : displayModeProperties( displayModeProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR & operator=( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR ) - offsetof( DisplayModeProperties2KHR, pNext ) );
+ return *this;
+ }
+
DisplayModeProperties2KHR( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayModeProperties2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayModeProperties2KHR& operator=( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayModeProperties2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR const *>(&rhs);
return *this;
}
@@ -32259,52 +30757,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayModeProperties2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeProperties2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties = {};
};
static_assert( sizeof( DisplayModeProperties2KHR ) == sizeof( VkDisplayModeProperties2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayModeProperties2KHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DisplayNativeHdrSurfaceCapabilitiesAMD
{
- struct DisplayNativeHdrSurfaceCapabilitiesAMD
- {
- protected:
- DisplayNativeHdrSurfaceCapabilitiesAMD() VULKAN_HPP_NOEXCEPT
- {}
-
- DisplayNativeHdrSurfaceCapabilitiesAMD( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayNativeHdrSurfaceCapabilitiesAMD*>(this) = rhs;
- }
-
- DisplayNativeHdrSurfaceCapabilitiesAMD& operator=( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayNativeHdrSurfaceCapabilitiesAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD;
- void* pNext = nullptr;
- vk::Bool32 localDimmingSupport;
- };
- static_assert( sizeof( DisplayNativeHdrSurfaceCapabilitiesAMD ) == sizeof( VkDisplayNativeHdrSurfaceCapabilitiesAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayNativeHdrSurfaceCapabilitiesAMD : public layout::DisplayNativeHdrSurfaceCapabilitiesAMD
- {
- DisplayNativeHdrSurfaceCapabilitiesAMD() VULKAN_HPP_NOEXCEPT
- : layout::DisplayNativeHdrSurfaceCapabilitiesAMD()
+ DisplayNativeHdrSurfaceCapabilitiesAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport_ = {} ) VULKAN_HPP_NOEXCEPT
+ : localDimmingSupport( localDimmingSupport_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD & operator=( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD ) - offsetof( DisplayNativeHdrSurfaceCapabilitiesAMD, pNext ) );
+ return *this;
+ }
+
DisplayNativeHdrSurfaceCapabilitiesAMD( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayNativeHdrSurfaceCapabilitiesAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayNativeHdrSurfaceCapabilitiesAMD& operator=( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayNativeHdrSurfaceCapabilitiesAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD const *>(&rhs);
return *this;
}
@@ -32330,25 +30810,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayNativeHdrSurfaceCapabilitiesAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport = {};
};
static_assert( sizeof( DisplayNativeHdrSurfaceCapabilitiesAMD ) == sizeof( VkDisplayNativeHdrSurfaceCapabilitiesAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayNativeHdrSurfaceCapabilitiesAMD>::value, "struct wrapper is not a standard layout!" );
struct DisplayPlaneCapabilitiesKHR
{
- DisplayPlaneCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
DisplayPlaneCapabilitiesKHR( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>(this) = rhs;
+ *this = rhs;
}
DisplayPlaneCapabilitiesKHR& operator=( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR const *>(&rhs);
return *this;
}
@@ -32381,59 +30880,39 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DisplayPlaneAlphaFlagsKHR supportedAlpha;
- vk::Offset2D minSrcPosition;
- vk::Offset2D maxSrcPosition;
- vk::Extent2D minSrcExtent;
- vk::Extent2D maxSrcExtent;
- vk::Offset2D minDstPosition;
- vk::Offset2D maxDstPosition;
- vk::Extent2D minDstExtent;
- vk::Extent2D maxDstExtent;
+ 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 = {};
};
static_assert( sizeof( DisplayPlaneCapabilitiesKHR ) == sizeof( VkDisplayPlaneCapabilitiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPlaneCapabilitiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayPlaneCapabilities2KHR
- {
- protected:
- DisplayPlaneCapabilities2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- DisplayPlaneCapabilities2KHR( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>(this) = rhs;
- }
-
- DisplayPlaneCapabilities2KHR& operator=( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayPlaneCapabilities2KHR;
- void* pNext = nullptr;
- vk::DisplayPlaneCapabilitiesKHR capabilities;
- };
- static_assert( sizeof( DisplayPlaneCapabilities2KHR ) == sizeof( VkDisplayPlaneCapabilities2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayPlaneCapabilities2KHR : public layout::DisplayPlaneCapabilities2KHR
+ struct DisplayPlaneCapabilities2KHR
{
- DisplayPlaneCapabilities2KHR() VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneCapabilities2KHR()
+ DisplayPlaneCapabilities2KHR( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities_ = {} ) VULKAN_HPP_NOEXCEPT
+ : capabilities( capabilities_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR & operator=( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR ) - offsetof( DisplayPlaneCapabilities2KHR, pNext ) );
+ return *this;
+ }
+
DisplayPlaneCapabilities2KHR( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneCapabilities2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayPlaneCapabilities2KHR& operator=( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayPlaneCapabilities2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR const *>(&rhs);
return *this;
}
@@ -32459,57 +30938,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayPlaneCapabilities2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneCapabilities2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities = {};
};
static_assert( sizeof( DisplayPlaneCapabilities2KHR ) == sizeof( VkDisplayPlaneCapabilities2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPlaneCapabilities2KHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DisplayPlaneInfo2KHR
{
- struct DisplayPlaneInfo2KHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( vk::DisplayModeKHR mode_ = vk::DisplayModeKHR(),
- uint32_t planeIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : mode( mode_ )
- , planeIndex( planeIndex_ )
- {}
-
- DisplayPlaneInfo2KHR( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneInfo2KHR*>(this) = rhs;
- }
-
- DisplayPlaneInfo2KHR& operator=( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneInfo2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayPlaneInfo2KHR;
- const void* pNext = nullptr;
- vk::DisplayModeKHR mode;
- uint32_t planeIndex;
- };
- static_assert( sizeof( DisplayPlaneInfo2KHR ) == sizeof( VkDisplayPlaneInfo2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayPlaneInfo2KHR : public layout::DisplayPlaneInfo2KHR
- {
- VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( vk::DisplayModeKHR mode_ = vk::DisplayModeKHR(),
- uint32_t planeIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneInfo2KHR( mode_, planeIndex_ )
+ VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ = {},
+ uint32_t planeIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : mode( mode_ )
+ , planeIndex( planeIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & operator=( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR ) - offsetof( DisplayPlaneInfo2KHR, pNext ) );
+ return *this;
+ }
+
DisplayPlaneInfo2KHR( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneInfo2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayPlaneInfo2KHR& operator=( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayPlaneInfo2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR const *>(&rhs);
return *this;
}
@@ -32519,7 +30977,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplayPlaneInfo2KHR & setMode( vk::DisplayModeKHR mode_ ) VULKAN_HPP_NOEXCEPT
+ DisplayPlaneInfo2KHR & setMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ ) VULKAN_HPP_NOEXCEPT
{
mode = mode_;
return *this;
@@ -32554,25 +31012,31 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayPlaneInfo2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneInfo2KHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayModeKHR mode = {};
+ uint32_t planeIndex = {};
};
static_assert( sizeof( DisplayPlaneInfo2KHR ) == sizeof( VkDisplayPlaneInfo2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPlaneInfo2KHR>::value, "struct wrapper is not a standard layout!" );
struct DisplayPlanePropertiesKHR
{
- DisplayPlanePropertiesKHR() VULKAN_HPP_NOEXCEPT
+ DisplayPlanePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay_ = {},
+ uint32_t currentStackIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : currentDisplay( currentDisplay_ )
+ , currentStackIndex( currentStackIndex_ )
{}
DisplayPlanePropertiesKHR( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPlanePropertiesKHR*>(this) = rhs;
+ *this = rhs;
}
DisplayPlanePropertiesKHR& operator=( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPlanePropertiesKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR const *>(&rhs);
return *this;
}
@@ -32598,52 +31062,32 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DisplayKHR currentDisplay;
- uint32_t currentStackIndex;
+ VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay = {};
+ uint32_t currentStackIndex = {};
};
static_assert( sizeof( DisplayPlanePropertiesKHR ) == sizeof( VkDisplayPlanePropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPlanePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayPlaneProperties2KHR
- {
- protected:
- DisplayPlaneProperties2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- DisplayPlaneProperties2KHR( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneProperties2KHR*>(this) = rhs;
- }
-
- DisplayPlaneProperties2KHR& operator=( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPlaneProperties2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayPlaneProperties2KHR;
- void* pNext = nullptr;
- vk::DisplayPlanePropertiesKHR displayPlaneProperties;
- };
- static_assert( sizeof( DisplayPlaneProperties2KHR ) == sizeof( VkDisplayPlaneProperties2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayPlaneProperties2KHR : public layout::DisplayPlaneProperties2KHR
+ struct DisplayPlaneProperties2KHR
{
- DisplayPlaneProperties2KHR() VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneProperties2KHR()
+ DisplayPlaneProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : displayPlaneProperties( displayPlaneProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR & operator=( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR ) - offsetof( DisplayPlaneProperties2KHR, pNext ) );
+ return *this;
+ }
+
DisplayPlaneProperties2KHR( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPlaneProperties2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayPlaneProperties2KHR& operator=( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayPlaneProperties2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR const *>(&rhs);
return *this;
}
@@ -32669,53 +31113,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayPlaneProperties2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneProperties2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties = {};
};
static_assert( sizeof( DisplayPlaneProperties2KHR ) == sizeof( VkDisplayPlaneProperties2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPlaneProperties2KHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayPowerInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( vk::DisplayPowerStateEXT powerState_ = vk::DisplayPowerStateEXT::eOff ) VULKAN_HPP_NOEXCEPT
- : powerState( powerState_ )
- {}
-
- DisplayPowerInfoEXT( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPowerInfoEXT*>(this) = rhs;
- }
-
- DisplayPowerInfoEXT& operator=( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPowerInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayPowerInfoEXT;
- const void* pNext = nullptr;
- vk::DisplayPowerStateEXT powerState;
- };
- static_assert( sizeof( DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayPowerInfoEXT : public layout::DisplayPowerInfoEXT
+ struct DisplayPowerInfoEXT
{
- VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( vk::DisplayPowerStateEXT powerState_ = vk::DisplayPowerStateEXT::eOff ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPowerInfoEXT( powerState_ )
+ VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff ) VULKAN_HPP_NOEXCEPT
+ : powerState( powerState_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & operator=( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT ) - offsetof( DisplayPowerInfoEXT, pNext ) );
+ return *this;
+ }
+
DisplayPowerInfoEXT( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPowerInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayPowerInfoEXT& operator=( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayPowerInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT const *>(&rhs);
return *this;
}
@@ -32725,7 +31150,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplayPowerInfoEXT & setPowerState( vk::DisplayPowerStateEXT powerState_ ) VULKAN_HPP_NOEXCEPT
+ DisplayPowerInfoEXT & setPowerState( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ ) VULKAN_HPP_NOEXCEPT
{
powerState = powerState_;
return *this;
@@ -32753,61 +31178,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayPowerInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPowerInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff;
};
static_assert( sizeof( DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPowerInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayPresentInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( vk::Rect2D srcRect_ = vk::Rect2D(),
- vk::Rect2D dstRect_ = vk::Rect2D(),
- vk::Bool32 persistent_ = 0 ) VULKAN_HPP_NOEXCEPT
- : srcRect( srcRect_ )
- , dstRect( dstRect_ )
- , persistent( persistent_ )
- {}
-
- DisplayPresentInfoKHR( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPresentInfoKHR*>(this) = rhs;
- }
-
- DisplayPresentInfoKHR& operator=( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayPresentInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayPresentInfoKHR;
- const void* pNext = nullptr;
- vk::Rect2D srcRect;
- vk::Rect2D dstRect;
- vk::Bool32 persistent;
- };
- static_assert( sizeof( DisplayPresentInfoKHR ) == sizeof( VkDisplayPresentInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayPresentInfoKHR : public layout::DisplayPresentInfoKHR
+ struct DisplayPresentInfoKHR
{
- VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( vk::Rect2D srcRect_ = vk::Rect2D(),
- vk::Rect2D dstRect_ = vk::Rect2D(),
- vk::Bool32 persistent_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPresentInfoKHR( srcRect_, dstRect_, persistent_ )
+ VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( VULKAN_HPP_NAMESPACE::Rect2D srcRect_ = {},
+ VULKAN_HPP_NAMESPACE::Rect2D dstRect_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 persistent_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcRect( srcRect_ )
+ , dstRect( dstRect_ )
+ , persistent( persistent_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR & operator=( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR ) - offsetof( DisplayPresentInfoKHR, pNext ) );
+ return *this;
+ }
+
DisplayPresentInfoKHR( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayPresentInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayPresentInfoKHR& operator=( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayPresentInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR const *>(&rhs);
return *this;
}
@@ -32817,19 +31219,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplayPresentInfoKHR & setSrcRect( vk::Rect2D srcRect_ ) VULKAN_HPP_NOEXCEPT
+ DisplayPresentInfoKHR & setSrcRect( VULKAN_HPP_NAMESPACE::Rect2D srcRect_ ) VULKAN_HPP_NOEXCEPT
{
srcRect = srcRect_;
return *this;
}
- DisplayPresentInfoKHR & setDstRect( vk::Rect2D dstRect_ ) VULKAN_HPP_NOEXCEPT
+ DisplayPresentInfoKHR & setDstRect( VULKAN_HPP_NAMESPACE::Rect2D dstRect_ ) VULKAN_HPP_NOEXCEPT
{
dstRect = dstRect_;
return *this;
}
- DisplayPresentInfoKHR & setPersistent( vk::Bool32 persistent_ ) VULKAN_HPP_NOEXCEPT
+ DisplayPresentInfoKHR & setPersistent( VULKAN_HPP_NAMESPACE::Bool32 persistent_ ) VULKAN_HPP_NOEXCEPT
{
persistent = persistent_;
return *this;
@@ -32859,25 +31261,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayPresentInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DisplayPresentInfoKHR ) == sizeof( VkDisplayPresentInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPresentInfoKHR>::value, "struct wrapper is not a standard layout!" );
struct DisplayPropertiesKHR
{
- DisplayPropertiesKHR() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
DisplayPropertiesKHR( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPropertiesKHR*>(this) = rhs;
+ *this = rhs;
}
DisplayPropertiesKHR& operator=( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDisplayPropertiesKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR const *>(&rhs);
return *this;
}
@@ -32908,57 +31327,37 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DisplayKHR display;
- const char* displayName;
- vk::Extent2D physicalDimensions;
- vk::Extent2D physicalResolution;
- vk::SurfaceTransformFlagsKHR supportedTransforms;
- vk::Bool32 planeReorderPossible;
- vk::Bool32 persistentContent;
+ 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 = {};
};
static_assert( sizeof( DisplayPropertiesKHR ) == sizeof( VkDisplayPropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct DisplayProperties2KHR
- {
- protected:
- DisplayProperties2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- DisplayProperties2KHR( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayProperties2KHR*>(this) = rhs;
- }
-
- DisplayProperties2KHR& operator=( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplayProperties2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplayProperties2KHR;
- void* pNext = nullptr;
- vk::DisplayPropertiesKHR displayProperties;
- };
- static_assert( sizeof( DisplayProperties2KHR ) == sizeof( VkDisplayProperties2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplayProperties2KHR : public layout::DisplayProperties2KHR
+ struct DisplayProperties2KHR
{
- DisplayProperties2KHR() VULKAN_HPP_NOEXCEPT
- : layout::DisplayProperties2KHR()
+ DisplayProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : displayProperties( displayProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplayProperties2KHR & operator=( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR ) - offsetof( DisplayProperties2KHR, pNext ) );
+ return *this;
+ }
+
DisplayProperties2KHR( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplayProperties2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplayProperties2KHR& operator=( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplayProperties2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplayProperties2KHR const *>(&rhs);
return *this;
}
@@ -32984,81 +31383,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplayProperties2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayProperties2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties = {};
};
static_assert( sizeof( DisplayProperties2KHR ) == sizeof( VkDisplayProperties2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplayProperties2KHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DisplaySurfaceCreateInfoKHR
{
- struct DisplaySurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR DisplaySurfaceCreateInfoKHR( vk::DisplaySurfaceCreateFlagsKHR flags_ = vk::DisplaySurfaceCreateFlagsKHR(),
- vk::DisplayModeKHR displayMode_ = vk::DisplayModeKHR(),
- uint32_t planeIndex_ = 0,
- uint32_t planeStackIndex_ = 0,
- vk::SurfaceTransformFlagBitsKHR transform_ = vk::SurfaceTransformFlagBitsKHR::eIdentity,
- float globalAlpha_ = 0,
- vk::DisplayPlaneAlphaFlagBitsKHR alphaMode_ = vk::DisplayPlaneAlphaFlagBitsKHR::eOpaque,
- vk::Extent2D imageExtent_ = vk::Extent2D() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , displayMode( displayMode_ )
- , planeIndex( planeIndex_ )
- , planeStackIndex( planeStackIndex_ )
- , transform( transform_ )
- , globalAlpha( globalAlpha_ )
- , alphaMode( alphaMode_ )
- , imageExtent( imageExtent_ )
- {}
-
- DisplaySurfaceCreateInfoKHR( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplaySurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- DisplaySurfaceCreateInfoKHR& operator=( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDisplaySurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::DisplaySurfaceCreateFlagsKHR flags;
- vk::DisplayModeKHR displayMode;
- uint32_t planeIndex;
- uint32_t planeStackIndex;
- vk::SurfaceTransformFlagBitsKHR transform;
- float globalAlpha;
- vk::DisplayPlaneAlphaFlagBitsKHR alphaMode;
- vk::Extent2D imageExtent;
- };
- static_assert( sizeof( DisplaySurfaceCreateInfoKHR ) == sizeof( VkDisplaySurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct DisplaySurfaceCreateInfoKHR : public layout::DisplaySurfaceCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR DisplaySurfaceCreateInfoKHR( vk::DisplaySurfaceCreateFlagsKHR flags_ = vk::DisplaySurfaceCreateFlagsKHR(),
- vk::DisplayModeKHR displayMode_ = vk::DisplayModeKHR(),
- uint32_t planeIndex_ = 0,
- uint32_t planeStackIndex_ = 0,
- vk::SurfaceTransformFlagBitsKHR transform_ = vk::SurfaceTransformFlagBitsKHR::eIdentity,
- float globalAlpha_ = 0,
- vk::DisplayPlaneAlphaFlagBitsKHR alphaMode_ = vk::DisplayPlaneAlphaFlagBitsKHR::eOpaque,
- vk::Extent2D imageExtent_ = vk::Extent2D() ) VULKAN_HPP_NOEXCEPT
- : layout::DisplaySurfaceCreateInfoKHR( flags_, displayMode_, planeIndex_, planeStackIndex_, transform_, globalAlpha_, alphaMode_, imageExtent_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , displayMode( displayMode_ )
+ , planeIndex( planeIndex_ )
+ , planeStackIndex( planeStackIndex_ )
+ , transform( transform_ )
+ , globalAlpha( globalAlpha_ )
+ , alphaMode( alphaMode_ )
+ , imageExtent( imageExtent_ )
{}
+ VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR ) - offsetof( DisplaySurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
DisplaySurfaceCreateInfoKHR( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DisplaySurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
DisplaySurfaceCreateInfoKHR& operator=( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DisplaySurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -33068,13 +31434,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplaySurfaceCreateInfoKHR & setFlags( vk::DisplaySurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ DisplaySurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- DisplaySurfaceCreateInfoKHR & setDisplayMode( vk::DisplayModeKHR displayMode_ ) VULKAN_HPP_NOEXCEPT
+ DisplaySurfaceCreateInfoKHR & setDisplayMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ ) VULKAN_HPP_NOEXCEPT
{
displayMode = displayMode_;
return *this;
@@ -33092,7 +31458,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplaySurfaceCreateInfoKHR & setTransform( vk::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT
+ DisplaySurfaceCreateInfoKHR & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT
{
transform = transform_;
return *this;
@@ -33104,13 +31470,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- DisplaySurfaceCreateInfoKHR & setAlphaMode( vk::DisplayPlaneAlphaFlagBitsKHR alphaMode_ ) VULKAN_HPP_NOEXCEPT
+ DisplaySurfaceCreateInfoKHR & setAlphaMode( VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode_ ) VULKAN_HPP_NOEXCEPT
{
alphaMode = alphaMode_;
return *this;
}
- DisplaySurfaceCreateInfoKHR & setImageExtent( vk::Extent2D imageExtent_ ) VULKAN_HPP_NOEXCEPT
+ DisplaySurfaceCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ ) VULKAN_HPP_NOEXCEPT
{
imageExtent = imageExtent_;
return *this;
@@ -33134,9 +31500,9 @@ namespace VULKAN_HPP_NAMESPACE
&& ( displayMode == rhs.displayMode )
&& ( planeIndex == rhs.planeIndex )
&& ( planeStackIndex == rhs.planeStackIndex )
- && vk::operator==( transform, rhs.transform )
+ && ( transform == rhs.transform )
&& ( globalAlpha == rhs.globalAlpha )
- && vk::operator==( alphaMode, rhs.alphaMode )
+ && ( alphaMode == rhs.alphaMode )
&& ( imageExtent == rhs.imageExtent );
}
@@ -33145,19 +31511,28 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DisplaySurfaceCreateInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( DisplaySurfaceCreateInfoKHR ) == sizeof( VkDisplaySurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DisplaySurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
struct DrawIndexedIndirectCommand
{
- VULKAN_HPP_CONSTEXPR DrawIndexedIndirectCommand( uint32_t indexCount_ = 0,
- uint32_t instanceCount_ = 0,
- uint32_t firstIndex_ = 0,
- int32_t vertexOffset_ = 0,
- uint32_t firstInstance_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -33167,12 +31542,12 @@ namespace VULKAN_HPP_NAMESPACE
DrawIndexedIndirectCommand( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawIndexedIndirectCommand*>(this) = rhs;
+ *this = rhs;
}
DrawIndexedIndirectCommand& operator=( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawIndexedIndirectCommand*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DrawIndexedIndirectCommand const *>(&rhs);
return *this;
}
@@ -33231,21 +31606,21 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t indexCount;
- uint32_t instanceCount;
- uint32_t firstIndex;
- int32_t vertexOffset;
- uint32_t firstInstance;
+ uint32_t indexCount = {};
+ uint32_t instanceCount = {};
+ uint32_t firstIndex = {};
+ int32_t vertexOffset = {};
+ uint32_t firstInstance = {};
};
static_assert( sizeof( DrawIndexedIndirectCommand ) == sizeof( VkDrawIndexedIndirectCommand ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DrawIndexedIndirectCommand>::value, "struct wrapper is not a standard layout!" );
struct DrawIndirectCommand
{
- VULKAN_HPP_CONSTEXPR DrawIndirectCommand( uint32_t vertexCount_ = 0,
- uint32_t instanceCount_ = 0,
- uint32_t firstVertex_ = 0,
- uint32_t firstInstance_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -33254,12 +31629,12 @@ namespace VULKAN_HPP_NAMESPACE
DrawIndirectCommand( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawIndirectCommand*>(this) = rhs;
+ *this = rhs;
}
DrawIndirectCommand& operator=( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawIndirectCommand*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DrawIndirectCommand const *>(&rhs);
return *this;
}
@@ -33311,30 +31686,30 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t vertexCount;
- uint32_t instanceCount;
- uint32_t firstVertex;
- uint32_t firstInstance;
+ uint32_t vertexCount = {};
+ uint32_t instanceCount = {};
+ uint32_t firstVertex = {};
+ uint32_t firstInstance = {};
};
static_assert( sizeof( DrawIndirectCommand ) == sizeof( VkDrawIndirectCommand ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DrawIndirectCommand>::value, "struct wrapper is not a standard layout!" );
struct DrawMeshTasksIndirectCommandNV
{
- VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( uint32_t taskCount_ = 0,
- uint32_t firstTask_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( uint32_t taskCount_ = {},
+ uint32_t firstTask_ = {} ) VULKAN_HPP_NOEXCEPT
: taskCount( taskCount_ )
, firstTask( firstTask_ )
{}
DrawMeshTasksIndirectCommandNV( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawMeshTasksIndirectCommandNV*>(this) = rhs;
+ *this = rhs;
}
DrawMeshTasksIndirectCommandNV& operator=( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrawMeshTasksIndirectCommandNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandNV const *>(&rhs);
return *this;
}
@@ -33372,25 +31747,30 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t taskCount;
- uint32_t firstTask;
+ uint32_t taskCount = {};
+ uint32_t firstTask = {};
};
static_assert( sizeof( DrawMeshTasksIndirectCommandNV ) == sizeof( VkDrawMeshTasksIndirectCommandNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DrawMeshTasksIndirectCommandNV>::value, "struct wrapper is not a standard layout!" );
struct DrmFormatModifierPropertiesEXT
{
- DrmFormatModifierPropertiesEXT() VULKAN_HPP_NOEXCEPT
+ DrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {},
+ uint32_t drmFormatModifierPlaneCount_ = {},
+ VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifier( drmFormatModifier_ )
+ , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ )
+ , drmFormatModifierTilingFeatures( drmFormatModifierTilingFeatures_ )
{}
DrmFormatModifierPropertiesEXT( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrmFormatModifierPropertiesEXT*>(this) = rhs;
+ *this = rhs;
}
DrmFormatModifierPropertiesEXT& operator=( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkDrmFormatModifierPropertiesEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT const *>(&rhs);
return *this;
}
@@ -33417,54 +31797,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint64_t drmFormatModifier;
- uint32_t drmFormatModifierPlaneCount;
- vk::FormatFeatureFlags drmFormatModifierTilingFeatures;
+ uint64_t drmFormatModifier = {};
+ uint32_t drmFormatModifierPlaneCount = {};
+ VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures = {};
};
static_assert( sizeof( DrmFormatModifierPropertiesEXT ) == sizeof( VkDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DrmFormatModifierPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct DrmFormatModifierPropertiesListEXT
{
- struct DrmFormatModifierPropertiesListEXT
- {
- protected:
- DrmFormatModifierPropertiesListEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- DrmFormatModifierPropertiesListEXT( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDrmFormatModifierPropertiesListEXT*>(this) = rhs;
- }
-
- DrmFormatModifierPropertiesListEXT& operator=( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkDrmFormatModifierPropertiesListEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eDrmFormatModifierPropertiesListEXT;
- void* pNext = nullptr;
- uint32_t drmFormatModifierCount;
- vk::DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties;
- };
- static_assert( sizeof( DrmFormatModifierPropertiesListEXT ) == sizeof( VkDrmFormatModifierPropertiesListEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct DrmFormatModifierPropertiesListEXT : public layout::DrmFormatModifierPropertiesListEXT
- {
- DrmFormatModifierPropertiesListEXT() VULKAN_HPP_NOEXCEPT
- : layout::DrmFormatModifierPropertiesListEXT()
+ DrmFormatModifierPropertiesListEXT( uint32_t drmFormatModifierCount_ = {},
+ VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifierCount( drmFormatModifierCount_ )
+ , pDrmFormatModifierProperties( pDrmFormatModifierProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT & operator=( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT ) - offsetof( DrmFormatModifierPropertiesListEXT, pNext ) );
+ return *this;
+ }
+
DrmFormatModifierPropertiesListEXT( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::DrmFormatModifierPropertiesListEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
DrmFormatModifierPropertiesListEXT& operator=( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::DrmFormatModifierPropertiesListEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT const *>(&rhs);
return *this;
}
@@ -33491,53 +31852,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::DrmFormatModifierPropertiesListEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDrmFormatModifierPropertiesListEXT;
+ void* pNext = {};
+ uint32_t drmFormatModifierCount = {};
+ VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties = {};
};
static_assert( sizeof( DrmFormatModifierPropertiesListEXT ) == sizeof( VkDrmFormatModifierPropertiesListEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<DrmFormatModifierPropertiesListEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct EventCreateInfo
{
- struct EventCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR EventCreateInfo( vk::EventCreateFlags flags_ = vk::EventCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- {}
-
- EventCreateInfo( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkEventCreateInfo*>(this) = rhs;
- }
-
- EventCreateInfo& operator=( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkEventCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eEventCreateInfo;
- const void* pNext = nullptr;
- vk::EventCreateFlags flags;
- };
- static_assert( sizeof( EventCreateInfo ) == sizeof( VkEventCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct EventCreateInfo : public layout::EventCreateInfo
- {
- VULKAN_HPP_CONSTEXPR EventCreateInfo( vk::EventCreateFlags flags_ = vk::EventCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::EventCreateInfo( flags_ )
+ VULKAN_HPP_CONSTEXPR EventCreateInfo( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::EventCreateInfo & operator=( VULKAN_HPP_NAMESPACE::EventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::EventCreateInfo ) - offsetof( EventCreateInfo, pNext ) );
+ return *this;
+ }
+
EventCreateInfo( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::EventCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
EventCreateInfo& operator=( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::EventCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::EventCreateInfo const *>(&rhs);
return *this;
}
@@ -33547,7 +31890,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- EventCreateInfo & setFlags( vk::EventCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ EventCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -33575,53 +31918,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::EventCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eEventCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::EventCreateFlags flags = {};
};
static_assert( sizeof( EventCreateInfo ) == sizeof( VkEventCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<EventCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ExportFenceCreateInfo
{
- struct ExportFenceCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( vk::ExternalFenceHandleTypeFlags handleTypes_ = vk::ExternalFenceHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExportFenceCreateInfo( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportFenceCreateInfo*>(this) = rhs;
- }
-
- ExportFenceCreateInfo& operator=( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportFenceCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportFenceCreateInfo;
- const void* pNext = nullptr;
- vk::ExternalFenceHandleTypeFlags handleTypes;
- };
- static_assert( sizeof( ExportFenceCreateInfo ) == sizeof( VkExportFenceCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportFenceCreateInfo : public layout::ExportFenceCreateInfo
- {
- VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( vk::ExternalFenceHandleTypeFlags handleTypes_ = vk::ExternalFenceHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ExportFenceCreateInfo( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo ) - offsetof( ExportFenceCreateInfo, pNext ) );
+ return *this;
+ }
+
ExportFenceCreateInfo( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportFenceCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportFenceCreateInfo& operator=( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportFenceCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo const *>(&rhs);
return *this;
}
@@ -33631,7 +31955,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExportFenceCreateInfo & setHandleTypes( vk::ExternalFenceHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExportFenceCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -33659,63 +31983,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportFenceCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes = {};
};
static_assert( sizeof( ExportFenceCreateInfo ) == sizeof( VkExportFenceCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportFenceCreateInfo>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ExportFenceWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pAttributes( pAttributes_ )
- , dwAccess( dwAccess_ )
- , name( name_ )
- {}
-
- ExportFenceWin32HandleInfoKHR( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ExportFenceWin32HandleInfoKHR& operator=( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR;
- const void* pNext = nullptr;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
- };
- static_assert( sizeof( ExportFenceWin32HandleInfoKHR ) == sizeof( VkExportFenceWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportFenceWin32HandleInfoKHR : public layout::ExportFenceWin32HandleInfoKHR
+ struct ExportFenceWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ExportFenceWin32HandleInfoKHR( pAttributes_, dwAccess_, name_ )
+ VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = {},
+ DWORD dwAccess_ = {},
+ LPCWSTR name_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR ) - offsetof( ExportFenceWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ExportFenceWin32HandleInfoKHR( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportFenceWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportFenceWin32HandleInfoKHR& operator=( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportFenceWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -33767,54 +32068,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportFenceWin32HandleInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR;
+ const void* pNext = {};
+ const SECURITY_ATTRIBUTES* pAttributes = {};
+ DWORD dwAccess = {};
+ LPCWSTR name = {};
};
static_assert( sizeof( ExportFenceWin32HandleInfoKHR ) == sizeof( VkExportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportFenceWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct ExportMemoryAllocateInfo
{
- struct ExportMemoryAllocateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExportMemoryAllocateInfo( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryAllocateInfo*>(this) = rhs;
- }
-
- ExportMemoryAllocateInfo& operator=( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryAllocateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportMemoryAllocateInfo;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlags handleTypes;
- };
- static_assert( sizeof( ExportMemoryAllocateInfo ) == sizeof( VkExportMemoryAllocateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportMemoryAllocateInfo : public layout::ExportMemoryAllocateInfo
- {
- VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryAllocateInfo( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo ) - offsetof( ExportMemoryAllocateInfo, pNext ) );
+ return *this;
+ }
+
ExportMemoryAllocateInfo( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryAllocateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportMemoryAllocateInfo& operator=( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportMemoryAllocateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo const *>(&rhs);
return *this;
}
@@ -33824,7 +32108,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExportMemoryAllocateInfo & setHandleTypes( vk::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExportMemoryAllocateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -33852,53 +32136,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportMemoryAllocateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {};
};
static_assert( sizeof( ExportMemoryAllocateInfo ) == sizeof( VkExportMemoryAllocateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportMemoryAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ExportMemoryAllocateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ = vk::ExternalMemoryHandleTypeFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExportMemoryAllocateInfoNV( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryAllocateInfoNV*>(this) = rhs;
- }
-
- ExportMemoryAllocateInfoNV& operator=( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryAllocateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportMemoryAllocateInfoNV;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagsNV handleTypes;
- };
- static_assert( sizeof( ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportMemoryAllocateInfoNV : public layout::ExportMemoryAllocateInfoNV
+ struct ExportMemoryAllocateInfoNV
{
- VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ = vk::ExternalMemoryHandleTypeFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryAllocateInfoNV( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV & operator=( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV ) - offsetof( ExportMemoryAllocateInfoNV, pNext ) );
+ return *this;
+ }
+
ExportMemoryAllocateInfoNV( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryAllocateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportMemoryAllocateInfoNV& operator=( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportMemoryAllocateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV const *>(&rhs);
return *this;
}
@@ -33908,7 +32173,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExportMemoryAllocateInfoNV & setHandleTypes( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExportMemoryAllocateInfoNV & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -33936,63 +32201,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportMemoryAllocateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {};
};
static_assert( sizeof( ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportMemoryAllocateInfoNV>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ExportMemoryWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pAttributes( pAttributes_ )
- , dwAccess( dwAccess_ )
- , name( name_ )
- {}
-
- ExportMemoryWin32HandleInfoKHR( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ExportMemoryWin32HandleInfoKHR& operator=( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR;
- const void* pNext = nullptr;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
- };
- static_assert( sizeof( ExportMemoryWin32HandleInfoKHR ) == sizeof( VkExportMemoryWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportMemoryWin32HandleInfoKHR : public layout::ExportMemoryWin32HandleInfoKHR
+ struct ExportMemoryWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryWin32HandleInfoKHR( pAttributes_, dwAccess_, name_ )
+ VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = {},
+ DWORD dwAccess_ = {},
+ LPCWSTR name_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR ) - offsetof( ExportMemoryWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ExportMemoryWin32HandleInfoKHR( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportMemoryWin32HandleInfoKHR& operator=( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportMemoryWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -34044,8 +32286,12 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportMemoryWin32HandleInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR;
+ const void* pNext = {};
+ const SECURITY_ATTRIBUTES* pAttributes = {};
+ DWORD dwAccess = {};
+ LPCWSTR name = {};
};
static_assert( sizeof( ExportMemoryWin32HandleInfoKHR ) == sizeof( VkExportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportMemoryWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -34053,51 +32299,28 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ExportMemoryWin32HandleInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0 ) VULKAN_HPP_NOEXCEPT
- : pAttributes( pAttributes_ )
- , dwAccess( dwAccess_ )
- {}
-
- ExportMemoryWin32HandleInfoNV( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(this) = rhs;
- }
-
- ExportMemoryWin32HandleInfoNV& operator=( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV;
- const void* pNext = nullptr;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- };
- static_assert( sizeof( ExportMemoryWin32HandleInfoNV ) == sizeof( VkExportMemoryWin32HandleInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportMemoryWin32HandleInfoNV : public layout::ExportMemoryWin32HandleInfoNV
+ struct ExportMemoryWin32HandleInfoNV
{
- VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryWin32HandleInfoNV( pAttributes_, dwAccess_ )
+ VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = {},
+ DWORD dwAccess_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV & operator=( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV ) - offsetof( ExportMemoryWin32HandleInfoNV, pNext ) );
+ return *this;
+ }
+
ExportMemoryWin32HandleInfoNV( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportMemoryWin32HandleInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportMemoryWin32HandleInfoNV& operator=( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportMemoryWin32HandleInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV const *>(&rhs);
return *this;
}
@@ -34142,54 +32365,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportMemoryWin32HandleInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV;
+ const void* pNext = {};
+ const SECURITY_ATTRIBUTES* pAttributes = {};
+ DWORD dwAccess = {};
};
static_assert( sizeof( ExportMemoryWin32HandleInfoNV ) == sizeof( VkExportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportMemoryWin32HandleInfoNV>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
- {
- struct ExportSemaphoreCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( vk::ExternalSemaphoreHandleTypeFlags handleTypes_ = vk::ExternalSemaphoreHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExportSemaphoreCreateInfo( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportSemaphoreCreateInfo*>(this) = rhs;
- }
-
- ExportSemaphoreCreateInfo& operator=( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportSemaphoreCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportSemaphoreCreateInfo;
- const void* pNext = nullptr;
- vk::ExternalSemaphoreHandleTypeFlags handleTypes;
- };
- static_assert( sizeof( ExportSemaphoreCreateInfo ) == sizeof( VkExportSemaphoreCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportSemaphoreCreateInfo : public layout::ExportSemaphoreCreateInfo
+ struct ExportSemaphoreCreateInfo
{
- VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( vk::ExternalSemaphoreHandleTypeFlags handleTypes_ = vk::ExternalSemaphoreHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ExportSemaphoreCreateInfo( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo ) - offsetof( ExportSemaphoreCreateInfo, pNext ) );
+ return *this;
+ }
+
ExportSemaphoreCreateInfo( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportSemaphoreCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportSemaphoreCreateInfo& operator=( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportSemaphoreCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo const *>(&rhs);
return *this;
}
@@ -34199,7 +32404,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExportSemaphoreCreateInfo & setHandleTypes( vk::ExternalSemaphoreHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExportSemaphoreCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -34227,63 +32432,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportSemaphoreCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes = {};
};
static_assert( sizeof( ExportSemaphoreCreateInfo ) == sizeof( VkExportSemaphoreCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportSemaphoreCreateInfo>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
+ struct ExportSemaphoreWin32HandleInfoKHR
{
- struct ExportSemaphoreWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pAttributes( pAttributes_ )
- , dwAccess( dwAccess_ )
- , name( name_ )
- {}
-
- ExportSemaphoreWin32HandleInfoKHR( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ExportSemaphoreWin32HandleInfoKHR& operator=( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR;
- const void* pNext = nullptr;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
- };
- static_assert( sizeof( ExportSemaphoreWin32HandleInfoKHR ) == sizeof( VkExportSemaphoreWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ExportSemaphoreWin32HandleInfoKHR : public layout::ExportSemaphoreWin32HandleInfoKHR
- {
- VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
- DWORD dwAccess_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ExportSemaphoreWin32HandleInfoKHR( pAttributes_, dwAccess_, name_ )
+ VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = {},
+ DWORD dwAccess_ = {},
+ LPCWSTR name_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR ) - offsetof( ExportSemaphoreWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ExportSemaphoreWin32HandleInfoKHR( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExportSemaphoreWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExportSemaphoreWin32HandleInfoKHR& operator=( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExportSemaphoreWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -34335,8 +32517,12 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExportSemaphoreWin32HandleInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR;
+ const void* pNext = {};
+ const SECURITY_ATTRIBUTES* pAttributes = {};
+ DWORD dwAccess = {};
+ LPCWSTR name = {};
};
static_assert( sizeof( ExportSemaphoreWin32HandleInfoKHR ) == sizeof( VkExportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExportSemaphoreWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -34344,17 +32530,22 @@ namespace VULKAN_HPP_NAMESPACE
struct ExtensionProperties
{
- ExtensionProperties() VULKAN_HPP_NOEXCEPT
- {}
+ ExtensionProperties( std::array<char,VK_MAX_EXTENSION_NAME_SIZE> const& extensionName_ = {},
+ uint32_t specVersion_ = {} ) VULKAN_HPP_NOEXCEPT
+ : extensionName{}
+ , specVersion( specVersion_ )
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_EXTENSION_NAME_SIZE,VK_MAX_EXTENSION_NAME_SIZE>::copy( extensionName, extensionName_ );
+ }
ExtensionProperties( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtensionProperties*>(this) = rhs;
+ *this = rhs;
}
ExtensionProperties& operator=( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExtensionProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExtensionProperties const *>(&rhs);
return *this;
}
@@ -34380,25 +32571,30 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
- uint32_t specVersion;
+ char extensionName[VK_MAX_EXTENSION_NAME_SIZE] = {};
+ uint32_t specVersion = {};
};
static_assert( sizeof( ExtensionProperties ) == sizeof( VkExtensionProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExtensionProperties>::value, "struct wrapper is not a standard layout!" );
struct ExternalMemoryProperties
{
- ExternalMemoryProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
ExternalMemoryProperties( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExternalMemoryProperties*>(this) = rhs;
+ *this = rhs;
}
ExternalMemoryProperties& operator=( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExternalMemoryProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalMemoryProperties const *>(&rhs);
return *this;
}
@@ -34425,53 +32621,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ExternalMemoryFeatureFlags externalMemoryFeatures;
- vk::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes;
- vk::ExternalMemoryHandleTypeFlags compatibleHandleTypes;
+ VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlags externalMemoryFeatures = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags compatibleHandleTypes = {};
};
static_assert( sizeof( ExternalMemoryProperties ) == sizeof( VkExternalMemoryProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalMemoryProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ExternalBufferProperties
{
- struct ExternalBufferProperties
- {
- protected:
- ExternalBufferProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- ExternalBufferProperties( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalBufferProperties*>(this) = rhs;
- }
-
- ExternalBufferProperties& operator=( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalBufferProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalBufferProperties;
- void* pNext = nullptr;
- vk::ExternalMemoryProperties externalMemoryProperties;
- };
- static_assert( sizeof( ExternalBufferProperties ) == sizeof( VkExternalBufferProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalBufferProperties : public layout::ExternalBufferProperties
- {
- ExternalBufferProperties() VULKAN_HPP_NOEXCEPT
- : layout::ExternalBufferProperties()
+ ExternalBufferProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : externalMemoryProperties( externalMemoryProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalBufferProperties & operator=( VULKAN_HPP_NAMESPACE::ExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalBufferProperties ) - offsetof( ExternalBufferProperties, pNext ) );
+ return *this;
+ }
+
ExternalBufferProperties( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalBufferProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalBufferProperties& operator=( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalBufferProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalBufferProperties const *>(&rhs);
return *this;
}
@@ -34497,54 +32673,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalBufferProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalBufferProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {};
};
static_assert( sizeof( ExternalBufferProperties ) == sizeof( VkExternalBufferProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalBufferProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ExternalFenceProperties
{
- struct ExternalFenceProperties
- {
- protected:
- ExternalFenceProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- ExternalFenceProperties( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalFenceProperties*>(this) = rhs;
- }
-
- ExternalFenceProperties& operator=( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalFenceProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalFenceProperties;
- void* pNext = nullptr;
- vk::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes;
- vk::ExternalFenceHandleTypeFlags compatibleHandleTypes;
- vk::ExternalFenceFeatureFlags externalFenceFeatures;
- };
- static_assert( sizeof( ExternalFenceProperties ) == sizeof( VkExternalFenceProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalFenceProperties : public layout::ExternalFenceProperties
- {
- ExternalFenceProperties() VULKAN_HPP_NOEXCEPT
- : layout::ExternalFenceProperties()
+ ExternalFenceProperties( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures_ = {} ) VULKAN_HPP_NOEXCEPT
+ : exportFromImportedHandleTypes( exportFromImportedHandleTypes_ )
+ , compatibleHandleTypes( compatibleHandleTypes_ )
+ , externalFenceFeatures( externalFenceFeatures_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalFenceProperties & operator=( VULKAN_HPP_NAMESPACE::ExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalFenceProperties ) - offsetof( ExternalFenceProperties, pNext ) );
+ return *this;
+ }
+
ExternalFenceProperties( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalFenceProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalFenceProperties& operator=( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalFenceProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalFenceProperties const *>(&rhs);
return *this;
}
@@ -34572,55 +32732,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalFenceProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFenceProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures = {};
};
static_assert( sizeof( ExternalFenceProperties ) == sizeof( VkExternalFenceProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalFenceProperties>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
- {
- struct ExternalFormatANDROID
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( uint64_t externalFormat_ = 0 ) VULKAN_HPP_NOEXCEPT
- : externalFormat( externalFormat_ )
- {}
-
- ExternalFormatANDROID( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalFormatANDROID*>(this) = rhs;
- }
-
- ExternalFormatANDROID& operator=( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalFormatANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalFormatANDROID;
- void* pNext = nullptr;
- uint64_t externalFormat;
- };
- static_assert( sizeof( ExternalFormatANDROID ) == sizeof( VkExternalFormatANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalFormatANDROID : public layout::ExternalFormatANDROID
+ struct ExternalFormatANDROID
{
- VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( uint64_t externalFormat_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalFormatANDROID( externalFormat_ )
+ VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( uint64_t externalFormat_ = {} ) VULKAN_HPP_NOEXCEPT
+ : externalFormat( externalFormat_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalFormatANDROID & operator=( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID ) - offsetof( ExternalFormatANDROID, pNext ) );
+ return *this;
+ }
+
ExternalFormatANDROID( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalFormatANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalFormatANDROID& operator=( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalFormatANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalFormatANDROID const *>(&rhs);
return *this;
}
@@ -34658,53 +32801,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalFormatANDROID::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFormatANDROID;
+ void* pNext = {};
+ uint64_t externalFormat = {};
};
static_assert( sizeof( ExternalFormatANDROID ) == sizeof( VkExternalFormatANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalFormatANDROID>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- namespace layout
- {
- struct ExternalImageFormatProperties
- {
- protected:
- ExternalImageFormatProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- ExternalImageFormatProperties( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalImageFormatProperties*>(this) = rhs;
- }
-
- ExternalImageFormatProperties& operator=( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalImageFormatProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalImageFormatProperties;
- void* pNext = nullptr;
- vk::ExternalMemoryProperties externalMemoryProperties;
- };
- static_assert( sizeof( ExternalImageFormatProperties ) == sizeof( VkExternalImageFormatProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalImageFormatProperties : public layout::ExternalImageFormatProperties
+ struct ExternalImageFormatProperties
{
- ExternalImageFormatProperties() VULKAN_HPP_NOEXCEPT
- : layout::ExternalImageFormatProperties()
+ ExternalImageFormatProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : externalMemoryProperties( externalMemoryProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties & operator=( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties ) - offsetof( ExternalImageFormatProperties, pNext ) );
+ return *this;
+ }
+
ExternalImageFormatProperties( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalImageFormatProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalImageFormatProperties& operator=( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalImageFormatProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties const *>(&rhs);
return *this;
}
@@ -34730,25 +32855,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalImageFormatProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalImageFormatProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {};
};
static_assert( sizeof( ExternalImageFormatProperties ) == sizeof( VkExternalImageFormatProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalImageFormatProperties>::value, "struct wrapper is not a standard layout!" );
struct ImageFormatProperties
{
- ImageFormatProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
ImageFormatProperties( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageFormatProperties*>(this) = rhs;
+ *this = rhs;
}
ImageFormatProperties& operator=( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageFormatProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageFormatProperties const *>(&rhs);
return *this;
}
@@ -34777,28 +32913,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Extent3D maxExtent;
- uint32_t maxMipLevels;
- uint32_t maxArrayLayers;
- vk::SampleCountFlags sampleCounts;
- vk::DeviceSize maxResourceSize;
+ VULKAN_HPP_NAMESPACE::Extent3D maxExtent = {};
+ uint32_t maxMipLevels = {};
+ uint32_t maxArrayLayers = {};
+ VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize maxResourceSize = {};
};
static_assert( sizeof( ImageFormatProperties ) == sizeof( VkImageFormatProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageFormatProperties>::value, "struct wrapper is not a standard layout!" );
struct ExternalImageFormatPropertiesNV
{
- ExternalImageFormatPropertiesNV() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
ExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExternalImageFormatPropertiesNV*>(this) = rhs;
+ *this = rhs;
}
ExternalImageFormatPropertiesNV& operator=( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkExternalImageFormatPropertiesNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV const *>(&rhs);
return *this;
}
@@ -34826,55 +32969,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageFormatProperties imageFormatProperties;
- vk::ExternalMemoryFeatureFlagsNV externalMemoryFeatures;
- vk::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
- vk::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlagsNV externalMemoryFeatures = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes = {};
};
static_assert( sizeof( ExternalImageFormatPropertiesNV ) == sizeof( VkExternalImageFormatPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalImageFormatPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ExternalMemoryBufferCreateInfo
{
- struct ExternalMemoryBufferCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExternalMemoryBufferCreateInfo( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(this) = rhs;
- }
-
- ExternalMemoryBufferCreateInfo& operator=( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalMemoryBufferCreateInfo;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlags handleTypes;
- };
- static_assert( sizeof( ExternalMemoryBufferCreateInfo ) == sizeof( VkExternalMemoryBufferCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalMemoryBufferCreateInfo : public layout::ExternalMemoryBufferCreateInfo
- {
- VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryBufferCreateInfo( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo ) - offsetof( ExternalMemoryBufferCreateInfo, pNext ) );
+ return *this;
+ }
+
ExternalMemoryBufferCreateInfo( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryBufferCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalMemoryBufferCreateInfo& operator=( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalMemoryBufferCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo const *>(&rhs);
return *this;
}
@@ -34884,7 +33006,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExternalMemoryBufferCreateInfo & setHandleTypes( vk::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExternalMemoryBufferCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -34912,53 +33034,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalMemoryBufferCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryBufferCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {};
};
static_assert( sizeof( ExternalMemoryBufferCreateInfo ) == sizeof( VkExternalMemoryBufferCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalMemoryBufferCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ExternalMemoryImageCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExternalMemoryImageCreateInfo( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryImageCreateInfo*>(this) = rhs;
- }
-
- ExternalMemoryImageCreateInfo& operator=( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryImageCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalMemoryImageCreateInfo;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlags handleTypes;
- };
- static_assert( sizeof( ExternalMemoryImageCreateInfo ) == sizeof( VkExternalMemoryImageCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalMemoryImageCreateInfo : public layout::ExternalMemoryImageCreateInfo
+ struct ExternalMemoryImageCreateInfo
{
- VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( vk::ExternalMemoryHandleTypeFlags handleTypes_ = vk::ExternalMemoryHandleTypeFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryImageCreateInfo( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo ) - offsetof( ExternalMemoryImageCreateInfo, pNext ) );
+ return *this;
+ }
+
ExternalMemoryImageCreateInfo( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryImageCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalMemoryImageCreateInfo& operator=( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalMemoryImageCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo const *>(&rhs);
return *this;
}
@@ -34968,7 +33071,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExternalMemoryImageCreateInfo & setHandleTypes( vk::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExternalMemoryImageCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -34996,53 +33099,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalMemoryImageCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {};
};
static_assert( sizeof( ExternalMemoryImageCreateInfo ) == sizeof( VkExternalMemoryImageCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalMemoryImageCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ExternalMemoryImageCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ = vk::ExternalMemoryHandleTypeFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : handleTypes( handleTypes_ )
- {}
-
- ExternalMemoryImageCreateInfoNV( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(this) = rhs;
- }
-
- ExternalMemoryImageCreateInfoNV& operator=( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagsNV handleTypes;
- };
- static_assert( sizeof( ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalMemoryImageCreateInfoNV : public layout::ExternalMemoryImageCreateInfoNV
+ struct ExternalMemoryImageCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ = vk::ExternalMemoryHandleTypeFlagsNV() ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryImageCreateInfoNV( handleTypes_ )
+ VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleTypes( handleTypes_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV ) - offsetof( ExternalMemoryImageCreateInfoNV, pNext ) );
+ return *this;
+ }
+
ExternalMemoryImageCreateInfoNV( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalMemoryImageCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalMemoryImageCreateInfoNV& operator=( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalMemoryImageCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV const *>(&rhs);
return *this;
}
@@ -35052,7 +33136,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ExternalMemoryImageCreateInfoNV & setHandleTypes( vk::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT
+ ExternalMemoryImageCreateInfoNV & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT
{
handleTypes = handleTypes_;
return *this;
@@ -35080,54 +33164,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalMemoryImageCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {};
};
static_assert( sizeof( ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalMemoryImageCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ExternalSemaphoreProperties
{
- struct ExternalSemaphoreProperties
- {
- protected:
- ExternalSemaphoreProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- ExternalSemaphoreProperties( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalSemaphoreProperties*>(this) = rhs;
- }
-
- ExternalSemaphoreProperties& operator=( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkExternalSemaphoreProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eExternalSemaphoreProperties;
- void* pNext = nullptr;
- vk::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes;
- vk::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes;
- vk::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures;
- };
- static_assert( sizeof( ExternalSemaphoreProperties ) == sizeof( VkExternalSemaphoreProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct ExternalSemaphoreProperties : public layout::ExternalSemaphoreProperties
- {
- ExternalSemaphoreProperties() VULKAN_HPP_NOEXCEPT
- : layout::ExternalSemaphoreProperties()
+ ExternalSemaphoreProperties( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures_ = {} ) VULKAN_HPP_NOEXCEPT
+ : exportFromImportedHandleTypes( exportFromImportedHandleTypes_ )
+ , compatibleHandleTypes( compatibleHandleTypes_ )
+ , externalSemaphoreFeatures( externalSemaphoreFeatures_ )
{}
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties & operator=( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties ) - offsetof( ExternalSemaphoreProperties, pNext ) );
+ return *this;
+ }
+
ExternalSemaphoreProperties( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ExternalSemaphoreProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
ExternalSemaphoreProperties& operator=( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ExternalSemaphoreProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties const *>(&rhs);
return *this;
}
@@ -35155,53 +33223,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ExternalSemaphoreProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalSemaphoreProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes = {};
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures = {};
};
static_assert( sizeof( ExternalSemaphoreProperties ) == sizeof( VkExternalSemaphoreProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ExternalSemaphoreProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct FenceCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR FenceCreateInfo( vk::FenceCreateFlags flags_ = vk::FenceCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- {}
-
- FenceCreateInfo( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceCreateInfo*>(this) = rhs;
- }
-
- FenceCreateInfo& operator=( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFenceCreateInfo;
- const void* pNext = nullptr;
- vk::FenceCreateFlags flags;
- };
- static_assert( sizeof( FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct FenceCreateInfo : public layout::FenceCreateInfo
+ struct FenceCreateInfo
{
- VULKAN_HPP_CONSTEXPR FenceCreateInfo( vk::FenceCreateFlags flags_ = vk::FenceCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::FenceCreateInfo( flags_ )
+ VULKAN_HPP_CONSTEXPR FenceCreateInfo( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::FenceCreateInfo & operator=( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FenceCreateInfo ) - offsetof( FenceCreateInfo, pNext ) );
+ return *this;
+ }
+
FenceCreateInfo( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FenceCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
FenceCreateInfo& operator=( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FenceCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FenceCreateInfo const *>(&rhs);
return *this;
}
@@ -35211,7 +33262,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- FenceCreateInfo & setFlags( vk::FenceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ FenceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -35239,57 +33290,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FenceCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::FenceCreateFlags flags = {};
};
static_assert( sizeof( FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FenceCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct FenceGetFdInfoKHR
{
- struct FenceGetFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : fence( fence_ )
- , handleType( handleType_ )
- {}
-
- FenceGetFdInfoKHR( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceGetFdInfoKHR*>(this) = rhs;
- }
-
- FenceGetFdInfoKHR& operator=( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceGetFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFenceGetFdInfoKHR;
- const void* pNext = nullptr;
- vk::Fence fence;
- vk::ExternalFenceHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( FenceGetFdInfoKHR ) == sizeof( VkFenceGetFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct FenceGetFdInfoKHR : public layout::FenceGetFdInfoKHR
- {
- VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::FenceGetFdInfoKHR( fence_, handleType_ )
+ VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : fence( fence_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR ) - offsetof( FenceGetFdInfoKHR, pNext ) );
+ return *this;
+ }
+
FenceGetFdInfoKHR( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FenceGetFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
FenceGetFdInfoKHR& operator=( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FenceGetFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR const *>(&rhs);
return *this;
}
@@ -35299,13 +33329,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- FenceGetFdInfoKHR & setFence( vk::Fence fence_ ) VULKAN_HPP_NOEXCEPT
+ FenceGetFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT
{
fence = fence_;
return *this;
}
- FenceGetFdInfoKHR & setHandleType( vk::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ FenceGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -35326,7 +33356,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( fence == rhs.fence )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( FenceGetFdInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -35334,59 +33364,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FenceGetFdInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( FenceGetFdInfoKHR ) == sizeof( VkFenceGetFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FenceGetFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct FenceGetWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : fence( fence_ )
- , handleType( handleType_ )
- {}
-
- FenceGetWin32HandleInfoKHR( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceGetWin32HandleInfoKHR*>(this) = rhs;
- }
-
- FenceGetWin32HandleInfoKHR& operator=( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFenceGetWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::Fence fence;
- vk::ExternalFenceHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( FenceGetWin32HandleInfoKHR ) == sizeof( VkFenceGetWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct FenceGetWin32HandleInfoKHR : public layout::FenceGetWin32HandleInfoKHR
+ struct FenceGetWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::FenceGetWin32HandleInfoKHR( fence_, handleType_ )
+ VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : fence( fence_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR ) - offsetof( FenceGetWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
FenceGetWin32HandleInfoKHR( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FenceGetWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
FenceGetWin32HandleInfoKHR& operator=( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FenceGetWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -35396,13 +33406,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- FenceGetWin32HandleInfoKHR & setFence( vk::Fence fence_ ) VULKAN_HPP_NOEXCEPT
+ FenceGetWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT
{
fence = fence_;
return *this;
}
- FenceGetWin32HandleInfoKHR & setHandleType( vk::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ FenceGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -35423,7 +33433,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( fence == rhs.fence )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( FenceGetWin32HandleInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -35431,54 +33441,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FenceGetWin32HandleInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( FenceGetWin32HandleInfoKHR ) == sizeof( VkFenceGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FenceGetWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct FilterCubicImageViewImageFormatPropertiesEXT
{
- struct FilterCubicImageViewImageFormatPropertiesEXT
- {
- protected:
- FilterCubicImageViewImageFormatPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- FilterCubicImageViewImageFormatPropertiesEXT( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFilterCubicImageViewImageFormatPropertiesEXT*>(this) = rhs;
- }
-
- FilterCubicImageViewImageFormatPropertiesEXT& operator=( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFilterCubicImageViewImageFormatPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT;
- void* pNext = nullptr;
- vk::Bool32 filterCubic;
- vk::Bool32 filterCubicMinmax;
- };
- static_assert( sizeof( FilterCubicImageViewImageFormatPropertiesEXT ) == sizeof( VkFilterCubicImageViewImageFormatPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct FilterCubicImageViewImageFormatPropertiesEXT : public layout::FilterCubicImageViewImageFormatPropertiesEXT
- {
- FilterCubicImageViewImageFormatPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::FilterCubicImageViewImageFormatPropertiesEXT()
+ FilterCubicImageViewImageFormatPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 filterCubic_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax_ = {} ) VULKAN_HPP_NOEXCEPT
+ : filterCubic( filterCubic_ )
+ , filterCubicMinmax( filterCubicMinmax_ )
{}
+ VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT ) - offsetof( FilterCubicImageViewImageFormatPropertiesEXT, pNext ) );
+ return *this;
+ }
+
FilterCubicImageViewImageFormatPropertiesEXT( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FilterCubicImageViewImageFormatPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
FilterCubicImageViewImageFormatPropertiesEXT& operator=( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FilterCubicImageViewImageFormatPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT const *>(&rhs);
return *this;
}
@@ -35505,25 +33499,33 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FilterCubicImageViewImageFormatPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 filterCubic = {};
+ VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax = {};
};
static_assert( sizeof( FilterCubicImageViewImageFormatPropertiesEXT ) == sizeof( VkFilterCubicImageViewImageFormatPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FilterCubicImageViewImageFormatPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
struct FormatProperties
{
- FormatProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
FormatProperties( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkFormatProperties*>(this) = rhs;
+ *this = rhs;
}
FormatProperties& operator=( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkFormatProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FormatProperties const *>(&rhs);
return *this;
}
@@ -35550,53 +33552,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::FormatFeatureFlags linearTilingFeatures;
- vk::FormatFeatureFlags optimalTilingFeatures;
- vk::FormatFeatureFlags bufferFeatures;
+ VULKAN_HPP_NAMESPACE::FormatFeatureFlags linearTilingFeatures = {};
+ VULKAN_HPP_NAMESPACE::FormatFeatureFlags optimalTilingFeatures = {};
+ VULKAN_HPP_NAMESPACE::FormatFeatureFlags bufferFeatures = {};
};
static_assert( sizeof( FormatProperties ) == sizeof( VkFormatProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FormatProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct FormatProperties2
- {
- protected:
- FormatProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- FormatProperties2( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFormatProperties2*>(this) = rhs;
- }
-
- FormatProperties2& operator=( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFormatProperties2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFormatProperties2;
- void* pNext = nullptr;
- vk::FormatProperties formatProperties;
- };
- static_assert( sizeof( FormatProperties2 ) == sizeof( VkFormatProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct FormatProperties2 : public layout::FormatProperties2
+ struct FormatProperties2
{
- FormatProperties2() VULKAN_HPP_NOEXCEPT
- : layout::FormatProperties2()
+ FormatProperties2( VULKAN_HPP_NAMESPACE::FormatProperties formatProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : formatProperties( formatProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::FormatProperties2 & operator=( VULKAN_HPP_NAMESPACE::FormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FormatProperties2 ) - offsetof( FormatProperties2, pNext ) );
+ return *this;
+ }
+
FormatProperties2( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FormatProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
FormatProperties2& operator=( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FormatProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FormatProperties2 const *>(&rhs);
return *this;
}
@@ -35622,139 +33604,108 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FormatProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFormatProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::FormatProperties formatProperties = {};
};
static_assert( sizeof( FormatProperties2 ) == sizeof( VkFormatProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FormatProperties2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct FramebufferAttachmentImageInfo
{
- struct FramebufferAttachmentImageInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfoKHR( vk::ImageCreateFlags flags_ = vk::ImageCreateFlags(),
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- uint32_t width_ = 0,
- uint32_t height_ = 0,
- uint32_t layerCount_ = 0,
- uint32_t viewFormatCount_ = 0,
- const vk::Format* pViewFormats_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , usage( usage_ )
- , width( width_ )
- , height( height_ )
- , layerCount( layerCount_ )
- , viewFormatCount( viewFormatCount_ )
- , pViewFormats( pViewFormats_ )
- {}
-
- FramebufferAttachmentImageInfoKHR( VkFramebufferAttachmentImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferAttachmentImageInfoKHR*>(this) = rhs;
- }
-
- FramebufferAttachmentImageInfoKHR& operator=( VkFramebufferAttachmentImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferAttachmentImageInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFramebufferAttachmentImageInfoKHR;
- const void* pNext = nullptr;
- vk::ImageCreateFlags flags;
- vk::ImageUsageFlags usage;
- uint32_t width;
- uint32_t height;
- uint32_t layerCount;
- uint32_t viewFormatCount;
- const vk::Format* pViewFormats;
- };
- static_assert( sizeof( FramebufferAttachmentImageInfoKHR ) == sizeof( VkFramebufferAttachmentImageInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct FramebufferAttachmentImageInfoKHR : public layout::FramebufferAttachmentImageInfoKHR
- {
- VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfoKHR( vk::ImageCreateFlags flags_ = vk::ImageCreateFlags(),
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- uint32_t width_ = 0,
- uint32_t height_ = 0,
- uint32_t layerCount_ = 0,
- uint32_t viewFormatCount_ = 0,
- const vk::Format* pViewFormats_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferAttachmentImageInfoKHR( flags_, usage_, width_, height_, layerCount_, viewFormatCount_, pViewFormats_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , usage( usage_ )
+ , width( width_ )
+ , height( height_ )
+ , layerCount( layerCount_ )
+ , viewFormatCount( viewFormatCount_ )
+ , pViewFormats( pViewFormats_ )
{}
- FramebufferAttachmentImageInfoKHR( VkFramebufferAttachmentImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferAttachmentImageInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo & operator=( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo ) - offsetof( FramebufferAttachmentImageInfo, pNext ) );
+ return *this;
+ }
- FramebufferAttachmentImageInfoKHR& operator=( VkFramebufferAttachmentImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FramebufferAttachmentImageInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ FramebufferAttachmentImageInfo& operator=( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo const *>(&rhs);
return *this;
}
- FramebufferAttachmentImageInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setFlags( vk::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setUsage( vk::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
{
width = width_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT
{
height = height_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT
{
layerCount = layerCount_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT
{
viewFormatCount = viewFormatCount_;
return *this;
}
- FramebufferAttachmentImageInfoKHR & setPViewFormats( const vk::Format* pViewFormats_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentImageInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format* pViewFormats_ ) VULKAN_HPP_NOEXCEPT
{
pViewFormats = pViewFormats_;
return *this;
}
- operator VkFramebufferAttachmentImageInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkFramebufferAttachmentImageInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkFramebufferAttachmentImageInfoKHR*>( this );
+ return *reinterpret_cast<const VkFramebufferAttachmentImageInfo*>( this );
}
- operator VkFramebufferAttachmentImageInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkFramebufferAttachmentImageInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkFramebufferAttachmentImageInfoKHR*>( this );
+ return *reinterpret_cast<VkFramebufferAttachmentImageInfo*>( this );
}
- bool operator==( FramebufferAttachmentImageInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( FramebufferAttachmentImageInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -35767,94 +33718,79 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pViewFormats == rhs.pViewFormats );
}
- bool operator!=( FramebufferAttachmentImageInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( FramebufferAttachmentImageInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::FramebufferAttachmentImageInfoKHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( FramebufferAttachmentImageInfoKHR ) == sizeof( VkFramebufferAttachmentImageInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<FramebufferAttachmentImageInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct FramebufferAttachmentsCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfoKHR( uint32_t attachmentImageInfoCount_ = 0,
- const vk::FramebufferAttachmentImageInfoKHR* pAttachmentImageInfos_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : attachmentImageInfoCount( attachmentImageInfoCount_ )
- , pAttachmentImageInfos( pAttachmentImageInfos_ )
- {}
-
- FramebufferAttachmentsCreateInfoKHR( VkFramebufferAttachmentsCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferAttachmentsCreateInfoKHR*>(this) = rhs;
- }
-
- FramebufferAttachmentsCreateInfoKHR& operator=( VkFramebufferAttachmentsCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferAttachmentsCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFramebufferAttachmentsCreateInfoKHR;
- const void* pNext = nullptr;
- uint32_t attachmentImageInfoCount;
- const vk::FramebufferAttachmentImageInfoKHR* pAttachmentImageInfos;
- };
- static_assert( sizeof( FramebufferAttachmentsCreateInfoKHR ) == sizeof( VkFramebufferAttachmentsCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( FramebufferAttachmentImageInfo ) == sizeof( VkFramebufferAttachmentImageInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<FramebufferAttachmentImageInfo>::value, "struct wrapper is not a standard layout!" );
- struct FramebufferAttachmentsCreateInfoKHR : public layout::FramebufferAttachmentsCreateInfoKHR
+ struct FramebufferAttachmentsCreateInfo
{
- VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfoKHR( uint32_t attachmentImageInfoCount_ = 0,
- const vk::FramebufferAttachmentImageInfoKHR* pAttachmentImageInfos_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferAttachmentsCreateInfoKHR( attachmentImageInfoCount_, pAttachmentImageInfos_ )
+ VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfo( uint32_t attachmentImageInfoCount_ = {},
+ const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo* pAttachmentImageInfos_ = {} ) VULKAN_HPP_NOEXCEPT
+ : attachmentImageInfoCount( attachmentImageInfoCount_ )
+ , pAttachmentImageInfos( pAttachmentImageInfos_ )
{}
- FramebufferAttachmentsCreateInfoKHR( VkFramebufferAttachmentsCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferAttachmentsCreateInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo & operator=( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo ) - offsetof( FramebufferAttachmentsCreateInfo, pNext ) );
+ return *this;
+ }
+
+ FramebufferAttachmentsCreateInfo( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- FramebufferAttachmentsCreateInfoKHR& operator=( VkFramebufferAttachmentsCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentsCreateInfo& operator=( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FramebufferAttachmentsCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo const *>(&rhs);
return *this;
}
- FramebufferAttachmentsCreateInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentsCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- FramebufferAttachmentsCreateInfoKHR & setAttachmentImageInfoCount( uint32_t attachmentImageInfoCount_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentsCreateInfo & setAttachmentImageInfoCount( uint32_t attachmentImageInfoCount_ ) VULKAN_HPP_NOEXCEPT
{
attachmentImageInfoCount = attachmentImageInfoCount_;
return *this;
}
- FramebufferAttachmentsCreateInfoKHR & setPAttachmentImageInfos( const vk::FramebufferAttachmentImageInfoKHR* pAttachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferAttachmentsCreateInfo & setPAttachmentImageInfos( const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo* pAttachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT
{
pAttachmentImageInfos = pAttachmentImageInfos_;
return *this;
}
- operator VkFramebufferAttachmentsCreateInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkFramebufferAttachmentsCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkFramebufferAttachmentsCreateInfoKHR*>( this );
+ return *reinterpret_cast<const VkFramebufferAttachmentsCreateInfo*>( this );
}
- operator VkFramebufferAttachmentsCreateInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkFramebufferAttachmentsCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkFramebufferAttachmentsCreateInfoKHR*>( this );
+ return *reinterpret_cast<VkFramebufferAttachmentsCreateInfo*>( this );
}
- bool operator==( FramebufferAttachmentsCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( FramebufferAttachmentsCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -35862,82 +33798,52 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pAttachmentImageInfos == rhs.pAttachmentImageInfos );
}
- bool operator!=( FramebufferAttachmentsCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( FramebufferAttachmentsCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::FramebufferAttachmentsCreateInfoKHR::sType;
- };
- static_assert( sizeof( FramebufferAttachmentsCreateInfoKHR ) == sizeof( VkFramebufferAttachmentsCreateInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<FramebufferAttachmentsCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferAttachmentsCreateInfo;
+ const void* pNext = {};
+ uint32_t attachmentImageInfoCount = {};
+ const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo* pAttachmentImageInfos = {};
+ };
+ static_assert( sizeof( FramebufferAttachmentsCreateInfo ) == sizeof( VkFramebufferAttachmentsCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<FramebufferAttachmentsCreateInfo>::value, "struct wrapper is not a standard layout!" );
+
+ struct FramebufferCreateInfo
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , renderPass( renderPass_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , width( width_ )
+ , height( height_ )
+ , layers( layers_ )
+ {}
- namespace layout
- {
- struct FramebufferCreateInfo
+ VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & operator=( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( vk::FramebufferCreateFlags flags_ = vk::FramebufferCreateFlags(),
- vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t attachmentCount_ = 0,
- const vk::ImageView* pAttachments_ = nullptr,
- uint32_t width_ = 0,
- uint32_t height_ = 0,
- uint32_t layers_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , renderPass( renderPass_ )
- , attachmentCount( attachmentCount_ )
- , pAttachments( pAttachments_ )
- , width( width_ )
- , height( height_ )
- , layers( layers_ )
- {}
-
- FramebufferCreateInfo( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferCreateInfo*>(this) = rhs;
- }
-
- FramebufferCreateInfo& operator=( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFramebufferCreateInfo;
- const void* pNext = nullptr;
- vk::FramebufferCreateFlags flags;
- vk::RenderPass renderPass;
- uint32_t attachmentCount;
- const vk::ImageView* pAttachments;
- uint32_t width;
- uint32_t height;
- uint32_t layers;
- };
- static_assert( sizeof( FramebufferCreateInfo ) == sizeof( VkFramebufferCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct FramebufferCreateInfo : public layout::FramebufferCreateInfo
- {
- VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( vk::FramebufferCreateFlags flags_ = vk::FramebufferCreateFlags(),
- vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t attachmentCount_ = 0,
- const vk::ImageView* pAttachments_ = nullptr,
- uint32_t width_ = 0,
- uint32_t height_ = 0,
- uint32_t layers_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferCreateInfo( flags_, renderPass_, attachmentCount_, pAttachments_, width_, height_, layers_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo ) - offsetof( FramebufferCreateInfo, pNext ) );
+ return *this;
+ }
FramebufferCreateInfo( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
FramebufferCreateInfo& operator=( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FramebufferCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const *>(&rhs);
return *this;
}
@@ -35947,13 +33853,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- FramebufferCreateInfo & setFlags( vk::FramebufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- FramebufferCreateInfo & setRenderPass( vk::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
{
renderPass = renderPass_;
return *this;
@@ -35965,7 +33871,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- FramebufferCreateInfo & setPAttachments( const vk::ImageView* pAttachments_ ) VULKAN_HPP_NOEXCEPT
+ FramebufferCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView* pAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pAttachments = pAttachments_;
return *this;
@@ -36017,55 +33923,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FramebufferCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( FramebufferCreateInfo ) == sizeof( VkFramebufferCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FramebufferCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct FramebufferMixedSamplesCombinationNV
- {
- protected:
- FramebufferMixedSamplesCombinationNV() VULKAN_HPP_NOEXCEPT
- {}
-
- FramebufferMixedSamplesCombinationNV( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferMixedSamplesCombinationNV*>(this) = rhs;
- }
-
- FramebufferMixedSamplesCombinationNV& operator=( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkFramebufferMixedSamplesCombinationNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eFramebufferMixedSamplesCombinationNV;
- void* pNext = nullptr;
- vk::CoverageReductionModeNV coverageReductionMode;
- vk::SampleCountFlagBits rasterizationSamples;
- vk::SampleCountFlags depthStencilSamples;
- vk::SampleCountFlags colorSamples;
- };
- static_assert( sizeof( FramebufferMixedSamplesCombinationNV ) == sizeof( VkFramebufferMixedSamplesCombinationNV ), "layout struct and wrapper have different size!" );
- }
-
- struct FramebufferMixedSamplesCombinationNV : public layout::FramebufferMixedSamplesCombinationNV
+ struct FramebufferMixedSamplesCombinationNV
{
- FramebufferMixedSamplesCombinationNV() VULKAN_HPP_NOEXCEPT
- : layout::FramebufferMixedSamplesCombinationNV()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : coverageReductionMode( coverageReductionMode_ )
+ , rasterizationSamples( rasterizationSamples_ )
+ , depthStencilSamples( depthStencilSamples_ )
+ , colorSamples( colorSamples_ )
{}
+ VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV & operator=( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV ) - offsetof( FramebufferMixedSamplesCombinationNV, pNext ) );
+ return *this;
+ }
+
FramebufferMixedSamplesCombinationNV( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::FramebufferMixedSamplesCombinationNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
FramebufferMixedSamplesCombinationNV& operator=( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::FramebufferMixedSamplesCombinationNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV const *>(&rhs);
return *this;
}
@@ -36084,7 +33981,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( coverageReductionMode == rhs.coverageReductionMode )
- && vk::operator==( rasterizationSamples, rhs.rasterizationSamples )
+ && ( rasterizationSamples == rhs.rasterizationSamples )
&& ( depthStencilSamples == rhs.depthStencilSamples )
&& ( colorSamples == rhs.colorSamples );
}
@@ -36094,17 +33991,22 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::FramebufferMixedSamplesCombinationNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( FramebufferMixedSamplesCombinationNV ) == sizeof( VkFramebufferMixedSamplesCombinationNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<FramebufferMixedSamplesCombinationNV>::value, "struct wrapper is not a standard layout!" );
struct VertexInputBindingDescription
{
- VULKAN_HPP_CONSTEXPR VertexInputBindingDescription( uint32_t binding_ = 0,
- uint32_t stride_ = 0,
- vk::VertexInputRate inputRate_ = vk::VertexInputRate::eVertex ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -36112,12 +34014,12 @@ namespace VULKAN_HPP_NAMESPACE
VertexInputBindingDescription( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputBindingDescription*>(this) = rhs;
+ *this = rhs;
}
VertexInputBindingDescription& operator=( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputBindingDescription*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::VertexInputBindingDescription const *>(&rhs);
return *this;
}
@@ -36133,7 +34035,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- VertexInputBindingDescription & setInputRate( vk::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT
+ VertexInputBindingDescription & setInputRate( VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT
{
inputRate = inputRate_;
return *this;
@@ -36162,19 +34064,19 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t binding;
- uint32_t stride;
- vk::VertexInputRate inputRate;
+ uint32_t binding = {};
+ uint32_t stride = {};
+ VULKAN_HPP_NAMESPACE::VertexInputRate inputRate = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex;
};
static_assert( sizeof( VertexInputBindingDescription ) == sizeof( VkVertexInputBindingDescription ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<VertexInputBindingDescription>::value, "struct wrapper is not a standard layout!" );
struct VertexInputAttributeDescription
{
- VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription( uint32_t location_ = 0,
- uint32_t binding_ = 0,
- vk::Format format_ = vk::Format::eUndefined,
- uint32_t offset_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -36183,12 +34085,12 @@ namespace VULKAN_HPP_NAMESPACE
VertexInputAttributeDescription( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputAttributeDescription*>(this) = rhs;
+ *this = rhs;
}
VertexInputAttributeDescription& operator=( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputAttributeDescription*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription const *>(&rhs);
return *this;
}
@@ -36204,7 +34106,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- VertexInputAttributeDescription & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ VertexInputAttributeDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
@@ -36240,71 +34142,42 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t location;
- uint32_t binding;
- vk::Format format;
- uint32_t offset;
+ uint32_t location = {};
+ uint32_t binding = {};
+ VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined;
+ uint32_t offset = {};
};
static_assert( sizeof( VertexInputAttributeDescription ) == sizeof( VkVertexInputAttributeDescription ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<VertexInputAttributeDescription>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineVertexInputStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( vk::PipelineVertexInputStateCreateFlags flags_ = vk::PipelineVertexInputStateCreateFlags(),
- uint32_t vertexBindingDescriptionCount_ = 0,
- const vk::VertexInputBindingDescription* pVertexBindingDescriptions_ = nullptr,
- uint32_t vertexAttributeDescriptionCount_ = 0,
- const vk::VertexInputAttributeDescription* pVertexAttributeDescriptions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , vertexBindingDescriptionCount( vertexBindingDescriptionCount_ )
- , pVertexBindingDescriptions( pVertexBindingDescriptions_ )
- , vertexAttributeDescriptionCount( vertexAttributeDescriptionCount_ )
- , pVertexAttributeDescriptions( pVertexAttributeDescriptions_ )
- {}
-
- PipelineVertexInputStateCreateInfo( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineVertexInputStateCreateInfo*>(this) = rhs;
- }
-
- PipelineVertexInputStateCreateInfo& operator=( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineVertexInputStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineVertexInputStateCreateFlags flags;
- uint32_t vertexBindingDescriptionCount;
- const vk::VertexInputBindingDescription* pVertexBindingDescriptions;
- uint32_t vertexAttributeDescriptionCount;
- const vk::VertexInputAttributeDescription* pVertexAttributeDescriptions;
- };
- static_assert( sizeof( PipelineVertexInputStateCreateInfo ) == sizeof( VkPipelineVertexInputStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineVertexInputStateCreateInfo : public layout::PipelineVertexInputStateCreateInfo
+ struct PipelineVertexInputStateCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( vk::PipelineVertexInputStateCreateFlags flags_ = vk::PipelineVertexInputStateCreateFlags(),
- uint32_t vertexBindingDescriptionCount_ = 0,
- const vk::VertexInputBindingDescription* pVertexBindingDescriptions_ = nullptr,
- uint32_t vertexAttributeDescriptionCount_ = 0,
- const vk::VertexInputAttributeDescription* pVertexAttributeDescriptions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineVertexInputStateCreateInfo( flags_, vertexBindingDescriptionCount_, pVertexBindingDescriptions_, vertexAttributeDescriptionCount_, pVertexAttributeDescriptions_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , vertexBindingDescriptionCount( vertexBindingDescriptionCount_ )
+ , pVertexBindingDescriptions( pVertexBindingDescriptions_ )
+ , vertexAttributeDescriptionCount( vertexAttributeDescriptionCount_ )
+ , pVertexAttributeDescriptions( pVertexAttributeDescriptions_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo ) - offsetof( PipelineVertexInputStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineVertexInputStateCreateInfo( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineVertexInputStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineVertexInputStateCreateInfo& operator=( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineVertexInputStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo const *>(&rhs);
return *this;
}
@@ -36314,7 +34187,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineVertexInputStateCreateInfo & setFlags( vk::PipelineVertexInputStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineVertexInputStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -36326,7 +34199,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineVertexInputStateCreateInfo & setPVertexBindingDescriptions( const vk::VertexInputBindingDescription* pVertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT
+ PipelineVertexInputStateCreateInfo & setPVertexBindingDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription* pVertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT
{
pVertexBindingDescriptions = pVertexBindingDescriptions_;
return *this;
@@ -36338,7 +34211,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineVertexInputStateCreateInfo & setPVertexAttributeDescriptions( const vk::VertexInputAttributeDescription* pVertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT
+ PipelineVertexInputStateCreateInfo & setPVertexAttributeDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription* pVertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT
{
pVertexAttributeDescriptions = pVertexAttributeDescriptions_;
return *this;
@@ -36370,61 +34243,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineVertexInputStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineVertexInputStateCreateInfo ) == sizeof( VkPipelineVertexInputStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineVertexInputStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineInputAssemblyStateCreateInfo
{
- struct PipelineInputAssemblyStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( vk::PipelineInputAssemblyStateCreateFlags flags_ = vk::PipelineInputAssemblyStateCreateFlags(),
- vk::PrimitiveTopology topology_ = vk::PrimitiveTopology::ePointList,
- vk::Bool32 primitiveRestartEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , topology( topology_ )
- , primitiveRestartEnable( primitiveRestartEnable_ )
- {}
-
- PipelineInputAssemblyStateCreateInfo( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineInputAssemblyStateCreateInfo*>(this) = rhs;
- }
-
- PipelineInputAssemblyStateCreateInfo& operator=( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineInputAssemblyStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineInputAssemblyStateCreateFlags flags;
- vk::PrimitiveTopology topology;
- vk::Bool32 primitiveRestartEnable;
- };
- static_assert( sizeof( PipelineInputAssemblyStateCreateInfo ) == sizeof( VkPipelineInputAssemblyStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineInputAssemblyStateCreateInfo : public layout::PipelineInputAssemblyStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( vk::PipelineInputAssemblyStateCreateFlags flags_ = vk::PipelineInputAssemblyStateCreateFlags(),
- vk::PrimitiveTopology topology_ = vk::PrimitiveTopology::ePointList,
- vk::Bool32 primitiveRestartEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineInputAssemblyStateCreateInfo( flags_, topology_, primitiveRestartEnable_ )
+ VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ = {},
+ VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ = VULKAN_HPP_NAMESPACE::PrimitiveTopology::ePointList,
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , topology( topology_ )
+ , primitiveRestartEnable( primitiveRestartEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo ) - offsetof( PipelineInputAssemblyStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineInputAssemblyStateCreateInfo( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineInputAssemblyStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineInputAssemblyStateCreateInfo& operator=( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineInputAssemblyStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo const *>(&rhs);
return *this;
}
@@ -36434,19 +34288,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineInputAssemblyStateCreateInfo & setFlags( vk::PipelineInputAssemblyStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineInputAssemblyStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineInputAssemblyStateCreateInfo & setTopology( vk::PrimitiveTopology topology_ ) VULKAN_HPP_NOEXCEPT
+ PipelineInputAssemblyStateCreateInfo & setTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ ) VULKAN_HPP_NOEXCEPT
{
topology = topology_;
return *this;
}
- PipelineInputAssemblyStateCreateInfo & setPrimitiveRestartEnable( vk::Bool32 primitiveRestartEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineInputAssemblyStateCreateInfo & setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ ) VULKAN_HPP_NOEXCEPT
{
primitiveRestartEnable = primitiveRestartEnable_;
return *this;
@@ -36476,57 +34330,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineInputAssemblyStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineInputAssemblyStateCreateInfo ) == sizeof( VkPipelineInputAssemblyStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineInputAssemblyStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineTessellationStateCreateInfo
{
- struct PipelineTessellationStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( vk::PipelineTessellationStateCreateFlags flags_ = vk::PipelineTessellationStateCreateFlags(),
- uint32_t patchControlPoints_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , patchControlPoints( patchControlPoints_ )
- {}
-
- PipelineTessellationStateCreateInfo( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineTessellationStateCreateInfo*>(this) = rhs;
- }
-
- PipelineTessellationStateCreateInfo& operator=( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineTessellationStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineTessellationStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineTessellationStateCreateFlags flags;
- uint32_t patchControlPoints;
- };
- static_assert( sizeof( PipelineTessellationStateCreateInfo ) == sizeof( VkPipelineTessellationStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineTessellationStateCreateInfo : public layout::PipelineTessellationStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( vk::PipelineTessellationStateCreateFlags flags_ = vk::PipelineTessellationStateCreateFlags(),
- uint32_t patchControlPoints_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineTessellationStateCreateInfo( flags_, patchControlPoints_ )
+ VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ = {},
+ uint32_t patchControlPoints_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , patchControlPoints( patchControlPoints_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo ) - offsetof( PipelineTessellationStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineTessellationStateCreateInfo( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineTessellationStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineTessellationStateCreateInfo& operator=( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineTessellationStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo const *>(&rhs);
return *this;
}
@@ -36536,7 +34371,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineTessellationStateCreateInfo & setFlags( vk::PipelineTessellationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineTessellationStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -36571,20 +34406,23 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineTessellationStateCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationStateCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags = {};
+ uint32_t patchControlPoints = {};
};
static_assert( sizeof( PipelineTessellationStateCreateInfo ) == sizeof( VkPipelineTessellationStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineTessellationStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct Viewport
{
- VULKAN_HPP_CONSTEXPR Viewport( float x_ = 0,
- float y_ = 0,
- float width_ = 0,
- float height_ = 0,
- float minDepth_ = 0,
- float maxDepth_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -36595,12 +34433,12 @@ namespace VULKAN_HPP_NAMESPACE
Viewport( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewport*>(this) = rhs;
+ *this = rhs;
}
Viewport& operator=( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewport*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Viewport const *>(&rhs);
return *this;
}
@@ -36666,73 +34504,44 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- float x;
- float y;
- float width;
- float height;
- float minDepth;
- float maxDepth;
+ float x = {};
+ float y = {};
+ float width = {};
+ float height = {};
+ float minDepth = {};
+ float maxDepth = {};
};
static_assert( sizeof( Viewport ) == sizeof( VkViewport ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Viewport>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineViewportStateCreateInfo
{
- struct PipelineViewportStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( vk::PipelineViewportStateCreateFlags flags_ = vk::PipelineViewportStateCreateFlags(),
- uint32_t viewportCount_ = 0,
- const vk::Viewport* pViewports_ = nullptr,
- uint32_t scissorCount_ = 0,
- const vk::Rect2D* pScissors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , viewportCount( viewportCount_ )
- , pViewports( pViewports_ )
- , scissorCount( scissorCount_ )
- , pScissors( pScissors_ )
- {}
-
- PipelineViewportStateCreateInfo( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportStateCreateInfo*>(this) = rhs;
- }
-
- PipelineViewportStateCreateInfo& operator=( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineViewportStateCreateFlags flags;
- uint32_t viewportCount;
- const vk::Viewport* pViewports;
- uint32_t scissorCount;
- const vk::Rect2D* pScissors;
- };
- static_assert( sizeof( PipelineViewportStateCreateInfo ) == sizeof( VkPipelineViewportStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportStateCreateInfo : public layout::PipelineViewportStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( vk::PipelineViewportStateCreateFlags flags_ = vk::PipelineViewportStateCreateFlags(),
- uint32_t viewportCount_ = 0,
- const vk::Viewport* pViewports_ = nullptr,
- uint32_t scissorCount_ = 0,
- const vk::Rect2D* pScissors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportStateCreateInfo( flags_, viewportCount_, pViewports_, scissorCount_, pScissors_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , viewportCount( viewportCount_ )
+ , pViewports( pViewports_ )
+ , scissorCount( scissorCount_ )
+ , pScissors( pScissors_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo ) - offsetof( PipelineViewportStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineViewportStateCreateInfo( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportStateCreateInfo& operator=( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo const *>(&rhs);
return *this;
}
@@ -36742,7 +34551,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportStateCreateInfo & setFlags( vk::PipelineViewportStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -36754,7 +34563,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportStateCreateInfo & setPViewports( const vk::Viewport* pViewports_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportStateCreateInfo & setPViewports( const VULKAN_HPP_NAMESPACE::Viewport* pViewports_ ) VULKAN_HPP_NOEXCEPT
{
pViewports = pViewports_;
return *this;
@@ -36766,7 +34575,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportStateCreateInfo & setPScissors( const vk::Rect2D* pScissors_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportStateCreateInfo & setPScissors( const VULKAN_HPP_NAMESPACE::Rect2D* pScissors_ ) VULKAN_HPP_NOEXCEPT
{
pScissors = pScissors_;
return *this;
@@ -36798,93 +34607,58 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineViewportStateCreateInfo ) == sizeof( VkPipelineViewportStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineRasterizationStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( vk::PipelineRasterizationStateCreateFlags flags_ = vk::PipelineRasterizationStateCreateFlags(),
- vk::Bool32 depthClampEnable_ = 0,
- vk::Bool32 rasterizerDiscardEnable_ = 0,
- vk::PolygonMode polygonMode_ = vk::PolygonMode::eFill,
- vk::CullModeFlags cullMode_ = vk::CullModeFlags(),
- vk::FrontFace frontFace_ = vk::FrontFace::eCounterClockwise,
- vk::Bool32 depthBiasEnable_ = 0,
- float depthBiasConstantFactor_ = 0,
- float depthBiasClamp_ = 0,
- float depthBiasSlopeFactor_ = 0,
- float lineWidth_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , depthClampEnable( depthClampEnable_ )
- , rasterizerDiscardEnable( rasterizerDiscardEnable_ )
- , polygonMode( polygonMode_ )
- , cullMode( cullMode_ )
- , frontFace( frontFace_ )
- , depthBiasEnable( depthBiasEnable_ )
- , depthBiasConstantFactor( depthBiasConstantFactor_ )
- , depthBiasClamp( depthBiasClamp_ )
- , depthBiasSlopeFactor( depthBiasSlopeFactor_ )
- , lineWidth( lineWidth_ )
- {}
-
- PipelineRasterizationStateCreateInfo( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateCreateInfo*>(this) = rhs;
- }
-
- PipelineRasterizationStateCreateInfo& operator=( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineRasterizationStateCreateFlags flags;
- vk::Bool32 depthClampEnable;
- vk::Bool32 rasterizerDiscardEnable;
- vk::PolygonMode polygonMode;
- vk::CullModeFlags cullMode;
- vk::FrontFace frontFace;
- vk::Bool32 depthBiasEnable;
- float depthBiasConstantFactor;
- float depthBiasClamp;
- float depthBiasSlopeFactor;
- float lineWidth;
- };
- static_assert( sizeof( PipelineRasterizationStateCreateInfo ) == sizeof( VkPipelineRasterizationStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationStateCreateInfo : public layout::PipelineRasterizationStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( vk::PipelineRasterizationStateCreateFlags flags_ = vk::PipelineRasterizationStateCreateFlags(),
- vk::Bool32 depthClampEnable_ = 0,
- vk::Bool32 rasterizerDiscardEnable_ = 0,
- vk::PolygonMode polygonMode_ = vk::PolygonMode::eFill,
- vk::CullModeFlags cullMode_ = vk::CullModeFlags(),
- vk::FrontFace frontFace_ = vk::FrontFace::eCounterClockwise,
- vk::Bool32 depthBiasEnable_ = 0,
- float depthBiasConstantFactor_ = 0,
- float depthBiasClamp_ = 0,
- float depthBiasSlopeFactor_ = 0,
- float lineWidth_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateCreateInfo( flags_, depthClampEnable_, rasterizerDiscardEnable_, polygonMode_, cullMode_, frontFace_, depthBiasEnable_, depthBiasConstantFactor_, depthBiasClamp_, depthBiasSlopeFactor_, lineWidth_ )
+ struct PipelineRasterizationStateCreateInfo
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , depthClampEnable( depthClampEnable_ )
+ , rasterizerDiscardEnable( rasterizerDiscardEnable_ )
+ , polygonMode( polygonMode_ )
+ , cullMode( cullMode_ )
+ , frontFace( frontFace_ )
+ , depthBiasEnable( depthBiasEnable_ )
+ , depthBiasConstantFactor( depthBiasConstantFactor_ )
+ , depthBiasClamp( depthBiasClamp_ )
+ , depthBiasSlopeFactor( depthBiasSlopeFactor_ )
+ , lineWidth( lineWidth_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo ) - offsetof( PipelineRasterizationStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationStateCreateInfo( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationStateCreateInfo& operator=( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo const *>(&rhs);
return *this;
}
@@ -36894,43 +34668,43 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationStateCreateInfo & setFlags( vk::PipelineRasterizationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setDepthClampEnable( vk::Bool32 depthClampEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setDepthClampEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthClampEnable = depthClampEnable_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setRasterizerDiscardEnable( vk::Bool32 rasterizerDiscardEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable_ ) VULKAN_HPP_NOEXCEPT
{
rasterizerDiscardEnable = rasterizerDiscardEnable_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setPolygonMode( vk::PolygonMode polygonMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setPolygonMode( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode_ ) VULKAN_HPP_NOEXCEPT
{
polygonMode = polygonMode_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setCullMode( vk::CullModeFlags cullMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode_ ) VULKAN_HPP_NOEXCEPT
{
cullMode = cullMode_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setFrontFace( vk::FrontFace frontFace_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace_ ) VULKAN_HPP_NOEXCEPT
{
frontFace = frontFace_;
return *this;
}
- PipelineRasterizationStateCreateInfo & setDepthBiasEnable( vk::Bool32 depthBiasEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateCreateInfo & setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthBiasEnable = depthBiasEnable_;
return *this;
@@ -36992,77 +34766,56 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineRasterizationStateCreateInfo ) == sizeof( VkPipelineRasterizationStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineMultisampleStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineMultisampleStateCreateInfo( vk::PipelineMultisampleStateCreateFlags flags_ = vk::PipelineMultisampleStateCreateFlags(),
- vk::SampleCountFlagBits rasterizationSamples_ = vk::SampleCountFlagBits::e1,
- vk::Bool32 sampleShadingEnable_ = 0,
- float minSampleShading_ = 0,
- const vk::SampleMask* pSampleMask_ = nullptr,
- vk::Bool32 alphaToCoverageEnable_ = 0,
- vk::Bool32 alphaToOneEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , rasterizationSamples( rasterizationSamples_ )
- , sampleShadingEnable( sampleShadingEnable_ )
- , minSampleShading( minSampleShading_ )
- , pSampleMask( pSampleMask_ )
- , alphaToCoverageEnable( alphaToCoverageEnable_ )
- , alphaToOneEnable( alphaToOneEnable_ )
- {}
-
- PipelineMultisampleStateCreateInfo( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineMultisampleStateCreateInfo*>(this) = rhs;
- }
-
- PipelineMultisampleStateCreateInfo& operator=( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineMultisampleStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineMultisampleStateCreateFlags flags;
- vk::SampleCountFlagBits rasterizationSamples;
- vk::Bool32 sampleShadingEnable;
- float minSampleShading;
- const vk::SampleMask* pSampleMask;
- vk::Bool32 alphaToCoverageEnable;
- vk::Bool32 alphaToOneEnable;
- };
- static_assert( sizeof( PipelineMultisampleStateCreateInfo ) == sizeof( VkPipelineMultisampleStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineMultisampleStateCreateInfo : public layout::PipelineMultisampleStateCreateInfo
+ struct PipelineMultisampleStateCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineMultisampleStateCreateInfo( vk::PipelineMultisampleStateCreateFlags flags_ = vk::PipelineMultisampleStateCreateFlags(),
- vk::SampleCountFlagBits rasterizationSamples_ = vk::SampleCountFlagBits::e1,
- vk::Bool32 sampleShadingEnable_ = 0,
- float minSampleShading_ = 0,
- const vk::SampleMask* pSampleMask_ = nullptr,
- vk::Bool32 alphaToCoverageEnable_ = 0,
- vk::Bool32 alphaToOneEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineMultisampleStateCreateInfo( flags_, rasterizationSamples_, sampleShadingEnable_, minSampleShading_, pSampleMask_, alphaToCoverageEnable_, alphaToOneEnable_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , rasterizationSamples( rasterizationSamples_ )
+ , sampleShadingEnable( sampleShadingEnable_ )
+ , minSampleShading( minSampleShading_ )
+ , pSampleMask( pSampleMask_ )
+ , alphaToCoverageEnable( alphaToCoverageEnable_ )
+ , alphaToOneEnable( alphaToOneEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo ) - offsetof( PipelineMultisampleStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineMultisampleStateCreateInfo( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineMultisampleStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineMultisampleStateCreateInfo& operator=( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineMultisampleStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo const *>(&rhs);
return *this;
}
@@ -37072,19 +34825,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineMultisampleStateCreateInfo & setFlags( vk::PipelineMultisampleStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineMultisampleStateCreateInfo & setRasterizationSamples( vk::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT
{
rasterizationSamples = rasterizationSamples_;
return *this;
}
- PipelineMultisampleStateCreateInfo & setSampleShadingEnable( vk::Bool32 sampleShadingEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setSampleShadingEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable_ ) VULKAN_HPP_NOEXCEPT
{
sampleShadingEnable = sampleShadingEnable_;
return *this;
@@ -37096,19 +34849,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineMultisampleStateCreateInfo & setPSampleMask( const vk::SampleMask* pSampleMask_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setPSampleMask( const VULKAN_HPP_NAMESPACE::SampleMask* pSampleMask_ ) VULKAN_HPP_NOEXCEPT
{
pSampleMask = pSampleMask_;
return *this;
}
- PipelineMultisampleStateCreateInfo & setAlphaToCoverageEnable( vk::Bool32 alphaToCoverageEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setAlphaToCoverageEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable_ ) VULKAN_HPP_NOEXCEPT
{
alphaToCoverageEnable = alphaToCoverageEnable_;
return *this;
}
- PipelineMultisampleStateCreateInfo & setAlphaToOneEnable( vk::Bool32 alphaToOneEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineMultisampleStateCreateInfo & setAlphaToOneEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable_ ) VULKAN_HPP_NOEXCEPT
{
alphaToOneEnable = alphaToOneEnable_;
return *this;
@@ -37129,7 +34882,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( flags == rhs.flags )
- && vk::operator==( rasterizationSamples, rhs.rasterizationSamples )
+ && ( rasterizationSamples == rhs.rasterizationSamples )
&& ( sampleShadingEnable == rhs.sampleShadingEnable )
&& ( minSampleShading == rhs.minSampleShading )
&& ( pSampleMask == rhs.pSampleMask )
@@ -37142,21 +34895,29 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineMultisampleStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineMultisampleStateCreateInfo ) == sizeof( VkPipelineMultisampleStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineMultisampleStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct StencilOpState
{
- VULKAN_HPP_CONSTEXPR StencilOpState( vk::StencilOp failOp_ = vk::StencilOp::eKeep,
- vk::StencilOp passOp_ = vk::StencilOp::eKeep,
- vk::StencilOp depthFailOp_ = vk::StencilOp::eKeep,
- vk::CompareOp compareOp_ = vk::CompareOp::eNever,
- uint32_t compareMask_ = 0,
- uint32_t writeMask_ = 0,
- uint32_t reference_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -37168,34 +34929,34 @@ namespace VULKAN_HPP_NAMESPACE
StencilOpState( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkStencilOpState*>(this) = rhs;
+ *this = rhs;
}
StencilOpState& operator=( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkStencilOpState*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::StencilOpState const *>(&rhs);
return *this;
}
- StencilOpState & setFailOp( vk::StencilOp failOp_ ) VULKAN_HPP_NOEXCEPT
+ StencilOpState & setFailOp( VULKAN_HPP_NAMESPACE::StencilOp failOp_ ) VULKAN_HPP_NOEXCEPT
{
failOp = failOp_;
return *this;
}
- StencilOpState & setPassOp( vk::StencilOp passOp_ ) VULKAN_HPP_NOEXCEPT
+ StencilOpState & setPassOp( VULKAN_HPP_NAMESPACE::StencilOp passOp_ ) VULKAN_HPP_NOEXCEPT
{
passOp = passOp_;
return *this;
}
- StencilOpState & setDepthFailOp( vk::StencilOp depthFailOp_ ) VULKAN_HPP_NOEXCEPT
+ StencilOpState & setDepthFailOp( VULKAN_HPP_NAMESPACE::StencilOp depthFailOp_ ) VULKAN_HPP_NOEXCEPT
{
depthFailOp = depthFailOp_;
return *this;
}
- StencilOpState & setCompareOp( vk::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT
+ StencilOpState & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT
{
compareOp = compareOp_;
return *this;
@@ -37246,94 +35007,55 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::StencilOp failOp;
- vk::StencilOp passOp;
- vk::StencilOp depthFailOp;
- vk::CompareOp compareOp;
- uint32_t compareMask;
- uint32_t writeMask;
- uint32_t reference;
+ 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 = {};
};
static_assert( sizeof( StencilOpState ) == sizeof( VkStencilOpState ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<StencilOpState>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineDepthStencilStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( vk::PipelineDepthStencilStateCreateFlags flags_ = vk::PipelineDepthStencilStateCreateFlags(),
- vk::Bool32 depthTestEnable_ = 0,
- vk::Bool32 depthWriteEnable_ = 0,
- vk::CompareOp depthCompareOp_ = vk::CompareOp::eNever,
- vk::Bool32 depthBoundsTestEnable_ = 0,
- vk::Bool32 stencilTestEnable_ = 0,
- vk::StencilOpState front_ = vk::StencilOpState(),
- vk::StencilOpState back_ = vk::StencilOpState(),
- float minDepthBounds_ = 0,
- float maxDepthBounds_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , depthTestEnable( depthTestEnable_ )
- , depthWriteEnable( depthWriteEnable_ )
- , depthCompareOp( depthCompareOp_ )
- , depthBoundsTestEnable( depthBoundsTestEnable_ )
- , stencilTestEnable( stencilTestEnable_ )
- , front( front_ )
- , back( back_ )
- , minDepthBounds( minDepthBounds_ )
- , maxDepthBounds( maxDepthBounds_ )
- {}
-
- PipelineDepthStencilStateCreateInfo( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDepthStencilStateCreateInfo*>(this) = rhs;
- }
-
- PipelineDepthStencilStateCreateInfo& operator=( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDepthStencilStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineDepthStencilStateCreateFlags flags;
- vk::Bool32 depthTestEnable;
- vk::Bool32 depthWriteEnable;
- vk::CompareOp depthCompareOp;
- vk::Bool32 depthBoundsTestEnable;
- vk::Bool32 stencilTestEnable;
- vk::StencilOpState front;
- vk::StencilOpState back;
- float minDepthBounds;
- float maxDepthBounds;
- };
- static_assert( sizeof( PipelineDepthStencilStateCreateInfo ) == sizeof( VkPipelineDepthStencilStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineDepthStencilStateCreateInfo : public layout::PipelineDepthStencilStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( vk::PipelineDepthStencilStateCreateFlags flags_ = vk::PipelineDepthStencilStateCreateFlags(),
- vk::Bool32 depthTestEnable_ = 0,
- vk::Bool32 depthWriteEnable_ = 0,
- vk::CompareOp depthCompareOp_ = vk::CompareOp::eNever,
- vk::Bool32 depthBoundsTestEnable_ = 0,
- vk::Bool32 stencilTestEnable_ = 0,
- vk::StencilOpState front_ = vk::StencilOpState(),
- vk::StencilOpState back_ = vk::StencilOpState(),
- float minDepthBounds_ = 0,
- float maxDepthBounds_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDepthStencilStateCreateInfo( flags_, depthTestEnable_, depthWriteEnable_, depthCompareOp_, depthBoundsTestEnable_, stencilTestEnable_, front_, back_, minDepthBounds_, maxDepthBounds_ )
+ struct PipelineDepthStencilStateCreateInfo
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , depthTestEnable( depthTestEnable_ )
+ , depthWriteEnable( depthWriteEnable_ )
+ , depthCompareOp( depthCompareOp_ )
+ , depthBoundsTestEnable( depthBoundsTestEnable_ )
+ , stencilTestEnable( stencilTestEnable_ )
+ , front( front_ )
+ , back( back_ )
+ , minDepthBounds( minDepthBounds_ )
+ , maxDepthBounds( maxDepthBounds_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo ) - offsetof( PipelineDepthStencilStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineDepthStencilStateCreateInfo( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDepthStencilStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineDepthStencilStateCreateInfo& operator=( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineDepthStencilStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo const *>(&rhs);
return *this;
}
@@ -37343,49 +35065,49 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineDepthStencilStateCreateInfo & setFlags( vk::PipelineDepthStencilStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setDepthTestEnable( vk::Bool32 depthTestEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthTestEnable = depthTestEnable_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setDepthWriteEnable( vk::Bool32 depthWriteEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthWriteEnable = depthWriteEnable_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setDepthCompareOp( vk::CompareOp depthCompareOp_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp_ ) VULKAN_HPP_NOEXCEPT
{
depthCompareOp = depthCompareOp_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setDepthBoundsTestEnable( vk::Bool32 depthBoundsTestEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthBoundsTestEnable = depthBoundsTestEnable_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setStencilTestEnable( vk::Bool32 stencilTestEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable_ ) VULKAN_HPP_NOEXCEPT
{
stencilTestEnable = stencilTestEnable_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setFront( vk::StencilOpState front_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setFront( VULKAN_HPP_NAMESPACE::StencilOpState front_ ) VULKAN_HPP_NOEXCEPT
{
front = front_;
return *this;
}
- PipelineDepthStencilStateCreateInfo & setBack( vk::StencilOpState back_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDepthStencilStateCreateInfo & setBack( VULKAN_HPP_NAMESPACE::StencilOpState back_ ) VULKAN_HPP_NOEXCEPT
{
back = back_;
return *this;
@@ -37434,22 +35156,33 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineDepthStencilStateCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineDepthStencilStateCreateInfo ) == sizeof( VkPipelineDepthStencilStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineDepthStencilStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct PipelineColorBlendAttachmentState
{
- VULKAN_HPP_CONSTEXPR PipelineColorBlendAttachmentState( vk::Bool32 blendEnable_ = 0,
- vk::BlendFactor srcColorBlendFactor_ = vk::BlendFactor::eZero,
- vk::BlendFactor dstColorBlendFactor_ = vk::BlendFactor::eZero,
- vk::BlendOp colorBlendOp_ = vk::BlendOp::eAdd,
- vk::BlendFactor srcAlphaBlendFactor_ = vk::BlendFactor::eZero,
- vk::BlendFactor dstAlphaBlendFactor_ = vk::BlendFactor::eZero,
- vk::BlendOp alphaBlendOp_ = vk::BlendOp::eAdd,
- vk::ColorComponentFlags colorWriteMask_ = vk::ColorComponentFlags() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -37462,58 +35195,58 @@ namespace VULKAN_HPP_NAMESPACE
PipelineColorBlendAttachmentState( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPipelineColorBlendAttachmentState*>(this) = rhs;
+ *this = rhs;
}
PipelineColorBlendAttachmentState& operator=( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPipelineColorBlendAttachmentState*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState const *>(&rhs);
return *this;
}
- PipelineColorBlendAttachmentState & setBlendEnable( vk::Bool32 blendEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setBlendEnable( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ ) VULKAN_HPP_NOEXCEPT
{
blendEnable = blendEnable_;
return *this;
}
- PipelineColorBlendAttachmentState & setSrcColorBlendFactor( vk::BlendFactor srcColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setSrcColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT
{
srcColorBlendFactor = srcColorBlendFactor_;
return *this;
}
- PipelineColorBlendAttachmentState & setDstColorBlendFactor( vk::BlendFactor dstColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setDstColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT
{
dstColorBlendFactor = dstColorBlendFactor_;
return *this;
}
- PipelineColorBlendAttachmentState & setColorBlendOp( vk::BlendOp colorBlendOp_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setColorBlendOp( VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ ) VULKAN_HPP_NOEXCEPT
{
colorBlendOp = colorBlendOp_;
return *this;
}
- PipelineColorBlendAttachmentState & setSrcAlphaBlendFactor( vk::BlendFactor srcAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setSrcAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT
{
srcAlphaBlendFactor = srcAlphaBlendFactor_;
return *this;
}
- PipelineColorBlendAttachmentState & setDstAlphaBlendFactor( vk::BlendFactor dstAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setDstAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT
{
dstAlphaBlendFactor = dstAlphaBlendFactor_;
return *this;
}
- PipelineColorBlendAttachmentState & setAlphaBlendOp( vk::BlendOp alphaBlendOp_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setAlphaBlendOp( VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ ) VULKAN_HPP_NOEXCEPT
{
alphaBlendOp = alphaBlendOp_;
return *this;
}
- PipelineColorBlendAttachmentState & setColorWriteMask( vk::ColorComponentFlags colorWriteMask_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAttachmentState & setColorWriteMask( VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask_ ) VULKAN_HPP_NOEXCEPT
{
colorWriteMask = colorWriteMask_;
return *this;
@@ -37547,81 +35280,50 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Bool32 blendEnable;
- vk::BlendFactor srcColorBlendFactor;
- vk::BlendFactor dstColorBlendFactor;
- vk::BlendOp colorBlendOp;
- vk::BlendFactor srcAlphaBlendFactor;
- vk::BlendFactor dstAlphaBlendFactor;
- vk::BlendOp alphaBlendOp;
- vk::ColorComponentFlags colorWriteMask;
+ 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 = {};
};
static_assert( sizeof( PipelineColorBlendAttachmentState ) == sizeof( VkPipelineColorBlendAttachmentState ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineColorBlendAttachmentState>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineColorBlendStateCreateInfo
{
- struct PipelineColorBlendStateCreateInfo
+ 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<float,4> const& blendConstants_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , logicOpEnable( logicOpEnable_ )
+ , logicOp( logicOp_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , blendConstants{}
{
- protected:
- VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( vk::PipelineColorBlendStateCreateFlags flags_ = vk::PipelineColorBlendStateCreateFlags(),
- vk::Bool32 logicOpEnable_ = 0,
- vk::LogicOp logicOp_ = vk::LogicOp::eClear,
- uint32_t attachmentCount_ = 0,
- const vk::PipelineColorBlendAttachmentState* pAttachments_ = nullptr,
- std::array<float,4> const& blendConstants_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , logicOpEnable( logicOpEnable_ )
- , logicOp( logicOp_ )
- , attachmentCount( attachmentCount_ )
- , pAttachments( pAttachments_ )
- , blendConstants{}
- {
- vk::ConstExpressionArrayCopy<float,4,4>::copy( blendConstants, blendConstants_ );
- }
-
- PipelineColorBlendStateCreateInfo( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineColorBlendStateCreateInfo*>(this) = rhs;
- }
-
- PipelineColorBlendStateCreateInfo& operator=( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineColorBlendStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineColorBlendStateCreateFlags flags;
- vk::Bool32 logicOpEnable;
- vk::LogicOp logicOp;
- uint32_t attachmentCount;
- const vk::PipelineColorBlendAttachmentState* pAttachments;
- float blendConstants[4];
- };
- static_assert( sizeof( PipelineColorBlendStateCreateInfo ) == sizeof( VkPipelineColorBlendStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,4,4>::copy( blendConstants, blendConstants_ );
+ }
- struct PipelineColorBlendStateCreateInfo : public layout::PipelineColorBlendStateCreateInfo
- {
- VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( vk::PipelineColorBlendStateCreateFlags flags_ = vk::PipelineColorBlendStateCreateFlags(),
- vk::Bool32 logicOpEnable_ = 0,
- vk::LogicOp logicOp_ = vk::LogicOp::eClear,
- uint32_t attachmentCount_ = 0,
- const vk::PipelineColorBlendAttachmentState* pAttachments_ = nullptr,
- std::array<float,4> const& blendConstants_ = { { 0 } } ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineColorBlendStateCreateInfo( flags_, logicOpEnable_, logicOp_, attachmentCount_, pAttachments_, blendConstants_ )
- {}
+ VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo ) - offsetof( PipelineColorBlendStateCreateInfo, pNext ) );
+ return *this;
+ }
PipelineColorBlendStateCreateInfo( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineColorBlendStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineColorBlendStateCreateInfo& operator=( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineColorBlendStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo const *>(&rhs);
return *this;
}
@@ -37631,19 +35333,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineColorBlendStateCreateInfo & setFlags( vk::PipelineColorBlendStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineColorBlendStateCreateInfo & setLogicOpEnable( vk::Bool32 logicOpEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendStateCreateInfo & setLogicOpEnable( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_ ) VULKAN_HPP_NOEXCEPT
{
logicOpEnable = logicOpEnable_;
return *this;
}
- PipelineColorBlendStateCreateInfo & setLogicOp( vk::LogicOp logicOp_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendStateCreateInfo & setLogicOp( VULKAN_HPP_NAMESPACE::LogicOp logicOp_ ) VULKAN_HPP_NOEXCEPT
{
logicOp = logicOp_;
return *this;
@@ -37655,7 +35357,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineColorBlendStateCreateInfo & setPAttachments( const vk::PipelineColorBlendAttachmentState* pAttachments_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendStateCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState* pAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pAttachments = pAttachments_;
return *this;
@@ -37694,61 +35396,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineColorBlendStateCreateInfo::sType;
+ public:
+ const 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 = {};
+ float blendConstants[4] = {};
};
static_assert( sizeof( PipelineColorBlendStateCreateInfo ) == sizeof( VkPipelineColorBlendStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineColorBlendStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineDynamicStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( vk::PipelineDynamicStateCreateFlags flags_ = vk::PipelineDynamicStateCreateFlags(),
- uint32_t dynamicStateCount_ = 0,
- const vk::DynamicState* pDynamicStates_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , dynamicStateCount( dynamicStateCount_ )
- , pDynamicStates( pDynamicStates_ )
- {}
-
- PipelineDynamicStateCreateInfo( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDynamicStateCreateInfo*>(this) = rhs;
- }
-
- PipelineDynamicStateCreateInfo& operator=( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDynamicStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineDynamicStateCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineDynamicStateCreateFlags flags;
- uint32_t dynamicStateCount;
- const vk::DynamicState* pDynamicStates;
- };
- static_assert( sizeof( PipelineDynamicStateCreateInfo ) == sizeof( VkPipelineDynamicStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineDynamicStateCreateInfo : public layout::PipelineDynamicStateCreateInfo
+ struct PipelineDynamicStateCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( vk::PipelineDynamicStateCreateFlags flags_ = vk::PipelineDynamicStateCreateFlags(),
- uint32_t dynamicStateCount_ = 0,
- const vk::DynamicState* pDynamicStates_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDynamicStateCreateInfo( flags_, dynamicStateCount_, pDynamicStates_ )
+ VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ = {},
+ uint32_t dynamicStateCount_ = {},
+ const VULKAN_HPP_NAMESPACE::DynamicState* pDynamicStates_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , dynamicStateCount( dynamicStateCount_ )
+ , pDynamicStates( pDynamicStates_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo ) - offsetof( PipelineDynamicStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineDynamicStateCreateInfo( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDynamicStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineDynamicStateCreateInfo& operator=( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineDynamicStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo const *>(&rhs);
return *this;
}
@@ -37758,7 +35442,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineDynamicStateCreateInfo & setFlags( vk::PipelineDynamicStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDynamicStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -37770,7 +35454,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineDynamicStateCreateInfo & setPDynamicStates( const vk::DynamicState* pDynamicStates_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDynamicStateCreateInfo & setPDynamicStates( const VULKAN_HPP_NAMESPACE::DynamicState* pDynamicStates_ ) VULKAN_HPP_NOEXCEPT
{
pDynamicStates = pDynamicStates_;
return *this;
@@ -37800,117 +35484,68 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineDynamicStateCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDynamicStateCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags = {};
+ uint32_t dynamicStateCount = {};
+ const VULKAN_HPP_NAMESPACE::DynamicState* pDynamicStates = {};
};
static_assert( sizeof( PipelineDynamicStateCreateInfo ) == sizeof( VkPipelineDynamicStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineDynamicStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct GraphicsPipelineCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR GraphicsPipelineCreateInfo( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- uint32_t stageCount_ = 0,
- const vk::PipelineShaderStageCreateInfo* pStages_ = nullptr,
- const vk::PipelineVertexInputStateCreateInfo* pVertexInputState_ = nullptr,
- const vk::PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ = nullptr,
- const vk::PipelineTessellationStateCreateInfo* pTessellationState_ = nullptr,
- const vk::PipelineViewportStateCreateInfo* pViewportState_ = nullptr,
- const vk::PipelineRasterizationStateCreateInfo* pRasterizationState_ = nullptr,
- const vk::PipelineMultisampleStateCreateInfo* pMultisampleState_ = nullptr,
- const vk::PipelineDepthStencilStateCreateInfo* pDepthStencilState_ = nullptr,
- const vk::PipelineColorBlendStateCreateInfo* pColorBlendState_ = nullptr,
- const vk::PipelineDynamicStateCreateInfo* pDynamicState_ = nullptr,
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t subpass_ = 0,
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : 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_ )
- {}
-
- GraphicsPipelineCreateInfo( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGraphicsPipelineCreateInfo*>(this) = rhs;
- }
-
- GraphicsPipelineCreateInfo& operator=( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkGraphicsPipelineCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eGraphicsPipelineCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineCreateFlags flags;
- uint32_t stageCount;
- const vk::PipelineShaderStageCreateInfo* pStages;
- const vk::PipelineVertexInputStateCreateInfo* pVertexInputState;
- const vk::PipelineInputAssemblyStateCreateInfo* pInputAssemblyState;
- const vk::PipelineTessellationStateCreateInfo* pTessellationState;
- const vk::PipelineViewportStateCreateInfo* pViewportState;
- const vk::PipelineRasterizationStateCreateInfo* pRasterizationState;
- const vk::PipelineMultisampleStateCreateInfo* pMultisampleState;
- const vk::PipelineDepthStencilStateCreateInfo* pDepthStencilState;
- const vk::PipelineColorBlendStateCreateInfo* pColorBlendState;
- const vk::PipelineDynamicStateCreateInfo* pDynamicState;
- vk::PipelineLayout layout;
- vk::RenderPass renderPass;
- uint32_t subpass;
- vk::Pipeline basePipelineHandle;
- int32_t basePipelineIndex;
- };
- static_assert( sizeof( GraphicsPipelineCreateInfo ) == sizeof( VkGraphicsPipelineCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct GraphicsPipelineCreateInfo : public layout::GraphicsPipelineCreateInfo
- {
- VULKAN_HPP_CONSTEXPR GraphicsPipelineCreateInfo( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- uint32_t stageCount_ = 0,
- const vk::PipelineShaderStageCreateInfo* pStages_ = nullptr,
- const vk::PipelineVertexInputStateCreateInfo* pVertexInputState_ = nullptr,
- const vk::PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ = nullptr,
- const vk::PipelineTessellationStateCreateInfo* pTessellationState_ = nullptr,
- const vk::PipelineViewportStateCreateInfo* pViewportState_ = nullptr,
- const vk::PipelineRasterizationStateCreateInfo* pRasterizationState_ = nullptr,
- const vk::PipelineMultisampleStateCreateInfo* pMultisampleState_ = nullptr,
- const vk::PipelineDepthStencilStateCreateInfo* pDepthStencilState_ = nullptr,
- const vk::PipelineColorBlendStateCreateInfo* pColorBlendState_ = nullptr,
- const vk::PipelineDynamicStateCreateInfo* pDynamicState_ = nullptr,
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::RenderPass renderPass_ = vk::RenderPass(),
- uint32_t subpass_ = 0,
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::GraphicsPipelineCreateInfo( flags_, stageCount_, pStages_, pVertexInputState_, pInputAssemblyState_, pTessellationState_, pViewportState_, pRasterizationState_, pMultisampleState_, pDepthStencilState_, pColorBlendState_, pDynamicState_, layout_, renderPass_, subpass_, basePipelineHandle_, basePipelineIndex_ )
+ struct GraphicsPipelineCreateInfo
+ {
+ VULKAN_HPP_CONSTEXPR 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::GraphicsPipelineCreateInfo & operator=( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo ) - offsetof( GraphicsPipelineCreateInfo, pNext ) );
+ return *this;
+ }
+
GraphicsPipelineCreateInfo( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::GraphicsPipelineCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
GraphicsPipelineCreateInfo& operator=( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::GraphicsPipelineCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const *>(&rhs);
return *this;
}
@@ -37920,7 +35555,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GraphicsPipelineCreateInfo & setFlags( vk::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -37932,73 +35567,73 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GraphicsPipelineCreateInfo & setPStages( const vk::PipelineShaderStageCreateInfo* pStages_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo* pStages_ ) VULKAN_HPP_NOEXCEPT
{
pStages = pStages_;
return *this;
}
- GraphicsPipelineCreateInfo & setPVertexInputState( const vk::PipelineVertexInputStateCreateInfo* pVertexInputState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPVertexInputState( const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo* pVertexInputState_ ) VULKAN_HPP_NOEXCEPT
{
pVertexInputState = pVertexInputState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPInputAssemblyState( const vk::PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPInputAssemblyState( const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ ) VULKAN_HPP_NOEXCEPT
{
pInputAssemblyState = pInputAssemblyState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPTessellationState( const vk::PipelineTessellationStateCreateInfo* pTessellationState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPTessellationState( const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo* pTessellationState_ ) VULKAN_HPP_NOEXCEPT
{
pTessellationState = pTessellationState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPViewportState( const vk::PipelineViewportStateCreateInfo* pViewportState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPViewportState( const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo* pViewportState_ ) VULKAN_HPP_NOEXCEPT
{
pViewportState = pViewportState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPRasterizationState( const vk::PipelineRasterizationStateCreateInfo* pRasterizationState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPRasterizationState( const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo* pRasterizationState_ ) VULKAN_HPP_NOEXCEPT
{
pRasterizationState = pRasterizationState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPMultisampleState( const vk::PipelineMultisampleStateCreateInfo* pMultisampleState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPMultisampleState( const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo* pMultisampleState_ ) VULKAN_HPP_NOEXCEPT
{
pMultisampleState = pMultisampleState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPDepthStencilState( const vk::PipelineDepthStencilStateCreateInfo* pDepthStencilState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPDepthStencilState( const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo* pDepthStencilState_ ) VULKAN_HPP_NOEXCEPT
{
pDepthStencilState = pDepthStencilState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPColorBlendState( const vk::PipelineColorBlendStateCreateInfo* pColorBlendState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPColorBlendState( const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo* pColorBlendState_ ) VULKAN_HPP_NOEXCEPT
{
pColorBlendState = pColorBlendState_;
return *this;
}
- GraphicsPipelineCreateInfo & setPDynamicState( const vk::PipelineDynamicStateCreateInfo* pDynamicState_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setPDynamicState( const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo* pDynamicState_ ) VULKAN_HPP_NOEXCEPT
{
pDynamicState = pDynamicState_;
return *this;
}
- GraphicsPipelineCreateInfo & setLayout( vk::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
{
layout = layout_;
return *this;
}
- GraphicsPipelineCreateInfo & setRenderPass( vk::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
{
renderPass = renderPass_;
return *this;
@@ -38010,7 +35645,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- GraphicsPipelineCreateInfo & setBasePipelineHandle( vk::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
+ GraphicsPipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
{
basePipelineHandle = basePipelineHandle_;
return *this;
@@ -38060,28 +35695,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::GraphicsPipelineCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( GraphicsPipelineCreateInfo ) == sizeof( VkGraphicsPipelineCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<GraphicsPipelineCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct XYColorEXT
{
- VULKAN_HPP_CONSTEXPR XYColorEXT( float x_ = 0,
- float y_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR XYColorEXT( float x_ = {},
+ float y_ = {} ) VULKAN_HPP_NOEXCEPT
: x( x_ )
, y( y_ )
{}
XYColorEXT( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkXYColorEXT*>(this) = rhs;
+ *this = rhs;
}
XYColorEXT& operator=( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkXYColorEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::XYColorEXT const *>(&rhs);
return *this;
}
@@ -38119,81 +35772,46 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- float x;
- float y;
+ float x = {};
+ float y = {};
};
static_assert( sizeof( XYColorEXT ) == sizeof( VkXYColorEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<XYColorEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct HdrMetadataEXT
{
- struct HdrMetadataEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR HdrMetadataEXT( vk::XYColorEXT displayPrimaryRed_ = vk::XYColorEXT(),
- vk::XYColorEXT displayPrimaryGreen_ = vk::XYColorEXT(),
- vk::XYColorEXT displayPrimaryBlue_ = vk::XYColorEXT(),
- vk::XYColorEXT whitePoint_ = vk::XYColorEXT(),
- float maxLuminance_ = 0,
- float minLuminance_ = 0,
- float maxContentLightLevel_ = 0,
- float maxFrameAverageLightLevel_ = 0 ) VULKAN_HPP_NOEXCEPT
- : displayPrimaryRed( displayPrimaryRed_ )
- , displayPrimaryGreen( displayPrimaryGreen_ )
- , displayPrimaryBlue( displayPrimaryBlue_ )
- , whitePoint( whitePoint_ )
- , maxLuminance( maxLuminance_ )
- , minLuminance( minLuminance_ )
- , maxContentLightLevel( maxContentLightLevel_ )
- , maxFrameAverageLightLevel( maxFrameAverageLightLevel_ )
- {}
-
- HdrMetadataEXT( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkHdrMetadataEXT*>(this) = rhs;
- }
-
- HdrMetadataEXT& operator=( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkHdrMetadataEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eHdrMetadataEXT;
- const void* pNext = nullptr;
- vk::XYColorEXT displayPrimaryRed;
- vk::XYColorEXT displayPrimaryGreen;
- vk::XYColorEXT displayPrimaryBlue;
- vk::XYColorEXT whitePoint;
- float maxLuminance;
- float minLuminance;
- float maxContentLightLevel;
- float maxFrameAverageLightLevel;
- };
- static_assert( sizeof( HdrMetadataEXT ) == sizeof( VkHdrMetadataEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct HdrMetadataEXT : public layout::HdrMetadataEXT
- {
- VULKAN_HPP_CONSTEXPR HdrMetadataEXT( vk::XYColorEXT displayPrimaryRed_ = vk::XYColorEXT(),
- vk::XYColorEXT displayPrimaryGreen_ = vk::XYColorEXT(),
- vk::XYColorEXT displayPrimaryBlue_ = vk::XYColorEXT(),
- vk::XYColorEXT whitePoint_ = vk::XYColorEXT(),
- float maxLuminance_ = 0,
- float minLuminance_ = 0,
- float maxContentLightLevel_ = 0,
- float maxFrameAverageLightLevel_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::HdrMetadataEXT( displayPrimaryRed_, displayPrimaryGreen_, displayPrimaryBlue_, whitePoint_, maxLuminance_, minLuminance_, maxContentLightLevel_, maxFrameAverageLightLevel_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : displayPrimaryRed( displayPrimaryRed_ )
+ , displayPrimaryGreen( displayPrimaryGreen_ )
+ , displayPrimaryBlue( displayPrimaryBlue_ )
+ , whitePoint( whitePoint_ )
+ , maxLuminance( maxLuminance_ )
+ , minLuminance( minLuminance_ )
+ , maxContentLightLevel( maxContentLightLevel_ )
+ , maxFrameAverageLightLevel( maxFrameAverageLightLevel_ )
{}
+ VULKAN_HPP_NAMESPACE::HdrMetadataEXT & operator=( VULKAN_HPP_NAMESPACE::HdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::HdrMetadataEXT ) - offsetof( HdrMetadataEXT, pNext ) );
+ return *this;
+ }
+
HdrMetadataEXT( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::HdrMetadataEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
HdrMetadataEXT& operator=( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::HdrMetadataEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::HdrMetadataEXT const *>(&rhs);
return *this;
}
@@ -38203,25 +35821,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- HdrMetadataEXT & setDisplayPrimaryRed( vk::XYColorEXT displayPrimaryRed_ ) VULKAN_HPP_NOEXCEPT
+ HdrMetadataEXT & setDisplayPrimaryRed( VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryRed_ ) VULKAN_HPP_NOEXCEPT
{
displayPrimaryRed = displayPrimaryRed_;
return *this;
}
- HdrMetadataEXT & setDisplayPrimaryGreen( vk::XYColorEXT displayPrimaryGreen_ ) VULKAN_HPP_NOEXCEPT
+ HdrMetadataEXT & setDisplayPrimaryGreen( VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryGreen_ ) VULKAN_HPP_NOEXCEPT
{
displayPrimaryGreen = displayPrimaryGreen_;
return *this;
}
- HdrMetadataEXT & setDisplayPrimaryBlue( vk::XYColorEXT displayPrimaryBlue_ ) VULKAN_HPP_NOEXCEPT
+ HdrMetadataEXT & setDisplayPrimaryBlue( VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryBlue_ ) VULKAN_HPP_NOEXCEPT
{
displayPrimaryBlue = displayPrimaryBlue_;
return *this;
}
- HdrMetadataEXT & setWhitePoint( vk::XYColorEXT whitePoint_ ) VULKAN_HPP_NOEXCEPT
+ HdrMetadataEXT & setWhitePoint( VULKAN_HPP_NAMESPACE::XYColorEXT whitePoint_ ) VULKAN_HPP_NOEXCEPT
{
whitePoint = whitePoint_;
return *this;
@@ -38280,53 +35898,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::HdrMetadataEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( HdrMetadataEXT ) == sizeof( VkHdrMetadataEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<HdrMetadataEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct HeadlessSurfaceCreateInfoEXT
{
- struct HeadlessSurfaceCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( vk::HeadlessSurfaceCreateFlagsEXT flags_ = vk::HeadlessSurfaceCreateFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- {}
-
- HeadlessSurfaceCreateInfoEXT( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkHeadlessSurfaceCreateInfoEXT*>(this) = rhs;
- }
-
- HeadlessSurfaceCreateInfoEXT& operator=( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkHeadlessSurfaceCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eHeadlessSurfaceCreateInfoEXT;
- const void* pNext = nullptr;
- vk::HeadlessSurfaceCreateFlagsEXT flags;
- };
- static_assert( sizeof( HeadlessSurfaceCreateInfoEXT ) == sizeof( VkHeadlessSurfaceCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct HeadlessSurfaceCreateInfoEXT : public layout::HeadlessSurfaceCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( vk::HeadlessSurfaceCreateFlagsEXT flags_ = vk::HeadlessSurfaceCreateFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : layout::HeadlessSurfaceCreateInfoEXT( flags_ )
+ VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT ) - offsetof( HeadlessSurfaceCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
HeadlessSurfaceCreateInfoEXT( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::HeadlessSurfaceCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
HeadlessSurfaceCreateInfoEXT& operator=( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::HeadlessSurfaceCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -38336,7 +35942,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- HeadlessSurfaceCreateInfoEXT & setFlags( vk::HeadlessSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ HeadlessSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -38364,59 +35970,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::HeadlessSurfaceCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHeadlessSurfaceCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags = {};
};
static_assert( sizeof( HeadlessSurfaceCreateInfoEXT ) == sizeof( VkHeadlessSurfaceCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<HeadlessSurfaceCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_IOS_MVK
- namespace layout
- {
- struct IOSSurfaceCreateInfoMVK
- {
- protected:
- VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( vk::IOSSurfaceCreateFlagsMVK flags_ = vk::IOSSurfaceCreateFlagsMVK(),
- const void* pView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pView( pView_ )
- {}
-
- IOSSurfaceCreateInfoMVK( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkIOSSurfaceCreateInfoMVK*>(this) = rhs;
- }
-
- IOSSurfaceCreateInfoMVK& operator=( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkIOSSurfaceCreateInfoMVK*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eIosSurfaceCreateInfoMVK;
- const void* pNext = nullptr;
- vk::IOSSurfaceCreateFlagsMVK flags;
- const void* pView;
- };
- static_assert( sizeof( IOSSurfaceCreateInfoMVK ) == sizeof( VkIOSSurfaceCreateInfoMVK ), "layout struct and wrapper have different size!" );
- }
-
- struct IOSSurfaceCreateInfoMVK : public layout::IOSSurfaceCreateInfoMVK
+ struct IOSSurfaceCreateInfoMVK
{
- VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( vk::IOSSurfaceCreateFlagsMVK flags_ = vk::IOSSurfaceCreateFlagsMVK(),
- const void* pView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::IOSSurfaceCreateInfoMVK( flags_, pView_ )
+ VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ = {},
+ const void* pView_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pView( pView_ )
{}
+ VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & operator=( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK ) - offsetof( IOSSurfaceCreateInfoMVK, pNext ) );
+ return *this;
+ }
+
IOSSurfaceCreateInfoMVK( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::IOSSurfaceCreateInfoMVK( rhs )
- {}
+ {
+ *this = rhs;
+ }
IOSSurfaceCreateInfoMVK& operator=( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::IOSSurfaceCreateInfoMVK::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const *>(&rhs);
return *this;
}
@@ -38426,7 +36011,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- IOSSurfaceCreateInfoMVK & setFlags( vk::IOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT
+ IOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -38461,8 +36046,11 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::IOSSurfaceCreateInfoMVK::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIosSurfaceCreateInfoMVK;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags = {};
+ const void* pView = {};
};
static_assert( sizeof( IOSSurfaceCreateInfoMVK ) == sizeof( VkIOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<IOSSurfaceCreateInfoMVK>::value, "struct wrapper is not a standard layout!" );
@@ -38470,51 +36058,51 @@ namespace VULKAN_HPP_NAMESPACE
struct ImageBlit
{
- VULKAN_HPP_CONSTEXPR_14 ImageBlit( vk::ImageSubresourceLayers srcSubresource_ = vk::ImageSubresourceLayers(),
- std::array<vk::Offset3D,2> const& srcOffsets_ = { { vk::Offset3D() } },
- vk::ImageSubresourceLayers dstSubresource_ = vk::ImageSubresourceLayers(),
- std::array<vk::Offset3D,2> const& dstOffsets_ = { { vk::Offset3D() } } ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR_14 ImageBlit( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::Offset3D,2> const& srcOffsets_ = {},
+ VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::Offset3D,2> const& dstOffsets_ = {} ) VULKAN_HPP_NOEXCEPT
: srcSubresource( srcSubresource_ )
, srcOffsets{}
, dstSubresource( dstSubresource_ )
, dstOffsets{}
{
- vk::ConstExpressionArrayCopy<vk::Offset3D,2,2>::copy( srcOffsets, srcOffsets_ );
- vk::ConstExpressionArrayCopy<vk::Offset3D,2,2>::copy( dstOffsets, dstOffsets_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::Offset3D,2,2>::copy( srcOffsets, srcOffsets_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::Offset3D,2,2>::copy( dstOffsets, dstOffsets_ );
}
ImageBlit( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageBlit*>(this) = rhs;
+ *this = rhs;
}
ImageBlit& operator=( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageBlit*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageBlit const *>(&rhs);
return *this;
}
- ImageBlit & setSrcSubresource( vk::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageBlit & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
srcSubresource = srcSubresource_;
return *this;
}
- ImageBlit & setSrcOffsets( std::array<vk::Offset3D,2> srcOffsets_ ) VULKAN_HPP_NOEXCEPT
+ ImageBlit & setSrcOffsets( std::array<VULKAN_HPP_NAMESPACE::Offset3D,2> srcOffsets_ ) VULKAN_HPP_NOEXCEPT
{
- memcpy( srcOffsets, srcOffsets_.data(), 2 * sizeof( vk::Offset3D ) );
+ memcpy( srcOffsets, srcOffsets_.data(), 2 * sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) );
return *this;
}
- ImageBlit & setDstSubresource( vk::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageBlit & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
{
dstSubresource = dstSubresource_;
return *this;
}
- ImageBlit & setDstOffsets( std::array<vk::Offset3D,2> dstOffsets_ ) VULKAN_HPP_NOEXCEPT
+ ImageBlit & setDstOffsets( std::array<VULKAN_HPP_NAMESPACE::Offset3D,2> dstOffsets_ ) VULKAN_HPP_NOEXCEPT
{
- memcpy( dstOffsets, dstOffsets_.data(), 2 * sizeof( vk::Offset3D ) );
+ memcpy( dstOffsets, dstOffsets_.data(), 2 * sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) );
return *this;
}
@@ -38531,9 +36119,9 @@ namespace VULKAN_HPP_NAMESPACE
bool operator==( ImageBlit const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( srcSubresource == rhs.srcSubresource )
- && ( memcmp( srcOffsets, rhs.srcOffsets, 2 * sizeof( vk::Offset3D ) ) == 0 )
+ && ( memcmp( srcOffsets, rhs.srcOffsets, 2 * sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) ) == 0 )
&& ( dstSubresource == rhs.dstSubresource )
- && ( memcmp( dstOffsets, rhs.dstOffsets, 2 * sizeof( vk::Offset3D ) ) == 0 );
+ && ( memcmp( dstOffsets, rhs.dstOffsets, 2 * sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) ) == 0 );
}
bool operator!=( ImageBlit const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -38542,21 +36130,21 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageSubresourceLayers srcSubresource;
- vk::Offset3D srcOffsets[2];
- vk::ImageSubresourceLayers dstSubresource;
- vk::Offset3D dstOffsets[2];
+ VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {};
+ VULKAN_HPP_NAMESPACE::Offset3D srcOffsets[2] = {};
+ VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {};
+ VULKAN_HPP_NAMESPACE::Offset3D dstOffsets[2] = {};
};
static_assert( sizeof( ImageBlit ) == sizeof( VkImageBlit ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageBlit>::value, "struct wrapper is not a standard layout!" );
struct ImageCopy
{
- VULKAN_HPP_CONSTEXPR ImageCopy( vk::ImageSubresourceLayers srcSubresource_ = vk::ImageSubresourceLayers(),
- vk::Offset3D srcOffset_ = vk::Offset3D(),
- vk::ImageSubresourceLayers dstSubresource_ = vk::ImageSubresourceLayers(),
- vk::Offset3D dstOffset_ = vk::Offset3D(),
- vk::Extent3D extent_ = vk::Extent3D() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -38566,40 +36154,40 @@ namespace VULKAN_HPP_NAMESPACE
ImageCopy( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageCopy*>(this) = rhs;
+ *this = rhs;
}
ImageCopy& operator=( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageCopy*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageCopy const *>(&rhs);
return *this;
}
- ImageCopy & setSrcSubresource( vk::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageCopy & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
srcSubresource = srcSubresource_;
return *this;
}
- ImageCopy & setSrcOffset( vk::Offset3D srcOffset_ ) VULKAN_HPP_NOEXCEPT
+ ImageCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ ) VULKAN_HPP_NOEXCEPT
{
srcOffset = srcOffset_;
return *this;
}
- ImageCopy & setDstSubresource( vk::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageCopy & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
{
dstSubresource = dstSubresource_;
return *this;
}
- ImageCopy & setDstOffset( vk::Offset3D dstOffset_ ) VULKAN_HPP_NOEXCEPT
+ ImageCopy & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ ) VULKAN_HPP_NOEXCEPT
{
dstOffset = dstOffset_;
return *this;
}
- ImageCopy & setExtent( vk::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
+ ImageCopy & setExtent( VULKAN_HPP_NAMESPACE::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
@@ -38630,104 +36218,59 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageSubresourceLayers srcSubresource;
- vk::Offset3D srcOffset;
- vk::ImageSubresourceLayers dstSubresource;
- vk::Offset3D dstOffset;
- vk::Extent3D extent;
+ 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 = {};
};
static_assert( sizeof( ImageCopy ) == sizeof( VkImageCopy ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageCopy>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageCreateInfo( vk::ImageCreateFlags flags_ = vk::ImageCreateFlags(),
- vk::ImageType imageType_ = vk::ImageType::e1D,
- vk::Format format_ = vk::Format::eUndefined,
- vk::Extent3D extent_ = vk::Extent3D(),
- uint32_t mipLevels_ = 0,
- uint32_t arrayLayers_ = 0,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr,
- vk::ImageLayout initialLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : 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_ )
- {}
-
- ImageCreateInfo( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageCreateInfo*>(this) = rhs;
- }
-
- ImageCreateInfo& operator=( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageCreateInfo;
- const void* pNext = nullptr;
- vk::ImageCreateFlags flags;
- vk::ImageType imageType;
- vk::Format format;
- vk::Extent3D extent;
- uint32_t mipLevels;
- uint32_t arrayLayers;
- vk::SampleCountFlagBits samples;
- vk::ImageTiling tiling;
- vk::ImageUsageFlags usage;
- vk::SharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- vk::ImageLayout initialLayout;
- };
- static_assert( sizeof( ImageCreateInfo ) == sizeof( VkImageCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageCreateInfo : public layout::ImageCreateInfo
- {
- VULKAN_HPP_CONSTEXPR ImageCreateInfo( vk::ImageCreateFlags flags_ = vk::ImageCreateFlags(),
- vk::ImageType imageType_ = vk::ImageType::e1D,
- vk::Format format_ = vk::Format::eUndefined,
- vk::Extent3D extent_ = vk::Extent3D(),
- uint32_t mipLevels_ = 0,
- uint32_t arrayLayers_ = 0,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr,
- vk::ImageLayout initialLayout_ = vk::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT
- : layout::ImageCreateInfo( flags_, imageType_, format_, extent_, mipLevels_, arrayLayers_, samples_, tiling_, usage_, sharingMode_, queueFamilyIndexCount_, pQueueFamilyIndices_, initialLayout_ )
+ struct ImageCreateInfo
+ {
+ 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 ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::ImageCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageCreateInfo ) - offsetof( ImageCreateInfo, pNext ) );
+ return *this;
+ }
+
ImageCreateInfo( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageCreateInfo& operator=( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageCreateInfo const *>(&rhs);
return *this;
}
@@ -38737,25 +36280,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageCreateInfo & setFlags( vk::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImageCreateInfo & setImageType( vk::ImageType imageType_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setImageType( VULKAN_HPP_NAMESPACE::ImageType imageType_ ) VULKAN_HPP_NOEXCEPT
{
imageType = imageType_;
return *this;
}
- ImageCreateInfo & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- ImageCreateInfo & setExtent( vk::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setExtent( VULKAN_HPP_NAMESPACE::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
@@ -38773,25 +36316,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageCreateInfo & setSamples( vk::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
{
samples = samples_;
return *this;
}
- ImageCreateInfo & setTiling( vk::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
{
tiling = tiling_;
return *this;
}
- ImageCreateInfo & setUsage( vk::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- ImageCreateInfo & setSharingMode( vk::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
{
sharingMode = sharingMode_;
return *this;
@@ -38809,7 +36352,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageCreateInfo & setInitialLayout( vk::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
+ ImageCreateInfo & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
{
initialLayout = initialLayout_;
return *this;
@@ -38835,7 +36378,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( extent == rhs.extent )
&& ( mipLevels == rhs.mipLevels )
&& ( arrayLayers == rhs.arrayLayers )
- && vk::operator==( samples, rhs.samples )
+ && ( samples == rhs.samples )
&& ( tiling == rhs.tiling )
&& ( usage == rhs.usage )
&& ( sharingMode == rhs.sharingMode )
@@ -38849,25 +36392,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageCreateInfo::sType;
+ public:
+ const 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;
};
static_assert( sizeof( ImageCreateInfo ) == sizeof( VkImageCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct SubresourceLayout
{
- SubresourceLayout() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
SubresourceLayout( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubresourceLayout*>(this) = rhs;
+ *this = rhs;
}
SubresourceLayout& operator=( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubresourceLayout*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubresourceLayout const *>(&rhs);
return *this;
}
@@ -38896,64 +36462,39 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize offset;
- vk::DeviceSize size;
- vk::DeviceSize rowPitch;
- vk::DeviceSize arrayPitch;
- vk::DeviceSize depthPitch;
+ 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 = {};
};
static_assert( sizeof( SubresourceLayout ) == sizeof( VkSubresourceLayout ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SubresourceLayout>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageDrmFormatModifierExplicitCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = 0,
- uint32_t drmFormatModifierPlaneCount_ = 0,
- const vk::SubresourceLayout* pPlaneLayouts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : drmFormatModifier( drmFormatModifier_ )
- , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ )
- , pPlaneLayouts( pPlaneLayouts_ )
- {}
-
- ImageDrmFormatModifierExplicitCreateInfoEXT( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierExplicitCreateInfoEXT*>(this) = rhs;
- }
-
- ImageDrmFormatModifierExplicitCreateInfoEXT& operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierExplicitCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT;
- const void* pNext = nullptr;
- uint64_t drmFormatModifier;
- uint32_t drmFormatModifierPlaneCount;
- const vk::SubresourceLayout* pPlaneLayouts;
- };
- static_assert( sizeof( ImageDrmFormatModifierExplicitCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierExplicitCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageDrmFormatModifierExplicitCreateInfoEXT : public layout::ImageDrmFormatModifierExplicitCreateInfoEXT
+ struct ImageDrmFormatModifierExplicitCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = 0,
- uint32_t drmFormatModifierPlaneCount_ = 0,
- const vk::SubresourceLayout* pPlaneLayouts_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierExplicitCreateInfoEXT( drmFormatModifier_, drmFormatModifierPlaneCount_, pPlaneLayouts_ )
+ VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = {},
+ uint32_t drmFormatModifierPlaneCount_ = {},
+ const VULKAN_HPP_NAMESPACE::SubresourceLayout* pPlaneLayouts_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifier( drmFormatModifier_ )
+ , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ )
+ , pPlaneLayouts( pPlaneLayouts_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT ) - offsetof( ImageDrmFormatModifierExplicitCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
ImageDrmFormatModifierExplicitCreateInfoEXT( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierExplicitCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageDrmFormatModifierExplicitCreateInfoEXT& operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageDrmFormatModifierExplicitCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -38975,7 +36516,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageDrmFormatModifierExplicitCreateInfoEXT & setPPlaneLayouts( const vk::SubresourceLayout* pPlaneLayouts_ ) VULKAN_HPP_NOEXCEPT
+ ImageDrmFormatModifierExplicitCreateInfoEXT & setPPlaneLayouts( const VULKAN_HPP_NAMESPACE::SubresourceLayout* pPlaneLayouts_ ) VULKAN_HPP_NOEXCEPT
{
pPlaneLayouts = pPlaneLayouts_;
return *this;
@@ -39005,57 +36546,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageDrmFormatModifierExplicitCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT;
+ const void* pNext = {};
+ uint64_t drmFormatModifier = {};
+ uint32_t drmFormatModifierPlaneCount = {};
+ const VULKAN_HPP_NAMESPACE::SubresourceLayout* pPlaneLayouts = {};
};
static_assert( sizeof( ImageDrmFormatModifierExplicitCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierExplicitCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageDrmFormatModifierExplicitCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageDrmFormatModifierListCreateInfoEXT
{
- struct ImageDrmFormatModifierListCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = 0,
- const uint64_t* pDrmFormatModifiers_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : drmFormatModifierCount( drmFormatModifierCount_ )
- , pDrmFormatModifiers( pDrmFormatModifiers_ )
- {}
-
- ImageDrmFormatModifierListCreateInfoEXT( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierListCreateInfoEXT*>(this) = rhs;
- }
-
- ImageDrmFormatModifierListCreateInfoEXT& operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierListCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageDrmFormatModifierListCreateInfoEXT;
- const void* pNext = nullptr;
- uint32_t drmFormatModifierCount;
- const uint64_t* pDrmFormatModifiers;
- };
- static_assert( sizeof( ImageDrmFormatModifierListCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierListCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageDrmFormatModifierListCreateInfoEXT : public layout::ImageDrmFormatModifierListCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = 0,
- const uint64_t* pDrmFormatModifiers_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierListCreateInfoEXT( drmFormatModifierCount_, pDrmFormatModifiers_ )
+ VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = {},
+ const uint64_t* pDrmFormatModifiers_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifierCount( drmFormatModifierCount_ )
+ , pDrmFormatModifiers( pDrmFormatModifiers_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT ) - offsetof( ImageDrmFormatModifierListCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
ImageDrmFormatModifierListCreateInfoEXT( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierListCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageDrmFormatModifierListCreateInfoEXT& operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageDrmFormatModifierListCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -39100,52 +36622,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageDrmFormatModifierListCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierListCreateInfoEXT;
+ const void* pNext = {};
+ uint32_t drmFormatModifierCount = {};
+ const uint64_t* pDrmFormatModifiers = {};
};
static_assert( sizeof( ImageDrmFormatModifierListCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierListCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageDrmFormatModifierListCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageDrmFormatModifierPropertiesEXT
{
- struct ImageDrmFormatModifierPropertiesEXT
- {
- protected:
- ImageDrmFormatModifierPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- ImageDrmFormatModifierPropertiesEXT( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>(this) = rhs;
- }
-
- ImageDrmFormatModifierPropertiesEXT& operator=( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageDrmFormatModifierPropertiesEXT;
- void* pNext = nullptr;
- uint64_t drmFormatModifier;
- };
- static_assert( sizeof( ImageDrmFormatModifierPropertiesEXT ) == sizeof( VkImageDrmFormatModifierPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageDrmFormatModifierPropertiesEXT : public layout::ImageDrmFormatModifierPropertiesEXT
- {
- ImageDrmFormatModifierPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierPropertiesEXT()
+ ImageDrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifier( drmFormatModifier_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT ) - offsetof( ImageDrmFormatModifierPropertiesEXT, pNext ) );
+ return *this;
+ }
+
ImageDrmFormatModifierPropertiesEXT( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageDrmFormatModifierPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageDrmFormatModifierPropertiesEXT& operator=( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageDrmFormatModifierPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT const *>(&rhs);
return *this;
}
@@ -39171,89 +36676,68 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageDrmFormatModifierPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierPropertiesEXT;
+ void* pNext = {};
+ uint64_t drmFormatModifier = {};
};
static_assert( sizeof( ImageDrmFormatModifierPropertiesEXT ) == sizeof( VkImageDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageDrmFormatModifierPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageFormatListCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfoKHR( uint32_t viewFormatCount_ = 0,
- const vk::Format* pViewFormats_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : viewFormatCount( viewFormatCount_ )
- , pViewFormats( pViewFormats_ )
- {}
-
- ImageFormatListCreateInfoKHR( VkImageFormatListCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageFormatListCreateInfoKHR*>(this) = rhs;
- }
-
- ImageFormatListCreateInfoKHR& operator=( VkImageFormatListCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageFormatListCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageFormatListCreateInfoKHR;
- const void* pNext = nullptr;
- uint32_t viewFormatCount;
- const vk::Format* pViewFormats;
- };
- static_assert( sizeof( ImageFormatListCreateInfoKHR ) == sizeof( VkImageFormatListCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageFormatListCreateInfoKHR : public layout::ImageFormatListCreateInfoKHR
+ struct ImageFormatListCreateInfo
{
- VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfoKHR( uint32_t viewFormatCount_ = 0,
- const vk::Format* pViewFormats_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImageFormatListCreateInfoKHR( viewFormatCount_, pViewFormats_ )
+ VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfo( uint32_t viewFormatCount_ = {},
+ const VULKAN_HPP_NAMESPACE::Format* pViewFormats_ = {} ) VULKAN_HPP_NOEXCEPT
+ : viewFormatCount( viewFormatCount_ )
+ , pViewFormats( pViewFormats_ )
{}
- ImageFormatListCreateInfoKHR( VkImageFormatListCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageFormatListCreateInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo ) - offsetof( ImageFormatListCreateInfo, pNext ) );
+ return *this;
+ }
- ImageFormatListCreateInfoKHR& operator=( VkImageFormatListCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ ImageFormatListCreateInfo( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageFormatListCreateInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ ImageFormatListCreateInfo& operator=( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo const *>(&rhs);
return *this;
}
- ImageFormatListCreateInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ ImageFormatListCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- ImageFormatListCreateInfoKHR & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT
+ ImageFormatListCreateInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT
{
viewFormatCount = viewFormatCount_;
return *this;
}
- ImageFormatListCreateInfoKHR & setPViewFormats( const vk::Format* pViewFormats_ ) VULKAN_HPP_NOEXCEPT
+ ImageFormatListCreateInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format* pViewFormats_ ) VULKAN_HPP_NOEXCEPT
{
pViewFormats = pViewFormats_;
return *this;
}
- operator VkImageFormatListCreateInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkImageFormatListCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkImageFormatListCreateInfoKHR*>( this );
+ return *reinterpret_cast<const VkImageFormatListCreateInfo*>( this );
}
- operator VkImageFormatListCreateInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkImageFormatListCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkImageFormatListCreateInfoKHR*>( this );
+ return *reinterpret_cast<VkImageFormatListCreateInfo*>( this );
}
- bool operator==( ImageFormatListCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( ImageFormatListCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -39261,57 +36745,40 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pViewFormats == rhs.pViewFormats );
}
- bool operator!=( ImageFormatListCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( ImageFormatListCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::ImageFormatListCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatListCreateInfo;
+ const void* pNext = {};
+ uint32_t viewFormatCount = {};
+ const VULKAN_HPP_NAMESPACE::Format* pViewFormats = {};
};
- static_assert( sizeof( ImageFormatListCreateInfoKHR ) == sizeof( VkImageFormatListCreateInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<ImageFormatListCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct ImageFormatProperties2
- {
- protected:
- ImageFormatProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- ImageFormatProperties2( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageFormatProperties2*>(this) = rhs;
- }
-
- ImageFormatProperties2& operator=( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageFormatProperties2*>(this) = rhs;
- return *this;
- }
+ static_assert( sizeof( ImageFormatListCreateInfo ) == sizeof( VkImageFormatListCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<ImageFormatListCreateInfo>::value, "struct wrapper is not a standard layout!" );
- public:
- vk::StructureType sType = StructureType::eImageFormatProperties2;
- void* pNext = nullptr;
- vk::ImageFormatProperties imageFormatProperties;
- };
- static_assert( sizeof( ImageFormatProperties2 ) == sizeof( VkImageFormatProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageFormatProperties2 : public layout::ImageFormatProperties2
+ struct ImageFormatProperties2
{
- ImageFormatProperties2() VULKAN_HPP_NOEXCEPT
- : layout::ImageFormatProperties2()
+ ImageFormatProperties2( VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : imageFormatProperties( imageFormatProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & operator=( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 ) - offsetof( ImageFormatProperties2, pNext ) );
+ return *this;
+ }
+
ImageFormatProperties2( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageFormatProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageFormatProperties2& operator=( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageFormatProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageFormatProperties2 const *>(&rhs);
return *this;
}
@@ -39337,19 +36804,21 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageFormatProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {};
};
static_assert( sizeof( ImageFormatProperties2 ) == sizeof( VkImageFormatProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageFormatProperties2>::value, "struct wrapper is not a standard layout!" );
struct ImageSubresourceRange
{
- VULKAN_HPP_CONSTEXPR ImageSubresourceRange( vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags(),
- uint32_t baseMipLevel_ = 0,
- uint32_t levelCount_ = 0,
- uint32_t baseArrayLayer_ = 0,
- uint32_t layerCount_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -39359,16 +36828,16 @@ namespace VULKAN_HPP_NAMESPACE
ImageSubresourceRange( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresourceRange*>(this) = rhs;
+ *this = rhs;
}
ImageSubresourceRange& operator=( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageSubresourceRange*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageSubresourceRange const *>(&rhs);
return *this;
}
- ImageSubresourceRange & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ ImageSubresourceRange & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
@@ -39423,84 +36892,49 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageAspectFlags aspectMask;
- uint32_t baseMipLevel;
- uint32_t levelCount;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
+ uint32_t baseMipLevel = {};
+ uint32_t levelCount = {};
+ uint32_t baseArrayLayer = {};
+ uint32_t layerCount = {};
};
static_assert( sizeof( ImageSubresourceRange ) == sizeof( VkImageSubresourceRange ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageSubresourceRange>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageMemoryBarrier
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- vk::ImageLayout oldLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout newLayout_ = vk::ImageLayout::eUndefined,
- uint32_t srcQueueFamilyIndex_ = 0,
- uint32_t dstQueueFamilyIndex_ = 0,
- vk::Image image_ = vk::Image(),
- vk::ImageSubresourceRange subresourceRange_ = vk::ImageSubresourceRange() ) VULKAN_HPP_NOEXCEPT
- : srcAccessMask( srcAccessMask_ )
- , dstAccessMask( dstAccessMask_ )
- , oldLayout( oldLayout_ )
- , newLayout( newLayout_ )
- , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
- , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
- , image( image_ )
- , subresourceRange( subresourceRange_ )
- {}
-
- ImageMemoryBarrier( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageMemoryBarrier*>(this) = rhs;
- }
-
- ImageMemoryBarrier& operator=( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageMemoryBarrier*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageMemoryBarrier;
- const void* pNext = nullptr;
- vk::AccessFlags srcAccessMask;
- vk::AccessFlags dstAccessMask;
- vk::ImageLayout oldLayout;
- vk::ImageLayout newLayout;
- uint32_t srcQueueFamilyIndex;
- uint32_t dstQueueFamilyIndex;
- vk::Image image;
- vk::ImageSubresourceRange subresourceRange;
- };
- static_assert( sizeof( ImageMemoryBarrier ) == sizeof( VkImageMemoryBarrier ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageMemoryBarrier : public layout::ImageMemoryBarrier
- {
- VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- vk::ImageLayout oldLayout_ = vk::ImageLayout::eUndefined,
- vk::ImageLayout newLayout_ = vk::ImageLayout::eUndefined,
- uint32_t srcQueueFamilyIndex_ = 0,
- uint32_t dstQueueFamilyIndex_ = 0,
- vk::Image image_ = vk::Image(),
- vk::ImageSubresourceRange subresourceRange_ = vk::ImageSubresourceRange() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageMemoryBarrier( srcAccessMask_, dstAccessMask_, oldLayout_, newLayout_, srcQueueFamilyIndex_, dstQueueFamilyIndex_, image_, subresourceRange_ )
+ struct ImageMemoryBarrier
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , oldLayout( oldLayout_ )
+ , newLayout( newLayout_ )
+ , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
+ , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
+ , image( image_ )
+ , subresourceRange( subresourceRange_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageMemoryBarrier & operator=( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier ) - offsetof( ImageMemoryBarrier, pNext ) );
+ return *this;
+ }
+
ImageMemoryBarrier( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageMemoryBarrier( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageMemoryBarrier& operator=( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageMemoryBarrier::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageMemoryBarrier const *>(&rhs);
return *this;
}
@@ -39510,25 +36944,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageMemoryBarrier & setSrcAccessMask( vk::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
srcAccessMask = srcAccessMask_;
return *this;
}
- ImageMemoryBarrier & setDstAccessMask( vk::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
dstAccessMask = dstAccessMask_;
return *this;
}
- ImageMemoryBarrier & setOldLayout( vk::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT
{
oldLayout = oldLayout_;
return *this;
}
- ImageMemoryBarrier & setNewLayout( vk::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT
{
newLayout = newLayout_;
return *this;
@@ -39546,13 +36980,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageMemoryBarrier & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
}
- ImageMemoryBarrier & setSubresourceRange( vk::ImageSubresourceRange subresourceRange_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryBarrier & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ ) VULKAN_HPP_NOEXCEPT
{
subresourceRange = subresourceRange_;
return *this;
@@ -39587,53 +37021,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageMemoryBarrier::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImageMemoryBarrier ) == sizeof( VkImageMemoryBarrier ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageMemoryBarrier>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageMemoryRequirementsInfo2
{
- struct ImageMemoryRequirementsInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( vk::Image image_ = vk::Image() ) VULKAN_HPP_NOEXCEPT
- : image( image_ )
- {}
-
- ImageMemoryRequirementsInfo2( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageMemoryRequirementsInfo2*>(this) = rhs;
- }
-
- ImageMemoryRequirementsInfo2& operator=( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageMemoryRequirementsInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageMemoryRequirementsInfo2;
- const void* pNext = nullptr;
- vk::Image image;
- };
- static_assert( sizeof( ImageMemoryRequirementsInfo2 ) == sizeof( VkImageMemoryRequirementsInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageMemoryRequirementsInfo2 : public layout::ImageMemoryRequirementsInfo2
- {
- VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( vk::Image image_ = vk::Image() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageMemoryRequirementsInfo2( image_ )
+ VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {} ) VULKAN_HPP_NOEXCEPT
+ : image( image_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & operator=( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 ) - offsetof( ImageMemoryRequirementsInfo2, pNext ) );
+ return *this;
+ }
+
ImageMemoryRequirementsInfo2( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageMemoryRequirementsInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageMemoryRequirementsInfo2& operator=( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageMemoryRequirementsInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 const *>(&rhs);
return *this;
}
@@ -39643,7 +37065,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageMemoryRequirementsInfo2 & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ ImageMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
@@ -39671,59 +37093,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageMemoryRequirementsInfo2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryRequirementsInfo2;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Image image = {};
};
static_assert( sizeof( ImageMemoryRequirementsInfo2 ) == sizeof( VkImageMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageMemoryRequirementsInfo2>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_FUCHSIA
- namespace layout
+ struct ImagePipeSurfaceCreateInfoFUCHSIA
{
- struct ImagePipeSurfaceCreateInfoFUCHSIA
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( vk::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = vk::ImagePipeSurfaceCreateFlagsFUCHSIA(),
- zx_handle_t imagePipeHandle_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , imagePipeHandle( imagePipeHandle_ )
- {}
-
- ImagePipeSurfaceCreateInfoFUCHSIA( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImagePipeSurfaceCreateInfoFUCHSIA*>(this) = rhs;
- }
-
- ImagePipeSurfaceCreateInfoFUCHSIA& operator=( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImagePipeSurfaceCreateInfoFUCHSIA*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA;
- const void* pNext = nullptr;
- vk::ImagePipeSurfaceCreateFlagsFUCHSIA flags;
- zx_handle_t imagePipeHandle;
- };
- static_assert( sizeof( ImagePipeSurfaceCreateInfoFUCHSIA ) == sizeof( VkImagePipeSurfaceCreateInfoFUCHSIA ), "layout struct and wrapper have different size!" );
- }
-
- struct ImagePipeSurfaceCreateInfoFUCHSIA : public layout::ImagePipeSurfaceCreateInfoFUCHSIA
- {
- VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( vk::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = vk::ImagePipeSurfaceCreateFlagsFUCHSIA(),
- zx_handle_t imagePipeHandle_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ImagePipeSurfaceCreateInfoFUCHSIA( flags_, imagePipeHandle_ )
+ VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = {},
+ zx_handle_t imagePipeHandle_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , imagePipeHandle( imagePipeHandle_ )
{}
+ VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & operator=( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA ) - offsetof( ImagePipeSurfaceCreateInfoFUCHSIA, pNext ) );
+ return *this;
+ }
+
ImagePipeSurfaceCreateInfoFUCHSIA( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImagePipeSurfaceCreateInfoFUCHSIA( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImagePipeSurfaceCreateInfoFUCHSIA& operator=( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImagePipeSurfaceCreateInfoFUCHSIA::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const *>(&rhs);
return *this;
}
@@ -39733,7 +37134,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImagePipeSurfaceCreateInfoFUCHSIA & setFlags( vk::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT
+ ImagePipeSurfaceCreateInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -39768,54 +37169,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImagePipeSurfaceCreateInfoFUCHSIA::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags = {};
+ zx_handle_t imagePipeHandle = {};
};
static_assert( sizeof( ImagePipeSurfaceCreateInfoFUCHSIA ) == sizeof( VkImagePipeSurfaceCreateInfoFUCHSIA ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImagePipeSurfaceCreateInfoFUCHSIA>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- namespace layout
+ struct ImagePlaneMemoryRequirementsInfo
{
- struct ImagePlaneMemoryRequirementsInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( vk::ImageAspectFlagBits planeAspect_ = vk::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
- : planeAspect( planeAspect_ )
- {}
-
- ImagePlaneMemoryRequirementsInfo( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(this) = rhs;
- }
-
- ImagePlaneMemoryRequirementsInfo& operator=( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfo;
- const void* pNext = nullptr;
- vk::ImageAspectFlagBits planeAspect;
- };
- static_assert( sizeof( ImagePlaneMemoryRequirementsInfo ) == sizeof( VkImagePlaneMemoryRequirementsInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ImagePlaneMemoryRequirementsInfo : public layout::ImagePlaneMemoryRequirementsInfo
- {
- VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( vk::ImageAspectFlagBits planeAspect_ = vk::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
- : layout::ImagePlaneMemoryRequirementsInfo( planeAspect_ )
+ VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor ) VULKAN_HPP_NOEXCEPT
+ : planeAspect( planeAspect_ )
{}
+ VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo & operator=( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo ) - offsetof( ImagePlaneMemoryRequirementsInfo, pNext ) );
+ return *this;
+ }
+
ImagePlaneMemoryRequirementsInfo( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImagePlaneMemoryRequirementsInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImagePlaneMemoryRequirementsInfo& operator=( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImagePlaneMemoryRequirementsInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo const *>(&rhs);
return *this;
}
@@ -39825,7 +37208,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImagePlaneMemoryRequirementsInfo & setPlaneAspect( vk::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT
+ ImagePlaneMemoryRequirementsInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT
{
planeAspect = planeAspect_;
return *this;
@@ -39845,7 +37228,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( planeAspect, rhs.planeAspect );
+ && ( planeAspect == rhs.planeAspect );
}
bool operator!=( ImagePlaneMemoryRequirementsInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -39853,19 +37236,21 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImagePlaneMemoryRequirementsInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor;
};
static_assert( sizeof( ImagePlaneMemoryRequirementsInfo ) == sizeof( VkImagePlaneMemoryRequirementsInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImagePlaneMemoryRequirementsInfo>::value, "struct wrapper is not a standard layout!" );
struct ImageResolve
{
- VULKAN_HPP_CONSTEXPR ImageResolve( vk::ImageSubresourceLayers srcSubresource_ = vk::ImageSubresourceLayers(),
- vk::Offset3D srcOffset_ = vk::Offset3D(),
- vk::ImageSubresourceLayers dstSubresource_ = vk::ImageSubresourceLayers(),
- vk::Offset3D dstOffset_ = vk::Offset3D(),
- vk::Extent3D extent_ = vk::Extent3D() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -39875,40 +37260,40 @@ namespace VULKAN_HPP_NAMESPACE
ImageResolve( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageResolve*>(this) = rhs;
+ *this = rhs;
}
ImageResolve& operator=( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkImageResolve*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageResolve const *>(&rhs);
return *this;
}
- ImageResolve & setSrcSubresource( vk::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageResolve & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
srcSubresource = srcSubresource_;
return *this;
}
- ImageResolve & setSrcOffset( vk::Offset3D srcOffset_ ) VULKAN_HPP_NOEXCEPT
+ ImageResolve & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ ) VULKAN_HPP_NOEXCEPT
{
srcOffset = srcOffset_;
return *this;
}
- ImageResolve & setDstSubresource( vk::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
+ ImageResolve & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ ) VULKAN_HPP_NOEXCEPT
{
dstSubresource = dstSubresource_;
return *this;
}
- ImageResolve & setDstOffset( vk::Offset3D dstOffset_ ) VULKAN_HPP_NOEXCEPT
+ ImageResolve & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ ) VULKAN_HPP_NOEXCEPT
{
dstOffset = dstOffset_;
return *this;
}
- ImageResolve & setExtent( vk::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
+ ImageResolve & setExtent( VULKAN_HPP_NAMESPACE::Extent3D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
@@ -39939,56 +37324,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageSubresourceLayers srcSubresource;
- vk::Offset3D srcOffset;
- vk::ImageSubresourceLayers dstSubresource;
- vk::Offset3D dstOffset;
- vk::Extent3D extent;
+ 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 = {};
};
static_assert( sizeof( ImageResolve ) == sizeof( VkImageResolve ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageResolve>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageSparseMemoryRequirementsInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( vk::Image image_ = vk::Image() ) VULKAN_HPP_NOEXCEPT
- : image( image_ )
- {}
-
- ImageSparseMemoryRequirementsInfo2( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageSparseMemoryRequirementsInfo2*>(this) = rhs;
- }
-
- ImageSparseMemoryRequirementsInfo2& operator=( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageSparseMemoryRequirementsInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2;
- const void* pNext = nullptr;
- vk::Image image;
- };
- static_assert( sizeof( ImageSparseMemoryRequirementsInfo2 ) == sizeof( VkImageSparseMemoryRequirementsInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageSparseMemoryRequirementsInfo2 : public layout::ImageSparseMemoryRequirementsInfo2
+ struct ImageSparseMemoryRequirementsInfo2
{
- VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( vk::Image image_ = vk::Image() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageSparseMemoryRequirementsInfo2( image_ )
+ VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {} ) VULKAN_HPP_NOEXCEPT
+ : image( image_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & operator=( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 ) - offsetof( ImageSparseMemoryRequirementsInfo2, pNext ) );
+ return *this;
+ }
+
ImageSparseMemoryRequirementsInfo2( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageSparseMemoryRequirementsInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageSparseMemoryRequirementsInfo2& operator=( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageSparseMemoryRequirementsInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 const *>(&rhs);
return *this;
}
@@ -39998,7 +37362,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageSparseMemoryRequirementsInfo2 & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ ImageSparseMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
@@ -40026,137 +37390,99 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageSparseMemoryRequirementsInfo2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Image image = {};
};
static_assert( sizeof( ImageSparseMemoryRequirementsInfo2 ) == sizeof( VkImageSparseMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageSparseMemoryRequirementsInfo2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageStencilUsageCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfoEXT( vk::ImageUsageFlags stencilUsage_ = vk::ImageUsageFlags() ) VULKAN_HPP_NOEXCEPT
- : stencilUsage( stencilUsage_ )
- {}
-
- ImageStencilUsageCreateInfoEXT( VkImageStencilUsageCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageStencilUsageCreateInfoEXT*>(this) = rhs;
- }
-
- ImageStencilUsageCreateInfoEXT& operator=( VkImageStencilUsageCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageStencilUsageCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageStencilUsageCreateInfoEXT;
- const void* pNext = nullptr;
- vk::ImageUsageFlags stencilUsage;
- };
- static_assert( sizeof( ImageStencilUsageCreateInfoEXT ) == sizeof( VkImageStencilUsageCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageStencilUsageCreateInfoEXT : public layout::ImageStencilUsageCreateInfoEXT
+ struct ImageStencilUsageCreateInfo
{
- VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfoEXT( vk::ImageUsageFlags stencilUsage_ = vk::ImageUsageFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageStencilUsageCreateInfoEXT( stencilUsage_ )
+ VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ = {} ) VULKAN_HPP_NOEXCEPT
+ : stencilUsage( stencilUsage_ )
{}
- ImageStencilUsageCreateInfoEXT( VkImageStencilUsageCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageStencilUsageCreateInfoEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo ) - offsetof( ImageStencilUsageCreateInfo, pNext ) );
+ return *this;
+ }
+
+ ImageStencilUsageCreateInfo( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- ImageStencilUsageCreateInfoEXT& operator=( VkImageStencilUsageCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ ImageStencilUsageCreateInfo& operator=( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageStencilUsageCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo const *>(&rhs);
return *this;
}
- ImageStencilUsageCreateInfoEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ ImageStencilUsageCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- ImageStencilUsageCreateInfoEXT & setStencilUsage( vk::ImageUsageFlags stencilUsage_ ) VULKAN_HPP_NOEXCEPT
+ ImageStencilUsageCreateInfo & setStencilUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ ) VULKAN_HPP_NOEXCEPT
{
stencilUsage = stencilUsage_;
return *this;
}
- operator VkImageStencilUsageCreateInfoEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkImageStencilUsageCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkImageStencilUsageCreateInfoEXT*>( this );
+ return *reinterpret_cast<const VkImageStencilUsageCreateInfo*>( this );
}
- operator VkImageStencilUsageCreateInfoEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkImageStencilUsageCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkImageStencilUsageCreateInfoEXT*>( this );
+ return *reinterpret_cast<VkImageStencilUsageCreateInfo*>( this );
}
- bool operator==( ImageStencilUsageCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( ImageStencilUsageCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( stencilUsage == rhs.stencilUsage );
}
- bool operator!=( ImageStencilUsageCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( ImageStencilUsageCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::ImageStencilUsageCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageStencilUsageCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage = {};
};
- static_assert( sizeof( ImageStencilUsageCreateInfoEXT ) == sizeof( VkImageStencilUsageCreateInfoEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<ImageStencilUsageCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( ImageStencilUsageCreateInfo ) == sizeof( VkImageStencilUsageCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<ImageStencilUsageCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageSwapchainCreateInfoKHR
{
- struct ImageSwapchainCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR() ) VULKAN_HPP_NOEXCEPT
- : swapchain( swapchain_ )
- {}
-
- ImageSwapchainCreateInfoKHR( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(this) = rhs;
- }
-
- ImageSwapchainCreateInfoKHR& operator=( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageSwapchainCreateInfoKHR;
- const void* pNext = nullptr;
- vk::SwapchainKHR swapchain;
- };
- static_assert( sizeof( ImageSwapchainCreateInfoKHR ) == sizeof( VkImageSwapchainCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageSwapchainCreateInfoKHR : public layout::ImageSwapchainCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( vk::SwapchainKHR swapchain_ = vk::SwapchainKHR() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageSwapchainCreateInfoKHR( swapchain_ )
+ VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchain( swapchain_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR ) - offsetof( ImageSwapchainCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
ImageSwapchainCreateInfoKHR( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageSwapchainCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageSwapchainCreateInfoKHR& operator=( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageSwapchainCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -40166,7 +37492,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageSwapchainCreateInfoKHR & setSwapchain( vk::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
+ ImageSwapchainCreateInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT
{
swapchain = swapchain_;
return *this;
@@ -40194,53 +37520,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageSwapchainCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSwapchainCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {};
};
static_assert( sizeof( ImageSwapchainCreateInfoKHR ) == sizeof( VkImageSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageSwapchainCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageViewASTCDecodeModeEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( vk::Format decodeMode_ = vk::Format::eUndefined ) VULKAN_HPP_NOEXCEPT
- : decodeMode( decodeMode_ )
- {}
-
- ImageViewASTCDecodeModeEXT( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewASTCDecodeModeEXT*>(this) = rhs;
- }
-
- ImageViewASTCDecodeModeEXT& operator=( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewASTCDecodeModeEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageViewAstcDecodeModeEXT;
- const void* pNext = nullptr;
- vk::Format decodeMode;
- };
- static_assert( sizeof( ImageViewASTCDecodeModeEXT ) == sizeof( VkImageViewASTCDecodeModeEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageViewASTCDecodeModeEXT : public layout::ImageViewASTCDecodeModeEXT
+ struct ImageViewASTCDecodeModeEXT
{
- VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( vk::Format decodeMode_ = vk::Format::eUndefined ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewASTCDecodeModeEXT( decodeMode_ )
+ VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( VULKAN_HPP_NAMESPACE::Format decodeMode_ = VULKAN_HPP_NAMESPACE::Format::eUndefined ) VULKAN_HPP_NOEXCEPT
+ : decodeMode( decodeMode_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT & operator=( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT ) - offsetof( ImageViewASTCDecodeModeEXT, pNext ) );
+ return *this;
+ }
+
ImageViewASTCDecodeModeEXT( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewASTCDecodeModeEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageViewASTCDecodeModeEXT& operator=( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageViewASTCDecodeModeEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT const *>(&rhs);
return *this;
}
@@ -40250,7 +37557,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageViewASTCDecodeModeEXT & setDecodeMode( vk::Format decodeMode_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewASTCDecodeModeEXT & setDecodeMode( VULKAN_HPP_NAMESPACE::Format decodeMode_ ) VULKAN_HPP_NOEXCEPT
{
decodeMode = decodeMode_;
return *this;
@@ -40278,73 +37585,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageViewASTCDecodeModeEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewAstcDecodeModeEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Format decodeMode = VULKAN_HPP_NAMESPACE::Format::eUndefined;
};
static_assert( sizeof( ImageViewASTCDecodeModeEXT ) == sizeof( VkImageViewASTCDecodeModeEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageViewASTCDecodeModeEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ImageViewCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( vk::ImageViewCreateFlags flags_ = vk::ImageViewCreateFlags(),
- vk::Image image_ = vk::Image(),
- vk::ImageViewType viewType_ = vk::ImageViewType::e1D,
- vk::Format format_ = vk::Format::eUndefined,
- vk::ComponentMapping components_ = vk::ComponentMapping(),
- vk::ImageSubresourceRange subresourceRange_ = vk::ImageSubresourceRange() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , image( image_ )
- , viewType( viewType_ )
- , format( format_ )
- , components( components_ )
- , subresourceRange( subresourceRange_ )
- {}
-
- ImageViewCreateInfo( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewCreateInfo*>(this) = rhs;
- }
-
- ImageViewCreateInfo& operator=( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageViewCreateInfo;
- const void* pNext = nullptr;
- vk::ImageViewCreateFlags flags;
- vk::Image image;
- vk::ImageViewType viewType;
- vk::Format format;
- vk::ComponentMapping components;
- vk::ImageSubresourceRange subresourceRange;
- };
- static_assert( sizeof( ImageViewCreateInfo ) == sizeof( VkImageViewCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageViewCreateInfo : public layout::ImageViewCreateInfo
+ struct ImageViewCreateInfo
{
- VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( vk::ImageViewCreateFlags flags_ = vk::ImageViewCreateFlags(),
- vk::Image image_ = vk::Image(),
- vk::ImageViewType viewType_ = vk::ImageViewType::e1D,
- vk::Format format_ = vk::Format::eUndefined,
- vk::ComponentMapping components_ = vk::ComponentMapping(),
- vk::ImageSubresourceRange subresourceRange_ = vk::ImageSubresourceRange() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewCreateInfo( flags_, image_, viewType_, format_, components_, subresourceRange_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , image( image_ )
+ , viewType( viewType_ )
+ , format( format_ )
+ , components( components_ )
+ , subresourceRange( subresourceRange_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo ) - offsetof( ImageViewCreateInfo, pNext ) );
+ return *this;
+ }
+
ImageViewCreateInfo( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageViewCreateInfo& operator=( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageViewCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const *>(&rhs);
return *this;
}
@@ -40354,37 +37632,37 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageViewCreateInfo & setFlags( vk::ImageViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImageViewCreateInfo & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
}
- ImageViewCreateInfo & setViewType( vk::ImageViewType viewType_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setViewType( VULKAN_HPP_NAMESPACE::ImageViewType viewType_ ) VULKAN_HPP_NOEXCEPT
{
viewType = viewType_;
return *this;
}
- ImageViewCreateInfo & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- ImageViewCreateInfo & setComponents( vk::ComponentMapping components_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping components_ ) VULKAN_HPP_NOEXCEPT
{
components = components_;
return *this;
}
- ImageViewCreateInfo & setSubresourceRange( vk::ImageSubresourceRange subresourceRange_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewCreateInfo & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ ) VULKAN_HPP_NOEXCEPT
{
subresourceRange = subresourceRange_;
return *this;
@@ -40417,61 +37695,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageViewCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImageViewCreateInfo ) == sizeof( VkImageViewCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageViewCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageViewHandleInfoNVX
{
- struct ImageViewHandleInfoNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( vk::ImageView imageView_ = vk::ImageView(),
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- vk::Sampler sampler_ = vk::Sampler() ) VULKAN_HPP_NOEXCEPT
- : imageView( imageView_ )
- , descriptorType( descriptorType_ )
- , sampler( sampler_ )
- {}
-
- ImageViewHandleInfoNVX( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewHandleInfoNVX*>(this) = rhs;
- }
-
- ImageViewHandleInfoNVX& operator=( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewHandleInfoNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageViewHandleInfoNVX;
- const void* pNext = nullptr;
- vk::ImageView imageView;
- vk::DescriptorType descriptorType;
- vk::Sampler sampler;
- };
- static_assert( sizeof( ImageViewHandleInfoNVX ) == sizeof( VkImageViewHandleInfoNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageViewHandleInfoNVX : public layout::ImageViewHandleInfoNVX
- {
- VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( vk::ImageView imageView_ = vk::ImageView(),
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- vk::Sampler sampler_ = vk::Sampler() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewHandleInfoNVX( imageView_, descriptorType_, sampler_ )
+ VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {},
+ VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler,
+ VULKAN_HPP_NAMESPACE::Sampler sampler_ = {} ) VULKAN_HPP_NOEXCEPT
+ : imageView( imageView_ )
+ , descriptorType( descriptorType_ )
+ , sampler( sampler_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & operator=( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX ) - offsetof( ImageViewHandleInfoNVX, pNext ) );
+ return *this;
+ }
+
ImageViewHandleInfoNVX( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewHandleInfoNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageViewHandleInfoNVX& operator=( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageViewHandleInfoNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX const *>(&rhs);
return *this;
}
@@ -40481,19 +37741,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageViewHandleInfoNVX & setImageView( vk::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewHandleInfoNVX & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT
{
imageView = imageView_;
return *this;
}
- ImageViewHandleInfoNVX & setDescriptorType( vk::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewHandleInfoNVX & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
{
descriptorType = descriptorType_;
return *this;
}
- ImageViewHandleInfoNVX & setSampler( vk::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewHandleInfoNVX & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT
{
sampler = sampler_;
return *this;
@@ -40523,53 +37783,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageViewHandleInfoNVX::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImageViewHandleInfoNVX ) == sizeof( VkImageViewHandleInfoNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageViewHandleInfoNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImageViewUsageCreateInfo
{
- struct ImageViewUsageCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( vk::ImageUsageFlags usage_ = vk::ImageUsageFlags() ) VULKAN_HPP_NOEXCEPT
- : usage( usage_ )
- {}
-
- ImageViewUsageCreateInfo( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewUsageCreateInfo*>(this) = rhs;
- }
-
- ImageViewUsageCreateInfo& operator=( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImageViewUsageCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImageViewUsageCreateInfo;
- const void* pNext = nullptr;
- vk::ImageUsageFlags usage;
- };
- static_assert( sizeof( ImageViewUsageCreateInfo ) == sizeof( VkImageViewUsageCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ImageViewUsageCreateInfo : public layout::ImageViewUsageCreateInfo
- {
- VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( vk::ImageUsageFlags usage_ = vk::ImageUsageFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewUsageCreateInfo( usage_ )
+ VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {} ) VULKAN_HPP_NOEXCEPT
+ : usage( usage_ )
{}
+ VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo ) - offsetof( ImageViewUsageCreateInfo, pNext ) );
+ return *this;
+ }
+
ImageViewUsageCreateInfo( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImageViewUsageCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImageViewUsageCreateInfo& operator=( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImageViewUsageCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo const *>(&rhs);
return *this;
}
@@ -40579,7 +37822,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImageViewUsageCreateInfo & setUsage( vk::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ ImageViewUsageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
@@ -40607,55 +37850,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImageViewUsageCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewUsageCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {};
};
static_assert( sizeof( ImageViewUsageCreateInfo ) == sizeof( VkImageViewUsageCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImageViewUsageCreateInfo>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
+ struct ImportAndroidHardwareBufferInfoANDROID
{
- struct ImportAndroidHardwareBufferInfoANDROID
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer* buffer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : buffer( buffer_ )
- {}
-
- ImportAndroidHardwareBufferInfoANDROID( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(this) = rhs;
- }
-
- ImportAndroidHardwareBufferInfoANDROID& operator=( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportAndroidHardwareBufferInfoANDROID;
- const void* pNext = nullptr;
- struct AHardwareBuffer* buffer;
- };
- static_assert( sizeof( ImportAndroidHardwareBufferInfoANDROID ) == sizeof( VkImportAndroidHardwareBufferInfoANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportAndroidHardwareBufferInfoANDROID : public layout::ImportAndroidHardwareBufferInfoANDROID
- {
- VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer* buffer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImportAndroidHardwareBufferInfoANDROID( buffer_ )
+ VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer* buffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : buffer( buffer_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID & operator=( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID ) - offsetof( ImportAndroidHardwareBufferInfoANDROID, pNext ) );
+ return *this;
+ }
+
ImportAndroidHardwareBufferInfoANDROID( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportAndroidHardwareBufferInfoANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportAndroidHardwareBufferInfoANDROID& operator=( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportAndroidHardwareBufferInfoANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID const *>(&rhs);
return *this;
}
@@ -40693,66 +37917,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportAndroidHardwareBufferInfoANDROID::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportAndroidHardwareBufferInfoANDROID;
+ const void* pNext = {};
+ struct AHardwareBuffer* buffer = {};
};
static_assert( sizeof( ImportAndroidHardwareBufferInfoANDROID ) == sizeof( VkImportAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportAndroidHardwareBufferInfoANDROID>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- namespace layout
- {
- struct ImportFenceFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::FenceImportFlags flags_ = vk::FenceImportFlags(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : fence( fence_ )
- , flags( flags_ )
- , handleType( handleType_ )
- , fd( fd_ )
- {}
-
- ImportFenceFdInfoKHR( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportFenceFdInfoKHR*>(this) = rhs;
- }
-
- ImportFenceFdInfoKHR& operator=( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportFenceFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportFenceFdInfoKHR;
- const void* pNext = nullptr;
- vk::Fence fence;
- vk::FenceImportFlags flags;
- vk::ExternalFenceHandleTypeFlagBits handleType;
- int fd;
- };
- static_assert( sizeof( ImportFenceFdInfoKHR ) == sizeof( VkImportFenceFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportFenceFdInfoKHR : public layout::ImportFenceFdInfoKHR
+ struct ImportFenceFdInfoKHR
{
- VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::FenceImportFlags flags_ = vk::FenceImportFlags(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ImportFenceFdInfoKHR( fence_, flags_, handleType_, fd_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fence( fence_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , fd( fd_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR ) - offsetof( ImportFenceFdInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportFenceFdInfoKHR( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportFenceFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportFenceFdInfoKHR& operator=( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportFenceFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR const *>(&rhs);
return *this;
}
@@ -40762,19 +37961,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportFenceFdInfoKHR & setFence( vk::Fence fence_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT
{
fence = fence_;
return *this;
}
- ImportFenceFdInfoKHR & setFlags( vk::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImportFenceFdInfoKHR & setHandleType( vk::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -40802,7 +38001,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( fence == rhs.fence )
&& ( flags == rhs.flags )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( fd == rhs.fd );
}
@@ -40811,71 +38010,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportFenceFdInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImportFenceFdInfoKHR ) == sizeof( VkImportFenceFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportFenceFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
+ struct ImportFenceWin32HandleInfoKHR
{
- struct ImportFenceWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::FenceImportFlags flags_ = vk::FenceImportFlags(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : fence( fence_ )
- , flags( flags_ )
- , handleType( handleType_ )
- , handle( handle_ )
- , name( name_ )
- {}
-
- ImportFenceWin32HandleInfoKHR( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportFenceWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ImportFenceWin32HandleInfoKHR& operator=( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportFenceWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::Fence fence;
- vk::FenceImportFlags flags;
- vk::ExternalFenceHandleTypeFlagBits handleType;
- HANDLE handle;
- LPCWSTR name;
- };
- static_assert( sizeof( ImportFenceWin32HandleInfoKHR ) == sizeof( VkImportFenceWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportFenceWin32HandleInfoKHR : public layout::ImportFenceWin32HandleInfoKHR
- {
- VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( vk::Fence fence_ = vk::Fence(),
- vk::FenceImportFlags flags_ = vk::FenceImportFlags(),
- vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImportFenceWin32HandleInfoKHR( fence_, flags_, handleType_, handle_, name_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fence( fence_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR ) - offsetof( ImportFenceWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportFenceWin32HandleInfoKHR( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportFenceWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportFenceWin32HandleInfoKHR& operator=( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportFenceWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -40885,19 +38060,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportFenceWin32HandleInfoKHR & setFence( vk::Fence fence_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT
{
fence = fence_;
return *this;
}
- ImportFenceWin32HandleInfoKHR & setFlags( vk::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImportFenceWin32HandleInfoKHR & setHandleType( vk::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportFenceWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -40931,7 +38106,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( fence == rhs.fence )
&& ( flags == rhs.flags )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( handle == rhs.handle )
&& ( name == rhs.name );
}
@@ -40941,58 +38116,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportFenceWin32HandleInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImportFenceWin32HandleInfoKHR ) == sizeof( VkImportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportFenceWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct ImportMemoryFdInfoKHR
{
- struct ImportMemoryFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- , fd( fd_ )
- {}
-
- ImportMemoryFdInfoKHR( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryFdInfoKHR*>(this) = rhs;
- }
-
- ImportMemoryFdInfoKHR& operator=( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportMemoryFdInfoKHR;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- int fd;
- };
- static_assert( sizeof( ImportMemoryFdInfoKHR ) == sizeof( VkImportMemoryFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportMemoryFdInfoKHR : public layout::ImportMemoryFdInfoKHR
- {
- VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryFdInfoKHR( handleType_, fd_ )
+ VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ int fd_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
+ , fd( fd_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR ) - offsetof( ImportMemoryFdInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportMemoryFdInfoKHR( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportMemoryFdInfoKHR& operator=( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportMemoryFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR const *>(&rhs);
return *this;
}
@@ -41002,7 +38160,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportMemoryFdInfoKHR & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportMemoryFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41028,7 +38186,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( fd == rhs.fd );
}
@@ -41037,57 +38195,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportMemoryFdInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryFdInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd;
+ int fd = {};
};
static_assert( sizeof( ImportMemoryFdInfoKHR ) == sizeof( VkImportMemoryFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportMemoryFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ImportMemoryHostPointerInfoEXT
{
- struct ImportMemoryHostPointerInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- void* pHostPointer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- , pHostPointer( pHostPointer_ )
- {}
-
- ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(this) = rhs;
- }
-
- ImportMemoryHostPointerInfoEXT& operator=( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- void* pHostPointer;
- };
- static_assert( sizeof( ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportMemoryHostPointerInfoEXT : public layout::ImportMemoryHostPointerInfoEXT
- {
- VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- void* pHostPointer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryHostPointerInfoEXT( handleType_, pHostPointer_ )
+ VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ void* pHostPointer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
+ , pHostPointer( pHostPointer_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT ) - offsetof( ImportMemoryHostPointerInfoEXT, pNext ) );
+ return *this;
+ }
+
ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryHostPointerInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportMemoryHostPointerInfoEXT& operator=( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportMemoryHostPointerInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT const *>(&rhs);
return *this;
}
@@ -41097,7 +38235,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportMemoryHostPointerInfoEXT & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportMemoryHostPointerInfoEXT & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41123,7 +38261,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( pHostPointer == rhs.pHostPointer );
}
@@ -41132,63 +38270,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportMemoryHostPointerInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd;
+ void* pHostPointer = {};
};
static_assert( sizeof( ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportMemoryHostPointerInfoEXT>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ImportMemoryWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- , handle( handle_ )
- , name( name_ )
- {}
-
- ImportMemoryWin32HandleInfoKHR( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ImportMemoryWin32HandleInfoKHR& operator=( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- HANDLE handle;
- LPCWSTR name;
- };
- static_assert( sizeof( ImportMemoryWin32HandleInfoKHR ) == sizeof( VkImportMemoryWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportMemoryWin32HandleInfoKHR : public layout::ImportMemoryWin32HandleInfoKHR
+ struct ImportMemoryWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryWin32HandleInfoKHR( handleType_, handle_, name_ )
+ VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ HANDLE handle_ = {},
+ LPCWSTR name_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR ) - offsetof( ImportMemoryWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportMemoryWin32HandleInfoKHR( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportMemoryWin32HandleInfoKHR& operator=( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportMemoryWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -41198,7 +38314,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportMemoryWin32HandleInfoKHR & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportMemoryWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41230,7 +38346,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( handle == rhs.handle )
&& ( name == rhs.name );
}
@@ -41240,8 +38356,12 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportMemoryWin32HandleInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd;
+ HANDLE handle = {};
+ LPCWSTR name = {};
};
static_assert( sizeof( ImportMemoryWin32HandleInfoKHR ) == sizeof( VkImportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportMemoryWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -41249,51 +38369,28 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ImportMemoryWin32HandleInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleType_ = vk::ExternalMemoryHandleTypeFlagsNV(),
- HANDLE handle_ = 0 ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- , handle( handle_ )
- {}
-
- ImportMemoryWin32HandleInfoNV( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(this) = rhs;
- }
-
- ImportMemoryWin32HandleInfoNV& operator=( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagsNV handleType;
- HANDLE handle;
- };
- static_assert( sizeof( ImportMemoryWin32HandleInfoNV ) == sizeof( VkImportMemoryWin32HandleInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportMemoryWin32HandleInfoNV : public layout::ImportMemoryWin32HandleInfoNV
+ struct ImportMemoryWin32HandleInfoNV
{
- VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( vk::ExternalMemoryHandleTypeFlagsNV handleType_ = vk::ExternalMemoryHandleTypeFlagsNV(),
- HANDLE handle_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryWin32HandleInfoNV( handleType_, handle_ )
+ VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ = {},
+ HANDLE handle_ = {} ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
+ , handle( handle_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV & operator=( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV ) - offsetof( ImportMemoryWin32HandleInfoNV, pNext ) );
+ return *this;
+ }
+
ImportMemoryWin32HandleInfoNV( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportMemoryWin32HandleInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportMemoryWin32HandleInfoNV& operator=( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportMemoryWin32HandleInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV const *>(&rhs);
return *this;
}
@@ -41303,7 +38400,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportMemoryWin32HandleInfoNV & setHandleType( vk::ExternalMemoryHandleTypeFlagsNV handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportMemoryWin32HandleInfoNV & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41338,66 +38435,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportMemoryWin32HandleInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType = {};
+ HANDLE handle = {};
};
static_assert( sizeof( ImportMemoryWin32HandleInfoNV ) == sizeof( VkImportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportMemoryWin32HandleInfoNV>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
- {
- struct ImportSemaphoreFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::SemaphoreImportFlags flags_ = vk::SemaphoreImportFlags(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : semaphore( semaphore_ )
- , flags( flags_ )
- , handleType( handleType_ )
- , fd( fd_ )
- {}
-
- ImportSemaphoreFdInfoKHR( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportSemaphoreFdInfoKHR*>(this) = rhs;
- }
-
- ImportSemaphoreFdInfoKHR& operator=( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportSemaphoreFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportSemaphoreFdInfoKHR;
- const void* pNext = nullptr;
- vk::Semaphore semaphore;
- vk::SemaphoreImportFlags flags;
- vk::ExternalSemaphoreHandleTypeFlagBits handleType;
- int fd;
- };
- static_assert( sizeof( ImportSemaphoreFdInfoKHR ) == sizeof( VkImportSemaphoreFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportSemaphoreFdInfoKHR : public layout::ImportSemaphoreFdInfoKHR
+ struct ImportSemaphoreFdInfoKHR
{
- VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::SemaphoreImportFlags flags_ = vk::SemaphoreImportFlags(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
- int fd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ImportSemaphoreFdInfoKHR( semaphore_, flags_, handleType_, fd_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : semaphore( semaphore_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , fd( fd_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR ) - offsetof( ImportSemaphoreFdInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportSemaphoreFdInfoKHR( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportSemaphoreFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportSemaphoreFdInfoKHR& operator=( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportSemaphoreFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR const *>(&rhs);
return *this;
}
@@ -41407,19 +38480,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportSemaphoreFdInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- ImportSemaphoreFdInfoKHR & setFlags( vk::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImportSemaphoreFdInfoKHR & setHandleType( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41447,7 +38520,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( semaphore == rhs.semaphore )
&& ( flags == rhs.flags )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( fd == rhs.fd );
}
@@ -41456,71 +38529,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportSemaphoreFdInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImportSemaphoreFdInfoKHR ) == sizeof( VkImportSemaphoreFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportSemaphoreFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct ImportSemaphoreWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::SemaphoreImportFlags flags_ = vk::SemaphoreImportFlags(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : semaphore( semaphore_ )
- , flags( flags_ )
- , handleType( handleType_ )
- , handle( handle_ )
- , name( name_ )
- {}
-
- ImportSemaphoreWin32HandleInfoKHR( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportSemaphoreWin32HandleInfoKHR*>(this) = rhs;
- }
-
- ImportSemaphoreWin32HandleInfoKHR& operator=( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkImportSemaphoreWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::Semaphore semaphore;
- vk::SemaphoreImportFlags flags;
- vk::ExternalSemaphoreHandleTypeFlagBits handleType;
- HANDLE handle;
- LPCWSTR name;
- };
- static_assert( sizeof( ImportSemaphoreWin32HandleInfoKHR ) == sizeof( VkImportSemaphoreWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct ImportSemaphoreWin32HandleInfoKHR : public layout::ImportSemaphoreWin32HandleInfoKHR
+ struct ImportSemaphoreWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::SemaphoreImportFlags flags_ = vk::SemaphoreImportFlags(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
- HANDLE handle_ = 0,
- LPCWSTR name_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ImportSemaphoreWin32HandleInfoKHR( semaphore_, flags_, handleType_, handle_, name_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : semaphore( semaphore_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
{}
+ VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR ) - offsetof( ImportSemaphoreWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
ImportSemaphoreWin32HandleInfoKHR( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ImportSemaphoreWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
ImportSemaphoreWin32HandleInfoKHR& operator=( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ImportSemaphoreWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -41530,19 +38579,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ImportSemaphoreWin32HandleInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- ImportSemaphoreWin32HandleInfoKHR & setFlags( vk::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ImportSemaphoreWin32HandleInfoKHR & setHandleType( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ ImportSemaphoreWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -41576,7 +38625,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( semaphore == rhs.semaphore )
&& ( flags == rhs.flags )
- && vk::operator==( handleType, rhs.handleType )
+ && ( handleType == rhs.handleType )
&& ( handle == rhs.handle )
&& ( name == rhs.name );
}
@@ -41586,8 +38635,14 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ImportSemaphoreWin32HandleInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ImportSemaphoreWin32HandleInfoKHR ) == sizeof( VkImportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ImportSemaphoreWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -41595,10 +38650,10 @@ namespace VULKAN_HPP_NAMESPACE
struct IndirectCommandsLayoutTokenNVX
{
- VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNVX( vk::IndirectCommandsTokenTypeNVX tokenType_ = vk::IndirectCommandsTokenTypeNVX::ePipeline,
- uint32_t bindingUnit_ = 0,
- uint32_t dynamicCount_ = 0,
- uint32_t divisor_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType_ = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX::ePipeline,
+ uint32_t bindingUnit_ = {},
+ uint32_t dynamicCount_ = {},
+ uint32_t divisor_ = {} ) VULKAN_HPP_NOEXCEPT
: tokenType( tokenType_ )
, bindingUnit( bindingUnit_ )
, dynamicCount( dynamicCount_ )
@@ -41607,16 +38662,16 @@ namespace VULKAN_HPP_NAMESPACE
IndirectCommandsLayoutTokenNVX( VkIndirectCommandsLayoutTokenNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkIndirectCommandsLayoutTokenNVX*>(this) = rhs;
+ *this = rhs;
}
IndirectCommandsLayoutTokenNVX& operator=( VkIndirectCommandsLayoutTokenNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkIndirectCommandsLayoutTokenNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNVX const *>(&rhs);
return *this;
}
- IndirectCommandsLayoutTokenNVX & setTokenType( vk::IndirectCommandsTokenTypeNVX tokenType_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsLayoutTokenNVX & setTokenType( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType_ ) VULKAN_HPP_NOEXCEPT
{
tokenType = tokenType_;
return *this;
@@ -41664,67 +38719,40 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::IndirectCommandsTokenTypeNVX tokenType;
- uint32_t bindingUnit;
- uint32_t dynamicCount;
- uint32_t divisor;
+ VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX tokenType = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNVX::ePipeline;
+ uint32_t bindingUnit = {};
+ uint32_t dynamicCount = {};
+ uint32_t divisor = {};
};
static_assert( sizeof( IndirectCommandsLayoutTokenNVX ) == sizeof( VkIndirectCommandsLayoutTokenNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<IndirectCommandsLayoutTokenNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct IndirectCommandsLayoutCreateInfoNVX
{
- struct IndirectCommandsLayoutCreateInfoNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNVX( vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- vk::IndirectCommandsLayoutUsageFlagsNVX flags_ = vk::IndirectCommandsLayoutUsageFlagsNVX(),
- uint32_t tokenCount_ = 0,
- const vk::IndirectCommandsLayoutTokenNVX* pTokens_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pipelineBindPoint( pipelineBindPoint_ )
- , flags( flags_ )
- , tokenCount( tokenCount_ )
- , pTokens( pTokens_ )
- {}
-
- IndirectCommandsLayoutCreateInfoNVX( VkIndirectCommandsLayoutCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkIndirectCommandsLayoutCreateInfoNVX*>(this) = rhs;
- }
-
- IndirectCommandsLayoutCreateInfoNVX& operator=( VkIndirectCommandsLayoutCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkIndirectCommandsLayoutCreateInfoNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNVX;
- const void* pNext = nullptr;
- vk::PipelineBindPoint pipelineBindPoint;
- vk::IndirectCommandsLayoutUsageFlagsNVX flags;
- uint32_t tokenCount;
- const vk::IndirectCommandsLayoutTokenNVX* pTokens;
- };
- static_assert( sizeof( IndirectCommandsLayoutCreateInfoNVX ) == sizeof( VkIndirectCommandsLayoutCreateInfoNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct IndirectCommandsLayoutCreateInfoNVX : public layout::IndirectCommandsLayoutCreateInfoNVX
- {
- VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNVX( vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- vk::IndirectCommandsLayoutUsageFlagsNVX flags_ = vk::IndirectCommandsLayoutUsageFlagsNVX(),
- uint32_t tokenCount_ = 0,
- const vk::IndirectCommandsLayoutTokenNVX* pTokens_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::IndirectCommandsLayoutCreateInfoNVX( pipelineBindPoint_, flags_, tokenCount_, pTokens_ )
+ VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNVX( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics,
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNVX flags_ = {},
+ uint32_t tokenCount_ = {},
+ const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNVX* pTokens_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pipelineBindPoint( pipelineBindPoint_ )
+ , flags( flags_ )
+ , tokenCount( tokenCount_ )
+ , pTokens( pTokens_ )
{}
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX & operator=( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX ) - offsetof( IndirectCommandsLayoutCreateInfoNVX, pNext ) );
+ return *this;
+ }
+
IndirectCommandsLayoutCreateInfoNVX( VkIndirectCommandsLayoutCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::IndirectCommandsLayoutCreateInfoNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
IndirectCommandsLayoutCreateInfoNVX& operator=( VkIndirectCommandsLayoutCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::IndirectCommandsLayoutCreateInfoNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX const *>(&rhs);
return *this;
}
@@ -41734,13 +38762,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- IndirectCommandsLayoutCreateInfoNVX & setPipelineBindPoint( vk::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsLayoutCreateInfoNVX & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
{
pipelineBindPoint = pipelineBindPoint_;
return *this;
}
- IndirectCommandsLayoutCreateInfoNVX & setFlags( vk::IndirectCommandsLayoutUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsLayoutCreateInfoNVX & setFlags( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -41752,7 +38780,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- IndirectCommandsLayoutCreateInfoNVX & setPTokens( const vk::IndirectCommandsLayoutTokenNVX* pTokens_ ) VULKAN_HPP_NOEXCEPT
+ IndirectCommandsLayoutCreateInfoNVX & setPTokens( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNVX* pTokens_ ) VULKAN_HPP_NOEXCEPT
{
pTokens = pTokens_;
return *this;
@@ -41783,53 +38811,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::IndirectCommandsLayoutCreateInfoNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNVX;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics;
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNVX flags = {};
+ uint32_t tokenCount = {};
+ const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNVX* pTokens = {};
};
static_assert( sizeof( IndirectCommandsLayoutCreateInfoNVX ) == sizeof( VkIndirectCommandsLayoutCreateInfoNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<IndirectCommandsLayoutCreateInfoNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct InitializePerformanceApiInfoINTEL
{
- struct InitializePerformanceApiInfoINTEL
- {
- protected:
- VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pUserData( pUserData_ )
- {}
-
- InitializePerformanceApiInfoINTEL( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkInitializePerformanceApiInfoINTEL*>(this) = rhs;
- }
-
- InitializePerformanceApiInfoINTEL& operator=( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkInitializePerformanceApiInfoINTEL*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eInitializePerformanceApiInfoINTEL;
- const void* pNext = nullptr;
- void* pUserData;
- };
- static_assert( sizeof( InitializePerformanceApiInfoINTEL ) == sizeof( VkInitializePerformanceApiInfoINTEL ), "layout struct and wrapper have different size!" );
- }
-
- struct InitializePerformanceApiInfoINTEL : public layout::InitializePerformanceApiInfoINTEL
- {
- VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( void* pUserData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::InitializePerformanceApiInfoINTEL( pUserData_ )
+ VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( void* pUserData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pUserData( pUserData_ )
{}
+ VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL ) - offsetof( InitializePerformanceApiInfoINTEL, pNext ) );
+ return *this;
+ }
+
InitializePerformanceApiInfoINTEL( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::InitializePerformanceApiInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
InitializePerformanceApiInfoINTEL& operator=( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::InitializePerformanceApiInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL const *>(&rhs);
return *this;
}
@@ -41867,17 +38879,19 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::InitializePerformanceApiInfoINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eInitializePerformanceApiInfoINTEL;
+ const void* pNext = {};
+ void* pUserData = {};
};
static_assert( sizeof( InitializePerformanceApiInfoINTEL ) == sizeof( VkInitializePerformanceApiInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<InitializePerformanceApiInfoINTEL>::value, "struct wrapper is not a standard layout!" );
struct InputAttachmentAspectReference
{
- VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( uint32_t subpass_ = 0,
- uint32_t inputAttachmentIndex_ = 0,
- vk::ImageAspectFlags aspectMask_ = vk::ImageAspectFlags() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( uint32_t subpass_ = {},
+ uint32_t inputAttachmentIndex_ = {},
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {} ) VULKAN_HPP_NOEXCEPT
: subpass( subpass_ )
, inputAttachmentIndex( inputAttachmentIndex_ )
, aspectMask( aspectMask_ )
@@ -41885,12 +38899,12 @@ namespace VULKAN_HPP_NAMESPACE
InputAttachmentAspectReference( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkInputAttachmentAspectReference*>(this) = rhs;
+ *this = rhs;
}
InputAttachmentAspectReference& operator=( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkInputAttachmentAspectReference*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference const *>(&rhs);
return *this;
}
@@ -41906,7 +38920,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- InputAttachmentAspectReference & setAspectMask( vk::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
+ InputAttachmentAspectReference & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
return *this;
@@ -41935,74 +38949,43 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t subpass;
- uint32_t inputAttachmentIndex;
- vk::ImageAspectFlags aspectMask;
+ uint32_t subpass = {};
+ uint32_t inputAttachmentIndex = {};
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
};
static_assert( sizeof( InputAttachmentAspectReference ) == sizeof( VkInputAttachmentAspectReference ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<InputAttachmentAspectReference>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct InstanceCreateInfo
{
- struct InstanceCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR InstanceCreateInfo( vk::InstanceCreateFlags flags_ = vk::InstanceCreateFlags(),
- const vk::ApplicationInfo* pApplicationInfo_ = nullptr,
- uint32_t enabledLayerCount_ = 0,
- const char* const* ppEnabledLayerNames_ = nullptr,
- uint32_t enabledExtensionCount_ = 0,
- const char* const* ppEnabledExtensionNames_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pApplicationInfo( pApplicationInfo_ )
- , enabledLayerCount( enabledLayerCount_ )
- , ppEnabledLayerNames( ppEnabledLayerNames_ )
- , enabledExtensionCount( enabledExtensionCount_ )
- , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
- {}
-
- InstanceCreateInfo( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkInstanceCreateInfo*>(this) = rhs;
- }
-
- InstanceCreateInfo& operator=( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkInstanceCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eInstanceCreateInfo;
- const void* pNext = nullptr;
- vk::InstanceCreateFlags flags;
- const vk::ApplicationInfo* pApplicationInfo;
- uint32_t enabledLayerCount;
- const char* const* ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char* const* ppEnabledExtensionNames;
- };
- static_assert( sizeof( InstanceCreateInfo ) == sizeof( VkInstanceCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct InstanceCreateInfo : public layout::InstanceCreateInfo
- {
- VULKAN_HPP_CONSTEXPR InstanceCreateInfo( vk::InstanceCreateFlags flags_ = vk::InstanceCreateFlags(),
- const vk::ApplicationInfo* pApplicationInfo_ = nullptr,
- uint32_t enabledLayerCount_ = 0,
- const char* const* ppEnabledLayerNames_ = nullptr,
- uint32_t enabledExtensionCount_ = 0,
- const char* const* ppEnabledExtensionNames_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::InstanceCreateInfo( flags_, pApplicationInfo_, enabledLayerCount_, ppEnabledLayerNames_, enabledExtensionCount_, ppEnabledExtensionNames_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pApplicationInfo( pApplicationInfo_ )
+ , enabledLayerCount( enabledLayerCount_ )
+ , ppEnabledLayerNames( ppEnabledLayerNames_ )
+ , enabledExtensionCount( enabledExtensionCount_ )
+ , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
{}
+ VULKAN_HPP_NAMESPACE::InstanceCreateInfo & operator=( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::InstanceCreateInfo ) - offsetof( InstanceCreateInfo, pNext ) );
+ return *this;
+ }
+
InstanceCreateInfo( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::InstanceCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
InstanceCreateInfo& operator=( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::InstanceCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::InstanceCreateInfo const *>(&rhs);
return *this;
}
@@ -42012,13 +38995,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- InstanceCreateInfo & setFlags( vk::InstanceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ InstanceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- InstanceCreateInfo & setPApplicationInfo( const vk::ApplicationInfo* pApplicationInfo_ ) VULKAN_HPP_NOEXCEPT
+ InstanceCreateInfo & setPApplicationInfo( const VULKAN_HPP_NAMESPACE::ApplicationInfo* pApplicationInfo_ ) VULKAN_HPP_NOEXCEPT
{
pApplicationInfo = pApplicationInfo_;
return *this;
@@ -42075,25 +39058,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::InstanceCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( InstanceCreateInfo ) == sizeof( VkInstanceCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<InstanceCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct LayerProperties
{
- LayerProperties() VULKAN_HPP_NOEXCEPT
- {}
+ LayerProperties( std::array<char,VK_MAX_EXTENSION_NAME_SIZE> const& layerName_ = {},
+ uint32_t specVersion_ = {},
+ uint32_t implementationVersion_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {} ) VULKAN_HPP_NOEXCEPT
+ : layerName{}
+ , specVersion( specVersion_ )
+ , implementationVersion( implementationVersion_ )
+ , description{}
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_EXTENSION_NAME_SIZE,VK_MAX_EXTENSION_NAME_SIZE>::copy( layerName, layerName_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
+ }
LayerProperties( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkLayerProperties*>(this) = rhs;
+ *this = rhs;
}
LayerProperties& operator=( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkLayerProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::LayerProperties const *>(&rhs);
return *this;
}
@@ -42121,61 +39121,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- char layerName[VK_MAX_EXTENSION_NAME_SIZE];
- uint32_t specVersion;
- uint32_t implementationVersion;
- char description[VK_MAX_DESCRIPTION_SIZE];
+ char layerName[VK_MAX_EXTENSION_NAME_SIZE] = {};
+ uint32_t specVersion = {};
+ uint32_t implementationVersion = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
};
static_assert( sizeof( LayerProperties ) == sizeof( VkLayerProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<LayerProperties>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_MACOS_MVK
- namespace layout
- {
- struct MacOSSurfaceCreateInfoMVK
- {
- protected:
- VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( vk::MacOSSurfaceCreateFlagsMVK flags_ = vk::MacOSSurfaceCreateFlagsMVK(),
- const void* pView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pView( pView_ )
- {}
-
- MacOSSurfaceCreateInfoMVK( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMacOSSurfaceCreateInfoMVK*>(this) = rhs;
- }
-
- MacOSSurfaceCreateInfoMVK& operator=( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMacOSSurfaceCreateInfoMVK*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK;
- const void* pNext = nullptr;
- vk::MacOSSurfaceCreateFlagsMVK flags;
- const void* pView;
- };
- static_assert( sizeof( MacOSSurfaceCreateInfoMVK ) == sizeof( VkMacOSSurfaceCreateInfoMVK ), "layout struct and wrapper have different size!" );
- }
-
- struct MacOSSurfaceCreateInfoMVK : public layout::MacOSSurfaceCreateInfoMVK
+ struct MacOSSurfaceCreateInfoMVK
{
- VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( vk::MacOSSurfaceCreateFlagsMVK flags_ = vk::MacOSSurfaceCreateFlagsMVK(),
- const void* pView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::MacOSSurfaceCreateInfoMVK( flags_, pView_ )
+ VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ = {},
+ const void* pView_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pView( pView_ )
{}
+ VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & operator=( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK ) - offsetof( MacOSSurfaceCreateInfoMVK, pNext ) );
+ return *this;
+ }
+
MacOSSurfaceCreateInfoMVK( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MacOSSurfaceCreateInfoMVK( rhs )
- {}
+ {
+ *this = rhs;
+ }
MacOSSurfaceCreateInfoMVK& operator=( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MacOSSurfaceCreateInfoMVK::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const *>(&rhs);
return *this;
}
@@ -42185,7 +39162,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MacOSSurfaceCreateInfoMVK & setFlags( vk::MacOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT
+ MacOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -42220,62 +39197,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MacOSSurfaceCreateInfoMVK::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags = {};
+ const void* pView = {};
};
static_assert( sizeof( MacOSSurfaceCreateInfoMVK ) == sizeof( VkMacOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MacOSSurfaceCreateInfoMVK>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_MACOS_MVK*/
- namespace layout
+ struct MappedMemoryRange
{
- struct MappedMemoryRange
- {
- protected:
- VULKAN_HPP_CONSTEXPR MappedMemoryRange( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize size_ = 0 ) VULKAN_HPP_NOEXCEPT
- : memory( memory_ )
- , offset( offset_ )
- , size( size_ )
- {}
-
- MappedMemoryRange( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMappedMemoryRange*>(this) = rhs;
- }
-
- MappedMemoryRange& operator=( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMappedMemoryRange*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMappedMemoryRange;
- const void* pNext = nullptr;
- vk::DeviceMemory memory;
- vk::DeviceSize offset;
- vk::DeviceSize size;
- };
- static_assert( sizeof( MappedMemoryRange ) == sizeof( VkMappedMemoryRange ), "layout struct and wrapper have different size!" );
- }
-
- struct MappedMemoryRange : public layout::MappedMemoryRange
- {
- VULKAN_HPP_CONSTEXPR MappedMemoryRange( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::DeviceSize offset_ = 0,
- vk::DeviceSize size_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::MappedMemoryRange( memory_, offset_, size_ )
+ VULKAN_HPP_CONSTEXPR MappedMemoryRange( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
+ , offset( offset_ )
+ , size( size_ )
{}
+ VULKAN_HPP_NAMESPACE::MappedMemoryRange & operator=( VULKAN_HPP_NAMESPACE::MappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MappedMemoryRange ) - offsetof( MappedMemoryRange, pNext ) );
+ return *this;
+ }
+
MappedMemoryRange( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MappedMemoryRange( rhs )
- {}
+ {
+ *this = rhs;
+ }
MappedMemoryRange& operator=( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MappedMemoryRange::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MappedMemoryRange const *>(&rhs);
return *this;
}
@@ -42285,19 +39240,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MappedMemoryRange & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ MappedMemoryRange & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- MappedMemoryRange & setOffset( vk::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
+ MappedMemoryRange & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- MappedMemoryRange & setSize( vk::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
+ MappedMemoryRange & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT
{
size = size_;
return *this;
@@ -42327,57 +39282,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MappedMemoryRange::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( MappedMemoryRange ) == sizeof( VkMappedMemoryRange ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MappedMemoryRange>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryAllocateFlagsInfo
{
- struct MemoryAllocateFlagsInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( vk::MemoryAllocateFlags flags_ = vk::MemoryAllocateFlags(),
- uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , deviceMask( deviceMask_ )
- {}
-
- MemoryAllocateFlagsInfo( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryAllocateFlagsInfo*>(this) = rhs;
- }
-
- MemoryAllocateFlagsInfo& operator=( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryAllocateFlagsInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryAllocateFlagsInfo;
- const void* pNext = nullptr;
- vk::MemoryAllocateFlags flags;
- uint32_t deviceMask;
- };
- static_assert( sizeof( MemoryAllocateFlagsInfo ) == sizeof( VkMemoryAllocateFlagsInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryAllocateFlagsInfo : public layout::MemoryAllocateFlagsInfo
- {
- VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( vk::MemoryAllocateFlags flags_ = vk::MemoryAllocateFlags(),
- uint32_t deviceMask_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryAllocateFlagsInfo( flags_, deviceMask_ )
+ VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ = {},
+ uint32_t deviceMask_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , deviceMask( deviceMask_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo & operator=( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo ) - offsetof( MemoryAllocateFlagsInfo, pNext ) );
+ return *this;
+ }
+
MemoryAllocateFlagsInfo( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryAllocateFlagsInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryAllocateFlagsInfo& operator=( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryAllocateFlagsInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo const *>(&rhs);
return *this;
}
@@ -42387,7 +39323,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryAllocateFlagsInfo & setFlags( vk::MemoryAllocateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ MemoryAllocateFlagsInfo & setFlags( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -42422,57 +39358,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryAllocateFlagsInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateFlagsInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags = {};
+ uint32_t deviceMask = {};
};
static_assert( sizeof( MemoryAllocateFlagsInfo ) == sizeof( VkMemoryAllocateFlagsInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryAllocateFlagsInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct MemoryAllocateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( vk::DeviceSize allocationSize_ = 0,
- uint32_t memoryTypeIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : allocationSize( allocationSize_ )
- , memoryTypeIndex( memoryTypeIndex_ )
- {}
-
- MemoryAllocateInfo( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryAllocateInfo*>(this) = rhs;
- }
-
- MemoryAllocateInfo& operator=( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryAllocateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryAllocateInfo;
- const void* pNext = nullptr;
- vk::DeviceSize allocationSize;
- uint32_t memoryTypeIndex;
- };
- static_assert( sizeof( MemoryAllocateInfo ) == sizeof( VkMemoryAllocateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryAllocateInfo : public layout::MemoryAllocateInfo
+ struct MemoryAllocateInfo
{
- VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( vk::DeviceSize allocationSize_ = 0,
- uint32_t memoryTypeIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryAllocateInfo( allocationSize_, memoryTypeIndex_ )
+ VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {},
+ uint32_t memoryTypeIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : allocationSize( allocationSize_ )
+ , memoryTypeIndex( memoryTypeIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo ) - offsetof( MemoryAllocateInfo, pNext ) );
+ return *this;
+ }
+
MemoryAllocateInfo( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryAllocateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryAllocateInfo& operator=( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryAllocateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const *>(&rhs);
return *this;
}
@@ -42482,7 +39398,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryAllocateInfo & setAllocationSize( vk::DeviceSize allocationSize_ ) VULKAN_HPP_NOEXCEPT
+ MemoryAllocateInfo & setAllocationSize( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ ) VULKAN_HPP_NOEXCEPT
{
allocationSize = allocationSize_;
return *this;
@@ -42517,57 +39433,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryAllocateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {};
+ uint32_t memoryTypeIndex = {};
};
static_assert( sizeof( MemoryAllocateInfo ) == sizeof( VkMemoryAllocateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct MemoryBarrier
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags() ) VULKAN_HPP_NOEXCEPT
- : srcAccessMask( srcAccessMask_ )
- , dstAccessMask( dstAccessMask_ )
- {}
-
- MemoryBarrier( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryBarrier*>(this) = rhs;
- }
-
- MemoryBarrier& operator=( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryBarrier*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryBarrier;
- const void* pNext = nullptr;
- vk::AccessFlags srcAccessMask;
- vk::AccessFlags dstAccessMask;
- };
- static_assert( sizeof( MemoryBarrier ) == sizeof( VkMemoryBarrier ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryBarrier : public layout::MemoryBarrier
+ struct MemoryBarrier
{
- VULKAN_HPP_CONSTEXPR MemoryBarrier( vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryBarrier( srcAccessMask_, dstAccessMask_ )
+ VULKAN_HPP_CONSTEXPR MemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {},
+ VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryBarrier & operator=( VULKAN_HPP_NAMESPACE::MemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrier ) - offsetof( MemoryBarrier, pNext ) );
+ return *this;
+ }
+
MemoryBarrier( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryBarrier( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryBarrier& operator=( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryBarrier::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryBarrier const *>(&rhs);
return *this;
}
@@ -42577,13 +39473,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryBarrier & setSrcAccessMask( vk::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ MemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
srcAccessMask = srcAccessMask_;
return *this;
}
- MemoryBarrier & setDstAccessMask( vk::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ MemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
dstAccessMask = dstAccessMask_;
return *this;
@@ -42612,57 +39508,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryBarrier::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrier;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {};
+ VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {};
};
static_assert( sizeof( MemoryBarrier ) == sizeof( VkMemoryBarrier ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryBarrier>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryDedicatedAllocateInfo
{
- struct MemoryDedicatedAllocateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( vk::Image image_ = vk::Image(),
- vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : image( image_ )
- , buffer( buffer_ )
- {}
-
- MemoryDedicatedAllocateInfo( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(this) = rhs;
- }
-
- MemoryDedicatedAllocateInfo& operator=( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryDedicatedAllocateInfo;
- const void* pNext = nullptr;
- vk::Image image;
- vk::Buffer buffer;
- };
- static_assert( sizeof( MemoryDedicatedAllocateInfo ) == sizeof( VkMemoryDedicatedAllocateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryDedicatedAllocateInfo : public layout::MemoryDedicatedAllocateInfo
- {
- VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( vk::Image image_ = vk::Image(),
- vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryDedicatedAllocateInfo( image_, buffer_ )
+ VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( VULKAN_HPP_NAMESPACE::Image image_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : image( image_ )
+ , buffer( buffer_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo ) - offsetof( MemoryDedicatedAllocateInfo, pNext ) );
+ return *this;
+ }
+
MemoryDedicatedAllocateInfo( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryDedicatedAllocateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryDedicatedAllocateInfo& operator=( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryDedicatedAllocateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo const *>(&rhs);
return *this;
}
@@ -42672,13 +39548,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryDedicatedAllocateInfo & setImage( vk::Image image_ ) VULKAN_HPP_NOEXCEPT
+ MemoryDedicatedAllocateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
return *this;
}
- MemoryDedicatedAllocateInfo & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ MemoryDedicatedAllocateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
@@ -42707,53 +39583,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryDedicatedAllocateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedAllocateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Image image = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
};
static_assert( sizeof( MemoryDedicatedAllocateInfo ) == sizeof( VkMemoryDedicatedAllocateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryDedicatedAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryDedicatedRequirements
{
- struct MemoryDedicatedRequirements
- {
- protected:
- MemoryDedicatedRequirements() VULKAN_HPP_NOEXCEPT
- {}
-
- MemoryDedicatedRequirements( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryDedicatedRequirements*>(this) = rhs;
- }
-
- MemoryDedicatedRequirements& operator=( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryDedicatedRequirements*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryDedicatedRequirements;
- void* pNext = nullptr;
- vk::Bool32 prefersDedicatedAllocation;
- vk::Bool32 requiresDedicatedAllocation;
- };
- static_assert( sizeof( MemoryDedicatedRequirements ) == sizeof( VkMemoryDedicatedRequirements ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryDedicatedRequirements : public layout::MemoryDedicatedRequirements
- {
- MemoryDedicatedRequirements() VULKAN_HPP_NOEXCEPT
- : layout::MemoryDedicatedRequirements()
+ MemoryDedicatedRequirements( VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : prefersDedicatedAllocation( prefersDedicatedAllocation_ )
+ , requiresDedicatedAllocation( requiresDedicatedAllocation_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements & operator=( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements ) - offsetof( MemoryDedicatedRequirements, pNext ) );
+ return *this;
+ }
+
MemoryDedicatedRequirements( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryDedicatedRequirements( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryDedicatedRequirements& operator=( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryDedicatedRequirements::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements const *>(&rhs);
return *this;
}
@@ -42780,52 +39640,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryDedicatedRequirements::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedRequirements;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation = {};
+ VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation = {};
};
static_assert( sizeof( MemoryDedicatedRequirements ) == sizeof( VkMemoryDedicatedRequirements ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryDedicatedRequirements>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryFdPropertiesKHR
{
- struct MemoryFdPropertiesKHR
- {
- protected:
- MemoryFdPropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- MemoryFdPropertiesKHR( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryFdPropertiesKHR*>(this) = rhs;
- }
-
- MemoryFdPropertiesKHR& operator=( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryFdPropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryFdPropertiesKHR;
- void* pNext = nullptr;
- uint32_t memoryTypeBits;
- };
- static_assert( sizeof( MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryFdPropertiesKHR : public layout::MemoryFdPropertiesKHR
- {
- MemoryFdPropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::MemoryFdPropertiesKHR()
+ MemoryFdPropertiesKHR( uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryTypeBits( memoryTypeBits_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR & operator=( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR ) - offsetof( MemoryFdPropertiesKHR, pNext ) );
+ return *this;
+ }
+
MemoryFdPropertiesKHR( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryFdPropertiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryFdPropertiesKHR& operator=( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryFdPropertiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR const *>(&rhs);
return *this;
}
@@ -42851,55 +39694,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryFdPropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryFdPropertiesKHR;
+ void* pNext = {};
+ uint32_t memoryTypeBits = {};
};
static_assert( sizeof( MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryFdPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- namespace layout
- {
- struct MemoryGetAndroidHardwareBufferInfoANDROID
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( vk::DeviceMemory memory_ = vk::DeviceMemory() ) VULKAN_HPP_NOEXCEPT
- : memory( memory_ )
- {}
-
- MemoryGetAndroidHardwareBufferInfoANDROID( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetAndroidHardwareBufferInfoANDROID*>(this) = rhs;
- }
-
- MemoryGetAndroidHardwareBufferInfoANDROID& operator=( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetAndroidHardwareBufferInfoANDROID*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID;
- const void* pNext = nullptr;
- vk::DeviceMemory memory;
- };
- static_assert( sizeof( MemoryGetAndroidHardwareBufferInfoANDROID ) == sizeof( VkMemoryGetAndroidHardwareBufferInfoANDROID ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryGetAndroidHardwareBufferInfoANDROID : public layout::MemoryGetAndroidHardwareBufferInfoANDROID
+ struct MemoryGetAndroidHardwareBufferInfoANDROID
{
- VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( vk::DeviceMemory memory_ = vk::DeviceMemory() ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetAndroidHardwareBufferInfoANDROID( memory_ )
+ VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & operator=( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID ) - offsetof( MemoryGetAndroidHardwareBufferInfoANDROID, pNext ) );
+ return *this;
+ }
+
MemoryGetAndroidHardwareBufferInfoANDROID( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetAndroidHardwareBufferInfoANDROID( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryGetAndroidHardwareBufferInfoANDROID& operator=( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryGetAndroidHardwareBufferInfoANDROID::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID const *>(&rhs);
return *this;
}
@@ -42909,7 +39733,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryGetAndroidHardwareBufferInfoANDROID & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ MemoryGetAndroidHardwareBufferInfoANDROID & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
@@ -42937,58 +39761,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryGetAndroidHardwareBufferInfoANDROID::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory = {};
};
static_assert( sizeof( MemoryGetAndroidHardwareBufferInfoANDROID ) == sizeof( VkMemoryGetAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryGetAndroidHardwareBufferInfoANDROID>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- namespace layout
+ struct MemoryGetFdInfoKHR
{
- struct MemoryGetFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : memory( memory_ )
- , handleType( handleType_ )
- {}
-
- MemoryGetFdInfoKHR( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetFdInfoKHR*>(this) = rhs;
- }
-
- MemoryGetFdInfoKHR& operator=( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryGetFdInfoKHR;
- const void* pNext = nullptr;
- vk::DeviceMemory memory;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryGetFdInfoKHR : public layout::MemoryGetFdInfoKHR
- {
- VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetFdInfoKHR( memory_, handleType_ )
+ VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR ) - offsetof( MemoryGetFdInfoKHR, pNext ) );
+ return *this;
+ }
+
MemoryGetFdInfoKHR( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryGetFdInfoKHR& operator=( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryGetFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR const *>(&rhs);
return *this;
}
@@ -42998,13 +39801,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryGetFdInfoKHR & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ MemoryGetFdInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- MemoryGetFdInfoKHR & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ MemoryGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -43025,7 +39828,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( memory == rhs.memory )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( MemoryGetFdInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -43033,59 +39836,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryGetFdInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryGetFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct MemoryGetWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : memory( memory_ )
- , handleType( handleType_ )
- {}
-
- MemoryGetWin32HandleInfoKHR( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetWin32HandleInfoKHR*>(this) = rhs;
- }
-
- MemoryGetWin32HandleInfoKHR& operator=( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryGetWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::DeviceMemory memory;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( MemoryGetWin32HandleInfoKHR ) == sizeof( VkMemoryGetWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryGetWin32HandleInfoKHR : public layout::MemoryGetWin32HandleInfoKHR
+ struct MemoryGetWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( vk::DeviceMemory memory_ = vk::DeviceMemory(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetWin32HandleInfoKHR( memory_, handleType_ )
+ VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR ) - offsetof( MemoryGetWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
MemoryGetWin32HandleInfoKHR( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryGetWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryGetWin32HandleInfoKHR& operator=( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryGetWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -43095,13 +39878,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MemoryGetWin32HandleInfoKHR & setMemory( vk::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ MemoryGetWin32HandleInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
{
memory = memory_;
return *this;
}
- MemoryGetWin32HandleInfoKHR & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ MemoryGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -43122,7 +39905,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( memory == rhs.memory )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( MemoryGetWin32HandleInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -43130,8 +39913,11 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryGetWin32HandleInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( MemoryGetWin32HandleInfoKHR ) == sizeof( VkMemoryGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryGetWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -43139,17 +39925,20 @@ namespace VULKAN_HPP_NAMESPACE
struct MemoryHeap
{
- MemoryHeap() VULKAN_HPP_NOEXCEPT
+ MemoryHeap( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {},
+ VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : size( size_ )
+ , flags( flags_ )
{}
MemoryHeap( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryHeap*>(this) = rhs;
+ *this = rhs;
}
MemoryHeap& operator=( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryHeap*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryHeap const *>(&rhs);
return *this;
}
@@ -43175,52 +39964,32 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize size;
- vk::MemoryHeapFlags flags;
+ VULKAN_HPP_NAMESPACE::DeviceSize size = {};
+ VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags = {};
};
static_assert( sizeof( MemoryHeap ) == sizeof( VkMemoryHeap ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryHeap>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryHostPointerPropertiesEXT
{
- struct MemoryHostPointerPropertiesEXT
- {
- protected:
- MemoryHostPointerPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>(this) = rhs;
- }
-
- MemoryHostPointerPropertiesEXT& operator=( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT;
- void* pNext = nullptr;
- uint32_t memoryTypeBits;
- };
- static_assert( sizeof( MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryHostPointerPropertiesEXT : public layout::MemoryHostPointerPropertiesEXT
- {
- MemoryHostPointerPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::MemoryHostPointerPropertiesEXT()
+ MemoryHostPointerPropertiesEXT( uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryTypeBits( memoryTypeBits_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT ) - offsetof( MemoryHostPointerPropertiesEXT, pNext ) );
+ return *this;
+ }
+
MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryHostPointerPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryHostPointerPropertiesEXT& operator=( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryHostPointerPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT const *>(&rhs);
return *this;
}
@@ -43246,53 +40015,99 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryHostPointerPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT;
+ void* pNext = {};
+ uint32_t memoryTypeBits = {};
};
static_assert( sizeof( MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryHostPointerPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct MemoryOpaqueCaptureAddressAllocateInfo
{
- struct MemoryPriorityAllocateInfoEXT
+ VULKAN_HPP_CONSTEXPR MemoryOpaqueCaptureAddressAllocateInfo( uint64_t opaqueCaptureAddress_ = {} ) VULKAN_HPP_NOEXCEPT
+ : opaqueCaptureAddress( opaqueCaptureAddress_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo & operator=( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( float priority_ = 0 ) VULKAN_HPP_NOEXCEPT
- : priority( priority_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo ) - offsetof( MemoryOpaqueCaptureAddressAllocateInfo, pNext ) );
+ return *this;
+ }
- MemoryPriorityAllocateInfoEXT( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryPriorityAllocateInfoEXT*>(this) = rhs;
- }
+ MemoryOpaqueCaptureAddressAllocateInfo( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- MemoryPriorityAllocateInfoEXT& operator=( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryPriorityAllocateInfoEXT*>(this) = rhs;
- return *this;
- }
+ MemoryOpaqueCaptureAddressAllocateInfo& operator=( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::eMemoryPriorityAllocateInfoEXT;
- const void* pNext = nullptr;
- float priority;
- };
- static_assert( sizeof( MemoryPriorityAllocateInfoEXT ) == sizeof( VkMemoryPriorityAllocateInfoEXT ), "layout struct and wrapper have different size!" );
- }
+ MemoryOpaqueCaptureAddressAllocateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryOpaqueCaptureAddressAllocateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT
+ {
+ opaqueCaptureAddress = opaqueCaptureAddress_;
+ return *this;
+ }
+
+ operator VkMemoryOpaqueCaptureAddressAllocateInfo const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkMemoryOpaqueCaptureAddressAllocateInfo*>( this );
+ }
+
+ operator VkMemoryOpaqueCaptureAddressAllocateInfo &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkMemoryOpaqueCaptureAddressAllocateInfo*>( this );
+ }
+
+ bool operator==( MemoryOpaqueCaptureAddressAllocateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress );
+ }
+
+ bool operator!=( MemoryOpaqueCaptureAddressAllocateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryOpaqueCaptureAddressAllocateInfo;
+ const void* pNext = {};
+ uint64_t opaqueCaptureAddress = {};
+ };
+ static_assert( sizeof( MemoryOpaqueCaptureAddressAllocateInfo ) == sizeof( VkMemoryOpaqueCaptureAddressAllocateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<MemoryOpaqueCaptureAddressAllocateInfo>::value, "struct wrapper is not a standard layout!" );
- struct MemoryPriorityAllocateInfoEXT : public layout::MemoryPriorityAllocateInfoEXT
+ struct MemoryPriorityAllocateInfoEXT
{
- VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( float priority_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryPriorityAllocateInfoEXT( priority_ )
+ VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( float priority_ = {} ) VULKAN_HPP_NOEXCEPT
+ : priority( priority_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT ) - offsetof( MemoryPriorityAllocateInfoEXT, pNext ) );
+ return *this;
+ }
+
MemoryPriorityAllocateInfoEXT( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryPriorityAllocateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryPriorityAllocateInfoEXT& operator=( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryPriorityAllocateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT const *>(&rhs);
return *this;
}
@@ -43330,25 +40145,32 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryPriorityAllocateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryPriorityAllocateInfoEXT;
+ const void* pNext = {};
+ float priority = {};
};
static_assert( sizeof( MemoryPriorityAllocateInfoEXT ) == sizeof( VkMemoryPriorityAllocateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryPriorityAllocateInfoEXT>::value, "struct wrapper is not a standard layout!" );
struct MemoryRequirements
{
- MemoryRequirements() VULKAN_HPP_NOEXCEPT
+ MemoryRequirements( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize alignment_ = {},
+ uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : size( size_ )
+ , alignment( alignment_ )
+ , memoryTypeBits( memoryTypeBits_ )
{}
MemoryRequirements( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryRequirements*>(this) = rhs;
+ *this = rhs;
}
MemoryRequirements& operator=( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryRequirements*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryRequirements const *>(&rhs);
return *this;
}
@@ -43375,53 +40197,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::DeviceSize size;
- vk::DeviceSize alignment;
- uint32_t memoryTypeBits;
+ VULKAN_HPP_NAMESPACE::DeviceSize size = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize alignment = {};
+ uint32_t memoryTypeBits = {};
};
static_assert( sizeof( MemoryRequirements ) == sizeof( VkMemoryRequirements ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryRequirements>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct MemoryRequirements2
- {
- protected:
- MemoryRequirements2() VULKAN_HPP_NOEXCEPT
- {}
-
- MemoryRequirements2( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryRequirements2*>(this) = rhs;
- }
-
- MemoryRequirements2& operator=( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryRequirements2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryRequirements2;
- void* pNext = nullptr;
- vk::MemoryRequirements memoryRequirements;
- };
- static_assert( sizeof( MemoryRequirements2 ) == sizeof( VkMemoryRequirements2 ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryRequirements2 : public layout::MemoryRequirements2
+ struct MemoryRequirements2
{
- MemoryRequirements2() VULKAN_HPP_NOEXCEPT
- : layout::MemoryRequirements2()
+ MemoryRequirements2( VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryRequirements( memoryRequirements_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 & operator=( VULKAN_HPP_NAMESPACE::MemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryRequirements2 ) - offsetof( MemoryRequirements2, pNext ) );
+ return *this;
+ }
+
MemoryRequirements2( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryRequirements2( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryRequirements2& operator=( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryRequirements2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryRequirements2 const *>(&rhs);
return *this;
}
@@ -43447,25 +40249,30 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryRequirements2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryRequirements2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements = {};
};
static_assert( sizeof( MemoryRequirements2 ) == sizeof( VkMemoryRequirements2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryRequirements2>::value, "struct wrapper is not a standard layout!" );
struct MemoryType
{
- MemoryType() VULKAN_HPP_NOEXCEPT
+ MemoryType( VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags_ = {},
+ uint32_t heapIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : propertyFlags( propertyFlags_ )
+ , heapIndex( heapIndex_ )
{}
MemoryType( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryType*>(this) = rhs;
+ *this = rhs;
}
MemoryType& operator=( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkMemoryType*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryType const *>(&rhs);
return *this;
}
@@ -43491,54 +40298,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::MemoryPropertyFlags propertyFlags;
- uint32_t heapIndex;
+ VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags = {};
+ uint32_t heapIndex = {};
};
static_assert( sizeof( MemoryType ) == sizeof( VkMemoryType ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryType>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct MemoryWin32HandlePropertiesKHR
- {
- protected:
- MemoryWin32HandlePropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- MemoryWin32HandlePropertiesKHR( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>(this) = rhs;
- }
-
- MemoryWin32HandlePropertiesKHR& operator=( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR;
- void* pNext = nullptr;
- uint32_t memoryTypeBits;
- };
- static_assert( sizeof( MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct MemoryWin32HandlePropertiesKHR : public layout::MemoryWin32HandlePropertiesKHR
+ struct MemoryWin32HandlePropertiesKHR
{
- MemoryWin32HandlePropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::MemoryWin32HandlePropertiesKHR()
+ MemoryWin32HandlePropertiesKHR( uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryTypeBits( memoryTypeBits_ )
{}
+ VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR & operator=( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR ) - offsetof( MemoryWin32HandlePropertiesKHR, pNext ) );
+ return *this;
+ }
+
MemoryWin32HandlePropertiesKHR( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MemoryWin32HandlePropertiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
MemoryWin32HandlePropertiesKHR& operator=( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MemoryWin32HandlePropertiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR const *>(&rhs);
return *this;
}
@@ -43564,8 +40351,10 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MemoryWin32HandlePropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR;
+ void* pNext = {};
+ uint32_t memoryTypeBits = {};
};
static_assert( sizeof( MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MemoryWin32HandlePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
@@ -43573,51 +40362,28 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_METAL_EXT
- namespace layout
+ struct MetalSurfaceCreateInfoEXT
{
- struct MetalSurfaceCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( vk::MetalSurfaceCreateFlagsEXT flags_ = vk::MetalSurfaceCreateFlagsEXT(),
- const CAMetalLayer* pLayer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pLayer( pLayer_ )
- {}
-
- MetalSurfaceCreateInfoEXT( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMetalSurfaceCreateInfoEXT*>(this) = rhs;
- }
-
- MetalSurfaceCreateInfoEXT& operator=( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMetalSurfaceCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMetalSurfaceCreateInfoEXT;
- const void* pNext = nullptr;
- vk::MetalSurfaceCreateFlagsEXT flags;
- const CAMetalLayer* pLayer;
- };
- static_assert( sizeof( MetalSurfaceCreateInfoEXT ) == sizeof( VkMetalSurfaceCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct MetalSurfaceCreateInfoEXT : public layout::MetalSurfaceCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( vk::MetalSurfaceCreateFlagsEXT flags_ = vk::MetalSurfaceCreateFlagsEXT(),
- const CAMetalLayer* pLayer_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::MetalSurfaceCreateInfoEXT( flags_, pLayer_ )
+ VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ = {},
+ const CAMetalLayer* pLayer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pLayer( pLayer_ )
{}
+ VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT ) - offsetof( MetalSurfaceCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
MetalSurfaceCreateInfoEXT( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MetalSurfaceCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
MetalSurfaceCreateInfoEXT& operator=( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MetalSurfaceCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -43627,7 +40393,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- MetalSurfaceCreateInfoEXT & setFlags( vk::MetalSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ MetalSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -43662,53 +40428,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MetalSurfaceCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMetalSurfaceCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags = {};
+ const CAMetalLayer* pLayer = {};
};
static_assert( sizeof( MetalSurfaceCreateInfoEXT ) == sizeof( VkMetalSurfaceCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MetalSurfaceCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_METAL_EXT*/
- namespace layout
+ struct MultisamplePropertiesEXT
{
- struct MultisamplePropertiesEXT
- {
- protected:
- MultisamplePropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- MultisamplePropertiesEXT( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMultisamplePropertiesEXT*>(this) = rhs;
- }
-
- MultisamplePropertiesEXT& operator=( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkMultisamplePropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eMultisamplePropertiesEXT;
- void* pNext = nullptr;
- vk::Extent2D maxSampleLocationGridSize;
- };
- static_assert( sizeof( MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct MultisamplePropertiesEXT : public layout::MultisamplePropertiesEXT
- {
- MultisamplePropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::MultisamplePropertiesEXT()
+ MultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxSampleLocationGridSize( maxSampleLocationGridSize_ )
{}
+ VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT ) - offsetof( MultisamplePropertiesEXT, pNext ) );
+ return *this;
+ }
+
MultisamplePropertiesEXT( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::MultisamplePropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
MultisamplePropertiesEXT& operator=( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::MultisamplePropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT const *>(&rhs);
return *this;
}
@@ -43734,85 +40483,50 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::MultisamplePropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultisamplePropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {};
};
static_assert( sizeof( MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<MultisamplePropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ObjectTableCreateInfoNVX
{
- struct ObjectTableCreateInfoNVX
- {
- protected:
- VULKAN_HPP_CONSTEXPR ObjectTableCreateInfoNVX( uint32_t objectCount_ = 0,
- const vk::ObjectEntryTypeNVX* pObjectEntryTypes_ = nullptr,
- const uint32_t* pObjectEntryCounts_ = nullptr,
- const vk::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ = nullptr,
- uint32_t maxUniformBuffersPerDescriptor_ = 0,
- uint32_t maxStorageBuffersPerDescriptor_ = 0,
- uint32_t maxStorageImagesPerDescriptor_ = 0,
- uint32_t maxSampledImagesPerDescriptor_ = 0,
- uint32_t maxPipelineLayouts_ = 0 ) VULKAN_HPP_NOEXCEPT
- : objectCount( objectCount_ )
- , pObjectEntryTypes( pObjectEntryTypes_ )
- , pObjectEntryCounts( pObjectEntryCounts_ )
- , pObjectEntryUsageFlags( pObjectEntryUsageFlags_ )
- , maxUniformBuffersPerDescriptor( maxUniformBuffersPerDescriptor_ )
- , maxStorageBuffersPerDescriptor( maxStorageBuffersPerDescriptor_ )
- , maxStorageImagesPerDescriptor( maxStorageImagesPerDescriptor_ )
- , maxSampledImagesPerDescriptor( maxSampledImagesPerDescriptor_ )
- , maxPipelineLayouts( maxPipelineLayouts_ )
- {}
-
- ObjectTableCreateInfoNVX( VkObjectTableCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkObjectTableCreateInfoNVX*>(this) = rhs;
- }
-
- ObjectTableCreateInfoNVX& operator=( VkObjectTableCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkObjectTableCreateInfoNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eObjectTableCreateInfoNVX;
- const void* pNext = nullptr;
- uint32_t objectCount;
- const vk::ObjectEntryTypeNVX* pObjectEntryTypes;
- const uint32_t* pObjectEntryCounts;
- const vk::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags;
- uint32_t maxUniformBuffersPerDescriptor;
- uint32_t maxStorageBuffersPerDescriptor;
- uint32_t maxStorageImagesPerDescriptor;
- uint32_t maxSampledImagesPerDescriptor;
- uint32_t maxPipelineLayouts;
- };
- static_assert( sizeof( ObjectTableCreateInfoNVX ) == sizeof( VkObjectTableCreateInfoNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct ObjectTableCreateInfoNVX : public layout::ObjectTableCreateInfoNVX
- {
- VULKAN_HPP_CONSTEXPR ObjectTableCreateInfoNVX( uint32_t objectCount_ = 0,
- const vk::ObjectEntryTypeNVX* pObjectEntryTypes_ = nullptr,
- const uint32_t* pObjectEntryCounts_ = nullptr,
- const vk::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ = nullptr,
- uint32_t maxUniformBuffersPerDescriptor_ = 0,
- uint32_t maxStorageBuffersPerDescriptor_ = 0,
- uint32_t maxStorageImagesPerDescriptor_ = 0,
- uint32_t maxSampledImagesPerDescriptor_ = 0,
- uint32_t maxPipelineLayouts_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ObjectTableCreateInfoNVX( objectCount_, pObjectEntryTypes_, pObjectEntryCounts_, pObjectEntryUsageFlags_, maxUniformBuffersPerDescriptor_, maxStorageBuffersPerDescriptor_, maxStorageImagesPerDescriptor_, maxSampledImagesPerDescriptor_, maxPipelineLayouts_ )
+ VULKAN_HPP_CONSTEXPR ObjectTableCreateInfoNVX( uint32_t objectCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX* pObjectEntryTypes_ = {},
+ const uint32_t* pObjectEntryCounts_ = {},
+ const VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ = {},
+ uint32_t maxUniformBuffersPerDescriptor_ = {},
+ uint32_t maxStorageBuffersPerDescriptor_ = {},
+ uint32_t maxStorageImagesPerDescriptor_ = {},
+ uint32_t maxSampledImagesPerDescriptor_ = {},
+ uint32_t maxPipelineLayouts_ = {} ) VULKAN_HPP_NOEXCEPT
+ : objectCount( objectCount_ )
+ , pObjectEntryTypes( pObjectEntryTypes_ )
+ , pObjectEntryCounts( pObjectEntryCounts_ )
+ , pObjectEntryUsageFlags( pObjectEntryUsageFlags_ )
+ , maxUniformBuffersPerDescriptor( maxUniformBuffersPerDescriptor_ )
+ , maxStorageBuffersPerDescriptor( maxStorageBuffersPerDescriptor_ )
+ , maxStorageImagesPerDescriptor( maxStorageImagesPerDescriptor_ )
+ , maxSampledImagesPerDescriptor( maxSampledImagesPerDescriptor_ )
+ , maxPipelineLayouts( maxPipelineLayouts_ )
{}
+ VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX & operator=( VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX ) - offsetof( ObjectTableCreateInfoNVX, pNext ) );
+ return *this;
+ }
+
ObjectTableCreateInfoNVX( VkObjectTableCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ObjectTableCreateInfoNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
ObjectTableCreateInfoNVX& operator=( VkObjectTableCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ObjectTableCreateInfoNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX const *>(&rhs);
return *this;
}
@@ -43828,7 +40542,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ObjectTableCreateInfoNVX & setPObjectEntryTypes( const vk::ObjectEntryTypeNVX* pObjectEntryTypes_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableCreateInfoNVX & setPObjectEntryTypes( const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX* pObjectEntryTypes_ ) VULKAN_HPP_NOEXCEPT
{
pObjectEntryTypes = pObjectEntryTypes_;
return *this;
@@ -43840,7 +40554,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ObjectTableCreateInfoNVX & setPObjectEntryUsageFlags( const vk::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableCreateInfoNVX & setPObjectEntryUsageFlags( const VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ ) VULKAN_HPP_NOEXCEPT
{
pObjectEntryUsageFlags = pObjectEntryUsageFlags_;
return *this;
@@ -43906,38 +40620,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ObjectTableCreateInfoNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eObjectTableCreateInfoNVX;
+ const void* pNext = {};
+ uint32_t objectCount = {};
+ const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX* pObjectEntryTypes = {};
+ const uint32_t* pObjectEntryCounts = {};
+ const VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags = {};
+ uint32_t maxUniformBuffersPerDescriptor = {};
+ uint32_t maxStorageBuffersPerDescriptor = {};
+ uint32_t maxStorageImagesPerDescriptor = {};
+ uint32_t maxSampledImagesPerDescriptor = {};
+ uint32_t maxPipelineLayouts = {};
};
static_assert( sizeof( ObjectTableCreateInfoNVX ) == sizeof( VkObjectTableCreateInfoNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTableCreateInfoNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTableEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTableEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTableEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
{}
ObjectTableEntryNVX( VkObjectTableEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTableEntryNVX& operator=( VkObjectTableEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTableEntryNVX const *>(&rhs);
return *this;
}
- ObjectTableEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTableEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -43965,18 +40689,18 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
};
static_assert( sizeof( ObjectTableEntryNVX ) == sizeof( VkObjectTableEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTableEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTableDescriptorSetEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTableDescriptorSetEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX(),
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- vk::DescriptorSet descriptorSet_ = vk::DescriptorSet() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTableDescriptorSetEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {},
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {},
+ VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
, pipelineLayout( pipelineLayout_ )
@@ -43984,8 +40708,8 @@ namespace VULKAN_HPP_NAMESPACE
{}
explicit ObjectTableDescriptorSetEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- vk::DescriptorSet descriptorSet_ = vk::DescriptorSet() )
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {},
+ VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet_ = {} )
: type( objectTableEntryNVX.type )
, flags( objectTableEntryNVX.flags )
, pipelineLayout( pipelineLayout_ )
@@ -43994,34 +40718,34 @@ namespace VULKAN_HPP_NAMESPACE
ObjectTableDescriptorSetEntryNVX( VkObjectTableDescriptorSetEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableDescriptorSetEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTableDescriptorSetEntryNVX& operator=( VkObjectTableDescriptorSetEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableDescriptorSetEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTableDescriptorSetEntryNVX const *>(&rhs);
return *this;
}
- ObjectTableDescriptorSetEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableDescriptorSetEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTableDescriptorSetEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableDescriptorSetEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ObjectTableDescriptorSetEntryNVX & setPipelineLayout( vk::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableDescriptorSetEntryNVX & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
{
pipelineLayout = pipelineLayout_;
return *this;
}
- ObjectTableDescriptorSetEntryNVX & setDescriptorSet( vk::DescriptorSet descriptorSet_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableDescriptorSetEntryNVX & setDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet_ ) VULKAN_HPP_NOEXCEPT
{
descriptorSet = descriptorSet_;
return *this;
@@ -44051,20 +40775,20 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
- vk::PipelineLayout pipelineLayout;
- vk::DescriptorSet descriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout = {};
+ VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet = {};
};
static_assert( sizeof( ObjectTableDescriptorSetEntryNVX ) == sizeof( VkObjectTableDescriptorSetEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTableDescriptorSetEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTableIndexBufferEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTableIndexBufferEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX(),
- vk::Buffer buffer_ = vk::Buffer(),
- vk::IndexType indexType_ = vk::IndexType::eUint16 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTableIndexBufferEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {},
+ VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16 ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
, buffer( buffer_ )
@@ -44072,8 +40796,8 @@ namespace VULKAN_HPP_NAMESPACE
{}
explicit ObjectTableIndexBufferEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
- vk::Buffer buffer_ = vk::Buffer(),
- vk::IndexType indexType_ = vk::IndexType::eUint16 )
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {},
+ VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16 )
: type( objectTableEntryNVX.type )
, flags( objectTableEntryNVX.flags )
, buffer( buffer_ )
@@ -44082,34 +40806,34 @@ namespace VULKAN_HPP_NAMESPACE
ObjectTableIndexBufferEntryNVX( VkObjectTableIndexBufferEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableIndexBufferEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTableIndexBufferEntryNVX& operator=( VkObjectTableIndexBufferEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableIndexBufferEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTableIndexBufferEntryNVX const *>(&rhs);
return *this;
}
- ObjectTableIndexBufferEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableIndexBufferEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTableIndexBufferEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableIndexBufferEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ObjectTableIndexBufferEntryNVX & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableIndexBufferEntryNVX & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
}
- ObjectTableIndexBufferEntryNVX & setIndexType( vk::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableIndexBufferEntryNVX & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT
{
indexType = indexType_;
return *this;
@@ -44139,26 +40863,26 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
- vk::Buffer buffer;
- vk::IndexType indexType;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
+ VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16;
};
static_assert( sizeof( ObjectTableIndexBufferEntryNVX ) == sizeof( VkObjectTableIndexBufferEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTableIndexBufferEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTablePipelineEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTablePipelineEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX(),
- vk::Pipeline pipeline_ = vk::Pipeline() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTablePipelineEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {},
+ VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
, pipeline( pipeline_ )
{}
explicit ObjectTablePipelineEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
- vk::Pipeline pipeline_ = vk::Pipeline() )
+ VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {} )
: type( objectTableEntryNVX.type )
, flags( objectTableEntryNVX.flags )
, pipeline( pipeline_ )
@@ -44166,28 +40890,28 @@ namespace VULKAN_HPP_NAMESPACE
ObjectTablePipelineEntryNVX( VkObjectTablePipelineEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTablePipelineEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTablePipelineEntryNVX& operator=( VkObjectTablePipelineEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTablePipelineEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTablePipelineEntryNVX const *>(&rhs);
return *this;
}
- ObjectTablePipelineEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePipelineEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTablePipelineEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePipelineEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ObjectTablePipelineEntryNVX & setPipeline( vk::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePipelineEntryNVX & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
{
pipeline = pipeline_;
return *this;
@@ -44216,19 +40940,19 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
- vk::Pipeline pipeline;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
+ VULKAN_HPP_NAMESPACE::Pipeline pipeline = {};
};
static_assert( sizeof( ObjectTablePipelineEntryNVX ) == sizeof( VkObjectTablePipelineEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTablePipelineEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTablePushConstantEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTablePushConstantEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX(),
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- vk::ShaderStageFlags stageFlags_ = vk::ShaderStageFlags() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTablePushConstantEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {},
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {},
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
, pipelineLayout( pipelineLayout_ )
@@ -44236,8 +40960,8 @@ namespace VULKAN_HPP_NAMESPACE
{}
explicit ObjectTablePushConstantEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
- vk::PipelineLayout pipelineLayout_ = vk::PipelineLayout(),
- vk::ShaderStageFlags stageFlags_ = vk::ShaderStageFlags() )
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {},
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {} )
: type( objectTableEntryNVX.type )
, flags( objectTableEntryNVX.flags )
, pipelineLayout( pipelineLayout_ )
@@ -44246,34 +40970,34 @@ namespace VULKAN_HPP_NAMESPACE
ObjectTablePushConstantEntryNVX( VkObjectTablePushConstantEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTablePushConstantEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTablePushConstantEntryNVX& operator=( VkObjectTablePushConstantEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTablePushConstantEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTablePushConstantEntryNVX const *>(&rhs);
return *this;
}
- ObjectTablePushConstantEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePushConstantEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTablePushConstantEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePushConstantEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ObjectTablePushConstantEntryNVX & setPipelineLayout( vk::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePushConstantEntryNVX & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT
{
pipelineLayout = pipelineLayout_;
return *this;
}
- ObjectTablePushConstantEntryNVX & setStageFlags( vk::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTablePushConstantEntryNVX & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
{
stageFlags = stageFlags_;
return *this;
@@ -44303,26 +41027,26 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
- vk::PipelineLayout pipelineLayout;
- vk::ShaderStageFlags stageFlags;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout = {};
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {};
};
static_assert( sizeof( ObjectTablePushConstantEntryNVX ) == sizeof( VkObjectTablePushConstantEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTablePushConstantEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct ObjectTableVertexBufferEntryNVX
{
- VULKAN_HPP_CONSTEXPR ObjectTableVertexBufferEntryNVX( vk::ObjectEntryTypeNVX type_ = vk::ObjectEntryTypeNVX::eDescriptorSet,
- vk::ObjectEntryUsageFlagsNVX flags_ = vk::ObjectEntryUsageFlagsNVX(),
- vk::Buffer buffer_ = vk::Buffer() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ObjectTableVertexBufferEntryNVX( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet,
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ = {},
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, flags( flags_ )
, buffer( buffer_ )
{}
explicit ObjectTableVertexBufferEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
- vk::Buffer buffer_ = vk::Buffer() )
+ VULKAN_HPP_NAMESPACE::Buffer buffer_ = {} )
: type( objectTableEntryNVX.type )
, flags( objectTableEntryNVX.flags )
, buffer( buffer_ )
@@ -44330,28 +41054,28 @@ namespace VULKAN_HPP_NAMESPACE
ObjectTableVertexBufferEntryNVX( VkObjectTableVertexBufferEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableVertexBufferEntryNVX*>(this) = rhs;
+ *this = rhs;
}
ObjectTableVertexBufferEntryNVX& operator=( VkObjectTableVertexBufferEntryNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkObjectTableVertexBufferEntryNVX*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ObjectTableVertexBufferEntryNVX const *>(&rhs);
return *this;
}
- ObjectTableVertexBufferEntryNVX & setType( vk::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableVertexBufferEntryNVX & setType( VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- ObjectTableVertexBufferEntryNVX & setFlags( vk::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableVertexBufferEntryNVX & setFlags( VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- ObjectTableVertexBufferEntryNVX & setBuffer( vk::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
+ ObjectTableVertexBufferEntryNVX & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
return *this;
@@ -44380,26 +41104,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ObjectEntryTypeNVX type;
- vk::ObjectEntryUsageFlagsNVX flags;
- vk::Buffer buffer;
+ VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX type = VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX::eDescriptorSet;
+ VULKAN_HPP_NAMESPACE::ObjectEntryUsageFlagsNVX flags = {};
+ VULKAN_HPP_NAMESPACE::Buffer buffer = {};
};
static_assert( sizeof( ObjectTableVertexBufferEntryNVX ) == sizeof( VkObjectTableVertexBufferEntryNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ObjectTableVertexBufferEntryNVX>::value, "struct wrapper is not a standard layout!" );
struct PastPresentationTimingGOOGLE
{
- PastPresentationTimingGOOGLE() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
PastPresentationTimingGOOGLE( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPastPresentationTimingGOOGLE*>(this) = rhs;
+ *this = rhs;
}
PastPresentationTimingGOOGLE& operator=( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPastPresentationTimingGOOGLE*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE const *>(&rhs);
return *this;
}
@@ -44428,56 +41161,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t presentID;
- uint64_t desiredPresentTime;
- uint64_t actualPresentTime;
- uint64_t earliestPresentTime;
- uint64_t presentMargin;
+ uint32_t presentID = {};
+ uint64_t desiredPresentTime = {};
+ uint64_t actualPresentTime = {};
+ uint64_t earliestPresentTime = {};
+ uint64_t presentMargin = {};
};
static_assert( sizeof( PastPresentationTimingGOOGLE ) == sizeof( VkPastPresentationTimingGOOGLE ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PastPresentationTimingGOOGLE>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PerformanceConfigurationAcquireInfoINTEL
- {
- protected:
- VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( vk::PerformanceConfigurationTypeINTEL type_ = vk::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated ) VULKAN_HPP_NOEXCEPT
- : type( type_ )
- {}
-
- PerformanceConfigurationAcquireInfoINTEL( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceConfigurationAcquireInfoINTEL*>(this) = rhs;
- }
-
- PerformanceConfigurationAcquireInfoINTEL& operator=( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceConfigurationAcquireInfoINTEL*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePerformanceConfigurationAcquireInfoINTEL;
- const void* pNext = nullptr;
- vk::PerformanceConfigurationTypeINTEL type;
- };
- static_assert( sizeof( PerformanceConfigurationAcquireInfoINTEL ) == sizeof( VkPerformanceConfigurationAcquireInfoINTEL ), "layout struct and wrapper have different size!" );
- }
-
- struct PerformanceConfigurationAcquireInfoINTEL : public layout::PerformanceConfigurationAcquireInfoINTEL
+ struct PerformanceConfigurationAcquireInfoINTEL
{
- VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( vk::PerformanceConfigurationTypeINTEL type_ = vk::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceConfigurationAcquireInfoINTEL( type_ )
+ VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated ) VULKAN_HPP_NOEXCEPT
+ : type( type_ )
{}
+ VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL ) - offsetof( PerformanceConfigurationAcquireInfoINTEL, pNext ) );
+ return *this;
+ }
+
PerformanceConfigurationAcquireInfoINTEL( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceConfigurationAcquireInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
PerformanceConfigurationAcquireInfoINTEL& operator=( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PerformanceConfigurationAcquireInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const *>(&rhs);
return *this;
}
@@ -44487,7 +41199,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PerformanceConfigurationAcquireInfoINTEL & setType( vk::PerformanceConfigurationTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceConfigurationAcquireInfoINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
@@ -44515,53 +41227,262 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PerformanceConfigurationAcquireInfoINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceConfigurationAcquireInfoINTEL;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated;
};
static_assert( sizeof( PerformanceConfigurationAcquireInfoINTEL ) == sizeof( VkPerformanceConfigurationAcquireInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PerformanceConfigurationAcquireInfoINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PerformanceCounterDescriptionKHR
{
- struct PerformanceMarkerInfoINTEL
+ PerformanceCounterDescriptionKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& category_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , name{}
+ , category{}
+ , description{}
{
- protected:
- VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( uint64_t marker_ = 0 ) VULKAN_HPP_NOEXCEPT
- : marker( marker_ )
- {}
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( name, name_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( category, category_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
+ }
- PerformanceMarkerInfoINTEL( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceMarkerInfoINTEL*>(this) = rhs;
- }
+ VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR & operator=( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR ) - offsetof( PerformanceCounterDescriptionKHR, pNext ) );
+ return *this;
+ }
- PerformanceMarkerInfoINTEL& operator=( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceMarkerInfoINTEL*>(this) = rhs;
- return *this;
- }
+ PerformanceCounterDescriptionKHR( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- public:
- vk::StructureType sType = StructureType::ePerformanceMarkerInfoINTEL;
- const void* pNext = nullptr;
- uint64_t marker;
- };
- static_assert( sizeof( PerformanceMarkerInfoINTEL ) == sizeof( VkPerformanceMarkerInfoINTEL ), "layout struct and wrapper have different size!" );
- }
+ PerformanceCounterDescriptionKHR& operator=( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR const *>(&rhs);
+ return *this;
+ }
+
+ operator VkPerformanceCounterDescriptionKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPerformanceCounterDescriptionKHR*>( this );
+ }
+
+ operator VkPerformanceCounterDescriptionKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPerformanceCounterDescriptionKHR*>( this );
+ }
+
+ bool operator==( PerformanceCounterDescriptionKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( memcmp( name, rhs.name, VK_MAX_DESCRIPTION_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( category, rhs.category, VK_MAX_DESCRIPTION_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( description, rhs.description, VK_MAX_DESCRIPTION_SIZE * sizeof( char ) ) == 0 );
+ }
+
+ bool operator!=( PerformanceCounterDescriptionKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterDescriptionKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags = {};
+ char name[VK_MAX_DESCRIPTION_SIZE] = {};
+ char category[VK_MAX_DESCRIPTION_SIZE] = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
+ };
+ static_assert( sizeof( PerformanceCounterDescriptionKHR ) == sizeof( VkPerformanceCounterDescriptionKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PerformanceCounterDescriptionKHR>::value, "struct wrapper is not a standard layout!" );
+
+ struct PerformanceCounterKHR
+ {
+ 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<uint8_t,VK_UUID_SIZE> const& uuid_ = {} ) VULKAN_HPP_NOEXCEPT
+ : unit( unit_ )
+ , scope( scope_ )
+ , storage( storage_ )
+ , uuid{}
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( uuid, uuid_ );
+ }
- struct PerformanceMarkerInfoINTEL : public layout::PerformanceMarkerInfoINTEL
+ VULKAN_HPP_NAMESPACE::PerformanceCounterKHR & operator=( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR ) - offsetof( PerformanceCounterKHR, pNext ) );
+ return *this;
+ }
+
+ PerformanceCounterKHR( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PerformanceCounterKHR& operator=( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR const *>(&rhs);
+ return *this;
+ }
+
+ operator VkPerformanceCounterKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPerformanceCounterKHR*>( this );
+ }
+
+ operator VkPerformanceCounterKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPerformanceCounterKHR*>( this );
+ }
+
+ bool operator==( PerformanceCounterKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( unit == rhs.unit )
+ && ( scope == rhs.scope )
+ && ( storage == rhs.storage )
+ && ( memcmp( uuid, rhs.uuid, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 );
+ }
+
+ bool operator!=( PerformanceCounterKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterKHR;
+ const 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;
+ uint8_t uuid[VK_UUID_SIZE] = {};
+ };
+ static_assert( sizeof( PerformanceCounterKHR ) == sizeof( VkPerformanceCounterKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PerformanceCounterKHR>::value, "struct wrapper is not a standard layout!" );
+
+ union PerformanceCounterResultKHR
{
- VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( uint64_t marker_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceMarkerInfoINTEL( marker_ )
+ PerformanceCounterResultKHR( int32_t int32_ = {} )
+ {
+ int32 = int32_;
+ }
+
+ PerformanceCounterResultKHR( int64_t int64_ )
+ {
+ int64 = int64_;
+ }
+
+ PerformanceCounterResultKHR( uint32_t uint32_ )
+ {
+ uint32 = uint32_;
+ }
+
+ PerformanceCounterResultKHR( uint64_t uint64_ )
+ {
+ uint64 = uint64_;
+ }
+
+ PerformanceCounterResultKHR( float float32_ )
+ {
+ float32 = float32_;
+ }
+
+ PerformanceCounterResultKHR( double float64_ )
+ {
+ float64 = float64_;
+ }
+
+ PerformanceCounterResultKHR & setInt32( int32_t int32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ int32 = int32_;
+ return *this;
+ }
+
+ PerformanceCounterResultKHR & setInt64( int64_t int64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ int64 = int64_;
+ return *this;
+ }
+
+ PerformanceCounterResultKHR & setUint32( uint32_t uint32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ uint32 = uint32_;
+ return *this;
+ }
+
+ PerformanceCounterResultKHR & setUint64( uint64_t uint64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ uint64 = uint64_;
+ return *this;
+ }
+
+ PerformanceCounterResultKHR & setFloat32( float float32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ float32 = float32_;
+ return *this;
+ }
+
+ PerformanceCounterResultKHR & setFloat64( double float64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ float64 = float64_;
+ return *this;
+ }
+
+ VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR & operator=( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( this, &rhs, sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR ) );
+ return *this;
+ }
+
+ operator VkPerformanceCounterResultKHR const&() const
+ {
+ return *reinterpret_cast<const VkPerformanceCounterResultKHR*>(this);
+ }
+
+ operator VkPerformanceCounterResultKHR &()
+ {
+ return *reinterpret_cast<VkPerformanceCounterResultKHR*>(this);
+ }
+
+ int32_t int32;
+ int64_t int64;
+ uint32_t uint32;
+ uint64_t uint64;
+ float float32;
+ double float64;
+ };
+
+ struct PerformanceMarkerInfoINTEL
+ {
+ VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( uint64_t marker_ = {} ) VULKAN_HPP_NOEXCEPT
+ : marker( marker_ )
{}
+ VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL ) - offsetof( PerformanceMarkerInfoINTEL, pNext ) );
+ return *this;
+ }
+
PerformanceMarkerInfoINTEL( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceMarkerInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
PerformanceMarkerInfoINTEL& operator=( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PerformanceMarkerInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL const *>(&rhs);
return *this;
}
@@ -44599,61 +41520,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PerformanceMarkerInfoINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceMarkerInfoINTEL;
+ const void* pNext = {};
+ uint64_t marker = {};
};
static_assert( sizeof( PerformanceMarkerInfoINTEL ) == sizeof( VkPerformanceMarkerInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PerformanceMarkerInfoINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PerformanceOverrideInfoINTEL
{
- struct PerformanceOverrideInfoINTEL
- {
- protected:
- VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( vk::PerformanceOverrideTypeINTEL type_ = vk::PerformanceOverrideTypeINTEL::eNullHardware,
- vk::Bool32 enable_ = 0,
- uint64_t parameter_ = 0 ) VULKAN_HPP_NOEXCEPT
- : type( type_ )
- , enable( enable_ )
- , parameter( parameter_ )
- {}
-
- PerformanceOverrideInfoINTEL( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceOverrideInfoINTEL*>(this) = rhs;
- }
-
- PerformanceOverrideInfoINTEL& operator=( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceOverrideInfoINTEL*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePerformanceOverrideInfoINTEL;
- const void* pNext = nullptr;
- vk::PerformanceOverrideTypeINTEL type;
- vk::Bool32 enable;
- uint64_t parameter;
- };
- static_assert( sizeof( PerformanceOverrideInfoINTEL ) == sizeof( VkPerformanceOverrideInfoINTEL ), "layout struct and wrapper have different size!" );
- }
-
- struct PerformanceOverrideInfoINTEL : public layout::PerformanceOverrideInfoINTEL
- {
- VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( vk::PerformanceOverrideTypeINTEL type_ = vk::PerformanceOverrideTypeINTEL::eNullHardware,
- vk::Bool32 enable_ = 0,
- uint64_t parameter_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceOverrideInfoINTEL( type_, enable_, parameter_ )
+ VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL::eNullHardware,
+ VULKAN_HPP_NAMESPACE::Bool32 enable_ = {},
+ uint64_t parameter_ = {} ) VULKAN_HPP_NOEXCEPT
+ : type( type_ )
+ , enable( enable_ )
+ , parameter( parameter_ )
{}
+ VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL ) - offsetof( PerformanceOverrideInfoINTEL, pNext ) );
+ return *this;
+ }
+
PerformanceOverrideInfoINTEL( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceOverrideInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
PerformanceOverrideInfoINTEL& operator=( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PerformanceOverrideInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL const *>(&rhs);
return *this;
}
@@ -44663,13 +41561,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PerformanceOverrideInfoINTEL & setType( vk::PerformanceOverrideTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceOverrideInfoINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- PerformanceOverrideInfoINTEL & setEnable( vk::Bool32 enable_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceOverrideInfoINTEL & setEnable( VULKAN_HPP_NAMESPACE::Bool32 enable_ ) VULKAN_HPP_NOEXCEPT
{
enable = enable_;
return *this;
@@ -44705,53 +41603,101 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PerformanceOverrideInfoINTEL::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PerformanceOverrideInfoINTEL ) == sizeof( VkPerformanceOverrideInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PerformanceOverrideInfoINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PerformanceQuerySubmitInfoKHR
{
- struct PerformanceStreamMarkerInfoINTEL
+ VULKAN_HPP_CONSTEXPR PerformanceQuerySubmitInfoKHR( uint32_t counterPassIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : counterPassIndex( counterPassIndex_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR & operator=( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( uint32_t marker_ = 0 ) VULKAN_HPP_NOEXCEPT
- : marker( marker_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR ) - offsetof( PerformanceQuerySubmitInfoKHR, pNext ) );
+ return *this;
+ }
- PerformanceStreamMarkerInfoINTEL( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceStreamMarkerInfoINTEL*>(this) = rhs;
- }
+ PerformanceQuerySubmitInfoKHR( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PerformanceStreamMarkerInfoINTEL& operator=( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPerformanceStreamMarkerInfoINTEL*>(this) = rhs;
- return *this;
- }
+ PerformanceQuerySubmitInfoKHR& operator=( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::ePerformanceStreamMarkerInfoINTEL;
- const void* pNext = nullptr;
- uint32_t marker;
- };
- static_assert( sizeof( PerformanceStreamMarkerInfoINTEL ) == sizeof( VkPerformanceStreamMarkerInfoINTEL ), "layout struct and wrapper have different size!" );
- }
+ PerformanceQuerySubmitInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
- struct PerformanceStreamMarkerInfoINTEL : public layout::PerformanceStreamMarkerInfoINTEL
+ PerformanceQuerySubmitInfoKHR & setCounterPassIndex( uint32_t counterPassIndex_ ) VULKAN_HPP_NOEXCEPT
+ {
+ counterPassIndex = counterPassIndex_;
+ return *this;
+ }
+
+ operator VkPerformanceQuerySubmitInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPerformanceQuerySubmitInfoKHR*>( this );
+ }
+
+ operator VkPerformanceQuerySubmitInfoKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPerformanceQuerySubmitInfoKHR*>( this );
+ }
+
+ bool operator==( PerformanceQuerySubmitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( counterPassIndex == rhs.counterPassIndex );
+ }
+
+ bool operator!=( PerformanceQuerySubmitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceQuerySubmitInfoKHR;
+ const void* pNext = {};
+ uint32_t counterPassIndex = {};
+ };
+ static_assert( sizeof( PerformanceQuerySubmitInfoKHR ) == sizeof( VkPerformanceQuerySubmitInfoKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PerformanceQuerySubmitInfoKHR>::value, "struct wrapper is not a standard layout!" );
+
+ struct PerformanceStreamMarkerInfoINTEL
{
- VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( uint32_t marker_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceStreamMarkerInfoINTEL( marker_ )
+ VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( uint32_t marker_ = {} ) VULKAN_HPP_NOEXCEPT
+ : marker( marker_ )
{}
+ VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL ) - offsetof( PerformanceStreamMarkerInfoINTEL, pNext ) );
+ return *this;
+ }
+
PerformanceStreamMarkerInfoINTEL( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PerformanceStreamMarkerInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
PerformanceStreamMarkerInfoINTEL& operator=( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PerformanceStreamMarkerInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL const *>(&rhs);
return *this;
}
@@ -44789,15 +41735,17 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PerformanceStreamMarkerInfoINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceStreamMarkerInfoINTEL;
+ const void* pNext = {};
+ uint32_t marker = {};
};
static_assert( sizeof( PerformanceStreamMarkerInfoINTEL ) == sizeof( VkPerformanceStreamMarkerInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PerformanceStreamMarkerInfoINTEL>::value, "struct wrapper is not a standard layout!" );
union PerformanceValueDataINTEL
{
- PerformanceValueDataINTEL( uint32_t value32_ = 0 )
+ PerformanceValueDataINTEL( uint32_t value32_ = {} )
{
value32 = value32_;
}
@@ -44835,7 +41783,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PerformanceValueDataINTEL & setValueBool( vk::Bool32 valueBool_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceValueDataINTEL & setValueBool( VULKAN_HPP_NAMESPACE::Bool32 valueBool_ ) VULKAN_HPP_NOEXCEPT
{
valueBool = valueBool_;
return *this;
@@ -44846,6 +41794,13 @@ namespace VULKAN_HPP_NAMESPACE
valueString = valueString_;
return *this;
}
+
+ VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL & operator=( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( this, &rhs, sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL ) );
+ return *this;
+ }
+
operator VkPerformanceValueDataINTEL const&() const
{
return *reinterpret_cast<const VkPerformanceValueDataINTEL*>(this);
@@ -44860,7 +41815,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t value32;
uint64_t value64;
float valueFloat;
- vk::Bool32 valueBool;
+ VULKAN_HPP_NAMESPACE::Bool32 valueBool;
const char* valueString;
#else
uint32_t value32;
@@ -44873,30 +41828,30 @@ namespace VULKAN_HPP_NAMESPACE
struct PerformanceValueINTEL
{
- PerformanceValueINTEL( vk::PerformanceValueTypeINTEL type_ = vk::PerformanceValueTypeINTEL::eUint32,
- vk::PerformanceValueDataINTEL data_ = vk::PerformanceValueDataINTEL() ) VULKAN_HPP_NOEXCEPT
+ PerformanceValueINTEL( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32,
+ VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data_ = {} ) VULKAN_HPP_NOEXCEPT
: type( type_ )
, data( data_ )
{}
PerformanceValueINTEL( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPerformanceValueINTEL*>(this) = rhs;
+ *this = rhs;
}
PerformanceValueINTEL& operator=( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPerformanceValueINTEL*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PerformanceValueINTEL const *>(&rhs);
return *this;
}
- PerformanceValueINTEL & setType( vk::PerformanceValueTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceValueINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- PerformanceValueINTEL & setData( vk::PerformanceValueDataINTEL data_ ) VULKAN_HPP_NOEXCEPT
+ PerformanceValueINTEL & setData( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data_ ) VULKAN_HPP_NOEXCEPT
{
data = data_;
return *this;
@@ -44913,65 +41868,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::PerformanceValueTypeINTEL type;
- vk::PerformanceValueDataINTEL data;
+ VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32;
+ VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data = {};
};
static_assert( sizeof( PerformanceValueINTEL ) == sizeof( VkPerformanceValueINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PerformanceValueINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDevice16BitStorageFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( vk::Bool32 storageBuffer16BitAccess_ = 0,
- vk::Bool32 uniformAndStorageBuffer16BitAccess_ = 0,
- vk::Bool32 storagePushConstant16_ = 0,
- vk::Bool32 storageInputOutput16_ = 0 ) VULKAN_HPP_NOEXCEPT
- : storageBuffer16BitAccess( storageBuffer16BitAccess_ )
- , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ )
- , storagePushConstant16( storagePushConstant16_ )
- , storageInputOutput16( storageInputOutput16_ )
- {}
-
- PhysicalDevice16BitStorageFeatures( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(this) = rhs;
- }
-
- PhysicalDevice16BitStorageFeatures& operator=( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDevice16BitStorageFeatures;
- void* pNext = nullptr;
- vk::Bool32 storageBuffer16BitAccess;
- vk::Bool32 uniformAndStorageBuffer16BitAccess;
- vk::Bool32 storagePushConstant16;
- vk::Bool32 storageInputOutput16;
- };
- static_assert( sizeof( PhysicalDevice16BitStorageFeatures ) == sizeof( VkPhysicalDevice16BitStorageFeatures ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDevice16BitStorageFeatures : public layout::PhysicalDevice16BitStorageFeatures
+ struct PhysicalDevice16BitStorageFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( vk::Bool32 storageBuffer16BitAccess_ = 0,
- vk::Bool32 uniformAndStorageBuffer16BitAccess_ = 0,
- vk::Bool32 storagePushConstant16_ = 0,
- vk::Bool32 storageInputOutput16_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevice16BitStorageFeatures( storageBuffer16BitAccess_, uniformAndStorageBuffer16BitAccess_, storagePushConstant16_, storageInputOutput16_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ = {} ) VULKAN_HPP_NOEXCEPT
+ : storageBuffer16BitAccess( storageBuffer16BitAccess_ )
+ , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ )
+ , storagePushConstant16( storagePushConstant16_ )
+ , storageInputOutput16( storageInputOutput16_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures ) - offsetof( PhysicalDevice16BitStorageFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDevice16BitStorageFeatures( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevice16BitStorageFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDevice16BitStorageFeatures& operator=( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevice16BitStorageFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures const *>(&rhs);
return *this;
}
@@ -44981,25 +41909,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDevice16BitStorageFeatures & setStorageBuffer16BitAccess( vk::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice16BitStorageFeatures & setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
{
storageBuffer16BitAccess = storageBuffer16BitAccess_;
return *this;
}
- PhysicalDevice16BitStorageFeatures & setUniformAndStorageBuffer16BitAccess( vk::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice16BitStorageFeatures & setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
{
uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_;
return *this;
}
- PhysicalDevice16BitStorageFeatures & setStoragePushConstant16( vk::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice16BitStorageFeatures & setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT
{
storagePushConstant16 = storagePushConstant16_;
return *this;
}
- PhysicalDevice16BitStorageFeatures & setStorageInputOutput16( vk::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice16BitStorageFeatures & setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT
{
storageInputOutput16 = storageInputOutput16_;
return *this;
@@ -45030,99 +41958,79 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevice16BitStorageFeatures::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDevice16BitStorageFeatures ) == sizeof( VkPhysicalDevice16BitStorageFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDevice16BitStorageFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDevice8BitStorageFeatures
{
- struct PhysicalDevice8BitStorageFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeaturesKHR( vk::Bool32 storageBuffer8BitAccess_ = 0,
- vk::Bool32 uniformAndStorageBuffer8BitAccess_ = 0,
- vk::Bool32 storagePushConstant8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : storageBuffer8BitAccess( storageBuffer8BitAccess_ )
- , uniformAndStorageBuffer8BitAccess( uniformAndStorageBuffer8BitAccess_ )
- , storagePushConstant8( storagePushConstant8_ )
- {}
-
- PhysicalDevice8BitStorageFeaturesKHR( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDevice8BitStorageFeaturesKHR& operator=( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDevice8BitStorageFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 storageBuffer8BitAccess;
- vk::Bool32 uniformAndStorageBuffer8BitAccess;
- vk::Bool32 storagePushConstant8;
- };
- static_assert( sizeof( PhysicalDevice8BitStorageFeaturesKHR ) == sizeof( VkPhysicalDevice8BitStorageFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDevice8BitStorageFeaturesKHR : public layout::PhysicalDevice8BitStorageFeaturesKHR
- {
- VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeaturesKHR( vk::Bool32 storageBuffer8BitAccess_ = 0,
- vk::Bool32 uniformAndStorageBuffer8BitAccess_ = 0,
- vk::Bool32 storagePushConstant8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevice8BitStorageFeaturesKHR( storageBuffer8BitAccess_, uniformAndStorageBuffer8BitAccess_, storagePushConstant8_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ = {} ) VULKAN_HPP_NOEXCEPT
+ : storageBuffer8BitAccess( storageBuffer8BitAccess_ )
+ , uniformAndStorageBuffer8BitAccess( uniformAndStorageBuffer8BitAccess_ )
+ , storagePushConstant8( storagePushConstant8_ )
{}
- PhysicalDevice8BitStorageFeaturesKHR( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevice8BitStorageFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures ) - offsetof( PhysicalDevice8BitStorageFeatures, pNext ) );
+ return *this;
+ }
- PhysicalDevice8BitStorageFeaturesKHR& operator=( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice8BitStorageFeatures( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevice8BitStorageFeaturesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDevice8BitStorageFeatures& operator=( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures const *>(&rhs);
return *this;
}
- PhysicalDevice8BitStorageFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice8BitStorageFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDevice8BitStorageFeaturesKHR & setStorageBuffer8BitAccess( vk::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice8BitStorageFeatures & setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
{
storageBuffer8BitAccess = storageBuffer8BitAccess_;
return *this;
}
- PhysicalDevice8BitStorageFeaturesKHR & setUniformAndStorageBuffer8BitAccess( vk::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice8BitStorageFeatures & setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
{
uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_;
return *this;
}
- PhysicalDevice8BitStorageFeaturesKHR & setStoragePushConstant8( vk::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevice8BitStorageFeatures & setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT
{
storagePushConstant8 = storagePushConstant8_;
return *this;
}
- operator VkPhysicalDevice8BitStorageFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDevice8BitStorageFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDevice8BitStorageFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDevice8BitStorageFeatures*>( this );
}
- operator VkPhysicalDevice8BitStorageFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDevice8BitStorageFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDevice8BitStorageFeatures*>( this );
}
- bool operator==( PhysicalDevice8BitStorageFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDevice8BitStorageFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -45131,58 +42039,41 @@ namespace VULKAN_HPP_NAMESPACE
&& ( storagePushConstant8 == rhs.storagePushConstant8 );
}
- bool operator!=( PhysicalDevice8BitStorageFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDevice8BitStorageFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevice8BitStorageFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice8BitStorageFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess = {};
+ VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess = {};
+ VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8 = {};
};
- static_assert( sizeof( PhysicalDevice8BitStorageFeaturesKHR ) == sizeof( VkPhysicalDevice8BitStorageFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDevice8BitStorageFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceASTCDecodeFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( vk::Bool32 decodeModeSharedExponent_ = 0 ) VULKAN_HPP_NOEXCEPT
- : decodeModeSharedExponent( decodeModeSharedExponent_ )
- {}
-
- PhysicalDeviceASTCDecodeFeaturesEXT( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceASTCDecodeFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceASTCDecodeFeaturesEXT& operator=( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceASTCDecodeFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 decodeModeSharedExponent;
- };
- static_assert( sizeof( PhysicalDeviceASTCDecodeFeaturesEXT ) == sizeof( VkPhysicalDeviceASTCDecodeFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( PhysicalDevice8BitStorageFeatures ) == sizeof( VkPhysicalDevice8BitStorageFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevice8BitStorageFeatures>::value, "struct wrapper is not a standard layout!" );
- struct PhysicalDeviceASTCDecodeFeaturesEXT : public layout::PhysicalDeviceASTCDecodeFeaturesEXT
+ struct PhysicalDeviceASTCDecodeFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( vk::Bool32 decodeModeSharedExponent_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceASTCDecodeFeaturesEXT( decodeModeSharedExponent_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ = {} ) VULKAN_HPP_NOEXCEPT
+ : decodeModeSharedExponent( decodeModeSharedExponent_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT ) - offsetof( PhysicalDeviceASTCDecodeFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceASTCDecodeFeaturesEXT( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceASTCDecodeFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceASTCDecodeFeaturesEXT& operator=( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceASTCDecodeFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT const *>(&rhs);
return *this;
}
@@ -45192,7 +42083,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceASTCDecodeFeaturesEXT & setDecodeModeSharedExponent( vk::Bool32 decodeModeSharedExponent_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceASTCDecodeFeaturesEXT & setDecodeModeSharedExponent( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ ) VULKAN_HPP_NOEXCEPT
{
decodeModeSharedExponent = decodeModeSharedExponent_;
return *this;
@@ -45220,53 +42111,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceASTCDecodeFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent = {};
};
static_assert( sizeof( PhysicalDeviceASTCDecodeFeaturesEXT ) == sizeof( VkPhysicalDeviceASTCDecodeFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceASTCDecodeFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( vk::Bool32 advancedBlendCoherentOperations_ = 0 ) VULKAN_HPP_NOEXCEPT
- : advancedBlendCoherentOperations( advancedBlendCoherentOperations_ )
- {}
-
- PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceBlendOperationAdvancedFeaturesEXT& operator=( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 advancedBlendCoherentOperations;
- };
- static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT : public layout::PhysicalDeviceBlendOperationAdvancedFeaturesEXT
+ struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( vk::Bool32 advancedBlendCoherentOperations_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBlendOperationAdvancedFeaturesEXT( advancedBlendCoherentOperations_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ = {} ) VULKAN_HPP_NOEXCEPT
+ : advancedBlendCoherentOperations( advancedBlendCoherentOperations_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) - offsetof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBlendOperationAdvancedFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceBlendOperationAdvancedFeaturesEXT& operator=( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceBlendOperationAdvancedFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT const *>(&rhs);
return *this;
}
@@ -45276,7 +42148,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setAdvancedBlendCoherentOperations( vk::Bool32 advancedBlendCoherentOperations_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setAdvancedBlendCoherentOperations( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ ) VULKAN_HPP_NOEXCEPT
{
advancedBlendCoherentOperations = advancedBlendCoherentOperations_;
return *this;
@@ -45304,57 +42176,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceBlendOperationAdvancedFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations = {};
};
static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceBlendOperationAdvancedFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT
- {
- protected:
- PhysicalDeviceBlendOperationAdvancedPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceBlendOperationAdvancedPropertiesEXT( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceBlendOperationAdvancedPropertiesEXT& operator=( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT;
- void* pNext = nullptr;
- uint32_t advancedBlendMaxColorAttachments;
- vk::Bool32 advancedBlendIndependentBlend;
- vk::Bool32 advancedBlendNonPremultipliedSrcColor;
- vk::Bool32 advancedBlendNonPremultipliedDstColor;
- vk::Bool32 advancedBlendCorrelatedOverlap;
- vk::Bool32 advancedBlendAllOperations;
- };
- static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT : public layout::PhysicalDeviceBlendOperationAdvancedPropertiesEXT
+ struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT
{
- PhysicalDeviceBlendOperationAdvancedPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBlendOperationAdvancedPropertiesEXT()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : advancedBlendMaxColorAttachments( advancedBlendMaxColorAttachments_ )
+ , advancedBlendIndependentBlend( advancedBlendIndependentBlend_ )
+ , advancedBlendNonPremultipliedSrcColor( advancedBlendNonPremultipliedSrcColor_ )
+ , advancedBlendNonPremultipliedDstColor( advancedBlendNonPremultipliedDstColor_ )
+ , advancedBlendCorrelatedOverlap( advancedBlendCorrelatedOverlap_ )
+ , advancedBlendAllOperations( advancedBlendAllOperations_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) - offsetof( PhysicalDeviceBlendOperationAdvancedPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceBlendOperationAdvancedPropertiesEXT( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBlendOperationAdvancedPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceBlendOperationAdvancedPropertiesEXT& operator=( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceBlendOperationAdvancedPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT const *>(&rhs);
return *this;
}
@@ -45385,61 +42244,128 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceBlendOperationAdvancedPropertiesEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceBlendOperationAdvancedPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceBufferDeviceAddressFeatures
{
- struct PhysicalDeviceBufferDeviceAddressFeaturesEXT
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeatures( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {} ) VULKAN_HPP_NOEXCEPT
+ : bufferDeviceAddress( bufferDeviceAddress_ )
+ , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ )
+ , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( vk::Bool32 bufferDeviceAddress_ = 0,
- vk::Bool32 bufferDeviceAddressCaptureReplay_ = 0,
- vk::Bool32 bufferDeviceAddressMultiDevice_ = 0 ) VULKAN_HPP_NOEXCEPT
- : bufferDeviceAddress( bufferDeviceAddress_ )
- , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ )
- , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures ) - offsetof( PhysicalDeviceBufferDeviceAddressFeatures, pNext ) );
+ return *this;
+ }
- PhysicalDeviceBufferDeviceAddressFeaturesEXT( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBufferDeviceAddressFeaturesEXT*>(this) = rhs;
- }
+ PhysicalDeviceBufferDeviceAddressFeatures( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceBufferDeviceAddressFeaturesEXT& operator=( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceBufferDeviceAddressFeaturesEXT*>(this) = rhs;
- return *this;
- }
+ PhysicalDeviceBufferDeviceAddressFeatures& operator=( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 bufferDeviceAddress;
- vk::Bool32 bufferDeviceAddressCaptureReplay;
- vk::Bool32 bufferDeviceAddressMultiDevice;
- };
- static_assert( sizeof( PhysicalDeviceBufferDeviceAddressFeaturesEXT ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
+ PhysicalDeviceBufferDeviceAddressFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
- struct PhysicalDeviceBufferDeviceAddressFeaturesEXT : public layout::PhysicalDeviceBufferDeviceAddressFeaturesEXT
+ PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddress = bufferDeviceAddress_;
+ return *this;
+ }
+
+ PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_;
+ return *this;
+ }
+
+ PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceBufferDeviceAddressFeatures const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceBufferDeviceAddressFeatures*>( this );
+ }
+
+ operator VkPhysicalDeviceBufferDeviceAddressFeatures &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceBufferDeviceAddressFeatures*>( this );
+ }
+
+ bool operator==( PhysicalDeviceBufferDeviceAddressFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( bufferDeviceAddress == rhs.bufferDeviceAddress )
+ && ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay )
+ && ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice );
+ }
+
+ bool operator!=( PhysicalDeviceBufferDeviceAddressFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {};
+ };
+ static_assert( sizeof( PhysicalDeviceBufferDeviceAddressFeatures ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceBufferDeviceAddressFeatures>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceBufferDeviceAddressFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( vk::Bool32 bufferDeviceAddress_ = 0,
- vk::Bool32 bufferDeviceAddressCaptureReplay_ = 0,
- vk::Bool32 bufferDeviceAddressMultiDevice_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBufferDeviceAddressFeaturesEXT( bufferDeviceAddress_, bufferDeviceAddressCaptureReplay_, bufferDeviceAddressMultiDevice_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {} ) VULKAN_HPP_NOEXCEPT
+ : bufferDeviceAddress( bufferDeviceAddress_ )
+ , bufferDeviceAddressCaptureReplay( bufferDeviceAddressCaptureReplay_ )
+ , bufferDeviceAddressMultiDevice( bufferDeviceAddressMultiDevice_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT ) - offsetof( PhysicalDeviceBufferDeviceAddressFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceBufferDeviceAddressFeaturesEXT( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceBufferDeviceAddressFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceBufferDeviceAddressFeaturesEXT& operator=( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceBufferDeviceAddressFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT const *>(&rhs);
return *this;
}
@@ -45449,19 +42375,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddress( vk::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT
{
bufferDeviceAddress = bufferDeviceAddress_;
return *this;
}
- PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressCaptureReplay( vk::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT
{
bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_;
return *this;
}
- PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressMultiDevice( vk::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT
{
bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_;
return *this;
@@ -45491,53 +42417,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceBufferDeviceAddressFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {};
+ VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {};
};
static_assert( sizeof( PhysicalDeviceBufferDeviceAddressFeaturesEXT ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceBufferDeviceAddressFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceCoherentMemoryFeaturesAMD
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( vk::Bool32 deviceCoherentMemory_ = 0 ) VULKAN_HPP_NOEXCEPT
- : deviceCoherentMemory( deviceCoherentMemory_ )
- {}
-
- PhysicalDeviceCoherentMemoryFeaturesAMD( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCoherentMemoryFeaturesAMD*>(this) = rhs;
- }
-
- PhysicalDeviceCoherentMemoryFeaturesAMD& operator=( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCoherentMemoryFeaturesAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD;
- void* pNext = nullptr;
- vk::Bool32 deviceCoherentMemory;
- };
- static_assert( sizeof( PhysicalDeviceCoherentMemoryFeaturesAMD ) == sizeof( VkPhysicalDeviceCoherentMemoryFeaturesAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceCoherentMemoryFeaturesAMD : public layout::PhysicalDeviceCoherentMemoryFeaturesAMD
+ struct PhysicalDeviceCoherentMemoryFeaturesAMD
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( vk::Bool32 deviceCoherentMemory_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCoherentMemoryFeaturesAMD( deviceCoherentMemory_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceCoherentMemory( deviceCoherentMemory_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD ) - offsetof( PhysicalDeviceCoherentMemoryFeaturesAMD, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceCoherentMemoryFeaturesAMD( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCoherentMemoryFeaturesAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceCoherentMemoryFeaturesAMD& operator=( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceCoherentMemoryFeaturesAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD const *>(&rhs);
return *this;
}
@@ -45547,7 +42456,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceCoherentMemoryFeaturesAMD & setDeviceCoherentMemory( vk::Bool32 deviceCoherentMemory_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceCoherentMemoryFeaturesAMD & setDeviceCoherentMemory( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ ) VULKAN_HPP_NOEXCEPT
{
deviceCoherentMemory = deviceCoherentMemory_;
return *this;
@@ -45575,57 +42484,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceCoherentMemoryFeaturesAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory = {};
};
static_assert( sizeof( PhysicalDeviceCoherentMemoryFeaturesAMD ) == sizeof( VkPhysicalDeviceCoherentMemoryFeaturesAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceCoherentMemoryFeaturesAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceComputeShaderDerivativesFeaturesNV
{
- struct PhysicalDeviceComputeShaderDerivativesFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesNV( vk::Bool32 computeDerivativeGroupQuads_ = 0,
- vk::Bool32 computeDerivativeGroupLinear_ = 0 ) VULKAN_HPP_NOEXCEPT
- : computeDerivativeGroupQuads( computeDerivativeGroupQuads_ )
- , computeDerivativeGroupLinear( computeDerivativeGroupLinear_ )
- {}
-
- PhysicalDeviceComputeShaderDerivativesFeaturesNV( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceComputeShaderDerivativesFeaturesNV& operator=( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 computeDerivativeGroupQuads;
- vk::Bool32 computeDerivativeGroupLinear;
- };
- static_assert( sizeof( PhysicalDeviceComputeShaderDerivativesFeaturesNV ) == sizeof( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceComputeShaderDerivativesFeaturesNV : public layout::PhysicalDeviceComputeShaderDerivativesFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesNV( vk::Bool32 computeDerivativeGroupQuads_ = 0,
- vk::Bool32 computeDerivativeGroupLinear_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceComputeShaderDerivativesFeaturesNV( computeDerivativeGroupQuads_, computeDerivativeGroupLinear_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ = {} ) VULKAN_HPP_NOEXCEPT
+ : computeDerivativeGroupQuads( computeDerivativeGroupQuads_ )
+ , computeDerivativeGroupLinear( computeDerivativeGroupLinear_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV ) - offsetof( PhysicalDeviceComputeShaderDerivativesFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceComputeShaderDerivativesFeaturesNV( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceComputeShaderDerivativesFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceComputeShaderDerivativesFeaturesNV& operator=( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceComputeShaderDerivativesFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesNV const *>(&rhs);
return *this;
}
@@ -45635,13 +42523,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceComputeShaderDerivativesFeaturesNV & setComputeDerivativeGroupQuads( vk::Bool32 computeDerivativeGroupQuads_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV & setComputeDerivativeGroupQuads( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ ) VULKAN_HPP_NOEXCEPT
{
computeDerivativeGroupQuads = computeDerivativeGroupQuads_;
return *this;
}
- PhysicalDeviceComputeShaderDerivativesFeaturesNV & setComputeDerivativeGroupLinear( vk::Bool32 computeDerivativeGroupLinear_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV & setComputeDerivativeGroupLinear( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ ) VULKAN_HPP_NOEXCEPT
{
computeDerivativeGroupLinear = computeDerivativeGroupLinear_;
return *this;
@@ -45670,57 +42558,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceComputeShaderDerivativesFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads = {};
+ VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear = {};
};
static_assert( sizeof( PhysicalDeviceComputeShaderDerivativesFeaturesNV ) == sizeof( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceComputeShaderDerivativesFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceConditionalRenderingFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( vk::Bool32 conditionalRendering_ = 0,
- vk::Bool32 inheritedConditionalRendering_ = 0 ) VULKAN_HPP_NOEXCEPT
- : conditionalRendering( conditionalRendering_ )
- , inheritedConditionalRendering( inheritedConditionalRendering_ )
- {}
-
- PhysicalDeviceConditionalRenderingFeaturesEXT( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceConditionalRenderingFeaturesEXT& operator=( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 conditionalRendering;
- vk::Bool32 inheritedConditionalRendering;
- };
- static_assert( sizeof( PhysicalDeviceConditionalRenderingFeaturesEXT ) == sizeof( VkPhysicalDeviceConditionalRenderingFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceConditionalRenderingFeaturesEXT : public layout::PhysicalDeviceConditionalRenderingFeaturesEXT
+ struct PhysicalDeviceConditionalRenderingFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( vk::Bool32 conditionalRendering_ = 0,
- vk::Bool32 inheritedConditionalRendering_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceConditionalRenderingFeaturesEXT( conditionalRendering_, inheritedConditionalRendering_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ = {} ) VULKAN_HPP_NOEXCEPT
+ : conditionalRendering( conditionalRendering_ )
+ , inheritedConditionalRendering( inheritedConditionalRendering_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT ) - offsetof( PhysicalDeviceConditionalRenderingFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceConditionalRenderingFeaturesEXT( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceConditionalRenderingFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceConditionalRenderingFeaturesEXT& operator=( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceConditionalRenderingFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT const *>(&rhs);
return *this;
}
@@ -45730,13 +42598,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceConditionalRenderingFeaturesEXT & setConditionalRendering( vk::Bool32 conditionalRendering_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceConditionalRenderingFeaturesEXT & setConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ ) VULKAN_HPP_NOEXCEPT
{
conditionalRendering = conditionalRendering_;
return *this;
}
- PhysicalDeviceConditionalRenderingFeaturesEXT & setInheritedConditionalRendering( vk::Bool32 inheritedConditionalRendering_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceConditionalRenderingFeaturesEXT & setInheritedConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ ) VULKAN_HPP_NOEXCEPT
{
inheritedConditionalRendering = inheritedConditionalRendering_;
return *this;
@@ -45765,60 +42633,51 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceConditionalRenderingFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering = {};
+ VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering = {};
};
static_assert( sizeof( PhysicalDeviceConditionalRenderingFeaturesEXT ) == sizeof( VkPhysicalDeviceConditionalRenderingFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceConditionalRenderingFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceConservativeRasterizationPropertiesEXT
{
- struct PhysicalDeviceConservativeRasterizationPropertiesEXT
- {
- protected:
- PhysicalDeviceConservativeRasterizationPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceConservativeRasterizationPropertiesEXT& operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT;
- void* pNext = nullptr;
- float primitiveOverestimationSize;
- float maxExtraPrimitiveOverestimationSize;
- float extraPrimitiveOverestimationSizeGranularity;
- vk::Bool32 primitiveUnderestimation;
- vk::Bool32 conservativePointAndLineRasterization;
- vk::Bool32 degenerateTrianglesRasterized;
- vk::Bool32 degenerateLinesRasterized;
- vk::Bool32 fullyCoveredFragmentShaderInputVariable;
- vk::Bool32 conservativeRasterizationPostDepthCoverage;
- };
- static_assert( sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceConservativeRasterizationPropertiesEXT : public layout::PhysicalDeviceConservativeRasterizationPropertiesEXT
- {
- PhysicalDeviceConservativeRasterizationPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceConservativeRasterizationPropertiesEXT()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : primitiveOverestimationSize( primitiveOverestimationSize_ )
+ , maxExtraPrimitiveOverestimationSize( maxExtraPrimitiveOverestimationSize_ )
+ , extraPrimitiveOverestimationSizeGranularity( extraPrimitiveOverestimationSizeGranularity_ )
+ , primitiveUnderestimation( primitiveUnderestimation_ )
+ , conservativePointAndLineRasterization( conservativePointAndLineRasterization_ )
+ , degenerateTrianglesRasterized( degenerateTrianglesRasterized_ )
+ , degenerateLinesRasterized( degenerateLinesRasterized_ )
+ , fullyCoveredFragmentShaderInputVariable( fullyCoveredFragmentShaderInputVariable_ )
+ , conservativeRasterizationPostDepthCoverage( conservativeRasterizationPostDepthCoverage_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT ) - offsetof( PhysicalDeviceConservativeRasterizationPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceConservativeRasterizationPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceConservativeRasterizationPropertiesEXT& operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceConservativeRasterizationPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT const *>(&rhs);
return *this;
}
@@ -45852,57 +42711,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceConservativeRasterizationPropertiesEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceConservativeRasterizationPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceCooperativeMatrixFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( vk::Bool32 cooperativeMatrix_ = 0,
- vk::Bool32 cooperativeMatrixRobustBufferAccess_ = 0 ) VULKAN_HPP_NOEXCEPT
- : cooperativeMatrix( cooperativeMatrix_ )
- , cooperativeMatrixRobustBufferAccess( cooperativeMatrixRobustBufferAccess_ )
- {}
-
- PhysicalDeviceCooperativeMatrixFeaturesNV( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCooperativeMatrixFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceCooperativeMatrixFeaturesNV& operator=( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCooperativeMatrixFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 cooperativeMatrix;
- vk::Bool32 cooperativeMatrixRobustBufferAccess;
- };
- static_assert( sizeof( PhysicalDeviceCooperativeMatrixFeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceCooperativeMatrixFeaturesNV : public layout::PhysicalDeviceCooperativeMatrixFeaturesNV
+ struct PhysicalDeviceCooperativeMatrixFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( vk::Bool32 cooperativeMatrix_ = 0,
- vk::Bool32 cooperativeMatrixRobustBufferAccess_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCooperativeMatrixFeaturesNV( cooperativeMatrix_, cooperativeMatrixRobustBufferAccess_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ = {} ) VULKAN_HPP_NOEXCEPT
+ : cooperativeMatrix( cooperativeMatrix_ )
+ , cooperativeMatrixRobustBufferAccess( cooperativeMatrixRobustBufferAccess_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV ) - offsetof( PhysicalDeviceCooperativeMatrixFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceCooperativeMatrixFeaturesNV( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCooperativeMatrixFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceCooperativeMatrixFeaturesNV& operator=( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceCooperativeMatrixFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV const *>(&rhs);
return *this;
}
@@ -45912,13 +42758,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrix( vk::Bool32 cooperativeMatrix_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrix( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ ) VULKAN_HPP_NOEXCEPT
{
cooperativeMatrix = cooperativeMatrix_;
return *this;
}
- PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrixRobustBufferAccess( vk::Bool32 cooperativeMatrixRobustBufferAccess_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrixRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ ) VULKAN_HPP_NOEXCEPT
{
cooperativeMatrixRobustBufferAccess = cooperativeMatrixRobustBufferAccess_;
return *this;
@@ -45947,52 +42793,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceCooperativeMatrixFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix = {};
+ VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess = {};
};
static_assert( sizeof( PhysicalDeviceCooperativeMatrixFeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceCooperativeMatrixFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceCooperativeMatrixPropertiesNV
- {
- protected:
- PhysicalDeviceCooperativeMatrixPropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCooperativeMatrixPropertiesNV*>(this) = rhs;
- }
-
- PhysicalDeviceCooperativeMatrixPropertiesNV& operator=( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCooperativeMatrixPropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV;
- void* pNext = nullptr;
- vk::ShaderStageFlags cooperativeMatrixSupportedStages;
- };
- static_assert( sizeof( PhysicalDeviceCooperativeMatrixPropertiesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixPropertiesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceCooperativeMatrixPropertiesNV : public layout::PhysicalDeviceCooperativeMatrixPropertiesNV
+ struct PhysicalDeviceCooperativeMatrixPropertiesNV
{
- PhysicalDeviceCooperativeMatrixPropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCooperativeMatrixPropertiesNV()
+ PhysicalDeviceCooperativeMatrixPropertiesNV( VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages_ = {} ) VULKAN_HPP_NOEXCEPT
+ : cooperativeMatrixSupportedStages( cooperativeMatrixSupportedStages_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV ) - offsetof( PhysicalDeviceCooperativeMatrixPropertiesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCooperativeMatrixPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceCooperativeMatrixPropertiesNV& operator=( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceCooperativeMatrixPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV const *>(&rhs);
return *this;
}
@@ -46018,53 +42847,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceCooperativeMatrixPropertiesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages = {};
};
static_assert( sizeof( PhysicalDeviceCooperativeMatrixPropertiesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceCooperativeMatrixPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceCornerSampledImageFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( vk::Bool32 cornerSampledImage_ = 0 ) VULKAN_HPP_NOEXCEPT
- : cornerSampledImage( cornerSampledImage_ )
- {}
-
- PhysicalDeviceCornerSampledImageFeaturesNV( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCornerSampledImageFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceCornerSampledImageFeaturesNV& operator=( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCornerSampledImageFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 cornerSampledImage;
- };
- static_assert( sizeof( PhysicalDeviceCornerSampledImageFeaturesNV ) == sizeof( VkPhysicalDeviceCornerSampledImageFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceCornerSampledImageFeaturesNV : public layout::PhysicalDeviceCornerSampledImageFeaturesNV
+ struct PhysicalDeviceCornerSampledImageFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( vk::Bool32 cornerSampledImage_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCornerSampledImageFeaturesNV( cornerSampledImage_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ = {} ) VULKAN_HPP_NOEXCEPT
+ : cornerSampledImage( cornerSampledImage_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV ) - offsetof( PhysicalDeviceCornerSampledImageFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceCornerSampledImageFeaturesNV( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCornerSampledImageFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceCornerSampledImageFeaturesNV& operator=( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceCornerSampledImageFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV const *>(&rhs);
return *this;
}
@@ -46074,7 +42884,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceCornerSampledImageFeaturesNV & setCornerSampledImage( vk::Bool32 cornerSampledImage_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceCornerSampledImageFeaturesNV & setCornerSampledImage( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ ) VULKAN_HPP_NOEXCEPT
{
cornerSampledImage = cornerSampledImage_;
return *this;
@@ -46102,53 +42912,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceCornerSampledImageFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage = {};
};
static_assert( sizeof( PhysicalDeviceCornerSampledImageFeaturesNV ) == sizeof( VkPhysicalDeviceCornerSampledImageFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceCornerSampledImageFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceCoverageReductionModeFeaturesNV
{
- struct PhysicalDeviceCoverageReductionModeFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( vk::Bool32 coverageReductionMode_ = 0 ) VULKAN_HPP_NOEXCEPT
- : coverageReductionMode( coverageReductionMode_ )
- {}
-
- PhysicalDeviceCoverageReductionModeFeaturesNV( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCoverageReductionModeFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceCoverageReductionModeFeaturesNV& operator=( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceCoverageReductionModeFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 coverageReductionMode;
- };
- static_assert( sizeof( PhysicalDeviceCoverageReductionModeFeaturesNV ) == sizeof( VkPhysicalDeviceCoverageReductionModeFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceCoverageReductionModeFeaturesNV : public layout::PhysicalDeviceCoverageReductionModeFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( vk::Bool32 coverageReductionMode_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCoverageReductionModeFeaturesNV( coverageReductionMode_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ = {} ) VULKAN_HPP_NOEXCEPT
+ : coverageReductionMode( coverageReductionMode_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV ) - offsetof( PhysicalDeviceCoverageReductionModeFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceCoverageReductionModeFeaturesNV( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceCoverageReductionModeFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceCoverageReductionModeFeaturesNV& operator=( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceCoverageReductionModeFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV const *>(&rhs);
return *this;
}
@@ -46158,7 +42949,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceCoverageReductionModeFeaturesNV & setCoverageReductionMode( vk::Bool32 coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceCoverageReductionModeFeaturesNV & setCoverageReductionMode( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT
{
coverageReductionMode = coverageReductionMode_;
return *this;
@@ -46186,53 +42977,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceCoverageReductionModeFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode = {};
};
static_assert( sizeof( PhysicalDeviceCoverageReductionModeFeaturesNV ) == sizeof( VkPhysicalDeviceCoverageReductionModeFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceCoverageReductionModeFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
{
- struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( vk::Bool32 dedicatedAllocationImageAliasing_ = 0 ) VULKAN_HPP_NOEXCEPT
- : dedicatedAllocationImageAliasing( dedicatedAllocationImageAliasing_ )
- {}
-
- PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV& operator=( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 dedicatedAllocationImageAliasing;
- };
- static_assert( sizeof( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) == sizeof( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV : public layout::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( vk::Bool32 dedicatedAllocationImageAliasing_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( dedicatedAllocationImageAliasing_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ = {} ) VULKAN_HPP_NOEXCEPT
+ : dedicatedAllocationImageAliasing( dedicatedAllocationImageAliasing_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) - offsetof( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV& operator=( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const *>(&rhs);
return *this;
}
@@ -46242,7 +43014,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setDedicatedAllocationImageAliasing( vk::Bool32 dedicatedAllocationImageAliasing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setDedicatedAllocationImageAliasing( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ ) VULKAN_HPP_NOEXCEPT
{
dedicatedAllocationImageAliasing = dedicatedAllocationImageAliasing_;
return *this;
@@ -46270,53 +43042,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing = {};
};
static_assert( sizeof( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) == sizeof( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceDepthClipEnableFeaturesEXT
{
- struct PhysicalDeviceDepthClipEnableFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( vk::Bool32 depthClipEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : depthClipEnable( depthClipEnable_ )
- {}
-
- PhysicalDeviceDepthClipEnableFeaturesEXT( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDepthClipEnableFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceDepthClipEnableFeaturesEXT& operator=( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDepthClipEnableFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 depthClipEnable;
- };
- static_assert( sizeof( PhysicalDeviceDepthClipEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipEnableFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDepthClipEnableFeaturesEXT : public layout::PhysicalDeviceDepthClipEnableFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( vk::Bool32 depthClipEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDepthClipEnableFeaturesEXT( depthClipEnable_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : depthClipEnable( depthClipEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT ) - offsetof( PhysicalDeviceDepthClipEnableFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceDepthClipEnableFeaturesEXT( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDepthClipEnableFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceDepthClipEnableFeaturesEXT& operator=( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceDepthClipEnableFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT const *>(&rhs);
return *this;
}
@@ -46326,7 +43079,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceDepthClipEnableFeaturesEXT & setDepthClipEnable( vk::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDepthClipEnableFeaturesEXT & setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthClipEnable = depthClipEnable_;
return *this;
@@ -46354,69 +43107,54 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDepthClipEnableFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {};
};
static_assert( sizeof( PhysicalDeviceDepthClipEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipEnableFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceDepthClipEnableFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceDepthStencilResolvePropertiesKHR
- {
- protected:
- PhysicalDeviceDepthStencilResolvePropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceDepthStencilResolvePropertiesKHR( VkPhysicalDeviceDepthStencilResolvePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDepthStencilResolvePropertiesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceDepthStencilResolvePropertiesKHR& operator=( VkPhysicalDeviceDepthStencilResolvePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDepthStencilResolvePropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDepthStencilResolvePropertiesKHR;
- void* pNext = nullptr;
- vk::ResolveModeFlagsKHR supportedDepthResolveModes;
- vk::ResolveModeFlagsKHR supportedStencilResolveModes;
- vk::Bool32 independentResolveNone;
- vk::Bool32 independentResolve;
- };
- static_assert( sizeof( PhysicalDeviceDepthStencilResolvePropertiesKHR ) == sizeof( VkPhysicalDeviceDepthStencilResolvePropertiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDepthStencilResolvePropertiesKHR : public layout::PhysicalDeviceDepthStencilResolvePropertiesKHR
+ struct PhysicalDeviceDepthStencilResolveProperties
{
- PhysicalDeviceDepthStencilResolvePropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDepthStencilResolvePropertiesKHR()
+ PhysicalDeviceDepthStencilResolveProperties( VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ = {},
+ VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ = {} ) VULKAN_HPP_NOEXCEPT
+ : supportedDepthResolveModes( supportedDepthResolveModes_ )
+ , supportedStencilResolveModes( supportedStencilResolveModes_ )
+ , independentResolveNone( independentResolveNone_ )
+ , independentResolve( independentResolve_ )
{}
- PhysicalDeviceDepthStencilResolvePropertiesKHR( VkPhysicalDeviceDepthStencilResolvePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDepthStencilResolvePropertiesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties ) - offsetof( PhysicalDeviceDepthStencilResolveProperties, pNext ) );
+ return *this;
+ }
- PhysicalDeviceDepthStencilResolvePropertiesKHR& operator=( VkPhysicalDeviceDepthStencilResolvePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDepthStencilResolveProperties( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceDepthStencilResolvePropertiesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceDepthStencilResolveProperties& operator=( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties const *>(&rhs);
return *this;
}
- operator VkPhysicalDeviceDepthStencilResolvePropertiesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDepthStencilResolveProperties const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceDepthStencilResolvePropertiesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceDepthStencilResolveProperties*>( this );
}
- operator VkPhysicalDeviceDepthStencilResolvePropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDepthStencilResolveProperties &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceDepthStencilResolvePropertiesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceDepthStencilResolveProperties*>( this );
}
- bool operator==( PhysicalDeviceDepthStencilResolvePropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceDepthStencilResolveProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -46426,274 +43164,220 @@ namespace VULKAN_HPP_NAMESPACE
&& ( independentResolve == rhs.independentResolve );
}
- bool operator!=( PhysicalDeviceDepthStencilResolvePropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceDepthStencilResolveProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDepthStencilResolvePropertiesKHR::sType;
- };
- static_assert( sizeof( PhysicalDeviceDepthStencilResolvePropertiesKHR ) == sizeof( VkPhysicalDeviceDepthStencilResolvePropertiesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceDepthStencilResolvePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceDescriptorIndexingFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeaturesEXT( vk::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderSampledImageArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageImageArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingUpdateUnusedWhilePending_ = 0,
- vk::Bool32 descriptorBindingPartiallyBound_ = 0,
- vk::Bool32 descriptorBindingVariableDescriptorCount_ = 0,
- vk::Bool32 runtimeDescriptorArray_ = 0 ) VULKAN_HPP_NOEXCEPT
- : 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_ )
- {}
-
- PhysicalDeviceDescriptorIndexingFeaturesEXT( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceDescriptorIndexingFeaturesEXT& operator=( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 shaderInputAttachmentArrayDynamicIndexing;
- vk::Bool32 shaderUniformTexelBufferArrayDynamicIndexing;
- vk::Bool32 shaderStorageTexelBufferArrayDynamicIndexing;
- vk::Bool32 shaderUniformBufferArrayNonUniformIndexing;
- vk::Bool32 shaderSampledImageArrayNonUniformIndexing;
- vk::Bool32 shaderStorageBufferArrayNonUniformIndexing;
- vk::Bool32 shaderStorageImageArrayNonUniformIndexing;
- vk::Bool32 shaderInputAttachmentArrayNonUniformIndexing;
- vk::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing;
- vk::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing;
- vk::Bool32 descriptorBindingUniformBufferUpdateAfterBind;
- vk::Bool32 descriptorBindingSampledImageUpdateAfterBind;
- vk::Bool32 descriptorBindingStorageImageUpdateAfterBind;
- vk::Bool32 descriptorBindingStorageBufferUpdateAfterBind;
- vk::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind;
- vk::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind;
- vk::Bool32 descriptorBindingUpdateUnusedWhilePending;
- vk::Bool32 descriptorBindingPartiallyBound;
- vk::Bool32 descriptorBindingVariableDescriptorCount;
- vk::Bool32 runtimeDescriptorArray;
- };
- static_assert( sizeof( PhysicalDeviceDescriptorIndexingFeaturesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDescriptorIndexingFeaturesEXT : public layout::PhysicalDeviceDescriptorIndexingFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeaturesEXT( vk::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = 0,
- vk::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderSampledImageArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageImageArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = 0,
- vk::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = 0,
- vk::Bool32 descriptorBindingUpdateUnusedWhilePending_ = 0,
- vk::Bool32 descriptorBindingPartiallyBound_ = 0,
- vk::Bool32 descriptorBindingVariableDescriptorCount_ = 0,
- vk::Bool32 runtimeDescriptorArray_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDescriptorIndexingFeaturesEXT( shaderInputAttachmentArrayDynamicIndexing_, shaderUniformTexelBufferArrayDynamicIndexing_, shaderStorageTexelBufferArrayDynamicIndexing_, shaderUniformBufferArrayNonUniformIndexing_, shaderSampledImageArrayNonUniformIndexing_, shaderStorageBufferArrayNonUniformIndexing_, shaderStorageImageArrayNonUniformIndexing_, shaderInputAttachmentArrayNonUniformIndexing_, shaderUniformTexelBufferArrayNonUniformIndexing_, shaderStorageTexelBufferArrayNonUniformIndexing_, descriptorBindingUniformBufferUpdateAfterBind_, descriptorBindingSampledImageUpdateAfterBind_, descriptorBindingStorageImageUpdateAfterBind_, descriptorBindingStorageBufferUpdateAfterBind_, descriptorBindingUniformTexelBufferUpdateAfterBind_, descriptorBindingStorageTexelBufferUpdateAfterBind_, descriptorBindingUpdateUnusedWhilePending_, descriptorBindingPartiallyBound_, descriptorBindingVariableDescriptorCount_, runtimeDescriptorArray_ )
- {}
-
- PhysicalDeviceDescriptorIndexingFeaturesEXT( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDescriptorIndexingFeaturesEXT( rhs )
- {}
-
- PhysicalDeviceDescriptorIndexingFeaturesEXT& operator=( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- layout::PhysicalDeviceDescriptorIndexingFeaturesEXT::operator=(rhs);
- return *this;
- }
-
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceDepthStencilResolveProperties ) == sizeof( VkPhysicalDeviceDepthStencilResolveProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceDepthStencilResolveProperties>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceDescriptorIndexingFeatures
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures ) - offsetof( PhysicalDeviceDescriptorIndexingFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeatures( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeatures& operator=( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures const *>(&rhs);
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderInputAttachmentArrayDynamicIndexing( vk::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderUniformTexelBufferArrayDynamicIndexing( vk::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderStorageTexelBufferArrayDynamicIndexing( vk::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderUniformBufferArrayNonUniformIndexing( vk::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderSampledImageArrayNonUniformIndexing( vk::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderStorageBufferArrayNonUniformIndexing( vk::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderStorageImageArrayNonUniformIndexing( vk::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderInputAttachmentArrayNonUniformIndexing( vk::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderUniformTexelBufferArrayNonUniformIndexing( vk::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setShaderStorageTexelBufferArrayNonUniformIndexing( vk::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
{
shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingUniformBufferUpdateAfterBind( vk::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingSampledImageUpdateAfterBind( vk::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingStorageImageUpdateAfterBind( vk::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingStorageBufferUpdateAfterBind( vk::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingUniformTexelBufferUpdateAfterBind( vk::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUniformTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingStorageTexelBufferUpdateAfterBind( vk::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingUpdateUnusedWhilePending( vk::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingPartiallyBound( vk::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setDescriptorBindingVariableDescriptorCount( vk::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_;
return *this;
}
- PhysicalDeviceDescriptorIndexingFeaturesEXT & setRuntimeDescriptorArray( vk::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDescriptorIndexingFeatures & setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT
{
runtimeDescriptorArray = runtimeDescriptorArray_;
return *this;
}
- operator VkPhysicalDeviceDescriptorIndexingFeaturesEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDescriptorIndexingFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeatures*>( this );
}
- operator VkPhysicalDeviceDescriptorIndexingFeaturesEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDescriptorIndexingFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeatures*>( this );
}
- bool operator==( PhysicalDeviceDescriptorIndexingFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceDescriptorIndexingFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -46719,93 +43403,116 @@ namespace VULKAN_HPP_NAMESPACE
&& ( runtimeDescriptorArray == rhs.runtimeDescriptorArray );
}
- bool operator!=( PhysicalDeviceDescriptorIndexingFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceDescriptorIndexingFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDescriptorIndexingFeaturesEXT::sType;
- };
- static_assert( sizeof( PhysicalDeviceDescriptorIndexingFeaturesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeaturesEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceDescriptorIndexingFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceDescriptorIndexingPropertiesEXT
- {
- protected:
- PhysicalDeviceDescriptorIndexingPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceDescriptorIndexingPropertiesEXT( VkPhysicalDeviceDescriptorIndexingPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceDescriptorIndexingPropertiesEXT& operator=( VkPhysicalDeviceDescriptorIndexingPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingPropertiesEXT;
- void* pNext = nullptr;
- uint32_t maxUpdateAfterBindDescriptorsInAllPools;
- vk::Bool32 shaderUniformBufferArrayNonUniformIndexingNative;
- vk::Bool32 shaderSampledImageArrayNonUniformIndexingNative;
- vk::Bool32 shaderStorageBufferArrayNonUniformIndexingNative;
- vk::Bool32 shaderStorageImageArrayNonUniformIndexingNative;
- vk::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative;
- vk::Bool32 robustBufferAccessUpdateAfterBind;
- vk::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;
- };
- static_assert( sizeof( PhysicalDeviceDescriptorIndexingPropertiesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDescriptorIndexingPropertiesEXT : public layout::PhysicalDeviceDescriptorIndexingPropertiesEXT
- {
- PhysicalDeviceDescriptorIndexingPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDescriptorIndexingPropertiesEXT()
- {}
-
- PhysicalDeviceDescriptorIndexingPropertiesEXT( VkPhysicalDeviceDescriptorIndexingPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDescriptorIndexingPropertiesEXT( rhs )
- {}
-
- PhysicalDeviceDescriptorIndexingPropertiesEXT& operator=( VkPhysicalDeviceDescriptorIndexingPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- layout::PhysicalDeviceDescriptorIndexingPropertiesEXT::operator=(rhs);
- return *this;
- }
-
- operator VkPhysicalDeviceDescriptorIndexingPropertiesEXT const&() const VULKAN_HPP_NOEXCEPT
- {
- return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>( this );
- }
-
- operator VkPhysicalDeviceDescriptorIndexingPropertiesEXT &() VULKAN_HPP_NOEXCEPT
- {
- return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>( this );
- }
-
- bool operator==( PhysicalDeviceDescriptorIndexingPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceDescriptorIndexingFeatures ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceDescriptorIndexingFeatures>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceDescriptorIndexingProperties
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties ) - offsetof( PhysicalDeviceDescriptorIndexingProperties, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingProperties( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDeviceDescriptorIndexingProperties& operator=( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties const *>(&rhs);
+ return *this;
+ }
+
+ operator VkPhysicalDeviceDescriptorIndexingProperties const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingProperties*>( this );
+ }
+
+ operator VkPhysicalDeviceDescriptorIndexingProperties &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingProperties*>( this );
+ }
+
+ bool operator==( PhysicalDeviceDescriptorIndexingProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -46834,57 +43541,61 @@ namespace VULKAN_HPP_NAMESPACE
&& ( maxDescriptorSetUpdateAfterBindInputAttachments == rhs.maxDescriptorSetUpdateAfterBindInputAttachments );
}
- bool operator!=( PhysicalDeviceDescriptorIndexingPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceDescriptorIndexingProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDescriptorIndexingPropertiesEXT::sType;
- };
- static_assert( sizeof( PhysicalDeviceDescriptorIndexingPropertiesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingPropertiesEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceDescriptorIndexingPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceDiscardRectanglePropertiesEXT
- {
- protected:
- PhysicalDeviceDiscardRectanglePropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceDiscardRectanglePropertiesEXT( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceDiscardRectanglePropertiesEXT& operator=( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT;
- void* pNext = nullptr;
- uint32_t maxDiscardRectangles;
- };
- static_assert( sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) == sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceDiscardRectanglePropertiesEXT : public layout::PhysicalDeviceDiscardRectanglePropertiesEXT
- {
- PhysicalDeviceDiscardRectanglePropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDiscardRectanglePropertiesEXT()
- {}
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceDescriptorIndexingProperties ) == sizeof( VkPhysicalDeviceDescriptorIndexingProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceDescriptorIndexingProperties>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceDiscardRectanglePropertiesEXT
+ {
+ PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxDiscardRectangles( maxDiscardRectangles_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT ) - offsetof( PhysicalDeviceDiscardRectanglePropertiesEXT, pNext ) );
+ return *this;
+ }
PhysicalDeviceDiscardRectanglePropertiesEXT( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDiscardRectanglePropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceDiscardRectanglePropertiesEXT& operator=( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceDiscardRectanglePropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT const *>(&rhs);
return *this;
}
@@ -46910,130 +43621,102 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDiscardRectanglePropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT;
+ void* pNext = {};
+ uint32_t maxDiscardRectangles = {};
};
static_assert( sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) == sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceDiscardRectanglePropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceDriverProperties
{
- struct PhysicalDeviceDriverPropertiesKHR
+ PhysicalDeviceDriverProperties( VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary,
+ std::array<char,VK_MAX_DRIVER_NAME_SIZE> const& driverName_ = {},
+ std::array<char,VK_MAX_DRIVER_INFO_SIZE> const& driverInfo_ = {},
+ VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ = {} ) VULKAN_HPP_NOEXCEPT
+ : driverID( driverID_ )
+ , driverName{}
+ , driverInfo{}
+ , conformanceVersion( conformanceVersion_ )
{
- protected:
- PhysicalDeviceDriverPropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceDriverPropertiesKHR( VkPhysicalDeviceDriverPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDriverPropertiesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceDriverPropertiesKHR& operator=( VkPhysicalDeviceDriverPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceDriverPropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceDriverPropertiesKHR;
- void* pNext = nullptr;
- vk::DriverIdKHR driverID;
- char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR];
- char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR];
- vk::ConformanceVersionKHR conformanceVersion;
- };
- static_assert( sizeof( PhysicalDeviceDriverPropertiesKHR ) == sizeof( VkPhysicalDeviceDriverPropertiesKHR ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DRIVER_NAME_SIZE,VK_MAX_DRIVER_NAME_SIZE>::copy( driverName, driverName_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DRIVER_INFO_SIZE,VK_MAX_DRIVER_INFO_SIZE>::copy( driverInfo, driverInfo_ );
+ }
- struct PhysicalDeviceDriverPropertiesKHR : public layout::PhysicalDeviceDriverPropertiesKHR
- {
- PhysicalDeviceDriverPropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDriverPropertiesKHR()
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties ) - offsetof( PhysicalDeviceDriverProperties, pNext ) );
+ return *this;
+ }
- PhysicalDeviceDriverPropertiesKHR( VkPhysicalDeviceDriverPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceDriverPropertiesKHR( rhs )
- {}
+ PhysicalDeviceDriverProperties( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceDriverPropertiesKHR& operator=( VkPhysicalDeviceDriverPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceDriverProperties& operator=( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceDriverPropertiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties const *>(&rhs);
return *this;
}
- operator VkPhysicalDeviceDriverPropertiesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDriverProperties const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceDriverPropertiesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceDriverProperties*>( this );
}
- operator VkPhysicalDeviceDriverPropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceDriverProperties &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceDriverPropertiesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceDriverProperties*>( this );
}
- bool operator==( PhysicalDeviceDriverPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceDriverProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( driverID == rhs.driverID )
- && ( memcmp( driverName, rhs.driverName, VK_MAX_DRIVER_NAME_SIZE_KHR * sizeof( char ) ) == 0 )
- && ( memcmp( driverInfo, rhs.driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR * sizeof( char ) ) == 0 )
+ && ( memcmp( driverName, rhs.driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( driverInfo, rhs.driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof( char ) ) == 0 )
&& ( conformanceVersion == rhs.conformanceVersion );
}
- bool operator!=( PhysicalDeviceDriverPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceDriverProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceDriverPropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDriverProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary;
+ char driverName[VK_MAX_DRIVER_NAME_SIZE] = {};
+ char driverInfo[VK_MAX_DRIVER_INFO_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion = {};
};
- static_assert( sizeof( PhysicalDeviceDriverPropertiesKHR ) == sizeof( VkPhysicalDeviceDriverPropertiesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceDriverPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceExclusiveScissorFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( vk::Bool32 exclusiveScissor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : exclusiveScissor( exclusiveScissor_ )
- {}
-
- PhysicalDeviceExclusiveScissorFeaturesNV( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExclusiveScissorFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceExclusiveScissorFeaturesNV& operator=( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExclusiveScissorFeaturesNV*>(this) = rhs;
- return *this;
- }
+ static_assert( sizeof( PhysicalDeviceDriverProperties ) == sizeof( VkPhysicalDeviceDriverProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceDriverProperties>::value, "struct wrapper is not a standard layout!" );
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 exclusiveScissor;
- };
- static_assert( sizeof( PhysicalDeviceExclusiveScissorFeaturesNV ) == sizeof( VkPhysicalDeviceExclusiveScissorFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExclusiveScissorFeaturesNV : public layout::PhysicalDeviceExclusiveScissorFeaturesNV
+ struct PhysicalDeviceExclusiveScissorFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( vk::Bool32 exclusiveScissor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExclusiveScissorFeaturesNV( exclusiveScissor_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ = {} ) VULKAN_HPP_NOEXCEPT
+ : exclusiveScissor( exclusiveScissor_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV ) - offsetof( PhysicalDeviceExclusiveScissorFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExclusiveScissorFeaturesNV( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExclusiveScissorFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExclusiveScissorFeaturesNV& operator=( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExclusiveScissorFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV const *>(&rhs);
return *this;
}
@@ -47043,7 +43726,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceExclusiveScissorFeaturesNV & setExclusiveScissor( vk::Bool32 exclusiveScissor_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExclusiveScissorFeaturesNV & setExclusiveScissor( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ ) VULKAN_HPP_NOEXCEPT
{
exclusiveScissor = exclusiveScissor_;
return *this;
@@ -47071,61 +43754,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExclusiveScissorFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor = {};
};
static_assert( sizeof( PhysicalDeviceExclusiveScissorFeaturesNV ) == sizeof( VkPhysicalDeviceExclusiveScissorFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExclusiveScissorFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceExternalBufferInfo
{
- struct PhysicalDeviceExternalBufferInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( vk::BufferCreateFlags flags_ = vk::BufferCreateFlags(),
- vk::BufferUsageFlags usage_ = vk::BufferUsageFlags(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , usage( usage_ )
- , handleType( handleType_ )
- {}
-
- PhysicalDeviceExternalBufferInfo( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalBufferInfo*>(this) = rhs;
- }
-
- PhysicalDeviceExternalBufferInfo& operator=( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalBufferInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfo;
- const void* pNext = nullptr;
- vk::BufferCreateFlags flags;
- vk::BufferUsageFlags usage;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( PhysicalDeviceExternalBufferInfo ) == sizeof( VkPhysicalDeviceExternalBufferInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExternalBufferInfo : public layout::PhysicalDeviceExternalBufferInfo
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( vk::BufferCreateFlags flags_ = vk::BufferCreateFlags(),
- vk::BufferUsageFlags usage_ = vk::BufferUsageFlags(),
- vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalBufferInfo( flags_, usage_, handleType_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ = {},
+ VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , usage( usage_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo ) - offsetof( PhysicalDeviceExternalBufferInfo, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExternalBufferInfo( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalBufferInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExternalBufferInfo& operator=( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExternalBufferInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo const *>(&rhs);
return *this;
}
@@ -47135,19 +43795,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceExternalBufferInfo & setFlags( vk::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalBufferInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PhysicalDeviceExternalBufferInfo & setUsage( vk::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalBufferInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- PhysicalDeviceExternalBufferInfo & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalBufferInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -47169,7 +43829,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( flags == rhs.flags )
&& ( usage == rhs.usage )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( PhysicalDeviceExternalBufferInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -47177,53 +43837,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExternalBufferInfo::sType;
+ public:
+ const 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;
};
static_assert( sizeof( PhysicalDeviceExternalBufferInfo ) == sizeof( VkPhysicalDeviceExternalBufferInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExternalBufferInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceExternalFenceInfo
{
- struct PhysicalDeviceExternalFenceInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- {}
-
- PhysicalDeviceExternalFenceInfo( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalFenceInfo*>(this) = rhs;
- }
-
- PhysicalDeviceExternalFenceInfo& operator=( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalFenceInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfo;
- const void* pNext = nullptr;
- vk::ExternalFenceHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( PhysicalDeviceExternalFenceInfo ) == sizeof( VkPhysicalDeviceExternalFenceInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExternalFenceInfo : public layout::PhysicalDeviceExternalFenceInfo
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( vk::ExternalFenceHandleTypeFlagBits handleType_ = vk::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalFenceInfo( handleType_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo ) - offsetof( PhysicalDeviceExternalFenceInfo, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExternalFenceInfo( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalFenceInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExternalFenceInfo& operator=( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExternalFenceInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo const *>(&rhs);
return *this;
}
@@ -47233,7 +43876,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceExternalFenceInfo & setHandleType( vk::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalFenceInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -47253,7 +43896,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( PhysicalDeviceExternalFenceInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -47261,53 +43904,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExternalFenceInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd;
};
static_assert( sizeof( PhysicalDeviceExternalFenceInfo ) == sizeof( VkPhysicalDeviceExternalFenceInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExternalFenceInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceExternalImageFormatInfo
{
- struct PhysicalDeviceExternalImageFormatInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- {}
-
- PhysicalDeviceExternalImageFormatInfo( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(this) = rhs;
- }
-
- PhysicalDeviceExternalImageFormatInfo& operator=( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfo;
- const void* pNext = nullptr;
- vk::ExternalMemoryHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( PhysicalDeviceExternalImageFormatInfo ) == sizeof( VkPhysicalDeviceExternalImageFormatInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExternalImageFormatInfo : public layout::PhysicalDeviceExternalImageFormatInfo
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( vk::ExternalMemoryHandleTypeFlagBits handleType_ = vk::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalImageFormatInfo( handleType_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo ) - offsetof( PhysicalDeviceExternalImageFormatInfo, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExternalImageFormatInfo( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalImageFormatInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExternalImageFormatInfo& operator=( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExternalImageFormatInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo const *>(&rhs);
return *this;
}
@@ -47317,7 +43941,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceExternalImageFormatInfo & setHandleType( vk::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalImageFormatInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -47337,7 +43961,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( PhysicalDeviceExternalImageFormatInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -47345,52 +43969,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExternalImageFormatInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd;
};
static_assert( sizeof( PhysicalDeviceExternalImageFormatInfo ) == sizeof( VkPhysicalDeviceExternalImageFormatInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExternalImageFormatInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceExternalMemoryHostPropertiesEXT
- {
- protected:
- PhysicalDeviceExternalMemoryHostPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceExternalMemoryHostPropertiesEXT& operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT;
- void* pNext = nullptr;
- vk::DeviceSize minImportedHostPointerAlignment;
- };
- static_assert( sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) == sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExternalMemoryHostPropertiesEXT : public layout::PhysicalDeviceExternalMemoryHostPropertiesEXT
+ struct PhysicalDeviceExternalMemoryHostPropertiesEXT
{
- PhysicalDeviceExternalMemoryHostPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalMemoryHostPropertiesEXT()
+ PhysicalDeviceExternalMemoryHostPropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment_ = {} ) VULKAN_HPP_NOEXCEPT
+ : minImportedHostPointerAlignment( minImportedHostPointerAlignment_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT ) - offsetof( PhysicalDeviceExternalMemoryHostPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalMemoryHostPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExternalMemoryHostPropertiesEXT& operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExternalMemoryHostPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT const *>(&rhs);
return *this;
}
@@ -47416,53 +44022,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExternalMemoryHostPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment = {};
};
static_assert( sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) == sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExternalMemoryHostPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceExternalSemaphoreInfo
{
- struct PhysicalDeviceExternalSemaphoreInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : handleType( handleType_ )
- {}
-
- PhysicalDeviceExternalSemaphoreInfo( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalSemaphoreInfo*>(this) = rhs;
- }
-
- PhysicalDeviceExternalSemaphoreInfo& operator=( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceExternalSemaphoreInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfo;
- const void* pNext = nullptr;
- vk::ExternalSemaphoreHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( PhysicalDeviceExternalSemaphoreInfo ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceExternalSemaphoreInfo : public layout::PhysicalDeviceExternalSemaphoreInfo
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalSemaphoreInfo( handleType_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo ) - offsetof( PhysicalDeviceExternalSemaphoreInfo, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceExternalSemaphoreInfo( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceExternalSemaphoreInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceExternalSemaphoreInfo& operator=( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceExternalSemaphoreInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo const *>(&rhs);
return *this;
}
@@ -47472,7 +44059,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceExternalSemaphoreInfo & setHandleType( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceExternalSemaphoreInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -47492,7 +44079,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( PhysicalDeviceExternalSemaphoreInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -47500,53 +44087,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceExternalSemaphoreInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd;
};
static_assert( sizeof( PhysicalDeviceExternalSemaphoreInfo ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceExternalSemaphoreInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceFeatures2
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( vk::PhysicalDeviceFeatures features_ = vk::PhysicalDeviceFeatures() ) VULKAN_HPP_NOEXCEPT
- : features( features_ )
- {}
-
- PhysicalDeviceFeatures2( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFeatures2*>(this) = rhs;
- }
-
- PhysicalDeviceFeatures2& operator=( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFeatures2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFeatures2;
- void* pNext = nullptr;
- vk::PhysicalDeviceFeatures features;
- };
- static_assert( sizeof( PhysicalDeviceFeatures2 ) == sizeof( VkPhysicalDeviceFeatures2 ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFeatures2 : public layout::PhysicalDeviceFeatures2
+ struct PhysicalDeviceFeatures2
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( vk::PhysicalDeviceFeatures features_ = vk::PhysicalDeviceFeatures() ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFeatures2( features_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features_ = {} ) VULKAN_HPP_NOEXCEPT
+ : features( features_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 ) - offsetof( PhysicalDeviceFeatures2, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceFeatures2( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFeatures2( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceFeatures2& operator=( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFeatures2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 const *>(&rhs);
return *this;
}
@@ -47556,7 +44124,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceFeatures2 & setFeatures( vk::PhysicalDeviceFeatures features_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFeatures2 & setFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features_ ) VULKAN_HPP_NOEXCEPT
{
features = features_;
return *this;
@@ -47584,82 +44152,80 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFeatures2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFeatures2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features = {};
};
static_assert( sizeof( PhysicalDeviceFeatures2 ) == sizeof( VkPhysicalDeviceFeatures2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFeatures2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceFloatControlsProperties
{
- struct PhysicalDeviceFloatControlsPropertiesKHR
- {
- protected:
- PhysicalDeviceFloatControlsPropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceFloatControlsPropertiesKHR( VkPhysicalDeviceFloatControlsPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFloatControlsPropertiesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceFloatControlsPropertiesKHR& operator=( VkPhysicalDeviceFloatControlsPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFloatControlsPropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFloatControlsPropertiesKHR;
- void* pNext = nullptr;
- vk::ShaderFloatControlsIndependenceKHR denormBehaviorIndependence;
- vk::ShaderFloatControlsIndependenceKHR roundingModeIndependence;
- vk::Bool32 shaderSignedZeroInfNanPreserveFloat16;
- vk::Bool32 shaderSignedZeroInfNanPreserveFloat32;
- vk::Bool32 shaderSignedZeroInfNanPreserveFloat64;
- vk::Bool32 shaderDenormPreserveFloat16;
- vk::Bool32 shaderDenormPreserveFloat32;
- vk::Bool32 shaderDenormPreserveFloat64;
- vk::Bool32 shaderDenormFlushToZeroFloat16;
- vk::Bool32 shaderDenormFlushToZeroFloat32;
- vk::Bool32 shaderDenormFlushToZeroFloat64;
- vk::Bool32 shaderRoundingModeRTEFloat16;
- vk::Bool32 shaderRoundingModeRTEFloat32;
- vk::Bool32 shaderRoundingModeRTEFloat64;
- vk::Bool32 shaderRoundingModeRTZFloat16;
- vk::Bool32 shaderRoundingModeRTZFloat32;
- vk::Bool32 shaderRoundingModeRTZFloat64;
- };
- static_assert( sizeof( PhysicalDeviceFloatControlsPropertiesKHR ) == sizeof( VkPhysicalDeviceFloatControlsPropertiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFloatControlsPropertiesKHR : public layout::PhysicalDeviceFloatControlsPropertiesKHR
- {
- PhysicalDeviceFloatControlsPropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFloatControlsPropertiesKHR()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_ )
{}
- PhysicalDeviceFloatControlsPropertiesKHR( VkPhysicalDeviceFloatControlsPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFloatControlsPropertiesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties ) - offsetof( PhysicalDeviceFloatControlsProperties, pNext ) );
+ return *this;
+ }
- PhysicalDeviceFloatControlsPropertiesKHR& operator=( VkPhysicalDeviceFloatControlsPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFloatControlsProperties( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFloatControlsPropertiesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceFloatControlsProperties& operator=( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties const *>(&rhs);
return *this;
}
- operator VkPhysicalDeviceFloatControlsPropertiesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceFloatControlsProperties const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceFloatControlsPropertiesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceFloatControlsProperties*>( this );
}
- operator VkPhysicalDeviceFloatControlsPropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceFloatControlsProperties &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceFloatControlsPropertiesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceFloatControlsProperties*>( this );
}
- bool operator==( PhysicalDeviceFloatControlsPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceFloatControlsProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -47682,59 +44248,59 @@ namespace VULKAN_HPP_NAMESPACE
&& ( shaderRoundingModeRTZFloat64 == rhs.shaderRoundingModeRTZFloat64 );
}
- bool operator!=( PhysicalDeviceFloatControlsPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceFloatControlsProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFloatControlsPropertiesKHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( PhysicalDeviceFloatControlsPropertiesKHR ) == sizeof( VkPhysicalDeviceFloatControlsPropertiesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceFloatControlsPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceFloatControlsProperties ) == sizeof( VkPhysicalDeviceFloatControlsProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceFloatControlsProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceFragmentDensityMapFeaturesEXT
{
- struct PhysicalDeviceFragmentDensityMapFeaturesEXT
- {
- protected:
- PhysicalDeviceFragmentDensityMapFeaturesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceFragmentDensityMapFeaturesEXT( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceFragmentDensityMapFeaturesEXT& operator=( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 fragmentDensityMap;
- vk::Bool32 fragmentDensityMapDynamic;
- vk::Bool32 fragmentDensityMapNonSubsampledImages;
- };
- static_assert( sizeof( PhysicalDeviceFragmentDensityMapFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFragmentDensityMapFeaturesEXT : public layout::PhysicalDeviceFragmentDensityMapFeaturesEXT
- {
- PhysicalDeviceFragmentDensityMapFeaturesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentDensityMapFeaturesEXT()
+ PhysicalDeviceFragmentDensityMapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fragmentDensityMap( fragmentDensityMap_ )
+ , fragmentDensityMapDynamic( fragmentDensityMapDynamic_ )
+ , fragmentDensityMapNonSubsampledImages( fragmentDensityMapNonSubsampledImages_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT ) - offsetof( PhysicalDeviceFragmentDensityMapFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceFragmentDensityMapFeaturesEXT( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentDensityMapFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceFragmentDensityMapFeaturesEXT& operator=( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFragmentDensityMapFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT const *>(&rhs);
return *this;
}
@@ -47762,54 +44328,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFragmentDensityMapFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages = {};
};
static_assert( sizeof( PhysicalDeviceFragmentDensityMapFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFragmentDensityMapFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceFragmentDensityMapPropertiesEXT
- {
- protected:
- PhysicalDeviceFragmentDensityMapPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceFragmentDensityMapPropertiesEXT( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceFragmentDensityMapPropertiesEXT& operator=( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT;
- void* pNext = nullptr;
- vk::Extent2D minFragmentDensityTexelSize;
- vk::Extent2D maxFragmentDensityTexelSize;
- vk::Bool32 fragmentDensityInvocations;
- };
- static_assert( sizeof( PhysicalDeviceFragmentDensityMapPropertiesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFragmentDensityMapPropertiesEXT : public layout::PhysicalDeviceFragmentDensityMapPropertiesEXT
+ struct PhysicalDeviceFragmentDensityMapPropertiesEXT
{
- PhysicalDeviceFragmentDensityMapPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentDensityMapPropertiesEXT()
+ PhysicalDeviceFragmentDensityMapPropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations_ = {} ) VULKAN_HPP_NOEXCEPT
+ : minFragmentDensityTexelSize( minFragmentDensityTexelSize_ )
+ , maxFragmentDensityTexelSize( maxFragmentDensityTexelSize_ )
+ , fragmentDensityInvocations( fragmentDensityInvocations_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT ) - offsetof( PhysicalDeviceFragmentDensityMapPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceFragmentDensityMapPropertiesEXT( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentDensityMapPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceFragmentDensityMapPropertiesEXT& operator=( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFragmentDensityMapPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT const *>(&rhs);
return *this;
}
@@ -47837,53 +44389,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFragmentDensityMapPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize = {};
+ VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations = {};
};
static_assert( sizeof( PhysicalDeviceFragmentDensityMapPropertiesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFragmentDensityMapPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesNV( vk::Bool32 fragmentShaderBarycentric_ = 0 ) VULKAN_HPP_NOEXCEPT
- : fragmentShaderBarycentric( fragmentShaderBarycentric_ )
- {}
-
- PhysicalDeviceFragmentShaderBarycentricFeaturesNV( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceFragmentShaderBarycentricFeaturesNV& operator=( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 fragmentShaderBarycentric;
- };
- static_assert( sizeof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) == sizeof( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV : public layout::PhysicalDeviceFragmentShaderBarycentricFeaturesNV
+ struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesNV( vk::Bool32 fragmentShaderBarycentric_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentShaderBarycentricFeaturesNV( fragmentShaderBarycentric_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fragmentShaderBarycentric( fragmentShaderBarycentric_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) - offsetof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceFragmentShaderBarycentricFeaturesNV( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentShaderBarycentricFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceFragmentShaderBarycentricFeaturesNV& operator=( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFragmentShaderBarycentricFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesNV const *>(&rhs);
return *this;
}
@@ -47893,7 +44428,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceFragmentShaderBarycentricFeaturesNV & setFragmentShaderBarycentric( vk::Bool32 fragmentShaderBarycentric_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV & setFragmentShaderBarycentric( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ ) VULKAN_HPP_NOEXCEPT
{
fragmentShaderBarycentric = fragmentShaderBarycentric_;
return *this;
@@ -47921,61 +44456,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFragmentShaderBarycentricFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric = {};
};
static_assert( sizeof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) == sizeof( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFragmentShaderBarycentricFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT
{
- struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( vk::Bool32 fragmentShaderSampleInterlock_ = 0,
- vk::Bool32 fragmentShaderPixelInterlock_ = 0,
- vk::Bool32 fragmentShaderShadingRateInterlock_ = 0 ) VULKAN_HPP_NOEXCEPT
- : fragmentShaderSampleInterlock( fragmentShaderSampleInterlock_ )
- , fragmentShaderPixelInterlock( fragmentShaderPixelInterlock_ )
- , fragmentShaderShadingRateInterlock( fragmentShaderShadingRateInterlock_ )
- {}
-
- PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceFragmentShaderInterlockFeaturesEXT& operator=( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 fragmentShaderSampleInterlock;
- vk::Bool32 fragmentShaderPixelInterlock;
- vk::Bool32 fragmentShaderShadingRateInterlock;
- };
- static_assert( sizeof( PhysicalDeviceFragmentShaderInterlockFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT : public layout::PhysicalDeviceFragmentShaderInterlockFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( vk::Bool32 fragmentShaderSampleInterlock_ = 0,
- vk::Bool32 fragmentShaderPixelInterlock_ = 0,
- vk::Bool32 fragmentShaderShadingRateInterlock_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentShaderInterlockFeaturesEXT( fragmentShaderSampleInterlock_, fragmentShaderPixelInterlock_, fragmentShaderShadingRateInterlock_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fragmentShaderSampleInterlock( fragmentShaderSampleInterlock_ )
+ , fragmentShaderPixelInterlock( fragmentShaderPixelInterlock_ )
+ , fragmentShaderShadingRateInterlock( fragmentShaderShadingRateInterlock_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT ) - offsetof( PhysicalDeviceFragmentShaderInterlockFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceFragmentShaderInterlockFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceFragmentShaderInterlockFeaturesEXT& operator=( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceFragmentShaderInterlockFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT const *>(&rhs);
return *this;
}
@@ -47985,19 +44497,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderSampleInterlock( vk::Bool32 fragmentShaderSampleInterlock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderSampleInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ ) VULKAN_HPP_NOEXCEPT
{
fragmentShaderSampleInterlock = fragmentShaderSampleInterlock_;
return *this;
}
- PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderPixelInterlock( vk::Bool32 fragmentShaderPixelInterlock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderPixelInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ ) VULKAN_HPP_NOEXCEPT
{
fragmentShaderPixelInterlock = fragmentShaderPixelInterlock_;
return *this;
}
- PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderShadingRateInterlock( vk::Bool32 fragmentShaderShadingRateInterlock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderShadingRateInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ ) VULKAN_HPP_NOEXCEPT
{
fragmentShaderShadingRateInterlock = fragmentShaderShadingRateInterlock_;
return *this;
@@ -48027,54 +44539,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceFragmentShaderInterlockFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock = {};
};
static_assert( sizeof( PhysicalDeviceFragmentShaderInterlockFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceFragmentShaderInterlockFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceGroupProperties
{
- struct PhysicalDeviceGroupProperties
+ PhysicalDeviceGroupProperties( uint32_t physicalDeviceCount_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::PhysicalDevice,VK_MAX_DEVICE_GROUP_SIZE> const& physicalDevices_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : physicalDeviceCount( physicalDeviceCount_ )
+ , physicalDevices{}
+ , subsetAllocation( subsetAllocation_ )
{
- protected:
- PhysicalDeviceGroupProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceGroupProperties( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceGroupProperties*>(this) = rhs;
- }
-
- PhysicalDeviceGroupProperties& operator=( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceGroupProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceGroupProperties;
- void* pNext = nullptr;
- uint32_t physicalDeviceCount;
- vk::PhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE];
- vk::Bool32 subsetAllocation;
- };
- static_assert( sizeof( PhysicalDeviceGroupProperties ) == sizeof( VkPhysicalDeviceGroupProperties ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::PhysicalDevice,VK_MAX_DEVICE_GROUP_SIZE,VK_MAX_DEVICE_GROUP_SIZE>::copy( physicalDevices, physicalDevices_ );
+ }
- struct PhysicalDeviceGroupProperties : public layout::PhysicalDeviceGroupProperties
- {
- PhysicalDeviceGroupProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceGroupProperties()
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties ) - offsetof( PhysicalDeviceGroupProperties, pNext ) );
+ return *this;
+ }
PhysicalDeviceGroupProperties( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceGroupProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceGroupProperties& operator=( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceGroupProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties const *>(&rhs);
return *this;
}
@@ -48093,7 +44593,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( physicalDeviceCount == rhs.physicalDeviceCount )
- && ( memcmp( physicalDevices, rhs.physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof( vk::PhysicalDevice ) ) == 0 )
+ && ( memcmp( physicalDevices, rhs.physicalDevices, std::min<uint32_t>( VK_MAX_DEVICE_GROUP_SIZE, physicalDeviceCount ) * sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) ) == 0 )
&& ( subsetAllocation == rhs.subsetAllocation );
}
@@ -48102,140 +44602,113 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceGroupProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGroupProperties;
+ void* pNext = {};
+ uint32_t physicalDeviceCount = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation = {};
};
static_assert( sizeof( PhysicalDeviceGroupProperties ) == sizeof( VkPhysicalDeviceGroupProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceGroupProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceHostQueryResetFeatures
{
- struct PhysicalDeviceHostQueryResetFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeaturesEXT( vk::Bool32 hostQueryReset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : hostQueryReset( hostQueryReset_ )
- {}
-
- PhysicalDeviceHostQueryResetFeaturesEXT( VkPhysicalDeviceHostQueryResetFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceHostQueryResetFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceHostQueryResetFeaturesEXT& operator=( VkPhysicalDeviceHostQueryResetFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceHostQueryResetFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceHostQueryResetFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 hostQueryReset;
- };
- static_assert( sizeof( PhysicalDeviceHostQueryResetFeaturesEXT ) == sizeof( VkPhysicalDeviceHostQueryResetFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceHostQueryResetFeaturesEXT : public layout::PhysicalDeviceHostQueryResetFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeaturesEXT( vk::Bool32 hostQueryReset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceHostQueryResetFeaturesEXT( hostQueryReset_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeatures( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ = {} ) VULKAN_HPP_NOEXCEPT
+ : hostQueryReset( hostQueryReset_ )
{}
- PhysicalDeviceHostQueryResetFeaturesEXT( VkPhysicalDeviceHostQueryResetFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceHostQueryResetFeaturesEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures ) - offsetof( PhysicalDeviceHostQueryResetFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceHostQueryResetFeatures( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceHostQueryResetFeaturesEXT& operator=( VkPhysicalDeviceHostQueryResetFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceHostQueryResetFeatures& operator=( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceHostQueryResetFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceHostQueryResetFeaturesEXT & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceHostQueryResetFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceHostQueryResetFeaturesEXT & setHostQueryReset( vk::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceHostQueryResetFeatures & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT
{
hostQueryReset = hostQueryReset_;
return *this;
}
- operator VkPhysicalDeviceHostQueryResetFeaturesEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceHostQueryResetFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceHostQueryResetFeaturesEXT*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceHostQueryResetFeatures*>( this );
}
- operator VkPhysicalDeviceHostQueryResetFeaturesEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceHostQueryResetFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceHostQueryResetFeaturesEXT*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceHostQueryResetFeatures*>( this );
}
- bool operator==( PhysicalDeviceHostQueryResetFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceHostQueryResetFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( hostQueryReset == rhs.hostQueryReset );
}
- bool operator!=( PhysicalDeviceHostQueryResetFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceHostQueryResetFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceHostQueryResetFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHostQueryResetFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset = {};
};
- static_assert( sizeof( PhysicalDeviceHostQueryResetFeaturesEXT ) == sizeof( VkPhysicalDeviceHostQueryResetFeaturesEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceHostQueryResetFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceHostQueryResetFeatures ) == sizeof( VkPhysicalDeviceHostQueryResetFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceHostQueryResetFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceIDProperties
{
- struct PhysicalDeviceIDProperties
+ PhysicalDeviceIDProperties( std::array<uint8_t,VK_UUID_SIZE> const& deviceUUID_ = {},
+ std::array<uint8_t,VK_UUID_SIZE> const& driverUUID_ = {},
+ std::array<uint8_t,VK_LUID_SIZE> const& deviceLUID_ = {},
+ uint32_t deviceNodeMask_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceUUID{}
+ , driverUUID{}
+ , deviceLUID{}
+ , deviceNodeMask( deviceNodeMask_ )
+ , deviceLUIDValid( deviceLUIDValid_ )
{
- protected:
- PhysicalDeviceIDProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceIDProperties( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceIDProperties*>(this) = rhs;
- }
-
- PhysicalDeviceIDProperties& operator=( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceIDProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceIdProperties;
- void* pNext = nullptr;
- uint8_t deviceUUID[VK_UUID_SIZE];
- uint8_t driverUUID[VK_UUID_SIZE];
- uint8_t deviceLUID[VK_LUID_SIZE];
- uint32_t deviceNodeMask;
- vk::Bool32 deviceLUIDValid;
- };
- static_assert( sizeof( PhysicalDeviceIDProperties ) == sizeof( VkPhysicalDeviceIDProperties ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( deviceUUID, deviceUUID_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( driverUUID, driverUUID_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_LUID_SIZE,VK_LUID_SIZE>::copy( deviceLUID, deviceLUID_ );
+ }
- struct PhysicalDeviceIDProperties : public layout::PhysicalDeviceIDProperties
- {
- PhysicalDeviceIDProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceIDProperties()
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties ) - offsetof( PhysicalDeviceIDProperties, pNext ) );
+ return *this;
+ }
PhysicalDeviceIDProperties( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceIDProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceIDProperties& operator=( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceIDProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties const *>(&rhs);
return *this;
}
@@ -48265,65 +44738,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceIDProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIdProperties;
+ void* pNext = {};
+ uint8_t deviceUUID[VK_UUID_SIZE] = {};
+ uint8_t driverUUID[VK_UUID_SIZE] = {};
+ uint8_t deviceLUID[VK_LUID_SIZE] = {};
+ uint32_t deviceNodeMask = {};
+ VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid = {};
};
static_assert( sizeof( PhysicalDeviceIDProperties ) == sizeof( VkPhysicalDeviceIDProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceIDProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceImageDrmFormatModifierInfoEXT
{
- struct PhysicalDeviceImageDrmFormatModifierInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = 0,
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : drmFormatModifier( drmFormatModifier_ )
- , sharingMode( sharingMode_ )
- , queueFamilyIndexCount( queueFamilyIndexCount_ )
- , pQueueFamilyIndices( pQueueFamilyIndices_ )
- {}
-
- PhysicalDeviceImageDrmFormatModifierInfoEXT( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(this) = rhs;
- }
-
- PhysicalDeviceImageDrmFormatModifierInfoEXT& operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT;
- const void* pNext = nullptr;
- uint64_t drmFormatModifier;
- vk::SharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- };
- static_assert( sizeof( PhysicalDeviceImageDrmFormatModifierInfoEXT ) == sizeof( VkPhysicalDeviceImageDrmFormatModifierInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceImageDrmFormatModifierInfoEXT : public layout::PhysicalDeviceImageDrmFormatModifierInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = 0,
- vk::SharingMode sharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageDrmFormatModifierInfoEXT( drmFormatModifier_, sharingMode_, queueFamilyIndexCount_, pQueueFamilyIndices_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = {},
+ VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive,
+ uint32_t queueFamilyIndexCount_ = {},
+ const uint32_t* pQueueFamilyIndices_ = {} ) VULKAN_HPP_NOEXCEPT
+ : drmFormatModifier( drmFormatModifier_ )
+ , sharingMode( sharingMode_ )
+ , queueFamilyIndexCount( queueFamilyIndexCount_ )
+ , pQueueFamilyIndices( pQueueFamilyIndices_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT ) - offsetof( PhysicalDeviceImageDrmFormatModifierInfoEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceImageDrmFormatModifierInfoEXT( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageDrmFormatModifierInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceImageDrmFormatModifierInfoEXT& operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceImageDrmFormatModifierInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT const *>(&rhs);
return *this;
}
@@ -48339,7 +44791,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceImageDrmFormatModifierInfoEXT & setSharingMode( vk::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageDrmFormatModifierInfoEXT & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT
{
sharingMode = sharingMode_;
return *this;
@@ -48382,69 +44834,45 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceImageDrmFormatModifierInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceImageDrmFormatModifierInfoEXT ) == sizeof( VkPhysicalDeviceImageDrmFormatModifierInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceImageDrmFormatModifierInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceImageFormatInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( vk::Format format_ = vk::Format::eUndefined,
- vk::ImageType type_ = vk::ImageType::e1D,
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::ImageCreateFlags flags_ = vk::ImageCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : format( format_ )
- , type( type_ )
- , tiling( tiling_ )
- , usage( usage_ )
- , flags( flags_ )
- {}
-
- PhysicalDeviceImageFormatInfo2( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageFormatInfo2*>(this) = rhs;
- }
-
- PhysicalDeviceImageFormatInfo2& operator=( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageFormatInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2;
- const void* pNext = nullptr;
- vk::Format format;
- vk::ImageType type;
- vk::ImageTiling tiling;
- vk::ImageUsageFlags usage;
- vk::ImageCreateFlags flags;
- };
- static_assert( sizeof( PhysicalDeviceImageFormatInfo2 ) == sizeof( VkPhysicalDeviceImageFormatInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceImageFormatInfo2 : public layout::PhysicalDeviceImageFormatInfo2
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( vk::Format format_ = vk::Format::eUndefined,
- vk::ImageType type_ = vk::ImageType::e1D,
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::ImageCreateFlags flags_ = vk::ImageCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageFormatInfo2( format_, type_, tiling_, usage_, flags_ )
+ struct PhysicalDeviceImageFormatInfo2
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : format( format_ )
+ , type( type_ )
+ , tiling( tiling_ )
+ , usage( usage_ )
+ , flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 ) - offsetof( PhysicalDeviceImageFormatInfo2, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceImageFormatInfo2( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageFormatInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceImageFormatInfo2& operator=( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceImageFormatInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 const *>(&rhs);
return *this;
}
@@ -48454,31 +44882,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceImageFormatInfo2 & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- PhysicalDeviceImageFormatInfo2 & setType( vk::ImageType type_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- PhysicalDeviceImageFormatInfo2 & setTiling( vk::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
{
tiling = tiling_;
return *this;
}
- PhysicalDeviceImageFormatInfo2 & setUsage( vk::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- PhysicalDeviceImageFormatInfo2 & setFlags( vk::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageFormatInfo2 & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -48510,53 +44938,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceImageFormatInfo2::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceImageFormatInfo2 ) == sizeof( VkPhysicalDeviceImageFormatInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceImageFormatInfo2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceImageViewImageFormatInfoEXT
{
- struct PhysicalDeviceImageViewImageFormatInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( vk::ImageViewType imageViewType_ = vk::ImageViewType::e1D ) VULKAN_HPP_NOEXCEPT
- : imageViewType( imageViewType_ )
- {}
-
- PhysicalDeviceImageViewImageFormatInfoEXT( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageViewImageFormatInfoEXT*>(this) = rhs;
- }
-
- PhysicalDeviceImageViewImageFormatInfoEXT& operator=( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImageViewImageFormatInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT;
- void* pNext = nullptr;
- vk::ImageViewType imageViewType;
- };
- static_assert( sizeof( PhysicalDeviceImageViewImageFormatInfoEXT ) == sizeof( VkPhysicalDeviceImageViewImageFormatInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceImageViewImageFormatInfoEXT : public layout::PhysicalDeviceImageViewImageFormatInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( vk::ImageViewType imageViewType_ = vk::ImageViewType::e1D ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageViewImageFormatInfoEXT( imageViewType_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ = VULKAN_HPP_NAMESPACE::ImageViewType::e1D ) VULKAN_HPP_NOEXCEPT
+ : imageViewType( imageViewType_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT ) - offsetof( PhysicalDeviceImageViewImageFormatInfoEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceImageViewImageFormatInfoEXT( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImageViewImageFormatInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceImageViewImageFormatInfoEXT& operator=( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceImageViewImageFormatInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT const *>(&rhs);
return *this;
}
@@ -48566,7 +44979,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceImageViewImageFormatInfoEXT & setImageViewType( vk::ImageViewType imageViewType_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImageViewImageFormatInfoEXT & setImageViewType( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ ) VULKAN_HPP_NOEXCEPT
{
imageViewType = imageViewType_;
return *this;
@@ -48594,137 +45007,99 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceImageViewImageFormatInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageViewType imageViewType = VULKAN_HPP_NAMESPACE::ImageViewType::e1D;
};
static_assert( sizeof( PhysicalDeviceImageViewImageFormatInfoEXT ) == sizeof( VkPhysicalDeviceImageViewImageFormatInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceImageViewImageFormatInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceImagelessFramebufferFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeaturesKHR( vk::Bool32 imagelessFramebuffer_ = 0 ) VULKAN_HPP_NOEXCEPT
- : imagelessFramebuffer( imagelessFramebuffer_ )
- {}
-
- PhysicalDeviceImagelessFramebufferFeaturesKHR( VkPhysicalDeviceImagelessFramebufferFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImagelessFramebufferFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceImagelessFramebufferFeaturesKHR& operator=( VkPhysicalDeviceImagelessFramebufferFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceImagelessFramebufferFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceImagelessFramebufferFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 imagelessFramebuffer;
- };
- static_assert( sizeof( PhysicalDeviceImagelessFramebufferFeaturesKHR ) == sizeof( VkPhysicalDeviceImagelessFramebufferFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceImagelessFramebufferFeaturesKHR : public layout::PhysicalDeviceImagelessFramebufferFeaturesKHR
+ struct PhysicalDeviceImagelessFramebufferFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeaturesKHR( vk::Bool32 imagelessFramebuffer_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImagelessFramebufferFeaturesKHR( imagelessFramebuffer_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeatures( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : imagelessFramebuffer( imagelessFramebuffer_ )
{}
- PhysicalDeviceImagelessFramebufferFeaturesKHR( VkPhysicalDeviceImagelessFramebufferFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceImagelessFramebufferFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures ) - offsetof( PhysicalDeviceImagelessFramebufferFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceImagelessFramebufferFeatures( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceImagelessFramebufferFeaturesKHR& operator=( VkPhysicalDeviceImagelessFramebufferFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImagelessFramebufferFeatures& operator=( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceImagelessFramebufferFeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceImagelessFramebufferFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImagelessFramebufferFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceImagelessFramebufferFeaturesKHR & setImagelessFramebuffer( vk::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceImagelessFramebufferFeatures & setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT
{
imagelessFramebuffer = imagelessFramebuffer_;
return *this;
}
- operator VkPhysicalDeviceImagelessFramebufferFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceImagelessFramebufferFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceImagelessFramebufferFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceImagelessFramebufferFeatures*>( this );
}
- operator VkPhysicalDeviceImagelessFramebufferFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceImagelessFramebufferFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceImagelessFramebufferFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceImagelessFramebufferFeatures*>( this );
}
- bool operator==( PhysicalDeviceImagelessFramebufferFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceImagelessFramebufferFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( imagelessFramebuffer == rhs.imagelessFramebuffer );
}
- bool operator!=( PhysicalDeviceImagelessFramebufferFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceImagelessFramebufferFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceImagelessFramebufferFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImagelessFramebufferFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer = {};
};
- static_assert( sizeof( PhysicalDeviceImagelessFramebufferFeaturesKHR ) == sizeof( VkPhysicalDeviceImagelessFramebufferFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceImagelessFramebufferFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceIndexTypeUint8FeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8FeaturesEXT( vk::Bool32 indexTypeUint8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : indexTypeUint8( indexTypeUint8_ )
- {}
+ static_assert( sizeof( PhysicalDeviceImagelessFramebufferFeatures ) == sizeof( VkPhysicalDeviceImagelessFramebufferFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceImagelessFramebufferFeatures>::value, "struct wrapper is not a standard layout!" );
- PhysicalDeviceIndexTypeUint8FeaturesEXT( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceIndexTypeUint8FeaturesEXT& operator=( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 indexTypeUint8;
- };
- static_assert( sizeof( PhysicalDeviceIndexTypeUint8FeaturesEXT ) == sizeof( VkPhysicalDeviceIndexTypeUint8FeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceIndexTypeUint8FeaturesEXT : public layout::PhysicalDeviceIndexTypeUint8FeaturesEXT
+ struct PhysicalDeviceIndexTypeUint8FeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8FeaturesEXT( vk::Bool32 indexTypeUint8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceIndexTypeUint8FeaturesEXT( indexTypeUint8_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ = {} ) VULKAN_HPP_NOEXCEPT
+ : indexTypeUint8( indexTypeUint8_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT ) - offsetof( PhysicalDeviceIndexTypeUint8FeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceIndexTypeUint8FeaturesEXT( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceIndexTypeUint8FeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceIndexTypeUint8FeaturesEXT& operator=( VkPhysicalDeviceIndexTypeUint8FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceIndexTypeUint8FeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8FeaturesEXT const *>(&rhs);
return *this;
}
@@ -48734,7 +45109,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceIndexTypeUint8FeaturesEXT & setIndexTypeUint8( vk::Bool32 indexTypeUint8_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceIndexTypeUint8FeaturesEXT & setIndexTypeUint8( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ ) VULKAN_HPP_NOEXCEPT
{
indexTypeUint8 = indexTypeUint8_;
return *this;
@@ -48762,57 +45137,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceIndexTypeUint8FeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIndexTypeUint8FeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8 = {};
};
static_assert( sizeof( PhysicalDeviceIndexTypeUint8FeaturesEXT ) == sizeof( VkPhysicalDeviceIndexTypeUint8FeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceIndexTypeUint8FeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceInlineUniformBlockFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeaturesEXT( vk::Bool32 inlineUniformBlock_ = 0,
- vk::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = 0 ) VULKAN_HPP_NOEXCEPT
- : inlineUniformBlock( inlineUniformBlock_ )
- , descriptorBindingInlineUniformBlockUpdateAfterBind( descriptorBindingInlineUniformBlockUpdateAfterBind_ )
- {}
-
- PhysicalDeviceInlineUniformBlockFeaturesEXT( VkPhysicalDeviceInlineUniformBlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceInlineUniformBlockFeaturesEXT& operator=( VkPhysicalDeviceInlineUniformBlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 inlineUniformBlock;
- vk::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind;
- };
- static_assert( sizeof( PhysicalDeviceInlineUniformBlockFeaturesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceInlineUniformBlockFeaturesEXT : public layout::PhysicalDeviceInlineUniformBlockFeaturesEXT
+ struct PhysicalDeviceInlineUniformBlockFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeaturesEXT( vk::Bool32 inlineUniformBlock_ = 0,
- vk::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceInlineUniformBlockFeaturesEXT( inlineUniformBlock_, descriptorBindingInlineUniformBlockUpdateAfterBind_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = {} ) VULKAN_HPP_NOEXCEPT
+ : inlineUniformBlock( inlineUniformBlock_ )
+ , descriptorBindingInlineUniformBlockUpdateAfterBind( descriptorBindingInlineUniformBlockUpdateAfterBind_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeaturesEXT ) - offsetof( PhysicalDeviceInlineUniformBlockFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceInlineUniformBlockFeaturesEXT( VkPhysicalDeviceInlineUniformBlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceInlineUniformBlockFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceInlineUniformBlockFeaturesEXT& operator=( VkPhysicalDeviceInlineUniformBlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceInlineUniformBlockFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeaturesEXT const *>(&rhs);
return *this;
}
@@ -48822,13 +45176,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceInlineUniformBlockFeaturesEXT & setInlineUniformBlock( vk::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceInlineUniformBlockFeaturesEXT & setInlineUniformBlock( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT
{
inlineUniformBlock = inlineUniformBlock_;
return *this;
}
- PhysicalDeviceInlineUniformBlockFeaturesEXT & setDescriptorBindingInlineUniformBlockUpdateAfterBind( vk::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceInlineUniformBlockFeaturesEXT & setDescriptorBindingInlineUniformBlockUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
{
descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_;
return *this;
@@ -48857,56 +45211,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceInlineUniformBlockFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock = {};
+ VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind = {};
};
static_assert( sizeof( PhysicalDeviceInlineUniformBlockFeaturesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceInlineUniformBlockFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceInlineUniformBlockPropertiesEXT
{
- struct PhysicalDeviceInlineUniformBlockPropertiesEXT
- {
- protected:
- PhysicalDeviceInlineUniformBlockPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceInlineUniformBlockPropertiesEXT( VkPhysicalDeviceInlineUniformBlockPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceInlineUniformBlockPropertiesEXT& operator=( VkPhysicalDeviceInlineUniformBlockPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockPropertiesEXT;
- void* pNext = nullptr;
- uint32_t maxInlineUniformBlockSize;
- uint32_t maxPerStageDescriptorInlineUniformBlocks;
- uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
- uint32_t maxDescriptorSetInlineUniformBlocks;
- uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
- };
- static_assert( sizeof( PhysicalDeviceInlineUniformBlockPropertiesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceInlineUniformBlockPropertiesEXT : public layout::PhysicalDeviceInlineUniformBlockPropertiesEXT
- {
- PhysicalDeviceInlineUniformBlockPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceInlineUniformBlockPropertiesEXT()
+ PhysicalDeviceInlineUniformBlockPropertiesEXT( uint32_t maxInlineUniformBlockSize_ = {},
+ uint32_t maxPerStageDescriptorInlineUniformBlocks_ = {},
+ uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ = {},
+ uint32_t maxDescriptorSetInlineUniformBlocks_ = {},
+ uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxInlineUniformBlockSize( maxInlineUniformBlockSize_ )
+ , maxPerStageDescriptorInlineUniformBlocks( maxPerStageDescriptorInlineUniformBlocks_ )
+ , maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ )
+ , maxDescriptorSetInlineUniformBlocks( maxDescriptorSetInlineUniformBlocks_ )
+ , maxDescriptorSetUpdateAfterBindInlineUniformBlocks( maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockPropertiesEXT ) - offsetof( PhysicalDeviceInlineUniformBlockPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceInlineUniformBlockPropertiesEXT( VkPhysicalDeviceInlineUniformBlockPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceInlineUniformBlockPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceInlineUniformBlockPropertiesEXT& operator=( VkPhysicalDeviceInlineUniformBlockPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceInlineUniformBlockPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockPropertiesEXT const *>(&rhs);
return *this;
}
@@ -48936,25 +45277,249 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceInlineUniformBlockPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockPropertiesEXT;
+ void* pNext = {};
+ uint32_t maxInlineUniformBlockSize = {};
+ uint32_t maxPerStageDescriptorInlineUniformBlocks = {};
+ uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = {};
+ uint32_t maxDescriptorSetInlineUniformBlocks = {};
+ uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks = {};
};
static_assert( sizeof( PhysicalDeviceInlineUniformBlockPropertiesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceInlineUniformBlockPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
struct PhysicalDeviceLimits
{
- PhysicalDeviceLimits() VULKAN_HPP_NOEXCEPT
- {}
+ 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<uint32_t,3> const& maxComputeWorkGroupCount_ = {},
+ uint32_t maxComputeWorkGroupInvocations_ = {},
+ std::array<uint32_t,3> 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<uint32_t,2> const& maxViewportDimensions_ = {},
+ std::array<float,2> 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<float,2> const& pointSizeRange_ = {},
+ std::array<float,2> 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{}
+ , maxComputeWorkGroupInvocations( maxComputeWorkGroupInvocations_ )
+ , maxComputeWorkGroupSize{}
+ , subPixelPrecisionBits( subPixelPrecisionBits_ )
+ , subTexelPrecisionBits( subTexelPrecisionBits_ )
+ , mipmapPrecisionBits( mipmapPrecisionBits_ )
+ , maxDrawIndexedIndexValue( maxDrawIndexedIndexValue_ )
+ , maxDrawIndirectCount( maxDrawIndirectCount_ )
+ , maxSamplerLodBias( maxSamplerLodBias_ )
+ , maxSamplerAnisotropy( maxSamplerAnisotropy_ )
+ , maxViewports( maxViewports_ )
+ , maxViewportDimensions{}
+ , 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{}
+ , lineWidthRange{}
+ , pointSizeGranularity( pointSizeGranularity_ )
+ , lineWidthGranularity( lineWidthGranularity_ )
+ , strictLines( strictLines_ )
+ , standardSampleLocations( standardSampleLocations_ )
+ , optimalBufferCopyOffsetAlignment( optimalBufferCopyOffsetAlignment_ )
+ , optimalBufferCopyRowPitchAlignment( optimalBufferCopyRowPitchAlignment_ )
+ , nonCoherentAtomSize( nonCoherentAtomSize_ )
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,3,3>::copy( maxComputeWorkGroupCount, maxComputeWorkGroupCount_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,3,3>::copy( maxComputeWorkGroupSize, maxComputeWorkGroupSize_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,2,2>::copy( maxViewportDimensions, maxViewportDimensions_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,2,2>::copy( viewportBoundsRange, viewportBoundsRange_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,2,2>::copy( pointSizeRange, pointSizeRange_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,2,2>::copy( lineWidthRange, lineWidthRange_ );
+ }
PhysicalDeviceLimits( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceLimits*>(this) = rhs;
+ *this = rhs;
}
PhysicalDeviceLimits& operator=( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceLimits*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits const *>(&rhs);
return *this;
}
@@ -49084,177 +45649,146 @@ namespace VULKAN_HPP_NAMESPACE
}
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;
- vk::DeviceSize bufferImageGranularity;
- vk::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;
- 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;
- vk::DeviceSize minTexelBufferOffsetAlignment;
- vk::DeviceSize minUniformBufferOffsetAlignment;
- vk::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;
- vk::SampleCountFlags framebufferColorSampleCounts;
- vk::SampleCountFlags framebufferDepthSampleCounts;
- vk::SampleCountFlags framebufferStencilSampleCounts;
- vk::SampleCountFlags framebufferNoAttachmentsSampleCounts;
- uint32_t maxColorAttachments;
- vk::SampleCountFlags sampledImageColorSampleCounts;
- vk::SampleCountFlags sampledImageIntegerSampleCounts;
- vk::SampleCountFlags sampledImageDepthSampleCounts;
- vk::SampleCountFlags sampledImageStencilSampleCounts;
- vk::SampleCountFlags storageImageSampleCounts;
- uint32_t maxSampleMaskWords;
- vk::Bool32 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;
- vk::Bool32 strictLines;
- vk::Bool32 standardSampleLocations;
- vk::DeviceSize optimalBufferCopyOffsetAlignment;
- vk::DeviceSize optimalBufferCopyRowPitchAlignment;
- vk::DeviceSize nonCoherentAtomSize;
+ 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 = {};
+ 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 = {};
+ 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 = {};
+ float pointSizeRange[2] = {};
+ float lineWidthRange[2] = {};
+ 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 = {};
};
static_assert( sizeof( PhysicalDeviceLimits ) == sizeof( VkPhysicalDeviceLimits ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceLimits>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceLineRasterizationFeaturesEXT
{
- struct PhysicalDeviceLineRasterizationFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeaturesEXT( vk::Bool32 rectangularLines_ = 0,
- vk::Bool32 bresenhamLines_ = 0,
- vk::Bool32 smoothLines_ = 0,
- vk::Bool32 stippledRectangularLines_ = 0,
- vk::Bool32 stippledBresenhamLines_ = 0,
- vk::Bool32 stippledSmoothLines_ = 0 ) VULKAN_HPP_NOEXCEPT
- : rectangularLines( rectangularLines_ )
- , bresenhamLines( bresenhamLines_ )
- , smoothLines( smoothLines_ )
- , stippledRectangularLines( stippledRectangularLines_ )
- , stippledBresenhamLines( stippledBresenhamLines_ )
- , stippledSmoothLines( stippledSmoothLines_ )
- {}
-
- PhysicalDeviceLineRasterizationFeaturesEXT( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceLineRasterizationFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceLineRasterizationFeaturesEXT& operator=( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceLineRasterizationFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 rectangularLines;
- vk::Bool32 bresenhamLines;
- vk::Bool32 smoothLines;
- vk::Bool32 stippledRectangularLines;
- vk::Bool32 stippledBresenhamLines;
- vk::Bool32 stippledSmoothLines;
- };
- static_assert( sizeof( PhysicalDeviceLineRasterizationFeaturesEXT ) == sizeof( VkPhysicalDeviceLineRasterizationFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceLineRasterizationFeaturesEXT : public layout::PhysicalDeviceLineRasterizationFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeaturesEXT( vk::Bool32 rectangularLines_ = 0,
- vk::Bool32 bresenhamLines_ = 0,
- vk::Bool32 smoothLines_ = 0,
- vk::Bool32 stippledRectangularLines_ = 0,
- vk::Bool32 stippledBresenhamLines_ = 0,
- vk::Bool32 stippledSmoothLines_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceLineRasterizationFeaturesEXT( rectangularLines_, bresenhamLines_, smoothLines_, stippledRectangularLines_, stippledBresenhamLines_, stippledSmoothLines_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeaturesEXT( 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_NOEXCEPT
+ : rectangularLines( rectangularLines_ )
+ , bresenhamLines( bresenhamLines_ )
+ , smoothLines( smoothLines_ )
+ , stippledRectangularLines( stippledRectangularLines_ )
+ , stippledBresenhamLines( stippledBresenhamLines_ )
+ , stippledSmoothLines( stippledSmoothLines_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT ) - offsetof( PhysicalDeviceLineRasterizationFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceLineRasterizationFeaturesEXT( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceLineRasterizationFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceLineRasterizationFeaturesEXT& operator=( VkPhysicalDeviceLineRasterizationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceLineRasterizationFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeaturesEXT const *>(&rhs);
return *this;
}
@@ -49264,37 +45798,37 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setRectangularLines( vk::Bool32 rectangularLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ ) VULKAN_HPP_NOEXCEPT
{
rectangularLines = rectangularLines_;
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setBresenhamLines( vk::Bool32 bresenhamLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ ) VULKAN_HPP_NOEXCEPT
{
bresenhamLines = bresenhamLines_;
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setSmoothLines( vk::Bool32 smoothLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ ) VULKAN_HPP_NOEXCEPT
{
smoothLines = smoothLines_;
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setStippledRectangularLines( vk::Bool32 stippledRectangularLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setStippledRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ ) VULKAN_HPP_NOEXCEPT
{
stippledRectangularLines = stippledRectangularLines_;
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setStippledBresenhamLines( vk::Bool32 stippledBresenhamLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setStippledBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ ) VULKAN_HPP_NOEXCEPT
{
stippledBresenhamLines = stippledBresenhamLines_;
return *this;
}
- PhysicalDeviceLineRasterizationFeaturesEXT & setStippledSmoothLines( vk::Bool32 stippledSmoothLines_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceLineRasterizationFeaturesEXT & setStippledSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ ) VULKAN_HPP_NOEXCEPT
{
stippledSmoothLines = stippledSmoothLines_;
return *this;
@@ -49327,52 +45861,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceLineRasterizationFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationFeaturesEXT;
+ 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 = {};
};
static_assert( sizeof( PhysicalDeviceLineRasterizationFeaturesEXT ) == sizeof( VkPhysicalDeviceLineRasterizationFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceLineRasterizationFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceLineRasterizationPropertiesEXT
{
- struct PhysicalDeviceLineRasterizationPropertiesEXT
- {
- protected:
- PhysicalDeviceLineRasterizationPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceLineRasterizationPropertiesEXT( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceLineRasterizationPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceLineRasterizationPropertiesEXT& operator=( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceLineRasterizationPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT;
- void* pNext = nullptr;
- uint32_t lineSubPixelPrecisionBits;
- };
- static_assert( sizeof( PhysicalDeviceLineRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceLineRasterizationPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceLineRasterizationPropertiesEXT : public layout::PhysicalDeviceLineRasterizationPropertiesEXT
- {
- PhysicalDeviceLineRasterizationPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceLineRasterizationPropertiesEXT()
+ PhysicalDeviceLineRasterizationPropertiesEXT( uint32_t lineSubPixelPrecisionBits_ = {} ) VULKAN_HPP_NOEXCEPT
+ : lineSubPixelPrecisionBits( lineSubPixelPrecisionBits_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT ) - offsetof( PhysicalDeviceLineRasterizationPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceLineRasterizationPropertiesEXT( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceLineRasterizationPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceLineRasterizationPropertiesEXT& operator=( VkPhysicalDeviceLineRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceLineRasterizationPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationPropertiesEXT const *>(&rhs);
return *this;
}
@@ -49398,53 +45919,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceLineRasterizationPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationPropertiesEXT;
+ void* pNext = {};
+ uint32_t lineSubPixelPrecisionBits = {};
};
static_assert( sizeof( PhysicalDeviceLineRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceLineRasterizationPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceLineRasterizationPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMaintenance3Properties
- {
- protected:
- PhysicalDeviceMaintenance3Properties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMaintenance3Properties( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(this) = rhs;
- }
-
- PhysicalDeviceMaintenance3Properties& operator=( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMaintenance3Properties;
- void* pNext = nullptr;
- uint32_t maxPerSetDescriptors;
- vk::DeviceSize maxMemoryAllocationSize;
- };
- static_assert( sizeof( PhysicalDeviceMaintenance3Properties ) == sizeof( VkPhysicalDeviceMaintenance3Properties ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMaintenance3Properties : public layout::PhysicalDeviceMaintenance3Properties
+ struct PhysicalDeviceMaintenance3Properties
{
- PhysicalDeviceMaintenance3Properties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMaintenance3Properties()
+ PhysicalDeviceMaintenance3Properties( uint32_t maxPerSetDescriptors_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxPerSetDescriptors( maxPerSetDescriptors_ )
+ , maxMemoryAllocationSize( maxMemoryAllocationSize_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties ) - offsetof( PhysicalDeviceMaintenance3Properties, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMaintenance3Properties( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMaintenance3Properties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMaintenance3Properties& operator=( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMaintenance3Properties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties const *>(&rhs);
return *this;
}
@@ -49471,53 +45975,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMaintenance3Properties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance3Properties;
+ void* pNext = {};
+ uint32_t maxPerSetDescriptors = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize = {};
};
static_assert( sizeof( PhysicalDeviceMaintenance3Properties ) == sizeof( VkPhysicalDeviceMaintenance3Properties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMaintenance3Properties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceMemoryBudgetPropertiesEXT
{
- struct PhysicalDeviceMemoryBudgetPropertiesEXT
+ PhysicalDeviceMemoryBudgetPropertiesEXT( std::array<VULKAN_HPP_NAMESPACE::DeviceSize,VK_MAX_MEMORY_HEAPS> const& heapBudget_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::DeviceSize,VK_MAX_MEMORY_HEAPS> const& heapUsage_ = {} ) VULKAN_HPP_NOEXCEPT
+ : heapBudget{}
+ , heapUsage{}
{
- protected:
- PhysicalDeviceMemoryBudgetPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMemoryBudgetPropertiesEXT( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryBudgetPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceMemoryBudgetPropertiesEXT& operator=( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryBudgetPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT;
- void* pNext = nullptr;
- vk::DeviceSize heapBudget[VK_MAX_MEMORY_HEAPS];
- vk::DeviceSize heapUsage[VK_MAX_MEMORY_HEAPS];
- };
- static_assert( sizeof( PhysicalDeviceMemoryBudgetPropertiesEXT ) == sizeof( VkPhysicalDeviceMemoryBudgetPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::DeviceSize,VK_MAX_MEMORY_HEAPS,VK_MAX_MEMORY_HEAPS>::copy( heapBudget, heapBudget_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::DeviceSize,VK_MAX_MEMORY_HEAPS,VK_MAX_MEMORY_HEAPS>::copy( heapUsage, heapUsage_ );
+ }
- struct PhysicalDeviceMemoryBudgetPropertiesEXT : public layout::PhysicalDeviceMemoryBudgetPropertiesEXT
- {
- PhysicalDeviceMemoryBudgetPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryBudgetPropertiesEXT()
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT ) - offsetof( PhysicalDeviceMemoryBudgetPropertiesEXT, pNext ) );
+ return *this;
+ }
PhysicalDeviceMemoryBudgetPropertiesEXT( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryBudgetPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMemoryBudgetPropertiesEXT& operator=( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMemoryBudgetPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT const *>(&rhs);
return *this;
}
@@ -49535,8 +46026,8 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && ( memcmp( heapBudget, rhs.heapBudget, VK_MAX_MEMORY_HEAPS * sizeof( vk::DeviceSize ) ) == 0 )
- && ( memcmp( heapUsage, rhs.heapUsage, VK_MAX_MEMORY_HEAPS * sizeof( vk::DeviceSize ) ) == 0 );
+ && ( memcmp( heapBudget, rhs.heapBudget, VK_MAX_MEMORY_HEAPS * sizeof( VULKAN_HPP_NAMESPACE::DeviceSize ) ) == 0 )
+ && ( memcmp( heapUsage, rhs.heapUsage, VK_MAX_MEMORY_HEAPS * sizeof( VULKAN_HPP_NAMESPACE::DeviceSize ) ) == 0 );
}
bool operator!=( PhysicalDeviceMemoryBudgetPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -49544,53 +46035,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMemoryBudgetPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize heapBudget[VK_MAX_MEMORY_HEAPS] = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize heapUsage[VK_MAX_MEMORY_HEAPS] = {};
};
static_assert( sizeof( PhysicalDeviceMemoryBudgetPropertiesEXT ) == sizeof( VkPhysicalDeviceMemoryBudgetPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMemoryBudgetPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMemoryPriorityFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( vk::Bool32 memoryPriority_ = 0 ) VULKAN_HPP_NOEXCEPT
- : memoryPriority( memoryPriority_ )
- {}
-
- PhysicalDeviceMemoryPriorityFeaturesEXT( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryPriorityFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceMemoryPriorityFeaturesEXT& operator=( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryPriorityFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 memoryPriority;
- };
- static_assert( sizeof( PhysicalDeviceMemoryPriorityFeaturesEXT ) == sizeof( VkPhysicalDeviceMemoryPriorityFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMemoryPriorityFeaturesEXT : public layout::PhysicalDeviceMemoryPriorityFeaturesEXT
+ struct PhysicalDeviceMemoryPriorityFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( vk::Bool32 memoryPriority_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryPriorityFeaturesEXT( memoryPriority_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryPriority( memoryPriority_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT ) - offsetof( PhysicalDeviceMemoryPriorityFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMemoryPriorityFeaturesEXT( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryPriorityFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMemoryPriorityFeaturesEXT& operator=( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMemoryPriorityFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT const *>(&rhs);
return *this;
}
@@ -49600,7 +46073,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceMemoryPriorityFeaturesEXT & setMemoryPriority( vk::Bool32 memoryPriority_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMemoryPriorityFeaturesEXT & setMemoryPriority( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ ) VULKAN_HPP_NOEXCEPT
{
memoryPriority = memoryPriority_;
return *this;
@@ -49628,25 +46101,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMemoryPriorityFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 memoryPriority = {};
};
static_assert( sizeof( PhysicalDeviceMemoryPriorityFeaturesEXT ) == sizeof( VkPhysicalDeviceMemoryPriorityFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMemoryPriorityFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
struct PhysicalDeviceMemoryProperties
{
- PhysicalDeviceMemoryProperties() VULKAN_HPP_NOEXCEPT
- {}
+ PhysicalDeviceMemoryProperties( uint32_t memoryTypeCount_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::MemoryType,VK_MAX_MEMORY_TYPES> const& memoryTypes_ = {},
+ uint32_t memoryHeapCount_ = {},
+ std::array<VULKAN_HPP_NAMESPACE::MemoryHeap,VK_MAX_MEMORY_HEAPS> const& memoryHeaps_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryTypeCount( memoryTypeCount_ )
+ , memoryTypes{}
+ , memoryHeapCount( memoryHeapCount_ )
+ , memoryHeaps{}
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::MemoryType,VK_MAX_MEMORY_TYPES,VK_MAX_MEMORY_TYPES>::copy( memoryTypes, memoryTypes_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<VULKAN_HPP_NAMESPACE::MemoryHeap,VK_MAX_MEMORY_HEAPS,VK_MAX_MEMORY_HEAPS>::copy( memoryHeaps, memoryHeaps_ );
+ }
PhysicalDeviceMemoryProperties( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceMemoryProperties*>(this) = rhs;
+ *this = rhs;
}
PhysicalDeviceMemoryProperties& operator=( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceMemoryProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties const *>(&rhs);
return *this;
}
@@ -49663,9 +46148,9 @@ namespace VULKAN_HPP_NAMESPACE
bool operator==( PhysicalDeviceMemoryProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( memoryTypeCount == rhs.memoryTypeCount )
- && ( memcmp( memoryTypes, rhs.memoryTypes, VK_MAX_MEMORY_TYPES * sizeof( vk::MemoryType ) ) == 0 )
+ && ( memcmp( memoryTypes, rhs.memoryTypes, std::min<uint32_t>( VK_MAX_MEMORY_TYPES, memoryTypeCount ) * sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) ) == 0 )
&& ( memoryHeapCount == rhs.memoryHeapCount )
- && ( memcmp( memoryHeaps, rhs.memoryHeaps, VK_MAX_MEMORY_HEAPS * sizeof( vk::MemoryHeap ) ) == 0 );
+ && ( memcmp( memoryHeaps, rhs.memoryHeaps, std::min<uint32_t>( VK_MAX_MEMORY_HEAPS, memoryHeapCount ) * sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) ) == 0 );
}
bool operator!=( PhysicalDeviceMemoryProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -49674,54 +46159,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t memoryTypeCount;
- vk::MemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
- uint32_t memoryHeapCount;
- vk::MemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
+ uint32_t memoryTypeCount = {};
+ VULKAN_HPP_NAMESPACE::MemoryType memoryTypes[VK_MAX_MEMORY_TYPES] = {};
+ uint32_t memoryHeapCount = {};
+ VULKAN_HPP_NAMESPACE::MemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] = {};
};
static_assert( sizeof( PhysicalDeviceMemoryProperties ) == sizeof( VkPhysicalDeviceMemoryProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMemoryProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceMemoryProperties2
{
- struct PhysicalDeviceMemoryProperties2
- {
- protected:
- PhysicalDeviceMemoryProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMemoryProperties2( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>(this) = rhs;
- }
-
- PhysicalDeviceMemoryProperties2& operator=( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2;
- void* pNext = nullptr;
- vk::PhysicalDeviceMemoryProperties memoryProperties;
- };
- static_assert( sizeof( PhysicalDeviceMemoryProperties2 ) == sizeof( VkPhysicalDeviceMemoryProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMemoryProperties2 : public layout::PhysicalDeviceMemoryProperties2
- {
- PhysicalDeviceMemoryProperties2() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryProperties2()
+ PhysicalDeviceMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryProperties( memoryProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 ) - offsetof( PhysicalDeviceMemoryProperties2, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMemoryProperties2( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMemoryProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMemoryProperties2& operator=( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMemoryProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 const *>(&rhs);
return *this;
}
@@ -49747,57 +46212,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMemoryProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties = {};
};
static_assert( sizeof( PhysicalDeviceMemoryProperties2 ) == sizeof( VkPhysicalDeviceMemoryProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMemoryProperties2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMeshShaderFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( vk::Bool32 taskShader_ = 0,
- vk::Bool32 meshShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : taskShader( taskShader_ )
- , meshShader( meshShader_ )
- {}
-
- PhysicalDeviceMeshShaderFeaturesNV( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMeshShaderFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceMeshShaderFeaturesNV& operator=( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMeshShaderFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 taskShader;
- vk::Bool32 meshShader;
- };
- static_assert( sizeof( PhysicalDeviceMeshShaderFeaturesNV ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMeshShaderFeaturesNV : public layout::PhysicalDeviceMeshShaderFeaturesNV
+ struct PhysicalDeviceMeshShaderFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( vk::Bool32 taskShader_ = 0,
- vk::Bool32 meshShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMeshShaderFeaturesNV( taskShader_, meshShader_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 meshShader_ = {} ) VULKAN_HPP_NOEXCEPT
+ : taskShader( taskShader_ )
+ , meshShader( meshShader_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV ) - offsetof( PhysicalDeviceMeshShaderFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMeshShaderFeaturesNV( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMeshShaderFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMeshShaderFeaturesNV& operator=( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMeshShaderFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV const *>(&rhs);
return *this;
}
@@ -49807,13 +46251,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceMeshShaderFeaturesNV & setTaskShader( vk::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMeshShaderFeaturesNV & setTaskShader( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT
{
taskShader = taskShader_;
return *this;
}
- PhysicalDeviceMeshShaderFeaturesNV & setMeshShader( vk::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMeshShaderFeaturesNV & setMeshShader( VULKAN_HPP_NAMESPACE::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT
{
meshShader = meshShader_;
return *this;
@@ -49842,64 +46286,62 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMeshShaderFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 taskShader = {};
+ VULKAN_HPP_NAMESPACE::Bool32 meshShader = {};
};
static_assert( sizeof( PhysicalDeviceMeshShaderFeaturesNV ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMeshShaderFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMeshShaderPropertiesNV
- {
- protected:
- PhysicalDeviceMeshShaderPropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMeshShaderPropertiesNV( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMeshShaderPropertiesNV*>(this) = rhs;
- }
-
- PhysicalDeviceMeshShaderPropertiesNV& operator=( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMeshShaderPropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV;
- void* pNext = nullptr;
- 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;
- };
- static_assert( sizeof( PhysicalDeviceMeshShaderPropertiesNV ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMeshShaderPropertiesNV : public layout::PhysicalDeviceMeshShaderPropertiesNV
- {
- PhysicalDeviceMeshShaderPropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMeshShaderPropertiesNV()
- {}
+ struct PhysicalDeviceMeshShaderPropertiesNV
+ {
+ PhysicalDeviceMeshShaderPropertiesNV( uint32_t maxDrawMeshTasksCount_ = {},
+ uint32_t maxTaskWorkGroupInvocations_ = {},
+ std::array<uint32_t,3> const& maxTaskWorkGroupSize_ = {},
+ uint32_t maxTaskTotalMemorySize_ = {},
+ uint32_t maxTaskOutputCount_ = {},
+ uint32_t maxMeshWorkGroupInvocations_ = {},
+ std::array<uint32_t,3> const& maxMeshWorkGroupSize_ = {},
+ uint32_t maxMeshTotalMemorySize_ = {},
+ uint32_t maxMeshOutputVertices_ = {},
+ uint32_t maxMeshOutputPrimitives_ = {},
+ uint32_t maxMeshMultiviewViewCount_ = {},
+ uint32_t meshOutputPerVertexGranularity_ = {},
+ uint32_t meshOutputPerPrimitiveGranularity_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxDrawMeshTasksCount( maxDrawMeshTasksCount_ )
+ , maxTaskWorkGroupInvocations( maxTaskWorkGroupInvocations_ )
+ , maxTaskWorkGroupSize{}
+ , maxTaskTotalMemorySize( maxTaskTotalMemorySize_ )
+ , maxTaskOutputCount( maxTaskOutputCount_ )
+ , maxMeshWorkGroupInvocations( maxMeshWorkGroupInvocations_ )
+ , maxMeshWorkGroupSize{}
+ , maxMeshTotalMemorySize( maxMeshTotalMemorySize_ )
+ , maxMeshOutputVertices( maxMeshOutputVertices_ )
+ , maxMeshOutputPrimitives( maxMeshOutputPrimitives_ )
+ , maxMeshMultiviewViewCount( maxMeshMultiviewViewCount_ )
+ , meshOutputPerVertexGranularity( meshOutputPerVertexGranularity_ )
+ , meshOutputPerPrimitiveGranularity( meshOutputPerPrimitiveGranularity_ )
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,3,3>::copy( maxTaskWorkGroupSize, maxTaskWorkGroupSize_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,3,3>::copy( maxMeshWorkGroupSize, maxMeshWorkGroupSize_ );
+ }
+
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV ) - offsetof( PhysicalDeviceMeshShaderPropertiesNV, pNext ) );
+ return *this;
+ }
PhysicalDeviceMeshShaderPropertiesNV( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMeshShaderPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMeshShaderPropertiesNV& operator=( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMeshShaderPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV const *>(&rhs);
return *this;
}
@@ -49937,61 +46379,50 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMeshShaderPropertiesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV;
+ 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 = {};
};
static_assert( sizeof( PhysicalDeviceMeshShaderPropertiesNV ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMeshShaderPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMultiviewFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( vk::Bool32 multiview_ = 0,
- vk::Bool32 multiviewGeometryShader_ = 0,
- vk::Bool32 multiviewTessellationShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : multiview( multiview_ )
- , multiviewGeometryShader( multiviewGeometryShader_ )
- , multiviewTessellationShader( multiviewTessellationShader_ )
- {}
-
- PhysicalDeviceMultiviewFeatures( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(this) = rhs;
- }
-
- PhysicalDeviceMultiviewFeatures& operator=( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMultiviewFeatures;
- void* pNext = nullptr;
- vk::Bool32 multiview;
- vk::Bool32 multiviewGeometryShader;
- vk::Bool32 multiviewTessellationShader;
- };
- static_assert( sizeof( PhysicalDeviceMultiviewFeatures ) == sizeof( VkPhysicalDeviceMultiviewFeatures ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMultiviewFeatures : public layout::PhysicalDeviceMultiviewFeatures
+ struct PhysicalDeviceMultiviewFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( vk::Bool32 multiview_ = 0,
- vk::Bool32 multiviewGeometryShader_ = 0,
- vk::Bool32 multiviewTessellationShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewFeatures( multiview_, multiviewGeometryShader_, multiviewTessellationShader_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( VULKAN_HPP_NAMESPACE::Bool32 multiview_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ = {} ) VULKAN_HPP_NOEXCEPT
+ : multiview( multiview_ )
+ , multiviewGeometryShader( multiviewGeometryShader_ )
+ , multiviewTessellationShader( multiviewTessellationShader_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures ) - offsetof( PhysicalDeviceMultiviewFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMultiviewFeatures( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMultiviewFeatures& operator=( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMultiviewFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures const *>(&rhs);
return *this;
}
@@ -50001,19 +46432,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceMultiviewFeatures & setMultiview( vk::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMultiviewFeatures & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT
{
multiview = multiview_;
return *this;
}
- PhysicalDeviceMultiviewFeatures & setMultiviewGeometryShader( vk::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMultiviewFeatures & setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT
{
multiviewGeometryShader = multiviewGeometryShader_;
return *this;
}
- PhysicalDeviceMultiviewFeatures & setMultiviewTessellationShader( vk::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceMultiviewFeatures & setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT
{
multiviewTessellationShader = multiviewTessellationShader_;
return *this;
@@ -50043,52 +46474,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMultiviewFeatures::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 multiview = {};
+ VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader = {};
+ VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader = {};
};
static_assert( sizeof( PhysicalDeviceMultiviewFeatures ) == sizeof( VkPhysicalDeviceMultiviewFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMultiviewFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
- {
- protected:
- PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(this) = rhs;
- }
-
- PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX& operator=( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
- void* pNext = nullptr;
- vk::Bool32 perViewPositionAllComponents;
- };
- static_assert( sizeof( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX : public layout::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
+ struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
{
- PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX()
+ PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents_ = {} ) VULKAN_HPP_NOEXCEPT
+ : perViewPositionAllComponents( perViewPositionAllComponents_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) - offsetof( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX& operator=( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const *>(&rhs);
return *this;
}
@@ -50114,53 +46529,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents = {};
};
static_assert( sizeof( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceMultiviewProperties
{
- struct PhysicalDeviceMultiviewProperties
- {
- protected:
- PhysicalDeviceMultiviewProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceMultiviewProperties( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(this) = rhs;
- }
-
- PhysicalDeviceMultiviewProperties& operator=( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceMultiviewProperties;
- void* pNext = nullptr;
- uint32_t maxMultiviewViewCount;
- uint32_t maxMultiviewInstanceIndex;
- };
- static_assert( sizeof( PhysicalDeviceMultiviewProperties ) == sizeof( VkPhysicalDeviceMultiviewProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceMultiviewProperties : public layout::PhysicalDeviceMultiviewProperties
- {
- PhysicalDeviceMultiviewProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewProperties()
+ PhysicalDeviceMultiviewProperties( uint32_t maxMultiviewViewCount_ = {},
+ uint32_t maxMultiviewInstanceIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxMultiviewViewCount( maxMultiviewViewCount_ )
+ , maxMultiviewInstanceIndex( maxMultiviewInstanceIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties ) - offsetof( PhysicalDeviceMultiviewProperties, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceMultiviewProperties( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceMultiviewProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceMultiviewProperties& operator=( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceMultiviewProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties const *>(&rhs);
return *this;
}
@@ -50187,55 +46585,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceMultiviewProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewProperties;
+ void* pNext = {};
+ uint32_t maxMultiviewViewCount = {};
+ uint32_t maxMultiviewInstanceIndex = {};
};
static_assert( sizeof( PhysicalDeviceMultiviewProperties ) == sizeof( VkPhysicalDeviceMultiviewProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceMultiviewProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDevicePCIBusInfoPropertiesEXT
{
- struct PhysicalDevicePCIBusInfoPropertiesEXT
- {
- protected:
- PhysicalDevicePCIBusInfoPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDevicePCIBusInfoPropertiesEXT( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePCIBusInfoPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDevicePCIBusInfoPropertiesEXT& operator=( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePCIBusInfoPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT;
- void* pNext = nullptr;
- uint32_t pciDomain;
- uint32_t pciBus;
- uint32_t pciDevice;
- uint32_t pciFunction;
- };
- static_assert( sizeof( PhysicalDevicePCIBusInfoPropertiesEXT ) == sizeof( VkPhysicalDevicePCIBusInfoPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDevicePCIBusInfoPropertiesEXT : public layout::PhysicalDevicePCIBusInfoPropertiesEXT
- {
- PhysicalDevicePCIBusInfoPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePCIBusInfoPropertiesEXT()
+ PhysicalDevicePCIBusInfoPropertiesEXT( uint32_t pciDomain_ = {},
+ uint32_t pciBus_ = {},
+ uint32_t pciDevice_ = {},
+ uint32_t pciFunction_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pciDomain( pciDomain_ )
+ , pciBus( pciBus_ )
+ , pciDevice( pciDevice_ )
+ , pciFunction( pciFunction_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT ) - offsetof( PhysicalDevicePCIBusInfoPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDevicePCIBusInfoPropertiesEXT( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePCIBusInfoPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDevicePCIBusInfoPropertiesEXT& operator=( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevicePCIBusInfoPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT const *>(&rhs);
return *this;
}
@@ -50264,53 +46648,165 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevicePCIBusInfoPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT;
+ void* pNext = {};
+ uint32_t pciDomain = {};
+ uint32_t pciBus = {};
+ uint32_t pciDevice = {};
+ uint32_t pciFunction = {};
};
static_assert( sizeof( PhysicalDevicePCIBusInfoPropertiesEXT ) == sizeof( VkPhysicalDevicePCIBusInfoPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDevicePCIBusInfoPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDevicePerformanceQueryFeaturesKHR
{
- struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ = {} ) VULKAN_HPP_NOEXCEPT
+ : performanceCounterQueryPools( performanceCounterQueryPools_ )
+ , performanceCounterMultipleQueryPools( performanceCounterMultipleQueryPools_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( vk::Bool32 pipelineExecutableInfo_ = 0 ) VULKAN_HPP_NOEXCEPT
- : pipelineExecutableInfo( pipelineExecutableInfo_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR ) - offsetof( PhysicalDevicePerformanceQueryFeaturesKHR, pNext ) );
+ return *this;
+ }
- PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*>(this) = rhs;
- }
+ PhysicalDevicePerformanceQueryFeaturesKHR( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDevicePipelineExecutablePropertiesFeaturesKHR& operator=( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*>(this) = rhs;
- return *this;
- }
+ PhysicalDevicePerformanceQueryFeaturesKHR& operator=( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 pipelineExecutableInfo;
- };
- static_assert( sizeof( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR ) == sizeof( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
+ PhysicalDevicePerformanceQueryFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevicePerformanceQueryFeaturesKHR & setPerformanceCounterQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ ) VULKAN_HPP_NOEXCEPT
+ {
+ performanceCounterQueryPools = performanceCounterQueryPools_;
+ return *this;
+ }
+
+ PhysicalDevicePerformanceQueryFeaturesKHR & setPerformanceCounterMultipleQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ ) VULKAN_HPP_NOEXCEPT
+ {
+ performanceCounterMultipleQueryPools = performanceCounterMultipleQueryPools_;
+ return *this;
+ }
+
+ operator VkPhysicalDevicePerformanceQueryFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePerformanceQueryFeaturesKHR*>( this );
+ }
+
+ operator VkPhysicalDevicePerformanceQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDevicePerformanceQueryFeaturesKHR*>( this );
+ }
+
+ bool operator==( PhysicalDevicePerformanceQueryFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( performanceCounterQueryPools == rhs.performanceCounterQueryPools )
+ && ( performanceCounterMultipleQueryPools == rhs.performanceCounterMultipleQueryPools );
+ }
- struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR : public layout::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR
+ bool operator!=( PhysicalDevicePerformanceQueryFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools = {};
+ VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools = {};
+ };
+ static_assert( sizeof( PhysicalDevicePerformanceQueryFeaturesKHR ) == sizeof( VkPhysicalDevicePerformanceQueryFeaturesKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevicePerformanceQueryFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDevicePerformanceQueryPropertiesKHR
{
- VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( vk::Bool32 pipelineExecutableInfo_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( pipelineExecutableInfo_ )
+ PhysicalDevicePerformanceQueryPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies_ = {} ) VULKAN_HPP_NOEXCEPT
+ : allowCommandBufferQueryCopies( allowCommandBufferQueryCopies_ )
{}
- PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( rhs )
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR ) - offsetof( PhysicalDevicePerformanceQueryPropertiesKHR, pNext ) );
+ return *this;
+ }
+
+ PhysicalDevicePerformanceQueryPropertiesKHR( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDevicePerformanceQueryPropertiesKHR& operator=( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR const *>(&rhs);
+ return *this;
+ }
+
+ operator VkPhysicalDevicePerformanceQueryPropertiesKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePerformanceQueryPropertiesKHR*>( this );
+ }
+
+ operator VkPhysicalDevicePerformanceQueryPropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDevicePerformanceQueryPropertiesKHR*>( this );
+ }
+
+ bool operator==( PhysicalDevicePerformanceQueryPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( allowCommandBufferQueryCopies == rhs.allowCommandBufferQueryCopies );
+ }
+
+ bool operator!=( PhysicalDevicePerformanceQueryPropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies = {};
+ };
+ static_assert( sizeof( PhysicalDevicePerformanceQueryPropertiesKHR ) == sizeof( VkPhysicalDevicePerformanceQueryPropertiesKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevicePerformanceQueryPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR
+ {
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pipelineExecutableInfo( pipelineExecutableInfo_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR ) - offsetof( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, pNext ) );
+ return *this;
+ }
+
+ PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
PhysicalDevicePipelineExecutablePropertiesFeaturesKHR& operator=( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const *>(&rhs);
return *this;
}
@@ -50320,7 +46816,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPipelineExecutableInfo( vk::Bool32 pipelineExecutableInfo_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPipelineExecutableInfo( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ ) VULKAN_HPP_NOEXCEPT
{
pipelineExecutableInfo = pipelineExecutableInfo_;
return *this;
@@ -50348,52 +46844,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo = {};
};
static_assert( sizeof( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR ) == sizeof( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDevicePointClippingProperties
- {
- protected:
- PhysicalDevicePointClippingProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDevicePointClippingProperties( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(this) = rhs;
- }
-
- PhysicalDevicePointClippingProperties& operator=( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDevicePointClippingProperties;
- void* pNext = nullptr;
- vk::PointClippingBehavior pointClippingBehavior;
- };
- static_assert( sizeof( PhysicalDevicePointClippingProperties ) == sizeof( VkPhysicalDevicePointClippingProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDevicePointClippingProperties : public layout::PhysicalDevicePointClippingProperties
+ struct PhysicalDevicePointClippingProperties
{
- PhysicalDevicePointClippingProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePointClippingProperties()
+ PhysicalDevicePointClippingProperties( VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes ) VULKAN_HPP_NOEXCEPT
+ : pointClippingBehavior( pointClippingBehavior_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties ) - offsetof( PhysicalDevicePointClippingProperties, pNext ) );
+ return *this;
+ }
+
PhysicalDevicePointClippingProperties( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePointClippingProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDevicePointClippingProperties& operator=( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevicePointClippingProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties const *>(&rhs);
return *this;
}
@@ -50419,25 +46897,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevicePointClippingProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePointClippingProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes;
};
static_assert( sizeof( PhysicalDevicePointClippingProperties ) == sizeof( VkPhysicalDevicePointClippingProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDevicePointClippingProperties>::value, "struct wrapper is not a standard layout!" );
struct PhysicalDeviceSparseProperties
{
- PhysicalDeviceSparseProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
PhysicalDeviceSparseProperties( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceSparseProperties*>(this) = rhs;
+ *this = rhs;
}
PhysicalDeviceSparseProperties& operator=( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceSparseProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties const *>(&rhs);
return *this;
}
@@ -50466,28 +46955,48 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Bool32 residencyStandard2DBlockShape;
- vk::Bool32 residencyStandard2DMultisampleBlockShape;
- vk::Bool32 residencyStandard3DBlockShape;
- vk::Bool32 residencyAlignedMipSize;
- vk::Bool32 residencyNonResidentStrict;
+ 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 = {};
};
static_assert( sizeof( PhysicalDeviceSparseProperties ) == sizeof( VkPhysicalDeviceSparseProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSparseProperties>::value, "struct wrapper is not a standard layout!" );
struct PhysicalDeviceProperties
{
- PhysicalDeviceProperties() VULKAN_HPP_NOEXCEPT
- {}
+ 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<char,VK_MAX_PHYSICAL_DEVICE_NAME_SIZE> const& deviceName_ = {},
+ std::array<uint8_t,VK_UUID_SIZE> 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{}
+ , pipelineCacheUUID{}
+ , limits( limits_ )
+ , sparseProperties( sparseProperties_ )
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_PHYSICAL_DEVICE_NAME_SIZE,VK_MAX_PHYSICAL_DEVICE_NAME_SIZE>::copy( deviceName, deviceName_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( pipelineCacheUUID, pipelineCacheUUID_ );
+ }
PhysicalDeviceProperties( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceProperties*>(this) = rhs;
+ *this = rhs;
}
PhysicalDeviceProperties& operator=( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPhysicalDeviceProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties const *>(&rhs);
return *this;
}
@@ -50520,59 +47029,39 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t apiVersion;
- uint32_t driverVersion;
- uint32_t vendorID;
- uint32_t deviceID;
- vk::PhysicalDeviceType deviceType;
- char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
- uint8_t pipelineCacheUUID[VK_UUID_SIZE];
- vk::PhysicalDeviceLimits limits;
- vk::PhysicalDeviceSparseProperties sparseProperties;
+ uint32_t apiVersion = {};
+ uint32_t driverVersion = {};
+ uint32_t vendorID = {};
+ uint32_t deviceID = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceType deviceType = VULKAN_HPP_NAMESPACE::PhysicalDeviceType::eOther;
+ char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] = {};
+ uint8_t pipelineCacheUUID[VK_UUID_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits limits = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties sparseProperties = {};
};
static_assert( sizeof( PhysicalDeviceProperties ) == sizeof( VkPhysicalDeviceProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceProperties2
- {
- protected:
- PhysicalDeviceProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceProperties2( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProperties2*>(this) = rhs;
- }
-
- PhysicalDeviceProperties2& operator=( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProperties2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceProperties2;
- void* pNext = nullptr;
- vk::PhysicalDeviceProperties properties;
- };
- static_assert( sizeof( PhysicalDeviceProperties2 ) == sizeof( VkPhysicalDeviceProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceProperties2 : public layout::PhysicalDeviceProperties2
+ struct PhysicalDeviceProperties2
{
- PhysicalDeviceProperties2() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProperties2()
+ PhysicalDeviceProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : properties( properties_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 ) - offsetof( PhysicalDeviceProperties2, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceProperties2( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceProperties2& operator=( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 const *>(&rhs);
return *this;
}
@@ -50598,53 +47087,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties = {};
};
static_assert( sizeof( PhysicalDeviceProperties2 ) == sizeof( VkPhysicalDeviceProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceProperties2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceProtectedMemoryFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( vk::Bool32 protectedMemory_ = 0 ) VULKAN_HPP_NOEXCEPT
- : protectedMemory( protectedMemory_ )
- {}
-
- PhysicalDeviceProtectedMemoryFeatures( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(this) = rhs;
- }
-
- PhysicalDeviceProtectedMemoryFeatures& operator=( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryFeatures;
- void* pNext = nullptr;
- vk::Bool32 protectedMemory;
- };
- static_assert( sizeof( PhysicalDeviceProtectedMemoryFeatures ) == sizeof( VkPhysicalDeviceProtectedMemoryFeatures ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceProtectedMemoryFeatures : public layout::PhysicalDeviceProtectedMemoryFeatures
+ struct PhysicalDeviceProtectedMemoryFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( vk::Bool32 protectedMemory_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProtectedMemoryFeatures( protectedMemory_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ = {} ) VULKAN_HPP_NOEXCEPT
+ : protectedMemory( protectedMemory_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures ) - offsetof( PhysicalDeviceProtectedMemoryFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceProtectedMemoryFeatures( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProtectedMemoryFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceProtectedMemoryFeatures& operator=( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceProtectedMemoryFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures const *>(&rhs);
return *this;
}
@@ -50654,7 +47124,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceProtectedMemoryFeatures & setProtectedMemory( vk::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceProtectedMemoryFeatures & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT
{
protectedMemory = protectedMemory_;
return *this;
@@ -50682,52 +47152,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceProtectedMemoryFeatures::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 protectedMemory = {};
};
static_assert( sizeof( PhysicalDeviceProtectedMemoryFeatures ) == sizeof( VkPhysicalDeviceProtectedMemoryFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceProtectedMemoryFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceProtectedMemoryProperties
- {
- protected:
- PhysicalDeviceProtectedMemoryProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceProtectedMemoryProperties( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(this) = rhs;
- }
-
- PhysicalDeviceProtectedMemoryProperties& operator=( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryProperties;
- void* pNext = nullptr;
- vk::Bool32 protectedNoFault;
- };
- static_assert( sizeof( PhysicalDeviceProtectedMemoryProperties ) == sizeof( VkPhysicalDeviceProtectedMemoryProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceProtectedMemoryProperties : public layout::PhysicalDeviceProtectedMemoryProperties
+ struct PhysicalDeviceProtectedMemoryProperties
{
- PhysicalDeviceProtectedMemoryProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProtectedMemoryProperties()
+ PhysicalDeviceProtectedMemoryProperties( VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ = {} ) VULKAN_HPP_NOEXCEPT
+ : protectedNoFault( protectedNoFault_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties ) - offsetof( PhysicalDeviceProtectedMemoryProperties, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceProtectedMemoryProperties( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceProtectedMemoryProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceProtectedMemoryProperties& operator=( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceProtectedMemoryProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties const *>(&rhs);
return *this;
}
@@ -50753,52 +47205,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceProtectedMemoryProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault = {};
};
static_assert( sizeof( PhysicalDeviceProtectedMemoryProperties ) == sizeof( VkPhysicalDeviceProtectedMemoryProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceProtectedMemoryProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDevicePushDescriptorPropertiesKHR
{
- struct PhysicalDevicePushDescriptorPropertiesKHR
- {
- protected:
- PhysicalDevicePushDescriptorPropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDevicePushDescriptorPropertiesKHR( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(this) = rhs;
- }
-
- PhysicalDevicePushDescriptorPropertiesKHR& operator=( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR;
- void* pNext = nullptr;
- uint32_t maxPushDescriptors;
- };
- static_assert( sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) == sizeof( VkPhysicalDevicePushDescriptorPropertiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDevicePushDescriptorPropertiesKHR : public layout::PhysicalDevicePushDescriptorPropertiesKHR
- {
- PhysicalDevicePushDescriptorPropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePushDescriptorPropertiesKHR()
+ PhysicalDevicePushDescriptorPropertiesKHR( uint32_t maxPushDescriptors_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxPushDescriptors( maxPushDescriptors_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR ) - offsetof( PhysicalDevicePushDescriptorPropertiesKHR, pNext ) );
+ return *this;
+ }
+
PhysicalDevicePushDescriptorPropertiesKHR( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDevicePushDescriptorPropertiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDevicePushDescriptorPropertiesKHR& operator=( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDevicePushDescriptorPropertiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorPropertiesKHR const *>(&rhs);
return *this;
}
@@ -50824,59 +47258,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDevicePushDescriptorPropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR;
+ void* pNext = {};
+ uint32_t maxPushDescriptors = {};
};
static_assert( sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) == sizeof( VkPhysicalDevicePushDescriptorPropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDevicePushDescriptorPropertiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceRayTracingPropertiesNV
{
- struct PhysicalDeviceRayTracingPropertiesNV
- {
- protected:
- PhysicalDeviceRayTracingPropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceRayTracingPropertiesNV( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceRayTracingPropertiesNV*>(this) = rhs;
- }
-
- PhysicalDeviceRayTracingPropertiesNV& operator=( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceRayTracingPropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceRayTracingPropertiesNV;
- void* pNext = nullptr;
- uint32_t shaderGroupHandleSize;
- uint32_t maxRecursionDepth;
- uint32_t maxShaderGroupStride;
- uint32_t shaderGroupBaseAlignment;
- uint64_t maxGeometryCount;
- uint64_t maxInstanceCount;
- uint64_t maxTriangleCount;
- uint32_t maxDescriptorSetAccelerationStructures;
- };
- static_assert( sizeof( PhysicalDeviceRayTracingPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingPropertiesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceRayTracingPropertiesNV : public layout::PhysicalDeviceRayTracingPropertiesNV
- {
- PhysicalDeviceRayTracingPropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceRayTracingPropertiesNV()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderGroupHandleSize( shaderGroupHandleSize_ )
+ , maxRecursionDepth( maxRecursionDepth_ )
+ , maxShaderGroupStride( maxShaderGroupStride_ )
+ , shaderGroupBaseAlignment( shaderGroupBaseAlignment_ )
+ , maxGeometryCount( maxGeometryCount_ )
+ , maxInstanceCount( maxInstanceCount_ )
+ , maxTriangleCount( maxTriangleCount_ )
+ , maxDescriptorSetAccelerationStructures( maxDescriptorSetAccelerationStructures_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV ) - offsetof( PhysicalDeviceRayTracingPropertiesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceRayTracingPropertiesNV( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceRayTracingPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceRayTracingPropertiesNV& operator=( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceRayTracingPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV const *>(&rhs);
return *this;
}
@@ -50909,53 +47332,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceRayTracingPropertiesNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceRayTracingPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceRayTracingPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV
{
- struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( vk::Bool32 representativeFragmentTest_ = 0 ) VULKAN_HPP_NOEXCEPT
- : representativeFragmentTest( representativeFragmentTest_ )
- {}
-
- PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceRepresentativeFragmentTestFeaturesNV& operator=( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 representativeFragmentTest;
- };
- static_assert( sizeof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) == sizeof( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV : public layout::PhysicalDeviceRepresentativeFragmentTestFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( vk::Bool32 representativeFragmentTest_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceRepresentativeFragmentTestFeaturesNV( representativeFragmentTest_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ = {} ) VULKAN_HPP_NOEXCEPT
+ : representativeFragmentTest( representativeFragmentTest_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) - offsetof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceRepresentativeFragmentTestFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceRepresentativeFragmentTestFeaturesNV& operator=( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceRepresentativeFragmentTestFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV const *>(&rhs);
return *this;
}
@@ -50965,7 +47376,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setRepresentativeFragmentTest( vk::Bool32 representativeFragmentTest_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setRepresentativeFragmentTest( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ ) VULKAN_HPP_NOEXCEPT
{
representativeFragmentTest = representativeFragmentTest_;
return *this;
@@ -50993,56 +47404,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceRepresentativeFragmentTestFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest = {};
};
static_assert( sizeof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) == sizeof( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceRepresentativeFragmentTestFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceSampleLocationsPropertiesEXT
{
- struct PhysicalDeviceSampleLocationsPropertiesEXT
+ PhysicalDeviceSampleLocationsPropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {},
+ std::array<float,2> const& sampleLocationCoordinateRange_ = {},
+ uint32_t sampleLocationSubPixelBits_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations_ = {} ) VULKAN_HPP_NOEXCEPT
+ : sampleLocationSampleCounts( sampleLocationSampleCounts_ )
+ , maxSampleLocationGridSize( maxSampleLocationGridSize_ )
+ , sampleLocationCoordinateRange{}
+ , sampleLocationSubPixelBits( sampleLocationSubPixelBits_ )
+ , variableSampleLocations( variableSampleLocations_ )
{
- protected:
- PhysicalDeviceSampleLocationsPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceSampleLocationsPropertiesEXT( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceSampleLocationsPropertiesEXT& operator=( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT;
- void* pNext = nullptr;
- vk::SampleCountFlags sampleLocationSampleCounts;
- vk::Extent2D maxSampleLocationGridSize;
- float sampleLocationCoordinateRange[2];
- uint32_t sampleLocationSubPixelBits;
- vk::Bool32 variableSampleLocations;
- };
- static_assert( sizeof( PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<float,2,2>::copy( sampleLocationCoordinateRange, sampleLocationCoordinateRange_ );
+ }
- struct PhysicalDeviceSampleLocationsPropertiesEXT : public layout::PhysicalDeviceSampleLocationsPropertiesEXT
- {
- PhysicalDeviceSampleLocationsPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSampleLocationsPropertiesEXT()
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT ) - offsetof( PhysicalDeviceSampleLocationsPropertiesEXT, pNext ) );
+ return *this;
+ }
PhysicalDeviceSampleLocationsPropertiesEXT( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSampleLocationsPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSampleLocationsPropertiesEXT& operator=( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSampleLocationsPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT const *>(&rhs);
return *this;
}
@@ -51072,67 +47471,54 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSampleLocationsPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts = {};
+ VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {};
+ float sampleLocationCoordinateRange[2] = {};
+ uint32_t sampleLocationSubPixelBits = {};
+ VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations = {};
};
static_assert( sizeof( PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSampleLocationsPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceSamplerFilterMinmaxPropertiesEXT
- {
- protected:
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT& operator=( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
- void* pNext = nullptr;
- vk::Bool32 filterMinmaxSingleComponentFormats;
- vk::Bool32 filterMinmaxImageComponentMapping;
- };
- static_assert( sizeof( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSamplerFilterMinmaxPropertiesEXT : public layout::PhysicalDeviceSamplerFilterMinmaxPropertiesEXT
+ struct PhysicalDeviceSamplerFilterMinmaxProperties
{
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSamplerFilterMinmaxPropertiesEXT()
+ PhysicalDeviceSamplerFilterMinmaxProperties( VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ = {} ) VULKAN_HPP_NOEXCEPT
+ : filterMinmaxSingleComponentFormats( filterMinmaxSingleComponentFormats_ )
+ , filterMinmaxImageComponentMapping( filterMinmaxImageComponentMapping_ )
{}
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSamplerFilterMinmaxPropertiesEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties ) - offsetof( PhysicalDeviceSamplerFilterMinmaxProperties, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceSamplerFilterMinmaxProperties( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceSamplerFilterMinmaxPropertiesEXT& operator=( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSamplerFilterMinmaxProperties& operator=( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSamplerFilterMinmaxPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties const *>(&rhs);
return *this;
}
- operator VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceSamplerFilterMinmaxProperties const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxProperties*>( this );
}
- operator VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceSamplerFilterMinmaxProperties &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxProperties*>( this );
}
- bool operator==( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceSamplerFilterMinmaxProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -51140,58 +47526,40 @@ namespace VULKAN_HPP_NAMESPACE
&& ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping );
}
- bool operator!=( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceSamplerFilterMinmaxProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSamplerFilterMinmaxPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats = {};
+ VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping = {};
};
- static_assert( sizeof( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceSamplerFilterMinmaxPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceSamplerFilterMinmaxProperties ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceSamplerFilterMinmaxProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceSamplerYcbcrConversionFeatures
{
- struct PhysicalDeviceSamplerYcbcrConversionFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( vk::Bool32 samplerYcbcrConversion_ = 0 ) VULKAN_HPP_NOEXCEPT
- : samplerYcbcrConversion( samplerYcbcrConversion_ )
- {}
-
- PhysicalDeviceSamplerYcbcrConversionFeatures( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(this) = rhs;
- }
-
- PhysicalDeviceSamplerYcbcrConversionFeatures& operator=( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures;
- void* pNext = nullptr;
- vk::Bool32 samplerYcbcrConversion;
- };
- static_assert( sizeof( PhysicalDeviceSamplerYcbcrConversionFeatures ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeatures ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSamplerYcbcrConversionFeatures : public layout::PhysicalDeviceSamplerYcbcrConversionFeatures
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( vk::Bool32 samplerYcbcrConversion_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSamplerYcbcrConversionFeatures( samplerYcbcrConversion_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ = {} ) VULKAN_HPP_NOEXCEPT
+ : samplerYcbcrConversion( samplerYcbcrConversion_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures ) - offsetof( PhysicalDeviceSamplerYcbcrConversionFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSamplerYcbcrConversionFeatures( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSamplerYcbcrConversionFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSamplerYcbcrConversionFeatures& operator=( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSamplerYcbcrConversionFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures const *>(&rhs);
return *this;
}
@@ -51201,7 +47569,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceSamplerYcbcrConversionFeatures & setSamplerYcbcrConversion( vk::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSamplerYcbcrConversionFeatures & setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT
{
samplerYcbcrConversion = samplerYcbcrConversion_;
return *this;
@@ -51229,257 +47597,198 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSamplerYcbcrConversionFeatures::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion = {};
};
static_assert( sizeof( PhysicalDeviceSamplerYcbcrConversionFeatures ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSamplerYcbcrConversionFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceScalarBlockLayoutFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeaturesEXT( vk::Bool32 scalarBlockLayout_ = 0 ) VULKAN_HPP_NOEXCEPT
- : scalarBlockLayout( scalarBlockLayout_ )
- {}
-
- PhysicalDeviceScalarBlockLayoutFeaturesEXT( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceScalarBlockLayoutFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceScalarBlockLayoutFeaturesEXT& operator=( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceScalarBlockLayoutFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceScalarBlockLayoutFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 scalarBlockLayout;
- };
- static_assert( sizeof( PhysicalDeviceScalarBlockLayoutFeaturesEXT ) == sizeof( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceScalarBlockLayoutFeaturesEXT : public layout::PhysicalDeviceScalarBlockLayoutFeaturesEXT
+ struct PhysicalDeviceScalarBlockLayoutFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeaturesEXT( vk::Bool32 scalarBlockLayout_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceScalarBlockLayoutFeaturesEXT( scalarBlockLayout_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ = {} ) VULKAN_HPP_NOEXCEPT
+ : scalarBlockLayout( scalarBlockLayout_ )
{}
- PhysicalDeviceScalarBlockLayoutFeaturesEXT( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceScalarBlockLayoutFeaturesEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures ) - offsetof( PhysicalDeviceScalarBlockLayoutFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceScalarBlockLayoutFeatures( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceScalarBlockLayoutFeaturesEXT& operator=( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceScalarBlockLayoutFeatures& operator=( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceScalarBlockLayoutFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceScalarBlockLayoutFeaturesEXT & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceScalarBlockLayoutFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceScalarBlockLayoutFeaturesEXT & setScalarBlockLayout( vk::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceScalarBlockLayoutFeatures & setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT
{
scalarBlockLayout = scalarBlockLayout_;
return *this;
}
- operator VkPhysicalDeviceScalarBlockLayoutFeaturesEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceScalarBlockLayoutFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceScalarBlockLayoutFeaturesEXT*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceScalarBlockLayoutFeatures*>( this );
}
- operator VkPhysicalDeviceScalarBlockLayoutFeaturesEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceScalarBlockLayoutFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceScalarBlockLayoutFeaturesEXT*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceScalarBlockLayoutFeatures*>( this );
}
- bool operator==( PhysicalDeviceScalarBlockLayoutFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceScalarBlockLayoutFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( scalarBlockLayout == rhs.scalarBlockLayout );
}
- bool operator!=( PhysicalDeviceScalarBlockLayoutFeaturesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceScalarBlockLayoutFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceScalarBlockLayoutFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceScalarBlockLayoutFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout = {};
};
- static_assert( sizeof( PhysicalDeviceScalarBlockLayoutFeaturesEXT ) == sizeof( VkPhysicalDeviceScalarBlockLayoutFeaturesEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceScalarBlockLayoutFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( vk::Bool32 separateDepthStencilLayouts_ = 0 ) VULKAN_HPP_NOEXCEPT
- : separateDepthStencilLayouts( separateDepthStencilLayouts_ )
- {}
-
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR& operator=( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 separateDepthStencilLayouts;
- };
- static_assert( sizeof( PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR ) == sizeof( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( PhysicalDeviceScalarBlockLayoutFeatures ) == sizeof( VkPhysicalDeviceScalarBlockLayoutFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceScalarBlockLayoutFeatures>::value, "struct wrapper is not a standard layout!" );
- struct PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR : public layout::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR
+ struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( vk::Bool32 separateDepthStencilLayouts_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( separateDepthStencilLayouts_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ = {} ) VULKAN_HPP_NOEXCEPT
+ : separateDepthStencilLayouts( separateDepthStencilLayouts_ )
{}
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures ) - offsetof( PhysicalDeviceSeparateDepthStencilLayoutsFeatures, pNext ) );
+ return *this;
+ }
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR& operator=( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceSeparateDepthStencilLayoutsFeatures& operator=( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR & setSeparateDepthStencilLayouts( vk::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT
{
separateDepthStencilLayouts = separateDepthStencilLayouts_;
return *this;
}
- operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*>( this );
}
- operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*>( this );
}
- bool operator==( PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( separateDepthStencilLayouts == rhs.separateDepthStencilLayouts );
}
- bool operator!=( PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts = {};
};
- static_assert( sizeof( PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR ) == sizeof( VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceShaderAtomicInt64FeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64FeaturesKHR( vk::Bool32 shaderBufferInt64Atomics_ = 0,
- vk::Bool32 shaderSharedInt64Atomics_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderBufferInt64Atomics( shaderBufferInt64Atomics_ )
- , shaderSharedInt64Atomics( shaderSharedInt64Atomics_ )
- {}
-
- PhysicalDeviceShaderAtomicInt64FeaturesKHR( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceShaderAtomicInt64FeaturesKHR& operator=( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>(this) = rhs;
- return *this;
- }
+ static_assert( sizeof( PhysicalDeviceSeparateDepthStencilLayoutsFeatures ) == sizeof( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceSeparateDepthStencilLayoutsFeatures>::value, "struct wrapper is not a standard layout!" );
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicInt64FeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 shaderBufferInt64Atomics;
- vk::Bool32 shaderSharedInt64Atomics;
- };
- static_assert( sizeof( PhysicalDeviceShaderAtomicInt64FeaturesKHR ) == sizeof( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderAtomicInt64FeaturesKHR : public layout::PhysicalDeviceShaderAtomicInt64FeaturesKHR
+ struct PhysicalDeviceShaderAtomicInt64Features
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64FeaturesKHR( vk::Bool32 shaderBufferInt64Atomics_ = 0,
- vk::Bool32 shaderSharedInt64Atomics_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderAtomicInt64FeaturesKHR( shaderBufferInt64Atomics_, shaderSharedInt64Atomics_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64Features( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderBufferInt64Atomics( shaderBufferInt64Atomics_ )
+ , shaderSharedInt64Atomics( shaderSharedInt64Atomics_ )
{}
- PhysicalDeviceShaderAtomicInt64FeaturesKHR( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderAtomicInt64FeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features ) - offsetof( PhysicalDeviceShaderAtomicInt64Features, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicInt64Features( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceShaderAtomicInt64FeaturesKHR& operator=( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderAtomicInt64Features& operator=( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderAtomicInt64FeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features const *>(&rhs);
return *this;
}
- PhysicalDeviceShaderAtomicInt64FeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderAtomicInt64Features & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceShaderAtomicInt64FeaturesKHR & setShaderBufferInt64Atomics( vk::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderAtomicInt64Features & setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
{
shaderBufferInt64Atomics = shaderBufferInt64Atomics_;
return *this;
}
- PhysicalDeviceShaderAtomicInt64FeaturesKHR & setShaderSharedInt64Atomics( vk::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderAtomicInt64Features & setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
{
shaderSharedInt64Atomics = shaderSharedInt64Atomics_;
return *this;
}
- operator VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderAtomicInt64Features const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceShaderAtomicInt64Features*>( this );
}
- operator VkPhysicalDeviceShaderAtomicInt64FeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderAtomicInt64Features &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64Features*>( this );
}
- bool operator==( PhysicalDeviceShaderAtomicInt64FeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceShaderAtomicInt64Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -51487,62 +47796,42 @@ namespace VULKAN_HPP_NAMESPACE
&& ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics );
}
- bool operator!=( PhysicalDeviceShaderAtomicInt64FeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceShaderAtomicInt64Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderAtomicInt64FeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicInt64Features;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics = {};
};
- static_assert( sizeof( PhysicalDeviceShaderAtomicInt64FeaturesKHR ) == sizeof( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceShaderAtomicInt64FeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceShaderClockFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( vk::Bool32 shaderSubgroupClock_ = 0,
- vk::Bool32 shaderDeviceClock_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderSubgroupClock( shaderSubgroupClock_ )
- , shaderDeviceClock( shaderDeviceClock_ )
- {}
-
- PhysicalDeviceShaderClockFeaturesKHR( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderClockFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceShaderClockFeaturesKHR& operator=( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderClockFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 shaderSubgroupClock;
- vk::Bool32 shaderDeviceClock;
- };
- static_assert( sizeof( PhysicalDeviceShaderClockFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderClockFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( PhysicalDeviceShaderAtomicInt64Features ) == sizeof( VkPhysicalDeviceShaderAtomicInt64Features ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderAtomicInt64Features>::value, "struct wrapper is not a standard layout!" );
- struct PhysicalDeviceShaderClockFeaturesKHR : public layout::PhysicalDeviceShaderClockFeaturesKHR
+ struct PhysicalDeviceShaderClockFeaturesKHR
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( vk::Bool32 shaderSubgroupClock_ = 0,
- vk::Bool32 shaderDeviceClock_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderClockFeaturesKHR( shaderSubgroupClock_, shaderDeviceClock_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderSubgroupClock( shaderSubgroupClock_ )
+ , shaderDeviceClock( shaderDeviceClock_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR ) - offsetof( PhysicalDeviceShaderClockFeaturesKHR, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderClockFeaturesKHR( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderClockFeaturesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderClockFeaturesKHR& operator=( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderClockFeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR const *>(&rhs);
return *this;
}
@@ -51552,13 +47841,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderClockFeaturesKHR & setShaderSubgroupClock( vk::Bool32 shaderSubgroupClock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderClockFeaturesKHR & setShaderSubgroupClock( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ ) VULKAN_HPP_NOEXCEPT
{
shaderSubgroupClock = shaderSubgroupClock_;
return *this;
}
- PhysicalDeviceShaderClockFeaturesKHR & setShaderDeviceClock( vk::Bool32 shaderDeviceClock_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderClockFeaturesKHR & setShaderDeviceClock( VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ ) VULKAN_HPP_NOEXCEPT
{
shaderDeviceClock = shaderDeviceClock_;
return *this;
@@ -51587,53 +47876,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderClockFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock = {};
};
static_assert( sizeof( PhysicalDeviceShaderClockFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderClockFeaturesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderClockFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShaderCoreProperties2AMD
{
- struct PhysicalDeviceShaderCoreProperties2AMD
- {
- protected:
- PhysicalDeviceShaderCoreProperties2AMD() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceShaderCoreProperties2AMD( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderCoreProperties2AMD*>(this) = rhs;
- }
-
- PhysicalDeviceShaderCoreProperties2AMD& operator=( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderCoreProperties2AMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD;
- void* pNext = nullptr;
- vk::ShaderCorePropertiesFlagsAMD shaderCoreFeatures;
- uint32_t activeComputeUnitCount;
- };
- static_assert( sizeof( PhysicalDeviceShaderCoreProperties2AMD ) == sizeof( VkPhysicalDeviceShaderCoreProperties2AMD ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderCoreProperties2AMD : public layout::PhysicalDeviceShaderCoreProperties2AMD
- {
- PhysicalDeviceShaderCoreProperties2AMD() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderCoreProperties2AMD()
+ PhysicalDeviceShaderCoreProperties2AMD( VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures_ = {},
+ uint32_t activeComputeUnitCount_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderCoreFeatures( shaderCoreFeatures_ )
+ , activeComputeUnitCount( activeComputeUnitCount_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD ) - offsetof( PhysicalDeviceShaderCoreProperties2AMD, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderCoreProperties2AMD( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderCoreProperties2AMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderCoreProperties2AMD& operator=( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderCoreProperties2AMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD const *>(&rhs);
return *this;
}
@@ -51660,65 +47933,61 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderCoreProperties2AMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures = {};
+ uint32_t activeComputeUnitCount = {};
};
static_assert( sizeof( PhysicalDeviceShaderCoreProperties2AMD ) == sizeof( VkPhysicalDeviceShaderCoreProperties2AMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderCoreProperties2AMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderCorePropertiesAMD
- {
- protected:
- PhysicalDeviceShaderCorePropertiesAMD() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceShaderCorePropertiesAMD( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(this) = rhs;
- }
-
- PhysicalDeviceShaderCorePropertiesAMD& operator=( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD;
- void* pNext = nullptr;
- 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;
- };
- static_assert( sizeof( PhysicalDeviceShaderCorePropertiesAMD ) == sizeof( VkPhysicalDeviceShaderCorePropertiesAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderCorePropertiesAMD : public layout::PhysicalDeviceShaderCorePropertiesAMD
- {
- PhysicalDeviceShaderCorePropertiesAMD() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderCorePropertiesAMD()
- {}
+ struct PhysicalDeviceShaderCorePropertiesAMD
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD ) - offsetof( PhysicalDeviceShaderCorePropertiesAMD, pNext ) );
+ return *this;
+ }
PhysicalDeviceShaderCorePropertiesAMD( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderCorePropertiesAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderCorePropertiesAMD& operator=( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderCorePropertiesAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD const *>(&rhs);
return *this;
}
@@ -51757,53 +48026,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderCorePropertiesAMD::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceShaderCorePropertiesAMD ) == sizeof( VkPhysicalDeviceShaderCorePropertiesAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderCorePropertiesAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT
{
- struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( vk::Bool32 shaderDemoteToHelperInvocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderDemoteToHelperInvocation( shaderDemoteToHelperInvocation_ )
- {}
-
- PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT& operator=( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 shaderDemoteToHelperInvocation;
- };
- static_assert( sizeof( PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT : public layout::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( vk::Bool32 shaderDemoteToHelperInvocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( shaderDemoteToHelperInvocation_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderDemoteToHelperInvocation( shaderDemoteToHelperInvocation_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT ) - offsetof( PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT& operator=( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const *>(&rhs);
return *this;
}
@@ -51813,7 +48076,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT & setShaderDemoteToHelperInvocation( vk::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT & setShaderDemoteToHelperInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT
{
shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_;
return *this;
@@ -51841,53 +48104,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation = {};
};
static_assert( sizeof( PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShaderDrawParametersFeatures
{
- struct PhysicalDeviceShaderDrawParametersFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( vk::Bool32 shaderDrawParameters_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderDrawParameters( shaderDrawParameters_ )
- {}
-
- PhysicalDeviceShaderDrawParametersFeatures( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderDrawParametersFeatures*>(this) = rhs;
- }
-
- PhysicalDeviceShaderDrawParametersFeatures& operator=( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderDrawParametersFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures;
- void* pNext = nullptr;
- vk::Bool32 shaderDrawParameters;
- };
- static_assert( sizeof( PhysicalDeviceShaderDrawParametersFeatures ) == sizeof( VkPhysicalDeviceShaderDrawParametersFeatures ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderDrawParametersFeatures : public layout::PhysicalDeviceShaderDrawParametersFeatures
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( vk::Bool32 shaderDrawParameters_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderDrawParametersFeatures( shaderDrawParameters_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderDrawParameters( shaderDrawParameters_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures ) - offsetof( PhysicalDeviceShaderDrawParametersFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderDrawParametersFeatures( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderDrawParametersFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderDrawParametersFeatures& operator=( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderDrawParametersFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures const *>(&rhs);
return *this;
}
@@ -51897,7 +48141,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderDrawParametersFeatures & setShaderDrawParameters( vk::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderDrawParametersFeatures & setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT
{
shaderDrawParameters = shaderDrawParameters_;
return *this;
@@ -51925,89 +48169,68 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderDrawParametersFeatures::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters = {};
};
static_assert( sizeof( PhysicalDeviceShaderDrawParametersFeatures ) == sizeof( VkPhysicalDeviceShaderDrawParametersFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderDrawParametersFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderFloat16Int8FeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8FeaturesKHR( vk::Bool32 shaderFloat16_ = 0,
- vk::Bool32 shaderInt8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderFloat16( shaderFloat16_ )
- , shaderInt8( shaderInt8_ )
- {}
-
- PhysicalDeviceShaderFloat16Int8FeaturesKHR( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8FeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceShaderFloat16Int8FeaturesKHR& operator=( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8FeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderFloat16Int8FeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 shaderFloat16;
- vk::Bool32 shaderInt8;
- };
- static_assert( sizeof( PhysicalDeviceShaderFloat16Int8FeaturesKHR ) == sizeof( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderFloat16Int8FeaturesKHR : public layout::PhysicalDeviceShaderFloat16Int8FeaturesKHR
+ struct PhysicalDeviceShaderFloat16Int8Features
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8FeaturesKHR( vk::Bool32 shaderFloat16_ = 0,
- vk::Bool32 shaderInt8_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderFloat16Int8FeaturesKHR( shaderFloat16_, shaderInt8_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8Features( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderFloat16( shaderFloat16_ )
+ , shaderInt8( shaderInt8_ )
{}
- PhysicalDeviceShaderFloat16Int8FeaturesKHR( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderFloat16Int8FeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features ) - offsetof( PhysicalDeviceShaderFloat16Int8Features, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceShaderFloat16Int8Features( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceShaderFloat16Int8FeaturesKHR& operator=( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderFloat16Int8Features& operator=( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderFloat16Int8FeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features const *>(&rhs);
return *this;
}
- PhysicalDeviceShaderFloat16Int8FeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderFloat16Int8Features & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceShaderFloat16Int8FeaturesKHR & setShaderFloat16( vk::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderFloat16Int8Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT
{
shaderFloat16 = shaderFloat16_;
return *this;
}
- PhysicalDeviceShaderFloat16Int8FeaturesKHR & setShaderInt8( vk::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderFloat16Int8Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT
{
shaderInt8 = shaderInt8_;
return *this;
}
- operator VkPhysicalDeviceShaderFloat16Int8FeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderFloat16Int8Features const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8FeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8Features*>( this );
}
- operator VkPhysicalDeviceShaderFloat16Int8FeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderFloat16Int8Features &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8FeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8Features*>( this );
}
- bool operator==( PhysicalDeviceShaderFloat16Int8FeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceShaderFloat16Int8Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -52015,58 +48238,40 @@ namespace VULKAN_HPP_NAMESPACE
&& ( shaderInt8 == rhs.shaderInt8 );
}
- bool operator!=( PhysicalDeviceShaderFloat16Int8FeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceShaderFloat16Int8Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderFloat16Int8FeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderFloat16Int8Features;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16 = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderInt8 = {};
};
- static_assert( sizeof( PhysicalDeviceShaderFloat16Int8FeaturesKHR ) == sizeof( VkPhysicalDeviceShaderFloat16Int8FeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceShaderFloat16Int8FeaturesKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceShaderFloat16Int8Features ) == sizeof( VkPhysicalDeviceShaderFloat16Int8Features ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderFloat16Int8Features>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShaderImageFootprintFeaturesNV
{
- struct PhysicalDeviceShaderImageFootprintFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( vk::Bool32 imageFootprint_ = 0 ) VULKAN_HPP_NOEXCEPT
- : imageFootprint( imageFootprint_ )
- {}
-
- PhysicalDeviceShaderImageFootprintFeaturesNV( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderImageFootprintFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceShaderImageFootprintFeaturesNV& operator=( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderImageFootprintFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 imageFootprint;
- };
- static_assert( sizeof( PhysicalDeviceShaderImageFootprintFeaturesNV ) == sizeof( VkPhysicalDeviceShaderImageFootprintFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderImageFootprintFeaturesNV : public layout::PhysicalDeviceShaderImageFootprintFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( vk::Bool32 imageFootprint_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderImageFootprintFeaturesNV( imageFootprint_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ = {} ) VULKAN_HPP_NOEXCEPT
+ : imageFootprint( imageFootprint_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV ) - offsetof( PhysicalDeviceShaderImageFootprintFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderImageFootprintFeaturesNV( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderImageFootprintFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderImageFootprintFeaturesNV& operator=( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderImageFootprintFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV const *>(&rhs);
return *this;
}
@@ -52076,7 +48281,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderImageFootprintFeaturesNV & setImageFootprint( vk::Bool32 imageFootprint_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderImageFootprintFeaturesNV & setImageFootprint( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ ) VULKAN_HPP_NOEXCEPT
{
imageFootprint = imageFootprint_;
return *this;
@@ -52104,53 +48309,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderImageFootprintFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 imageFootprint = {};
};
static_assert( sizeof( PhysicalDeviceShaderImageFootprintFeaturesNV ) == sizeof( VkPhysicalDeviceShaderImageFootprintFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderImageFootprintFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( vk::Bool32 shaderIntegerFunctions2_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderIntegerFunctions2( shaderIntegerFunctions2_ )
- {}
-
- PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL*>(this) = rhs;
- }
-
- PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL& operator=( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;
- void* pNext = nullptr;
- vk::Bool32 shaderIntegerFunctions2;
- };
- static_assert( sizeof( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ) == sizeof( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL : public layout::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
+ struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( vk::Bool32 shaderIntegerFunctions2_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( shaderIntegerFunctions2_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderIntegerFunctions2( shaderIntegerFunctions2_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ) - offsetof( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL& operator=( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const *>(&rhs);
return *this;
}
@@ -52160,7 +48346,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setShaderIntegerFunctions2( vk::Bool32 shaderIntegerFunctions2_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setShaderIntegerFunctions2( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ ) VULKAN_HPP_NOEXCEPT
{
shaderIntegerFunctions2 = shaderIntegerFunctions2_;
return *this;
@@ -52188,53 +48374,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2 = {};
};
static_assert( sizeof( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ) == sizeof( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderSMBuiltinsFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( vk::Bool32 shaderSMBuiltins_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderSMBuiltins( shaderSMBuiltins_ )
- {}
-
- PhysicalDeviceShaderSMBuiltinsFeaturesNV( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSMBuiltinsFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceShaderSMBuiltinsFeaturesNV& operator=( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSMBuiltinsFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 shaderSMBuiltins;
- };
- static_assert( sizeof( PhysicalDeviceShaderSMBuiltinsFeaturesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderSMBuiltinsFeaturesNV : public layout::PhysicalDeviceShaderSMBuiltinsFeaturesNV
+ struct PhysicalDeviceShaderSMBuiltinsFeaturesNV
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( vk::Bool32 shaderSMBuiltins_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSMBuiltinsFeaturesNV( shaderSMBuiltins_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderSMBuiltins( shaderSMBuiltins_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV ) - offsetof( PhysicalDeviceShaderSMBuiltinsFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderSMBuiltinsFeaturesNV( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSMBuiltinsFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderSMBuiltinsFeaturesNV& operator=( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderSMBuiltinsFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV const *>(&rhs);
return *this;
}
@@ -52244,7 +48411,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShaderSMBuiltinsFeaturesNV & setShaderSMBuiltins( vk::Bool32 shaderSMBuiltins_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderSMBuiltinsFeaturesNV & setShaderSMBuiltins( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ ) VULKAN_HPP_NOEXCEPT
{
shaderSMBuiltins = shaderSMBuiltins_;
return *this;
@@ -52272,53 +48439,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderSMBuiltinsFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins = {};
};
static_assert( sizeof( PhysicalDeviceShaderSMBuiltinsFeaturesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderSMBuiltinsFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderSMBuiltinsPropertiesNV
- {
- protected:
- PhysicalDeviceShaderSMBuiltinsPropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceShaderSMBuiltinsPropertiesNV( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSMBuiltinsPropertiesNV*>(this) = rhs;
- }
-
- PhysicalDeviceShaderSMBuiltinsPropertiesNV& operator=( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSMBuiltinsPropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV;
- void* pNext = nullptr;
- uint32_t shaderSMCount;
- uint32_t shaderWarpsPerSM;
- };
- static_assert( sizeof( PhysicalDeviceShaderSMBuiltinsPropertiesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderSMBuiltinsPropertiesNV : public layout::PhysicalDeviceShaderSMBuiltinsPropertiesNV
+ struct PhysicalDeviceShaderSMBuiltinsPropertiesNV
{
- PhysicalDeviceShaderSMBuiltinsPropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSMBuiltinsPropertiesNV()
+ PhysicalDeviceShaderSMBuiltinsPropertiesNV( uint32_t shaderSMCount_ = {},
+ uint32_t shaderWarpsPerSM_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderSMCount( shaderSMCount_ )
+ , shaderWarpsPerSM( shaderWarpsPerSM_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV ) - offsetof( PhysicalDeviceShaderSMBuiltinsPropertiesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShaderSMBuiltinsPropertiesNV( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSMBuiltinsPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShaderSMBuiltinsPropertiesNV& operator=( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderSMBuiltinsPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV const *>(&rhs);
return *this;
}
@@ -52345,141 +48495,102 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderSMBuiltinsPropertiesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV;
+ void* pNext = {};
+ uint32_t shaderSMCount = {};
+ uint32_t shaderWarpsPerSM = {};
};
static_assert( sizeof( PhysicalDeviceShaderSMBuiltinsPropertiesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShaderSMBuiltinsPropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( vk::Bool32 shaderSubgroupExtendedTypes_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shaderSubgroupExtendedTypes( shaderSubgroupExtendedTypes_ )
- {}
-
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR& operator=( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 shaderSubgroupExtendedTypes;
- };
- static_assert( sizeof( PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR : public layout::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR
+ struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( vk::Bool32 shaderSubgroupExtendedTypes_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( shaderSubgroupExtendedTypes_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderSubgroupExtendedTypes( shaderSubgroupExtendedTypes_ )
{}
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures ) - offsetof( PhysicalDeviceShaderSubgroupExtendedTypesFeatures, pNext ) );
+ return *this;
+ }
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR& operator=( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceShaderSubgroupExtendedTypesFeatures& operator=( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR & setShaderSubgroupExtendedTypes( vk::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT
{
shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_;
return *this;
}
- operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>( this );
}
- operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>( this );
}
- bool operator==( PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( shaderSubgroupExtendedTypes == rhs.shaderSubgroupExtendedTypes );
}
- bool operator!=( PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes = {};
};
- static_assert( sizeof( PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceShaderSubgroupExtendedTypesFeatures ) == sizeof( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderSubgroupExtendedTypesFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShadingRateImageFeaturesNV
{
- struct PhysicalDeviceShadingRateImageFeaturesNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( vk::Bool32 shadingRateImage_ = 0,
- vk::Bool32 shadingRateCoarseSampleOrder_ = 0 ) VULKAN_HPP_NOEXCEPT
- : shadingRateImage( shadingRateImage_ )
- , shadingRateCoarseSampleOrder( shadingRateCoarseSampleOrder_ )
- {}
-
- PhysicalDeviceShadingRateImageFeaturesNV( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShadingRateImageFeaturesNV*>(this) = rhs;
- }
-
- PhysicalDeviceShadingRateImageFeaturesNV& operator=( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShadingRateImageFeaturesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV;
- void* pNext = nullptr;
- vk::Bool32 shadingRateImage;
- vk::Bool32 shadingRateCoarseSampleOrder;
- };
- static_assert( sizeof( PhysicalDeviceShadingRateImageFeaturesNV ) == sizeof( VkPhysicalDeviceShadingRateImageFeaturesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShadingRateImageFeaturesNV : public layout::PhysicalDeviceShadingRateImageFeaturesNV
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( vk::Bool32 shadingRateImage_ = 0,
- vk::Bool32 shadingRateCoarseSampleOrder_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShadingRateImageFeaturesNV( shadingRateImage_, shadingRateCoarseSampleOrder_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shadingRateImage( shadingRateImage_ )
+ , shadingRateCoarseSampleOrder( shadingRateCoarseSampleOrder_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV ) - offsetof( PhysicalDeviceShadingRateImageFeaturesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShadingRateImageFeaturesNV( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShadingRateImageFeaturesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShadingRateImageFeaturesNV& operator=( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShadingRateImageFeaturesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV const *>(&rhs);
return *this;
}
@@ -52489,13 +48600,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateImage( vk::Bool32 shadingRateImage_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateImage( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ ) VULKAN_HPP_NOEXCEPT
{
shadingRateImage = shadingRateImage_;
return *this;
}
- PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateCoarseSampleOrder( vk::Bool32 shadingRateCoarseSampleOrder_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateCoarseSampleOrder( VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ ) VULKAN_HPP_NOEXCEPT
{
shadingRateCoarseSampleOrder = shadingRateCoarseSampleOrder_;
return *this;
@@ -52524,54 +48635,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShadingRateImageFeaturesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder = {};
};
static_assert( sizeof( PhysicalDeviceShadingRateImageFeaturesNV ) == sizeof( VkPhysicalDeviceShadingRateImageFeaturesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShadingRateImageFeaturesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceShadingRateImagePropertiesNV
{
- struct PhysicalDeviceShadingRateImagePropertiesNV
- {
- protected:
- PhysicalDeviceShadingRateImagePropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceShadingRateImagePropertiesNV( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShadingRateImagePropertiesNV*>(this) = rhs;
- }
-
- PhysicalDeviceShadingRateImagePropertiesNV& operator=( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceShadingRateImagePropertiesNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV;
- void* pNext = nullptr;
- vk::Extent2D shadingRateTexelSize;
- uint32_t shadingRatePaletteSize;
- uint32_t shadingRateMaxCoarseSamples;
- };
- static_assert( sizeof( PhysicalDeviceShadingRateImagePropertiesNV ) == sizeof( VkPhysicalDeviceShadingRateImagePropertiesNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceShadingRateImagePropertiesNV : public layout::PhysicalDeviceShadingRateImagePropertiesNV
- {
- PhysicalDeviceShadingRateImagePropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShadingRateImagePropertiesNV()
+ PhysicalDeviceShadingRateImagePropertiesNV( VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize_ = {},
+ uint32_t shadingRatePaletteSize_ = {},
+ uint32_t shadingRateMaxCoarseSamples_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shadingRateTexelSize( shadingRateTexelSize_ )
+ , shadingRatePaletteSize( shadingRatePaletteSize_ )
+ , shadingRateMaxCoarseSamples( shadingRateMaxCoarseSamples_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV ) - offsetof( PhysicalDeviceShadingRateImagePropertiesNV, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceShadingRateImagePropertiesNV( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceShadingRateImagePropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceShadingRateImagePropertiesNV& operator=( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceShadingRateImagePropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV const *>(&rhs);
return *this;
}
@@ -52599,69 +48695,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceShadingRateImagePropertiesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize = {};
+ uint32_t shadingRatePaletteSize = {};
+ uint32_t shadingRateMaxCoarseSamples = {};
};
static_assert( sizeof( PhysicalDeviceShadingRateImagePropertiesNV ) == sizeof( VkPhysicalDeviceShadingRateImagePropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceShadingRateImagePropertiesNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceSparseImageFormatInfo2
{
- struct PhysicalDeviceSparseImageFormatInfo2
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseImageFormatInfo2( vk::Format format_ = vk::Format::eUndefined,
- vk::ImageType type_ = vk::ImageType::e1D,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal ) VULKAN_HPP_NOEXCEPT
- : format( format_ )
- , type( type_ )
- , samples( samples_ )
- , usage( usage_ )
- , tiling( tiling_ )
- {}
-
- PhysicalDeviceSparseImageFormatInfo2( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSparseImageFormatInfo2*>(this) = rhs;
- }
-
- PhysicalDeviceSparseImageFormatInfo2& operator=( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSparseImageFormatInfo2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2;
- const void* pNext = nullptr;
- vk::Format format;
- vk::ImageType type;
- vk::SampleCountFlagBits samples;
- vk::ImageUsageFlags usage;
- vk::ImageTiling tiling;
- };
- static_assert( sizeof( PhysicalDeviceSparseImageFormatInfo2 ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2 ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSparseImageFormatInfo2 : public layout::PhysicalDeviceSparseImageFormatInfo2
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseImageFormatInfo2( vk::Format format_ = vk::Format::eUndefined,
- vk::ImageType type_ = vk::ImageType::e1D,
- vk::SampleCountFlagBits samples_ = vk::SampleCountFlagBits::e1,
- vk::ImageUsageFlags usage_ = vk::ImageUsageFlags(),
- vk::ImageTiling tiling_ = vk::ImageTiling::eOptimal ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSparseImageFormatInfo2( format_, type_, samples_, usage_, tiling_ )
+ 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 ) VULKAN_HPP_NOEXCEPT
+ : format( format_ )
+ , type( type_ )
+ , samples( samples_ )
+ , usage( usage_ )
+ , tiling( tiling_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 ) - offsetof( PhysicalDeviceSparseImageFormatInfo2, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSparseImageFormatInfo2( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSparseImageFormatInfo2( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSparseImageFormatInfo2& operator=( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSparseImageFormatInfo2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 const *>(&rhs);
return *this;
}
@@ -52671,31 +48742,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceSparseImageFormatInfo2 & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSparseImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- PhysicalDeviceSparseImageFormatInfo2 & setType( vk::ImageType type_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSparseImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
}
- PhysicalDeviceSparseImageFormatInfo2 & setSamples( vk::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSparseImageFormatInfo2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT
{
samples = samples_;
return *this;
}
- PhysicalDeviceSparseImageFormatInfo2 & setUsage( vk::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSparseImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT
{
usage = usage_;
return *this;
}
- PhysicalDeviceSparseImageFormatInfo2 & setTiling( vk::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSparseImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT
{
tiling = tiling_;
return *this;
@@ -52717,7 +48788,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pNext == rhs.pNext )
&& ( format == rhs.format )
&& ( type == rhs.type )
- && vk::operator==( samples, rhs.samples )
+ && ( samples == rhs.samples )
&& ( usage == rhs.usage )
&& ( tiling == rhs.tiling );
}
@@ -52727,55 +48798,44 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSparseImageFormatInfo2::sType;
+ public:
+ const 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;
};
static_assert( sizeof( PhysicalDeviceSparseImageFormatInfo2 ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSparseImageFormatInfo2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceSubgroupProperties
- {
- protected:
- PhysicalDeviceSubgroupProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceSubgroupProperties( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(this) = rhs;
- }
-
- PhysicalDeviceSubgroupProperties& operator=( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSubgroupProperties;
- void* pNext = nullptr;
- uint32_t subgroupSize;
- vk::ShaderStageFlags supportedStages;
- vk::SubgroupFeatureFlags supportedOperations;
- vk::Bool32 quadOperationsInAllStages;
- };
- static_assert( sizeof( PhysicalDeviceSubgroupProperties ) == sizeof( VkPhysicalDeviceSubgroupProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSubgroupProperties : public layout::PhysicalDeviceSubgroupProperties
+ struct PhysicalDeviceSubgroupProperties
{
- PhysicalDeviceSubgroupProperties() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupProperties()
+ PhysicalDeviceSubgroupProperties( uint32_t subgroupSize_ = {},
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedStages_ = {},
+ VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags supportedOperations_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 quadOperationsInAllStages_ = {} ) VULKAN_HPP_NOEXCEPT
+ : subgroupSize( subgroupSize_ )
+ , supportedStages( supportedStages_ )
+ , supportedOperations( supportedOperations_ )
+ , quadOperationsInAllStages( quadOperationsInAllStages_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties ) - offsetof( PhysicalDeviceSubgroupProperties, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSubgroupProperties( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSubgroupProperties& operator=( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSubgroupProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties const *>(&rhs);
return *this;
}
@@ -52804,57 +48864,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSubgroupProperties::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceSubgroupProperties ) == sizeof( VkPhysicalDeviceSubgroupProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSubgroupProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceSubgroupSizeControlFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeaturesEXT( vk::Bool32 subgroupSizeControl_ = 0,
- vk::Bool32 computeFullSubgroups_ = 0 ) VULKAN_HPP_NOEXCEPT
- : subgroupSizeControl( subgroupSizeControl_ )
- , computeFullSubgroups( computeFullSubgroups_ )
- {}
-
- PhysicalDeviceSubgroupSizeControlFeaturesEXT( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceSubgroupSizeControlFeaturesEXT& operator=( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 subgroupSizeControl;
- vk::Bool32 computeFullSubgroups;
- };
- static_assert( sizeof( PhysicalDeviceSubgroupSizeControlFeaturesEXT ) == sizeof( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSubgroupSizeControlFeaturesEXT : public layout::PhysicalDeviceSubgroupSizeControlFeaturesEXT
+ struct PhysicalDeviceSubgroupSizeControlFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeaturesEXT( vk::Bool32 subgroupSizeControl_ = 0,
- vk::Bool32 computeFullSubgroups_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupSizeControlFeaturesEXT( subgroupSizeControl_, computeFullSubgroups_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ = {} ) VULKAN_HPP_NOEXCEPT
+ : subgroupSizeControl( subgroupSizeControl_ )
+ , computeFullSubgroups( computeFullSubgroups_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeaturesEXT ) - offsetof( PhysicalDeviceSubgroupSizeControlFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSubgroupSizeControlFeaturesEXT( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupSizeControlFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSubgroupSizeControlFeaturesEXT& operator=( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSubgroupSizeControlFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeaturesEXT const *>(&rhs);
return *this;
}
@@ -52864,13 +48906,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceSubgroupSizeControlFeaturesEXT & setSubgroupSizeControl( vk::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSubgroupSizeControlFeaturesEXT & setSubgroupSizeControl( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT
{
subgroupSizeControl = subgroupSizeControl_;
return *this;
}
- PhysicalDeviceSubgroupSizeControlFeaturesEXT & setComputeFullSubgroups( vk::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSubgroupSizeControlFeaturesEXT & setComputeFullSubgroups( VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT
{
computeFullSubgroups = computeFullSubgroups_;
return *this;
@@ -52899,55 +48941,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSubgroupSizeControlFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl = {};
+ VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups = {};
};
static_assert( sizeof( PhysicalDeviceSubgroupSizeControlFeaturesEXT ) == sizeof( VkPhysicalDeviceSubgroupSizeControlFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSubgroupSizeControlFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceSubgroupSizeControlPropertiesEXT
{
- struct PhysicalDeviceSubgroupSizeControlPropertiesEXT
- {
- protected:
- PhysicalDeviceSubgroupSizeControlPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceSubgroupSizeControlPropertiesEXT( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceSubgroupSizeControlPropertiesEXT& operator=( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlPropertiesEXT;
- void* pNext = nullptr;
- uint32_t minSubgroupSize;
- uint32_t maxSubgroupSize;
- uint32_t maxComputeWorkgroupSubgroups;
- vk::ShaderStageFlags requiredSubgroupSizeStages;
- };
- static_assert( sizeof( PhysicalDeviceSubgroupSizeControlPropertiesEXT ) == sizeof( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSubgroupSizeControlPropertiesEXT : public layout::PhysicalDeviceSubgroupSizeControlPropertiesEXT
- {
- PhysicalDeviceSubgroupSizeControlPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupSizeControlPropertiesEXT()
+ PhysicalDeviceSubgroupSizeControlPropertiesEXT( uint32_t minSubgroupSize_ = {},
+ uint32_t maxSubgroupSize_ = {},
+ uint32_t maxComputeWorkgroupSubgroups_ = {},
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages_ = {} ) VULKAN_HPP_NOEXCEPT
+ : minSubgroupSize( minSubgroupSize_ )
+ , maxSubgroupSize( maxSubgroupSize_ )
+ , maxComputeWorkgroupSubgroups( maxComputeWorkgroupSubgroups_ )
+ , requiredSubgroupSizeStages( requiredSubgroupSizeStages_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlPropertiesEXT ) - offsetof( PhysicalDeviceSubgroupSizeControlPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSubgroupSizeControlPropertiesEXT( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSubgroupSizeControlPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSubgroupSizeControlPropertiesEXT& operator=( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSubgroupSizeControlPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlPropertiesEXT const *>(&rhs);
return *this;
}
@@ -52976,53 +49004,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSubgroupSizeControlPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlPropertiesEXT;
+ void* pNext = {};
+ uint32_t minSubgroupSize = {};
+ uint32_t maxSubgroupSize = {};
+ uint32_t maxComputeWorkgroupSubgroups = {};
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages = {};
};
static_assert( sizeof( PhysicalDeviceSubgroupSizeControlPropertiesEXT ) == sizeof( VkPhysicalDeviceSubgroupSizeControlPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSubgroupSizeControlPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceSurfaceInfo2KHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( vk::SurfaceKHR surface_ = vk::SurfaceKHR() ) VULKAN_HPP_NOEXCEPT
- : surface( surface_ )
- {}
-
- PhysicalDeviceSurfaceInfo2KHR( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSurfaceInfo2KHR*>(this) = rhs;
- }
-
- PhysicalDeviceSurfaceInfo2KHR& operator=( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceSurfaceInfo2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR;
- const void* pNext = nullptr;
- vk::SurfaceKHR surface;
- };
- static_assert( sizeof( PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceSurfaceInfo2KHR : public layout::PhysicalDeviceSurfaceInfo2KHR
+ struct PhysicalDeviceSurfaceInfo2KHR
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( vk::SurfaceKHR surface_ = vk::SurfaceKHR() ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSurfaceInfo2KHR( surface_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ = {} ) VULKAN_HPP_NOEXCEPT
+ : surface( surface_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR ) - offsetof( PhysicalDeviceSurfaceInfo2KHR, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceSurfaceInfo2KHR( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceSurfaceInfo2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceSurfaceInfo2KHR& operator=( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceSurfaceInfo2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR const *>(&rhs);
return *this;
}
@@ -53032,7 +49044,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceSurfaceInfo2KHR & setSurface( vk::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceSurfaceInfo2KHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT
{
surface = surface_;
return *this;
@@ -53060,53 +49072,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceSurfaceInfo2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface = {};
};
static_assert( sizeof( PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceSurfaceInfo2KHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( vk::Bool32 texelBufferAlignment_ = 0 ) VULKAN_HPP_NOEXCEPT
- : texelBufferAlignment( texelBufferAlignment_ )
- {}
-
- PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceTexelBufferAlignmentFeaturesEXT& operator=( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 texelBufferAlignment;
- };
- static_assert( sizeof( PhysicalDeviceTexelBufferAlignmentFeaturesEXT ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT : public layout::PhysicalDeviceTexelBufferAlignmentFeaturesEXT
+ struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( vk::Bool32 texelBufferAlignment_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTexelBufferAlignmentFeaturesEXT( texelBufferAlignment_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ = {} ) VULKAN_HPP_NOEXCEPT
+ : texelBufferAlignment( texelBufferAlignment_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT ) - offsetof( PhysicalDeviceTexelBufferAlignmentFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTexelBufferAlignmentFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceTexelBufferAlignmentFeaturesEXT& operator=( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTexelBufferAlignmentFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT const *>(&rhs);
return *this;
}
@@ -53116,7 +49109,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setTexelBufferAlignment( vk::Bool32 texelBufferAlignment_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setTexelBufferAlignment( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ ) VULKAN_HPP_NOEXCEPT
{
texelBufferAlignment = texelBufferAlignment_;
return *this;
@@ -53144,55 +49137,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTexelBufferAlignmentFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment = {};
};
static_assert( sizeof( PhysicalDeviceTexelBufferAlignmentFeaturesEXT ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceTexelBufferAlignmentFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT
{
- struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT
- {
- protected:
- PhysicalDeviceTexelBufferAlignmentPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceTexelBufferAlignmentPropertiesEXT( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceTexelBufferAlignmentPropertiesEXT& operator=( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentPropertiesEXT;
- void* pNext = nullptr;
- vk::DeviceSize storageTexelBufferOffsetAlignmentBytes;
- vk::Bool32 storageTexelBufferOffsetSingleTexelAlignment;
- vk::DeviceSize uniformTexelBufferOffsetAlignmentBytes;
- vk::Bool32 uniformTexelBufferOffsetSingleTexelAlignment;
- };
- static_assert( sizeof( PhysicalDeviceTexelBufferAlignmentPropertiesEXT ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT : public layout::PhysicalDeviceTexelBufferAlignmentPropertiesEXT
- {
- PhysicalDeviceTexelBufferAlignmentPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTexelBufferAlignmentPropertiesEXT()
+ PhysicalDeviceTexelBufferAlignmentPropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment_ = {},
+ VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment_ = {} ) VULKAN_HPP_NOEXCEPT
+ : storageTexelBufferOffsetAlignmentBytes( storageTexelBufferOffsetAlignmentBytes_ )
+ , storageTexelBufferOffsetSingleTexelAlignment( storageTexelBufferOffsetSingleTexelAlignment_ )
+ , uniformTexelBufferOffsetAlignmentBytes( uniformTexelBufferOffsetAlignmentBytes_ )
+ , uniformTexelBufferOffsetSingleTexelAlignment( uniformTexelBufferOffsetSingleTexelAlignment_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentPropertiesEXT ) - offsetof( PhysicalDeviceTexelBufferAlignmentPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceTexelBufferAlignmentPropertiesEXT( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTexelBufferAlignmentPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceTexelBufferAlignmentPropertiesEXT& operator=( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTexelBufferAlignmentPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentPropertiesEXT const *>(&rhs);
return *this;
}
@@ -53221,63 +49199,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTexelBufferAlignmentPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentPropertiesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes = {};
+ VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes = {};
+ VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment = {};
};
static_assert( sizeof( PhysicalDeviceTexelBufferAlignmentPropertiesEXT ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceTexelBufferAlignmentPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( vk::Bool32 textureCompressionASTC_HDR_ = 0 ) VULKAN_HPP_NOEXCEPT
- : textureCompressionASTC_HDR( textureCompressionASTC_HDR_ )
- {}
-
- PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT& operator=( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeaturesEXT;
- const void* pNext = nullptr;
- vk::Bool32 textureCompressionASTC_HDR;
- };
- static_assert( sizeof( PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT ) == sizeof( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT : public layout::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
+ struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( vk::Bool32 textureCompressionASTC_HDR_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( textureCompressionASTC_HDR_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ = {} ) VULKAN_HPP_NOEXCEPT
+ : textureCompressionASTC_HDR( textureCompressionASTC_HDR_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT ) - offsetof( PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT& operator=( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const *>(&rhs);
return *this;
}
- PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & setTextureCompressionASTC_HDR( vk::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & setTextureCompressionASTC_HDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT
{
textureCompressionASTC_HDR = textureCompressionASTC_HDR_;
return *this;
@@ -53305,212 +49267,228 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR = {};
};
static_assert( sizeof( PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT ) == sizeof( VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceTimelineSemaphoreFeatures
{
- struct PhysicalDeviceTimelineSemaphoreFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeaturesKHR( vk::Bool32 timelineSemaphore_ = 0 ) VULKAN_HPP_NOEXCEPT
- : timelineSemaphore( timelineSemaphore_ )
- {}
-
- PhysicalDeviceTimelineSemaphoreFeaturesKHR( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceTimelineSemaphoreFeaturesKHR& operator=( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 timelineSemaphore;
- };
- static_assert( sizeof( PhysicalDeviceTimelineSemaphoreFeaturesKHR ) == sizeof( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceTimelineSemaphoreFeaturesKHR : public layout::PhysicalDeviceTimelineSemaphoreFeaturesKHR
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeaturesKHR( vk::Bool32 timelineSemaphore_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTimelineSemaphoreFeaturesKHR( timelineSemaphore_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeatures( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ = {} ) VULKAN_HPP_NOEXCEPT
+ : timelineSemaphore( timelineSemaphore_ )
{}
- PhysicalDeviceTimelineSemaphoreFeaturesKHR( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTimelineSemaphoreFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures ) - offsetof( PhysicalDeviceTimelineSemaphoreFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceTimelineSemaphoreFeatures( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceTimelineSemaphoreFeaturesKHR& operator=( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTimelineSemaphoreFeatures& operator=( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTimelineSemaphoreFeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceTimelineSemaphoreFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTimelineSemaphoreFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceTimelineSemaphoreFeaturesKHR & setTimelineSemaphore( vk::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTimelineSemaphoreFeatures & setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT
{
timelineSemaphore = timelineSemaphore_;
return *this;
}
- operator VkPhysicalDeviceTimelineSemaphoreFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceTimelineSemaphoreFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreFeatures*>( this );
}
- operator VkPhysicalDeviceTimelineSemaphoreFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceTimelineSemaphoreFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreFeatures*>( this );
}
- bool operator==( PhysicalDeviceTimelineSemaphoreFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceTimelineSemaphoreFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( timelineSemaphore == rhs.timelineSemaphore );
}
- bool operator!=( PhysicalDeviceTimelineSemaphoreFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceTimelineSemaphoreFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTimelineSemaphoreFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore = {};
};
- static_assert( sizeof( PhysicalDeviceTimelineSemaphoreFeaturesKHR ) == sizeof( VkPhysicalDeviceTimelineSemaphoreFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceTimelineSemaphoreFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceTimelineSemaphorePropertiesKHR
- {
- protected:
- PhysicalDeviceTimelineSemaphorePropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceTimelineSemaphorePropertiesKHR( VkPhysicalDeviceTimelineSemaphorePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTimelineSemaphorePropertiesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceTimelineSemaphorePropertiesKHR& operator=( VkPhysicalDeviceTimelineSemaphorePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTimelineSemaphorePropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphorePropertiesKHR;
- void* pNext = nullptr;
- uint64_t maxTimelineSemaphoreValueDifference;
- };
- static_assert( sizeof( PhysicalDeviceTimelineSemaphorePropertiesKHR ) == sizeof( VkPhysicalDeviceTimelineSemaphorePropertiesKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( PhysicalDeviceTimelineSemaphoreFeatures ) == sizeof( VkPhysicalDeviceTimelineSemaphoreFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceTimelineSemaphoreFeatures>::value, "struct wrapper is not a standard layout!" );
- struct PhysicalDeviceTimelineSemaphorePropertiesKHR : public layout::PhysicalDeviceTimelineSemaphorePropertiesKHR
+ struct PhysicalDeviceTimelineSemaphoreProperties
{
- PhysicalDeviceTimelineSemaphorePropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTimelineSemaphorePropertiesKHR()
+ PhysicalDeviceTimelineSemaphoreProperties( uint64_t maxTimelineSemaphoreValueDifference_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxTimelineSemaphoreValueDifference( maxTimelineSemaphoreValueDifference_ )
{}
- PhysicalDeviceTimelineSemaphorePropertiesKHR( VkPhysicalDeviceTimelineSemaphorePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTimelineSemaphorePropertiesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties ) - offsetof( PhysicalDeviceTimelineSemaphoreProperties, pNext ) );
+ return *this;
+ }
- PhysicalDeviceTimelineSemaphorePropertiesKHR& operator=( VkPhysicalDeviceTimelineSemaphorePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTimelineSemaphoreProperties( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTimelineSemaphorePropertiesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceTimelineSemaphoreProperties& operator=( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties const *>(&rhs);
return *this;
}
- operator VkPhysicalDeviceTimelineSemaphorePropertiesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceTimelineSemaphoreProperties const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceTimelineSemaphorePropertiesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreProperties*>( this );
}
- operator VkPhysicalDeviceTimelineSemaphorePropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceTimelineSemaphoreProperties &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceTimelineSemaphorePropertiesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreProperties*>( this );
}
- bool operator==( PhysicalDeviceTimelineSemaphorePropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceTimelineSemaphoreProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( maxTimelineSemaphoreValueDifference == rhs.maxTimelineSemaphoreValueDifference );
}
- bool operator!=( PhysicalDeviceTimelineSemaphorePropertiesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceTimelineSemaphoreProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTimelineSemaphorePropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreProperties;
+ void* pNext = {};
+ uint64_t maxTimelineSemaphoreValueDifference = {};
};
- static_assert( sizeof( PhysicalDeviceTimelineSemaphorePropertiesKHR ) == sizeof( VkPhysicalDeviceTimelineSemaphorePropertiesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceTimelineSemaphorePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( PhysicalDeviceTimelineSemaphoreProperties ) == sizeof( VkPhysicalDeviceTimelineSemaphoreProperties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceTimelineSemaphoreProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceToolPropertiesEXT
{
- struct PhysicalDeviceTransformFeedbackFeaturesEXT
+ PhysicalDeviceToolPropertiesEXT( std::array<char,VK_MAX_EXTENSION_NAME_SIZE> const& name_ = {},
+ std::array<char,VK_MAX_EXTENSION_NAME_SIZE> const& version_ = {},
+ VULKAN_HPP_NAMESPACE::ToolPurposeFlagsEXT purposes_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {},
+ std::array<char,VK_MAX_EXTENSION_NAME_SIZE> const& layer_ = {} ) VULKAN_HPP_NOEXCEPT
+ : name{}
+ , version{}
+ , purposes( purposes_ )
+ , description{}
+ , layer{}
{
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( vk::Bool32 transformFeedback_ = 0,
- vk::Bool32 geometryStreams_ = 0 ) VULKAN_HPP_NOEXCEPT
- : transformFeedback( transformFeedback_ )
- , geometryStreams( geometryStreams_ )
- {}
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_EXTENSION_NAME_SIZE,VK_MAX_EXTENSION_NAME_SIZE>::copy( name, name_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_EXTENSION_NAME_SIZE,VK_MAX_EXTENSION_NAME_SIZE>::copy( version, version_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_EXTENSION_NAME_SIZE,VK_MAX_EXTENSION_NAME_SIZE>::copy( layer, layer_ );
+ }
- PhysicalDeviceTransformFeedbackFeaturesEXT( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(this) = rhs;
- }
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT ) - offsetof( PhysicalDeviceToolPropertiesEXT, pNext ) );
+ return *this;
+ }
- PhysicalDeviceTransformFeedbackFeaturesEXT& operator=( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(this) = rhs;
- return *this;
- }
+ PhysicalDeviceToolPropertiesEXT( VkPhysicalDeviceToolPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 transformFeedback;
- vk::Bool32 geometryStreams;
- };
- static_assert( sizeof( PhysicalDeviceTransformFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
+ PhysicalDeviceToolPropertiesEXT& operator=( VkPhysicalDeviceToolPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT const *>(&rhs);
+ return *this;
+ }
+
+ operator VkPhysicalDeviceToolPropertiesEXT const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceToolPropertiesEXT*>( this );
+ }
+
+ operator VkPhysicalDeviceToolPropertiesEXT &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceToolPropertiesEXT*>( this );
+ }
+
+ bool operator==( PhysicalDeviceToolPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memcmp( name, rhs.name, VK_MAX_EXTENSION_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( version, rhs.version, VK_MAX_EXTENSION_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( purposes == rhs.purposes )
+ && ( memcmp( description, rhs.description, VK_MAX_DESCRIPTION_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( layer, rhs.layer, VK_MAX_EXTENSION_NAME_SIZE * sizeof( char ) ) == 0 );
+ }
+
+ bool operator!=( PhysicalDeviceToolPropertiesEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
- struct PhysicalDeviceTransformFeedbackFeaturesEXT : public layout::PhysicalDeviceTransformFeedbackFeaturesEXT
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceToolPropertiesEXT;
+ void* pNext = {};
+ char name[VK_MAX_EXTENSION_NAME_SIZE] = {};
+ char version[VK_MAX_EXTENSION_NAME_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::ToolPurposeFlagsEXT purposes = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
+ char layer[VK_MAX_EXTENSION_NAME_SIZE] = {};
+ };
+ static_assert( sizeof( PhysicalDeviceToolPropertiesEXT ) == sizeof( VkPhysicalDeviceToolPropertiesEXT ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceToolPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceTransformFeedbackFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( vk::Bool32 transformFeedback_ = 0,
- vk::Bool32 geometryStreams_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTransformFeedbackFeaturesEXT( transformFeedback_, geometryStreams_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ = {} ) VULKAN_HPP_NOEXCEPT
+ : transformFeedback( transformFeedback_ )
+ , geometryStreams( geometryStreams_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT ) - offsetof( PhysicalDeviceTransformFeedbackFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceTransformFeedbackFeaturesEXT( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTransformFeedbackFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceTransformFeedbackFeaturesEXT& operator=( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTransformFeedbackFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT const *>(&rhs);
return *this;
}
@@ -53520,13 +49498,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceTransformFeedbackFeaturesEXT & setTransformFeedback( vk::Bool32 transformFeedback_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTransformFeedbackFeaturesEXT & setTransformFeedback( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ ) VULKAN_HPP_NOEXCEPT
{
transformFeedback = transformFeedback_;
return *this;
}
- PhysicalDeviceTransformFeedbackFeaturesEXT & setGeometryStreams( vk::Bool32 geometryStreams_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceTransformFeedbackFeaturesEXT & setGeometryStreams( VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ ) VULKAN_HPP_NOEXCEPT
{
geometryStreams = geometryStreams_;
return *this;
@@ -53555,61 +49533,53 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTransformFeedbackFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 transformFeedback = {};
+ VULKAN_HPP_NAMESPACE::Bool32 geometryStreams = {};
};
static_assert( sizeof( PhysicalDeviceTransformFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceTransformFeedbackFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceTransformFeedbackPropertiesEXT
- {
- protected:
- PhysicalDeviceTransformFeedbackPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceTransformFeedbackPropertiesEXT( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceTransformFeedbackPropertiesEXT& operator=( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT;
- void* pNext = nullptr;
- uint32_t maxTransformFeedbackStreams;
- uint32_t maxTransformFeedbackBuffers;
- vk::DeviceSize maxTransformFeedbackBufferSize;
- uint32_t maxTransformFeedbackStreamDataSize;
- uint32_t maxTransformFeedbackBufferDataSize;
- uint32_t maxTransformFeedbackBufferDataStride;
- vk::Bool32 transformFeedbackQueries;
- vk::Bool32 transformFeedbackStreamsLinesTriangles;
- vk::Bool32 transformFeedbackRasterizationStreamSelect;
- vk::Bool32 transformFeedbackDraw;
- };
- static_assert( sizeof( PhysicalDeviceTransformFeedbackPropertiesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceTransformFeedbackPropertiesEXT : public layout::PhysicalDeviceTransformFeedbackPropertiesEXT
+ struct PhysicalDeviceTransformFeedbackPropertiesEXT
{
- PhysicalDeviceTransformFeedbackPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTransformFeedbackPropertiesEXT()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxTransformFeedbackStreams( maxTransformFeedbackStreams_ )
+ , maxTransformFeedbackBuffers( maxTransformFeedbackBuffers_ )
+ , maxTransformFeedbackBufferSize( maxTransformFeedbackBufferSize_ )
+ , maxTransformFeedbackStreamDataSize( maxTransformFeedbackStreamDataSize_ )
+ , maxTransformFeedbackBufferDataSize( maxTransformFeedbackBufferDataSize_ )
+ , maxTransformFeedbackBufferDataStride( maxTransformFeedbackBufferDataStride_ )
+ , transformFeedbackQueries( transformFeedbackQueries_ )
+ , transformFeedbackStreamsLinesTriangles( transformFeedbackStreamsLinesTriangles_ )
+ , transformFeedbackRasterizationStreamSelect( transformFeedbackRasterizationStreamSelect_ )
+ , transformFeedbackDraw( transformFeedbackDraw_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT ) - offsetof( PhysicalDeviceTransformFeedbackPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceTransformFeedbackPropertiesEXT( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceTransformFeedbackPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceTransformFeedbackPropertiesEXT& operator=( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceTransformFeedbackPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT const *>(&rhs);
return *this;
}
@@ -53644,141 +49614,110 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceTransformFeedbackPropertiesEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PhysicalDeviceTransformFeedbackPropertiesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceTransformFeedbackPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceUniformBufferStandardLayoutFeatures
{
- struct PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( vk::Bool32 uniformBufferStandardLayout_ = 0 ) VULKAN_HPP_NOEXCEPT
- : uniformBufferStandardLayout( uniformBufferStandardLayout_ )
- {}
-
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR*>(this) = rhs;
- }
-
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR& operator=( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 uniformBufferStandardLayout;
- };
- static_assert( sizeof( PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR ) == sizeof( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR : public layout::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR
- {
- VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( vk::Bool32 uniformBufferStandardLayout_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( uniformBufferStandardLayout_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ = {} ) VULKAN_HPP_NOEXCEPT
+ : uniformBufferStandardLayout( uniformBufferStandardLayout_ )
{}
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures ) - offsetof( PhysicalDeviceUniformBufferStandardLayoutFeatures, pNext ) );
+ return *this;
+ }
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR& operator=( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceUniformBufferStandardLayoutFeatures( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ PhysicalDeviceUniformBufferStandardLayoutFeatures& operator=( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures const *>(&rhs);
return *this;
}
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceUniformBufferStandardLayoutFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR & setUniformBufferStandardLayout( vk::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceUniformBufferStandardLayoutFeatures & setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT
{
uniformBufferStandardLayout = uniformBufferStandardLayout_;
return *this;
}
- operator VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceUniformBufferStandardLayoutFeatures*>( this );
}
- operator VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceUniformBufferStandardLayoutFeatures*>( this );
}
- bool operator==( PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceUniformBufferStandardLayoutFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( uniformBufferStandardLayout == rhs.uniformBufferStandardLayout );
}
- bool operator!=( PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceUniformBufferStandardLayoutFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout = {};
};
- static_assert( sizeof( PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR ) == sizeof( VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct PhysicalDeviceVariablePointersFeatures
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( vk::Bool32 variablePointersStorageBuffer_ = 0,
- vk::Bool32 variablePointers_ = 0 ) VULKAN_HPP_NOEXCEPT
- : variablePointersStorageBuffer( variablePointersStorageBuffer_ )
- , variablePointers( variablePointers_ )
- {}
-
- PhysicalDeviceVariablePointersFeatures( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVariablePointersFeatures*>(this) = rhs;
- }
-
- PhysicalDeviceVariablePointersFeatures& operator=( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVariablePointersFeatures*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceVariablePointersFeatures;
- void* pNext = nullptr;
- vk::Bool32 variablePointersStorageBuffer;
- vk::Bool32 variablePointers;
- };
- static_assert( sizeof( PhysicalDeviceVariablePointersFeatures ) == sizeof( VkPhysicalDeviceVariablePointersFeatures ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( PhysicalDeviceUniformBufferStandardLayoutFeatures ) == sizeof( VkPhysicalDeviceUniformBufferStandardLayoutFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceUniformBufferStandardLayoutFeatures>::value, "struct wrapper is not a standard layout!" );
- struct PhysicalDeviceVariablePointersFeatures : public layout::PhysicalDeviceVariablePointersFeatures
+ struct PhysicalDeviceVariablePointersFeatures
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( vk::Bool32 variablePointersStorageBuffer_ = 0,
- vk::Bool32 variablePointers_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVariablePointersFeatures( variablePointersStorageBuffer_, variablePointers_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ = {} ) VULKAN_HPP_NOEXCEPT
+ : variablePointersStorageBuffer( variablePointersStorageBuffer_ )
+ , variablePointers( variablePointers_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures ) - offsetof( PhysicalDeviceVariablePointersFeatures, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceVariablePointersFeatures( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVariablePointersFeatures( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceVariablePointersFeatures& operator=( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceVariablePointersFeatures::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures const *>(&rhs);
return *this;
}
@@ -53788,13 +49727,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceVariablePointersFeatures & setVariablePointersStorageBuffer( vk::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVariablePointersFeatures & setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT
{
variablePointersStorageBuffer = variablePointersStorageBuffer_;
return *this;
}
- PhysicalDeviceVariablePointersFeatures & setVariablePointers( vk::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVariablePointersFeatures & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT
{
variablePointers = variablePointers_;
return *this;
@@ -53823,57 +49762,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceVariablePointersFeatures::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVariablePointersFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer = {};
+ VULKAN_HPP_NAMESPACE::Bool32 variablePointers = {};
};
static_assert( sizeof( PhysicalDeviceVariablePointersFeatures ) == sizeof( VkPhysicalDeviceVariablePointersFeatures ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceVariablePointersFeatures>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeaturesEXT( vk::Bool32 vertexAttributeInstanceRateDivisor_ = 0,
- vk::Bool32 vertexAttributeInstanceRateZeroDivisor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : vertexAttributeInstanceRateDivisor( vertexAttributeInstanceRateDivisor_ )
- , vertexAttributeInstanceRateZeroDivisor( vertexAttributeInstanceRateZeroDivisor_ )
- {}
-
- PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceVertexAttributeDivisorFeaturesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 vertexAttributeInstanceRateDivisor;
- vk::Bool32 vertexAttributeInstanceRateZeroDivisor;
- };
- static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT : public layout::PhysicalDeviceVertexAttributeDivisorFeaturesEXT
+ struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeaturesEXT( vk::Bool32 vertexAttributeInstanceRateDivisor_ = 0,
- vk::Bool32 vertexAttributeInstanceRateZeroDivisor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVertexAttributeDivisorFeaturesEXT( vertexAttributeInstanceRateDivisor_, vertexAttributeInstanceRateZeroDivisor_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ = {} ) VULKAN_HPP_NOEXCEPT
+ : vertexAttributeInstanceRateDivisor( vertexAttributeInstanceRateDivisor_ )
+ , vertexAttributeInstanceRateZeroDivisor( vertexAttributeInstanceRateZeroDivisor_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) - offsetof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVertexAttributeDivisorFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceVertexAttributeDivisorFeaturesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceVertexAttributeDivisorFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeaturesEXT const *>(&rhs);
return *this;
}
@@ -53883,13 +49802,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setVertexAttributeInstanceRateDivisor( vk::Bool32 vertexAttributeInstanceRateDivisor_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setVertexAttributeInstanceRateDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ ) VULKAN_HPP_NOEXCEPT
{
vertexAttributeInstanceRateDivisor = vertexAttributeInstanceRateDivisor_;
return *this;
}
- PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setVertexAttributeInstanceRateZeroDivisor( vk::Bool32 vertexAttributeInstanceRateZeroDivisor_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setVertexAttributeInstanceRateZeroDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ ) VULKAN_HPP_NOEXCEPT
{
vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_;
return *this;
@@ -53918,52 +49837,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceVertexAttributeDivisorFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor = {};
+ VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor = {};
};
static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceVertexAttributeDivisorFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT
{
- struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT
- {
- protected:
- PhysicalDeviceVertexAttributeDivisorPropertiesEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PhysicalDeviceVertexAttributeDivisorPropertiesEXT( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(this) = rhs;
- }
-
- PhysicalDeviceVertexAttributeDivisorPropertiesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT;
- void* pNext = nullptr;
- uint32_t maxVertexAttribDivisor;
- };
- static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT : public layout::PhysicalDeviceVertexAttributeDivisorPropertiesEXT
- {
- PhysicalDeviceVertexAttributeDivisorPropertiesEXT() VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVertexAttributeDivisorPropertiesEXT()
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT( uint32_t maxVertexAttribDivisor_ = {} ) VULKAN_HPP_NOEXCEPT
+ : maxVertexAttribDivisor( maxVertexAttribDivisor_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) - offsetof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceVertexAttributeDivisorPropertiesEXT( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVertexAttributeDivisorPropertiesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceVertexAttributeDivisorPropertiesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceVertexAttributeDivisorPropertiesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT const *>(&rhs);
return *this;
}
@@ -53989,159 +49891,1606 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceVertexAttributeDivisorPropertiesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT;
+ void* pNext = {};
+ uint32_t maxVertexAttribDivisor = {};
};
static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceVertexAttributeDivisorPropertiesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PhysicalDeviceVulkan11Features
{
- struct PhysicalDeviceVulkanMemoryModelFeaturesKHR
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::PhysicalDeviceVulkan11Features & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeaturesKHR( vk::Bool32 vulkanMemoryModel_ = 0,
- vk::Bool32 vulkanMemoryModelDeviceScope_ = 0,
- vk::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = 0 ) VULKAN_HPP_NOEXCEPT
- : vulkanMemoryModel( vulkanMemoryModel_ )
- , vulkanMemoryModelDeviceScope( vulkanMemoryModelDeviceScope_ )
- , vulkanMemoryModelAvailabilityVisibilityChains( vulkanMemoryModelAvailabilityVisibilityChains_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features ) - offsetof( PhysicalDeviceVulkan11Features, pNext ) );
+ return *this;
+ }
- PhysicalDeviceVulkanMemoryModelFeaturesKHR( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>(this) = rhs;
- }
+ PhysicalDeviceVulkan11Features( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceVulkanMemoryModelFeaturesKHR& operator=( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>(this) = rhs;
- return *this;
- }
+ PhysicalDeviceVulkan11Features& operator=( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceVulkanMemoryModelFeaturesKHR;
- void* pNext = nullptr;
- vk::Bool32 vulkanMemoryModel;
- vk::Bool32 vulkanMemoryModelDeviceScope;
- vk::Bool32 vulkanMemoryModelAvailabilityVisibilityChains;
- };
- static_assert( sizeof( PhysicalDeviceVulkanMemoryModelFeaturesKHR ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR ), "layout struct and wrapper have different size!" );
- }
+ PhysicalDeviceVulkan11Features & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ {
+ storageBuffer16BitAccess = storageBuffer16BitAccess_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ {
+ uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_;
+ return *this;
+ }
- struct PhysicalDeviceVulkanMemoryModelFeaturesKHR : public layout::PhysicalDeviceVulkanMemoryModelFeaturesKHR
+ PhysicalDeviceVulkan11Features & setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ storagePushConstant16 = storagePushConstant16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ storageInputOutput16 = storageInputOutput16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT
+ {
+ multiview = multiview_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT
+ {
+ multiviewGeometryShader = multiviewGeometryShader_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT
+ {
+ multiviewTessellationShader = multiviewTessellationShader_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT
+ {
+ variablePointersStorageBuffer = variablePointersStorageBuffer_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ variablePointers = variablePointers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT
+ {
+ protectedMemory = protectedMemory_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT
+ {
+ samplerYcbcrConversion = samplerYcbcrConversion_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Features & setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDrawParameters = shaderDrawParameters_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVulkan11Features const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVulkan11Features*>( this );
+ }
+
+ operator VkPhysicalDeviceVulkan11Features &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVulkan11Features*>( this );
+ }
+
+ bool operator==( PhysicalDeviceVulkan11Features const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceVulkan11Features const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceVulkan11Features ) == sizeof( VkPhysicalDeviceVulkan11Features ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceVulkan11Features>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceVulkan11Properties
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeaturesKHR( vk::Bool32 vulkanMemoryModel_ = 0,
- vk::Bool32 vulkanMemoryModelDeviceScope_ = 0,
- vk::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVulkanMemoryModelFeaturesKHR( vulkanMemoryModel_, vulkanMemoryModelDeviceScope_, vulkanMemoryModelAvailabilityVisibilityChains_ )
- {}
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Properties( std::array<uint8_t,VK_UUID_SIZE> const& deviceUUID_ = {},
+ std::array<uint8_t,VK_UUID_SIZE> const& driverUUID_ = {},
+ std::array<uint8_t,VK_LUID_SIZE> 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : deviceUUID{}
+ , driverUUID{}
+ , 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_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( deviceUUID, deviceUUID_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_UUID_SIZE,VK_UUID_SIZE>::copy( driverUUID, driverUUID_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint8_t,VK_LUID_SIZE,VK_LUID_SIZE>::copy( deviceLUID, deviceLUID_ );
+ }
- PhysicalDeviceVulkanMemoryModelFeaturesKHR( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceVulkanMemoryModelFeaturesKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties ) - offsetof( PhysicalDeviceVulkan11Properties, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- PhysicalDeviceVulkanMemoryModelFeaturesKHR& operator=( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan11Properties& operator=( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceVulkanMemoryModelFeaturesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties const *>(&rhs);
return *this;
}
- PhysicalDeviceVulkanMemoryModelFeaturesKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan11Properties & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- PhysicalDeviceVulkanMemoryModelFeaturesKHR & setVulkanMemoryModel( vk::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan11Properties & setDeviceUUID( std::array<uint8_t,VK_UUID_SIZE> deviceUUID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( deviceUUID, deviceUUID_.data(), VK_UUID_SIZE * sizeof( uint8_t ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setDriverUUID( std::array<uint8_t,VK_UUID_SIZE> driverUUID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( driverUUID, driverUUID_.data(), VK_UUID_SIZE * sizeof( uint8_t ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setDeviceLUID( std::array<uint8_t,VK_LUID_SIZE> deviceLUID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( deviceLUID, deviceLUID_.data(), VK_LUID_SIZE * sizeof( uint8_t ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setDeviceNodeMask( uint32_t deviceNodeMask_ ) VULKAN_HPP_NOEXCEPT
+ {
+ deviceNodeMask = deviceNodeMask_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setDeviceLUIDValid( VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ ) VULKAN_HPP_NOEXCEPT
+ {
+ deviceLUIDValid = deviceLUIDValid_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setSubgroupSize( uint32_t subgroupSize_ ) VULKAN_HPP_NOEXCEPT
+ {
+ subgroupSize = subgroupSize_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setSubgroupSupportedStages( VULKAN_HPP_NAMESPACE::ShaderStageFlags subgroupSupportedStages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ subgroupSupportedStages = subgroupSupportedStages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setSubgroupSupportedOperations( VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags subgroupSupportedOperations_ ) VULKAN_HPP_NOEXCEPT
+ {
+ subgroupSupportedOperations = subgroupSupportedOperations_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setSubgroupQuadOperationsInAllStages( VULKAN_HPP_NAMESPACE::Bool32 subgroupQuadOperationsInAllStages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ subgroupQuadOperationsInAllStages = subgroupQuadOperationsInAllStages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setPointClippingBehavior( VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pointClippingBehavior = pointClippingBehavior_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setMaxMultiviewViewCount( uint32_t maxMultiviewViewCount_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxMultiviewViewCount = maxMultiviewViewCount_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setMaxMultiviewInstanceIndex( uint32_t maxMultiviewInstanceIndex_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxMultiviewInstanceIndex = maxMultiviewInstanceIndex_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setProtectedNoFault( VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ ) VULKAN_HPP_NOEXCEPT
+ {
+ protectedNoFault = protectedNoFault_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setMaxPerSetDescriptors( uint32_t maxPerSetDescriptors_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerSetDescriptors = maxPerSetDescriptors_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan11Properties & setMaxMemoryAllocationSize( VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxMemoryAllocationSize = maxMemoryAllocationSize_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVulkan11Properties const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVulkan11Properties*>( this );
+ }
+
+ operator VkPhysicalDeviceVulkan11Properties &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVulkan11Properties*>( this );
+ }
+
+ bool operator==( PhysicalDeviceVulkan11Properties const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memcmp( deviceUUID, rhs.deviceUUID, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( memcmp( driverUUID, rhs.driverUUID, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( memcmp( deviceLUID, rhs.deviceLUID, VK_LUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( 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 );
+ }
+
+ bool operator!=( PhysicalDeviceVulkan11Properties const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan11Properties;
+ void* pNext = {};
+ uint8_t deviceUUID[VK_UUID_SIZE] = {};
+ uint8_t driverUUID[VK_UUID_SIZE] = {};
+ uint8_t deviceLUID[VK_LUID_SIZE] = {};
+ 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceVulkan11Properties ) == sizeof( VkPhysicalDeviceVulkan11Properties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceVulkan11Properties>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceVulkan12Features
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::PhysicalDeviceVulkan12Features & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features ) - offsetof( PhysicalDeviceVulkan12Features, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDeviceVulkan12Features& operator=( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features const *>(&rhs);
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setSamplerMirrorClampToEdge( VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge_ ) VULKAN_HPP_NOEXCEPT
+ {
+ samplerMirrorClampToEdge = samplerMirrorClampToEdge_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDrawIndirectCount( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount_ ) VULKAN_HPP_NOEXCEPT
+ {
+ drawIndirectCount = drawIndirectCount_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ {
+ storageBuffer8BitAccess = storageBuffer8BitAccess_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT
+ {
+ uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT
+ {
+ storagePushConstant8 = storagePushConstant8_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferInt64Atomics = shaderBufferInt64Atomics_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedInt64Atomics = shaderSharedInt64Atomics_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderFloat16 = shaderFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderInt8 = shaderInt8_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorIndexing( VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorIndexing = descriptorIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingUniformTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingStorageTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT
+ {
+ descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT
+ {
+ runtimeDescriptorArray = runtimeDescriptorArray_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setSamplerFilterMinmax( VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ samplerFilterMinmax = samplerFilterMinmax_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT
+ {
+ scalarBlockLayout = scalarBlockLayout_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT
+ {
+ imagelessFramebuffer = imagelessFramebuffer_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT
+ {
+ uniformBufferStandardLayout = uniformBufferStandardLayout_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT
+ {
+ separateDepthStencilLayouts = separateDepthStencilLayouts_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT
+ {
+ hostQueryReset = hostQueryReset_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT
+ {
+ timelineSemaphore = timelineSemaphore_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddress = bufferDeviceAddress_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT
+ {
+ bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT
{
vulkanMemoryModel = vulkanMemoryModel_;
return *this;
}
- PhysicalDeviceVulkanMemoryModelFeaturesKHR & setVulkanMemoryModelDeviceScope( vk::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan12Features & setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT
{
vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_;
return *this;
}
- PhysicalDeviceVulkanMemoryModelFeaturesKHR & setVulkanMemoryModelAvailabilityVisibilityChains( vk::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan12Features & setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT
{
vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_;
return *this;
}
- operator VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const&() const VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceVulkan12Features & setShaderOutputViewportIndex( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderOutputViewportIndex = shaderOutputViewportIndex_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setShaderOutputLayer( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderOutputLayer = shaderOutputLayer_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Features & setSubgroupBroadcastDynamicId( VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId_ ) VULKAN_HPP_NOEXCEPT
+ {
+ subgroupBroadcastDynamicId = subgroupBroadcastDynamicId_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVulkan12Features const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>( this );
+ return *reinterpret_cast<const VkPhysicalDeviceVulkan12Features*>( this );
}
- operator VkPhysicalDeviceVulkanMemoryModelFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkPhysicalDeviceVulkan12Features &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>( this );
+ return *reinterpret_cast<VkPhysicalDeviceVulkan12Features*>( this );
}
- bool operator==( PhysicalDeviceVulkanMemoryModelFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( PhysicalDeviceVulkan12Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
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 );
+ && ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains )
+ && ( shaderOutputViewportIndex == rhs.shaderOutputViewportIndex )
+ && ( shaderOutputLayer == rhs.shaderOutputLayer )
+ && ( subgroupBroadcastDynamicId == rhs.subgroupBroadcastDynamicId );
}
- bool operator!=( PhysicalDeviceVulkanMemoryModelFeaturesKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( PhysicalDeviceVulkan12Features const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceVulkanMemoryModelFeaturesKHR::sType;
- };
- static_assert( sizeof( PhysicalDeviceVulkanMemoryModelFeaturesKHR ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<PhysicalDeviceVulkanMemoryModelFeaturesKHR>::value, "struct wrapper is not a standard layout!" );
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceVulkan12Features ) == sizeof( VkPhysicalDeviceVulkan12Features ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceVulkan12Features>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceVulkan12Properties
+ {
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Properties( VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary,
+ std::array<char,VK_MAX_DRIVER_NAME_SIZE> const& driverName_ = {},
+ std::array<char,VK_MAX_DRIVER_INFO_SIZE> 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : driverID( driverID_ )
+ , driverName{}
+ , 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_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DRIVER_NAME_SIZE,VK_MAX_DRIVER_NAME_SIZE>::copy( driverName, driverName_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DRIVER_INFO_SIZE,VK_MAX_DRIVER_INFO_SIZE>::copy( driverInfo, driverInfo_ );
+ }
+
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties ) - offsetof( PhysicalDeviceVulkan12Properties, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDeviceVulkan12Properties& operator=( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties const *>(&rhs);
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
- namespace layout
- {
- struct PhysicalDeviceYcbcrImageArraysFeaturesEXT
+ PhysicalDeviceVulkan12Properties & setDriverID( VULKAN_HPP_NAMESPACE::DriverId driverID_ ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( vk::Bool32 ycbcrImageArrays_ = 0 ) VULKAN_HPP_NOEXCEPT
- : ycbcrImageArrays( ycbcrImageArrays_ )
- {}
+ driverID = driverID_;
+ return *this;
+ }
- PhysicalDeviceYcbcrImageArraysFeaturesEXT( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceYcbcrImageArraysFeaturesEXT*>(this) = rhs;
- }
+ PhysicalDeviceVulkan12Properties & setDriverName( std::array<char,VK_MAX_DRIVER_NAME_SIZE> driverName_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( driverName, driverName_.data(), VK_MAX_DRIVER_NAME_SIZE * sizeof( char ) );
+ return *this;
+ }
- PhysicalDeviceYcbcrImageArraysFeaturesEXT& operator=( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPhysicalDeviceYcbcrImageArraysFeaturesEXT*>(this) = rhs;
- return *this;
- }
+ PhysicalDeviceVulkan12Properties & setDriverInfo( std::array<char,VK_MAX_DRIVER_INFO_SIZE> driverInfo_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( driverInfo, driverInfo_.data(), VK_MAX_DRIVER_INFO_SIZE * sizeof( char ) );
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT;
- void* pNext = nullptr;
- vk::Bool32 ycbcrImageArrays;
- };
- static_assert( sizeof( PhysicalDeviceYcbcrImageArraysFeaturesEXT ) == sizeof( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
+ PhysicalDeviceVulkan12Properties & setConformanceVersion( VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ ) VULKAN_HPP_NOEXCEPT
+ {
+ conformanceVersion = conformanceVersion_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setDenormBehaviorIndependence( VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence_ ) VULKAN_HPP_NOEXCEPT
+ {
+ denormBehaviorIndependence = denormBehaviorIndependence_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setRoundingModeIndependence( VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence_ ) VULKAN_HPP_NOEXCEPT
+ {
+ roundingModeIndependence = roundingModeIndependence_;
+ return *this;
+ }
- struct PhysicalDeviceYcbcrImageArraysFeaturesEXT : public layout::PhysicalDeviceYcbcrImageArraysFeaturesEXT
+ PhysicalDeviceVulkan12Properties & setShaderSignedZeroInfNanPreserveFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSignedZeroInfNanPreserveFloat16 = shaderSignedZeroInfNanPreserveFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderSignedZeroInfNanPreserveFloat32( VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSignedZeroInfNanPreserveFloat32 = shaderSignedZeroInfNanPreserveFloat32_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderSignedZeroInfNanPreserveFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSignedZeroInfNanPreserveFloat64 = shaderSignedZeroInfNanPreserveFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormPreserveFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormPreserveFloat16 = shaderDenormPreserveFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormPreserveFloat32( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormPreserveFloat32 = shaderDenormPreserveFloat32_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormPreserveFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormPreserveFloat64 = shaderDenormPreserveFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormFlushToZeroFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormFlushToZeroFloat16 = shaderDenormFlushToZeroFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormFlushToZeroFloat32( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormFlushToZeroFloat32 = shaderDenormFlushToZeroFloat32_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderDenormFlushToZeroFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderDenormFlushToZeroFloat64 = shaderDenormFlushToZeroFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTEFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTEFloat16 = shaderRoundingModeRTEFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTEFloat32( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTEFloat32 = shaderRoundingModeRTEFloat32_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTEFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTEFloat64 = shaderRoundingModeRTEFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTZFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTZFloat16 = shaderRoundingModeRTZFloat16_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTZFloat32( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTZFloat32 = shaderRoundingModeRTZFloat32_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderRoundingModeRTZFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderRoundingModeRTZFloat64 = shaderRoundingModeRTZFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxUpdateAfterBindDescriptorsInAllPools( uint32_t maxUpdateAfterBindDescriptorsInAllPools_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxUpdateAfterBindDescriptorsInAllPools = maxUpdateAfterBindDescriptorsInAllPools_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderUniformBufferArrayNonUniformIndexingNative( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderUniformBufferArrayNonUniformIndexingNative = shaderUniformBufferArrayNonUniformIndexingNative_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderSampledImageArrayNonUniformIndexingNative( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSampledImageArrayNonUniformIndexingNative = shaderSampledImageArrayNonUniformIndexingNative_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderStorageBufferArrayNonUniformIndexingNative( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageBufferArrayNonUniformIndexingNative = shaderStorageBufferArrayNonUniformIndexingNative_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderStorageImageArrayNonUniformIndexingNative( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderStorageImageArrayNonUniformIndexingNative = shaderStorageImageArrayNonUniformIndexingNative_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setShaderInputAttachmentArrayNonUniformIndexingNative( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderInputAttachmentArrayNonUniformIndexingNative = shaderInputAttachmentArrayNonUniformIndexingNative_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setRobustBufferAccessUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT
+ {
+ robustBufferAccessUpdateAfterBind = robustBufferAccessUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setQuadDivergentImplicitLod( VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod_ ) VULKAN_HPP_NOEXCEPT
+ {
+ quadDivergentImplicitLod = quadDivergentImplicitLod_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindSamplers( uint32_t maxPerStageDescriptorUpdateAfterBindSamplers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindSamplers = maxPerStageDescriptorUpdateAfterBindSamplers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindUniformBuffers( uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindUniformBuffers = maxPerStageDescriptorUpdateAfterBindUniformBuffers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindStorageBuffers( uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindStorageBuffers = maxPerStageDescriptorUpdateAfterBindStorageBuffers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindSampledImages( uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindSampledImages = maxPerStageDescriptorUpdateAfterBindSampledImages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindStorageImages( uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindStorageImages = maxPerStageDescriptorUpdateAfterBindStorageImages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageDescriptorUpdateAfterBindInputAttachments( uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageDescriptorUpdateAfterBindInputAttachments = maxPerStageDescriptorUpdateAfterBindInputAttachments_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxPerStageUpdateAfterBindResources( uint32_t maxPerStageUpdateAfterBindResources_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxPerStageUpdateAfterBindResources = maxPerStageUpdateAfterBindResources_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindSamplers( uint32_t maxDescriptorSetUpdateAfterBindSamplers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindSamplers = maxDescriptorSetUpdateAfterBindSamplers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindUniformBuffers( uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindUniformBuffers = maxDescriptorSetUpdateAfterBindUniformBuffers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindUniformBuffersDynamic( uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindStorageBuffers( uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindStorageBuffers = maxDescriptorSetUpdateAfterBindStorageBuffers_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindStorageBuffersDynamic( uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindSampledImages( uint32_t maxDescriptorSetUpdateAfterBindSampledImages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindSampledImages = maxDescriptorSetUpdateAfterBindSampledImages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindStorageImages( uint32_t maxDescriptorSetUpdateAfterBindStorageImages_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindStorageImages = maxDescriptorSetUpdateAfterBindStorageImages_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxDescriptorSetUpdateAfterBindInputAttachments( uint32_t maxDescriptorSetUpdateAfterBindInputAttachments_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxDescriptorSetUpdateAfterBindInputAttachments = maxDescriptorSetUpdateAfterBindInputAttachments_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setSupportedDepthResolveModes( VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ ) VULKAN_HPP_NOEXCEPT
+ {
+ supportedDepthResolveModes = supportedDepthResolveModes_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setSupportedStencilResolveModes( VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ ) VULKAN_HPP_NOEXCEPT
+ {
+ supportedStencilResolveModes = supportedStencilResolveModes_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setIndependentResolveNone( VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ ) VULKAN_HPP_NOEXCEPT
+ {
+ independentResolveNone = independentResolveNone_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setIndependentResolve( VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ ) VULKAN_HPP_NOEXCEPT
+ {
+ independentResolve = independentResolve_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setFilterMinmaxSingleComponentFormats( VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ ) VULKAN_HPP_NOEXCEPT
+ {
+ filterMinmaxSingleComponentFormats = filterMinmaxSingleComponentFormats_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setFilterMinmaxImageComponentMapping( VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ ) VULKAN_HPP_NOEXCEPT
+ {
+ filterMinmaxImageComponentMapping = filterMinmaxImageComponentMapping_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setMaxTimelineSemaphoreValueDifference( uint64_t maxTimelineSemaphoreValueDifference_ ) VULKAN_HPP_NOEXCEPT
+ {
+ maxTimelineSemaphoreValueDifference = maxTimelineSemaphoreValueDifference_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkan12Properties & setFramebufferIntegerColorSampleCounts( VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferIntegerColorSampleCounts_ ) VULKAN_HPP_NOEXCEPT
+ {
+ framebufferIntegerColorSampleCounts = framebufferIntegerColorSampleCounts_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVulkan12Properties const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVulkan12Properties*>( this );
+ }
+
+ operator VkPhysicalDeviceVulkan12Properties &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVulkan12Properties*>( this );
+ }
+
+ bool operator==( PhysicalDeviceVulkan12Properties const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( driverID == rhs.driverID )
+ && ( memcmp( driverName, rhs.driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( driverInfo, rhs.driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof( char ) ) == 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:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan12Properties;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary;
+ char driverName[VK_MAX_DRIVER_NAME_SIZE] = {};
+ char driverInfo[VK_MAX_DRIVER_INFO_SIZE] = {};
+ 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 = {};
+ };
+ static_assert( sizeof( PhysicalDeviceVulkan12Properties ) == sizeof( VkPhysicalDeviceVulkan12Properties ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceVulkan12Properties>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceVulkanMemoryModelFeatures
+ {
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeatures( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = {} ) VULKAN_HPP_NOEXCEPT
+ : vulkanMemoryModel( vulkanMemoryModel_ )
+ , vulkanMemoryModelDeviceScope( vulkanMemoryModelDeviceScope_ )
+ , vulkanMemoryModelAvailabilityVisibilityChains( vulkanMemoryModelAvailabilityVisibilityChains_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures ) - offsetof( PhysicalDeviceVulkanMemoryModelFeatures, pNext ) );
+ return *this;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures& operator=( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures const *>(&rhs);
+ return *this;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT
+ {
+ vulkanMemoryModel = vulkanMemoryModel_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT
+ {
+ vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_;
+ return *this;
+ }
+
+ PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT
+ {
+ vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVulkanMemoryModelFeatures const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVulkanMemoryModelFeatures*>( this );
+ }
+
+ operator VkPhysicalDeviceVulkanMemoryModelFeatures &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeatures*>( this );
+ }
+
+ bool operator==( PhysicalDeviceVulkanMemoryModelFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( vulkanMemoryModel == rhs.vulkanMemoryModel )
+ && ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope )
+ && ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains );
+ }
+
+ bool operator!=( PhysicalDeviceVulkanMemoryModelFeatures const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkanMemoryModelFeatures;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel = {};
+ VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope = {};
+ VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains = {};
+ };
+ static_assert( sizeof( PhysicalDeviceVulkanMemoryModelFeatures ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeatures ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceVulkanMemoryModelFeatures>::value, "struct wrapper is not a standard layout!" );
+
+ struct PhysicalDeviceYcbcrImageArraysFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( vk::Bool32 ycbcrImageArrays_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceYcbcrImageArraysFeaturesEXT( ycbcrImageArrays_ )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ = {} ) VULKAN_HPP_NOEXCEPT
+ : ycbcrImageArrays( ycbcrImageArrays_ )
{}
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT ) - offsetof( PhysicalDeviceYcbcrImageArraysFeaturesEXT, pNext ) );
+ return *this;
+ }
+
PhysicalDeviceYcbcrImageArraysFeaturesEXT( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PhysicalDeviceYcbcrImageArraysFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PhysicalDeviceYcbcrImageArraysFeaturesEXT& operator=( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PhysicalDeviceYcbcrImageArraysFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT const *>(&rhs);
return *this;
}
@@ -54151,7 +51500,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceYcbcrImageArraysFeaturesEXT & setYcbcrImageArrays( vk::Bool32 ycbcrImageArrays_ ) VULKAN_HPP_NOEXCEPT
+ PhysicalDeviceYcbcrImageArraysFeaturesEXT & setYcbcrImageArrays( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ ) VULKAN_HPP_NOEXCEPT
{
ycbcrImageArrays = ycbcrImageArrays_;
return *this;
@@ -54179,61 +51528,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PhysicalDeviceYcbcrImageArraysFeaturesEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays = {};
};
static_assert( sizeof( PhysicalDeviceYcbcrImageArraysFeaturesEXT ) == sizeof( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PhysicalDeviceYcbcrImageArraysFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineCacheCreateInfo
{
- struct PipelineCacheCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( vk::PipelineCacheCreateFlags flags_ = vk::PipelineCacheCreateFlags(),
- size_t initialDataSize_ = 0,
- const void* pInitialData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , initialDataSize( initialDataSize_ )
- , pInitialData( pInitialData_ )
- {}
-
- PipelineCacheCreateInfo( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCacheCreateInfo*>(this) = rhs;
- }
-
- PipelineCacheCreateInfo& operator=( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCacheCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCacheCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineCacheCreateFlags flags;
- size_t initialDataSize;
- const void* pInitialData;
- };
- static_assert( sizeof( PipelineCacheCreateInfo ) == sizeof( VkPipelineCacheCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCacheCreateInfo : public layout::PipelineCacheCreateInfo
- {
- VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( vk::PipelineCacheCreateFlags flags_ = vk::PipelineCacheCreateFlags(),
- size_t initialDataSize_ = 0,
- const void* pInitialData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCacheCreateInfo( flags_, initialDataSize_, pInitialData_ )
+ VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ = {},
+ size_t initialDataSize_ = {},
+ const void* pInitialData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , initialDataSize( initialDataSize_ )
+ , pInitialData( pInitialData_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo ) - offsetof( PipelineCacheCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineCacheCreateInfo( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCacheCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCacheCreateInfo& operator=( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCacheCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const *>(&rhs);
return *this;
}
@@ -54243,7 +51569,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCacheCreateInfo & setFlags( vk::PipelineCacheCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCacheCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -54285,61 +51611,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCacheCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCacheCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags = {};
+ size_t initialDataSize = {};
+ const void* pInitialData = {};
};
static_assert( sizeof( PipelineCacheCreateInfo ) == sizeof( VkPipelineCacheCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCacheCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineColorBlendAdvancedStateCreateInfoEXT
{
- struct PipelineColorBlendAdvancedStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( vk::Bool32 srcPremultiplied_ = 0,
- vk::Bool32 dstPremultiplied_ = 0,
- vk::BlendOverlapEXT blendOverlap_ = vk::BlendOverlapEXT::eUncorrelated ) VULKAN_HPP_NOEXCEPT
- : srcPremultiplied( srcPremultiplied_ )
- , dstPremultiplied( dstPremultiplied_ )
- , blendOverlap( blendOverlap_ )
- {}
-
- PipelineColorBlendAdvancedStateCreateInfoEXT( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineColorBlendAdvancedStateCreateInfoEXT& operator=( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::Bool32 srcPremultiplied;
- vk::Bool32 dstPremultiplied;
- vk::BlendOverlapEXT blendOverlap;
- };
- static_assert( sizeof( PipelineColorBlendAdvancedStateCreateInfoEXT ) == sizeof( VkPipelineColorBlendAdvancedStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineColorBlendAdvancedStateCreateInfoEXT : public layout::PipelineColorBlendAdvancedStateCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( vk::Bool32 srcPremultiplied_ = 0,
- vk::Bool32 dstPremultiplied_ = 0,
- vk::BlendOverlapEXT blendOverlap_ = vk::BlendOverlapEXT::eUncorrelated ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineColorBlendAdvancedStateCreateInfoEXT( srcPremultiplied_, dstPremultiplied_, blendOverlap_ )
+ VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ = {},
+ VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated ) VULKAN_HPP_NOEXCEPT
+ : srcPremultiplied( srcPremultiplied_ )
+ , dstPremultiplied( dstPremultiplied_ )
+ , blendOverlap( blendOverlap_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT ) - offsetof( PipelineColorBlendAdvancedStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineColorBlendAdvancedStateCreateInfoEXT( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineColorBlendAdvancedStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineColorBlendAdvancedStateCreateInfoEXT& operator=( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineColorBlendAdvancedStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -54349,19 +51654,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineColorBlendAdvancedStateCreateInfoEXT & setSrcPremultiplied( vk::Bool32 srcPremultiplied_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAdvancedStateCreateInfoEXT & setSrcPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ ) VULKAN_HPP_NOEXCEPT
{
srcPremultiplied = srcPremultiplied_;
return *this;
}
- PipelineColorBlendAdvancedStateCreateInfoEXT & setDstPremultiplied( vk::Bool32 dstPremultiplied_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAdvancedStateCreateInfoEXT & setDstPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ ) VULKAN_HPP_NOEXCEPT
{
dstPremultiplied = dstPremultiplied_;
return *this;
}
- PipelineColorBlendAdvancedStateCreateInfoEXT & setBlendOverlap( vk::BlendOverlapEXT blendOverlap_ ) VULKAN_HPP_NOEXCEPT
+ PipelineColorBlendAdvancedStateCreateInfoEXT & setBlendOverlap( VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ ) VULKAN_HPP_NOEXCEPT
{
blendOverlap = blendOverlap_;
return *this;
@@ -54391,53 +51696,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineColorBlendAdvancedStateCreateInfoEXT::sType;
+ public:
+ const 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;
};
static_assert( sizeof( PipelineColorBlendAdvancedStateCreateInfoEXT ) == sizeof( VkPipelineColorBlendAdvancedStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineColorBlendAdvancedStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineCompilerControlCreateInfoAMD
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( vk::PipelineCompilerControlFlagsAMD compilerControlFlags_ = vk::PipelineCompilerControlFlagsAMD() ) VULKAN_HPP_NOEXCEPT
- : compilerControlFlags( compilerControlFlags_ )
- {}
-
- PipelineCompilerControlCreateInfoAMD( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCompilerControlCreateInfoAMD*>(this) = rhs;
- }
-
- PipelineCompilerControlCreateInfoAMD& operator=( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCompilerControlCreateInfoAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCompilerControlCreateInfoAMD;
- const void* pNext = nullptr;
- vk::PipelineCompilerControlFlagsAMD compilerControlFlags;
- };
- static_assert( sizeof( PipelineCompilerControlCreateInfoAMD ) == sizeof( VkPipelineCompilerControlCreateInfoAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCompilerControlCreateInfoAMD : public layout::PipelineCompilerControlCreateInfoAMD
+ struct PipelineCompilerControlCreateInfoAMD
{
- VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( vk::PipelineCompilerControlFlagsAMD compilerControlFlags_ = vk::PipelineCompilerControlFlagsAMD() ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCompilerControlCreateInfoAMD( compilerControlFlags_ )
+ VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : compilerControlFlags( compilerControlFlags_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD & operator=( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD ) - offsetof( PipelineCompilerControlCreateInfoAMD, pNext ) );
+ return *this;
+ }
+
PipelineCompilerControlCreateInfoAMD( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCompilerControlCreateInfoAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCompilerControlCreateInfoAMD& operator=( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCompilerControlCreateInfoAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD const *>(&rhs);
return *this;
}
@@ -54447,7 +51735,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCompilerControlCreateInfoAMD & setCompilerControlFlags( vk::PipelineCompilerControlFlagsAMD compilerControlFlags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCompilerControlCreateInfoAMD & setCompilerControlFlags( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ ) VULKAN_HPP_NOEXCEPT
{
compilerControlFlags = compilerControlFlags_;
return *this;
@@ -54475,69 +51763,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCompilerControlCreateInfoAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCompilerControlCreateInfoAMD;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags = {};
};
static_assert( sizeof( PipelineCompilerControlCreateInfoAMD ) == sizeof( VkPipelineCompilerControlCreateInfoAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCompilerControlCreateInfoAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineCoverageModulationStateCreateInfoNV
{
- struct PipelineCoverageModulationStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( vk::PipelineCoverageModulationStateCreateFlagsNV flags_ = vk::PipelineCoverageModulationStateCreateFlagsNV(),
- vk::CoverageModulationModeNV coverageModulationMode_ = vk::CoverageModulationModeNV::eNone,
- vk::Bool32 coverageModulationTableEnable_ = 0,
- uint32_t coverageModulationTableCount_ = 0,
- const float* pCoverageModulationTable_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , coverageModulationMode( coverageModulationMode_ )
- , coverageModulationTableEnable( coverageModulationTableEnable_ )
- , coverageModulationTableCount( coverageModulationTableCount_ )
- , pCoverageModulationTable( pCoverageModulationTable_ )
- {}
-
- PipelineCoverageModulationStateCreateInfoNV( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineCoverageModulationStateCreateInfoNV& operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::PipelineCoverageModulationStateCreateFlagsNV flags;
- vk::CoverageModulationModeNV coverageModulationMode;
- vk::Bool32 coverageModulationTableEnable;
- uint32_t coverageModulationTableCount;
- const float* pCoverageModulationTable;
- };
- static_assert( sizeof( PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCoverageModulationStateCreateInfoNV : public layout::PipelineCoverageModulationStateCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( vk::PipelineCoverageModulationStateCreateFlagsNV flags_ = vk::PipelineCoverageModulationStateCreateFlagsNV(),
- vk::CoverageModulationModeNV coverageModulationMode_ = vk::CoverageModulationModeNV::eNone,
- vk::Bool32 coverageModulationTableEnable_ = 0,
- uint32_t coverageModulationTableCount_ = 0,
- const float* pCoverageModulationTable_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageModulationStateCreateInfoNV( flags_, coverageModulationMode_, coverageModulationTableEnable_, coverageModulationTableCount_, pCoverageModulationTable_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , coverageModulationMode( coverageModulationMode_ )
+ , coverageModulationTableEnable( coverageModulationTableEnable_ )
+ , coverageModulationTableCount( coverageModulationTableCount_ )
+ , pCoverageModulationTable( pCoverageModulationTable_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV ) - offsetof( PipelineCoverageModulationStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineCoverageModulationStateCreateInfoNV( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageModulationStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCoverageModulationStateCreateInfoNV& operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCoverageModulationStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -54547,19 +51808,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCoverageModulationStateCreateInfoNV & setFlags( vk::PipelineCoverageModulationStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageModulationStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationMode( vk::CoverageModulationModeNV coverageModulationMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationMode( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_ ) VULKAN_HPP_NOEXCEPT
{
coverageModulationMode = coverageModulationMode_;
return *this;
}
- PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTableEnable( vk::Bool32 coverageModulationTableEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTableEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_ ) VULKAN_HPP_NOEXCEPT
{
coverageModulationTableEnable = coverageModulationTableEnable_;
return *this;
@@ -54603,57 +51864,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCoverageModulationStateCreateInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCoverageModulationStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineCoverageReductionStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( vk::PipelineCoverageReductionStateCreateFlagsNV flags_ = vk::PipelineCoverageReductionStateCreateFlagsNV(),
- vk::CoverageReductionModeNV coverageReductionMode_ = vk::CoverageReductionModeNV::eMerge ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , coverageReductionMode( coverageReductionMode_ )
- {}
-
- PipelineCoverageReductionStateCreateInfoNV( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageReductionStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineCoverageReductionStateCreateInfoNV& operator=( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageReductionStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCoverageReductionStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::PipelineCoverageReductionStateCreateFlagsNV flags;
- vk::CoverageReductionModeNV coverageReductionMode;
- };
- static_assert( sizeof( PipelineCoverageReductionStateCreateInfoNV ) == sizeof( VkPipelineCoverageReductionStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCoverageReductionStateCreateInfoNV : public layout::PipelineCoverageReductionStateCreateInfoNV
+ struct PipelineCoverageReductionStateCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( vk::PipelineCoverageReductionStateCreateFlagsNV flags_ = vk::PipelineCoverageReductionStateCreateFlagsNV(),
- vk::CoverageReductionModeNV coverageReductionMode_ = vk::CoverageReductionModeNV::eMerge ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageReductionStateCreateInfoNV( flags_, coverageReductionMode_ )
+ VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ = {},
+ VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , coverageReductionMode( coverageReductionMode_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV ) - offsetof( PipelineCoverageReductionStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineCoverageReductionStateCreateInfoNV( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageReductionStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCoverageReductionStateCreateInfoNV& operator=( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCoverageReductionStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -54663,13 +51907,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCoverageReductionStateCreateInfoNV & setFlags( vk::PipelineCoverageReductionStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageReductionStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineCoverageReductionStateCreateInfoNV & setCoverageReductionMode( vk::CoverageReductionModeNV coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageReductionStateCreateInfoNV & setCoverageReductionMode( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT
{
coverageReductionMode = coverageReductionMode_;
return *this;
@@ -54698,61 +51942,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCoverageReductionStateCreateInfoNV::sType;
+ public:
+ const 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;
};
static_assert( sizeof( PipelineCoverageReductionStateCreateInfoNV ) == sizeof( VkPipelineCoverageReductionStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCoverageReductionStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineCoverageToColorStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( vk::PipelineCoverageToColorStateCreateFlagsNV flags_ = vk::PipelineCoverageToColorStateCreateFlagsNV(),
- vk::Bool32 coverageToColorEnable_ = 0,
- uint32_t coverageToColorLocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , coverageToColorEnable( coverageToColorEnable_ )
- , coverageToColorLocation( coverageToColorLocation_ )
- {}
-
- PipelineCoverageToColorStateCreateInfoNV( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineCoverageToColorStateCreateInfoNV& operator=( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::PipelineCoverageToColorStateCreateFlagsNV flags;
- vk::Bool32 coverageToColorEnable;
- uint32_t coverageToColorLocation;
- };
- static_assert( sizeof( PipelineCoverageToColorStateCreateInfoNV ) == sizeof( VkPipelineCoverageToColorStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCoverageToColorStateCreateInfoNV : public layout::PipelineCoverageToColorStateCreateInfoNV
+ struct PipelineCoverageToColorStateCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( vk::PipelineCoverageToColorStateCreateFlagsNV flags_ = vk::PipelineCoverageToColorStateCreateFlagsNV(),
- vk::Bool32 coverageToColorEnable_ = 0,
- uint32_t coverageToColorLocation_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageToColorStateCreateInfoNV( flags_, coverageToColorEnable_, coverageToColorLocation_ )
+ VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ = {},
+ uint32_t coverageToColorLocation_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , coverageToColorEnable( coverageToColorEnable_ )
+ , coverageToColorLocation( coverageToColorLocation_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV ) - offsetof( PipelineCoverageToColorStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineCoverageToColorStateCreateInfoNV( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCoverageToColorStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCoverageToColorStateCreateInfoNV& operator=( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCoverageToColorStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -54762,13 +51984,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCoverageToColorStateCreateInfoNV & setFlags( vk::PipelineCoverageToColorStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageToColorStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineCoverageToColorStateCreateInfoNV & setCoverageToColorEnable( vk::Bool32 coverageToColorEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCoverageToColorStateCreateInfoNV & setCoverageToColorEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ ) VULKAN_HPP_NOEXCEPT
{
coverageToColorEnable = coverageToColorEnable_;
return *this;
@@ -54804,25 +52026,32 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCoverageToColorStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags = {};
+ VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable = {};
+ uint32_t coverageToColorLocation = {};
};
static_assert( sizeof( PipelineCoverageToColorStateCreateInfoNV ) == sizeof( VkPipelineCoverageToColorStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCoverageToColorStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct PipelineCreationFeedbackEXT
{
- PipelineCreationFeedbackEXT() VULKAN_HPP_NOEXCEPT
+ PipelineCreationFeedbackEXT( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlagsEXT flags_ = {},
+ uint64_t duration_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , duration( duration_ )
{}
PipelineCreationFeedbackEXT( VkPipelineCreationFeedbackEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPipelineCreationFeedbackEXT*>(this) = rhs;
+ *this = rhs;
}
PipelineCreationFeedbackEXT& operator=( VkPipelineCreationFeedbackEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPipelineCreationFeedbackEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT const *>(&rhs);
return *this;
}
@@ -54848,61 +52077,36 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::PipelineCreationFeedbackFlagsEXT flags;
- uint64_t duration;
+ VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlagsEXT flags = {};
+ uint64_t duration = {};
};
static_assert( sizeof( PipelineCreationFeedbackEXT ) == sizeof( VkPipelineCreationFeedbackEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCreationFeedbackEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineCreationFeedbackCreateInfoEXT
{
- struct PipelineCreationFeedbackCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfoEXT( vk::PipelineCreationFeedbackEXT* pPipelineCreationFeedback_ = nullptr,
- uint32_t pipelineStageCreationFeedbackCount_ = 0,
- vk::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : pPipelineCreationFeedback( pPipelineCreationFeedback_ )
- , pipelineStageCreationFeedbackCount( pipelineStageCreationFeedbackCount_ )
- , pPipelineStageCreationFeedbacks( pPipelineStageCreationFeedbacks_ )
- {}
-
- PipelineCreationFeedbackCreateInfoEXT( VkPipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCreationFeedbackCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineCreationFeedbackCreateInfoEXT& operator=( VkPipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineCreationFeedbackCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineCreationFeedbackCreateInfoEXT;
- const void* pNext = nullptr;
- vk::PipelineCreationFeedbackEXT* pPipelineCreationFeedback;
- uint32_t pipelineStageCreationFeedbackCount;
- vk::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks;
- };
- static_assert( sizeof( PipelineCreationFeedbackCreateInfoEXT ) == sizeof( VkPipelineCreationFeedbackCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineCreationFeedbackCreateInfoEXT : public layout::PipelineCreationFeedbackCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfoEXT( vk::PipelineCreationFeedbackEXT* pPipelineCreationFeedback_ = nullptr,
- uint32_t pipelineStageCreationFeedbackCount_ = 0,
- vk::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCreationFeedbackCreateInfoEXT( pPipelineCreationFeedback_, pipelineStageCreationFeedbackCount_, pPipelineStageCreationFeedbacks_ )
+ VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineCreationFeedback_ = {},
+ uint32_t pipelineStageCreationFeedbackCount_ = {},
+ VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pPipelineCreationFeedback( pPipelineCreationFeedback_ )
+ , pipelineStageCreationFeedbackCount( pipelineStageCreationFeedbackCount_ )
+ , pPipelineStageCreationFeedbacks( pPipelineStageCreationFeedbacks_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfoEXT ) - offsetof( PipelineCreationFeedbackCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineCreationFeedbackCreateInfoEXT( VkPipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineCreationFeedbackCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineCreationFeedbackCreateInfoEXT& operator=( VkPipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineCreationFeedbackCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -54912,7 +52116,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCreationFeedbackCreateInfoEXT & setPPipelineCreationFeedback( vk::PipelineCreationFeedbackEXT* pPipelineCreationFeedback_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCreationFeedbackCreateInfoEXT & setPPipelineCreationFeedback( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineCreationFeedback_ ) VULKAN_HPP_NOEXCEPT
{
pPipelineCreationFeedback = pPipelineCreationFeedback_;
return *this;
@@ -54924,7 +52128,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineCreationFeedbackCreateInfoEXT & setPPipelineStageCreationFeedbacks( vk::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT
+ PipelineCreationFeedbackCreateInfoEXT & setPPipelineStageCreationFeedbacks( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT
{
pPipelineStageCreationFeedbacks = pPipelineStageCreationFeedbacks_;
return *this;
@@ -54954,65 +52158,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineCreationFeedbackCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCreationFeedbackCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineCreationFeedback = {};
+ uint32_t pipelineStageCreationFeedbackCount = {};
+ VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks = {};
};
static_assert( sizeof( PipelineCreationFeedbackCreateInfoEXT ) == sizeof( VkPipelineCreationFeedbackCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineCreationFeedbackCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineDiscardRectangleStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( vk::PipelineDiscardRectangleStateCreateFlagsEXT flags_ = vk::PipelineDiscardRectangleStateCreateFlagsEXT(),
- vk::DiscardRectangleModeEXT discardRectangleMode_ = vk::DiscardRectangleModeEXT::eInclusive,
- uint32_t discardRectangleCount_ = 0,
- const vk::Rect2D* pDiscardRectangles_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , discardRectangleMode( discardRectangleMode_ )
- , discardRectangleCount( discardRectangleCount_ )
- , pDiscardRectangles( pDiscardRectangles_ )
- {}
-
- PipelineDiscardRectangleStateCreateInfoEXT( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineDiscardRectangleStateCreateInfoEXT& operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::PipelineDiscardRectangleStateCreateFlagsEXT flags;
- vk::DiscardRectangleModeEXT discardRectangleMode;
- uint32_t discardRectangleCount;
- const vk::Rect2D* pDiscardRectangles;
- };
- static_assert( sizeof( PipelineDiscardRectangleStateCreateInfoEXT ) == sizeof( VkPipelineDiscardRectangleStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineDiscardRectangleStateCreateInfoEXT : public layout::PipelineDiscardRectangleStateCreateInfoEXT
+ struct PipelineDiscardRectangleStateCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( vk::PipelineDiscardRectangleStateCreateFlagsEXT flags_ = vk::PipelineDiscardRectangleStateCreateFlagsEXT(),
- vk::DiscardRectangleModeEXT discardRectangleMode_ = vk::DiscardRectangleModeEXT::eInclusive,
- uint32_t discardRectangleCount_ = 0,
- const vk::Rect2D* pDiscardRectangles_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDiscardRectangleStateCreateInfoEXT( flags_, discardRectangleMode_, discardRectangleCount_, pDiscardRectangles_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , discardRectangleMode( discardRectangleMode_ )
+ , discardRectangleCount( discardRectangleCount_ )
+ , pDiscardRectangles( pDiscardRectangles_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT ) - offsetof( PipelineDiscardRectangleStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineDiscardRectangleStateCreateInfoEXT( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineDiscardRectangleStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineDiscardRectangleStateCreateInfoEXT& operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineDiscardRectangleStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -55022,13 +52203,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineDiscardRectangleStateCreateInfoEXT & setFlags( vk::PipelineDiscardRectangleStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDiscardRectangleStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangleMode( vk::DiscardRectangleModeEXT discardRectangleMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangleMode( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_ ) VULKAN_HPP_NOEXCEPT
{
discardRectangleMode = discardRectangleMode_;
return *this;
@@ -55040,7 +52221,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineDiscardRectangleStateCreateInfoEXT & setPDiscardRectangles( const vk::Rect2D* pDiscardRectangles_ ) VULKAN_HPP_NOEXCEPT
+ PipelineDiscardRectangleStateCreateInfoEXT & setPDiscardRectangles( const VULKAN_HPP_NAMESPACE::Rect2D* pDiscardRectangles_ ) VULKAN_HPP_NOEXCEPT
{
pDiscardRectangles = pDiscardRectangles_;
return *this;
@@ -55071,57 +52252,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineDiscardRectangleStateCreateInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineDiscardRectangleStateCreateInfoEXT ) == sizeof( VkPipelineDiscardRectangleStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineDiscardRectangleStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineExecutableInfoKHR
{
- struct PipelineExecutableInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( vk::Pipeline pipeline_ = vk::Pipeline(),
- uint32_t executableIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : pipeline( pipeline_ )
- , executableIndex( executableIndex_ )
- {}
-
- PipelineExecutableInfoKHR( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableInfoKHR*>(this) = rhs;
- }
-
- PipelineExecutableInfoKHR& operator=( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineExecutableInfoKHR;
- const void* pNext = nullptr;
- vk::Pipeline pipeline;
- uint32_t executableIndex;
- };
- static_assert( sizeof( PipelineExecutableInfoKHR ) == sizeof( VkPipelineExecutableInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineExecutableInfoKHR : public layout::PipelineExecutableInfoKHR
- {
- VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( vk::Pipeline pipeline_ = vk::Pipeline(),
- uint32_t executableIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableInfoKHR( pipeline_, executableIndex_ )
+ VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {},
+ uint32_t executableIndex_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pipeline( pipeline_ )
+ , executableIndex( executableIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR ) - offsetof( PipelineExecutableInfoKHR, pNext ) );
+ return *this;
+ }
+
PipelineExecutableInfoKHR( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineExecutableInfoKHR& operator=( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineExecutableInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR const *>(&rhs);
return *this;
}
@@ -55131,7 +52294,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineExecutableInfoKHR & setPipeline( vk::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
+ PipelineExecutableInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
{
pipeline = pipeline_;
return *this;
@@ -55166,108 +52329,46 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineExecutableInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Pipeline pipeline = {};
+ uint32_t executableIndex = {};
};
static_assert( sizeof( PipelineExecutableInfoKHR ) == sizeof( VkPipelineExecutableInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineExecutableInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineExecutableInternalRepresentationKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInternalRepresentationKHR( std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = { { 0 } },
- std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = { { 0 } },
- vk::Bool32 isText_ = 0,
- size_t dataSize_ = 0,
- void* pData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : name{}
- , description{}
- , isText( isText_ )
- , dataSize( dataSize_ )
- , pData( pData_ )
- {
- vk::ConstExpressionArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( name, name_ );
- vk::ConstExpressionArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
- }
-
- PipelineExecutableInternalRepresentationKHR( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableInternalRepresentationKHR*>(this) = rhs;
- }
-
- PipelineExecutableInternalRepresentationKHR& operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableInternalRepresentationKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineExecutableInternalRepresentationKHR;
- void* pNext = nullptr;
- char name[VK_MAX_DESCRIPTION_SIZE];
- char description[VK_MAX_DESCRIPTION_SIZE];
- vk::Bool32 isText;
- size_t dataSize;
- void* pData;
- };
- static_assert( sizeof( PipelineExecutableInternalRepresentationKHR ) == sizeof( VkPipelineExecutableInternalRepresentationKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineExecutableInternalRepresentationKHR : public layout::PipelineExecutableInternalRepresentationKHR
+ struct PipelineExecutableInternalRepresentationKHR
{
- VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInternalRepresentationKHR( std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = { { 0 } },
- std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = { { 0 } },
- vk::Bool32 isText_ = 0,
- size_t dataSize_ = 0,
- void* pData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableInternalRepresentationKHR( name_, description_, isText_, dataSize_, pData_ )
- {}
-
- PipelineExecutableInternalRepresentationKHR( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableInternalRepresentationKHR( rhs )
- {}
-
- PipelineExecutableInternalRepresentationKHR& operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- layout::PipelineExecutableInternalRepresentationKHR::operator=(rhs);
- return *this;
- }
-
- PipelineExecutableInternalRepresentationKHR & setPNext( void* pNext_ ) VULKAN_HPP_NOEXCEPT
- {
- pNext = pNext_;
- return *this;
- }
-
- PipelineExecutableInternalRepresentationKHR & setName( std::array<char,VK_MAX_DESCRIPTION_SIZE> name_ ) VULKAN_HPP_NOEXCEPT
- {
- memcpy( name, name_.data(), VK_MAX_DESCRIPTION_SIZE * sizeof( char ) );
- return *this;
- }
-
- PipelineExecutableInternalRepresentationKHR & setDescription( std::array<char,VK_MAX_DESCRIPTION_SIZE> description_ ) VULKAN_HPP_NOEXCEPT
+ PipelineExecutableInternalRepresentationKHR( std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 isText_ = {},
+ size_t dataSize_ = {},
+ void* pData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : name{}
+ , description{}
+ , isText( isText_ )
+ , dataSize( dataSize_ )
+ , pData( pData_ )
{
- memcpy( description, description_.data(), VK_MAX_DESCRIPTION_SIZE * sizeof( char ) );
- return *this;
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( name, name_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
}
- PipelineExecutableInternalRepresentationKHR & setIsText( vk::Bool32 isText_ ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- isText = isText_;
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR ) - offsetof( PipelineExecutableInternalRepresentationKHR, pNext ) );
return *this;
}
- PipelineExecutableInternalRepresentationKHR & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT
+ PipelineExecutableInternalRepresentationKHR( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- dataSize = dataSize_;
- return *this;
+ *this = rhs;
}
- PipelineExecutableInternalRepresentationKHR & setPData( void* pData_ ) VULKAN_HPP_NOEXCEPT
+ PipelineExecutableInternalRepresentationKHR& operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- pData = pData_;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR const *>(&rhs);
return *this;
}
@@ -55297,55 +52398,47 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineExecutableInternalRepresentationKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInternalRepresentationKHR;
+ void* pNext = {};
+ char name[VK_MAX_DESCRIPTION_SIZE] = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::Bool32 isText = {};
+ size_t dataSize = {};
+ void* pData = {};
};
static_assert( sizeof( PipelineExecutableInternalRepresentationKHR ) == sizeof( VkPipelineExecutableInternalRepresentationKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineExecutableInternalRepresentationKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineExecutablePropertiesKHR
{
- struct PipelineExecutablePropertiesKHR
+ PipelineExecutablePropertiesKHR( VULKAN_HPP_NAMESPACE::ShaderStageFlags stages_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {},
+ uint32_t subgroupSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : stages( stages_ )
+ , name{}
+ , description{}
+ , subgroupSize( subgroupSize_ )
{
- protected:
- PipelineExecutablePropertiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PipelineExecutablePropertiesKHR( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutablePropertiesKHR*>(this) = rhs;
- }
-
- PipelineExecutablePropertiesKHR& operator=( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutablePropertiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineExecutablePropertiesKHR;
- void* pNext = nullptr;
- vk::ShaderStageFlags stages;
- char name[VK_MAX_DESCRIPTION_SIZE];
- char description[VK_MAX_DESCRIPTION_SIZE];
- uint32_t subgroupSize;
- };
- static_assert( sizeof( PipelineExecutablePropertiesKHR ) == sizeof( VkPipelineExecutablePropertiesKHR ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( name, name_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
+ }
- struct PipelineExecutablePropertiesKHR : public layout::PipelineExecutablePropertiesKHR
- {
- PipelineExecutablePropertiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutablePropertiesKHR()
- {}
+ VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR ) - offsetof( PipelineExecutablePropertiesKHR, pNext ) );
+ return *this;
+ }
PipelineExecutablePropertiesKHR( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutablePropertiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineExecutablePropertiesKHR& operator=( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineExecutablePropertiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR const *>(&rhs);
return *this;
}
@@ -55374,14 +52467,25 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineExecutablePropertiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutablePropertiesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags stages = {};
+ char name[VK_MAX_DESCRIPTION_SIZE] = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
+ uint32_t subgroupSize = {};
};
static_assert( sizeof( PipelineExecutablePropertiesKHR ) == sizeof( VkPipelineExecutablePropertiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineExecutablePropertiesKHR>::value, "struct wrapper is not a standard layout!" );
union PipelineExecutableStatisticValueKHR
{
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( this, &rhs, sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR ) );
+ return *this;
+ }
+
operator VkPipelineExecutableStatisticValueKHR const&() const
{
return *reinterpret_cast<const VkPipelineExecutableStatisticValueKHR*>(this);
@@ -55393,7 +52497,7 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
- vk::Bool32 b32;
+ VULKAN_HPP_NAMESPACE::Bool32 b32;
int64_t i64;
uint64_t u64;
double f64;
@@ -55405,49 +52509,35 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
};
- namespace layout
+ struct PipelineExecutableStatisticKHR
{
- struct PipelineExecutableStatisticKHR
+ PipelineExecutableStatisticKHR( std::array<char,VK_MAX_DESCRIPTION_SIZE> const& name_ = {},
+ std::array<char,VK_MAX_DESCRIPTION_SIZE> const& description_ = {},
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format_ = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32,
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value_ = {} ) VULKAN_HPP_NOEXCEPT
+ : name{}
+ , description{}
+ , format( format_ )
+ , value( value_ )
{
- protected:
- PipelineExecutableStatisticKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- PipelineExecutableStatisticKHR( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableStatisticKHR*>(this) = rhs;
- }
-
- PipelineExecutableStatisticKHR& operator=( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineExecutableStatisticKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineExecutableStatisticKHR;
- void* pNext = nullptr;
- char name[VK_MAX_DESCRIPTION_SIZE];
- char description[VK_MAX_DESCRIPTION_SIZE];
- vk::PipelineExecutableStatisticFormatKHR format;
- vk::PipelineExecutableStatisticValueKHR value;
- };
- static_assert( sizeof( PipelineExecutableStatisticKHR ) == sizeof( VkPipelineExecutableStatisticKHR ), "layout struct and wrapper have different size!" );
- }
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( name, name_ );
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<char,VK_MAX_DESCRIPTION_SIZE,VK_MAX_DESCRIPTION_SIZE>::copy( description, description_ );
+ }
- struct PipelineExecutableStatisticKHR : public layout::PipelineExecutableStatisticKHR
- {
- PipelineExecutableStatisticKHR() VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableStatisticKHR()
- {}
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR ) - offsetof( PipelineExecutableStatisticKHR, pNext ) );
+ return *this;
+ }
PipelineExecutableStatisticKHR( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineExecutableStatisticKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineExecutableStatisticKHR& operator=( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineExecutableStatisticKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR const *>(&rhs);
return *this;
}
@@ -55461,53 +52551,37 @@ namespace VULKAN_HPP_NAMESPACE
return *reinterpret_cast<VkPipelineExecutableStatisticKHR*>( this );
}
- private:
- using layout::PipelineExecutableStatisticKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableStatisticKHR;
+ void* pNext = {};
+ char name[VK_MAX_DESCRIPTION_SIZE] = {};
+ char description[VK_MAX_DESCRIPTION_SIZE] = {};
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32;
+ VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value = {};
};
static_assert( sizeof( PipelineExecutableStatisticKHR ) == sizeof( VkPipelineExecutableStatisticKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineExecutableStatisticKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineInfoKHR
{
- struct PipelineInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineInfoKHR( vk::Pipeline pipeline_ = vk::Pipeline() ) VULKAN_HPP_NOEXCEPT
- : pipeline( pipeline_ )
- {}
-
- PipelineInfoKHR( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineInfoKHR*>(this) = rhs;
- }
-
- PipelineInfoKHR& operator=( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineInfoKHR;
- const void* pNext = nullptr;
- vk::Pipeline pipeline;
- };
- static_assert( sizeof( PipelineInfoKHR ) == sizeof( VkPipelineInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineInfoKHR : public layout::PipelineInfoKHR
- {
- VULKAN_HPP_CONSTEXPR PipelineInfoKHR( vk::Pipeline pipeline_ = vk::Pipeline() ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineInfoKHR( pipeline_ )
+ VULKAN_HPP_CONSTEXPR PipelineInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {} ) VULKAN_HPP_NOEXCEPT
+ : pipeline( pipeline_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineInfoKHR & operator=( VULKAN_HPP_NAMESPACE::PipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineInfoKHR ) - offsetof( PipelineInfoKHR, pNext ) );
+ return *this;
+ }
+
PipelineInfoKHR( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineInfoKHR& operator=( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineInfoKHR const *>(&rhs);
return *this;
}
@@ -55517,7 +52591,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineInfoKHR & setPipeline( vk::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
+ PipelineInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT
{
pipeline = pipeline_;
return *this;
@@ -55545,17 +52619,19 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Pipeline pipeline = {};
};
static_assert( sizeof( PipelineInfoKHR ) == sizeof( VkPipelineInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineInfoKHR>::value, "struct wrapper is not a standard layout!" );
struct PushConstantRange
{
- VULKAN_HPP_CONSTEXPR PushConstantRange( vk::ShaderStageFlags stageFlags_ = vk::ShaderStageFlags(),
- uint32_t offset_ = 0,
- uint32_t size_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR PushConstantRange( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {},
+ uint32_t offset_ = {},
+ uint32_t size_ = {} ) VULKAN_HPP_NOEXCEPT
: stageFlags( stageFlags_ )
, offset( offset_ )
, size( size_ )
@@ -55563,16 +52639,16 @@ namespace VULKAN_HPP_NAMESPACE
PushConstantRange( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPushConstantRange*>(this) = rhs;
+ *this = rhs;
}
PushConstantRange& operator=( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPushConstantRange*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PushConstantRange const *>(&rhs);
return *this;
}
- PushConstantRange & setStageFlags( vk::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
+ PushConstantRange & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
{
stageFlags = stageFlags_;
return *this;
@@ -55613,70 +52689,41 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ShaderStageFlags stageFlags;
- uint32_t offset;
- uint32_t size;
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {};
+ uint32_t offset = {};
+ uint32_t size = {};
};
static_assert( sizeof( PushConstantRange ) == sizeof( VkPushConstantRange ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PushConstantRange>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineLayoutCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags flags_ = vk::PipelineLayoutCreateFlags(),
- uint32_t setLayoutCount_ = 0,
- const vk::DescriptorSetLayout* pSetLayouts_ = nullptr,
- uint32_t pushConstantRangeCount_ = 0,
- const vk::PushConstantRange* pPushConstantRanges_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , setLayoutCount( setLayoutCount_ )
- , pSetLayouts( pSetLayouts_ )
- , pushConstantRangeCount( pushConstantRangeCount_ )
- , pPushConstantRanges( pPushConstantRanges_ )
- {}
-
- PipelineLayoutCreateInfo( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineLayoutCreateInfo*>(this) = rhs;
- }
-
- PipelineLayoutCreateInfo& operator=( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineLayoutCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineLayoutCreateInfo;
- const void* pNext = nullptr;
- vk::PipelineLayoutCreateFlags flags;
- uint32_t setLayoutCount;
- const vk::DescriptorSetLayout* pSetLayouts;
- uint32_t pushConstantRangeCount;
- const vk::PushConstantRange* pPushConstantRanges;
- };
- static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineLayoutCreateInfo : public layout::PipelineLayoutCreateInfo
+ struct PipelineLayoutCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags flags_ = vk::PipelineLayoutCreateFlags(),
- uint32_t setLayoutCount_ = 0,
- const vk::DescriptorSetLayout* pSetLayouts_ = nullptr,
- uint32_t pushConstantRangeCount_ = 0,
- const vk::PushConstantRange* pPushConstantRanges_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineLayoutCreateInfo( flags_, setLayoutCount_, pSetLayouts_, pushConstantRangeCount_, pPushConstantRanges_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , setLayoutCount( setLayoutCount_ )
+ , pSetLayouts( pSetLayouts_ )
+ , pushConstantRangeCount( pushConstantRangeCount_ )
+ , pPushConstantRanges( pPushConstantRanges_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo ) - offsetof( PipelineLayoutCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineLayoutCreateInfo( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineLayoutCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineLayoutCreateInfo& operator=( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineLayoutCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const *>(&rhs);
return *this;
}
@@ -55686,7 +52733,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineLayoutCreateInfo & setFlags( vk::PipelineLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -55698,7 +52745,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineLayoutCreateInfo & setPSetLayouts( const vk::DescriptorSetLayout* pSetLayouts_ ) VULKAN_HPP_NOEXCEPT
+ PipelineLayoutCreateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout* pSetLayouts_ ) VULKAN_HPP_NOEXCEPT
{
pSetLayouts = pSetLayouts_;
return *this;
@@ -55710,7 +52757,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineLayoutCreateInfo & setPPushConstantRanges( const vk::PushConstantRange* pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT
+ PipelineLayoutCreateInfo & setPPushConstantRanges( const VULKAN_HPP_NAMESPACE::PushConstantRange* pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT
{
pPushConstantRanges = pPushConstantRanges_;
return *this;
@@ -55742,61 +52789,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineLayoutCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineLayoutCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineRasterizationConservativeStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( vk::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = vk::PipelineRasterizationConservativeStateCreateFlagsEXT(),
- vk::ConservativeRasterizationModeEXT conservativeRasterizationMode_ = vk::ConservativeRasterizationModeEXT::eDisabled,
- float extraPrimitiveOverestimationSize_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , conservativeRasterizationMode( conservativeRasterizationMode_ )
- , extraPrimitiveOverestimationSize( extraPrimitiveOverestimationSize_ )
- {}
-
- PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineRasterizationConservativeStateCreateInfoEXT& operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::PipelineRasterizationConservativeStateCreateFlagsEXT flags;
- vk::ConservativeRasterizationModeEXT conservativeRasterizationMode;
- float extraPrimitiveOverestimationSize;
- };
- static_assert( sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationConservativeStateCreateInfoEXT : public layout::PipelineRasterizationConservativeStateCreateInfoEXT
+ struct PipelineRasterizationConservativeStateCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( vk::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = vk::PipelineRasterizationConservativeStateCreateFlagsEXT(),
- vk::ConservativeRasterizationModeEXT conservativeRasterizationMode_ = vk::ConservativeRasterizationModeEXT::eDisabled,
- float extraPrimitiveOverestimationSize_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationConservativeStateCreateInfoEXT( flags_, conservativeRasterizationMode_, extraPrimitiveOverestimationSize_ )
+ VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = {},
+ VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ = VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT::eDisabled,
+ float extraPrimitiveOverestimationSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , conservativeRasterizationMode( conservativeRasterizationMode_ )
+ , extraPrimitiveOverestimationSize( extraPrimitiveOverestimationSize_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT ) - offsetof( PipelineRasterizationConservativeStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationConservativeStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationConservativeStateCreateInfoEXT& operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationConservativeStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -55806,13 +52834,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationConservativeStateCreateInfoEXT & setFlags( vk::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationConservativeStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineRasterizationConservativeStateCreateInfoEXT & setConservativeRasterizationMode( vk::ConservativeRasterizationModeEXT conservativeRasterizationMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationConservativeStateCreateInfoEXT & setConservativeRasterizationMode( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ ) VULKAN_HPP_NOEXCEPT
{
conservativeRasterizationMode = conservativeRasterizationMode_;
return *this;
@@ -55848,57 +52876,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationConservativeStateCreateInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationConservativeStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineRasterizationDepthClipStateCreateInfoEXT
{
- struct PipelineRasterizationDepthClipStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( vk::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ = vk::PipelineRasterizationDepthClipStateCreateFlagsEXT(),
- vk::Bool32 depthClipEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , depthClipEnable( depthClipEnable_ )
- {}
-
- PipelineRasterizationDepthClipStateCreateInfoEXT( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationDepthClipStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineRasterizationDepthClipStateCreateInfoEXT& operator=( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationDepthClipStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::PipelineRasterizationDepthClipStateCreateFlagsEXT flags;
- vk::Bool32 depthClipEnable;
- };
- static_assert( sizeof( PipelineRasterizationDepthClipStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationDepthClipStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationDepthClipStateCreateInfoEXT : public layout::PipelineRasterizationDepthClipStateCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( vk::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ = vk::PipelineRasterizationDepthClipStateCreateFlagsEXT(),
- vk::Bool32 depthClipEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationDepthClipStateCreateInfoEXT( flags_, depthClipEnable_ )
+ VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , depthClipEnable( depthClipEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT ) - offsetof( PipelineRasterizationDepthClipStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationDepthClipStateCreateInfoEXT( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationDepthClipStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationDepthClipStateCreateInfoEXT& operator=( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationDepthClipStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -55908,13 +52917,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationDepthClipStateCreateInfoEXT & setFlags( vk::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationDepthClipStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- PipelineRasterizationDepthClipStateCreateInfoEXT & setDepthClipEnable( vk::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationDepthClipStateCreateInfoEXT & setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT
{
depthClipEnable = depthClipEnable_;
return *this;
@@ -55943,65 +52952,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationDepthClipStateCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags = {};
+ VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {};
};
static_assert( sizeof( PipelineRasterizationDepthClipStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationDepthClipStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationDepthClipStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineRasterizationLineStateCreateInfoEXT
{
- struct PipelineRasterizationLineStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfoEXT( vk::LineRasterizationModeEXT lineRasterizationMode_ = vk::LineRasterizationModeEXT::eDefault,
- vk::Bool32 stippledLineEnable_ = 0,
- uint32_t lineStippleFactor_ = 0,
- uint16_t lineStipplePattern_ = 0 ) VULKAN_HPP_NOEXCEPT
- : lineRasterizationMode( lineRasterizationMode_ )
- , stippledLineEnable( stippledLineEnable_ )
- , lineStippleFactor( lineStippleFactor_ )
- , lineStipplePattern( lineStipplePattern_ )
- {}
-
- PipelineRasterizationLineStateCreateInfoEXT( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationLineStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineRasterizationLineStateCreateInfoEXT& operator=( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationLineStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationLineStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::LineRasterizationModeEXT lineRasterizationMode;
- vk::Bool32 stippledLineEnable;
- uint32_t lineStippleFactor;
- uint16_t lineStipplePattern;
- };
- static_assert( sizeof( PipelineRasterizationLineStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationLineStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationLineStateCreateInfoEXT : public layout::PipelineRasterizationLineStateCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfoEXT( vk::LineRasterizationModeEXT lineRasterizationMode_ = vk::LineRasterizationModeEXT::eDefault,
- vk::Bool32 stippledLineEnable_ = 0,
- uint32_t lineStippleFactor_ = 0,
- uint16_t lineStipplePattern_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationLineStateCreateInfoEXT( lineRasterizationMode_, stippledLineEnable_, lineStippleFactor_, lineStipplePattern_ )
+ VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode_ = VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT::eDefault,
+ VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ = {},
+ uint32_t lineStippleFactor_ = {},
+ uint16_t lineStipplePattern_ = {} ) VULKAN_HPP_NOEXCEPT
+ : lineRasterizationMode( lineRasterizationMode_ )
+ , stippledLineEnable( stippledLineEnable_ )
+ , lineStippleFactor( lineStippleFactor_ )
+ , lineStipplePattern( lineStipplePattern_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT ) - offsetof( PipelineRasterizationLineStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationLineStateCreateInfoEXT( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationLineStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationLineStateCreateInfoEXT& operator=( VkPipelineRasterizationLineStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationLineStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -56011,13 +52996,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationLineStateCreateInfoEXT & setLineRasterizationMode( vk::LineRasterizationModeEXT lineRasterizationMode_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationLineStateCreateInfoEXT & setLineRasterizationMode( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode_ ) VULKAN_HPP_NOEXCEPT
{
lineRasterizationMode = lineRasterizationMode_;
return *this;
}
- PipelineRasterizationLineStateCreateInfoEXT & setStippledLineEnable( vk::Bool32 stippledLineEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationLineStateCreateInfoEXT & setStippledLineEnable( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ ) VULKAN_HPP_NOEXCEPT
{
stippledLineEnable = stippledLineEnable_;
return *this;
@@ -56060,53 +53045,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationLineStateCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationLineStateCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode = VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT::eDefault;
+ VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable = {};
+ uint32_t lineStippleFactor = {};
+ uint16_t lineStipplePattern = {};
};
static_assert( sizeof( PipelineRasterizationLineStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationLineStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationLineStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineRasterizationStateRasterizationOrderAMD
{
- struct PipelineRasterizationStateRasterizationOrderAMD
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( vk::RasterizationOrderAMD rasterizationOrder_ = vk::RasterizationOrderAMD::eStrict ) VULKAN_HPP_NOEXCEPT
- : rasterizationOrder( rasterizationOrder_ )
- {}
-
- PipelineRasterizationStateRasterizationOrderAMD( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(this) = rhs;
- }
-
- PipelineRasterizationStateRasterizationOrderAMD& operator=( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD;
- const void* pNext = nullptr;
- vk::RasterizationOrderAMD rasterizationOrder;
- };
- static_assert( sizeof( PipelineRasterizationStateRasterizationOrderAMD ) == sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationStateRasterizationOrderAMD : public layout::PipelineRasterizationStateRasterizationOrderAMD
- {
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( vk::RasterizationOrderAMD rasterizationOrder_ = vk::RasterizationOrderAMD::eStrict ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateRasterizationOrderAMD( rasterizationOrder_ )
+ VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict ) VULKAN_HPP_NOEXCEPT
+ : rasterizationOrder( rasterizationOrder_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD ) - offsetof( PipelineRasterizationStateRasterizationOrderAMD, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationStateRasterizationOrderAMD( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateRasterizationOrderAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationStateRasterizationOrderAMD& operator=( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationStateRasterizationOrderAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD const *>(&rhs);
return *this;
}
@@ -56116,7 +53085,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationStateRasterizationOrderAMD & setRasterizationOrder( vk::RasterizationOrderAMD rasterizationOrder_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateRasterizationOrderAMD & setRasterizationOrder( VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ ) VULKAN_HPP_NOEXCEPT
{
rasterizationOrder = rasterizationOrder_;
return *this;
@@ -56144,57 +53113,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationStateRasterizationOrderAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict;
};
static_assert( sizeof( PipelineRasterizationStateRasterizationOrderAMD ) == sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationStateRasterizationOrderAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineRasterizationStateStreamCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( vk::PipelineRasterizationStateStreamCreateFlagsEXT flags_ = vk::PipelineRasterizationStateStreamCreateFlagsEXT(),
- uint32_t rasterizationStream_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , rasterizationStream( rasterizationStream_ )
- {}
-
- PipelineRasterizationStateStreamCreateInfoEXT( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateStreamCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineRasterizationStateStreamCreateInfoEXT& operator=( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRasterizationStateStreamCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT;
- const void* pNext = nullptr;
- vk::PipelineRasterizationStateStreamCreateFlagsEXT flags;
- uint32_t rasterizationStream;
- };
- static_assert( sizeof( PipelineRasterizationStateStreamCreateInfoEXT ) == sizeof( VkPipelineRasterizationStateStreamCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRasterizationStateStreamCreateInfoEXT : public layout::PipelineRasterizationStateStreamCreateInfoEXT
+ struct PipelineRasterizationStateStreamCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( vk::PipelineRasterizationStateStreamCreateFlagsEXT flags_ = vk::PipelineRasterizationStateStreamCreateFlagsEXT(),
- uint32_t rasterizationStream_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateStreamCreateInfoEXT( flags_, rasterizationStream_ )
+ VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ = {},
+ uint32_t rasterizationStream_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , rasterizationStream( rasterizationStream_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT ) - offsetof( PipelineRasterizationStateStreamCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineRasterizationStateStreamCreateInfoEXT( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRasterizationStateStreamCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRasterizationStateStreamCreateInfoEXT& operator=( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRasterizationStateStreamCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -56204,7 +53152,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRasterizationStateStreamCreateInfoEXT & setFlags( vk::PipelineRasterizationStateStreamCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRasterizationStateStreamCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -56239,53 +53187,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRasterizationStateStreamCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags = {};
+ uint32_t rasterizationStream = {};
};
static_assert( sizeof( PipelineRasterizationStateStreamCreateInfoEXT ) == sizeof( VkPipelineRasterizationStateStreamCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRasterizationStateStreamCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineRepresentativeFragmentTestStateCreateInfoNV
{
- struct PipelineRepresentativeFragmentTestStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( vk::Bool32 representativeFragmentTestEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : representativeFragmentTestEnable( representativeFragmentTestEnable_ )
- {}
-
- PipelineRepresentativeFragmentTestStateCreateInfoNV( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRepresentativeFragmentTestStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineRepresentativeFragmentTestStateCreateInfoNV& operator=( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineRepresentativeFragmentTestStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::Bool32 representativeFragmentTestEnable;
- };
- static_assert( sizeof( PipelineRepresentativeFragmentTestStateCreateInfoNV ) == sizeof( VkPipelineRepresentativeFragmentTestStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineRepresentativeFragmentTestStateCreateInfoNV : public layout::PipelineRepresentativeFragmentTestStateCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( vk::Bool32 representativeFragmentTestEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRepresentativeFragmentTestStateCreateInfoNV( representativeFragmentTestEnable_ )
+ VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : representativeFragmentTestEnable( representativeFragmentTestEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV ) - offsetof( PipelineRepresentativeFragmentTestStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineRepresentativeFragmentTestStateCreateInfoNV( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineRepresentativeFragmentTestStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineRepresentativeFragmentTestStateCreateInfoNV& operator=( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineRepresentativeFragmentTestStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -56295,7 +53225,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineRepresentativeFragmentTestStateCreateInfoNV & setRepresentativeFragmentTestEnable( vk::Bool32 representativeFragmentTestEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineRepresentativeFragmentTestStateCreateInfoNV & setRepresentativeFragmentTestEnable( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ ) VULKAN_HPP_NOEXCEPT
{
representativeFragmentTestEnable = representativeFragmentTestEnable_;
return *this;
@@ -56323,57 +53253,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineRepresentativeFragmentTestStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable = {};
};
static_assert( sizeof( PipelineRepresentativeFragmentTestStateCreateInfoNV ) == sizeof( VkPipelineRepresentativeFragmentTestStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineRepresentativeFragmentTestStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineSampleLocationsStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( vk::Bool32 sampleLocationsEnable_ = 0,
- vk::SampleLocationsInfoEXT sampleLocationsInfo_ = vk::SampleLocationsInfoEXT() ) VULKAN_HPP_NOEXCEPT
- : sampleLocationsEnable( sampleLocationsEnable_ )
- , sampleLocationsInfo( sampleLocationsInfo_ )
- {}
-
- PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineSampleLocationsStateCreateInfoEXT& operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT;
- const void* pNext = nullptr;
- vk::Bool32 sampleLocationsEnable;
- vk::SampleLocationsInfoEXT sampleLocationsInfo;
- };
- static_assert( sizeof( PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineSampleLocationsStateCreateInfoEXT : public layout::PipelineSampleLocationsStateCreateInfoEXT
+ struct PipelineSampleLocationsStateCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( vk::Bool32 sampleLocationsEnable_ = 0,
- vk::SampleLocationsInfoEXT sampleLocationsInfo_ = vk::SampleLocationsInfoEXT() ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineSampleLocationsStateCreateInfoEXT( sampleLocationsEnable_, sampleLocationsInfo_ )
+ VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ = {},
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT
+ : sampleLocationsEnable( sampleLocationsEnable_ )
+ , sampleLocationsInfo( sampleLocationsInfo_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT ) - offsetof( PipelineSampleLocationsStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineSampleLocationsStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineSampleLocationsStateCreateInfoEXT& operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineSampleLocationsStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -56383,13 +53292,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsEnable( vk::Bool32 sampleLocationsEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationsEnable = sampleLocationsEnable_;
return *this;
}
- PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsInfo( vk::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
+ PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
@@ -56418,52 +53327,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineSampleLocationsStateCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable = {};
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {};
};
static_assert( sizeof( PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineSampleLocationsStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
{
- struct PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
- {
- protected:
- PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT() VULKAN_HPP_NOEXCEPT
- {}
-
- PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT& operator=( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT;
- void* pNext = nullptr;
- uint32_t requiredSubgroupSize;
- };
- static_assert( sizeof( PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT ) == sizeof( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT : public layout::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
- {
- PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT() VULKAN_HPP_NOEXCEPT
- : layout::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT()
+ PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT( uint32_t requiredSubgroupSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : requiredSubgroupSize( requiredSubgroupSize_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT ) - offsetof( PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT& operator=( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -56489,53 +53381,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT;
+ void* pNext = {};
+ uint32_t requiredSubgroupSize = {};
};
static_assert( sizeof( PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT ) == sizeof( VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineTessellationDomainOriginStateCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( vk::TessellationDomainOrigin domainOrigin_ = vk::TessellationDomainOrigin::eUpperLeft ) VULKAN_HPP_NOEXCEPT
- : domainOrigin( domainOrigin_ )
- {}
-
- PipelineTessellationDomainOriginStateCreateInfo( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(this) = rhs;
- }
-
- PipelineTessellationDomainOriginStateCreateInfo& operator=( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo;
- const void* pNext = nullptr;
- vk::TessellationDomainOrigin domainOrigin;
- };
- static_assert( sizeof( PipelineTessellationDomainOriginStateCreateInfo ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineTessellationDomainOriginStateCreateInfo : public layout::PipelineTessellationDomainOriginStateCreateInfo
+ struct PipelineTessellationDomainOriginStateCreateInfo
{
- VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( vk::TessellationDomainOrigin domainOrigin_ = vk::TessellationDomainOrigin::eUpperLeft ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineTessellationDomainOriginStateCreateInfo( domainOrigin_ )
+ VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft ) VULKAN_HPP_NOEXCEPT
+ : domainOrigin( domainOrigin_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo & operator=( VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo ) - offsetof( PipelineTessellationDomainOriginStateCreateInfo, pNext ) );
+ return *this;
+ }
+
PipelineTessellationDomainOriginStateCreateInfo( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineTessellationDomainOriginStateCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineTessellationDomainOriginStateCreateInfo& operator=( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineTessellationDomainOriginStateCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo const *>(&rhs);
return *this;
}
@@ -56545,7 +53418,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineTessellationDomainOriginStateCreateInfo & setDomainOrigin( vk::TessellationDomainOrigin domainOrigin_ ) VULKAN_HPP_NOEXCEPT
+ PipelineTessellationDomainOriginStateCreateInfo & setDomainOrigin( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ ) VULKAN_HPP_NOEXCEPT
{
domainOrigin = domainOrigin_;
return *this;
@@ -56573,28 +53446,30 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineTessellationDomainOriginStateCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft;
};
static_assert( sizeof( PipelineTessellationDomainOriginStateCreateInfo ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineTessellationDomainOriginStateCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct VertexInputBindingDivisorDescriptionEXT
{
- VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescriptionEXT( uint32_t binding_ = 0,
- uint32_t divisor_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescriptionEXT( uint32_t binding_ = {},
+ uint32_t divisor_ = {} ) VULKAN_HPP_NOEXCEPT
: binding( binding_ )
, divisor( divisor_ )
{}
VertexInputBindingDivisorDescriptionEXT( VkVertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputBindingDivisorDescriptionEXT*>(this) = rhs;
+ *this = rhs;
}
VertexInputBindingDivisorDescriptionEXT& operator=( VkVertexInputBindingDivisorDescriptionEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkVertexInputBindingDivisorDescriptionEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT const *>(&rhs);
return *this;
}
@@ -56632,57 +53507,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t binding;
- uint32_t divisor;
+ uint32_t binding = {};
+ uint32_t divisor = {};
};
static_assert( sizeof( VertexInputBindingDivisorDescriptionEXT ) == sizeof( VkVertexInputBindingDivisorDescriptionEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<VertexInputBindingDivisorDescriptionEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineVertexInputDivisorStateCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfoEXT( uint32_t vertexBindingDivisorCount_ = 0,
- const vk::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : vertexBindingDivisorCount( vertexBindingDivisorCount_ )
- , pVertexBindingDivisors( pVertexBindingDivisors_ )
- {}
-
- PipelineVertexInputDivisorStateCreateInfoEXT( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(this) = rhs;
- }
-
- PipelineVertexInputDivisorStateCreateInfoEXT& operator=( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT;
- const void* pNext = nullptr;
- uint32_t vertexBindingDivisorCount;
- const vk::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors;
- };
- static_assert( sizeof( PipelineVertexInputDivisorStateCreateInfoEXT ) == sizeof( VkPipelineVertexInputDivisorStateCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineVertexInputDivisorStateCreateInfoEXT : public layout::PipelineVertexInputDivisorStateCreateInfoEXT
+ struct PipelineVertexInputDivisorStateCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfoEXT( uint32_t vertexBindingDivisorCount_ = 0,
- const vk::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineVertexInputDivisorStateCreateInfoEXT( vertexBindingDivisorCount_, pVertexBindingDivisors_ )
+ VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfoEXT( uint32_t vertexBindingDivisorCount_ = {},
+ const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ = {} ) VULKAN_HPP_NOEXCEPT
+ : vertexBindingDivisorCount( vertexBindingDivisorCount_ )
+ , pVertexBindingDivisors( pVertexBindingDivisors_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT ) - offsetof( PipelineVertexInputDivisorStateCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
PipelineVertexInputDivisorStateCreateInfoEXT( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineVertexInputDivisorStateCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineVertexInputDivisorStateCreateInfoEXT& operator=( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineVertexInputDivisorStateCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -56698,7 +53550,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineVertexInputDivisorStateCreateInfoEXT & setPVertexBindingDivisors( const vk::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ ) VULKAN_HPP_NOEXCEPT
+ PipelineVertexInputDivisorStateCreateInfoEXT & setPVertexBindingDivisors( const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ ) VULKAN_HPP_NOEXCEPT
{
pVertexBindingDivisors = pVertexBindingDivisors_;
return *this;
@@ -56727,61 +53579,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineVertexInputDivisorStateCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT;
+ const void* pNext = {};
+ uint32_t vertexBindingDivisorCount = {};
+ const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors = {};
};
static_assert( sizeof( PipelineVertexInputDivisorStateCreateInfoEXT ) == sizeof( VkPipelineVertexInputDivisorStateCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineVertexInputDivisorStateCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineViewportCoarseSampleOrderStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( vk::CoarseSampleOrderTypeNV sampleOrderType_ = vk::CoarseSampleOrderTypeNV::eDefault,
- uint32_t customSampleOrderCount_ = 0,
- const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : sampleOrderType( sampleOrderType_ )
- , customSampleOrderCount( customSampleOrderCount_ )
- , pCustomSampleOrders( pCustomSampleOrders_ )
- {}
-
- PipelineViewportCoarseSampleOrderStateCreateInfoNV( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineViewportCoarseSampleOrderStateCreateInfoNV& operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::CoarseSampleOrderTypeNV sampleOrderType;
- uint32_t customSampleOrderCount;
- const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders;
- };
- static_assert( sizeof( PipelineViewportCoarseSampleOrderStateCreateInfoNV ) == sizeof( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportCoarseSampleOrderStateCreateInfoNV : public layout::PipelineViewportCoarseSampleOrderStateCreateInfoNV
+ struct PipelineViewportCoarseSampleOrderStateCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( vk::CoarseSampleOrderTypeNV sampleOrderType_ = vk::CoarseSampleOrderTypeNV::eDefault,
- uint32_t customSampleOrderCount_ = 0,
- const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportCoarseSampleOrderStateCreateInfoNV( sampleOrderType_, customSampleOrderCount_, pCustomSampleOrders_ )
+ VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ = VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV::eDefault,
+ uint32_t customSampleOrderCount_ = {},
+ const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV* pCustomSampleOrders_ = {} ) VULKAN_HPP_NOEXCEPT
+ : sampleOrderType( sampleOrderType_ )
+ , customSampleOrderCount( customSampleOrderCount_ )
+ , pCustomSampleOrders( pCustomSampleOrders_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV ) - offsetof( PipelineViewportCoarseSampleOrderStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineViewportCoarseSampleOrderStateCreateInfoNV( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportCoarseSampleOrderStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportCoarseSampleOrderStateCreateInfoNV& operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportCoarseSampleOrderStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -56791,7 +53621,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportCoarseSampleOrderStateCreateInfoNV & setSampleOrderType( vk::CoarseSampleOrderTypeNV sampleOrderType_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV & setSampleOrderType( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ ) VULKAN_HPP_NOEXCEPT
{
sampleOrderType = sampleOrderType_;
return *this;
@@ -56803,7 +53633,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPCustomSampleOrders( const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPCustomSampleOrders( const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV* pCustomSampleOrders_ ) VULKAN_HPP_NOEXCEPT
{
pCustomSampleOrders = pCustomSampleOrders_;
return *this;
@@ -56833,57 +53663,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportCoarseSampleOrderStateCreateInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PipelineViewportCoarseSampleOrderStateCreateInfoNV ) == sizeof( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportCoarseSampleOrderStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineViewportExclusiveScissorStateCreateInfoNV
{
- struct PipelineViewportExclusiveScissorStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = 0,
- const vk::Rect2D* pExclusiveScissors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : exclusiveScissorCount( exclusiveScissorCount_ )
- , pExclusiveScissors( pExclusiveScissors_ )
- {}
-
- PipelineViewportExclusiveScissorStateCreateInfoNV( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportExclusiveScissorStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineViewportExclusiveScissorStateCreateInfoNV& operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportExclusiveScissorStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV;
- const void* pNext = nullptr;
- uint32_t exclusiveScissorCount;
- const vk::Rect2D* pExclusiveScissors;
- };
- static_assert( sizeof( PipelineViewportExclusiveScissorStateCreateInfoNV ) == sizeof( VkPipelineViewportExclusiveScissorStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportExclusiveScissorStateCreateInfoNV : public layout::PipelineViewportExclusiveScissorStateCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = 0,
- const vk::Rect2D* pExclusiveScissors_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportExclusiveScissorStateCreateInfoNV( exclusiveScissorCount_, pExclusiveScissors_ )
+ VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = {},
+ const VULKAN_HPP_NAMESPACE::Rect2D* pExclusiveScissors_ = {} ) VULKAN_HPP_NOEXCEPT
+ : exclusiveScissorCount( exclusiveScissorCount_ )
+ , pExclusiveScissors( pExclusiveScissors_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV ) - offsetof( PipelineViewportExclusiveScissorStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineViewportExclusiveScissorStateCreateInfoNV( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportExclusiveScissorStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportExclusiveScissorStateCreateInfoNV& operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportExclusiveScissorStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -56899,7 +53710,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportExclusiveScissorStateCreateInfoNV & setPExclusiveScissors( const vk::Rect2D* pExclusiveScissors_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportExclusiveScissorStateCreateInfoNV & setPExclusiveScissors( const VULKAN_HPP_NAMESPACE::Rect2D* pExclusiveScissors_ ) VULKAN_HPP_NOEXCEPT
{
pExclusiveScissors = pExclusiveScissors_;
return *this;
@@ -56928,28 +53739,31 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportExclusiveScissorStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV;
+ const void* pNext = {};
+ uint32_t exclusiveScissorCount = {};
+ const VULKAN_HPP_NAMESPACE::Rect2D* pExclusiveScissors = {};
};
static_assert( sizeof( PipelineViewportExclusiveScissorStateCreateInfoNV ) == sizeof( VkPipelineViewportExclusiveScissorStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportExclusiveScissorStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct ShadingRatePaletteNV
{
- VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( uint32_t shadingRatePaletteEntryCount_ = 0,
- const vk::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( uint32_t shadingRatePaletteEntryCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ = {} ) VULKAN_HPP_NOEXCEPT
: shadingRatePaletteEntryCount( shadingRatePaletteEntryCount_ )
, pShadingRatePaletteEntries( pShadingRatePaletteEntries_ )
{}
ShadingRatePaletteNV( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShadingRatePaletteNV*>(this) = rhs;
+ *this = rhs;
}
ShadingRatePaletteNV& operator=( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShadingRatePaletteNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV const *>(&rhs);
return *this;
}
@@ -56959,7 +53773,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ShadingRatePaletteNV & setPShadingRatePaletteEntries( const vk::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT
+ ShadingRatePaletteNV & setPShadingRatePaletteEntries( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT
{
pShadingRatePaletteEntries = pShadingRatePaletteEntries_;
return *this;
@@ -56987,61 +53801,36 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t shadingRatePaletteEntryCount;
- const vk::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries;
+ uint32_t shadingRatePaletteEntryCount = {};
+ const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV* pShadingRatePaletteEntries = {};
};
static_assert( sizeof( ShadingRatePaletteNV ) == sizeof( VkShadingRatePaletteNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ShadingRatePaletteNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineViewportShadingRateImageStateCreateInfoNV
{
- struct PipelineViewportShadingRateImageStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( vk::Bool32 shadingRateImageEnable_ = 0,
- uint32_t viewportCount_ = 0,
- const vk::ShadingRatePaletteNV* pShadingRatePalettes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : shadingRateImageEnable( shadingRateImageEnable_ )
- , viewportCount( viewportCount_ )
- , pShadingRatePalettes( pShadingRatePalettes_ )
- {}
-
- PipelineViewportShadingRateImageStateCreateInfoNV( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportShadingRateImageStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineViewportShadingRateImageStateCreateInfoNV& operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportShadingRateImageStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::Bool32 shadingRateImageEnable;
- uint32_t viewportCount;
- const vk::ShadingRatePaletteNV* pShadingRatePalettes;
- };
- static_assert( sizeof( PipelineViewportShadingRateImageStateCreateInfoNV ) == sizeof( VkPipelineViewportShadingRateImageStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportShadingRateImageStateCreateInfoNV : public layout::PipelineViewportShadingRateImageStateCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( vk::Bool32 shadingRateImageEnable_ = 0,
- uint32_t viewportCount_ = 0,
- const vk::ShadingRatePaletteNV* pShadingRatePalettes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportShadingRateImageStateCreateInfoNV( shadingRateImageEnable_, viewportCount_, pShadingRatePalettes_ )
+ VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ = {},
+ uint32_t viewportCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV* pShadingRatePalettes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shadingRateImageEnable( shadingRateImageEnable_ )
+ , viewportCount( viewportCount_ )
+ , pShadingRatePalettes( pShadingRatePalettes_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV ) - offsetof( PipelineViewportShadingRateImageStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineViewportShadingRateImageStateCreateInfoNV( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportShadingRateImageStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportShadingRateImageStateCreateInfoNV& operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportShadingRateImageStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -57051,7 +53840,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRateImageEnable( vk::Bool32 shadingRateImageEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRateImageEnable( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ ) VULKAN_HPP_NOEXCEPT
{
shadingRateImageEnable = shadingRateImageEnable_;
return *this;
@@ -57063,7 +53852,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportShadingRateImageStateCreateInfoNV & setPShadingRatePalettes( const vk::ShadingRatePaletteNV* pShadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportShadingRateImageStateCreateInfoNV & setPShadingRatePalettes( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV* pShadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT
{
pShadingRatePalettes = pShadingRatePalettes_;
return *this;
@@ -57093,18 +53882,22 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportShadingRateImageStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable = {};
+ uint32_t viewportCount = {};
+ const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV* pShadingRatePalettes = {};
};
static_assert( sizeof( PipelineViewportShadingRateImageStateCreateInfoNV ) == sizeof( VkPipelineViewportShadingRateImageStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportShadingRateImageStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct ViewportSwizzleNV
{
- VULKAN_HPP_CONSTEXPR ViewportSwizzleNV( vk::ViewportCoordinateSwizzleNV x_ = vk::ViewportCoordinateSwizzleNV::ePositiveX,
- vk::ViewportCoordinateSwizzleNV y_ = vk::ViewportCoordinateSwizzleNV::ePositiveX,
- vk::ViewportCoordinateSwizzleNV z_ = vk::ViewportCoordinateSwizzleNV::ePositiveX,
- vk::ViewportCoordinateSwizzleNV w_ = vk::ViewportCoordinateSwizzleNV::ePositiveX ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -57113,34 +53906,34 @@ namespace VULKAN_HPP_NAMESPACE
ViewportSwizzleNV( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewportSwizzleNV*>(this) = rhs;
+ *this = rhs;
}
ViewportSwizzleNV& operator=( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewportSwizzleNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ViewportSwizzleNV const *>(&rhs);
return *this;
}
- ViewportSwizzleNV & setX( vk::ViewportCoordinateSwizzleNV x_ ) VULKAN_HPP_NOEXCEPT
+ ViewportSwizzleNV & setX( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
return *this;
}
- ViewportSwizzleNV & setY( vk::ViewportCoordinateSwizzleNV y_ ) VULKAN_HPP_NOEXCEPT
+ ViewportSwizzleNV & setY( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y_ ) VULKAN_HPP_NOEXCEPT
{
y = y_;
return *this;
}
- ViewportSwizzleNV & setZ( vk::ViewportCoordinateSwizzleNV z_ ) VULKAN_HPP_NOEXCEPT
+ ViewportSwizzleNV & setZ( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z_ ) VULKAN_HPP_NOEXCEPT
{
z = z_;
return *this;
}
- ViewportSwizzleNV & setW( vk::ViewportCoordinateSwizzleNV w_ ) VULKAN_HPP_NOEXCEPT
+ ViewportSwizzleNV & setW( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w_ ) VULKAN_HPP_NOEXCEPT
{
w = w_;
return *this;
@@ -57170,63 +53963,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ViewportCoordinateSwizzleNV x;
- vk::ViewportCoordinateSwizzleNV y;
- vk::ViewportCoordinateSwizzleNV z;
- vk::ViewportCoordinateSwizzleNV w;
+ 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;
};
static_assert( sizeof( ViewportSwizzleNV ) == sizeof( VkViewportSwizzleNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ViewportSwizzleNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PipelineViewportSwizzleStateCreateInfoNV
{
- struct PipelineViewportSwizzleStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( vk::PipelineViewportSwizzleStateCreateFlagsNV flags_ = vk::PipelineViewportSwizzleStateCreateFlagsNV(),
- uint32_t viewportCount_ = 0,
- const vk::ViewportSwizzleNV* pViewportSwizzles_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , viewportCount( viewportCount_ )
- , pViewportSwizzles( pViewportSwizzles_ )
- {}
-
- PipelineViewportSwizzleStateCreateInfoNV( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineViewportSwizzleStateCreateInfoNV& operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::PipelineViewportSwizzleStateCreateFlagsNV flags;
- uint32_t viewportCount;
- const vk::ViewportSwizzleNV* pViewportSwizzles;
- };
- static_assert( sizeof( PipelineViewportSwizzleStateCreateInfoNV ) == sizeof( VkPipelineViewportSwizzleStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportSwizzleStateCreateInfoNV : public layout::PipelineViewportSwizzleStateCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( vk::PipelineViewportSwizzleStateCreateFlagsNV flags_ = vk::PipelineViewportSwizzleStateCreateFlagsNV(),
- uint32_t viewportCount_ = 0,
- const vk::ViewportSwizzleNV* pViewportSwizzles_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportSwizzleStateCreateInfoNV( flags_, viewportCount_, pViewportSwizzles_ )
+ VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ = {},
+ uint32_t viewportCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV* pViewportSwizzles_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , viewportCount( viewportCount_ )
+ , pViewportSwizzles( pViewportSwizzles_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV ) - offsetof( PipelineViewportSwizzleStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineViewportSwizzleStateCreateInfoNV( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportSwizzleStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportSwizzleStateCreateInfoNV& operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportSwizzleStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -57236,7 +54004,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportSwizzleStateCreateInfoNV & setFlags( vk::PipelineViewportSwizzleStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportSwizzleStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -57248,7 +54016,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportSwizzleStateCreateInfoNV & setPViewportSwizzles( const vk::ViewportSwizzleNV* pViewportSwizzles_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportSwizzleStateCreateInfoNV & setPViewportSwizzles( const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV* pViewportSwizzles_ ) VULKAN_HPP_NOEXCEPT
{
pViewportSwizzles = pViewportSwizzles_;
return *this;
@@ -57278,28 +54046,32 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportSwizzleStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags = {};
+ uint32_t viewportCount = {};
+ const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV* pViewportSwizzles = {};
};
static_assert( sizeof( PipelineViewportSwizzleStateCreateInfoNV ) == sizeof( VkPipelineViewportSwizzleStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportSwizzleStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct ViewportWScalingNV
{
- VULKAN_HPP_CONSTEXPR ViewportWScalingNV( float xcoeff_ = 0,
- float ycoeff_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR ViewportWScalingNV( float xcoeff_ = {},
+ float ycoeff_ = {} ) VULKAN_HPP_NOEXCEPT
: xcoeff( xcoeff_ )
, ycoeff( ycoeff_ )
{}
ViewportWScalingNV( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewportWScalingNV*>(this) = rhs;
+ *this = rhs;
}
ViewportWScalingNV& operator=( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkViewportWScalingNV*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ViewportWScalingNV const *>(&rhs);
return *this;
}
@@ -57337,61 +54109,36 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- float xcoeff;
- float ycoeff;
+ float xcoeff = {};
+ float ycoeff = {};
};
static_assert( sizeof( ViewportWScalingNV ) == sizeof( VkViewportWScalingNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ViewportWScalingNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct PipelineViewportWScalingStateCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( vk::Bool32 viewportWScalingEnable_ = 0,
- uint32_t viewportCount_ = 0,
- const vk::ViewportWScalingNV* pViewportWScalings_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : viewportWScalingEnable( viewportWScalingEnable_ )
- , viewportCount( viewportCount_ )
- , pViewportWScalings( pViewportWScalings_ )
- {}
-
- PipelineViewportWScalingStateCreateInfoNV( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(this) = rhs;
- }
-
- PipelineViewportWScalingStateCreateInfoNV& operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV;
- const void* pNext = nullptr;
- vk::Bool32 viewportWScalingEnable;
- uint32_t viewportCount;
- const vk::ViewportWScalingNV* pViewportWScalings;
- };
- static_assert( sizeof( PipelineViewportWScalingStateCreateInfoNV ) == sizeof( VkPipelineViewportWScalingStateCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct PipelineViewportWScalingStateCreateInfoNV : public layout::PipelineViewportWScalingStateCreateInfoNV
+ struct PipelineViewportWScalingStateCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( vk::Bool32 viewportWScalingEnable_ = 0,
- uint32_t viewportCount_ = 0,
- const vk::ViewportWScalingNV* pViewportWScalings_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportWScalingStateCreateInfoNV( viewportWScalingEnable_, viewportCount_, pViewportWScalings_ )
+ VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ = {},
+ uint32_t viewportCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ViewportWScalingNV* pViewportWScalings_ = {} ) VULKAN_HPP_NOEXCEPT
+ : viewportWScalingEnable( viewportWScalingEnable_ )
+ , viewportCount( viewportCount_ )
+ , pViewportWScalings( pViewportWScalings_ )
{}
+ VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV ) - offsetof( PipelineViewportWScalingStateCreateInfoNV, pNext ) );
+ return *this;
+ }
+
PipelineViewportWScalingStateCreateInfoNV( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PipelineViewportWScalingStateCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
PipelineViewportWScalingStateCreateInfoNV& operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PipelineViewportWScalingStateCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV const *>(&rhs);
return *this;
}
@@ -57401,7 +54148,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportWScalingStateCreateInfoNV & setViewportWScalingEnable( vk::Bool32 viewportWScalingEnable_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportWScalingStateCreateInfoNV & setViewportWScalingEnable( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ ) VULKAN_HPP_NOEXCEPT
{
viewportWScalingEnable = viewportWScalingEnable_;
return *this;
@@ -57413,7 +54160,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PipelineViewportWScalingStateCreateInfoNV & setPViewportWScalings( const vk::ViewportWScalingNV* pViewportWScalings_ ) VULKAN_HPP_NOEXCEPT
+ PipelineViewportWScalingStateCreateInfoNV & setPViewportWScalings( const VULKAN_HPP_NAMESPACE::ViewportWScalingNV* pViewportWScalings_ ) VULKAN_HPP_NOEXCEPT
{
pViewportWScalings = pViewportWScalings_;
return *this;
@@ -57443,55 +54190,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PipelineViewportWScalingStateCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable = {};
+ uint32_t viewportCount = {};
+ const VULKAN_HPP_NAMESPACE::ViewportWScalingNV* pViewportWScalings = {};
};
static_assert( sizeof( PipelineViewportWScalingStateCreateInfoNV ) == sizeof( VkPipelineViewportWScalingStateCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PipelineViewportWScalingStateCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_GGP
- namespace layout
+ struct PresentFrameTokenGGP
{
- struct PresentFrameTokenGGP
- {
- protected:
- VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( GgpFrameToken frameToken_ = 0 ) VULKAN_HPP_NOEXCEPT
- : frameToken( frameToken_ )
- {}
-
- PresentFrameTokenGGP( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentFrameTokenGGP*>(this) = rhs;
- }
-
- PresentFrameTokenGGP& operator=( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentFrameTokenGGP*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePresentFrameTokenGGP;
- const void* pNext = nullptr;
- GgpFrameToken frameToken;
- };
- static_assert( sizeof( PresentFrameTokenGGP ) == sizeof( VkPresentFrameTokenGGP ), "layout struct and wrapper have different size!" );
- }
-
- struct PresentFrameTokenGGP : public layout::PresentFrameTokenGGP
- {
- VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( GgpFrameToken frameToken_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::PresentFrameTokenGGP( frameToken_ )
+ VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( GgpFrameToken frameToken_ = {} ) VULKAN_HPP_NOEXCEPT
+ : frameToken( frameToken_ )
{}
+ VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP & operator=( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP ) - offsetof( PresentFrameTokenGGP, pNext ) );
+ return *this;
+ }
+
PresentFrameTokenGGP( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PresentFrameTokenGGP( rhs )
- {}
+ {
+ *this = rhs;
+ }
PresentFrameTokenGGP& operator=( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PresentFrameTokenGGP::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP const *>(&rhs);
return *this;
}
@@ -57529,74 +54259,45 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PresentFrameTokenGGP::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentFrameTokenGGP;
+ const void* pNext = {};
+ GgpFrameToken frameToken = {};
};
static_assert( sizeof( PresentFrameTokenGGP ) == sizeof( VkPresentFrameTokenGGP ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentFrameTokenGGP>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_GGP*/
- namespace layout
- {
- struct PresentInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PresentInfoKHR( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- uint32_t swapchainCount_ = 0,
- const vk::SwapchainKHR* pSwapchains_ = nullptr,
- const uint32_t* pImageIndices_ = nullptr,
- vk::Result* pResults_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreCount( waitSemaphoreCount_ )
- , pWaitSemaphores( pWaitSemaphores_ )
- , swapchainCount( swapchainCount_ )
- , pSwapchains( pSwapchains_ )
- , pImageIndices( pImageIndices_ )
- , pResults( pResults_ )
- {}
-
- PresentInfoKHR( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentInfoKHR*>(this) = rhs;
- }
-
- PresentInfoKHR& operator=( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePresentInfoKHR;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreCount;
- const vk::Semaphore* pWaitSemaphores;
- uint32_t swapchainCount;
- const vk::SwapchainKHR* pSwapchains;
- const uint32_t* pImageIndices;
- vk::Result* pResults;
- };
- static_assert( sizeof( PresentInfoKHR ) == sizeof( VkPresentInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PresentInfoKHR : public layout::PresentInfoKHR
+ struct PresentInfoKHR
{
- VULKAN_HPP_CONSTEXPR PresentInfoKHR( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- uint32_t swapchainCount_ = 0,
- const vk::SwapchainKHR* pSwapchains_ = nullptr,
- const uint32_t* pImageIndices_ = nullptr,
- vk::Result* pResults_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PresentInfoKHR( waitSemaphoreCount_, pWaitSemaphores_, swapchainCount_, pSwapchains_, pImageIndices_, pResults_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , swapchainCount( swapchainCount_ )
+ , pSwapchains( pSwapchains_ )
+ , pImageIndices( pImageIndices_ )
+ , pResults( pResults_ )
{}
+ VULKAN_HPP_NAMESPACE::PresentInfoKHR & operator=( VULKAN_HPP_NAMESPACE::PresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PresentInfoKHR ) - offsetof( PresentInfoKHR, pNext ) );
+ return *this;
+ }
+
PresentInfoKHR( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PresentInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PresentInfoKHR& operator=( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PresentInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentInfoKHR const *>(&rhs);
return *this;
}
@@ -57612,7 +54313,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentInfoKHR & setPWaitSemaphores( const vk::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ PresentInfoKHR & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pWaitSemaphores = pWaitSemaphores_;
return *this;
@@ -57624,7 +54325,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentInfoKHR & setPSwapchains( const vk::SwapchainKHR* pSwapchains_ ) VULKAN_HPP_NOEXCEPT
+ PresentInfoKHR & setPSwapchains( const VULKAN_HPP_NAMESPACE::SwapchainKHR* pSwapchains_ ) VULKAN_HPP_NOEXCEPT
{
pSwapchains = pSwapchains_;
return *this;
@@ -57636,7 +54337,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentInfoKHR & setPResults( vk::Result* pResults_ ) VULKAN_HPP_NOEXCEPT
+ PresentInfoKHR & setPResults( VULKAN_HPP_NAMESPACE::Result* pResults_ ) VULKAN_HPP_NOEXCEPT
{
pResults = pResults_;
return *this;
@@ -57669,24 +54370,31 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PresentInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( PresentInfoKHR ) == sizeof( VkPresentInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentInfoKHR>::value, "struct wrapper is not a standard layout!" );
struct RectLayerKHR
{
- VULKAN_HPP_CONSTEXPR RectLayerKHR( vk::Offset2D offset_ = vk::Offset2D(),
- vk::Extent2D extent_ = vk::Extent2D(),
- uint32_t layer_ = 0 ) VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
explicit RectLayerKHR( Rect2D const& rect2D,
- uint32_t layer_ = 0 )
+ uint32_t layer_ = {} )
: offset( rect2D.offset )
, extent( rect2D.extent )
, layer( layer_ )
@@ -57694,22 +54402,22 @@ namespace VULKAN_HPP_NAMESPACE
RectLayerKHR( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRectLayerKHR*>(this) = rhs;
+ *this = rhs;
}
RectLayerKHR& operator=( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRectLayerKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RectLayerKHR const *>(&rhs);
return *this;
}
- RectLayerKHR & setOffset( vk::Offset2D offset_ ) VULKAN_HPP_NOEXCEPT
+ RectLayerKHR & setOffset( VULKAN_HPP_NAMESPACE::Offset2D offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
return *this;
}
- RectLayerKHR & setExtent( vk::Extent2D extent_ ) VULKAN_HPP_NOEXCEPT
+ RectLayerKHR & setExtent( VULKAN_HPP_NAMESPACE::Extent2D extent_ ) VULKAN_HPP_NOEXCEPT
{
extent = extent_;
return *this;
@@ -57744,29 +54452,29 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Offset2D offset;
- vk::Extent2D extent;
- uint32_t layer;
+ VULKAN_HPP_NAMESPACE::Offset2D offset = {};
+ VULKAN_HPP_NAMESPACE::Extent2D extent = {};
+ uint32_t layer = {};
};
static_assert( sizeof( RectLayerKHR ) == sizeof( VkRectLayerKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RectLayerKHR>::value, "struct wrapper is not a standard layout!" );
struct PresentRegionKHR
{
- VULKAN_HPP_CONSTEXPR PresentRegionKHR( uint32_t rectangleCount_ = 0,
- const vk::RectLayerKHR* pRectangles_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR PresentRegionKHR( uint32_t rectangleCount_ = {},
+ const VULKAN_HPP_NAMESPACE::RectLayerKHR* pRectangles_ = {} ) VULKAN_HPP_NOEXCEPT
: rectangleCount( rectangleCount_ )
, pRectangles( pRectangles_ )
{}
PresentRegionKHR( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPresentRegionKHR*>(this) = rhs;
+ *this = rhs;
}
PresentRegionKHR& operator=( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPresentRegionKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentRegionKHR const *>(&rhs);
return *this;
}
@@ -57776,7 +54484,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentRegionKHR & setPRectangles( const vk::RectLayerKHR* pRectangles_ ) VULKAN_HPP_NOEXCEPT
+ PresentRegionKHR & setPRectangles( const VULKAN_HPP_NAMESPACE::RectLayerKHR* pRectangles_ ) VULKAN_HPP_NOEXCEPT
{
pRectangles = pRectangles_;
return *this;
@@ -57804,57 +54512,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t rectangleCount;
- const vk::RectLayerKHR* pRectangles;
+ uint32_t rectangleCount = {};
+ const VULKAN_HPP_NAMESPACE::RectLayerKHR* pRectangles = {};
};
static_assert( sizeof( PresentRegionKHR ) == sizeof( VkPresentRegionKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentRegionKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PresentRegionsKHR
{
- struct PresentRegionsKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR PresentRegionsKHR( uint32_t swapchainCount_ = 0,
- const vk::PresentRegionKHR* pRegions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : swapchainCount( swapchainCount_ )
- , pRegions( pRegions_ )
- {}
-
- PresentRegionsKHR( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentRegionsKHR*>(this) = rhs;
- }
-
- PresentRegionsKHR& operator=( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentRegionsKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePresentRegionsKHR;
- const void* pNext = nullptr;
- uint32_t swapchainCount;
- const vk::PresentRegionKHR* pRegions;
- };
- static_assert( sizeof( PresentRegionsKHR ) == sizeof( VkPresentRegionsKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct PresentRegionsKHR : public layout::PresentRegionsKHR
- {
- VULKAN_HPP_CONSTEXPR PresentRegionsKHR( uint32_t swapchainCount_ = 0,
- const vk::PresentRegionKHR* pRegions_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PresentRegionsKHR( swapchainCount_, pRegions_ )
+ VULKAN_HPP_CONSTEXPR PresentRegionsKHR( uint32_t swapchainCount_ = {},
+ const VULKAN_HPP_NAMESPACE::PresentRegionKHR* pRegions_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchainCount( swapchainCount_ )
+ , pRegions( pRegions_ )
{}
+ VULKAN_HPP_NAMESPACE::PresentRegionsKHR & operator=( VULKAN_HPP_NAMESPACE::PresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PresentRegionsKHR ) - offsetof( PresentRegionsKHR, pNext ) );
+ return *this;
+ }
+
PresentRegionsKHR( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PresentRegionsKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
PresentRegionsKHR& operator=( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PresentRegionsKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentRegionsKHR const *>(&rhs);
return *this;
}
@@ -57870,7 +54555,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentRegionsKHR & setPRegions( const vk::PresentRegionKHR* pRegions_ ) VULKAN_HPP_NOEXCEPT
+ PresentRegionsKHR & setPRegions( const VULKAN_HPP_NAMESPACE::PresentRegionKHR* pRegions_ ) VULKAN_HPP_NOEXCEPT
{
pRegions = pRegions_;
return *this;
@@ -57899,28 +54584,31 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PresentRegionsKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentRegionsKHR;
+ const void* pNext = {};
+ uint32_t swapchainCount = {};
+ const VULKAN_HPP_NAMESPACE::PresentRegionKHR* pRegions = {};
};
static_assert( sizeof( PresentRegionsKHR ) == sizeof( VkPresentRegionsKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentRegionsKHR>::value, "struct wrapper is not a standard layout!" );
struct PresentTimeGOOGLE
{
- VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( uint32_t presentID_ = 0,
- uint64_t desiredPresentTime_ = 0 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( uint32_t presentID_ = {},
+ uint64_t desiredPresentTime_ = {} ) VULKAN_HPP_NOEXCEPT
: presentID( presentID_ )
, desiredPresentTime( desiredPresentTime_ )
{}
PresentTimeGOOGLE( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPresentTimeGOOGLE*>(this) = rhs;
+ *this = rhs;
}
PresentTimeGOOGLE& operator=( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkPresentTimeGOOGLE*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE const *>(&rhs);
return *this;
}
@@ -57958,57 +54646,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t presentID;
- uint64_t desiredPresentTime;
+ uint32_t presentID = {};
+ uint64_t desiredPresentTime = {};
};
static_assert( sizeof( PresentTimeGOOGLE ) == sizeof( VkPresentTimeGOOGLE ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentTimeGOOGLE>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct PresentTimesInfoGOOGLE
{
- struct PresentTimesInfoGOOGLE
- {
- protected:
- VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = 0,
- const vk::PresentTimeGOOGLE* pTimes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : swapchainCount( swapchainCount_ )
- , pTimes( pTimes_ )
- {}
-
- PresentTimesInfoGOOGLE( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentTimesInfoGOOGLE*>(this) = rhs;
- }
-
- PresentTimesInfoGOOGLE& operator=( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkPresentTimesInfoGOOGLE*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::ePresentTimesInfoGOOGLE;
- const void* pNext = nullptr;
- uint32_t swapchainCount;
- const vk::PresentTimeGOOGLE* pTimes;
- };
- static_assert( sizeof( PresentTimesInfoGOOGLE ) == sizeof( VkPresentTimesInfoGOOGLE ), "layout struct and wrapper have different size!" );
- }
-
- struct PresentTimesInfoGOOGLE : public layout::PresentTimesInfoGOOGLE
- {
- VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = 0,
- const vk::PresentTimeGOOGLE* pTimes_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::PresentTimesInfoGOOGLE( swapchainCount_, pTimes_ )
+ VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = {},
+ const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE* pTimes_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchainCount( swapchainCount_ )
+ , pTimes( pTimes_ )
{}
+ VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE & operator=( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE ) - offsetof( PresentTimesInfoGOOGLE, pNext ) );
+ return *this;
+ }
+
PresentTimesInfoGOOGLE( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::PresentTimesInfoGOOGLE( rhs )
- {}
+ {
+ *this = rhs;
+ }
PresentTimesInfoGOOGLE& operator=( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::PresentTimesInfoGOOGLE::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE const *>(&rhs);
return *this;
}
@@ -58024,7 +54689,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PresentTimesInfoGOOGLE & setPTimes( const vk::PresentTimeGOOGLE* pTimes_ ) VULKAN_HPP_NOEXCEPT
+ PresentTimesInfoGOOGLE & setPTimes( const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE* pTimes_ ) VULKAN_HPP_NOEXCEPT
{
pTimes = pTimes_;
return *this;
@@ -58053,53 +54718,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::PresentTimesInfoGOOGLE::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentTimesInfoGOOGLE;
+ const void* pNext = {};
+ uint32_t swapchainCount = {};
+ const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE* pTimes = {};
};
static_assert( sizeof( PresentTimesInfoGOOGLE ) == sizeof( VkPresentTimesInfoGOOGLE ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<PresentTimesInfoGOOGLE>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ProtectedSubmitInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( vk::Bool32 protectedSubmit_ = 0 ) VULKAN_HPP_NOEXCEPT
- : protectedSubmit( protectedSubmit_ )
- {}
-
- ProtectedSubmitInfo( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkProtectedSubmitInfo*>(this) = rhs;
- }
-
- ProtectedSubmitInfo& operator=( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkProtectedSubmitInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eProtectedSubmitInfo;
- const void* pNext = nullptr;
- vk::Bool32 protectedSubmit;
- };
- static_assert( sizeof( ProtectedSubmitInfo ) == sizeof( VkProtectedSubmitInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct ProtectedSubmitInfo : public layout::ProtectedSubmitInfo
+ struct ProtectedSubmitInfo
{
- VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( vk::Bool32 protectedSubmit_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::ProtectedSubmitInfo( protectedSubmit_ )
+ VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ = {} ) VULKAN_HPP_NOEXCEPT
+ : protectedSubmit( protectedSubmit_ )
{}
+ VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo & operator=( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo ) - offsetof( ProtectedSubmitInfo, pNext ) );
+ return *this;
+ }
+
ProtectedSubmitInfo( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ProtectedSubmitInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ProtectedSubmitInfo& operator=( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ProtectedSubmitInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo const *>(&rhs);
return *this;
}
@@ -58109,7 +54756,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ProtectedSubmitInfo & setProtectedSubmit( vk::Bool32 protectedSubmit_ ) VULKAN_HPP_NOEXCEPT
+ ProtectedSubmitInfo & setProtectedSubmit( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ ) VULKAN_HPP_NOEXCEPT
{
protectedSubmit = protectedSubmit_;
return *this;
@@ -58137,65 +54784,40 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ProtectedSubmitInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eProtectedSubmitInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit = {};
};
static_assert( sizeof( ProtectedSubmitInfo ) == sizeof( VkProtectedSubmitInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ProtectedSubmitInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct QueryPoolCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( vk::QueryPoolCreateFlags flags_ = vk::QueryPoolCreateFlags(),
- vk::QueryType queryType_ = vk::QueryType::eOcclusion,
- uint32_t queryCount_ = 0,
- vk::QueryPipelineStatisticFlags pipelineStatistics_ = vk::QueryPipelineStatisticFlags() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , queryType( queryType_ )
- , queryCount( queryCount_ )
- , pipelineStatistics( pipelineStatistics_ )
- {}
-
- QueryPoolCreateInfo( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueryPoolCreateInfo*>(this) = rhs;
- }
-
- QueryPoolCreateInfo& operator=( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueryPoolCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eQueryPoolCreateInfo;
- const void* pNext = nullptr;
- vk::QueryPoolCreateFlags flags;
- vk::QueryType queryType;
- uint32_t queryCount;
- vk::QueryPipelineStatisticFlags pipelineStatistics;
- };
- static_assert( sizeof( QueryPoolCreateInfo ) == sizeof( VkQueryPoolCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct QueryPoolCreateInfo : public layout::QueryPoolCreateInfo
+ struct QueryPoolCreateInfo
{
- VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( vk::QueryPoolCreateFlags flags_ = vk::QueryPoolCreateFlags(),
- vk::QueryType queryType_ = vk::QueryType::eOcclusion,
- uint32_t queryCount_ = 0,
- vk::QueryPipelineStatisticFlags pipelineStatistics_ = vk::QueryPipelineStatisticFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::QueryPoolCreateInfo( flags_, queryType_, queryCount_, pipelineStatistics_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , queryType( queryType_ )
+ , queryCount( queryCount_ )
+ , pipelineStatistics( pipelineStatistics_ )
{}
+ VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & operator=( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo ) - offsetof( QueryPoolCreateInfo, pNext ) );
+ return *this;
+ }
+
QueryPoolCreateInfo( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::QueryPoolCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
QueryPoolCreateInfo& operator=( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::QueryPoolCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const *>(&rhs);
return *this;
}
@@ -58205,13 +54827,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- QueryPoolCreateInfo & setFlags( vk::QueryPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ QueryPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- QueryPoolCreateInfo & setQueryType( vk::QueryType queryType_ ) VULKAN_HPP_NOEXCEPT
+ QueryPoolCreateInfo & setQueryType( VULKAN_HPP_NAMESPACE::QueryType queryType_ ) VULKAN_HPP_NOEXCEPT
{
queryType = queryType_;
return *this;
@@ -58223,7 +54845,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- QueryPoolCreateInfo & setPipelineStatistics( vk::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT
+ QueryPoolCreateInfo & setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT
{
pipelineStatistics = pipelineStatistics_;
return *this;
@@ -58254,53 +54876,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::QueryPoolCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( QueryPoolCreateInfo ) == sizeof( VkQueryPoolCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<QueryPoolCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct QueryPoolCreateInfoINTEL
- {
- protected:
- VULKAN_HPP_CONSTEXPR QueryPoolCreateInfoINTEL( vk::QueryPoolSamplingModeINTEL performanceCountersSampling_ = vk::QueryPoolSamplingModeINTEL::eManual ) VULKAN_HPP_NOEXCEPT
- : performanceCountersSampling( performanceCountersSampling_ )
- {}
-
- QueryPoolCreateInfoINTEL( VkQueryPoolCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueryPoolCreateInfoINTEL*>(this) = rhs;
- }
-
- QueryPoolCreateInfoINTEL& operator=( VkQueryPoolCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueryPoolCreateInfoINTEL*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eQueryPoolCreateInfoINTEL;
- const void* pNext = nullptr;
- vk::QueryPoolSamplingModeINTEL performanceCountersSampling;
- };
- static_assert( sizeof( QueryPoolCreateInfoINTEL ) == sizeof( VkQueryPoolCreateInfoINTEL ), "layout struct and wrapper have different size!" );
- }
-
- struct QueryPoolCreateInfoINTEL : public layout::QueryPoolCreateInfoINTEL
+ struct QueryPoolCreateInfoINTEL
{
- VULKAN_HPP_CONSTEXPR QueryPoolCreateInfoINTEL( vk::QueryPoolSamplingModeINTEL performanceCountersSampling_ = vk::QueryPoolSamplingModeINTEL::eManual ) VULKAN_HPP_NOEXCEPT
- : layout::QueryPoolCreateInfoINTEL( performanceCountersSampling_ )
+ VULKAN_HPP_CONSTEXPR QueryPoolCreateInfoINTEL( VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual ) VULKAN_HPP_NOEXCEPT
+ : performanceCountersSampling( performanceCountersSampling_ )
{}
+ VULKAN_HPP_NAMESPACE::QueryPoolCreateInfoINTEL & operator=( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfoINTEL ) - offsetof( QueryPoolCreateInfoINTEL, pNext ) );
+ return *this;
+ }
+
QueryPoolCreateInfoINTEL( VkQueryPoolCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::QueryPoolCreateInfoINTEL( rhs )
- {}
+ {
+ *this = rhs;
+ }
QueryPoolCreateInfoINTEL& operator=( VkQueryPoolCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::QueryPoolCreateInfoINTEL::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueryPoolCreateInfoINTEL const *>(&rhs);
return *this;
}
@@ -58310,7 +54916,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- QueryPoolCreateInfoINTEL & setPerformanceCountersSampling( vk::QueryPoolSamplingModeINTEL performanceCountersSampling_ ) VULKAN_HPP_NOEXCEPT
+ QueryPoolCreateInfoINTEL & setPerformanceCountersSampling( VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ ) VULKAN_HPP_NOEXCEPT
{
performanceCountersSampling = performanceCountersSampling_;
return *this;
@@ -58338,52 +54944,119 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::QueryPoolCreateInfoINTEL::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolCreateInfoINTEL;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual;
};
static_assert( sizeof( QueryPoolCreateInfoINTEL ) == sizeof( VkQueryPoolCreateInfoINTEL ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<QueryPoolCreateInfoINTEL>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct QueryPoolPerformanceCreateInfoKHR
{
- struct QueueFamilyCheckpointPropertiesNV
+ VULKAN_HPP_CONSTEXPR QueryPoolPerformanceCreateInfoKHR( uint32_t queueFamilyIndex_ = {},
+ uint32_t counterIndexCount_ = {},
+ const uint32_t* pCounterIndices_ = {} ) VULKAN_HPP_NOEXCEPT
+ : queueFamilyIndex( queueFamilyIndex_ )
+ , counterIndexCount( counterIndexCount_ )
+ , pCounterIndices( pCounterIndices_ )
+ {}
+
+ VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- QueueFamilyCheckpointPropertiesNV() VULKAN_HPP_NOEXCEPT
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR ) - offsetof( QueryPoolPerformanceCreateInfoKHR, pNext ) );
+ return *this;
+ }
- QueueFamilyCheckpointPropertiesNV( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(this) = rhs;
- }
+ QueryPoolPerformanceCreateInfoKHR( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- QueueFamilyCheckpointPropertiesNV& operator=( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(this) = rhs;
- return *this;
- }
+ QueryPoolPerformanceCreateInfoKHR& operator=( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR const *>(&rhs);
+ return *this;
+ }
- public:
- vk::StructureType sType = StructureType::eQueueFamilyCheckpointPropertiesNV;
- void* pNext = nullptr;
- vk::PipelineStageFlags checkpointExecutionStageMask;
- };
- static_assert( sizeof( QueueFamilyCheckpointPropertiesNV ) == sizeof( VkQueueFamilyCheckpointPropertiesNV ), "layout struct and wrapper have different size!" );
- }
+ QueryPoolPerformanceCreateInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ QueryPoolPerformanceCreateInfoKHR & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT
+ {
+ queueFamilyIndex = queueFamilyIndex_;
+ return *this;
+ }
- struct QueueFamilyCheckpointPropertiesNV : public layout::QueueFamilyCheckpointPropertiesNV
+ QueryPoolPerformanceCreateInfoKHR & setCounterIndexCount( uint32_t counterIndexCount_ ) VULKAN_HPP_NOEXCEPT
+ {
+ counterIndexCount = counterIndexCount_;
+ return *this;
+ }
+
+ QueryPoolPerformanceCreateInfoKHR & setPCounterIndices( const uint32_t* pCounterIndices_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pCounterIndices = pCounterIndices_;
+ return *this;
+ }
+
+ operator VkQueryPoolPerformanceCreateInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkQueryPoolPerformanceCreateInfoKHR*>( this );
+ }
+
+ operator VkQueryPoolPerformanceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkQueryPoolPerformanceCreateInfoKHR*>( this );
+ }
+
+ bool operator==( QueryPoolPerformanceCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( queueFamilyIndex == rhs.queueFamilyIndex )
+ && ( counterIndexCount == rhs.counterIndexCount )
+ && ( pCounterIndices == rhs.pCounterIndices );
+ }
+
+ bool operator!=( QueryPoolPerformanceCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolPerformanceCreateInfoKHR;
+ const void* pNext = {};
+ uint32_t queueFamilyIndex = {};
+ uint32_t counterIndexCount = {};
+ const uint32_t* pCounterIndices = {};
+ };
+ static_assert( sizeof( QueryPoolPerformanceCreateInfoKHR ) == sizeof( VkQueryPoolPerformanceCreateInfoKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<QueryPoolPerformanceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
+
+ struct QueueFamilyCheckpointPropertiesNV
{
- QueueFamilyCheckpointPropertiesNV() VULKAN_HPP_NOEXCEPT
- : layout::QueueFamilyCheckpointPropertiesNV()
+ QueueFamilyCheckpointPropertiesNV( VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask_ = {} ) VULKAN_HPP_NOEXCEPT
+ : checkpointExecutionStageMask( checkpointExecutionStageMask_ )
{}
+ VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV & operator=( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV ) - offsetof( QueueFamilyCheckpointPropertiesNV, pNext ) );
+ return *this;
+ }
+
QueueFamilyCheckpointPropertiesNV( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::QueueFamilyCheckpointPropertiesNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
QueueFamilyCheckpointPropertiesNV& operator=( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::QueueFamilyCheckpointPropertiesNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV const *>(&rhs);
return *this;
}
@@ -58409,25 +55082,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::QueueFamilyCheckpointPropertiesNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointPropertiesNV;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask = {};
};
static_assert( sizeof( QueueFamilyCheckpointPropertiesNV ) == sizeof( VkQueueFamilyCheckpointPropertiesNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<QueueFamilyCheckpointPropertiesNV>::value, "struct wrapper is not a standard layout!" );
struct QueueFamilyProperties
{
- QueueFamilyProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
QueueFamilyProperties( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkQueueFamilyProperties*>(this) = rhs;
+ *this = rhs;
}
QueueFamilyProperties& operator=( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkQueueFamilyProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueueFamilyProperties const *>(&rhs);
return *this;
}
@@ -58455,54 +55137,34 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::QueueFlags queueFlags;
- uint32_t queueCount;
- uint32_t timestampValidBits;
- vk::Extent3D minImageTransferGranularity;
+ VULKAN_HPP_NAMESPACE::QueueFlags queueFlags = {};
+ uint32_t queueCount = {};
+ uint32_t timestampValidBits = {};
+ VULKAN_HPP_NAMESPACE::Extent3D minImageTransferGranularity = {};
};
static_assert( sizeof( QueueFamilyProperties ) == sizeof( VkQueueFamilyProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<QueueFamilyProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct QueueFamilyProperties2
{
- struct QueueFamilyProperties2
- {
- protected:
- QueueFamilyProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- QueueFamilyProperties2( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueueFamilyProperties2*>(this) = rhs;
- }
-
- QueueFamilyProperties2& operator=( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkQueueFamilyProperties2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eQueueFamilyProperties2;
- void* pNext = nullptr;
- vk::QueueFamilyProperties queueFamilyProperties;
- };
- static_assert( sizeof( QueueFamilyProperties2 ) == sizeof( VkQueueFamilyProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct QueueFamilyProperties2 : public layout::QueueFamilyProperties2
- {
- QueueFamilyProperties2() VULKAN_HPP_NOEXCEPT
- : layout::QueueFamilyProperties2()
+ QueueFamilyProperties2( VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : queueFamilyProperties( queueFamilyProperties_ )
{}
+ VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 & operator=( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 ) - offsetof( QueueFamilyProperties2, pNext ) );
+ return *this;
+ }
+
QueueFamilyProperties2( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::QueueFamilyProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
QueueFamilyProperties2& operator=( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::QueueFamilyProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 const *>(&rhs);
return *this;
}
@@ -58528,69 +55190,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::QueueFamilyProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties = {};
};
static_assert( sizeof( QueueFamilyProperties2 ) == sizeof( VkQueueFamilyProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<QueueFamilyProperties2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RayTracingShaderGroupCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( vk::RayTracingShaderGroupTypeNV type_ = vk::RayTracingShaderGroupTypeNV::eGeneral,
- uint32_t generalShader_ = 0,
- uint32_t closestHitShader_ = 0,
- uint32_t anyHitShader_ = 0,
- uint32_t intersectionShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : type( type_ )
- , generalShader( generalShader_ )
- , closestHitShader( closestHitShader_ )
- , anyHitShader( anyHitShader_ )
- , intersectionShader( intersectionShader_ )
- {}
-
- RayTracingShaderGroupCreateInfoNV( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRayTracingShaderGroupCreateInfoNV*>(this) = rhs;
- }
-
- RayTracingShaderGroupCreateInfoNV& operator=( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRayTracingShaderGroupCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoNV;
- const void* pNext = nullptr;
- vk::RayTracingShaderGroupTypeNV type;
- uint32_t generalShader;
- uint32_t closestHitShader;
- uint32_t anyHitShader;
- uint32_t intersectionShader;
- };
- static_assert( sizeof( RayTracingShaderGroupCreateInfoNV ) == sizeof( VkRayTracingShaderGroupCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct RayTracingShaderGroupCreateInfoNV : public layout::RayTracingShaderGroupCreateInfoNV
+ struct RayTracingShaderGroupCreateInfoNV
{
- VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( vk::RayTracingShaderGroupTypeNV type_ = vk::RayTracingShaderGroupTypeNV::eGeneral,
- uint32_t generalShader_ = 0,
- uint32_t closestHitShader_ = 0,
- uint32_t anyHitShader_ = 0,
- uint32_t intersectionShader_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::RayTracingShaderGroupCreateInfoNV( type_, generalShader_, closestHitShader_, anyHitShader_, intersectionShader_ )
+ VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeNV type_ = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeNV::eGeneral,
+ uint32_t generalShader_ = {},
+ uint32_t closestHitShader_ = {},
+ uint32_t anyHitShader_ = {},
+ uint32_t intersectionShader_ = {} ) VULKAN_HPP_NOEXCEPT
+ : type( type_ )
+ , generalShader( generalShader_ )
+ , closestHitShader( closestHitShader_ )
+ , anyHitShader( anyHitShader_ )
+ , intersectionShader( intersectionShader_ )
{}
+ VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV ) - offsetof( RayTracingShaderGroupCreateInfoNV, pNext ) );
+ return *this;
+ }
+
RayTracingShaderGroupCreateInfoNV( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RayTracingShaderGroupCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
RayTracingShaderGroupCreateInfoNV& operator=( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RayTracingShaderGroupCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV const *>(&rhs);
return *this;
}
@@ -58600,7 +55235,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RayTracingShaderGroupCreateInfoNV & setType( vk::RayTracingShaderGroupTypeNV type_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingShaderGroupCreateInfoNV & setType( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeNV type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
return *this;
@@ -58656,85 +55291,54 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RayTracingShaderGroupCreateInfoNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoNV;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeNV type = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeNV::eGeneral;
+ uint32_t generalShader = {};
+ uint32_t closestHitShader = {};
+ uint32_t anyHitShader = {};
+ uint32_t intersectionShader = {};
};
static_assert( sizeof( RayTracingShaderGroupCreateInfoNV ) == sizeof( VkRayTracingShaderGroupCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RayTracingShaderGroupCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RayTracingPipelineCreateInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- uint32_t stageCount_ = 0,
- const vk::PipelineShaderStageCreateInfo* pStages_ = nullptr,
- uint32_t groupCount_ = 0,
- const vk::RayTracingShaderGroupCreateInfoNV* pGroups_ = nullptr,
- uint32_t maxRecursionDepth_ = 0,
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , stageCount( stageCount_ )
- , pStages( pStages_ )
- , groupCount( groupCount_ )
- , pGroups( pGroups_ )
- , maxRecursionDepth( maxRecursionDepth_ )
- , layout( layout_ )
- , basePipelineHandle( basePipelineHandle_ )
- , basePipelineIndex( basePipelineIndex_ )
- {}
-
- RayTracingPipelineCreateInfoNV( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRayTracingPipelineCreateInfoNV*>(this) = rhs;
- }
-
- RayTracingPipelineCreateInfoNV& operator=( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRayTracingPipelineCreateInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRayTracingPipelineCreateInfoNV;
- const void* pNext = nullptr;
- vk::PipelineCreateFlags flags;
- uint32_t stageCount;
- const vk::PipelineShaderStageCreateInfo* pStages;
- uint32_t groupCount;
- const vk::RayTracingShaderGroupCreateInfoNV* pGroups;
- uint32_t maxRecursionDepth;
- vk::PipelineLayout layout;
- vk::Pipeline basePipelineHandle;
- int32_t basePipelineIndex;
- };
- static_assert( sizeof( RayTracingPipelineCreateInfoNV ) == sizeof( VkRayTracingPipelineCreateInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct RayTracingPipelineCreateInfoNV : public layout::RayTracingPipelineCreateInfoNV
- {
- VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( vk::PipelineCreateFlags flags_ = vk::PipelineCreateFlags(),
- uint32_t stageCount_ = 0,
- const vk::PipelineShaderStageCreateInfo* pStages_ = nullptr,
- uint32_t groupCount_ = 0,
- const vk::RayTracingShaderGroupCreateInfoNV* pGroups_ = nullptr,
- uint32_t maxRecursionDepth_ = 0,
- vk::PipelineLayout layout_ = vk::PipelineLayout(),
- vk::Pipeline basePipelineHandle_ = vk::Pipeline(),
- int32_t basePipelineIndex_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::RayTracingPipelineCreateInfoNV( flags_, stageCount_, pStages_, groupCount_, pGroups_, maxRecursionDepth_, layout_, basePipelineHandle_, basePipelineIndex_ )
+ struct RayTracingPipelineCreateInfoNV
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , stageCount( stageCount_ )
+ , pStages( pStages_ )
+ , groupCount( groupCount_ )
+ , pGroups( pGroups_ )
+ , maxRecursionDepth( maxRecursionDepth_ )
+ , layout( layout_ )
+ , basePipelineHandle( basePipelineHandle_ )
+ , basePipelineIndex( basePipelineIndex_ )
{}
+ VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & operator=( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV ) - offsetof( RayTracingPipelineCreateInfoNV, pNext ) );
+ return *this;
+ }
+
RayTracingPipelineCreateInfoNV( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RayTracingPipelineCreateInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
RayTracingPipelineCreateInfoNV& operator=( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RayTracingPipelineCreateInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const *>(&rhs);
return *this;
}
@@ -58744,7 +55348,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RayTracingPipelineCreateInfoNV & setFlags( vk::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingPipelineCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -58756,7 +55360,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RayTracingPipelineCreateInfoNV & setPStages( const vk::PipelineShaderStageCreateInfo* pStages_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingPipelineCreateInfoNV & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo* pStages_ ) VULKAN_HPP_NOEXCEPT
{
pStages = pStages_;
return *this;
@@ -58768,7 +55372,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RayTracingPipelineCreateInfoNV & setPGroups( const vk::RayTracingShaderGroupCreateInfoNV* pGroups_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingPipelineCreateInfoNV & setPGroups( const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV* pGroups_ ) VULKAN_HPP_NOEXCEPT
{
pGroups = pGroups_;
return *this;
@@ -58780,13 +55384,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RayTracingPipelineCreateInfoNV & setLayout( vk::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingPipelineCreateInfoNV & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT
{
layout = layout_;
return *this;
}
- RayTracingPipelineCreateInfoNV & setBasePipelineHandle( vk::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
+ RayTracingPipelineCreateInfoNV & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT
{
basePipelineHandle = basePipelineHandle_;
return *this;
@@ -58828,25 +55432,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RayTracingPipelineCreateInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( RayTracingPipelineCreateInfoNV ) == sizeof( VkRayTracingPipelineCreateInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RayTracingPipelineCreateInfoNV>::value, "struct wrapper is not a standard layout!" );
struct RefreshCycleDurationGOOGLE
{
- RefreshCycleDurationGOOGLE() VULKAN_HPP_NOEXCEPT
+ RefreshCycleDurationGOOGLE( uint64_t refreshDuration_ = {} ) VULKAN_HPP_NOEXCEPT
+ : refreshDuration( refreshDuration_ )
{}
RefreshCycleDurationGOOGLE( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRefreshCycleDurationGOOGLE*>(this) = rhs;
+ *this = rhs;
}
RefreshCycleDurationGOOGLE& operator=( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkRefreshCycleDurationGOOGLE*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE const *>(&rhs);
return *this;
}
@@ -58871,88 +55486,65 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint64_t refreshDuration;
+ uint64_t refreshDuration = {};
};
static_assert( sizeof( RefreshCycleDurationGOOGLE ) == sizeof( VkRefreshCycleDurationGOOGLE ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RefreshCycleDurationGOOGLE>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RenderPassAttachmentBeginInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfoKHR( uint32_t attachmentCount_ = 0,
- const vk::ImageView* pAttachments_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : attachmentCount( attachmentCount_ )
- , pAttachments( pAttachments_ )
- {}
-
- RenderPassAttachmentBeginInfoKHR( VkRenderPassAttachmentBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassAttachmentBeginInfoKHR*>(this) = rhs;
- }
-
- RenderPassAttachmentBeginInfoKHR& operator=( VkRenderPassAttachmentBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassAttachmentBeginInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassAttachmentBeginInfoKHR;
- const void* pNext = nullptr;
- uint32_t attachmentCount;
- const vk::ImageView* pAttachments;
- };
- static_assert( sizeof( RenderPassAttachmentBeginInfoKHR ) == sizeof( VkRenderPassAttachmentBeginInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassAttachmentBeginInfoKHR : public layout::RenderPassAttachmentBeginInfoKHR
+ struct RenderPassAttachmentBeginInfo
{
- VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfoKHR( uint32_t attachmentCount_ = 0,
- const vk::ImageView* pAttachments_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassAttachmentBeginInfoKHR( attachmentCount_, pAttachments_ )
+ VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfo( uint32_t attachmentCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ImageView* pAttachments_ = {} ) VULKAN_HPP_NOEXCEPT
+ : attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
{}
- RenderPassAttachmentBeginInfoKHR( VkRenderPassAttachmentBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassAttachmentBeginInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo & operator=( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo ) - offsetof( RenderPassAttachmentBeginInfo, pNext ) );
+ return *this;
+ }
- RenderPassAttachmentBeginInfoKHR& operator=( VkRenderPassAttachmentBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ RenderPassAttachmentBeginInfo( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassAttachmentBeginInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ RenderPassAttachmentBeginInfo& operator=( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo const *>(&rhs);
return *this;
}
- RenderPassAttachmentBeginInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassAttachmentBeginInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- RenderPassAttachmentBeginInfoKHR & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassAttachmentBeginInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
attachmentCount = attachmentCount_;
return *this;
}
- RenderPassAttachmentBeginInfoKHR & setPAttachments( const vk::ImageView* pAttachments_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassAttachmentBeginInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView* pAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pAttachments = pAttachments_;
return *this;
}
- operator VkRenderPassAttachmentBeginInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkRenderPassAttachmentBeginInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkRenderPassAttachmentBeginInfoKHR*>( this );
+ return *reinterpret_cast<const VkRenderPassAttachmentBeginInfo*>( this );
}
- operator VkRenderPassAttachmentBeginInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkRenderPassAttachmentBeginInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkRenderPassAttachmentBeginInfoKHR*>( this );
+ return *reinterpret_cast<VkRenderPassAttachmentBeginInfo*>( this );
}
- bool operator==( RenderPassAttachmentBeginInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( RenderPassAttachmentBeginInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -58960,74 +55552,48 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pAttachments == rhs.pAttachments );
}
- bool operator!=( RenderPassAttachmentBeginInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( RenderPassAttachmentBeginInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::RenderPassAttachmentBeginInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassAttachmentBeginInfo;
+ const void* pNext = {};
+ uint32_t attachmentCount = {};
+ const VULKAN_HPP_NAMESPACE::ImageView* pAttachments = {};
};
- static_assert( sizeof( RenderPassAttachmentBeginInfoKHR ) == sizeof( VkRenderPassAttachmentBeginInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<RenderPassAttachmentBeginInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct RenderPassBeginInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassBeginInfo( vk::RenderPass renderPass_ = vk::RenderPass(),
- vk::Framebuffer framebuffer_ = vk::Framebuffer(),
- vk::Rect2D renderArea_ = vk::Rect2D(),
- uint32_t clearValueCount_ = 0,
- const vk::ClearValue* pClearValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : renderPass( renderPass_ )
- , framebuffer( framebuffer_ )
- , renderArea( renderArea_ )
- , clearValueCount( clearValueCount_ )
- , pClearValues( pClearValues_ )
- {}
-
- RenderPassBeginInfo( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassBeginInfo*>(this) = rhs;
- }
-
- RenderPassBeginInfo& operator=( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassBeginInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassBeginInfo;
- const void* pNext = nullptr;
- vk::RenderPass renderPass;
- vk::Framebuffer framebuffer;
- vk::Rect2D renderArea;
- uint32_t clearValueCount;
- const vk::ClearValue* pClearValues;
- };
- static_assert( sizeof( RenderPassBeginInfo ) == sizeof( VkRenderPassBeginInfo ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( RenderPassAttachmentBeginInfo ) == sizeof( VkRenderPassAttachmentBeginInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<RenderPassAttachmentBeginInfo>::value, "struct wrapper is not a standard layout!" );
- struct RenderPassBeginInfo : public layout::RenderPassBeginInfo
+ struct RenderPassBeginInfo
{
- VULKAN_HPP_CONSTEXPR RenderPassBeginInfo( vk::RenderPass renderPass_ = vk::RenderPass(),
- vk::Framebuffer framebuffer_ = vk::Framebuffer(),
- vk::Rect2D renderArea_ = vk::Rect2D(),
- uint32_t clearValueCount_ = 0,
- const vk::ClearValue* pClearValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassBeginInfo( renderPass_, framebuffer_, renderArea_, clearValueCount_, pClearValues_ )
+ VULKAN_HPP_CONSTEXPR 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : renderPass( renderPass_ )
+ , framebuffer( framebuffer_ )
+ , renderArea( renderArea_ )
+ , clearValueCount( clearValueCount_ )
+ , pClearValues( pClearValues_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & operator=( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo ) - offsetof( RenderPassBeginInfo, pNext ) );
+ return *this;
+ }
+
RenderPassBeginInfo( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassBeginInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassBeginInfo& operator=( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassBeginInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassBeginInfo const *>(&rhs);
return *this;
}
@@ -59037,19 +55603,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassBeginInfo & setRenderPass( vk::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassBeginInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT
{
renderPass = renderPass_;
return *this;
}
- RenderPassBeginInfo & setFramebuffer( vk::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassBeginInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT
{
framebuffer = framebuffer_;
return *this;
}
- RenderPassBeginInfo & setRenderArea( vk::Rect2D renderArea_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassBeginInfo & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D renderArea_ ) VULKAN_HPP_NOEXCEPT
{
renderArea = renderArea_;
return *this;
@@ -59061,7 +55627,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassBeginInfo & setPClearValues( const vk::ClearValue* pClearValues_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassBeginInfo & setPClearValues( const VULKAN_HPP_NAMESPACE::ClearValue* pClearValues_ ) VULKAN_HPP_NOEXCEPT
{
pClearValues = pClearValues_;
return *this;
@@ -59093,24 +55659,30 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassBeginInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( RenderPassBeginInfo ) == sizeof( VkRenderPassBeginInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassBeginInfo>::value, "struct wrapper is not a standard layout!" );
struct SubpassDescription
{
- VULKAN_HPP_CONSTEXPR SubpassDescription( vk::SubpassDescriptionFlags flags_ = vk::SubpassDescriptionFlags(),
- vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- uint32_t inputAttachmentCount_ = 0,
- const vk::AttachmentReference* pInputAttachments_ = nullptr,
- uint32_t colorAttachmentCount_ = 0,
- const vk::AttachmentReference* pColorAttachments_ = nullptr,
- const vk::AttachmentReference* pResolveAttachments_ = nullptr,
- const vk::AttachmentReference* pDepthStencilAttachment_ = nullptr,
- uint32_t preserveAttachmentCount_ = 0,
- const uint32_t* pPreserveAttachments_ = nullptr ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -59125,22 +55697,22 @@ namespace VULKAN_HPP_NAMESPACE
SubpassDescription( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassDescription*>(this) = rhs;
+ *this = rhs;
}
SubpassDescription& operator=( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassDescription*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassDescription const *>(&rhs);
return *this;
}
- SubpassDescription & setFlags( vk::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- SubpassDescription & setPipelineBindPoint( vk::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
{
pipelineBindPoint = pipelineBindPoint_;
return *this;
@@ -59152,7 +55724,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubpassDescription & setPInputAttachments( const vk::AttachmentReference* pInputAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference* pInputAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pInputAttachments = pInputAttachments_;
return *this;
@@ -59164,19 +55736,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubpassDescription & setPColorAttachments( const vk::AttachmentReference* pColorAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference* pColorAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pColorAttachments = pColorAttachments_;
return *this;
}
- SubpassDescription & setPResolveAttachments( const vk::AttachmentReference* pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference* pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pResolveAttachments = pResolveAttachments_;
return *this;
}
- SubpassDescription & setPDepthStencilAttachment( const vk::AttachmentReference* pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription & setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference* pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
{
pDepthStencilAttachment = pDepthStencilAttachment_;
return *this;
@@ -59224,29 +55796,29 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::SubpassDescriptionFlags flags;
- vk::PipelineBindPoint pipelineBindPoint;
- uint32_t inputAttachmentCount;
- const vk::AttachmentReference* pInputAttachments;
- uint32_t colorAttachmentCount;
- const vk::AttachmentReference* pColorAttachments;
- const vk::AttachmentReference* pResolveAttachments;
- const vk::AttachmentReference* pDepthStencilAttachment;
- uint32_t preserveAttachmentCount;
- const uint32_t* pPreserveAttachments;
+ 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 = {};
};
static_assert( sizeof( SubpassDescription ) == sizeof( VkSubpassDescription ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SubpassDescription>::value, "struct wrapper is not a standard layout!" );
struct SubpassDependency
{
- VULKAN_HPP_CONSTEXPR SubpassDependency( uint32_t srcSubpass_ = 0,
- uint32_t dstSubpass_ = 0,
- vk::PipelineStageFlags srcStageMask_ = vk::PipelineStageFlags(),
- vk::PipelineStageFlags dstStageMask_ = vk::PipelineStageFlags(),
- vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- vk::DependencyFlags dependencyFlags_ = vk::DependencyFlags() ) VULKAN_HPP_NOEXCEPT
+ 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_ )
@@ -59258,12 +55830,12 @@ namespace VULKAN_HPP_NAMESPACE
SubpassDependency( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassDependency*>(this) = rhs;
+ *this = rhs;
}
SubpassDependency& operator=( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassDependency*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassDependency const *>(&rhs);
return *this;
}
@@ -59279,31 +55851,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubpassDependency & setSrcStageMask( vk::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT
{
srcStageMask = srcStageMask_;
return *this;
}
- SubpassDependency & setDstStageMask( vk::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT
{
dstStageMask = dstStageMask_;
return *this;
}
- SubpassDependency & setSrcAccessMask( vk::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
srcAccessMask = srcAccessMask_;
return *this;
}
- SubpassDependency & setDstAccessMask( vk::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
dstAccessMask = dstAccessMask_;
return *this;
}
- SubpassDependency & setDependencyFlags( vk::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT
{
dependencyFlags = dependencyFlags_;
return *this;
@@ -59336,82 +55908,49 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t srcSubpass;
- uint32_t dstSubpass;
- vk::PipelineStageFlags srcStageMask;
- vk::PipelineStageFlags dstStageMask;
- vk::AccessFlags srcAccessMask;
- vk::AccessFlags dstAccessMask;
- vk::DependencyFlags dependencyFlags;
+ 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 = {};
};
static_assert( sizeof( SubpassDependency ) == sizeof( VkSubpassDependency ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SubpassDependency>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RenderPassCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( vk::RenderPassCreateFlags flags_ = vk::RenderPassCreateFlags(),
- uint32_t attachmentCount_ = 0,
- const vk::AttachmentDescription* pAttachments_ = nullptr,
- uint32_t subpassCount_ = 0,
- const vk::SubpassDescription* pSubpasses_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const vk::SubpassDependency* pDependencies_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , attachmentCount( attachmentCount_ )
- , pAttachments( pAttachments_ )
- , subpassCount( subpassCount_ )
- , pSubpasses( pSubpasses_ )
- , dependencyCount( dependencyCount_ )
- , pDependencies( pDependencies_ )
- {}
-
- RenderPassCreateInfo( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassCreateInfo*>(this) = rhs;
- }
-
- RenderPassCreateInfo& operator=( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassCreateInfo;
- const void* pNext = nullptr;
- vk::RenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const vk::AttachmentDescription* pAttachments;
- uint32_t subpassCount;
- const vk::SubpassDescription* pSubpasses;
- uint32_t dependencyCount;
- const vk::SubpassDependency* pDependencies;
- };
- static_assert( sizeof( RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassCreateInfo : public layout::RenderPassCreateInfo
+ struct RenderPassCreateInfo
{
- VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( vk::RenderPassCreateFlags flags_ = vk::RenderPassCreateFlags(),
- uint32_t attachmentCount_ = 0,
- const vk::AttachmentDescription* pAttachments_ = nullptr,
- uint32_t subpassCount_ = 0,
- const vk::SubpassDescription* pSubpasses_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const vk::SubpassDependency* pDependencies_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassCreateInfo( flags_, attachmentCount_, pAttachments_, subpassCount_, pSubpasses_, dependencyCount_, pDependencies_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , subpassCount( subpassCount_ )
+ , pSubpasses( pSubpasses_ )
+ , dependencyCount( dependencyCount_ )
+ , pDependencies( pDependencies_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & operator=( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo ) - offsetof( RenderPassCreateInfo, pNext ) );
+ return *this;
+ }
+
RenderPassCreateInfo( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassCreateInfo& operator=( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const *>(&rhs);
return *this;
}
@@ -59421,7 +55960,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassCreateInfo & setFlags( vk::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -59433,7 +55972,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassCreateInfo & setPAttachments( const vk::AttachmentDescription* pAttachments_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription* pAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pAttachments = pAttachments_;
return *this;
@@ -59445,7 +55984,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassCreateInfo & setPSubpasses( const vk::SubpassDescription* pSubpasses_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription* pSubpasses_ ) VULKAN_HPP_NOEXCEPT
{
pSubpasses = pSubpasses_;
return *this;
@@ -59457,7 +55996,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassCreateInfo & setPDependencies( const vk::SubpassDependency* pDependencies_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency* pDependencies_ ) VULKAN_HPP_NOEXCEPT
{
pDependencies = pDependencies_;
return *this;
@@ -59491,179 +56030,146 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SubpassDescription2KHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SubpassDescription2KHR( vk::SubpassDescriptionFlags flags_ = vk::SubpassDescriptionFlags(),
- vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- uint32_t viewMask_ = 0,
- uint32_t inputAttachmentCount_ = 0,
- const vk::AttachmentReference2KHR* pInputAttachments_ = nullptr,
- uint32_t colorAttachmentCount_ = 0,
- const vk::AttachmentReference2KHR* pColorAttachments_ = nullptr,
- const vk::AttachmentReference2KHR* pResolveAttachments_ = nullptr,
- const vk::AttachmentReference2KHR* pDepthStencilAttachment_ = nullptr,
- uint32_t preserveAttachmentCount_ = 0,
- const uint32_t* pPreserveAttachments_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , pipelineBindPoint( pipelineBindPoint_ )
- , viewMask( viewMask_ )
- , inputAttachmentCount( inputAttachmentCount_ )
- , pInputAttachments( pInputAttachments_ )
- , colorAttachmentCount( colorAttachmentCount_ )
- , pColorAttachments( pColorAttachments_ )
- , pResolveAttachments( pResolveAttachments_ )
- , pDepthStencilAttachment( pDepthStencilAttachment_ )
- , preserveAttachmentCount( preserveAttachmentCount_ )
- , pPreserveAttachments( pPreserveAttachments_ )
- {}
-
- SubpassDescription2KHR( VkSubpassDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDescription2KHR*>(this) = rhs;
- }
-
- SubpassDescription2KHR& operator=( VkSubpassDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDescription2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubpassDescription2KHR;
- const void* pNext = nullptr;
- vk::SubpassDescriptionFlags flags;
- vk::PipelineBindPoint pipelineBindPoint;
- uint32_t viewMask;
- uint32_t inputAttachmentCount;
- const vk::AttachmentReference2KHR* pInputAttachments;
- uint32_t colorAttachmentCount;
- const vk::AttachmentReference2KHR* pColorAttachments;
- const vk::AttachmentReference2KHR* pResolveAttachments;
- const vk::AttachmentReference2KHR* pDepthStencilAttachment;
- uint32_t preserveAttachmentCount;
- const uint32_t* pPreserveAttachments;
- };
- static_assert( sizeof( SubpassDescription2KHR ) == sizeof( VkSubpassDescription2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SubpassDescription2KHR : public layout::SubpassDescription2KHR
- {
- VULKAN_HPP_CONSTEXPR SubpassDescription2KHR( vk::SubpassDescriptionFlags flags_ = vk::SubpassDescriptionFlags(),
- vk::PipelineBindPoint pipelineBindPoint_ = vk::PipelineBindPoint::eGraphics,
- uint32_t viewMask_ = 0,
- uint32_t inputAttachmentCount_ = 0,
- const vk::AttachmentReference2KHR* pInputAttachments_ = nullptr,
- uint32_t colorAttachmentCount_ = 0,
- const vk::AttachmentReference2KHR* pColorAttachments_ = nullptr,
- const vk::AttachmentReference2KHR* pResolveAttachments_ = nullptr,
- const vk::AttachmentReference2KHR* pDepthStencilAttachment_ = nullptr,
- uint32_t preserveAttachmentCount_ = 0,
- const uint32_t* pPreserveAttachments_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDescription2KHR( flags_, pipelineBindPoint_, viewMask_, inputAttachmentCount_, pInputAttachments_, colorAttachmentCount_, pColorAttachments_, pResolveAttachments_, pDepthStencilAttachment_, preserveAttachmentCount_, pPreserveAttachments_ )
+ struct SubpassDescription2
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , pipelineBindPoint( pipelineBindPoint_ )
+ , viewMask( viewMask_ )
+ , inputAttachmentCount( inputAttachmentCount_ )
+ , pInputAttachments( pInputAttachments_ )
+ , colorAttachmentCount( colorAttachmentCount_ )
+ , pColorAttachments( pColorAttachments_ )
+ , pResolveAttachments( pResolveAttachments_ )
+ , pDepthStencilAttachment( pDepthStencilAttachment_ )
+ , preserveAttachmentCount( preserveAttachmentCount_ )
+ , pPreserveAttachments( pPreserveAttachments_ )
{}
- SubpassDescription2KHR( VkSubpassDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDescription2KHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SubpassDescription2 & operator=( VULKAN_HPP_NAMESPACE::SubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubpassDescription2 ) - offsetof( SubpassDescription2, pNext ) );
+ return *this;
+ }
- SubpassDescription2KHR& operator=( VkSubpassDescription2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubpassDescription2KHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ SubpassDescription2& operator=( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassDescription2 const *>(&rhs);
return *this;
}
- SubpassDescription2KHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SubpassDescription2KHR & setFlags( vk::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- SubpassDescription2KHR & setPipelineBindPoint( vk::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT
{
pipelineBindPoint = pipelineBindPoint_;
return *this;
}
- SubpassDescription2KHR & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT
{
viewMask = viewMask_;
return *this;
}
- SubpassDescription2KHR & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
inputAttachmentCount = inputAttachmentCount_;
return *this;
}
- SubpassDescription2KHR & setPInputAttachments( const vk::AttachmentReference2KHR* pInputAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2* pInputAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pInputAttachments = pInputAttachments_;
return *this;
}
- SubpassDescription2KHR & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
colorAttachmentCount = colorAttachmentCount_;
return *this;
}
- SubpassDescription2KHR & setPColorAttachments( const vk::AttachmentReference2KHR* pColorAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2* pColorAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pColorAttachments = pColorAttachments_;
return *this;
}
- SubpassDescription2KHR & setPResolveAttachments( const vk::AttachmentReference2KHR* pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2* pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pResolveAttachments = pResolveAttachments_;
return *this;
}
- SubpassDescription2KHR & setPDepthStencilAttachment( const vk::AttachmentReference2KHR* pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2* pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
{
pDepthStencilAttachment = pDepthStencilAttachment_;
return *this;
}
- SubpassDescription2KHR & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
preserveAttachmentCount = preserveAttachmentCount_;
return *this;
}
- SubpassDescription2KHR & setPPreserveAttachments( const uint32_t* pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescription2 & setPPreserveAttachments( const uint32_t* pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pPreserveAttachments = pPreserveAttachments_;
return *this;
}
- operator VkSubpassDescription2KHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDescription2 const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSubpassDescription2KHR*>( this );
+ return *reinterpret_cast<const VkSubpassDescription2*>( this );
}
- operator VkSubpassDescription2KHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDescription2 &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSubpassDescription2KHR*>( this );
+ return *reinterpret_cast<VkSubpassDescription2*>( this );
}
- bool operator==( SubpassDescription2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SubpassDescription2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -59680,154 +56186,131 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pPreserveAttachments == rhs.pPreserveAttachments );
}
- bool operator!=( SubpassDescription2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SubpassDescription2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SubpassDescription2KHR::sType;
- };
- static_assert( sizeof( SubpassDescription2KHR ) == sizeof( VkSubpassDescription2KHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SubpassDescription2KHR>::value, "struct wrapper is not a standard layout!" );
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( SubpassDescription2 ) == sizeof( VkSubpassDescription2 ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SubpassDescription2>::value, "struct wrapper is not a standard layout!" );
+
+ struct SubpassDependency2
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : srcSubpass( srcSubpass_ )
+ , dstSubpass( dstSubpass_ )
+ , srcStageMask( srcStageMask_ )
+ , dstStageMask( dstStageMask_ )
+ , srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , dependencyFlags( dependencyFlags_ )
+ , viewOffset( viewOffset_ )
+ {}
- namespace layout
- {
- struct SubpassDependency2KHR
+ VULKAN_HPP_NAMESPACE::SubpassDependency2 & operator=( VULKAN_HPP_NAMESPACE::SubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR SubpassDependency2KHR( uint32_t srcSubpass_ = 0,
- uint32_t dstSubpass_ = 0,
- vk::PipelineStageFlags srcStageMask_ = vk::PipelineStageFlags(),
- vk::PipelineStageFlags dstStageMask_ = vk::PipelineStageFlags(),
- vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- vk::DependencyFlags dependencyFlags_ = vk::DependencyFlags(),
- int32_t viewOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : srcSubpass( srcSubpass_ )
- , dstSubpass( dstSubpass_ )
- , srcStageMask( srcStageMask_ )
- , dstStageMask( dstStageMask_ )
- , srcAccessMask( srcAccessMask_ )
- , dstAccessMask( dstAccessMask_ )
- , dependencyFlags( dependencyFlags_ )
- , viewOffset( viewOffset_ )
- {}
-
- SubpassDependency2KHR( VkSubpassDependency2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDependency2KHR*>(this) = rhs;
- }
-
- SubpassDependency2KHR& operator=( VkSubpassDependency2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDependency2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubpassDependency2KHR;
- const void* pNext = nullptr;
- uint32_t srcSubpass;
- uint32_t dstSubpass;
- vk::PipelineStageFlags srcStageMask;
- vk::PipelineStageFlags dstStageMask;
- vk::AccessFlags srcAccessMask;
- vk::AccessFlags dstAccessMask;
- vk::DependencyFlags dependencyFlags;
- int32_t viewOffset;
- };
- static_assert( sizeof( SubpassDependency2KHR ) == sizeof( VkSubpassDependency2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SubpassDependency2KHR : public layout::SubpassDependency2KHR
- {
- VULKAN_HPP_CONSTEXPR SubpassDependency2KHR( uint32_t srcSubpass_ = 0,
- uint32_t dstSubpass_ = 0,
- vk::PipelineStageFlags srcStageMask_ = vk::PipelineStageFlags(),
- vk::PipelineStageFlags dstStageMask_ = vk::PipelineStageFlags(),
- vk::AccessFlags srcAccessMask_ = vk::AccessFlags(),
- vk::AccessFlags dstAccessMask_ = vk::AccessFlags(),
- vk::DependencyFlags dependencyFlags_ = vk::DependencyFlags(),
- int32_t viewOffset_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDependency2KHR( srcSubpass_, dstSubpass_, srcStageMask_, dstStageMask_, srcAccessMask_, dstAccessMask_, dependencyFlags_, viewOffset_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubpassDependency2 ) - offsetof( SubpassDependency2, pNext ) );
+ return *this;
+ }
- SubpassDependency2KHR( VkSubpassDependency2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDependency2KHR( rhs )
- {}
+ SubpassDependency2( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- SubpassDependency2KHR& operator=( VkSubpassDependency2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2& operator=( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubpassDependency2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassDependency2 const *>(&rhs);
return *this;
}
- SubpassDependency2KHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SubpassDependency2KHR & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT
{
srcSubpass = srcSubpass_;
return *this;
}
- SubpassDependency2KHR & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT
{
dstSubpass = dstSubpass_;
return *this;
}
- SubpassDependency2KHR & setSrcStageMask( vk::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT
{
srcStageMask = srcStageMask_;
return *this;
}
- SubpassDependency2KHR & setDstStageMask( vk::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT
{
dstStageMask = dstStageMask_;
return *this;
}
- SubpassDependency2KHR & setSrcAccessMask( vk::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
srcAccessMask = srcAccessMask_;
return *this;
}
- SubpassDependency2KHR & setDstAccessMask( vk::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT
{
dstAccessMask = dstAccessMask_;
return *this;
}
- SubpassDependency2KHR & setDependencyFlags( vk::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT
{
dependencyFlags = dependencyFlags_;
return *this;
}
- SubpassDependency2KHR & setViewOffset( int32_t viewOffset_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDependency2 & setViewOffset( int32_t viewOffset_ ) VULKAN_HPP_NOEXCEPT
{
viewOffset = viewOffset_;
return *this;
}
- operator VkSubpassDependency2KHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDependency2 const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSubpassDependency2KHR*>( this );
+ return *reinterpret_cast<const VkSubpassDependency2*>( this );
}
- operator VkSubpassDependency2KHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDependency2 &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSubpassDependency2KHR*>( this );
+ return *reinterpret_cast<VkSubpassDependency2*>( this );
}
- bool operator==( SubpassDependency2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SubpassDependency2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -59841,164 +56324,136 @@ namespace VULKAN_HPP_NAMESPACE
&& ( viewOffset == rhs.viewOffset );
}
- bool operator!=( SubpassDependency2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SubpassDependency2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SubpassDependency2KHR::sType;
- };
- static_assert( sizeof( SubpassDependency2KHR ) == sizeof( VkSubpassDependency2KHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SubpassDependency2KHR>::value, "struct wrapper is not a standard layout!" );
+ public:
+ const 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 = {};
+ };
+ static_assert( sizeof( SubpassDependency2 ) == sizeof( VkSubpassDependency2 ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SubpassDependency2>::value, "struct wrapper is not a standard layout!" );
+
+ struct RenderPassCreateInfo2
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , subpassCount( subpassCount_ )
+ , pSubpasses( pSubpasses_ )
+ , dependencyCount( dependencyCount_ )
+ , pDependencies( pDependencies_ )
+ , correlatedViewMaskCount( correlatedViewMaskCount_ )
+ , pCorrelatedViewMasks( pCorrelatedViewMasks_ )
+ {}
- namespace layout
- {
- struct RenderPassCreateInfo2KHR
+ VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & operator=( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2KHR( vk::RenderPassCreateFlags flags_ = vk::RenderPassCreateFlags(),
- uint32_t attachmentCount_ = 0,
- const vk::AttachmentDescription2KHR* pAttachments_ = nullptr,
- uint32_t subpassCount_ = 0,
- const vk::SubpassDescription2KHR* pSubpasses_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const vk::SubpassDependency2KHR* pDependencies_ = nullptr,
- uint32_t correlatedViewMaskCount_ = 0,
- const uint32_t* pCorrelatedViewMasks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , attachmentCount( attachmentCount_ )
- , pAttachments( pAttachments_ )
- , subpassCount( subpassCount_ )
- , pSubpasses( pSubpasses_ )
- , dependencyCount( dependencyCount_ )
- , pDependencies( pDependencies_ )
- , correlatedViewMaskCount( correlatedViewMaskCount_ )
- , pCorrelatedViewMasks( pCorrelatedViewMasks_ )
- {}
-
- RenderPassCreateInfo2KHR( VkRenderPassCreateInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassCreateInfo2KHR*>(this) = rhs;
- }
-
- RenderPassCreateInfo2KHR& operator=( VkRenderPassCreateInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassCreateInfo2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassCreateInfo2KHR;
- const void* pNext = nullptr;
- vk::RenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const vk::AttachmentDescription2KHR* pAttachments;
- uint32_t subpassCount;
- const vk::SubpassDescription2KHR* pSubpasses;
- uint32_t dependencyCount;
- const vk::SubpassDependency2KHR* pDependencies;
- uint32_t correlatedViewMaskCount;
- const uint32_t* pCorrelatedViewMasks;
- };
- static_assert( sizeof( RenderPassCreateInfo2KHR ) == sizeof( VkRenderPassCreateInfo2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassCreateInfo2KHR : public layout::RenderPassCreateInfo2KHR
- {
- VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2KHR( vk::RenderPassCreateFlags flags_ = vk::RenderPassCreateFlags(),
- uint32_t attachmentCount_ = 0,
- const vk::AttachmentDescription2KHR* pAttachments_ = nullptr,
- uint32_t subpassCount_ = 0,
- const vk::SubpassDescription2KHR* pSubpasses_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const vk::SubpassDependency2KHR* pDependencies_ = nullptr,
- uint32_t correlatedViewMaskCount_ = 0,
- const uint32_t* pCorrelatedViewMasks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassCreateInfo2KHR( flags_, attachmentCount_, pAttachments_, subpassCount_, pSubpasses_, dependencyCount_, pDependencies_, correlatedViewMaskCount_, pCorrelatedViewMasks_ )
- {}
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 ) - offsetof( RenderPassCreateInfo2, pNext ) );
+ return *this;
+ }
- RenderPassCreateInfo2KHR( VkRenderPassCreateInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassCreateInfo2KHR( rhs )
- {}
+ RenderPassCreateInfo2( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- RenderPassCreateInfo2KHR& operator=( VkRenderPassCreateInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2& operator=( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassCreateInfo2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const *>(&rhs);
return *this;
}
- RenderPassCreateInfo2KHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- RenderPassCreateInfo2KHR & setFlags( vk::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- RenderPassCreateInfo2KHR & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
attachmentCount = attachmentCount_;
return *this;
}
- RenderPassCreateInfo2KHR & setPAttachments( const vk::AttachmentDescription2KHR* pAttachments_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription2* pAttachments_ ) VULKAN_HPP_NOEXCEPT
{
pAttachments = pAttachments_;
return *this;
}
- RenderPassCreateInfo2KHR & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT
{
subpassCount = subpassCount_;
return *this;
}
- RenderPassCreateInfo2KHR & setPSubpasses( const vk::SubpassDescription2KHR* pSubpasses_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription2* pSubpasses_ ) VULKAN_HPP_NOEXCEPT
{
pSubpasses = pSubpasses_;
return *this;
}
- RenderPassCreateInfo2KHR & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT
{
dependencyCount = dependencyCount_;
return *this;
}
- RenderPassCreateInfo2KHR & setPDependencies( const vk::SubpassDependency2KHR* pDependencies_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency2* pDependencies_ ) VULKAN_HPP_NOEXCEPT
{
pDependencies = pDependencies_;
return *this;
}
- RenderPassCreateInfo2KHR & setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ ) VULKAN_HPP_NOEXCEPT
{
correlatedViewMaskCount = correlatedViewMaskCount_;
return *this;
}
- RenderPassCreateInfo2KHR & setPCorrelatedViewMasks( const uint32_t* pCorrelatedViewMasks_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassCreateInfo2 & setPCorrelatedViewMasks( const uint32_t* pCorrelatedViewMasks_ ) VULKAN_HPP_NOEXCEPT
{
pCorrelatedViewMasks = pCorrelatedViewMasks_;
return *this;
}
- operator VkRenderPassCreateInfo2KHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkRenderPassCreateInfo2 const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( this );
+ return *reinterpret_cast<const VkRenderPassCreateInfo2*>( this );
}
- operator VkRenderPassCreateInfo2KHR &() VULKAN_HPP_NOEXCEPT
+ operator VkRenderPassCreateInfo2 &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkRenderPassCreateInfo2KHR*>( this );
+ return *reinterpret_cast<VkRenderPassCreateInfo2*>( this );
}
- bool operator==( RenderPassCreateInfo2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( RenderPassCreateInfo2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -60013,58 +56468,47 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pCorrelatedViewMasks == rhs.pCorrelatedViewMasks );
}
- bool operator!=( RenderPassCreateInfo2KHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( RenderPassCreateInfo2 const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::RenderPassCreateInfo2KHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( RenderPassCreateInfo2KHR ) == sizeof( VkRenderPassCreateInfo2KHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<RenderPassCreateInfo2KHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( RenderPassCreateInfo2 ) == sizeof( VkRenderPassCreateInfo2 ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<RenderPassCreateInfo2>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct RenderPassFragmentDensityMapCreateInfoEXT
{
- struct RenderPassFragmentDensityMapCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( vk::AttachmentReference fragmentDensityMapAttachment_ = vk::AttachmentReference() ) VULKAN_HPP_NOEXCEPT
- : fragmentDensityMapAttachment( fragmentDensityMapAttachment_ )
- {}
-
- RenderPassFragmentDensityMapCreateInfoEXT( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassFragmentDensityMapCreateInfoEXT*>(this) = rhs;
- }
-
- RenderPassFragmentDensityMapCreateInfoEXT& operator=( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassFragmentDensityMapCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT;
- const void* pNext = nullptr;
- vk::AttachmentReference fragmentDensityMapAttachment;
- };
- static_assert( sizeof( RenderPassFragmentDensityMapCreateInfoEXT ) == sizeof( VkRenderPassFragmentDensityMapCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassFragmentDensityMapCreateInfoEXT : public layout::RenderPassFragmentDensityMapCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( vk::AttachmentReference fragmentDensityMapAttachment_ = vk::AttachmentReference() ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassFragmentDensityMapCreateInfoEXT( fragmentDensityMapAttachment_ )
+ VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fragmentDensityMapAttachment( fragmentDensityMapAttachment_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT ) - offsetof( RenderPassFragmentDensityMapCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
RenderPassFragmentDensityMapCreateInfoEXT( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassFragmentDensityMapCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassFragmentDensityMapCreateInfoEXT& operator=( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassFragmentDensityMapCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -60074,7 +56518,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassFragmentDensityMapCreateInfoEXT & setFragmentDensityMapAttachment( vk::AttachmentReference fragmentDensityMapAttachment_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassFragmentDensityMapCreateInfoEXT & setFragmentDensityMapAttachment( VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment_ ) VULKAN_HPP_NOEXCEPT
{
fragmentDensityMapAttachment = fragmentDensityMapAttachment_;
return *this;
@@ -60102,57 +56546,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassFragmentDensityMapCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment = {};
};
static_assert( sizeof( RenderPassFragmentDensityMapCreateInfoEXT ) == sizeof( VkRenderPassFragmentDensityMapCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassFragmentDensityMapCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RenderPassInputAttachmentAspectCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = 0,
- const vk::InputAttachmentAspectReference* pAspectReferences_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : aspectReferenceCount( aspectReferenceCount_ )
- , pAspectReferences( pAspectReferences_ )
- {}
-
- RenderPassInputAttachmentAspectCreateInfo( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(this) = rhs;
- }
-
- RenderPassInputAttachmentAspectCreateInfo& operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfo;
- const void* pNext = nullptr;
- uint32_t aspectReferenceCount;
- const vk::InputAttachmentAspectReference* pAspectReferences;
- };
- static_assert( sizeof( RenderPassInputAttachmentAspectCreateInfo ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassInputAttachmentAspectCreateInfo : public layout::RenderPassInputAttachmentAspectCreateInfo
+ struct RenderPassInputAttachmentAspectCreateInfo
{
- VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = 0,
- const vk::InputAttachmentAspectReference* pAspectReferences_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassInputAttachmentAspectCreateInfo( aspectReferenceCount_, pAspectReferences_ )
+ VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = {},
+ const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference* pAspectReferences_ = {} ) VULKAN_HPP_NOEXCEPT
+ : aspectReferenceCount( aspectReferenceCount_ )
+ , pAspectReferences( pAspectReferences_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo & operator=( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo ) - offsetof( RenderPassInputAttachmentAspectCreateInfo, pNext ) );
+ return *this;
+ }
+
RenderPassInputAttachmentAspectCreateInfo( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassInputAttachmentAspectCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassInputAttachmentAspectCreateInfo& operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassInputAttachmentAspectCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo const *>(&rhs);
return *this;
}
@@ -60168,7 +56591,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassInputAttachmentAspectCreateInfo & setPAspectReferences( const vk::InputAttachmentAspectReference* pAspectReferences_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassInputAttachmentAspectCreateInfo & setPAspectReferences( const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference* pAspectReferences_ ) VULKAN_HPP_NOEXCEPT
{
pAspectReferences = pAspectReferences_;
return *this;
@@ -60197,73 +56620,45 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassInputAttachmentAspectCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfo;
+ const void* pNext = {};
+ uint32_t aspectReferenceCount = {};
+ const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference* pAspectReferences = {};
};
static_assert( sizeof( RenderPassInputAttachmentAspectCreateInfo ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassInputAttachmentAspectCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct RenderPassMultiviewCreateInfo
{
- struct RenderPassMultiviewCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( uint32_t subpassCount_ = 0,
- const uint32_t* pViewMasks_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const int32_t* pViewOffsets_ = nullptr,
- uint32_t correlationMaskCount_ = 0,
- const uint32_t* pCorrelationMasks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : subpassCount( subpassCount_ )
- , pViewMasks( pViewMasks_ )
- , dependencyCount( dependencyCount_ )
- , pViewOffsets( pViewOffsets_ )
- , correlationMaskCount( correlationMaskCount_ )
- , pCorrelationMasks( pCorrelationMasks_ )
- {}
-
- RenderPassMultiviewCreateInfo( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(this) = rhs;
- }
-
- RenderPassMultiviewCreateInfo& operator=( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassMultiviewCreateInfo;
- const void* pNext = nullptr;
- uint32_t subpassCount;
- const uint32_t* pViewMasks;
- uint32_t dependencyCount;
- const int32_t* pViewOffsets;
- uint32_t correlationMaskCount;
- const uint32_t* pCorrelationMasks;
- };
- static_assert( sizeof( RenderPassMultiviewCreateInfo ) == sizeof( VkRenderPassMultiviewCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassMultiviewCreateInfo : public layout::RenderPassMultiviewCreateInfo
- {
- VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( uint32_t subpassCount_ = 0,
- const uint32_t* pViewMasks_ = nullptr,
- uint32_t dependencyCount_ = 0,
- const int32_t* pViewOffsets_ = nullptr,
- uint32_t correlationMaskCount_ = 0,
- const uint32_t* pCorrelationMasks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassMultiviewCreateInfo( subpassCount_, pViewMasks_, dependencyCount_, pViewOffsets_, correlationMaskCount_, pCorrelationMasks_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : subpassCount( subpassCount_ )
+ , pViewMasks( pViewMasks_ )
+ , dependencyCount( dependencyCount_ )
+ , pViewOffsets( pViewOffsets_ )
+ , correlationMaskCount( correlationMaskCount_ )
+ , pCorrelationMasks( pCorrelationMasks_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo & operator=( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo ) - offsetof( RenderPassMultiviewCreateInfo, pNext ) );
+ return *this;
+ }
+
RenderPassMultiviewCreateInfo( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassMultiviewCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassMultiviewCreateInfo& operator=( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassMultiviewCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo const *>(&rhs);
return *this;
}
@@ -60336,28 +56731,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassMultiviewCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( RenderPassMultiviewCreateInfo ) == sizeof( VkRenderPassMultiviewCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassMultiviewCreateInfo>::value, "struct wrapper is not a standard layout!" );
struct SubpassSampleLocationsEXT
{
- VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( uint32_t subpassIndex_ = 0,
- vk::SampleLocationsInfoEXT sampleLocationsInfo_ = vk::SampleLocationsInfoEXT() ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( uint32_t subpassIndex_ = {},
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT
: subpassIndex( subpassIndex_ )
, sampleLocationsInfo( sampleLocationsInfo_ )
{}
SubpassSampleLocationsEXT( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassSampleLocationsEXT*>(this) = rhs;
+ *this = rhs;
}
SubpassSampleLocationsEXT& operator=( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSubpassSampleLocationsEXT*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT const *>(&rhs);
return *this;
}
@@ -60367,7 +56769,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubpassSampleLocationsEXT & setSampleLocationsInfo( vk::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
+ SubpassSampleLocationsEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT
{
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
@@ -60395,65 +56797,38 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t subpassIndex;
- vk::SampleLocationsInfoEXT sampleLocationsInfo;
+ uint32_t subpassIndex = {};
+ VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {};
};
static_assert( sizeof( SubpassSampleLocationsEXT ) == sizeof( VkSubpassSampleLocationsEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SubpassSampleLocationsEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct RenderPassSampleLocationsBeginInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = 0,
- const vk::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = nullptr,
- uint32_t postSubpassSampleLocationsCount_ = 0,
- const vk::SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ )
- , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ )
- , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ )
- , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ )
- {}
-
- RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(this) = rhs;
- }
-
- RenderPassSampleLocationsBeginInfoEXT& operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT;
- const void* pNext = nullptr;
- uint32_t attachmentInitialSampleLocationsCount;
- const vk::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations;
- uint32_t postSubpassSampleLocationsCount;
- const vk::SubpassSampleLocationsEXT* pPostSubpassSampleLocations;
- };
- static_assert( sizeof( RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct RenderPassSampleLocationsBeginInfoEXT : public layout::RenderPassSampleLocationsBeginInfoEXT
+ struct RenderPassSampleLocationsBeginInfoEXT
{
- VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = 0,
- const vk::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = nullptr,
- uint32_t postSubpassSampleLocationsCount_ = 0,
- const vk::SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassSampleLocationsBeginInfoEXT( attachmentInitialSampleLocationsCount_, pAttachmentInitialSampleLocations_, postSubpassSampleLocationsCount_, pPostSubpassSampleLocations_ )
+ VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = {},
+ const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = {},
+ uint32_t postSubpassSampleLocationsCount_ = {},
+ const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = {} ) VULKAN_HPP_NOEXCEPT
+ : attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ )
+ , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ )
+ , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ )
+ , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ )
{}
+ VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT & operator=( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT ) - offsetof( RenderPassSampleLocationsBeginInfoEXT, pNext ) );
+ return *this;
+ }
+
RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::RenderPassSampleLocationsBeginInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
RenderPassSampleLocationsBeginInfoEXT& operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::RenderPassSampleLocationsBeginInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT const *>(&rhs);
return *this;
}
@@ -60469,7 +56844,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassSampleLocationsBeginInfoEXT & setPAttachmentInitialSampleLocations( const vk::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassSampleLocationsBeginInfoEXT & setPAttachmentInitialSampleLocations( const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT
{
pAttachmentInitialSampleLocations = pAttachmentInitialSampleLocations_;
return *this;
@@ -60481,7 +56856,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- RenderPassSampleLocationsBeginInfoEXT & setPPostSubpassSampleLocations( const vk::SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT
+ RenderPassSampleLocationsBeginInfoEXT & setPPostSubpassSampleLocations( const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT
{
pPostSubpassSampleLocations = pPostSubpassSampleLocations_;
return *this;
@@ -60512,113 +56887,67 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::RenderPassSampleLocationsBeginInfoEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<RenderPassSampleLocationsBeginInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SamplerCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR SamplerCreateInfo( vk::SamplerCreateFlags flags_ = vk::SamplerCreateFlags(),
- vk::Filter magFilter_ = vk::Filter::eNearest,
- vk::Filter minFilter_ = vk::Filter::eNearest,
- vk::SamplerMipmapMode mipmapMode_ = vk::SamplerMipmapMode::eNearest,
- vk::SamplerAddressMode addressModeU_ = vk::SamplerAddressMode::eRepeat,
- vk::SamplerAddressMode addressModeV_ = vk::SamplerAddressMode::eRepeat,
- vk::SamplerAddressMode addressModeW_ = vk::SamplerAddressMode::eRepeat,
- float mipLodBias_ = 0,
- vk::Bool32 anisotropyEnable_ = 0,
- float maxAnisotropy_ = 0,
- vk::Bool32 compareEnable_ = 0,
- vk::CompareOp compareOp_ = vk::CompareOp::eNever,
- float minLod_ = 0,
- float maxLod_ = 0,
- vk::BorderColor borderColor_ = vk::BorderColor::eFloatTransparentBlack,
- vk::Bool32 unnormalizedCoordinates_ = 0 ) VULKAN_HPP_NOEXCEPT
- : 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_ )
- {}
-
- SamplerCreateInfo( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerCreateInfo*>(this) = rhs;
- }
-
- SamplerCreateInfo& operator=( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSamplerCreateInfo;
- const void* pNext = nullptr;
- vk::SamplerCreateFlags flags;
- vk::Filter magFilter;
- vk::Filter minFilter;
- vk::SamplerMipmapMode mipmapMode;
- vk::SamplerAddressMode addressModeU;
- vk::SamplerAddressMode addressModeV;
- vk::SamplerAddressMode addressModeW;
- float mipLodBias;
- vk::Bool32 anisotropyEnable;
- float maxAnisotropy;
- vk::Bool32 compareEnable;
- vk::CompareOp compareOp;
- float minLod;
- float maxLod;
- vk::BorderColor borderColor;
- vk::Bool32 unnormalizedCoordinates;
- };
- static_assert( sizeof( SamplerCreateInfo ) == sizeof( VkSamplerCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct SamplerCreateInfo : public layout::SamplerCreateInfo
- {
- VULKAN_HPP_CONSTEXPR SamplerCreateInfo( vk::SamplerCreateFlags flags_ = vk::SamplerCreateFlags(),
- vk::Filter magFilter_ = vk::Filter::eNearest,
- vk::Filter minFilter_ = vk::Filter::eNearest,
- vk::SamplerMipmapMode mipmapMode_ = vk::SamplerMipmapMode::eNearest,
- vk::SamplerAddressMode addressModeU_ = vk::SamplerAddressMode::eRepeat,
- vk::SamplerAddressMode addressModeV_ = vk::SamplerAddressMode::eRepeat,
- vk::SamplerAddressMode addressModeW_ = vk::SamplerAddressMode::eRepeat,
- float mipLodBias_ = 0,
- vk::Bool32 anisotropyEnable_ = 0,
- float maxAnisotropy_ = 0,
- vk::Bool32 compareEnable_ = 0,
- vk::CompareOp compareOp_ = vk::CompareOp::eNever,
- float minLod_ = 0,
- float maxLod_ = 0,
- vk::BorderColor borderColor_ = vk::BorderColor::eFloatTransparentBlack,
- vk::Bool32 unnormalizedCoordinates_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerCreateInfo( flags_, magFilter_, minFilter_, mipmapMode_, addressModeU_, addressModeV_, addressModeW_, mipLodBias_, anisotropyEnable_, maxAnisotropy_, compareEnable_, compareOp_, minLod_, maxLod_, borderColor_, unnormalizedCoordinates_ )
+ struct SamplerCreateInfo
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::SamplerCreateInfo & operator=( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SamplerCreateInfo ) - offsetof( SamplerCreateInfo, pNext ) );
+ return *this;
+ }
+
SamplerCreateInfo( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
SamplerCreateInfo& operator=( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SamplerCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SamplerCreateInfo const *>(&rhs);
return *this;
}
@@ -60628,43 +56957,43 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerCreateInfo & setFlags( vk::SamplerCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- SamplerCreateInfo & setMagFilter( vk::Filter magFilter_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setMagFilter( VULKAN_HPP_NAMESPACE::Filter magFilter_ ) VULKAN_HPP_NOEXCEPT
{
magFilter = magFilter_;
return *this;
}
- SamplerCreateInfo & setMinFilter( vk::Filter minFilter_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setMinFilter( VULKAN_HPP_NAMESPACE::Filter minFilter_ ) VULKAN_HPP_NOEXCEPT
{
minFilter = minFilter_;
return *this;
}
- SamplerCreateInfo & setMipmapMode( vk::SamplerMipmapMode mipmapMode_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setMipmapMode( VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode_ ) VULKAN_HPP_NOEXCEPT
{
mipmapMode = mipmapMode_;
return *this;
}
- SamplerCreateInfo & setAddressModeU( vk::SamplerAddressMode addressModeU_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setAddressModeU( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU_ ) VULKAN_HPP_NOEXCEPT
{
addressModeU = addressModeU_;
return *this;
}
- SamplerCreateInfo & setAddressModeV( vk::SamplerAddressMode addressModeV_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setAddressModeV( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV_ ) VULKAN_HPP_NOEXCEPT
{
addressModeV = addressModeV_;
return *this;
}
- SamplerCreateInfo & setAddressModeW( vk::SamplerAddressMode addressModeW_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setAddressModeW( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW_ ) VULKAN_HPP_NOEXCEPT
{
addressModeW = addressModeW_;
return *this;
@@ -60676,7 +57005,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerCreateInfo & setAnisotropyEnable( vk::Bool32 anisotropyEnable_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setAnisotropyEnable( VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable_ ) VULKAN_HPP_NOEXCEPT
{
anisotropyEnable = anisotropyEnable_;
return *this;
@@ -60688,13 +57017,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerCreateInfo & setCompareEnable( vk::Bool32 compareEnable_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setCompareEnable( VULKAN_HPP_NAMESPACE::Bool32 compareEnable_ ) VULKAN_HPP_NOEXCEPT
{
compareEnable = compareEnable_;
return *this;
}
- SamplerCreateInfo & setCompareOp( vk::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT
{
compareOp = compareOp_;
return *this;
@@ -60712,13 +57041,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerCreateInfo & setBorderColor( vk::BorderColor borderColor_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setBorderColor( VULKAN_HPP_NAMESPACE::BorderColor borderColor_ ) VULKAN_HPP_NOEXCEPT
{
borderColor = borderColor_;
return *this;
}
- SamplerCreateInfo & setUnnormalizedCoordinates( vk::Bool32 unnormalizedCoordinates_ ) VULKAN_HPP_NOEXCEPT
+ SamplerCreateInfo & setUnnormalizedCoordinates( VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates_ ) VULKAN_HPP_NOEXCEPT
{
unnormalizedCoordinates = unnormalizedCoordinates_;
return *this;
@@ -60761,165 +57090,128 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SamplerCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SamplerCreateInfo ) == sizeof( VkSamplerCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SamplerCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SamplerReductionModeCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfoEXT( vk::SamplerReductionModeEXT reductionMode_ = vk::SamplerReductionModeEXT::eWeightedAverage ) VULKAN_HPP_NOEXCEPT
- : reductionMode( reductionMode_ )
- {}
-
- SamplerReductionModeCreateInfoEXT( VkSamplerReductionModeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(this) = rhs;
- }
-
- SamplerReductionModeCreateInfoEXT& operator=( VkSamplerReductionModeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSamplerReductionModeCreateInfoEXT;
- const void* pNext = nullptr;
- vk::SamplerReductionModeEXT reductionMode;
- };
- static_assert( sizeof( SamplerReductionModeCreateInfoEXT ) == sizeof( VkSamplerReductionModeCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SamplerReductionModeCreateInfoEXT : public layout::SamplerReductionModeCreateInfoEXT
+ struct SamplerReductionModeCreateInfo
{
- VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfoEXT( vk::SamplerReductionModeEXT reductionMode_ = vk::SamplerReductionModeEXT::eWeightedAverage ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerReductionModeCreateInfoEXT( reductionMode_ )
+ VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfo( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage ) VULKAN_HPP_NOEXCEPT
+ : reductionMode( reductionMode_ )
{}
- SamplerReductionModeCreateInfoEXT( VkSamplerReductionModeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerReductionModeCreateInfoEXT( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo & operator=( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo ) - offsetof( SamplerReductionModeCreateInfo, pNext ) );
+ return *this;
+ }
- SamplerReductionModeCreateInfoEXT& operator=( VkSamplerReductionModeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ SamplerReductionModeCreateInfo( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SamplerReductionModeCreateInfoEXT::operator=(rhs);
+ *this = rhs;
+ }
+
+ SamplerReductionModeCreateInfo& operator=( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo const *>(&rhs);
return *this;
}
- SamplerReductionModeCreateInfoEXT & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SamplerReductionModeCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SamplerReductionModeCreateInfoEXT & setReductionMode( vk::SamplerReductionModeEXT reductionMode_ ) VULKAN_HPP_NOEXCEPT
+ SamplerReductionModeCreateInfo & setReductionMode( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ ) VULKAN_HPP_NOEXCEPT
{
reductionMode = reductionMode_;
return *this;
}
- operator VkSamplerReductionModeCreateInfoEXT const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSamplerReductionModeCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSamplerReductionModeCreateInfoEXT*>( this );
+ return *reinterpret_cast<const VkSamplerReductionModeCreateInfo*>( this );
}
- operator VkSamplerReductionModeCreateInfoEXT &() VULKAN_HPP_NOEXCEPT
+ operator VkSamplerReductionModeCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>( this );
+ return *reinterpret_cast<VkSamplerReductionModeCreateInfo*>( this );
}
- bool operator==( SamplerReductionModeCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SamplerReductionModeCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( reductionMode == rhs.reductionMode );
}
- bool operator!=( SamplerReductionModeCreateInfoEXT const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SamplerReductionModeCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SamplerReductionModeCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerReductionModeCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage;
};
- static_assert( sizeof( SamplerReductionModeCreateInfoEXT ) == sizeof( VkSamplerReductionModeCreateInfoEXT ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SamplerReductionModeCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct SamplerYcbcrConversionCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( vk::Format format_ = vk::Format::eUndefined,
- vk::SamplerYcbcrModelConversion ycbcrModel_ = vk::SamplerYcbcrModelConversion::eRgbIdentity,
- vk::SamplerYcbcrRange ycbcrRange_ = vk::SamplerYcbcrRange::eItuFull,
- vk::ComponentMapping components_ = vk::ComponentMapping(),
- vk::ChromaLocation xChromaOffset_ = vk::ChromaLocation::eCositedEven,
- vk::ChromaLocation yChromaOffset_ = vk::ChromaLocation::eCositedEven,
- vk::Filter chromaFilter_ = vk::Filter::eNearest,
- vk::Bool32 forceExplicitReconstruction_ = 0 ) VULKAN_HPP_NOEXCEPT
- : format( format_ )
- , ycbcrModel( ycbcrModel_ )
- , ycbcrRange( ycbcrRange_ )
- , components( components_ )
- , xChromaOffset( xChromaOffset_ )
- , yChromaOffset( yChromaOffset_ )
- , chromaFilter( chromaFilter_ )
- , forceExplicitReconstruction( forceExplicitReconstruction_ )
- {}
-
- SamplerYcbcrConversionCreateInfo( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionCreateInfo*>(this) = rhs;
- }
-
- SamplerYcbcrConversionCreateInfo& operator=( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionCreateInfo*>(this) = rhs;
- return *this;
- }
+ static_assert( sizeof( SamplerReductionModeCreateInfo ) == sizeof( VkSamplerReductionModeCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SamplerReductionModeCreateInfo>::value, "struct wrapper is not a standard layout!" );
- public:
- vk::StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfo;
- const void* pNext = nullptr;
- vk::Format format;
- vk::SamplerYcbcrModelConversion ycbcrModel;
- vk::SamplerYcbcrRange ycbcrRange;
- vk::ComponentMapping components;
- vk::ChromaLocation xChromaOffset;
- vk::ChromaLocation yChromaOffset;
- vk::Filter chromaFilter;
- vk::Bool32 forceExplicitReconstruction;
- };
- static_assert( sizeof( SamplerYcbcrConversionCreateInfo ) == sizeof( VkSamplerYcbcrConversionCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct SamplerYcbcrConversionCreateInfo : public layout::SamplerYcbcrConversionCreateInfo
+ struct SamplerYcbcrConversionCreateInfo
{
- VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( vk::Format format_ = vk::Format::eUndefined,
- vk::SamplerYcbcrModelConversion ycbcrModel_ = vk::SamplerYcbcrModelConversion::eRgbIdentity,
- vk::SamplerYcbcrRange ycbcrRange_ = vk::SamplerYcbcrRange::eItuFull,
- vk::ComponentMapping components_ = vk::ComponentMapping(),
- vk::ChromaLocation xChromaOffset_ = vk::ChromaLocation::eCositedEven,
- vk::ChromaLocation yChromaOffset_ = vk::ChromaLocation::eCositedEven,
- vk::Filter chromaFilter_ = vk::Filter::eNearest,
- vk::Bool32 forceExplicitReconstruction_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionCreateInfo( format_, ycbcrModel_, ycbcrRange_, components_, xChromaOffset_, yChromaOffset_, chromaFilter_, forceExplicitReconstruction_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : format( format_ )
+ , ycbcrModel( ycbcrModel_ )
+ , ycbcrRange( ycbcrRange_ )
+ , components( components_ )
+ , xChromaOffset( xChromaOffset_ )
+ , yChromaOffset( yChromaOffset_ )
+ , chromaFilter( chromaFilter_ )
+ , forceExplicitReconstruction( forceExplicitReconstruction_ )
{}
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & operator=( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo ) - offsetof( SamplerYcbcrConversionCreateInfo, pNext ) );
+ return *this;
+ }
+
SamplerYcbcrConversionCreateInfo( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
SamplerYcbcrConversionCreateInfo& operator=( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SamplerYcbcrConversionCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const *>(&rhs);
return *this;
}
@@ -60929,49 +57221,49 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerYcbcrConversionCreateInfo & setFormat( vk::Format format_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT
{
format = format_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setYcbcrModel( vk::SamplerYcbcrModelConversion ycbcrModel_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setYcbcrModel( VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel_ ) VULKAN_HPP_NOEXCEPT
{
ycbcrModel = ycbcrModel_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setYcbcrRange( vk::SamplerYcbcrRange ycbcrRange_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setYcbcrRange( VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange_ ) VULKAN_HPP_NOEXCEPT
{
ycbcrRange = ycbcrRange_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setComponents( vk::ComponentMapping components_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping components_ ) VULKAN_HPP_NOEXCEPT
{
components = components_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setXChromaOffset( vk::ChromaLocation xChromaOffset_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setXChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset_ ) VULKAN_HPP_NOEXCEPT
{
xChromaOffset = xChromaOffset_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setYChromaOffset( vk::ChromaLocation yChromaOffset_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setYChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset_ ) VULKAN_HPP_NOEXCEPT
{
yChromaOffset = yChromaOffset_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setChromaFilter( vk::Filter chromaFilter_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setChromaFilter( VULKAN_HPP_NAMESPACE::Filter chromaFilter_ ) VULKAN_HPP_NOEXCEPT
{
chromaFilter = chromaFilter_;
return *this;
}
- SamplerYcbcrConversionCreateInfo & setForceExplicitReconstruction( vk::Bool32 forceExplicitReconstruction_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionCreateInfo & setForceExplicitReconstruction( VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction_ ) VULKAN_HPP_NOEXCEPT
{
forceExplicitReconstruction = forceExplicitReconstruction_;
return *this;
@@ -61006,52 +57298,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SamplerYcbcrConversionCreateInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SamplerYcbcrConversionCreateInfo ) == sizeof( VkSamplerYcbcrConversionCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SamplerYcbcrConversionCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SamplerYcbcrConversionImageFormatProperties
{
- struct SamplerYcbcrConversionImageFormatProperties
- {
- protected:
- SamplerYcbcrConversionImageFormatProperties() VULKAN_HPP_NOEXCEPT
- {}
-
- SamplerYcbcrConversionImageFormatProperties( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(this) = rhs;
- }
-
- SamplerYcbcrConversionImageFormatProperties& operator=( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatProperties;
- void* pNext = nullptr;
- uint32_t combinedImageSamplerDescriptorCount;
- };
- static_assert( sizeof( SamplerYcbcrConversionImageFormatProperties ) == sizeof( VkSamplerYcbcrConversionImageFormatProperties ), "layout struct and wrapper have different size!" );
- }
-
- struct SamplerYcbcrConversionImageFormatProperties : public layout::SamplerYcbcrConversionImageFormatProperties
- {
- SamplerYcbcrConversionImageFormatProperties() VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionImageFormatProperties()
+ SamplerYcbcrConversionImageFormatProperties( uint32_t combinedImageSamplerDescriptorCount_ = {} ) VULKAN_HPP_NOEXCEPT
+ : combinedImageSamplerDescriptorCount( combinedImageSamplerDescriptorCount_ )
{}
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties & operator=( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties ) - offsetof( SamplerYcbcrConversionImageFormatProperties, pNext ) );
+ return *this;
+ }
+
SamplerYcbcrConversionImageFormatProperties( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionImageFormatProperties( rhs )
- {}
+ {
+ *this = rhs;
+ }
SamplerYcbcrConversionImageFormatProperties& operator=( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SamplerYcbcrConversionImageFormatProperties::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties const *>(&rhs);
return *this;
}
@@ -61077,53 +57358,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SamplerYcbcrConversionImageFormatProperties::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatProperties;
+ void* pNext = {};
+ uint32_t combinedImageSamplerDescriptorCount = {};
};
static_assert( sizeof( SamplerYcbcrConversionImageFormatProperties ) == sizeof( VkSamplerYcbcrConversionImageFormatProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SamplerYcbcrConversionImageFormatProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SamplerYcbcrConversionInfo
{
- struct SamplerYcbcrConversionInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( vk::SamplerYcbcrConversion conversion_ = vk::SamplerYcbcrConversion() ) VULKAN_HPP_NOEXCEPT
- : conversion( conversion_ )
- {}
-
- SamplerYcbcrConversionInfo( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionInfo*>(this) = rhs;
- }
-
- SamplerYcbcrConversionInfo& operator=( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSamplerYcbcrConversionInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSamplerYcbcrConversionInfo;
- const void* pNext = nullptr;
- vk::SamplerYcbcrConversion conversion;
- };
- static_assert( sizeof( SamplerYcbcrConversionInfo ) == sizeof( VkSamplerYcbcrConversionInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct SamplerYcbcrConversionInfo : public layout::SamplerYcbcrConversionInfo
- {
- VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( vk::SamplerYcbcrConversion conversion_ = vk::SamplerYcbcrConversion() ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionInfo( conversion_ )
+ VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ = {} ) VULKAN_HPP_NOEXCEPT
+ : conversion( conversion_ )
{}
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo & operator=( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo ) - offsetof( SamplerYcbcrConversionInfo, pNext ) );
+ return *this;
+ }
+
SamplerYcbcrConversionInfo( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SamplerYcbcrConversionInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
SamplerYcbcrConversionInfo& operator=( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SamplerYcbcrConversionInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo const *>(&rhs);
return *this;
}
@@ -61133,7 +57395,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SamplerYcbcrConversionInfo & setConversion( vk::SamplerYcbcrConversion conversion_ ) VULKAN_HPP_NOEXCEPT
+ SamplerYcbcrConversionInfo & setConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ ) VULKAN_HPP_NOEXCEPT
{
conversion = conversion_;
return *this;
@@ -61161,53 +57423,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SamplerYcbcrConversionInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion = {};
};
static_assert( sizeof( SamplerYcbcrConversionInfo ) == sizeof( VkSamplerYcbcrConversionInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SamplerYcbcrConversionInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SemaphoreCreateInfo
{
- struct SemaphoreCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( vk::SemaphoreCreateFlags flags_ = vk::SemaphoreCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- {}
-
- SemaphoreCreateInfo( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreCreateInfo*>(this) = rhs;
- }
-
- SemaphoreCreateInfo& operator=( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreCreateInfo;
- const void* pNext = nullptr;
- vk::SemaphoreCreateFlags flags;
- };
- static_assert( sizeof( SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct SemaphoreCreateInfo : public layout::SemaphoreCreateInfo
- {
- VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( vk::SemaphoreCreateFlags flags_ = vk::SemaphoreCreateFlags() ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreCreateInfo( flags_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
{}
+ VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & operator=( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo ) - offsetof( SemaphoreCreateInfo, pNext ) );
+ return *this;
+ }
+
SemaphoreCreateInfo( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
SemaphoreCreateInfo& operator=( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const *>(&rhs);
return *this;
}
@@ -61217,7 +57460,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SemaphoreCreateInfo & setFlags( vk::SemaphoreCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -61245,57 +57488,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SemaphoreCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags = {};
};
static_assert( sizeof( SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SemaphoreCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SemaphoreGetFdInfoKHR
{
- struct SemaphoreGetFdInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : semaphore( semaphore_ )
- , handleType( handleType_ )
- {}
-
- SemaphoreGetFdInfoKHR( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreGetFdInfoKHR*>(this) = rhs;
- }
-
- SemaphoreGetFdInfoKHR& operator=( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreGetFdInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreGetFdInfoKHR;
- const void* pNext = nullptr;
- vk::Semaphore semaphore;
- vk::ExternalSemaphoreHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( SemaphoreGetFdInfoKHR ) == sizeof( VkSemaphoreGetFdInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SemaphoreGetFdInfoKHR : public layout::SemaphoreGetFdInfoKHR
- {
- VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreGetFdInfoKHR( semaphore_, handleType_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : semaphore( semaphore_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & operator=( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR ) - offsetof( SemaphoreGetFdInfoKHR, pNext ) );
+ return *this;
+ }
+
SemaphoreGetFdInfoKHR( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreGetFdInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SemaphoreGetFdInfoKHR& operator=( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreGetFdInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR const *>(&rhs);
return *this;
}
@@ -61305,13 +57527,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SemaphoreGetFdInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreGetFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- SemaphoreGetFdInfoKHR & setHandleType( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -61332,7 +57554,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( semaphore == rhs.semaphore )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( SemaphoreGetFdInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -61340,59 +57562,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SemaphoreGetFdInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( SemaphoreGetFdInfoKHR ) == sizeof( VkSemaphoreGetFdInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SemaphoreGetFdInfoKHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct SemaphoreGetWin32HandleInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : semaphore( semaphore_ )
- , handleType( handleType_ )
- {}
-
- SemaphoreGetWin32HandleInfoKHR( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreGetWin32HandleInfoKHR*>(this) = rhs;
- }
-
- SemaphoreGetWin32HandleInfoKHR& operator=( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreGetWin32HandleInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR;
- const void* pNext = nullptr;
- vk::Semaphore semaphore;
- vk::ExternalSemaphoreHandleTypeFlagBits handleType;
- };
- static_assert( sizeof( SemaphoreGetWin32HandleInfoKHR ) == sizeof( VkSemaphoreGetWin32HandleInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SemaphoreGetWin32HandleInfoKHR : public layout::SemaphoreGetWin32HandleInfoKHR
+ struct SemaphoreGetWin32HandleInfoKHR
{
- VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- vk::ExternalSemaphoreHandleTypeFlagBits handleType_ = vk::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreGetWin32HandleInfoKHR( semaphore_, handleType_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : semaphore( semaphore_ )
+ , handleType( handleType_ )
{}
+ VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & operator=( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR ) - offsetof( SemaphoreGetWin32HandleInfoKHR, pNext ) );
+ return *this;
+ }
+
SemaphoreGetWin32HandleInfoKHR( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreGetWin32HandleInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SemaphoreGetWin32HandleInfoKHR& operator=( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreGetWin32HandleInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR const *>(&rhs);
return *this;
}
@@ -61402,13 +57604,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SemaphoreGetWin32HandleInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreGetWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- SemaphoreGetWin32HandleInfoKHR & setHandleType( vk::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
{
handleType = handleType_;
return *this;
@@ -61429,7 +57631,7 @@ namespace VULKAN_HPP_NAMESPACE
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( semaphore == rhs.semaphore )
- && vk::operator==( handleType, rhs.handleType );
+ && ( handleType == rhs.handleType );
}
bool operator!=( SemaphoreGetWin32HandleInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
@@ -61437,90 +57639,70 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SemaphoreGetWin32HandleInfoKHR::sType;
+ public:
+ const 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;
};
static_assert( sizeof( SemaphoreGetWin32HandleInfoKHR ) == sizeof( VkSemaphoreGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SemaphoreGetWin32HandleInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct SemaphoreSignalInfo
{
- struct SemaphoreSignalInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreSignalInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- uint64_t value_ = 0 ) VULKAN_HPP_NOEXCEPT
- : semaphore( semaphore_ )
- , value( value_ )
- {}
-
- SemaphoreSignalInfoKHR( VkSemaphoreSignalInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreSignalInfoKHR*>(this) = rhs;
- }
-
- SemaphoreSignalInfoKHR& operator=( VkSemaphoreSignalInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreSignalInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreSignalInfoKHR;
- const void* pNext = nullptr;
- vk::Semaphore semaphore;
- uint64_t value;
- };
- static_assert( sizeof( SemaphoreSignalInfoKHR ) == sizeof( VkSemaphoreSignalInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SemaphoreSignalInfoKHR : public layout::SemaphoreSignalInfoKHR
- {
- VULKAN_HPP_CONSTEXPR SemaphoreSignalInfoKHR( vk::Semaphore semaphore_ = vk::Semaphore(),
- uint64_t value_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreSignalInfoKHR( semaphore_, value_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreSignalInfo( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {},
+ uint64_t value_ = {} ) VULKAN_HPP_NOEXCEPT
+ : semaphore( semaphore_ )
+ , value( value_ )
{}
- SemaphoreSignalInfoKHR( VkSemaphoreSignalInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreSignalInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & operator=( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo ) - offsetof( SemaphoreSignalInfo, pNext ) );
+ return *this;
+ }
+
+ SemaphoreSignalInfo( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- SemaphoreSignalInfoKHR& operator=( VkSemaphoreSignalInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SemaphoreSignalInfo& operator=( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreSignalInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo const *>(&rhs);
return *this;
}
- SemaphoreSignalInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreSignalInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SemaphoreSignalInfoKHR & setSemaphore( vk::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreSignalInfo & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT
{
semaphore = semaphore_;
return *this;
}
- SemaphoreSignalInfoKHR & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreSignalInfo & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT
{
value = value_;
return *this;
}
- operator VkSemaphoreSignalInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreSignalInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSemaphoreSignalInfoKHR*>( this );
+ return *reinterpret_cast<const VkSemaphoreSignalInfo*>( this );
}
- operator VkSemaphoreSignalInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreSignalInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSemaphoreSignalInfoKHR*>( this );
+ return *reinterpret_cast<VkSemaphoreSignalInfo*>( this );
}
- bool operator==( SemaphoreSignalInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SemaphoreSignalInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -61528,94 +57710,74 @@ namespace VULKAN_HPP_NAMESPACE
&& ( value == rhs.value );
}
- bool operator!=( SemaphoreSignalInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SemaphoreSignalInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SemaphoreSignalInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreSignalInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Semaphore semaphore = {};
+ uint64_t value = {};
};
- static_assert( sizeof( SemaphoreSignalInfoKHR ) == sizeof( VkSemaphoreSignalInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SemaphoreSignalInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct SemaphoreTypeCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfoKHR( vk::SemaphoreTypeKHR semaphoreType_ = vk::SemaphoreTypeKHR::eBinary,
- uint64_t initialValue_ = 0 ) VULKAN_HPP_NOEXCEPT
- : semaphoreType( semaphoreType_ )
- , initialValue( initialValue_ )
- {}
-
- SemaphoreTypeCreateInfoKHR( VkSemaphoreTypeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreTypeCreateInfoKHR*>(this) = rhs;
- }
+ static_assert( sizeof( SemaphoreSignalInfo ) == sizeof( VkSemaphoreSignalInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SemaphoreSignalInfo>::value, "struct wrapper is not a standard layout!" );
- SemaphoreTypeCreateInfoKHR& operator=( VkSemaphoreTypeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreTypeCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreTypeCreateInfoKHR;
- const void* pNext = nullptr;
- vk::SemaphoreTypeKHR semaphoreType;
- uint64_t initialValue;
- };
- static_assert( sizeof( SemaphoreTypeCreateInfoKHR ) == sizeof( VkSemaphoreTypeCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SemaphoreTypeCreateInfoKHR : public layout::SemaphoreTypeCreateInfoKHR
+ struct SemaphoreTypeCreateInfo
{
- VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfoKHR( vk::SemaphoreTypeKHR semaphoreType_ = vk::SemaphoreTypeKHR::eBinary,
- uint64_t initialValue_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreTypeCreateInfoKHR( semaphoreType_, initialValue_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary,
+ uint64_t initialValue_ = {} ) VULKAN_HPP_NOEXCEPT
+ : semaphoreType( semaphoreType_ )
+ , initialValue( initialValue_ )
{}
- SemaphoreTypeCreateInfoKHR( VkSemaphoreTypeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreTypeCreateInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo & operator=( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo ) - offsetof( SemaphoreTypeCreateInfo, pNext ) );
+ return *this;
+ }
- SemaphoreTypeCreateInfoKHR& operator=( VkSemaphoreTypeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SemaphoreTypeCreateInfo( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreTypeCreateInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ SemaphoreTypeCreateInfo& operator=( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo const *>(&rhs);
return *this;
}
- SemaphoreTypeCreateInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreTypeCreateInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SemaphoreTypeCreateInfoKHR & setSemaphoreType( vk::SemaphoreTypeKHR semaphoreType_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreTypeCreateInfo & setSemaphoreType( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ ) VULKAN_HPP_NOEXCEPT
{
semaphoreType = semaphoreType_;
return *this;
}
- SemaphoreTypeCreateInfoKHR & setInitialValue( uint64_t initialValue_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreTypeCreateInfo & setInitialValue( uint64_t initialValue_ ) VULKAN_HPP_NOEXCEPT
{
initialValue = initialValue_;
return *this;
}
- operator VkSemaphoreTypeCreateInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreTypeCreateInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSemaphoreTypeCreateInfoKHR*>( this );
+ return *reinterpret_cast<const VkSemaphoreTypeCreateInfo*>( this );
}
- operator VkSemaphoreTypeCreateInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreTypeCreateInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSemaphoreTypeCreateInfoKHR*>( this );
+ return *reinterpret_cast<VkSemaphoreTypeCreateInfo*>( this );
}
- bool operator==( SemaphoreTypeCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SemaphoreTypeCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -61623,114 +57785,90 @@ namespace VULKAN_HPP_NAMESPACE
&& ( initialValue == rhs.initialValue );
}
- bool operator!=( SemaphoreTypeCreateInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SemaphoreTypeCreateInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SemaphoreTypeCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreTypeCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary;
+ uint64_t initialValue = {};
};
- static_assert( sizeof( SemaphoreTypeCreateInfoKHR ) == sizeof( VkSemaphoreTypeCreateInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SemaphoreTypeCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct SemaphoreWaitInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SemaphoreWaitInfoKHR( vk::SemaphoreWaitFlagsKHR flags_ = vk::SemaphoreWaitFlagsKHR(),
- uint32_t semaphoreCount_ = 0,
- const vk::Semaphore* pSemaphores_ = nullptr,
- const uint64_t* pValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , semaphoreCount( semaphoreCount_ )
- , pSemaphores( pSemaphores_ )
- , pValues( pValues_ )
- {}
-
- SemaphoreWaitInfoKHR( VkSemaphoreWaitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreWaitInfoKHR*>(this) = rhs;
- }
-
- SemaphoreWaitInfoKHR& operator=( VkSemaphoreWaitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSemaphoreWaitInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSemaphoreWaitInfoKHR;
- const void* pNext = nullptr;
- vk::SemaphoreWaitFlagsKHR flags;
- uint32_t semaphoreCount;
- const vk::Semaphore* pSemaphores;
- const uint64_t* pValues;
- };
- static_assert( sizeof( SemaphoreWaitInfoKHR ) == sizeof( VkSemaphoreWaitInfoKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( SemaphoreTypeCreateInfo ) == sizeof( VkSemaphoreTypeCreateInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SemaphoreTypeCreateInfo>::value, "struct wrapper is not a standard layout!" );
- struct SemaphoreWaitInfoKHR : public layout::SemaphoreWaitInfoKHR
+ struct SemaphoreWaitInfo
{
- VULKAN_HPP_CONSTEXPR SemaphoreWaitInfoKHR( vk::SemaphoreWaitFlagsKHR flags_ = vk::SemaphoreWaitFlagsKHR(),
- uint32_t semaphoreCount_ = 0,
- const vk::Semaphore* pSemaphores_ = nullptr,
- const uint64_t* pValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreWaitInfoKHR( flags_, semaphoreCount_, pSemaphores_, pValues_ )
+ VULKAN_HPP_CONSTEXPR SemaphoreWaitInfo( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ = {},
+ uint32_t semaphoreCount_ = {},
+ const VULKAN_HPP_NAMESPACE::Semaphore* pSemaphores_ = {},
+ const uint64_t* pValues_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , semaphoreCount( semaphoreCount_ )
+ , pSemaphores( pSemaphores_ )
+ , pValues( pValues_ )
{}
- SemaphoreWaitInfoKHR( VkSemaphoreWaitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SemaphoreWaitInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & operator=( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo ) - offsetof( SemaphoreWaitInfo, pNext ) );
+ return *this;
+ }
- SemaphoreWaitInfoKHR& operator=( VkSemaphoreWaitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SemaphoreWaitInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ SemaphoreWaitInfo& operator=( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo const *>(&rhs);
return *this;
}
- SemaphoreWaitInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SemaphoreWaitInfoKHR & setFlags( vk::SemaphoreWaitFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- SemaphoreWaitInfoKHR & setSemaphoreCount( uint32_t semaphoreCount_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo & setSemaphoreCount( uint32_t semaphoreCount_ ) VULKAN_HPP_NOEXCEPT
{
semaphoreCount = semaphoreCount_;
return *this;
}
- SemaphoreWaitInfoKHR & setPSemaphores( const vk::Semaphore* pSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo & setPSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pSemaphores = pSemaphores_;
return *this;
}
- SemaphoreWaitInfoKHR & setPValues( const uint64_t* pValues_ ) VULKAN_HPP_NOEXCEPT
+ SemaphoreWaitInfo & setPValues( const uint64_t* pValues_ ) VULKAN_HPP_NOEXCEPT
{
pValues = pValues_;
return *this;
}
- operator VkSemaphoreWaitInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreWaitInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSemaphoreWaitInfoKHR*>( this );
+ return *reinterpret_cast<const VkSemaphoreWaitInfo*>( this );
}
- operator VkSemaphoreWaitInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSemaphoreWaitInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSemaphoreWaitInfoKHR*>( this );
+ return *reinterpret_cast<VkSemaphoreWaitInfo*>( this );
}
- bool operator==( SemaphoreWaitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SemaphoreWaitInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -61740,66 +57878,46 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pValues == rhs.pValues );
}
- bool operator!=( SemaphoreWaitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SemaphoreWaitInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SemaphoreWaitInfoKHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( SemaphoreWaitInfoKHR ) == sizeof( VkSemaphoreWaitInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SemaphoreWaitInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct ShaderModuleCreateInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( vk::ShaderModuleCreateFlags flags_ = vk::ShaderModuleCreateFlags(),
- size_t codeSize_ = 0,
- const uint32_t* pCode_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , codeSize( codeSize_ )
- , pCode( pCode_ )
- {}
-
- ShaderModuleCreateInfo( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkShaderModuleCreateInfo*>(this) = rhs;
- }
-
- ShaderModuleCreateInfo& operator=( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkShaderModuleCreateInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eShaderModuleCreateInfo;
- const void* pNext = nullptr;
- vk::ShaderModuleCreateFlags flags;
- size_t codeSize;
- const uint32_t* pCode;
- };
- static_assert( sizeof( ShaderModuleCreateInfo ) == sizeof( VkShaderModuleCreateInfo ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( SemaphoreWaitInfo ) == sizeof( VkSemaphoreWaitInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SemaphoreWaitInfo>::value, "struct wrapper is not a standard layout!" );
- struct ShaderModuleCreateInfo : public layout::ShaderModuleCreateInfo
+ struct ShaderModuleCreateInfo
{
- VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( vk::ShaderModuleCreateFlags flags_ = vk::ShaderModuleCreateFlags(),
- size_t codeSize_ = 0,
- const uint32_t* pCode_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ShaderModuleCreateInfo( flags_, codeSize_, pCode_ )
+ VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ = {},
+ size_t codeSize_ = {},
+ const uint32_t* pCode_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , codeSize( codeSize_ )
+ , pCode( pCode_ )
{}
+ VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & operator=( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo ) - offsetof( ShaderModuleCreateInfo, pNext ) );
+ return *this;
+ }
+
ShaderModuleCreateInfo( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ShaderModuleCreateInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
ShaderModuleCreateInfo& operator=( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ShaderModuleCreateInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const *>(&rhs);
return *this;
}
@@ -61809,7 +57927,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ShaderModuleCreateInfo & setFlags( vk::ShaderModuleCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
+ ShaderModuleCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -61851,53 +57969,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ShaderModuleCreateInfo::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleCreateInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags = {};
+ size_t codeSize = {};
+ const uint32_t* pCode = {};
};
static_assert( sizeof( ShaderModuleCreateInfo ) == sizeof( VkShaderModuleCreateInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ShaderModuleCreateInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ShaderModuleValidationCacheCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( vk::ValidationCacheEXT validationCache_ = vk::ValidationCacheEXT() ) VULKAN_HPP_NOEXCEPT
- : validationCache( validationCache_ )
- {}
-
- ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(this) = rhs;
- }
-
- ShaderModuleValidationCacheCreateInfoEXT& operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT;
- const void* pNext = nullptr;
- vk::ValidationCacheEXT validationCache;
- };
- static_assert( sizeof( ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ShaderModuleValidationCacheCreateInfoEXT : public layout::ShaderModuleValidationCacheCreateInfoEXT
+ struct ShaderModuleValidationCacheCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( vk::ValidationCacheEXT validationCache_ = vk::ValidationCacheEXT() ) VULKAN_HPP_NOEXCEPT
- : layout::ShaderModuleValidationCacheCreateInfoEXT( validationCache_ )
+ VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ = {} ) VULKAN_HPP_NOEXCEPT
+ : validationCache( validationCache_ )
{}
+ VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT ) - offsetof( ShaderModuleValidationCacheCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ShaderModuleValidationCacheCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ShaderModuleValidationCacheCreateInfoEXT& operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ShaderModuleValidationCacheCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -61907,7 +58008,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ShaderModuleValidationCacheCreateInfoEXT & setValidationCache( vk::ValidationCacheEXT validationCache_ ) VULKAN_HPP_NOEXCEPT
+ ShaderModuleValidationCacheCreateInfoEXT & setValidationCache( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ ) VULKAN_HPP_NOEXCEPT
{
validationCache = validationCache_;
return *this;
@@ -61935,25 +58036,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ShaderModuleValidationCacheCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache = {};
};
static_assert( sizeof( ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ShaderModuleValidationCacheCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
struct ShaderResourceUsageAMD
{
- ShaderResourceUsageAMD() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
ShaderResourceUsageAMD( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShaderResourceUsageAMD*>(this) = rhs;
+ *this = rhs;
}
ShaderResourceUsageAMD& operator=( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShaderResourceUsageAMD*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD const *>(&rhs);
return *this;
}
@@ -61982,28 +58094,43 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t numUsedVgprs;
- uint32_t numUsedSgprs;
- uint32_t ldsSizePerLocalWorkGroup;
- size_t ldsUsageSizeInBytes;
- size_t scratchMemUsageInBytes;
+ uint32_t numUsedVgprs = {};
+ uint32_t numUsedSgprs = {};
+ uint32_t ldsSizePerLocalWorkGroup = {};
+ size_t ldsUsageSizeInBytes = {};
+ size_t scratchMemUsageInBytes = {};
};
static_assert( sizeof( ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ShaderResourceUsageAMD>::value, "struct wrapper is not a standard layout!" );
struct ShaderStatisticsInfoAMD
{
- ShaderStatisticsInfoAMD() VULKAN_HPP_NOEXCEPT
- {}
+ 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<uint32_t,3> const& computeWorkGroupSize_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderStageMask( shaderStageMask_ )
+ , resourceUsage( resourceUsage_ )
+ , numPhysicalVgprs( numPhysicalVgprs_ )
+ , numPhysicalSgprs( numPhysicalSgprs_ )
+ , numAvailableVgprs( numAvailableVgprs_ )
+ , numAvailableSgprs( numAvailableSgprs_ )
+ , computeWorkGroupSize{}
+ {
+ VULKAN_HPP_NAMESPACE::ConstExpression1DArrayCopy<uint32_t,3,3>::copy( computeWorkGroupSize, computeWorkGroupSize_ );
+ }
ShaderStatisticsInfoAMD( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShaderStatisticsInfoAMD*>(this) = rhs;
+ *this = rhs;
}
ShaderStatisticsInfoAMD& operator=( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkShaderStatisticsInfoAMD*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ShaderStatisticsInfoAMD const *>(&rhs);
return *this;
}
@@ -62034,57 +58161,37 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ShaderStageFlags shaderStageMask;
- vk::ShaderResourceUsageAMD resourceUsage;
- uint32_t numPhysicalVgprs;
- uint32_t numPhysicalSgprs;
- uint32_t numAvailableVgprs;
- uint32_t numAvailableSgprs;
- uint32_t computeWorkGroupSize[3];
+ VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStageMask = {};
+ VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD resourceUsage = {};
+ uint32_t numPhysicalVgprs = {};
+ uint32_t numPhysicalSgprs = {};
+ uint32_t numAvailableVgprs = {};
+ uint32_t numAvailableSgprs = {};
+ uint32_t computeWorkGroupSize[3] = {};
};
static_assert( sizeof( ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ShaderStatisticsInfoAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SharedPresentSurfaceCapabilitiesKHR
{
- struct SharedPresentSurfaceCapabilitiesKHR
- {
- protected:
- SharedPresentSurfaceCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- SharedPresentSurfaceCapabilitiesKHR( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(this) = rhs;
- }
-
- SharedPresentSurfaceCapabilitiesKHR& operator=( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR;
- void* pNext = nullptr;
- vk::ImageUsageFlags sharedPresentSupportedUsageFlags;
- };
- static_assert( sizeof( SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SharedPresentSurfaceCapabilitiesKHR : public layout::SharedPresentSurfaceCapabilitiesKHR
- {
- SharedPresentSurfaceCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
- : layout::SharedPresentSurfaceCapabilitiesKHR()
+ SharedPresentSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags_ = {} ) VULKAN_HPP_NOEXCEPT
+ : sharedPresentSupportedUsageFlags( sharedPresentSupportedUsageFlags_ )
{}
+ VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR & operator=( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR ) - offsetof( SharedPresentSurfaceCapabilitiesKHR, pNext ) );
+ return *this;
+ }
+
SharedPresentSurfaceCapabilitiesKHR( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SharedPresentSurfaceCapabilitiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SharedPresentSurfaceCapabilitiesKHR& operator=( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SharedPresentSurfaceCapabilitiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR const *>(&rhs);
return *this;
}
@@ -62110,25 +58217,32 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SharedPresentSurfaceCapabilitiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags = {};
};
static_assert( sizeof( SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SharedPresentSurfaceCapabilitiesKHR>::value, "struct wrapper is not a standard layout!" );
struct SparseImageFormatProperties
{
- SparseImageFormatProperties() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
SparseImageFormatProperties( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageFormatProperties*>(this) = rhs;
+ *this = rhs;
}
SparseImageFormatProperties& operator=( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageFormatProperties*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties const *>(&rhs);
return *this;
}
@@ -62155,53 +58269,33 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::ImageAspectFlags aspectMask;
- vk::Extent3D imageGranularity;
- vk::SparseImageFormatFlags flags;
+ VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {};
+ VULKAN_HPP_NAMESPACE::Extent3D imageGranularity = {};
+ VULKAN_HPP_NAMESPACE::SparseImageFormatFlags flags = {};
};
static_assert( sizeof( SparseImageFormatProperties ) == sizeof( VkSparseImageFormatProperties ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageFormatProperties>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SparseImageFormatProperties2
- {
- protected:
- SparseImageFormatProperties2() VULKAN_HPP_NOEXCEPT
- {}
-
- SparseImageFormatProperties2( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSparseImageFormatProperties2*>(this) = rhs;
- }
-
- SparseImageFormatProperties2& operator=( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSparseImageFormatProperties2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSparseImageFormatProperties2;
- void* pNext = nullptr;
- vk::SparseImageFormatProperties properties;
- };
- static_assert( sizeof( SparseImageFormatProperties2 ) == sizeof( VkSparseImageFormatProperties2 ), "layout struct and wrapper have different size!" );
- }
-
- struct SparseImageFormatProperties2 : public layout::SparseImageFormatProperties2
+ struct SparseImageFormatProperties2
{
- SparseImageFormatProperties2() VULKAN_HPP_NOEXCEPT
- : layout::SparseImageFormatProperties2()
+ SparseImageFormatProperties2( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties_ = {} ) VULKAN_HPP_NOEXCEPT
+ : properties( properties_ )
{}
+ VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 & operator=( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 ) - offsetof( SparseImageFormatProperties2, pNext ) );
+ return *this;
+ }
+
SparseImageFormatProperties2( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SparseImageFormatProperties2( rhs )
- {}
+ {
+ *this = rhs;
+ }
SparseImageFormatProperties2& operator=( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SparseImageFormatProperties2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 const *>(&rhs);
return *this;
}
@@ -62227,25 +58321,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SparseImageFormatProperties2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageFormatProperties2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties = {};
};
static_assert( sizeof( SparseImageFormatProperties2 ) == sizeof( VkSparseImageFormatProperties2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageFormatProperties2>::value, "struct wrapper is not a standard layout!" );
struct SparseImageMemoryRequirements
{
- SparseImageMemoryRequirements() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
SparseImageMemoryRequirements( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryRequirements*>(this) = rhs;
+ *this = rhs;
}
SparseImageMemoryRequirements& operator=( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSparseImageMemoryRequirements*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements const *>(&rhs);
return *this;
}
@@ -62274,55 +58379,35 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::SparseImageFormatProperties formatProperties;
- uint32_t imageMipTailFirstLod;
- vk::DeviceSize imageMipTailSize;
- vk::DeviceSize imageMipTailOffset;
- vk::DeviceSize imageMipTailStride;
+ VULKAN_HPP_NAMESPACE::SparseImageFormatProperties formatProperties = {};
+ uint32_t imageMipTailFirstLod = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailSize = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailOffset = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailStride = {};
};
static_assert( sizeof( SparseImageMemoryRequirements ) == sizeof( VkSparseImageMemoryRequirements ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageMemoryRequirements>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SparseImageMemoryRequirements2
{
- struct SparseImageMemoryRequirements2
- {
- protected:
- SparseImageMemoryRequirements2() VULKAN_HPP_NOEXCEPT
- {}
-
- SparseImageMemoryRequirements2( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSparseImageMemoryRequirements2*>(this) = rhs;
- }
-
- SparseImageMemoryRequirements2& operator=( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSparseImageMemoryRequirements2*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSparseImageMemoryRequirements2;
- void* pNext = nullptr;
- vk::SparseImageMemoryRequirements memoryRequirements;
- };
- static_assert( sizeof( SparseImageMemoryRequirements2 ) == sizeof( VkSparseImageMemoryRequirements2 ), "layout struct and wrapper have different size!" );
- }
-
- struct SparseImageMemoryRequirements2 : public layout::SparseImageMemoryRequirements2
- {
- SparseImageMemoryRequirements2() VULKAN_HPP_NOEXCEPT
- : layout::SparseImageMemoryRequirements2()
+ SparseImageMemoryRequirements2( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements_ = {} ) VULKAN_HPP_NOEXCEPT
+ : memoryRequirements( memoryRequirements_ )
{}
+ VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 & operator=( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 ) - offsetof( SparseImageMemoryRequirements2, pNext ) );
+ return *this;
+ }
+
SparseImageMemoryRequirements2( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SparseImageMemoryRequirements2( rhs )
- {}
+ {
+ *this = rhs;
+ }
SparseImageMemoryRequirements2& operator=( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SparseImageMemoryRequirements2::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 const *>(&rhs);
return *this;
}
@@ -62348,59 +58433,38 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SparseImageMemoryRequirements2::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageMemoryRequirements2;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements = {};
};
static_assert( sizeof( SparseImageMemoryRequirements2 ) == sizeof( VkSparseImageMemoryRequirements2 ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SparseImageMemoryRequirements2>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_GGP
- namespace layout
- {
- struct StreamDescriptorSurfaceCreateInfoGGP
- {
- protected:
- VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( vk::StreamDescriptorSurfaceCreateFlagsGGP flags_ = vk::StreamDescriptorSurfaceCreateFlagsGGP(),
- GgpStreamDescriptor streamDescriptor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , streamDescriptor( streamDescriptor_ )
- {}
-
- StreamDescriptorSurfaceCreateInfoGGP( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkStreamDescriptorSurfaceCreateInfoGGP*>(this) = rhs;
- }
-
- StreamDescriptorSurfaceCreateInfoGGP& operator=( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkStreamDescriptorSurfaceCreateInfoGGP*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP;
- const void* pNext = nullptr;
- vk::StreamDescriptorSurfaceCreateFlagsGGP flags;
- GgpStreamDescriptor streamDescriptor;
- };
- static_assert( sizeof( StreamDescriptorSurfaceCreateInfoGGP ) == sizeof( VkStreamDescriptorSurfaceCreateInfoGGP ), "layout struct and wrapper have different size!" );
- }
-
- struct StreamDescriptorSurfaceCreateInfoGGP : public layout::StreamDescriptorSurfaceCreateInfoGGP
+ struct StreamDescriptorSurfaceCreateInfoGGP
{
- VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( vk::StreamDescriptorSurfaceCreateFlagsGGP flags_ = vk::StreamDescriptorSurfaceCreateFlagsGGP(),
- GgpStreamDescriptor streamDescriptor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::StreamDescriptorSurfaceCreateInfoGGP( flags_, streamDescriptor_ )
+ VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ = {},
+ GgpStreamDescriptor streamDescriptor_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , streamDescriptor( streamDescriptor_ )
{}
+ VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & operator=( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP ) - offsetof( StreamDescriptorSurfaceCreateInfoGGP, pNext ) );
+ return *this;
+ }
+
StreamDescriptorSurfaceCreateInfoGGP( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::StreamDescriptorSurfaceCreateInfoGGP( rhs )
- {}
+ {
+ *this = rhs;
+ }
StreamDescriptorSurfaceCreateInfoGGP& operator=( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::StreamDescriptorSurfaceCreateInfoGGP::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const *>(&rhs);
return *this;
}
@@ -62410,7 +58474,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- StreamDescriptorSurfaceCreateInfoGGP & setFlags( vk::StreamDescriptorSurfaceCreateFlagsGGP flags_ ) VULKAN_HPP_NOEXCEPT
+ StreamDescriptorSurfaceCreateInfoGGP & setFlags( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -62445,78 +58509,48 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::StreamDescriptorSurfaceCreateInfoGGP::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags = {};
+ GgpStreamDescriptor streamDescriptor = {};
};
static_assert( sizeof( StreamDescriptorSurfaceCreateInfoGGP ) == sizeof( VkStreamDescriptorSurfaceCreateInfoGGP ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<StreamDescriptorSurfaceCreateInfoGGP>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_GGP*/
- namespace layout
+ struct SubmitInfo
{
- struct SubmitInfo
- {
- protected:
- VULKAN_HPP_CONSTEXPR SubmitInfo( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- const vk::PipelineStageFlags* pWaitDstStageMask_ = nullptr,
- uint32_t commandBufferCount_ = 0,
- const vk::CommandBuffer* pCommandBuffers_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const vk::Semaphore* pSignalSemaphores_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreCount( waitSemaphoreCount_ )
- , pWaitSemaphores( pWaitSemaphores_ )
- , pWaitDstStageMask( pWaitDstStageMask_ )
- , commandBufferCount( commandBufferCount_ )
- , pCommandBuffers( pCommandBuffers_ )
- , signalSemaphoreCount( signalSemaphoreCount_ )
- , pSignalSemaphores( pSignalSemaphores_ )
- {}
-
- SubmitInfo( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubmitInfo*>(this) = rhs;
- }
-
- SubmitInfo& operator=( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubmitInfo*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubmitInfo;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreCount;
- const vk::Semaphore* pWaitSemaphores;
- const vk::PipelineStageFlags* pWaitDstStageMask;
- uint32_t commandBufferCount;
- const vk::CommandBuffer* pCommandBuffers;
- uint32_t signalSemaphoreCount;
- const vk::Semaphore* pSignalSemaphores;
- };
- static_assert( sizeof( SubmitInfo ) == sizeof( VkSubmitInfo ), "layout struct and wrapper have different size!" );
- }
-
- struct SubmitInfo : public layout::SubmitInfo
- {
- VULKAN_HPP_CONSTEXPR SubmitInfo( uint32_t waitSemaphoreCount_ = 0,
- const vk::Semaphore* pWaitSemaphores_ = nullptr,
- const vk::PipelineStageFlags* pWaitDstStageMask_ = nullptr,
- uint32_t commandBufferCount_ = 0,
- const vk::CommandBuffer* pCommandBuffers_ = nullptr,
- uint32_t signalSemaphoreCount_ = 0,
- const vk::Semaphore* pSignalSemaphores_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::SubmitInfo( waitSemaphoreCount_, pWaitSemaphores_, pWaitDstStageMask_, commandBufferCount_, pCommandBuffers_, signalSemaphoreCount_, pSignalSemaphores_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , pWaitDstStageMask( pWaitDstStageMask_ )
+ , commandBufferCount( commandBufferCount_ )
+ , pCommandBuffers( pCommandBuffers_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphores( pSignalSemaphores_ )
{}
+ VULKAN_HPP_NAMESPACE::SubmitInfo & operator=( VULKAN_HPP_NAMESPACE::SubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubmitInfo ) - offsetof( SubmitInfo, pNext ) );
+ return *this;
+ }
+
SubmitInfo( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubmitInfo( rhs )
- {}
+ {
+ *this = rhs;
+ }
SubmitInfo& operator=( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubmitInfo::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubmitInfo const *>(&rhs);
return *this;
}
@@ -62532,13 +58566,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubmitInfo & setPWaitSemaphores( const vk::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ SubmitInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pWaitSemaphores = pWaitSemaphores_;
return *this;
}
- SubmitInfo & setPWaitDstStageMask( const vk::PipelineStageFlags* pWaitDstStageMask_ ) VULKAN_HPP_NOEXCEPT
+ SubmitInfo & setPWaitDstStageMask( const VULKAN_HPP_NAMESPACE::PipelineStageFlags* pWaitDstStageMask_ ) VULKAN_HPP_NOEXCEPT
{
pWaitDstStageMask = pWaitDstStageMask_;
return *this;
@@ -62550,7 +58584,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubmitInfo & setPCommandBuffers( const vk::CommandBuffer* pCommandBuffers_ ) VULKAN_HPP_NOEXCEPT
+ SubmitInfo & setPCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers_ ) VULKAN_HPP_NOEXCEPT
{
pCommandBuffers = pCommandBuffers_;
return *this;
@@ -62562,7 +58596,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SubmitInfo & setPSignalSemaphores( const vk::Semaphore* pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT
+ SubmitInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore* pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT
{
pSignalSemaphores = pSignalSemaphores_;
return *this;
@@ -62596,327 +58630,266 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SubmitInfo::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SubmitInfo ) == sizeof( VkSubmitInfo ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SubmitInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SubpassBeginInfo
{
- struct SubpassBeginInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SubpassBeginInfoKHR( vk::SubpassContents contents_ = vk::SubpassContents::eInline ) VULKAN_HPP_NOEXCEPT
- : contents( contents_ )
- {}
-
- SubpassBeginInfoKHR( VkSubpassBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassBeginInfoKHR*>(this) = rhs;
- }
-
- SubpassBeginInfoKHR& operator=( VkSubpassBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassBeginInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubpassBeginInfoKHR;
- const void* pNext = nullptr;
- vk::SubpassContents contents;
- };
- static_assert( sizeof( SubpassBeginInfoKHR ) == sizeof( VkSubpassBeginInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SubpassBeginInfoKHR : public layout::SubpassBeginInfoKHR
- {
- VULKAN_HPP_CONSTEXPR SubpassBeginInfoKHR( vk::SubpassContents contents_ = vk::SubpassContents::eInline ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassBeginInfoKHR( contents_ )
+ VULKAN_HPP_CONSTEXPR SubpassBeginInfo( VULKAN_HPP_NAMESPACE::SubpassContents contents_ = VULKAN_HPP_NAMESPACE::SubpassContents::eInline ) VULKAN_HPP_NOEXCEPT
+ : contents( contents_ )
{}
- SubpassBeginInfoKHR( VkSubpassBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassBeginInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SubpassBeginInfo & operator=( VULKAN_HPP_NAMESPACE::SubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubpassBeginInfo ) - offsetof( SubpassBeginInfo, pNext ) );
+ return *this;
+ }
+
+ SubpassBeginInfo( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- SubpassBeginInfoKHR& operator=( VkSubpassBeginInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SubpassBeginInfo& operator=( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubpassBeginInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassBeginInfo const *>(&rhs);
return *this;
}
- SubpassBeginInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SubpassBeginInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SubpassBeginInfoKHR & setContents( vk::SubpassContents contents_ ) VULKAN_HPP_NOEXCEPT
+ SubpassBeginInfo & setContents( VULKAN_HPP_NAMESPACE::SubpassContents contents_ ) VULKAN_HPP_NOEXCEPT
{
contents = contents_;
return *this;
}
- operator VkSubpassBeginInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSubpassBeginInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSubpassBeginInfoKHR*>( this );
+ return *reinterpret_cast<const VkSubpassBeginInfo*>( this );
}
- operator VkSubpassBeginInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSubpassBeginInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSubpassBeginInfoKHR*>( this );
+ return *reinterpret_cast<VkSubpassBeginInfo*>( this );
}
- bool operator==( SubpassBeginInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SubpassBeginInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( contents == rhs.contents );
}
- bool operator!=( SubpassBeginInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SubpassBeginInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SubpassBeginInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassBeginInfo;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SubpassContents contents = VULKAN_HPP_NAMESPACE::SubpassContents::eInline;
};
- static_assert( sizeof( SubpassBeginInfoKHR ) == sizeof( VkSubpassBeginInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SubpassBeginInfoKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct SubpassDescriptionDepthStencilResolveKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SubpassDescriptionDepthStencilResolveKHR( vk::ResolveModeFlagBitsKHR depthResolveMode_ = vk::ResolveModeFlagBitsKHR::eNone,
- vk::ResolveModeFlagBitsKHR stencilResolveMode_ = vk::ResolveModeFlagBitsKHR::eNone,
- const vk::AttachmentReference2KHR* pDepthStencilResolveAttachment_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : depthResolveMode( depthResolveMode_ )
- , stencilResolveMode( stencilResolveMode_ )
- , pDepthStencilResolveAttachment( pDepthStencilResolveAttachment_ )
- {}
-
- SubpassDescriptionDepthStencilResolveKHR( VkSubpassDescriptionDepthStencilResolveKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDescriptionDepthStencilResolveKHR*>(this) = rhs;
- }
+ static_assert( sizeof( SubpassBeginInfo ) == sizeof( VkSubpassBeginInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SubpassBeginInfo>::value, "struct wrapper is not a standard layout!" );
- SubpassDescriptionDepthStencilResolveKHR& operator=( VkSubpassDescriptionDepthStencilResolveKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassDescriptionDepthStencilResolveKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubpassDescriptionDepthStencilResolveKHR;
- const void* pNext = nullptr;
- vk::ResolveModeFlagBitsKHR depthResolveMode;
- vk::ResolveModeFlagBitsKHR stencilResolveMode;
- const vk::AttachmentReference2KHR* pDepthStencilResolveAttachment;
- };
- static_assert( sizeof( SubpassDescriptionDepthStencilResolveKHR ) == sizeof( VkSubpassDescriptionDepthStencilResolveKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SubpassDescriptionDepthStencilResolveKHR : public layout::SubpassDescriptionDepthStencilResolveKHR
+ struct SubpassDescriptionDepthStencilResolve
{
- VULKAN_HPP_CONSTEXPR SubpassDescriptionDepthStencilResolveKHR( vk::ResolveModeFlagBitsKHR depthResolveMode_ = vk::ResolveModeFlagBitsKHR::eNone,
- vk::ResolveModeFlagBitsKHR stencilResolveMode_ = vk::ResolveModeFlagBitsKHR::eNone,
- const vk::AttachmentReference2KHR* pDepthStencilResolveAttachment_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDescriptionDepthStencilResolveKHR( depthResolveMode_, stencilResolveMode_, pDepthStencilResolveAttachment_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : depthResolveMode( depthResolveMode_ )
+ , stencilResolveMode( stencilResolveMode_ )
+ , pDepthStencilResolveAttachment( pDepthStencilResolveAttachment_ )
{}
- SubpassDescriptionDepthStencilResolveKHR( VkSubpassDescriptionDepthStencilResolveKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassDescriptionDepthStencilResolveKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve & operator=( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve ) - offsetof( SubpassDescriptionDepthStencilResolve, pNext ) );
+ return *this;
+ }
- SubpassDescriptionDepthStencilResolveKHR& operator=( VkSubpassDescriptionDepthStencilResolveKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SubpassDescriptionDepthStencilResolve( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubpassDescriptionDepthStencilResolveKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ SubpassDescriptionDepthStencilResolve& operator=( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve const *>(&rhs);
return *this;
}
- SubpassDescriptionDepthStencilResolveKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescriptionDepthStencilResolve & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- SubpassDescriptionDepthStencilResolveKHR & setDepthResolveMode( vk::ResolveModeFlagBitsKHR depthResolveMode_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescriptionDepthStencilResolve & setDepthResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode_ ) VULKAN_HPP_NOEXCEPT
{
depthResolveMode = depthResolveMode_;
return *this;
}
- SubpassDescriptionDepthStencilResolveKHR & setStencilResolveMode( vk::ResolveModeFlagBitsKHR stencilResolveMode_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescriptionDepthStencilResolve & setStencilResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode_ ) VULKAN_HPP_NOEXCEPT
{
stencilResolveMode = stencilResolveMode_;
return *this;
}
- SubpassDescriptionDepthStencilResolveKHR & setPDepthStencilResolveAttachment( const vk::AttachmentReference2KHR* pDepthStencilResolveAttachment_ ) VULKAN_HPP_NOEXCEPT
+ SubpassDescriptionDepthStencilResolve & setPDepthStencilResolveAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2* pDepthStencilResolveAttachment_ ) VULKAN_HPP_NOEXCEPT
{
pDepthStencilResolveAttachment = pDepthStencilResolveAttachment_;
return *this;
}
- operator VkSubpassDescriptionDepthStencilResolveKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDescriptionDepthStencilResolve const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSubpassDescriptionDepthStencilResolveKHR*>( this );
+ return *reinterpret_cast<const VkSubpassDescriptionDepthStencilResolve*>( this );
}
- operator VkSubpassDescriptionDepthStencilResolveKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSubpassDescriptionDepthStencilResolve &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSubpassDescriptionDepthStencilResolveKHR*>( this );
+ return *reinterpret_cast<VkSubpassDescriptionDepthStencilResolve*>( this );
}
- bool operator==( SubpassDescriptionDepthStencilResolveKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SubpassDescriptionDepthStencilResolve const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
- && vk::operator==( depthResolveMode, rhs.depthResolveMode )
- && vk::operator==( stencilResolveMode, rhs.stencilResolveMode )
+ && ( depthResolveMode == rhs.depthResolveMode )
+ && ( stencilResolveMode == rhs.stencilResolveMode )
&& ( pDepthStencilResolveAttachment == rhs.pDepthStencilResolveAttachment );
}
- bool operator!=( SubpassDescriptionDepthStencilResolveKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SubpassDescriptionDepthStencilResolve const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SubpassDescriptionDepthStencilResolveKHR::sType;
+ public:
+ const 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 = {};
};
- static_assert( sizeof( SubpassDescriptionDepthStencilResolveKHR ) == sizeof( VkSubpassDescriptionDepthStencilResolveKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SubpassDescriptionDepthStencilResolveKHR>::value, "struct wrapper is not a standard layout!" );
-
- namespace layout
- {
- struct SubpassEndInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SubpassEndInfoKHR() VULKAN_HPP_NOEXCEPT
- {}
-
- SubpassEndInfoKHR( VkSubpassEndInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassEndInfoKHR*>(this) = rhs;
- }
-
- SubpassEndInfoKHR& operator=( VkSubpassEndInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSubpassEndInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSubpassEndInfoKHR;
- const void* pNext = nullptr;
- };
- static_assert( sizeof( SubpassEndInfoKHR ) == sizeof( VkSubpassEndInfoKHR ), "layout struct and wrapper have different size!" );
- }
+ static_assert( sizeof( SubpassDescriptionDepthStencilResolve ) == sizeof( VkSubpassDescriptionDepthStencilResolve ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SubpassDescriptionDepthStencilResolve>::value, "struct wrapper is not a standard layout!" );
- struct SubpassEndInfoKHR : public layout::SubpassEndInfoKHR
+ struct SubpassEndInfo
{
- VULKAN_HPP_CONSTEXPR SubpassEndInfoKHR() VULKAN_HPP_NOEXCEPT
- : layout::SubpassEndInfoKHR()
+ VULKAN_HPP_CONSTEXPR SubpassEndInfo() VULKAN_HPP_NOEXCEPT
{}
- SubpassEndInfoKHR( VkSubpassEndInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SubpassEndInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::SubpassEndInfo & operator=( VULKAN_HPP_NAMESPACE::SubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SubpassEndInfo ) - offsetof( SubpassEndInfo, pNext ) );
+ return *this;
+ }
+
+ SubpassEndInfo( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = rhs;
+ }
- SubpassEndInfoKHR& operator=( VkSubpassEndInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ SubpassEndInfo& operator=( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SubpassEndInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SubpassEndInfo const *>(&rhs);
return *this;
}
- SubpassEndInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ SubpassEndInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- operator VkSubpassEndInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkSubpassEndInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkSubpassEndInfoKHR*>( this );
+ return *reinterpret_cast<const VkSubpassEndInfo*>( this );
}
- operator VkSubpassEndInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkSubpassEndInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkSubpassEndInfoKHR*>( this );
+ return *reinterpret_cast<VkSubpassEndInfo*>( this );
}
- bool operator==( SubpassEndInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( SubpassEndInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext );
}
- bool operator!=( SubpassEndInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( SubpassEndInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::SubpassEndInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassEndInfo;
+ const void* pNext = {};
};
- static_assert( sizeof( SubpassEndInfoKHR ) == sizeof( VkSubpassEndInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<SubpassEndInfoKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( SubpassEndInfo ) == sizeof( VkSubpassEndInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<SubpassEndInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SurfaceCapabilities2EXT
{
- struct SurfaceCapabilities2EXT
- {
- protected:
- SurfaceCapabilities2EXT() VULKAN_HPP_NOEXCEPT
- {}
-
- SurfaceCapabilities2EXT( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilities2EXT*>(this) = rhs;
- }
-
- SurfaceCapabilities2EXT& operator=( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilities2EXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceCapabilities2EXT;
- void* pNext = nullptr;
- uint32_t minImageCount;
- uint32_t maxImageCount;
- vk::Extent2D currentExtent;
- vk::Extent2D minImageExtent;
- vk::Extent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- vk::SurfaceTransformFlagsKHR supportedTransforms;
- vk::SurfaceTransformFlagBitsKHR currentTransform;
- vk::CompositeAlphaFlagsKHR supportedCompositeAlpha;
- vk::ImageUsageFlags supportedUsageFlags;
- vk::SurfaceCounterFlagsEXT supportedSurfaceCounters;
- };
- static_assert( sizeof( SurfaceCapabilities2EXT ) == sizeof( VkSurfaceCapabilities2EXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceCapabilities2EXT : public layout::SurfaceCapabilities2EXT
- {
- SurfaceCapabilities2EXT() VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilities2EXT()
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : minImageCount( minImageCount_ )
+ , maxImageCount( maxImageCount_ )
+ , currentExtent( currentExtent_ )
+ , minImageExtent( minImageExtent_ )
+ , maxImageExtent( maxImageExtent_ )
+ , maxImageArrayLayers( maxImageArrayLayers_ )
+ , supportedTransforms( supportedTransforms_ )
+ , currentTransform( currentTransform_ )
+ , supportedCompositeAlpha( supportedCompositeAlpha_ )
+ , supportedUsageFlags( supportedUsageFlags_ )
+ , supportedSurfaceCounters( supportedSurfaceCounters_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT & operator=( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT ) - offsetof( SurfaceCapabilities2EXT, pNext ) );
+ return *this;
+ }
+
SurfaceCapabilities2EXT( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilities2EXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceCapabilities2EXT& operator=( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceCapabilities2EXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT const *>(&rhs);
return *this;
}
@@ -62941,7 +58914,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( maxImageExtent == rhs.maxImageExtent )
&& ( maxImageArrayLayers == rhs.maxImageArrayLayers )
&& ( supportedTransforms == rhs.supportedTransforms )
- && vk::operator==( currentTransform, rhs.currentTransform )
+ && ( currentTransform == rhs.currentTransform )
&& ( supportedCompositeAlpha == rhs.supportedCompositeAlpha )
&& ( supportedUsageFlags == rhs.supportedUsageFlags )
&& ( supportedSurfaceCounters == rhs.supportedSurfaceCounters );
@@ -62952,25 +58925,56 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceCapabilities2EXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SurfaceCapabilities2EXT ) == sizeof( VkSurfaceCapabilities2EXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceCapabilities2EXT>::value, "struct wrapper is not a standard layout!" );
struct SurfaceCapabilitiesKHR
{
- SurfaceCapabilitiesKHR() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
SurfaceCapabilitiesKHR( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSurfaceCapabilitiesKHR*>(this) = rhs;
+ *this = rhs;
}
SurfaceCapabilitiesKHR& operator=( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSurfaceCapabilitiesKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR const *>(&rhs);
return *this;
}
@@ -62993,7 +58997,7 @@ namespace VULKAN_HPP_NAMESPACE
&& ( maxImageExtent == rhs.maxImageExtent )
&& ( maxImageArrayLayers == rhs.maxImageArrayLayers )
&& ( supportedTransforms == rhs.supportedTransforms )
- && vk::operator==( currentTransform, rhs.currentTransform )
+ && ( currentTransform == rhs.currentTransform )
&& ( supportedCompositeAlpha == rhs.supportedCompositeAlpha )
&& ( supportedUsageFlags == rhs.supportedUsageFlags );
}
@@ -63004,60 +59008,40 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- uint32_t minImageCount;
- uint32_t maxImageCount;
- vk::Extent2D currentExtent;
- vk::Extent2D minImageExtent;
- vk::Extent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- vk::SurfaceTransformFlagsKHR supportedTransforms;
- vk::SurfaceTransformFlagBitsKHR currentTransform;
- vk::CompositeAlphaFlagsKHR supportedCompositeAlpha;
- vk::ImageUsageFlags supportedUsageFlags;
+ 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 = {};
};
static_assert( sizeof( SurfaceCapabilitiesKHR ) == sizeof( VkSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceCapabilitiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct SurfaceCapabilities2KHR
{
- struct SurfaceCapabilities2KHR
- {
- protected:
- SurfaceCapabilities2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- SurfaceCapabilities2KHR( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilities2KHR*>(this) = rhs;
- }
-
- SurfaceCapabilities2KHR& operator=( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilities2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceCapabilities2KHR;
- void* pNext = nullptr;
- vk::SurfaceCapabilitiesKHR surfaceCapabilities;
- };
- static_assert( sizeof( SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceCapabilities2KHR : public layout::SurfaceCapabilities2KHR
- {
- SurfaceCapabilities2KHR() VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilities2KHR()
+ SurfaceCapabilities2KHR( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities_ = {} ) VULKAN_HPP_NOEXCEPT
+ : surfaceCapabilities( surfaceCapabilities_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & operator=( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR ) - offsetof( SurfaceCapabilities2KHR, pNext ) );
+ return *this;
+ }
+
SurfaceCapabilities2KHR( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilities2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceCapabilities2KHR& operator=( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceCapabilities2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR const *>(&rhs);
return *this;
}
@@ -63083,55 +59067,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceCapabilities2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilities2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities = {};
};
static_assert( sizeof( SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceCapabilities2KHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
+ struct SurfaceCapabilitiesFullScreenExclusiveEXT
{
- struct SurfaceCapabilitiesFullScreenExclusiveEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( vk::Bool32 fullScreenExclusiveSupported_ = 0 ) VULKAN_HPP_NOEXCEPT
- : fullScreenExclusiveSupported( fullScreenExclusiveSupported_ )
- {}
-
- SurfaceCapabilitiesFullScreenExclusiveEXT( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilitiesFullScreenExclusiveEXT*>(this) = rhs;
- }
-
- SurfaceCapabilitiesFullScreenExclusiveEXT& operator=( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceCapabilitiesFullScreenExclusiveEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT;
- void* pNext = nullptr;
- vk::Bool32 fullScreenExclusiveSupported;
- };
- static_assert( sizeof( SurfaceCapabilitiesFullScreenExclusiveEXT ) == sizeof( VkSurfaceCapabilitiesFullScreenExclusiveEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceCapabilitiesFullScreenExclusiveEXT : public layout::SurfaceCapabilitiesFullScreenExclusiveEXT
- {
- VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( vk::Bool32 fullScreenExclusiveSupported_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilitiesFullScreenExclusiveEXT( fullScreenExclusiveSupported_ )
+ VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported_ = {} ) VULKAN_HPP_NOEXCEPT
+ : fullScreenExclusiveSupported( fullScreenExclusiveSupported_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT & operator=( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT ) - offsetof( SurfaceCapabilitiesFullScreenExclusiveEXT, pNext ) );
+ return *this;
+ }
+
SurfaceCapabilitiesFullScreenExclusiveEXT( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceCapabilitiesFullScreenExclusiveEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceCapabilitiesFullScreenExclusiveEXT& operator=( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceCapabilitiesFullScreenExclusiveEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT const *>(&rhs);
return *this;
}
@@ -63141,7 +59106,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SurfaceCapabilitiesFullScreenExclusiveEXT & setFullScreenExclusiveSupported( vk::Bool32 fullScreenExclusiveSupported_ ) VULKAN_HPP_NOEXCEPT
+ SurfaceCapabilitiesFullScreenExclusiveEXT & setFullScreenExclusiveSupported( VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported_ ) VULKAN_HPP_NOEXCEPT
{
fullScreenExclusiveSupported = fullScreenExclusiveSupported_;
return *this;
@@ -63169,8 +59134,10 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceCapabilitiesFullScreenExclusiveEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported = {};
};
static_assert( sizeof( SurfaceCapabilitiesFullScreenExclusiveEXT ) == sizeof( VkSurfaceCapabilitiesFullScreenExclusiveEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceCapabilitiesFullScreenExclusiveEXT>::value, "struct wrapper is not a standard layout!" );
@@ -63178,17 +59145,20 @@ namespace VULKAN_HPP_NAMESPACE
struct SurfaceFormatKHR
{
- SurfaceFormatKHR() VULKAN_HPP_NOEXCEPT
+ 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_ )
{}
SurfaceFormatKHR( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSurfaceFormatKHR*>(this) = rhs;
+ *this = rhs;
}
SurfaceFormatKHR& operator=( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- *reinterpret_cast<VkSurfaceFormatKHR*>(this) = rhs;
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceFormatKHR const *>(&rhs);
return *this;
}
@@ -63214,52 +59184,32 @@ namespace VULKAN_HPP_NAMESPACE
}
public:
- vk::Format format;
- vk::ColorSpaceKHR colorSpace;
+ VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined;
+ VULKAN_HPP_NAMESPACE::ColorSpaceKHR colorSpace = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear;
};
static_assert( sizeof( SurfaceFormatKHR ) == sizeof( VkSurfaceFormatKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceFormatKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SurfaceFormat2KHR
- {
- protected:
- SurfaceFormat2KHR() VULKAN_HPP_NOEXCEPT
- {}
-
- SurfaceFormat2KHR( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFormat2KHR*>(this) = rhs;
- }
-
- SurfaceFormat2KHR& operator=( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFormat2KHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceFormat2KHR;
- void* pNext = nullptr;
- vk::SurfaceFormatKHR surfaceFormat;
- };
- static_assert( sizeof( SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceFormat2KHR : public layout::SurfaceFormat2KHR
+ struct SurfaceFormat2KHR
{
- SurfaceFormat2KHR() VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFormat2KHR()
+ SurfaceFormat2KHR( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat_ = {} ) VULKAN_HPP_NOEXCEPT
+ : surfaceFormat( surfaceFormat_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR & operator=( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR ) - offsetof( SurfaceFormat2KHR, pNext ) );
+ return *this;
+ }
+
SurfaceFormat2KHR( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFormat2KHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceFormat2KHR& operator=( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceFormat2KHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR const *>(&rhs);
return *this;
}
@@ -63285,55 +59235,36 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceFormat2KHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFormat2KHR;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat = {};
};
static_assert( sizeof( SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceFormat2KHR>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
+ struct SurfaceFullScreenExclusiveInfoEXT
{
- struct SurfaceFullScreenExclusiveInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( vk::FullScreenExclusiveEXT fullScreenExclusive_ = vk::FullScreenExclusiveEXT::eDefault ) VULKAN_HPP_NOEXCEPT
- : fullScreenExclusive( fullScreenExclusive_ )
- {}
-
- SurfaceFullScreenExclusiveInfoEXT( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFullScreenExclusiveInfoEXT*>(this) = rhs;
- }
-
- SurfaceFullScreenExclusiveInfoEXT& operator=( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFullScreenExclusiveInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceFullScreenExclusiveInfoEXT;
- void* pNext = nullptr;
- vk::FullScreenExclusiveEXT fullScreenExclusive;
- };
- static_assert( sizeof( SurfaceFullScreenExclusiveInfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceFullScreenExclusiveInfoEXT : public layout::SurfaceFullScreenExclusiveInfoEXT
- {
- VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( vk::FullScreenExclusiveEXT fullScreenExclusive_ = vk::FullScreenExclusiveEXT::eDefault ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFullScreenExclusiveInfoEXT( fullScreenExclusive_ )
+ VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault ) VULKAN_HPP_NOEXCEPT
+ : fullScreenExclusive( fullScreenExclusive_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT & operator=( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT ) - offsetof( SurfaceFullScreenExclusiveInfoEXT, pNext ) );
+ return *this;
+ }
+
SurfaceFullScreenExclusiveInfoEXT( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFullScreenExclusiveInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceFullScreenExclusiveInfoEXT& operator=( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceFullScreenExclusiveInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT const *>(&rhs);
return *this;
}
@@ -63343,7 +59274,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SurfaceFullScreenExclusiveInfoEXT & setFullScreenExclusive( vk::FullScreenExclusiveEXT fullScreenExclusive_ ) VULKAN_HPP_NOEXCEPT
+ SurfaceFullScreenExclusiveInfoEXT & setFullScreenExclusive( VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ ) VULKAN_HPP_NOEXCEPT
{
fullScreenExclusive = fullScreenExclusive_;
return *this;
@@ -63371,8 +59302,10 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceFullScreenExclusiveInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveInfoEXT;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault;
};
static_assert( sizeof( SurfaceFullScreenExclusiveInfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceFullScreenExclusiveInfoEXT>::value, "struct wrapper is not a standard layout!" );
@@ -63380,47 +59313,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct SurfaceFullScreenExclusiveWin32InfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( HMONITOR hmonitor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : hmonitor( hmonitor_ )
- {}
-
- SurfaceFullScreenExclusiveWin32InfoEXT( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFullScreenExclusiveWin32InfoEXT*>(this) = rhs;
- }
-
- SurfaceFullScreenExclusiveWin32InfoEXT& operator=( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceFullScreenExclusiveWin32InfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT;
- const void* pNext = nullptr;
- HMONITOR hmonitor;
- };
- static_assert( sizeof( SurfaceFullScreenExclusiveWin32InfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveWin32InfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceFullScreenExclusiveWin32InfoEXT : public layout::SurfaceFullScreenExclusiveWin32InfoEXT
+ struct SurfaceFullScreenExclusiveWin32InfoEXT
{
- VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( HMONITOR hmonitor_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFullScreenExclusiveWin32InfoEXT( hmonitor_ )
+ VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( HMONITOR hmonitor_ = {} ) VULKAN_HPP_NOEXCEPT
+ : hmonitor( hmonitor_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT & operator=( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT ) - offsetof( SurfaceFullScreenExclusiveWin32InfoEXT, pNext ) );
+ return *this;
+ }
+
SurfaceFullScreenExclusiveWin32InfoEXT( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceFullScreenExclusiveWin32InfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceFullScreenExclusiveWin32InfoEXT& operator=( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceFullScreenExclusiveWin32InfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT const *>(&rhs);
return *this;
}
@@ -63458,54 +59370,35 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceFullScreenExclusiveWin32InfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT;
+ const void* pNext = {};
+ HMONITOR hmonitor = {};
};
static_assert( sizeof( SurfaceFullScreenExclusiveWin32InfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveWin32InfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceFullScreenExclusiveWin32InfoEXT>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
+ struct SurfaceProtectedCapabilitiesKHR
{
- struct SurfaceProtectedCapabilitiesKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( vk::Bool32 supportsProtected_ = 0 ) VULKAN_HPP_NOEXCEPT
- : supportsProtected( supportsProtected_ )
- {}
-
- SurfaceProtectedCapabilitiesKHR( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceProtectedCapabilitiesKHR*>(this) = rhs;
- }
-
- SurfaceProtectedCapabilitiesKHR& operator=( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSurfaceProtectedCapabilitiesKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSurfaceProtectedCapabilitiesKHR;
- const void* pNext = nullptr;
- vk::Bool32 supportsProtected;
- };
- static_assert( sizeof( SurfaceProtectedCapabilitiesKHR ) == sizeof( VkSurfaceProtectedCapabilitiesKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SurfaceProtectedCapabilitiesKHR : public layout::SurfaceProtectedCapabilitiesKHR
- {
- VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( vk::Bool32 supportsProtected_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceProtectedCapabilitiesKHR( supportsProtected_ )
+ VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( VULKAN_HPP_NAMESPACE::Bool32 supportsProtected_ = {} ) VULKAN_HPP_NOEXCEPT
+ : supportsProtected( supportsProtected_ )
{}
+ VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR & operator=( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR ) - offsetof( SurfaceProtectedCapabilitiesKHR, pNext ) );
+ return *this;
+ }
+
SurfaceProtectedCapabilitiesKHR( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SurfaceProtectedCapabilitiesKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SurfaceProtectedCapabilitiesKHR& operator=( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SurfaceProtectedCapabilitiesKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR const *>(&rhs);
return *this;
}
@@ -63515,7 +59408,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SurfaceProtectedCapabilitiesKHR & setSupportsProtected( vk::Bool32 supportsProtected_ ) VULKAN_HPP_NOEXCEPT
+ SurfaceProtectedCapabilitiesKHR & setSupportsProtected( VULKAN_HPP_NAMESPACE::Bool32 supportsProtected_ ) VULKAN_HPP_NOEXCEPT
{
supportsProtected = supportsProtected_;
return *this;
@@ -63543,53 +59436,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SurfaceProtectedCapabilitiesKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceProtectedCapabilitiesKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 supportsProtected = {};
};
static_assert( sizeof( SurfaceProtectedCapabilitiesKHR ) == sizeof( VkSurfaceProtectedCapabilitiesKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SurfaceProtectedCapabilitiesKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SwapchainCounterCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( vk::SurfaceCounterFlagsEXT surfaceCounters_ = vk::SurfaceCounterFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : surfaceCounters( surfaceCounters_ )
- {}
-
- SwapchainCounterCreateInfoEXT( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(this) = rhs;
- }
-
- SwapchainCounterCreateInfoEXT& operator=( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT;
- const void* pNext = nullptr;
- vk::SurfaceCounterFlagsEXT surfaceCounters;
- };
- static_assert( sizeof( SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct SwapchainCounterCreateInfoEXT : public layout::SwapchainCounterCreateInfoEXT
+ struct SwapchainCounterCreateInfoEXT
{
- VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( vk::SurfaceCounterFlagsEXT surfaceCounters_ = vk::SurfaceCounterFlagsEXT() ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainCounterCreateInfoEXT( surfaceCounters_ )
+ VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ = {} ) VULKAN_HPP_NOEXCEPT
+ : surfaceCounters( surfaceCounters_ )
{}
+ VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT ) - offsetof( SwapchainCounterCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
SwapchainCounterCreateInfoEXT( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainCounterCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
SwapchainCounterCreateInfoEXT& operator=( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SwapchainCounterCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -63599,7 +59473,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainCounterCreateInfoEXT & setSurfaceCounters( vk::SurfaceCounterFlagsEXT surfaceCounters_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCounterCreateInfoEXT & setSurfaceCounters( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ ) VULKAN_HPP_NOEXCEPT
{
surfaceCounters = surfaceCounters_;
return *this;
@@ -63627,113 +59501,64 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SwapchainCounterCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters = {};
};
static_assert( sizeof( SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SwapchainCounterCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SwapchainCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR SwapchainCreateInfoKHR( vk::SwapchainCreateFlagsKHR flags_ = vk::SwapchainCreateFlagsKHR(),
- vk::SurfaceKHR surface_ = vk::SurfaceKHR(),
- uint32_t minImageCount_ = 0,
- vk::Format imageFormat_ = vk::Format::eUndefined,
- vk::ColorSpaceKHR imageColorSpace_ = vk::ColorSpaceKHR::eSrgbNonlinear,
- vk::Extent2D imageExtent_ = vk::Extent2D(),
- uint32_t imageArrayLayers_ = 0,
- vk::ImageUsageFlags imageUsage_ = vk::ImageUsageFlags(),
- vk::SharingMode imageSharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr,
- vk::SurfaceTransformFlagBitsKHR preTransform_ = vk::SurfaceTransformFlagBitsKHR::eIdentity,
- vk::CompositeAlphaFlagBitsKHR compositeAlpha_ = vk::CompositeAlphaFlagBitsKHR::eOpaque,
- vk::PresentModeKHR presentMode_ = vk::PresentModeKHR::eImmediate,
- vk::Bool32 clipped_ = 0,
- vk::SwapchainKHR oldSwapchain_ = vk::SwapchainKHR() ) VULKAN_HPP_NOEXCEPT
- : 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_ )
- {}
-
- SwapchainCreateInfoKHR( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainCreateInfoKHR*>(this) = rhs;
- }
-
- SwapchainCreateInfoKHR& operator=( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSwapchainCreateInfoKHR;
- const void* pNext = nullptr;
- vk::SwapchainCreateFlagsKHR flags;
- vk::SurfaceKHR surface;
- uint32_t minImageCount;
- vk::Format imageFormat;
- vk::ColorSpaceKHR imageColorSpace;
- vk::Extent2D imageExtent;
- uint32_t imageArrayLayers;
- vk::ImageUsageFlags imageUsage;
- vk::SharingMode imageSharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- vk::SurfaceTransformFlagBitsKHR preTransform;
- vk::CompositeAlphaFlagBitsKHR compositeAlpha;
- vk::PresentModeKHR presentMode;
- vk::Bool32 clipped;
- vk::SwapchainKHR oldSwapchain;
- };
- static_assert( sizeof( SwapchainCreateInfoKHR ) == sizeof( VkSwapchainCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct SwapchainCreateInfoKHR : public layout::SwapchainCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR SwapchainCreateInfoKHR( vk::SwapchainCreateFlagsKHR flags_ = vk::SwapchainCreateFlagsKHR(),
- vk::SurfaceKHR surface_ = vk::SurfaceKHR(),
- uint32_t minImageCount_ = 0,
- vk::Format imageFormat_ = vk::Format::eUndefined,
- vk::ColorSpaceKHR imageColorSpace_ = vk::ColorSpaceKHR::eSrgbNonlinear,
- vk::Extent2D imageExtent_ = vk::Extent2D(),
- uint32_t imageArrayLayers_ = 0,
- vk::ImageUsageFlags imageUsage_ = vk::ImageUsageFlags(),
- vk::SharingMode imageSharingMode_ = vk::SharingMode::eExclusive,
- uint32_t queueFamilyIndexCount_ = 0,
- const uint32_t* pQueueFamilyIndices_ = nullptr,
- vk::SurfaceTransformFlagBitsKHR preTransform_ = vk::SurfaceTransformFlagBitsKHR::eIdentity,
- vk::CompositeAlphaFlagBitsKHR compositeAlpha_ = vk::CompositeAlphaFlagBitsKHR::eOpaque,
- vk::PresentModeKHR presentMode_ = vk::PresentModeKHR::eImmediate,
- vk::Bool32 clipped_ = 0,
- vk::SwapchainKHR oldSwapchain_ = vk::SwapchainKHR() ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainCreateInfoKHR( flags_, surface_, minImageCount_, imageFormat_, imageColorSpace_, imageExtent_, imageArrayLayers_, imageUsage_, imageSharingMode_, queueFamilyIndexCount_, pQueueFamilyIndices_, preTransform_, compositeAlpha_, presentMode_, clipped_, oldSwapchain_ )
+ struct SwapchainCreateInfoKHR
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : 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_NAMESPACE::SwapchainCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR ) - offsetof( SwapchainCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
SwapchainCreateInfoKHR( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
SwapchainCreateInfoKHR& operator=( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SwapchainCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -63743,13 +59568,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainCreateInfoKHR & setFlags( vk::SwapchainCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
}
- SwapchainCreateInfoKHR & setSurface( vk::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT
{
surface = surface_;
return *this;
@@ -63761,19 +59586,19 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainCreateInfoKHR & setImageFormat( vk::Format imageFormat_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setImageFormat( VULKAN_HPP_NAMESPACE::Format imageFormat_ ) VULKAN_HPP_NOEXCEPT
{
imageFormat = imageFormat_;
return *this;
}
- SwapchainCreateInfoKHR & setImageColorSpace( vk::ColorSpaceKHR imageColorSpace_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setImageColorSpace( VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_ ) VULKAN_HPP_NOEXCEPT
{
imageColorSpace = imageColorSpace_;
return *this;
}
- SwapchainCreateInfoKHR & setImageExtent( vk::Extent2D imageExtent_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ ) VULKAN_HPP_NOEXCEPT
{
imageExtent = imageExtent_;
return *this;
@@ -63785,13 +59610,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainCreateInfoKHR & setImageUsage( vk::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setImageUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT
{
imageUsage = imageUsage_;
return *this;
}
- SwapchainCreateInfoKHR & setImageSharingMode( vk::SharingMode imageSharingMode_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setImageSharingMode( VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_ ) VULKAN_HPP_NOEXCEPT
{
imageSharingMode = imageSharingMode_;
return *this;
@@ -63809,31 +59634,31 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainCreateInfoKHR & setPreTransform( vk::SurfaceTransformFlagBitsKHR preTransform_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setPreTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ ) VULKAN_HPP_NOEXCEPT
{
preTransform = preTransform_;
return *this;
}
- SwapchainCreateInfoKHR & setCompositeAlpha( vk::CompositeAlphaFlagBitsKHR compositeAlpha_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setCompositeAlpha( VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ ) VULKAN_HPP_NOEXCEPT
{
compositeAlpha = compositeAlpha_;
return *this;
}
- SwapchainCreateInfoKHR & setPresentMode( vk::PresentModeKHR presentMode_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setPresentMode( VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ ) VULKAN_HPP_NOEXCEPT
{
presentMode = presentMode_;
return *this;
}
- SwapchainCreateInfoKHR & setClipped( vk::Bool32 clipped_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setClipped( VULKAN_HPP_NAMESPACE::Bool32 clipped_ ) VULKAN_HPP_NOEXCEPT
{
clipped = clipped_;
return *this;
}
- SwapchainCreateInfoKHR & setOldSwapchain( vk::SwapchainKHR oldSwapchain_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainCreateInfoKHR & setOldSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ ) VULKAN_HPP_NOEXCEPT
{
oldSwapchain = oldSwapchain_;
return *this;
@@ -63864,8 +59689,8 @@ namespace VULKAN_HPP_NAMESPACE
&& ( imageSharingMode == rhs.imageSharingMode )
&& ( queueFamilyIndexCount == rhs.queueFamilyIndexCount )
&& ( pQueueFamilyIndices == rhs.pQueueFamilyIndices )
- && vk::operator==( preTransform, rhs.preTransform )
- && vk::operator==( compositeAlpha, rhs.compositeAlpha )
+ && ( preTransform == rhs.preTransform )
+ && ( compositeAlpha == rhs.compositeAlpha )
&& ( presentMode == rhs.presentMode )
&& ( clipped == rhs.clipped )
&& ( oldSwapchain == rhs.oldSwapchain );
@@ -63876,53 +59701,49 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SwapchainCreateInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( SwapchainCreateInfoKHR ) == sizeof( VkSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SwapchainCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct SwapchainDisplayNativeHdrCreateInfoAMD
- {
- protected:
- VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( vk::Bool32 localDimmingEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : localDimmingEnable( localDimmingEnable_ )
- {}
-
- SwapchainDisplayNativeHdrCreateInfoAMD( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainDisplayNativeHdrCreateInfoAMD*>(this) = rhs;
- }
-
- SwapchainDisplayNativeHdrCreateInfoAMD& operator=( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkSwapchainDisplayNativeHdrCreateInfoAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD;
- const void* pNext = nullptr;
- vk::Bool32 localDimmingEnable;
- };
- static_assert( sizeof( SwapchainDisplayNativeHdrCreateInfoAMD ) == sizeof( VkSwapchainDisplayNativeHdrCreateInfoAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct SwapchainDisplayNativeHdrCreateInfoAMD : public layout::SwapchainDisplayNativeHdrCreateInfoAMD
+ struct SwapchainDisplayNativeHdrCreateInfoAMD
{
- VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( vk::Bool32 localDimmingEnable_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainDisplayNativeHdrCreateInfoAMD( localDimmingEnable_ )
+ VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ = {} ) VULKAN_HPP_NOEXCEPT
+ : localDimmingEnable( localDimmingEnable_ )
{}
+ VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD & operator=( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD ) - offsetof( SwapchainDisplayNativeHdrCreateInfoAMD, pNext ) );
+ return *this;
+ }
+
SwapchainDisplayNativeHdrCreateInfoAMD( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::SwapchainDisplayNativeHdrCreateInfoAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
SwapchainDisplayNativeHdrCreateInfoAMD& operator=( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::SwapchainDisplayNativeHdrCreateInfoAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD const *>(&rhs);
return *this;
}
@@ -63932,7 +59753,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- SwapchainDisplayNativeHdrCreateInfoAMD & setLocalDimmingEnable( vk::Bool32 localDimmingEnable_ ) VULKAN_HPP_NOEXCEPT
+ SwapchainDisplayNativeHdrCreateInfoAMD & setLocalDimmingEnable( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ ) VULKAN_HPP_NOEXCEPT
{
localDimmingEnable = localDimmingEnable_;
return *this;
@@ -63960,52 +59781,34 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::SwapchainDisplayNativeHdrCreateInfoAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable = {};
};
static_assert( sizeof( SwapchainDisplayNativeHdrCreateInfoAMD ) == sizeof( VkSwapchainDisplayNativeHdrCreateInfoAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<SwapchainDisplayNativeHdrCreateInfoAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct TextureLODGatherFormatPropertiesAMD
{
- struct TextureLODGatherFormatPropertiesAMD
- {
- protected:
- TextureLODGatherFormatPropertiesAMD() VULKAN_HPP_NOEXCEPT
- {}
-
- TextureLODGatherFormatPropertiesAMD( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(this) = rhs;
- }
-
- TextureLODGatherFormatPropertiesAMD& operator=( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD;
- void* pNext = nullptr;
- vk::Bool32 supportsTextureGatherLODBiasAMD;
- };
- static_assert( sizeof( TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), "layout struct and wrapper have different size!" );
- }
-
- struct TextureLODGatherFormatPropertiesAMD : public layout::TextureLODGatherFormatPropertiesAMD
- {
- TextureLODGatherFormatPropertiesAMD() VULKAN_HPP_NOEXCEPT
- : layout::TextureLODGatherFormatPropertiesAMD()
+ TextureLODGatherFormatPropertiesAMD( VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD_ = {} ) VULKAN_HPP_NOEXCEPT
+ : supportsTextureGatherLODBiasAMD( supportsTextureGatherLODBiasAMD_ )
{}
+ VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD & operator=( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD ) - offsetof( TextureLODGatherFormatPropertiesAMD, pNext ) );
+ return *this;
+ }
+
TextureLODGatherFormatPropertiesAMD( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::TextureLODGatherFormatPropertiesAMD( rhs )
- {}
+ {
+ *this = rhs;
+ }
TextureLODGatherFormatPropertiesAMD& operator=( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::TextureLODGatherFormatPropertiesAMD::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD const *>(&rhs);
return *this;
}
@@ -64031,109 +59834,84 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::TextureLODGatherFormatPropertiesAMD::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD;
+ void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD = {};
};
static_assert( sizeof( TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<TextureLODGatherFormatPropertiesAMD>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct TimelineSemaphoreSubmitInfo
{
- struct TimelineSemaphoreSubmitInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfoKHR( uint32_t waitSemaphoreValueCount_ = 0,
- const uint64_t* pWaitSemaphoreValues_ = nullptr,
- uint32_t signalSemaphoreValueCount_ = 0,
- const uint64_t* pSignalSemaphoreValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : waitSemaphoreValueCount( waitSemaphoreValueCount_ )
- , pWaitSemaphoreValues( pWaitSemaphoreValues_ )
- , signalSemaphoreValueCount( signalSemaphoreValueCount_ )
- , pSignalSemaphoreValues( pSignalSemaphoreValues_ )
- {}
-
- TimelineSemaphoreSubmitInfoKHR( VkTimelineSemaphoreSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkTimelineSemaphoreSubmitInfoKHR*>(this) = rhs;
- }
-
- TimelineSemaphoreSubmitInfoKHR& operator=( VkTimelineSemaphoreSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkTimelineSemaphoreSubmitInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eTimelineSemaphoreSubmitInfoKHR;
- const void* pNext = nullptr;
- uint32_t waitSemaphoreValueCount;
- const uint64_t* pWaitSemaphoreValues;
- uint32_t signalSemaphoreValueCount;
- const uint64_t* pSignalSemaphoreValues;
- };
- static_assert( sizeof( TimelineSemaphoreSubmitInfoKHR ) == sizeof( VkTimelineSemaphoreSubmitInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct TimelineSemaphoreSubmitInfoKHR : public layout::TimelineSemaphoreSubmitInfoKHR
- {
- VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfoKHR( uint32_t waitSemaphoreValueCount_ = 0,
- const uint64_t* pWaitSemaphoreValues_ = nullptr,
- uint32_t signalSemaphoreValueCount_ = 0,
- const uint64_t* pSignalSemaphoreValues_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::TimelineSemaphoreSubmitInfoKHR( waitSemaphoreValueCount_, pWaitSemaphoreValues_, signalSemaphoreValueCount_, pSignalSemaphoreValues_ )
+ VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfo( uint32_t waitSemaphoreValueCount_ = {},
+ const uint64_t* pWaitSemaphoreValues_ = {},
+ uint32_t signalSemaphoreValueCount_ = {},
+ const uint64_t* pSignalSemaphoreValues_ = {} ) VULKAN_HPP_NOEXCEPT
+ : waitSemaphoreValueCount( waitSemaphoreValueCount_ )
+ , pWaitSemaphoreValues( pWaitSemaphoreValues_ )
+ , signalSemaphoreValueCount( signalSemaphoreValueCount_ )
+ , pSignalSemaphoreValues( pSignalSemaphoreValues_ )
{}
- TimelineSemaphoreSubmitInfoKHR( VkTimelineSemaphoreSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::TimelineSemaphoreSubmitInfoKHR( rhs )
- {}
+ VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo & operator=( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo ) - offsetof( TimelineSemaphoreSubmitInfo, pNext ) );
+ return *this;
+ }
- TimelineSemaphoreSubmitInfoKHR& operator=( VkTimelineSemaphoreSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::TimelineSemaphoreSubmitInfoKHR::operator=(rhs);
+ *this = rhs;
+ }
+
+ TimelineSemaphoreSubmitInfo& operator=( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo const *>(&rhs);
return *this;
}
- TimelineSemaphoreSubmitInfoKHR & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo & setPNext( const void* pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
- TimelineSemaphoreSubmitInfoKHR & setWaitSemaphoreValueCount( uint32_t waitSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo & setWaitSemaphoreValueCount( uint32_t waitSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT
{
waitSemaphoreValueCount = waitSemaphoreValueCount_;
return *this;
}
- TimelineSemaphoreSubmitInfoKHR & setPWaitSemaphoreValues( const uint64_t* pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo & setPWaitSemaphoreValues( const uint64_t* pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
pWaitSemaphoreValues = pWaitSemaphoreValues_;
return *this;
}
- TimelineSemaphoreSubmitInfoKHR & setSignalSemaphoreValueCount( uint32_t signalSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo & setSignalSemaphoreValueCount( uint32_t signalSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT
{
signalSemaphoreValueCount = signalSemaphoreValueCount_;
return *this;
}
- TimelineSemaphoreSubmitInfoKHR & setPSignalSemaphoreValues( const uint64_t* pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
+ TimelineSemaphoreSubmitInfo & setPSignalSemaphoreValues( const uint64_t* pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
pSignalSemaphoreValues = pSignalSemaphoreValues_;
return *this;
}
- operator VkTimelineSemaphoreSubmitInfoKHR const&() const VULKAN_HPP_NOEXCEPT
+ operator VkTimelineSemaphoreSubmitInfo const&() const VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<const VkTimelineSemaphoreSubmitInfoKHR*>( this );
+ return *reinterpret_cast<const VkTimelineSemaphoreSubmitInfo*>( this );
}
- operator VkTimelineSemaphoreSubmitInfoKHR &() VULKAN_HPP_NOEXCEPT
+ operator VkTimelineSemaphoreSubmitInfo &() VULKAN_HPP_NOEXCEPT
{
- return *reinterpret_cast<VkTimelineSemaphoreSubmitInfoKHR*>( this );
+ return *reinterpret_cast<VkTimelineSemaphoreSubmitInfo*>( this );
}
- bool operator==( TimelineSemaphoreSubmitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( TimelineSemaphoreSubmitInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
@@ -64143,66 +59921,46 @@ namespace VULKAN_HPP_NAMESPACE
&& ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues );
}
- bool operator!=( TimelineSemaphoreSubmitInfoKHR const& rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( TimelineSemaphoreSubmitInfo const& rhs ) const VULKAN_HPP_NOEXCEPT
{
return !operator==( rhs );
}
- private:
- using layout::TimelineSemaphoreSubmitInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTimelineSemaphoreSubmitInfo;
+ const void* pNext = {};
+ uint32_t waitSemaphoreValueCount = {};
+ const uint64_t* pWaitSemaphoreValues = {};
+ uint32_t signalSemaphoreValueCount = {};
+ const uint64_t* pSignalSemaphoreValues = {};
};
- static_assert( sizeof( TimelineSemaphoreSubmitInfoKHR ) == sizeof( VkTimelineSemaphoreSubmitInfoKHR ), "struct and wrapper have different size!" );
- static_assert( std::is_standard_layout<TimelineSemaphoreSubmitInfoKHR>::value, "struct wrapper is not a standard layout!" );
+ static_assert( sizeof( TimelineSemaphoreSubmitInfo ) == sizeof( VkTimelineSemaphoreSubmitInfo ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<TimelineSemaphoreSubmitInfo>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ValidationCacheCreateInfoEXT
{
- struct ValidationCacheCreateInfoEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( vk::ValidationCacheCreateFlagsEXT flags_ = vk::ValidationCacheCreateFlagsEXT(),
- size_t initialDataSize_ = 0,
- const void* pInitialData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , initialDataSize( initialDataSize_ )
- , pInitialData( pInitialData_ )
- {}
-
- ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationCacheCreateInfoEXT*>(this) = rhs;
- }
-
- ValidationCacheCreateInfoEXT& operator=( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationCacheCreateInfoEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eValidationCacheCreateInfoEXT;
- const void* pNext = nullptr;
- vk::ValidationCacheCreateFlagsEXT flags;
- size_t initialDataSize;
- const void* pInitialData;
- };
- static_assert( sizeof( ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ValidationCacheCreateInfoEXT : public layout::ValidationCacheCreateInfoEXT
- {
- VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( vk::ValidationCacheCreateFlagsEXT flags_ = vk::ValidationCacheCreateFlagsEXT(),
- size_t initialDataSize_ = 0,
- const void* pInitialData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationCacheCreateInfoEXT( flags_, initialDataSize_, pInitialData_ )
+ VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ = {},
+ size_t initialDataSize_ = {},
+ const void* pInitialData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , initialDataSize( initialDataSize_ )
+ , pInitialData( pInitialData_ )
{}
+ VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & operator=( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT ) - offsetof( ValidationCacheCreateInfoEXT, pNext ) );
+ return *this;
+ }
+
ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationCacheCreateInfoEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ValidationCacheCreateInfoEXT& operator=( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ValidationCacheCreateInfoEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const *>(&rhs);
return *this;
}
@@ -64212,7 +59970,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ValidationCacheCreateInfoEXT & setFlags( vk::ValidationCacheCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ ValidationCacheCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -64254,65 +60012,42 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ValidationCacheCreateInfoEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationCacheCreateInfoEXT;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags = {};
+ size_t initialDataSize = {};
+ const void* pInitialData = {};
};
static_assert( sizeof( ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ValidationCacheCreateInfoEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
- {
- struct ValidationFeaturesEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( uint32_t enabledValidationFeatureCount_ = 0,
- const vk::ValidationFeatureEnableEXT* pEnabledValidationFeatures_ = nullptr,
- uint32_t disabledValidationFeatureCount_ = 0,
- const vk::ValidationFeatureDisableEXT* pDisabledValidationFeatures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : enabledValidationFeatureCount( enabledValidationFeatureCount_ )
- , pEnabledValidationFeatures( pEnabledValidationFeatures_ )
- , disabledValidationFeatureCount( disabledValidationFeatureCount_ )
- , pDisabledValidationFeatures( pDisabledValidationFeatures_ )
- {}
-
- ValidationFeaturesEXT( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationFeaturesEXT*>(this) = rhs;
- }
-
- ValidationFeaturesEXT& operator=( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationFeaturesEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eValidationFeaturesEXT;
- const void* pNext = nullptr;
- uint32_t enabledValidationFeatureCount;
- const vk::ValidationFeatureEnableEXT* pEnabledValidationFeatures;
- uint32_t disabledValidationFeatureCount;
- const vk::ValidationFeatureDisableEXT* pDisabledValidationFeatures;
- };
- static_assert( sizeof( ValidationFeaturesEXT ) == sizeof( VkValidationFeaturesEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ValidationFeaturesEXT : public layout::ValidationFeaturesEXT
+ struct ValidationFeaturesEXT
{
- VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( uint32_t enabledValidationFeatureCount_ = 0,
- const vk::ValidationFeatureEnableEXT* pEnabledValidationFeatures_ = nullptr,
- uint32_t disabledValidationFeatureCount_ = 0,
- const vk::ValidationFeatureDisableEXT* pDisabledValidationFeatures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationFeaturesEXT( enabledValidationFeatureCount_, pEnabledValidationFeatures_, disabledValidationFeatureCount_, pDisabledValidationFeatures_ )
+ VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( uint32_t enabledValidationFeatureCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT* pEnabledValidationFeatures_ = {},
+ uint32_t disabledValidationFeatureCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT* pDisabledValidationFeatures_ = {} ) VULKAN_HPP_NOEXCEPT
+ : enabledValidationFeatureCount( enabledValidationFeatureCount_ )
+ , pEnabledValidationFeatures( pEnabledValidationFeatures_ )
+ , disabledValidationFeatureCount( disabledValidationFeatureCount_ )
+ , pDisabledValidationFeatures( pDisabledValidationFeatures_ )
{}
+ VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT & operator=( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT ) - offsetof( ValidationFeaturesEXT, pNext ) );
+ return *this;
+ }
+
ValidationFeaturesEXT( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationFeaturesEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ValidationFeaturesEXT& operator=( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ValidationFeaturesEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT const *>(&rhs);
return *this;
}
@@ -64328,7 +60063,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ValidationFeaturesEXT & setPEnabledValidationFeatures( const vk::ValidationFeatureEnableEXT* pEnabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
+ ValidationFeaturesEXT & setPEnabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT* pEnabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
{
pEnabledValidationFeatures = pEnabledValidationFeatures_;
return *this;
@@ -64340,7 +60075,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ValidationFeaturesEXT & setPDisabledValidationFeatures( const vk::ValidationFeatureDisableEXT* pDisabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
+ ValidationFeaturesEXT & setPDisabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT* pDisabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
{
pDisabledValidationFeatures = pDisabledValidationFeatures_;
return *this;
@@ -64371,57 +60106,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ValidationFeaturesEXT::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( ValidationFeaturesEXT ) == sizeof( VkValidationFeaturesEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ValidationFeaturesEXT>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct ValidationFlagsEXT
{
- struct ValidationFlagsEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = 0,
- const vk::ValidationCheckEXT* pDisabledValidationChecks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : disabledValidationCheckCount( disabledValidationCheckCount_ )
- , pDisabledValidationChecks( pDisabledValidationChecks_ )
- {}
-
- ValidationFlagsEXT( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationFlagsEXT*>(this) = rhs;
- }
-
- ValidationFlagsEXT& operator=( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkValidationFlagsEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eValidationFlagsEXT;
- const void* pNext = nullptr;
- uint32_t disabledValidationCheckCount;
- const vk::ValidationCheckEXT* pDisabledValidationChecks;
- };
- static_assert( sizeof( ValidationFlagsEXT ) == sizeof( VkValidationFlagsEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct ValidationFlagsEXT : public layout::ValidationFlagsEXT
- {
- VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = 0,
- const vk::ValidationCheckEXT* pDisabledValidationChecks_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationFlagsEXT( disabledValidationCheckCount_, pDisabledValidationChecks_ )
+ VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = {},
+ const VULKAN_HPP_NAMESPACE::ValidationCheckEXT* pDisabledValidationChecks_ = {} ) VULKAN_HPP_NOEXCEPT
+ : disabledValidationCheckCount( disabledValidationCheckCount_ )
+ , pDisabledValidationChecks( pDisabledValidationChecks_ )
{}
+ VULKAN_HPP_NAMESPACE::ValidationFlagsEXT & operator=( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT ) - offsetof( ValidationFlagsEXT, pNext ) );
+ return *this;
+ }
+
ValidationFlagsEXT( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ValidationFlagsEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
ValidationFlagsEXT& operator=( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ValidationFlagsEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ValidationFlagsEXT const *>(&rhs);
return *this;
}
@@ -64437,7 +60154,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ValidationFlagsEXT & setPDisabledValidationChecks( const vk::ValidationCheckEXT* pDisabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT
+ ValidationFlagsEXT & setPDisabledValidationChecks( const VULKAN_HPP_NAMESPACE::ValidationCheckEXT* pDisabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT
{
pDisabledValidationChecks = pDisabledValidationChecks_;
return *this;
@@ -64466,59 +60183,39 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ValidationFlagsEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationFlagsEXT;
+ const void* pNext = {};
+ uint32_t disabledValidationCheckCount = {};
+ const VULKAN_HPP_NAMESPACE::ValidationCheckEXT* pDisabledValidationChecks = {};
};
static_assert( sizeof( ValidationFlagsEXT ) == sizeof( VkValidationFlagsEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ValidationFlagsEXT>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_VI_NN
- namespace layout
- {
- struct ViSurfaceCreateInfoNN
- {
- protected:
- VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( vk::ViSurfaceCreateFlagsNN flags_ = vk::ViSurfaceCreateFlagsNN(),
- void* window_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , window( window_ )
- {}
-
- ViSurfaceCreateInfoNN( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkViSurfaceCreateInfoNN*>(this) = rhs;
- }
-
- ViSurfaceCreateInfoNN& operator=( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkViSurfaceCreateInfoNN*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eViSurfaceCreateInfoNN;
- const void* pNext = nullptr;
- vk::ViSurfaceCreateFlagsNN flags;
- void* window;
- };
- static_assert( sizeof( ViSurfaceCreateInfoNN ) == sizeof( VkViSurfaceCreateInfoNN ), "layout struct and wrapper have different size!" );
- }
-
- struct ViSurfaceCreateInfoNN : public layout::ViSurfaceCreateInfoNN
+ struct ViSurfaceCreateInfoNN
{
- VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( vk::ViSurfaceCreateFlagsNN flags_ = vk::ViSurfaceCreateFlagsNN(),
- void* window_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::ViSurfaceCreateInfoNN( flags_, window_ )
+ VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ = {},
+ void* window_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , window( window_ )
{}
+ VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & operator=( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN ) - offsetof( ViSurfaceCreateInfoNN, pNext ) );
+ return *this;
+ }
+
ViSurfaceCreateInfoNN( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::ViSurfaceCreateInfoNN( rhs )
- {}
+ {
+ *this = rhs;
+ }
ViSurfaceCreateInfoNN& operator=( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::ViSurfaceCreateInfoNN::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const *>(&rhs);
return *this;
}
@@ -64528,7 +60225,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- ViSurfaceCreateInfoNN & setFlags( vk::ViSurfaceCreateFlagsNN flags_ ) VULKAN_HPP_NOEXCEPT
+ ViSurfaceCreateInfoNN & setFlags( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -64563,8 +60260,11 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::ViSurfaceCreateInfoNN::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eViSurfaceCreateInfoNN;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags = {};
+ void* window = {};
};
static_assert( sizeof( ViSurfaceCreateInfoNN ) == sizeof( VkViSurfaceCreateInfoNN ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<ViSurfaceCreateInfoNN>::value, "struct wrapper is not a standard layout!" );
@@ -64572,55 +60272,30 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
- namespace layout
+ struct WaylandSurfaceCreateInfoKHR
{
- struct WaylandSurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( vk::WaylandSurfaceCreateFlagsKHR flags_ = vk::WaylandSurfaceCreateFlagsKHR(),
- struct wl_display* display_ = nullptr,
- struct wl_surface* surface_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , display( display_ )
- , surface( surface_ )
- {}
-
- WaylandSurfaceCreateInfoKHR( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWaylandSurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- WaylandSurfaceCreateInfoKHR& operator=( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWaylandSurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::WaylandSurfaceCreateFlagsKHR flags;
- struct wl_display* display;
- struct wl_surface* surface;
- };
- static_assert( sizeof( WaylandSurfaceCreateInfoKHR ) == sizeof( VkWaylandSurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct WaylandSurfaceCreateInfoKHR : public layout::WaylandSurfaceCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( vk::WaylandSurfaceCreateFlagsKHR flags_ = vk::WaylandSurfaceCreateFlagsKHR(),
- struct wl_display* display_ = nullptr,
- struct wl_surface* surface_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::WaylandSurfaceCreateInfoKHR( flags_, display_, surface_ )
+ VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ = {},
+ struct wl_display* display_ = {},
+ struct wl_surface* surface_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , display( display_ )
+ , surface( surface_ )
{}
+ VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR ) - offsetof( WaylandSurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
WaylandSurfaceCreateInfoKHR( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::WaylandSurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
WaylandSurfaceCreateInfoKHR& operator=( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::WaylandSurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -64630,7 +60305,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- WaylandSurfaceCreateInfoKHR & setFlags( vk::WaylandSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ WaylandSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -64672,8 +60347,12 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::WaylandSurfaceCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags = {};
+ struct wl_display* display = {};
+ struct wl_surface* surface = {};
};
static_assert( sizeof( WaylandSurfaceCreateInfoKHR ) == sizeof( VkWaylandSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<WaylandSurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -64681,71 +60360,38 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct Win32KeyedMutexAcquireReleaseInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = 0,
- const vk::DeviceMemory* pAcquireSyncs_ = nullptr,
- const uint64_t* pAcquireKeys_ = nullptr,
- const uint32_t* pAcquireTimeouts_ = nullptr,
- uint32_t releaseCount_ = 0,
- const vk::DeviceMemory* pReleaseSyncs_ = nullptr,
- const uint64_t* pReleaseKeys_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : acquireCount( acquireCount_ )
- , pAcquireSyncs( pAcquireSyncs_ )
- , pAcquireKeys( pAcquireKeys_ )
- , pAcquireTimeouts( pAcquireTimeouts_ )
- , releaseCount( releaseCount_ )
- , pReleaseSyncs( pReleaseSyncs_ )
- , pReleaseKeys( pReleaseKeys_ )
- {}
-
- Win32KeyedMutexAcquireReleaseInfoKHR( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(this) = rhs;
- }
-
- Win32KeyedMutexAcquireReleaseInfoKHR& operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR;
- const void* pNext = nullptr;
- uint32_t acquireCount;
- const vk::DeviceMemory* pAcquireSyncs;
- const uint64_t* pAcquireKeys;
- const uint32_t* pAcquireTimeouts;
- uint32_t releaseCount;
- const vk::DeviceMemory* pReleaseSyncs;
- const uint64_t* pReleaseKeys;
- };
- static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoKHR ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct Win32KeyedMutexAcquireReleaseInfoKHR : public layout::Win32KeyedMutexAcquireReleaseInfoKHR
+ struct Win32KeyedMutexAcquireReleaseInfoKHR
{
- VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = 0,
- const vk::DeviceMemory* pAcquireSyncs_ = nullptr,
- const uint64_t* pAcquireKeys_ = nullptr,
- const uint32_t* pAcquireTimeouts_ = nullptr,
- uint32_t releaseCount_ = 0,
- const vk::DeviceMemory* pReleaseSyncs_ = nullptr,
- const uint64_t* pReleaseKeys_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::Win32KeyedMutexAcquireReleaseInfoKHR( acquireCount_, pAcquireSyncs_, pAcquireKeys_, pAcquireTimeouts_, releaseCount_, pReleaseSyncs_, pReleaseKeys_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : acquireCount( acquireCount_ )
+ , pAcquireSyncs( pAcquireSyncs_ )
+ , pAcquireKeys( pAcquireKeys_ )
+ , pAcquireTimeouts( pAcquireTimeouts_ )
+ , releaseCount( releaseCount_ )
+ , pReleaseSyncs( pReleaseSyncs_ )
+ , pReleaseKeys( pReleaseKeys_ )
{}
+ VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR & operator=( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR ) - offsetof( Win32KeyedMutexAcquireReleaseInfoKHR, pNext ) );
+ return *this;
+ }
+
Win32KeyedMutexAcquireReleaseInfoKHR( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::Win32KeyedMutexAcquireReleaseInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
Win32KeyedMutexAcquireReleaseInfoKHR& operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::Win32KeyedMutexAcquireReleaseInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR const *>(&rhs);
return *this;
}
@@ -64761,7 +60407,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireSyncs( const vk::DeviceMemory* pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT
+ Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory* pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT
{
pAcquireSyncs = pAcquireSyncs_;
return *this;
@@ -64785,7 +60431,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseSyncs( const vk::DeviceMemory* pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT
+ Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory* pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT
{
pReleaseSyncs = pReleaseSyncs_;
return *this;
@@ -64825,8 +60471,16 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::Win32KeyedMutexAcquireReleaseInfoKHR::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoKHR ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Win32KeyedMutexAcquireReleaseInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -64834,71 +60488,38 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct Win32KeyedMutexAcquireReleaseInfoNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = 0,
- const vk::DeviceMemory* pAcquireSyncs_ = nullptr,
- const uint64_t* pAcquireKeys_ = nullptr,
- const uint32_t* pAcquireTimeoutMilliseconds_ = nullptr,
- uint32_t releaseCount_ = 0,
- const vk::DeviceMemory* pReleaseSyncs_ = nullptr,
- const uint64_t* pReleaseKeys_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : acquireCount( acquireCount_ )
- , pAcquireSyncs( pAcquireSyncs_ )
- , pAcquireKeys( pAcquireKeys_ )
- , pAcquireTimeoutMilliseconds( pAcquireTimeoutMilliseconds_ )
- , releaseCount( releaseCount_ )
- , pReleaseSyncs( pReleaseSyncs_ )
- , pReleaseKeys( pReleaseKeys_ )
- {}
-
- Win32KeyedMutexAcquireReleaseInfoNV( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(this) = rhs;
- }
-
- Win32KeyedMutexAcquireReleaseInfoNV& operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV;
- const void* pNext = nullptr;
- uint32_t acquireCount;
- const vk::DeviceMemory* pAcquireSyncs;
- const uint64_t* pAcquireKeys;
- const uint32_t* pAcquireTimeoutMilliseconds;
- uint32_t releaseCount;
- const vk::DeviceMemory* pReleaseSyncs;
- const uint64_t* pReleaseKeys;
- };
- static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoNV ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoNV ), "layout struct and wrapper have different size!" );
- }
-
- struct Win32KeyedMutexAcquireReleaseInfoNV : public layout::Win32KeyedMutexAcquireReleaseInfoNV
+ struct Win32KeyedMutexAcquireReleaseInfoNV
{
- VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = 0,
- const vk::DeviceMemory* pAcquireSyncs_ = nullptr,
- const uint64_t* pAcquireKeys_ = nullptr,
- const uint32_t* pAcquireTimeoutMilliseconds_ = nullptr,
- uint32_t releaseCount_ = 0,
- const vk::DeviceMemory* pReleaseSyncs_ = nullptr,
- const uint64_t* pReleaseKeys_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::Win32KeyedMutexAcquireReleaseInfoNV( acquireCount_, pAcquireSyncs_, pAcquireKeys_, pAcquireTimeoutMilliseconds_, releaseCount_, pReleaseSyncs_, pReleaseKeys_ )
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : acquireCount( acquireCount_ )
+ , pAcquireSyncs( pAcquireSyncs_ )
+ , pAcquireKeys( pAcquireKeys_ )
+ , pAcquireTimeoutMilliseconds( pAcquireTimeoutMilliseconds_ )
+ , releaseCount( releaseCount_ )
+ , pReleaseSyncs( pReleaseSyncs_ )
+ , pReleaseKeys( pReleaseKeys_ )
{}
+ VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV & operator=( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV ) - offsetof( Win32KeyedMutexAcquireReleaseInfoNV, pNext ) );
+ return *this;
+ }
+
Win32KeyedMutexAcquireReleaseInfoNV( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::Win32KeyedMutexAcquireReleaseInfoNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
Win32KeyedMutexAcquireReleaseInfoNV& operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::Win32KeyedMutexAcquireReleaseInfoNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV const *>(&rhs);
return *this;
}
@@ -64914,7 +60535,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireSyncs( const vk::DeviceMemory* pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT
+ Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory* pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT
{
pAcquireSyncs = pAcquireSyncs_;
return *this;
@@ -64938,7 +60559,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseSyncs( const vk::DeviceMemory* pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT
+ Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory* pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT
{
pReleaseSyncs = pReleaseSyncs_;
return *this;
@@ -64978,8 +60599,16 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::Win32KeyedMutexAcquireReleaseInfoNV::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoNV ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Win32KeyedMutexAcquireReleaseInfoNV>::value, "struct wrapper is not a standard layout!" );
@@ -64987,55 +60616,30 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
- namespace layout
- {
- struct Win32SurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( vk::Win32SurfaceCreateFlagsKHR flags_ = vk::Win32SurfaceCreateFlagsKHR(),
- HINSTANCE hinstance_ = 0,
- HWND hwnd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , hinstance( hinstance_ )
- , hwnd( hwnd_ )
- {}
-
- Win32SurfaceCreateInfoKHR( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32SurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- Win32SurfaceCreateInfoKHR& operator=( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWin32SurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::Win32SurfaceCreateFlagsKHR flags;
- HINSTANCE hinstance;
- HWND hwnd;
- };
- static_assert( sizeof( Win32SurfaceCreateInfoKHR ) == sizeof( VkWin32SurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct Win32SurfaceCreateInfoKHR : public layout::Win32SurfaceCreateInfoKHR
+ struct Win32SurfaceCreateInfoKHR
{
- VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( vk::Win32SurfaceCreateFlagsKHR flags_ = vk::Win32SurfaceCreateFlagsKHR(),
- HINSTANCE hinstance_ = 0,
- HWND hwnd_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::Win32SurfaceCreateInfoKHR( flags_, hinstance_, hwnd_ )
+ VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ = {},
+ HINSTANCE hinstance_ = {},
+ HWND hwnd_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , hinstance( hinstance_ )
+ , hwnd( hwnd_ )
{}
+ VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR ) - offsetof( Win32SurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
Win32SurfaceCreateInfoKHR( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::Win32SurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
Win32SurfaceCreateInfoKHR& operator=( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::Win32SurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -65045,7 +60649,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- Win32SurfaceCreateInfoKHR & setFlags( vk::Win32SurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ Win32SurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -65087,82 +60691,51 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::Win32SurfaceCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags = {};
+ HINSTANCE hinstance = {};
+ HWND hwnd = {};
};
static_assert( sizeof( Win32SurfaceCreateInfoKHR ) == sizeof( VkWin32SurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<Win32SurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- namespace layout
- {
- struct WriteDescriptorSet
- {
- protected:
- VULKAN_HPP_CONSTEXPR WriteDescriptorSet( vk::DescriptorSet dstSet_ = vk::DescriptorSet(),
- uint32_t dstBinding_ = 0,
- uint32_t dstArrayElement_ = 0,
- uint32_t descriptorCount_ = 0,
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- const vk::DescriptorImageInfo* pImageInfo_ = nullptr,
- const vk::DescriptorBufferInfo* pBufferInfo_ = nullptr,
- const vk::BufferView* pTexelBufferView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : dstSet( dstSet_ )
- , dstBinding( dstBinding_ )
- , dstArrayElement( dstArrayElement_ )
- , descriptorCount( descriptorCount_ )
- , descriptorType( descriptorType_ )
- , pImageInfo( pImageInfo_ )
- , pBufferInfo( pBufferInfo_ )
- , pTexelBufferView( pTexelBufferView_ )
- {}
-
- WriteDescriptorSet( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSet*>(this) = rhs;
- }
-
- WriteDescriptorSet& operator=( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSet*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWriteDescriptorSet;
- const void* pNext = nullptr;
- vk::DescriptorSet dstSet;
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- vk::DescriptorType descriptorType;
- const vk::DescriptorImageInfo* pImageInfo;
- const vk::DescriptorBufferInfo* pBufferInfo;
- const vk::BufferView* pTexelBufferView;
- };
- static_assert( sizeof( WriteDescriptorSet ) == sizeof( VkWriteDescriptorSet ), "layout struct and wrapper have different size!" );
- }
-
- struct WriteDescriptorSet : public layout::WriteDescriptorSet
- {
- VULKAN_HPP_CONSTEXPR WriteDescriptorSet( vk::DescriptorSet dstSet_ = vk::DescriptorSet(),
- uint32_t dstBinding_ = 0,
- uint32_t dstArrayElement_ = 0,
- uint32_t descriptorCount_ = 0,
- vk::DescriptorType descriptorType_ = vk::DescriptorType::eSampler,
- const vk::DescriptorImageInfo* pImageInfo_ = nullptr,
- const vk::DescriptorBufferInfo* pBufferInfo_ = nullptr,
- const vk::BufferView* pTexelBufferView_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSet( dstSet_, dstBinding_, dstArrayElement_, descriptorCount_, descriptorType_, pImageInfo_, pBufferInfo_, pTexelBufferView_ )
+ struct WriteDescriptorSet
+ {
+ 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_ = {} ) VULKAN_HPP_NOEXCEPT
+ : dstSet( dstSet_ )
+ , dstBinding( dstBinding_ )
+ , dstArrayElement( dstArrayElement_ )
+ , descriptorCount( descriptorCount_ )
+ , descriptorType( descriptorType_ )
+ , pImageInfo( pImageInfo_ )
+ , pBufferInfo( pBufferInfo_ )
+ , pTexelBufferView( pTexelBufferView_ )
{}
+ VULKAN_HPP_NAMESPACE::WriteDescriptorSet & operator=( VULKAN_HPP_NAMESPACE::WriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSet ) - offsetof( WriteDescriptorSet, pNext ) );
+ return *this;
+ }
+
WriteDescriptorSet( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSet( rhs )
- {}
+ {
+ *this = rhs;
+ }
WriteDescriptorSet& operator=( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::WriteDescriptorSet::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::WriteDescriptorSet const *>(&rhs);
return *this;
}
@@ -65172,7 +60745,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- WriteDescriptorSet & setDstSet( vk::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT
{
dstSet = dstSet_;
return *this;
@@ -65196,25 +60769,25 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- WriteDescriptorSet & setDescriptorType( vk::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSet & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT
{
descriptorType = descriptorType_;
return *this;
}
- WriteDescriptorSet & setPImageInfo( const vk::DescriptorImageInfo* pImageInfo_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSet & setPImageInfo( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo* pImageInfo_ ) VULKAN_HPP_NOEXCEPT
{
pImageInfo = pImageInfo_;
return *this;
}
- WriteDescriptorSet & setPBufferInfo( const vk::DescriptorBufferInfo* pBufferInfo_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSet & setPBufferInfo( const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo* pBufferInfo_ ) VULKAN_HPP_NOEXCEPT
{
pBufferInfo = pBufferInfo_;
return *this;
}
- WriteDescriptorSet & setPTexelBufferView( const vk::BufferView* pTexelBufferView_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSet & setPTexelBufferView( const VULKAN_HPP_NAMESPACE::BufferView* pTexelBufferView_ ) VULKAN_HPP_NOEXCEPT
{
pTexelBufferView = pTexelBufferView_;
return *this;
@@ -65249,57 +60822,43 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::WriteDescriptorSet::sType;
+ public:
+ const 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 = {};
};
static_assert( sizeof( WriteDescriptorSet ) == sizeof( VkWriteDescriptorSet ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<WriteDescriptorSet>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct WriteDescriptorSetAccelerationStructureNV
{
- struct WriteDescriptorSetAccelerationStructureNV
- {
- protected:
- VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = 0,
- const vk::AccelerationStructureNV* pAccelerationStructures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : accelerationStructureCount( accelerationStructureCount_ )
- , pAccelerationStructures( pAccelerationStructures_ )
- {}
-
- WriteDescriptorSetAccelerationStructureNV( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSetAccelerationStructureNV*>(this) = rhs;
- }
-
- WriteDescriptorSetAccelerationStructureNV& operator=( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSetAccelerationStructureNV*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureNV;
- const void* pNext = nullptr;
- uint32_t accelerationStructureCount;
- const vk::AccelerationStructureNV* pAccelerationStructures;
- };
- static_assert( sizeof( WriteDescriptorSetAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetAccelerationStructureNV ), "layout struct and wrapper have different size!" );
- }
-
- struct WriteDescriptorSetAccelerationStructureNV : public layout::WriteDescriptorSetAccelerationStructureNV
- {
- VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = 0,
- const vk::AccelerationStructureNV* pAccelerationStructures_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSetAccelerationStructureNV( accelerationStructureCount_, pAccelerationStructures_ )
+ VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = {},
+ const VULKAN_HPP_NAMESPACE::AccelerationStructureNV* pAccelerationStructures_ = {} ) VULKAN_HPP_NOEXCEPT
+ : accelerationStructureCount( accelerationStructureCount_ )
+ , pAccelerationStructures( pAccelerationStructures_ )
{}
+ VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV & operator=( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV ) - offsetof( WriteDescriptorSetAccelerationStructureNV, pNext ) );
+ return *this;
+ }
+
WriteDescriptorSetAccelerationStructureNV( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSetAccelerationStructureNV( rhs )
- {}
+ {
+ *this = rhs;
+ }
WriteDescriptorSetAccelerationStructureNV& operator=( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::WriteDescriptorSetAccelerationStructureNV::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV const *>(&rhs);
return *this;
}
@@ -65315,7 +60874,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- WriteDescriptorSetAccelerationStructureNV & setPAccelerationStructures( const vk::AccelerationStructureNV* pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT
+ WriteDescriptorSetAccelerationStructureNV & setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::AccelerationStructureNV* pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT
{
pAccelerationStructures = pAccelerationStructures_;
return *this;
@@ -65344,57 +60903,37 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::WriteDescriptorSetAccelerationStructureNV::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureNV;
+ const void* pNext = {};
+ uint32_t accelerationStructureCount = {};
+ const VULKAN_HPP_NAMESPACE::AccelerationStructureNV* pAccelerationStructures = {};
};
static_assert( sizeof( WriteDescriptorSetAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetAccelerationStructureNV ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<WriteDescriptorSetAccelerationStructureNV>::value, "struct wrapper is not a standard layout!" );
- namespace layout
+ struct WriteDescriptorSetInlineUniformBlockEXT
{
- struct WriteDescriptorSetInlineUniformBlockEXT
- {
- protected:
- VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlockEXT( uint32_t dataSize_ = 0,
- const void* pData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : dataSize( dataSize_ )
- , pData( pData_ )
- {}
-
- WriteDescriptorSetInlineUniformBlockEXT( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSetInlineUniformBlockEXT*>(this) = rhs;
- }
-
- WriteDescriptorSetInlineUniformBlockEXT& operator=( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkWriteDescriptorSetInlineUniformBlockEXT*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eWriteDescriptorSetInlineUniformBlockEXT;
- const void* pNext = nullptr;
- uint32_t dataSize;
- const void* pData;
- };
- static_assert( sizeof( WriteDescriptorSetInlineUniformBlockEXT ) == sizeof( VkWriteDescriptorSetInlineUniformBlockEXT ), "layout struct and wrapper have different size!" );
- }
-
- struct WriteDescriptorSetInlineUniformBlockEXT : public layout::WriteDescriptorSetInlineUniformBlockEXT
- {
- VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlockEXT( uint32_t dataSize_ = 0,
- const void* pData_ = nullptr ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSetInlineUniformBlockEXT( dataSize_, pData_ )
+ VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlockEXT( uint32_t dataSize_ = {},
+ const void* pData_ = {} ) VULKAN_HPP_NOEXCEPT
+ : dataSize( dataSize_ )
+ , pData( pData_ )
{}
+ VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlockEXT & operator=( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlockEXT ) - offsetof( WriteDescriptorSetInlineUniformBlockEXT, pNext ) );
+ return *this;
+ }
+
WriteDescriptorSetInlineUniformBlockEXT( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::WriteDescriptorSetInlineUniformBlockEXT( rhs )
- {}
+ {
+ *this = rhs;
+ }
WriteDescriptorSetInlineUniformBlockEXT& operator=( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::WriteDescriptorSetInlineUniformBlockEXT::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlockEXT const *>(&rhs);
return *this;
}
@@ -65439,63 +60978,41 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::WriteDescriptorSetInlineUniformBlockEXT::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetInlineUniformBlockEXT;
+ const void* pNext = {};
+ uint32_t dataSize = {};
+ const void* pData = {};
};
static_assert( sizeof( WriteDescriptorSetInlineUniformBlockEXT ) == sizeof( VkWriteDescriptorSetInlineUniformBlockEXT ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<WriteDescriptorSetInlineUniformBlockEXT>::value, "struct wrapper is not a standard layout!" );
#ifdef VK_USE_PLATFORM_XCB_KHR
- namespace layout
+ struct XcbSurfaceCreateInfoKHR
{
- struct XcbSurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( vk::XcbSurfaceCreateFlagsKHR flags_ = vk::XcbSurfaceCreateFlagsKHR(),
- xcb_connection_t* connection_ = nullptr,
- xcb_window_t window_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , connection( connection_ )
- , window( window_ )
- {}
-
- XcbSurfaceCreateInfoKHR( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkXcbSurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- XcbSurfaceCreateInfoKHR& operator=( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkXcbSurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::XcbSurfaceCreateFlagsKHR flags;
- xcb_connection_t* connection;
- xcb_window_t window;
- };
- static_assert( sizeof( XcbSurfaceCreateInfoKHR ) == sizeof( VkXcbSurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct XcbSurfaceCreateInfoKHR : public layout::XcbSurfaceCreateInfoKHR
- {
- VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( vk::XcbSurfaceCreateFlagsKHR flags_ = vk::XcbSurfaceCreateFlagsKHR(),
- xcb_connection_t* connection_ = nullptr,
- xcb_window_t window_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::XcbSurfaceCreateInfoKHR( flags_, connection_, window_ )
+ VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ = {},
+ xcb_connection_t* connection_ = {},
+ xcb_window_t window_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , connection( connection_ )
+ , window( window_ )
{}
+ VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR ) - offsetof( XcbSurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
XcbSurfaceCreateInfoKHR( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::XcbSurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
XcbSurfaceCreateInfoKHR& operator=( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::XcbSurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -65505,7 +61022,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- XcbSurfaceCreateInfoKHR & setFlags( vk::XcbSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ XcbSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -65547,8 +61064,12 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::XcbSurfaceCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags = {};
+ xcb_connection_t* connection = {};
+ xcb_window_t window = {};
};
static_assert( sizeof( XcbSurfaceCreateInfoKHR ) == sizeof( VkXcbSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<XcbSurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
@@ -65556,55 +61077,30 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_KHR
- namespace layout
- {
- struct XlibSurfaceCreateInfoKHR
- {
- protected:
- VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( vk::XlibSurfaceCreateFlagsKHR flags_ = vk::XlibSurfaceCreateFlagsKHR(),
- Display* dpy_ = nullptr,
- Window window_ = 0 ) VULKAN_HPP_NOEXCEPT
- : flags( flags_ )
- , dpy( dpy_ )
- , window( window_ )
- {}
-
- XlibSurfaceCreateInfoKHR( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkXlibSurfaceCreateInfoKHR*>(this) = rhs;
- }
-
- XlibSurfaceCreateInfoKHR& operator=( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- {
- *reinterpret_cast<VkXlibSurfaceCreateInfoKHR*>(this) = rhs;
- return *this;
- }
-
- public:
- vk::StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR;
- const void* pNext = nullptr;
- vk::XlibSurfaceCreateFlagsKHR flags;
- Display* dpy;
- Window window;
- };
- static_assert( sizeof( XlibSurfaceCreateInfoKHR ) == sizeof( VkXlibSurfaceCreateInfoKHR ), "layout struct and wrapper have different size!" );
- }
-
- struct XlibSurfaceCreateInfoKHR : public layout::XlibSurfaceCreateInfoKHR
+ struct XlibSurfaceCreateInfoKHR
{
- VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( vk::XlibSurfaceCreateFlagsKHR flags_ = vk::XlibSurfaceCreateFlagsKHR(),
- Display* dpy_ = nullptr,
- Window window_ = 0 ) VULKAN_HPP_NOEXCEPT
- : layout::XlibSurfaceCreateInfoKHR( flags_, dpy_, window_ )
+ VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ = {},
+ Display* dpy_ = {},
+ Window window_ = {} ) VULKAN_HPP_NOEXCEPT
+ : flags( flags_ )
+ , dpy( dpy_ )
+ , window( window_ )
{}
+ VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & operator=( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ memcpy( &pNext, &rhs.pNext, sizeof( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR ) - offsetof( XlibSurfaceCreateInfoKHR, pNext ) );
+ return *this;
+ }
+
XlibSurfaceCreateInfoKHR( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
- : layout::XlibSurfaceCreateInfoKHR( rhs )
- {}
+ {
+ *this = rhs;
+ }
XlibSurfaceCreateInfoKHR& operator=( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
- layout::XlibSurfaceCreateInfoKHR::operator=(rhs);
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const *>(&rhs);
return *this;
}
@@ -65614,7 +61110,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- XlibSurfaceCreateInfoKHR & setFlags( vk::XlibSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
+ XlibSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -65656,23 +61152,27 @@ namespace VULKAN_HPP_NAMESPACE
return !operator==( rhs );
}
- private:
- using layout::XlibSurfaceCreateInfoKHR::sType;
+ public:
+ const VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR;
+ const void* pNext = {};
+ VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags = {};
+ Display* dpy = {};
+ Window window = {};
};
static_assert( sizeof( XlibSurfaceCreateInfoKHR ) == sizeof( VkXlibSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
static_assert( std::is_standard_layout<XlibSurfaceCreateInfoKHR>::value, "struct wrapper is not a standard layout!" );
#endif /*VK_USE_PLATFORM_XLIB_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result createInstance( const vk::InstanceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Instance* pInstance, Dispatch const &d)
+ 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
{
return static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkInstance*>( pInstance ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d )
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d )
{
- vk::Instance instance;
+ VULKAN_HPP_NAMESPACE::Instance instance;
Result result = static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkInstance*>( &instance ) ) );
return createResultValue( result, instance, VULKAN_HPP_NAMESPACE_STRING"::createInstance" );
}
@@ -65680,7 +61180,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Instance,Dispatch>>::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d )
{
- vk::Instance instance;
+ VULKAN_HPP_NAMESPACE::Instance instance;
Result result = static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkInstance*>( &instance ) ) );
ObjectDestroy<NoParent,Dispatch> deleter( allocator, d );
@@ -65690,7 +61190,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, vk::ExtensionProperties* pProperties, Dispatch const &d)
+ VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties* pProperties, Dispatch const &d) VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) );
}
@@ -65742,7 +61242,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, vk::LayerProperties* pProperties, Dispatch const &d)
+ VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties* pProperties, Dispatch const &d) VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) );
}
@@ -65794,13 +61294,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d)
+ VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d) VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumerateInstanceVersion( pApiVersion ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d )
+ VULKAN_HPP_INLINE typename ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d )
{
uint32_t apiVersion;
Result result = static_cast<Result>( d.vkEnumerateInstanceVersion( &apiVersion ) );
@@ -65809,13 +61309,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::begin( const vk::CommandBufferBeginInfo* pBeginInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo* pBeginInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( pBeginInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( &beginInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::begin" );
@@ -65823,7 +61323,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const vk::ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast<const VkConditionalRenderingBeginInfoEXT*>( pConditionalRenderingBegin ) );
}
@@ -65836,7 +61336,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
}
@@ -65850,13 +61350,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginQuery( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginQuery( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) );
}
@@ -65864,52 +61364,65 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, uint32_t index, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBeginQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ), index );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, vk::QueryControlFlags flags, uint32_t index, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBeginQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ), index );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const vk::RenderPassBeginInfo* pRenderPassBegin, vk::SubpassContents contents, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo* pRenderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), static_cast<VkSubpassContents>( contents ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, vk::SubpassContents contents, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), static_cast<VkSubpassContents>( contents ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const vk::RenderPassBeginInfo* pRenderPassBegin, const vk::SubpassBeginInfoKHR* pSubpassBeginInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
+ {
+ d.vkCmdBeginRenderPass2( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), reinterpret_cast<const VkSubpassBeginInfo*>( pSubpassBeginInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfo & subpassBeginInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkCmdBeginRenderPass2( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), reinterpret_cast<const VkSubpassBeginInfo*>( &subpassBeginInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ 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
{
- d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), reinterpret_cast<const VkSubpassBeginInfoKHR*>( pSubpassBeginInfo ) );
+ d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), reinterpret_cast<const VkSubpassBeginInfo*>( pSubpassBeginInfo ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfoKHR & subpassBeginInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfo & subpassBeginInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), reinterpret_cast<const VkSubpassBeginInfoKHR*>( &subpassBeginInfo ) );
+ d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), reinterpret_cast<const VkSubpassBeginInfo*>( &subpassBeginInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const vk::Buffer* pCounterBuffers, const vk::DeviceSize* pCounterBufferOffsets, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBufferCount, reinterpret_cast<const VkBuffer*>( pCounterBuffers ), reinterpret_cast<const VkDeviceSize*>( pCounterBufferOffsets ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const vk::Buffer> counterBuffers, ArrayProxy<const vk::DeviceSize> counterBufferOffsets, Dispatch const &d ) const
+ VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> counterBuffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> counterBufferOffsets, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( counterBuffers.size() == counterBufferOffsets.size() );
@@ -65924,13 +61437,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t firstSet, ArrayProxy<const vk::DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() );
}
@@ -65938,13 +61451,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( vk::Buffer buffer, vk::DeviceSize offset, vk::IndexType indexType, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkIndexType>( indexType ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( vk::Buffer buffer, vk::DeviceSize offset, vk::IndexType indexType, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkIndexType>( indexType ) );
}
@@ -65952,13 +61465,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( vk::PipelineBindPoint pipelineBindPoint, vk::Pipeline pipeline, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( vk::PipelineBindPoint pipelineBindPoint, vk::Pipeline pipeline, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) );
}
@@ -65966,26 +61479,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( vk::ImageView imageView, vk::ImageLayout imageLayout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBindShadingRateImageNV( m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( vk::ImageView imageView, vk::ImageLayout imageLayout, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBindShadingRateImageNV( m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const vk::Buffer* pBuffers, const vk::DeviceSize* pOffsets, const vk::DeviceSize* pSizes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast<const VkBuffer*>( pBuffers ), reinterpret_cast<const VkDeviceSize*>( pOffsets ), reinterpret_cast<const VkDeviceSize*>( pSizes ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const vk::Buffer> buffers, ArrayProxy<const vk::DeviceSize> offsets, ArrayProxy<const vk::DeviceSize> sizes, Dispatch const &d ) const
+ VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> buffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> offsets, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> sizes, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( buffers.size() == offsets.size() );
@@ -66016,13 +61529,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const vk::Buffer* pBuffers, const vk::DeviceSize* pOffsets, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast<const VkBuffer*>( pBuffers ), reinterpret_cast<const VkDeviceSize*>( pOffsets ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const vk::Buffer> buffers, ArrayProxy<const vk::DeviceSize> offsets, Dispatch const &d ) const
+ VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> buffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> offsets, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( buffers.size() == offsets.size() );
@@ -66037,65 +61550,65 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::blitImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageBlit* pRegions, vk::Filter filter, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageBlit*>( pRegions ), static_cast<VkFilter>( filter ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::blitImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageBlit> regions, vk::Filter filter, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageBlit> regions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const vk::AccelerationStructureInfoNV* pInfo, vk::Buffer instanceData, vk::DeviceSize instanceOffset, vk::Bool32 update, vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::Buffer scratch, vk::DeviceSize scratchOffset, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, reinterpret_cast<const VkAccelerationStructureInfoNV*>( pInfo ), static_cast<VkBuffer>( instanceData ), static_cast<VkDeviceSize>( instanceOffset ), static_cast<VkBool32>( update ), static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkBuffer>( scratch ), static_cast<VkDeviceSize>( scratchOffset ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const AccelerationStructureInfoNV & info, vk::Buffer instanceData, vk::DeviceSize instanceOffset, vk::Bool32 update, vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::Buffer scratch, vk::DeviceSize scratchOffset, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const 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
{
d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, reinterpret_cast<const VkAccelerationStructureInfoNV*>( &info ), static_cast<VkBuffer>( instanceData ), static_cast<VkDeviceSize>( instanceOffset ), static_cast<VkBool32>( update ), static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkBuffer>( scratch ), static_cast<VkDeviceSize>( scratchOffset ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const vk::ClearAttachment* pAttachments, uint32_t rectCount, const vk::ClearRect* pRects, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast<const VkClearAttachment*>( pAttachments ), rectCount, reinterpret_cast<const VkClearRect*>( pRects ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy<const vk::ClearAttachment> attachments, ArrayProxy<const vk::ClearRect> rects, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy<const VULKAN_HPP_NAMESPACE::ClearAttachment> attachments, ArrayProxy<const VULKAN_HPP_NAMESPACE::ClearRect> rects, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast<const VkClearAttachment*>( attachments.data() ), rects.size() , reinterpret_cast<const VkClearRect*>( rects.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( vk::Image image, vk::ImageLayout imageLayout, const vk::ClearColorValue* pColor, uint32_t rangeCount, const vk::ImageSubresourceRange* pRanges, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( pColor ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( vk::Image image, vk::ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const vk::ImageSubresourceRange> ranges, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> ranges, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( vk::Image image, vk::ImageLayout imageLayout, const vk::ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const vk::ImageSubresourceRange* pRanges, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( pDepthStencil ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( vk::Image image, vk::ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const vk::ImageSubresourceRange> ranges, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> ranges, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
}
@@ -66103,65 +61616,65 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::CopyAccelerationStructureModeNV mode, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeNV mode, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyAccelerationStructureNV( m_commandBuffer, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkCopyAccelerationStructureModeNV>( mode ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( vk::AccelerationStructureNV dst, vk::AccelerationStructureNV src, vk::CopyAccelerationStructureModeNV mode, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeNV mode, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyAccelerationStructureNV( m_commandBuffer, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkCopyAccelerationStructureModeNV>( mode ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( vk::Buffer srcBuffer, vk::Buffer dstBuffer, uint32_t regionCount, const vk::BufferCopy* pRegions, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferCopy*>( pRegions ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( vk::Buffer srcBuffer, vk::Buffer dstBuffer, ArrayProxy<const vk::BufferCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferCopy*>( regions.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( vk::Buffer srcBuffer, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::BufferImageCopy* pRegions, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( vk::Buffer srcBuffer, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::BufferImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageCopy* pRegions, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageCopy*>( pRegions ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageCopy*>( regions.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Buffer dstBuffer, uint32_t regionCount, const vk::BufferImageCopy* pRegions, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Buffer dstBuffer, ArrayProxy<const vk::BufferImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
}
@@ -66169,20 +61682,20 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), static_cast<VkDeviceSize>( stride ), static_cast<VkQueryResultFlags>( flags ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), static_cast<VkDeviceSize>( stride ), static_cast<VkQueryResultFlags>( flags ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const vk::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) );
}
@@ -66209,7 +61722,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const vk::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) );
}
@@ -66265,13 +61778,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( vk::Buffer buffer, vk::DeviceSize offset, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( vk::Buffer buffer, vk::DeviceSize offset, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ) );
}
@@ -66307,13 +61820,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -66321,13 +61834,27 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
+ {
+ d.vkCmdDrawIndexedIndirectCount( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDrawIndexedIndirectCount( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ 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
{
d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
@@ -66335,13 +61862,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
@@ -66349,13 +61876,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -66363,13 +61890,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, vk::Buffer counterBuffer, vk::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer, instanceCount, firstInstance, static_cast<VkBuffer>( counterBuffer ), static_cast<VkDeviceSize>( counterBufferOffset ), counterOffset, vertexStride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, vk::Buffer counterBuffer, vk::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer, instanceCount, firstInstance, static_cast<VkBuffer>( counterBuffer ), static_cast<VkDeviceSize>( counterBufferOffset ), counterOffset, vertexStride );
}
@@ -66377,13 +61904,27 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
+ {
+ d.vkCmdDrawIndirectCount( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDrawIndirectCount( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ 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
{
d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
@@ -66391,13 +61932,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
@@ -66405,13 +61946,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( vk::Buffer buffer, vk::DeviceSize offset, vk::Buffer countBuffer, vk::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), static_cast<VkBuffer>( countBuffer ), static_cast<VkDeviceSize>( countBufferOffset ), maxDrawCount, stride );
}
@@ -66419,13 +61960,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawMeshTasksIndirectNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( vk::Buffer buffer, vk::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdDrawMeshTasksIndirectNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -66475,13 +62016,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endQuery( vk::QueryPool queryPool, uint32_t query, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endQuery( vk::QueryPool queryPool, uint32_t query, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query );
}
@@ -66489,13 +62030,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, index );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( vk::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, index );
}
@@ -66516,26 +62057,39 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const vk::SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
- d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfoKHR*>( pSubpassEndInfo ) );
+ d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo*>( pSubpassEndInfo ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const SubpassEndInfo & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfoKHR*>( &subpassEndInfo ) );
+ d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo*>( &subpassEndInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const vk::Buffer* pCounterBuffers, const vk::DeviceSize* pCounterBufferOffsets, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo* pSubpassEndInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo*>( pSubpassEndInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const SubpassEndInfo & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo*>( &subpassEndInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ 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
{
d.vkCmdEndTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBufferCount, reinterpret_cast<const VkBuffer*>( pCounterBuffers ), reinterpret_cast<const VkDeviceSize*>( pCounterBufferOffsets ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const vk::Buffer> counterBuffers, ArrayProxy<const vk::DeviceSize> counterBufferOffsets, Dispatch const &d ) const
+ VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const VULKAN_HPP_NAMESPACE::Buffer> counterBuffers, ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> counterBufferOffsets, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( counterBuffers.size() == counterBufferOffsets.size() );
@@ -66550,13 +62104,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
}
@@ -66564,20 +62118,20 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize size, uint32_t data, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdFillBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), static_cast<VkDeviceSize>( size ), data );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize size, uint32_t data, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdFillBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), static_cast<VkDeviceSize>( size ), data );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
}
@@ -66591,46 +62145,59 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( vk::SubpassContents contents, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( vk::SubpassContents contents, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const vk::SubpassBeginInfoKHR* pSubpassBeginInfo, const vk::SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
+ {
+ d.vkCmdNextSubpass2( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfo*>( pSubpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfo*>( pSubpassEndInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const SubpassBeginInfo & subpassBeginInfo, const SubpassEndInfo & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkCmdNextSubpass2( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfo*>( &subpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfo*>( &subpassEndInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ 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
{
- d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfoKHR*>( pSubpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfoKHR*>( pSubpassEndInfo ) );
+ d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfo*>( pSubpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfo*>( pSubpassEndInfo ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const SubpassBeginInfoKHR & subpassBeginInfo, const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const SubpassBeginInfo & subpassBeginInfo, const SubpassEndInfo & subpassEndInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfoKHR*>( &subpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfoKHR*>( &subpassEndInfo ) );
+ d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfo*>( &subpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfo*>( &subpassEndInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, vk::DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const vk::MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const vk::BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const vk::ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, vk::DependencyFlags dependencyFlags, ArrayProxy<const vk::MemoryBarrier> memoryBarriers, ArrayProxy<const vk::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const vk::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, ArrayProxy<const VULKAN_HPP_NAMESPACE::MemoryBarrier> memoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const vk::CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const VULKAN_HPP_NAMESPACE::CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( pProcessCommandsInfo ) );
}
@@ -66643,26 +62210,26 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushConstants( vk::PipelineLayout layout, vk::ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, size, pValues );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushConstants( vk::PipelineLayout layout, vk::ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast<const void*>( values.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const vk::WriteDescriptorSet* pDescriptorWrites, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), set, descriptorWriteCount, reinterpret_cast<const VkWriteDescriptorSet*>( pDescriptorWrites ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( vk::PipelineBindPoint pipelineBindPoint, vk::PipelineLayout layout, uint32_t set, ArrayProxy<const vk::WriteDescriptorSet> descriptorWrites, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, ArrayProxy<const VULKAN_HPP_NAMESPACE::WriteDescriptorSet> descriptorWrites, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), set, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ) );
}
@@ -66670,20 +62237,20 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, vk::PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), static_cast<VkPipelineLayout>( layout ), set, pData );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, vk::PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), static_cast<VkPipelineLayout>( layout ), set, pData );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const vk::CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const VULKAN_HPP_NAMESPACE::CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( pReserveSpaceInfo ) );
}
@@ -66697,13 +62264,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resetEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resetEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
@@ -66711,26 +62278,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resolveImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, uint32_t regionCount, const vk::ImageResolve* pRegions, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageResolve*>( pRegions ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::resolveImage( vk::Image srcImage, vk::ImageLayout srcImageLayout, vk::Image dstImage, vk::ImageLayout dstImageLayout, ArrayProxy<const vk::ImageResolve> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageResolve> regions, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageResolve*>( regions.data() ) );
}
@@ -66765,13 +62332,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( vk::CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const vk::CoarseSampleOrderCustomNV* pCustomSampleOrders, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ), customSampleOrderCount, reinterpret_cast<const VkCoarseSampleOrderCustomNV*>( pCustomSampleOrders ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( vk::CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const vk::CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ), customSampleOrders.size() , reinterpret_cast<const VkCoarseSampleOrderCustomNV*>( customSampleOrders.data() ) );
}
@@ -66834,13 +62401,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const vk::Rect2D* pDiscardRectangles, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangleCount, reinterpret_cast<const VkRect2D*>( pDiscardRectangles ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const vk::Rect2D> discardRectangles, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> discardRectangles, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangles.size() , reinterpret_cast<const VkRect2D*>( discardRectangles.data() ) );
}
@@ -66848,26 +62415,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setEvent( vk::Event event, vk::PipelineStageFlags stageMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const vk::Rect2D* pExclusiveScissors, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissorCount, reinterpret_cast<const VkRect2D*>( pExclusiveScissors ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const vk::Rect2D> exclusiveScissors, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> exclusiveScissors, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissors.size() , reinterpret_cast<const VkRect2D*>( exclusiveScissors.data() ) );
}
@@ -66902,13 +62469,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceMarkerINTEL( const vk::PerformanceMarkerInfoINTEL* pMarkerInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceMarkerInfoINTEL*>( pMarkerInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::setPerformanceMarkerINTEL( const PerformanceMarkerInfoINTEL & markerInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::setPerformanceMarkerINTEL( const PerformanceMarkerInfoINTEL & markerInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceMarkerInfoINTEL*>( &markerInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::setPerformanceMarkerINTEL" );
@@ -66916,13 +62483,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceOverrideINTEL( const vk::PerformanceOverrideInfoINTEL* pOverrideInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL* pOverrideInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceOverrideInfoINTEL*>( pOverrideInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::setPerformanceOverrideINTEL( const PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::setPerformanceOverrideINTEL( const PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceOverrideInfoINTEL*>( &overrideInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::setPerformanceOverrideINTEL" );
@@ -66930,13 +62497,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceStreamMarkerINTEL( const vk::PerformanceStreamMarkerInfoINTEL* pMarkerInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL* pMarkerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceStreamMarkerInfoINTEL*>( pMarkerInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::setPerformanceStreamMarkerINTEL( const PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::setPerformanceStreamMarkerINTEL( const PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast<const VkPerformanceStreamMarkerInfoINTEL*>( &markerInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::setPerformanceStreamMarkerINTEL" );
@@ -66944,7 +62511,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const vk::SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast<const VkSampleLocationsInfoEXT*>( pSampleLocationsInfo ) );
}
@@ -66957,13 +62524,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const vk::Rect2D* pScissors, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast<const VkRect2D*>( pScissors ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy<const vk::Rect2D> scissors, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> scissors, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast<const VkRect2D*>( scissors.data() ) );
}
@@ -66971,13 +62538,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( vk::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( vk::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask );
}
@@ -66985,13 +62552,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( vk::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( vk::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference );
}
@@ -66999,52 +62566,52 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( vk::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( vk::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const vk::Viewport* pViewports, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewport*>( pViewports ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy<const vk::Viewport> viewports, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::Viewport> viewports, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast<const VkViewport*>( viewports.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const vk::ShadingRatePaletteNV* pShadingRatePalettes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkShadingRatePaletteNV*>( pShadingRatePalettes ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const vk::ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer, firstViewport, shadingRatePalettes.size() , reinterpret_cast<const VkShadingRatePaletteNV*>( shadingRatePalettes.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const vk::ViewportWScalingNV* pViewportWScalings, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewportWScalingNV*>( pViewportWScalings ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const vk::ViewportWScalingNV> viewportWScalings, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const VULKAN_HPP_NAMESPACE::ViewportWScalingNV> viewportWScalings, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportWScalings.size() , reinterpret_cast<const VkViewportWScalingNV*>( viewportWScalings.data() ) );
}
@@ -67052,52 +62619,52 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( vk::Buffer raygenShaderBindingTableBuffer, vk::DeviceSize raygenShaderBindingOffset, vk::Buffer missShaderBindingTableBuffer, vk::DeviceSize missShaderBindingOffset, vk::DeviceSize missShaderBindingStride, vk::Buffer hitShaderBindingTableBuffer, vk::DeviceSize hitShaderBindingOffset, vk::DeviceSize hitShaderBindingStride, vk::Buffer callableShaderBindingTableBuffer, vk::DeviceSize callableShaderBindingOffset, vk::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdTraceRaysNV( m_commandBuffer, static_cast<VkBuffer>( raygenShaderBindingTableBuffer ), static_cast<VkDeviceSize>( raygenShaderBindingOffset ), static_cast<VkBuffer>( missShaderBindingTableBuffer ), static_cast<VkDeviceSize>( missShaderBindingOffset ), static_cast<VkDeviceSize>( missShaderBindingStride ), static_cast<VkBuffer>( hitShaderBindingTableBuffer ), static_cast<VkDeviceSize>( hitShaderBindingOffset ), static_cast<VkDeviceSize>( hitShaderBindingStride ), static_cast<VkBuffer>( callableShaderBindingTableBuffer ), static_cast<VkDeviceSize>( callableShaderBindingOffset ), static_cast<VkDeviceSize>( callableShaderBindingStride ), width, height, depth );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( vk::Buffer raygenShaderBindingTableBuffer, vk::DeviceSize raygenShaderBindingOffset, vk::Buffer missShaderBindingTableBuffer, vk::DeviceSize missShaderBindingOffset, vk::DeviceSize missShaderBindingStride, vk::Buffer hitShaderBindingTableBuffer, vk::DeviceSize hitShaderBindingOffset, vk::DeviceSize hitShaderBindingStride, vk::Buffer callableShaderBindingTableBuffer, vk::DeviceSize callableShaderBindingOffset, vk::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdTraceRaysNV( m_commandBuffer, static_cast<VkBuffer>( raygenShaderBindingTableBuffer ), static_cast<VkDeviceSize>( raygenShaderBindingOffset ), static_cast<VkBuffer>( missShaderBindingTableBuffer ), static_cast<VkDeviceSize>( missShaderBindingOffset ), static_cast<VkDeviceSize>( missShaderBindingStride ), static_cast<VkBuffer>( hitShaderBindingTableBuffer ), static_cast<VkDeviceSize>( hitShaderBindingOffset ), static_cast<VkDeviceSize>( hitShaderBindingStride ), static_cast<VkBuffer>( callableShaderBindingTableBuffer ), static_cast<VkDeviceSize>( callableShaderBindingOffset ), static_cast<VkDeviceSize>( callableShaderBindingStride ), width, height, depth );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, vk::DeviceSize dataSize, const void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), static_cast<VkDeviceSize>( dataSize ), pData );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( vk::Buffer dstBuffer, vk::DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), data.size() * sizeof( T ) , reinterpret_cast<const void*>( data.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const vk::Event* pEvents, vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const vk::MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const vk::BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const vk::ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast<const VkEvent*>( pEvents ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy<const vk::Event> events, vk::PipelineStageFlags srcStageMask, vk::PipelineStageFlags dstStageMask, ArrayProxy<const vk::MemoryBarrier> memoryBarriers, ArrayProxy<const vk::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const vk::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy<const VULKAN_HPP_NAMESPACE::Event> events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, ArrayProxy<const VULKAN_HPP_NAMESPACE::MemoryBarrier> memoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const vk::AccelerationStructureNV* pAccelerationStructures, vk::QueryType queryType, vk::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, accelerationStructureCount, reinterpret_cast<const VkAccelerationStructureNV*>( pAccelerationStructures ), static_cast<VkQueryType>( queryType ), static_cast<VkQueryPool>( queryPool ), firstQuery );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( ArrayProxy<const vk::AccelerationStructureNV> accelerationStructures, vk::QueryType queryType, vk::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureNV> accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, accelerationStructures.size() , reinterpret_cast<const VkAccelerationStructureNV*>( accelerationStructures.data() ), static_cast<VkQueryType>( queryType ), static_cast<VkQueryPool>( queryPool ), firstQuery );
}
@@ -67105,13 +62672,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( vk::PipelineStageFlagBits pipelineStage, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, uint32_t marker, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), marker );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( vk::PipelineStageFlagBits pipelineStage, vk::Buffer dstBuffer, vk::DeviceSize dstOffset, uint32_t marker, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkBuffer>( dstBuffer ), static_cast<VkDeviceSize>( dstOffset ), marker );
}
@@ -67119,13 +62686,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( vk::PipelineStageFlagBits pipelineStage, vk::QueryPool queryPool, uint32_t query, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( vk::PipelineStageFlagBits pipelineStage, vk::QueryPool queryPool, uint32_t query, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query );
}
@@ -67133,13 +62700,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::end(Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::end(Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::end(Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::end(Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::end" );
@@ -67148,13 +62715,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result CommandBuffer::reset( vk::CommandBufferResetFlags flags, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::reset( vk::CommandBufferResetFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::reset" );
@@ -67164,13 +62731,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::acquireFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::acquireFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireFullScreenExclusiveModeEXT" );
@@ -67179,7 +62746,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::acquireNextImage2KHR( const vk::AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAcquireNextImage2KHR( m_device, reinterpret_cast<const VkAcquireNextImageInfoKHR*>( pAcquireInfo ), pImageIndex ) );
}
@@ -67194,13 +62761,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( vk::SwapchainKHR swapchain, uint64_t timeout, vk::Semaphore semaphore, vk::Fence fence, uint32_t* pImageIndex, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), pImageIndex ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValue<uint32_t> Device::acquireNextImageKHR( vk::SwapchainKHR swapchain, uint64_t timeout, vk::Semaphore semaphore, vk::Fence fence, Dispatch const &d ) const
+ VULKAN_HPP_INLINE ResultValue<uint32_t> Device::acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d ) const
{
uint32_t imageIndex;
Result result = static_cast<Result>( d.vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), &imageIndex ) );
@@ -67209,22 +62776,36 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::acquirePerformanceConfigurationINTEL( const vk::PerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, vk::PerformanceConfigurationINTEL* pConfiguration, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL* pConfiguration, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAcquirePerformanceConfigurationINTEL( m_device, reinterpret_cast<const VkPerformanceConfigurationAcquireInfoINTEL*>( pAcquireInfo ), reinterpret_cast<VkPerformanceConfigurationINTEL*>( pConfiguration ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::PerformanceConfigurationINTEL>::type Device::acquirePerformanceConfigurationINTEL( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL>::type Device::acquirePerformanceConfigurationINTEL( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const &d ) const
{
- vk::PerformanceConfigurationINTEL configuration;
+ VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration;
Result result = static_cast<Result>( d.vkAcquirePerformanceConfigurationINTEL( m_device, reinterpret_cast<const VkPerformanceConfigurationAcquireInfoINTEL*>( &acquireInfo ), reinterpret_cast<VkPerformanceConfigurationINTEL*>( &configuration ) ) );
return createResultValue( result, configuration, VULKAN_HPP_NAMESPACE_STRING"::Device::acquirePerformanceConfigurationINTEL" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const vk::CommandBufferAllocateInfo* pAllocateInfo, vk::CommandBuffer* pCommandBuffers, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<Result>( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast<const VkAcquireProfilingLockInfoKHR*>( pInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::acquireProfilingLockKHR( const AcquireProfilingLockInfoKHR & info, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast<const VkAcquireProfilingLockInfoKHR*>( &info ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireProfilingLockKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo* pAllocateInfo, VULKAN_HPP_NAMESPACE::CommandBuffer* pCommandBuffers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkCommandBuffer*>( pCommandBuffers ) ) );
}
@@ -67252,7 +62833,7 @@ namespace VULKAN_HPP_NAMESPACE
commandBuffers.reserve( allocateInfo.commandBufferCount );
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueHandle<CommandBuffer, Dispatch> ) - sizeof( CommandBuffer ) ) );
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
@@ -67271,7 +62852,7 @@ namespace VULKAN_HPP_NAMESPACE
commandBuffers.reserve( allocateInfo.commandBufferCount );
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueHandle<CommandBuffer, Dispatch> ) - sizeof( CommandBuffer ) ) );
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
@@ -67286,7 +62867,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const vk::DescriptorSetAllocateInfo* pAllocateInfo, vk::DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo* pAllocateInfo, VULKAN_HPP_NAMESPACE::DescriptorSet* pDescriptorSets, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkDescriptorSet*>( pDescriptorSets ) ) );
}
@@ -67314,7 +62895,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorSets.reserve( allocateInfo.descriptorSetCount );
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueHandle<DescriptorSet, Dispatch> ) - sizeof( DescriptorSet ) ) );
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
@@ -67333,7 +62914,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorSets.reserve( allocateInfo.descriptorSetCount );
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueHandle<DescriptorSet, Dispatch> ) - sizeof( DescriptorSet ) ) );
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
@@ -67348,15 +62929,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::allocateMemory( const vk::MemoryAllocateInfo* pAllocateInfo, const vk::AllocationCallbacks* pAllocator, vk::DeviceMemory* pMemory, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( pAllocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDeviceMemory*>( pMemory ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DeviceMemory>::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceMemory>::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DeviceMemory memory;
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory;
Result result = static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDeviceMemory*>( &memory ) ) );
return createResultValue( result, memory, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateMemory" );
}
@@ -67364,7 +62945,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DeviceMemory,Dispatch>>::type Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DeviceMemory memory;
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory;
Result result = static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDeviceMemory*>( &memory ) ) );
ObjectFree<Device,Dispatch> deleter( *this, allocator, d );
@@ -67374,13 +62955,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const vk::BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBindAccelerationStructureMemoryNV( m_device, bindInfoCount, reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV*>( pBindInfos ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindAccelerationStructureMemoryNV( ArrayProxy<const vk::BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindAccelerationStructureMemoryNV( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindAccelerationStructureMemoryNV( m_device, bindInfos.size() , reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV*>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindAccelerationStructureMemoryNV" );
@@ -67389,13 +62970,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindBufferMemory( vk::Buffer buffer, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( memoryOffset ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory( vk::Buffer buffer, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( memoryOffset ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory" );
@@ -67403,13 +62984,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindBufferMemory2( uint32_t bindInfoCount, const vk::BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::bindBufferMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBindBufferMemory2( m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo*>( pBindInfos ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory2( ArrayProxy<const vk::BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindBufferMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindBufferMemory2( m_device, bindInfos.size() , reinterpret_cast<const VkBindBufferMemoryInfo*>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory2" );
@@ -67417,13 +62998,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const vk::BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo*>( pBindInfos ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory2KHR( ArrayProxy<const vk::BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindBufferMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindBufferMemory2KHR( m_device, bindInfos.size() , reinterpret_cast<const VkBindBufferMemoryInfo*>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory2KHR" );
@@ -67432,13 +63013,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindImageMemory( vk::Image image, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( memoryOffset ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory( vk::Image image, vk::DeviceMemory memory, vk::DeviceSize memoryOffset, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( memoryOffset ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory" );
@@ -67446,13 +63027,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindImageMemory2( uint32_t bindInfoCount, const vk::BindImageMemoryInfo* pBindInfos, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::bindImageMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo* pBindInfos, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBindImageMemory2( m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo*>( pBindInfos ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory2( ArrayProxy<const vk::BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindImageMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindImageMemory2( m_device, bindInfos.size() , reinterpret_cast<const VkBindImageMemoryInfo*>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory2" );
@@ -67460,13 +63041,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const vk::BindImageMemoryInfo* pBindInfos, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo* pBindInfos, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo*>( pBindInfos ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory2KHR( ArrayProxy<const vk::BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::bindImageMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkBindImageMemory2KHR( m_device, bindInfos.size() , reinterpret_cast<const VkBindImageMemoryInfo*>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory2KHR" );
@@ -67475,13 +63056,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::compileDeferredNV( vk::Pipeline pipeline, uint32_t shader, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::compileDeferredNV( vk::Pipeline pipeline, uint32_t shader, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::compileDeferredNV" );
@@ -67489,15 +63070,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createAccelerationStructureNV( const vk::AccelerationStructureCreateInfoNV* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::AccelerationStructureNV* pAccelerationStructure, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkAccelerationStructureNV*>( pAccelerationStructure ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::AccelerationStructureNV>::type Device::createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::AccelerationStructureNV>::type Device::createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::AccelerationStructureNV accelerationStructure;
+ VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkAccelerationStructureNV*>( &accelerationStructure ) ) );
return createResultValue( result, accelerationStructure, VULKAN_HPP_NAMESPACE_STRING"::Device::createAccelerationStructureNV" );
}
@@ -67505,7 +63086,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<AccelerationStructureNV,Dispatch>>::type Device::createAccelerationStructureNVUnique( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::AccelerationStructureNV accelerationStructure;
+ VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkAccelerationStructureNV*>( &accelerationStructure ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67515,15 +63096,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createBuffer( const vk::BufferCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Buffer* pBuffer, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBuffer*>( pBuffer ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Buffer>::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Buffer>::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Buffer buffer;
+ VULKAN_HPP_NAMESPACE::Buffer buffer;
Result result = static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBuffer*>( &buffer ) ) );
return createResultValue( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createBuffer" );
}
@@ -67531,7 +63112,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Buffer,Dispatch>>::type Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Buffer buffer;
+ VULKAN_HPP_NAMESPACE::Buffer buffer;
Result result = static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBuffer*>( &buffer ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67541,15 +63122,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createBufferView( const vk::BufferViewCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::BufferView* pView, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBufferView*>( pView ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::BufferView>::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::BufferView>::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::BufferView view;
+ VULKAN_HPP_NAMESPACE::BufferView view;
Result result = static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBufferView*>( &view ) ) );
return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferView" );
}
@@ -67557,7 +63138,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<BufferView,Dispatch>>::type Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::BufferView view;
+ VULKAN_HPP_NAMESPACE::BufferView view;
Result result = static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBufferView*>( &view ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67567,15 +63148,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createCommandPool( const vk::CommandPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::CommandPool* pCommandPool, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkCommandPool*>( pCommandPool ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::CommandPool>::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::CommandPool>::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::CommandPool commandPool;
+ VULKAN_HPP_NAMESPACE::CommandPool commandPool;
Result result = static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkCommandPool*>( &commandPool ) ) );
return createResultValue( result, commandPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createCommandPool" );
}
@@ -67583,7 +63164,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<CommandPool,Dispatch>>::type Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::CommandPool commandPool;
+ VULKAN_HPP_NAMESPACE::CommandPool commandPool;
Result result = static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkCommandPool*>( &commandPool ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67593,27 +63174,27 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createComputePipelines( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::ComputePipelineCreateInfo* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkComputePipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelines" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelines" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createComputePipeline( vk::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<Pipeline>::type Device::createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -67621,14 +63202,14 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -67640,14 +63221,14 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -67659,7 +63240,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createComputePipelineUnique( vk::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -67671,15 +63252,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createDescriptorPool( const vk::DescriptorPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorPool* pDescriptorPool, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorPool*>( pDescriptorPool ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DescriptorPool>::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorPool>::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorPool descriptorPool;
+ VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool;
Result result = static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) );
return createResultValue( result, descriptorPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorPool" );
}
@@ -67687,7 +63268,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorPool,Dispatch>>::type Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorPool descriptorPool;
+ VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool;
Result result = static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67697,15 +63278,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorSetLayout* pSetLayout, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorSetLayout*>( pSetLayout ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DescriptorSetLayout>::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorSetLayout>::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorSetLayout setLayout;
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout;
Result result = static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) );
return createResultValue( result, setLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorSetLayout" );
}
@@ -67713,7 +63294,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorSetLayout,Dispatch>>::type Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorSetLayout setLayout;
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout;
Result result = static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67723,15 +63304,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplate( const vk::DescriptorUpdateTemplateCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorUpdateTemplate*>( pDescriptorUpdateTemplate ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorUpdateTemplate descriptorUpdateTemplate;
+ VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplate" );
}
@@ -67739,7 +63320,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type Device::createDescriptorUpdateTemplateUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorUpdateTemplate descriptorUpdateTemplate;
+ VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67749,15 +63330,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplateKHR( const vk::DescriptorUpdateTemplateCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorUpdateTemplate*>( pDescriptorUpdateTemplate ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorUpdateTemplate descriptorUpdateTemplate;
+ VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateKHR" );
}
@@ -67765,7 +63346,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DescriptorUpdateTemplate descriptorUpdateTemplate;
+ VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67775,15 +63356,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createEvent( const vk::EventCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Event* pEvent, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkEvent*>( pEvent ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Event>::type Device::createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Event>::type Device::createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Event event;
+ VULKAN_HPP_NAMESPACE::Event event;
Result result = static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkEvent*>( &event ) ) );
return createResultValue( result, event, VULKAN_HPP_NAMESPACE_STRING"::Device::createEvent" );
}
@@ -67791,7 +63372,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Event,Dispatch>>::type Device::createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Event event;
+ VULKAN_HPP_NAMESPACE::Event event;
Result result = static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkEvent*>( &event ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67801,15 +63382,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createFence( const vk::FenceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Fence>::type Device::createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type Device::createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Fence fence;
+ VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::createFence" );
}
@@ -67817,7 +63398,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Fence fence;
+ VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67827,15 +63408,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createFramebuffer( const vk::FramebufferCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Framebuffer* pFramebuffer, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFramebuffer*>( pFramebuffer ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Framebuffer>::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Framebuffer>::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Framebuffer framebuffer;
+ VULKAN_HPP_NAMESPACE::Framebuffer framebuffer;
Result result = static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) );
return createResultValue( result, framebuffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createFramebuffer" );
}
@@ -67843,7 +63424,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Framebuffer,Dispatch>>::type Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Framebuffer framebuffer;
+ VULKAN_HPP_NAMESPACE::Framebuffer framebuffer;
Result result = static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67853,27 +63434,27 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::GraphicsPipelineCreateInfo* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelines" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelines" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createGraphicsPipeline( vk::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<Pipeline>::type Device::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -67881,14 +63462,14 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -67900,14 +63481,14 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -67919,7 +63500,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createGraphicsPipelineUnique( vk::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -67931,15 +63512,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createImage( const vk::ImageCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Image* pImage, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImage*>( pImage ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Image>::type Device::createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Image>::type Device::createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Image image;
+ VULKAN_HPP_NAMESPACE::Image image;
Result result = static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImage*>( &image ) ) );
return createResultValue( result, image, VULKAN_HPP_NAMESPACE_STRING"::Device::createImage" );
}
@@ -67947,7 +63528,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Image,Dispatch>>::type Device::createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Image image;
+ VULKAN_HPP_NAMESPACE::Image image;
Result result = static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImage*>( &image ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67957,15 +63538,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createImageView( const vk::ImageViewCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ImageView* pView, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImageView*>( pView ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ImageView>::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageView>::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ImageView view;
+ VULKAN_HPP_NAMESPACE::ImageView view;
Result result = static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImageView*>( &view ) ) );
return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageView" );
}
@@ -67973,7 +63554,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ImageView,Dispatch>>::type Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ImageView view;
+ VULKAN_HPP_NAMESPACE::ImageView view;
Result result = static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImageView*>( &view ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -67983,15 +63564,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const vk::IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( pIndirectCommandsLayout ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::IndirectCommandsLayoutNVX>::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX>::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout;
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout;
Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) );
return createResultValue( result, indirectCommandsLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createIndirectCommandsLayoutNVX" );
}
@@ -67999,7 +63580,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<IndirectCommandsLayoutNVX,Dispatch>>::type Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::IndirectCommandsLayoutNVX indirectCommandsLayout;
+ VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout;
Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68009,15 +63590,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const vk::ObjectTableCreateInfoNVX* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ObjectTableNVX* pObjectTable, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const VULKAN_HPP_NAMESPACE::ObjectTableCreateInfoNVX* pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, VULKAN_HPP_NAMESPACE::ObjectTableNVX* pObjectTable, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkObjectTableNVX*>( pObjectTable ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ObjectTableNVX>::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ObjectTableNVX>::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ObjectTableNVX objectTable;
+ VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable;
Result result = static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) );
return createResultValue( result, objectTable, VULKAN_HPP_NAMESPACE_STRING"::Device::createObjectTableNVX" );
}
@@ -68025,7 +63606,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ObjectTableNVX,Dispatch>>::type Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ObjectTableNVX objectTable;
+ VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable;
Result result = static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68035,15 +63616,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createPipelineCache( const vk::PipelineCacheCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::PipelineCache* pPipelineCache, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineCache*>( pPipelineCache ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::PipelineCache>::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::PipelineCache>::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::PipelineCache pipelineCache;
+ VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache;
Result result = static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) );
return createResultValue( result, pipelineCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineCache" );
}
@@ -68051,7 +63632,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<PipelineCache,Dispatch>>::type Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::PipelineCache pipelineCache;
+ VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache;
Result result = static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68061,15 +63642,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createPipelineLayout( const vk::PipelineLayoutCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::PipelineLayout* pPipelineLayout, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineLayout*>( pPipelineLayout ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::PipelineLayout>::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::PipelineLayout>::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::PipelineLayout pipelineLayout;
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout;
Result result = static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) );
return createResultValue( result, pipelineLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineLayout" );
}
@@ -68077,7 +63658,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<PipelineLayout,Dispatch>>::type Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::PipelineLayout pipelineLayout;
+ VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout;
Result result = static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68087,15 +63668,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createQueryPool( const vk::QueryPoolCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::QueryPool* pQueryPool, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkQueryPool*>( pQueryPool ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::QueryPool>::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::QueryPool>::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::QueryPool queryPool;
+ VULKAN_HPP_NAMESPACE::QueryPool queryPool;
Result result = static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkQueryPool*>( &queryPool ) ) );
return createResultValue( result, queryPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createQueryPool" );
}
@@ -68103,7 +63684,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<QueryPool,Dispatch>>::type Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::QueryPool queryPool;
+ VULKAN_HPP_NAMESPACE::QueryPool queryPool;
Result result = static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkQueryPool*>( &queryPool ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68113,27 +63694,27 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, uint32_t createInfoCount, const vk::RayTracingPipelineCreateInfoNV* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::Pipeline* pPipelines, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelinesNV" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelinesNV" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createRayTracingPipelineNV( vk::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<Pipeline>::type Device::createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -68141,14 +63722,14 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -68160,14 +63741,14 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( vk::PipelineCache pipelineCache, ArrayProxy<const vk::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
pipelines.reserve( createInfos.size() );
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -68179,7 +63760,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createRayTracingPipelineNVUnique( vk::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
Pipeline pipeline;
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
@@ -68191,15 +63772,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createRenderPass( const vk::RenderPassCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::RenderPass* pRenderPass, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::RenderPass>::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::RenderPass renderPass;
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass" );
}
@@ -68207,7 +63788,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::RenderPass renderPass;
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68217,24 +63798,50 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createRenderPass2KHR( const vk::RenderPassCreateInfo2KHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::RenderPass* pRenderPass, Dispatch const &d) const
+ 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
+ {
+ return static_cast<Result>( d.vkCreateRenderPass2( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type Device::createRenderPass2( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+ return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPass2Unique( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<RenderPass,Dispatch>( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2Unique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ 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
{
- return static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
+ return static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::RenderPass>::type Device::createRenderPass2KHR( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::RenderPass>::type Device::createRenderPass2KHR( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::RenderPass renderPass;
- Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2KHR" );
}
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPass2KHRUnique( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPass2KHRUnique( const RenderPassCreateInfo2 & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::RenderPass renderPass;
- Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+ VULKAN_HPP_NAMESPACE::RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
return createResultValue<RenderPass,Dispatch>( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2KHRUnique", deleter );
@@ -68243,15 +63850,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSampler( const vk::SamplerCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Sampler* pSampler, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSampler*>( pSampler ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Sampler>::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Sampler>::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Sampler sampler;
+ VULKAN_HPP_NAMESPACE::Sampler sampler;
Result result = static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSampler*>( &sampler ) ) );
return createResultValue( result, sampler, VULKAN_HPP_NAMESPACE_STRING"::Device::createSampler" );
}
@@ -68259,7 +63866,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Sampler,Dispatch>>::type Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Sampler sampler;
+ VULKAN_HPP_NAMESPACE::Sampler sampler;
Result result = static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSampler*>( &sampler ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68269,15 +63876,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversion( const vk::SamplerYcbcrConversionCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSamplerYcbcrConversion*>( pYcbcrConversion ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SamplerYcbcrConversion ycbcrConversion;
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversion" );
}
@@ -68285,7 +63892,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type Device::createSamplerYcbcrConversionUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SamplerYcbcrConversion ycbcrConversion;
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68295,15 +63902,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const vk::SamplerYcbcrConversionCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSamplerYcbcrConversion*>( pYcbcrConversion ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SamplerYcbcrConversion ycbcrConversion;
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionKHR" );
}
@@ -68311,7 +63918,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SamplerYcbcrConversion ycbcrConversion;
+ VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68321,15 +63928,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSemaphore( const vk::SemaphoreCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Semaphore* pSemaphore, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSemaphore*>( pSemaphore ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Semaphore>::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Semaphore>::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Semaphore semaphore;
+ VULKAN_HPP_NAMESPACE::Semaphore semaphore;
Result result = static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSemaphore*>( &semaphore ) ) );
return createResultValue( result, semaphore, VULKAN_HPP_NAMESPACE_STRING"::Device::createSemaphore" );
}
@@ -68337,7 +63944,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Semaphore,Dispatch>>::type Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Semaphore semaphore;
+ VULKAN_HPP_NAMESPACE::Semaphore semaphore;
Result result = static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSemaphore*>( &semaphore ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68347,15 +63954,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createShaderModule( const vk::ShaderModuleCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ShaderModule* pShaderModule, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkShaderModule*>( pShaderModule ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ShaderModule>::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ShaderModule>::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ShaderModule shaderModule;
+ VULKAN_HPP_NAMESPACE::ShaderModule shaderModule;
Result result = static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) );
return createResultValue( result, shaderModule, VULKAN_HPP_NAMESPACE_STRING"::Device::createShaderModule" );
}
@@ -68363,7 +63970,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ShaderModule,Dispatch>>::type Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ShaderModule shaderModule;
+ VULKAN_HPP_NAMESPACE::ShaderModule shaderModule;
Result result = static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68373,27 +63980,27 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const vk::SwapchainCreateInfoKHR* pCreateInfos, const vk::AllocationCallbacks* pAllocator, vk::SwapchainKHR* pSwapchains, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchains ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainsKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size(), vectorAllocator );
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainsKHR" );
}
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<SwapchainKHR>::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<SwapchainKHR>::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
SwapchainKHR swapchain;
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
@@ -68401,14 +64008,14 @@ namespace VULKAN_HPP_NAMESPACE
}
#ifndef VULKAN_HPP_NO_SMART_HANDLE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueHandle<SwapchainKHR, Dispatch> ), "SwapchainKHR is greater than UniqueHandle<SwapchainKHR, Dispatch>!" );
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, Allocator> swapchainKHRs;
swapchainKHRs.reserve( createInfos.size() );
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueHandle<SwapchainKHR, Dispatch> ) - sizeof( SwapchainKHR ) ) );
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -68420,14 +64027,14 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const vk::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
{
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueHandle<SwapchainKHR, Dispatch> ), "SwapchainKHR is greater than UniqueHandle<SwapchainKHR, Dispatch>!" );
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, Allocator> swapchainKHRs( vectorAllocator );
swapchainKHRs.reserve( createInfos.size() );
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueHandle<SwapchainKHR, Dispatch> ) - sizeof( SwapchainKHR ) ) );
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
- if (result == vk::Result::eSuccess)
+ if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
for ( size_t i=0 ; i<createInfos.size() ; i++ )
@@ -68451,15 +64058,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const vk::SwapchainCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SwapchainKHR* pSwapchain, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchain ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SwapchainKHR>::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SwapchainKHR>::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SwapchainKHR swapchain;
+ VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain;
Result result = static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSwapchainKHR" );
}
@@ -68467,7 +64074,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SwapchainKHR swapchain;
+ VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain;
Result result = static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68477,15 +64084,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const vk::ValidationCacheCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::ValidationCacheEXT* pValidationCache, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkValidationCacheEXT*>( pValidationCache ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ValidationCacheEXT>::type Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ValidationCacheEXT>::type Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ValidationCacheEXT validationCache;
+ VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache;
Result result = static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkValidationCacheEXT*>( &validationCache ) ) );
return createResultValue( result, validationCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createValidationCacheEXT" );
}
@@ -68493,7 +64100,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ValidationCacheEXT,Dispatch>>::type Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::ValidationCacheEXT validationCache;
+ VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache;
Result result = static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkValidationCacheEXT*>( &validationCache ) ) );
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
@@ -68503,13 +64110,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const vk::DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT*>( pNameInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT*>( &nameInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectNameEXT" );
@@ -68517,13 +64124,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const vk::DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT*>( pTagInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT*>( &tagInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectTagEXT" );
@@ -68531,202 +64138,202 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( vk::AccelerationStructureNV accelerationStructure, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( vk::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::AccelerationStructureNV accelerationStructure, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyBuffer( vk::Buffer buffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyBuffer( vk::Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Buffer buffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyBufferView( vk::BufferView bufferView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyBufferView( vk::BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::BufferView bufferView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyCommandPool( vk::CommandPool commandPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyCommandPool( vk::CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::CommandPool commandPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorPool( vk::DescriptorPool descriptorPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorPool( vk::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorPool descriptorPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( vk::DescriptorSetLayout descriptorSetLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( vk::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorSetLayout descriptorSetLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( vk::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
@@ -68739,481 +64346,481 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyEvent( vk::Event event, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyEvent( vk::Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Event event, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyFence( vk::Fence fence, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyFence( vk::Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Fence fence, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyFramebuffer( vk::Framebuffer framebuffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyFramebuffer( vk::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Framebuffer framebuffer, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyImage( vk::Image image, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyImage( vk::Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Image image, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyImageView( vk::ImageView imageView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyImageView( vk::ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ImageView imageView, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( vk::ObjectTableNVX objectTable, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( vk::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ObjectTableNVX objectTable, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipeline( vk::Pipeline pipeline, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipeline( vk::Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Pipeline pipeline, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipelineCache( vk::PipelineCache pipelineCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipelineCache( vk::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::PipelineCache pipelineCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipelineLayout( vk::PipelineLayout pipelineLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyPipelineLayout( vk::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::PipelineLayout pipelineLayout, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyQueryPool( vk::QueryPool queryPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyQueryPool( vk::QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::QueryPool queryPool, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyRenderPass( vk::RenderPass renderPass, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyRenderPass( vk::RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::RenderPass renderPass, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySampler( vk::Sampler sampler, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySampler( vk::Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Sampler sampler, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( vk::SamplerYcbcrConversion ycbcrConversion, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( vk::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySemaphore( vk::Semaphore semaphore, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySemaphore( vk::Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Semaphore semaphore, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyShaderModule( vk::ShaderModule shaderModule, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyShaderModule( vk::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ShaderModule shaderModule, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySwapchainKHR( vk::SwapchainKHR swapchain, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroySwapchainKHR( vk::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::SwapchainKHR swapchain, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( vk::ValidationCacheEXT validationCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( vk::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ValidationCacheEXT validationCache, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::destroy( vk::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
@@ -69221,13 +64828,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::waitIdle(Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::waitIdle(Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::waitIdle(Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::waitIdle(Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitIdle" );
@@ -69235,13 +64842,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( vk::DisplayKHR display, const vk::DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( pDisplayPowerInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::displayPowerControlEXT( vk::DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( &displayPowerInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::displayPowerControlEXT" );
@@ -69249,13 +64856,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const vk::MappedMemoryRange* pMemoryRanges, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange* pMemoryRanges, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::flushMappedMemoryRanges( ArrayProxy<const vk::MappedMemoryRange> memoryRanges, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::flushMappedMemoryRanges( ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> memoryRanges, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::flushMappedMemoryRanges" );
@@ -69263,39 +64870,39 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::freeCommandBuffers( vk::CommandPool commandPool, uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::freeCommandBuffers( vk::CommandPool commandPool, ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::free( vk::CommandPool commandPool, uint32_t commandBufferCount, const vk::CommandBuffer* pCommandBuffers, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::free( vk::CommandPool commandPool, ArrayProxy<const vk::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::free( VULKAN_HPP_NAMESPACE::CommandPool commandPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> commandBuffers, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::freeDescriptorSets( vk::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::freeDescriptorSets( vk::DescriptorPool descriptorPool, ArrayProxy<const vk::DescriptorSet> descriptorSets, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::freeDescriptorSets" );
@@ -69303,13 +64910,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::free( vk::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const vk::DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::free( vk::DescriptorPool descriptorPool, ArrayProxy<const vk::DescriptorSet> descriptorSets, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::free( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> descriptorSets, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::free" );
@@ -69317,39 +64924,39 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::freeMemory( vk::DeviceMemory memory, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::freeMemory( vk::DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::free( vk::DeviceMemory memory, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::free( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::free( vk::DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::free( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getAccelerationStructureHandleNV( vk::AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetAccelerationStructureHandleNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), dataSize, pData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::getAccelerationStructureHandleNV( vk::AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetAccelerationStructureHandleNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getAccelerationStructureHandleNV" );
@@ -69357,15 +64964,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getAccelerationStructureMemoryRequirementsNV( const vk::AccelerationStructureMemoryRequirementsInfoNV* pInfo, vk::MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>( pInfo ), reinterpret_cast<VkMemoryRequirements2KHR*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements2KHR memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements;
d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>( &info ), reinterpret_cast<VkMemoryRequirements2KHR*>( &memoryRequirements ) );
return memoryRequirements;
}
@@ -69373,7 +64980,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::MemoryRequirements2KHR& memoryRequirements = structureChain.template get<vk::MemoryRequirements2KHR>();
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR& memoryRequirements = structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR>();
d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>( &info ), reinterpret_cast<VkMemoryRequirements2KHR*>( &memoryRequirements ) );
return structureChain;
}
@@ -69381,15 +64988,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, vk::AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( pProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::AndroidHardwareBufferPropertiesANDROID>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const
{
- vk::AndroidHardwareBufferPropertiesANDROID properties;
+ VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties;
Result result = static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( &properties ) ) );
return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" );
}
@@ -69397,7 +65004,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const
{
StructureChain<X, Y, Z...> structureChain;
- vk::AndroidHardwareBufferPropertiesANDROID& properties = structureChain.template get<vk::AndroidHardwareBufferPropertiesANDROID>();
+ VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID& properties = structureChain.template get<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID>();
Result result = static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( &properties ) ) );
return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" );
}
@@ -69405,43 +65012,69 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const vk::BufferDeviceAddressInfoEXT* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<DeviceAddress>( d.vkGetBufferDeviceAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( pInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const BufferDeviceAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferDeviceAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<DeviceAddress>( d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( pInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const BufferDeviceAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
- return static_cast<DeviceAddress>( d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfoEXT*>( pInfo ) ) );
+ return static_cast<DeviceAddress>( d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( pInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const BufferDeviceAddressInfoEXT & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR( const BufferDeviceAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- return d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfoEXT*>( &info ) );
+ return d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( vk::Buffer buffer, vk::MemoryRequirements* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::MemoryRequirements* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements Device::getBufferMemoryRequirements( vk::Buffer buffer, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements;
d.vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) );
return memoryRequirements;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2( const vk::BufferMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements2 Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements2 memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return memoryRequirements;
}
@@ -69449,22 +65082,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::MemoryRequirements2& memoryRequirements = structureChain.template get<vk::MemoryRequirements2>();
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2& memoryRequirements = structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const vk::BufferMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements2 Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements2 memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return memoryRequirements;
}
@@ -69472,20 +65105,46 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::MemoryRequirements2& memoryRequirements = structureChain.template get<vk::MemoryRequirements2>();
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2& memoryRequirements = structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsEXT( uint32_t timestampCount, const vk::CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d) const
+ VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( pInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const BufferDeviceAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferOpaqueCaptureAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( pInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const BufferDeviceAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetBufferOpaqueCaptureAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsEXT( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetCalibratedTimestampsEXT( m_device, timestampCount, reinterpret_cast<const VkCalibratedTimestampInfoEXT*>( pTimestampInfos ), pTimestamps, pMaxDeviation ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<uint64_t>::type Device::getCalibratedTimestampsEXT( ArrayProxy<const vk::CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type Device::getCalibratedTimestampsEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( timestampInfos.size() == timestamps.size() );
@@ -69502,15 +65161,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupport( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, vk::DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo* pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( pSupport ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::DescriptorSetLayoutSupport support;
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support;
d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
return support;
}
@@ -69518,22 +65177,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::DescriptorSetLayoutSupport& support = structureChain.template get<vk::DescriptorSetLayoutSupport>();
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport& support = structureChain.template get<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport>();
d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupportKHR( const vk::DescriptorSetLayoutCreateInfo* pCreateInfo, vk::DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo* pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( pSupport ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::DescriptorSetLayoutSupport support;
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support;
d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
return support;
}
@@ -69541,52 +65200,52 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::DescriptorSetLayoutSupport& support = structureChain.template get<vk::DescriptorSetLayoutSupport>();
+ VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport& support = structureChain.template get<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport>();
d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, vk::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetDeviceGroupPeerMemoryFeatures( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( pPeerMemoryFeatures ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
- vk::PeerMemoryFeatureFlags peerMemoryFeatures;
+ VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures;
d.vkGetDeviceGroupPeerMemoryFeatures( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( &peerMemoryFeatures ) );
return peerMemoryFeatures;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, vk::PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( pPeerMemoryFeatures ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
- vk::PeerMemoryFeatureFlags peerMemoryFeatures;
+ VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures;
d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( &peerMemoryFeatures ) );
return peerMemoryFeatures;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHR( vk::DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>( pDeviceGroupPresentCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DeviceGroupPresentCapabilitiesKHR>::type Device::getGroupPresentCapabilitiesKHR(Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR>::type Device::getGroupPresentCapabilitiesKHR(Dispatch const &d ) const
{
- vk::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities;
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities;
Result result = static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>( &deviceGroupPresentCapabilities ) ) );
return createResultValue( result, deviceGroupPresentCapabilities, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupPresentCapabilitiesKHR" );
}
@@ -69594,15 +65253,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModes2EXT( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, vk::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModes2EXT( m_device, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( pModes ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DeviceGroupPresentModeFlagsKHR>::type Device::getGroupSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR>::type Device::getGroupSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
{
- vk::DeviceGroupPresentModeFlagsKHR modes;
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes;
Result result = static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModes2EXT( m_device, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( &modes ) ) );
return createResultValue( result, modes, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupSurfacePresentModes2EXT" );
}
@@ -69610,36 +65269,62 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHR( vk::SurfaceKHR surface, vk::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModesKHR( m_device, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( pModes ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DeviceGroupPresentModeFlagsKHR>::type Device::getGroupSurfacePresentModesKHR( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR>::type Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
- vk::DeviceGroupPresentModeFlagsKHR modes;
+ VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes;
Result result = static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModesKHR( m_device, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( &modes ) ) );
return createResultValue( result, modes, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupSurfacePresentModesKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getMemoryCommitment( vk::DeviceMemory memory, vk::DeviceSize* pCommittedMemoryInBytes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize* pCommittedMemoryInBytes, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<VkDeviceSize*>( pCommittedMemoryInBytes ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::DeviceSize Device::getMemoryCommitment( vk::DeviceMemory memory, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::DeviceSize committedMemoryInBytes;
+ VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes;
d.vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<VkDeviceSize*>( &committedMemoryInBytes ) );
return committedMemoryInBytes;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetDeviceMemoryOpaqueCaptureAddress( m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo*>( pInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetDeviceMemoryOpaqueCaptureAddress( m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo*>( pInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo*>( &info ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return d.vkGetDeviceProcAddr( m_device, pName );
@@ -69653,30 +65338,30 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, vk::Queue* pQueue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, VULKAN_HPP_NAMESPACE::Queue* pQueue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( pQueue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::Queue queue;
+ VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( &queue ) );
return queue;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getQueue2( const vk::DeviceQueueInfo2* pQueueInfo, vk::Queue* pQueue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2* pQueueInfo, VULKAN_HPP_NAMESPACE::Queue* pQueue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetDeviceQueue2( m_device, reinterpret_cast<const VkDeviceQueueInfo2*>( pQueueInfo ), reinterpret_cast<VkQueue*>( pQueue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::Queue Device::getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::Queue queue;
+ VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue2( m_device, reinterpret_cast<const VkDeviceQueueInfo2*>( &queueInfo ), reinterpret_cast<VkQueue*>( &queue ) );
return queue;
}
@@ -69684,13 +65369,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getEventStatus( vk::Event event, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getEventStatus( vk::Event event, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } );
@@ -69698,13 +65383,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const vk::FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<int>::type Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<int>::type Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
{
int fd;
Result result = static_cast<Result>( d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR*>( &getFdInfo ), &fd ) );
@@ -69714,13 +65399,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getFenceStatus( vk::Fence fence, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getFenceStatus( vk::Fence fence, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } );
@@ -69729,13 +65414,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const vk::FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
{
HANDLE handle;
Result result = static_cast<Result>( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
@@ -69745,45 +65430,45 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( vk::Image image, vk::ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>( pProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ImageDrmFormatModifierPropertiesEXT>::type Device::getImageDrmFormatModifierPropertiesEXT( vk::Image image, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT>::type Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d ) const
{
- vk::ImageDrmFormatModifierPropertiesEXT properties;
+ VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties;
Result result = static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>( &properties ) ) );
return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::Device::getImageDrmFormatModifierPropertiesEXT" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( vk::Image image, vk::MemoryRequirements* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::MemoryRequirements* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements Device::getImageMemoryRequirements( vk::Image image, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements;
d.vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) );
return memoryRequirements;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2( const vk::ImageMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements2 Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements2 memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return memoryRequirements;
}
@@ -69791,22 +65476,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::MemoryRequirements2& memoryRequirements = structureChain.template get<vk::MemoryRequirements2>();
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2& memoryRequirements = structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const vk::ImageMemoryRequirementsInfo2* pInfo, vk::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2* pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MemoryRequirements2 Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MemoryRequirements2 memoryRequirements;
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return memoryRequirements;
}
@@ -69814,20 +65499,20 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::MemoryRequirements2& memoryRequirements = structureChain.template get<vk::MemoryRequirements2>();
+ VULKAN_HPP_NAMESPACE::MemoryRequirements2& memoryRequirements = structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( vk::Image image, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( pSparseMemoryRequirements ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( vk::Image image, Dispatch const &d ) const
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const &d ) const
{
std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount;
@@ -69837,7 +65522,7 @@ namespace VULKAN_HPP_NAMESPACE
return sparseMemoryRequirements;
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( vk::Image image, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements( vectorAllocator );
uint32_t sparseMemoryRequirementCount;
@@ -69849,7 +65534,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2( const vk::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( pSparseMemoryRequirements ) );
}
@@ -69877,7 +65562,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const vk::ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, vk::SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( pSparseMemoryRequirements ) );
}
@@ -69905,22 +65590,22 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( vk::Image image, const vk::ImageSubresource* pSubresource, vk::SubresourceLayout* pLayout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( pSubresource ), reinterpret_cast<VkSubresourceLayout*>( pLayout ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::SubresourceLayout Device::getImageSubresourceLayout( vk::Image image, const ImageSubresource & subresource, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout Device::getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const ImageSubresource & subresource, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::SubresourceLayout layout;
+ VULKAN_HPP_NAMESPACE::SubresourceLayout layout;
d.vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( &subresource ), reinterpret_cast<VkSubresourceLayout*>( &layout ) );
return layout;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const vk::ImageViewHandleInfoNVX* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX* pInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return d.vkGetImageViewHandleNVX( m_device, reinterpret_cast<const VkImageViewHandleInfoNVX*>( pInfo ) );
}
@@ -69934,13 +65619,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryAndroidHardwareBufferANDROID( const vk::MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID*>( pInfo ), pBuffer ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<struct AHardwareBuffer*>::type Device::getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<struct AHardwareBuffer*>::type Device::getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d ) const
{
struct AHardwareBuffer* buffer;
Result result = static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID*>( &info ), &buffer ) );
@@ -69950,13 +65635,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const vk::MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<int>::type Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<int>::type Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
{
int fd;
Result result = static_cast<Result>( d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR*>( &getFdInfo ), &fd ) );
@@ -69965,30 +65650,30 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, int fd, vk::MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), fd, reinterpret_cast<VkMemoryFdPropertiesKHR*>( pMemoryFdProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::MemoryFdPropertiesKHR>::type Device::getMemoryFdPropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR>::type Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d ) const
{
- vk::MemoryFdPropertiesKHR memoryFdProperties;
+ VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties;
Result result = static_cast<Result>( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), fd, reinterpret_cast<VkMemoryFdPropertiesKHR*>( &memoryFdProperties ) ) );
return createResultValue( result, memoryFdProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryFdPropertiesKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryHostPointerPropertiesEXT( vk::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, vk::MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), pHostPointer, reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>( pMemoryHostPointerProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::MemoryHostPointerPropertiesEXT>::type Device::getMemoryHostPointerPropertiesEXT( vk::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT>::type Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d ) const
{
- vk::MemoryHostPointerPropertiesEXT memoryHostPointerProperties;
+ VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties;
Result result = static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), pHostPointer, reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>( &memoryHostPointerProperties ) ) );
return createResultValue( result, memoryHostPointerProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryHostPointerPropertiesEXT" );
}
@@ -69996,13 +65681,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const vk::MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
{
HANDLE handle;
Result result = static_cast<Result>( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
@@ -70013,13 +65698,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( vk::DeviceMemory memory, vk::ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), pHandle ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getMemoryWin32HandleNV( vk::DeviceMemory memory, vk::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type Device::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d ) const
{
HANDLE handle;
Result result = static_cast<Result>( d.vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), &handle ) );
@@ -70030,15 +65715,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getMemoryWin32HandlePropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, vk::MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), handle, reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>( pMemoryWin32HandleProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::MemoryWin32HandlePropertiesKHR>::type Device::getMemoryWin32HandlePropertiesKHR( vk::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR>::type Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d ) const
{
- vk::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties;
+ VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties;
Result result = static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), handle, reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>( &memoryWin32HandleProperties ) ) );
return createResultValue( result, memoryWin32HandleProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandlePropertiesKHR" );
}
@@ -70046,13 +65731,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, vk::PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), pPresentationTimingCount, reinterpret_cast<VkPastPresentationTimingGOOGLE*>( pPresentationTimings ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings;
uint32_t presentationTimingCount;
@@ -70074,7 +65759,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING"::Device::getPastPresentationTimingGOOGLE" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( vk::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings( vectorAllocator );
uint32_t presentationTimingCount;
@@ -70098,28 +65783,28 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPerformanceParameterINTEL( vk::PerformanceParameterTypeINTEL parameter, vk::PerformanceValueINTEL* pValue, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, VULKAN_HPP_NAMESPACE::PerformanceValueINTEL* pValue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPerformanceParameterINTEL( m_device, static_cast<VkPerformanceParameterTypeINTEL>( parameter ), reinterpret_cast<VkPerformanceValueINTEL*>( pValue ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::PerformanceValueINTEL>::type Device::getPerformanceParameterINTEL( vk::PerformanceParameterTypeINTEL parameter, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::PerformanceValueINTEL>::type Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, Dispatch const &d ) const
{
- vk::PerformanceValueINTEL value;
+ VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value;
Result result = static_cast<Result>( d.vkGetPerformanceParameterINTEL( m_device, static_cast<VkPerformanceParameterTypeINTEL>( parameter ), reinterpret_cast<VkPerformanceValueINTEL*>( &value ) ) );
return createResultValue( result, value, VULKAN_HPP_NAMESPACE_STRING"::Device::getPerformanceParameterINTEL" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPipelineCacheData( vk::PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( vk::PipelineCache pipelineCache, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> data;
size_t dataSize;
@@ -70141,7 +65826,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getPipelineCacheData" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( vk::PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> data( vectorAllocator );
size_t dataSize;
@@ -70165,7 +65850,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPipelineExecutableInternalRepresentationsKHR( const vk::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, vk::PipelineExecutableInternalRepresentationKHR* pInternalRepresentations, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast<const VkPipelineExecutableInfoKHR*>( pExecutableInfo ), pInternalRepresentationCount, reinterpret_cast<VkPipelineExecutableInternalRepresentationKHR*>( pInternalRepresentations ) ) );
}
@@ -70217,7 +65902,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPipelineExecutablePropertiesKHR( const vk::PipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, vk::PipelineExecutablePropertiesKHR* pProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast<const VkPipelineInfoKHR*>( pPipelineInfo ), pExecutableCount, reinterpret_cast<VkPipelineExecutablePropertiesKHR*>( pProperties ) ) );
}
@@ -70269,7 +65954,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getPipelineExecutableStatisticsKHR( const vk::PipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, vk::PipelineExecutableStatisticKHR* pStatistics, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast<const VkPipelineExecutableInfoKHR*>( pExecutableInfo ), pStatisticCount, reinterpret_cast<VkPipelineExecutableStatisticKHR*>( pStatistics ) ) );
}
@@ -70321,13 +66006,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, dataSize, pData, static_cast<VkDeviceSize>( stride ), static_cast<VkQueryResultFlags>( flags ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getQueryPoolResults( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, vk::DeviceSize stride, vk::QueryResultFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ), static_cast<VkDeviceSize>( stride ), static_cast<VkQueryResultFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } );
@@ -70335,13 +66020,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesNV( vk::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, dataSize, pData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename T, typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::getRayTracingShaderGroupHandlesNV( vk::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getRayTracingShaderGroupHandlesNV" );
@@ -70349,43 +66034,58 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( vk::SwapchainKHR swapchain, vk::RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<VkRefreshCycleDurationGOOGLE*>( pDisplayTimingProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::RefreshCycleDurationGOOGLE>::type Device::getRefreshCycleDurationGOOGLE( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE>::type Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
- vk::RefreshCycleDurationGOOGLE displayTimingProperties;
+ VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties;
Result result = static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<VkRefreshCycleDurationGOOGLE*>( &displayTimingProperties ) ) );
return createResultValue( result, displayTimingProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getRefreshCycleDurationGOOGLE" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( vk::RenderPass renderPass, vk::Extent2D* pGranularity, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, VULKAN_HPP_NAMESPACE::Extent2D* pGranularity, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( pGranularity ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::Extent2D Device::getRenderAreaGranularity( vk::RenderPass renderPass, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::Extent2D granularity;
+ VULKAN_HPP_NAMESPACE::Extent2D granularity;
d.vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( &granularity ) );
return granularity;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValueKHR( vk::Semaphore semaphore, uint64_t* pValue, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t* pValue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<Result>( d.vkGetSemaphoreCounterValue( m_device, static_cast<VkSemaphore>( semaphore ), pValue ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const &d ) const
+ {
+ uint64_t value;
+ Result result = static_cast<Result>( d.vkGetSemaphoreCounterValue( m_device, static_cast<VkSemaphore>( semaphore ), &value ) );
+ return createResultValue( result, value, VULKAN_HPP_NAMESPACE_STRING"::Device::getSemaphoreCounterValue" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t* pValue, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast<VkSemaphore>( semaphore ), pValue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<uint64_t>::type Device::getSemaphoreCounterValueKHR( vk::Semaphore semaphore, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const &d ) const
{
uint64_t value;
Result result = static_cast<Result>( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast<VkSemaphore>( semaphore ), &value ) );
@@ -70394,13 +66094,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const vk::SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<int>::type Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<int>::type Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
{
int fd;
Result result = static_cast<Result>( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR*>( &getFdInfo ), &fd ) );
@@ -70410,13 +66110,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const vk::SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
{
HANDLE handle;
Result result = static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
@@ -70426,13 +66126,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), pInfoSize, pInfo ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> info;
size_t infoSize;
@@ -70454,7 +66154,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING"::Device::getShaderInfoAMD" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( vk::Pipeline pipeline, vk::ShaderStageFlagBits shaderStage, vk::ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> info( vectorAllocator );
size_t infoSize;
@@ -70478,13 +66178,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( vk::SwapchainKHR swapchain, vk::SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), pCounterValue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<uint64_t>::type Device::getSwapchainCounterEXT( vk::SwapchainKHR swapchain, vk::SurfaceCounterFlagBitsEXT counter, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type Device::getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, Dispatch const &d ) const
{
uint64_t counterValue;
Result result = static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), &counterValue ) );
@@ -70493,13 +66193,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( vk::SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, vk::Image* pSwapchainImages, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), pSwapchainImageCount, reinterpret_cast<VkImage*>( pSwapchainImages ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
std::vector<Image,Allocator> swapchainImages;
uint32_t swapchainImageCount;
@@ -70521,7 +66221,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainImagesKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( vk::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<Image,Allocator> swapchainImages( vectorAllocator );
uint32_t swapchainImageCount;
@@ -70546,13 +66246,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( vk::SwapchainKHR swapchain, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } );
@@ -70560,13 +66260,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), pDataSize, pData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> data;
size_t dataSize;
@@ -70588,7 +66288,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getValidationCacheDataEXT" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( vk::ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<uint8_t,Allocator> data( vectorAllocator );
size_t dataSize;
@@ -70612,13 +66312,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const vk::ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR*>( pImportFenceFdInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR*>( &importFenceFdInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceFdKHR" );
@@ -70627,13 +66327,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const vk::ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR*>( pImportFenceWin32HandleInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR*>( &importFenceWin32HandleInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceWin32HandleKHR" );
@@ -70642,13 +66342,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const vk::ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR*>( pImportSemaphoreFdInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR*>( &importSemaphoreFdInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreFdKHR" );
@@ -70657,13 +66357,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const vk::ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR*>( pImportSemaphoreWin32HandleInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR*>( &importSemaphoreWin32HandleInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreWin32HandleKHR" );
@@ -70672,13 +66372,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::initializePerformanceApiINTEL( const vk::InitializePerformanceApiInfoINTEL* pInitializeInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL* pInitializeInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast<const VkInitializePerformanceApiInfoINTEL*>( pInitializeInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::initializePerformanceApiINTEL( const InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::initializePerformanceApiINTEL( const InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast<const VkInitializePerformanceApiInfoINTEL*>( &initializeInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::initializePerformanceApiINTEL" );
@@ -70686,13 +66386,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const vk::MappedMemoryRange* pMemoryRanges, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange* pMemoryRanges, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::invalidateMappedMemoryRanges( ArrayProxy<const vk::MappedMemoryRange> memoryRanges, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::invalidateMappedMemoryRanges( ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> memoryRanges, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::invalidateMappedMemoryRanges" );
@@ -70700,13 +66400,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::mapMemory( vk::DeviceMemory memory, vk::DeviceSize offset, vk::DeviceSize size, vk::MemoryMapFlags flags, void** ppData, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( offset ), static_cast<VkDeviceSize>( size ), static_cast<VkMemoryMapFlags>( flags ), ppData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void*>::type Device::mapMemory( vk::DeviceMemory memory, vk::DeviceSize offset, vk::DeviceSize size, vk::MemoryMapFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void*>::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
{
void* pData;
Result result = static_cast<Result>( d.vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkDeviceSize>( offset ), static_cast<VkDeviceSize>( size ), static_cast<VkMemoryMapFlags>( flags ), &pData ) );
@@ -70715,13 +66415,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::mergePipelineCaches( vk::PipelineCache dstCache, uint32_t srcCacheCount, const vk::PipelineCache* pSrcCaches, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCacheCount, reinterpret_cast<const VkPipelineCache*>( pSrcCaches ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::mergePipelineCaches( vk::PipelineCache dstCache, ArrayProxy<const vk::PipelineCache> srcCaches, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::PipelineCache> srcCaches, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCaches.size() , reinterpret_cast<const VkPipelineCache*>( srcCaches.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergePipelineCaches" );
@@ -70729,13 +66429,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( vk::ValidationCacheEXT dstCache, uint32_t srcCacheCount, const vk::ValidationCacheEXT* pSrcCaches, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkMergeValidationCachesEXT( m_device, static_cast<VkValidationCacheEXT>( dstCache ), srcCacheCount, reinterpret_cast<const VkValidationCacheEXT*>( pSrcCaches ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::mergeValidationCachesEXT( vk::ValidationCacheEXT dstCache, ArrayProxy<const vk::ValidationCacheEXT> srcCaches, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> srcCaches, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkMergeValidationCachesEXT( m_device, static_cast<VkValidationCacheEXT>( dstCache ), srcCaches.size() , reinterpret_cast<const VkValidationCacheEXT*>( srcCaches.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergeValidationCachesEXT" );
@@ -70743,43 +66443,65 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::registerEventEXT( const vk::DeviceEventInfoEXT* pDeviceEventInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( pDeviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Fence>::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Fence fence;
+ VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( &deviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerEventEXT" );
}
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type Device::registerEventEXTUnique( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ VULKAN_HPP_NAMESPACE::Fence fence;
+ Result result = static_cast<Result>( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( &deviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Fence,Dispatch>( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerEventEXTUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( vk::DisplayKHR display, const vk::DisplayEventInfoEXT* pDisplayEventInfo, const vk::AllocationCallbacks* pAllocator, vk::Fence* pFence, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( pDisplayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Fence>::type Device::registerDisplayEventEXT( vk::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Fence>::type Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Fence fence;
+ VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>( d.vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( &displayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerDisplayEventEXT" );
}
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type Device::registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ VULKAN_HPP_NAMESPACE::Fence fence;
+ Result result = static_cast<Result>( d.vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( &displayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Fence,Dispatch>( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerDisplayEventEXTUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::registerObjectsNVX( vk::ObjectTableNVX objectTable, uint32_t objectCount, const vk::ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::registerObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, uint32_t objectCount, const VULKAN_HPP_NAMESPACE::ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectTableEntryNVX* const*>( ppObjectTableEntries ), pObjectIndices ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::registerObjectsNVX( vk::ObjectTableNVX objectTable, ArrayProxy<const vk::ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::registerObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, ArrayProxy<const VULKAN_HPP_NAMESPACE::ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( pObjectTableEntries.size() == objectIndices.size() );
@@ -70797,13 +66519,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::releaseFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::releaseFullScreenExclusiveModeEXT( vk::SwapchainKHR swapchain, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::releaseFullScreenExclusiveModeEXT" );
@@ -70813,13 +66535,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::releasePerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::releasePerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::releasePerformanceConfigurationINTEL" );
@@ -70828,13 +66550,27 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::resetCommandPool( vk::CommandPool commandPool, vk::CommandPoolResetFlags flags, Dispatch const &d) const
+ VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR(Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkReleaseProfilingLockKHR( m_device );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkReleaseProfilingLockKHR( m_device );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetCommandPool( vk::CommandPool commandPool, vk::CommandPoolResetFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetCommandPool" );
@@ -70843,13 +66579,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::resetDescriptorPool( vk::DescriptorPool descriptorPool, vk::DescriptorPoolResetFlags flags, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetDescriptorPool( vk::DescriptorPool descriptorPool, vk::DescriptorPoolResetFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetDescriptorPool" );
@@ -70858,13 +66594,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::resetEvent( vk::Event event, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetEvent( vk::Event event, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetEvent" );
@@ -70872,13 +66608,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const vk::Fence* pFences, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence* pFences, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkResetFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetFences( ArrayProxy<const vk::Fence> fences, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::resetFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> fences, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkResetFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetFences" );
@@ -70887,26 +66623,40 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkResetQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkResetQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkResetQueryPoolEXT( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( vk::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkResetQueryPoolEXT( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT( const vk::DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>( pNameInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>( &nameInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setDebugUtilsObjectNameEXT" );
@@ -70914,13 +66664,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT( const vk::DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT*>( pTagInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT*>( &tagInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setDebugUtilsObjectTagEXT" );
@@ -70929,13 +66679,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::setEvent( vk::Event event, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::setEvent( vk::Event event, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setEvent" );
@@ -70943,13 +66693,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, const vk::SwapchainKHR* pSwapchains, const vk::HdrMetadataEXT* pMetadata, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkSetHdrMetadataEXT( m_device, swapchainCount, reinterpret_cast<const VkSwapchainKHR*>( pSwapchains ), reinterpret_cast<const VkHdrMetadataEXT*>( pMetadata ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy<const vk::SwapchainKHR> swapchains, ArrayProxy<const vk::HdrMetadataEXT> metadata, Dispatch const &d ) const
+ VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::SwapchainKHR> swapchains, ArrayProxy<const VULKAN_HPP_NAMESPACE::HdrMetadataEXT> metadata, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() );
@@ -70965,41 +66715,55 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( vk::SwapchainKHR swapChain, vk::Bool32 localDimmingEnable, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkSetLocalDimmingAMD( m_device, static_cast<VkSwapchainKHR>( swapChain ), static_cast<VkBool32>( localDimmingEnable ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( vk::SwapchainKHR swapChain, vk::Bool32 localDimmingEnable, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkSetLocalDimmingAMD( m_device, static_cast<VkSwapchainKHR>( swapChain ), static_cast<VkBool32>( localDimmingEnable ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::signalSemaphoreKHR( const vk::SemaphoreSignalInfoKHR* pSignalInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo* pSignalInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<Result>( d.vkSignalSemaphore( m_device, reinterpret_cast<const VkSemaphoreSignalInfo*>( pSignalInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::signalSemaphore( const SemaphoreSignalInfo & signalInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkSignalSemaphore( m_device, reinterpret_cast<const VkSemaphoreSignalInfo*>( &signalInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::signalSemaphore" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo* pSignalInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
- return static_cast<Result>( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfoKHR*>( pSignalInfo ) ) );
+ return static_cast<Result>( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfo*>( pSignalInfo ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::signalSemaphoreKHR( const SemaphoreSignalInfoKHR & signalInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::signalSemaphoreKHR( const SemaphoreSignalInfo & signalInfo, Dispatch const &d ) const
{
- Result result = static_cast<Result>( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfoKHR*>( &signalInfo ) ) );
+ Result result = static_cast<Result>( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfo*>( &signalInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::signalSemaphoreKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::trimCommandPool( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkTrimCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::trimCommandPool( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkTrimCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
@@ -71007,13 +66771,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( vk::CommandPool commandPool, vk::CommandPoolTrimFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
@@ -71035,26 +66799,26 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::unmapMemory( vk::DeviceMemory memory, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::unmapMemory( vk::DeviceMemory memory, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( vk::ObjectTableNVX objectTable, uint32_t objectCount, const vk::ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, uint32_t objectCount, const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectEntryTypeNVX*>( pObjectEntryTypes ), pObjectIndices ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Device::unregisterObjectsNVX( vk::ObjectTableNVX objectTable, ArrayProxy<const vk::ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::unregisterObjectsNVX( VULKAN_HPP_NAMESPACE::ObjectTableNVX objectTable, ArrayProxy<const VULKAN_HPP_NAMESPACE::ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( objectEntryTypes.size() == objectIndices.size() );
@@ -71071,13 +66835,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkUpdateDescriptorSetWithTemplate( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkUpdateDescriptorSetWithTemplate( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
}
@@ -71085,39 +66849,39 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( vk::DescriptorSet descriptorSet, vk::DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const vk::WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const vk::CopyDescriptorSet* pDescriptorCopies, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast<const VkWriteDescriptorSet*>( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast<const VkCopyDescriptorSet*>( pDescriptorCopies ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy<const vk::WriteDescriptorSet> descriptorWrites, ArrayProxy<const vk::CopyDescriptorSet> descriptorCopies, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy<const VULKAN_HPP_NAMESPACE::WriteDescriptorSet> descriptorWrites, ArrayProxy<const VULKAN_HPP_NAMESPACE::CopyDescriptorSet> descriptorCopies, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const vk::Fence* pFences, vk::Bool32 waitAll, uint64_t timeout, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkWaitForFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ), static_cast<VkBool32>( waitAll ), timeout ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy<const vk::Fence> fences, vk::Bool32 waitAll, uint64_t timeout, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkWaitForFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ), static_cast<VkBool32>( waitAll ), timeout ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitForFences", { Result::eSuccess, Result::eTimeout } );
@@ -71125,30 +66889,44 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const vk::SemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo* pWaitInfo, uint64_t timeout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
- return static_cast<Result>( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfoKHR*>( pWaitInfo ), timeout ) );
+ return static_cast<Result>( d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo*>( pWaitInfo ), timeout ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const SemaphoreWaitInfoKHR & waitInfo, uint64_t timeout, Dispatch const &d ) const
+ VULKAN_HPP_INLINE Result Device::waitSemaphores( const SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo*>( &waitInfo ), timeout ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitSemaphores", { Result::eSuccess, Result::eTimeout } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo* pWaitInfo, uint64_t timeout, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
- Result result = static_cast<Result>( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfoKHR*>( &waitInfo ), timeout ) );
+ return static_cast<Result>( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo*>( pWaitInfo ), timeout ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo*>( &waitInfo ), timeout ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitSemaphoresKHR", { Result::eSuccess, Result::eTimeout } );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const vk::AndroidSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createAndroidSurfaceKHR" );
}
@@ -71156,7 +66934,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71167,15 +66945,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const vk::DebugReportCallbackCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DebugReportCallbackEXT* pCallback, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugReportCallbackEXT*>( pCallback ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DebugReportCallbackEXT>::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT>::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DebugReportCallbackEXT callback;
+ VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback;
Result result = static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) );
return createResultValue( result, callback, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugReportCallbackEXT" );
}
@@ -71183,7 +66961,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DebugReportCallbackEXT,Dispatch>>::type Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DebugReportCallbackEXT callback;
+ VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback;
Result result = static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71193,15 +66971,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createDebugUtilsMessengerEXT( const vk::DebugUtilsMessengerCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DebugUtilsMessengerEXT* pMessenger, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( pMessenger ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DebugUtilsMessengerEXT>::type Instance::createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT>::type Instance::createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DebugUtilsMessengerEXT messenger;
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger;
Result result = static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( &messenger ) ) );
return createResultValue( result, messenger, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugUtilsMessengerEXT" );
}
@@ -71209,7 +66987,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DebugUtilsMessengerEXT,Dispatch>>::type Instance::createDebugUtilsMessengerEXTUnique( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DebugUtilsMessengerEXT messenger;
+ VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger;
Result result = static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( &messenger ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71219,15 +66997,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const vk::DisplaySurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDisplayPlaneSurfaceKHR" );
}
@@ -71235,7 +67013,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71245,15 +67023,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createHeadlessSurfaceEXT( const vk::HeadlessSurfaceCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast<const VkHeadlessSurfaceCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createHeadlessSurfaceEXT( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createHeadlessSurfaceEXT( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast<const VkHeadlessSurfaceCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createHeadlessSurfaceEXT" );
}
@@ -71261,7 +67039,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createHeadlessSurfaceEXTUnique( const HeadlessSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast<const VkHeadlessSurfaceCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71272,15 +67050,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_IOS_MVK
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const vk::IOSSurfaceCreateInfoMVK* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createIOSSurfaceMVK" );
}
@@ -71288,7 +67066,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71300,15 +67078,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_FUCHSIA
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createImagePipeSurfaceFUCHSIA( const vk::ImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createImagePipeSurfaceFUCHSIA" );
}
@@ -71316,7 +67094,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createImagePipeSurfaceFUCHSIAUnique( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71328,15 +67106,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_MACOS_MVK
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const vk::MacOSSurfaceCreateInfoMVK* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMacOSSurfaceMVK" );
}
@@ -71344,7 +67122,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71356,15 +67134,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_METAL_EXT
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createMetalSurfaceEXT( const vk::MetalSurfaceCreateInfoEXT* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast<const VkMetalSurfaceCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createMetalSurfaceEXT( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createMetalSurfaceEXT( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast<const VkMetalSurfaceCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMetalSurfaceEXT" );
}
@@ -71372,7 +67150,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createMetalSurfaceEXTUnique( const MetalSurfaceCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast<const VkMetalSurfaceCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71384,15 +67162,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_GGP
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createStreamDescriptorSurfaceGGP( const vk::StreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast<const VkStreamDescriptorSurfaceCreateInfoGGP*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createStreamDescriptorSurfaceGGP( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createStreamDescriptorSurfaceGGP( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast<const VkStreamDescriptorSurfaceCreateInfoGGP*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createStreamDescriptorSurfaceGGP" );
}
@@ -71400,7 +67178,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createStreamDescriptorSurfaceGGPUnique( const StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast<const VkStreamDescriptorSurfaceCreateInfoGGP*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71412,15 +67190,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_VI_NN
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const vk::ViSurfaceCreateInfoNN* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createViSurfaceNN" );
}
@@ -71428,7 +67206,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71440,15 +67218,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const vk::WaylandSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWaylandSurfaceKHR" );
}
@@ -71456,7 +67234,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71468,15 +67246,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const vk::Win32SurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWin32SurfaceKHR" );
}
@@ -71484,7 +67262,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71496,15 +67274,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XCB_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const vk::XcbSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXcbSurfaceKHR" );
}
@@ -71512,7 +67290,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71524,15 +67302,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const vk::XlibSurfaceCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::SurfaceKHR* pSurface, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceKHR>::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceKHR>::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXlibSurfaceKHR" );
}
@@ -71540,7 +67318,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::SurfaceKHR surface;
+ VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
@@ -71551,13 +67329,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_XLIB_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( vk::DebugReportFlagsEXT flags, vk::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_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
{
d.vkDebugReportMessageEXT( m_instance, static_cast<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, pLayerPrefix, pMessage );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( vk::DebugReportFlagsEXT flags, vk::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_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
{
#ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( layerPrefix.size() == message.size() );
@@ -71572,59 +67350,59 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( vk::DebugReportCallbackEXT callback, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( vk::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::DebugReportCallbackEXT callback, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( vk::DebugUtilsMessengerEXT messenger, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( vk::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::DebugUtilsMessengerEXT messenger, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
@@ -71637,33 +67415,33 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( vk::SurfaceKHR surface, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( vk::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::SurfaceKHR surface, const vk::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks* pAllocator, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::destroy( vk::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, vk::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( pPhysicalDeviceGroupProperties ) ) );
}
@@ -71715,7 +67493,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, vk::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( pPhysicalDeviceGroupProperties ) ) );
}
@@ -71767,7 +67545,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, vk::PhysicalDevice* pPhysicalDevices, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, VULKAN_HPP_NAMESPACE::PhysicalDevice* pPhysicalDevices, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( pPhysicalDevices ) ) );
}
@@ -71832,13 +67610,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( vk::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, vk::DebugUtilsMessageTypeFlagsEXT messageTypes, const vk::DebugUtilsMessengerCallbackDataEXT* pCallbackData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkSubmitDebugUtilsMessageEXT( m_instance, static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ), static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ), reinterpret_cast<const VkDebugUtilsMessengerCallbackDataEXT*>( pCallbackData ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( vk::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, vk::DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
d.vkSubmitDebugUtilsMessageEXT( m_instance, static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ), static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ), reinterpret_cast<const VkDebugUtilsMessengerCallbackDataEXT*>( &callbackData ) );
}
@@ -71846,13 +67624,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, vk::DisplayKHR display, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast<VkDisplayKHR>( display ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<Display>::type PhysicalDevice::acquireXlibDisplayEXT( vk::DisplayKHR display, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<Display>::type PhysicalDevice::acquireXlibDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d ) const
{
Display dpy;
Result result = static_cast<Result>( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast<VkDisplayKHR>( display ) ) );
@@ -71862,15 +67640,15 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const vk::DeviceCreateInfo* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::Device* pDevice, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDevice*>( pDevice ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Device>::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Device>::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Device device;
+ VULKAN_HPP_NAMESPACE::Device device;
Result result = static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDevice*>( &device ) ) );
return createResultValue( result, device, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDevice" );
}
@@ -71878,7 +67656,7 @@ namespace VULKAN_HPP_NAMESPACE
template<typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Device,Dispatch>>::type PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::Device device;
+ VULKAN_HPP_NAMESPACE::Device device;
Result result = static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDevice*>( &device ) ) );
ObjectDestroy<NoParent,Dispatch> deleter( allocator, d );
@@ -71888,22 +67666,22 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( vk::DisplayKHR display, const vk::DisplayModeCreateInfoKHR* pCreateInfo, const vk::AllocationCallbacks* pAllocator, vk::DisplayModeKHR* pMode, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDisplayModeKHR*>( pMode ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DisplayModeKHR>::type PhysicalDevice::createDisplayModeKHR( vk::DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayModeKHR>::type PhysicalDevice::createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
{
- vk::DisplayModeKHR mode;
+ VULKAN_HPP_NAMESPACE::DisplayModeKHR mode;
Result result = static_cast<Result>( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDisplayModeKHR*>( &mode ) ) );
return createResultValue( result, mode, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDisplayModeKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, vk::ExtensionProperties* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) );
}
@@ -71955,7 +67733,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, vk::LayerProperties* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) );
}
@@ -72007,13 +67785,65 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModeProperties2KHR( vk::DisplayKHR display, uint32_t* pPropertyCount, vk::DisplayModeProperties2KHR* pProperties, Dispatch const &d) const
+ 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
+ {
+ return static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, pCounterCount, reinterpret_cast<VkPerformanceCounterKHR*>( pCounters ), reinterpret_cast<VkPerformanceCounterDescriptionKHR*>( pCounterDescriptions ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR,Allocator>>::type PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> counters, Dispatch const &d ) const
+ {
+ std::vector<PerformanceCounterDescriptionKHR,Allocator> counterDescriptions;
+ uint32_t counterCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, counters.size() , reinterpret_cast<VkPerformanceCounterKHR*>( counters.data() ), nullptr ) );
+ if ( ( result == Result::eSuccess ) && counterCount )
+ {
+ counterDescriptions.resize( counterCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, counters.size() , reinterpret_cast<VkPerformanceCounterKHR*>( counters.data() ), reinterpret_cast<VkPerformanceCounterDescriptionKHR*>( counterDescriptions.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ if ( result == Result::eSuccess )
+ {
+ VULKAN_HPP_ASSERT( counterCount <= counterDescriptions.size() );
+ counterDescriptions.resize( counterCount );
+ }
+ return createResultValue( result, counterDescriptions, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" );
+ }
+ template<typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR,Allocator>>::type PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> counters, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PerformanceCounterDescriptionKHR,Allocator> counterDescriptions( vectorAllocator );
+ uint32_t counterCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, counters.size() , reinterpret_cast<VkPerformanceCounterKHR*>( counters.data() ), nullptr ) );
+ if ( ( result == Result::eSuccess ) && counterCount )
+ {
+ counterDescriptions.resize( counterCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, counters.size() , reinterpret_cast<VkPerformanceCounterKHR*>( counters.data() ), reinterpret_cast<VkPerformanceCounterDescriptionKHR*>( counterDescriptions.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ if ( result == Result::eSuccess )
+ {
+ VULKAN_HPP_ASSERT( counterCount <= counterDescriptions.size() );
+ counterDescriptions.resize( counterCount );
+ }
+ return createResultValue( result, counterDescriptions, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ 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
{
return static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModeProperties2KHR*>( pProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( vk::DisplayKHR display, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d ) const
{
std::vector<DisplayModeProperties2KHR,Allocator> properties;
uint32_t propertyCount;
@@ -72035,7 +67865,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModeProperties2KHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( vk::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<DisplayModeProperties2KHR,Allocator> properties( vectorAllocator );
uint32_t propertyCount;
@@ -72059,13 +67889,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( vk::DisplayKHR display, uint32_t* pPropertyCount, vk::DisplayModePropertiesKHR* pProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( pProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( vk::DisplayKHR display, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d ) const
{
std::vector<DisplayModePropertiesKHR,Allocator> properties;
uint32_t propertyCount;
@@ -72087,7 +67917,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModePropertiesKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( vk::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<DisplayModePropertiesKHR,Allocator> properties( vectorAllocator );
uint32_t propertyCount;
@@ -72111,37 +67941,37 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilities2KHR( const vk::DisplayPlaneInfo2KHR* pDisplayPlaneInfo, vk::DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR* pDisplayPlaneInfo, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkDisplayPlaneInfo2KHR*>( pDisplayPlaneInfo ), reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>( pCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DisplayPlaneCapabilities2KHR>::type PhysicalDevice::getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR>::type PhysicalDevice::getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d ) const
{
- vk::DisplayPlaneCapabilities2KHR capabilities;
+ VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities;
Result result = static_cast<Result>( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkDisplayPlaneInfo2KHR*>( &displayPlaneInfo ), reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>( &capabilities ) ) );
return createResultValue( result, capabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneCapabilities2KHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( vk::DisplayModeKHR mode, uint32_t planeIndex, vk::DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( pCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DisplayPlaneCapabilitiesKHR>::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( vk::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR>::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d ) const
{
- vk::DisplayPlaneCapabilitiesKHR capabilities;
+ VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities;
Result result = static_cast<Result>( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( &capabilities ) ) );
return createResultValue( result, capabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, vk::DisplayKHR* pDisplays, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, VULKAN_HPP_NAMESPACE::DisplayKHR* pDisplays, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR*>( pDisplays ) ) );
}
@@ -72193,7 +68023,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, vk::TimeDomainEXT* pTimeDomains, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainEXT* pTimeDomains, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, pTimeDomainCount, reinterpret_cast<VkTimeDomainEXT*>( pTimeDomains ) ) );
}
@@ -72245,7 +68075,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, vk::CooperativeMatrixPropertiesNV* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, pPropertyCount, reinterpret_cast<VkCooperativeMatrixPropertiesNV*>( pProperties ) ) );
}
@@ -72297,7 +68127,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, vk::DisplayPlaneProperties2KHR* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlaneProperties2KHR*>( pProperties ) ) );
}
@@ -72349,7 +68179,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, vk::DisplayPlanePropertiesKHR* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( pProperties ) ) );
}
@@ -72401,7 +68231,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayProperties2KHR( uint32_t* pPropertyCount, vk::DisplayProperties2KHR* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayProperties2KHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayProperties2KHR* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayProperties2KHR*>( pProperties ) ) );
}
@@ -72453,7 +68283,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, vk::DisplayPropertiesKHR* pProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( pProperties ) ) );
}
@@ -72505,135 +68335,135 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferProperties( const vk::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, vk::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( pExternalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( pExternalBufferProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalBufferProperties PhysicalDevice::getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalBufferProperties externalBufferProperties;
+ VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties;
d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( &externalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( &externalBufferProperties ) );
return externalBufferProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const vk::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, vk::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( pExternalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( pExternalBufferProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalBufferProperties externalBufferProperties;
+ VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties;
d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( &externalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( &externalBufferProperties ) );
return externalBufferProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalFenceProperties( const vk::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, vk::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( pExternalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( pExternalFenceProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalFenceProperties PhysicalDevice::getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalFenceProperties externalFenceProperties;
+ VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties;
d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( &externalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( &externalFenceProperties ) );
return externalFenceProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const vk::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, vk::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( pExternalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( pExternalFenceProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalFenceProperties PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalFenceProperties externalFenceProperties;
+ VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties;
d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( &externalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( &externalFenceProperties ) );
return externalFenceProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ExternalMemoryHandleTypeFlagsNV externalHandleType, vk::ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( pExternalImageFormatProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ExternalImageFormatPropertiesNV>::type PhysicalDevice::getExternalImageFormatPropertiesNV( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV>::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
{
- vk::ExternalImageFormatPropertiesNV externalImageFormatProperties;
+ VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( &externalImageFormatProperties ) ) );
return createResultValue( result, externalImageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getExternalImageFormatPropertiesNV" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphoreProperties( const vk::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, vk::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( pExternalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( pExternalSemaphoreProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalSemaphoreProperties externalSemaphoreProperties;
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties;
d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( &externalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( &externalSemaphoreProperties ) );
return externalSemaphoreProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const vk::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, vk::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( pExternalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( pExternalSemaphoreProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::ExternalSemaphoreProperties externalSemaphoreProperties;
+ VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties;
d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( &externalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( &externalSemaphoreProperties ) );
return externalSemaphoreProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( vk::PhysicalDeviceFeatures* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( pFeatures ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceFeatures PhysicalDevice::getFeatures(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceFeatures features;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features;
d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( &features ) );
return features;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( vk::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( pFeatures ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceFeatures2 features;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features;
d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
return features;
}
@@ -72641,22 +68471,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFeatures2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceFeatures2& features = structureChain.template get<vk::PhysicalDeviceFeatures2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2& features = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2>();
d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( vk::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( pFeatures ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceFeatures2 features;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features;
d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
return features;
}
@@ -72664,113 +68494,113 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceFeatures2& features = structureChain.template get<vk::PhysicalDeviceFeatures2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2& features = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2>();
d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( vk::Format format, vk::FormatProperties* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( pFormatProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::FormatProperties PhysicalDevice::getFormatProperties( vk::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::FormatProperties formatProperties;
+ VULKAN_HPP_NAMESPACE::FormatProperties formatProperties;
d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( &formatProperties ) );
return formatProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2( vk::Format format, vk::FormatProperties2* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( pFormatProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::FormatProperties2 PhysicalDevice::getFormatProperties2( vk::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::FormatProperties2 formatProperties;
+ VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties;
d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
return formatProperties;
}
template<typename X, typename Y, typename ...Z, typename Dispatch>
- VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2( vk::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::FormatProperties2& formatProperties = structureChain.template get<vk::FormatProperties2>();
+ VULKAN_HPP_NAMESPACE::FormatProperties2& formatProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::FormatProperties2>();
d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( vk::Format format, vk::FormatProperties2* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2* pFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( pFormatProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::FormatProperties2 PhysicalDevice::getFormatProperties2KHR( vk::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::FormatProperties2 formatProperties;
+ VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties;
d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
return formatProperties;
}
template<typename X, typename Y, typename ...Z, typename Dispatch>
- VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2KHR( vk::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::FormatProperties2& formatProperties = structureChain.template get<vk::FormatProperties2>();
+ VULKAN_HPP_NAMESPACE::FormatProperties2& formatProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::FormatProperties2>();
d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( vk::DeviceGeneratedCommandsFeaturesNVX* pFeatures, vk::DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsFeaturesNVX* pFeatures, VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( pFeatures ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( pLimits ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::DeviceGeneratedCommandsLimitsNVX limits;
+ VULKAN_HPP_NAMESPACE::DeviceGeneratedCommandsLimitsNVX limits;
d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( &features ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( &limits ) );
return limits;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, vk::ImageFormatProperties* pImageFormatProperties, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( pImageFormatProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ImageFormatProperties>::type PhysicalDevice::getImageFormatProperties( vk::Format format, vk::ImageType type, vk::ImageTiling tiling, vk::ImageUsageFlags usage, vk::ImageCreateFlags flags, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties>::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
{
- vk::ImageFormatProperties imageFormatProperties;
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( &imageFormatProperties ) ) );
return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2( const vk::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, vk::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( pImageFormatProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
{
- vk::ImageFormatProperties2 imageFormatProperties;
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" );
}
@@ -72778,22 +68608,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
{
StructureChain<X, Y, Z...> structureChain;
- vk::ImageFormatProperties2& imageFormatProperties = structureChain.template get<vk::ImageFormatProperties2>();
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties2& imageFormatProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>();
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const vk::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, vk::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2* pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( pImageFormatProperties ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
{
- vk::ImageFormatProperties2 imageFormatProperties;
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" );
}
@@ -72801,37 +68631,37 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
{
StructureChain<X, Y, Z...> structureChain;
- vk::ImageFormatProperties2& imageFormatProperties = structureChain.template get<vk::ImageFormatProperties2>();
+ VULKAN_HPP_NAMESPACE::ImageFormatProperties2& imageFormatProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>();
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( vk::PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( pMemoryProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceMemoryProperties memoryProperties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( &memoryProperties ) );
return memoryProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2( vk::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( pMemoryProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceMemoryProperties2 memoryProperties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
return memoryProperties;
}
@@ -72839,22 +68669,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getMemoryProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceMemoryProperties2& memoryProperties = structureChain.template get<vk::PhysicalDeviceMemoryProperties2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2& memoryProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2>();
d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( vk::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( pMemoryProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceMemoryProperties2 memoryProperties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
return memoryProperties;
}
@@ -72862,35 +68692,35 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getMemoryProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceMemoryProperties2& memoryProperties = structureChain.template get<vk::PhysicalDeviceMemoryProperties2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2& memoryProperties = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2>();
d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( vk::SampleCountFlagBits samples, vk::MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast<VkSampleCountFlagBits>( samples ), reinterpret_cast<VkMultisamplePropertiesEXT*>( pMultisampleProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( vk::SampleCountFlagBits samples, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::MultisamplePropertiesEXT multisampleProperties;
+ VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties;
d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast<VkSampleCountFlagBits>( samples ), reinterpret_cast<VkMultisamplePropertiesEXT*>( &multisampleProperties ) );
return multisampleProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHR( vk::SurfaceKHR surface, uint32_t* pRectCount, vk::Rect2D* pRects, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pRectCount, reinterpret_cast<VkRect2D*>( pRects ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
std::vector<Rect2D,Allocator> rects;
uint32_t rectCount;
@@ -72912,7 +68742,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getPresentRectanglesKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<Rect2D,Allocator> rects( vectorAllocator );
uint32_t rectCount;
@@ -72936,30 +68766,30 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getProperties( vk::PhysicalDeviceProperties* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( pProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceProperties PhysicalDevice::getProperties(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties PhysicalDevice::getProperties(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceProperties properties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties;
d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( &properties ) );
return properties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( vk::PhysicalDeviceProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( pProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceProperties2 PhysicalDevice::getProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceProperties2 properties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties;
d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
return properties;
}
@@ -72967,22 +68797,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getProperties2(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceProperties2& properties = structureChain.template get<vk::PhysicalDeviceProperties2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2& properties = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2>();
d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( vk::PhysicalDeviceProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( pProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE vk::PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
- vk::PhysicalDeviceProperties2 properties;
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties;
d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
return properties;
}
@@ -72990,14 +68820,29 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getProperties2KHR(Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
{
StructureChain<X, Y, Z...> structureChain;
- vk::PhysicalDeviceProperties2& properties = structureChain.template get<vk::PhysicalDeviceProperties2>();
+ VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2& properties = structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2>();
d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
return structureChain;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( m_physicalDevice, reinterpret_cast<const VkQueryPoolPerformanceCreateInfoKHR*>( pPerformanceQueryCreateInfo ), pNumPasses );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const &d ) const VULKAN_HPP_NOEXCEPT
+ {
+ uint32_t numPasses;
+ d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( m_physicalDevice, reinterpret_cast<const VkQueryPoolPerformanceCreateInfoKHR*>( &performanceQueryCreateInfo ), &numPasses );
+ return numPasses;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( pQueueFamilyProperties ) );
}
@@ -73025,7 +68870,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( pQueueFamilyProperties ) );
}
@@ -73057,7 +68902,16 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
- d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ localVector[i].pNext = queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
+ }
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( localVector.data() ) );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i];
+ }
return queueFamilyProperties;
}
template<typename StructureChain, typename Allocator, typename Dispatch>
@@ -73067,13 +68921,22 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
- d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ localVector[i].pNext = queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
+ }
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( localVector.data() ) );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i];
+ }
return queueFamilyProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, vk::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( pQueueFamilyProperties ) );
}
@@ -73105,7 +68968,16 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
- d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ localVector[i].pNext = queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
+ }
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( localVector.data() ) );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i];
+ }
return queueFamilyProperties;
}
template<typename StructureChain, typename Allocator, typename Dispatch>
@@ -73115,19 +68987,28 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
- d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ localVector[i].pNext = queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
+ }
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( localVector.data() ) );
+ for ( uint32_t i = 0; i < queueFamilyPropertyCount ; i++ )
+ {
+ queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i];
+ }
return queueFamilyProperties;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, uint32_t* pPropertyCount, vk::SparseImageFormatProperties* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( pProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, Dispatch const &d ) const
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> 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
{
std::vector<SparseImageFormatProperties,Allocator> properties;
uint32_t propertyCount;
@@ -73137,7 +69018,7 @@ namespace VULKAN_HPP_NAMESPACE
return properties;
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( vk::Format format, vk::ImageType type, vk::SampleCountFlagBits samples, vk::ImageUsageFlags usage, vk::ImageTiling tiling, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> 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, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<SparseImageFormatProperties,Allocator> properties( vectorAllocator );
uint32_t propertyCount;
@@ -73149,7 +69030,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2( const vk::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, vk::SparseImageFormatProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( pProperties ) );
}
@@ -73177,7 +69058,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const vk::PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, vk::SparseImageFormatProperties2* pProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ 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
{
d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( pProperties ) );
}
@@ -73205,7 +69086,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t* pCombinationCount, vk::FramebufferMixedSamplesCombinationNV* pCombinations, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t* pCombinationCount, VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV* pCombinations, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, pCombinationCount, reinterpret_cast<VkFramebufferMixedSamplesCombinationNV*>( pCombinations ) ) );
}
@@ -73257,30 +69138,30 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( vk::SurfaceKHR surface, vk::SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( pSurfaceCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceCapabilities2EXT>::type PhysicalDevice::getSurfaceCapabilities2EXT( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT>::type PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
- vk::SurfaceCapabilities2EXT surfaceCapabilities;
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( &surfaceCapabilities ) ) );
return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2EXT" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, vk::SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( pSurfaceCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceCapabilities2KHR>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
{
- vk::SurfaceCapabilities2KHR surfaceCapabilities;
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( &surfaceCapabilities ) ) );
return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" );
}
@@ -73288,29 +69169,29 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
{
StructureChain<X, Y, Z...> structureChain;
- vk::SurfaceCapabilities2KHR& surfaceCapabilities = structureChain.template get<vk::SurfaceCapabilities2KHR>();
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR& surfaceCapabilities = structureChain.template get<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR>();
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( &surfaceCapabilities ) ) );
return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( vk::SurfaceKHR surface, vk::SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( pSurfaceCapabilities ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::SurfaceCapabilitiesKHR>::type PhysicalDevice::getSurfaceCapabilitiesKHR( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR>::type PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
- vk::SurfaceCapabilitiesKHR surfaceCapabilities;
+ VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( &surfaceCapabilities ) ) );
return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilitiesKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, vk::SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormat2KHR*>( pSurfaceFormats ) ) );
}
@@ -73362,13 +69243,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( vk::SurfaceKHR surface, uint32_t* pSurfaceFormatCount, vk::SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( pSurfaceFormats ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
std::vector<SurfaceFormatKHR,Allocator> surfaceFormats;
uint32_t surfaceFormatCount;
@@ -73390,7 +69271,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormatsKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<SurfaceFormatKHR,Allocator> surfaceFormats( vectorAllocator );
uint32_t surfaceFormatCount;
@@ -73415,7 +69296,7 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_WIN32_KHR
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModes2EXT( const vk::PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, vk::PresentModeKHR* pPresentModes, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), pPresentModeCount, reinterpret_cast<VkPresentModeKHR*>( pPresentModes ) ) );
}
@@ -73468,13 +69349,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( vk::SurfaceKHR surface, uint32_t* pPresentModeCount, vk::PresentModeKHR* pPresentModes, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pPresentModeCount, reinterpret_cast<VkPresentModeKHR*>( pPresentModes ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
std::vector<PresentModeKHR,Allocator> presentModes;
uint32_t presentModeCount;
@@ -73496,7 +69377,7 @@ namespace VULKAN_HPP_NAMESPACE
return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfacePresentModesKHR" );
}
template<typename Allocator, typename Dispatch>
- VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( vk::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
{
std::vector<PresentModeKHR,Allocator> presentModes( vectorAllocator );
uint32_t presentModeCount;
@@ -73520,20 +69401,72 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, vk::SurfaceKHR surface, vk::Bool32* pSupported, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkBool32*>( pSupported ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::Bool32>::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, vk::SurfaceKHR surface, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::Bool32>::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const &d ) const
{
- vk::Bool32 supported;
+ VULKAN_HPP_NAMESPACE::Bool32 supported;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkBool32*>( &supported ) ) );
return createResultValue( result, supported, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceSupportKHR" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getToolPropertiesEXT( uint32_t* pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT* pToolProperties, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, pToolCount, reinterpret_cast<VkPhysicalDeviceToolPropertiesEXT*>( pToolProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceToolPropertiesEXT,Allocator>>::type PhysicalDevice::getToolPropertiesEXT(Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceToolPropertiesEXT,Allocator> toolProperties;
+ uint32_t toolCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && toolCount )
+ {
+ toolProperties.resize( toolCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast<VkPhysicalDeviceToolPropertiesEXT*>( toolProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ if ( result == Result::eSuccess )
+ {
+ VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() );
+ toolProperties.resize( toolCount );
+ }
+ return createResultValue( result, toolProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getToolPropertiesEXT" );
+ }
+ template<typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceToolPropertiesEXT,Allocator>>::type PhysicalDevice::getToolPropertiesEXT(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceToolPropertiesEXT,Allocator> toolProperties( vectorAllocator );
+ uint32_t toolCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && toolCount )
+ {
+ toolProperties.resize( toolCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast<VkPhysicalDeviceToolPropertiesEXT*>( toolProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ if ( result == Result::eSuccess )
+ {
+ VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() );
+ toolProperties.resize( toolCount );
+ }
+ return createResultValue( result, toolProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getToolPropertiesEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
template<typename Dispatch>
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
@@ -73597,15 +69530,15 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, vk::DisplayKHR* pDisplay, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, VULKAN_HPP_NAMESPACE::DisplayKHR* pDisplay, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( pDisplay ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<vk::DisplayKHR>::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayKHR>::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d ) const
{
- vk::DisplayKHR display;
+ VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>( d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( &display ) ) );
return createResultValue( result, display, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getRandROutputDisplayEXT" );
}
@@ -73614,13 +69547,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( vk::DisplayKHR display, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type PhysicalDevice::releaseDisplayEXT( vk::DisplayKHR display, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::releaseDisplayEXT" );
@@ -73628,7 +69561,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Queue::getCheckpointDataNV( uint32_t* pCheckpointDataCount, vk::CheckpointDataNV* pCheckpointData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Queue::getCheckpointDataNV( uint32_t* pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointDataNV* pCheckpointData, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkGetQueueCheckpointDataNV( m_queue, pCheckpointDataCount, reinterpret_cast<VkCheckpointDataNV*>( pCheckpointData ) );
}
@@ -73656,7 +69589,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
}
@@ -73669,13 +69602,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const vk::BindSparseInfo* pBindInfo, vk::Fence fence, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast<const VkBindSparseInfo*>( pBindInfo ), static_cast<VkFence>( fence ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Queue::bindSparse( ArrayProxy<const vk::BindSparseInfo> bindInfo, vk::Fence fence, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Queue::bindSparse( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindSparseInfo> bindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast<const VkBindSparseInfo*>( bindInfo.data() ), static_cast<VkFence>( fence ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::bindSparse" );
@@ -73697,7 +69630,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const vk::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
}
@@ -73710,7 +69643,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Queue::presentKHR( const vk::PresentInfoKHR* pPresentInfo, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR* pPresentInfo, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( pPresentInfo ) ) );
}
@@ -73725,13 +69658,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Queue::setPerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Queue::setPerformanceConfigurationINTEL( vk::PerformanceConfigurationINTEL configuration, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::setPerformanceConfigurationINTEL" );
@@ -73739,13 +69672,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const vk::SubmitInfo* pSubmits, vk::Fence fence, Dispatch const &d) const
+ 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
{
return static_cast<Result>( d.vkQueueSubmit( m_queue, submitCount, reinterpret_cast<const VkSubmitInfo*>( pSubmits ), static_cast<VkFence>( fence ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Queue::submit( ArrayProxy<const vk::SubmitInfo> submits, vk::Fence fence, Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Queue::submit( ArrayProxy<const VULKAN_HPP_NAMESPACE::SubmitInfo> submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkQueueSubmit( m_queue, submits.size() , reinterpret_cast<const VkSubmitInfo*>( submits.data() ), static_cast<VkFence>( fence ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::submit" );
@@ -73754,13 +69687,13 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template<typename Dispatch>
- VULKAN_HPP_INLINE Result Queue::waitIdle(Dispatch const &d) const
+ VULKAN_HPP_INLINE Result Queue::waitIdle(Dispatch const &d) const VULKAN_HPP_NOEXCEPT
{
return static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
}
#else
template<typename Dispatch>
- VULKAN_HPP_INLINE ResultValueType<void>::type Queue::waitIdle(Dispatch const &d ) const
+ VULKAN_HPP_INLINE typename ResultValueType<void>::type Queue::waitIdle(Dispatch const &d ) const
{
Result result = static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::waitIdle" );
@@ -73773,13 +69706,14 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
template <> struct isStructureChainValid<ImageFormatProperties2, AndroidHardwareBufferUsageANDROID>{ enum { value = true }; };
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- template <> struct isStructureChainValid<AttachmentDescription2KHR, AttachmentDescriptionStencilLayoutKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<AttachmentReference2KHR, AttachmentReferenceStencilLayoutKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<AttachmentDescription2, AttachmentDescriptionStencilLayout>{ enum { value = true }; };
+ template <> struct isStructureChainValid<AttachmentReference2, AttachmentReferenceStencilLayout>{ enum { value = true }; };
template <> struct isStructureChainValid<BindBufferMemoryInfo, BindBufferMemoryDeviceGroupInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<BindImageMemoryInfo, BindImageMemoryDeviceGroupInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<BindImageMemoryInfo, BindImageMemorySwapchainInfoKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<BindImageMemoryInfo, BindImagePlaneMemoryInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<BufferCreateInfo, BufferDeviceAddressCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BufferCreateInfo, BufferOpaqueCaptureAddressCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<CommandBufferInheritanceInfo, CommandBufferInheritanceConditionalRenderingInfoEXT>{ enum { value = true }; };
#ifdef VK_USE_PLATFORM_WIN32_KHR
template <> struct isStructureChainValid<SubmitInfo, D3D12FenceSubmitInfoKHR>{ enum { value = true }; };
@@ -73790,9 +69724,9 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<ImageCreateInfo, DedicatedAllocationImageCreateInfoNV>{ enum { value = true }; };
template <> struct isStructureChainValid<MemoryAllocateInfo, DedicatedAllocationMemoryAllocateInfoNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DescriptorPoolCreateInfo, DescriptorPoolInlineUniformBlockCreateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DescriptorSetLayoutCreateInfo, DescriptorSetLayoutBindingFlagsCreateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DescriptorSetAllocateInfo, DescriptorSetVariableDescriptorCountAllocateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DescriptorSetLayoutSupport, DescriptorSetVariableDescriptorCountLayoutSupportEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetLayoutCreateInfo, DescriptorSetLayoutBindingFlagsCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetAllocateInfo, DescriptorSetVariableDescriptorCountAllocateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetLayoutSupport, DescriptorSetVariableDescriptorCountLayoutSupport>{ enum { value = true }; };
template <> struct isStructureChainValid<BindSparseInfo, DeviceGroupBindSparseInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<CommandBufferBeginInfo, DeviceGroupCommandBufferBeginInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, DeviceGroupDeviceCreateInfo>{ enum { value = true }; };
@@ -73830,15 +69764,15 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<ImageCreateInfo, ExternalMemoryImageCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageCreateInfo, ExternalMemoryImageCreateInfoNV>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageFormatProperties2, FilterCubicImageViewImageFormatPropertiesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<FramebufferCreateInfo, FramebufferAttachmentsCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<FramebufferCreateInfo, FramebufferAttachmentsCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageCreateInfo, ImageDrmFormatModifierExplicitCreateInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageCreateInfo, ImageDrmFormatModifierListCreateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<ImageCreateInfo, ImageFormatListCreateInfoKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<SwapchainCreateInfoKHR, ImageFormatListCreateInfoKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, ImageFormatListCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageFormatListCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SwapchainCreateInfoKHR, ImageFormatListCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, ImageFormatListCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageMemoryRequirementsInfo2, ImagePlaneMemoryRequirementsInfo>{ enum { value = true }; };
- template <> struct isStructureChainValid<ImageCreateInfo, ImageStencilUsageCreateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, ImageStencilUsageCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageStencilUsageCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, ImageStencilUsageCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageCreateInfo, ImageSwapchainCreateInfoKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageViewCreateInfo, ImageViewASTCDecodeModeEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageViewCreateInfo, ImageViewUsageCreateInfo>{ enum { value = true }; };
@@ -73856,16 +69790,20 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryAllocateFlagsInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryDedicatedAllocateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<MemoryRequirements2, MemoryDedicatedRequirements>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryOpaqueCaptureAddressAllocateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryPriorityAllocateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SubmitInfo, PerformanceQuerySubmitInfoKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevice16BitStorageFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevice16BitStorageFeatures>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevice8BitStorageFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevice8BitStorageFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevice8BitStorageFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevice8BitStorageFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceASTCDecodeFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceASTCDecodeFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceBlendOperationAdvancedFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceBlendOperationAdvancedFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceBlendOperationAdvancedPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceBufferDeviceAddressFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceBufferDeviceAddressFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceBufferDeviceAddressFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceBufferDeviceAddressFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceCoherentMemoryFeaturesAMD>{ enum { value = true }; };
@@ -73886,18 +69824,18 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceDepthClipEnableFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceDepthClipEnableFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDepthStencilResolvePropertiesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceDescriptorIndexingFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceDescriptorIndexingFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDescriptorIndexingPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDepthStencilResolveProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceDescriptorIndexingFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceDescriptorIndexingFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDescriptorIndexingProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDiscardRectanglePropertiesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDriverPropertiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDriverProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceExclusiveScissorFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceExclusiveScissorFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, PhysicalDeviceExternalImageFormatInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceExternalMemoryHostPropertiesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFeatures2>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceFloatControlsPropertiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceFloatControlsProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceFragmentDensityMapFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFragmentDensityMapFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceFragmentDensityMapPropertiesEXT>{ enum { value = true }; };
@@ -73905,13 +69843,13 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFragmentShaderBarycentricFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceFragmentShaderInterlockFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFragmentShaderInterlockFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceHostQueryResetFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceHostQueryResetFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceHostQueryResetFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceHostQueryResetFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceIDProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, PhysicalDeviceImageDrmFormatModifierInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, PhysicalDeviceImageViewImageFormatInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceImagelessFramebufferFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceImagelessFramebufferFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceImagelessFramebufferFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceImagelessFramebufferFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceIndexTypeUint8FeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceIndexTypeUint8FeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceInlineUniformBlockFeaturesEXT>{ enum { value = true }; };
@@ -73932,6 +69870,9 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMultiviewProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePCIBusInfoPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevicePerformanceQueryFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevicePerformanceQueryFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePerformanceQueryPropertiesKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevicePipelineExecutablePropertiesFeaturesKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevicePipelineExecutablePropertiesFeaturesKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePointClippingProperties>{ enum { value = true }; };
@@ -73943,15 +69884,15 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceRepresentativeFragmentTestFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceRepresentativeFragmentTestFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSampleLocationsPropertiesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSamplerFilterMinmaxPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSamplerFilterMinmaxProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceSamplerYcbcrConversionFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceSamplerYcbcrConversionFeatures>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceScalarBlockLayoutFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceScalarBlockLayoutFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderAtomicInt64FeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderAtomicInt64FeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceScalarBlockLayoutFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceScalarBlockLayoutFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceSeparateDepthStencilLayoutsFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceSeparateDepthStencilLayoutsFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderAtomicInt64Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderAtomicInt64Features>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderClockFeaturesKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderClockFeaturesKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceShaderCoreProperties2AMD>{ enum { value = true }; };
@@ -73960,8 +69901,8 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderDrawParametersFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderDrawParametersFeatures>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderFloat16Int8FeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderFloat16Int8FeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderFloat16Int8Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderFloat16Int8Features>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderImageFootprintFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderImageFootprintFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL>{ enum { value = true }; };
@@ -73969,8 +69910,8 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderSMBuiltinsFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderSMBuiltinsFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceShaderSMBuiltinsPropertiesNV>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderSubgroupExtendedTypesFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderSubgroupExtendedTypesFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShadingRateImageFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShadingRateImageFeaturesNV>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceShadingRateImagePropertiesNV>{ enum { value = true }; };
@@ -73983,21 +69924,27 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceTexelBufferAlignmentPropertiesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceTimelineSemaphoreFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceTimelineSemaphoreFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceTimelineSemaphorePropertiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceTimelineSemaphoreFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceTimelineSemaphoreFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceTimelineSemaphoreProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceTransformFeedbackFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceTransformFeedbackFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceTransformFeedbackPropertiesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceUniformBufferStandardLayoutFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceUniformBufferStandardLayoutFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVariablePointersFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVariablePointersFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVertexAttributeDivisorFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVertexAttributeDivisorFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceVertexAttributeDivisorPropertiesEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVulkanMemoryModelFeaturesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVulkanMemoryModelFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVulkan11Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVulkan11Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceVulkan11Properties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVulkan12Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVulkan12Features>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceVulkan12Properties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVulkanMemoryModelFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVulkanMemoryModelFeatures>{ enum { value = true }; };
template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceYcbcrImageArraysFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceYcbcrImageArraysFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<PipelineColorBlendStateCreateInfo, PipelineColorBlendAdvancedStateCreateInfoEXT>{ enum { value = true }; };
@@ -74031,23 +69978,24 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<PresentInfoKHR, PresentRegionsKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<PresentInfoKHR, PresentTimesInfoGOOGLE>{ enum { value = true }; };
template <> struct isStructureChainValid<SubmitInfo, ProtectedSubmitInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<QueryPoolCreateInfo, QueryPoolPerformanceCreateInfoKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<QueueFamilyProperties2, QueueFamilyCheckpointPropertiesNV>{ enum { value = true }; };
- template <> struct isStructureChainValid<RenderPassBeginInfo, RenderPassAttachmentBeginInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassBeginInfo, RenderPassAttachmentBeginInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<RenderPassCreateInfo, RenderPassFragmentDensityMapCreateInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<RenderPassCreateInfo2KHR, RenderPassFragmentDensityMapCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassCreateInfo2, RenderPassFragmentDensityMapCreateInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<RenderPassCreateInfo, RenderPassInputAttachmentAspectCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<RenderPassCreateInfo, RenderPassMultiviewCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<RenderPassBeginInfo, RenderPassSampleLocationsBeginInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageMemoryBarrier, SampleLocationsInfoEXT>{ enum { value = true }; };
- template <> struct isStructureChainValid<SamplerCreateInfo, SamplerReductionModeCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SamplerCreateInfo, SamplerReductionModeCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageFormatProperties2, SamplerYcbcrConversionImageFormatProperties>{ enum { value = true }; };
template <> struct isStructureChainValid<SamplerCreateInfo, SamplerYcbcrConversionInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageViewCreateInfo, SamplerYcbcrConversionInfo>{ enum { value = true }; };
- template <> struct isStructureChainValid<SemaphoreCreateInfo, SemaphoreTypeCreateInfoKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<PhysicalDeviceExternalSemaphoreInfo, SemaphoreTypeCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SemaphoreCreateInfo, SemaphoreTypeCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceExternalSemaphoreInfo, SemaphoreTypeCreateInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<ShaderModuleCreateInfo, ShaderModuleValidationCacheCreateInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<SurfaceCapabilities2KHR, SharedPresentSurfaceCapabilitiesKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<SubpassDescription2KHR, SubpassDescriptionDepthStencilResolveKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SubpassDescription2, SubpassDescriptionDepthStencilResolve>{ enum { value = true }; };
#ifdef VK_USE_PLATFORM_WIN32_KHR
template <> struct isStructureChainValid<SurfaceCapabilities2KHR, SurfaceCapabilitiesFullScreenExclusiveEXT>{ enum { value = true }; };
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
@@ -74063,8 +70011,8 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<SwapchainCreateInfoKHR, SwapchainCounterCreateInfoEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<SwapchainCreateInfoKHR, SwapchainDisplayNativeHdrCreateInfoAMD>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageFormatProperties2, TextureLODGatherFormatPropertiesAMD>{ enum { value = true }; };
- template <> struct isStructureChainValid<SubmitInfo, TimelineSemaphoreSubmitInfoKHR>{ enum { value = true }; };
- template <> struct isStructureChainValid<BindSparseInfo, TimelineSemaphoreSubmitInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SubmitInfo, TimelineSemaphoreSubmitInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindSparseInfo, TimelineSemaphoreSubmitInfo>{ enum { value = true }; };
template <> struct isStructureChainValid<InstanceCreateInfo, ValidationFeaturesEXT>{ enum { value = true }; };
template <> struct isStructureChainValid<InstanceCreateInfo, ValidationFlagsEXT>{ enum { value = true }; };
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -74076,10 +70024,6 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<WriteDescriptorSet, WriteDescriptorSetAccelerationStructureNV>{ enum { value = true }; };
template <> struct isStructureChainValid<WriteDescriptorSet, WriteDescriptorSetInlineUniformBlockEXT>{ enum { value = true }; };
-#if !defined(VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL)
-# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1
-#endif
-
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
class DynamicLoader
{
@@ -74095,7 +70039,7 @@ namespace VULKAN_HPP_NAMESPACE
#elif defined(__APPLE__)
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
#elif defined(_WIN32)
- m_library = LoadLibrary( "vulkan-1.dll" );
+ m_library = LoadLibrary( TEXT( "vulkan-1.dll" ) );
#else
assert( false && "unsupported platform" );
#endif
@@ -74159,6 +70103,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
+ PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0;
PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
@@ -74188,10 +70133,12 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkCmdDraw vkCmdDraw = 0;
PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
+ PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0;
PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
+ PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0;
PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
@@ -74202,12 +70149,14 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkCmdEndQuery vkCmdEndQuery = 0;
PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
+ PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0;
PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
+ PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0;
PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
PFN_vkCmdProcessCommandsNVX vkCmdProcessCommandsNVX = 0;
@@ -74255,6 +70204,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0;
+ PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0;
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
PFN_vkAllocateMemory vkAllocateMemory = 0;
@@ -74288,6 +70238,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkCreateQueryPool vkCreateQueryPool = 0;
PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
PFN_vkCreateRenderPass vkCreateRenderPass = 0;
+ PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0;
PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
PFN_vkCreateSampler vkCreateSampler = 0;
PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
@@ -74338,10 +70289,14 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0;
PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0;
+ PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0;
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
+ PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0;
+ PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0;
PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
@@ -74353,6 +70308,8 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0;
PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
@@ -74396,6 +70353,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
+ PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0;
PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0;
PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -74426,16 +70384,19 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0;
+ PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0;
PFN_vkResetCommandPool vkResetCommandPool = 0;
PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
PFN_vkResetEvent vkResetEvent = 0;
PFN_vkResetFences vkResetFences = 0;
+ PFN_vkResetQueryPool vkResetQueryPool = 0;
PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0;
PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
PFN_vkSetEvent vkSetEvent = 0;
PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0;
+ PFN_vkSignalSemaphore vkSignalSemaphore = 0;
PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0;
PFN_vkTrimCommandPool vkTrimCommandPool = 0;
PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
@@ -74446,6 +70407,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
PFN_vkWaitForFences vkWaitForFences = 0;
+ PFN_vkWaitSemaphores vkWaitSemaphores = 0;
PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0;
#ifdef VK_USE_PLATFORM_ANDROID_KHR
PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
@@ -74501,6 +70463,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0;
PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
@@ -74537,6 +70500,7 @@ namespace VULKAN_HPP_NAMESPACE
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0;
PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
@@ -74554,6 +70518,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0;
+ PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0;
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
@@ -74585,15 +70550,18 @@ namespace VULKAN_HPP_NAMESPACE
#if !defined(VK_NO_PROTOTYPES)
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
- DispatchLoaderDynamic(vk::Instance const& instance, vk::Device const& device) VULKAN_HPP_NOEXCEPT
+ DispatchLoaderDynamic(VULKAN_HPP_NAMESPACE::Instance const& instance, VULKAN_HPP_NAMESPACE::Device const& device) VULKAN_HPP_NOEXCEPT
{
init(instance, device);
}
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
- void init(vk::Instance const& instance, vk::Device const& device) VULKAN_HPP_NOEXCEPT
+ void init(VULKAN_HPP_NAMESPACE::Instance const& instance, VULKAN_HPP_NAMESPACE::Device const& device) VULKAN_HPP_NOEXCEPT
{
- init(static_cast<VkInstance>(instance), ::vkGetInstanceProcAddr, static_cast<VkDevice>(device), device ? ::vkGetDeviceProcAddr : nullptr);
+ static vk::DynamicLoader dl;
+ PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
+ PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.getProcAddress<PFN_vkGetDeviceProcAddr>("vkGetDeviceProcAddr");
+ init(static_cast<VkInstance>(instance), getInstanceProcAddr, static_cast<VkDevice>(device), device ? getDeviceProcAddr : nullptr);
}
#endif // !defined(VK_NO_PROTOTYPES)
@@ -74624,14 +70592,15 @@ namespace VULKAN_HPP_NAMESPACE
{
VULKAN_HPP_ASSERT(instance && getInstanceProcAddr);
vkGetInstanceProcAddr = getInstanceProcAddr;
- init( vk::Instance(instance) );
+ init( VULKAN_HPP_NAMESPACE::Instance(instance) );
if (device) {
- init( vk::Device(device) );
+ init( VULKAN_HPP_NAMESPACE::Device(device) );
}
}
- void init( vk::Instance instance ) VULKAN_HPP_NOEXCEPT
+ void init( VULKAN_HPP_NAMESPACE::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT
{
+ VkInstance instance = static_cast<VkInstance>(instanceCpp);
#ifdef VK_USE_PLATFORM_ANDROID_KHR
vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
@@ -74685,6 +70654,7 @@ namespace VULKAN_HPP_NAMESPACE
vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) );
vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) );
vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) );
+ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) );
vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) );
vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) );
vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) );
@@ -74721,6 +70691,7 @@ namespace VULKAN_HPP_NAMESPACE
vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) );
vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) );
vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) );
+ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) );
vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) );
vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) );
vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) );
@@ -74738,6 +70709,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) );
vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) );
+ vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) );
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) );
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
@@ -74760,6 +70732,7 @@ namespace VULKAN_HPP_NAMESPACE
vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetInstanceProcAddr( instance, "vkCmdBeginQuery" ) );
vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginQueryIndexedEXT" ) );
vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass" ) );
+ vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2" ) );
vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2KHR" ) );
vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginTransformFeedbackEXT" ) );
vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets" ) );
@@ -74789,10 +70762,12 @@ namespace VULKAN_HPP_NAMESPACE
vkCmdDraw = PFN_vkCmdDraw( vkGetInstanceProcAddr( instance, "vkCmdDraw" ) );
vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexed" ) );
vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCount" ) );
vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountAMD" ) );
vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountKHR" ) );
vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirect" ) );
vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectByteCountEXT" ) );
+ vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCount" ) );
vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountAMD" ) );
vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountKHR" ) );
vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountNV" ) );
@@ -74803,12 +70778,14 @@ namespace VULKAN_HPP_NAMESPACE
vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetInstanceProcAddr( instance, "vkCmdEndQuery" ) );
vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdEndQueryIndexedEXT" ) );
vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass" ) );
+ vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2" ) );
vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2KHR" ) );
vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdEndTransformFeedbackEXT" ) );
vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetInstanceProcAddr( instance, "vkCmdExecuteCommands" ) );
vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetInstanceProcAddr( instance, "vkCmdFillBuffer" ) );
vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdInsertDebugUtilsLabelEXT" ) );
vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass" ) );
+ vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2" ) );
vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2KHR" ) );
vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier" ) );
vkCmdProcessCommandsNVX = PFN_vkCmdProcessCommandsNVX( vkGetInstanceProcAddr( instance, "vkCmdProcessCommandsNVX" ) );
@@ -74856,6 +70833,7 @@ namespace VULKAN_HPP_NAMESPACE
vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImage2KHR" ) );
vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImageKHR" ) );
vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkAcquirePerformanceConfigurationINTEL" ) );
+ vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkAcquireProfilingLockKHR" ) );
vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetInstanceProcAddr( instance, "vkAllocateCommandBuffers" ) );
vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetInstanceProcAddr( instance, "vkAllocateDescriptorSets" ) );
vkAllocateMemory = PFN_vkAllocateMemory( vkGetInstanceProcAddr( instance, "vkAllocateMemory" ) );
@@ -74889,6 +70867,7 @@ namespace VULKAN_HPP_NAMESPACE
vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetInstanceProcAddr( instance, "vkCreateQueryPool" ) );
vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesNV" ) );
vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetInstanceProcAddr( instance, "vkCreateRenderPass" ) );
+ vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2" ) );
vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2KHR" ) );
vkCreateSampler = PFN_vkCreateSampler( vkGetInstanceProcAddr( instance, "vkCreateSampler" ) );
vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversion" ) );
@@ -74939,10 +70918,14 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddress" ) );
vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressEXT" ) );
+ vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressKHR" ) );
vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements" ) );
vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2" ) );
vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2KHR" ) );
+ vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddress" ) );
+ vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddressKHR" ) );
vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsEXT" ) );
vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupport" ) );
vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupportKHR" ) );
@@ -74954,6 +70937,8 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryCommitment" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) );
vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue" ) );
vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue2" ) );
@@ -74997,6 +70982,7 @@ namespace VULKAN_HPP_NAMESPACE
vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesNV" ) );
vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetInstanceProcAddr( instance, "vkGetRefreshCycleDurationGOOGLE" ) );
vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderAreaGranularity" ) );
+ vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValue" ) );
vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValueKHR" ) );
vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreFdKHR" ) );
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -75027,16 +71013,19 @@ namespace VULKAN_HPP_NAMESPACE
vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ) );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkReleasePerformanceConfigurationINTEL" ) );
+ vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkReleaseProfilingLockKHR" ) );
vkResetCommandPool = PFN_vkResetCommandPool( vkGetInstanceProcAddr( instance, "vkResetCommandPool" ) );
vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetInstanceProcAddr( instance, "vkResetDescriptorPool" ) );
vkResetEvent = PFN_vkResetEvent( vkGetInstanceProcAddr( instance, "vkResetEvent" ) );
vkResetFences = PFN_vkResetFences( vkGetInstanceProcAddr( instance, "vkResetFences" ) );
+ vkResetQueryPool = PFN_vkResetQueryPool( vkGetInstanceProcAddr( instance, "vkResetQueryPool" ) );
vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetInstanceProcAddr( instance, "vkResetQueryPoolEXT" ) );
vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectNameEXT" ) );
vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectTagEXT" ) );
vkSetEvent = PFN_vkSetEvent( vkGetInstanceProcAddr( instance, "vkSetEvent" ) );
vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetInstanceProcAddr( instance, "vkSetHdrMetadataEXT" ) );
vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetInstanceProcAddr( instance, "vkSetLocalDimmingAMD" ) );
+ vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetInstanceProcAddr( instance, "vkSignalSemaphore" ) );
vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetInstanceProcAddr( instance, "vkSignalSemaphoreKHR" ) );
vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetInstanceProcAddr( instance, "vkTrimCommandPool" ) );
vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetInstanceProcAddr( instance, "vkTrimCommandPoolKHR" ) );
@@ -75047,6 +71036,7 @@ namespace VULKAN_HPP_NAMESPACE
vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplateKHR" ) );
vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSets" ) );
vkWaitForFences = PFN_vkWaitForFences( vkGetInstanceProcAddr( instance, "vkWaitForFences" ) );
+ vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetInstanceProcAddr( instance, "vkWaitSemaphores" ) );
vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetInstanceProcAddr( instance, "vkWaitSemaphoresKHR" ) );
vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointDataNV" ) );
vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueBeginDebugUtilsLabelEXT" ) );
@@ -75059,14 +71049,16 @@ namespace VULKAN_HPP_NAMESPACE
vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) );
}
- void init( vk::Device device ) VULKAN_HPP_NOEXCEPT
+ void init( VULKAN_HPP_NAMESPACE::Device deviceCpp ) VULKAN_HPP_NOEXCEPT
{
+ VkDevice device = static_cast<VkDevice>(deviceCpp);
vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );
vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) );
vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) );
vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) );
+ vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) );
vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) );
vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) );
vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) );
@@ -75096,10 +71088,12 @@ namespace VULKAN_HPP_NAMESPACE
vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) );
vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) );
vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) );
vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) );
vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) );
vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) );
vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) );
+ vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) );
vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) );
vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) );
vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) );
@@ -75110,12 +71104,14 @@ namespace VULKAN_HPP_NAMESPACE
vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) );
vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) );
vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) );
+ vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) );
vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) );
vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) );
vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) );
vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) );
vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) );
vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) );
+ vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) );
vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) );
vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) );
vkCmdProcessCommandsNVX = PFN_vkCmdProcessCommandsNVX( vkGetDeviceProcAddr( device, "vkCmdProcessCommandsNVX" ) );
@@ -75163,6 +71159,7 @@ namespace VULKAN_HPP_NAMESPACE
vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) );
vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) );
vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) );
+ vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) );
vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) );
vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) );
vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) );
@@ -75196,6 +71193,7 @@ namespace VULKAN_HPP_NAMESPACE
vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) );
vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) );
vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) );
+ vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) );
vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) );
vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) );
vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) );
@@ -75246,10 +71244,14 @@ namespace VULKAN_HPP_NAMESPACE
#ifdef VK_USE_PLATFORM_ANDROID_KHR
vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) );
vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) );
+ vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) );
vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) );
vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) );
vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) );
+ vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) );
+ vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) );
vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) );
vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) );
vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) );
@@ -75261,6 +71263,8 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) );
vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) );
vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) );
@@ -75304,6 +71308,7 @@ namespace VULKAN_HPP_NAMESPACE
vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) );
vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) );
vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) );
+ vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) );
vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) );
vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) );
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -75334,16 +71339,19 @@ namespace VULKAN_HPP_NAMESPACE
vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) );
+ vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) );
vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) );
vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) );
vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) );
vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) );
+ vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) );
vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) );
vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) );
vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) );
vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) );
vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) );
vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) );
+ vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) );
vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) );
vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) );
vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) );
@@ -75354,6 +71362,7 @@ namespace VULKAN_HPP_NAMESPACE
vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) );
vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) );
vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) );
+ vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) );
vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) );
vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) );
vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) );
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_core.h b/thirdparty/vulkan/include/vulkan/vulkan_core.h
index 5f7c485bfa..ea96fc43ed 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_core.h
+++ b/thirdparty/vulkan/include/vulkan/vulkan_core.h
@@ -44,7 +44,7 @@ extern "C" {
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
// Version of this file
-#define VK_HEADER_VERSION 127
+#define VK_HEADER_VERSION 131
#define VK_NULL_HANDLE 0
@@ -133,8 +133,11 @@ typedef enum VkResult {
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_ERROR_SURFACE_LOST_KHR = -1000000000,
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
VK_SUBOPTIMAL_KHR = 1000001003,
@@ -143,15 +146,16 @@ typedef enum VkResult {
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
VK_ERROR_INVALID_SHADER_NV = -1000012000,
VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000,
- VK_ERROR_FRAGMENTATION_EXT = -1000161000,
VK_ERROR_NOT_PERMITTED_EXT = -1000174001,
- VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = -1000244000,
VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000,
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_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
+ VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION,
+ 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_RESULT_BEGIN_RANGE = VK_ERROR_UNKNOWN,
VK_RESULT_END_RANGE = VK_INCOMPLETE,
- VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
+ VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_UNKNOWN + 1),
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
} VkResult;
@@ -270,6 +274,56 @@ typedef enum VkStructureType {
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_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
@@ -329,7 +383,6 @@ typedef enum VkStructureType {
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_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = 1000082000,
VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
@@ -353,23 +406,19 @@ typedef enum VkStructureType {
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_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = 1000108000,
- VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = 1000108001,
- VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = 1000108002,
- VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = 1000108003,
- VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = 1000109000,
- VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = 1000109001,
- VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = 1000109002,
- VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = 1000109003,
- VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = 1000109004,
- VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = 1000109005,
- VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = 1000109006,
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,
@@ -391,8 +440,6 @@ typedef enum VkStructureType {
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_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
- VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001,
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002,
@@ -402,7 +449,6 @@ typedef enum VkStructureType {
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_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
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,
@@ -418,11 +464,6 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005,
VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002,
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003,
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004,
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,
@@ -443,12 +484,9 @@ typedef enum VkStructureType {
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_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = 1000175000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000,
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_ATOMIC_INT64_FEATURES_KHR = 1000180000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000,
VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000,
VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
@@ -459,10 +497,6 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002,
VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000,
VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000192000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000,
- VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
@@ -472,12 +506,6 @@ typedef enum VkStructureType {
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_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = 1000207000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = 1000207001,
- VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = 1000207002,
- VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = 1000207003,
- VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = 1000207004,
- VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = 1000207005,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000,
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = 1000210000,
VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001,
@@ -485,7 +513,6 @@ typedef enum VkStructureType {
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_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
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,
@@ -494,7 +521,6 @@ typedef enum VkStructureType {
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_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = 1000225000,
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = 1000225001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = 1000225002,
@@ -505,13 +531,9 @@ typedef enum VkStructureType {
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_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = 1000241000,
- VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = 1000241001,
- VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = 1000241002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
- VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001,
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002,
- VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000,
VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000,
VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001,
@@ -521,7 +543,6 @@ typedef enum VkStructureType {
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_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = 1000253000,
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,
@@ -529,7 +550,6 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000,
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000,
VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001,
@@ -575,10 +595,22 @@ typedef enum VkStructureType {
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_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR,
+ 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 = 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,
@@ -590,11 +622,14 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
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_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_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,
@@ -603,9 +638,41 @@ typedef enum VkStructureType {
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_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_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_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_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_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_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_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_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
@@ -951,6 +1018,7 @@ typedef enum VkQueryType {
VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
VK_QUERY_TYPE_TIMESTAMP = 2,
VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004,
+ VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR = 1000116000,
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000,
VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000,
VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION,
@@ -980,16 +1048,20 @@ typedef enum VkImageLayout {
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_PRESENT_SRC_KHR = 1000001002,
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = 1000164003,
VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000,
- VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = 1000241000,
- VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = 1000241001,
- VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000241002,
- VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000241003,
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_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_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED,
VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
@@ -1437,11 +1509,12 @@ typedef enum VkFormatFeatureFlagBits {
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_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000,
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,
@@ -1649,7 +1722,9 @@ typedef enum VkBufferCreateFlagBits {
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_EXT = 0x00000010,
+ VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010,
+ 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;
@@ -1664,11 +1739,13 @@ typedef enum VkBufferUsageFlagBits {
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_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800,
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = 0x00000400,
- VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = 0x00020000,
+ 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;
@@ -1691,10 +1768,11 @@ typedef enum VkPipelineCreateFlagBits {
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 = 0x00000010,
+ VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010,
VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020,
VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR = 0x00000040,
VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080,
+ 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_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
@@ -1765,22 +1843,25 @@ typedef enum VkSamplerCreateFlagBits {
typedef VkFlags VkSamplerCreateFlags;
typedef enum VkDescriptorSetLayoutCreateFlagBits {
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
- VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = 0x00000002,
+ 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_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkDescriptorSetLayoutCreateFlagBits;
typedef VkFlags VkDescriptorSetLayoutCreateFlags;
typedef enum VkDescriptorPoolCreateFlagBits {
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
- VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = 0x00000002,
+ VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002,
+ VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT,
VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkDescriptorPoolCreateFlagBits;
typedef VkFlags VkDescriptorPoolCreateFlags;
typedef VkFlags VkDescriptorPoolResetFlags;
typedef enum VkFramebufferCreateFlagBits {
- VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR = 0x00000001,
+ 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;
@@ -4051,7 +4132,11 @@ 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;
@@ -4818,6 +4903,760 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
#endif
+#define VK_VERSION_1_2 1
+// Vulkan 1.2 version number
+#define VK_API_VERSION_1_2 VK_MAKE_VERSION(1, 2, 0)// Patch version should always be set to 0
+
+typedef uint64_t VkDeviceAddress;
+#define VK_MAX_DRIVER_NAME_SIZE 256
+#define VK_MAX_DRIVER_INFO_SIZE 256
+
+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_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_BEGIN_RANGE = VK_DRIVER_ID_AMD_PROPRIETARY,
+ VK_DRIVER_ID_END_RANGE = VK_DRIVER_ID_BROADCOM_PROPRIETARY,
+ VK_DRIVER_ID_RANGE_SIZE = (VK_DRIVER_ID_BROADCOM_PROPRIETARY - VK_DRIVER_ID_AMD_PROPRIETARY + 1),
+ 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_BEGIN_RANGE = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY,
+ VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_END_RANGE = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE,
+ VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_RANGE_SIZE = (VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE - VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY + 1),
+ 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_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_BEGIN_RANGE = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE,
+ VK_SAMPLER_REDUCTION_MODE_END_RANGE = VK_SAMPLER_REDUCTION_MODE_MAX,
+ VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE = (VK_SAMPLER_REDUCTION_MODE_MAX - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE + 1),
+ 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_BEGIN_RANGE = VK_SEMAPHORE_TYPE_BINARY,
+ VK_SEMAPHORE_TYPE_END_RANGE = VK_SEMAPHORE_TYPE_TIMELINE,
+ VK_SEMAPHORE_TYPE_RANGE_SIZE = (VK_SEMAPHORE_TYPE_TIMELINE - VK_SEMAPHORE_TYPE_BINARY + 1),
+ 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_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
+
+
#define VK_KHR_surface 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
#define VK_KHR_SURFACE_SPEC_VERSION 25
@@ -5605,14 +6444,9 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(
#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 struct VkPhysicalDeviceShaderFloat16Int8FeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 shaderFloat16;
- VkBool32 shaderInt8;
-} VkPhysicalDeviceShaderFloat16Int8FeaturesKHR;
+typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceShaderFloat16Int8FeaturesKHR;
-typedef VkPhysicalDeviceShaderFloat16Int8FeaturesKHR VkPhysicalDeviceFloat16Int8FeaturesKHR;
+typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceFloat16Int8FeaturesKHR;
@@ -5686,144 +6520,58 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(
#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 struct VkPhysicalDeviceImagelessFramebufferFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 imagelessFramebuffer;
-} VkPhysicalDeviceImagelessFramebufferFeaturesKHR;
+typedef VkPhysicalDeviceImagelessFramebufferFeatures VkPhysicalDeviceImagelessFramebufferFeaturesKHR;
-typedef struct VkFramebufferAttachmentImageInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkImageCreateFlags flags;
- VkImageUsageFlags usage;
- uint32_t width;
- uint32_t height;
- uint32_t layerCount;
- uint32_t viewFormatCount;
- const VkFormat* pViewFormats;
-} VkFramebufferAttachmentImageInfoKHR;
+typedef VkFramebufferAttachmentsCreateInfo VkFramebufferAttachmentsCreateInfoKHR;
-typedef struct VkFramebufferAttachmentsCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t attachmentImageInfoCount;
- const VkFramebufferAttachmentImageInfoKHR* pAttachmentImageInfos;
-} VkFramebufferAttachmentsCreateInfoKHR;
+typedef VkFramebufferAttachmentImageInfo VkFramebufferAttachmentImageInfoKHR;
-typedef struct VkRenderPassAttachmentBeginInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t attachmentCount;
- const VkImageView* pAttachments;
-} VkRenderPassAttachmentBeginInfoKHR;
+typedef VkRenderPassAttachmentBeginInfo VkRenderPassAttachmentBeginInfoKHR;
#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 struct VkAttachmentDescription2KHR {
- VkStructureType sType;
- const void* pNext;
- VkAttachmentDescriptionFlags flags;
- VkFormat format;
- VkSampleCountFlagBits samples;
- VkAttachmentLoadOp loadOp;
- VkAttachmentStoreOp storeOp;
- VkAttachmentLoadOp stencilLoadOp;
- VkAttachmentStoreOp stencilStoreOp;
- VkImageLayout initialLayout;
- VkImageLayout finalLayout;
-} VkAttachmentDescription2KHR;
+typedef VkRenderPassCreateInfo2 VkRenderPassCreateInfo2KHR;
-typedef struct VkAttachmentReference2KHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t attachment;
- VkImageLayout layout;
- VkImageAspectFlags aspectMask;
-} VkAttachmentReference2KHR;
+typedef VkAttachmentDescription2 VkAttachmentDescription2KHR;
-typedef struct VkSubpassDescription2KHR {
- VkStructureType sType;
- const void* pNext;
- VkSubpassDescriptionFlags flags;
- VkPipelineBindPoint pipelineBindPoint;
- uint32_t viewMask;
- uint32_t inputAttachmentCount;
- const VkAttachmentReference2KHR* pInputAttachments;
- uint32_t colorAttachmentCount;
- const VkAttachmentReference2KHR* pColorAttachments;
- const VkAttachmentReference2KHR* pResolveAttachments;
- const VkAttachmentReference2KHR* pDepthStencilAttachment;
- uint32_t preserveAttachmentCount;
- const uint32_t* pPreserveAttachments;
-} VkSubpassDescription2KHR;
-
-typedef struct VkSubpassDependency2KHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t srcSubpass;
- uint32_t dstSubpass;
- VkPipelineStageFlags srcStageMask;
- VkPipelineStageFlags dstStageMask;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
- VkDependencyFlags dependencyFlags;
- int32_t viewOffset;
-} VkSubpassDependency2KHR;
+typedef VkAttachmentReference2 VkAttachmentReference2KHR;
-typedef struct VkRenderPassCreateInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkRenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const VkAttachmentDescription2KHR* pAttachments;
- uint32_t subpassCount;
- const VkSubpassDescription2KHR* pSubpasses;
- uint32_t dependencyCount;
- const VkSubpassDependency2KHR* pDependencies;
- uint32_t correlatedViewMaskCount;
- const uint32_t* pCorrelatedViewMasks;
-} VkRenderPassCreateInfo2KHR;
-
-typedef struct VkSubpassBeginInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSubpassContents contents;
-} VkSubpassBeginInfoKHR;
+typedef VkSubpassDescription2 VkSubpassDescription2KHR;
-typedef struct VkSubpassEndInfoKHR {
- VkStructureType sType;
- const void* pNext;
-} VkSubpassEndInfoKHR;
+typedef VkSubpassDependency2 VkSubpassDependency2KHR;
+
+typedef VkSubpassBeginInfo VkSubpassBeginInfoKHR;
+
+typedef VkSubpassEndInfo VkSubpassEndInfoKHR;
-typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
-typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
-typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo);
-typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo);
+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 VkRenderPassCreateInfo2KHR* pCreateInfo,
+ const VkRenderPassCreateInfo2* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkRenderPass* pRenderPass);
VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2KHR(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
+ const VkSubpassBeginInfo* pSubpassBeginInfo);
VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2KHR(
VkCommandBuffer commandBuffer,
- const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
- const VkSubpassEndInfoKHR* pSubpassEndInfo);
+ const VkSubpassBeginInfo* pSubpassBeginInfo,
+ const VkSubpassEndInfo* pSubpassEndInfo);
VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR(
VkCommandBuffer commandBuffer,
- const VkSubpassEndInfoKHR* pSubpassEndInfo);
+ const VkSubpassEndInfo* pSubpassEndInfo);
#endif
@@ -5915,6 +6663,153 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR(
#endif
+#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_BEGIN_RANGE_KHR = VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR,
+ VK_PERFORMANCE_COUNTER_UNIT_END_RANGE_KHR = VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR,
+ VK_PERFORMANCE_COUNTER_UNIT_RANGE_SIZE_KHR = (VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR - VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR + 1),
+ 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 = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
+ VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
+ VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
+ VK_PERFORMANCE_COUNTER_SCOPE_BEGIN_RANGE_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
+ VK_PERFORMANCE_COUNTER_SCOPE_END_RANGE_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
+ VK_PERFORMANCE_COUNTER_SCOPE_RANGE_SIZE_KHR = (VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR - VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR + 1),
+ 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_BEGIN_RANGE_KHR = VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR,
+ VK_PERFORMANCE_COUNTER_STORAGE_END_RANGE_KHR = VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR,
+ VK_PERFORMANCE_COUNTER_STORAGE_RANGE_SIZE_KHR = (VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR - VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR + 1),
+ VK_PERFORMANCE_COUNTER_STORAGE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkPerformanceCounterStorageKHR;
+
+typedef enum VkPerformanceCounterDescriptionFlagBitsKHR {
+ VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = 0x00000001,
+ VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = 0x00000002,
+ 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;
+ const void* pNext;
+ VkPerformanceCounterUnitKHR unit;
+ VkPerformanceCounterScopeKHR scope;
+ VkPerformanceCounterStorageKHR storage;
+ uint8_t uuid[VK_UUID_SIZE];
+} VkPerformanceCounterKHR;
+
+typedef struct VkPerformanceCounterDescriptionKHR {
+ VkStructureType sType;
+ const 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
+
+
#define VK_KHR_maintenance2 1
#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1
#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2"
@@ -6100,12 +6995,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(
#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 struct VkImageFormatListCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t viewFormatCount;
- const VkFormat* pViewFormats;
-} VkImageFormatListCreateInfoKHR;
+typedef VkImageFormatListCreateInfo VkImageFormatListCreateInfoKHR;
@@ -6219,36 +7109,21 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(
#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 struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 shaderSubgroupExtendedTypes;
-} VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;
+typedef VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;
#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 struct VkPhysicalDevice8BitStorageFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 storageBuffer8BitAccess;
- VkBool32 uniformAndStorageBuffer8BitAccess;
- VkBool32 storagePushConstant8;
-} VkPhysicalDevice8BitStorageFeaturesKHR;
+typedef VkPhysicalDevice8BitStorageFeatures VkPhysicalDevice8BitStorageFeaturesKHR;
#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 struct VkPhysicalDeviceShaderAtomicInt64FeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 shaderBufferInt64Atomics;
- VkBool32 shaderSharedInt64Atomics;
-} VkPhysicalDeviceShaderAtomicInt64FeaturesKHR;
+typedef VkPhysicalDeviceShaderAtomicInt64Features VkPhysicalDeviceShaderAtomicInt64FeaturesKHR;
@@ -6265,113 +7140,37 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR {
#define VK_KHR_driver_properties 1
-#define VK_MAX_DRIVER_NAME_SIZE_KHR 256
-#define VK_MAX_DRIVER_INFO_SIZE_KHR 256
#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 enum VkDriverIdKHR {
- VK_DRIVER_ID_AMD_PROPRIETARY_KHR = 1,
- VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = 2,
- VK_DRIVER_ID_MESA_RADV_KHR = 3,
- VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = 4,
- VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = 5,
- VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = 6,
- VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = 7,
- VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = 8,
- VK_DRIVER_ID_ARM_PROPRIETARY_KHR = 9,
- VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR = 10,
- VK_DRIVER_ID_GGP_PROPRIETARY_KHR = 11,
- VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR = 12,
- VK_DRIVER_ID_BEGIN_RANGE_KHR = VK_DRIVER_ID_AMD_PROPRIETARY_KHR,
- VK_DRIVER_ID_END_RANGE_KHR = VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR,
- VK_DRIVER_ID_RANGE_SIZE_KHR = (VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR - VK_DRIVER_ID_AMD_PROPRIETARY_KHR + 1),
- VK_DRIVER_ID_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkDriverIdKHR;
-typedef struct VkConformanceVersionKHR {
- uint8_t major;
- uint8_t minor;
- uint8_t subminor;
- uint8_t patch;
-} VkConformanceVersionKHR;
+typedef VkConformanceVersion VkConformanceVersionKHR;
-typedef struct VkPhysicalDeviceDriverPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkDriverIdKHR driverID;
- char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR];
- char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR];
- VkConformanceVersionKHR conformanceVersion;
-} VkPhysicalDeviceDriverPropertiesKHR;
+typedef VkPhysicalDeviceDriverProperties VkPhysicalDeviceDriverPropertiesKHR;
#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 enum VkShaderFloatControlsIndependenceKHR {
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR = 0,
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR = 1,
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR = 2,
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_BEGIN_RANGE_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR,
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_END_RANGE_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR,
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_RANGE_SIZE_KHR = (VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR - VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR + 1),
- VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkShaderFloatControlsIndependenceKHR;
-typedef struct VkPhysicalDeviceFloatControlsPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkShaderFloatControlsIndependenceKHR denormBehaviorIndependence;
- VkShaderFloatControlsIndependenceKHR 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;
-} VkPhysicalDeviceFloatControlsPropertiesKHR;
+typedef VkPhysicalDeviceFloatControlsProperties VkPhysicalDeviceFloatControlsPropertiesKHR;
#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 enum VkResolveModeFlagBitsKHR {
- VK_RESOLVE_MODE_NONE_KHR = 0,
- VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = 0x00000001,
- VK_RESOLVE_MODE_AVERAGE_BIT_KHR = 0x00000002,
- VK_RESOLVE_MODE_MIN_BIT_KHR = 0x00000004,
- VK_RESOLVE_MODE_MAX_BIT_KHR = 0x00000008,
- VK_RESOLVE_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkResolveModeFlagBitsKHR;
-typedef VkFlags VkResolveModeFlagsKHR;
-typedef struct VkSubpassDescriptionDepthStencilResolveKHR {
- VkStructureType sType;
- const void* pNext;
- VkResolveModeFlagBitsKHR depthResolveMode;
- VkResolveModeFlagBitsKHR stencilResolveMode;
- const VkAttachmentReference2KHR* pDepthStencilResolveAttachment;
-} VkSubpassDescriptionDepthStencilResolveKHR;
+typedef VkResolveModeFlags VkResolveModeFlagsKHR;
-typedef struct VkPhysicalDeviceDepthStencilResolvePropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkResolveModeFlagsKHR supportedDepthResolveModes;
- VkResolveModeFlagsKHR supportedStencilResolveModes;
- VkBool32 independentResolveNone;
- VkBool32 independentResolve;
-} VkPhysicalDeviceDepthStencilResolvePropertiesKHR;
+typedef VkSubpassDescriptionDepthStencilResolve VkSubpassDescriptionDepthStencilResolveKHR;
+
+typedef VkPhysicalDeviceDepthStencilResolveProperties VkPhysicalDeviceDepthStencilResolvePropertiesKHR;
@@ -6383,68 +7182,27 @@ typedef struct VkPhysicalDeviceDepthStencilResolvePropertiesKHR {
#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 enum VkSemaphoreTypeKHR {
- VK_SEMAPHORE_TYPE_BINARY_KHR = 0,
- VK_SEMAPHORE_TYPE_TIMELINE_KHR = 1,
- VK_SEMAPHORE_TYPE_BEGIN_RANGE_KHR = VK_SEMAPHORE_TYPE_BINARY_KHR,
- VK_SEMAPHORE_TYPE_END_RANGE_KHR = VK_SEMAPHORE_TYPE_TIMELINE_KHR,
- VK_SEMAPHORE_TYPE_RANGE_SIZE_KHR = (VK_SEMAPHORE_TYPE_TIMELINE_KHR - VK_SEMAPHORE_TYPE_BINARY_KHR + 1),
- VK_SEMAPHORE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkSemaphoreTypeKHR;
-
-typedef enum VkSemaphoreWaitFlagBitsKHR {
- VK_SEMAPHORE_WAIT_ANY_BIT_KHR = 0x00000001,
- VK_SEMAPHORE_WAIT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkSemaphoreWaitFlagBitsKHR;
-typedef VkFlags VkSemaphoreWaitFlagsKHR;
-typedef struct VkPhysicalDeviceTimelineSemaphoreFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 timelineSemaphore;
-} VkPhysicalDeviceTimelineSemaphoreFeaturesKHR;
+typedef VkSemaphoreWaitFlagBits VkSemaphoreWaitFlagBitsKHR;
-typedef struct VkPhysicalDeviceTimelineSemaphorePropertiesKHR {
- VkStructureType sType;
- void* pNext;
- uint64_t maxTimelineSemaphoreValueDifference;
-} VkPhysicalDeviceTimelineSemaphorePropertiesKHR;
+typedef VkSemaphoreWaitFlags VkSemaphoreWaitFlagsKHR;
-typedef struct VkSemaphoreTypeCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphoreTypeKHR semaphoreType;
- uint64_t initialValue;
-} VkSemaphoreTypeCreateInfoKHR;
+typedef VkPhysicalDeviceTimelineSemaphoreFeatures VkPhysicalDeviceTimelineSemaphoreFeaturesKHR;
-typedef struct VkTimelineSemaphoreSubmitInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreValueCount;
- const uint64_t* pWaitSemaphoreValues;
- uint32_t signalSemaphoreValueCount;
- const uint64_t* pSignalSemaphoreValues;
-} VkTimelineSemaphoreSubmitInfoKHR;
+typedef VkPhysicalDeviceTimelineSemaphoreProperties VkPhysicalDeviceTimelineSemaphorePropertiesKHR;
-typedef struct VkSemaphoreWaitInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphoreWaitFlagsKHR flags;
- uint32_t semaphoreCount;
- const VkSemaphore* pSemaphores;
- const uint64_t* pValues;
-} VkSemaphoreWaitInfoKHR;
+typedef VkSemaphoreTypeCreateInfo VkSemaphoreTypeCreateInfoKHR;
-typedef struct VkSemaphoreSignalInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphore semaphore;
- uint64_t value;
-} VkSemaphoreSignalInfoKHR;
+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 VkSemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout);
-typedef VkResult (VKAPI_PTR *PFN_vkSignalSemaphoreKHR)(VkDevice device, const VkSemaphoreSignalInfoKHR* pSignalInfo);
+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(
@@ -6454,25 +7212,19 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValueKHR(
VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphoresKHR(
VkDevice device,
- const VkSemaphoreWaitInfoKHR* pWaitInfo,
+ const VkSemaphoreWaitInfo* pWaitInfo,
uint64_t timeout);
VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphoreKHR(
VkDevice device,
- const VkSemaphoreSignalInfoKHR* pSignalInfo);
+ const VkSemaphoreSignalInfo* pSignalInfo);
#endif
#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 struct VkPhysicalDeviceVulkanMemoryModelFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 vulkanMemoryModel;
- VkBool32 vulkanMemoryModelDeviceScope;
- VkBool32 vulkanMemoryModelAvailabilityVisibilityChains;
-} VkPhysicalDeviceVulkanMemoryModelFeaturesKHR;
+typedef VkPhysicalDeviceVulkanMemoryModelFeatures VkPhysicalDeviceVulkanMemoryModelFeaturesKHR;
@@ -6495,36 +7247,51 @@ typedef struct VkSurfaceProtectedCapabilitiesKHR {
#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 struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 separateDepthStencilLayouts;
-} VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR;
+typedef VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR;
-typedef struct VkAttachmentReferenceStencilLayoutKHR {
- VkStructureType sType;
- void* pNext;
- VkImageLayout stencilLayout;
-} VkAttachmentReferenceStencilLayoutKHR;
+typedef VkAttachmentReferenceStencilLayout VkAttachmentReferenceStencilLayoutKHR;
-typedef struct VkAttachmentDescriptionStencilLayoutKHR {
- VkStructureType sType;
- void* pNext;
- VkImageLayout stencilInitialLayout;
- VkImageLayout stencilFinalLayout;
-} VkAttachmentDescriptionStencilLayoutKHR;
+typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayoutKHR;
#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 struct VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 uniformBufferStandardLayout;
-} VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR;
+typedef VkPhysicalDeviceUniformBufferStandardLayoutFeatures VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR;
+
+
+
+#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
#define VK_KHR_pipeline_executable_properties 1
@@ -7178,7 +7945,7 @@ typedef struct VkValidationFlagsEXT {
#define VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME "VK_EXT_texture_compression_astc_hdr"
typedef struct VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkBool32 textureCompressionASTC_HDR;
} VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT;
@@ -8020,28 +8787,11 @@ VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT(
#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 enum VkSamplerReductionModeEXT {
- VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
- VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
- VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
- VK_SAMPLER_REDUCTION_MODE_BEGIN_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT,
- VK_SAMPLER_REDUCTION_MODE_END_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_MAX_EXT,
- VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE_EXT = (VK_SAMPLER_REDUCTION_MODE_MAX_EXT - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT + 1),
- VK_SAMPLER_REDUCTION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkSamplerReductionModeEXT;
-typedef struct VkSamplerReductionModeCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkSamplerReductionModeEXT reductionMode;
-} VkSamplerReductionModeCreateInfoEXT;
+typedef VkSamplerReductionModeCreateInfo VkSamplerReductionModeCreateInfoEXT;
-typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 filterMinmaxSingleComponentFormats;
- VkBool32 filterMinmaxImageComponentMapping;
-} VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
+typedef VkPhysicalDeviceSamplerFilterMinmaxProperties VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
@@ -8400,87 +9150,19 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT(
#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 enum VkDescriptorBindingFlagBitsEXT {
- VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = 0x00000001,
- VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 0x00000002,
- VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = 0x00000004,
- VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 0x00000008,
- VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDescriptorBindingFlagBitsEXT;
-typedef VkFlags VkDescriptorBindingFlagsEXT;
-typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- uint32_t bindingCount;
- const VkDescriptorBindingFlagsEXT* pBindingFlags;
-} VkDescriptorSetLayoutBindingFlagsCreateInfoEXT;
+typedef VkDescriptorBindingFlags VkDescriptorBindingFlagsEXT;
-typedef struct VkPhysicalDeviceDescriptorIndexingFeaturesEXT {
- 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;
-} VkPhysicalDeviceDescriptorIndexingFeaturesEXT;
+typedef VkDescriptorSetLayoutBindingFlagsCreateInfo VkDescriptorSetLayoutBindingFlagsCreateInfoEXT;
-typedef struct VkPhysicalDeviceDescriptorIndexingPropertiesEXT {
- 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;
-} VkPhysicalDeviceDescriptorIndexingPropertiesEXT;
+typedef VkPhysicalDeviceDescriptorIndexingFeatures VkPhysicalDeviceDescriptorIndexingFeaturesEXT;
-typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- uint32_t descriptorSetCount;
- const uint32_t* pDescriptorCounts;
-} VkDescriptorSetVariableDescriptorCountAllocateInfoEXT;
+typedef VkPhysicalDeviceDescriptorIndexingProperties VkPhysicalDeviceDescriptorIndexingPropertiesEXT;
-typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupportEXT {
- VkStructureType sType;
- void* pNext;
- uint32_t maxVariableDescriptorCount;
-} VkDescriptorSetVariableDescriptorCountLayoutSupportEXT;
+typedef VkDescriptorSetVariableDescriptorCountAllocateInfo VkDescriptorSetVariableDescriptorCountAllocateInfoEXT;
+
+typedef VkDescriptorSetVariableDescriptorCountLayoutSupport VkDescriptorSetVariableDescriptorCountLayoutSupportEXT;
@@ -8913,7 +9595,7 @@ typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV {
#define VK_EXT_filter_cubic 1
-#define VK_EXT_FILTER_CUBIC_SPEC_VERSION 2
+#define VK_EXT_FILTER_CUBIC_SPEC_VERSION 3
#define VK_EXT_FILTER_CUBIC_EXTENSION_NAME "VK_EXT_filter_cubic"
typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT {
VkStructureType sType;
@@ -8925,7 +9607,7 @@ typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT {
VkStructureType sType;
void* pNext;
VkBool32 filterCubic;
- VkBool32 filterCubicMinmax ;
+ VkBool32 filterCubicMinmax;
} VkFilterCubicImageViewImageFormatPropertiesEXT;
@@ -9544,11 +10226,7 @@ typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT {
#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 struct VkPhysicalDeviceScalarBlockLayoutFeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 scalarBlockLayout;
-} VkPhysicalDeviceScalarBlockLayoutFeaturesEXT;
+typedef VkPhysicalDeviceScalarBlockLayoutFeatures VkPhysicalDeviceScalarBlockLayoutFeaturesEXT;
@@ -9658,7 +10336,6 @@ typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV {
#define VK_EXT_buffer_device_address 1
-typedef uint64_t VkDeviceAddress;
#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 {
@@ -9671,11 +10348,7 @@ typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT {
typedef VkPhysicalDeviceBufferDeviceAddressFeaturesEXT VkPhysicalDeviceBufferAddressFeaturesEXT;
-typedef struct VkBufferDeviceAddressInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkBuffer buffer;
-} VkBufferDeviceAddressInfoEXT;
+typedef VkBufferDeviceAddressInfo VkBufferDeviceAddressInfoEXT;
typedef struct VkBufferDeviceAddressCreateInfoEXT {
VkStructureType sType;
@@ -9683,23 +10356,54 @@ typedef struct VkBufferDeviceAddressCreateInfoEXT {
VkDeviceAddress deviceAddress;
} VkBufferDeviceAddressCreateInfoEXT;
-typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo);
+typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT(
VkDevice device,
- const VkBufferDeviceAddressInfoEXT* pInfo);
+ const VkBufferDeviceAddressInfo* pInfo);
+#endif
+
+
+#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 enum VkToolPurposeFlagBitsEXT {
+ VK_TOOL_PURPOSE_VALIDATION_BIT_EXT = 0x00000001,
+ VK_TOOL_PURPOSE_PROFILING_BIT_EXT = 0x00000002,
+ VK_TOOL_PURPOSE_TRACING_BIT_EXT = 0x00000004,
+ VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = 0x00000008,
+ VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = 0x00000010,
+ VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = 0x00000020,
+ VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = 0x00000040,
+ VK_TOOL_PURPOSE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkToolPurposeFlagBitsEXT;
+typedef VkFlags VkToolPurposeFlagsEXT;
+typedef struct VkPhysicalDeviceToolPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ char name[VK_MAX_EXTENSION_NAME_SIZE];
+ char version[VK_MAX_EXTENSION_NAME_SIZE];
+ VkToolPurposeFlagsEXT purposes;
+ char description[VK_MAX_DESCRIPTION_SIZE];
+ char layer[VK_MAX_EXTENSION_NAME_SIZE];
+} VkPhysicalDeviceToolPropertiesEXT;
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceToolPropertiesEXT)(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolPropertiesEXT* pToolProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolPropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pToolCount,
+ VkPhysicalDeviceToolPropertiesEXT* pToolProperties);
#endif
#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 struct VkImageStencilUsageCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkImageUsageFlags stencilUsage;
-} VkImageStencilUsageCreateInfoEXT;
+typedef VkImageStencilUsageCreateInfo VkImageStencilUsageCreateInfoEXT;
@@ -9952,11 +10656,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEXT(
#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 struct VkPhysicalDeviceHostQueryResetFeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 hostQueryReset;
-} VkPhysicalDeviceHostQueryResetFeaturesEXT;
+typedef VkPhysicalDeviceHostQueryResetFeatures VkPhysicalDeviceHostQueryResetFeaturesEXT;
typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
diff --git a/thirdparty/vulkan/loader/extension_manual.c b/thirdparty/vulkan/loader/extension_manual.c
index 490496d7c7..b8118fdc8a 100644
--- a/thirdparty/vulkan/loader/extension_manual.c
+++ b/thirdparty/vulkan/loader/extension_manual.c
@@ -441,3 +441,22 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDeviceGroupSurfacePresentModes2EXT(
}
#endif // VK_USE_PLATFORM_WIN32_KHR
+
+// ---- VK_EXT_tooling_info extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pToolCount,
+ VkPhysicalDeviceToolPropertiesEXT* pToolProperties) {
+ const VkLayerInstanceDispatchTable *disp;
+ VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+ disp = loader_get_instance_layer_dispatch(physicalDevice);
+ return disp->GetPhysicalDeviceToolPropertiesEXT(unwrapped_phys_dev, pToolCount, pToolProperties);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceToolPropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pToolCount,
+ VkPhysicalDeviceToolPropertiesEXT* pToolProperties) {
+ return VK_SUCCESS;
+}
diff --git a/thirdparty/vulkan/loader/extension_manual.h b/thirdparty/vulkan/loader/extension_manual.h
index e07b9102dc..fe4287effb 100644
--- a/thirdparty/vulkan/loader/extension_manual.h
+++ b/thirdparty/vulkan/loader/extension_manual.h
@@ -104,3 +104,15 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDeviceGroupSurfacePresentModes2EXT(
VkDevice device,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
VkDeviceGroupPresentModeFlagsKHR* pModes);
+
+// ---- VK_EXT_tooling_info extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pToolCount,
+ VkPhysicalDeviceToolPropertiesEXT* pToolProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceToolPropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pToolCount,
+ VkPhysicalDeviceToolPropertiesEXT* pToolProperties);
diff --git a/thirdparty/vulkan/loader/gpa_helper.h b/thirdparty/vulkan/loader/gpa_helper.h
index e08898b6d8..832b68c3ef 100644
--- a/thirdparty/vulkan/loader/gpa_helper.h
+++ b/thirdparty/vulkan/loader/gpa_helper.h
@@ -1,8 +1,8 @@
/*
*
- * Copyright (c) 2015 The Khronos Group Inc.
- * Copyright (c) 2015 Valve Corporation
- * Copyright (c) 2015 LunarG, Inc.
+ * Copyright (c) 2015-18, 2020 The Khronos Group Inc.
+ * Copyright (c) 2015-18, 2020 Valve Corporation
+ * Copyright (c) 2015-18, 2020 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -190,6 +190,21 @@ static inline void *trampolineGetProcAddr(struct loader_instance *inst, const ch
if (!strcmp(funcName, "vkGetImageSparseMemoryRequirements2")) return vkGetImageSparseMemoryRequirements2;
if (!strcmp(funcName, "vkGetBufferMemoryRequirements2")) return vkGetBufferMemoryRequirements2;
+ // Core 1.2 functions
+ if (!strcmp(funcName, "vkCreateRenderPass2")) return vkCreateRenderPass2;
+ if (!strcmp(funcName, "vkCmdBeginRenderPass2")) return vkCmdBeginRenderPass2;
+ if (!strcmp(funcName, "vkCmdNextSubpass2")) return vkCmdNextSubpass2;
+ if (!strcmp(funcName, "vkCmdEndRenderPass2")) return vkCmdEndRenderPass2;
+ if (!strcmp(funcName, "vkCmdDrawIndirectCount")) return vkCmdDrawIndirectCount;
+ if (!strcmp(funcName, "vkCmdDrawIndexedIndirectCount")) return vkCmdDrawIndexedIndirectCount;
+ if (!strcmp(funcName, "vkGetSemaphoreCounterValue")) return vkGetSemaphoreCounterValue;
+ if (!strcmp(funcName, "vkWaitSemaphores")) return vkWaitSemaphores;
+ if (!strcmp(funcName, "vkSignalSemaphore")) return vkSignalSemaphore;
+ if (!strcmp(funcName, "vkGetBufferDeviceAddress")) return vkGetBufferDeviceAddress;
+ if (!strcmp(funcName, "vkGetBufferOpaqueCaptureAddress")) return vkGetBufferOpaqueCaptureAddress;
+ if (!strcmp(funcName, "vkGetDeviceMemoryOpaqueCaptureAddress")) return vkGetDeviceMemoryOpaqueCaptureAddress;
+ if (!strcmp(funcName, "vkResetQueryPool")) return vkResetQueryPool;
+
// Instance extensions
void *addr;
if (debug_utils_InstanceGpa(inst, funcName, &addr)) return addr;
diff --git a/thirdparty/vulkan/loader/loader.c b/thirdparty/vulkan/loader/loader.c
index 398c44bf9c..87d08d5116 100644
--- a/thirdparty/vulkan/loader/loader.c
+++ b/thirdparty/vulkan/loader/loader.c
@@ -1,8 +1,8 @@
/*
*
- * Copyright (c) 2014-2019 The Khronos Group Inc.
- * Copyright (c) 2014-2019 Valve Corporation
- * Copyright (c) 2014-2019 LunarG, Inc.
+ * Copyright (c) 2014-2020 The Khronos Group Inc.
+ * Copyright (c) 2014-2020 Valve Corporation
+ * Copyright (c) 2014-2020 LunarG, Inc.
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -126,7 +126,7 @@ LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_init);
// This loader supports Vulkan API version 1.1
uint32_t loader_major_version = 1;
-uint32_t loader_minor_version = 1;
+uint32_t loader_minor_version = 2;
void *loader_instance_heap_alloc(const struct loader_instance *instance, size_t size, VkSystemAllocationScope alloc_scope) {
void *pMemory = NULL;
@@ -252,6 +252,7 @@ static inline char *loader_getenv(const char *name, const struct loader_instance
}
static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
+ char *out;
#if defined(__APPLE__)
// Apple does not appear to have a secure getenv implementation.
// The main difference between secure getenv and getenv is that secure getenv
@@ -263,19 +264,21 @@ static inline char *loader_secure_getenv(const char *name, const struct loader_i
return IsHighIntegrity() ? NULL : loader_getenv(name, inst);
#else
// Linux
-#ifdef HAVE_SECURE_GETENV
+#if defined(HAVE_SECURE_GETENV) && !defined(USE_UNSAFE_FILE_SEARCH)
(void)inst;
- return secure_getenv(name);
-#elif defined(HAVE___SECURE_GETENV)
+ out = secure_getenv(name);
+#elif defined(HAVE___SECURE_GETENV) && !defined(USE_UNSAFE_FILE_SEARCH)
(void)inst;
- return __secure_getenv(name);
+ out = __secure_getenv(name);
#else
-#pragma message( \
- "Warning: Falling back to non-secure getenv for environmental lookups! Consider" \
- " updating to a different libc.")
- return loader_getenv(name, inst);
+ out = loader_getenv(name, inst);
#endif
#endif
+ if (out == NULL) {
+ loader_log(inst, LOADER_INFO_BIT, 0,
+ "Loader is running with elevated permissions. Environment variable %s will be ignored.", name);
+ }
+ return out;
}
static inline void loader_free_getenv(char *val, const struct loader_instance *inst) {
@@ -335,9 +338,13 @@ static inline char *loader_getenv(const char *name, const struct loader_instance
}
static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
+#if !defined(USE_UNSAFE_FILE_SEARCH)
if (IsHighIntegrity()) {
+ loader_log(inst, LOADER_INFO_BIT, 0,
+ "Loader is running with elevated permissions. Environment variable %s will be ignored.", name);
return NULL;
}
+#endif
return loader_getenv(name, inst);
}
@@ -578,7 +585,7 @@ static bool loaderAddJsonEntry(const struct loader_instance *inst,
//
// This function looks for filename in given device handle, filename is then added to return list
// function return true if filename was appended to reg_data list
-// If error occures result is updated with failure reason
+// If error occurs result is updated with failure reason
bool loaderGetDeviceRegistryEntry(const struct loader_instance *inst, char **reg_data, PDWORD total_size, DEVINST dev_id,
LPCSTR value_name, VkResult *result) {
HKEY hkrKey = INVALID_HANDLE_VALUE;
@@ -855,7 +862,6 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati
char name[2048];
char *loc = location;
char *next;
- DWORD idx;
DWORD name_size = sizeof(name);
DWORD value;
DWORD value_size = sizeof(value);
@@ -885,9 +891,9 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati
access_flags = KEY_QUERY_VALUE;
rtn_value = RegOpenKeyEx(hive, loc, 0, access_flags, &key);
if (ERROR_SUCCESS == rtn_value) {
- idx = 0;
- while ((rtn_value = RegEnumValue(key, idx++, name, &name_size, NULL, NULL, (LPBYTE)&value, &value_size)) ==
- ERROR_SUCCESS) {
+ for (DWORD idx = 0;
+ (rtn_value = RegEnumValue(key, idx++, name, &name_size, NULL, NULL, (LPBYTE)&value, &value_size)) == ERROR_SUCCESS;
+ name_size = sizeof(name), value_size = sizeof(value)) {
if (value_size == sizeof(value) && value == 0) {
if (NULL == *reg_data) {
*reg_data = loader_instance_heap_alloc(inst, *reg_data_size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
@@ -960,7 +966,7 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati
if (!found_gpu) {
loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
- "Dropping driver %s as no corresponduing DXGI adapter was found", name);
+ "Dropping driver %s as no corresponding DXGI adapter was found", name);
continue;
}
}
@@ -972,7 +978,7 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati
found = true;
} else {
// At this point the reg_data variable contains other JSON paths, likely from the PNP/device section
- // of the registry that we want to have precendence over this non-device specific section of the registry.
+ // of the registry that we want to have precedence over this non-device specific section of the registry.
// To make sure we avoid enumerating old JSON files/drivers that might be present in the non-device specific
// area of the registry when a newer device specific JSON file is present, do a check before adding.
// Find the file name, without path, of the JSON file found in the non-device specific registry location.
@@ -999,8 +1005,6 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati
}
}
}
- name_size = sizeof(name);
- value_size = sizeof(value);
}
RegCloseKey(key);
}
@@ -2045,7 +2049,7 @@ out:
return res;
}
-struct loader_icd_term *loader_get_icd_and_device(const VkDevice device, struct loader_device **found_dev, uint32_t *icd_index) {
+struct loader_icd_term *loader_get_icd_and_device(const void *device, struct loader_device **found_dev, uint32_t *icd_index) {
*found_dev = NULL;
for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) {
uint32_t index = 0;
@@ -2423,7 +2427,7 @@ static void loader_debug_init(void) {
}
void loader_initialize(void) {
- // initialize mutexs
+ // initialize mutexes
loader_platform_thread_create_mutex(&loader_lock);
loader_platform_thread_create_mutex(&loader_json_lock);
@@ -2450,7 +2454,7 @@ struct loader_data_files {
};
void loader_release() {
- // release mutexs
+ // release mutexes
loader_platform_thread_delete_mutex(&loader_lock);
loader_platform_thread_delete_mutex(&loader_json_lock);
}
@@ -2578,60 +2582,6 @@ out:
return res;
}
-const char *std_validation_str = "VK_LAYER_LUNARG_standard_validation";
-
-// Adds the legacy VK_LAYER_LUNARG_standard_validation as a meta-layer if it
-// fails to find it in the list already. This is usually an indication that a
-// newer loader is being used with an older layer set.
-static bool loaderAddLegacyStandardValidationLayer(const struct loader_instance *inst,
- struct loader_layer_list *layer_instance_list) {
- uint32_t i;
- bool success = true;
- struct loader_layer_properties *props = loaderGetNextLayerPropertySlot(inst, layer_instance_list);
- const char std_validation_names[6][VK_MAX_EXTENSION_NAME_SIZE] = {
- "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker",
- "VK_LAYER_LUNARG_core_validation", "VK_LAYER_GOOGLE_unique_objects"};
- uint32_t layer_count = sizeof(std_validation_names) / sizeof(std_validation_names[0]);
-
- loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
- "Adding VK_LAYER_LUNARG_standard_validation using the loader legacy path. This is"
- " not an error.");
-
- if (NULL == props) {
- goto out;
- }
-
- memset(props, 0, sizeof(struct loader_layer_properties));
- props->type_flags = VK_LAYER_TYPE_FLAG_INSTANCE_LAYER | VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER | VK_LAYER_TYPE_FLAG_META_LAYER;
- strncpy(props->info.description, "LunarG Standard Validation Layer", sizeof(props->info.description));
- props->info.implementationVersion = 1;
- strncpy(props->info.layerName, std_validation_str, sizeof(props->info.layerName));
- props->info.specVersion = VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION);
-
- props->component_layer_names =
- loader_instance_heap_alloc(inst, sizeof(char[MAX_STRING_SIZE]) * layer_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
- if (NULL == props->component_layer_names) {
- loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
- "Failed to allocate space for legacy VK_LAYER_LUNARG_standard_validation"
- " meta-layer component_layers information.");
- success = false;
- goto out;
- }
- for (i = 0; i < layer_count; i++) {
- strncpy(props->component_layer_names[i], std_validation_names[i], MAX_STRING_SIZE - 1);
- props->component_layer_names[i][MAX_STRING_SIZE - 1] = '\0';
- }
-
-out:
-
- if (!success && NULL != props && NULL != props->component_layer_names) {
- loader_instance_heap_free(inst, props->component_layer_names);
- props->component_layer_names = NULL;
- }
-
- return success;
-}
-
// Verify that all component layers in a meta-layer are valid.
static bool verifyMetaLayerComponentLayers(const struct loader_instance *inst, struct loader_layer_properties *prop,
struct loader_layer_list *instance_layers) {
@@ -3201,7 +3151,7 @@ static VkResult loaderReadLayerJson(const struct loader_instance *inst, struct l
if (version.major > 1 || version.minor >= 1) {
loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
"Layer \"%s\" using deprecated \'vkGetInstanceProcAddr\' tag which was deprecated starting with JSON "
- "file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for "
+ "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
"compatibility reasons it may be desirable to continue using the deprecated tag.",
name);
}
@@ -3212,7 +3162,7 @@ static VkResult loaderReadLayerJson(const struct loader_instance *inst, struct l
if (version.major > 1 || version.minor >= 1) {
loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
"Layer \"%s\" using deprecated \'vkGetDeviceProcAddr\' tag which was deprecated starting with JSON "
- "file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for "
+ "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
"compatibility reasons it may be desirable to continue using the deprecated tag.",
name);
}
@@ -3949,7 +3899,7 @@ out:
}
#ifdef _WIN32
-// Read manifest JSON files uing the Windows driver interface
+// Read manifest JSON files using the Windows driver interface
static VkResult ReadManifestsFromD3DAdapters(const struct loader_instance *inst, char **reg_data, PDWORD reg_data_size,
const wchar_t *value_name) {
VkResult result = VK_INCOMPLETE;
@@ -3994,7 +3944,7 @@ static VkResult ReadManifestsFromD3DAdapters(const struct loader_instance *inst,
.value_type = REG_MULTI_SZ,
.physical_adapter_index = 0,
};
- wcsncpy(filename_info.value_name, value_name, sizeof(filename_info.value_name) / sizeof(DWORD));
+ wcsncpy(filename_info.value_name, value_name, sizeof(filename_info.value_name) / sizeof(WCHAR));
LoaderQueryAdapterInfo query_info = {
.handle = adapters.adapters[i].handle,
.type = LOADER_QUERY_TYPE_REGISTRY,
@@ -4603,23 +4553,6 @@ void loaderScanForLayers(struct loader_instance *inst, struct loader_layer_list
}
}
- // See if "VK_LAYER_LUNARG_standard_validation" already in list.
- bool found_std_val = false;
- for (uint32_t i = 0; i < instance_layers->count; i++) {
- struct loader_layer_properties *props = &instance_layers->list[i];
- if (strcmp(props->info.layerName, std_validation_str) == 0) {
- found_std_val = true;
- break;
- }
- }
-
- // If we didn't find the VK_LAYER_LUNARG_standard_validation meta-layer in
- // the list, then we need to add it manually. This is likely because we're
- // dealing with a new loader, but an old layer folder.
- if (!found_std_val && !loaderAddLegacyStandardValidationLayer(inst, instance_layers)) {
- goto out;
- }
-
// Verify any meta-layers in the list are valid and all the component layers are
// actually present in the available layer list
VerifyAllMetaLayers(inst, instance_layers, &override_layer_valid);
@@ -4853,6 +4786,32 @@ static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpa_instance_internal(VkI
return (PFN_vkVoidFunction)terminator_CreateDevice;
}
+ // The VK_EXT_debug_utils functions need a special case here so the terminators can still be found from vkGetInstanceProcAddr
+ if (!strcmp(pName, "vkSetDebugUtilsObjectNameEXT")) {
+ return (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT;
+ }
+ if (!strcmp(pName, "vkSetDebugUtilsObjectTagEXT")) {
+ return (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT;
+ }
+ if (!strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT;
+ }
+ if (!strcmp(pName, "vkQueueEndDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT;
+ }
+ if (!strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT;
+ }
+ if (!strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT;
+ }
+ if (!strcmp(pName, "vkCmdEndDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT;
+ }
+ if (!strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT")) {
+ return (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT;
+ }
+
// inst is not wrapped
if (inst == VK_NULL_HANDLE) {
return NULL;
@@ -5510,8 +5469,6 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_layer_create_device(VkInstance instance, V
struct loader_device *dev = NULL;
struct loader_instance *inst = NULL;
- assert(pCreateInfo->queueCreateInfoCount >= 1);
-
if (instance != NULL) {
inst = loader_get_instance(instance);
internal_device = physicalDevice;
@@ -6187,7 +6144,7 @@ VkResult loader_validate_device_extensions(struct loader_instance *this_instance
}
// Terminator functions for the Instance chain
-// All named terminator_<Vulakn API name>
+// All named terminator_<Vulkan API name>
VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) {
struct loader_icd_term *icd_term;
@@ -7204,6 +7161,10 @@ VkStringErrorFlags vk_string_validate(const int max_length, const char *utf8) {
int num_char_bytes = 0;
int i, j;
+ if (utf8 == NULL) {
+ return VK_STRING_ERROR_NULL_PTR;
+ }
+
for (i = 0; i <= max_length; i++) {
if (utf8[i] == 0) {
break;
@@ -7369,7 +7330,7 @@ out:
return result;
}
-#if defined(_WIN32) && defined(LOADER_DYNAMIC_LIB)
+#if defined(_WIN32)
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
switch (reason) {
case DLL_PROCESS_ATTACH:
diff --git a/thirdparty/vulkan/loader/loader.h b/thirdparty/vulkan/loader/loader.h
index 8d6b4c454a..5e9495521b 100644
--- a/thirdparty/vulkan/loader/loader.h
+++ b/thirdparty/vulkan/loader/loader.h
@@ -67,6 +67,7 @@ typedef enum VkStringErrorFlagBits {
VK_STRING_ERROR_NONE = 0x00000000,
VK_STRING_ERROR_LENGTH = 0x00000001,
VK_STRING_ERROR_BAD_DATA = 0x00000002,
+ VK_STRING_ERROR_NULL_PTR = 0x00000004,
} VkStringErrorFlagBits;
typedef VkFlags VkStringErrorFlags;
@@ -419,9 +420,6 @@ static inline void loader_init_dispatch(void *obj, const void *data) {
// Global variables used across files
extern struct loader_struct loader;
extern THREAD_LOCAL_DECL struct loader_instance *tls_instance;
-#if defined(_WIN32) && !defined(LOADER_DYNAMIC_LIB)
-extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_init);
-#endif
extern loader_platform_thread_mutex loader_lock;
extern loader_platform_thread_mutex loader_json_lock;
@@ -480,7 +478,7 @@ void loaderScanForImplicitLayers(struct loader_instance *inst, struct loader_lay
bool loaderImplicitLayerIsEnabled(const struct loader_instance *inst, const struct loader_layer_properties *prop);
VkResult loader_get_icd_loader_instance_extensions(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
struct loader_extension_list *inst_exts);
-struct loader_icd_term *loader_get_icd_and_device(const VkDevice device, struct loader_device **found_dev, uint32_t *icd_index);
+struct loader_icd_term *loader_get_icd_and_device(const void *device, struct loader_device **found_dev, uint32_t *icd_index);
void loader_init_dispatch_dev_ext(struct loader_instance *inst, struct loader_device *dev);
void *loader_dev_ext_gpa(struct loader_instance *inst, const char *funcName);
void *loader_get_dev_ext_trampoline(uint32_t index);
diff --git a/thirdparty/vulkan/loader/trampoline.c b/thirdparty/vulkan/loader/trampoline.c
index 52eea968e8..a6a37f0fce 100644
--- a/thirdparty/vulkan/loader/trampoline.c
+++ b/thirdparty/vulkan/loader/trampoline.c
@@ -135,6 +135,12 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionPropert
}
loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name);
+ if (layer_lib == NULL) {
+ loader_log(NULL, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, "%s: Unable to load implicit layer library \"%s\"", __FUNCTION__,
+ layers.list[i].lib_name);
+ continue;
+ }
+
libs[lib_count++] = layer_lib;
void *pfn = loader_platform_get_proc_address(layer_lib,
layers.list[i].pre_instance_functions.enumerate_instance_extension_properties);
@@ -223,6 +229,12 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(
}
loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name);
+ if (layer_lib == NULL) {
+ loader_log(NULL, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, "%s: Unable to load implicit layer library \"%s\"", __FUNCTION__,
+ layers.list[i].lib_name);
+ continue;
+ }
+
libs[lib_count++] = layer_lib;
void *pfn =
loader_platform_get_proc_address(layer_lib, layers.list[i].pre_instance_functions.enumerate_instance_layer_properties);
@@ -311,6 +323,12 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(uint32_t
}
loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name);
+ if (layer_lib == NULL) {
+ loader_log(NULL, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, "%s: Unable to load implicit layer library \"%s\"", __FUNCTION__,
+ layers.list[i].lib_name);
+ continue;
+ }
+
libs[lib_count++] = layer_lib;
void *pfn = loader_platform_get_proc_address(layer_lib,
layers.list[i].pre_instance_functions.enumerate_instance_version);
@@ -2478,3 +2496,98 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(VkDev
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
disp->UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData);
}
+
+// ---- Vulkan core 1.2 trampolines
+
+LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2(VkCommandBuffer commandBuffer,
+ const VkRenderPassBeginInfo* pRenderPassBegin,
+ const VkSubpassBeginInfo* pSubpassBeginInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+ disp->CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2(VkCommandBuffer commandBuffer,
+ const VkSubpassBeginInfo* pSubpassBeginInfo,
+ const VkSubpassEndInfo* pSubpassEndInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+ disp->CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+ disp->CmdEndRenderPass2(commandBuffer, pSubpassEndInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
+ VkBuffer countBuffer, VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount, uint32_t stride)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+ disp->CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer,
+ VkDeviceSize offset, VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
+ uint32_t stride)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+ disp->CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+}
+
+LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetSemaphoreCounterValue(device, semaphore, pValue);
+}
+
+LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo,
+ uint64_t timeout)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->WaitSemaphores(device, pWaitInfo, timeout);
+}
+
+LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->SignalSemaphore(device, pSignalInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddress(VkDevice device,
+ const VkBufferDeviceAddressInfo* pInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetBufferDeviceAddress(device, pInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddress(VkDevice device,
+ const VkBufferDeviceAddressInfo* pInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetBufferOpaqueCaptureAddress(device, pInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddress(VkDevice device,
+ const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetDeviceMemoryOpaqueCaptureAddress(device, pInfo);
+}
+
+LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery,
+ uint32_t queryCount)
+{
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ disp->ResetQueryPool(device, queryPool, firstQuery, queryCount);
+}
diff --git a/thirdparty/vulkan/loader/unknown_ext_chain_gas.S b/thirdparty/vulkan/loader/unknown_ext_chain_gas.S
deleted file mode 100644
index f847e1407d..0000000000
--- a/thirdparty/vulkan/loader/unknown_ext_chain_gas.S
+++ /dev/null
@@ -1,885 +0,0 @@
-#
-# Copyright (c) 2017 The Khronos Group Inc.
-# Copyright (c) 2017 Valve Corporation
-# Copyright (c) 2017 LunarG, 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.
-#
-# Author: Lenny Komow <lenny@lunarg.com>
-#
-
-# This code is used to pass on device (including physical device) extensions through the call chain. It must do this without
-# creating a stack frame, because the actual parameters of the call are not known. Since the first parameter is known to be a
-# VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then
-# jump to the next function in the call chain
-
-#ifdef HAVE_CET_H
-#include <cet.h>
-#else
-#define _CET_ENDBR
-#endif
-
-.intel_syntax noprefix
-.include "gen_defines.asm"
-
-.ifdef X86_64
-
-.macro PhysDevExtTramp num
-.global vkPhysDevExtTramp\num
-vkPhysDevExtTramp\num:
- _CET_ENDBR
- mov rax, [rdi]
- mov rdi, [rdi + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP]
- jmp [rax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * \num))]
-.endm
-
-.macro PhysDevExtTermin num
-.global vkPhysDevExtTermin\num
-vkPhysDevExtTermin\num:
- _CET_ENDBR
- mov rax, [rdi + ICD_TERM_OFFSET_PHYS_DEV_TERM] # Store the loader_icd_term* in rax
- cmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))], 0 # Check if the next function in the chain is NULL
- je terminError\num # Go to the error section if it is NULL
- mov rdi, [rdi + PHYS_DEV_OFFSET_PHYS_DEV_TERM] # Load the unwrapped VkPhysicalDevice into the first arg
- jmp [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))] # Jump to the next function in the chain
-terminError\num:
- sub rsp, 56 # Create the stack frame
- mov rdi, [rax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into rdi (first arg)
- mov r8, [rdi + (HASH_OFFSET_INSTANCE + (HASH_SIZE * \num) + FUNC_NAME_OFFSET_HASH)] # Load the func name into r8 (fifth arg)
- lea rcx, termin_error_string@GOTPCREL # Load the error string into rcx (fourth arg)
- xor edx, edx # Set rdx to zero (third arg)
- lea esi, [rdx + VK_DEBUG_REPORT_ERROR_BIT_EXT] # Write the error logging bit to rsi (second arg)
- call loader_log # Log the error message before we crash
- add rsp, 56 # Clean up the stack frame
- mov rax, 0
- jmp rax # Crash intentionally by jumping to address zero
-.endm
-
-.macro DevExtTramp num
-.global vkdev_ext\num
-vkdev_ext\num:
- _CET_ENDBR
- mov rax, [rdi] # Dereference the handle to get the dispatch table
- jmp [rax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain
-.endm
-
-.else
-
-.macro PhysDevExtTramp num
-.global vkPhysDevExtTramp\num
-vkPhysDevExtTramp\num:
- _CET_ENDBR
- mov eax, [esp + 4] # Load the wrapped VkPhysicalDevice into eax
- mov ecx, [eax + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] # Load the unwrapped VkPhysicalDevice into ecx
- mov [esp + 4], ecx # Overwrite the wrapped VkPhysicalDevice with the unwrapped one (on the stack)
- mov eax, [eax] # Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax
- jmp [eax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * \num))] # Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax
-.endm
-
-.macro PhysDevExtTermin num
-.global vkPhysDevExtTermin\num
-vkPhysDevExtTermin\num:
- _CET_ENDBR
- mov ecx, [esp + 4] # Move the wrapped VkPhysicalDevice into ecx
- mov eax, [ecx + ICD_TERM_OFFSET_PHYS_DEV_TERM] # Store the loader_icd_term* in eax
- cmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))], 0 # Check if the next function in the chain is NULL
- je terminError\num # Go to the error section if it is NULL
- mov ecx, [ecx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] # Unwrap the VkPhysicalDevice in ecx
- mov [esp + 4], ecx # Copy the unwrapped VkPhysicalDevice into the first arg
- jmp [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))] # Jump to the next function in the chain
-terminError\num:
- mov eax, [eax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into eax
- push [eax + (HASH_OFFSET_INSTANCE + (HASH_SIZE * \num) + FUNC_NAME_OFFSET_HASH)] # Push the func name (fifth arg)
- push offset termin_error_string@GOT # Push the error string (fourth arg)
- push 0 # Push zero (third arg)
- push VK_DEBUG_REPORT_ERROR_BIT_EXT # Push the error logging bit (second arg)
- push eax # Push the loader_instance (first arg)
- call loader_log # Log the error message before we crash
- add esp, 20 # Clean up the args
- mov eax, 0
- jmp eax # Crash intentionally by jumping to address zero
-.endm
-
-.macro DevExtTramp num
-.global vkdev_ext\num
-vkdev_ext\num:
- _CET_ENDBR
- mov eax, [esp + 4] # Dereference the handle to get the dispatch table
- jmp [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain
-.endm
-
-.endif
-
-#if defined(__ELF__)
-.section .note.GNU-stack,"",%progbits
-#endif
-
-.data
-
-termin_error_string:
-.string "Extension %s not supported for this physical device"
-
-.text
-
- PhysDevExtTramp 0
- PhysDevExtTramp 1
- PhysDevExtTramp 2
- PhysDevExtTramp 3
- PhysDevExtTramp 4
- PhysDevExtTramp 5
- PhysDevExtTramp 6
- PhysDevExtTramp 7
- PhysDevExtTramp 8
- PhysDevExtTramp 9
- PhysDevExtTramp 10
- PhysDevExtTramp 11
- PhysDevExtTramp 12
- PhysDevExtTramp 13
- PhysDevExtTramp 14
- PhysDevExtTramp 15
- PhysDevExtTramp 16
- PhysDevExtTramp 17
- PhysDevExtTramp 18
- PhysDevExtTramp 19
- PhysDevExtTramp 20
- PhysDevExtTramp 21
- PhysDevExtTramp 22
- PhysDevExtTramp 23
- PhysDevExtTramp 24
- PhysDevExtTramp 25
- PhysDevExtTramp 26
- PhysDevExtTramp 27
- PhysDevExtTramp 28
- PhysDevExtTramp 29
- PhysDevExtTramp 30
- PhysDevExtTramp 31
- PhysDevExtTramp 32
- PhysDevExtTramp 33
- PhysDevExtTramp 34
- PhysDevExtTramp 35
- PhysDevExtTramp 36
- PhysDevExtTramp 37
- PhysDevExtTramp 38
- PhysDevExtTramp 39
- PhysDevExtTramp 40
- PhysDevExtTramp 41
- PhysDevExtTramp 42
- PhysDevExtTramp 43
- PhysDevExtTramp 44
- PhysDevExtTramp 45
- PhysDevExtTramp 46
- PhysDevExtTramp 47
- PhysDevExtTramp 48
- PhysDevExtTramp 49
- PhysDevExtTramp 50
- PhysDevExtTramp 51
- PhysDevExtTramp 52
- PhysDevExtTramp 53
- PhysDevExtTramp 54
- PhysDevExtTramp 55
- PhysDevExtTramp 56
- PhysDevExtTramp 57
- PhysDevExtTramp 58
- PhysDevExtTramp 59
- PhysDevExtTramp 60
- PhysDevExtTramp 61
- PhysDevExtTramp 62
- PhysDevExtTramp 63
- PhysDevExtTramp 64
- PhysDevExtTramp 65
- PhysDevExtTramp 66
- PhysDevExtTramp 67
- PhysDevExtTramp 68
- PhysDevExtTramp 69
- PhysDevExtTramp 70
- PhysDevExtTramp 71
- PhysDevExtTramp 72
- PhysDevExtTramp 73
- PhysDevExtTramp 74
- PhysDevExtTramp 75
- PhysDevExtTramp 76
- PhysDevExtTramp 77
- PhysDevExtTramp 78
- PhysDevExtTramp 79
- PhysDevExtTramp 80
- PhysDevExtTramp 81
- PhysDevExtTramp 82
- PhysDevExtTramp 83
- PhysDevExtTramp 84
- PhysDevExtTramp 85
- PhysDevExtTramp 86
- PhysDevExtTramp 87
- PhysDevExtTramp 88
- PhysDevExtTramp 89
- PhysDevExtTramp 90
- PhysDevExtTramp 91
- PhysDevExtTramp 92
- PhysDevExtTramp 93
- PhysDevExtTramp 94
- PhysDevExtTramp 95
- PhysDevExtTramp 96
- PhysDevExtTramp 97
- PhysDevExtTramp 98
- PhysDevExtTramp 99
- PhysDevExtTramp 100
- PhysDevExtTramp 101
- PhysDevExtTramp 102
- PhysDevExtTramp 103
- PhysDevExtTramp 104
- PhysDevExtTramp 105
- PhysDevExtTramp 106
- PhysDevExtTramp 107
- PhysDevExtTramp 108
- PhysDevExtTramp 109
- PhysDevExtTramp 110
- PhysDevExtTramp 111
- PhysDevExtTramp 112
- PhysDevExtTramp 113
- PhysDevExtTramp 114
- PhysDevExtTramp 115
- PhysDevExtTramp 116
- PhysDevExtTramp 117
- PhysDevExtTramp 118
- PhysDevExtTramp 119
- PhysDevExtTramp 120
- PhysDevExtTramp 121
- PhysDevExtTramp 122
- PhysDevExtTramp 123
- PhysDevExtTramp 124
- PhysDevExtTramp 125
- PhysDevExtTramp 126
- PhysDevExtTramp 127
- PhysDevExtTramp 128
- PhysDevExtTramp 129
- PhysDevExtTramp 130
- PhysDevExtTramp 131
- PhysDevExtTramp 132
- PhysDevExtTramp 133
- PhysDevExtTramp 134
- PhysDevExtTramp 135
- PhysDevExtTramp 136
- PhysDevExtTramp 137
- PhysDevExtTramp 138
- PhysDevExtTramp 139
- PhysDevExtTramp 140
- PhysDevExtTramp 141
- PhysDevExtTramp 142
- PhysDevExtTramp 143
- PhysDevExtTramp 144
- PhysDevExtTramp 145
- PhysDevExtTramp 146
- PhysDevExtTramp 147
- PhysDevExtTramp 148
- PhysDevExtTramp 149
- PhysDevExtTramp 150
- PhysDevExtTramp 151
- PhysDevExtTramp 152
- PhysDevExtTramp 153
- PhysDevExtTramp 154
- PhysDevExtTramp 155
- PhysDevExtTramp 156
- PhysDevExtTramp 157
- PhysDevExtTramp 158
- PhysDevExtTramp 159
- PhysDevExtTramp 160
- PhysDevExtTramp 161
- PhysDevExtTramp 162
- PhysDevExtTramp 163
- PhysDevExtTramp 164
- PhysDevExtTramp 165
- PhysDevExtTramp 166
- PhysDevExtTramp 167
- PhysDevExtTramp 168
- PhysDevExtTramp 169
- PhysDevExtTramp 170
- PhysDevExtTramp 171
- PhysDevExtTramp 172
- PhysDevExtTramp 173
- PhysDevExtTramp 174
- PhysDevExtTramp 175
- PhysDevExtTramp 176
- PhysDevExtTramp 177
- PhysDevExtTramp 178
- PhysDevExtTramp 179
- PhysDevExtTramp 180
- PhysDevExtTramp 181
- PhysDevExtTramp 182
- PhysDevExtTramp 183
- PhysDevExtTramp 184
- PhysDevExtTramp 185
- PhysDevExtTramp 186
- PhysDevExtTramp 187
- PhysDevExtTramp 188
- PhysDevExtTramp 189
- PhysDevExtTramp 190
- PhysDevExtTramp 191
- PhysDevExtTramp 192
- PhysDevExtTramp 193
- PhysDevExtTramp 194
- PhysDevExtTramp 195
- PhysDevExtTramp 196
- PhysDevExtTramp 197
- PhysDevExtTramp 198
- PhysDevExtTramp 199
- PhysDevExtTramp 200
- PhysDevExtTramp 201
- PhysDevExtTramp 202
- PhysDevExtTramp 203
- PhysDevExtTramp 204
- PhysDevExtTramp 205
- PhysDevExtTramp 206
- PhysDevExtTramp 207
- PhysDevExtTramp 208
- PhysDevExtTramp 209
- PhysDevExtTramp 210
- PhysDevExtTramp 211
- PhysDevExtTramp 212
- PhysDevExtTramp 213
- PhysDevExtTramp 214
- PhysDevExtTramp 215
- PhysDevExtTramp 216
- PhysDevExtTramp 217
- PhysDevExtTramp 218
- PhysDevExtTramp 219
- PhysDevExtTramp 220
- PhysDevExtTramp 221
- PhysDevExtTramp 222
- PhysDevExtTramp 223
- PhysDevExtTramp 224
- PhysDevExtTramp 225
- PhysDevExtTramp 226
- PhysDevExtTramp 227
- PhysDevExtTramp 228
- PhysDevExtTramp 229
- PhysDevExtTramp 230
- PhysDevExtTramp 231
- PhysDevExtTramp 232
- PhysDevExtTramp 233
- PhysDevExtTramp 234
- PhysDevExtTramp 235
- PhysDevExtTramp 236
- PhysDevExtTramp 237
- PhysDevExtTramp 238
- PhysDevExtTramp 239
- PhysDevExtTramp 240
- PhysDevExtTramp 241
- PhysDevExtTramp 242
- PhysDevExtTramp 243
- PhysDevExtTramp 244
- PhysDevExtTramp 245
- PhysDevExtTramp 246
- PhysDevExtTramp 247
- PhysDevExtTramp 248
- PhysDevExtTramp 249
-
- PhysDevExtTermin 0
- PhysDevExtTermin 1
- PhysDevExtTermin 2
- PhysDevExtTermin 3
- PhysDevExtTermin 4
- PhysDevExtTermin 5
- PhysDevExtTermin 6
- PhysDevExtTermin 7
- PhysDevExtTermin 8
- PhysDevExtTermin 9
- PhysDevExtTermin 10
- PhysDevExtTermin 11
- PhysDevExtTermin 12
- PhysDevExtTermin 13
- PhysDevExtTermin 14
- PhysDevExtTermin 15
- PhysDevExtTermin 16
- PhysDevExtTermin 17
- PhysDevExtTermin 18
- PhysDevExtTermin 19
- PhysDevExtTermin 20
- PhysDevExtTermin 21
- PhysDevExtTermin 22
- PhysDevExtTermin 23
- PhysDevExtTermin 24
- PhysDevExtTermin 25
- PhysDevExtTermin 26
- PhysDevExtTermin 27
- PhysDevExtTermin 28
- PhysDevExtTermin 29
- PhysDevExtTermin 30
- PhysDevExtTermin 31
- PhysDevExtTermin 32
- PhysDevExtTermin 33
- PhysDevExtTermin 34
- PhysDevExtTermin 35
- PhysDevExtTermin 36
- PhysDevExtTermin 37
- PhysDevExtTermin 38
- PhysDevExtTermin 39
- PhysDevExtTermin 40
- PhysDevExtTermin 41
- PhysDevExtTermin 42
- PhysDevExtTermin 43
- PhysDevExtTermin 44
- PhysDevExtTermin 45
- PhysDevExtTermin 46
- PhysDevExtTermin 47
- PhysDevExtTermin 48
- PhysDevExtTermin 49
- PhysDevExtTermin 50
- PhysDevExtTermin 51
- PhysDevExtTermin 52
- PhysDevExtTermin 53
- PhysDevExtTermin 54
- PhysDevExtTermin 55
- PhysDevExtTermin 56
- PhysDevExtTermin 57
- PhysDevExtTermin 58
- PhysDevExtTermin 59
- PhysDevExtTermin 60
- PhysDevExtTermin 61
- PhysDevExtTermin 62
- PhysDevExtTermin 63
- PhysDevExtTermin 64
- PhysDevExtTermin 65
- PhysDevExtTermin 66
- PhysDevExtTermin 67
- PhysDevExtTermin 68
- PhysDevExtTermin 69
- PhysDevExtTermin 70
- PhysDevExtTermin 71
- PhysDevExtTermin 72
- PhysDevExtTermin 73
- PhysDevExtTermin 74
- PhysDevExtTermin 75
- PhysDevExtTermin 76
- PhysDevExtTermin 77
- PhysDevExtTermin 78
- PhysDevExtTermin 79
- PhysDevExtTermin 80
- PhysDevExtTermin 81
- PhysDevExtTermin 82
- PhysDevExtTermin 83
- PhysDevExtTermin 84
- PhysDevExtTermin 85
- PhysDevExtTermin 86
- PhysDevExtTermin 87
- PhysDevExtTermin 88
- PhysDevExtTermin 89
- PhysDevExtTermin 90
- PhysDevExtTermin 91
- PhysDevExtTermin 92
- PhysDevExtTermin 93
- PhysDevExtTermin 94
- PhysDevExtTermin 95
- PhysDevExtTermin 96
- PhysDevExtTermin 97
- PhysDevExtTermin 98
- PhysDevExtTermin 99
- PhysDevExtTermin 100
- PhysDevExtTermin 101
- PhysDevExtTermin 102
- PhysDevExtTermin 103
- PhysDevExtTermin 104
- PhysDevExtTermin 105
- PhysDevExtTermin 106
- PhysDevExtTermin 107
- PhysDevExtTermin 108
- PhysDevExtTermin 109
- PhysDevExtTermin 110
- PhysDevExtTermin 111
- PhysDevExtTermin 112
- PhysDevExtTermin 113
- PhysDevExtTermin 114
- PhysDevExtTermin 115
- PhysDevExtTermin 116
- PhysDevExtTermin 117
- PhysDevExtTermin 118
- PhysDevExtTermin 119
- PhysDevExtTermin 120
- PhysDevExtTermin 121
- PhysDevExtTermin 122
- PhysDevExtTermin 123
- PhysDevExtTermin 124
- PhysDevExtTermin 125
- PhysDevExtTermin 126
- PhysDevExtTermin 127
- PhysDevExtTermin 128
- PhysDevExtTermin 129
- PhysDevExtTermin 130
- PhysDevExtTermin 131
- PhysDevExtTermin 132
- PhysDevExtTermin 133
- PhysDevExtTermin 134
- PhysDevExtTermin 135
- PhysDevExtTermin 136
- PhysDevExtTermin 137
- PhysDevExtTermin 138
- PhysDevExtTermin 139
- PhysDevExtTermin 140
- PhysDevExtTermin 141
- PhysDevExtTermin 142
- PhysDevExtTermin 143
- PhysDevExtTermin 144
- PhysDevExtTermin 145
- PhysDevExtTermin 146
- PhysDevExtTermin 147
- PhysDevExtTermin 148
- PhysDevExtTermin 149
- PhysDevExtTermin 150
- PhysDevExtTermin 151
- PhysDevExtTermin 152
- PhysDevExtTermin 153
- PhysDevExtTermin 154
- PhysDevExtTermin 155
- PhysDevExtTermin 156
- PhysDevExtTermin 157
- PhysDevExtTermin 158
- PhysDevExtTermin 159
- PhysDevExtTermin 160
- PhysDevExtTermin 161
- PhysDevExtTermin 162
- PhysDevExtTermin 163
- PhysDevExtTermin 164
- PhysDevExtTermin 165
- PhysDevExtTermin 166
- PhysDevExtTermin 167
- PhysDevExtTermin 168
- PhysDevExtTermin 169
- PhysDevExtTermin 170
- PhysDevExtTermin 171
- PhysDevExtTermin 172
- PhysDevExtTermin 173
- PhysDevExtTermin 174
- PhysDevExtTermin 175
- PhysDevExtTermin 176
- PhysDevExtTermin 177
- PhysDevExtTermin 178
- PhysDevExtTermin 179
- PhysDevExtTermin 180
- PhysDevExtTermin 181
- PhysDevExtTermin 182
- PhysDevExtTermin 183
- PhysDevExtTermin 184
- PhysDevExtTermin 185
- PhysDevExtTermin 186
- PhysDevExtTermin 187
- PhysDevExtTermin 188
- PhysDevExtTermin 189
- PhysDevExtTermin 190
- PhysDevExtTermin 191
- PhysDevExtTermin 192
- PhysDevExtTermin 193
- PhysDevExtTermin 194
- PhysDevExtTermin 195
- PhysDevExtTermin 196
- PhysDevExtTermin 197
- PhysDevExtTermin 198
- PhysDevExtTermin 199
- PhysDevExtTermin 200
- PhysDevExtTermin 201
- PhysDevExtTermin 202
- PhysDevExtTermin 203
- PhysDevExtTermin 204
- PhysDevExtTermin 205
- PhysDevExtTermin 206
- PhysDevExtTermin 207
- PhysDevExtTermin 208
- PhysDevExtTermin 209
- PhysDevExtTermin 210
- PhysDevExtTermin 211
- PhysDevExtTermin 212
- PhysDevExtTermin 213
- PhysDevExtTermin 214
- PhysDevExtTermin 215
- PhysDevExtTermin 216
- PhysDevExtTermin 217
- PhysDevExtTermin 218
- PhysDevExtTermin 219
- PhysDevExtTermin 220
- PhysDevExtTermin 221
- PhysDevExtTermin 222
- PhysDevExtTermin 223
- PhysDevExtTermin 224
- PhysDevExtTermin 225
- PhysDevExtTermin 226
- PhysDevExtTermin 227
- PhysDevExtTermin 228
- PhysDevExtTermin 229
- PhysDevExtTermin 230
- PhysDevExtTermin 231
- PhysDevExtTermin 232
- PhysDevExtTermin 233
- PhysDevExtTermin 234
- PhysDevExtTermin 235
- PhysDevExtTermin 236
- PhysDevExtTermin 237
- PhysDevExtTermin 238
- PhysDevExtTermin 239
- PhysDevExtTermin 240
- PhysDevExtTermin 241
- PhysDevExtTermin 242
- PhysDevExtTermin 243
- PhysDevExtTermin 244
- PhysDevExtTermin 245
- PhysDevExtTermin 246
- PhysDevExtTermin 247
- PhysDevExtTermin 248
- PhysDevExtTermin 249
-
- DevExtTramp 0
- DevExtTramp 1
- DevExtTramp 2
- DevExtTramp 3
- DevExtTramp 4
- DevExtTramp 5
- DevExtTramp 6
- DevExtTramp 7
- DevExtTramp 8
- DevExtTramp 9
- DevExtTramp 10
- DevExtTramp 11
- DevExtTramp 12
- DevExtTramp 13
- DevExtTramp 14
- DevExtTramp 15
- DevExtTramp 16
- DevExtTramp 17
- DevExtTramp 18
- DevExtTramp 19
- DevExtTramp 20
- DevExtTramp 21
- DevExtTramp 22
- DevExtTramp 23
- DevExtTramp 24
- DevExtTramp 25
- DevExtTramp 26
- DevExtTramp 27
- DevExtTramp 28
- DevExtTramp 29
- DevExtTramp 30
- DevExtTramp 31
- DevExtTramp 32
- DevExtTramp 33
- DevExtTramp 34
- DevExtTramp 35
- DevExtTramp 36
- DevExtTramp 37
- DevExtTramp 38
- DevExtTramp 39
- DevExtTramp 40
- DevExtTramp 41
- DevExtTramp 42
- DevExtTramp 43
- DevExtTramp 44
- DevExtTramp 45
- DevExtTramp 46
- DevExtTramp 47
- DevExtTramp 48
- DevExtTramp 49
- DevExtTramp 50
- DevExtTramp 51
- DevExtTramp 52
- DevExtTramp 53
- DevExtTramp 54
- DevExtTramp 55
- DevExtTramp 56
- DevExtTramp 57
- DevExtTramp 58
- DevExtTramp 59
- DevExtTramp 60
- DevExtTramp 61
- DevExtTramp 62
- DevExtTramp 63
- DevExtTramp 64
- DevExtTramp 65
- DevExtTramp 66
- DevExtTramp 67
- DevExtTramp 68
- DevExtTramp 69
- DevExtTramp 70
- DevExtTramp 71
- DevExtTramp 72
- DevExtTramp 73
- DevExtTramp 74
- DevExtTramp 75
- DevExtTramp 76
- DevExtTramp 77
- DevExtTramp 78
- DevExtTramp 79
- DevExtTramp 80
- DevExtTramp 81
- DevExtTramp 82
- DevExtTramp 83
- DevExtTramp 84
- DevExtTramp 85
- DevExtTramp 86
- DevExtTramp 87
- DevExtTramp 88
- DevExtTramp 89
- DevExtTramp 90
- DevExtTramp 91
- DevExtTramp 92
- DevExtTramp 93
- DevExtTramp 94
- DevExtTramp 95
- DevExtTramp 96
- DevExtTramp 97
- DevExtTramp 98
- DevExtTramp 99
- DevExtTramp 100
- DevExtTramp 101
- DevExtTramp 102
- DevExtTramp 103
- DevExtTramp 104
- DevExtTramp 105
- DevExtTramp 106
- DevExtTramp 107
- DevExtTramp 108
- DevExtTramp 109
- DevExtTramp 110
- DevExtTramp 111
- DevExtTramp 112
- DevExtTramp 113
- DevExtTramp 114
- DevExtTramp 115
- DevExtTramp 116
- DevExtTramp 117
- DevExtTramp 118
- DevExtTramp 119
- DevExtTramp 120
- DevExtTramp 121
- DevExtTramp 122
- DevExtTramp 123
- DevExtTramp 124
- DevExtTramp 125
- DevExtTramp 126
- DevExtTramp 127
- DevExtTramp 128
- DevExtTramp 129
- DevExtTramp 130
- DevExtTramp 131
- DevExtTramp 132
- DevExtTramp 133
- DevExtTramp 134
- DevExtTramp 135
- DevExtTramp 136
- DevExtTramp 137
- DevExtTramp 138
- DevExtTramp 139
- DevExtTramp 140
- DevExtTramp 141
- DevExtTramp 142
- DevExtTramp 143
- DevExtTramp 144
- DevExtTramp 145
- DevExtTramp 146
- DevExtTramp 147
- DevExtTramp 148
- DevExtTramp 149
- DevExtTramp 150
- DevExtTramp 151
- DevExtTramp 152
- DevExtTramp 153
- DevExtTramp 154
- DevExtTramp 155
- DevExtTramp 156
- DevExtTramp 157
- DevExtTramp 158
- DevExtTramp 159
- DevExtTramp 160
- DevExtTramp 161
- DevExtTramp 162
- DevExtTramp 163
- DevExtTramp 164
- DevExtTramp 165
- DevExtTramp 166
- DevExtTramp 167
- DevExtTramp 168
- DevExtTramp 169
- DevExtTramp 170
- DevExtTramp 171
- DevExtTramp 172
- DevExtTramp 173
- DevExtTramp 174
- DevExtTramp 175
- DevExtTramp 176
- DevExtTramp 177
- DevExtTramp 178
- DevExtTramp 179
- DevExtTramp 180
- DevExtTramp 181
- DevExtTramp 182
- DevExtTramp 183
- DevExtTramp 184
- DevExtTramp 185
- DevExtTramp 186
- DevExtTramp 187
- DevExtTramp 188
- DevExtTramp 189
- DevExtTramp 190
- DevExtTramp 191
- DevExtTramp 192
- DevExtTramp 193
- DevExtTramp 194
- DevExtTramp 195
- DevExtTramp 196
- DevExtTramp 197
- DevExtTramp 198
- DevExtTramp 199
- DevExtTramp 200
- DevExtTramp 201
- DevExtTramp 202
- DevExtTramp 203
- DevExtTramp 204
- DevExtTramp 205
- DevExtTramp 206
- DevExtTramp 207
- DevExtTramp 208
- DevExtTramp 209
- DevExtTramp 210
- DevExtTramp 211
- DevExtTramp 212
- DevExtTramp 213
- DevExtTramp 214
- DevExtTramp 215
- DevExtTramp 216
- DevExtTramp 217
- DevExtTramp 218
- DevExtTramp 219
- DevExtTramp 220
- DevExtTramp 221
- DevExtTramp 222
- DevExtTramp 223
- DevExtTramp 224
- DevExtTramp 225
- DevExtTramp 226
- DevExtTramp 227
- DevExtTramp 228
- DevExtTramp 229
- DevExtTramp 230
- DevExtTramp 231
- DevExtTramp 232
- DevExtTramp 233
- DevExtTramp 234
- DevExtTramp 235
- DevExtTramp 236
- DevExtTramp 237
- DevExtTramp 238
- DevExtTramp 239
- DevExtTramp 240
- DevExtTramp 241
- DevExtTramp 242
- DevExtTramp 243
- DevExtTramp 244
- DevExtTramp 245
- DevExtTramp 246
- DevExtTramp 247
- DevExtTramp 248
- DevExtTramp 249
diff --git a/thirdparty/vulkan/loader/unknown_ext_chain_masm.asm b/thirdparty/vulkan/loader/unknown_ext_chain_masm.asm
deleted file mode 100644
index 34bc7c2fc7..0000000000
--- a/thirdparty/vulkan/loader/unknown_ext_chain_masm.asm
+++ /dev/null
@@ -1,883 +0,0 @@
-;
-; Copyright (c) 2017 The Khronos Group Inc.
-; Copyright (c) 2017 Valve Corporation
-; Copyright (c) 2017 LunarG, 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.
-;
-; Author: Lenny Komow <lenny@lunarg.com>
-;
-
-; This code is used to pass on device (including physical device) extensions through the call chain. It must do this without
-; creating a stack frame, because the actual parameters of the call are not known. Since the first parameter is known to be a
-; VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then
-; jump to the next function in the call chain
-
-; Codegen defines a number of values, chiefly offsets of members within structs and sizes of data types within gen_defines.asm.
-; Struct member offsets are defined in the format "XX_OFFSET_YY" where XX indicates the member within the struct and YY indicates
-; the struct type that it is a member of. Data type sizes are defined in the format "XX_SIZE" where XX indicates the data type.
-INCLUDE gen_defines.asm
-
-; 64-bit values and macro
-IFDEF rax
-
-PhysDevExtTramp macro num:req
-public vkPhysDevExtTramp&num&
-vkPhysDevExtTramp&num&:
- mov rax, qword ptr [rcx] ; Dereference the wrapped VkPhysicalDevice to get the dispatch table in rax
- mov rcx, qword ptr [rcx + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] ; Load the unwrapped VkPhysicalDevice into rcx
- jmp qword ptr [rax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * num))] ; Jump to the next function in the chain, preserving the args in other registers
-endm
-
-PhysDevExtTermin macro num
-public vkPhysDevExtTermin&num&
-vkPhysDevExtTermin&num&:
- mov rax, qword ptr [rcx + ICD_TERM_OFFSET_PHYS_DEV_TERM] ; Store the loader_icd_term* in rax
- cmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))], 0 ; Check if the next function in the chain is NULL
- je terminError&num& ; Go to the error section if it is NULL
- mov rcx, qword ptr [rcx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] ; Load the unwrapped VkPhysicalDevice into the first arg
- jmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))] ; Jump to the next function in the chain
-terminError&num&:
- sub rsp, 56 ; Create the stack frame
- mov rcx, qword ptr [rax + INSTANCE_OFFSET_ICD_TERM] ; Load the loader_instance into rcx (first arg)
- mov rax, qword ptr [rcx + (HASH_OFFSET_INSTANCE + (HASH_SIZE * num) + FUNC_NAME_OFFSET_HASH)] ; Load the func name into rax
- lea r9, termin_error_string ; Load the error string into r9 (fourth arg)
- xor r8d, r8d ; Set r8 to zero (third arg)
- mov qword ptr [rsp + 32], rax ; Move the func name onto the stack (fifth arg)
- lea edx, [r8 + VK_DEBUG_REPORT_ERROR_BIT_EXT] ; Write the error logging bit to rdx (second arg)
- call loader_log ; Log the error message before we crash
- add rsp, 56 ; Clean up the stack frame
- mov rax, 0
- jmp rax ; Crash intentionally by jumping to address zero
-endm
-
-DevExtTramp macro num
-public vkdev_ext&num&
-vkdev_ext&num&:
- mov rax, qword ptr [rcx] ; Dereference the handle to get the dispatch table
- jmp qword ptr [rax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * num))] ; Jump to the appropriate call chain
-endm
-
-; 32-bit values and macro
-ELSE
-
-PhysDevExtTramp macro num
-public _vkPhysDevExtTramp&num&@4
-_vkPhysDevExtTramp&num&@4:
- mov eax, dword ptr [esp + 4] ; Load the wrapped VkPhysicalDevice into eax
- mov ecx, [eax + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] ; Load the unwrapped VkPhysicalDevice into ecx
- mov [esp + 4], ecx ; Overwrite the wrapped VkPhysicalDevice with the unwrapped one (on the stack)
- mov eax, [eax] ; Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax
- jmp dword ptr [eax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * num))] ; Jump to the next function in the chain, preserving the args on the stack
-endm
-
-PhysDevExtTermin macro num
-public _vkPhysDevExtTermin&num&@4
-_vkPhysDevExtTermin&num&@4:
- mov ecx, dword ptr [esp + 4] ; Move the wrapped VkPhysicalDevice into ecx
- mov eax, dword ptr [ecx + ICD_TERM_OFFSET_PHYS_DEV_TERM] ; Store the loader_icd_term* in eax
- cmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))], 0 ; Check if the next function in the chain is NULL
- je terminError&num& ; Go to the error section if it is NULL
- mov ecx, dword ptr [ecx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] ; Unwrap the VkPhysicalDevice in ecx
- mov dword ptr [esp + 4], ecx ; Copy the unwrapped VkPhysicalDevice into the first arg
- jmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))] ; Jump to the next function in the chain
-terminError&num&:
- mov eax, dword ptr [eax + INSTANCE_OFFSET_ICD_TERM] ; Load the loader_instance into eax
- push dword ptr [eax + (HASH_OFFSET_INSTANCE + (HASH_SIZE * num) + FUNC_NAME_OFFSET_HASH)] ; Push the func name (fifth arg)
- push offset termin_error_string ; Push the error string (fourth arg)
- push 0 ; Push zero (third arg)
- push VK_DEBUG_REPORT_ERROR_BIT_EXT ; Push the error logging bit (second arg)
- push eax ; Push the loader_instance (first arg)
- call _loader_log ; Log the error message before we crash
- add esp, 20 ; Clean up the args
- mov eax, 0
- jmp eax ; Crash intentionally by jumping to address zero
-endm
-
-DevExtTramp macro num
-public _vkdev_ext&num&@4
-_vkdev_ext&num&@4:
- mov eax, dword ptr [esp + 4] ; Dereference the handle to get the dispatch table
- jmp dword ptr [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * num))] ; Jump to the appropriate call chain
-endm
-
-; This is also needed for 32-bit only
-.model flat
-
-ENDIF
-
-.const
- termin_error_string db 'Extension %s not supported for this physical device', 0
-
-.code
-
-IFDEF rax
-extrn loader_log:near
-ELSE
-extrn _loader_log:near
-ENDIF
-
- PhysDevExtTramp 0
- PhysDevExtTramp 1
- PhysDevExtTramp 2
- PhysDevExtTramp 3
- PhysDevExtTramp 4
- PhysDevExtTramp 5
- PhysDevExtTramp 6
- PhysDevExtTramp 7
- PhysDevExtTramp 8
- PhysDevExtTramp 9
- PhysDevExtTramp 10
- PhysDevExtTramp 11
- PhysDevExtTramp 12
- PhysDevExtTramp 13
- PhysDevExtTramp 14
- PhysDevExtTramp 15
- PhysDevExtTramp 16
- PhysDevExtTramp 17
- PhysDevExtTramp 18
- PhysDevExtTramp 19
- PhysDevExtTramp 20
- PhysDevExtTramp 21
- PhysDevExtTramp 22
- PhysDevExtTramp 23
- PhysDevExtTramp 24
- PhysDevExtTramp 25
- PhysDevExtTramp 26
- PhysDevExtTramp 27
- PhysDevExtTramp 28
- PhysDevExtTramp 29
- PhysDevExtTramp 30
- PhysDevExtTramp 31
- PhysDevExtTramp 32
- PhysDevExtTramp 33
- PhysDevExtTramp 34
- PhysDevExtTramp 35
- PhysDevExtTramp 36
- PhysDevExtTramp 37
- PhysDevExtTramp 38
- PhysDevExtTramp 39
- PhysDevExtTramp 40
- PhysDevExtTramp 41
- PhysDevExtTramp 42
- PhysDevExtTramp 43
- PhysDevExtTramp 44
- PhysDevExtTramp 45
- PhysDevExtTramp 46
- PhysDevExtTramp 47
- PhysDevExtTramp 48
- PhysDevExtTramp 49
- PhysDevExtTramp 50
- PhysDevExtTramp 51
- PhysDevExtTramp 52
- PhysDevExtTramp 53
- PhysDevExtTramp 54
- PhysDevExtTramp 55
- PhysDevExtTramp 56
- PhysDevExtTramp 57
- PhysDevExtTramp 58
- PhysDevExtTramp 59
- PhysDevExtTramp 60
- PhysDevExtTramp 61
- PhysDevExtTramp 62
- PhysDevExtTramp 63
- PhysDevExtTramp 64
- PhysDevExtTramp 65
- PhysDevExtTramp 66
- PhysDevExtTramp 67
- PhysDevExtTramp 68
- PhysDevExtTramp 69
- PhysDevExtTramp 70
- PhysDevExtTramp 71
- PhysDevExtTramp 72
- PhysDevExtTramp 73
- PhysDevExtTramp 74
- PhysDevExtTramp 75
- PhysDevExtTramp 76
- PhysDevExtTramp 77
- PhysDevExtTramp 78
- PhysDevExtTramp 79
- PhysDevExtTramp 80
- PhysDevExtTramp 81
- PhysDevExtTramp 82
- PhysDevExtTramp 83
- PhysDevExtTramp 84
- PhysDevExtTramp 85
- PhysDevExtTramp 86
- PhysDevExtTramp 87
- PhysDevExtTramp 88
- PhysDevExtTramp 89
- PhysDevExtTramp 90
- PhysDevExtTramp 91
- PhysDevExtTramp 92
- PhysDevExtTramp 93
- PhysDevExtTramp 94
- PhysDevExtTramp 95
- PhysDevExtTramp 96
- PhysDevExtTramp 97
- PhysDevExtTramp 98
- PhysDevExtTramp 99
- PhysDevExtTramp 100
- PhysDevExtTramp 101
- PhysDevExtTramp 102
- PhysDevExtTramp 103
- PhysDevExtTramp 104
- PhysDevExtTramp 105
- PhysDevExtTramp 106
- PhysDevExtTramp 107
- PhysDevExtTramp 108
- PhysDevExtTramp 109
- PhysDevExtTramp 110
- PhysDevExtTramp 111
- PhysDevExtTramp 112
- PhysDevExtTramp 113
- PhysDevExtTramp 114
- PhysDevExtTramp 115
- PhysDevExtTramp 116
- PhysDevExtTramp 117
- PhysDevExtTramp 118
- PhysDevExtTramp 119
- PhysDevExtTramp 120
- PhysDevExtTramp 121
- PhysDevExtTramp 122
- PhysDevExtTramp 123
- PhysDevExtTramp 124
- PhysDevExtTramp 125
- PhysDevExtTramp 126
- PhysDevExtTramp 127
- PhysDevExtTramp 128
- PhysDevExtTramp 129
- PhysDevExtTramp 130
- PhysDevExtTramp 131
- PhysDevExtTramp 132
- PhysDevExtTramp 133
- PhysDevExtTramp 134
- PhysDevExtTramp 135
- PhysDevExtTramp 136
- PhysDevExtTramp 137
- PhysDevExtTramp 138
- PhysDevExtTramp 139
- PhysDevExtTramp 140
- PhysDevExtTramp 141
- PhysDevExtTramp 142
- PhysDevExtTramp 143
- PhysDevExtTramp 144
- PhysDevExtTramp 145
- PhysDevExtTramp 146
- PhysDevExtTramp 147
- PhysDevExtTramp 148
- PhysDevExtTramp 149
- PhysDevExtTramp 150
- PhysDevExtTramp 151
- PhysDevExtTramp 152
- PhysDevExtTramp 153
- PhysDevExtTramp 154
- PhysDevExtTramp 155
- PhysDevExtTramp 156
- PhysDevExtTramp 157
- PhysDevExtTramp 158
- PhysDevExtTramp 159
- PhysDevExtTramp 160
- PhysDevExtTramp 161
- PhysDevExtTramp 162
- PhysDevExtTramp 163
- PhysDevExtTramp 164
- PhysDevExtTramp 165
- PhysDevExtTramp 166
- PhysDevExtTramp 167
- PhysDevExtTramp 168
- PhysDevExtTramp 169
- PhysDevExtTramp 170
- PhysDevExtTramp 171
- PhysDevExtTramp 172
- PhysDevExtTramp 173
- PhysDevExtTramp 174
- PhysDevExtTramp 175
- PhysDevExtTramp 176
- PhysDevExtTramp 177
- PhysDevExtTramp 178
- PhysDevExtTramp 179
- PhysDevExtTramp 180
- PhysDevExtTramp 181
- PhysDevExtTramp 182
- PhysDevExtTramp 183
- PhysDevExtTramp 184
- PhysDevExtTramp 185
- PhysDevExtTramp 186
- PhysDevExtTramp 187
- PhysDevExtTramp 188
- PhysDevExtTramp 189
- PhysDevExtTramp 190
- PhysDevExtTramp 191
- PhysDevExtTramp 192
- PhysDevExtTramp 193
- PhysDevExtTramp 194
- PhysDevExtTramp 195
- PhysDevExtTramp 196
- PhysDevExtTramp 197
- PhysDevExtTramp 198
- PhysDevExtTramp 199
- PhysDevExtTramp 200
- PhysDevExtTramp 201
- PhysDevExtTramp 202
- PhysDevExtTramp 203
- PhysDevExtTramp 204
- PhysDevExtTramp 205
- PhysDevExtTramp 206
- PhysDevExtTramp 207
- PhysDevExtTramp 208
- PhysDevExtTramp 209
- PhysDevExtTramp 210
- PhysDevExtTramp 211
- PhysDevExtTramp 212
- PhysDevExtTramp 213
- PhysDevExtTramp 214
- PhysDevExtTramp 215
- PhysDevExtTramp 216
- PhysDevExtTramp 217
- PhysDevExtTramp 218
- PhysDevExtTramp 219
- PhysDevExtTramp 220
- PhysDevExtTramp 221
- PhysDevExtTramp 222
- PhysDevExtTramp 223
- PhysDevExtTramp 224
- PhysDevExtTramp 225
- PhysDevExtTramp 226
- PhysDevExtTramp 227
- PhysDevExtTramp 228
- PhysDevExtTramp 229
- PhysDevExtTramp 230
- PhysDevExtTramp 231
- PhysDevExtTramp 232
- PhysDevExtTramp 233
- PhysDevExtTramp 234
- PhysDevExtTramp 235
- PhysDevExtTramp 236
- PhysDevExtTramp 237
- PhysDevExtTramp 238
- PhysDevExtTramp 239
- PhysDevExtTramp 240
- PhysDevExtTramp 241
- PhysDevExtTramp 242
- PhysDevExtTramp 243
- PhysDevExtTramp 244
- PhysDevExtTramp 245
- PhysDevExtTramp 246
- PhysDevExtTramp 247
- PhysDevExtTramp 248
- PhysDevExtTramp 249
-
- PhysDevExtTermin 0
- PhysDevExtTermin 1
- PhysDevExtTermin 2
- PhysDevExtTermin 3
- PhysDevExtTermin 4
- PhysDevExtTermin 5
- PhysDevExtTermin 6
- PhysDevExtTermin 7
- PhysDevExtTermin 8
- PhysDevExtTermin 9
- PhysDevExtTermin 10
- PhysDevExtTermin 11
- PhysDevExtTermin 12
- PhysDevExtTermin 13
- PhysDevExtTermin 14
- PhysDevExtTermin 15
- PhysDevExtTermin 16
- PhysDevExtTermin 17
- PhysDevExtTermin 18
- PhysDevExtTermin 19
- PhysDevExtTermin 20
- PhysDevExtTermin 21
- PhysDevExtTermin 22
- PhysDevExtTermin 23
- PhysDevExtTermin 24
- PhysDevExtTermin 25
- PhysDevExtTermin 26
- PhysDevExtTermin 27
- PhysDevExtTermin 28
- PhysDevExtTermin 29
- PhysDevExtTermin 30
- PhysDevExtTermin 31
- PhysDevExtTermin 32
- PhysDevExtTermin 33
- PhysDevExtTermin 34
- PhysDevExtTermin 35
- PhysDevExtTermin 36
- PhysDevExtTermin 37
- PhysDevExtTermin 38
- PhysDevExtTermin 39
- PhysDevExtTermin 40
- PhysDevExtTermin 41
- PhysDevExtTermin 42
- PhysDevExtTermin 43
- PhysDevExtTermin 44
- PhysDevExtTermin 45
- PhysDevExtTermin 46
- PhysDevExtTermin 47
- PhysDevExtTermin 48
- PhysDevExtTermin 49
- PhysDevExtTermin 50
- PhysDevExtTermin 51
- PhysDevExtTermin 52
- PhysDevExtTermin 53
- PhysDevExtTermin 54
- PhysDevExtTermin 55
- PhysDevExtTermin 56
- PhysDevExtTermin 57
- PhysDevExtTermin 58
- PhysDevExtTermin 59
- PhysDevExtTermin 60
- PhysDevExtTermin 61
- PhysDevExtTermin 62
- PhysDevExtTermin 63
- PhysDevExtTermin 64
- PhysDevExtTermin 65
- PhysDevExtTermin 66
- PhysDevExtTermin 67
- PhysDevExtTermin 68
- PhysDevExtTermin 69
- PhysDevExtTermin 70
- PhysDevExtTermin 71
- PhysDevExtTermin 72
- PhysDevExtTermin 73
- PhysDevExtTermin 74
- PhysDevExtTermin 75
- PhysDevExtTermin 76
- PhysDevExtTermin 77
- PhysDevExtTermin 78
- PhysDevExtTermin 79
- PhysDevExtTermin 80
- PhysDevExtTermin 81
- PhysDevExtTermin 82
- PhysDevExtTermin 83
- PhysDevExtTermin 84
- PhysDevExtTermin 85
- PhysDevExtTermin 86
- PhysDevExtTermin 87
- PhysDevExtTermin 88
- PhysDevExtTermin 89
- PhysDevExtTermin 90
- PhysDevExtTermin 91
- PhysDevExtTermin 92
- PhysDevExtTermin 93
- PhysDevExtTermin 94
- PhysDevExtTermin 95
- PhysDevExtTermin 96
- PhysDevExtTermin 97
- PhysDevExtTermin 98
- PhysDevExtTermin 99
- PhysDevExtTermin 100
- PhysDevExtTermin 101
- PhysDevExtTermin 102
- PhysDevExtTermin 103
- PhysDevExtTermin 104
- PhysDevExtTermin 105
- PhysDevExtTermin 106
- PhysDevExtTermin 107
- PhysDevExtTermin 108
- PhysDevExtTermin 109
- PhysDevExtTermin 110
- PhysDevExtTermin 111
- PhysDevExtTermin 112
- PhysDevExtTermin 113
- PhysDevExtTermin 114
- PhysDevExtTermin 115
- PhysDevExtTermin 116
- PhysDevExtTermin 117
- PhysDevExtTermin 118
- PhysDevExtTermin 119
- PhysDevExtTermin 120
- PhysDevExtTermin 121
- PhysDevExtTermin 122
- PhysDevExtTermin 123
- PhysDevExtTermin 124
- PhysDevExtTermin 125
- PhysDevExtTermin 126
- PhysDevExtTermin 127
- PhysDevExtTermin 128
- PhysDevExtTermin 129
- PhysDevExtTermin 130
- PhysDevExtTermin 131
- PhysDevExtTermin 132
- PhysDevExtTermin 133
- PhysDevExtTermin 134
- PhysDevExtTermin 135
- PhysDevExtTermin 136
- PhysDevExtTermin 137
- PhysDevExtTermin 138
- PhysDevExtTermin 139
- PhysDevExtTermin 140
- PhysDevExtTermin 141
- PhysDevExtTermin 142
- PhysDevExtTermin 143
- PhysDevExtTermin 144
- PhysDevExtTermin 145
- PhysDevExtTermin 146
- PhysDevExtTermin 147
- PhysDevExtTermin 148
- PhysDevExtTermin 149
- PhysDevExtTermin 150
- PhysDevExtTermin 151
- PhysDevExtTermin 152
- PhysDevExtTermin 153
- PhysDevExtTermin 154
- PhysDevExtTermin 155
- PhysDevExtTermin 156
- PhysDevExtTermin 157
- PhysDevExtTermin 158
- PhysDevExtTermin 159
- PhysDevExtTermin 160
- PhysDevExtTermin 161
- PhysDevExtTermin 162
- PhysDevExtTermin 163
- PhysDevExtTermin 164
- PhysDevExtTermin 165
- PhysDevExtTermin 166
- PhysDevExtTermin 167
- PhysDevExtTermin 168
- PhysDevExtTermin 169
- PhysDevExtTermin 170
- PhysDevExtTermin 171
- PhysDevExtTermin 172
- PhysDevExtTermin 173
- PhysDevExtTermin 174
- PhysDevExtTermin 175
- PhysDevExtTermin 176
- PhysDevExtTermin 177
- PhysDevExtTermin 178
- PhysDevExtTermin 179
- PhysDevExtTermin 180
- PhysDevExtTermin 181
- PhysDevExtTermin 182
- PhysDevExtTermin 183
- PhysDevExtTermin 184
- PhysDevExtTermin 185
- PhysDevExtTermin 186
- PhysDevExtTermin 187
- PhysDevExtTermin 188
- PhysDevExtTermin 189
- PhysDevExtTermin 190
- PhysDevExtTermin 191
- PhysDevExtTermin 192
- PhysDevExtTermin 193
- PhysDevExtTermin 194
- PhysDevExtTermin 195
- PhysDevExtTermin 196
- PhysDevExtTermin 197
- PhysDevExtTermin 198
- PhysDevExtTermin 199
- PhysDevExtTermin 200
- PhysDevExtTermin 201
- PhysDevExtTermin 202
- PhysDevExtTermin 203
- PhysDevExtTermin 204
- PhysDevExtTermin 205
- PhysDevExtTermin 206
- PhysDevExtTermin 207
- PhysDevExtTermin 208
- PhysDevExtTermin 209
- PhysDevExtTermin 210
- PhysDevExtTermin 211
- PhysDevExtTermin 212
- PhysDevExtTermin 213
- PhysDevExtTermin 214
- PhysDevExtTermin 215
- PhysDevExtTermin 216
- PhysDevExtTermin 217
- PhysDevExtTermin 218
- PhysDevExtTermin 219
- PhysDevExtTermin 220
- PhysDevExtTermin 221
- PhysDevExtTermin 222
- PhysDevExtTermin 223
- PhysDevExtTermin 224
- PhysDevExtTermin 225
- PhysDevExtTermin 226
- PhysDevExtTermin 227
- PhysDevExtTermin 228
- PhysDevExtTermin 229
- PhysDevExtTermin 230
- PhysDevExtTermin 231
- PhysDevExtTermin 232
- PhysDevExtTermin 233
- PhysDevExtTermin 234
- PhysDevExtTermin 235
- PhysDevExtTermin 236
- PhysDevExtTermin 237
- PhysDevExtTermin 238
- PhysDevExtTermin 239
- PhysDevExtTermin 240
- PhysDevExtTermin 241
- PhysDevExtTermin 242
- PhysDevExtTermin 243
- PhysDevExtTermin 244
- PhysDevExtTermin 245
- PhysDevExtTermin 246
- PhysDevExtTermin 247
- PhysDevExtTermin 248
- PhysDevExtTermin 249
-
- DevExtTramp 0
- DevExtTramp 1
- DevExtTramp 2
- DevExtTramp 3
- DevExtTramp 4
- DevExtTramp 5
- DevExtTramp 6
- DevExtTramp 7
- DevExtTramp 8
- DevExtTramp 9
- DevExtTramp 10
- DevExtTramp 11
- DevExtTramp 12
- DevExtTramp 13
- DevExtTramp 14
- DevExtTramp 15
- DevExtTramp 16
- DevExtTramp 17
- DevExtTramp 18
- DevExtTramp 19
- DevExtTramp 20
- DevExtTramp 21
- DevExtTramp 22
- DevExtTramp 23
- DevExtTramp 24
- DevExtTramp 25
- DevExtTramp 26
- DevExtTramp 27
- DevExtTramp 28
- DevExtTramp 29
- DevExtTramp 30
- DevExtTramp 31
- DevExtTramp 32
- DevExtTramp 33
- DevExtTramp 34
- DevExtTramp 35
- DevExtTramp 36
- DevExtTramp 37
- DevExtTramp 38
- DevExtTramp 39
- DevExtTramp 40
- DevExtTramp 41
- DevExtTramp 42
- DevExtTramp 43
- DevExtTramp 44
- DevExtTramp 45
- DevExtTramp 46
- DevExtTramp 47
- DevExtTramp 48
- DevExtTramp 49
- DevExtTramp 50
- DevExtTramp 51
- DevExtTramp 52
- DevExtTramp 53
- DevExtTramp 54
- DevExtTramp 55
- DevExtTramp 56
- DevExtTramp 57
- DevExtTramp 58
- DevExtTramp 59
- DevExtTramp 60
- DevExtTramp 61
- DevExtTramp 62
- DevExtTramp 63
- DevExtTramp 64
- DevExtTramp 65
- DevExtTramp 66
- DevExtTramp 67
- DevExtTramp 68
- DevExtTramp 69
- DevExtTramp 70
- DevExtTramp 71
- DevExtTramp 72
- DevExtTramp 73
- DevExtTramp 74
- DevExtTramp 75
- DevExtTramp 76
- DevExtTramp 77
- DevExtTramp 78
- DevExtTramp 79
- DevExtTramp 80
- DevExtTramp 81
- DevExtTramp 82
- DevExtTramp 83
- DevExtTramp 84
- DevExtTramp 85
- DevExtTramp 86
- DevExtTramp 87
- DevExtTramp 88
- DevExtTramp 89
- DevExtTramp 90
- DevExtTramp 91
- DevExtTramp 92
- DevExtTramp 93
- DevExtTramp 94
- DevExtTramp 95
- DevExtTramp 96
- DevExtTramp 97
- DevExtTramp 98
- DevExtTramp 99
- DevExtTramp 100
- DevExtTramp 101
- DevExtTramp 102
- DevExtTramp 103
- DevExtTramp 104
- DevExtTramp 105
- DevExtTramp 106
- DevExtTramp 107
- DevExtTramp 108
- DevExtTramp 109
- DevExtTramp 110
- DevExtTramp 111
- DevExtTramp 112
- DevExtTramp 113
- DevExtTramp 114
- DevExtTramp 115
- DevExtTramp 116
- DevExtTramp 117
- DevExtTramp 118
- DevExtTramp 119
- DevExtTramp 120
- DevExtTramp 121
- DevExtTramp 122
- DevExtTramp 123
- DevExtTramp 124
- DevExtTramp 125
- DevExtTramp 126
- DevExtTramp 127
- DevExtTramp 128
- DevExtTramp 129
- DevExtTramp 130
- DevExtTramp 131
- DevExtTramp 132
- DevExtTramp 133
- DevExtTramp 134
- DevExtTramp 135
- DevExtTramp 136
- DevExtTramp 137
- DevExtTramp 138
- DevExtTramp 139
- DevExtTramp 140
- DevExtTramp 141
- DevExtTramp 142
- DevExtTramp 143
- DevExtTramp 144
- DevExtTramp 145
- DevExtTramp 146
- DevExtTramp 147
- DevExtTramp 148
- DevExtTramp 149
- DevExtTramp 150
- DevExtTramp 151
- DevExtTramp 152
- DevExtTramp 153
- DevExtTramp 154
- DevExtTramp 155
- DevExtTramp 156
- DevExtTramp 157
- DevExtTramp 158
- DevExtTramp 159
- DevExtTramp 160
- DevExtTramp 161
- DevExtTramp 162
- DevExtTramp 163
- DevExtTramp 164
- DevExtTramp 165
- DevExtTramp 166
- DevExtTramp 167
- DevExtTramp 168
- DevExtTramp 169
- DevExtTramp 170
- DevExtTramp 171
- DevExtTramp 172
- DevExtTramp 173
- DevExtTramp 174
- DevExtTramp 175
- DevExtTramp 176
- DevExtTramp 177
- DevExtTramp 178
- DevExtTramp 179
- DevExtTramp 180
- DevExtTramp 181
- DevExtTramp 182
- DevExtTramp 183
- DevExtTramp 184
- DevExtTramp 185
- DevExtTramp 186
- DevExtTramp 187
- DevExtTramp 188
- DevExtTramp 189
- DevExtTramp 190
- DevExtTramp 191
- DevExtTramp 192
- DevExtTramp 193
- DevExtTramp 194
- DevExtTramp 195
- DevExtTramp 196
- DevExtTramp 197
- DevExtTramp 198
- DevExtTramp 199
- DevExtTramp 200
- DevExtTramp 201
- DevExtTramp 202
- DevExtTramp 203
- DevExtTramp 204
- DevExtTramp 205
- DevExtTramp 206
- DevExtTramp 207
- DevExtTramp 208
- DevExtTramp 209
- DevExtTramp 210
- DevExtTramp 211
- DevExtTramp 212
- DevExtTramp 213
- DevExtTramp 214
- DevExtTramp 215
- DevExtTramp 216
- DevExtTramp 217
- DevExtTramp 218
- DevExtTramp 219
- DevExtTramp 220
- DevExtTramp 221
- DevExtTramp 222
- DevExtTramp 223
- DevExtTramp 224
- DevExtTramp 225
- DevExtTramp 226
- DevExtTramp 227
- DevExtTramp 228
- DevExtTramp 229
- DevExtTramp 230
- DevExtTramp 231
- DevExtTramp 232
- DevExtTramp 233
- DevExtTramp 234
- DevExtTramp 235
- DevExtTramp 236
- DevExtTramp 237
- DevExtTramp 238
- DevExtTramp 239
- DevExtTramp 240
- DevExtTramp 241
- DevExtTramp 242
- DevExtTramp 243
- DevExtTramp 244
- DevExtTramp 245
- DevExtTramp 246
- DevExtTramp 247
- DevExtTramp 248
- DevExtTramp 249
-
-end
diff --git a/thirdparty/vulkan/loader/vk_dispatch_table_helper.h b/thirdparty/vulkan/loader/vk_dispatch_table_helper.h
index d934798db4..386745a1e7 100644
--- a/thirdparty/vulkan/loader/vk_dispatch_table_helper.h
+++ b/thirdparty/vulkan/loader/vk_dispatch_table_helper.h
@@ -63,10 +63,10 @@ static VKAPI_ATTR void VKAPI_CALL StubCmdPushDescriptorSetWithTemplateKHR(VkComm
static VKAPI_ATTR VkResult VKAPI_CALL StubCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { return VK_SUCCESS; };
static VKAPI_ATTR void VKAPI_CALL StubDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { };
static VKAPI_ATTR void VKAPI_CALL StubUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { };
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { return VK_SUCCESS; };
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo) { };
-static VKAPI_ATTR void VKAPI_CALL StubCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo) { };
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo) { };
+static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { return VK_SUCCESS; };
+static VKAPI_ATTR void VKAPI_CALL StubCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { };
+static VKAPI_ATTR void VKAPI_CALL StubCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { };
+static VKAPI_ATTR void VKAPI_CALL StubCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; };
#ifdef VK_USE_PLATFORM_WIN32_KHR
static VKAPI_ATTR VkResult VKAPI_CALL StubImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { return VK_SUCCESS; };
@@ -76,6 +76,8 @@ static VKAPI_ATTR VkResult VKAPI_CALL StubGetFenceWin32HandleKHR(VkDevice device
#endif // VK_USE_PLATFORM_WIN32_KHR
static VKAPI_ATTR VkResult VKAPI_CALL StubImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { return VK_SUCCESS; };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { return VK_SUCCESS; };
+static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { return VK_SUCCESS; };
+static VKAPI_ATTR void VKAPI_CALL StubReleaseProfilingLockKHR(VkDevice device) { };
static VKAPI_ATTR void VKAPI_CALL StubGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { };
static VKAPI_ATTR void VKAPI_CALL StubGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { };
static VKAPI_ATTR void VKAPI_CALL StubGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { };
@@ -87,8 +89,11 @@ static VKAPI_ATTR void VKAPI_CALL StubGetDescriptorSetLayoutSupportKHR(VkDevice
static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { };
static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { return VK_SUCCESS; };
-static VKAPI_ATTR VkResult VKAPI_CALL StubWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout) { return VK_SUCCESS; };
-static VKAPI_ATTR VkResult VKAPI_CALL StubSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfoKHR* pSignalInfo) { return VK_SUCCESS; };
+static VKAPI_ATTR VkResult VKAPI_CALL StubWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { return VK_SUCCESS; };
+static VKAPI_ATTR VkResult VKAPI_CALL StubSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { return VK_SUCCESS; };
+static VKAPI_ATTR void VKAPI_CALL StubGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { };
+static VKAPI_ATTR void VKAPI_CALL StubGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { };
+static VKAPI_ATTR void VKAPI_CALL StubGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { return VK_SUCCESS; };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { return VK_SUCCESS; };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { return VK_SUCCESS; };
@@ -175,7 +180,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL StubReleasePerformanceConfigurationINTEL(V
static VKAPI_ATTR VkResult VKAPI_CALL StubQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { return VK_SUCCESS; };
static VKAPI_ATTR VkResult VKAPI_CALL StubGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { return VK_SUCCESS; };
static VKAPI_ATTR void VKAPI_CALL StubSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { };
-static VKAPI_ATTR void VKAPI_CALL StubGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo) { };
+static VKAPI_ATTR void VKAPI_CALL StubGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { };
#ifdef VK_USE_PLATFORM_WIN32_KHR
static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; };
#endif // VK_USE_PLATFORM_WIN32_KHR
@@ -330,6 +335,19 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp
table->DestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) gpa(device, "vkDestroyDescriptorUpdateTemplate");
table->UpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) gpa(device, "vkUpdateDescriptorSetWithTemplate");
table->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) gpa(device, "vkGetDescriptorSetLayoutSupport");
+ table->CmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount) gpa(device, "vkCmdDrawIndirectCount");
+ table->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount) gpa(device, "vkCmdDrawIndexedIndirectCount");
+ table->CreateRenderPass2 = (PFN_vkCreateRenderPass2) gpa(device, "vkCreateRenderPass2");
+ table->CmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2) gpa(device, "vkCmdBeginRenderPass2");
+ table->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2) gpa(device, "vkCmdNextSubpass2");
+ table->CmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2) gpa(device, "vkCmdEndRenderPass2");
+ table->ResetQueryPool = (PFN_vkResetQueryPool) gpa(device, "vkResetQueryPool");
+ table->GetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue) gpa(device, "vkGetSemaphoreCounterValue");
+ table->WaitSemaphores = (PFN_vkWaitSemaphores) gpa(device, "vkWaitSemaphores");
+ table->SignalSemaphore = (PFN_vkSignalSemaphore) gpa(device, "vkSignalSemaphore");
+ table->GetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress) gpa(device, "vkGetBufferDeviceAddress");
+ table->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress) gpa(device, "vkGetBufferOpaqueCaptureAddress");
+ table->GetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddress");
table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
if (table->CreateSwapchainKHR == nullptr) { table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)StubCreateSwapchainKHR; }
table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
@@ -412,6 +430,10 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp
if (table->ImportFenceFdKHR == nullptr) { table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR)StubImportFenceFdKHR; }
table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR) gpa(device, "vkGetFenceFdKHR");
if (table->GetFenceFdKHR == nullptr) { table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR)StubGetFenceFdKHR; }
+ table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR) gpa(device, "vkAcquireProfilingLockKHR");
+ if (table->AcquireProfilingLockKHR == nullptr) { table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)StubAcquireProfilingLockKHR; }
+ table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR) gpa(device, "vkReleaseProfilingLockKHR");
+ if (table->ReleaseProfilingLockKHR == nullptr) { table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)StubReleaseProfilingLockKHR; }
table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR) gpa(device, "vkGetImageMemoryRequirements2KHR");
if (table->GetImageMemoryRequirements2KHR == nullptr) { table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)StubGetImageMemoryRequirements2KHR; }
table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR) gpa(device, "vkGetBufferMemoryRequirements2KHR");
@@ -438,6 +460,12 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp
if (table->WaitSemaphoresKHR == nullptr) { table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)StubWaitSemaphoresKHR; }
table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR) gpa(device, "vkSignalSemaphoreKHR");
if (table->SignalSemaphoreKHR == nullptr) { table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)StubSignalSemaphoreKHR; }
+ table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR) gpa(device, "vkGetBufferDeviceAddressKHR");
+ if (table->GetBufferDeviceAddressKHR == nullptr) { table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)StubGetBufferDeviceAddressKHR; }
+ table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR) gpa(device, "vkGetBufferOpaqueCaptureAddressKHR");
+ if (table->GetBufferOpaqueCaptureAddressKHR == nullptr) { table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)StubGetBufferOpaqueCaptureAddressKHR; }
+ table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
+ if (table->GetDeviceMemoryOpaqueCaptureAddressKHR == nullptr) { table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)StubGetDeviceMemoryOpaqueCaptureAddressKHR; }
table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR) gpa(device, "vkGetPipelineExecutablePropertiesKHR");
if (table->GetPipelineExecutablePropertiesKHR == nullptr) { table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)StubGetPipelineExecutablePropertiesKHR; }
table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR) gpa(device, "vkGetPipelineExecutableStatisticsKHR");
@@ -710,6 +738,8 @@ static inline void layer_init_instance_dispatch_table(VkInstance instance, VkLay
table->GetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR");
table->GetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
table->GetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
+ table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) gpa(instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
+ table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) gpa(instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
table->GetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
table->GetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR");
table->GetPhysicalDeviceDisplayProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayProperties2KHR) gpa(instance, "vkGetPhysicalDeviceDisplayProperties2KHR");
@@ -752,6 +782,7 @@ static inline void layer_init_instance_dispatch_table(VkInstance instance, VkLay
#ifdef VK_USE_PLATFORM_METAL_EXT
table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT) gpa(instance, "vkCreateMetalSurfaceEXT");
#endif // VK_USE_PLATFORM_METAL_EXT
+ table->GetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT) gpa(instance, "vkGetPhysicalDeviceToolPropertiesEXT");
table->GetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV) gpa(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV");
table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) gpa(instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
#ifdef VK_USE_PLATFORM_WIN32_KHR
diff --git a/thirdparty/vulkan/loader/vk_layer_dispatch_table.h b/thirdparty/vulkan/loader/vk_layer_dispatch_table.h
index 1f0342dc49..b919447e55 100644
--- a/thirdparty/vulkan/loader/vk_layer_dispatch_table.h
+++ b/thirdparty/vulkan/loader/vk_layer_dispatch_table.h
@@ -140,6 +140,10 @@ typedef struct VkLayerInstanceDispatchTable_ {
// ---- VK_KHR_external_fence_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR;
+ // ---- VK_KHR_performance_query extension commands
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR;
PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR;
@@ -216,6 +220,9 @@ typedef struct VkLayerInstanceDispatchTable_ {
PFN_vkCreateMetalSurfaceEXT CreateMetalSurfaceEXT;
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ PFN_vkGetPhysicalDeviceToolPropertiesEXT GetPhysicalDeviceToolPropertiesEXT;
+
// ---- VK_NV_cooperative_matrix extension commands
PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV GetPhysicalDeviceCooperativeMatrixPropertiesNV;
@@ -375,6 +382,21 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkUpdateDescriptorSetWithTemplate UpdateDescriptorSetWithTemplate;
PFN_vkGetDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport;
+ // ---- Core 1_2 commands
+ PFN_vkCmdDrawIndirectCount CmdDrawIndirectCount;
+ PFN_vkCmdDrawIndexedIndirectCount CmdDrawIndexedIndirectCount;
+ PFN_vkCreateRenderPass2 CreateRenderPass2;
+ PFN_vkCmdBeginRenderPass2 CmdBeginRenderPass2;
+ PFN_vkCmdNextSubpass2 CmdNextSubpass2;
+ PFN_vkCmdEndRenderPass2 CmdEndRenderPass2;
+ PFN_vkResetQueryPool ResetQueryPool;
+ PFN_vkGetSemaphoreCounterValue GetSemaphoreCounterValue;
+ PFN_vkWaitSemaphores WaitSemaphores;
+ PFN_vkSignalSemaphore SignalSemaphore;
+ PFN_vkGetBufferDeviceAddress GetBufferDeviceAddress;
+ PFN_vkGetBufferOpaqueCaptureAddress GetBufferOpaqueCaptureAddress;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddress GetDeviceMemoryOpaqueCaptureAddress;
+
// ---- VK_KHR_swapchain extension commands
PFN_vkCreateSwapchainKHR CreateSwapchainKHR;
PFN_vkDestroySwapchainKHR DestroySwapchainKHR;
@@ -450,6 +472,10 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkImportFenceFdKHR ImportFenceFdKHR;
PFN_vkGetFenceFdKHR GetFenceFdKHR;
+ // ---- VK_KHR_performance_query extension commands
+ PFN_vkAcquireProfilingLockKHR AcquireProfilingLockKHR;
+ PFN_vkReleaseProfilingLockKHR ReleaseProfilingLockKHR;
+
// ---- VK_KHR_get_memory_requirements2 extension commands
PFN_vkGetImageMemoryRequirements2KHR GetImageMemoryRequirements2KHR;
PFN_vkGetBufferMemoryRequirements2KHR GetBufferMemoryRequirements2KHR;
@@ -475,6 +501,11 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkWaitSemaphoresKHR WaitSemaphoresKHR;
PFN_vkSignalSemaphoreKHR SignalSemaphoreKHR;
+ // ---- VK_KHR_buffer_device_address extension commands
+ PFN_vkGetBufferDeviceAddressKHR GetBufferDeviceAddressKHR;
+ PFN_vkGetBufferOpaqueCaptureAddressKHR GetBufferOpaqueCaptureAddressKHR;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR GetDeviceMemoryOpaqueCaptureAddressKHR;
+
// ---- VK_KHR_pipeline_executable_properties extension commands
PFN_vkGetPipelineExecutablePropertiesKHR GetPipelineExecutablePropertiesKHR;
PFN_vkGetPipelineExecutableStatisticsKHR GetPipelineExecutableStatisticsKHR;
diff --git a/thirdparty/vulkan/loader/vk_loader_extensions.c b/thirdparty/vulkan/loader/vk_loader_extensions.c
index c7a55cf11a..542b8b4af4 100644
--- a/thirdparty/vulkan/loader/vk_loader_extensions.c
+++ b/thirdparty/vulkan/loader/vk_loader_extensions.c
@@ -172,6 +172,10 @@ VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_icd_term *icd_t
// ---- VK_KHR_external_fence_capabilities extension commands
LOOKUP_GIPA(GetPhysicalDeviceExternalFencePropertiesKHR, false);
+ // ---- VK_KHR_performance_query extension commands
+ LOOKUP_GIPA(EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, false);
+ LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, false);
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilities2KHR, false);
LOOKUP_GIPA(GetPhysicalDeviceSurfaceFormats2KHR, false);
@@ -234,6 +238,12 @@ VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_icd_term *icd_t
// ---- VK_EXT_debug_utils extension commands
LOOKUP_GIPA(SetDebugUtilsObjectNameEXT, false);
LOOKUP_GIPA(SetDebugUtilsObjectTagEXT, false);
+ LOOKUP_GIPA(QueueBeginDebugUtilsLabelEXT, false);
+ LOOKUP_GIPA(QueueEndDebugUtilsLabelEXT, false);
+ LOOKUP_GIPA(QueueInsertDebugUtilsLabelEXT, false);
+ LOOKUP_GIPA(CmdBeginDebugUtilsLabelEXT, false);
+ LOOKUP_GIPA(CmdEndDebugUtilsLabelEXT, false);
+ LOOKUP_GIPA(CmdInsertDebugUtilsLabelEXT, false);
LOOKUP_GIPA(CreateDebugUtilsMessengerEXT, false);
LOOKUP_GIPA(DestroyDebugUtilsMessengerEXT, false);
LOOKUP_GIPA(SubmitDebugUtilsMessageEXT, false);
@@ -254,6 +264,9 @@ VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_icd_term *icd_t
LOOKUP_GIPA(CreateMetalSurfaceEXT, false);
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ LOOKUP_GIPA(GetPhysicalDeviceToolPropertiesEXT, false);
+
// ---- VK_NV_cooperative_matrix extension commands
LOOKUP_GIPA(GetPhysicalDeviceCooperativeMatrixPropertiesNV, false);
@@ -422,6 +435,21 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_dispatch_table(struct loader_dev_d
table->DestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate)gpa(dev, "vkDestroyDescriptorUpdateTemplate");
table->UpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate)gpa(dev, "vkUpdateDescriptorSetWithTemplate");
table->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport)gpa(dev, "vkGetDescriptorSetLayoutSupport");
+
+ // ---- Core 1_2 commands
+ table->CmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount)gpa(dev, "vkCmdDrawIndirectCount");
+ table->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount)gpa(dev, "vkCmdDrawIndexedIndirectCount");
+ table->CreateRenderPass2 = (PFN_vkCreateRenderPass2)gpa(dev, "vkCreateRenderPass2");
+ table->CmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2)gpa(dev, "vkCmdBeginRenderPass2");
+ table->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2)gpa(dev, "vkCmdNextSubpass2");
+ table->CmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2)gpa(dev, "vkCmdEndRenderPass2");
+ table->ResetQueryPool = (PFN_vkResetQueryPool)gpa(dev, "vkResetQueryPool");
+ table->GetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue)gpa(dev, "vkGetSemaphoreCounterValue");
+ table->WaitSemaphores = (PFN_vkWaitSemaphores)gpa(dev, "vkWaitSemaphores");
+ table->SignalSemaphore = (PFN_vkSignalSemaphore)gpa(dev, "vkSignalSemaphore");
+ table->GetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress)gpa(dev, "vkGetBufferDeviceAddress");
+ table->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress)gpa(dev, "vkGetBufferOpaqueCaptureAddress");
+ table->GetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress)gpa(dev, "vkGetDeviceMemoryOpaqueCaptureAddress");
}
// Init Device function pointer dispatch table with extension commands
@@ -507,6 +535,10 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo
table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR)gdpa(dev, "vkImportFenceFdKHR");
table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR)gdpa(dev, "vkGetFenceFdKHR");
+ // ---- VK_KHR_performance_query extension commands
+ table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)gdpa(dev, "vkAcquireProfilingLockKHR");
+ table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)gdpa(dev, "vkReleaseProfilingLockKHR");
+
// ---- VK_KHR_get_memory_requirements2 extension commands
table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)gdpa(dev, "vkGetImageMemoryRequirements2KHR");
table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)gdpa(dev, "vkGetBufferMemoryRequirements2KHR");
@@ -532,6 +564,11 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo
table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)gdpa(dev, "vkWaitSemaphoresKHR");
table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)gdpa(dev, "vkSignalSemaphoreKHR");
+ // ---- VK_KHR_buffer_device_address extension commands
+ table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)gdpa(dev, "vkGetBufferDeviceAddressKHR");
+ table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)gdpa(dev, "vkGetBufferOpaqueCaptureAddressKHR");
+ table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)gdpa(dev, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
+
// ---- VK_KHR_pipeline_executable_properties extension commands
table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)gdpa(dev, "vkGetPipelineExecutablePropertiesKHR");
table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)gdpa(dev, "vkGetPipelineExecutableStatisticsKHR");
@@ -818,6 +855,10 @@ VKAPI_ATTR void VKAPI_CALL loader_init_instance_extension_dispatch_table(VkLayer
// ---- VK_KHR_external_fence_capabilities extension commands
table->GetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)gpa(inst, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
+ // ---- VK_KHR_performance_query extension commands
+ table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)gpa(inst, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
+ table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)gpa(inst, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
table->GetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
table->GetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)gpa(inst, "vkGetPhysicalDeviceSurfaceFormats2KHR");
@@ -894,6 +935,9 @@ VKAPI_ATTR void VKAPI_CALL loader_init_instance_extension_dispatch_table(VkLayer
table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)gpa(inst, "vkCreateMetalSurfaceEXT");
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ table->GetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT)gpa(inst, "vkGetPhysicalDeviceToolPropertiesEXT");
+
// ---- VK_NV_cooperative_matrix extension commands
table->GetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)gpa(inst, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV");
@@ -1056,6 +1100,21 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis
if (!strcmp(name, "UpdateDescriptorSetWithTemplate")) return (void *)table->UpdateDescriptorSetWithTemplate;
if (!strcmp(name, "GetDescriptorSetLayoutSupport")) return (void *)table->GetDescriptorSetLayoutSupport;
+ // ---- Core 1_2 commands
+ if (!strcmp(name, "CmdDrawIndirectCount")) return (void *)table->CmdDrawIndirectCount;
+ if (!strcmp(name, "CmdDrawIndexedIndirectCount")) return (void *)table->CmdDrawIndexedIndirectCount;
+ if (!strcmp(name, "CreateRenderPass2")) return (void *)table->CreateRenderPass2;
+ if (!strcmp(name, "CmdBeginRenderPass2")) return (void *)table->CmdBeginRenderPass2;
+ if (!strcmp(name, "CmdNextSubpass2")) return (void *)table->CmdNextSubpass2;
+ if (!strcmp(name, "CmdEndRenderPass2")) return (void *)table->CmdEndRenderPass2;
+ if (!strcmp(name, "ResetQueryPool")) return (void *)table->ResetQueryPool;
+ if (!strcmp(name, "GetSemaphoreCounterValue")) return (void *)table->GetSemaphoreCounterValue;
+ if (!strcmp(name, "WaitSemaphores")) return (void *)table->WaitSemaphores;
+ if (!strcmp(name, "SignalSemaphore")) return (void *)table->SignalSemaphore;
+ if (!strcmp(name, "GetBufferDeviceAddress")) return (void *)table->GetBufferDeviceAddress;
+ if (!strcmp(name, "GetBufferOpaqueCaptureAddress")) return (void *)table->GetBufferOpaqueCaptureAddress;
+ if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddress")) return (void *)table->GetDeviceMemoryOpaqueCaptureAddress;
+
// ---- VK_KHR_swapchain extension commands
if (!strcmp(name, "CreateSwapchainKHR")) return (void *)table->CreateSwapchainKHR;
if (!strcmp(name, "DestroySwapchainKHR")) return (void *)table->DestroySwapchainKHR;
@@ -1131,6 +1190,10 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis
if (!strcmp(name, "ImportFenceFdKHR")) return (void *)table->ImportFenceFdKHR;
if (!strcmp(name, "GetFenceFdKHR")) return (void *)table->GetFenceFdKHR;
+ // ---- VK_KHR_performance_query extension commands
+ if (!strcmp(name, "AcquireProfilingLockKHR")) return (void *)table->AcquireProfilingLockKHR;
+ if (!strcmp(name, "ReleaseProfilingLockKHR")) return (void *)table->ReleaseProfilingLockKHR;
+
// ---- VK_KHR_get_memory_requirements2 extension commands
if (!strcmp(name, "GetImageMemoryRequirements2KHR")) return (void *)table->GetImageMemoryRequirements2KHR;
if (!strcmp(name, "GetBufferMemoryRequirements2KHR")) return (void *)table->GetBufferMemoryRequirements2KHR;
@@ -1156,6 +1219,11 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis
if (!strcmp(name, "WaitSemaphoresKHR")) return (void *)table->WaitSemaphoresKHR;
if (!strcmp(name, "SignalSemaphoreKHR")) return (void *)table->SignalSemaphoreKHR;
+ // ---- VK_KHR_buffer_device_address extension commands
+ if (!strcmp(name, "GetBufferDeviceAddressKHR")) return (void *)table->GetBufferDeviceAddressKHR;
+ if (!strcmp(name, "GetBufferOpaqueCaptureAddressKHR")) return (void *)table->GetBufferOpaqueCaptureAddressKHR;
+ if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddressKHR")) return (void *)table->GetDeviceMemoryOpaqueCaptureAddressKHR;
+
// ---- VK_KHR_pipeline_executable_properties extension commands
if (!strcmp(name, "GetPipelineExecutablePropertiesKHR")) return (void *)table->GetPipelineExecutablePropertiesKHR;
if (!strcmp(name, "GetPipelineExecutableStatisticsKHR")) return (void *)table->GetPipelineExecutableStatisticsKHR;
@@ -1446,6 +1514,10 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerI
// ---- VK_KHR_external_fence_capabilities extension commands
if (!strcmp(name, "GetPhysicalDeviceExternalFencePropertiesKHR")) return (void *)table->GetPhysicalDeviceExternalFencePropertiesKHR;
+ // ---- VK_KHR_performance_query extension commands
+ if (!strcmp(name, "EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR")) return (void *)table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
+ if (!strcmp(name, "GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR")) return (void *)table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2KHR")) return (void *)table->GetPhysicalDeviceSurfaceCapabilities2KHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR")) return (void *)table->GetPhysicalDeviceSurfaceFormats2KHR;
@@ -1522,6 +1594,9 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerI
if (!strcmp(name, "CreateMetalSurfaceEXT")) return (void *)table->CreateMetalSurfaceEXT;
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ if (!strcmp(name, "GetPhysicalDeviceToolPropertiesEXT")) return (void *)table->GetPhysicalDeviceToolPropertiesEXT;
+
// ---- VK_NV_cooperative_matrix extension commands
if (!strcmp(name, "GetPhysicalDeviceCooperativeMatrixPropertiesNV")) return (void *)table->GetPhysicalDeviceCooperativeMatrixPropertiesNV;
@@ -1725,7 +1800,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(
VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR(
VkDevice device,
- const VkRenderPassCreateInfo2KHR* pCreateInfo,
+ const VkRenderPassCreateInfo2* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkRenderPass* pRenderPass) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
@@ -1735,22 +1810,22 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR(
VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- const VkSubpassBeginInfoKHR* pSubpassBeginInfo) {
+ const VkSubpassBeginInfo* pSubpassBeginInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
}
VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR(
VkCommandBuffer commandBuffer,
- const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
- const VkSubpassEndInfoKHR* pSubpassEndInfo) {
+ const VkSubpassBeginInfo* pSubpassBeginInfo,
+ const VkSubpassEndInfo* pSubpassEndInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
}
VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR(
VkCommandBuffer commandBuffer,
- const VkSubpassEndInfoKHR* pSubpassEndInfo) {
+ const VkSubpassEndInfo* pSubpassEndInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo);
}
@@ -1806,6 +1881,72 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR(
}
+// ---- VK_KHR_performance_query extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ uint32_t* pCounterCount,
+ VkPerformanceCounterKHR* pCounters,
+ VkPerformanceCounterDescriptionKHR* pCounterDescriptions) {
+ const VkLayerInstanceDispatchTable *disp;
+ VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+ disp = loader_get_instance_layer_dispatch(physicalDevice);
+ return disp->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(unwrapped_phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ uint32_t* pCounterCount,
+ VkPerformanceCounterKHR* pCounters,
+ VkPerformanceCounterDescriptionKHR* pCounterDescriptions) {
+ struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
+ struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
+ if (NULL == icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) {
+ loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
+ "ICD associated with VkPhysicalDevice does not support EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
+ }
+ return icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(phys_dev_term->phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo,
+ uint32_t* pNumPasses) {
+ const VkLayerInstanceDispatchTable *disp;
+ VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+ disp = loader_get_instance_layer_dispatch(physicalDevice);
+ disp->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(unwrapped_phys_dev, pPerformanceQueryCreateInfo, pNumPasses);
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo,
+ uint32_t* pNumPasses) {
+ struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
+ struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
+ if (NULL == icd_term->dispatch.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) {
+ loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
+ "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
+ }
+ icd_term->dispatch.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(phys_dev_term->phys_dev, pPerformanceQueryCreateInfo, pNumPasses);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR(
+ VkDevice device,
+ const VkAcquireProfilingLockInfoKHR* pInfo) {
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->AcquireProfilingLockKHR(device, pInfo);
+}
+
+VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR(
+ VkDevice device) {
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ disp->ReleaseProfilingLockKHR(device);
+}
+
+
// ---- VK_KHR_get_memory_requirements2 extension trampoline/terminators
VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR(
@@ -1923,7 +2064,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR(
VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(
VkDevice device,
- const VkSemaphoreWaitInfoKHR* pWaitInfo,
+ const VkSemaphoreWaitInfo* pWaitInfo,
uint64_t timeout) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->WaitSemaphoresKHR(device, pWaitInfo, timeout);
@@ -1931,12 +2072,36 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(
VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR(
VkDevice device,
- const VkSemaphoreSignalInfoKHR* pSignalInfo) {
+ const VkSemaphoreSignalInfo* pSignalInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->SignalSemaphoreKHR(device, pSignalInfo);
}
+// ---- VK_KHR_buffer_device_address extension trampoline/terminators
+
+VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR(
+ VkDevice device,
+ const VkBufferDeviceAddressInfo* pInfo) {
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetBufferDeviceAddressKHR(device, pInfo);
+}
+
+VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR(
+ VkDevice device,
+ const VkBufferDeviceAddressInfo* pInfo) {
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetBufferOpaqueCaptureAddressKHR(device, pInfo);
+}
+
+VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR(
+ VkDevice device,
+ const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) {
+ const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+ return disp->GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo);
+}
+
+
// ---- VK_KHR_pipeline_executable_properties extension trampoline/terminators
VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR(
@@ -2552,7 +2717,18 @@ VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(
const VkDebugUtilsLabelEXT* pLabelInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
if (disp->QueueBeginDebugUtilsLabelEXT != NULL) {
- disp->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo);
+ disp->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_QueueBeginDebugUtilsLabelEXT(
+ VkQueue queue,
+ const VkDebugUtilsLabelEXT* pLabelInfo) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.QueueBeginDebugUtilsLabelEXT) {
+ icd_term->dispatch.QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo);
}
}
@@ -2560,7 +2736,17 @@ VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(
VkQueue queue) {
const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
if (disp->QueueEndDebugUtilsLabelEXT != NULL) {
- disp->QueueEndDebugUtilsLabelEXT(queue);
+ disp->QueueEndDebugUtilsLabelEXT(queue);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_QueueEndDebugUtilsLabelEXT(
+ VkQueue queue) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.QueueEndDebugUtilsLabelEXT) {
+ icd_term->dispatch.QueueEndDebugUtilsLabelEXT(queue);
}
}
@@ -2569,7 +2755,18 @@ VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(
const VkDebugUtilsLabelEXT* pLabelInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
if (disp->QueueInsertDebugUtilsLabelEXT != NULL) {
- disp->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo);
+ disp->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_QueueInsertDebugUtilsLabelEXT(
+ VkQueue queue,
+ const VkDebugUtilsLabelEXT* pLabelInfo) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.QueueInsertDebugUtilsLabelEXT) {
+ icd_term->dispatch.QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo);
}
}
@@ -2578,7 +2775,18 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(
const VkDebugUtilsLabelEXT* pLabelInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
if (disp->CmdBeginDebugUtilsLabelEXT != NULL) {
- disp->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
+ disp->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_CmdBeginDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugUtilsLabelEXT* pLabelInfo) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.CmdBeginDebugUtilsLabelEXT) {
+ icd_term->dispatch.CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
}
}
@@ -2586,7 +2794,17 @@ VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(
VkCommandBuffer commandBuffer) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
if (disp->CmdEndDebugUtilsLabelEXT != NULL) {
- disp->CmdEndDebugUtilsLabelEXT(commandBuffer);
+ disp->CmdEndDebugUtilsLabelEXT(commandBuffer);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_CmdEndDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.CmdEndDebugUtilsLabelEXT) {
+ icd_term->dispatch.CmdEndDebugUtilsLabelEXT(commandBuffer);
}
}
@@ -2595,7 +2813,18 @@ VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT(
const VkDebugUtilsLabelEXT* pLabelInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
if (disp->CmdInsertDebugUtilsLabelEXT != NULL) {
- disp->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
+ disp->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
+ }
+}
+
+VKAPI_ATTR void VKAPI_CALL terminator_CmdInsertDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugUtilsLabelEXT* pLabelInfo) {
+ uint32_t icd_index = 0;
+ struct loader_device *dev;
+ struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
+ if (NULL != icd_term && NULL != icd_term->dispatch.CmdInsertDebugUtilsLabelEXT) {
+ icd_term->dispatch.CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
}
}
@@ -3091,7 +3320,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateImagePipeSurfaceFUCHSIA(
VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT(
VkDevice device,
- const VkBufferDeviceAddressInfoEXT* pInfo) {
+ const VkBufferDeviceAddressInfo* pInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->GetBufferDeviceAddressEXT(device, pInfo);
}
@@ -3413,6 +3642,24 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na
return true;
}
+ // ---- VK_KHR_performance_query extension commands
+ if (!strcmp("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", name)) {
+ *addr = (void *)EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
+ return true;
+ }
+ if (!strcmp("vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", name)) {
+ *addr = (void *)GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
+ return true;
+ }
+ if (!strcmp("vkAcquireProfilingLockKHR", name)) {
+ *addr = (void *)AcquireProfilingLockKHR;
+ return true;
+ }
+ if (!strcmp("vkReleaseProfilingLockKHR", name)) {
+ *addr = (void *)ReleaseProfilingLockKHR;
+ return true;
+ }
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
if (!strcmp("vkGetPhysicalDeviceSurfaceCapabilities2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions.khr_get_surface_capabilities2 == 1)
@@ -3491,6 +3738,20 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na
return true;
}
+ // ---- VK_KHR_buffer_device_address extension commands
+ if (!strcmp("vkGetBufferDeviceAddressKHR", name)) {
+ *addr = (void *)GetBufferDeviceAddressKHR;
+ return true;
+ }
+ if (!strcmp("vkGetBufferOpaqueCaptureAddressKHR", name)) {
+ *addr = (void *)GetBufferOpaqueCaptureAddressKHR;
+ return true;
+ }
+ if (!strcmp("vkGetDeviceMemoryOpaqueCaptureAddressKHR", name)) {
+ *addr = (void *)GetDeviceMemoryOpaqueCaptureAddressKHR;
+ return true;
+ }
+
// ---- VK_KHR_pipeline_executable_properties extension commands
if (!strcmp("vkGetPipelineExecutablePropertiesKHR", name)) {
*addr = (void *)GetPipelineExecutablePropertiesKHR;
@@ -4013,6 +4274,12 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na
return true;
}
+ // ---- VK_EXT_tooling_info extension commands
+ if (!strcmp("vkGetPhysicalDeviceToolPropertiesEXT", name)) {
+ *addr = (void *)GetPhysicalDeviceToolPropertiesEXT;
+ return true;
+ }
+
// ---- VK_NV_cooperative_matrix extension commands
if (!strcmp("vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", name)) {
*addr = (void *)GetPhysicalDeviceCooperativeMatrixPropertiesNV;
@@ -4173,6 +4440,18 @@ PFN_vkVoidFunction get_extension_device_proc_terminator(struct loader_device *de
addr = (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT;
} else if(!strcmp(pName, "vkSetDebugUtilsObjectTagEXT")) {
addr = (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT;
+ } else if(!strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT;
+ } else if(!strcmp(pName, "vkQueueEndDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT;
+ } else if(!strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT;
+ } else if(!strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT;
+ } else if(!strcmp(pName, "vkCmdEndDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT;
+ } else if(!strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT")) {
+ addr = (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT;
}
}
#ifdef VK_USE_PLATFORM_WIN32_KHR
@@ -4296,6 +4575,10 @@ const VkLayerInstanceDispatchTable instance_disp = {
// ---- VK_KHR_external_fence_capabilities extension commands
.GetPhysicalDeviceExternalFencePropertiesKHR = terminator_GetPhysicalDeviceExternalFenceProperties,
+ // ---- VK_KHR_performance_query extension commands
+ .EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR,
+ .GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = terminator_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR,
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
.GetPhysicalDeviceSurfaceCapabilities2KHR = terminator_GetPhysicalDeviceSurfaceCapabilities2KHR,
.GetPhysicalDeviceSurfaceFormats2KHR = terminator_GetPhysicalDeviceSurfaceFormats2KHR,
@@ -4372,6 +4655,9 @@ const VkLayerInstanceDispatchTable instance_disp = {
.CreateMetalSurfaceEXT = terminator_CreateMetalSurfaceEXT,
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ .GetPhysicalDeviceToolPropertiesEXT = terminator_GetPhysicalDeviceToolPropertiesEXT,
+
// ---- VK_NV_cooperative_matrix extension commands
.GetPhysicalDeviceCooperativeMatrixPropertiesNV = terminator_GetPhysicalDeviceCooperativeMatrixPropertiesNV,
diff --git a/thirdparty/vulkan/loader/vk_loader_extensions.h b/thirdparty/vulkan/loader/vk_loader_extensions.h
index b08af33838..a50f3cdd32 100644
--- a/thirdparty/vulkan/loader/vk_loader_extensions.h
+++ b/thirdparty/vulkan/loader/vk_loader_extensions.h
@@ -320,6 +320,10 @@ struct loader_icd_term_dispatch {
// ---- VK_KHR_external_fence_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR;
+ // ---- VK_KHR_performance_query extension commands
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
+
// ---- VK_KHR_get_surface_capabilities2 extension commands
PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR;
PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR;
@@ -382,6 +386,12 @@ struct loader_icd_term_dispatch {
// ---- VK_EXT_debug_utils extension commands
PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT;
PFN_vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT;
+ PFN_vkQueueBeginDebugUtilsLabelEXT QueueBeginDebugUtilsLabelEXT;
+ PFN_vkQueueEndDebugUtilsLabelEXT QueueEndDebugUtilsLabelEXT;
+ PFN_vkQueueInsertDebugUtilsLabelEXT QueueInsertDebugUtilsLabelEXT;
+ PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT;
+ PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT;
+ PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT;
PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT;
PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT;
@@ -402,6 +412,9 @@ struct loader_icd_term_dispatch {
PFN_vkCreateMetalSurfaceEXT CreateMetalSurfaceEXT;
#endif // VK_USE_PLATFORM_METAL_EXT
+ // ---- VK_EXT_tooling_info extension commands
+ PFN_vkGetPhysicalDeviceToolPropertiesEXT GetPhysicalDeviceToolPropertiesEXT;
+
// ---- VK_NV_cooperative_matrix extension commands
PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV GetPhysicalDeviceCooperativeMatrixPropertiesNV;
diff --git a/thirdparty/vulkan/loader/vk_loader_platform.h b/thirdparty/vulkan/loader/vk_loader_platform.h
index 2ffda55367..7824e35d6b 100644
--- a/thirdparty/vulkan/loader/vk_loader_platform.h
+++ b/thirdparty/vulkan/loader/vk_loader_platform.h
@@ -279,31 +279,6 @@ static inline char *loader_platform_dirname(char *path) {
return path;
}
-// WIN32 runtime doesn't have basename().
-// Microsoft also doesn't have basename(). Paths are different on Windows, and
-// so this is just a temporary solution in order to get us compiling, so that we
-// can test some scenarios, and develop the correct solution for Windows.
-// TODO: Develop a better, permanent solution for Windows, to replace this
-// temporary code:
-static char *loader_platform_basename(char *pathname) {
- char *current, *next;
-
- // TODO/TBD: Do we need to deal with the Windows's ":" character?
-
- for (current = pathname; *current != '\0'; current = next) {
- next = strchr(current, DIRECTORY_SYMBOL);
- if (next == NULL) {
- // No more DIRECTORY_SYMBOL's so return p:
- return current;
- } else {
- // Point one character past the DIRECTORY_SYMBOL:
- next++;
- }
- }
- // We shouldn't get to here, but this makes the compiler happy:
- return current;
-}
-
// Dynamic Loading:
typedef HMODULE loader_platform_dl_handle;
static loader_platform_dl_handle loader_platform_open_library(const char *lib_path) {
@@ -336,15 +311,15 @@ static char *loader_platform_get_proc_address_error(const char *name) {
typedef HANDLE loader_platform_thread;
// __declspec(thread) is not supported by MinGW compiler (ignored with warning or
-// cause erorr depending on compiler switches)
+// cause error depending on compiler switches)
//
// __thread should be used instead
//
// __MINGW32__ defined for both 32 and 64 bit MinGW compilers, so it is enough to
-// detect any (32 or 64) flawor of MinGW compiler.
+// detect any (32 or 64) flavor of MinGW compiler.
//
// @note __GNUC__ could be used as a more generic way to detect _any_
-// GCC[-compitible] compiler on Windows, but this fix was tested
+// GCC[-compatible] compiler on Windows, but this fix was tested
// only with MinGW, so keep it explicit at the moment.
#if defined(__MINGW32__)
#define THREAD_LOCAL_DECL __thread
@@ -355,25 +330,9 @@ typedef HANDLE loader_platform_thread;
// The once init functionality is not used when building a DLL on Windows. This is because there is no way to clean up the
// resources allocated by anything allocated by once init. This isn't a problem for static libraries, but it is for dynamic
// ones. When building a DLL, we use DllMain() instead to allow properly cleaning up resources.
-#if defined(LOADER_DYNAMIC_LIB)
#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var)
#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var)
#define LOADER_PLATFORM_THREAD_ONCE(ctl, func)
-#else
-#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) INIT_ONCE var = INIT_ONCE_STATIC_INIT;
-#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) INIT_ONCE var;
-#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) loader_platform_thread_once_fn(ctl, func)
-static BOOL CALLBACK InitFuncWrapper(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context) {
- void (*func)(void) = (void (*)(void))Parameter;
- func();
- return TRUE;
-}
-static void loader_platform_thread_once_fn(void *ctl, void (*func)(void)) {
- assert(func != NULL);
- assert(ctl != NULL);
- InitOnceExecuteOnce((PINIT_ONCE)ctl, InitFuncWrapper, (void *)func, NULL);
-}
-#endif
// Thread IDs:
typedef DWORD loader_platform_thread_id;
diff --git a/thirdparty/vulkan/vk_enum_string_helper.h b/thirdparty/vulkan/vk_enum_string_helper.h
index a0b955e32b..00c2b9d1d5 100644
--- a/thirdparty/vulkan/vk_enum_string_helper.h
+++ b/thirdparty/vulkan/vk_enum_string_helper.h
@@ -4,10 +4,10 @@
/***************************************************************************
*
- * Copyright (c) 2015-2017 The Khronos Group Inc.
- * Copyright (c) 2015-2017 Valve Corporation
- * Copyright (c) 2015-2017 LunarG, Inc.
- * Copyright (c) 2015-2017 Google Inc.
+ * Copyright (c) 2015-2020 The Khronos Group Inc.
+ * Copyright (c) 2015-2020 Valve Corporation
+ * Copyright (c) 2015-2020 LunarG, Inc.
+ * Copyright (c) 2015-2020 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@
#pragma warning( disable : 4065 )
#endif
+#include <string>
#include <vulkan/vulkan.h>
@@ -53,64 +54,72 @@ static inline const char* string_VkResult(VkResult input_value)
{
switch ((VkResult)input_value)
{
- case VK_ERROR_INITIALIZATION_FAILED:
- return "VK_ERROR_INITIALIZATION_FAILED";
- case VK_ERROR_OUT_OF_DEVICE_MEMORY:
- return "VK_ERROR_OUT_OF_DEVICE_MEMORY";
- case VK_ERROR_NOT_PERMITTED_EXT:
- return "VK_ERROR_NOT_PERMITTED_EXT";
- case VK_ERROR_INVALID_EXTERNAL_HANDLE:
- return "VK_ERROR_INVALID_EXTERNAL_HANDLE";
- case VK_NOT_READY:
- return "VK_NOT_READY";
+ case VK_ERROR_DEVICE_LOST:
+ return "VK_ERROR_DEVICE_LOST";
+ case VK_ERROR_EXTENSION_NOT_PRESENT:
+ return "VK_ERROR_EXTENSION_NOT_PRESENT";
case VK_ERROR_FEATURE_NOT_PRESENT:
return "VK_ERROR_FEATURE_NOT_PRESENT";
- case VK_TIMEOUT:
- return "VK_TIMEOUT";
+ case VK_ERROR_FORMAT_NOT_SUPPORTED:
+ return "VK_ERROR_FORMAT_NOT_SUPPORTED";
+ case VK_ERROR_FRAGMENTATION:
+ return "VK_ERROR_FRAGMENTATION";
case VK_ERROR_FRAGMENTED_POOL:
return "VK_ERROR_FRAGMENTED_POOL";
- case VK_ERROR_LAYER_NOT_PRESENT:
- return "VK_ERROR_LAYER_NOT_PRESENT";
- case VK_ERROR_FRAGMENTATION_EXT:
- return "VK_ERROR_FRAGMENTATION_EXT";
+ case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT:
+ return "VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT";
case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:
return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR";
- case VK_SUCCESS:
- return "VK_SUCCESS";
+ case VK_ERROR_INCOMPATIBLE_DRIVER:
+ return "VK_ERROR_INCOMPATIBLE_DRIVER";
+ case VK_ERROR_INITIALIZATION_FAILED:
+ return "VK_ERROR_INITIALIZATION_FAILED";
+ case VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT:
+ return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT";
+ case VK_ERROR_INVALID_EXTERNAL_HANDLE:
+ return "VK_ERROR_INVALID_EXTERNAL_HANDLE";
+ case VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS:
+ return "VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS";
case VK_ERROR_INVALID_SHADER_NV:
return "VK_ERROR_INVALID_SHADER_NV";
- case VK_ERROR_FORMAT_NOT_SUPPORTED:
- return "VK_ERROR_FORMAT_NOT_SUPPORTED";
+ case VK_ERROR_LAYER_NOT_PRESENT:
+ return "VK_ERROR_LAYER_NOT_PRESENT";
+ case VK_ERROR_MEMORY_MAP_FAILED:
+ return "VK_ERROR_MEMORY_MAP_FAILED";
+ case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:
+ return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR";
+ case VK_ERROR_NOT_PERMITTED_EXT:
+ return "VK_ERROR_NOT_PERMITTED_EXT";
+ case VK_ERROR_OUT_OF_DATE_KHR:
+ return "VK_ERROR_OUT_OF_DATE_KHR";
+ case VK_ERROR_OUT_OF_DEVICE_MEMORY:
+ return "VK_ERROR_OUT_OF_DEVICE_MEMORY";
+ case VK_ERROR_OUT_OF_HOST_MEMORY:
+ return "VK_ERROR_OUT_OF_HOST_MEMORY";
+ case VK_ERROR_OUT_OF_POOL_MEMORY:
+ return "VK_ERROR_OUT_OF_POOL_MEMORY";
case VK_ERROR_SURFACE_LOST_KHR:
return "VK_ERROR_SURFACE_LOST_KHR";
- case VK_ERROR_VALIDATION_FAILED_EXT:
- return "VK_ERROR_VALIDATION_FAILED_EXT";
- case VK_SUBOPTIMAL_KHR:
- return "VK_SUBOPTIMAL_KHR";
case VK_ERROR_TOO_MANY_OBJECTS:
return "VK_ERROR_TOO_MANY_OBJECTS";
+ case VK_ERROR_UNKNOWN:
+ return "VK_ERROR_UNKNOWN";
+ case VK_ERROR_VALIDATION_FAILED_EXT:
+ return "VK_ERROR_VALIDATION_FAILED_EXT";
case VK_EVENT_RESET:
return "VK_EVENT_RESET";
- case VK_ERROR_OUT_OF_DATE_KHR:
- return "VK_ERROR_OUT_OF_DATE_KHR";
- case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:
- return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR";
- case VK_ERROR_MEMORY_MAP_FAILED:
- return "VK_ERROR_MEMORY_MAP_FAILED";
case VK_EVENT_SET:
return "VK_EVENT_SET";
- case VK_ERROR_INCOMPATIBLE_DRIVER:
- return "VK_ERROR_INCOMPATIBLE_DRIVER";
case VK_INCOMPLETE:
return "VK_INCOMPLETE";
- case VK_ERROR_DEVICE_LOST:
- return "VK_ERROR_DEVICE_LOST";
- case VK_ERROR_EXTENSION_NOT_PRESENT:
- return "VK_ERROR_EXTENSION_NOT_PRESENT";
- case VK_ERROR_OUT_OF_POOL_MEMORY:
- return "VK_ERROR_OUT_OF_POOL_MEMORY";
- case VK_ERROR_OUT_OF_HOST_MEMORY:
- return "VK_ERROR_OUT_OF_HOST_MEMORY";
+ case VK_NOT_READY:
+ return "VK_NOT_READY";
+ case VK_SUBOPTIMAL_KHR:
+ return "VK_SUBOPTIMAL_KHR";
+ case VK_SUCCESS:
+ return "VK_SUCCESS";
+ case VK_TIMEOUT:
+ return "VK_TIMEOUT";
default:
return "Unhandled VkResult";
}
@@ -120,468 +129,806 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
{
switch ((VkStructureType)input_value)
{
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER:
- return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER";
- case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
- return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV";
+ case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV:
+ return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV";
+ case VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR";
+ case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID:
+ return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID";
+ case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID:
+ return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID";
+ case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID:
+ return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID";
+ case VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_APPLICATION_INFO:
+ return "VK_STRUCTURE_TYPE_APPLICATION_INFO";
+ case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2:
+ return "VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2";
+ case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT:
+ return "VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT";
+ case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2:
+ return "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2";
+ case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT:
+ return "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT";
+ case VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV:
+ return "VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV";
+ case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO";
+ case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO";
+ case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO";
+ case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO";
+ case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR";
+ case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO";
+ case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO:
+ return "VK_STRUCTURE_TYPE_BIND_SPARSE_INFO";
+ case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO:
+ return "VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO";
+ case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER:
+ return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER";
+ case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2:
+ return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2";
+ case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT";
+ case VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV:
+ return "VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV";
+ case VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX:
+ return "VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX";
+ case VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX:
+ return "VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX";
+ case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT";
+ case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO:
+ return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO";
+ case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT";
+ case VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET:
+ return "VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET";
case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR:
return "VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR";
- case VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT";
case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT:
return "VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT";
case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT:
return "VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT";
- case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
- return "VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV";
case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO:
return "VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO";
- case VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2:
- return "VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2";
- case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV";
- case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
- return "VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO";
- case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV:
- return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO:
- return "VK_STRUCTURE_TYPE_BIND_SPARSE_INFO";
- case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2:
- return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2";
- case VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO";
- case VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES";
- case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO";
- case VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR";
- case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT";
case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO:
return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO";
- case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_APPLICATION_INFO:
- return "VK_STRUCTURE_TYPE_APPLICATION_INFO";
- case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT";
+ case VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX:
+ return "VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX";
+ case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX:
+ return "VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX";
case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO:
return "VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD:
+ return "VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD";
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2:
+ return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2";
case VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT:
return "VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT";
- case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT";
- case VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES:
- return "VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES";
- case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT:
- return "VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD:
+ return "VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD";
+ case VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT";
+ case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR";
+ case VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT:
+ return "VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT";
case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO:
return "VK_STRUCTURE_TYPE_EVENT_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES";
- case VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR:
- return "VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR";
- case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX:
- return "VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD";
- case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT:
- return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT";
- case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT:
- return "VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT";
+ case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV";
+ case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES";
+ case VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES";
+ case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID:
+ return "VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID";
+ case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES";
case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO:
return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO";
- case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN:
- return "VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN";
case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT";
- case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD:
- return "VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD";
- case VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR:
- return "VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES";
- case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR:
- return "VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR";
- case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT";
- case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO";
case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV:
return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR:
- return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR";
- case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO:
- return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR";
- case VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX:
- return "VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX";
- case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2:
- return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2";
- case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR";
- case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV";
- case VK_STRUCTURE_TYPE_SUBMIT_INFO:
- return "VK_STRUCTURE_TYPE_SUBMIT_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD:
- return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD";
- case VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT";
- case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES:
- return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES";
- case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT";
- case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV:
- return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV";
- case VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
- return "VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR";
- case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID:
- return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID";
- case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES";
case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO:
return "VK_STRUCTURE_TYPE_FENCE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO:
- return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO:
- return "VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO";
- case VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX:
- return "VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX";
- case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID:
- return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID";
- case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
- return "VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID";
- case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO:
- return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO";
- case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES";
- case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX";
- case VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX:
- return "VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX";
- case VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE:
- return "VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE";
- case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR:
- return "VK_STRUCTURE_TYPE_PRESENT_INFO_KHR";
+ case VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO:
+ return "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO";
case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO:
return "VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO";
- case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE:
- return "VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE";
- case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
- return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV:
+ return "VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV";
+ case VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV:
+ return "VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV";
+ case VK_STRUCTURE_TYPE_GEOMETRY_NV:
+ return "VK_STRUCTURE_TYPE_GEOMETRY_NV";
+ case VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV:
+ return "VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV";
+ case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_HDR_METADATA_EXT:
+ return "VK_STRUCTURE_TYPE_HDR_METADATA_EXT";
+ case VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA:
+ return "VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA";
+ case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER:
+ return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER";
+ case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2:
+ return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2";
+ case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
+ return "VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO";
+ case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2:
+ return "VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2";
+ case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT:
+ return "VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT";
case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO:
return "VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT";
- case VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK:
- return "VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK";
- case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR:
- return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO";
- case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER:
- return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER";
+ case VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX:
+ return "VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX";
case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO:
return "VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
+ return "VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID";
+ case VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT";
+ case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV";
+ case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX:
+ return "VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX";
+ case VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL";
+ case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK:
+ return "VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK";
+ case VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK:
+ return "VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK";
+ case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE:
+ return "VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE";
+ case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO:
+ return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO";
+ case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_MEMORY_BARRIER:
+ return "VK_STRUCTURE_TYPE_MEMORY_BARRIER";
+ case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS:
+ return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS";
+ case VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR:
+ return "VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR";
+ case VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
+ return "VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID";
+ case VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO:
+ return "VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO";
+ case VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2:
+ return "VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2";
case VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR:
return "VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR";
- case VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2";
- case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO";
- case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES";
- case VK_STRUCTURE_TYPE_HDR_METADATA_EXT:
- return "VK_STRUCTURE_TYPE_HDR_METADATA_EXT";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2";
- case VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES:
- return "VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES";
+ case VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX:
+ return "VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR";
+ case VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES";
- case VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2:
- return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO";
- case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO:
- return "VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO";
- case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
- return "VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO";
- case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX:
- return "VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX";
- case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS:
- return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES";
- case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_MEMORY_BARRIER:
- return "VK_STRUCTURE_TYPE_MEMORY_BARRIER";
- case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO:
- return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO";
- case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT:
- return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES";
- case VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2";
- case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO:
- return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO";
- case VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT";
- case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
- return "VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID";
- case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES:
- return "VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES";
- case VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2:
- return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2";
- case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV:
- return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV";
- case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT";
- case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO:
- return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO";
- case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
- return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO";
- case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD";
+ case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR:
+ return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR:
+ return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR:
+ return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD";
+ case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO";
case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO:
return "VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO";
- case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT:
- return "VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES";
- case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO:
- return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO";
- case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR";
- case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT:
- return "VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT";
- case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR:
- return "VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR";
+ case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP:
+ return "VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP";
+ case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_PRESENT_INFO_KHR";
+ case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
+ return "VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR";
+ case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE:
+ return "VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE";
+ case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO:
+ return "VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO";
+ case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL:
+ return "VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL";
+ case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV:
+ return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV";
+ case VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT";
case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO:
return "VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES:
+ return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES";
+ case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
+ return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO";
+ case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT";
+ case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR";
case VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR:
return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET:
- return "VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET";
- case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR";
- case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV:
- return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV";
- case VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO:
+ return "VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO";
+ case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO:
+ return "VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO";
+ case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO:
+ return "VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO";
+ case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR:
+ return "VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR";
+ case VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2:
+ return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2";
+ case VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2:
+ return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2";
+ case VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP:
+ return "VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP";
+ case VK_STRUCTURE_TYPE_SUBMIT_INFO:
+ return "VK_STRUCTURE_TYPE_SUBMIT_INFO";
+ case VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO:
+ return "VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO";
+ case VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2:
+ return "VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2";
+ case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2:
+ return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2";
+ case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE:
+ return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE";
+ case VK_STRUCTURE_TYPE_SUBPASS_END_INFO:
+ return "VK_STRUCTURE_TYPE_SUBPASS_END_INFO";
+ case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT:
+ return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT";
+ case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR:
+ return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR";
+ case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT:
+ return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT";
+ case VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR:
+ return "VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR";
+ case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT";
+ case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR:
+ return "VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR";
+ case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD:
+ return "VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD";
+ case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD:
+ return "VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD";
+ case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO:
+ return "VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO";
+ case VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT:
+ return "VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT";
+ case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT";
+ case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT:
+ return "VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT";
+ case VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN:
+ return "VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN";
+ case VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV:
+ return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV";
+ case VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR";
case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET:
return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES";
- case VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK:
- return "VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK";
- case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID:
- return "VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID";
- case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO:
- return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO";
- case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR";
- case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT:
- return "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT";
- case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO:
- return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO";
- case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO:
- return "VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO";
- case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID:
- return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID";
- case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX:
- return "VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX";
- case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2:
- return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2";
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
- return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2";
- case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR:
- return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR";
- case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2:
- return "VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2";
+ case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV:
+ return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV";
+ case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT:
+ return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT";
+ case VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR";
+ case VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR:
+ return "VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR";
default:
return "Unhandled VkStructureType";
}
@@ -591,16 +938,16 @@ static inline const char* string_VkSystemAllocationScope(VkSystemAllocationScope
{
switch ((VkSystemAllocationScope)input_value)
{
- case VK_SYSTEM_ALLOCATION_SCOPE_COMMAND:
- return "VK_SYSTEM_ALLOCATION_SCOPE_COMMAND";
case VK_SYSTEM_ALLOCATION_SCOPE_CACHE:
return "VK_SYSTEM_ALLOCATION_SCOPE_CACHE";
+ case VK_SYSTEM_ALLOCATION_SCOPE_COMMAND:
+ return "VK_SYSTEM_ALLOCATION_SCOPE_COMMAND";
+ case VK_SYSTEM_ALLOCATION_SCOPE_DEVICE:
+ return "VK_SYSTEM_ALLOCATION_SCOPE_DEVICE";
case VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE:
return "VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE";
case VK_SYSTEM_ALLOCATION_SCOPE_OBJECT:
return "VK_SYSTEM_ALLOCATION_SCOPE_OBJECT";
- case VK_SYSTEM_ALLOCATION_SCOPE_DEVICE:
- return "VK_SYSTEM_ALLOCATION_SCOPE_DEVICE";
default:
return "Unhandled VkSystemAllocationScope";
}
@@ -621,460 +968,488 @@ static inline const char* string_VkFormat(VkFormat input_value)
{
switch ((VkFormat)input_value)
{
- case VK_FORMAT_R32G32B32_SINT:
- return "VK_FORMAT_R32G32B32_SINT";
- case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:
- return "VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM";
- case VK_FORMAT_B8G8R8A8_UINT:
- return "VK_FORMAT_B8G8R8A8_UINT";
- case VK_FORMAT_ASTC_5x5_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_5x5_SRGB_BLOCK";
- case VK_FORMAT_A2R10G10B10_UINT_PACK32:
- return "VK_FORMAT_A2R10G10B10_UINT_PACK32";
- case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK";
- case VK_FORMAT_ASTC_8x6_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_8x6_UNORM_BLOCK";
- case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
- return "VK_FORMAT_B4G4R4A4_UNORM_PACK16";
- case VK_FORMAT_R16G16_SINT:
- return "VK_FORMAT_R16G16_SINT";
- case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
- return "VK_FORMAT_BC1_RGB_SRGB_BLOCK";
- case VK_FORMAT_R8G8_USCALED:
- return "VK_FORMAT_R8G8_USCALED";
- case VK_FORMAT_ASTC_10x8_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_10x8_UNORM_BLOCK";
- case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
- return "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM";
- case VK_FORMAT_B8G8R8A8_SNORM:
- return "VK_FORMAT_B8G8R8A8_SNORM";
- case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
- return "VK_FORMAT_B5G5R5A1_UNORM_PACK16";
- case VK_FORMAT_R64G64_UINT:
- return "VK_FORMAT_R64G64_UINT";
- case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
- return "VK_FORMAT_R5G5B5A1_UNORM_PACK16";
- case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
- return "VK_FORMAT_A2B10G10R10_UNORM_PACK32";
- case VK_FORMAT_R16G16_USCALED:
- return "VK_FORMAT_R16G16_USCALED";
- case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:
- return "VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM";
- case VK_FORMAT_ASTC_8x8_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_8x8_UNORM_BLOCK";
- case VK_FORMAT_R8G8_SSCALED:
- return "VK_FORMAT_R8G8_SSCALED";
- case VK_FORMAT_R16G16_SSCALED:
- return "VK_FORMAT_R16G16_SSCALED";
- case VK_FORMAT_ASTC_8x5_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_8x5_UNORM_BLOCK";
- case VK_FORMAT_EAC_R11_UNORM_BLOCK:
- return "VK_FORMAT_EAC_R11_UNORM_BLOCK";
case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
return "VK_FORMAT_A1R5G5B5_UNORM_PACK16";
- case VK_FORMAT_R16_USCALED:
- return "VK_FORMAT_R16_USCALED";
- case VK_FORMAT_BC2_UNORM_BLOCK:
- return "VK_FORMAT_BC2_UNORM_BLOCK";
- case VK_FORMAT_R16_UNORM:
- return "VK_FORMAT_R16_UNORM";
- case VK_FORMAT_R8_USCALED:
- return "VK_FORMAT_R8_USCALED";
- case VK_FORMAT_R16G16_UNORM:
- return "VK_FORMAT_R16G16_UNORM";
- case VK_FORMAT_ASTC_10x5_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_10x5_UNORM_BLOCK";
- case VK_FORMAT_R16G16B16_SFLOAT:
- return "VK_FORMAT_R16G16B16_SFLOAT";
- case VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:
- return "VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG";
+ case VK_FORMAT_A2B10G10R10_SINT_PACK32:
+ return "VK_FORMAT_A2B10G10R10_SINT_PACK32";
+ case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
+ return "VK_FORMAT_A2B10G10R10_SNORM_PACK32";
+ case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
+ return "VK_FORMAT_A2B10G10R10_SSCALED_PACK32";
+ case VK_FORMAT_A2B10G10R10_UINT_PACK32:
+ return "VK_FORMAT_A2B10G10R10_UINT_PACK32";
+ case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
+ return "VK_FORMAT_A2B10G10R10_UNORM_PACK32";
+ case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
+ return "VK_FORMAT_A2B10G10R10_USCALED_PACK32";
+ case VK_FORMAT_A2R10G10B10_SINT_PACK32:
+ return "VK_FORMAT_A2R10G10B10_SINT_PACK32";
case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
return "VK_FORMAT_A2R10G10B10_SNORM_PACK32";
- case VK_FORMAT_ASTC_10x6_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_10x6_SRGB_BLOCK";
- case VK_FORMAT_R8_UNORM:
- return "VK_FORMAT_R8_UNORM";
- case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:
- return "VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG";
+ case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
+ return "VK_FORMAT_A2R10G10B10_SSCALED_PACK32";
+ case VK_FORMAT_A2R10G10B10_UINT_PACK32:
+ return "VK_FORMAT_A2R10G10B10_UINT_PACK32";
+ case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
+ return "VK_FORMAT_A2R10G10B10_UNORM_PACK32";
+ case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
+ return "VK_FORMAT_A2R10G10B10_USCALED_PACK32";
case VK_FORMAT_A8B8G8R8_SINT_PACK32:
return "VK_FORMAT_A8B8G8R8_SINT_PACK32";
- case VK_FORMAT_B8G8R8_UNORM:
- return "VK_FORMAT_B8G8R8_UNORM";
- case VK_FORMAT_R8G8_UINT:
- return "VK_FORMAT_R8G8_UINT";
- case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK";
- case VK_FORMAT_R8_SSCALED:
- return "VK_FORMAT_R8_SSCALED";
+ case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
+ return "VK_FORMAT_A8B8G8R8_SNORM_PACK32";
case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
return "VK_FORMAT_A8B8G8R8_SRGB_PACK32";
- case VK_FORMAT_BC7_UNORM_BLOCK:
- return "VK_FORMAT_BC7_UNORM_BLOCK";
- case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
- return "VK_FORMAT_A2R10G10B10_SSCALED_PACK32";
- case VK_FORMAT_R16G16B16A16_SINT:
- return "VK_FORMAT_R16G16B16A16_SINT";
- case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:
- return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16";
- case VK_FORMAT_B8G8R8A8_SSCALED:
- return "VK_FORMAT_B8G8R8A8_SSCALED";
- case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:
- return "VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM";
- case VK_FORMAT_R8G8B8_USCALED:
- return "VK_FORMAT_R8G8B8_USCALED";
- case VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:
- return "VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG";
- case VK_FORMAT_B8G8R8_SRGB:
- return "VK_FORMAT_B8G8R8_SRGB";
- case VK_FORMAT_A2B10G10R10_UINT_PACK32:
- return "VK_FORMAT_A2B10G10R10_UINT_PACK32";
- case VK_FORMAT_R64G64_SINT:
- return "VK_FORMAT_R64G64_SINT";
- case VK_FORMAT_B8G8R8G8_422_UNORM:
- return "VK_FORMAT_B8G8R8G8_422_UNORM";
- case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:
- return "VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM";
- case VK_FORMAT_R64_UINT:
- return "VK_FORMAT_R64_UINT";
- case VK_FORMAT_EAC_R11G11_UNORM_BLOCK:
- return "VK_FORMAT_EAC_R11G11_UNORM_BLOCK";
- case VK_FORMAT_BC5_SNORM_BLOCK:
- return "VK_FORMAT_BC5_SNORM_BLOCK";
- case VK_FORMAT_ASTC_6x5_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_6x5_SRGB_BLOCK";
- case VK_FORMAT_R16G16B16A16_SSCALED:
- return "VK_FORMAT_R16G16B16A16_SSCALED";
- case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:
- return "VK_FORMAT_G8_B8R8_2PLANE_422_UNORM";
- case VK_FORMAT_R32G32B32_UINT:
- return "VK_FORMAT_R32G32B32_UINT";
- case VK_FORMAT_R8G8_SNORM:
- return "VK_FORMAT_R8G8_SNORM";
- case VK_FORMAT_B8G8R8_USCALED:
- return "VK_FORMAT_B8G8R8_USCALED";
- case VK_FORMAT_R16G16B16A16_SFLOAT:
- return "VK_FORMAT_R16G16B16A16_SFLOAT";
- case VK_FORMAT_R16G16B16_USCALED:
- return "VK_FORMAT_R16G16B16_USCALED";
- case VK_FORMAT_A2R10G10B10_SINT_PACK32:
- return "VK_FORMAT_A2R10G10B10_SINT_PACK32";
- case VK_FORMAT_R32_SINT:
- return "VK_FORMAT_R32_SINT";
- case VK_FORMAT_R64_SINT:
- return "VK_FORMAT_R64_SINT";
+ case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
+ return "VK_FORMAT_A8B8G8R8_SSCALED_PACK32";
+ case VK_FORMAT_A8B8G8R8_UINT_PACK32:
+ return "VK_FORMAT_A8B8G8R8_UINT_PACK32";
+ case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
+ return "VK_FORMAT_A8B8G8R8_UNORM_PACK32";
case VK_FORMAT_A8B8G8R8_USCALED_PACK32:
return "VK_FORMAT_A8B8G8R8_USCALED_PACK32";
- case VK_FORMAT_D24_UNORM_S8_UINT:
- return "VK_FORMAT_D24_UNORM_S8_UINT";
- case VK_FORMAT_G8B8G8R8_422_UNORM:
- return "VK_FORMAT_G8B8G8R8_422_UNORM";
- case VK_FORMAT_BC4_SNORM_BLOCK:
- return "VK_FORMAT_BC4_SNORM_BLOCK";
- case VK_FORMAT_R16G16_SFLOAT:
- return "VK_FORMAT_R16G16_SFLOAT";
- case VK_FORMAT_BC1_RGB_UNORM_BLOCK:
- return "VK_FORMAT_BC1_RGB_UNORM_BLOCK";
- case VK_FORMAT_R64_SFLOAT:
- return "VK_FORMAT_R64_SFLOAT";
- case VK_FORMAT_R64G64B64_SFLOAT:
- return "VK_FORMAT_R64G64B64_SFLOAT";
- case VK_FORMAT_BC3_SRGB_BLOCK:
- return "VK_FORMAT_BC3_SRGB_BLOCK";
- case VK_FORMAT_S8_UINT:
- return "VK_FORMAT_S8_UINT";
- case VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:
- return "VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG";
- case VK_FORMAT_R8G8B8_SNORM:
- return "VK_FORMAT_R8G8B8_SNORM";
- case VK_FORMAT_D32_SFLOAT:
- return "VK_FORMAT_D32_SFLOAT";
+ case VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT";
case VK_FORMAT_ASTC_10x10_SRGB_BLOCK:
return "VK_FORMAT_ASTC_10x10_SRGB_BLOCK";
- case VK_FORMAT_ASTC_4x4_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_4x4_SRGB_BLOCK";
- case VK_FORMAT_R12X4G12X4_UNORM_2PACK16:
- return "VK_FORMAT_R12X4G12X4_UNORM_2PACK16";
- case VK_FORMAT_G16B16G16R16_422_UNORM:
- return "VK_FORMAT_G16B16G16R16_422_UNORM";
- case VK_FORMAT_BC7_SRGB_BLOCK:
- return "VK_FORMAT_BC7_SRGB_BLOCK";
- case VK_FORMAT_R16G16_SNORM:
- return "VK_FORMAT_R16G16_SNORM";
- case VK_FORMAT_R32_UINT:
- return "VK_FORMAT_R32_UINT";
- case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
- return "VK_FORMAT_R4G4B4A4_UNORM_PACK16";
- case VK_FORMAT_A2R10G10B10_USCALED_PACK32:
- return "VK_FORMAT_A2R10G10B10_USCALED_PACK32";
- case VK_FORMAT_R32_SFLOAT:
- return "VK_FORMAT_R32_SFLOAT";
+ case VK_FORMAT_ASTC_10x10_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_10x10_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT";
case VK_FORMAT_ASTC_10x5_SRGB_BLOCK:
return "VK_FORMAT_ASTC_10x5_SRGB_BLOCK";
- case VK_FORMAT_R32G32B32_SFLOAT:
- return "VK_FORMAT_R32G32B32_SFLOAT";
- case VK_FORMAT_R16_UINT:
- return "VK_FORMAT_R16_UINT";
- case VK_FORMAT_ASTC_12x12_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_12x12_UNORM_BLOCK";
- case VK_FORMAT_R8G8_SRGB:
- return "VK_FORMAT_R8G8_SRGB";
- case VK_FORMAT_R64G64B64A64_UINT:
- return "VK_FORMAT_R64G64B64A64_UINT";
+ case VK_FORMAT_ASTC_10x5_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_10x5_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_10x6_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_10x6_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_10x6_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_10x6_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_10x8_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_10x8_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_10x8_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_10x8_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT";
case VK_FORMAT_ASTC_12x10_SRGB_BLOCK:
return "VK_FORMAT_ASTC_12x10_SRGB_BLOCK";
- case VK_FORMAT_R16G16B16_SNORM:
- return "VK_FORMAT_R16G16B16_SNORM";
- case VK_FORMAT_R32G32_UINT:
- return "VK_FORMAT_R32G32_UINT";
- case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
- return "VK_FORMAT_BC1_RGBA_UNORM_BLOCK";
- case VK_FORMAT_R8G8B8_UNORM:
- return "VK_FORMAT_R8G8B8_UNORM";
- case VK_FORMAT_R8G8B8A8_SSCALED:
- return "VK_FORMAT_R8G8B8A8_SSCALED";
- case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:
- return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16";
- case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:
- return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16";
- case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:
- return "VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM";
- case VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:
- return "VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG";
- case VK_FORMAT_R16G16B16A16_USCALED:
- return "VK_FORMAT_R16G16B16A16_USCALED";
- case VK_FORMAT_R8G8B8_SINT:
- return "VK_FORMAT_R8G8B8_SINT";
- case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:
- return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16";
- case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:
- return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16";
+ case VK_FORMAT_ASTC_12x10_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_12x10_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_12x12_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_12x12_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_12x12_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_12x12_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_4x4_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_4x4_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_4x4_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_4x4_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_5x4_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_5x4_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_5x4_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_5x4_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_5x5_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_5x5_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_5x5_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_5x5_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_6x5_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_6x5_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_6x5_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_6x5_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_6x6_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_6x6_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_6x6_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_6x6_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_8x5_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_8x5_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_8x5_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_8x5_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_8x6_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_8x6_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_8x6_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_8x6_UNORM_BLOCK";
+ case VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:
+ return "VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT";
+ case VK_FORMAT_ASTC_8x8_SRGB_BLOCK:
+ return "VK_FORMAT_ASTC_8x8_SRGB_BLOCK";
+ case VK_FORMAT_ASTC_8x8_UNORM_BLOCK:
+ return "VK_FORMAT_ASTC_8x8_UNORM_BLOCK";
+ case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
+ return "VK_FORMAT_B10G11R11_UFLOAT_PACK32";
+ case VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:
+ return "VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16";
+ case VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:
+ return "VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16";
case VK_FORMAT_B16G16R16G16_422_UNORM:
return "VK_FORMAT_B16G16R16G16_422_UNORM";
- case VK_FORMAT_R16G16B16_SINT:
- return "VK_FORMAT_R16G16B16_SINT";
- case VK_FORMAT_UNDEFINED:
- return "VK_FORMAT_UNDEFINED";
+ case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
+ return "VK_FORMAT_B4G4R4A4_UNORM_PACK16";
+ case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
+ return "VK_FORMAT_B5G5R5A1_UNORM_PACK16";
case VK_FORMAT_B5G6R5_UNORM_PACK16:
return "VK_FORMAT_B5G6R5_UNORM_PACK16";
- case VK_FORMAT_R8G8B8A8_SRGB:
- return "VK_FORMAT_R8G8B8A8_SRGB";
- case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
- return "VK_FORMAT_A2B10G10R10_SSCALED_PACK32";
+ case VK_FORMAT_B8G8R8A8_SINT:
+ return "VK_FORMAT_B8G8R8A8_SINT";
+ case VK_FORMAT_B8G8R8A8_SNORM:
+ return "VK_FORMAT_B8G8R8A8_SNORM";
+ case VK_FORMAT_B8G8R8A8_SRGB:
+ return "VK_FORMAT_B8G8R8A8_SRGB";
+ case VK_FORMAT_B8G8R8A8_SSCALED:
+ return "VK_FORMAT_B8G8R8A8_SSCALED";
+ case VK_FORMAT_B8G8R8A8_UINT:
+ return "VK_FORMAT_B8G8R8A8_UINT";
+ case VK_FORMAT_B8G8R8A8_UNORM:
+ return "VK_FORMAT_B8G8R8A8_UNORM";
+ case VK_FORMAT_B8G8R8A8_USCALED:
+ return "VK_FORMAT_B8G8R8A8_USCALED";
+ case VK_FORMAT_B8G8R8G8_422_UNORM:
+ return "VK_FORMAT_B8G8R8G8_422_UNORM";
case VK_FORMAT_B8G8R8_SINT:
return "VK_FORMAT_B8G8R8_SINT";
- case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
- return "VK_FORMAT_B10G11R11_UFLOAT_PACK32";
+ case VK_FORMAT_B8G8R8_SNORM:
+ return "VK_FORMAT_B8G8R8_SNORM";
+ case VK_FORMAT_B8G8R8_SRGB:
+ return "VK_FORMAT_B8G8R8_SRGB";
+ case VK_FORMAT_B8G8R8_SSCALED:
+ return "VK_FORMAT_B8G8R8_SSCALED";
+ case VK_FORMAT_B8G8R8_UINT:
+ return "VK_FORMAT_B8G8R8_UINT";
+ case VK_FORMAT_B8G8R8_UNORM:
+ return "VK_FORMAT_B8G8R8_UNORM";
+ case VK_FORMAT_B8G8R8_USCALED:
+ return "VK_FORMAT_B8G8R8_USCALED";
+ case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
+ return "VK_FORMAT_BC1_RGBA_SRGB_BLOCK";
+ case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
+ return "VK_FORMAT_BC1_RGBA_UNORM_BLOCK";
+ case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
+ return "VK_FORMAT_BC1_RGB_SRGB_BLOCK";
+ case VK_FORMAT_BC1_RGB_UNORM_BLOCK:
+ return "VK_FORMAT_BC1_RGB_UNORM_BLOCK";
+ case VK_FORMAT_BC2_SRGB_BLOCK:
+ return "VK_FORMAT_BC2_SRGB_BLOCK";
+ case VK_FORMAT_BC2_UNORM_BLOCK:
+ return "VK_FORMAT_BC2_UNORM_BLOCK";
+ case VK_FORMAT_BC3_SRGB_BLOCK:
+ return "VK_FORMAT_BC3_SRGB_BLOCK";
+ case VK_FORMAT_BC3_UNORM_BLOCK:
+ return "VK_FORMAT_BC3_UNORM_BLOCK";
+ case VK_FORMAT_BC4_SNORM_BLOCK:
+ return "VK_FORMAT_BC4_SNORM_BLOCK";
+ case VK_FORMAT_BC4_UNORM_BLOCK:
+ return "VK_FORMAT_BC4_UNORM_BLOCK";
+ case VK_FORMAT_BC5_SNORM_BLOCK:
+ return "VK_FORMAT_BC5_SNORM_BLOCK";
case VK_FORMAT_BC5_UNORM_BLOCK:
return "VK_FORMAT_BC5_UNORM_BLOCK";
- case VK_FORMAT_ASTC_5x4_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_5x4_SRGB_BLOCK";
- case VK_FORMAT_ASTC_5x4_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_5x4_UNORM_BLOCK";
- case VK_FORMAT_R8G8B8A8_SINT:
- return "VK_FORMAT_R8G8B8A8_SINT";
- case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:
- return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16";
- case VK_FORMAT_R8G8B8A8_UNORM:
- return "VK_FORMAT_R8G8B8A8_UNORM";
- case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:
- return "VK_FORMAT_G16_B16R16_2PLANE_420_UNORM";
- case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:
- return "VK_FORMAT_G16_B16R16_2PLANE_422_UNORM";
+ case VK_FORMAT_BC6H_SFLOAT_BLOCK:
+ return "VK_FORMAT_BC6H_SFLOAT_BLOCK";
+ case VK_FORMAT_BC6H_UFLOAT_BLOCK:
+ return "VK_FORMAT_BC6H_UFLOAT_BLOCK";
+ case VK_FORMAT_BC7_SRGB_BLOCK:
+ return "VK_FORMAT_BC7_SRGB_BLOCK";
+ case VK_FORMAT_BC7_UNORM_BLOCK:
+ return "VK_FORMAT_BC7_UNORM_BLOCK";
+ case VK_FORMAT_D16_UNORM:
+ return "VK_FORMAT_D16_UNORM";
+ case VK_FORMAT_D16_UNORM_S8_UINT:
+ return "VK_FORMAT_D16_UNORM_S8_UINT";
+ case VK_FORMAT_D24_UNORM_S8_UINT:
+ return "VK_FORMAT_D24_UNORM_S8_UINT";
+ case VK_FORMAT_D32_SFLOAT:
+ return "VK_FORMAT_D32_SFLOAT";
+ case VK_FORMAT_D32_SFLOAT_S8_UINT:
+ return "VK_FORMAT_D32_SFLOAT_S8_UINT";
+ case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
+ return "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32";
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK:
return "VK_FORMAT_EAC_R11G11_SNORM_BLOCK";
- case VK_FORMAT_R8G8_UNORM:
- return "VK_FORMAT_R8G8_UNORM";
- case VK_FORMAT_A2B10G10R10_SINT_PACK32:
- return "VK_FORMAT_A2B10G10R10_SINT_PACK32";
- case VK_FORMAT_ASTC_4x4_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_4x4_UNORM_BLOCK";
+ case VK_FORMAT_EAC_R11G11_UNORM_BLOCK:
+ return "VK_FORMAT_EAC_R11G11_UNORM_BLOCK";
+ case VK_FORMAT_EAC_R11_SNORM_BLOCK:
+ return "VK_FORMAT_EAC_R11_SNORM_BLOCK";
+ case VK_FORMAT_EAC_R11_UNORM_BLOCK:
+ return "VK_FORMAT_EAC_R11_UNORM_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK";
+ case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
+ return "VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK";
+ case VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:
+ return "VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16";
+ case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:
+ return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16";
case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:
return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16";
- case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:
- return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16";
- case VK_FORMAT_R16_SINT:
- return "VK_FORMAT_R16_SINT";
- case VK_FORMAT_R8G8B8_SRGB:
- return "VK_FORMAT_R8G8B8_SRGB";
- case VK_FORMAT_B8G8R8_SNORM:
- return "VK_FORMAT_B8G8R8_SNORM";
- case VK_FORMAT_ASTC_12x12_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_12x12_SRGB_BLOCK";
- case VK_FORMAT_BC2_SRGB_BLOCK:
- return "VK_FORMAT_BC2_SRGB_BLOCK";
- case VK_FORMAT_R10X6_UNORM_PACK16:
- return "VK_FORMAT_R10X6_UNORM_PACK16";
- case VK_FORMAT_R64G64_SFLOAT:
- return "VK_FORMAT_R64G64_SFLOAT";
- case VK_FORMAT_R4G4_UNORM_PACK8:
- return "VK_FORMAT_R4G4_UNORM_PACK8";
- case VK_FORMAT_R16_SSCALED:
- return "VK_FORMAT_R16_SSCALED";
case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:
return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16";
- case VK_FORMAT_R32G32B32A32_SINT:
- return "VK_FORMAT_R32G32B32A32_SINT";
- case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK";
+ case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:
+ return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16";
+ case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:
+ return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16";
+ case VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:
+ return "VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16";
+ case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:
+ return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16";
+ case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:
+ return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16";
+ case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:
+ return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16";
+ case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:
+ return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16";
+ case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:
+ return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16";
+ case VK_FORMAT_G16B16G16R16_422_UNORM:
+ return "VK_FORMAT_G16B16G16R16_422_UNORM";
+ case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:
+ return "VK_FORMAT_G16_B16R16_2PLANE_420_UNORM";
+ case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:
+ return "VK_FORMAT_G16_B16R16_2PLANE_422_UNORM";
+ case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:
+ return "VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM";
+ case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:
+ return "VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM";
+ case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:
+ return "VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM";
+ case VK_FORMAT_G8B8G8R8_422_UNORM:
+ return "VK_FORMAT_G8B8G8R8_422_UNORM";
+ case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
+ return "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM";
+ case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:
+ return "VK_FORMAT_G8_B8R8_2PLANE_422_UNORM";
+ case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
+ return "VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM";
+ case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:
+ return "VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM";
+ case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:
+ return "VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM";
case VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:
return "VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG";
- case VK_FORMAT_R8G8B8_UINT:
- return "VK_FORMAT_R8G8B8_UINT";
- case VK_FORMAT_R16G16B16_UNORM:
- return "VK_FORMAT_R16G16B16_UNORM";
- case VK_FORMAT_R16G16B16_UINT:
- return "VK_FORMAT_R16G16B16_UINT";
- case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
- return "VK_FORMAT_A8B8G8R8_UNORM_PACK32";
- case VK_FORMAT_B8G8R8_SSCALED:
- return "VK_FORMAT_B8G8R8_SSCALED";
- case VK_FORMAT_X8_D24_UNORM_PACK32:
- return "VK_FORMAT_X8_D24_UNORM_PACK32";
- case VK_FORMAT_R32G32_SFLOAT:
- return "VK_FORMAT_R32G32_SFLOAT";
- case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
- return "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32";
- case VK_FORMAT_ASTC_6x6_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_6x6_SRGB_BLOCK";
+ case VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG";
+ case VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG";
+ case VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG";
+ case VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG";
+ case VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG";
+ case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:
+ return "VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG";
case VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:
return "VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG";
- case VK_FORMAT_R16G16B16A16_UINT:
- return "VK_FORMAT_R16G16B16A16_UINT";
- case VK_FORMAT_R8G8B8A8_USCALED:
- return "VK_FORMAT_R8G8B8A8_USCALED";
- case VK_FORMAT_R16G16B16A16_SNORM:
- return "VK_FORMAT_R16G16B16A16_SNORM";
- case VK_FORMAT_R16G16B16A16_UNORM:
- return "VK_FORMAT_R16G16B16A16_UNORM";
- case VK_FORMAT_D16_UNORM:
- return "VK_FORMAT_D16_UNORM";
- case VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:
- return "VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16";
- case VK_FORMAT_BC3_UNORM_BLOCK:
- return "VK_FORMAT_BC3_UNORM_BLOCK";
- case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
- return "VK_FORMAT_A2B10G10R10_USCALED_PACK32";
- case VK_FORMAT_R8_SRGB:
- return "VK_FORMAT_R8_SRGB";
- case VK_FORMAT_R32G32B32A32_SFLOAT:
- return "VK_FORMAT_R32G32B32A32_SFLOAT";
- case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
- return "VK_FORMAT_A2R10G10B10_UNORM_PACK32";
- case VK_FORMAT_R8G8_SINT:
- return "VK_FORMAT_R8G8_SINT";
case VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:
return "VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16";
- case VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:
- return "VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16";
- case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
- return "VK_FORMAT_A2B10G10R10_SNORM_PACK32";
- case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
- return "VK_FORMAT_BC1_RGBA_SRGB_BLOCK";
- case VK_FORMAT_D32_SFLOAT_S8_UINT:
- return "VK_FORMAT_D32_SFLOAT_S8_UINT";
- case VK_FORMAT_B8G8R8A8_USCALED:
- return "VK_FORMAT_B8G8R8A8_USCALED";
- case VK_FORMAT_ASTC_6x6_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_6x6_UNORM_BLOCK";
- case VK_FORMAT_R5G6B5_UNORM_PACK16:
- return "VK_FORMAT_R5G6B5_UNORM_PACK16";
- case VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK";
+ case VK_FORMAT_R10X6G10X6_UNORM_2PACK16:
+ return "VK_FORMAT_R10X6G10X6_UNORM_2PACK16";
+ case VK_FORMAT_R10X6_UNORM_PACK16:
+ return "VK_FORMAT_R10X6_UNORM_PACK16";
case VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:
return "VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16";
- case VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:
- return "VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG";
- case VK_FORMAT_R8G8B8A8_SNORM:
- return "VK_FORMAT_R8G8B8A8_SNORM";
- case VK_FORMAT_ASTC_10x10_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_10x10_UNORM_BLOCK";
- case VK_FORMAT_BC6H_SFLOAT_BLOCK:
- return "VK_FORMAT_BC6H_SFLOAT_BLOCK";
+ case VK_FORMAT_R12X4G12X4_UNORM_2PACK16:
+ return "VK_FORMAT_R12X4G12X4_UNORM_2PACK16";
+ case VK_FORMAT_R12X4_UNORM_PACK16:
+ return "VK_FORMAT_R12X4_UNORM_PACK16";
+ case VK_FORMAT_R16G16B16A16_SFLOAT:
+ return "VK_FORMAT_R16G16B16A16_SFLOAT";
+ case VK_FORMAT_R16G16B16A16_SINT:
+ return "VK_FORMAT_R16G16B16A16_SINT";
+ case VK_FORMAT_R16G16B16A16_SNORM:
+ return "VK_FORMAT_R16G16B16A16_SNORM";
+ case VK_FORMAT_R16G16B16A16_SSCALED:
+ return "VK_FORMAT_R16G16B16A16_SSCALED";
+ case VK_FORMAT_R16G16B16A16_UINT:
+ return "VK_FORMAT_R16G16B16A16_UINT";
+ case VK_FORMAT_R16G16B16A16_UNORM:
+ return "VK_FORMAT_R16G16B16A16_UNORM";
+ case VK_FORMAT_R16G16B16A16_USCALED:
+ return "VK_FORMAT_R16G16B16A16_USCALED";
+ case VK_FORMAT_R16G16B16_SFLOAT:
+ return "VK_FORMAT_R16G16B16_SFLOAT";
+ case VK_FORMAT_R16G16B16_SINT:
+ return "VK_FORMAT_R16G16B16_SINT";
+ case VK_FORMAT_R16G16B16_SNORM:
+ return "VK_FORMAT_R16G16B16_SNORM";
+ case VK_FORMAT_R16G16B16_SSCALED:
+ return "VK_FORMAT_R16G16B16_SSCALED";
+ case VK_FORMAT_R16G16B16_UINT:
+ return "VK_FORMAT_R16G16B16_UINT";
+ case VK_FORMAT_R16G16B16_UNORM:
+ return "VK_FORMAT_R16G16B16_UNORM";
+ case VK_FORMAT_R16G16B16_USCALED:
+ return "VK_FORMAT_R16G16B16_USCALED";
+ case VK_FORMAT_R16G16_SFLOAT:
+ return "VK_FORMAT_R16G16_SFLOAT";
+ case VK_FORMAT_R16G16_SINT:
+ return "VK_FORMAT_R16G16_SINT";
+ case VK_FORMAT_R16G16_SNORM:
+ return "VK_FORMAT_R16G16_SNORM";
+ case VK_FORMAT_R16G16_SSCALED:
+ return "VK_FORMAT_R16G16_SSCALED";
+ case VK_FORMAT_R16G16_UINT:
+ return "VK_FORMAT_R16G16_UINT";
+ case VK_FORMAT_R16G16_UNORM:
+ return "VK_FORMAT_R16G16_UNORM";
+ case VK_FORMAT_R16G16_USCALED:
+ return "VK_FORMAT_R16G16_USCALED";
case VK_FORMAT_R16_SFLOAT:
return "VK_FORMAT_R16_SFLOAT";
- case VK_FORMAT_A8B8G8R8_SSCALED_PACK32:
- return "VK_FORMAT_A8B8G8R8_SSCALED_PACK32";
- case VK_FORMAT_ASTC_10x8_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_10x8_SRGB_BLOCK";
- case VK_FORMAT_B8G8R8A8_SINT:
- return "VK_FORMAT_B8G8R8A8_SINT";
- case VK_FORMAT_R8_SNORM:
- return "VK_FORMAT_R8_SNORM";
- case VK_FORMAT_R32G32_SINT:
- return "VK_FORMAT_R32G32_SINT";
+ case VK_FORMAT_R16_SINT:
+ return "VK_FORMAT_R16_SINT";
+ case VK_FORMAT_R16_SNORM:
+ return "VK_FORMAT_R16_SNORM";
+ case VK_FORMAT_R16_SSCALED:
+ return "VK_FORMAT_R16_SSCALED";
+ case VK_FORMAT_R16_UINT:
+ return "VK_FORMAT_R16_UINT";
+ case VK_FORMAT_R16_UNORM:
+ return "VK_FORMAT_R16_UNORM";
+ case VK_FORMAT_R16_USCALED:
+ return "VK_FORMAT_R16_USCALED";
+ case VK_FORMAT_R32G32B32A32_SFLOAT:
+ return "VK_FORMAT_R32G32B32A32_SFLOAT";
+ case VK_FORMAT_R32G32B32A32_SINT:
+ return "VK_FORMAT_R32G32B32A32_SINT";
case VK_FORMAT_R32G32B32A32_UINT:
return "VK_FORMAT_R32G32B32A32_UINT";
- case VK_FORMAT_A8B8G8R8_SNORM_PACK32:
- return "VK_FORMAT_A8B8G8R8_SNORM_PACK32";
- case VK_FORMAT_A8B8G8R8_UINT_PACK32:
- return "VK_FORMAT_A8B8G8R8_UINT_PACK32";
- case VK_FORMAT_BC4_UNORM_BLOCK:
- return "VK_FORMAT_BC4_UNORM_BLOCK";
- case VK_FORMAT_B8G8R8_UINT:
- return "VK_FORMAT_B8G8R8_UINT";
- case VK_FORMAT_D16_UNORM_S8_UINT:
- return "VK_FORMAT_D16_UNORM_S8_UINT";
- case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK";
- case VK_FORMAT_R8G8B8A8_UINT:
- return "VK_FORMAT_R8G8B8A8_UINT";
- case VK_FORMAT_R12X4_UNORM_PACK16:
- return "VK_FORMAT_R12X4_UNORM_PACK16";
+ case VK_FORMAT_R32G32B32_SFLOAT:
+ return "VK_FORMAT_R32G32B32_SFLOAT";
+ case VK_FORMAT_R32G32B32_SINT:
+ return "VK_FORMAT_R32G32B32_SINT";
+ case VK_FORMAT_R32G32B32_UINT:
+ return "VK_FORMAT_R32G32B32_UINT";
+ case VK_FORMAT_R32G32_SFLOAT:
+ return "VK_FORMAT_R32G32_SFLOAT";
+ case VK_FORMAT_R32G32_SINT:
+ return "VK_FORMAT_R32G32_SINT";
+ case VK_FORMAT_R32G32_UINT:
+ return "VK_FORMAT_R32G32_UINT";
+ case VK_FORMAT_R32_SFLOAT:
+ return "VK_FORMAT_R32_SFLOAT";
+ case VK_FORMAT_R32_SINT:
+ return "VK_FORMAT_R32_SINT";
+ case VK_FORMAT_R32_UINT:
+ return "VK_FORMAT_R32_UINT";
+ case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
+ return "VK_FORMAT_R4G4B4A4_UNORM_PACK16";
+ case VK_FORMAT_R4G4_UNORM_PACK8:
+ return "VK_FORMAT_R4G4_UNORM_PACK8";
+ case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
+ return "VK_FORMAT_R5G5B5A1_UNORM_PACK16";
+ case VK_FORMAT_R5G6B5_UNORM_PACK16:
+ return "VK_FORMAT_R5G6B5_UNORM_PACK16";
+ case VK_FORMAT_R64G64B64A64_SFLOAT:
+ return "VK_FORMAT_R64G64B64A64_SFLOAT";
+ case VK_FORMAT_R64G64B64A64_SINT:
+ return "VK_FORMAT_R64G64B64A64_SINT";
+ case VK_FORMAT_R64G64B64A64_UINT:
+ return "VK_FORMAT_R64G64B64A64_UINT";
+ case VK_FORMAT_R64G64B64_SFLOAT:
+ return "VK_FORMAT_R64G64B64_SFLOAT";
case VK_FORMAT_R64G64B64_SINT:
return "VK_FORMAT_R64G64B64_SINT";
- case VK_FORMAT_EAC_R11_SNORM_BLOCK:
- return "VK_FORMAT_EAC_R11_SNORM_BLOCK";
case VK_FORMAT_R64G64B64_UINT:
return "VK_FORMAT_R64G64B64_UINT";
- case VK_FORMAT_R64G64B64A64_SINT:
- return "VK_FORMAT_R64G64B64A64_SINT";
- case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:
- return "VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK";
- case VK_FORMAT_ASTC_6x5_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_6x5_UNORM_BLOCK";
- case VK_FORMAT_ASTC_8x5_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_8x5_SRGB_BLOCK";
- case VK_FORMAT_ASTC_12x10_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_12x10_UNORM_BLOCK";
- case VK_FORMAT_ASTC_8x6_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_8x6_SRGB_BLOCK";
+ case VK_FORMAT_R64G64_SFLOAT:
+ return "VK_FORMAT_R64G64_SFLOAT";
+ case VK_FORMAT_R64G64_SINT:
+ return "VK_FORMAT_R64G64_SINT";
+ case VK_FORMAT_R64G64_UINT:
+ return "VK_FORMAT_R64G64_UINT";
+ case VK_FORMAT_R64_SFLOAT:
+ return "VK_FORMAT_R64_SFLOAT";
+ case VK_FORMAT_R64_SINT:
+ return "VK_FORMAT_R64_SINT";
+ case VK_FORMAT_R64_UINT:
+ return "VK_FORMAT_R64_UINT";
+ case VK_FORMAT_R8G8B8A8_SINT:
+ return "VK_FORMAT_R8G8B8A8_SINT";
+ case VK_FORMAT_R8G8B8A8_SNORM:
+ return "VK_FORMAT_R8G8B8A8_SNORM";
+ case VK_FORMAT_R8G8B8A8_SRGB:
+ return "VK_FORMAT_R8G8B8A8_SRGB";
+ case VK_FORMAT_R8G8B8A8_SSCALED:
+ return "VK_FORMAT_R8G8B8A8_SSCALED";
+ case VK_FORMAT_R8G8B8A8_UINT:
+ return "VK_FORMAT_R8G8B8A8_UINT";
+ case VK_FORMAT_R8G8B8A8_UNORM:
+ return "VK_FORMAT_R8G8B8A8_UNORM";
+ case VK_FORMAT_R8G8B8A8_USCALED:
+ return "VK_FORMAT_R8G8B8A8_USCALED";
+ case VK_FORMAT_R8G8B8_SINT:
+ return "VK_FORMAT_R8G8B8_SINT";
+ case VK_FORMAT_R8G8B8_SNORM:
+ return "VK_FORMAT_R8G8B8_SNORM";
+ case VK_FORMAT_R8G8B8_SRGB:
+ return "VK_FORMAT_R8G8B8_SRGB";
case VK_FORMAT_R8G8B8_SSCALED:
return "VK_FORMAT_R8G8B8_SSCALED";
- case VK_FORMAT_B8G8R8A8_UNORM:
- return "VK_FORMAT_B8G8R8A8_UNORM";
- case VK_FORMAT_R16_SNORM:
- return "VK_FORMAT_R16_SNORM";
- case VK_FORMAT_R8_UINT:
- return "VK_FORMAT_R8_UINT";
- case VK_FORMAT_R64G64B64A64_SFLOAT:
- return "VK_FORMAT_R64G64B64A64_SFLOAT";
- case VK_FORMAT_ASTC_5x5_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_5x5_UNORM_BLOCK";
- case VK_FORMAT_ASTC_8x8_SRGB_BLOCK:
- return "VK_FORMAT_ASTC_8x8_SRGB_BLOCK";
+ case VK_FORMAT_R8G8B8_UINT:
+ return "VK_FORMAT_R8G8B8_UINT";
+ case VK_FORMAT_R8G8B8_UNORM:
+ return "VK_FORMAT_R8G8B8_UNORM";
+ case VK_FORMAT_R8G8B8_USCALED:
+ return "VK_FORMAT_R8G8B8_USCALED";
+ case VK_FORMAT_R8G8_SINT:
+ return "VK_FORMAT_R8G8_SINT";
+ case VK_FORMAT_R8G8_SNORM:
+ return "VK_FORMAT_R8G8_SNORM";
+ case VK_FORMAT_R8G8_SRGB:
+ return "VK_FORMAT_R8G8_SRGB";
+ case VK_FORMAT_R8G8_SSCALED:
+ return "VK_FORMAT_R8G8_SSCALED";
+ case VK_FORMAT_R8G8_UINT:
+ return "VK_FORMAT_R8G8_UINT";
+ case VK_FORMAT_R8G8_UNORM:
+ return "VK_FORMAT_R8G8_UNORM";
+ case VK_FORMAT_R8G8_USCALED:
+ return "VK_FORMAT_R8G8_USCALED";
case VK_FORMAT_R8_SINT:
return "VK_FORMAT_R8_SINT";
- case VK_FORMAT_B8G8R8A8_SRGB:
- return "VK_FORMAT_B8G8R8A8_SRGB";
- case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:
- return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16";
- case VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:
- return "VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16";
- case VK_FORMAT_BC6H_UFLOAT_BLOCK:
- return "VK_FORMAT_BC6H_UFLOAT_BLOCK";
- case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
- return "VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM";
- case VK_FORMAT_R10X6G10X6_UNORM_2PACK16:
- return "VK_FORMAT_R10X6G10X6_UNORM_2PACK16";
- case VK_FORMAT_R16G16_UINT:
- return "VK_FORMAT_R16G16_UINT";
- case VK_FORMAT_ASTC_10x6_UNORM_BLOCK:
- return "VK_FORMAT_ASTC_10x6_UNORM_BLOCK";
- case VK_FORMAT_R16G16B16_SSCALED:
- return "VK_FORMAT_R16G16B16_SSCALED";
- case VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:
- return "VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16";
+ case VK_FORMAT_R8_SNORM:
+ return "VK_FORMAT_R8_SNORM";
+ case VK_FORMAT_R8_SRGB:
+ return "VK_FORMAT_R8_SRGB";
+ case VK_FORMAT_R8_SSCALED:
+ return "VK_FORMAT_R8_SSCALED";
+ case VK_FORMAT_R8_UINT:
+ return "VK_FORMAT_R8_UINT";
+ case VK_FORMAT_R8_UNORM:
+ return "VK_FORMAT_R8_UNORM";
+ case VK_FORMAT_R8_USCALED:
+ return "VK_FORMAT_R8_USCALED";
+ case VK_FORMAT_S8_UINT:
+ return "VK_FORMAT_S8_UINT";
+ case VK_FORMAT_UNDEFINED:
+ return "VK_FORMAT_UNDEFINED";
+ case VK_FORMAT_X8_D24_UNORM_PACK32:
+ return "VK_FORMAT_X8_D24_UNORM_PACK32";
default:
return "Unhandled VkFormat";
}
@@ -1084,67 +1459,85 @@ static inline const char* string_VkFormatFeatureFlagBits(VkFormatFeatureFlagBits
{
switch ((VkFormatFeatureFlagBits)input_value)
{
+ case VK_FORMAT_FEATURE_BLIT_DST_BIT:
+ return "VK_FORMAT_FEATURE_BLIT_DST_BIT";
+ case VK_FORMAT_FEATURE_BLIT_SRC_BIT:
+ return "VK_FORMAT_FEATURE_BLIT_SRC_BIT";
+ case VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT:
+ return "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT";
case VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT:
return "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT";
- case VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT:
- return "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT";
- case VK_FORMAT_FEATURE_TRANSFER_DST_BIT:
- return "VK_FORMAT_FEATURE_TRANSFER_DST_BIT";
case VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT:
return "VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT";
case VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT:
return "VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT";
- case VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT:
- return "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT";
- case VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT:
- return "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT";
case VK_FORMAT_FEATURE_DISJOINT_BIT:
return "VK_FORMAT_FEATURE_DISJOINT_BIT";
+ case VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT:
+ return "VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT";
+ case VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT:
+ return "VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT";
case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT:
return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT";
- case VK_FORMAT_FEATURE_TRANSFER_SRC_BIT:
- return "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT";
+ case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT:
+ return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT";
case VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT:
return "VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG";
case VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT:
return "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT";
- case VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT:
- return "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT";
- case VK_FORMAT_FEATURE_BLIT_DST_BIT:
- return "VK_FORMAT_FEATURE_BLIT_DST_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT";
- case VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT:
- return "VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT";
+ case VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT:
+ return "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT";
case VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT:
return "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT";
- case VK_FORMAT_FEATURE_BLIT_SRC_BIT:
- return "VK_FORMAT_FEATURE_BLIT_SRC_BIT";
- case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT:
- return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT";
+ case VK_FORMAT_FEATURE_TRANSFER_DST_BIT:
+ return "VK_FORMAT_FEATURE_TRANSFER_DST_BIT";
+ case VK_FORMAT_FEATURE_TRANSFER_SRC_BIT:
+ return "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT";
+ case VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT:
+ return "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT";
+ case VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT:
+ return "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT";
default:
return "Unhandled VkFormatFeatureFlagBits";
}
}
+static inline std::string string_VkFormatFeatureFlags(VkFormatFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkFormatFeatureFlagBits(static_cast<VkFormatFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkFormatFeatureFlagBits(static_cast<VkFormatFeatureFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkImageType(VkImageType input_value)
{
switch ((VkImageType)input_value)
{
- case VK_IMAGE_TYPE_2D:
- return "VK_IMAGE_TYPE_2D";
case VK_IMAGE_TYPE_1D:
return "VK_IMAGE_TYPE_1D";
+ case VK_IMAGE_TYPE_2D:
+ return "VK_IMAGE_TYPE_2D";
case VK_IMAGE_TYPE_3D:
return "VK_IMAGE_TYPE_3D";
default:
@@ -1156,10 +1549,12 @@ static inline const char* string_VkImageTiling(VkImageTiling input_value)
{
switch ((VkImageTiling)input_value)
{
- case VK_IMAGE_TILING_OPTIMAL:
- return "VK_IMAGE_TILING_OPTIMAL";
+ case VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT:
+ return "VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT";
case VK_IMAGE_TILING_LINEAR:
return "VK_IMAGE_TILING_LINEAR";
+ case VK_IMAGE_TILING_OPTIMAL:
+ return "VK_IMAGE_TILING_OPTIMAL";
default:
return "Unhandled VkImageTiling";
}
@@ -1169,78 +1564,118 @@ static inline const char* string_VkImageUsageFlagBits(VkImageUsageFlagBits input
{
switch ((VkImageUsageFlagBits)input_value)
{
- case VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT:
- return "VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT";
- case VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT:
- return "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT";
+ case VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT:
+ return "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT";
case VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT:
return "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT";
+ case VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT:
+ return "VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT";
+ case VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT:
+ return "VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT";
case VK_IMAGE_USAGE_SAMPLED_BIT:
return "VK_IMAGE_USAGE_SAMPLED_BIT";
- case VK_IMAGE_USAGE_TRANSFER_DST_BIT:
- return "VK_IMAGE_USAGE_TRANSFER_DST_BIT";
+ case VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV:
+ return "VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV";
case VK_IMAGE_USAGE_STORAGE_BIT:
return "VK_IMAGE_USAGE_STORAGE_BIT";
+ case VK_IMAGE_USAGE_TRANSFER_DST_BIT:
+ return "VK_IMAGE_USAGE_TRANSFER_DST_BIT";
case VK_IMAGE_USAGE_TRANSFER_SRC_BIT:
return "VK_IMAGE_USAGE_TRANSFER_SRC_BIT";
- case VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT:
- return "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT";
+ case VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT:
+ return "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT";
default:
return "Unhandled VkImageUsageFlagBits";
}
}
+static inline std::string string_VkImageUsageFlags(VkImageUsageFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkImageUsageFlagBits(static_cast<VkImageUsageFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkImageUsageFlagBits(static_cast<VkImageUsageFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkImageCreateFlagBits(VkImageCreateFlagBits input_value)
{
switch ((VkImageCreateFlagBits)input_value)
{
+ case VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT:
+ return "VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT";
case VK_IMAGE_CREATE_ALIAS_BIT:
return "VK_IMAGE_CREATE_ALIAS_BIT";
- case VK_IMAGE_CREATE_PROTECTED_BIT:
- return "VK_IMAGE_CREATE_PROTECTED_BIT";
case VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT:
return "VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT";
- case VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT:
- return "VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT";
- case VK_IMAGE_CREATE_EXTENDED_USAGE_BIT:
- return "VK_IMAGE_CREATE_EXTENDED_USAGE_BIT";
+ case VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV:
+ return "VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV";
+ case VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:
+ return "VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT";
case VK_IMAGE_CREATE_DISJOINT_BIT:
return "VK_IMAGE_CREATE_DISJOINT_BIT";
+ case VK_IMAGE_CREATE_EXTENDED_USAGE_BIT:
+ return "VK_IMAGE_CREATE_EXTENDED_USAGE_BIT";
case VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT:
return "VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT";
- case VK_IMAGE_CREATE_SPARSE_BINDING_BIT:
- return "VK_IMAGE_CREATE_SPARSE_BINDING_BIT";
+ case VK_IMAGE_CREATE_PROTECTED_BIT:
+ return "VK_IMAGE_CREATE_PROTECTED_BIT";
case VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT:
return "VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT";
- case VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:
- return "VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT";
case VK_IMAGE_CREATE_SPARSE_ALIASED_BIT:
return "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT";
+ case VK_IMAGE_CREATE_SPARSE_BINDING_BIT:
+ return "VK_IMAGE_CREATE_SPARSE_BINDING_BIT";
case VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT:
return "VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT";
case VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT:
return "VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT";
+ case VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT:
+ return "VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT";
default:
return "Unhandled VkImageCreateFlagBits";
}
}
+static inline std::string string_VkImageCreateFlags(VkImageCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkImageCreateFlagBits(static_cast<VkImageCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkImageCreateFlagBits(static_cast<VkImageCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSampleCountFlagBits(VkSampleCountFlagBits input_value)
{
switch ((VkSampleCountFlagBits)input_value)
{
- case VK_SAMPLE_COUNT_32_BIT:
- return "VK_SAMPLE_COUNT_32_BIT";
+ case VK_SAMPLE_COUNT_16_BIT:
+ return "VK_SAMPLE_COUNT_16_BIT";
case VK_SAMPLE_COUNT_1_BIT:
return "VK_SAMPLE_COUNT_1_BIT";
case VK_SAMPLE_COUNT_2_BIT:
return "VK_SAMPLE_COUNT_2_BIT";
- case VK_SAMPLE_COUNT_64_BIT:
- return "VK_SAMPLE_COUNT_64_BIT";
- case VK_SAMPLE_COUNT_16_BIT:
- return "VK_SAMPLE_COUNT_16_BIT";
+ case VK_SAMPLE_COUNT_32_BIT:
+ return "VK_SAMPLE_COUNT_32_BIT";
case VK_SAMPLE_COUNT_4_BIT:
return "VK_SAMPLE_COUNT_4_BIT";
+ case VK_SAMPLE_COUNT_64_BIT:
+ return "VK_SAMPLE_COUNT_64_BIT";
case VK_SAMPLE_COUNT_8_BIT:
return "VK_SAMPLE_COUNT_8_BIT";
default:
@@ -1248,20 +1683,36 @@ static inline const char* string_VkSampleCountFlagBits(VkSampleCountFlagBits inp
}
}
+static inline std::string string_VkSampleCountFlags(VkSampleCountFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSampleCountFlagBits(static_cast<VkSampleCountFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSampleCountFlagBits(static_cast<VkSampleCountFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkPhysicalDeviceType(VkPhysicalDeviceType input_value)
{
switch ((VkPhysicalDeviceType)input_value)
{
- case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:
- return "VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU";
- case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU:
- return "VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU";
- case VK_PHYSICAL_DEVICE_TYPE_OTHER:
- return "VK_PHYSICAL_DEVICE_TYPE_OTHER";
case VK_PHYSICAL_DEVICE_TYPE_CPU:
return "VK_PHYSICAL_DEVICE_TYPE_CPU";
+ case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:
+ return "VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU";
case VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU:
return "VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU";
+ case VK_PHYSICAL_DEVICE_TYPE_OTHER:
+ return "VK_PHYSICAL_DEVICE_TYPE_OTHER";
+ case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU:
+ return "VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU";
default:
return "Unhandled VkPhysicalDeviceType";
}
@@ -1271,14 +1722,14 @@ static inline const char* string_VkQueueFlagBits(VkQueueFlagBits input_value)
{
switch ((VkQueueFlagBits)input_value)
{
- case VK_QUEUE_SPARSE_BINDING_BIT:
- return "VK_QUEUE_SPARSE_BINDING_BIT";
- case VK_QUEUE_GRAPHICS_BIT:
- return "VK_QUEUE_GRAPHICS_BIT";
case VK_QUEUE_COMPUTE_BIT:
return "VK_QUEUE_COMPUTE_BIT";
+ case VK_QUEUE_GRAPHICS_BIT:
+ return "VK_QUEUE_GRAPHICS_BIT";
case VK_QUEUE_PROTECTED_BIT:
return "VK_QUEUE_PROTECTED_BIT";
+ case VK_QUEUE_SPARSE_BINDING_BIT:
+ return "VK_QUEUE_SPARSE_BINDING_BIT";
case VK_QUEUE_TRANSFER_BIT:
return "VK_QUEUE_TRANSFER_BIT";
default:
@@ -1286,20 +1737,40 @@ static inline const char* string_VkQueueFlagBits(VkQueueFlagBits input_value)
}
}
+static inline std::string string_VkQueueFlags(VkQueueFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkQueueFlagBits(static_cast<VkQueueFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkQueueFlagBits(static_cast<VkQueueFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkMemoryPropertyFlagBits(VkMemoryPropertyFlagBits input_value)
{
switch ((VkMemoryPropertyFlagBits)input_value)
{
- case VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT:
- return "VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT";
+ case VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD:
+ return "VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD";
case VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT:
return "VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT";
- case VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT:
- return "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT";
+ case VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD:
+ return "VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD";
case VK_MEMORY_PROPERTY_HOST_CACHED_BIT:
return "VK_MEMORY_PROPERTY_HOST_CACHED_BIT";
case VK_MEMORY_PROPERTY_HOST_COHERENT_BIT:
return "VK_MEMORY_PROPERTY_HOST_COHERENT_BIT";
+ case VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT:
+ return "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT";
+ case VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT:
+ return "VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT";
case VK_MEMORY_PROPERTY_PROTECTED_BIT:
return "VK_MEMORY_PROPERTY_PROTECTED_BIT";
default:
@@ -1307,6 +1778,22 @@ static inline const char* string_VkMemoryPropertyFlagBits(VkMemoryPropertyFlagBi
}
}
+static inline std::string string_VkMemoryPropertyFlags(VkMemoryPropertyFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkMemoryPropertyFlagBits(static_cast<VkMemoryPropertyFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkMemoryPropertyFlagBits(static_cast<VkMemoryPropertyFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkMemoryHeapFlagBits(VkMemoryHeapFlagBits input_value)
{
switch ((VkMemoryHeapFlagBits)input_value)
@@ -1320,6 +1807,22 @@ static inline const char* string_VkMemoryHeapFlagBits(VkMemoryHeapFlagBits input
}
}
+static inline std::string string_VkMemoryHeapFlags(VkMemoryHeapFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkMemoryHeapFlagBits(static_cast<VkMemoryHeapFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkMemoryHeapFlagBits(static_cast<VkMemoryHeapFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkDeviceQueueCreateFlagBits(VkDeviceQueueCreateFlagBits input_value)
{
switch ((VkDeviceQueueCreateFlagBits)input_value)
@@ -1331,89 +1834,177 @@ static inline const char* string_VkDeviceQueueCreateFlagBits(VkDeviceQueueCreate
}
}
+static inline std::string string_VkDeviceQueueCreateFlags(VkDeviceQueueCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDeviceQueueCreateFlagBits(static_cast<VkDeviceQueueCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDeviceQueueCreateFlagBits(static_cast<VkDeviceQueueCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkPipelineStageFlagBits(VkPipelineStageFlagBits input_value)
{
switch ((VkPipelineStageFlagBits)input_value)
{
- case VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT:
- return "VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT";
+ case VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV:
+ return "VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV";
+ case VK_PIPELINE_STAGE_ALL_COMMANDS_BIT:
+ return "VK_PIPELINE_STAGE_ALL_COMMANDS_BIT";
case VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT:
return "VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT";
- case VK_PIPELINE_STAGE_TRANSFER_BIT:
- return "VK_PIPELINE_STAGE_TRANSFER_BIT";
- case VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT:
- return "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT";
+ case VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT:
+ return "VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT";
+ case VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT:
+ return "VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT";
case VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX:
return "VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX";
- case VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT:
- return "VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT";
- case VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT:
- return "VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT";
+ case VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT:
+ return "VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT";
+ case VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT:
+ return "VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT";
+ case VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT:
+ return "VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT";
+ case VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT:
+ return "VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT";
+ case VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT:
+ return "VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT";
case VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT:
return "VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT";
- case VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT:
- return "VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT";
case VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT:
return "VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT";
- case VK_PIPELINE_STAGE_ALL_COMMANDS_BIT:
- return "VK_PIPELINE_STAGE_ALL_COMMANDS_BIT";
- case VK_PIPELINE_STAGE_VERTEX_SHADER_BIT:
- return "VK_PIPELINE_STAGE_VERTEX_SHADER_BIT";
- case VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT:
- return "VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT";
- case VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT:
- return "VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT";
case VK_PIPELINE_STAGE_HOST_BIT:
return "VK_PIPELINE_STAGE_HOST_BIT";
- case VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT:
- return "VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT";
- case VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT:
- return "VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT";
+ case VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT:
+ return "VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT";
+ case VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV:
+ return "VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV";
+ case VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV:
+ return "VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV";
+ case VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV:
+ return "VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV";
+ case VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV:
+ return "VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV";
+ case VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT:
+ return "VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT";
+ case VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT:
+ return "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT";
+ case VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT:
+ return "VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT";
+ case VK_PIPELINE_STAGE_TRANSFER_BIT:
+ return "VK_PIPELINE_STAGE_TRANSFER_BIT";
+ case VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT:
+ return "VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT";
case VK_PIPELINE_STAGE_VERTEX_INPUT_BIT:
return "VK_PIPELINE_STAGE_VERTEX_INPUT_BIT";
+ case VK_PIPELINE_STAGE_VERTEX_SHADER_BIT:
+ return "VK_PIPELINE_STAGE_VERTEX_SHADER_BIT";
default:
return "Unhandled VkPipelineStageFlagBits";
}
}
+static inline std::string string_VkPipelineStageFlags(VkPipelineStageFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPipelineStageFlagBits(static_cast<VkPipelineStageFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPipelineStageFlagBits(static_cast<VkPipelineStageFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkImageAspectFlagBits(VkImageAspectFlagBits input_value)
{
switch ((VkImageAspectFlagBits)input_value)
{
+ case VK_IMAGE_ASPECT_COLOR_BIT:
+ return "VK_IMAGE_ASPECT_COLOR_BIT";
+ case VK_IMAGE_ASPECT_DEPTH_BIT:
+ return "VK_IMAGE_ASPECT_DEPTH_BIT";
+ case VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT:
+ return "VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT";
+ case VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT:
+ return "VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT";
+ case VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT:
+ return "VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT";
+ case VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT:
+ return "VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT";
+ case VK_IMAGE_ASPECT_METADATA_BIT:
+ return "VK_IMAGE_ASPECT_METADATA_BIT";
case VK_IMAGE_ASPECT_PLANE_0_BIT:
return "VK_IMAGE_ASPECT_PLANE_0_BIT";
+ case VK_IMAGE_ASPECT_PLANE_1_BIT:
+ return "VK_IMAGE_ASPECT_PLANE_1_BIT";
case VK_IMAGE_ASPECT_PLANE_2_BIT:
return "VK_IMAGE_ASPECT_PLANE_2_BIT";
case VK_IMAGE_ASPECT_STENCIL_BIT:
return "VK_IMAGE_ASPECT_STENCIL_BIT";
- case VK_IMAGE_ASPECT_PLANE_1_BIT:
- return "VK_IMAGE_ASPECT_PLANE_1_BIT";
- case VK_IMAGE_ASPECT_COLOR_BIT:
- return "VK_IMAGE_ASPECT_COLOR_BIT";
- case VK_IMAGE_ASPECT_METADATA_BIT:
- return "VK_IMAGE_ASPECT_METADATA_BIT";
- case VK_IMAGE_ASPECT_DEPTH_BIT:
- return "VK_IMAGE_ASPECT_DEPTH_BIT";
default:
return "Unhandled VkImageAspectFlagBits";
}
}
+static inline std::string string_VkImageAspectFlags(VkImageAspectFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkImageAspectFlagBits(static_cast<VkImageAspectFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkImageAspectFlagBits(static_cast<VkImageAspectFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSparseImageFormatFlagBits(VkSparseImageFormatFlagBits input_value)
{
switch ((VkSparseImageFormatFlagBits)input_value)
{
case VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT:
return "VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT";
- case VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT:
- return "VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT";
case VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT:
return "VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT";
+ case VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT:
+ return "VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT";
default:
return "Unhandled VkSparseImageFormatFlagBits";
}
}
+static inline std::string string_VkSparseImageFormatFlags(VkSparseImageFormatFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSparseImageFormatFlagBits(static_cast<VkSparseImageFormatFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSparseImageFormatFlagBits(static_cast<VkSparseImageFormatFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSparseMemoryBindFlagBits(VkSparseMemoryBindFlagBits input_value)
{
switch ((VkSparseMemoryBindFlagBits)input_value)
@@ -1425,6 +2016,22 @@ static inline const char* string_VkSparseMemoryBindFlagBits(VkSparseMemoryBindFl
}
}
+static inline std::string string_VkSparseMemoryBindFlags(VkSparseMemoryBindFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSparseMemoryBindFlagBits(static_cast<VkSparseMemoryBindFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSparseMemoryBindFlagBits(static_cast<VkSparseMemoryBindFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkFenceCreateFlagBits(VkFenceCreateFlagBits input_value)
{
switch ((VkFenceCreateFlagBits)input_value)
@@ -1436,16 +2043,40 @@ static inline const char* string_VkFenceCreateFlagBits(VkFenceCreateFlagBits inp
}
}
+static inline std::string string_VkFenceCreateFlags(VkFenceCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkFenceCreateFlagBits(static_cast<VkFenceCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkFenceCreateFlagBits(static_cast<VkFenceCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkQueryType(VkQueryType input_value)
{
switch ((VkQueryType)input_value)
{
- case VK_QUERY_TYPE_TIMESTAMP:
- return "VK_QUERY_TYPE_TIMESTAMP";
- case VK_QUERY_TYPE_PIPELINE_STATISTICS:
- return "VK_QUERY_TYPE_PIPELINE_STATISTICS";
+ case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV:
+ return "VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV";
case VK_QUERY_TYPE_OCCLUSION:
return "VK_QUERY_TYPE_OCCLUSION";
+ case VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL:
+ return "VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL";
+ case VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR:
+ return "VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR";
+ case VK_QUERY_TYPE_PIPELINE_STATISTICS:
+ return "VK_QUERY_TYPE_PIPELINE_STATISTICS";
+ case VK_QUERY_TYPE_TIMESTAMP:
+ return "VK_QUERY_TYPE_TIMESTAMP";
+ case VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT:
+ return "VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT";
default:
return "Unhandled VkQueryType";
}
@@ -1455,102 +2086,178 @@ static inline const char* string_VkQueryPipelineStatisticFlagBits(VkQueryPipelin
{
switch ((VkQueryPipelineStatisticFlagBits)input_value)
{
- case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT";
case VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT:
return "VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT";
case VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT:
return "VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT";
- case VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT:
- return "VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT";
case VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT:
return "VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT";
+ case VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT:
+ return "VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT";
default:
return "Unhandled VkQueryPipelineStatisticFlagBits";
}
}
+static inline std::string string_VkQueryPipelineStatisticFlags(VkQueryPipelineStatisticFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkQueryPipelineStatisticFlagBits(static_cast<VkQueryPipelineStatisticFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkQueryPipelineStatisticFlagBits(static_cast<VkQueryPipelineStatisticFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkQueryResultFlagBits(VkQueryResultFlagBits input_value)
{
switch ((VkQueryResultFlagBits)input_value)
{
case VK_QUERY_RESULT_64_BIT:
return "VK_QUERY_RESULT_64_BIT";
- case VK_QUERY_RESULT_WITH_AVAILABILITY_BIT:
- return "VK_QUERY_RESULT_WITH_AVAILABILITY_BIT";
- case VK_QUERY_RESULT_WAIT_BIT:
- return "VK_QUERY_RESULT_WAIT_BIT";
case VK_QUERY_RESULT_PARTIAL_BIT:
return "VK_QUERY_RESULT_PARTIAL_BIT";
+ case VK_QUERY_RESULT_WAIT_BIT:
+ return "VK_QUERY_RESULT_WAIT_BIT";
+ case VK_QUERY_RESULT_WITH_AVAILABILITY_BIT:
+ return "VK_QUERY_RESULT_WITH_AVAILABILITY_BIT";
default:
return "Unhandled VkQueryResultFlagBits";
}
}
+static inline std::string string_VkQueryResultFlags(VkQueryResultFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkQueryResultFlagBits(static_cast<VkQueryResultFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkQueryResultFlagBits(static_cast<VkQueryResultFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkBufferCreateFlagBits(VkBufferCreateFlagBits input_value)
{
switch ((VkBufferCreateFlagBits)input_value)
{
- case VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT:
- return "VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT";
- case VK_BUFFER_CREATE_SPARSE_BINDING_BIT:
- return "VK_BUFFER_CREATE_SPARSE_BINDING_BIT";
+ case VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT:
+ return "VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT";
case VK_BUFFER_CREATE_PROTECTED_BIT:
return "VK_BUFFER_CREATE_PROTECTED_BIT";
case VK_BUFFER_CREATE_SPARSE_ALIASED_BIT:
return "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT";
+ case VK_BUFFER_CREATE_SPARSE_BINDING_BIT:
+ return "VK_BUFFER_CREATE_SPARSE_BINDING_BIT";
+ case VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT:
+ return "VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT";
default:
return "Unhandled VkBufferCreateFlagBits";
}
}
+static inline std::string string_VkBufferCreateFlags(VkBufferCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkBufferCreateFlagBits(static_cast<VkBufferCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkBufferCreateFlagBits(static_cast<VkBufferCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkBufferUsageFlagBits(VkBufferUsageFlagBits input_value)
{
switch ((VkBufferUsageFlagBits)input_value)
{
- case VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT:
- return "VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT";
- case VK_BUFFER_USAGE_STORAGE_BUFFER_BIT:
- return "VK_BUFFER_USAGE_STORAGE_BUFFER_BIT";
- case VK_BUFFER_USAGE_VERTEX_BUFFER_BIT:
- return "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT";
+ case VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT:
+ return "VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT";
+ case VK_BUFFER_USAGE_INDEX_BUFFER_BIT:
+ return "VK_BUFFER_USAGE_INDEX_BUFFER_BIT";
case VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT:
return "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT";
- case VK_BUFFER_USAGE_TRANSFER_SRC_BIT:
- return "VK_BUFFER_USAGE_TRANSFER_SRC_BIT";
+ case VK_BUFFER_USAGE_RAY_TRACING_BIT_NV:
+ return "VK_BUFFER_USAGE_RAY_TRACING_BIT_NV";
+ case VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT:
+ return "VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT";
+ case VK_BUFFER_USAGE_STORAGE_BUFFER_BIT:
+ return "VK_BUFFER_USAGE_STORAGE_BUFFER_BIT";
+ case VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT:
+ return "VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT";
case VK_BUFFER_USAGE_TRANSFER_DST_BIT:
return "VK_BUFFER_USAGE_TRANSFER_DST_BIT";
- case VK_BUFFER_USAGE_INDEX_BUFFER_BIT:
- return "VK_BUFFER_USAGE_INDEX_BUFFER_BIT";
+ case VK_BUFFER_USAGE_TRANSFER_SRC_BIT:
+ return "VK_BUFFER_USAGE_TRANSFER_SRC_BIT";
+ case VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT:
+ return "VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT";
+ case VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT:
+ return "VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT";
case VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT:
return "VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT";
case VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT:
return "VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT";
+ case VK_BUFFER_USAGE_VERTEX_BUFFER_BIT:
+ return "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT";
default:
return "Unhandled VkBufferUsageFlagBits";
}
}
+static inline std::string string_VkBufferUsageFlags(VkBufferUsageFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkBufferUsageFlagBits(static_cast<VkBufferUsageFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkBufferUsageFlagBits(static_cast<VkBufferUsageFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSharingMode(VkSharingMode input_value)
{
switch ((VkSharingMode)input_value)
{
- case VK_SHARING_MODE_EXCLUSIVE:
- return "VK_SHARING_MODE_EXCLUSIVE";
case VK_SHARING_MODE_CONCURRENT:
return "VK_SHARING_MODE_CONCURRENT";
+ case VK_SHARING_MODE_EXCLUSIVE:
+ return "VK_SHARING_MODE_EXCLUSIVE";
default:
return "Unhandled VkSharingMode";
}
@@ -1560,55 +2267,94 @@ static inline const char* string_VkImageLayout(VkImageLayout input_value)
{
switch ((VkImageLayout)input_value)
{
- case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:
- return "VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL";
- case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL:
- return "VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL";
+ case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL";
+ case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL";
case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL:
return "VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL";
+ case VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT:
+ return "VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT";
case VK_IMAGE_LAYOUT_GENERAL:
return "VK_IMAGE_LAYOUT_GENERAL";
- case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL:
- return "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL";
- case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:
- return "VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL";
- case VK_IMAGE_LAYOUT_UNDEFINED:
- return "VK_IMAGE_LAYOUT_UNDEFINED";
- case VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:
- return "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL";
case VK_IMAGE_LAYOUT_PREINITIALIZED:
return "VK_IMAGE_LAYOUT_PREINITIALIZED";
case VK_IMAGE_LAYOUT_PRESENT_SRC_KHR:
return "VK_IMAGE_LAYOUT_PRESENT_SRC_KHR";
- case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
- return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL";
- case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
- return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL";
+ case VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV:
+ return "VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV";
case VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR:
return "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR";
+ case VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL";
+ case VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL";
+ case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL";
+ case VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:
+ return "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL";
+ case VK_IMAGE_LAYOUT_UNDEFINED:
+ return "VK_IMAGE_LAYOUT_UNDEFINED";
default:
return "Unhandled VkImageLayout";
}
}
+static inline const char* string_VkImageViewCreateFlagBits(VkImageViewCreateFlagBits input_value)
+{
+ switch ((VkImageViewCreateFlagBits)input_value)
+ {
+ case VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT:
+ return "VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT";
+ default:
+ return "Unhandled VkImageViewCreateFlagBits";
+ }
+}
+
+static inline std::string string_VkImageViewCreateFlags(VkImageViewCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkImageViewCreateFlagBits(static_cast<VkImageViewCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkImageViewCreateFlagBits(static_cast<VkImageViewCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkImageViewType(VkImageViewType input_value)
{
switch ((VkImageViewType)input_value)
{
- case VK_IMAGE_VIEW_TYPE_2D_ARRAY:
- return "VK_IMAGE_VIEW_TYPE_2D_ARRAY";
- case VK_IMAGE_VIEW_TYPE_1D_ARRAY:
- return "VK_IMAGE_VIEW_TYPE_1D_ARRAY";
case VK_IMAGE_VIEW_TYPE_1D:
return "VK_IMAGE_VIEW_TYPE_1D";
+ case VK_IMAGE_VIEW_TYPE_1D_ARRAY:
+ return "VK_IMAGE_VIEW_TYPE_1D_ARRAY";
+ case VK_IMAGE_VIEW_TYPE_2D:
+ return "VK_IMAGE_VIEW_TYPE_2D";
+ case VK_IMAGE_VIEW_TYPE_2D_ARRAY:
+ return "VK_IMAGE_VIEW_TYPE_2D_ARRAY";
case VK_IMAGE_VIEW_TYPE_3D:
return "VK_IMAGE_VIEW_TYPE_3D";
case VK_IMAGE_VIEW_TYPE_CUBE:
return "VK_IMAGE_VIEW_TYPE_CUBE";
case VK_IMAGE_VIEW_TYPE_CUBE_ARRAY:
return "VK_IMAGE_VIEW_TYPE_CUBE_ARRAY";
- case VK_IMAGE_VIEW_TYPE_2D:
- return "VK_IMAGE_VIEW_TYPE_2D";
default:
return "Unhandled VkImageViewType";
}
@@ -1618,20 +2364,20 @@ static inline const char* string_VkComponentSwizzle(VkComponentSwizzle input_val
{
switch ((VkComponentSwizzle)input_value)
{
+ case VK_COMPONENT_SWIZZLE_A:
+ return "VK_COMPONENT_SWIZZLE_A";
+ case VK_COMPONENT_SWIZZLE_B:
+ return "VK_COMPONENT_SWIZZLE_B";
+ case VK_COMPONENT_SWIZZLE_G:
+ return "VK_COMPONENT_SWIZZLE_G";
+ case VK_COMPONENT_SWIZZLE_IDENTITY:
+ return "VK_COMPONENT_SWIZZLE_IDENTITY";
case VK_COMPONENT_SWIZZLE_ONE:
return "VK_COMPONENT_SWIZZLE_ONE";
case VK_COMPONENT_SWIZZLE_R:
return "VK_COMPONENT_SWIZZLE_R";
case VK_COMPONENT_SWIZZLE_ZERO:
return "VK_COMPONENT_SWIZZLE_ZERO";
- case VK_COMPONENT_SWIZZLE_IDENTITY:
- return "VK_COMPONENT_SWIZZLE_IDENTITY";
- case VK_COMPONENT_SWIZZLE_G:
- return "VK_COMPONENT_SWIZZLE_G";
- case VK_COMPONENT_SWIZZLE_A:
- return "VK_COMPONENT_SWIZZLE_A";
- case VK_COMPONENT_SWIZZLE_B:
- return "VK_COMPONENT_SWIZZLE_B";
default:
return "Unhandled VkComponentSwizzle";
}
@@ -1641,54 +2387,137 @@ static inline const char* string_VkPipelineCreateFlagBits(VkPipelineCreateFlagBi
{
switch ((VkPipelineCreateFlagBits)input_value)
{
+ case VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT:
+ return "VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT";
+ case VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR:
+ return "VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR";
+ case VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR:
+ return "VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR";
+ case VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV:
+ return "VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV";
+ case VK_PIPELINE_CREATE_DERIVATIVE_BIT:
+ return "VK_PIPELINE_CREATE_DERIVATIVE_BIT";
case VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT:
return "VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT";
+ case VK_PIPELINE_CREATE_DISPATCH_BASE_BIT:
+ return "VK_PIPELINE_CREATE_DISPATCH_BASE_BIT";
case VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT:
return "VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT";
- case VK_PIPELINE_CREATE_DISPATCH_BASE:
- return "VK_PIPELINE_CREATE_DISPATCH_BASE";
- case VK_PIPELINE_CREATE_DERIVATIVE_BIT:
- return "VK_PIPELINE_CREATE_DERIVATIVE_BIT";
- case VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT:
- return "VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT";
default:
return "Unhandled VkPipelineCreateFlagBits";
}
}
+static inline std::string string_VkPipelineCreateFlags(VkPipelineCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPipelineCreateFlagBits(static_cast<VkPipelineCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPipelineCreateFlagBits(static_cast<VkPipelineCreateFlagBits>(0)));
+ return ret;
+}
+
+static inline const char* string_VkPipelineShaderStageCreateFlagBits(VkPipelineShaderStageCreateFlagBits input_value)
+{
+ switch ((VkPipelineShaderStageCreateFlagBits)input_value)
+ {
+ case VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT:
+ return "VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT";
+ case VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT:
+ return "VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT";
+ default:
+ return "Unhandled VkPipelineShaderStageCreateFlagBits";
+ }
+}
+
+static inline std::string string_VkPipelineShaderStageCreateFlags(VkPipelineShaderStageCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPipelineShaderStageCreateFlagBits(static_cast<VkPipelineShaderStageCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPipelineShaderStageCreateFlagBits(static_cast<VkPipelineShaderStageCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkShaderStageFlagBits(VkShaderStageFlagBits input_value)
{
switch ((VkShaderStageFlagBits)input_value)
{
- case VK_SHADER_STAGE_VERTEX_BIT:
- return "VK_SHADER_STAGE_VERTEX_BIT";
case VK_SHADER_STAGE_ALL:
return "VK_SHADER_STAGE_ALL";
- case VK_SHADER_STAGE_FRAGMENT_BIT:
- return "VK_SHADER_STAGE_FRAGMENT_BIT";
- case VK_SHADER_STAGE_COMPUTE_BIT:
- return "VK_SHADER_STAGE_COMPUTE_BIT";
case VK_SHADER_STAGE_ALL_GRAPHICS:
return "VK_SHADER_STAGE_ALL_GRAPHICS";
+ case VK_SHADER_STAGE_ANY_HIT_BIT_NV:
+ return "VK_SHADER_STAGE_ANY_HIT_BIT_NV";
+ case VK_SHADER_STAGE_CALLABLE_BIT_NV:
+ return "VK_SHADER_STAGE_CALLABLE_BIT_NV";
+ case VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV:
+ return "VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV";
+ case VK_SHADER_STAGE_COMPUTE_BIT:
+ return "VK_SHADER_STAGE_COMPUTE_BIT";
+ case VK_SHADER_STAGE_FRAGMENT_BIT:
+ return "VK_SHADER_STAGE_FRAGMENT_BIT";
case VK_SHADER_STAGE_GEOMETRY_BIT:
return "VK_SHADER_STAGE_GEOMETRY_BIT";
+ case VK_SHADER_STAGE_INTERSECTION_BIT_NV:
+ return "VK_SHADER_STAGE_INTERSECTION_BIT_NV";
+ case VK_SHADER_STAGE_MESH_BIT_NV:
+ return "VK_SHADER_STAGE_MESH_BIT_NV";
+ case VK_SHADER_STAGE_MISS_BIT_NV:
+ return "VK_SHADER_STAGE_MISS_BIT_NV";
+ case VK_SHADER_STAGE_RAYGEN_BIT_NV:
+ return "VK_SHADER_STAGE_RAYGEN_BIT_NV";
+ case VK_SHADER_STAGE_TASK_BIT_NV:
+ return "VK_SHADER_STAGE_TASK_BIT_NV";
case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT:
return "VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT";
case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT:
return "VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT";
+ case VK_SHADER_STAGE_VERTEX_BIT:
+ return "VK_SHADER_STAGE_VERTEX_BIT";
default:
return "Unhandled VkShaderStageFlagBits";
}
}
+static inline std::string string_VkShaderStageFlags(VkShaderStageFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkShaderStageFlagBits(static_cast<VkShaderStageFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkShaderStageFlagBits(static_cast<VkShaderStageFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkVertexInputRate(VkVertexInputRate input_value)
{
switch ((VkVertexInputRate)input_value)
{
- case VK_VERTEX_INPUT_RATE_VERTEX:
- return "VK_VERTEX_INPUT_RATE_VERTEX";
case VK_VERTEX_INPUT_RATE_INSTANCE:
return "VK_VERTEX_INPUT_RATE_INSTANCE";
+ case VK_VERTEX_INPUT_RATE_VERTEX:
+ return "VK_VERTEX_INPUT_RATE_VERTEX";
default:
return "Unhandled VkVertexInputRate";
}
@@ -1698,28 +2527,28 @@ static inline const char* string_VkPrimitiveTopology(VkPrimitiveTopology input_v
{
switch ((VkPrimitiveTopology)input_value)
{
+ case VK_PRIMITIVE_TOPOLOGY_LINE_LIST:
+ return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST";
+ case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY:
+ return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY";
+ case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP:
+ return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP";
+ case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY:
+ return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY";
case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST:
return "VK_PRIMITIVE_TOPOLOGY_PATCH_LIST";
- case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST:
- return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST";
+ case VK_PRIMITIVE_TOPOLOGY_POINT_LIST:
+ return "VK_PRIMITIVE_TOPOLOGY_POINT_LIST";
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN:
return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN";
- case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY:
- return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY";
+ case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST:
+ return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST";
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY:
return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY";
- case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP:
- return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP";
- case VK_PRIMITIVE_TOPOLOGY_POINT_LIST:
- return "VK_PRIMITIVE_TOPOLOGY_POINT_LIST";
- case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY:
- return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY";
- case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY:
- return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY";
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP:
return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP";
- case VK_PRIMITIVE_TOPOLOGY_LINE_LIST:
- return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST";
+ case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY:
+ return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY";
default:
return "Unhandled VkPrimitiveTopology";
}
@@ -1729,14 +2558,14 @@ static inline const char* string_VkPolygonMode(VkPolygonMode input_value)
{
switch ((VkPolygonMode)input_value)
{
- case VK_POLYGON_MODE_POINT:
- return "VK_POLYGON_MODE_POINT";
case VK_POLYGON_MODE_FILL:
return "VK_POLYGON_MODE_FILL";
- case VK_POLYGON_MODE_LINE:
- return "VK_POLYGON_MODE_LINE";
case VK_POLYGON_MODE_FILL_RECTANGLE_NV:
return "VK_POLYGON_MODE_FILL_RECTANGLE_NV";
+ case VK_POLYGON_MODE_LINE:
+ return "VK_POLYGON_MODE_LINE";
+ case VK_POLYGON_MODE_POINT:
+ return "VK_POLYGON_MODE_POINT";
default:
return "Unhandled VkPolygonMode";
}
@@ -1746,12 +2575,12 @@ static inline const char* string_VkCullModeFlagBits(VkCullModeFlagBits input_val
{
switch ((VkCullModeFlagBits)input_value)
{
- case VK_CULL_MODE_FRONT_BIT:
- return "VK_CULL_MODE_FRONT_BIT";
- case VK_CULL_MODE_FRONT_AND_BACK:
- return "VK_CULL_MODE_FRONT_AND_BACK";
case VK_CULL_MODE_BACK_BIT:
return "VK_CULL_MODE_BACK_BIT";
+ case VK_CULL_MODE_FRONT_AND_BACK:
+ return "VK_CULL_MODE_FRONT_AND_BACK";
+ case VK_CULL_MODE_FRONT_BIT:
+ return "VK_CULL_MODE_FRONT_BIT";
case VK_CULL_MODE_NONE:
return "VK_CULL_MODE_NONE";
default:
@@ -1759,6 +2588,22 @@ static inline const char* string_VkCullModeFlagBits(VkCullModeFlagBits input_val
}
}
+static inline std::string string_VkCullModeFlags(VkCullModeFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCullModeFlagBits(static_cast<VkCullModeFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCullModeFlagBits(static_cast<VkCullModeFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkFrontFace(VkFrontFace input_value)
{
switch ((VkFrontFace)input_value)
@@ -1778,20 +2623,20 @@ static inline const char* string_VkCompareOp(VkCompareOp input_value)
{
case VK_COMPARE_OP_ALWAYS:
return "VK_COMPARE_OP_ALWAYS";
- case VK_COMPARE_OP_NOT_EQUAL:
- return "VK_COMPARE_OP_NOT_EQUAL";
+ case VK_COMPARE_OP_EQUAL:
+ return "VK_COMPARE_OP_EQUAL";
+ case VK_COMPARE_OP_GREATER:
+ return "VK_COMPARE_OP_GREATER";
+ case VK_COMPARE_OP_GREATER_OR_EQUAL:
+ return "VK_COMPARE_OP_GREATER_OR_EQUAL";
case VK_COMPARE_OP_LESS:
return "VK_COMPARE_OP_LESS";
case VK_COMPARE_OP_LESS_OR_EQUAL:
return "VK_COMPARE_OP_LESS_OR_EQUAL";
case VK_COMPARE_OP_NEVER:
return "VK_COMPARE_OP_NEVER";
- case VK_COMPARE_OP_GREATER:
- return "VK_COMPARE_OP_GREATER";
- case VK_COMPARE_OP_EQUAL:
- return "VK_COMPARE_OP_EQUAL";
- case VK_COMPARE_OP_GREATER_OR_EQUAL:
- return "VK_COMPARE_OP_GREATER_OR_EQUAL";
+ case VK_COMPARE_OP_NOT_EQUAL:
+ return "VK_COMPARE_OP_NOT_EQUAL";
default:
return "Unhandled VkCompareOp";
}
@@ -1801,22 +2646,22 @@ static inline const char* string_VkStencilOp(VkStencilOp input_value)
{
switch ((VkStencilOp)input_value)
{
+ case VK_STENCIL_OP_DECREMENT_AND_CLAMP:
+ return "VK_STENCIL_OP_DECREMENT_AND_CLAMP";
+ case VK_STENCIL_OP_DECREMENT_AND_WRAP:
+ return "VK_STENCIL_OP_DECREMENT_AND_WRAP";
+ case VK_STENCIL_OP_INCREMENT_AND_CLAMP:
+ return "VK_STENCIL_OP_INCREMENT_AND_CLAMP";
+ case VK_STENCIL_OP_INCREMENT_AND_WRAP:
+ return "VK_STENCIL_OP_INCREMENT_AND_WRAP";
case VK_STENCIL_OP_INVERT:
return "VK_STENCIL_OP_INVERT";
case VK_STENCIL_OP_KEEP:
return "VK_STENCIL_OP_KEEP";
- case VK_STENCIL_OP_DECREMENT_AND_CLAMP:
- return "VK_STENCIL_OP_DECREMENT_AND_CLAMP";
case VK_STENCIL_OP_REPLACE:
return "VK_STENCIL_OP_REPLACE";
- case VK_STENCIL_OP_INCREMENT_AND_WRAP:
- return "VK_STENCIL_OP_INCREMENT_AND_WRAP";
case VK_STENCIL_OP_ZERO:
return "VK_STENCIL_OP_ZERO";
- case VK_STENCIL_OP_INCREMENT_AND_CLAMP:
- return "VK_STENCIL_OP_INCREMENT_AND_CLAMP";
- case VK_STENCIL_OP_DECREMENT_AND_WRAP:
- return "VK_STENCIL_OP_DECREMENT_AND_WRAP";
default:
return "Unhandled VkStencilOp";
}
@@ -1826,38 +2671,38 @@ static inline const char* string_VkLogicOp(VkLogicOp input_value)
{
switch ((VkLogicOp)input_value)
{
- case VK_LOGIC_OP_NOR:
- return "VK_LOGIC_OP_NOR";
- case VK_LOGIC_OP_OR:
- return "VK_LOGIC_OP_OR";
- case VK_LOGIC_OP_NO_OP:
- return "VK_LOGIC_OP_NO_OP";
- case VK_LOGIC_OP_NAND:
- return "VK_LOGIC_OP_NAND";
- case VK_LOGIC_OP_XOR:
- return "VK_LOGIC_OP_XOR";
- case VK_LOGIC_OP_AND_REVERSE:
- return "VK_LOGIC_OP_AND_REVERSE";
- case VK_LOGIC_OP_COPY:
- return "VK_LOGIC_OP_COPY";
case VK_LOGIC_OP_AND:
return "VK_LOGIC_OP_AND";
+ case VK_LOGIC_OP_AND_INVERTED:
+ return "VK_LOGIC_OP_AND_INVERTED";
+ case VK_LOGIC_OP_AND_REVERSE:
+ return "VK_LOGIC_OP_AND_REVERSE";
case VK_LOGIC_OP_CLEAR:
return "VK_LOGIC_OP_CLEAR";
+ case VK_LOGIC_OP_COPY:
+ return "VK_LOGIC_OP_COPY";
case VK_LOGIC_OP_COPY_INVERTED:
return "VK_LOGIC_OP_COPY_INVERTED";
- case VK_LOGIC_OP_SET:
- return "VK_LOGIC_OP_SET";
+ case VK_LOGIC_OP_EQUIVALENT:
+ return "VK_LOGIC_OP_EQUIVALENT";
case VK_LOGIC_OP_INVERT:
return "VK_LOGIC_OP_INVERT";
- case VK_LOGIC_OP_AND_INVERTED:
- return "VK_LOGIC_OP_AND_INVERTED";
- case VK_LOGIC_OP_OR_REVERSE:
- return "VK_LOGIC_OP_OR_REVERSE";
+ case VK_LOGIC_OP_NAND:
+ return "VK_LOGIC_OP_NAND";
+ case VK_LOGIC_OP_NOR:
+ return "VK_LOGIC_OP_NOR";
+ case VK_LOGIC_OP_NO_OP:
+ return "VK_LOGIC_OP_NO_OP";
+ case VK_LOGIC_OP_OR:
+ return "VK_LOGIC_OP_OR";
case VK_LOGIC_OP_OR_INVERTED:
return "VK_LOGIC_OP_OR_INVERTED";
- case VK_LOGIC_OP_EQUIVALENT:
- return "VK_LOGIC_OP_EQUIVALENT";
+ case VK_LOGIC_OP_OR_REVERSE:
+ return "VK_LOGIC_OP_OR_REVERSE";
+ case VK_LOGIC_OP_SET:
+ return "VK_LOGIC_OP_SET";
+ case VK_LOGIC_OP_XOR:
+ return "VK_LOGIC_OP_XOR";
default:
return "Unhandled VkLogicOp";
}
@@ -1867,42 +2712,42 @@ static inline const char* string_VkBlendFactor(VkBlendFactor input_value)
{
switch ((VkBlendFactor)input_value)
{
- case VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA:
- return "VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA";
case VK_BLEND_FACTOR_CONSTANT_ALPHA:
return "VK_BLEND_FACTOR_CONSTANT_ALPHA";
- case VK_BLEND_FACTOR_ONE:
- return "VK_BLEND_FACTOR_ONE";
+ case VK_BLEND_FACTOR_CONSTANT_COLOR:
+ return "VK_BLEND_FACTOR_CONSTANT_COLOR";
+ case VK_BLEND_FACTOR_DST_ALPHA:
+ return "VK_BLEND_FACTOR_DST_ALPHA";
case VK_BLEND_FACTOR_DST_COLOR:
return "VK_BLEND_FACTOR_DST_COLOR";
- case VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR:
- return "VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR";
- case VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR:
- return "VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR";
+ case VK_BLEND_FACTOR_ONE:
+ return "VK_BLEND_FACTOR_ONE";
case VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA:
return "VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA";
+ case VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR:
+ return "VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR";
case VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA:
return "VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA";
- case VK_BLEND_FACTOR_SRC1_COLOR:
- return "VK_BLEND_FACTOR_SRC1_COLOR";
+ case VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR:
+ return "VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR";
case VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA:
return "VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA";
- case VK_BLEND_FACTOR_SRC_ALPHA_SATURATE:
- return "VK_BLEND_FACTOR_SRC_ALPHA_SATURATE";
- case VK_BLEND_FACTOR_SRC_COLOR:
- return "VK_BLEND_FACTOR_SRC_COLOR";
- case VK_BLEND_FACTOR_DST_ALPHA:
- return "VK_BLEND_FACTOR_DST_ALPHA";
- case VK_BLEND_FACTOR_SRC_ALPHA:
- return "VK_BLEND_FACTOR_SRC_ALPHA";
+ case VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR:
+ return "VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR";
+ case VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA:
+ return "VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA";
case VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR:
return "VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR";
case VK_BLEND_FACTOR_SRC1_ALPHA:
return "VK_BLEND_FACTOR_SRC1_ALPHA";
- case VK_BLEND_FACTOR_CONSTANT_COLOR:
- return "VK_BLEND_FACTOR_CONSTANT_COLOR";
- case VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR:
- return "VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR";
+ case VK_BLEND_FACTOR_SRC1_COLOR:
+ return "VK_BLEND_FACTOR_SRC1_COLOR";
+ case VK_BLEND_FACTOR_SRC_ALPHA:
+ return "VK_BLEND_FACTOR_SRC_ALPHA";
+ case VK_BLEND_FACTOR_SRC_ALPHA_SATURATE:
+ return "VK_BLEND_FACTOR_SRC_ALPHA_SATURATE";
+ case VK_BLEND_FACTOR_SRC_COLOR:
+ return "VK_BLEND_FACTOR_SRC_COLOR";
case VK_BLEND_FACTOR_ZERO:
return "VK_BLEND_FACTOR_ZERO";
default:
@@ -1916,106 +2761,106 @@ static inline const char* string_VkBlendOp(VkBlendOp input_value)
{
case VK_BLEND_OP_ADD:
return "VK_BLEND_OP_ADD";
- case VK_BLEND_OP_SRC_EXT:
- return "VK_BLEND_OP_SRC_EXT";
- case VK_BLEND_OP_DST_EXT:
- return "VK_BLEND_OP_DST_EXT";
+ case VK_BLEND_OP_BLUE_EXT:
+ return "VK_BLEND_OP_BLUE_EXT";
+ case VK_BLEND_OP_COLORBURN_EXT:
+ return "VK_BLEND_OP_COLORBURN_EXT";
+ case VK_BLEND_OP_COLORDODGE_EXT:
+ return "VK_BLEND_OP_COLORDODGE_EXT";
+ case VK_BLEND_OP_CONTRAST_EXT:
+ return "VK_BLEND_OP_CONTRAST_EXT";
+ case VK_BLEND_OP_DARKEN_EXT:
+ return "VK_BLEND_OP_DARKEN_EXT";
case VK_BLEND_OP_DIFFERENCE_EXT:
return "VK_BLEND_OP_DIFFERENCE_EXT";
- case VK_BLEND_OP_MINUS_EXT:
- return "VK_BLEND_OP_MINUS_EXT";
- case VK_BLEND_OP_MINUS_CLAMPED_EXT:
- return "VK_BLEND_OP_MINUS_CLAMPED_EXT";
- case VK_BLEND_OP_SOFTLIGHT_EXT:
- return "VK_BLEND_OP_SOFTLIGHT_EXT";
- case VK_BLEND_OP_LINEARDODGE_EXT:
- return "VK_BLEND_OP_LINEARDODGE_EXT";
- case VK_BLEND_OP_HARDMIX_EXT:
- return "VK_BLEND_OP_HARDMIX_EXT";
- case VK_BLEND_OP_MIN:
- return "VK_BLEND_OP_MIN";
- case VK_BLEND_OP_HSL_LUMINOSITY_EXT:
- return "VK_BLEND_OP_HSL_LUMINOSITY_EXT";
- case VK_BLEND_OP_SRC_ATOP_EXT:
- return "VK_BLEND_OP_SRC_ATOP_EXT";
- case VK_BLEND_OP_SUBTRACT:
- return "VK_BLEND_OP_SUBTRACT";
- case VK_BLEND_OP_HSL_HUE_EXT:
- return "VK_BLEND_OP_HSL_HUE_EXT";
- case VK_BLEND_OP_REVERSE_SUBTRACT:
- return "VK_BLEND_OP_REVERSE_SUBTRACT";
+ case VK_BLEND_OP_DST_ATOP_EXT:
+ return "VK_BLEND_OP_DST_ATOP_EXT";
+ case VK_BLEND_OP_DST_EXT:
+ return "VK_BLEND_OP_DST_EXT";
+ case VK_BLEND_OP_DST_IN_EXT:
+ return "VK_BLEND_OP_DST_IN_EXT";
+ case VK_BLEND_OP_DST_OUT_EXT:
+ return "VK_BLEND_OP_DST_OUT_EXT";
case VK_BLEND_OP_DST_OVER_EXT:
return "VK_BLEND_OP_DST_OVER_EXT";
- case VK_BLEND_OP_VIVIDLIGHT_EXT:
- return "VK_BLEND_OP_VIVIDLIGHT_EXT";
- case VK_BLEND_OP_HSL_COLOR_EXT:
- return "VK_BLEND_OP_HSL_COLOR_EXT";
case VK_BLEND_OP_EXCLUSION_EXT:
return "VK_BLEND_OP_EXCLUSION_EXT";
- case VK_BLEND_OP_PLUS_DARKER_EXT:
- return "VK_BLEND_OP_PLUS_DARKER_EXT";
- case VK_BLEND_OP_DST_IN_EXT:
- return "VK_BLEND_OP_DST_IN_EXT";
- case VK_BLEND_OP_INVERT_OVG_EXT:
- return "VK_BLEND_OP_INVERT_OVG_EXT";
- case VK_BLEND_OP_CONTRAST_EXT:
- return "VK_BLEND_OP_CONTRAST_EXT";
- case VK_BLEND_OP_SRC_OUT_EXT:
- return "VK_BLEND_OP_SRC_OUT_EXT";
- case VK_BLEND_OP_COLORDODGE_EXT:
- return "VK_BLEND_OP_COLORDODGE_EXT";
- case VK_BLEND_OP_SRC_IN_EXT:
- return "VK_BLEND_OP_SRC_IN_EXT";
- case VK_BLEND_OP_MAX:
- return "VK_BLEND_OP_MAX";
- case VK_BLEND_OP_HSL_SATURATION_EXT:
- return "VK_BLEND_OP_HSL_SATURATION_EXT";
- case VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT:
- return "VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT";
- case VK_BLEND_OP_DARKEN_EXT:
- return "VK_BLEND_OP_DARKEN_EXT";
- case VK_BLEND_OP_BLUE_EXT:
- return "VK_BLEND_OP_BLUE_EXT";
- case VK_BLEND_OP_XOR_EXT:
- return "VK_BLEND_OP_XOR_EXT";
+ case VK_BLEND_OP_GREEN_EXT:
+ return "VK_BLEND_OP_GREEN_EXT";
case VK_BLEND_OP_HARDLIGHT_EXT:
return "VK_BLEND_OP_HARDLIGHT_EXT";
- case VK_BLEND_OP_RED_EXT:
- return "VK_BLEND_OP_RED_EXT";
+ case VK_BLEND_OP_HARDMIX_EXT:
+ return "VK_BLEND_OP_HARDMIX_EXT";
+ case VK_BLEND_OP_HSL_COLOR_EXT:
+ return "VK_BLEND_OP_HSL_COLOR_EXT";
+ case VK_BLEND_OP_HSL_HUE_EXT:
+ return "VK_BLEND_OP_HSL_HUE_EXT";
+ case VK_BLEND_OP_HSL_LUMINOSITY_EXT:
+ return "VK_BLEND_OP_HSL_LUMINOSITY_EXT";
+ case VK_BLEND_OP_HSL_SATURATION_EXT:
+ return "VK_BLEND_OP_HSL_SATURATION_EXT";
case VK_BLEND_OP_INVERT_EXT:
return "VK_BLEND_OP_INVERT_EXT";
- case VK_BLEND_OP_ZERO_EXT:
- return "VK_BLEND_OP_ZERO_EXT";
+ case VK_BLEND_OP_INVERT_OVG_EXT:
+ return "VK_BLEND_OP_INVERT_OVG_EXT";
+ case VK_BLEND_OP_INVERT_RGB_EXT:
+ return "VK_BLEND_OP_INVERT_RGB_EXT";
case VK_BLEND_OP_LIGHTEN_EXT:
return "VK_BLEND_OP_LIGHTEN_EXT";
- case VK_BLEND_OP_SCREEN_EXT:
- return "VK_BLEND_OP_SCREEN_EXT";
- case VK_BLEND_OP_DST_OUT_EXT:
- return "VK_BLEND_OP_DST_OUT_EXT";
+ case VK_BLEND_OP_LINEARBURN_EXT:
+ return "VK_BLEND_OP_LINEARBURN_EXT";
+ case VK_BLEND_OP_LINEARDODGE_EXT:
+ return "VK_BLEND_OP_LINEARDODGE_EXT";
+ case VK_BLEND_OP_LINEARLIGHT_EXT:
+ return "VK_BLEND_OP_LINEARLIGHT_EXT";
+ case VK_BLEND_OP_MAX:
+ return "VK_BLEND_OP_MAX";
+ case VK_BLEND_OP_MIN:
+ return "VK_BLEND_OP_MIN";
+ case VK_BLEND_OP_MINUS_CLAMPED_EXT:
+ return "VK_BLEND_OP_MINUS_CLAMPED_EXT";
+ case VK_BLEND_OP_MINUS_EXT:
+ return "VK_BLEND_OP_MINUS_EXT";
case VK_BLEND_OP_MULTIPLY_EXT:
return "VK_BLEND_OP_MULTIPLY_EXT";
case VK_BLEND_OP_OVERLAY_EXT:
return "VK_BLEND_OP_OVERLAY_EXT";
- case VK_BLEND_OP_LINEARLIGHT_EXT:
- return "VK_BLEND_OP_LINEARLIGHT_EXT";
- case VK_BLEND_OP_PLUS_EXT:
- return "VK_BLEND_OP_PLUS_EXT";
- case VK_BLEND_OP_PLUS_CLAMPED_EXT:
- return "VK_BLEND_OP_PLUS_CLAMPED_EXT";
- case VK_BLEND_OP_INVERT_RGB_EXT:
- return "VK_BLEND_OP_INVERT_RGB_EXT";
- case VK_BLEND_OP_DST_ATOP_EXT:
- return "VK_BLEND_OP_DST_ATOP_EXT";
- case VK_BLEND_OP_LINEARBURN_EXT:
- return "VK_BLEND_OP_LINEARBURN_EXT";
- case VK_BLEND_OP_GREEN_EXT:
- return "VK_BLEND_OP_GREEN_EXT";
- case VK_BLEND_OP_COLORBURN_EXT:
- return "VK_BLEND_OP_COLORBURN_EXT";
case VK_BLEND_OP_PINLIGHT_EXT:
return "VK_BLEND_OP_PINLIGHT_EXT";
+ case VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT:
+ return "VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT";
+ case VK_BLEND_OP_PLUS_CLAMPED_EXT:
+ return "VK_BLEND_OP_PLUS_CLAMPED_EXT";
+ case VK_BLEND_OP_PLUS_DARKER_EXT:
+ return "VK_BLEND_OP_PLUS_DARKER_EXT";
+ case VK_BLEND_OP_PLUS_EXT:
+ return "VK_BLEND_OP_PLUS_EXT";
+ case VK_BLEND_OP_RED_EXT:
+ return "VK_BLEND_OP_RED_EXT";
+ case VK_BLEND_OP_REVERSE_SUBTRACT:
+ return "VK_BLEND_OP_REVERSE_SUBTRACT";
+ case VK_BLEND_OP_SCREEN_EXT:
+ return "VK_BLEND_OP_SCREEN_EXT";
+ case VK_BLEND_OP_SOFTLIGHT_EXT:
+ return "VK_BLEND_OP_SOFTLIGHT_EXT";
+ case VK_BLEND_OP_SRC_ATOP_EXT:
+ return "VK_BLEND_OP_SRC_ATOP_EXT";
+ case VK_BLEND_OP_SRC_EXT:
+ return "VK_BLEND_OP_SRC_EXT";
+ case VK_BLEND_OP_SRC_IN_EXT:
+ return "VK_BLEND_OP_SRC_IN_EXT";
+ case VK_BLEND_OP_SRC_OUT_EXT:
+ return "VK_BLEND_OP_SRC_OUT_EXT";
case VK_BLEND_OP_SRC_OVER_EXT:
return "VK_BLEND_OP_SRC_OVER_EXT";
+ case VK_BLEND_OP_SUBTRACT:
+ return "VK_BLEND_OP_SUBTRACT";
+ case VK_BLEND_OP_VIVIDLIGHT_EXT:
+ return "VK_BLEND_OP_VIVIDLIGHT_EXT";
+ case VK_BLEND_OP_XOR_EXT:
+ return "VK_BLEND_OP_XOR_EXT";
+ case VK_BLEND_OP_ZERO_EXT:
+ return "VK_BLEND_OP_ZERO_EXT";
default:
return "Unhandled VkBlendOp";
}
@@ -2025,60 +2870,113 @@ static inline const char* string_VkColorComponentFlagBits(VkColorComponentFlagBi
{
switch ((VkColorComponentFlagBits)input_value)
{
- case VK_COLOR_COMPONENT_R_BIT:
- return "VK_COLOR_COMPONENT_R_BIT";
+ case VK_COLOR_COMPONENT_A_BIT:
+ return "VK_COLOR_COMPONENT_A_BIT";
case VK_COLOR_COMPONENT_B_BIT:
return "VK_COLOR_COMPONENT_B_BIT";
case VK_COLOR_COMPONENT_G_BIT:
return "VK_COLOR_COMPONENT_G_BIT";
- case VK_COLOR_COMPONENT_A_BIT:
- return "VK_COLOR_COMPONENT_A_BIT";
+ case VK_COLOR_COMPONENT_R_BIT:
+ return "VK_COLOR_COMPONENT_R_BIT";
default:
return "Unhandled VkColorComponentFlagBits";
}
}
+static inline std::string string_VkColorComponentFlags(VkColorComponentFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkColorComponentFlagBits(static_cast<VkColorComponentFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkColorComponentFlagBits(static_cast<VkColorComponentFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkDynamicState(VkDynamicState input_value)
{
switch ((VkDynamicState)input_value)
{
- case VK_DYNAMIC_STATE_LINE_WIDTH:
- return "VK_DYNAMIC_STATE_LINE_WIDTH";
+ case VK_DYNAMIC_STATE_BLEND_CONSTANTS:
+ return "VK_DYNAMIC_STATE_BLEND_CONSTANTS";
case VK_DYNAMIC_STATE_DEPTH_BIAS:
return "VK_DYNAMIC_STATE_DEPTH_BIAS";
+ case VK_DYNAMIC_STATE_DEPTH_BOUNDS:
+ return "VK_DYNAMIC_STATE_DEPTH_BOUNDS";
+ case VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT:
+ return "VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT";
+ case VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV:
+ return "VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV";
+ case VK_DYNAMIC_STATE_LINE_STIPPLE_EXT:
+ return "VK_DYNAMIC_STATE_LINE_STIPPLE_EXT";
+ case VK_DYNAMIC_STATE_LINE_WIDTH:
+ return "VK_DYNAMIC_STATE_LINE_WIDTH";
+ case VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT:
+ return "VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT";
+ case VK_DYNAMIC_STATE_SCISSOR:
+ return "VK_DYNAMIC_STATE_SCISSOR";
case VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK:
return "VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK";
case VK_DYNAMIC_STATE_STENCIL_REFERENCE:
return "VK_DYNAMIC_STATE_STENCIL_REFERENCE";
- case VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV:
- return "VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV";
case VK_DYNAMIC_STATE_STENCIL_WRITE_MASK:
return "VK_DYNAMIC_STATE_STENCIL_WRITE_MASK";
- case VK_DYNAMIC_STATE_SCISSOR:
- return "VK_DYNAMIC_STATE_SCISSOR";
case VK_DYNAMIC_STATE_VIEWPORT:
return "VK_DYNAMIC_STATE_VIEWPORT";
- case VK_DYNAMIC_STATE_DEPTH_BOUNDS:
- return "VK_DYNAMIC_STATE_DEPTH_BOUNDS";
- case VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT:
- return "VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT";
- case VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT:
- return "VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT";
- case VK_DYNAMIC_STATE_BLEND_CONSTANTS:
- return "VK_DYNAMIC_STATE_BLEND_CONSTANTS";
+ case VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV:
+ return "VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV";
+ case VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV:
+ return "VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV";
+ case VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV:
+ return "VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV";
default:
return "Unhandled VkDynamicState";
}
}
+static inline const char* string_VkSamplerCreateFlagBits(VkSamplerCreateFlagBits input_value)
+{
+ switch ((VkSamplerCreateFlagBits)input_value)
+ {
+ case VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT:
+ return "VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT";
+ case VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT:
+ return "VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT";
+ default:
+ return "Unhandled VkSamplerCreateFlagBits";
+ }
+}
+
+static inline std::string string_VkSamplerCreateFlags(VkSamplerCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSamplerCreateFlagBits(static_cast<VkSamplerCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSamplerCreateFlagBits(static_cast<VkSamplerCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkFilter(VkFilter input_value)
{
switch ((VkFilter)input_value)
{
- case VK_FILTER_LINEAR:
- return "VK_FILTER_LINEAR";
case VK_FILTER_CUBIC_IMG:
return "VK_FILTER_CUBIC_IMG";
+ case VK_FILTER_LINEAR:
+ return "VK_FILTER_LINEAR";
case VK_FILTER_NEAREST:
return "VK_FILTER_NEAREST";
default:
@@ -2090,10 +2988,10 @@ static inline const char* string_VkSamplerMipmapMode(VkSamplerMipmapMode input_v
{
switch ((VkSamplerMipmapMode)input_value)
{
- case VK_SAMPLER_MIPMAP_MODE_NEAREST:
- return "VK_SAMPLER_MIPMAP_MODE_NEAREST";
case VK_SAMPLER_MIPMAP_MODE_LINEAR:
return "VK_SAMPLER_MIPMAP_MODE_LINEAR";
+ case VK_SAMPLER_MIPMAP_MODE_NEAREST:
+ return "VK_SAMPLER_MIPMAP_MODE_NEAREST";
default:
return "Unhandled VkSamplerMipmapMode";
}
@@ -2103,14 +3001,14 @@ static inline const char* string_VkSamplerAddressMode(VkSamplerAddressMode input
{
switch ((VkSamplerAddressMode)input_value)
{
- case VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE:
- return "VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE";
case VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER:
return "VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER";
- case VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT:
- return "VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT";
case VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE:
return "VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE";
+ case VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT:
+ return "VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT";
+ case VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE:
+ return "VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE";
case VK_SAMPLER_ADDRESS_MODE_REPEAT:
return "VK_SAMPLER_ADDRESS_MODE_REPEAT";
default:
@@ -2122,18 +3020,18 @@ static inline const char* string_VkBorderColor(VkBorderColor input_value)
{
switch ((VkBorderColor)input_value)
{
+ case VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK:
+ return "VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK";
+ case VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE:
+ return "VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE";
case VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK:
return "VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK";
case VK_BORDER_COLOR_INT_OPAQUE_BLACK:
return "VK_BORDER_COLOR_INT_OPAQUE_BLACK";
- case VK_BORDER_COLOR_INT_TRANSPARENT_BLACK:
- return "VK_BORDER_COLOR_INT_TRANSPARENT_BLACK";
case VK_BORDER_COLOR_INT_OPAQUE_WHITE:
return "VK_BORDER_COLOR_INT_OPAQUE_WHITE";
- case VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE:
- return "VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE";
- case VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK:
- return "VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK";
+ case VK_BORDER_COLOR_INT_TRANSPARENT_BLACK:
+ return "VK_BORDER_COLOR_INT_TRANSPARENT_BLACK";
default:
return "Unhandled VkBorderColor";
}
@@ -2143,41 +3041,61 @@ static inline const char* string_VkDescriptorSetLayoutCreateFlagBits(VkDescripto
{
switch ((VkDescriptorSetLayoutCreateFlagBits)input_value)
{
- case VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT:
- return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT";
case VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR:
return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR";
+ case VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT:
+ return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT";
default:
return "Unhandled VkDescriptorSetLayoutCreateFlagBits";
}
}
+static inline std::string string_VkDescriptorSetLayoutCreateFlags(VkDescriptorSetLayoutCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDescriptorSetLayoutCreateFlagBits(static_cast<VkDescriptorSetLayoutCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDescriptorSetLayoutCreateFlagBits(static_cast<VkDescriptorSetLayoutCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkDescriptorType(VkDescriptorType input_value)
{
switch ((VkDescriptorType)input_value)
{
+ case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV:
+ return "VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV";
case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
return "VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER";
- case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
- return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER";
- case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
- return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC";
+ case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT:
+ return "VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT";
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
return "VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT";
- case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
- return "VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER";
- case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
- return "VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER";
case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
return "VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE";
case VK_DESCRIPTOR_TYPE_SAMPLER:
return "VK_DESCRIPTOR_TYPE_SAMPLER";
- case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
- return "VK_DESCRIPTOR_TYPE_STORAGE_IMAGE";
- case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
- return "VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC";
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
return "VK_DESCRIPTOR_TYPE_STORAGE_BUFFER";
+ case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
+ return "VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC";
+ case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
+ return "VK_DESCRIPTOR_TYPE_STORAGE_IMAGE";
+ case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
+ return "VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER";
+ case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
+ return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER";
+ case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
+ return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC";
+ case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
+ return "VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER";
default:
return "Unhandled VkDescriptorType";
}
@@ -2187,15 +3105,58 @@ static inline const char* string_VkDescriptorPoolCreateFlagBits(VkDescriptorPool
{
switch ((VkDescriptorPoolCreateFlagBits)input_value)
{
- case VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT:
- return "VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT";
case VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT:
return "VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT";
+ case VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT:
+ return "VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT";
default:
return "Unhandled VkDescriptorPoolCreateFlagBits";
}
}
+static inline std::string string_VkDescriptorPoolCreateFlags(VkDescriptorPoolCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDescriptorPoolCreateFlagBits(static_cast<VkDescriptorPoolCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDescriptorPoolCreateFlagBits(static_cast<VkDescriptorPoolCreateFlagBits>(0)));
+ return ret;
+}
+
+static inline const char* string_VkFramebufferCreateFlagBits(VkFramebufferCreateFlagBits input_value)
+{
+ switch ((VkFramebufferCreateFlagBits)input_value)
+ {
+ case VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT:
+ return "VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT";
+ default:
+ return "Unhandled VkFramebufferCreateFlagBits";
+ }
+}
+
+static inline std::string string_VkFramebufferCreateFlags(VkFramebufferCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkFramebufferCreateFlagBits(static_cast<VkFramebufferCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkFramebufferCreateFlagBits(static_cast<VkFramebufferCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkAttachmentDescriptionFlagBits(VkAttachmentDescriptionFlagBits input_value)
{
switch ((VkAttachmentDescriptionFlagBits)input_value)
@@ -2207,14 +3168,30 @@ static inline const char* string_VkAttachmentDescriptionFlagBits(VkAttachmentDes
}
}
+static inline std::string string_VkAttachmentDescriptionFlags(VkAttachmentDescriptionFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkAttachmentDescriptionFlagBits(static_cast<VkAttachmentDescriptionFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkAttachmentDescriptionFlagBits(static_cast<VkAttachmentDescriptionFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkAttachmentLoadOp(VkAttachmentLoadOp input_value)
{
switch ((VkAttachmentLoadOp)input_value)
{
- case VK_ATTACHMENT_LOAD_OP_DONT_CARE:
- return "VK_ATTACHMENT_LOAD_OP_DONT_CARE";
case VK_ATTACHMENT_LOAD_OP_CLEAR:
return "VK_ATTACHMENT_LOAD_OP_CLEAR";
+ case VK_ATTACHMENT_LOAD_OP_DONT_CARE:
+ return "VK_ATTACHMENT_LOAD_OP_DONT_CARE";
case VK_ATTACHMENT_LOAD_OP_LOAD:
return "VK_ATTACHMENT_LOAD_OP_LOAD";
default:
@@ -2248,6 +3225,22 @@ static inline const char* string_VkSubpassDescriptionFlagBits(VkSubpassDescripti
}
}
+static inline std::string string_VkSubpassDescriptionFlags(VkSubpassDescriptionFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSubpassDescriptionFlagBits(static_cast<VkSubpassDescriptionFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSubpassDescriptionFlagBits(static_cast<VkSubpassDescriptionFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkPipelineBindPoint(VkPipelineBindPoint input_value)
{
switch ((VkPipelineBindPoint)input_value)
@@ -2256,6 +3249,8 @@ static inline const char* string_VkPipelineBindPoint(VkPipelineBindPoint input_v
return "VK_PIPELINE_BIND_POINT_COMPUTE";
case VK_PIPELINE_BIND_POINT_GRAPHICS:
return "VK_PIPELINE_BIND_POINT_GRAPHICS";
+ case VK_PIPELINE_BIND_POINT_RAY_TRACING_NV:
+ return "VK_PIPELINE_BIND_POINT_RAY_TRACING_NV";
default:
return "Unhandled VkPipelineBindPoint";
}
@@ -2265,59 +3260,91 @@ static inline const char* string_VkAccessFlagBits(VkAccessFlagBits input_value)
{
switch ((VkAccessFlagBits)input_value)
{
- case VK_ACCESS_UNIFORM_READ_BIT:
- return "VK_ACCESS_UNIFORM_READ_BIT";
- case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT:
- return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT";
- case VK_ACCESS_INDIRECT_COMMAND_READ_BIT:
- return "VK_ACCESS_INDIRECT_COMMAND_READ_BIT";
- case VK_ACCESS_HOST_READ_BIT:
- return "VK_ACCESS_HOST_READ_BIT";
- case VK_ACCESS_HOST_WRITE_BIT:
- return "VK_ACCESS_HOST_WRITE_BIT";
- case VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT:
- return "VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT";
+ case VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV:
+ return "VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV";
+ case VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV:
+ return "VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV";
case VK_ACCESS_COLOR_ATTACHMENT_READ_BIT:
return "VK_ACCESS_COLOR_ATTACHMENT_READ_BIT";
- case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT:
- return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT";
+ case VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT:
+ return "VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT";
case VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT:
return "VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT";
- case VK_ACCESS_TRANSFER_WRITE_BIT:
- return "VK_ACCESS_TRANSFER_WRITE_BIT";
+ case VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX:
+ return "VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX";
case VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX:
return "VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX";
+ case VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT:
+ return "VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT";
+ case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT:
+ return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT";
+ case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT:
+ return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT";
+ case VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT:
+ return "VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT";
+ case VK_ACCESS_HOST_READ_BIT:
+ return "VK_ACCESS_HOST_READ_BIT";
+ case VK_ACCESS_HOST_WRITE_BIT:
+ return "VK_ACCESS_HOST_WRITE_BIT";
+ case VK_ACCESS_INDEX_READ_BIT:
+ return "VK_ACCESS_INDEX_READ_BIT";
+ case VK_ACCESS_INDIRECT_COMMAND_READ_BIT:
+ return "VK_ACCESS_INDIRECT_COMMAND_READ_BIT";
case VK_ACCESS_INPUT_ATTACHMENT_READ_BIT:
return "VK_ACCESS_INPUT_ATTACHMENT_READ_BIT";
- case VK_ACCESS_SHADER_READ_BIT:
- return "VK_ACCESS_SHADER_READ_BIT";
- case VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT:
- return "VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT";
- case VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX:
- return "VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX";
case VK_ACCESS_MEMORY_READ_BIT:
return "VK_ACCESS_MEMORY_READ_BIT";
- case VK_ACCESS_SHADER_WRITE_BIT:
- return "VK_ACCESS_SHADER_WRITE_BIT";
- case VK_ACCESS_INDEX_READ_BIT:
- return "VK_ACCESS_INDEX_READ_BIT";
case VK_ACCESS_MEMORY_WRITE_BIT:
return "VK_ACCESS_MEMORY_WRITE_BIT";
+ case VK_ACCESS_SHADER_READ_BIT:
+ return "VK_ACCESS_SHADER_READ_BIT";
+ case VK_ACCESS_SHADER_WRITE_BIT:
+ return "VK_ACCESS_SHADER_WRITE_BIT";
+ case VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV:
+ return "VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV";
case VK_ACCESS_TRANSFER_READ_BIT:
return "VK_ACCESS_TRANSFER_READ_BIT";
+ case VK_ACCESS_TRANSFER_WRITE_BIT:
+ return "VK_ACCESS_TRANSFER_WRITE_BIT";
+ case VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT:
+ return "VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT";
+ case VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT:
+ return "VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT";
+ case VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT:
+ return "VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT";
+ case VK_ACCESS_UNIFORM_READ_BIT:
+ return "VK_ACCESS_UNIFORM_READ_BIT";
+ case VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT:
+ return "VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT";
default:
return "Unhandled VkAccessFlagBits";
}
}
+static inline std::string string_VkAccessFlags(VkAccessFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkAccessFlagBits(static_cast<VkAccessFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkAccessFlagBits(static_cast<VkAccessFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkDependencyFlagBits(VkDependencyFlagBits input_value)
{
switch ((VkDependencyFlagBits)input_value)
{
- case VK_DEPENDENCY_DEVICE_GROUP_BIT:
- return "VK_DEPENDENCY_DEVICE_GROUP_BIT";
case VK_DEPENDENCY_BY_REGION_BIT:
return "VK_DEPENDENCY_BY_REGION_BIT";
+ case VK_DEPENDENCY_DEVICE_GROUP_BIT:
+ return "VK_DEPENDENCY_DEVICE_GROUP_BIT";
case VK_DEPENDENCY_VIEW_LOCAL_BIT:
return "VK_DEPENDENCY_VIEW_LOCAL_BIT";
default:
@@ -2325,21 +3352,53 @@ static inline const char* string_VkDependencyFlagBits(VkDependencyFlagBits input
}
}
+static inline std::string string_VkDependencyFlags(VkDependencyFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDependencyFlagBits(static_cast<VkDependencyFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDependencyFlagBits(static_cast<VkDependencyFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkCommandPoolCreateFlagBits(VkCommandPoolCreateFlagBits input_value)
{
switch ((VkCommandPoolCreateFlagBits)input_value)
{
- case VK_COMMAND_POOL_CREATE_TRANSIENT_BIT:
- return "VK_COMMAND_POOL_CREATE_TRANSIENT_BIT";
- case VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT:
- return "VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT";
case VK_COMMAND_POOL_CREATE_PROTECTED_BIT:
return "VK_COMMAND_POOL_CREATE_PROTECTED_BIT";
+ case VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT:
+ return "VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT";
+ case VK_COMMAND_POOL_CREATE_TRANSIENT_BIT:
+ return "VK_COMMAND_POOL_CREATE_TRANSIENT_BIT";
default:
return "Unhandled VkCommandPoolCreateFlagBits";
}
}
+static inline std::string string_VkCommandPoolCreateFlags(VkCommandPoolCreateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCommandPoolCreateFlagBits(static_cast<VkCommandPoolCreateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCommandPoolCreateFlagBits(static_cast<VkCommandPoolCreateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkCommandPoolResetFlagBits(VkCommandPoolResetFlagBits input_value)
{
switch ((VkCommandPoolResetFlagBits)input_value)
@@ -2351,14 +3410,30 @@ static inline const char* string_VkCommandPoolResetFlagBits(VkCommandPoolResetFl
}
}
+static inline std::string string_VkCommandPoolResetFlags(VkCommandPoolResetFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCommandPoolResetFlagBits(static_cast<VkCommandPoolResetFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCommandPoolResetFlagBits(static_cast<VkCommandPoolResetFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkCommandBufferLevel(VkCommandBufferLevel input_value)
{
switch ((VkCommandBufferLevel)input_value)
{
- case VK_COMMAND_BUFFER_LEVEL_SECONDARY:
- return "VK_COMMAND_BUFFER_LEVEL_SECONDARY";
case VK_COMMAND_BUFFER_LEVEL_PRIMARY:
return "VK_COMMAND_BUFFER_LEVEL_PRIMARY";
+ case VK_COMMAND_BUFFER_LEVEL_SECONDARY:
+ return "VK_COMMAND_BUFFER_LEVEL_SECONDARY";
default:
return "Unhandled VkCommandBufferLevel";
}
@@ -2368,17 +3443,33 @@ static inline const char* string_VkCommandBufferUsageFlagBits(VkCommandBufferUsa
{
switch ((VkCommandBufferUsageFlagBits)input_value)
{
- case VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT:
- return "VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT";
- case VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT:
- return "VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT";
case VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT:
return "VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT";
+ case VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT:
+ return "VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT";
+ case VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT:
+ return "VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT";
default:
return "Unhandled VkCommandBufferUsageFlagBits";
}
}
+static inline std::string string_VkCommandBufferUsageFlags(VkCommandBufferUsageFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCommandBufferUsageFlagBits(static_cast<VkCommandBufferUsageFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCommandBufferUsageFlagBits(static_cast<VkCommandBufferUsageFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkQueryControlFlagBits(VkQueryControlFlagBits input_value)
{
switch ((VkQueryControlFlagBits)input_value)
@@ -2390,6 +3481,22 @@ static inline const char* string_VkQueryControlFlagBits(VkQueryControlFlagBits i
}
}
+static inline std::string string_VkQueryControlFlags(VkQueryControlFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkQueryControlFlagBits(static_cast<VkQueryControlFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkQueryControlFlagBits(static_cast<VkQueryControlFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkCommandBufferResetFlagBits(VkCommandBufferResetFlagBits input_value)
{
switch ((VkCommandBufferResetFlagBits)input_value)
@@ -2401,14 +3508,30 @@ static inline const char* string_VkCommandBufferResetFlagBits(VkCommandBufferRes
}
}
+static inline std::string string_VkCommandBufferResetFlags(VkCommandBufferResetFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCommandBufferResetFlagBits(static_cast<VkCommandBufferResetFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCommandBufferResetFlagBits(static_cast<VkCommandBufferResetFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkStencilFaceFlagBits(VkStencilFaceFlagBits input_value)
{
switch ((VkStencilFaceFlagBits)input_value)
{
case VK_STENCIL_FACE_BACK_BIT:
return "VK_STENCIL_FACE_BACK_BIT";
- case VK_STENCIL_FRONT_AND_BACK:
- return "VK_STENCIL_FRONT_AND_BACK";
+ case VK_STENCIL_FACE_FRONT_AND_BACK:
+ return "VK_STENCIL_FACE_FRONT_AND_BACK";
case VK_STENCIL_FACE_FRONT_BIT:
return "VK_STENCIL_FACE_FRONT_BIT";
default:
@@ -2416,14 +3539,34 @@ static inline const char* string_VkStencilFaceFlagBits(VkStencilFaceFlagBits inp
}
}
+static inline std::string string_VkStencilFaceFlags(VkStencilFaceFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkStencilFaceFlagBits(static_cast<VkStencilFaceFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkStencilFaceFlagBits(static_cast<VkStencilFaceFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkIndexType(VkIndexType input_value)
{
switch ((VkIndexType)input_value)
{
+ case VK_INDEX_TYPE_NONE_NV:
+ return "VK_INDEX_TYPE_NONE_NV";
case VK_INDEX_TYPE_UINT16:
return "VK_INDEX_TYPE_UINT16";
case VK_INDEX_TYPE_UINT32:
return "VK_INDEX_TYPE_UINT32";
+ case VK_INDEX_TYPE_UINT8_EXT:
+ return "VK_INDEX_TYPE_UINT8_EXT";
default:
return "Unhandled VkIndexType";
}
@@ -2433,10 +3576,10 @@ static inline const char* string_VkSubpassContents(VkSubpassContents input_value
{
switch ((VkSubpassContents)input_value)
{
- case VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS:
- return "VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS";
case VK_SUBPASS_CONTENTS_INLINE:
return "VK_SUBPASS_CONTENTS_INLINE";
+ case VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS:
+ return "VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS";
default:
return "Unhandled VkSubpassContents";
}
@@ -2446,78 +3589,82 @@ static inline const char* string_VkObjectType(VkObjectType input_value)
{
switch ((VkObjectType)input_value)
{
- case VK_OBJECT_TYPE_SEMAPHORE:
- return "VK_OBJECT_TYPE_SEMAPHORE";
- case VK_OBJECT_TYPE_PIPELINE:
- return "VK_OBJECT_TYPE_PIPELINE";
- case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT:
- return "VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT";
- case VK_OBJECT_TYPE_SURFACE_KHR:
- return "VK_OBJECT_TYPE_SURFACE_KHR";
+ case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV:
+ return "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV";
case VK_OBJECT_TYPE_BUFFER:
return "VK_OBJECT_TYPE_BUFFER";
- case VK_OBJECT_TYPE_PHYSICAL_DEVICE:
- return "VK_OBJECT_TYPE_PHYSICAL_DEVICE";
- case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION:
- return "VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION";
- case VK_OBJECT_TYPE_QUEUE:
- return "VK_OBJECT_TYPE_QUEUE";
- case VK_OBJECT_TYPE_DEVICE:
- return "VK_OBJECT_TYPE_DEVICE";
+ case VK_OBJECT_TYPE_BUFFER_VIEW:
+ return "VK_OBJECT_TYPE_BUFFER_VIEW";
case VK_OBJECT_TYPE_COMMAND_BUFFER:
return "VK_OBJECT_TYPE_COMMAND_BUFFER";
- case VK_OBJECT_TYPE_DESCRIPTOR_SET:
- return "VK_OBJECT_TYPE_DESCRIPTOR_SET";
- case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT:
- return "VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT";
case VK_OBJECT_TYPE_COMMAND_POOL:
return "VK_OBJECT_TYPE_COMMAND_POOL";
- case VK_OBJECT_TYPE_UNKNOWN:
- return "VK_OBJECT_TYPE_UNKNOWN";
+ case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT:
+ return "VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT";
+ case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT:
+ return "VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT";
case VK_OBJECT_TYPE_DESCRIPTOR_POOL:
return "VK_OBJECT_TYPE_DESCRIPTOR_POOL";
+ case VK_OBJECT_TYPE_DESCRIPTOR_SET:
+ return "VK_OBJECT_TYPE_DESCRIPTOR_SET";
+ case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT:
+ return "VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT";
case VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE:
return "VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE";
- case VK_OBJECT_TYPE_BUFFER_VIEW:
- return "VK_OBJECT_TYPE_BUFFER_VIEW";
+ case VK_OBJECT_TYPE_DEVICE:
+ return "VK_OBJECT_TYPE_DEVICE";
case VK_OBJECT_TYPE_DEVICE_MEMORY:
return "VK_OBJECT_TYPE_DEVICE_MEMORY";
- case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT:
- return "VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT";
- case VK_OBJECT_TYPE_IMAGE:
- return "VK_OBJECT_TYPE_IMAGE";
- case VK_OBJECT_TYPE_INSTANCE:
- return "VK_OBJECT_TYPE_INSTANCE";
+ case VK_OBJECT_TYPE_DISPLAY_KHR:
+ return "VK_OBJECT_TYPE_DISPLAY_KHR";
case VK_OBJECT_TYPE_DISPLAY_MODE_KHR:
return "VK_OBJECT_TYPE_DISPLAY_MODE_KHR";
+ case VK_OBJECT_TYPE_EVENT:
+ return "VK_OBJECT_TYPE_EVENT";
+ case VK_OBJECT_TYPE_FENCE:
+ return "VK_OBJECT_TYPE_FENCE";
+ case VK_OBJECT_TYPE_FRAMEBUFFER:
+ return "VK_OBJECT_TYPE_FRAMEBUFFER";
+ case VK_OBJECT_TYPE_IMAGE:
+ return "VK_OBJECT_TYPE_IMAGE";
case VK_OBJECT_TYPE_IMAGE_VIEW:
return "VK_OBJECT_TYPE_IMAGE_VIEW";
+ case VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX:
+ return "VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX";
+ case VK_OBJECT_TYPE_INSTANCE:
+ return "VK_OBJECT_TYPE_INSTANCE";
+ case VK_OBJECT_TYPE_OBJECT_TABLE_NVX:
+ return "VK_OBJECT_TYPE_OBJECT_TABLE_NVX";
+ case VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL:
+ return "VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL";
+ case VK_OBJECT_TYPE_PHYSICAL_DEVICE:
+ return "VK_OBJECT_TYPE_PHYSICAL_DEVICE";
+ case VK_OBJECT_TYPE_PIPELINE:
+ return "VK_OBJECT_TYPE_PIPELINE";
+ case VK_OBJECT_TYPE_PIPELINE_CACHE:
+ return "VK_OBJECT_TYPE_PIPELINE_CACHE";
case VK_OBJECT_TYPE_PIPELINE_LAYOUT:
return "VK_OBJECT_TYPE_PIPELINE_LAYOUT";
- case VK_OBJECT_TYPE_EVENT:
- return "VK_OBJECT_TYPE_EVENT";
+ case VK_OBJECT_TYPE_QUERY_POOL:
+ return "VK_OBJECT_TYPE_QUERY_POOL";
+ case VK_OBJECT_TYPE_QUEUE:
+ return "VK_OBJECT_TYPE_QUEUE";
case VK_OBJECT_TYPE_RENDER_PASS:
return "VK_OBJECT_TYPE_RENDER_PASS";
- case VK_OBJECT_TYPE_FRAMEBUFFER:
- return "VK_OBJECT_TYPE_FRAMEBUFFER";
case VK_OBJECT_TYPE_SAMPLER:
return "VK_OBJECT_TYPE_SAMPLER";
- case VK_OBJECT_TYPE_SWAPCHAIN_KHR:
- return "VK_OBJECT_TYPE_SWAPCHAIN_KHR";
- case VK_OBJECT_TYPE_QUERY_POOL:
- return "VK_OBJECT_TYPE_QUERY_POOL";
- case VK_OBJECT_TYPE_DISPLAY_KHR:
- return "VK_OBJECT_TYPE_DISPLAY_KHR";
+ case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION:
+ return "VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION";
+ case VK_OBJECT_TYPE_SEMAPHORE:
+ return "VK_OBJECT_TYPE_SEMAPHORE";
case VK_OBJECT_TYPE_SHADER_MODULE:
return "VK_OBJECT_TYPE_SHADER_MODULE";
- case VK_OBJECT_TYPE_PIPELINE_CACHE:
- return "VK_OBJECT_TYPE_PIPELINE_CACHE";
- case VK_OBJECT_TYPE_FENCE:
- return "VK_OBJECT_TYPE_FENCE";
- case VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX:
- return "VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX";
- case VK_OBJECT_TYPE_OBJECT_TABLE_NVX:
- return "VK_OBJECT_TYPE_OBJECT_TABLE_NVX";
+ case VK_OBJECT_TYPE_SURFACE_KHR:
+ return "VK_OBJECT_TYPE_SURFACE_KHR";
+ case VK_OBJECT_TYPE_SWAPCHAIN_KHR:
+ return "VK_OBJECT_TYPE_SWAPCHAIN_KHR";
+ case VK_OBJECT_TYPE_UNKNOWN:
+ return "VK_OBJECT_TYPE_UNKNOWN";
case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT:
return "VK_OBJECT_TYPE_VALIDATION_CACHE_EXT";
default:
@@ -2525,54 +3672,105 @@ static inline const char* string_VkObjectType(VkObjectType input_value)
}
}
+static inline const char* string_VkVendorId(VkVendorId input_value)
+{
+ switch ((VkVendorId)input_value)
+ {
+ case VK_VENDOR_ID_KAZAN:
+ return "VK_VENDOR_ID_KAZAN";
+ case VK_VENDOR_ID_VIV:
+ return "VK_VENDOR_ID_VIV";
+ case VK_VENDOR_ID_VSI:
+ return "VK_VENDOR_ID_VSI";
+ default:
+ return "Unhandled VkVendorId";
+ }
+}
+
static inline const char* string_VkSubgroupFeatureFlagBits(VkSubgroupFeatureFlagBits input_value)
{
switch ((VkSubgroupFeatureFlagBits)input_value)
{
- case VK_SUBGROUP_FEATURE_SHUFFLE_BIT:
- return "VK_SUBGROUP_FEATURE_SHUFFLE_BIT";
- case VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT:
- return "VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT";
- case VK_SUBGROUP_FEATURE_QUAD_BIT:
- return "VK_SUBGROUP_FEATURE_QUAD_BIT";
+ case VK_SUBGROUP_FEATURE_ARITHMETIC_BIT:
+ return "VK_SUBGROUP_FEATURE_ARITHMETIC_BIT";
case VK_SUBGROUP_FEATURE_BALLOT_BIT:
return "VK_SUBGROUP_FEATURE_BALLOT_BIT";
+ case VK_SUBGROUP_FEATURE_BASIC_BIT:
+ return "VK_SUBGROUP_FEATURE_BASIC_BIT";
case VK_SUBGROUP_FEATURE_CLUSTERED_BIT:
return "VK_SUBGROUP_FEATURE_CLUSTERED_BIT";
- case VK_SUBGROUP_FEATURE_ARITHMETIC_BIT:
- return "VK_SUBGROUP_FEATURE_ARITHMETIC_BIT";
- case VK_SUBGROUP_FEATURE_VOTE_BIT:
- return "VK_SUBGROUP_FEATURE_VOTE_BIT";
case VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV:
return "VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV";
- case VK_SUBGROUP_FEATURE_BASIC_BIT:
- return "VK_SUBGROUP_FEATURE_BASIC_BIT";
+ case VK_SUBGROUP_FEATURE_QUAD_BIT:
+ return "VK_SUBGROUP_FEATURE_QUAD_BIT";
+ case VK_SUBGROUP_FEATURE_SHUFFLE_BIT:
+ return "VK_SUBGROUP_FEATURE_SHUFFLE_BIT";
+ case VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT:
+ return "VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT";
+ case VK_SUBGROUP_FEATURE_VOTE_BIT:
+ return "VK_SUBGROUP_FEATURE_VOTE_BIT";
default:
return "Unhandled VkSubgroupFeatureFlagBits";
}
}
+static inline std::string string_VkSubgroupFeatureFlags(VkSubgroupFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSubgroupFeatureFlagBits(static_cast<VkSubgroupFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSubgroupFeatureFlagBits(static_cast<VkSubgroupFeatureFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkPeerMemoryFeatureFlagBits(VkPeerMemoryFeatureFlagBits input_value)
{
switch ((VkPeerMemoryFeatureFlagBits)input_value)
{
- case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT:
- return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT";
+ case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT:
+ return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT";
case VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT:
return "VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT";
+ case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT:
+ return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT";
case VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT:
return "VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT";
- case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT:
- return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT";
default:
return "Unhandled VkPeerMemoryFeatureFlagBits";
}
}
+static inline std::string string_VkPeerMemoryFeatureFlags(VkPeerMemoryFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPeerMemoryFeatureFlagBits(static_cast<VkPeerMemoryFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPeerMemoryFeatureFlagBits(static_cast<VkPeerMemoryFeatureFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkMemoryAllocateFlagBits(VkMemoryAllocateFlagBits input_value)
{
switch ((VkMemoryAllocateFlagBits)input_value)
{
+ case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT:
+ return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT";
+ case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT:
+ return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT";
case VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT:
return "VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT";
default:
@@ -2580,6 +3778,22 @@ static inline const char* string_VkMemoryAllocateFlagBits(VkMemoryAllocateFlagBi
}
}
+static inline std::string string_VkMemoryAllocateFlags(VkMemoryAllocateFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkMemoryAllocateFlagBits(static_cast<VkMemoryAllocateFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkMemoryAllocateFlagBits(static_cast<VkMemoryAllocateFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkPointClippingBehavior(VkPointClippingBehavior input_value)
{
switch ((VkPointClippingBehavior)input_value)
@@ -2610,16 +3824,16 @@ static inline const char* string_VkSamplerYcbcrModelConversion(VkSamplerYcbcrMod
{
switch ((VkSamplerYcbcrModelConversion)input_value)
{
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020";
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY";
case VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY:
return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY";
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020";
case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601:
return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY";
default:
return "Unhandled VkSamplerYcbcrModelConversion";
}
@@ -2655,10 +3869,10 @@ static inline const char* string_VkDescriptorUpdateTemplateType(VkDescriptorUpda
{
switch ((VkDescriptorUpdateTemplateType)input_value)
{
- case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR:
- return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR";
case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET:
return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET";
+ case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR:
+ return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR";
default:
return "Unhandled VkDescriptorUpdateTemplateType";
}
@@ -2668,41 +3882,57 @@ static inline const char* string_VkExternalMemoryHandleTypeFlagBits(VkExternalMe
{
switch ((VkExternalMemoryHandleTypeFlagBits)input_value)
{
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
default:
return "Unhandled VkExternalMemoryHandleTypeFlagBits";
}
}
+static inline std::string string_VkExternalMemoryHandleTypeFlags(VkExternalMemoryHandleTypeFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryHandleTypeFlagBits(static_cast<VkExternalMemoryHandleTypeFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBits(static_cast<VkExternalMemoryHandleTypeFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalMemoryFeatureFlagBits(VkExternalMemoryFeatureFlagBits input_value)
{
switch ((VkExternalMemoryFeatureFlagBits)input_value)
{
- case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT:
- return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT";
case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT:
return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT";
+ case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT:
+ return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT";
case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT:
return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT";
default:
@@ -2710,36 +3940,84 @@ static inline const char* string_VkExternalMemoryFeatureFlagBits(VkExternalMemor
}
}
+static inline std::string string_VkExternalMemoryFeatureFlags(VkExternalMemoryFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryFeatureFlagBits(static_cast<VkExternalMemoryFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBits(static_cast<VkExternalMemoryFeatureFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalFenceHandleTypeFlagBits(VkExternalFenceHandleTypeFlagBits input_value)
{
switch ((VkExternalFenceHandleTypeFlagBits)input_value)
{
- case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
- return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
- case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT:
- return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT";
case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT";
case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
+ case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
+ return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT:
+ return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT";
default:
return "Unhandled VkExternalFenceHandleTypeFlagBits";
}
}
+static inline std::string string_VkExternalFenceHandleTypeFlags(VkExternalFenceHandleTypeFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalFenceHandleTypeFlagBits(static_cast<VkExternalFenceHandleTypeFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalFenceHandleTypeFlagBits(static_cast<VkExternalFenceHandleTypeFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalFenceFeatureFlagBits(VkExternalFenceFeatureFlagBits input_value)
{
switch ((VkExternalFenceFeatureFlagBits)input_value)
{
- case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT:
- return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT";
case VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT:
return "VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT";
+ case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT:
+ return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT";
default:
return "Unhandled VkExternalFenceFeatureFlagBits";
}
}
+static inline std::string string_VkExternalFenceFeatureFlags(VkExternalFenceFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalFenceFeatureFlagBits(static_cast<VkExternalFenceFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalFenceFeatureFlagBits(static_cast<VkExternalFenceFeatureFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkFenceImportFlagBits(VkFenceImportFlagBits input_value)
{
switch ((VkFenceImportFlagBits)input_value)
@@ -2751,6 +4029,22 @@ static inline const char* string_VkFenceImportFlagBits(VkFenceImportFlagBits inp
}
}
+static inline std::string string_VkFenceImportFlags(VkFenceImportFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkFenceImportFlagBits(static_cast<VkFenceImportFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkFenceImportFlagBits(static_cast<VkFenceImportFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSemaphoreImportFlagBits(VkSemaphoreImportFlagBits input_value)
{
switch ((VkSemaphoreImportFlagBits)input_value)
@@ -2762,25 +4056,57 @@ static inline const char* string_VkSemaphoreImportFlagBits(VkSemaphoreImportFlag
}
}
+static inline std::string string_VkSemaphoreImportFlags(VkSemaphoreImportFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSemaphoreImportFlagBits(static_cast<VkSemaphoreImportFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSemaphoreImportFlagBits(static_cast<VkSemaphoreImportFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalSemaphoreHandleTypeFlagBits(VkExternalSemaphoreHandleTypeFlagBits input_value)
{
switch ((VkExternalSemaphoreHandleTypeFlagBits)input_value)
{
- case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT:
- return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT";
- case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
- return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT";
+ case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
+ return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT:
+ return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT";
default:
return "Unhandled VkExternalSemaphoreHandleTypeFlagBits";
}
}
+static inline std::string string_VkExternalSemaphoreHandleTypeFlags(VkExternalSemaphoreHandleTypeFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalSemaphoreHandleTypeFlagBits(static_cast<VkExternalSemaphoreHandleTypeFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalSemaphoreHandleTypeFlagBits(static_cast<VkExternalSemaphoreHandleTypeFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalSemaphoreFeatureFlagBits(VkExternalSemaphoreFeatureFlagBits input_value)
{
switch ((VkExternalSemaphoreFeatureFlagBits)input_value)
@@ -2794,33 +4120,236 @@ static inline const char* string_VkExternalSemaphoreFeatureFlagBits(VkExternalSe
}
}
+static inline std::string string_VkExternalSemaphoreFeatureFlags(VkExternalSemaphoreFeatureFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalSemaphoreFeatureFlagBits(static_cast<VkExternalSemaphoreFeatureFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalSemaphoreFeatureFlagBits(static_cast<VkExternalSemaphoreFeatureFlagBits>(0)));
+ return ret;
+}
+
+static inline const char* string_VkDriverId(VkDriverId input_value)
+{
+ switch ((VkDriverId)input_value)
+ {
+ case VK_DRIVER_ID_AMD_OPEN_SOURCE:
+ return "VK_DRIVER_ID_AMD_OPEN_SOURCE";
+ case VK_DRIVER_ID_AMD_PROPRIETARY:
+ return "VK_DRIVER_ID_AMD_PROPRIETARY";
+ case VK_DRIVER_ID_ARM_PROPRIETARY:
+ return "VK_DRIVER_ID_ARM_PROPRIETARY";
+ case VK_DRIVER_ID_BROADCOM_PROPRIETARY:
+ return "VK_DRIVER_ID_BROADCOM_PROPRIETARY";
+ case VK_DRIVER_ID_GGP_PROPRIETARY:
+ return "VK_DRIVER_ID_GGP_PROPRIETARY";
+ case VK_DRIVER_ID_GOOGLE_SWIFTSHADER:
+ return "VK_DRIVER_ID_GOOGLE_SWIFTSHADER";
+ case VK_DRIVER_ID_IMAGINATION_PROPRIETARY:
+ return "VK_DRIVER_ID_IMAGINATION_PROPRIETARY";
+ case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA:
+ return "VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA";
+ case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS:
+ return "VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS";
+ case VK_DRIVER_ID_MESA_RADV:
+ return "VK_DRIVER_ID_MESA_RADV";
+ case VK_DRIVER_ID_NVIDIA_PROPRIETARY:
+ return "VK_DRIVER_ID_NVIDIA_PROPRIETARY";
+ case VK_DRIVER_ID_QUALCOMM_PROPRIETARY:
+ return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY";
+ default:
+ return "Unhandled VkDriverId";
+ }
+}
+
+static inline const char* string_VkShaderFloatControlsIndependence(VkShaderFloatControlsIndependence input_value)
+{
+ switch ((VkShaderFloatControlsIndependence)input_value)
+ {
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY";
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL";
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE";
+ default:
+ return "Unhandled VkShaderFloatControlsIndependence";
+ }
+}
+
+static inline const char* string_VkResolveModeFlagBits(VkResolveModeFlagBits input_value)
+{
+ switch ((VkResolveModeFlagBits)input_value)
+ {
+ case VK_RESOLVE_MODE_AVERAGE_BIT:
+ return "VK_RESOLVE_MODE_AVERAGE_BIT";
+ case VK_RESOLVE_MODE_MAX_BIT:
+ return "VK_RESOLVE_MODE_MAX_BIT";
+ case VK_RESOLVE_MODE_MIN_BIT:
+ return "VK_RESOLVE_MODE_MIN_BIT";
+ case VK_RESOLVE_MODE_NONE:
+ return "VK_RESOLVE_MODE_NONE";
+ case VK_RESOLVE_MODE_SAMPLE_ZERO_BIT:
+ return "VK_RESOLVE_MODE_SAMPLE_ZERO_BIT";
+ default:
+ return "Unhandled VkResolveModeFlagBits";
+ }
+}
+
+static inline std::string string_VkResolveModeFlags(VkResolveModeFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkResolveModeFlagBits(static_cast<VkResolveModeFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkResolveModeFlagBits(static_cast<VkResolveModeFlagBits>(0)));
+ return ret;
+}
+
+static inline const char* string_VkDescriptorBindingFlagBits(VkDescriptorBindingFlagBits input_value)
+{
+ switch ((VkDescriptorBindingFlagBits)input_value)
+ {
+ case VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT:
+ return "VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT";
+ case VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT:
+ return "VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT";
+ case VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT:
+ return "VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT";
+ case VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT:
+ return "VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT";
+ default:
+ return "Unhandled VkDescriptorBindingFlagBits";
+ }
+}
+
+static inline std::string string_VkDescriptorBindingFlags(VkDescriptorBindingFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDescriptorBindingFlagBits(static_cast<VkDescriptorBindingFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDescriptorBindingFlagBits(static_cast<VkDescriptorBindingFlagBits>(0)));
+ return ret;
+}
+
+static inline const char* string_VkSamplerReductionMode(VkSamplerReductionMode input_value)
+{
+ switch ((VkSamplerReductionMode)input_value)
+ {
+ case VK_SAMPLER_REDUCTION_MODE_MAX:
+ return "VK_SAMPLER_REDUCTION_MODE_MAX";
+ case VK_SAMPLER_REDUCTION_MODE_MIN:
+ return "VK_SAMPLER_REDUCTION_MODE_MIN";
+ case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE:
+ return "VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE";
+ default:
+ return "Unhandled VkSamplerReductionMode";
+ }
+}
+
+static inline const char* string_VkSemaphoreType(VkSemaphoreType input_value)
+{
+ switch ((VkSemaphoreType)input_value)
+ {
+ case VK_SEMAPHORE_TYPE_BINARY:
+ return "VK_SEMAPHORE_TYPE_BINARY";
+ case VK_SEMAPHORE_TYPE_TIMELINE:
+ return "VK_SEMAPHORE_TYPE_TIMELINE";
+ default:
+ return "Unhandled VkSemaphoreType";
+ }
+}
+
+static inline const char* string_VkSemaphoreWaitFlagBits(VkSemaphoreWaitFlagBits input_value)
+{
+ switch ((VkSemaphoreWaitFlagBits)input_value)
+ {
+ case VK_SEMAPHORE_WAIT_ANY_BIT:
+ return "VK_SEMAPHORE_WAIT_ANY_BIT";
+ default:
+ return "Unhandled VkSemaphoreWaitFlagBits";
+ }
+}
+
+static inline std::string string_VkSemaphoreWaitFlags(VkSemaphoreWaitFlags input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSemaphoreWaitFlagBits(static_cast<VkSemaphoreWaitFlagBits>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSemaphoreWaitFlagBits(static_cast<VkSemaphoreWaitFlagBits>(0)));
+ return ret;
+}
+
static inline const char* string_VkSurfaceTransformFlagBitsKHR(VkSurfaceTransformFlagBitsKHR input_value)
{
switch ((VkSurfaceTransformFlagBitsKHR)input_value)
{
- case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR";
- case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR";
- case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR";
- case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR";
- case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR";
case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR:
return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR";
- case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR:
- return "VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR";
case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR:
return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR";
case VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR:
return "VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR";
+ case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR:
+ return "VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR";
default:
return "Unhandled VkSurfaceTransformFlagBitsKHR";
}
}
+static inline std::string string_VkSurfaceTransformFlagsKHR(VkSurfaceTransformFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSurfaceTransformFlagBitsKHR(static_cast<VkSurfaceTransformFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSurfaceTransformFlagBitsKHR(static_cast<VkSurfaceTransformFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkCompositeAlphaFlagBitsKHR(VkCompositeAlphaFlagBitsKHR input_value)
{
switch ((VkCompositeAlphaFlagBitsKHR)input_value)
@@ -2838,40 +4367,58 @@ static inline const char* string_VkCompositeAlphaFlagBitsKHR(VkCompositeAlphaFla
}
}
+static inline std::string string_VkCompositeAlphaFlagsKHR(VkCompositeAlphaFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkCompositeAlphaFlagBitsKHR(static_cast<VkCompositeAlphaFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkCompositeAlphaFlagBitsKHR(static_cast<VkCompositeAlphaFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkColorSpaceKHR(VkColorSpaceKHR input_value)
{
switch ((VkColorSpaceKHR)input_value)
{
- case VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT:
- return "VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT";
- case VK_COLOR_SPACE_DCI_P3_LINEAR_EXT:
- return "VK_COLOR_SPACE_DCI_P3_LINEAR_EXT";
+ case VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT:
+ return "VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT";
case VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT:
return "VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT";
+ case VK_COLOR_SPACE_BT2020_LINEAR_EXT:
+ return "VK_COLOR_SPACE_BT2020_LINEAR_EXT";
+ case VK_COLOR_SPACE_BT709_LINEAR_EXT:
+ return "VK_COLOR_SPACE_BT709_LINEAR_EXT";
case VK_COLOR_SPACE_BT709_NONLINEAR_EXT:
return "VK_COLOR_SPACE_BT709_NONLINEAR_EXT";
case VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT:
return "VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT";
+ case VK_COLOR_SPACE_DISPLAY_NATIVE_AMD:
+ return "VK_COLOR_SPACE_DISPLAY_NATIVE_AMD";
+ case VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT:
+ return "VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT";
+ case VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT:
+ return "VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT";
+ case VK_COLOR_SPACE_DOLBYVISION_EXT:
+ return "VK_COLOR_SPACE_DOLBYVISION_EXT";
+ case VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:
+ return "VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT";
case VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT:
return "VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT";
case VK_COLOR_SPACE_HDR10_HLG_EXT:
return "VK_COLOR_SPACE_HDR10_HLG_EXT";
- case VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:
- return "VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT";
- case VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT:
- return "VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT";
- case VK_COLOR_SPACE_PASS_THROUGH_EXT:
- return "VK_COLOR_SPACE_PASS_THROUGH_EXT";
case VK_COLOR_SPACE_HDR10_ST2084_EXT:
return "VK_COLOR_SPACE_HDR10_ST2084_EXT";
+ case VK_COLOR_SPACE_PASS_THROUGH_EXT:
+ return "VK_COLOR_SPACE_PASS_THROUGH_EXT";
case VK_COLOR_SPACE_SRGB_NONLINEAR_KHR:
return "VK_COLOR_SPACE_SRGB_NONLINEAR_KHR";
- case VK_COLOR_SPACE_BT2020_LINEAR_EXT:
- return "VK_COLOR_SPACE_BT2020_LINEAR_EXT";
- case VK_COLOR_SPACE_BT709_LINEAR_EXT:
- return "VK_COLOR_SPACE_BT709_LINEAR_EXT";
- case VK_COLOR_SPACE_DOLBYVISION_EXT:
- return "VK_COLOR_SPACE_DOLBYVISION_EXT";
default:
return "Unhandled VkColorSpaceKHR";
}
@@ -2883,16 +4430,16 @@ static inline const char* string_VkPresentModeKHR(VkPresentModeKHR input_value)
{
case VK_PRESENT_MODE_FIFO_KHR:
return "VK_PRESENT_MODE_FIFO_KHR";
- case VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR:
- return "VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR";
- case VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR:
- return "VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR";
- case VK_PRESENT_MODE_MAILBOX_KHR:
- return "VK_PRESENT_MODE_MAILBOX_KHR";
- case VK_PRESENT_MODE_IMMEDIATE_KHR:
- return "VK_PRESENT_MODE_IMMEDIATE_KHR";
case VK_PRESENT_MODE_FIFO_RELAXED_KHR:
return "VK_PRESENT_MODE_FIFO_RELAXED_KHR";
+ case VK_PRESENT_MODE_IMMEDIATE_KHR:
+ return "VK_PRESENT_MODE_IMMEDIATE_KHR";
+ case VK_PRESENT_MODE_MAILBOX_KHR:
+ return "VK_PRESENT_MODE_MAILBOX_KHR";
+ case VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR:
+ return "VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR";
+ case VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR:
+ return "VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR";
default:
return "Unhandled VkPresentModeKHR";
}
@@ -2902,6 +4449,8 @@ static inline const char* string_VkSwapchainCreateFlagBitsKHR(VkSwapchainCreateF
{
switch ((VkSwapchainCreateFlagBitsKHR)input_value)
{
+ case VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR:
+ return "VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR";
case VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR:
return "VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR";
case VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR:
@@ -2911,33 +4460,65 @@ static inline const char* string_VkSwapchainCreateFlagBitsKHR(VkSwapchainCreateF
}
}
+static inline std::string string_VkSwapchainCreateFlagsKHR(VkSwapchainCreateFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSwapchainCreateFlagBitsKHR(static_cast<VkSwapchainCreateFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSwapchainCreateFlagBitsKHR(static_cast<VkSwapchainCreateFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkDeviceGroupPresentModeFlagBitsKHR(VkDeviceGroupPresentModeFlagBitsKHR input_value)
{
switch ((VkDeviceGroupPresentModeFlagBitsKHR)input_value)
{
- case VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR:
- return "VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR";
- case VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR:
- return "VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR";
- case VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR:
- return "VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR";
case VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR:
return "VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR";
+ case VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR:
+ return "VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR";
+ case VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR:
+ return "VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR";
+ case VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR:
+ return "VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR";
default:
return "Unhandled VkDeviceGroupPresentModeFlagBitsKHR";
}
}
+static inline std::string string_VkDeviceGroupPresentModeFlagsKHR(VkDeviceGroupPresentModeFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDeviceGroupPresentModeFlagBitsKHR(static_cast<VkDeviceGroupPresentModeFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDeviceGroupPresentModeFlagBitsKHR(static_cast<VkDeviceGroupPresentModeFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkDisplayPlaneAlphaFlagBitsKHR(VkDisplayPlaneAlphaFlagBitsKHR input_value)
{
switch ((VkDisplayPlaneAlphaFlagBitsKHR)input_value)
{
- case VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR:
- return "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR";
case VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR:
return "VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR";
case VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR:
return "VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR";
+ case VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR:
+ return "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR";
case VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR:
return "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR";
default:
@@ -2945,27 +4526,63 @@ static inline const char* string_VkDisplayPlaneAlphaFlagBitsKHR(VkDisplayPlaneAl
}
}
+static inline std::string string_VkDisplayPlaneAlphaFlagsKHR(VkDisplayPlaneAlphaFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDisplayPlaneAlphaFlagBitsKHR(static_cast<VkDisplayPlaneAlphaFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDisplayPlaneAlphaFlagBitsKHR(static_cast<VkDisplayPlaneAlphaFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkPeerMemoryFeatureFlagBitsKHR(VkPeerMemoryFeatureFlagBitsKHR input_value)
{
switch ((VkPeerMemoryFeatureFlagBitsKHR)input_value)
{
- case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT:
- return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT";
+ case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT:
+ return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT";
case VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT:
return "VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT";
+ case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT:
+ return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT";
case VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT:
return "VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT";
- case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT:
- return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT";
default:
return "Unhandled VkPeerMemoryFeatureFlagBitsKHR";
}
}
+static inline std::string string_VkPeerMemoryFeatureFlagsKHR(VkPeerMemoryFeatureFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPeerMemoryFeatureFlagBitsKHR(static_cast<VkPeerMemoryFeatureFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPeerMemoryFeatureFlagBitsKHR(static_cast<VkPeerMemoryFeatureFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkMemoryAllocateFlagBitsKHR(VkMemoryAllocateFlagBitsKHR input_value)
{
switch ((VkMemoryAllocateFlagBitsKHR)input_value)
{
+ case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT:
+ return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT";
+ case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT:
+ return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT";
case VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT:
return "VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT";
default:
@@ -2973,45 +4590,77 @@ static inline const char* string_VkMemoryAllocateFlagBitsKHR(VkMemoryAllocateFla
}
}
+static inline std::string string_VkMemoryAllocateFlagsKHR(VkMemoryAllocateFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkMemoryAllocateFlagBitsKHR(static_cast<VkMemoryAllocateFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkMemoryAllocateFlagBitsKHR(static_cast<VkMemoryAllocateFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalMemoryHandleTypeFlagBitsKHR(VkExternalMemoryHandleTypeFlagBitsKHR input_value)
{
switch ((VkExternalMemoryHandleTypeFlagBitsKHR)input_value)
{
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
default:
return "Unhandled VkExternalMemoryHandleTypeFlagBitsKHR";
}
}
+static inline std::string string_VkExternalMemoryHandleTypeFlagsKHR(VkExternalMemoryHandleTypeFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryHandleTypeFlagBitsKHR(static_cast<VkExternalMemoryHandleTypeFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBitsKHR(static_cast<VkExternalMemoryHandleTypeFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalMemoryFeatureFlagBitsKHR(VkExternalMemoryFeatureFlagBitsKHR input_value)
{
switch ((VkExternalMemoryFeatureFlagBitsKHR)input_value)
{
- case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT:
- return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT";
case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT:
return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT";
+ case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT:
+ return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT";
case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT:
return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT";
default:
@@ -3019,25 +4668,57 @@ static inline const char* string_VkExternalMemoryFeatureFlagBitsKHR(VkExternalMe
}
}
+static inline std::string string_VkExternalMemoryFeatureFlagsKHR(VkExternalMemoryFeatureFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryFeatureFlagBitsKHR(static_cast<VkExternalMemoryFeatureFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBitsKHR(static_cast<VkExternalMemoryFeatureFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalSemaphoreHandleTypeFlagBitsKHR(VkExternalSemaphoreHandleTypeFlagBitsKHR input_value)
{
switch ((VkExternalSemaphoreHandleTypeFlagBitsKHR)input_value)
{
- case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT:
- return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT";
- case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
- return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT";
+ case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
+ return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT:
+ return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT";
default:
return "Unhandled VkExternalSemaphoreHandleTypeFlagBitsKHR";
}
}
+static inline std::string string_VkExternalSemaphoreHandleTypeFlagsKHR(VkExternalSemaphoreHandleTypeFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalSemaphoreHandleTypeFlagBitsKHR(static_cast<VkExternalSemaphoreHandleTypeFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalSemaphoreHandleTypeFlagBitsKHR(static_cast<VkExternalSemaphoreHandleTypeFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalSemaphoreFeatureFlagBitsKHR(VkExternalSemaphoreFeatureFlagBitsKHR input_value)
{
switch ((VkExternalSemaphoreFeatureFlagBitsKHR)input_value)
@@ -3051,6 +4732,22 @@ static inline const char* string_VkExternalSemaphoreFeatureFlagBitsKHR(VkExterna
}
}
+static inline std::string string_VkExternalSemaphoreFeatureFlagsKHR(VkExternalSemaphoreFeatureFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalSemaphoreFeatureFlagBitsKHR(static_cast<VkExternalSemaphoreFeatureFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalSemaphoreFeatureFlagBitsKHR(static_cast<VkExternalSemaphoreFeatureFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkSemaphoreImportFlagBitsKHR(VkSemaphoreImportFlagBitsKHR input_value)
{
switch ((VkSemaphoreImportFlagBitsKHR)input_value)
@@ -3062,14 +4759,30 @@ static inline const char* string_VkSemaphoreImportFlagBitsKHR(VkSemaphoreImportF
}
}
+static inline std::string string_VkSemaphoreImportFlagsKHR(VkSemaphoreImportFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSemaphoreImportFlagBitsKHR(static_cast<VkSemaphoreImportFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSemaphoreImportFlagBitsKHR(static_cast<VkSemaphoreImportFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkDescriptorUpdateTemplateTypeKHR(VkDescriptorUpdateTemplateTypeKHR input_value)
{
switch ((VkDescriptorUpdateTemplateTypeKHR)input_value)
{
- case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR:
- return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR";
case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET:
return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET";
+ case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR:
+ return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR";
default:
return "Unhandled VkDescriptorUpdateTemplateTypeKHR";
}
@@ -3079,32 +4792,64 @@ static inline const char* string_VkExternalFenceHandleTypeFlagBitsKHR(VkExternal
{
switch ((VkExternalFenceHandleTypeFlagBitsKHR)input_value)
{
- case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
- return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
- case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT:
- return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT";
case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT:
return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT";
case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT:
return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT";
+ case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
+ return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT:
+ return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT";
default:
return "Unhandled VkExternalFenceHandleTypeFlagBitsKHR";
}
}
+static inline std::string string_VkExternalFenceHandleTypeFlagsKHR(VkExternalFenceHandleTypeFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalFenceHandleTypeFlagBitsKHR(static_cast<VkExternalFenceHandleTypeFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalFenceHandleTypeFlagBitsKHR(static_cast<VkExternalFenceHandleTypeFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalFenceFeatureFlagBitsKHR(VkExternalFenceFeatureFlagBitsKHR input_value)
{
switch ((VkExternalFenceFeatureFlagBitsKHR)input_value)
{
- case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT:
- return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT";
case VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT:
return "VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT";
+ case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT:
+ return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT";
default:
return "Unhandled VkExternalFenceFeatureFlagBitsKHR";
}
}
+static inline std::string string_VkExternalFenceFeatureFlagsKHR(VkExternalFenceFeatureFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalFenceFeatureFlagBitsKHR(static_cast<VkExternalFenceFeatureFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalFenceFeatureFlagBitsKHR(static_cast<VkExternalFenceFeatureFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkFenceImportFlagBitsKHR(VkFenceImportFlagBitsKHR input_value)
{
switch ((VkFenceImportFlagBitsKHR)input_value)
@@ -3116,6 +4861,118 @@ static inline const char* string_VkFenceImportFlagBitsKHR(VkFenceImportFlagBitsK
}
}
+static inline std::string string_VkFenceImportFlagsKHR(VkFenceImportFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkFenceImportFlagBitsKHR(static_cast<VkFenceImportFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkFenceImportFlagBitsKHR(static_cast<VkFenceImportFlagBitsKHR>(0)));
+ return ret;
+}
+
+static inline const char* string_VkPerformanceCounterUnitKHR(VkPerformanceCounterUnitKHR input_value)
+{
+ switch ((VkPerformanceCounterUnitKHR)input_value)
+ {
+ case VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR";
+ case VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR:
+ return "VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR";
+ default:
+ return "Unhandled VkPerformanceCounterUnitKHR";
+ }
+}
+
+static inline const char* string_VkPerformanceCounterScopeKHR(VkPerformanceCounterScopeKHR input_value)
+{
+ switch ((VkPerformanceCounterScopeKHR)input_value)
+ {
+ case VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR:
+ return "VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR";
+ case VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR:
+ return "VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR";
+ case VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR:
+ return "VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR";
+ default:
+ return "Unhandled VkPerformanceCounterScopeKHR";
+ }
+}
+
+static inline const char* string_VkPerformanceCounterStorageKHR(VkPerformanceCounterStorageKHR input_value)
+{
+ switch ((VkPerformanceCounterStorageKHR)input_value)
+ {
+ case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR";
+ case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR";
+ case VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR";
+ case VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR";
+ case VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR";
+ case VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR:
+ return "VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR";
+ default:
+ return "Unhandled VkPerformanceCounterStorageKHR";
+ }
+}
+
+static inline const char* string_VkPerformanceCounterDescriptionFlagBitsKHR(VkPerformanceCounterDescriptionFlagBitsKHR input_value)
+{
+ switch ((VkPerformanceCounterDescriptionFlagBitsKHR)input_value)
+ {
+ case VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR:
+ return "VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR";
+ case VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR:
+ return "VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR";
+ default:
+ return "Unhandled VkPerformanceCounterDescriptionFlagBitsKHR";
+ }
+}
+
+static inline std::string string_VkPerformanceCounterDescriptionFlagsKHR(VkPerformanceCounterDescriptionFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPerformanceCounterDescriptionFlagBitsKHR(static_cast<VkPerformanceCounterDescriptionFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPerformanceCounterDescriptionFlagBitsKHR(static_cast<VkPerformanceCounterDescriptionFlagBitsKHR>(0)));
+ return ret;
+}
+
static inline const char* string_VkPointClippingBehaviorKHR(VkPointClippingBehaviorKHR input_value)
{
switch ((VkPointClippingBehaviorKHR)input_value)
@@ -3146,16 +5003,16 @@ static inline const char* string_VkSamplerYcbcrModelConversionKHR(VkSamplerYcbcr
{
switch ((VkSamplerYcbcrModelConversionKHR)input_value)
{
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020";
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY";
case VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY:
return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY";
- case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709:
- return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020";
case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601:
return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709";
+ case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY:
+ return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY";
default:
return "Unhandled VkSamplerYcbcrModelConversionKHR";
}
@@ -3187,82 +5044,224 @@ static inline const char* string_VkChromaLocationKHR(VkChromaLocationKHR input_v
}
}
+static inline const char* string_VkDriverIdKHR(VkDriverIdKHR input_value)
+{
+ switch ((VkDriverIdKHR)input_value)
+ {
+ case VK_DRIVER_ID_AMD_OPEN_SOURCE:
+ return "VK_DRIVER_ID_AMD_OPEN_SOURCE";
+ case VK_DRIVER_ID_AMD_PROPRIETARY:
+ return "VK_DRIVER_ID_AMD_PROPRIETARY";
+ case VK_DRIVER_ID_ARM_PROPRIETARY:
+ return "VK_DRIVER_ID_ARM_PROPRIETARY";
+ case VK_DRIVER_ID_BROADCOM_PROPRIETARY:
+ return "VK_DRIVER_ID_BROADCOM_PROPRIETARY";
+ case VK_DRIVER_ID_GGP_PROPRIETARY:
+ return "VK_DRIVER_ID_GGP_PROPRIETARY";
+ case VK_DRIVER_ID_GOOGLE_SWIFTSHADER:
+ return "VK_DRIVER_ID_GOOGLE_SWIFTSHADER";
+ case VK_DRIVER_ID_IMAGINATION_PROPRIETARY:
+ return "VK_DRIVER_ID_IMAGINATION_PROPRIETARY";
+ case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA:
+ return "VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA";
+ case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS:
+ return "VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS";
+ case VK_DRIVER_ID_MESA_RADV:
+ return "VK_DRIVER_ID_MESA_RADV";
+ case VK_DRIVER_ID_NVIDIA_PROPRIETARY:
+ return "VK_DRIVER_ID_NVIDIA_PROPRIETARY";
+ case VK_DRIVER_ID_QUALCOMM_PROPRIETARY:
+ return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY";
+ default:
+ return "Unhandled VkDriverIdKHR";
+ }
+}
+
+static inline const char* string_VkShaderFloatControlsIndependenceKHR(VkShaderFloatControlsIndependenceKHR input_value)
+{
+ switch ((VkShaderFloatControlsIndependenceKHR)input_value)
+ {
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY";
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL";
+ case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE:
+ return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE";
+ default:
+ return "Unhandled VkShaderFloatControlsIndependenceKHR";
+ }
+}
+
+static inline const char* string_VkResolveModeFlagBitsKHR(VkResolveModeFlagBitsKHR input_value)
+{
+ switch ((VkResolveModeFlagBitsKHR)input_value)
+ {
+ case VK_RESOLVE_MODE_AVERAGE_BIT:
+ return "VK_RESOLVE_MODE_AVERAGE_BIT";
+ case VK_RESOLVE_MODE_MAX_BIT:
+ return "VK_RESOLVE_MODE_MAX_BIT";
+ case VK_RESOLVE_MODE_MIN_BIT:
+ return "VK_RESOLVE_MODE_MIN_BIT";
+ case VK_RESOLVE_MODE_NONE:
+ return "VK_RESOLVE_MODE_NONE";
+ case VK_RESOLVE_MODE_SAMPLE_ZERO_BIT:
+ return "VK_RESOLVE_MODE_SAMPLE_ZERO_BIT";
+ default:
+ return "Unhandled VkResolveModeFlagBitsKHR";
+ }
+}
+
+static inline std::string string_VkResolveModeFlagsKHR(VkResolveModeFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkResolveModeFlagBitsKHR(static_cast<VkResolveModeFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkResolveModeFlagBitsKHR(static_cast<VkResolveModeFlagBitsKHR>(0)));
+ return ret;
+}
+
+static inline const char* string_VkSemaphoreTypeKHR(VkSemaphoreTypeKHR input_value)
+{
+ switch ((VkSemaphoreTypeKHR)input_value)
+ {
+ case VK_SEMAPHORE_TYPE_BINARY:
+ return "VK_SEMAPHORE_TYPE_BINARY";
+ case VK_SEMAPHORE_TYPE_TIMELINE:
+ return "VK_SEMAPHORE_TYPE_TIMELINE";
+ default:
+ return "Unhandled VkSemaphoreTypeKHR";
+ }
+}
+
+static inline const char* string_VkSemaphoreWaitFlagBitsKHR(VkSemaphoreWaitFlagBitsKHR input_value)
+{
+ switch ((VkSemaphoreWaitFlagBitsKHR)input_value)
+ {
+ case VK_SEMAPHORE_WAIT_ANY_BIT:
+ return "VK_SEMAPHORE_WAIT_ANY_BIT";
+ default:
+ return "Unhandled VkSemaphoreWaitFlagBitsKHR";
+ }
+}
+
+static inline std::string string_VkSemaphoreWaitFlagsKHR(VkSemaphoreWaitFlagsKHR input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSemaphoreWaitFlagBitsKHR(static_cast<VkSemaphoreWaitFlagBitsKHR>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSemaphoreWaitFlagBitsKHR(static_cast<VkSemaphoreWaitFlagBitsKHR>(0)));
+ return ret;
+}
+
+static inline const char* string_VkPipelineExecutableStatisticFormatKHR(VkPipelineExecutableStatisticFormatKHR input_value)
+{
+ switch ((VkPipelineExecutableStatisticFormatKHR)input_value)
+ {
+ case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR:
+ return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR";
+ case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR:
+ return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR";
+ case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR:
+ return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR";
+ case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR:
+ return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR";
+ default:
+ return "Unhandled VkPipelineExecutableStatisticFormatKHR";
+ }
+}
+
static inline const char* string_VkDebugReportObjectTypeEXT(VkDebugReportObjectTypeEXT input_value)
{
switch ((VkDebugReportObjectTypeEXT)input_value)
{
- case VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT";
case VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT:
return "VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT";
- case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT:
- return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT";
+ case VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT:
+ return "VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT";
default:
return "Unhandled VkDebugReportObjectTypeEXT";
}
@@ -3278,23 +5277,39 @@ static inline const char* string_VkDebugReportFlagBitsEXT(VkDebugReportFlagBitsE
return "VK_DEBUG_REPORT_ERROR_BIT_EXT";
case VK_DEBUG_REPORT_INFORMATION_BIT_EXT:
return "VK_DEBUG_REPORT_INFORMATION_BIT_EXT";
- case VK_DEBUG_REPORT_WARNING_BIT_EXT:
- return "VK_DEBUG_REPORT_WARNING_BIT_EXT";
case VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT:
return "VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT";
+ case VK_DEBUG_REPORT_WARNING_BIT_EXT:
+ return "VK_DEBUG_REPORT_WARNING_BIT_EXT";
default:
return "Unhandled VkDebugReportFlagBitsEXT";
}
}
+static inline std::string string_VkDebugReportFlagsEXT(VkDebugReportFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDebugReportFlagBitsEXT(static_cast<VkDebugReportFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDebugReportFlagBitsEXT(static_cast<VkDebugReportFlagBitsEXT>(0)));
+ return ret;
+}
+
static inline const char* string_VkRasterizationOrderAMD(VkRasterizationOrderAMD input_value)
{
switch ((VkRasterizationOrderAMD)input_value)
{
- case VK_RASTERIZATION_ORDER_STRICT_AMD:
- return "VK_RASTERIZATION_ORDER_STRICT_AMD";
case VK_RASTERIZATION_ORDER_RELAXED_AMD:
return "VK_RASTERIZATION_ORDER_RELAXED_AMD";
+ case VK_RASTERIZATION_ORDER_STRICT_AMD:
+ return "VK_RASTERIZATION_ORDER_STRICT_AMD";
default:
return "Unhandled VkRasterizationOrderAMD";
}
@@ -3304,12 +5319,12 @@ static inline const char* string_VkShaderInfoTypeAMD(VkShaderInfoTypeAMD input_v
{
switch ((VkShaderInfoTypeAMD)input_value)
{
- case VK_SHADER_INFO_TYPE_STATISTICS_AMD:
- return "VK_SHADER_INFO_TYPE_STATISTICS_AMD";
case VK_SHADER_INFO_TYPE_BINARY_AMD:
return "VK_SHADER_INFO_TYPE_BINARY_AMD";
case VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD:
return "VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD";
+ case VK_SHADER_INFO_TYPE_STATISTICS_AMD:
+ return "VK_SHADER_INFO_TYPE_STATISTICS_AMD";
default:
return "Unhandled VkShaderInfoTypeAMD";
}
@@ -3319,97 +5334,188 @@ static inline const char* string_VkExternalMemoryHandleTypeFlagBitsNV(VkExternal
{
switch ((VkExternalMemoryHandleTypeFlagBitsNV)input_value)
{
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV";
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV:
- return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV";
default:
return "Unhandled VkExternalMemoryHandleTypeFlagBitsNV";
}
}
+static inline std::string string_VkExternalMemoryHandleTypeFlagsNV(VkExternalMemoryHandleTypeFlagsNV input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryHandleTypeFlagBitsNV(static_cast<VkExternalMemoryHandleTypeFlagBitsNV>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBitsNV(static_cast<VkExternalMemoryHandleTypeFlagBitsNV>(0)));
+ return ret;
+}
+
static inline const char* string_VkExternalMemoryFeatureFlagBitsNV(VkExternalMemoryFeatureFlagBitsNV input_value)
{
switch ((VkExternalMemoryFeatureFlagBitsNV)input_value)
{
- case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV:
- return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV";
- case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV:
- return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV";
case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV:
return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV";
+ case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV";
+ case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV";
default:
return "Unhandled VkExternalMemoryFeatureFlagBitsNV";
}
}
+static inline std::string string_VkExternalMemoryFeatureFlagsNV(VkExternalMemoryFeatureFlagsNV input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkExternalMemoryFeatureFlagBitsNV(static_cast<VkExternalMemoryFeatureFlagBitsNV>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBitsNV(static_cast<VkExternalMemoryFeatureFlagBitsNV>(0)));
+ return ret;
+}
+
static inline const char* string_VkValidationCheckEXT(VkValidationCheckEXT input_value)
{
switch ((VkValidationCheckEXT)input_value)
{
- case VK_VALIDATION_CHECK_SHADERS_EXT:
- return "VK_VALIDATION_CHECK_SHADERS_EXT";
case VK_VALIDATION_CHECK_ALL_EXT:
return "VK_VALIDATION_CHECK_ALL_EXT";
+ case VK_VALIDATION_CHECK_SHADERS_EXT:
+ return "VK_VALIDATION_CHECK_SHADERS_EXT";
default:
return "Unhandled VkValidationCheckEXT";
}
}
+static inline const char* string_VkConditionalRenderingFlagBitsEXT(VkConditionalRenderingFlagBitsEXT input_value)
+{
+ switch ((VkConditionalRenderingFlagBitsEXT)input_value)
+ {
+ case VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT:
+ return "VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT";
+ default:
+ return "Unhandled VkConditionalRenderingFlagBitsEXT";
+ }
+}
+
+static inline std::string string_VkConditionalRenderingFlagsEXT(VkConditionalRenderingFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkConditionalRenderingFlagBitsEXT(static_cast<VkConditionalRenderingFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkConditionalRenderingFlagBitsEXT(static_cast<VkConditionalRenderingFlagBitsEXT>(0)));
+ return ret;
+}
+
static inline const char* string_VkIndirectCommandsLayoutUsageFlagBitsNVX(VkIndirectCommandsLayoutUsageFlagBitsNVX input_value)
{
switch ((VkIndirectCommandsLayoutUsageFlagBitsNVX)input_value)
{
+ case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX:
+ return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX";
+ case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX:
+ return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX";
case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX:
return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX";
case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX:
return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX";
- case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX:
- return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX";
- case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX:
- return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX";
default:
return "Unhandled VkIndirectCommandsLayoutUsageFlagBitsNVX";
}
}
+static inline std::string string_VkIndirectCommandsLayoutUsageFlagsNVX(VkIndirectCommandsLayoutUsageFlagsNVX input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkIndirectCommandsLayoutUsageFlagBitsNVX(static_cast<VkIndirectCommandsLayoutUsageFlagBitsNVX>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkIndirectCommandsLayoutUsageFlagBitsNVX(static_cast<VkIndirectCommandsLayoutUsageFlagBitsNVX>(0)));
+ return ret;
+}
+
static inline const char* string_VkObjectEntryUsageFlagBitsNVX(VkObjectEntryUsageFlagBitsNVX input_value)
{
switch ((VkObjectEntryUsageFlagBitsNVX)input_value)
{
- case VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX:
- return "VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX";
case VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX:
return "VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX";
+ case VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX:
+ return "VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX";
default:
return "Unhandled VkObjectEntryUsageFlagBitsNVX";
}
}
+static inline std::string string_VkObjectEntryUsageFlagsNVX(VkObjectEntryUsageFlagsNVX input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkObjectEntryUsageFlagBitsNVX(static_cast<VkObjectEntryUsageFlagBitsNVX>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkObjectEntryUsageFlagBitsNVX(static_cast<VkObjectEntryUsageFlagBitsNVX>(0)));
+ return ret;
+}
+
static inline const char* string_VkIndirectCommandsTokenTypeNVX(VkIndirectCommandsTokenTypeNVX input_value)
{
switch ((VkIndirectCommandsTokenTypeNVX)input_value)
{
- case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX:
- return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX";
- case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX:
- return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX";
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX:
return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX";
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX:
return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX";
- case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX:
- return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX";
- case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX:
- return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX";
+ case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX:
+ return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX";
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX:
return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX";
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX:
return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX";
+ case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX:
+ return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX";
+ case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX:
+ return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX";
+ case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX:
+ return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX";
default:
return "Unhandled VkIndirectCommandsTokenTypeNVX";
}
@@ -3419,16 +5525,16 @@ static inline const char* string_VkObjectEntryTypeNVX(VkObjectEntryTypeNVX input
{
switch ((VkObjectEntryTypeNVX)input_value)
{
- case VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX:
- return "VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX";
case VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX:
return "VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX";
- case VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX:
- return "VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX";
+ case VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX:
+ return "VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX";
case VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX:
return "VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX";
case VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX:
return "VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX";
+ case VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX:
+ return "VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX";
default:
return "Unhandled VkObjectEntryTypeNVX";
}
@@ -3445,16 +5551,32 @@ static inline const char* string_VkSurfaceCounterFlagBitsEXT(VkSurfaceCounterFla
}
}
+static inline std::string string_VkSurfaceCounterFlagsEXT(VkSurfaceCounterFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkSurfaceCounterFlagBitsEXT(static_cast<VkSurfaceCounterFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkSurfaceCounterFlagBitsEXT(static_cast<VkSurfaceCounterFlagBitsEXT>(0)));
+ return ret;
+}
+
static inline const char* string_VkDisplayPowerStateEXT(VkDisplayPowerStateEXT input_value)
{
switch ((VkDisplayPowerStateEXT)input_value)
{
- case VK_DISPLAY_POWER_STATE_SUSPEND_EXT:
- return "VK_DISPLAY_POWER_STATE_SUSPEND_EXT";
- case VK_DISPLAY_POWER_STATE_ON_EXT:
- return "VK_DISPLAY_POWER_STATE_ON_EXT";
case VK_DISPLAY_POWER_STATE_OFF_EXT:
return "VK_DISPLAY_POWER_STATE_OFF_EXT";
+ case VK_DISPLAY_POWER_STATE_ON_EXT:
+ return "VK_DISPLAY_POWER_STATE_ON_EXT";
+ case VK_DISPLAY_POWER_STATE_SUSPEND_EXT:
+ return "VK_DISPLAY_POWER_STATE_SUSPEND_EXT";
default:
return "Unhandled VkDisplayPowerStateEXT";
}
@@ -3486,22 +5608,22 @@ static inline const char* string_VkViewportCoordinateSwizzleNV(VkViewportCoordin
{
switch ((VkViewportCoordinateSwizzleNV)input_value)
{
+ case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV:
+ return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV";
+ case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV:
+ return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV";
case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV:
return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV";
case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV:
return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV";
- case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV:
- return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV";
- case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV:
- return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV";
- case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV:
- return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV";
case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV:
return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV";
- case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV:
- return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV";
+ case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV:
+ return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV";
case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV:
return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV";
+ case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV:
+ return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV";
default:
return "Unhandled VkViewportCoordinateSwizzleNV";
}
@@ -3524,10 +5646,10 @@ static inline const char* string_VkConservativeRasterizationModeEXT(VkConservati
{
switch ((VkConservativeRasterizationModeEXT)input_value)
{
- case VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT:
- return "VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT";
case VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT:
return "VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT";
+ case VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT:
+ return "VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT";
case VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT:
return "VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT";
default:
@@ -3543,40 +5665,72 @@ static inline const char* string_VkDebugUtilsMessageSeverityFlagBitsEXT(VkDebugU
return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT";
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT:
return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT";
- case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT:
- return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT";
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT:
return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT";
+ case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT:
+ return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT";
default:
return "Unhandled VkDebugUtilsMessageSeverityFlagBitsEXT";
}
}
+static inline std::string string_VkDebugUtilsMessageSeverityFlagsEXT(VkDebugUtilsMessageSeverityFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDebugUtilsMessageSeverityFlagBitsEXT(static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDebugUtilsMessageSeverityFlagBitsEXT(static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>(0)));
+ return ret;
+}
+
static inline const char* string_VkDebugUtilsMessageTypeFlagBitsEXT(VkDebugUtilsMessageTypeFlagBitsEXT input_value)
{
switch ((VkDebugUtilsMessageTypeFlagBitsEXT)input_value)
{
+ case VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT:
+ return "VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT";
case VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT:
return "VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT";
case VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT:
return "VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT";
- case VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT:
- return "VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT";
default:
return "Unhandled VkDebugUtilsMessageTypeFlagBitsEXT";
}
}
+static inline std::string string_VkDebugUtilsMessageTypeFlagsEXT(VkDebugUtilsMessageTypeFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDebugUtilsMessageTypeFlagBitsEXT(static_cast<VkDebugUtilsMessageTypeFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDebugUtilsMessageTypeFlagBitsEXT(static_cast<VkDebugUtilsMessageTypeFlagBitsEXT>(0)));
+ return ret;
+}
+
static inline const char* string_VkSamplerReductionModeEXT(VkSamplerReductionModeEXT input_value)
{
switch ((VkSamplerReductionModeEXT)input_value)
{
- case VK_SAMPLER_REDUCTION_MODE_MAX_EXT:
- return "VK_SAMPLER_REDUCTION_MODE_MAX_EXT";
- case VK_SAMPLER_REDUCTION_MODE_MIN_EXT:
- return "VK_SAMPLER_REDUCTION_MODE_MIN_EXT";
- case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT:
- return "VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT";
+ case VK_SAMPLER_REDUCTION_MODE_MAX:
+ return "VK_SAMPLER_REDUCTION_MODE_MAX";
+ case VK_SAMPLER_REDUCTION_MODE_MIN:
+ return "VK_SAMPLER_REDUCTION_MODE_MIN";
+ case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE:
+ return "VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE";
default:
return "Unhandled VkSamplerReductionModeEXT";
}
@@ -3586,12 +5740,12 @@ static inline const char* string_VkBlendOverlapEXT(VkBlendOverlapEXT input_value
{
switch ((VkBlendOverlapEXT)input_value)
{
+ case VK_BLEND_OVERLAP_CONJOINT_EXT:
+ return "VK_BLEND_OVERLAP_CONJOINT_EXT";
case VK_BLEND_OVERLAP_DISJOINT_EXT:
return "VK_BLEND_OVERLAP_DISJOINT_EXT";
case VK_BLEND_OVERLAP_UNCORRELATED_EXT:
return "VK_BLEND_OVERLAP_UNCORRELATED_EXT";
- case VK_BLEND_OVERLAP_CONJOINT_EXT:
- return "VK_BLEND_OVERLAP_CONJOINT_EXT";
default:
return "Unhandled VkBlendOverlapEXT";
}
@@ -3601,14 +5755,14 @@ static inline const char* string_VkCoverageModulationModeNV(VkCoverageModulation
{
switch ((VkCoverageModulationModeNV)input_value)
{
- case VK_COVERAGE_MODULATION_MODE_RGBA_NV:
- return "VK_COVERAGE_MODULATION_MODE_RGBA_NV";
case VK_COVERAGE_MODULATION_MODE_ALPHA_NV:
return "VK_COVERAGE_MODULATION_MODE_ALPHA_NV";
- case VK_COVERAGE_MODULATION_MODE_RGB_NV:
- return "VK_COVERAGE_MODULATION_MODE_RGB_NV";
case VK_COVERAGE_MODULATION_MODE_NONE_NV:
return "VK_COVERAGE_MODULATION_MODE_NONE_NV";
+ case VK_COVERAGE_MODULATION_MODE_RGBA_NV:
+ return "VK_COVERAGE_MODULATION_MODE_RGBA_NV";
+ case VK_COVERAGE_MODULATION_MODE_RGB_NV:
+ return "VK_COVERAGE_MODULATION_MODE_RGB_NV";
default:
return "Unhandled VkCoverageModulationModeNV";
}
@@ -3629,27 +5783,259 @@ static inline const char* string_VkDescriptorBindingFlagBitsEXT(VkDescriptorBind
{
switch ((VkDescriptorBindingFlagBitsEXT)input_value)
{
- case VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT:
- return "VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT";
- case VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT:
- return "VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT";
- case VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT:
- return "VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT";
- case VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT:
- return "VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT";
+ case VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT:
+ return "VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT";
+ case VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT:
+ return "VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT";
+ case VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT:
+ return "VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT";
+ case VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT:
+ return "VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT";
default:
return "Unhandled VkDescriptorBindingFlagBitsEXT";
}
}
+static inline std::string string_VkDescriptorBindingFlagsEXT(VkDescriptorBindingFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkDescriptorBindingFlagBitsEXT(static_cast<VkDescriptorBindingFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkDescriptorBindingFlagBitsEXT(static_cast<VkDescriptorBindingFlagBitsEXT>(0)));
+ return ret;
+}
+
+static inline const char* string_VkShadingRatePaletteEntryNV(VkShadingRatePaletteEntryNV input_value)
+{
+ switch ((VkShadingRatePaletteEntryNV)input_value)
+ {
+ case VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV";
+ case VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV:
+ return "VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV";
+ default:
+ return "Unhandled VkShadingRatePaletteEntryNV";
+ }
+}
+
+static inline const char* string_VkCoarseSampleOrderTypeNV(VkCoarseSampleOrderTypeNV input_value)
+{
+ switch ((VkCoarseSampleOrderTypeNV)input_value)
+ {
+ case VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV:
+ return "VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV";
+ case VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV:
+ return "VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV";
+ case VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV:
+ return "VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV";
+ case VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV:
+ return "VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV";
+ default:
+ return "Unhandled VkCoarseSampleOrderTypeNV";
+ }
+}
+
+static inline const char* string_VkAccelerationStructureTypeNV(VkAccelerationStructureTypeNV input_value)
+{
+ switch ((VkAccelerationStructureTypeNV)input_value)
+ {
+ case VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV:
+ return "VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV";
+ case VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV:
+ return "VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV";
+ default:
+ return "Unhandled VkAccelerationStructureTypeNV";
+ }
+}
+
+static inline const char* string_VkRayTracingShaderGroupTypeNV(VkRayTracingShaderGroupTypeNV input_value)
+{
+ switch ((VkRayTracingShaderGroupTypeNV)input_value)
+ {
+ case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV:
+ return "VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV";
+ case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV:
+ return "VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV";
+ case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV:
+ return "VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV";
+ default:
+ return "Unhandled VkRayTracingShaderGroupTypeNV";
+ }
+}
+
+static inline const char* string_VkGeometryTypeNV(VkGeometryTypeNV input_value)
+{
+ switch ((VkGeometryTypeNV)input_value)
+ {
+ case VK_GEOMETRY_TYPE_AABBS_NV:
+ return "VK_GEOMETRY_TYPE_AABBS_NV";
+ case VK_GEOMETRY_TYPE_TRIANGLES_NV:
+ return "VK_GEOMETRY_TYPE_TRIANGLES_NV";
+ default:
+ return "Unhandled VkGeometryTypeNV";
+ }
+}
+
+static inline const char* string_VkGeometryFlagBitsNV(VkGeometryFlagBitsNV input_value)
+{
+ switch ((VkGeometryFlagBitsNV)input_value)
+ {
+ case VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV:
+ return "VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV";
+ case VK_GEOMETRY_OPAQUE_BIT_NV:
+ return "VK_GEOMETRY_OPAQUE_BIT_NV";
+ default:
+ return "Unhandled VkGeometryFlagBitsNV";
+ }
+}
+
+static inline std::string string_VkGeometryFlagsNV(VkGeometryFlagsNV input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkGeometryFlagBitsNV(static_cast<VkGeometryFlagBitsNV>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkGeometryFlagBitsNV(static_cast<VkGeometryFlagBitsNV>(0)));
+ return ret;
+}
+
+static inline const char* string_VkGeometryInstanceFlagBitsNV(VkGeometryInstanceFlagBitsNV input_value)
+{
+ switch ((VkGeometryInstanceFlagBitsNV)input_value)
+ {
+ case VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV:
+ return "VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV";
+ case VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV:
+ return "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV";
+ case VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV:
+ return "VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV";
+ case VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV:
+ return "VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV";
+ default:
+ return "Unhandled VkGeometryInstanceFlagBitsNV";
+ }
+}
+
+static inline std::string string_VkGeometryInstanceFlagsNV(VkGeometryInstanceFlagsNV input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkGeometryInstanceFlagBitsNV(static_cast<VkGeometryInstanceFlagBitsNV>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkGeometryInstanceFlagBitsNV(static_cast<VkGeometryInstanceFlagBitsNV>(0)));
+ return ret;
+}
+
+static inline const char* string_VkBuildAccelerationStructureFlagBitsNV(VkBuildAccelerationStructureFlagBitsNV input_value)
+{
+ switch ((VkBuildAccelerationStructureFlagBitsNV)input_value)
+ {
+ case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV:
+ return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV";
+ case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV:
+ return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV";
+ case VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV:
+ return "VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV";
+ case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV:
+ return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV";
+ case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV:
+ return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV";
+ default:
+ return "Unhandled VkBuildAccelerationStructureFlagBitsNV";
+ }
+}
+
+static inline std::string string_VkBuildAccelerationStructureFlagsNV(VkBuildAccelerationStructureFlagsNV input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkBuildAccelerationStructureFlagBitsNV(static_cast<VkBuildAccelerationStructureFlagBitsNV>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkBuildAccelerationStructureFlagBitsNV(static_cast<VkBuildAccelerationStructureFlagBitsNV>(0)));
+ return ret;
+}
+
+static inline const char* string_VkCopyAccelerationStructureModeNV(VkCopyAccelerationStructureModeNV input_value)
+{
+ switch ((VkCopyAccelerationStructureModeNV)input_value)
+ {
+ case VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV:
+ return "VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV";
+ case VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV:
+ return "VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV";
+ default:
+ return "Unhandled VkCopyAccelerationStructureModeNV";
+ }
+}
+
+static inline const char* string_VkAccelerationStructureMemoryRequirementsTypeNV(VkAccelerationStructureMemoryRequirementsTypeNV input_value)
+{
+ switch ((VkAccelerationStructureMemoryRequirementsTypeNV)input_value)
+ {
+ case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV:
+ return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV";
+ case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV:
+ return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV";
+ case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV:
+ return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV";
+ default:
+ return "Unhandled VkAccelerationStructureMemoryRequirementsTypeNV";
+ }
+}
+
static inline const char* string_VkQueueGlobalPriorityEXT(VkQueueGlobalPriorityEXT input_value)
{
switch ((VkQueueGlobalPriorityEXT)input_value)
{
- case VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT:
- return "VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT";
case VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT:
return "VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT";
+ case VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT:
+ return "VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT";
case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT:
return "VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT";
case VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT:
@@ -3659,6 +6045,312 @@ static inline const char* string_VkQueueGlobalPriorityEXT(VkQueueGlobalPriorityE
}
}
+static inline const char* string_VkTimeDomainEXT(VkTimeDomainEXT input_value)
+{
+ switch ((VkTimeDomainEXT)input_value)
+ {
+ case VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT:
+ return "VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT";
+ case VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT:
+ return "VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT";
+ case VK_TIME_DOMAIN_DEVICE_EXT:
+ return "VK_TIME_DOMAIN_DEVICE_EXT";
+ case VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT:
+ return "VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT";
+ default:
+ return "Unhandled VkTimeDomainEXT";
+ }
+}
+
+static inline const char* string_VkMemoryOverallocationBehaviorAMD(VkMemoryOverallocationBehaviorAMD input_value)
+{
+ switch ((VkMemoryOverallocationBehaviorAMD)input_value)
+ {
+ case VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD:
+ return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD";
+ case VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD:
+ return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD";
+ case VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD:
+ return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD";
+ default:
+ return "Unhandled VkMemoryOverallocationBehaviorAMD";
+ }
+}
+
+static inline const char* string_VkPipelineCreationFeedbackFlagBitsEXT(VkPipelineCreationFeedbackFlagBitsEXT input_value)
+{
+ switch ((VkPipelineCreationFeedbackFlagBitsEXT)input_value)
+ {
+ case VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT:
+ return "VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT";
+ case VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT:
+ return "VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT";
+ case VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT:
+ return "VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT";
+ default:
+ return "Unhandled VkPipelineCreationFeedbackFlagBitsEXT";
+ }
+}
+
+static inline std::string string_VkPipelineCreationFeedbackFlagsEXT(VkPipelineCreationFeedbackFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkPipelineCreationFeedbackFlagBitsEXT(static_cast<VkPipelineCreationFeedbackFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkPipelineCreationFeedbackFlagBitsEXT(static_cast<VkPipelineCreationFeedbackFlagBitsEXT>(0)));
+ return ret;
+}
+
+static inline const char* string_VkPerformanceConfigurationTypeINTEL(VkPerformanceConfigurationTypeINTEL input_value)
+{
+ switch ((VkPerformanceConfigurationTypeINTEL)input_value)
+ {
+ case VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL:
+ return "VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL";
+ default:
+ return "Unhandled VkPerformanceConfigurationTypeINTEL";
+ }
+}
+
+static inline const char* string_VkQueryPoolSamplingModeINTEL(VkQueryPoolSamplingModeINTEL input_value)
+{
+ switch ((VkQueryPoolSamplingModeINTEL)input_value)
+ {
+ case VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL:
+ return "VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL";
+ default:
+ return "Unhandled VkQueryPoolSamplingModeINTEL";
+ }
+}
+
+static inline const char* string_VkPerformanceOverrideTypeINTEL(VkPerformanceOverrideTypeINTEL input_value)
+{
+ switch ((VkPerformanceOverrideTypeINTEL)input_value)
+ {
+ case VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL:
+ return "VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL";
+ case VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL:
+ return "VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL";
+ default:
+ return "Unhandled VkPerformanceOverrideTypeINTEL";
+ }
+}
+
+static inline const char* string_VkPerformanceParameterTypeINTEL(VkPerformanceParameterTypeINTEL input_value)
+{
+ switch ((VkPerformanceParameterTypeINTEL)input_value)
+ {
+ case VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL:
+ return "VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL";
+ case VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL:
+ return "VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL";
+ default:
+ return "Unhandled VkPerformanceParameterTypeINTEL";
+ }
+}
+
+static inline const char* string_VkPerformanceValueTypeINTEL(VkPerformanceValueTypeINTEL input_value)
+{
+ switch ((VkPerformanceValueTypeINTEL)input_value)
+ {
+ case VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL:
+ return "VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL";
+ case VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL:
+ return "VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL";
+ case VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL:
+ return "VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL";
+ case VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL:
+ return "VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL";
+ case VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL:
+ return "VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL";
+ default:
+ return "Unhandled VkPerformanceValueTypeINTEL";
+ }
+}
+
+static inline const char* string_VkToolPurposeFlagBitsEXT(VkToolPurposeFlagBitsEXT input_value)
+{
+ switch ((VkToolPurposeFlagBitsEXT)input_value)
+ {
+ case VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT:
+ return "VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT";
+ case VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT:
+ return "VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT";
+ case VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT:
+ return "VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT";
+ case VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT:
+ return "VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT";
+ case VK_TOOL_PURPOSE_PROFILING_BIT_EXT:
+ return "VK_TOOL_PURPOSE_PROFILING_BIT_EXT";
+ case VK_TOOL_PURPOSE_TRACING_BIT_EXT:
+ return "VK_TOOL_PURPOSE_TRACING_BIT_EXT";
+ case VK_TOOL_PURPOSE_VALIDATION_BIT_EXT:
+ return "VK_TOOL_PURPOSE_VALIDATION_BIT_EXT";
+ default:
+ return "Unhandled VkToolPurposeFlagBitsEXT";
+ }
+}
+
+static inline std::string string_VkToolPurposeFlagsEXT(VkToolPurposeFlagsEXT input_value)
+{
+ std::string ret;
+ int index = 0;
+ while(input_value) {
+ if (input_value & 1) {
+ if( !ret.empty()) ret.append("|");
+ ret.append(string_VkToolPurposeFlagBitsEXT(static_cast<VkToolPurposeFlagBitsEXT>(1 << index)));
+ }
+ ++index;
+ input_value >>= 1;
+ }
+ if( ret.empty()) ret.append(string_VkToolPurposeFlagBitsEXT(static_cast<VkToolPurposeFlagBitsEXT>(0)));
+ return ret;
+}
+
+static inline const char* string_VkValidationFeatureEnableEXT(VkValidationFeatureEnableEXT input_value)
+{
+ switch ((VkValidationFeatureEnableEXT)input_value)
+ {
+ case VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT:
+ return "VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT";
+ case VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT:
+ return "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT";
+ case VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT:
+ return "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT";
+ default:
+ return "Unhandled VkValidationFeatureEnableEXT";
+ }
+}
+
+static inline const char* string_VkValidationFeatureDisableEXT(VkValidationFeatureDisableEXT input_value)
+{
+ switch ((VkValidationFeatureDisableEXT)input_value)
+ {
+ case VK_VALIDATION_FEATURE_DISABLE_ALL_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_ALL_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT";
+ case VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT:
+ return "VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT";
+ default:
+ return "Unhandled VkValidationFeatureDisableEXT";
+ }
+}
+
+static inline const char* string_VkComponentTypeNV(VkComponentTypeNV input_value)
+{
+ switch ((VkComponentTypeNV)input_value)
+ {
+ case VK_COMPONENT_TYPE_FLOAT16_NV:
+ return "VK_COMPONENT_TYPE_FLOAT16_NV";
+ case VK_COMPONENT_TYPE_FLOAT32_NV:
+ return "VK_COMPONENT_TYPE_FLOAT32_NV";
+ case VK_COMPONENT_TYPE_FLOAT64_NV:
+ return "VK_COMPONENT_TYPE_FLOAT64_NV";
+ case VK_COMPONENT_TYPE_SINT16_NV:
+ return "VK_COMPONENT_TYPE_SINT16_NV";
+ case VK_COMPONENT_TYPE_SINT32_NV:
+ return "VK_COMPONENT_TYPE_SINT32_NV";
+ case VK_COMPONENT_TYPE_SINT64_NV:
+ return "VK_COMPONENT_TYPE_SINT64_NV";
+ case VK_COMPONENT_TYPE_SINT8_NV:
+ return "VK_COMPONENT_TYPE_SINT8_NV";
+ case VK_COMPONENT_TYPE_UINT16_NV:
+ return "VK_COMPONENT_TYPE_UINT16_NV";
+ case VK_COMPONENT_TYPE_UINT32_NV:
+ return "VK_COMPONENT_TYPE_UINT32_NV";
+ case VK_COMPONENT_TYPE_UINT64_NV:
+ return "VK_COMPONENT_TYPE_UINT64_NV";
+ case VK_COMPONENT_TYPE_UINT8_NV:
+ return "VK_COMPONENT_TYPE_UINT8_NV";
+ default:
+ return "Unhandled VkComponentTypeNV";
+ }
+}
+
+static inline const char* string_VkScopeNV(VkScopeNV input_value)
+{
+ switch ((VkScopeNV)input_value)
+ {
+ case VK_SCOPE_DEVICE_NV:
+ return "VK_SCOPE_DEVICE_NV";
+ case VK_SCOPE_QUEUE_FAMILY_NV:
+ return "VK_SCOPE_QUEUE_FAMILY_NV";
+ case VK_SCOPE_SUBGROUP_NV:
+ return "VK_SCOPE_SUBGROUP_NV";
+ case VK_SCOPE_WORKGROUP_NV:
+ return "VK_SCOPE_WORKGROUP_NV";
+ default:
+ return "Unhandled VkScopeNV";
+ }
+}
+
+static inline const char* string_VkCoverageReductionModeNV(VkCoverageReductionModeNV input_value)
+{
+ switch ((VkCoverageReductionModeNV)input_value)
+ {
+ case VK_COVERAGE_REDUCTION_MODE_MERGE_NV:
+ return "VK_COVERAGE_REDUCTION_MODE_MERGE_NV";
+ case VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV:
+ return "VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV";
+ default:
+ return "Unhandled VkCoverageReductionModeNV";
+ }
+}
+
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+
+static inline const char* string_VkFullScreenExclusiveEXT(VkFullScreenExclusiveEXT input_value)
+{
+ switch ((VkFullScreenExclusiveEXT)input_value)
+ {
+ case VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT:
+ return "VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT";
+ case VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT:
+ return "VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT";
+ case VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT:
+ return "VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT";
+ case VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT:
+ return "VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT";
+ default:
+ return "Unhandled VkFullScreenExclusiveEXT";
+ }
+}
+#endif // VK_USE_PLATFORM_WIN32_KHR
+
+static inline const char* string_VkLineRasterizationModeEXT(VkLineRasterizationModeEXT input_value)
+{
+ switch ((VkLineRasterizationModeEXT)input_value)
+ {
+ case VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT:
+ return "VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT";
+ case VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT:
+ return "VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT";
+ case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT:
+ return "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT";
+ case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT:
+ return "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT";
+ default:
+ return "Unhandled VkLineRasterizationModeEXT";
+ }
+}
+
static inline const char * GetPhysDevFeatureString(uint32_t index) {
const char * IndexToPhysDevFeatureString[] = {
"robustBufferAccess",
diff --git a/thirdparty/vulkan/vk_mem_alloc.h b/thirdparty/vulkan/vk_mem_alloc.h
index 465864b363..0dfb66efc6 100644
--- a/thirdparty/vulkan/vk_mem_alloc.h
+++ b/thirdparty/vulkan/vk_mem_alloc.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
+// Copyright (c) 2017-2019 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
@@ -40,31 +40,31 @@ Documentation of all members: vk_mem_alloc.h
- <b>User guide</b>
- \subpage quick_start
- - [Project setup](@ref quick_start_project_setup)
- - [Initialization](@ref quick_start_initialization)
- - [Resource allocation](@ref quick_start_resource_allocation)
+ - [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)
+ - [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
- - [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)
- - [Finding out if memory is mappable](@ref memory_mapping_finding_if_memory_mappable)
+ - [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)
+ - [Finding out if memory is mappable](@ref memory_mapping_finding_if_memory_mappable)
- \subpage staying_within_budget
- - [Querying for budget](@ref staying_within_budget_querying_for_budget)
- - [Controlling memory usage](@ref staying_within_budget_controlling_memory_usage)
+ - [Querying for budget](@ref staying_within_budget_querying_for_budget)
+ - [Controlling memory usage](@ref staying_within_budget_controlling_memory_usage)
- \subpage custom_memory_pools
- - [Choosing memory type index](@ref custom_memory_pools_MemTypeIndex)
- - [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)
- - [Buddy allocation algorithm](@ref buddy_algorithm)
+ - [Choosing memory type index](@ref custom_memory_pools_MemTypeIndex)
+ - [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)
+ - [Buddy allocation algorithm](@ref buddy_algorithm)
- \subpage defragmentation
- [Defragmenting CPU memory](@ref defragmentation_cpu)
- [Defragmenting GPU memory](@ref defragmentation_gpu)
@@ -72,15 +72,15 @@ Documentation of all members: vk_mem_alloc.h
- [Writing custom allocation algorithm](@ref defragmentation_custom_algorithm)
- \subpage lost_allocations
- \subpage statistics
- - [Numeric statistics](@ref statistics_numeric_statistics)
- - [JSON dump](@ref statistics_json_dump)
+ - [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)
+ - [Allocation user data](@ref allocation_user_data)
+ - [Allocation names](@ref allocation_names)
- \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)
+ - [Memory initialization](@ref debugging_memory_usage_initialization)
+ - [Margins](@ref debugging_memory_usage_margins)
+ - [Corruption detection](@ref debugging_memory_usage_corruption_detection)
- \subpage record_and_replay
- \subpage usage_patterns
- [Common mistakes](@ref usage_patterns_common_mistakes)
@@ -92,7 +92,6 @@ Documentation of all members: vk_mem_alloc.h
- [Device memory allocation callbacks](@ref allocation_callbacks)
- [Device heap memory limit](@ref heap_memory_limit)
- \subpage vk_khr_dedicated_allocation
- - \subpage vk_amd_device_coherent_memory
- \subpage general_considerations
- [Thread safety](@ref general_considerations_thread_safety)
- [Validation layer warnings](@ref general_considerations_validation_layer_warnings)
@@ -357,7 +356,7 @@ Example:
struct ConstantBuffer
{
- ...
+ ...
};
ConstantBuffer constantBufferData;
@@ -481,16 +480,16 @@ VkMemoryPropertyFlags memFlags;
vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &memFlags);
if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
{
- // Allocation ended up in mappable memory. You can map it and access it directly.
- void* mappedData;
- vmaMapMemory(allocator, alloc, &mappedData);
- memcpy(mappedData, &constantBufferData, sizeof(constantBufferData));
- vmaUnmapMemory(allocator, alloc);
+ // Allocation ended up in mappable memory. You can map it and access it directly.
+ void* mappedData;
+ vmaMapMemory(allocator, alloc, &mappedData);
+ memcpy(mappedData, &constantBufferData, sizeof(constantBufferData));
+ vmaUnmapMemory(allocator, alloc);
}
else
{
- // Allocation ended up in non-mappable memory.
- // You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.
+ // Allocation ended up in non-mappable memory.
+ // You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.
}
\endcode
@@ -516,14 +515,14 @@ vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allo
if(allocInfo.pUserData != nullptr)
{
- // Allocation ended up in mappable memory.
- // It's persistently mapped. You can access it directly.
- memcpy(allocInfo.pMappedData, &constantBufferData, sizeof(constantBufferData));
+ // Allocation ended up in mappable memory.
+ // It's persistently mapped. You can access it directly.
+ memcpy(allocInfo.pMappedData, &constantBufferData, sizeof(constantBufferData));
}
else
{
- // Allocation ended up in non-mappable memory.
- // You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.
+ // Allocation ended up in non-mappable memory.
+ // You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.
}
\endcode
@@ -881,22 +880,22 @@ vmaDefragmentationEnd(allocator, defragCtx);
for(uint32_t i = 0; i < allocCount; ++i)
{
- if(allocationsChanged[i])
- {
- // Destroy buffer that is immutably bound to memory region which is no longer valid.
- vkDestroyBuffer(device, buffers[i], nullptr);
-
- // Create new buffer with same parameters.
- VkBufferCreateInfo bufferInfo = ...;
- vkCreateBuffer(device, &bufferInfo, nullptr, &buffers[i]);
-
- // You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.
-
- // Bind new buffer to new memory region. Data contained in it is already moved.
- VmaAllocationInfo allocInfo;
- vmaGetAllocationInfo(allocator, allocations[i], &allocInfo);
- vmaBindBufferMemory(allocator, allocations[i], buffers[i]);
- }
+ if(allocationsChanged[i])
+ {
+ // Destroy buffer that is immutably bound to memory region which is no longer valid.
+ vkDestroyBuffer(device, buffers[i], nullptr);
+
+ // Create new buffer with same parameters.
+ VkBufferCreateInfo bufferInfo = ...;
+ vkCreateBuffer(device, &bufferInfo, nullptr, &buffers[i]);
+
+ // You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.
+
+ // Bind new buffer to new memory region. Data contained in it is already moved.
+ VmaAllocationInfo allocInfo;
+ vmaGetAllocationInfo(allocator, allocations[i], &allocInfo);
+ vmaBindBufferMemory(allocator, allocations[i], buffers[i]);
+ }
}
\endcode
@@ -959,22 +958,22 @@ vmaDefragmentationEnd(allocator, defragCtx);
for(uint32_t i = 0; i < allocCount; ++i)
{
- if(allocationsChanged[i])
- {
- // Destroy buffer that is immutably bound to memory region which is no longer valid.
- vkDestroyBuffer(device, buffers[i], nullptr);
-
- // Create new buffer with same parameters.
- VkBufferCreateInfo bufferInfo = ...;
- vkCreateBuffer(device, &bufferInfo, nullptr, &buffers[i]);
-
- // You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.
-
- // Bind new buffer to new memory region. Data contained in it is already moved.
- VmaAllocationInfo allocInfo;
- vmaGetAllocationInfo(allocator, allocations[i], &allocInfo);
- vmaBindBufferMemory(allocator, allocations[i], buffers[i]);
- }
+ if(allocationsChanged[i])
+ {
+ // Destroy buffer that is immutably bound to memory region which is no longer valid.
+ vkDestroyBuffer(device, buffers[i], nullptr);
+
+ // Create new buffer with same parameters.
+ VkBufferCreateInfo bufferInfo = ...;
+ vkCreateBuffer(device, &bufferInfo, nullptr, &buffers[i]);
+
+ // You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.
+
+ // Bind new buffer to new memory region. Data contained in it is already moved.
+ VmaAllocationInfo allocInfo;
+ vmaGetAllocationInfo(allocator, allocations[i], &allocInfo);
+ vmaBindBufferMemory(allocator, allocations[i], buffers[i]);
+ }
}
\endcode
@@ -1088,40 +1087,40 @@ Example code:
\code
struct MyBuffer
{
- VkBuffer m_Buf = nullptr;
- VmaAllocation m_Alloc = nullptr;
+ VkBuffer m_Buf = nullptr;
+ VmaAllocation m_Alloc = nullptr;
- // Called when the buffer is really needed in the current frame.
- void EnsureBuffer();
+ // Called when the buffer is really needed in the current frame.
+ void EnsureBuffer();
};
void MyBuffer::EnsureBuffer()
{
- // Buffer has been created.
- if(m_Buf != VK_NULL_HANDLE)
- {
- // Check if its allocation is not lost + mark it as used in current frame.
- if(vmaTouchAllocation(allocator, m_Alloc))
- {
- // It's all OK - safe to use m_Buf.
- return;
- }
- }
+ // Buffer has been created.
+ if(m_Buf != VK_NULL_HANDLE)
+ {
+ // Check if its allocation is not lost + mark it as used in current frame.
+ if(vmaTouchAllocation(allocator, m_Alloc))
+ {
+ // It's all OK - safe to use m_Buf.
+ return;
+ }
+ }
- // Buffer not yet exists or lost - destroy and recreate it.
+ // Buffer not yet exists or lost - destroy and recreate it.
- vmaDestroyBuffer(allocator, m_Buf, m_Alloc);
+ vmaDestroyBuffer(allocator, m_Buf, m_Alloc);
- 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;
+ 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.usage = VMA_MEMORY_USAGE_GPU_ONLY;
- allocCreateInfo.flags = VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT |
- VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT;
+ VmaAllocationCreateInfo allocCreateInfo = {};
+ allocCreateInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY;
+ allocCreateInfo.flags = VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT |
+ VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT;
- vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &m_Buf, &m_Alloc, nullptr);
+ vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &m_Buf, &m_Alloc, nullptr);
}
\endcode
@@ -1269,9 +1268,6 @@ printf("Image name: %s\n", imageName);
That string is also printed in JSON report created by vmaBuildStatsString().
-\note Passing 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 debugging_memory_usage Debugging incorrect memory usage
@@ -1405,7 +1401,7 @@ Its project is generated by Premake.
Command line syntax is printed when the program is launched without parameters.
Basic usage:
- VmaReplay.exe MyRecording.csv
+ VmaReplay.exe MyRecording.csv
<b>Documentation of file format</b> can be found in file: "docs/Recording file format.md".
It's a human-readable, text file in CSV format (Comma Separated Values).
@@ -1665,7 +1661,7 @@ 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.
+ 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
@@ -1674,68 +1670,11 @@ 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/chap44.html#VK_KHR_dedicated_allocation)
+- [VK_KHR_dedicated_allocation in Vulkan specification](https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VK_KHR_dedicated_allocation)
- [VK_KHR_dedicated_allocation unofficial manual](http://asawicki.info/articles/VK_KHR_dedicated_allocation.php5)
-\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_COHERENT_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/html/chap44.html#VK_AMD_device_coherent_memory)
-
-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
@@ -1762,14 +1701,14 @@ 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.
+ `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.
+ `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 happens when you use lost allocations, and a new image or buffer is
- created in place of an existing object that bacame lost.
+ created in place of an existing object that bacame lost.
- It may happen also when you use [defragmentation](@ref defragmentation).
\section general_considerations_allocation_algorithm Allocation algorithm
@@ -1824,54 +1763,54 @@ Define this macro to 0/1 to disable/enable support for recording functionality,
available through VmaAllocatorCreateInfo::pRecordSettings.
*/
#ifndef VMA_RECORDING_ENABLED
- #define VMA_RECORDING_ENABLED 0
+ #define VMA_RECORDING_ENABLED 0
#endif
#ifndef NOMINMAX
- #define NOMINMAX // For windows.h
+ #define NOMINMAX // For windows.h
#endif
#ifndef VULKAN_H_
- #include <vulkan/vulkan.h>
+ #include <vulkan/vulkan.h>
#endif
#if VMA_RECORDING_ENABLED
- #include <windows.h>
+ #include <windows.h>
#endif
// Define this macro to declare maximum supported Vulkan version in format AAABBBCCC,
// where AAA = major, BBB = minor, CCC = patch.
// If you want to use version > 1.0, it still needs to be enabled via VmaAllocatorCreateInfo::vulkanApiVersion.
#if !defined(VMA_VULKAN_VERSION)
- #if defined(VK_VERSION_1_1)
- #define VMA_VULKAN_VERSION 1001000
- #else
- #define VMA_VULKAN_VERSION 1000000
- #endif
+ #if defined(VK_VERSION_1_1)
+ #define VMA_VULKAN_VERSION 1001000
+ #else
+ #define VMA_VULKAN_VERSION 1000000
+ #endif
#endif
#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
+ #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
+ #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
+ #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
// Define these macros to decorate all public functions with additional code,
@@ -1880,10 +1819,10 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
// #define VMA_CALL_PRE __declspec(dllexport)
// #define VMA_CALL_POST __cdecl
#ifndef VMA_CALL_PRE
- #define VMA_CALL_PRE
+ #define VMA_CALL_PRE
#endif
#ifndef VMA_CALL_POST
- #define VMA_CALL_POST
+ #define VMA_CALL_POST
#endif
/** \struct VmaAllocator
@@ -1899,16 +1838,16 @@ VK_DEFINE_HANDLE(VmaAllocator)
/// Callback function called after successful vkAllocateMemory.
typedef void (VKAPI_PTR *PFN_vmaAllocateDeviceMemoryFunction)(
- VmaAllocator allocator,
- uint32_t memoryType,
- VkDeviceMemory memory,
- VkDeviceSize size);
+ VmaAllocator allocator,
+ uint32_t memoryType,
+ VkDeviceMemory memory,
+ VkDeviceSize size);
/// Callback function called before vkFreeMemory.
typedef void (VKAPI_PTR *PFN_vmaFreeDeviceMemoryFunction)(
- VmaAllocator allocator,
- uint32_t memoryType,
- VkDeviceMemory memory,
- VkDeviceSize size);
+ VmaAllocator allocator,
+ uint32_t memoryType,
+ VkDeviceMemory memory,
+ VkDeviceSize size);
/** \brief Set of callbacks that the library will call for `vkAllocateMemory` and `vkFreeMemory`.
@@ -1918,91 +1857,73 @@ allocations or total amount of memory allocated in Vulkan.
Used in VmaAllocatorCreateInfo::pDeviceMemoryCallbacks.
*/
typedef struct VmaDeviceMemoryCallbacks {
- /// Optional, can be null.
- PFN_vmaAllocateDeviceMemoryFunction pfnAllocate;
- /// Optional, can be null.
- PFN_vmaFreeDeviceMemoryFunction pfnFree;
+ /// Optional, can be null.
+ PFN_vmaAllocateDeviceMemoryFunction pfnAllocate;
+ /// Optional, can be null.
+ PFN_vmaFreeDeviceMemoryFunction pfnFree;
} VmaDeviceMemoryCallbacks;
/// 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's `VK_API_VERSION_1_1`, the flag is ignored because the extension has been promoted to Vulkan 1.1.
-
- Using this extenion 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's `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,
- /**
- Enabled 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,
-
- VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+ /** \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's `VK_API_VERSION_1_1`, the flag is ignored because the extension has been promoted to Vulkan 1.1.
+
+ Using this extenion 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's `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,
+
+ VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VmaAllocatorCreateFlagBits;
typedef VkFlags VmaAllocatorCreateFlags;
@@ -2011,183 +1932,183 @@ typedef VkFlags VmaAllocatorCreateFlags;
Used in VmaAllocatorCreateInfo::pVulkanFunctions.
*/
typedef struct VmaVulkanFunctions {
- PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
- PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
- PFN_vkAllocateMemory vkAllocateMemory;
- PFN_vkFreeMemory vkFreeMemory;
- PFN_vkMapMemory vkMapMemory;
- PFN_vkUnmapMemory vkUnmapMemory;
- PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges;
- PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges;
- PFN_vkBindBufferMemory vkBindBufferMemory;
- PFN_vkBindImageMemory vkBindImageMemory;
- PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
- PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
- PFN_vkCreateBuffer vkCreateBuffer;
- PFN_vkDestroyBuffer vkDestroyBuffer;
- PFN_vkCreateImage vkCreateImage;
- PFN_vkDestroyImage vkDestroyImage;
- PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
+ PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
+ PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
+ PFN_vkAllocateMemory vkAllocateMemory;
+ PFN_vkFreeMemory vkFreeMemory;
+ PFN_vkMapMemory vkMapMemory;
+ PFN_vkUnmapMemory vkUnmapMemory;
+ PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges;
+ PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges;
+ PFN_vkBindBufferMemory vkBindBufferMemory;
+ PFN_vkBindImageMemory vkBindImageMemory;
+ PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
+ PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
+ PFN_vkCreateBuffer vkCreateBuffer;
+ PFN_vkDestroyBuffer vkDestroyBuffer;
+ PFN_vkCreateImage vkCreateImage;
+ PFN_vkDestroyImage vkDestroyImage;
+ PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
#if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000
- PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
- PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
+ PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
+ PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
#endif
#if VMA_BIND_MEMORY2 || VMA_VULKAN_VERSION >= 1001000
- PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR;
- PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR;
+ PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR;
+ PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR;
#endif
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
- PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR;
+ PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR;
#endif
} VmaVulkanFunctions;
/// Flags to be used in VmaRecordSettings::flags.
typedef enum VmaRecordFlagBits {
- /** \brief Enables flush after recording every function call.
-
- Enable it if you expect your application to crash, which may leave recording file truncated.
- It may degrade performance though.
- */
- VMA_RECORD_FLUSH_AFTER_CALL_BIT = 0x00000001,
-
- VMA_RECORD_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+ /** \brief Enables flush after recording every function call.
+
+ Enable it if you expect your application to crash, which may leave recording file truncated.
+ It may degrade performance though.
+ */
+ VMA_RECORD_FLUSH_AFTER_CALL_BIT = 0x00000001,
+
+ VMA_RECORD_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VmaRecordFlagBits;
typedef VkFlags VmaRecordFlags;
/// Parameters for recording calls to VMA functions. To be used in VmaAllocatorCreateInfo::pRecordSettings.
typedef struct VmaRecordSettings
{
- /// Flags for recording. Use #VmaRecordFlagBits enum.
- VmaRecordFlags flags;
- /** \brief Path to the file that should be written by the recording.
+ /// Flags for recording. Use #VmaRecordFlagBits enum.
+ VmaRecordFlags flags;
+ /** \brief Path to the file that should be written by the recording.
- Suggested extension: "csv".
- If the file already exists, it will be overwritten.
- It will be opened for the whole time #VmaAllocator object is alive.
- If opening this file fails, creation of the whole allocator object fails.
- */
- const char* pFilePath;
+ Suggested extension: "csv".
+ If the file already exists, it will be overwritten.
+ It will be opened for the whole time #VmaAllocator object is alive.
+ If opening this file fails, creation of the whole allocator object fails.
+ */
+ const char* pFilePath;
} VmaRecordSettings;
/// 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 physicalDevice;
- /// Vulkan device.
- /** It must be valid throughout whole lifetime of created allocator. */
- VkDevice 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* pAllocationCallbacks;
- /// Informative callbacks for `vkAllocateMemory`, `vkFreeMemory`. Optional.
- /** Optional, can be null. */
- const VmaDeviceMemoryCallbacks* pDeviceMemoryCallbacks;
- /** \brief Maximum number of additional frames that are in use at the same time as current frame.
-
- This value is used only when you make allocations with
- VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become
- lost if allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.
-
- For example, if you double-buffer your command buffers, so resources used for
- rendering in previous frame may still be in use by the GPU at the moment you
- allocate resources needed for the current frame, set this value to 1.
-
- If you want to allow any allocations other than used in the current frame to
- become lost, set this value to 0.
- */
- uint32_t frameInUseCount;
- /** \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* pHeapSizeLimit;
- /** \brief Pointers to Vulkan functions. Can be null if you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1`.
-
- If you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1` in configuration section,
- you can pass null as this member, because the library will fetch pointers to
- Vulkan functions internally in a static way, like:
-
- vulkanFunctions.vkAllocateMemory = &vkAllocateMemory;
-
- Fill this member if you want to provide your own pointers to Vulkan functions,
- e.g. fetched using `vkGetInstanceProcAddr()` and `vkGetDeviceProcAddr()`.
- */
- const VmaVulkanFunctions* pVulkanFunctions;
- /** \brief Parameters for recording of VMA calls. Can be null.
-
- If not null, it enables recording of calls to VMA functions to a file.
- If support for recording is not enabled using `VMA_RECORDING_ENABLED` macro,
- creation of the allocator object fails with `VK_ERROR_FEATURE_NOT_PRESENT`.
- */
- const VmaRecordSettings* pRecordSettings;
- /** \brief Optional handle to Vulkan instance object.
-
- Optional, can be null. Must be set if #VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT flas is used
- or if `vulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)`.
- */
- VkInstance instance;
- /** \brief Optional. The highest version of Vulkan that the application is designed to use.
-
- 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.
- It must be less or euqal (preferably equal) to value as passed to `vkCreateInstance` as `VkApplicationInfo::apiVersion`.
- Only versions 1.0 and 1.1 are supported by the current implementation.
- Leaving it initialized to zero is equivalent to `VK_API_VERSION_1_0`.
- */
- uint32_t vulkanApiVersion;
+ /// Flags for created allocator. Use #VmaAllocatorCreateFlagBits enum.
+ VmaAllocatorCreateFlags flags;
+ /// Vulkan physical device.
+ /** It must be valid throughout whole lifetime of created allocator. */
+ VkPhysicalDevice physicalDevice;
+ /// Vulkan device.
+ /** It must be valid throughout whole lifetime of created allocator. */
+ VkDevice 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* pAllocationCallbacks;
+ /// Informative callbacks for `vkAllocateMemory`, `vkFreeMemory`. Optional.
+ /** Optional, can be null. */
+ const VmaDeviceMemoryCallbacks* pDeviceMemoryCallbacks;
+ /** \brief Maximum number of additional frames that are in use at the same time as current frame.
+
+ This value is used only when you make allocations with
+ VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become
+ lost if allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.
+
+ For example, if you double-buffer your command buffers, so resources used for
+ rendering in previous frame may still be in use by the GPU at the moment you
+ allocate resources needed for the current frame, set this value to 1.
+
+ If you want to allow any allocations other than used in the current frame to
+ become lost, set this value to 0.
+ */
+ uint32_t frameInUseCount;
+ /** \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* pHeapSizeLimit;
+ /** \brief Pointers to Vulkan functions. Can be null if you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1`.
+
+ If you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1` in configuration section,
+ you can pass null as this member, because the library will fetch pointers to
+ Vulkan functions internally in a static way, like:
+
+ vulkanFunctions.vkAllocateMemory = &vkAllocateMemory;
+
+ Fill this member if you want to provide your own pointers to Vulkan functions,
+ e.g. fetched using `vkGetInstanceProcAddr()` and `vkGetDeviceProcAddr()`.
+ */
+ const VmaVulkanFunctions* pVulkanFunctions;
+ /** \brief Parameters for recording of VMA calls. Can be null.
+
+ If not null, it enables recording of calls to VMA functions to a file.
+ If support for recording is not enabled using `VMA_RECORDING_ENABLED` macro,
+ creation of the allocator object fails with `VK_ERROR_FEATURE_NOT_PRESENT`.
+ */
+ const VmaRecordSettings* pRecordSettings;
+ /** \brief Optional handle to Vulkan instance object.
+
+ Optional, can be null. Must be set if #VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT flas is used
+ or if `vulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)`.
+ */
+ VkInstance instance;
+ /** \brief Optional. The highest version of Vulkan that the application is designed to use.
+
+ 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.
+ It must be less or euqal (preferably equal) to value as passed to `vkCreateInstance` as `VkApplicationInfo::apiVersion`.
+ Only versions 1.0 and 1.1 are supported by the current implementation.
+ Leaving it initialized to zero is equivalent to `VK_API_VERSION_1_0`.
+ */
+ uint32_t vulkanApiVersion;
} VmaAllocatorCreateInfo;
/// Creates Allocator object.
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator(
- const VmaAllocatorCreateInfo* pCreateInfo,
- VmaAllocator* pAllocator);
+ const VmaAllocatorCreateInfo* pCreateInfo,
+ VmaAllocator* pAllocator);
/// Destroys allocator object.
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator(
- VmaAllocator allocator);
+ VmaAllocator allocator);
/**
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 allocator,
- const VkPhysicalDeviceProperties** ppPhysicalDeviceProperties);
+ VmaAllocator allocator,
+ const VkPhysicalDeviceProperties** 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 allocator,
- const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties);
+ VmaAllocator allocator,
+ const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties);
/**
\brief Given Memory Type Index, returns Property Flags of this memory type.
@@ -2196,9 +2117,9 @@ This is just a convenience function. Same information can be obtained using
vmaGetMemoryProperties().
*/
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties(
- VmaAllocator allocator,
- uint32_t memoryTypeIndex,
- VkMemoryPropertyFlags* pFlags);
+ VmaAllocator allocator,
+ uint32_t memoryTypeIndex,
+ VkMemoryPropertyFlags* pFlags);
/** \brief Sets index of the current frame.
@@ -2209,33 +2130,33 @@ when a new frame begins. Allocations queried using vmaGetAllocationInfo() cannot
become lost in the current frame.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaSetCurrentFrameIndex(
- VmaAllocator allocator,
- uint32_t frameIndex);
+ VmaAllocator allocator,
+ uint32_t frameIndex);
/** \brief Calculated statistics of memory usage in entire allocator.
*/
typedef struct VmaStatInfo
{
- /// Number of `VkDeviceMemory` Vulkan memory blocks allocated.
- uint32_t blockCount;
- /// Number of #VmaAllocation allocation objects allocated.
- uint32_t allocationCount;
- /// Number of free ranges of memory between allocations.
- uint32_t unusedRangeCount;
- /// Total number of bytes occupied by all allocations.
- VkDeviceSize usedBytes;
- /// Total number of bytes occupied by unused ranges.
- VkDeviceSize unusedBytes;
- VkDeviceSize allocationSizeMin, allocationSizeAvg, allocationSizeMax;
- VkDeviceSize unusedRangeSizeMin, unusedRangeSizeAvg, unusedRangeSizeMax;
+ /// Number of `VkDeviceMemory` Vulkan memory blocks allocated.
+ uint32_t blockCount;
+ /// Number of #VmaAllocation allocation objects allocated.
+ uint32_t allocationCount;
+ /// Number of free ranges of memory between allocations.
+ uint32_t unusedRangeCount;
+ /// Total number of bytes occupied by all allocations.
+ VkDeviceSize usedBytes;
+ /// Total number of bytes occupied by unused ranges.
+ VkDeviceSize unusedBytes;
+ VkDeviceSize allocationSizeMin, allocationSizeAvg, allocationSizeMax;
+ VkDeviceSize unusedRangeSizeMin, unusedRangeSizeAvg, unusedRangeSizeMax;
} VmaStatInfo;
/// General statistics from current state of Allocator.
typedef struct VmaStats
{
- VmaStatInfo memoryType[VK_MAX_MEMORY_TYPES];
- VmaStatInfo memoryHeap[VK_MAX_MEMORY_HEAPS];
- VmaStatInfo total;
+ VmaStatInfo memoryType[VK_MAX_MEMORY_TYPES];
+ VmaStatInfo memoryHeap[VK_MAX_MEMORY_HEAPS];
+ VmaStatInfo total;
} VmaStats;
/** \brief Retrieves statistics from current state of the Allocator.
@@ -2248,48 +2169,48 @@ Note that when using allocator from multiple threads, returned information may i
become outdated.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStats(
- VmaAllocator allocator,
- VmaStats* pStats);
+ VmaAllocator allocator,
+ VmaStats* pStats);
/** \brief Statistics of current memory usage and available budget, in bytes, for specific memory heap.
*/
typedef struct VmaBudget
{
- /** \brief Sum size of all `VkDeviceMemory` blocks allocated from particular heap, in bytes.
- */
- VkDeviceSize blockBytes;
-
- /** \brief Sum size of all allocations created in particular heap, in bytes.
-
- Usually less or equal than `blockBytes`.
- Difference `blockBytes - allocationBytes` is the amount of memory allocated but unused -
- available for new allocations or wasted due to fragmentation.
-
- It might be greater than `blockBytes` if there are some allocations in lost state, as they account
- to this value as well.
- */
- VkDeviceSize allocationBytes;
-
- /** \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 `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, like other programs also consuming system resources.
- 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;
+ /** \brief Sum size of all `VkDeviceMemory` blocks allocated from particular heap, in bytes.
+ */
+ VkDeviceSize blockBytes;
+
+ /** \brief Sum size of all allocations created in particular heap, in bytes.
+
+ Usually less or equal than `blockBytes`.
+ Difference `blockBytes - allocationBytes` is the amount of memory allocated but unused -
+ available for new allocations or wasted due to fragmentation.
+
+ It might be greater than `blockBytes` if there are some allocations in lost state, as they account
+ to this value as well.
+ */
+ VkDeviceSize allocationBytes;
+
+ /** \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 `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, like other programs also consuming system resources.
+ 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;
/** \brief Retrieves information about current memory budget for all memory heaps.
@@ -2303,8 +2224,8 @@ Note that when using allocator from multiple threads, returned information may i
become outdated.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaGetBudget(
- VmaAllocator allocator,
- VmaBudget* pBudget);
+ VmaAllocator allocator,
+ VmaBudget* pBudget);
#ifndef VMA_STATS_STRING_ENABLED
#define VMA_STATS_STRING_ENABLED 1
@@ -2316,13 +2237,13 @@ VMA_CALL_PRE void VMA_CALL_POST vmaGetBudget(
/** @param[out] ppStatsString Must be freed using vmaFreeStatsString() function.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaBuildStatsString(
- VmaAllocator allocator,
- char** ppStatsString,
- VkBool32 detailedMap);
+ VmaAllocator allocator,
+ char** ppStatsString,
+ VkBool32 detailedMap);
VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
- VmaAllocator allocator,
- char* pStatsString);
+ VmaAllocator allocator,
+ char* pStatsString);
#endif // #if VMA_STATS_STRING_ENABLED
@@ -2338,224 +2259,224 @@ VK_DEFINE_HANDLE(VmaPool)
typedef enum VmaMemoryUsage
{
- /** No intended memory usage specified.
- Use other members of VmaAllocationCreateInfo to specify your requirements.
- */
- VMA_MEMORY_USAGE_UNKNOWN = 0,
- /** Memory will be used on device only, so fast access from the device is preferred.
- It usually means device-local GPU (video) memory.
- No need to be mappable on host.
- It is roughly equivalent of `D3D12_HEAP_TYPE_DEFAULT`.
-
- Usage:
-
- - Resources written and read by device, e.g. images used as attachments.
- - Resources transferred from host once (immutable) or infrequently and read by
- device multiple times, e.g. textures to be sampled, vertex buffers, uniform
- (constant) buffers, and majority of other types of resources used on GPU.
-
- Allocation may still end up in `HOST_VISIBLE` memory on some implementations.
- In such case, you are free to map it.
- You can use #VMA_ALLOCATION_CREATE_MAPPED_BIT with this usage type.
- */
- VMA_MEMORY_USAGE_GPU_ONLY = 1,
- /** Memory will be mappable on host.
- It usually means CPU (system) memory.
- Guarantees to be `HOST_VISIBLE` and `HOST_COHERENT`.
- CPU access is typically uncached. Writes may be write-combined.
- Resources created in this pool may still be accessible to the device, but access to them can be slow.
- It is roughly equivalent of `D3D12_HEAP_TYPE_UPLOAD`.
-
- Usage: Staging copy of resources used as transfer source.
- */
- VMA_MEMORY_USAGE_CPU_ONLY = 2,
- /**
- Memory that is both mappable on host (guarantees to be `HOST_VISIBLE`) and preferably fast to access by GPU.
- CPU access is typically uncached. Writes may be write-combined.
-
- Usage: Resources written frequently by host (dynamic), read by device. E.g. textures, vertex buffers, uniform buffers updated every frame or every draw call.
- */
- VMA_MEMORY_USAGE_CPU_TO_GPU = 3,
- /** Memory mappable on host (guarantees to be `HOST_VISIBLE`) and cached.
- It is roughly equivalent of `D3D12_HEAP_TYPE_READBACK`.
-
- Usage:
-
- - Resources written by device, read by host - results of some computations, e.g. screen capture, average scene luminance for HDR tone mapping.
- - Any resources read or accessed randomly on host, e.g. CPU-side copy of vertex buffer used as source of transfer, but also used for collision detection.
- */
- VMA_MEMORY_USAGE_GPU_TO_CPU = 4,
- /** CPU memory - memory that is preferably not `DEVICE_LOCAL`, but also not guaranteed to be `HOST_VISIBLE`.
-
- Usage: Staging copy of resources moved from GPU memory to CPU memory as part
- of custom paging/residency mechanism, to be moved back to GPU memory when needed.
- */
- 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,
-
- VMA_MEMORY_USAGE_MAX_ENUM = 0x7FFFFFFF
+ /** No intended memory usage specified.
+ Use other members of VmaAllocationCreateInfo to specify your requirements.
+ */
+ VMA_MEMORY_USAGE_UNKNOWN = 0,
+ /** Memory will be used on device only, so fast access from the device is preferred.
+ It usually means device-local GPU (video) memory.
+ No need to be mappable on host.
+ It is roughly equivalent of `D3D12_HEAP_TYPE_DEFAULT`.
+
+ Usage:
+
+ - Resources written and read by device, e.g. images used as attachments.
+ - Resources transferred from host once (immutable) or infrequently and read by
+ device multiple times, e.g. textures to be sampled, vertex buffers, uniform
+ (constant) buffers, and majority of other types of resources used on GPU.
+
+ Allocation may still end up in `HOST_VISIBLE` memory on some implementations.
+ In such case, you are free to map it.
+ You can use #VMA_ALLOCATION_CREATE_MAPPED_BIT with this usage type.
+ */
+ VMA_MEMORY_USAGE_GPU_ONLY = 1,
+ /** Memory will be mappable on host.
+ It usually means CPU (system) memory.
+ Guarantees to be `HOST_VISIBLE` and `HOST_COHERENT`.
+ CPU access is typically uncached. Writes may be write-combined.
+ Resources created in this pool may still be accessible to the device, but access to them can be slow.
+ It is roughly equivalent of `D3D12_HEAP_TYPE_UPLOAD`.
+
+ Usage: Staging copy of resources used as transfer source.
+ */
+ VMA_MEMORY_USAGE_CPU_ONLY = 2,
+ /**
+ Memory that is both mappable on host (guarantees to be `HOST_VISIBLE`) and preferably fast to access by GPU.
+ CPU access is typically uncached. Writes may be write-combined.
+
+ Usage: Resources written frequently by host (dynamic), read by device. E.g. textures, vertex buffers, uniform buffers updated every frame or every draw call.
+ */
+ VMA_MEMORY_USAGE_CPU_TO_GPU = 3,
+ /** Memory mappable on host (guarantees to be `HOST_VISIBLE`) and cached.
+ It is roughly equivalent of `D3D12_HEAP_TYPE_READBACK`.
+
+ Usage:
+
+ - Resources written by device, read by host - results of some computations, e.g. screen capture, average scene luminance for HDR tone mapping.
+ - Any resources read or accessed randomly on host, e.g. CPU-side copy of vertex buffer used as source of transfer, but also used for collision detection.
+ */
+ VMA_MEMORY_USAGE_GPU_TO_CPU = 4,
+ /** CPU memory - memory that is preferably not `DEVICE_LOCAL`, but also not guaranteed to be `HOST_VISIBLE`.
+
+ Usage: Staging copy of resources moved from GPU memory to CPU memory as part
+ of custom paging/residency mechanism, to be moved back to GPU memory when needed.
+ */
+ 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,
+
+ 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.
+ /** \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.
- You should not use this flag if VmaAllocationCreateInfo::pool is not null.
- */
- 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.
-
- If VmaAllocationCreateInfo::pool is not null, this flag is implied and ignored. */
- 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.
-
- Is it 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).
-
- You should not use this flag together with #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT.
- */
- VMA_ALLOCATION_CREATE_MAPPED_BIT = 0x00000004,
- /** Allocation created with this flag can become lost as a result of another
- allocation with #VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT flag, so you
- must check it before use.
-
- To check if allocation is not lost, call vmaGetAllocationInfo() and check if
- VmaAllocationInfo::deviceMemory is not `VK_NULL_HANDLE`.
-
- For details about supporting lost allocations, see Lost Allocations
- chapter of User Guide on Main Page.
-
- You should not use this flag together with #VMA_ALLOCATION_CREATE_MAPPED_BIT.
- */
- VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT = 0x00000008,
- /** While creating allocation using this flag, other allocations that were
- created with flag #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT can become lost.
-
- For details about supporting lost allocations, see Lost Allocations
- chapter of User Guide on Main Page.
- */
- VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT = 0x00000010,
- /** 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 `pUserData`. 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.
- */
- 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,
-
- /** Allocation strategy that chooses smallest possible free range for the
- allocation.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT = 0x00010000,
- /** Allocation strategy that chooses biggest possible free range for the
- allocation.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT = 0x00020000,
- /** Allocation strategy that chooses first suitable free range for the
- allocation.
-
- "First" doesn't necessarily means the one with smallest offset in memory,
- but rather the one that is easiest and fastest to find.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT = 0x00040000,
-
- /** Allocation strategy that tries to minimize memory usage.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT = VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT,
- /** Allocation strategy that tries to minimize allocation time.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT = VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT,
- /** Allocation strategy that tries to minimize memory fragmentation.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT = VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT,
-
- /** A bit mask to extract only `STRATEGY` bits from entire set of flags.
- */
- VMA_ALLOCATION_CREATE_STRATEGY_MASK =
- VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT |
- VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT |
- VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT,
-
- VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+ You should not use this flag if VmaAllocationCreateInfo::pool is not null.
+ */
+ 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.
+
+ If VmaAllocationCreateInfo::pool is not null, this flag is implied and ignored. */
+ 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.
+
+ Is it 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).
+
+ You should not use this flag together with #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT.
+ */
+ VMA_ALLOCATION_CREATE_MAPPED_BIT = 0x00000004,
+ /** Allocation created with this flag can become lost as a result of another
+ allocation with #VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT flag, so you
+ must check it before use.
+
+ To check if allocation is not lost, call vmaGetAllocationInfo() and check if
+ VmaAllocationInfo::deviceMemory is not `VK_NULL_HANDLE`.
+
+ For details about supporting lost allocations, see Lost Allocations
+ chapter of User Guide on Main Page.
+
+ You should not use this flag together with #VMA_ALLOCATION_CREATE_MAPPED_BIT.
+ */
+ VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT = 0x00000008,
+ /** While creating allocation using this flag, other allocations that were
+ created with flag #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT can become lost.
+
+ For details about supporting lost allocations, see Lost Allocations
+ chapter of User Guide on Main Page.
+ */
+ VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT = 0x00000010,
+ /** 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 `pUserData`. 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.
+ */
+ 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,
+
+ /** Allocation strategy that chooses smallest possible free range for the
+ allocation.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT = 0x00010000,
+ /** Allocation strategy that chooses biggest possible free range for the
+ allocation.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT = 0x00020000,
+ /** Allocation strategy that chooses first suitable free range for the
+ allocation.
+
+ "First" doesn't necessarily means the one with smallest offset in memory,
+ but rather the one that is easiest and fastest to find.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT = 0x00040000,
+
+ /** Allocation strategy that tries to minimize memory usage.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT = VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT,
+ /** Allocation strategy that tries to minimize allocation time.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT = VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT,
+ /** Allocation strategy that tries to minimize memory fragmentation.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT = VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT,
+
+ /** A bit mask to extract only `STRATEGY` bits from entire set of flags.
+ */
+ VMA_ALLOCATION_CREATE_STRATEGY_MASK =
+ VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT |
+ VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT |
+ VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT,
+
+ VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VmaAllocationCreateFlagBits;
typedef VkFlags VmaAllocationCreateFlags;
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 prefered. \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 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* pUserData;
+ /// 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 prefered. \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 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* pUserData;
} VmaAllocationCreateInfo;
/**
@@ -2575,10 +2496,10 @@ 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 allocator,
- uint32_t memoryTypeBits,
- const VmaAllocationCreateInfo* pAllocationCreateInfo,
- uint32_t* pMemoryTypeIndex);
+ VmaAllocator allocator,
+ uint32_t memoryTypeBits,
+ const VmaAllocationCreateInfo* pAllocationCreateInfo,
+ uint32_t* pMemoryTypeIndex);
/**
\brief Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.
@@ -2593,10 +2514,10 @@ It is just a convenience function, equivalent to calling:
- `vkDestroyBuffer`
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForBufferInfo(
- VmaAllocator allocator,
- const VkBufferCreateInfo* pBufferCreateInfo,
- const VmaAllocationCreateInfo* pAllocationCreateInfo,
- uint32_t* pMemoryTypeIndex);
+ VmaAllocator allocator,
+ const VkBufferCreateInfo* pBufferCreateInfo,
+ const VmaAllocationCreateInfo* pAllocationCreateInfo,
+ uint32_t* pMemoryTypeIndex);
/**
\brief Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.
@@ -2611,142 +2532,142 @@ It is just a convenience function, equivalent to calling:
- `vkDestroyImage`
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForImageInfo(
- VmaAllocator allocator,
- const VkImageCreateInfo* pImageCreateInfo,
- const VmaAllocationCreateInfo* pAllocationCreateInfo,
- uint32_t* pMemoryTypeIndex);
+ VmaAllocator allocator,
+ const VkImageCreateInfo* pImageCreateInfo,
+ const VmaAllocationCreateInfo* pAllocationCreateInfo,
+ uint32_t* pMemoryTypeIndex);
/// 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.
+ /** \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.
+ 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 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,
+ 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.
+ /** \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.
+ 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.
+ 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.
- When using this flag, you must specify VmaPoolCreateInfo::maxBlockCount == 1 (or 0 for default).
+ When using this flag, you must specify VmaPoolCreateInfo::maxBlockCount == 1 (or 0 for default).
- For more details, see [Linear allocation algorithm](@ref linear_algorithm).
- */
- VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT = 0x00000004,
+ For more details, see [Linear allocation algorithm](@ref linear_algorithm).
+ */
+ VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT = 0x00000004,
- /** \brief Enables alternative, buddy allocation algorithm in this pool.
+ /** \brief Enables alternative, buddy allocation algorithm in this pool.
- It operates on a tree of blocks, each having size that is a power of two and
- a half of its parent's size. Comparing to default algorithm, this one provides
- faster allocation and deallocation and decreased external fragmentation,
- at the expense of more memory wasted (internal fragmentation).
+ It operates on a tree of blocks, each having size that is a power of two and
+ a half of its parent's size. Comparing to default algorithm, this one provides
+ faster allocation and deallocation and decreased external fragmentation,
+ at the expense of more memory wasted (internal fragmentation).
- For more details, see [Buddy allocation algorithm](@ref buddy_algorithm).
- */
- VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT = 0x00000008,
+ For more details, see [Buddy allocation algorithm](@ref buddy_algorithm).
+ */
+ VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT = 0x00000008,
- /** 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_BUDDY_ALGORITHM_BIT,
+ /** 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_BUDDY_ALGORITHM_BIT,
- VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+ VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VmaPoolCreateFlagBits;
typedef VkFlags VmaPoolCreateFlags;
/** \brief 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.
- */
- 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 Maximum number of additional frames that are in use at the same time as current frame.
-
- This value is used only when you make allocations with
- #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become
- lost if allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.
-
- For example, if you double-buffer your command buffers, so resources used for
- rendering in previous frame may still be in use by the GPU at the moment you
- allocate resources needed for the current frame, set this value to 1.
-
- If you want to allow any allocations other than used in the current frame to
- become lost, set this value to 0.
- */
- uint32_t frameInUseCount;
+ /** \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.
+ */
+ 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 Maximum number of additional frames that are in use at the same time as current frame.
+
+ This value is used only when you make allocations with
+ #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become
+ lost if allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.
+
+ For example, if you double-buffer your command buffers, so resources used for
+ rendering in previous frame may still be in use by the GPU at the moment you
+ allocate resources needed for the current frame, set this value to 1.
+
+ If you want to allow any allocations other than used in the current frame to
+ become lost, set this value to 0.
+ */
+ uint32_t frameInUseCount;
} VmaPoolCreateInfo;
/** \brief Describes parameter of existing #VmaPool.
*/
typedef struct VmaPoolStats {
- /** \brief Total amount of `VkDeviceMemory` allocated from Vulkan for this pool, in bytes.
- */
- VkDeviceSize size;
- /** \brief Total number of bytes in the pool not used by any #VmaAllocation.
- */
- VkDeviceSize unusedSize;
- /** \brief Number of #VmaAllocation objects created from this pool that were not destroyed or lost.
- */
- size_t allocationCount;
- /** \brief Number of continuous memory ranges in the pool not used by any #VmaAllocation.
- */
- size_t unusedRangeCount;
- /** \brief Size of the largest continuous free memory region available for new allocation.
-
- Making a new allocation of that size is not guaranteed to succeed because of
- possible additional margin required to respect alignment and buffer/image
- granularity.
- */
- VkDeviceSize unusedRangeSizeMax;
- /** \brief Number of `VkDeviceMemory` blocks allocated for this pool.
- */
- size_t blockCount;
+ /** \brief Total amount of `VkDeviceMemory` allocated from Vulkan for this pool, in bytes.
+ */
+ VkDeviceSize size;
+ /** \brief Total number of bytes in the pool not used by any #VmaAllocation.
+ */
+ VkDeviceSize unusedSize;
+ /** \brief Number of #VmaAllocation objects created from this pool that were not destroyed or lost.
+ */
+ size_t allocationCount;
+ /** \brief Number of continuous memory ranges in the pool not used by any #VmaAllocation.
+ */
+ size_t unusedRangeCount;
+ /** \brief Size of the largest continuous free memory region available for new allocation.
+
+ Making a new allocation of that size is not guaranteed to succeed because of
+ possible additional margin required to respect alignment and buffer/image
+ granularity.
+ */
+ VkDeviceSize unusedRangeSizeMax;
+ /** \brief Number of `VkDeviceMemory` blocks allocated for this pool.
+ */
+ size_t blockCount;
} VmaPoolStats;
/** \brief Allocates Vulkan device memory and creates #VmaPool object.
@@ -2763,8 +2684,8 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool(
/** \brief Destroys #VmaPool object and frees Vulkan device memory.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool(
- VmaAllocator allocator,
- VmaPool pool);
+ VmaAllocator allocator,
+ VmaPool pool);
/** \brief Retrieves statistics of existing #VmaPool object.
@@ -2773,9 +2694,9 @@ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool(
@param[out] pPoolStats Statistics of specified pool.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStats(
- VmaAllocator allocator,
- VmaPool pool,
- VmaPoolStats* pPoolStats);
+ VmaAllocator allocator,
+ VmaPool pool,
+ VmaPoolStats* pPoolStats);
/** \brief Marks all allocations in given pool as lost if they are not used in current frame or VmaPoolCreateInfo::frameInUseCount back from now.
@@ -2784,9 +2705,9 @@ VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStats(
@param[out] pLostAllocationCount Number of allocations marked as lost. Optional - pass null if you don't need this information.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaMakePoolAllocationsLost(
- VmaAllocator allocator,
- VmaPool pool,
- size_t* pLostAllocationCount);
+ VmaAllocator allocator,
+ VmaPool pool,
+ size_t* pLostAllocationCount);
/** \brief Checks magic number in margins around all allocations in given memory pool in search for corruptions.
@@ -2811,9 +2732,9 @@ containing name of the pool that was previously set. The pointer becomes invalid
destroyed or its name is changed using vmaSetPoolName().
*/
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolName(
- VmaAllocator allocator,
- VmaPool pool,
- const char** ppName);
+ VmaAllocator allocator,
+ VmaPool pool,
+ const char** ppName);
/** \brief Sets name of a custom pool.
@@ -2821,9 +2742,9 @@ VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolName(
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 allocator,
- VmaPool pool,
- const char* pName);
+ VmaAllocator allocator,
+ VmaPool pool,
+ const char* pName);
/** \struct VmaAllocation
\brief Represents single memory allocation.
@@ -2854,44 +2775,44 @@ VK_DEFINE_HANDLE(VmaAllocation)
/** \brief Parameters of #VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
*/
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 call to vmaDefragment() if this allocation is passed to the function, or if allocation is lost.
-
- If the allocation is lost, it is equal to `VK_NULL_HANDLE`.
- */
- VkDeviceMemory deviceMemory;
- /** \brief Offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation.
-
- It can change after call to vmaDefragment() if this allocation is passed to the function, or if allocation is lost.
- */
- VkDeviceSize offset;
- /** \brief Size of this allocation, in bytes.
-
- It never changes, unless allocation is lost.
- */
- 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 null.
-
- It can change after call to vmaMapMemory(), vmaUnmapMemory().
- It can also change after call to vmaDefragment() if this allocation is passed to the function.
- */
- void* 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* pUserData;
+ /** \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 call to vmaDefragment() if this allocation is passed to the function, or if allocation is lost.
+
+ If the allocation is lost, it is equal to `VK_NULL_HANDLE`.
+ */
+ VkDeviceMemory deviceMemory;
+ /** \brief Offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation.
+
+ It can change after call to vmaDefragment() if this allocation is passed to the function, or if allocation is lost.
+ */
+ VkDeviceSize offset;
+ /** \brief Size of this allocation, in bytes.
+
+ It never changes, unless allocation is lost.
+ */
+ 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 null.
+
+ It can change after call to vmaMapMemory(), vmaUnmapMemory().
+ It can also change after call to vmaDefragment() if this allocation is passed to the function.
+ */
+ void* 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* pUserData;
} VmaAllocationInfo;
/** \brief General purpose memory allocation.
@@ -2905,11 +2826,11 @@ It is recommended to use vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage
vmaCreateBuffer(), vmaCreateImage() instead whenever possible.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory(
- VmaAllocator allocator,
- const VkMemoryRequirements* pVkMemoryRequirements,
- const VmaAllocationCreateInfo* pCreateInfo,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ const VkMemoryRequirements* pVkMemoryRequirements,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* pAllocationInfo);
/** \brief General purpose memory allocation for multiple allocation objects at once.
@@ -2931,12 +2852,12 @@ If any allocation fails, all allocations already made within this function call
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 allocator,
- const VkMemoryRequirements* pVkMemoryRequirements,
- const VmaAllocationCreateInfo* pCreateInfo,
- size_t allocationCount,
- VmaAllocation* pAllocations,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ const VkMemoryRequirements* pVkMemoryRequirements,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ size_t allocationCount,
+ VmaAllocation* pAllocations,
+ VmaAllocationInfo* pAllocationInfo);
/**
@param[out] pAllocation Handle to allocated memory.
@@ -2945,27 +2866,27 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryPages(
You should free the memory using vmaFreeMemory().
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForBuffer(
- VmaAllocator allocator,
- VkBuffer buffer,
- const VmaAllocationCreateInfo* pCreateInfo,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ VkBuffer buffer,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* pAllocationInfo);
/// Function similar to vmaAllocateMemoryForBuffer().
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForImage(
- VmaAllocator allocator,
- VkImage image,
- const VmaAllocationCreateInfo* pCreateInfo,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ VkImage image,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* 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 allocator,
- VmaAllocation allocation);
+ VmaAllocator allocator,
+ VmaAllocation allocation);
/** \brief Frees memory and destroys multiple allocations.
@@ -2978,21 +2899,20 @@ 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 allocator,
- size_t allocationCount,
- VmaAllocation* pAllocations);
+ VmaAllocator allocator,
+ size_t allocationCount,
+ VmaAllocation* pAllocations);
/** \brief Deprecated.
-\deprecated
In version 2.2.0 it used to try to change allocation's size without moving or reallocating it.
In current version it returns `VK_SUCCESS` only if `newSize` equals current allocation's size.
Otherwise returns `VK_ERROR_OUT_OF_POOL_MEMORY`, indicating that allocation's size could not be changed.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaResizeAllocation(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkDeviceSize newSize);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize newSize);
/** \brief Returns current information about specified allocation and atomically marks it as used in current frame.
@@ -3011,9 +2931,9 @@ you can avoid calling it too often.
- If you just want to check if allocation is not lost, vmaTouchAllocation() will work faster.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VmaAllocationInfo* pAllocationInfo);
/** \brief Returns `VK_TRUE` if allocation is not lost and atomically marks it as used in current frame.
@@ -3030,8 +2950,8 @@ If the allocation has been created without #VMA_ALLOCATION_CREATE_CAN_BECOME_LOS
this function always returns `VK_TRUE`.
*/
VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaTouchAllocation(
- VmaAllocator allocator,
- VmaAllocation allocation);
+ VmaAllocator allocator,
+ VmaAllocation allocation);
/** \brief Sets pUserData in given allocation to new value.
@@ -3047,9 +2967,9 @@ 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 allocator,
- VmaAllocation allocation,
- void* pUserData);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ void* pUserData);
/** \brief Creates new allocation that is in lost state from the beginning.
@@ -3062,8 +2982,8 @@ not bound to any image or buffer. It has size = 0. It cannot be turned into
a real, non-empty allocation.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaCreateLostAllocation(
- VmaAllocator allocator,
- VmaAllocation* pAllocation);
+ VmaAllocator allocator,
+ VmaAllocation* pAllocation);
/** \brief Maps memory represented by given allocation and returns pointer to it.
@@ -3104,9 +3024,9 @@ 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 allocator,
- VmaAllocation allocation,
- void** ppData);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ void** ppData);
/** \brief Unmaps memory represented by given allocation, mapped previously using vmaMapMemory().
@@ -3117,8 +3037,8 @@ 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 allocator,
- VmaAllocation allocation);
+ VmaAllocator allocator,
+ VmaAllocation allocation);
/** \brief Flushes memory of given allocation.
@@ -3188,8 +3108,7 @@ VK_DEFINE_HANDLE(VmaDefragmentationContext)
/// Flags to be used in vmaDefragmentationBegin(). None at the moment. Reserved for future use.
typedef enum VmaDefragmentationFlagBits {
- VMA_DEFRAGMENTATION_FLAG_INCREMENTAL = 0x1,
- VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+ VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VmaDefragmentationFlagBits;
typedef VkFlags VmaDefragmentationFlags;
@@ -3198,119 +3117,104 @@ typedef VkFlags VmaDefragmentationFlags;
To be used with function vmaDefragmentationBegin().
*/
typedef struct VmaDefragmentationInfo2 {
- /** \brief Reserved for future use. Should be 0.
- */
- VmaDefragmentationFlags flags;
- /** \brief Number of allocations in `pAllocations` array.
- */
- uint32_t allocationCount;
- /** \brief Pointer to array of allocations that can be defragmented.
-
- The array should have `allocationCount` elements.
- The array should not contain nulls.
- Elements in the array should be unique - same allocation cannot occur twice.
- It is safe to pass allocations that are in the lost state - they are ignored.
- All allocations not present in this array are considered non-moveable during this defragmentation.
- */
- VmaAllocation* pAllocations;
- /** \brief Optional, output. Pointer to array that will be filled with information whether the allocation at certain index has been changed during defragmentation.
-
- The array should have `allocationCount` elements.
- You can pass null if you are not interested in this information.
- */
- VkBool32* pAllocationsChanged;
- /** \brief Numer of pools in `pPools` array.
- */
- uint32_t poolCount;
- /** \brief Either null or pointer to array of pools to be defragmented.
-
- All the allocations in the specified pools can be moved during defragmentation
- and there is no way to check if they were really moved as in `pAllocationsChanged`,
- so you must query all the allocations in all these pools for new `VkDeviceMemory`
- and offset using vmaGetAllocationInfo() if you might need to recreate buffers
- and images bound to them.
-
- The array should have `poolCount` elements.
- The array should not contain nulls.
- Elements in the array should be unique - same pool cannot occur twice.
-
- Using this array is equivalent to specifying all allocations from the pools in `pAllocations`.
- It might be more efficient.
- */
- VmaPool* pPools;
- /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, like `memcpy()`, `memmove()`.
-
- `VK_WHOLE_SIZE` means no limit.
- */
- VkDeviceSize maxCpuBytesToMove;
- /** \brief Maximum number of allocations that can be moved to a different place using transfers on CPU side, like `memcpy()`, `memmove()`.
-
- `UINT32_MAX` means no limit.
- */
- uint32_t maxCpuAllocationsToMove;
- /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted to `commandBuffer`.
-
- `VK_WHOLE_SIZE` means no limit.
- */
- VkDeviceSize maxGpuBytesToMove;
- /** \brief Maximum number of allocations that can be moved to a different place using transfers on GPU side, posted to `commandBuffer`.
-
- `UINT32_MAX` means no limit.
- */
- uint32_t maxGpuAllocationsToMove;
- /** \brief Optional. Command buffer where GPU copy commands will be posted.
-
- If not null, it must be a valid command buffer handle that supports Transfer queue type.
- It must be in the recording state and outside of a render pass instance.
- You need to submit it and make sure it finished execution before calling vmaDefragmentationEnd().
-
- Passing null means that only CPU defragmentation will be performed.
- */
- VkCommandBuffer commandBuffer;
+ /** \brief Reserved for future use. Should be 0.
+ */
+ VmaDefragmentationFlags flags;
+ /** \brief Number of allocations in `pAllocations` array.
+ */
+ uint32_t allocationCount;
+ /** \brief Pointer to array of allocations that can be defragmented.
+
+ The array should have `allocationCount` elements.
+ The array should not contain nulls.
+ Elements in the array should be unique - same allocation cannot occur twice.
+ It is safe to pass allocations that are in the lost state - they are ignored.
+ All allocations not present in this array are considered non-moveable during this defragmentation.
+ */
+ VmaAllocation* pAllocations;
+ /** \brief Optional, output. Pointer to array that will be filled with information whether the allocation at certain index has been changed during defragmentation.
+
+ The array should have `allocationCount` elements.
+ You can pass null if you are not interested in this information.
+ */
+ VkBool32* pAllocationsChanged;
+ /** \brief Numer of pools in `pPools` array.
+ */
+ uint32_t poolCount;
+ /** \brief Either null or pointer to array of pools to be defragmented.
+
+ All the allocations in the specified pools can be moved during defragmentation
+ and there is no way to check if they were really moved as in `pAllocationsChanged`,
+ so you must query all the allocations in all these pools for new `VkDeviceMemory`
+ and offset using vmaGetAllocationInfo() if you might need to recreate buffers
+ and images bound to them.
+
+ The array should have `poolCount` elements.
+ The array should not contain nulls.
+ Elements in the array should be unique - same pool cannot occur twice.
+
+ Using this array is equivalent to specifying all allocations from the pools in `pAllocations`.
+ It might be more efficient.
+ */
+ VmaPool* pPools;
+ /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, like `memcpy()`, `memmove()`.
+
+ `VK_WHOLE_SIZE` means no limit.
+ */
+ VkDeviceSize maxCpuBytesToMove;
+ /** \brief Maximum number of allocations that can be moved to a different place using transfers on CPU side, like `memcpy()`, `memmove()`.
+
+ `UINT32_MAX` means no limit.
+ */
+ uint32_t maxCpuAllocationsToMove;
+ /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted to `commandBuffer`.
+
+ `VK_WHOLE_SIZE` means no limit.
+ */
+ VkDeviceSize maxGpuBytesToMove;
+ /** \brief Maximum number of allocations that can be moved to a different place using transfers on GPU side, posted to `commandBuffer`.
+
+ `UINT32_MAX` means no limit.
+ */
+ uint32_t maxGpuAllocationsToMove;
+ /** \brief Optional. Command buffer where GPU copy commands will be posted.
+
+ If not null, it must be a valid command buffer handle that supports Transfer queue type.
+ It must be in the recording state and outside of a render pass instance.
+ You need to submit it and make sure it finished execution before calling vmaDefragmentationEnd().
+
+ Passing null means that only CPU defragmentation will be performed.
+ */
+ VkCommandBuffer commandBuffer;
} VmaDefragmentationInfo2;
-typedef struct VmaDefragmentationPassMoveInfo {
- VmaAllocation allocation;
- VkDeviceMemory memory;
- VkDeviceSize offset;
-} VmaDefragmentationPassMoveInfo;
-
-/** \brief Parameters for incremental defragmentation steps.
-
-To be used with function vmaBeginDefragmentationPass().
-*/
-typedef struct VmaDefragmentationPassInfo {
- uint32_t moveCount;
- VmaDefragmentationPassMoveInfo* pMoves;
-} VmaDefragmentationPassInfo;
-
/** \brief Deprecated. Optional configuration parameters to be passed to function vmaDefragment().
\deprecated This is a part of the old interface. It is recommended to use structure #VmaDefragmentationInfo2 and function vmaDefragmentationBegin() instead.
*/
typedef struct VmaDefragmentationInfo {
- /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places.
-
- Default is `VK_WHOLE_SIZE`, which means no limit.
- */
- VkDeviceSize maxBytesToMove;
- /** \brief Maximum number of allocations that can be moved to different place.
-
- Default is `UINT32_MAX`, which means no limit.
- */
- uint32_t maxAllocationsToMove;
+ /** \brief Maximum total numbers of bytes that can be copied while moving allocations to different places.
+
+ Default is `VK_WHOLE_SIZE`, which means no limit.
+ */
+ VkDeviceSize maxBytesToMove;
+ /** \brief Maximum number of allocations that can be moved to different place.
+
+ Default is `UINT32_MAX`, which means no limit.
+ */
+ uint32_t maxAllocationsToMove;
} VmaDefragmentationInfo;
/** \brief Statistics returned by function vmaDefragment(). */
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;
+ /// 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;
/** \brief Begins defragmentation process.
@@ -3343,10 +3247,10 @@ For more information and important limitations regarding defragmentation, see do
[Defragmentation](@ref defragmentation).
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationBegin(
- VmaAllocator allocator,
- const VmaDefragmentationInfo2* pInfo,
- VmaDefragmentationStats* pStats,
- VmaDefragmentationContext *pContext);
+ VmaAllocator allocator,
+ const VmaDefragmentationInfo2* pInfo,
+ VmaDefragmentationStats* pStats,
+ VmaDefragmentationContext *pContext);
/** \brief Ends defragmentation process.
@@ -3354,18 +3258,8 @@ Use this function to finish defragmentation started by vmaDefragmentationBegin()
It is safe to pass `context == null`. The function then does nothing.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationEnd(
- VmaAllocator allocator,
- VmaDefragmentationContext context);
-
-VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentationPass(
- VmaAllocator allocator,
- VmaDefragmentationContext context,
- VmaDefragmentationPassInfo* pInfo
-);
-VMA_CALL_PRE VkResult VMA_CALL_POST vmaEndDefragmentationPass(
- VmaAllocator allocator,
- VmaDefragmentationContext context
-);
+ VmaAllocator allocator,
+ VmaDefragmentationContext context);
/** \brief Deprecated. Compacts memory by moving allocations.
@@ -3408,12 +3302,12 @@ you should measure that on your platform.
For more information, see [Defragmentation](@ref defragmentation) chapter.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragment(
- VmaAllocator allocator,
- VmaAllocation* pAllocations,
- size_t allocationCount,
- VkBool32* pAllocationsChanged,
- const VmaDefragmentationInfo *pDefragmentationInfo,
- VmaDefragmentationStats* pDefragmentationStats);
+ VmaAllocator allocator,
+ VmaAllocation* pAllocations,
+ size_t allocationCount,
+ VkBool32* pAllocationsChanged,
+ const VmaDefragmentationInfo *pDefragmentationInfo,
+ VmaDefragmentationStats* pDefragmentationStats);
/** \brief Binds buffer to allocation.
@@ -3428,9 +3322,9 @@ allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from mul
It is recommended to use function vmaCreateBuffer() instead of this one.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkBuffer buffer);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkBuffer buffer);
/** \brief Binds buffer to allocation with additional parameters.
@@ -3443,11 +3337,11 @@ If `pNext` is not null, #VmaAllocator object must have been created with #VMA_AL
or with VmaAllocatorCreateInfo::vulkanApiVersion `== VK_API_VERSION_1_1`. Otherwise the call fails.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkDeviceSize allocationLocalOffset,
- VkBuffer buffer,
- const void* pNext);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize allocationLocalOffset,
+ VkBuffer buffer,
+ const void* pNext);
/** \brief Binds image to allocation.
@@ -3462,9 +3356,9 @@ allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from mul
It is recommended to use function vmaCreateImage() instead of this one.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkImage image);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkImage image);
/** \brief Binds image to allocation with additional parameters.
@@ -3477,11 +3371,11 @@ If `pNext` is not null, #VmaAllocator object must have been created with #VMA_AL
or with VmaAllocatorCreateInfo::vulkanApiVersion `== VK_API_VERSION_1_1`. Otherwise the call fails.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkDeviceSize allocationLocalOffset,
- VkImage image,
- const void* pNext);
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize allocationLocalOffset,
+ VkImage image,
+ const void* pNext);
/**
@param[out] pBuffer Buffer that was created.
@@ -3510,12 +3404,12 @@ allocation for this buffer, just like when using
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT.
*/
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
- VmaAllocator allocator,
- const VkBufferCreateInfo* pBufferCreateInfo,
- const VmaAllocationCreateInfo* pAllocationCreateInfo,
- VkBuffer* pBuffer,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ const VkBufferCreateInfo* pBufferCreateInfo,
+ const VmaAllocationCreateInfo* pAllocationCreateInfo,
+ VkBuffer* pBuffer,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* pAllocationInfo);
/** \brief Destroys Vulkan buffer and frees allocated memory.
@@ -3529,18 +3423,18 @@ vmaFreeMemory(allocator, allocation);
It it safe to pass null as buffer and/or allocation.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyBuffer(
- VmaAllocator allocator,
- VkBuffer buffer,
- VmaAllocation allocation);
+ VmaAllocator allocator,
+ VkBuffer buffer,
+ VmaAllocation allocation);
/// Function similar to vmaCreateBuffer().
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
- VmaAllocator allocator,
- const VkImageCreateInfo* pImageCreateInfo,
- const VmaAllocationCreateInfo* pAllocationCreateInfo,
- VkImage* pImage,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo);
+ VmaAllocator allocator,
+ const VkImageCreateInfo* pImageCreateInfo,
+ const VmaAllocationCreateInfo* pAllocationCreateInfo,
+ VkImage* pImage,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* pAllocationInfo);
/** \brief Destroys Vulkan image and frees allocated memory.
@@ -3554,9 +3448,9 @@ vmaFreeMemory(allocator, allocation);
It it safe to pass null as image and/or allocation.
*/
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage(
- VmaAllocator allocator,
- VkImage image,
- VmaAllocation allocation);
+ VmaAllocator allocator,
+ VkImage image,
+ VmaAllocation allocation);
#ifdef __cplusplus
}
@@ -3575,7 +3469,6 @@ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage(
#include <cstdint>
#include <cstdlib>
#include <cstring>
-#include <utility>
/*******************************************************************************
CONFIGURATION SECTION
@@ -3588,7 +3481,7 @@ here if you need other then default behavior depending on your environment.
Define this macro to 1 to make the library fetch pointers to Vulkan functions
internally, like:
- vulkanFunctions.vkAllocateMemory = &vkAllocateMemory;
+ vulkanFunctions.vkAllocateMemory = &vkAllocateMemory;
Define to 0 if you are going to provide you own pointers to Vulkan functions via
VmaAllocatorCreateInfo::pVulkanFunctions.
@@ -3613,17 +3506,17 @@ the containers.
#endif
#ifndef VMA_USE_STL_SHARED_MUTEX
- // Compiler conforms to C++17.
- #if __cplusplus >= 201703L
- #define VMA_USE_STL_SHARED_MUTEX 1
- // Visual studio defines __cplusplus properly only when passed additional parameter: /Zc:__cplusplus
- // Otherwise it's always 199711L, despite shared_mutex works since Visual Studio 2015 Update 2.
- // See: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
- #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
+ // Compiler conforms to C++17.
+ #if __cplusplus >= 201703L
+ #define VMA_USE_STL_SHARED_MUTEX 1
+ // Visual studio defines __cplusplus properly only when passed additional parameter: /Zc:__cplusplus
+ // Otherwise it's always 199711L, despite shared_mutex works since Visual Studio 2015 Update 2.
+ // See: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
+ #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
/*
@@ -3659,28 +3552,28 @@ remove them if not needed.
#include <cstdlib>
void *aligned_alloc(size_t alignment, size_t size)
{
- // alignment must be >= sizeof(void*)
- if(alignment < sizeof(void*))
- {
- alignment = sizeof(void*);
- }
+ // alignment must be >= sizeof(void*)
+ if(alignment < sizeof(void*))
+ {
+ alignment = sizeof(void*);
+ }
- return memalign(alignment, size);
+ return memalign(alignment, size);
}
#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC))
#include <cstdlib>
void *aligned_alloc(size_t alignment, size_t size)
{
- // alignment must be >= sizeof(void*)
- if(alignment < sizeof(void*))
- {
- alignment = sizeof(void*);
- }
+ // 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;
+ void *pointer;
+ if(posix_memalign(&pointer, alignment, size) == 0)
+ return pointer;
+ return VMA_NULL;
}
#endif
@@ -3691,20 +3584,20 @@ void *aligned_alloc(size_t alignment, size_t size)
// Normal assert to check for programmer's errors, especially in Debug configuration.
#ifndef VMA_ASSERT
- #ifdef NDEBUG
- #define VMA_ASSERT(expr)
+ #ifdef _DEBUG
+ #define VMA_ASSERT(expr) assert(expr)
#else
- #define VMA_ASSERT(expr) assert(expr)
+ #define VMA_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)
+ #ifdef _DEBUG
+ #define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
#else
- #define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
+ #define VMA_HEAVY_ASSERT(expr)
#endif
#endif
@@ -3714,17 +3607,17 @@ void *aligned_alloc(size_t alignment, size_t size)
#ifndef VMA_SYSTEM_ALIGNED_MALLOC
#if defined(_WIN32)
- #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (_aligned_malloc((size), (alignment)))
+ #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (_aligned_malloc((size), (alignment)))
#else
- #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (aligned_alloc((alignment), (size) ))
+ #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (aligned_alloc((alignment), (size) ))
#endif
#endif
#ifndef VMA_SYSTEM_FREE
#if defined(_WIN32)
- #define VMA_SYSTEM_FREE(ptr) _aligned_free(ptr)
+ #define VMA_SYSTEM_FREE(ptr) _aligned_free(ptr)
#else
- #define VMA_SYSTEM_FREE(ptr) free(ptr)
+ #define VMA_SYSTEM_FREE(ptr) free(ptr)
#endif
#endif
@@ -3748,162 +3641,155 @@ void *aligned_alloc(size_t alignment, size_t size)
#define VMA_DEBUG_LOG(format, ...)
/*
#define VMA_DEBUG_LOG(format, ...) do { \
- printf(format, __VA_ARGS__); \
- printf("\n"); \
+ printf(format, __VA_ARGS__); \
+ printf("\n"); \
} while(false)
*/
#endif
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
- static inline void VmaUint32ToStr(char* outStr, size_t strLen, uint32_t num)
- {
- snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
- }
- static inline void VmaUint64ToStr(char* outStr, size_t strLen, uint64_t num)
- {
- snprintf(outStr, strLen, "%llu", static_cast<unsigned long long>(num));
- }
- static inline void VmaPtrToStr(char* outStr, size_t strLen, const void* ptr)
- {
- snprintf(outStr, strLen, "%p", ptr);
- }
+ static inline void VmaUint32ToStr(char* outStr, size_t strLen, uint32_t num)
+ {
+ snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
+ }
+ static inline void VmaUint64ToStr(char* outStr, size_t strLen, uint64_t num)
+ {
+ snprintf(outStr, strLen, "%llu", static_cast<unsigned long long>(num));
+ }
+ static inline void VmaPtrToStr(char* outStr, size_t strLen, const void* ptr)
+ {
+ snprintf(outStr, strLen, "%p", ptr);
+ }
#endif
#ifndef VMA_MUTEX
- class VmaMutex
- {
- public:
- 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
+ class VmaMutex
+ {
+ public:
+ void Lock() { m_Mutex.lock(); }
+ void Unlock() { m_Mutex.unlock(); }
+ 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 <shared_mutex>
- 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) && 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
+ #if VMA_USE_STL_SHARED_MUTEX
+ // Use std::shared_mutex from C++17.
+ #include <shared_mutex>
+ class VmaRWMutex
+ {
+ public:
+ void LockRead() { m_Mutex.lock_shared(); }
+ void UnlockRead() { m_Mutex.unlock_shared(); }
+ void LockWrite() { m_Mutex.lock(); }
+ void UnlockWrite() { m_Mutex.unlock(); }
+ private:
+ std::shared_mutex m_Mutex;
+ };
+ #define VMA_RW_MUTEX VmaRWMutex
+ #elif defined(_WIN32) && defined(WINVER) && 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); }
+ void LockWrite() { AcquireSRWLockExclusive(&m_Lock); }
+ void UnlockWrite() { ReleaseSRWLockExclusive(&m_Lock); }
+ 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(); }
+ void LockWrite() { m_Mutex.Lock(); }
+ void UnlockWrite() { m_Mutex.Unlock(); }
+ 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 <atomic>
- #define VMA_ATOMIC_UINT32 std::atomic<uint32_t>
+ #include <atomic>
+ #define VMA_ATOMIC_UINT32 std::atomic<uint32_t>
#endif
#ifndef VMA_ATOMIC_UINT64
- #include <atomic>
- #define VMA_ATOMIC_UINT64 std::atomic<uint64_t>
+ #include <atomic>
+ #define VMA_ATOMIC_UINT64 std::atomic<uint64_t>
#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)
+ /**
+ 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_DEBUG_ALIGNMENT
- /**
- Minimum alignment of all allocations, in bytes.
- Set to more than 1 for debugging purposes only. Must be power of two.
- */
- #define VMA_DEBUG_ALIGNMENT (1)
+ /**
+ Minimum alignment of all allocations, in bytes.
+ Set to more than 1 for debugging purposes only. Must be power of two.
+ */
+ #define VMA_DEBUG_ALIGNMENT (1)
#endif
#ifndef VMA_DEBUG_MARGIN
- /**
- Minimum margin before and after every allocation, in bytes.
- Set nonzero for debugging purposes only.
- */
- #define VMA_DEBUG_MARGIN (0)
+ /**
+ Minimum margin before and 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)
+ /**
+ 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 before and after every allocation and
- validating it, so that memory corruptions (out-of-bounds writes) are detected.
- */
- #define VMA_DEBUG_DETECT_CORRUPTION (0)
+ /**
+ Define this macro to 1 together with non-zero value of VMA_DEBUG_MARGIN to
+ enable writing magic value to the margin before and 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)
+ /**
+ 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)
+ /**
+ 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_SMALL_HEAP_MAX_SIZE
@@ -3917,10 +3803,10 @@ If providing your own implementation, you need to implement a subset of std::ato
#endif
#ifndef VMA_CLASS_NO_COPY
- #define VMA_CLASS_NO_COPY(className) \
- private: \
- className(const className&) = delete; \
- className& operator=(const className&) = delete;
+ #define VMA_CLASS_NO_COPY(className) \
+ private: \
+ className(const className&) = delete; \
+ className& operator=(const className&) = delete;
#endif
static const uint32_t VMA_FRAME_INDEX_LOST = UINT32_MAX;
@@ -3935,16 +3821,10 @@ static const uint8_t VMA_ALLOCATION_FILL_PATTERN_DESTROYED = 0xEF;
END OF CONFIGURATION
*/
-// # 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 VMA_ALLOCATION_INTERNAL_STRATEGY_MIN_OFFSET = 0x10000000u;
static VkAllocationCallbacks VmaEmptyAllocationCallbacks = {
- VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL };
+ VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL };
// Returns number of bits set to 1 in (v).
static inline uint32_t VmaCountBitsSet(uint32_t v)
@@ -3969,7 +3849,7 @@ static inline T VmaAlignUp(T val, T align)
template <typename T>
static inline T VmaAlignDown(T val, T align)
{
- return val / align * align;
+ return val / align * align;
}
// Division with mathematical rounding to nearest number.
@@ -3987,78 +3867,78 @@ For 0 returns true.
template <typename T>
inline bool VmaIsPow2(T x)
{
- return (x & (x-1)) == 0;
+ return (x & (x-1)) == 0;
}
// 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;
+ 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;
+ 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;
+ 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;
+ 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';
+ return pStr == VMA_NULL || *pStr == '\0';
}
#if VMA_STATS_STRING_ENABLED
static const char* VmaAlgorithmToStr(uint32_t algorithm)
{
- switch(algorithm)
- {
- case VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT:
- return "Linear";
- case VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT:
- return "Buddy";
- case 0:
- return "Default";
- default:
- VMA_ASSERT(0);
- return "";
- }
+ switch(algorithm)
+ {
+ case VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT:
+ return "Linear";
+ case VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT:
+ return "Buddy";
+ case 0:
+ return "Default";
+ default:
+ VMA_ASSERT(0);
+ return "";
+ }
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -4068,35 +3948,35 @@ static const char* VmaAlgorithmToStr(uint32_t algorithm)
template<typename Iterator, typename Compare>
Iterator VmaQuickSortPartition(Iterator beg, Iterator end, Compare cmp)
{
- Iterator centerValue = end; --centerValue;
- Iterator insertIndex = beg;
- for(Iterator memTypeIndex = beg; memTypeIndex < centerValue; ++memTypeIndex)
- {
- if(cmp(*memTypeIndex, *centerValue))
- {
- if(insertIndex != memTypeIndex)
- {
- VMA_SWAP(*memTypeIndex, *insertIndex);
- }
- ++insertIndex;
- }
- }
- if(insertIndex != centerValue)
- {
- VMA_SWAP(*insertIndex, *centerValue);
- }
- return insertIndex;
+ Iterator centerValue = end; --centerValue;
+ Iterator insertIndex = beg;
+ for(Iterator memTypeIndex = beg; memTypeIndex < centerValue; ++memTypeIndex)
+ {
+ if(cmp(*memTypeIndex, *centerValue))
+ {
+ if(insertIndex != memTypeIndex)
+ {
+ VMA_SWAP(*memTypeIndex, *insertIndex);
+ }
+ ++insertIndex;
+ }
+ }
+ if(insertIndex != centerValue)
+ {
+ VMA_SWAP(*insertIndex, *centerValue);
+ }
+ return insertIndex;
}
template<typename Iterator, typename Compare>
void VmaQuickSort(Iterator beg, Iterator end, Compare cmp)
{
- if(beg < end)
- {
- Iterator it = VmaQuickSortPartition<Iterator, Compare>(beg, end, cmp);
- VmaQuickSort<Iterator, Compare>(beg, it, cmp);
- VmaQuickSort<Iterator, Compare>(it + 1, end, cmp);
- }
+ if(beg < end)
+ {
+ Iterator it = VmaQuickSortPartition<Iterator, Compare>(beg, end, cmp);
+ VmaQuickSort<Iterator, Compare>(beg, it, cmp);
+ VmaQuickSort<Iterator, Compare>(it + 1, end, cmp);
+ }
}
#define VMA_SORT(beg, end, cmp) VmaQuickSort(beg, end, cmp)
@@ -4111,28 +3991,28 @@ Algorithm is based on "Vulkan 1.0.39 - A Specification (with all registered Vulk
chapter 11.6 "Resource Memory Association", paragraph "Buffer-Image Granularity".
*/
static inline bool VmaBlocksOnSamePage(
- VkDeviceSize resourceAOffset,
- VkDeviceSize resourceASize,
- VkDeviceSize resourceBOffset,
- VkDeviceSize pageSize)
+ 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;
+ 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;
}
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
+ 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
};
/*
@@ -4142,68 +4022,68 @@ 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)
- {
- VMA_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;
- }
+ VmaSuballocationType suballocType1,
+ VmaSuballocationType suballocType2)
+{
+ if(suballocType1 > suballocType2)
+ {
+ VMA_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;
- }
+ 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
+ // 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;
- }
- }
+ 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;
+ return true;
}
/*
@@ -4212,57 +4092,57 @@ 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.
+ 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.
}
// 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(VmaMutexLock)
+ VMA_CLASS_NO_COPY(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(); } }
+ 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;
+ 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(VmaMutexLockRead)
+ VMA_CLASS_NO_COPY(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(); } }
+ 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;
+ 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(VmaMutexLockWrite)
+ VMA_CLASS_NO_COPY(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(); } }
+ 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;
+ VMA_RW_MUTEX* m_pMutex;
};
#if VMA_DEBUG_GLOBAL_MUTEX
- static VMA_MUTEX gDebugGlobalMutex;
- #define VMA_DEBUG_GLOBAL_MUTEX_LOCK VmaMutexLock debugGlobalMutexLock(gDebugGlobalMutex, true);
+ static VMA_MUTEX gDebugGlobalMutex;
+ #define VMA_DEBUG_GLOBAL_MUTEX_LOCK VmaMutexLock debugGlobalMutexLock(gDebugGlobalMutex, true);
#else
- #define VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ #define VMA_DEBUG_GLOBAL_MUTEX_LOCK
#endif
// Minimum size of a free suballocation to register it in the free suballocation collection.
@@ -4280,33 +4160,33 @@ new element with value (key) should be inserted.
template <typename CmpLess, typename IterT, typename KeyT>
static IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, const KeyT &key, const CmpLess& cmp)
{
- size_t down = 0, up = (end - beg);
- while(down < up)
- {
- const size_t mid = (down + up) / 2;
- if(cmp(*(beg+mid), key))
- {
- down = mid + 1;
- }
- else
- {
- up = mid;
- }
- }
- return beg + down;
+ size_t down = 0, up = (end - beg);
+ while(down < up)
+ {
+ const size_t mid = (down + up) / 2;
+ if(cmp(*(beg+mid), key))
+ {
+ down = mid + 1;
+ }
+ else
+ {
+ up = mid;
+ }
+ }
+ return beg + down;
}
template<typename CmpLess, typename IterT, typename KeyT>
IterT VmaBinaryFindSorted(const IterT& beg, const IterT& end, const KeyT& value, const CmpLess& cmp)
{
- IterT it = VmaBinaryFindFirstNotLess<CmpLess, IterT, KeyT>(
- beg, end, value, cmp);
- if(it == end ||
- (!cmp(*it, value) && !cmp(value, *it)))
- {
- return it;
- }
- return end;
+ IterT it = VmaBinaryFindFirstNotLess<CmpLess, IterT, KeyT>(
+ beg, end, value, cmp);
+ if(it == end ||
+ (!cmp(*it, value) && !cmp(value, *it)))
+ {
+ return it;
+ }
+ return end;
}
/*
@@ -4317,22 +4197,22 @@ T must be pointer type, e.g. VmaAllocation, VmaPool.
template<typename T>
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;
+ 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;
}
////////////////////////////////////////////////////////////////////////////////
@@ -4340,44 +4220,44 @@ static bool VmaValidatePointerArray(uint32_t count, const T* arr)
static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment)
{
- if((pAllocationCallbacks != VMA_NULL) &&
- (pAllocationCallbacks->pfnAllocation != VMA_NULL))
- {
- return (*pAllocationCallbacks->pfnAllocation)(
- pAllocationCallbacks->pUserData,
- size,
- alignment,
- VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
- }
- else
- {
- return VMA_SYSTEM_ALIGNED_MALLOC(size, alignment);
- }
+ if((pAllocationCallbacks != VMA_NULL) &&
+ (pAllocationCallbacks->pfnAllocation != VMA_NULL))
+ {
+ return (*pAllocationCallbacks->pfnAllocation)(
+ pAllocationCallbacks->pUserData,
+ size,
+ alignment,
+ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+ }
+ else
+ {
+ return VMA_SYSTEM_ALIGNED_MALLOC(size, alignment);
+ }
}
static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr)
{
- if((pAllocationCallbacks != VMA_NULL) &&
- (pAllocationCallbacks->pfnFree != VMA_NULL))
- {
- (*pAllocationCallbacks->pfnFree)(pAllocationCallbacks->pUserData, ptr);
- }
- else
- {
- VMA_SYSTEM_FREE(ptr);
- }
+ if((pAllocationCallbacks != VMA_NULL) &&
+ (pAllocationCallbacks->pfnFree != VMA_NULL))
+ {
+ (*pAllocationCallbacks->pfnFree)(pAllocationCallbacks->pUserData, ptr);
+ }
+ else
+ {
+ VMA_SYSTEM_FREE(ptr);
+ }
}
template<typename T>
static T* VmaAllocate(const VkAllocationCallbacks* pAllocationCallbacks)
{
- return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T), VMA_ALIGN_OF(T));
+ return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T), VMA_ALIGN_OF(T));
}
template<typename T>
static T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, size_t count)
{
- return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T) * count, VMA_ALIGN_OF(T));
+ return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T) * count, VMA_ALIGN_OF(T));
}
#define vma_new(allocator, type) new(VmaAllocate<type>(allocator))(type)
@@ -4387,45 +4267,45 @@ static T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, si
template<typename T>
static void vma_delete(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr)
{
- ptr->~T();
- VmaFree(pAllocationCallbacks, ptr);
+ ptr->~T();
+ VmaFree(pAllocationCallbacks, ptr);
}
template<typename T>
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);
- }
+ 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;
- }
- else
- {
- return VMA_NULL;
- }
+ 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;
+ }
+ else
+ {
+ return VMA_NULL;
+ }
}
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);
- }
+ if(str != VMA_NULL)
+ {
+ const size_t len = strlen(str);
+ vma_delete_array(allocs, str, len + 1);
+ }
}
// STL-compatible allocator.
@@ -4433,27 +4313,27 @@ template<typename T>
class VmaStlAllocator
{
public:
- const VkAllocationCallbacks* const m_pCallbacks;
- typedef T value_type;
-
- VmaStlAllocator(const VkAllocationCallbacks* pCallbacks) : m_pCallbacks(pCallbacks) { }
- template<typename U> VmaStlAllocator(const VmaStlAllocator<U>& src) : m_pCallbacks(src.m_pCallbacks) { }
-
- T* allocate(size_t n) { return VmaAllocateArray<T>(m_pCallbacks, n); }
- void deallocate(T* p, size_t n) { VmaFree(m_pCallbacks, p); }
-
- template<typename U>
- bool operator==(const VmaStlAllocator<U>& rhs) const
- {
- return m_pCallbacks == rhs.m_pCallbacks;
- }
- template<typename U>
- bool operator!=(const VmaStlAllocator<U>& rhs) const
- {
- return m_pCallbacks != rhs.m_pCallbacks;
- }
-
- VmaStlAllocator& operator=(const VmaStlAllocator& x) = delete;
+ const VkAllocationCallbacks* const m_pCallbacks;
+ typedef T value_type;
+
+ VmaStlAllocator(const VkAllocationCallbacks* pCallbacks) : m_pCallbacks(pCallbacks) { }
+ template<typename U> VmaStlAllocator(const VmaStlAllocator<U>& src) : m_pCallbacks(src.m_pCallbacks) { }
+
+ T* allocate(size_t n) { return VmaAllocateArray<T>(m_pCallbacks, n); }
+ void deallocate(T* p, size_t n) { VmaFree(m_pCallbacks, p); }
+
+ template<typename U>
+ bool operator==(const VmaStlAllocator<U>& rhs) const
+ {
+ return m_pCallbacks == rhs.m_pCallbacks;
+ }
+ template<typename U>
+ bool operator!=(const VmaStlAllocator<U>& rhs) const
+ {
+ return m_pCallbacks != rhs.m_pCallbacks;
+ }
+
+ VmaStlAllocator& operator=(const VmaStlAllocator& x) = delete;
};
#if VMA_USE_STL_VECTOR
@@ -4463,13 +4343,13 @@ public:
template<typename T, typename allocatorT>
static void VmaVectorInsert(std::vector<T, allocatorT>& vec, size_t index, const T& item)
{
- vec.insert(vec.begin() + index, item);
+ vec.insert(vec.begin() + index, item);
}
template<typename T, typename allocatorT>
static void VmaVectorRemove(std::vector<T, allocatorT>& vec, size_t index)
{
- vec.erase(vec.begin() + index);
+ vec.erase(vec.begin() + index);
}
#else // #if VMA_USE_STL_VECTOR
@@ -4481,220 +4361,220 @@ template<typename T, typename AllocatorT>
class VmaVector
{
public:
- typedef T value_type;
-
- VmaVector(const AllocatorT& allocator) :
- m_Allocator(allocator),
- m_pArray(VMA_NULL),
- m_Count(0),
- m_Capacity(0)
- {
- }
-
- VmaVector(size_t count, const AllocatorT& allocator) :
- m_Allocator(allocator),
- m_pArray(count ? (T*)VmaAllocateArray<T>(allocator.m_pCallbacks, count) : VMA_NULL),
- m_Count(count),
- m_Capacity(count)
- {
- }
-
- // 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<T, AllocatorT>& src) :
- m_Allocator(src.m_Allocator),
- m_pArray(src.m_Count ? (T*)VmaAllocateArray<T>(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));
- }
- }
-
- ~VmaVector()
- {
- VmaFree(m_Allocator.m_pCallbacks, m_pArray);
- }
-
- VmaVector& operator=(const VmaVector<T, AllocatorT>& rhs)
- {
- if(&rhs != this)
- {
- resize(rhs.m_Count);
- if(m_Count != 0)
- {
- memcpy(m_pArray, rhs.m_pArray, m_Count * sizeof(T));
- }
- }
- return *this;
- }
-
- bool empty() const { return m_Count == 0; }
- size_t size() const { return m_Count; }
- T* data() { return m_pArray; }
- const T* data() const { return m_pArray; }
-
- 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];
- }
-
- T& front()
- {
- VMA_HEAVY_ASSERT(m_Count > 0);
- return m_pArray[0];
- }
- const T& front() const
- {
- 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& back() const
- {
- VMA_HEAVY_ASSERT(m_Count > 0);
- return m_pArray[m_Count - 1];
- }
-
- void reserve(size_t newCapacity, bool freeMemory = false)
- {
- newCapacity = VMA_MAX(newCapacity, m_Count);
-
- if((newCapacity < m_Capacity) && !freeMemory)
- {
- newCapacity = m_Capacity;
- }
-
- if(newCapacity != m_Capacity)
- {
- T* const newArray = newCapacity ? VmaAllocateArray<T>(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;
- }
- }
-
- void resize(size_t newCount, bool freeMemory = false)
- {
- size_t newCapacity = m_Capacity;
- if(newCount > m_Capacity)
- {
- newCapacity = VMA_MAX(newCount, VMA_MAX(m_Capacity * 3 / 2, (size_t)8));
- }
- else if(freeMemory)
- {
- newCapacity = newCount;
- }
-
- if(newCapacity != m_Capacity)
- {
- T* const newArray = newCapacity ? VmaAllocateArray<T>(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;
- }
-
- void clear(bool freeMemory = false)
- {
- resize(0, freeMemory);
- }
-
- void 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;
- }
-
- void 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);
- }
-
- void push_back(const T& src)
- {
- const size_t newIndex = size();
- resize(newIndex + 1);
- m_pArray[newIndex] = src;
- }
-
- void pop_back()
- {
- VMA_HEAVY_ASSERT(m_Count > 0);
- resize(size() - 1);
- }
-
- void push_front(const T& src)
- {
- insert(0, src);
- }
-
- void pop_front()
- {
- VMA_HEAVY_ASSERT(m_Count > 0);
- remove(0);
- }
-
- typedef T* iterator;
-
- iterator begin() { return m_pArray; }
- iterator end() { return m_pArray + m_Count; }
+ typedef T value_type;
+
+ VmaVector(const AllocatorT& allocator) :
+ m_Allocator(allocator),
+ m_pArray(VMA_NULL),
+ m_Count(0),
+ m_Capacity(0)
+ {
+ }
+
+ VmaVector(size_t count, const AllocatorT& allocator) :
+ m_Allocator(allocator),
+ m_pArray(count ? (T*)VmaAllocateArray<T>(allocator.m_pCallbacks, count) : VMA_NULL),
+ m_Count(count),
+ m_Capacity(count)
+ {
+ }
+
+ // 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<T, AllocatorT>& src) :
+ m_Allocator(src.m_Allocator),
+ m_pArray(src.m_Count ? (T*)VmaAllocateArray<T>(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));
+ }
+ }
+
+ ~VmaVector()
+ {
+ VmaFree(m_Allocator.m_pCallbacks, m_pArray);
+ }
+
+ VmaVector& operator=(const VmaVector<T, AllocatorT>& rhs)
+ {
+ if(&rhs != this)
+ {
+ resize(rhs.m_Count);
+ if(m_Count != 0)
+ {
+ memcpy(m_pArray, rhs.m_pArray, m_Count * sizeof(T));
+ }
+ }
+ return *this;
+ }
+
+ bool empty() const { return m_Count == 0; }
+ size_t size() const { return m_Count; }
+ T* data() { return m_pArray; }
+ const T* data() const { return m_pArray; }
+
+ 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];
+ }
+
+ T& front()
+ {
+ VMA_HEAVY_ASSERT(m_Count > 0);
+ return m_pArray[0];
+ }
+ const T& front() const
+ {
+ 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& back() const
+ {
+ VMA_HEAVY_ASSERT(m_Count > 0);
+ return m_pArray[m_Count - 1];
+ }
+
+ void reserve(size_t newCapacity, bool freeMemory = false)
+ {
+ newCapacity = VMA_MAX(newCapacity, m_Count);
+
+ if((newCapacity < m_Capacity) && !freeMemory)
+ {
+ newCapacity = m_Capacity;
+ }
+
+ if(newCapacity != m_Capacity)
+ {
+ T* const newArray = newCapacity ? VmaAllocateArray<T>(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;
+ }
+ }
+
+ void resize(size_t newCount, bool freeMemory = false)
+ {
+ size_t newCapacity = m_Capacity;
+ if(newCount > m_Capacity)
+ {
+ newCapacity = VMA_MAX(newCount, VMA_MAX(m_Capacity * 3 / 2, (size_t)8));
+ }
+ else if(freeMemory)
+ {
+ newCapacity = newCount;
+ }
+
+ if(newCapacity != m_Capacity)
+ {
+ T* const newArray = newCapacity ? VmaAllocateArray<T>(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;
+ }
+
+ void clear(bool freeMemory = false)
+ {
+ resize(0, freeMemory);
+ }
+
+ void 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;
+ }
+
+ void 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);
+ }
+
+ void push_back(const T& src)
+ {
+ const size_t newIndex = size();
+ resize(newIndex + 1);
+ m_pArray[newIndex] = src;
+ }
+
+ void pop_back()
+ {
+ VMA_HEAVY_ASSERT(m_Count > 0);
+ resize(size() - 1);
+ }
+
+ void push_front(const T& src)
+ {
+ insert(0, src);
+ }
+
+ void pop_front()
+ {
+ VMA_HEAVY_ASSERT(m_Count > 0);
+ remove(0);
+ }
+
+ typedef T* iterator;
+
+ iterator begin() { return m_pArray; }
+ iterator end() { return m_pArray + m_Count; }
private:
- AllocatorT m_Allocator;
- T* m_pArray;
- size_t m_Count;
- size_t m_Capacity;
+ AllocatorT m_Allocator;
+ T* m_pArray;
+ size_t m_Count;
+ size_t m_Capacity;
};
template<typename T, typename allocatorT>
static void VmaVectorInsert(VmaVector<T, allocatorT>& vec, size_t index, const T& item)
{
- vec.insert(index, item);
+ vec.insert(index, item);
}
template<typename T, typename allocatorT>
static void VmaVectorRemove(VmaVector<T, allocatorT>& vec, size_t index)
{
- vec.remove(index);
+ vec.remove(index);
}
#endif // #if VMA_USE_STL_VECTOR
@@ -4702,31 +4582,31 @@ static void VmaVectorRemove(VmaVector<T, allocatorT>& vec, size_t index)
template<typename CmpLess, typename VectorT>
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;
+ const size_t indexToInsert = VmaBinaryFindFirstNotLess(
+ vector.data(),
+ vector.data() + vector.size(),
+ value,
+ CmpLess()) - vector.data();
+ VmaVectorInsert(vector, indexToInsert, value);
+ return indexToInsert;
}
template<typename CmpLess, typename VectorT>
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;
+ 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;
}
////////////////////////////////////////////////////////////////////////////////
@@ -4740,120 +4620,120 @@ allocator can create multiple blocks.
template<typename T>
class VmaPoolAllocator
{
- VMA_CLASS_NO_COPY(VmaPoolAllocator)
+ VMA_CLASS_NO_COPY(VmaPoolAllocator)
public:
- VmaPoolAllocator(const VkAllocationCallbacks* pAllocationCallbacks, uint32_t firstBlockCapacity);
- ~VmaPoolAllocator();
- template<typename... Types> T* Alloc(Types... args);
- void Free(T* ptr);
+ VmaPoolAllocator(const VkAllocationCallbacks* pAllocationCallbacks, uint32_t firstBlockCapacity);
+ ~VmaPoolAllocator();
+ T* Alloc();
+ 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< ItemBlock, VmaStlAllocator<ItemBlock> > m_ItemBlocks;
-
- ItemBlock& CreateNewBlock();
+ 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< ItemBlock, VmaStlAllocator<ItemBlock> > m_ItemBlocks;
+
+ ItemBlock& CreateNewBlock();
};
template<typename T>
VmaPoolAllocator<T>::VmaPoolAllocator(const VkAllocationCallbacks* pAllocationCallbacks, uint32_t firstBlockCapacity) :
- m_pAllocationCallbacks(pAllocationCallbacks),
- m_FirstBlockCapacity(firstBlockCapacity),
- m_ItemBlocks(VmaStlAllocator<ItemBlock>(pAllocationCallbacks))
+ m_pAllocationCallbacks(pAllocationCallbacks),
+ m_FirstBlockCapacity(firstBlockCapacity),
+ m_ItemBlocks(VmaStlAllocator<ItemBlock>(pAllocationCallbacks))
{
- VMA_ASSERT(m_FirstBlockCapacity > 1);
+ VMA_ASSERT(m_FirstBlockCapacity > 1);
}
template<typename T>
VmaPoolAllocator<T>::~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();
+ 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<typename T>
-template<typename... Types> T* VmaPoolAllocator<T>::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<Types>(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<Types>(args)...); // Explicit constructor call.
- return result;
+T* VmaPoolAllocator<T>::Alloc()
+{
+ 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(); // 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(); // Explicit constructor call.
+ return result;
}
template<typename T>
void VmaPoolAllocator<T>::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<uint32_t>(pItemPtr - block.pItems);
- pItemPtr->NextFreeIndex = block.FirstFreeIndex;
- block.FirstFreeIndex = index;
- return;
- }
- }
- VMA_ASSERT(0 && "Pointer doesn't belong to this memory pool.");
+ // 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<uint32_t>(pItemPtr - block.pItems);
+ pItemPtr->NextFreeIndex = block.FirstFreeIndex;
+ block.FirstFreeIndex = index;
+ return;
+ }
+ }
+ VMA_ASSERT(0 && "Pointer doesn't belong to this memory pool.");
}
template<typename T>
typename VmaPoolAllocator<T>::ItemBlock& VmaPoolAllocator<T>::CreateNewBlock()
{
- const uint32_t newBlockCapacity = m_ItemBlocks.empty() ?
- m_FirstBlockCapacity : m_ItemBlocks.back().Capacity * 3 / 2;
+ 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 };
+ const ItemBlock newBlock = {
+ vma_new_array(m_pAllocationCallbacks, Item, newBlockCapacity),
+ newBlockCapacity,
+ 0 };
- m_ItemBlocks.push_back(newBlock);
+ 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();
+ // 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();
}
////////////////////////////////////////////////////////////////////////////////
@@ -4868,462 +4748,462 @@ typename VmaPoolAllocator<T>::ItemBlock& VmaPoolAllocator<T>::CreateNewBlock()
template<typename T>
struct VmaListItem
{
- VmaListItem* pPrev;
- VmaListItem* pNext;
- T Value;
+ VmaListItem* pPrev;
+ VmaListItem* pNext;
+ T Value;
};
// Doubly linked list.
template<typename T>
class VmaRawList
{
- VMA_CLASS_NO_COPY(VmaRawList)
+ VMA_CLASS_NO_COPY(VmaRawList)
public:
- typedef VmaListItem<T> ItemType;
+ typedef VmaListItem<T> ItemType;
- VmaRawList(const VkAllocationCallbacks* pAllocationCallbacks);
- ~VmaRawList();
- void Clear();
+ VmaRawList(const VkAllocationCallbacks* pAllocationCallbacks);
+ ~VmaRawList();
+ void Clear();
- size_t GetCount() const { return m_Count; }
- bool IsEmpty() const { return m_Count == 0; }
+ size_t GetCount() const { return m_Count; }
+ bool IsEmpty() const { return m_Count == 0; }
- ItemType* Front() { return m_pFront; }
- const ItemType* Front() const { return m_pFront; }
- ItemType* Back() { return m_pBack; }
- const ItemType* Back() const { return m_pBack; }
+ ItemType* Front() { return m_pFront; }
+ const ItemType* Front() const { return m_pFront; }
+ ItemType* Back() { return m_pBack; }
+ const ItemType* Back() const { return m_pBack; }
- ItemType* PushBack();
- ItemType* PushFront();
- ItemType* PushBack(const T& value);
- ItemType* PushFront(const T& value);
- void PopBack();
- void PopFront();
-
- // Item can be null - it means PushBack.
- ItemType* InsertBefore(ItemType* pItem);
- // Item can be null - it means PushFront.
- ItemType* InsertAfter(ItemType* pItem);
+ ItemType* PushBack();
+ ItemType* PushFront();
+ ItemType* PushBack(const T& value);
+ ItemType* PushFront(const T& value);
+ void PopBack();
+ void PopFront();
+
+ // 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);
+ ItemType* InsertBefore(ItemType* pItem, const T& value);
+ ItemType* InsertAfter(ItemType* pItem, const T& value);
- void Remove(ItemType* pItem);
+ void Remove(ItemType* pItem);
private:
- const VkAllocationCallbacks* const m_pAllocationCallbacks;
- VmaPoolAllocator<ItemType> m_ItemAllocator;
- ItemType* m_pFront;
- ItemType* m_pBack;
- size_t m_Count;
+ const VkAllocationCallbacks* const m_pAllocationCallbacks;
+ VmaPoolAllocator<ItemType> m_ItemAllocator;
+ ItemType* m_pFront;
+ ItemType* m_pBack;
+ size_t m_Count;
};
template<typename T>
VmaRawList<T>::VmaRawList(const VkAllocationCallbacks* pAllocationCallbacks) :
- m_pAllocationCallbacks(pAllocationCallbacks),
- m_ItemAllocator(pAllocationCallbacks, 128),
- m_pFront(VMA_NULL),
- m_pBack(VMA_NULL),
- m_Count(0)
+ m_pAllocationCallbacks(pAllocationCallbacks),
+ m_ItemAllocator(pAllocationCallbacks, 128),
+ m_pFront(VMA_NULL),
+ m_pBack(VMA_NULL),
+ m_Count(0)
{
}
template<typename T>
VmaRawList<T>::~VmaRawList()
{
- // Intentionally not calling Clear, because that would be unnecessary
- // computations to return all items to m_ItemAllocator as free.
+ // Intentionally not calling Clear, because that would be unnecessary
+ // computations to return all items to m_ItemAllocator as free.
}
template<typename T>
void VmaRawList<T>::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;
- }
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::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;
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::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;
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::PushBack(const T& value)
{
- ItemType* const pNewItem = PushBack();
- pNewItem->Value = value;
- return pNewItem;
+ ItemType* const pNewItem = PushBack();
+ pNewItem->Value = value;
+ return pNewItem;
}
template<typename T>
VmaListItem<T>* VmaRawList<T>::PushFront(const T& value)
{
- ItemType* const pNewItem = PushFront();
- pNewItem->Value = value;
- return pNewItem;
+ ItemType* const pNewItem = PushFront();
+ pNewItem->Value = value;
+ return pNewItem;
}
template<typename T>
void VmaRawList<T>::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;
+ 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<typename T>
void VmaRawList<T>::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;
+ 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<typename T>
void VmaRawList<T>::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;
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::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();
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::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();
+ 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<typename T>
VmaListItem<T>* VmaRawList<T>::InsertBefore(ItemType* pItem, const T& value)
{
- ItemType* const newItem = InsertBefore(pItem);
- newItem->Value = value;
- return newItem;
+ ItemType* const newItem = InsertBefore(pItem);
+ newItem->Value = value;
+ return newItem;
}
template<typename T>
VmaListItem<T>* VmaRawList<T>::InsertAfter(ItemType* pItem, const T& value)
{
- ItemType* const newItem = InsertAfter(pItem);
- newItem->Value = value;
- return newItem;
+ ItemType* const newItem = InsertAfter(pItem);
+ newItem->Value = value;
+ return newItem;
}
template<typename T, typename AllocatorT>
class VmaList
{
- VMA_CLASS_NO_COPY(VmaList)
+ VMA_CLASS_NO_COPY(VmaList)
public:
- class iterator
- {
- public:
- iterator() :
- m_pList(VMA_NULL),
- m_pItem(VMA_NULL)
- {
- }
-
- 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;
- }
-
- iterator& operator++()
- {
- VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);
- m_pItem = m_pItem->pNext;
- return *this;
- }
- 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;
- }
-
- iterator operator++(int)
- {
- iterator result = *this;
- ++*this;
- return result;
- }
- iterator operator--(int)
- {
- iterator result = *this;
- --*this;
- return result;
- }
-
- 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;
- }
-
- private:
- VmaRawList<T>* m_pList;
- VmaListItem<T>* m_pItem;
-
- iterator(VmaRawList<T>* pList, VmaListItem<T>* pItem) :
- m_pList(pList),
- m_pItem(pItem)
- {
- }
-
- friend class VmaList<T, AllocatorT>;
- };
-
- class const_iterator
- {
- 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 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;
- }
-
- const_iterator& operator++()
- {
- VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);
- m_pItem = m_pItem->pNext;
- return *this;
- }
- 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;
- }
-
- const_iterator operator++(int)
- {
- const_iterator result = *this;
- ++*this;
- return result;
- }
- const_iterator operator--(int)
- {
- const_iterator result = *this;
- --*this;
- return result;
- }
-
- 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;
- }
-
- private:
- const_iterator(const VmaRawList<T>* pList, const VmaListItem<T>* pItem) :
- m_pList(pList),
- m_pItem(pItem)
- {
- }
-
- const VmaRawList<T>* m_pList;
- const VmaListItem<T>* m_pItem;
-
- friend class VmaList<T, AllocatorT>;
- };
-
- 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); }
-
- void clear() { m_RawList.Clear(); }
- void push_back(const T& value) { m_RawList.PushBack(value); }
- void erase(iterator it) { m_RawList.Remove(it.m_pItem); }
- iterator insert(iterator it, const T& value) { return iterator(&m_RawList, m_RawList.InsertBefore(it.m_pItem, value)); }
+ class iterator
+ {
+ public:
+ iterator() :
+ m_pList(VMA_NULL),
+ m_pItem(VMA_NULL)
+ {
+ }
+
+ 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;
+ }
+
+ iterator& operator++()
+ {
+ VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);
+ m_pItem = m_pItem->pNext;
+ return *this;
+ }
+ 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;
+ }
+
+ iterator operator++(int)
+ {
+ iterator result = *this;
+ ++*this;
+ return result;
+ }
+ iterator operator--(int)
+ {
+ iterator result = *this;
+ --*this;
+ return result;
+ }
+
+ 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;
+ }
+
+ private:
+ VmaRawList<T>* m_pList;
+ VmaListItem<T>* m_pItem;
+
+ iterator(VmaRawList<T>* pList, VmaListItem<T>* pItem) :
+ m_pList(pList),
+ m_pItem(pItem)
+ {
+ }
+
+ friend class VmaList<T, AllocatorT>;
+ };
+
+ class const_iterator
+ {
+ 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 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;
+ }
+
+ const_iterator& operator++()
+ {
+ VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);
+ m_pItem = m_pItem->pNext;
+ return *this;
+ }
+ 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;
+ }
+
+ const_iterator operator++(int)
+ {
+ const_iterator result = *this;
+ ++*this;
+ return result;
+ }
+ const_iterator operator--(int)
+ {
+ const_iterator result = *this;
+ --*this;
+ return result;
+ }
+
+ 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;
+ }
+
+ private:
+ const_iterator(const VmaRawList<T>* pList, const VmaListItem<T>* pItem) :
+ m_pList(pList),
+ m_pItem(pItem)
+ {
+ }
+
+ const VmaRawList<T>* m_pList;
+ const VmaListItem<T>* m_pItem;
+
+ friend class VmaList<T, AllocatorT>;
+ };
+
+ 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); }
+
+ void clear() { m_RawList.Clear(); }
+ void push_back(const T& value) { m_RawList.PushBack(value); }
+ void erase(iterator it) { m_RawList.Remove(it.m_pItem); }
+ iterator insert(iterator it, const T& value) { return iterator(&m_RawList, m_RawList.InsertBefore(it.m_pItem, value)); }
private:
- VmaRawList<T> m_RawList;
+ VmaRawList<T> m_RawList;
};
#endif // #if VMA_USE_STL_LIST
@@ -5339,18 +5219,18 @@ private:
#define VmaPair std::pair
#define VMA_MAP_TYPE(KeyT, ValueT) \
- std::unordered_map< KeyT, ValueT, std::hash<KeyT>, std::equal_to<KeyT>, VmaStlAllocator< std::pair<KeyT, ValueT> > >
+ std::unordered_map< KeyT, ValueT, std::hash<KeyT>, std::equal_to<KeyT>, VmaStlAllocator< std::pair<KeyT, ValueT> > >
#else // #if VMA_USE_STL_UNORDERED_MAP
template<typename T1, typename T2>
struct VmaPair
{
- T1 first;
- T2 second;
+ T1 first;
+ T2 second;
- VmaPair() : first(), second() { }
- VmaPair(const T1& firstSrc, const T2& secondSrc) : first(firstSrc), second(secondSrc) { }
+ VmaPair() : first(), second() { }
+ VmaPair(const T1& firstSrc, const T2& secondSrc) : first(firstSrc), second(secondSrc) { }
};
/* Class compatible with subset of interface of std::unordered_map.
@@ -5360,20 +5240,20 @@ template<typename KeyT, typename ValueT>
class VmaMap
{
public:
- typedef VmaPair<KeyT, ValueT> PairType;
- typedef PairType* iterator;
+ typedef VmaPair<KeyT, ValueT> PairType;
+ typedef PairType* iterator;
- VmaMap(const VmaStlAllocator<PairType>& allocator) : m_Vector(allocator) { }
+ VmaMap(const VmaStlAllocator<PairType>& allocator) : m_Vector(allocator) { }
- iterator begin() { return m_Vector.begin(); }
- iterator end() { return m_Vector.end(); }
+ iterator begin() { return m_Vector.begin(); }
+ iterator end() { return m_Vector.end(); }
- void insert(const PairType& pair);
- iterator find(const KeyT& key);
- void erase(iterator it);
-
+ void insert(const PairType& pair);
+ iterator find(const KeyT& key);
+ void erase(iterator it);
+
private:
- VmaVector< PairType, VmaStlAllocator<PairType> > m_Vector;
+ VmaVector< PairType, VmaStlAllocator<PairType> > m_Vector;
};
#define VMA_MAP_TYPE(KeyT, ValueT) VmaMap<KeyT, ValueT>
@@ -5381,49 +5261,49 @@ private:
template<typename FirstT, typename SecondT>
struct VmaPairFirstLess
{
- bool operator()(const VmaPair<FirstT, SecondT>& lhs, const VmaPair<FirstT, SecondT>& rhs) const
- {
- return lhs.first < rhs.first;
- }
- bool operator()(const VmaPair<FirstT, SecondT>& lhs, const FirstT& rhsFirst) const
- {
- return lhs.first < rhsFirst;
- }
+ bool operator()(const VmaPair<FirstT, SecondT>& lhs, const VmaPair<FirstT, SecondT>& rhs) const
+ {
+ return lhs.first < rhs.first;
+ }
+ bool operator()(const VmaPair<FirstT, SecondT>& lhs, const FirstT& rhsFirst) const
+ {
+ return lhs.first < rhsFirst;
+ }
};
template<typename KeyT, typename ValueT>
void VmaMap<KeyT, ValueT>::insert(const PairType& pair)
{
- const size_t indexToInsert = VmaBinaryFindFirstNotLess(
- m_Vector.data(),
- m_Vector.data() + m_Vector.size(),
- pair,
- VmaPairFirstLess<KeyT, ValueT>()) - m_Vector.data();
- VmaVectorInsert(m_Vector, indexToInsert, pair);
+ const size_t indexToInsert = VmaBinaryFindFirstNotLess(
+ m_Vector.data(),
+ m_Vector.data() + m_Vector.size(),
+ pair,
+ VmaPairFirstLess<KeyT, ValueT>()) - m_Vector.data();
+ VmaVectorInsert(m_Vector, indexToInsert, pair);
}
template<typename KeyT, typename ValueT>
VmaPair<KeyT, ValueT>* VmaMap<KeyT, ValueT>::find(const KeyT& key)
{
- PairType* it = VmaBinaryFindFirstNotLess(
- m_Vector.data(),
- m_Vector.data() + m_Vector.size(),
- key,
- VmaPairFirstLess<KeyT, ValueT>());
- if((it != m_Vector.end()) && (it->first == key))
- {
- return it;
- }
- else
- {
- return m_Vector.end();
- }
+ PairType* it = VmaBinaryFindFirstNotLess(
+ m_Vector.data(),
+ m_Vector.data() + m_Vector.size(),
+ key,
+ VmaPairFirstLess<KeyT, ValueT>());
+ if((it != m_Vector.end()) && (it->first == key))
+ {
+ return it;
+ }
+ else
+ {
+ return m_Vector.end();
+ }
}
template<typename KeyT, typename ValueT>
void VmaMap<KeyT, ValueT>::erase(iterator it)
{
- VmaVectorRemove(m_Vector, it - m_Vector.begin());
+ VmaVectorRemove(m_Vector, it - m_Vector.begin());
}
#endif // #if VMA_USE_STL_UNORDERED_MAP
@@ -5439,222 +5319,223 @@ enum VMA_CACHE_OPERATION { VMA_CACHE_FLUSH, VMA_CACHE_INVALIDATE };
struct VmaAllocation_T
{
private:
- static const uint8_t MAP_COUNT_FLAG_PERSISTENT_MAP = 0x80;
+ static const uint8_t MAP_COUNT_FLAG_PERSISTENT_MAP = 0x80;
- enum FLAGS
- {
- FLAG_USER_DATA_STRING = 0x01,
- };
+ enum FLAGS
+ {
+ FLAG_USER_DATA_STRING = 0x01,
+ };
public:
- enum ALLOCATION_TYPE
- {
- ALLOCATION_TYPE_NONE,
- ALLOCATION_TYPE_BLOCK,
- ALLOCATION_TYPE_DEDICATED,
- };
-
- /*
- This struct is allocated using VmaPoolAllocator.
- */
-
- VmaAllocation_T(uint32_t currentFrameIndex, bool userDataString) :
- m_Alignment{1},
- m_Size{0},
- m_pUserData{VMA_NULL},
- m_LastUseFrameIndex{currentFrameIndex},
- m_MemoryTypeIndex{0},
- m_Type{(uint8_t)ALLOCATION_TYPE_NONE},
- m_SuballocationType{(uint8_t)VMA_SUBALLOCATION_TYPE_UNKNOWN},
- m_MapCount{0},
- m_Flags{userDataString ? (uint8_t)FLAG_USER_DATA_STRING : (uint8_t)0}
- {
+ enum ALLOCATION_TYPE
+ {
+ ALLOCATION_TYPE_NONE,
+ ALLOCATION_TYPE_BLOCK,
+ ALLOCATION_TYPE_DEDICATED,
+ };
+
+ /*
+ This struct is allocated using VmaPoolAllocator.
+ */
+
+ void Ctor(uint32_t currentFrameIndex, bool userDataString)
+ {
+ m_Alignment = 1;
+ m_Size = 0;
+ m_MemoryTypeIndex = 0;
+ m_pUserData = VMA_NULL;
+ m_LastUseFrameIndex = currentFrameIndex;
+ m_Type = (uint8_t)ALLOCATION_TYPE_NONE;
+ m_SuballocationType = (uint8_t)VMA_SUBALLOCATION_TYPE_UNKNOWN;
+ m_MapCount = 0;
+ m_Flags = userDataString ? (uint8_t)FLAG_USER_DATA_STRING : 0;
+
#if VMA_STATS_STRING_ENABLED
- m_CreationFrameIndex = currentFrameIndex;
- m_BufferImageUsage = 0;
+ m_CreationFrameIndex = currentFrameIndex;
+ m_BufferImageUsage = 0;
#endif
- }
-
- ~VmaAllocation_T()
- {
- VMA_ASSERT((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) == 0 && "Allocation was not unmapped before destruction.");
-
- // Check if owned string was freed.
- VMA_ASSERT(m_pUserData == VMA_NULL);
- }
-
- void InitBlockAllocation(
- VmaDeviceMemoryBlock* block,
- VkDeviceSize offset,
- VkDeviceSize alignment,
- VkDeviceSize size,
- uint32_t memoryTypeIndex,
- VmaSuballocationType suballocationType,
- bool mapped,
- bool canBecomeLost)
- {
- 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;
- m_MapCount = mapped ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;
- m_SuballocationType = (uint8_t)suballocationType;
- m_BlockAllocation.m_Block = block;
- m_BlockAllocation.m_Offset = offset;
- m_BlockAllocation.m_CanBecomeLost = canBecomeLost;
- }
-
- void InitLost()
- {
- VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);
- VMA_ASSERT(m_LastUseFrameIndex.load() == VMA_FRAME_INDEX_LOST);
- m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK;
- m_MemoryTypeIndex = 0;
- m_BlockAllocation.m_Block = VMA_NULL;
- m_BlockAllocation.m_Offset = 0;
- m_BlockAllocation.m_CanBecomeLost = true;
- }
-
- void ChangeBlockAllocation(
- VmaAllocator hAllocator,
- VmaDeviceMemoryBlock* block,
- VkDeviceSize offset);
-
- void ChangeOffset(VkDeviceSize newOffset);
-
- // pMappedData not null means allocation is created with MAPPED flag.
- void InitDedicatedAllocation(
- 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_MapCount = (pMappedData != VMA_NULL) ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;
- m_DedicatedAllocation.m_hMemory = hMemory;
- m_DedicatedAllocation.m_pMappedData = pMappedData;
- }
-
- ALLOCATION_TYPE GetType() const { return (ALLOCATION_TYPE)m_Type; }
- VkDeviceSize GetAlignment() const { return m_Alignment; }
- VkDeviceSize GetSize() const { return m_Size; }
- bool IsUserDataString() const { return (m_Flags & FLAG_USER_DATA_STRING) != 0; }
- void* GetUserData() const { return m_pUserData; }
- void SetUserData(VmaAllocator hAllocator, void* pUserData);
- VmaSuballocationType GetSuballocationType() const { return (VmaSuballocationType)m_SuballocationType; }
-
- VmaDeviceMemoryBlock* GetBlock() const
- {
- VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
- return m_BlockAllocation.m_Block;
- }
- VkDeviceSize GetOffset() const;
- VkDeviceMemory GetMemory() const;
- uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; }
- bool IsPersistentMap() const { return (m_MapCount & MAP_COUNT_FLAG_PERSISTENT_MAP) != 0; }
- void* GetMappedData() const;
- bool CanBecomeLost() const;
-
- uint32_t GetLastUseFrameIndex() const
- {
- return m_LastUseFrameIndex.load();
- }
- bool CompareExchangeLastUseFrameIndex(uint32_t& expected, uint32_t desired)
- {
- return m_LastUseFrameIndex.compare_exchange_weak(expected, desired);
- }
- /*
- - If hAllocation.LastUseFrameIndex + frameInUseCount < allocator.CurrentFrameIndex,
- makes it lost by setting LastUseFrameIndex = VMA_FRAME_INDEX_LOST and returns true.
- - Else, returns false.
-
- If hAllocation is already lost, assert - you should not call it then.
- If hAllocation was not created with CAN_BECOME_LOST_BIT, assert.
- */
- bool MakeLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
-
- void DedicatedAllocCalcStatsInfo(VmaStatInfo& outInfo)
- {
- VMA_ASSERT(m_Type == ALLOCATION_TYPE_DEDICATED);
- outInfo.blockCount = 1;
- outInfo.allocationCount = 1;
- outInfo.unusedRangeCount = 0;
- outInfo.usedBytes = m_Size;
- outInfo.unusedBytes = 0;
- outInfo.allocationSizeMin = outInfo.allocationSizeMax = m_Size;
- outInfo.unusedRangeSizeMin = UINT64_MAX;
- outInfo.unusedRangeSizeMax = 0;
- }
-
- void BlockAllocMap();
- void BlockAllocUnmap();
- VkResult DedicatedAllocMap(VmaAllocator hAllocator, void** ppData);
- void DedicatedAllocUnmap(VmaAllocator hAllocator);
+ }
+
+ void Dtor()
+ {
+ VMA_ASSERT((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) == 0 && "Allocation was not unmapped before destruction.");
+
+ // Check if owned string was freed.
+ VMA_ASSERT(m_pUserData == VMA_NULL);
+ }
+
+ void InitBlockAllocation(
+ VmaDeviceMemoryBlock* block,
+ VkDeviceSize offset,
+ VkDeviceSize alignment,
+ VkDeviceSize size,
+ uint32_t memoryTypeIndex,
+ VmaSuballocationType suballocationType,
+ bool mapped,
+ bool canBecomeLost)
+ {
+ 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;
+ m_MapCount = mapped ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;
+ m_SuballocationType = (uint8_t)suballocationType;
+ m_BlockAllocation.m_Block = block;
+ m_BlockAllocation.m_Offset = offset;
+ m_BlockAllocation.m_CanBecomeLost = canBecomeLost;
+ }
+
+ void InitLost()
+ {
+ VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);
+ VMA_ASSERT(m_LastUseFrameIndex.load() == VMA_FRAME_INDEX_LOST);
+ m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK;
+ m_MemoryTypeIndex = 0;
+ m_BlockAllocation.m_Block = VMA_NULL;
+ m_BlockAllocation.m_Offset = 0;
+ m_BlockAllocation.m_CanBecomeLost = true;
+ }
+
+ void ChangeBlockAllocation(
+ VmaAllocator hAllocator,
+ VmaDeviceMemoryBlock* block,
+ VkDeviceSize offset);
+
+ void ChangeOffset(VkDeviceSize newOffset);
+
+ // pMappedData not null means allocation is created with MAPPED flag.
+ void InitDedicatedAllocation(
+ 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_MapCount = (pMappedData != VMA_NULL) ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;
+ m_DedicatedAllocation.m_hMemory = hMemory;
+ m_DedicatedAllocation.m_pMappedData = pMappedData;
+ }
+
+ ALLOCATION_TYPE GetType() const { return (ALLOCATION_TYPE)m_Type; }
+ VkDeviceSize GetAlignment() const { return m_Alignment; }
+ VkDeviceSize GetSize() const { return m_Size; }
+ bool IsUserDataString() const { return (m_Flags & FLAG_USER_DATA_STRING) != 0; }
+ void* GetUserData() const { return m_pUserData; }
+ void SetUserData(VmaAllocator hAllocator, void* pUserData);
+ VmaSuballocationType GetSuballocationType() const { return (VmaSuballocationType)m_SuballocationType; }
+
+ VmaDeviceMemoryBlock* GetBlock() const
+ {
+ VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
+ return m_BlockAllocation.m_Block;
+ }
+ VkDeviceSize GetOffset() const;
+ VkDeviceMemory GetMemory() const;
+ uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; }
+ bool IsPersistentMap() const { return (m_MapCount & MAP_COUNT_FLAG_PERSISTENT_MAP) != 0; }
+ void* GetMappedData() const;
+ bool CanBecomeLost() const;
+
+ uint32_t GetLastUseFrameIndex() const
+ {
+ return m_LastUseFrameIndex.load();
+ }
+ bool CompareExchangeLastUseFrameIndex(uint32_t& expected, uint32_t desired)
+ {
+ return m_LastUseFrameIndex.compare_exchange_weak(expected, desired);
+ }
+ /*
+ - If hAllocation.LastUseFrameIndex + frameInUseCount < allocator.CurrentFrameIndex,
+ makes it lost by setting LastUseFrameIndex = VMA_FRAME_INDEX_LOST and returns true.
+ - Else, returns false.
+
+ If hAllocation is already lost, assert - you should not call it then.
+ If hAllocation was not created with CAN_BECOME_LOST_BIT, assert.
+ */
+ bool MakeLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
+
+ void DedicatedAllocCalcStatsInfo(VmaStatInfo& outInfo)
+ {
+ VMA_ASSERT(m_Type == ALLOCATION_TYPE_DEDICATED);
+ outInfo.blockCount = 1;
+ outInfo.allocationCount = 1;
+ outInfo.unusedRangeCount = 0;
+ outInfo.usedBytes = m_Size;
+ outInfo.unusedBytes = 0;
+ outInfo.allocationSizeMin = outInfo.allocationSizeMax = m_Size;
+ outInfo.unusedRangeSizeMin = UINT64_MAX;
+ outInfo.unusedRangeSizeMax = 0;
+ }
+
+ void BlockAllocMap();
+ void BlockAllocUnmap();
+ VkResult DedicatedAllocMap(VmaAllocator hAllocator, void** ppData);
+ void DedicatedAllocUnmap(VmaAllocator hAllocator);
#if VMA_STATS_STRING_ENABLED
- uint32_t GetCreationFrameIndex() const { return m_CreationFrameIndex; }
- uint32_t GetBufferImageUsage() const { return m_BufferImageUsage; }
+ uint32_t GetCreationFrameIndex() const { return m_CreationFrameIndex; }
+ uint32_t GetBufferImageUsage() const { return m_BufferImageUsage; }
- void InitBufferImageUsage(uint32_t bufferImageUsage)
- {
- VMA_ASSERT(m_BufferImageUsage == 0);
- m_BufferImageUsage = bufferImageUsage;
- }
+ void InitBufferImageUsage(uint32_t bufferImageUsage)
+ {
+ VMA_ASSERT(m_BufferImageUsage == 0);
+ m_BufferImageUsage = bufferImageUsage;
+ }
- void PrintParameters(class VmaJsonWriter& json) const;
+ void PrintParameters(class VmaJsonWriter& json) const;
#endif
private:
- VkDeviceSize m_Alignment;
- VkDeviceSize m_Size;
- void* m_pUserData;
- VMA_ATOMIC_UINT32 m_LastUseFrameIndex;
- uint32_t m_MemoryTypeIndex;
- uint8_t m_Type; // ALLOCATION_TYPE
- uint8_t m_SuballocationType; // VmaSuballocationType
- // Bit 0x80 is set when allocation was created with VMA_ALLOCATION_CREATE_MAPPED_BIT.
- // Bits with mask 0x7F are reference counter for vmaMapMemory()/vmaUnmapMemory().
- uint8_t m_MapCount;
- uint8_t m_Flags; // enum FLAGS
-
- // Allocation out of VmaDeviceMemoryBlock.
- struct BlockAllocation
- {
- VmaDeviceMemoryBlock* m_Block;
- VkDeviceSize m_Offset;
- bool m_CanBecomeLost;
- };
-
- // Allocation for an object that has its own private VkDeviceMemory.
- struct DedicatedAllocation
- {
- VkDeviceMemory m_hMemory;
- void* m_pMappedData; // Not null means memory is mapped.
- };
-
- 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;
+ VMA_ATOMIC_UINT32 m_LastUseFrameIndex;
+ uint32_t m_MemoryTypeIndex;
+ uint8_t m_Type; // ALLOCATION_TYPE
+ uint8_t m_SuballocationType; // VmaSuballocationType
+ // Bit 0x80 is set when allocation was created with VMA_ALLOCATION_CREATE_MAPPED_BIT.
+ // Bits with mask 0x7F are reference counter for vmaMapMemory()/vmaUnmapMemory().
+ uint8_t m_MapCount;
+ uint8_t m_Flags; // enum FLAGS
+
+ // Allocation out of VmaDeviceMemoryBlock.
+ struct BlockAllocation
+ {
+ VmaDeviceMemoryBlock* m_Block;
+ VkDeviceSize m_Offset;
+ bool m_CanBecomeLost;
+ };
+
+ // Allocation for an object that has its own private VkDeviceMemory.
+ struct DedicatedAllocation
+ {
+ VkDeviceMemory m_hMemory;
+ void* m_pMappedData; // Not null means memory is mapped.
+ };
+
+ union
+ {
+ // Allocation out of VmaDeviceMemoryBlock.
+ BlockAllocation m_BlockAllocation;
+ // Allocation for an object that has its own private VkDeviceMemory.
+ DedicatedAllocation m_DedicatedAllocation;
+ };
#if VMA_STATS_STRING_ENABLED
- uint32_t m_CreationFrameIndex;
- uint32_t m_BufferImageUsage; // 0 if unknown.
+ uint32_t m_CreationFrameIndex;
+ uint32_t m_BufferImageUsage; // 0 if unknown.
#endif
- void FreeUserDataString(VmaAllocator hAllocator);
+ void FreeUserDataString(VmaAllocator hAllocator);
};
/*
@@ -5663,26 +5544,26 @@ allocated memory block or free.
*/
struct VmaSuballocation
{
- VkDeviceSize offset;
- VkDeviceSize size;
- VmaAllocation hAllocation;
- VmaSuballocationType type;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+ VmaAllocation hAllocation;
+ VmaSuballocationType type;
};
// Comparator for offsets.
struct VmaSuballocationOffsetLess
{
- bool operator()(const VmaSuballocation& lhs, const VmaSuballocation& rhs) const
- {
- return lhs.offset < rhs.offset;
- }
+ 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;
- }
+ bool operator()(const VmaSuballocation& lhs, const VmaSuballocation& rhs) const
+ {
+ return lhs.offset > rhs.offset;
+ }
};
typedef VmaList< VmaSuballocation, VmaStlAllocator<VmaSuballocation> > VmaSuballocationList;
@@ -5692,11 +5573,11 @@ static const VkDeviceSize VMA_LOST_ALLOCATION_COST = 1048576;
enum class VmaAllocationRequestType
{
- Normal,
- // Used by "Linear" algorithm.
- UpperAddress,
- EndOf1st,
- EndOf2nd,
+ Normal,
+ // Used by "Linear" algorithm.
+ UpperAddress,
+ EndOf1st,
+ EndOf2nd,
};
/*
@@ -5714,18 +5595,18 @@ If canMakeOtherLost was true:
*/
struct VmaAllocationRequest
{
- VkDeviceSize offset;
- VkDeviceSize sumFreeSize; // Sum size of free items that overlap with proposed allocation.
- VkDeviceSize sumItemSize; // Sum size of items to make lost that overlap with proposed allocation.
- VmaSuballocationList::iterator item;
- size_t itemsToMakeLostCount;
- void* customData;
- VmaAllocationRequestType type;
-
- VkDeviceSize CalcCost() const
- {
- return sumItemSize + itemsToMakeLostCount * VMA_LOST_ALLOCATION_COST;
- }
+ VkDeviceSize offset;
+ VkDeviceSize sumFreeSize; // Sum size of free items that overlap with proposed allocation.
+ VkDeviceSize sumItemSize; // Sum size of items to make lost that overlap with proposed allocation.
+ VmaSuballocationList::iterator item;
+ size_t itemsToMakeLostCount;
+ void* customData;
+ VmaAllocationRequestType type;
+
+ VkDeviceSize CalcCost() const
+ {
+ return sumItemSize + itemsToMakeLostCount * VMA_LOST_ALLOCATION_COST;
+ }
};
/*
@@ -5735,188 +5616,188 @@ in a single VkDeviceMemory block.
class VmaBlockMetadata
{
public:
- VmaBlockMetadata(VmaAllocator hAllocator);
- virtual ~VmaBlockMetadata() { }
- virtual void Init(VkDeviceSize size) { m_Size = size; }
-
- // Validates all data structures inside this object. If not valid, returns false.
- virtual bool Validate() const = 0;
- VkDeviceSize GetSize() const { return m_Size; }
- virtual size_t GetAllocationCount() const = 0;
- virtual VkDeviceSize GetSumFreeSize() const = 0;
- virtual VkDeviceSize GetUnusedRangeSizeMax() const = 0;
- // Returns true if this block is empty - contains only single free suballocation.
- virtual bool IsEmpty() const = 0;
-
- virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const = 0;
- // Shouldn't modify blockCount.
- virtual void AddPoolStats(VmaPoolStats& inoutStats) const = 0;
+ VmaBlockMetadata(VmaAllocator hAllocator);
+ virtual ~VmaBlockMetadata() { }
+ virtual void Init(VkDeviceSize size) { m_Size = size; }
+
+ // Validates all data structures inside this object. If not valid, returns false.
+ virtual bool Validate() const = 0;
+ VkDeviceSize GetSize() const { return m_Size; }
+ virtual size_t GetAllocationCount() const = 0;
+ virtual VkDeviceSize GetSumFreeSize() const = 0;
+ virtual VkDeviceSize GetUnusedRangeSizeMax() const = 0;
+ // Returns true if this block is empty - contains only single free suballocation.
+ virtual bool IsEmpty() const = 0;
+
+ virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const = 0;
+ // Shouldn't modify blockCount.
+ virtual void AddPoolStats(VmaPoolStats& inoutStats) const = 0;
#if VMA_STATS_STRING_ENABLED
- virtual void PrintDetailedMap(class VmaJsonWriter& json) const = 0;
+ 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(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- // Always one of VMA_ALLOCATION_CREATE_STRATEGY_* or VMA_ALLOCATION_INTERNAL_STRATEGY_* flags.
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest) = 0;
-
- virtual bool MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest) = 0;
-
- virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) = 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,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation) = 0;
-
- // Frees suballocation assigned to given memory region.
- virtual void Free(const VmaAllocation allocation) = 0;
- virtual void FreeAtOffset(VkDeviceSize offset) = 0;
+ // 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(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ // Always one of VMA_ALLOCATION_CREATE_STRATEGY_* or VMA_ALLOCATION_INTERNAL_STRATEGY_* flags.
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest) = 0;
+
+ virtual bool MakeRequestedAllocationsLost(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest) = 0;
+
+ virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) = 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,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation) = 0;
+
+ // Frees suballocation assigned to given memory region.
+ virtual void Free(const VmaAllocation allocation) = 0;
+ virtual void FreeAtOffset(VkDeviceSize offset) = 0;
protected:
- const VkAllocationCallbacks* GetAllocationCallbacks() const { return m_pAllocationCallbacks; }
+ const VkAllocationCallbacks* GetAllocationCallbacks() const { return m_pAllocationCallbacks; }
#if VMA_STATS_STRING_ENABLED
- void PrintDetailedMap_Begin(class VmaJsonWriter& json,
- VkDeviceSize unusedBytes,
- size_t allocationCount,
- size_t unusedRangeCount) const;
- void PrintDetailedMap_Allocation(class VmaJsonWriter& json,
- VkDeviceSize offset,
- VmaAllocation hAllocation) const;
- void PrintDetailedMap_UnusedRange(class VmaJsonWriter& json,
- VkDeviceSize offset,
- VkDeviceSize size) const;
- void PrintDetailedMap_End(class VmaJsonWriter& json) const;
+ void PrintDetailedMap_Begin(class VmaJsonWriter& json,
+ VkDeviceSize unusedBytes,
+ size_t allocationCount,
+ size_t unusedRangeCount) const;
+ void PrintDetailedMap_Allocation(class VmaJsonWriter& json,
+ VkDeviceSize offset,
+ VmaAllocation hAllocation) 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;
+ VkDeviceSize m_Size;
+ const VkAllocationCallbacks* m_pAllocationCallbacks;
};
#define VMA_VALIDATE(cond) do { if(!(cond)) { \
- VMA_ASSERT(0 && "Validation failed: " #cond); \
- return false; \
- } } while(false)
+ VMA_ASSERT(0 && "Validation failed: " #cond); \
+ return false; \
+ } } while(false)
class VmaBlockMetadata_Generic : public VmaBlockMetadata
{
- VMA_CLASS_NO_COPY(VmaBlockMetadata_Generic)
+ VMA_CLASS_NO_COPY(VmaBlockMetadata_Generic)
public:
- VmaBlockMetadata_Generic(VmaAllocator hAllocator);
- virtual ~VmaBlockMetadata_Generic();
- virtual void Init(VkDeviceSize size);
+ VmaBlockMetadata_Generic(VmaAllocator hAllocator);
+ virtual ~VmaBlockMetadata_Generic();
+ virtual void Init(VkDeviceSize size);
- virtual bool Validate() const;
- virtual size_t GetAllocationCount() const { return m_Suballocations.size() - m_FreeCount; }
- virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
- virtual VkDeviceSize GetUnusedRangeSizeMax() const;
- virtual bool IsEmpty() const;
+ virtual bool Validate() const;
+ virtual size_t GetAllocationCount() const { return m_Suballocations.size() - m_FreeCount; }
+ virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
+ virtual VkDeviceSize GetUnusedRangeSizeMax() const;
+ virtual bool IsEmpty() const;
- virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
- virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
+ virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
+ virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
#if VMA_STATS_STRING_ENABLED
- virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
+ virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
#endif
- virtual bool CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest);
-
- virtual bool MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest);
-
- virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
-
- virtual VkResult CheckCorruption(const void* pBlockData);
-
- virtual void Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation);
-
- virtual void Free(const VmaAllocation allocation);
- virtual void FreeAtOffset(VkDeviceSize offset);
-
- ////////////////////////////////////////////////////////////////////////////////
- // For defragmentation
-
- bool IsBufferImageGranularityConflictPossible(
- VkDeviceSize bufferImageGranularity,
- VmaSuballocationType& inOutPrevSuballocType) const;
+ virtual bool CreateAllocationRequest(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest);
+
+ virtual bool MakeRequestedAllocationsLost(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest);
+
+ virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
+
+ virtual VkResult CheckCorruption(const void* pBlockData);
+
+ virtual void Alloc(
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation);
+
+ virtual void Free(const VmaAllocation allocation);
+ virtual void FreeAtOffset(VkDeviceSize offset);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // For defragmentation
+
+ bool IsBufferImageGranularityConflictPossible(
+ VkDeviceSize bufferImageGranularity,
+ VmaSuballocationType& inOutPrevSuballocType) const;
private:
- friend class VmaDefragmentationAlgorithm_Generic;
- friend class VmaDefragmentationAlgorithm_Fast;
-
- uint32_t m_FreeCount;
- VkDeviceSize m_SumFreeSize;
- VmaSuballocationList m_Suballocations;
- // Suballocations that are free and have size greater than certain threshold.
- // Sorted by size, ascending.
- VmaVector< VmaSuballocationList::iterator, VmaStlAllocator< VmaSuballocationList::iterator > > m_FreeSuballocationsBySize;
-
- bool ValidateFreeSuballocationList() const;
-
- // Checks if requested suballocation with given parameters can be placed in given pFreeSuballocItem.
- // If yes, fills pOffset and returns true. If no, returns false.
- bool CheckAllocation(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- VmaSuballocationList::const_iterator suballocItem,
- bool canMakeOtherLost,
- VkDeviceSize* pOffset,
- size_t* itemsToMakeLostCount,
- VkDeviceSize* pSumFreeSize,
- VkDeviceSize* pSumItemSize) const;
- // Given free suballocation, it merges it with following one, which must also be free.
- void MergeFreeWithNext(VmaSuballocationList::iterator item);
- // Releases given suballocation, making it free.
- // Merges it with adjacent free suballocations if applicable.
- // Returns iterator to new free suballocation at this place.
- VmaSuballocationList::iterator FreeSuballocation(VmaSuballocationList::iterator suballocItem);
- // Given free suballocation, it inserts it into sorted list of
- // m_FreeSuballocationsBySize if it's suitable.
- void RegisterFreeSuballocation(VmaSuballocationList::iterator item);
- // Given free suballocation, it removes it from sorted list of
- // m_FreeSuballocationsBySize if it's suitable.
- void UnregisterFreeSuballocation(VmaSuballocationList::iterator item);
+ friend class VmaDefragmentationAlgorithm_Generic;
+ friend class VmaDefragmentationAlgorithm_Fast;
+
+ uint32_t m_FreeCount;
+ VkDeviceSize m_SumFreeSize;
+ VmaSuballocationList m_Suballocations;
+ // Suballocations that are free and have size greater than certain threshold.
+ // Sorted by size, ascending.
+ VmaVector< VmaSuballocationList::iterator, VmaStlAllocator< VmaSuballocationList::iterator > > m_FreeSuballocationsBySize;
+
+ bool ValidateFreeSuballocationList() const;
+
+ // Checks if requested suballocation with given parameters can be placed in given pFreeSuballocItem.
+ // If yes, fills pOffset and returns true. If no, returns false.
+ bool CheckAllocation(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ VmaSuballocationList::const_iterator suballocItem,
+ bool canMakeOtherLost,
+ VkDeviceSize* pOffset,
+ size_t* itemsToMakeLostCount,
+ VkDeviceSize* pSumFreeSize,
+ VkDeviceSize* pSumItemSize) const;
+ // Given free suballocation, it merges it with following one, which must also be free.
+ void MergeFreeWithNext(VmaSuballocationList::iterator item);
+ // Releases given suballocation, making it free.
+ // Merges it with adjacent free suballocations if applicable.
+ // Returns iterator to new free suballocation at this place.
+ VmaSuballocationList::iterator FreeSuballocation(VmaSuballocationList::iterator suballocItem);
+ // Given free suballocation, it inserts it into sorted list of
+ // m_FreeSuballocationsBySize if it's suitable.
+ void RegisterFreeSuballocation(VmaSuballocationList::iterator item);
+ // Given free suballocation, it removes it from sorted list of
+ // m_FreeSuballocationsBySize if it's suitable.
+ void UnregisterFreeSuballocation(VmaSuballocationList::iterator item);
};
/*
@@ -5924,196 +5805,196 @@ 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]
- +-------+
- | |
- | |
- | |
+ 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]
- +-------+
- | |
+ 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]
+ 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(VmaBlockMetadata_Linear)
+ VMA_CLASS_NO_COPY(VmaBlockMetadata_Linear)
public:
- VmaBlockMetadata_Linear(VmaAllocator hAllocator);
- virtual ~VmaBlockMetadata_Linear();
- virtual void Init(VkDeviceSize size);
+ VmaBlockMetadata_Linear(VmaAllocator hAllocator);
+ virtual ~VmaBlockMetadata_Linear();
+ virtual void Init(VkDeviceSize size);
- virtual bool Validate() const;
- virtual size_t GetAllocationCount() const;
- virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
- virtual VkDeviceSize GetUnusedRangeSizeMax() const;
- virtual bool IsEmpty() const { return GetAllocationCount() == 0; }
+ virtual bool Validate() const;
+ virtual size_t GetAllocationCount() const;
+ virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; }
+ virtual VkDeviceSize GetUnusedRangeSizeMax() const;
+ virtual bool IsEmpty() const { return GetAllocationCount() == 0; }
- virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
- virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
+ virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
+ virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
#if VMA_STATS_STRING_ENABLED
- virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
+ virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
#endif
- virtual bool CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest);
+ virtual bool CreateAllocationRequest(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest);
- virtual bool MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest);
+ virtual bool MakeRequestedAllocationsLost(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest);
- virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
+ virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
- virtual VkResult CheckCorruption(const void* pBlockData);
+ virtual VkResult CheckCorruption(const void* pBlockData);
- virtual void Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation);
+ virtual void Alloc(
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation);
- virtual void Free(const VmaAllocation allocation);
- virtual void FreeAtOffset(VkDeviceSize offset);
+ virtual void Free(const VmaAllocation allocation);
+ virtual void FreeAtOffset(VkDeviceSize offset);
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< VmaSuballocation, VmaStlAllocator<VmaSuballocation> > 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;
-
- 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; }
-
- // 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;
-
- bool ShouldCompact1st() const;
- void CleanupAfterFree();
-
- bool CreateAllocationRequest_LowerAddress(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest);
- bool CreateAllocationRequest_UpperAddress(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest);
+ /*
+ 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< VmaSuballocation, VmaStlAllocator<VmaSuballocation> > 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;
+
+ 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; }
+
+ // 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;
+
+ bool ShouldCompact1st() const;
+ void CleanupAfterFree();
+
+ bool CreateAllocationRequest_LowerAddress(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest);
+ bool CreateAllocationRequest_UpperAddress(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest);
};
/*
@@ -6129,137 +6010,137 @@ m_LevelCount is the maximum number of levels to use in the current object.
*/
class VmaBlockMetadata_Buddy : public VmaBlockMetadata
{
- VMA_CLASS_NO_COPY(VmaBlockMetadata_Buddy)
+ VMA_CLASS_NO_COPY(VmaBlockMetadata_Buddy)
public:
- VmaBlockMetadata_Buddy(VmaAllocator hAllocator);
- virtual ~VmaBlockMetadata_Buddy();
- virtual void Init(VkDeviceSize size);
+ VmaBlockMetadata_Buddy(VmaAllocator hAllocator);
+ virtual ~VmaBlockMetadata_Buddy();
+ virtual void Init(VkDeviceSize size);
- virtual bool Validate() const;
- virtual size_t GetAllocationCount() const { return m_AllocationCount; }
- virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize + GetUnusableSize(); }
- virtual VkDeviceSize GetUnusedRangeSizeMax() const;
- virtual bool IsEmpty() const { return m_Root->type == Node::TYPE_FREE; }
+ virtual bool Validate() const;
+ virtual size_t GetAllocationCount() const { return m_AllocationCount; }
+ virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize + GetUnusableSize(); }
+ virtual VkDeviceSize GetUnusedRangeSizeMax() const;
+ virtual bool IsEmpty() const { return m_Root->type == Node::TYPE_FREE; }
- virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
- virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
+ virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const;
+ virtual void AddPoolStats(VmaPoolStats& inoutStats) const;
#if VMA_STATS_STRING_ENABLED
- virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
+ virtual void PrintDetailedMap(class VmaJsonWriter& json) const;
#endif
- virtual bool CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest);
+ virtual bool CreateAllocationRequest(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest);
- virtual bool MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest);
+ virtual bool MakeRequestedAllocationsLost(
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest);
- virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
+ virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount);
- virtual VkResult CheckCorruption(const void* pBlockData) { return VK_ERROR_FEATURE_NOT_PRESENT; }
+ virtual VkResult CheckCorruption(const void* pBlockData) { return VK_ERROR_FEATURE_NOT_PRESENT; }
- virtual void Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation);
+ virtual void Alloc(
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation);
- virtual void Free(const VmaAllocation allocation) { FreeAtOffset(allocation, allocation->GetOffset()); }
- virtual void FreeAtOffset(VkDeviceSize offset) { FreeAtOffset(VMA_NULL, offset); }
+ virtual void Free(const VmaAllocation allocation) { FreeAtOffset(allocation, allocation->GetOffset()); }
+ virtual void FreeAtOffset(VkDeviceSize offset) { FreeAtOffset(VMA_NULL, offset); }
private:
- static const VkDeviceSize MIN_NODE_SIZE = 32;
- static const size_t MAX_LEVELS = 30;
-
- struct ValidationContext
- {
- size_t calculatedAllocationCount;
- size_t calculatedFreeCount;
- VkDeviceSize calculatedSumFreeSize;
-
- ValidationContext() :
- calculatedAllocationCount(0),
- calculatedFreeCount(0),
- calculatedSumFreeSize(0) { }
- };
-
- struct Node
- {
- VkDeviceSize offset;
- enum TYPE
- {
- TYPE_FREE,
- TYPE_ALLOCATION,
- TYPE_SPLIT,
- TYPE_COUNT
- } type;
- Node* parent;
- Node* buddy;
-
- union
- {
- struct
- {
- Node* prev;
- Node* next;
- } free;
- struct
- {
- VmaAllocation alloc;
- } allocation;
- struct
- {
- Node* leftChild;
- } split;
- };
- };
-
- // Size of the memory block aligned down to a power of two.
- VkDeviceSize m_UsableSize;
- uint32_t m_LevelCount;
-
- Node* m_Root;
- struct {
- Node* front;
- Node* back;
- } m_FreeList[MAX_LEVELS];
- // Number of nodes in the tree with type == TYPE_ALLOCATION.
- size_t m_AllocationCount;
- // Number of nodes in the tree with type == TYPE_FREE.
- size_t m_FreeCount;
- // This includes space wasted due to internal fragmentation. Doesn't include unusable size.
- VkDeviceSize m_SumFreeSize;
-
- VkDeviceSize GetUnusableSize() const { return GetSize() - m_UsableSize; }
- void DeleteNode(Node* node);
- bool ValidateNode(ValidationContext& ctx, const Node* parent, const Node* curr, uint32_t level, VkDeviceSize levelNodeSize) const;
- uint32_t AllocSizeToLevel(VkDeviceSize allocSize) const;
- inline VkDeviceSize LevelToNodeSize(uint32_t level) const { return m_UsableSize >> level; }
- // Alloc passed just for validation. Can be null.
- void FreeAtOffset(VmaAllocation alloc, VkDeviceSize offset);
- void CalcAllocationStatInfoNode(VmaStatInfo& outInfo, const Node* node, VkDeviceSize levelNodeSize) const;
- // Adds node to the front of FreeList at given level.
- // node->type must be FREE.
- // node->free.prev, next can be undefined.
- void AddToFreeListFront(uint32_t level, Node* node);
- // Removes node from FreeList at given level.
- // node->type must be FREE.
- // node->free.prev, next stay untouched.
- void RemoveFromFreeList(uint32_t level, Node* node);
+ static const VkDeviceSize MIN_NODE_SIZE = 32;
+ static const size_t MAX_LEVELS = 30;
+
+ struct ValidationContext
+ {
+ size_t calculatedAllocationCount;
+ size_t calculatedFreeCount;
+ VkDeviceSize calculatedSumFreeSize;
+
+ ValidationContext() :
+ calculatedAllocationCount(0),
+ calculatedFreeCount(0),
+ calculatedSumFreeSize(0) { }
+ };
+
+ struct Node
+ {
+ VkDeviceSize offset;
+ enum TYPE
+ {
+ TYPE_FREE,
+ TYPE_ALLOCATION,
+ TYPE_SPLIT,
+ TYPE_COUNT
+ } type;
+ Node* parent;
+ Node* buddy;
+
+ union
+ {
+ struct
+ {
+ Node* prev;
+ Node* next;
+ } free;
+ struct
+ {
+ VmaAllocation alloc;
+ } allocation;
+ struct
+ {
+ Node* leftChild;
+ } split;
+ };
+ };
+
+ // Size of the memory block aligned down to a power of two.
+ VkDeviceSize m_UsableSize;
+ uint32_t m_LevelCount;
+
+ Node* m_Root;
+ struct {
+ Node* front;
+ Node* back;
+ } m_FreeList[MAX_LEVELS];
+ // Number of nodes in the tree with type == TYPE_ALLOCATION.
+ size_t m_AllocationCount;
+ // Number of nodes in the tree with type == TYPE_FREE.
+ size_t m_FreeCount;
+ // This includes space wasted due to internal fragmentation. Doesn't include unusable size.
+ VkDeviceSize m_SumFreeSize;
+
+ VkDeviceSize GetUnusableSize() const { return GetSize() - m_UsableSize; }
+ void DeleteNode(Node* node);
+ bool ValidateNode(ValidationContext& ctx, const Node* parent, const Node* curr, uint32_t level, VkDeviceSize levelNodeSize) const;
+ uint32_t AllocSizeToLevel(VkDeviceSize allocSize) const;
+ inline VkDeviceSize LevelToNodeSize(uint32_t level) const { return m_UsableSize >> level; }
+ // Alloc passed just for validation. Can be null.
+ void FreeAtOffset(VmaAllocation alloc, VkDeviceSize offset);
+ void CalcAllocationStatInfoNode(VmaStatInfo& outInfo, const Node* node, VkDeviceSize levelNodeSize) const;
+ // Adds node to the front of FreeList at given level.
+ // node->type must be FREE.
+ // node->free.prev, next can be undefined.
+ void AddToFreeListFront(uint32_t level, Node* node);
+ // Removes node from FreeList at given level.
+ // node->type must be FREE.
+ // node->free.prev, next stay untouched.
+ void RemoveFromFreeList(uint32_t level, Node* node);
#if VMA_STATS_STRING_ENABLED
- void PrintDetailedMapNode(class VmaJsonWriter& json, const Node* node, VkDeviceSize levelNodeSize) const;
+ void PrintDetailedMapNode(class VmaJsonWriter& json, const Node* node, VkDeviceSize levelNodeSize) const;
#endif
};
@@ -6271,95 +6152,92 @@ Thread-safety: This class must be externally synchronized.
*/
class VmaDeviceMemoryBlock
{
- VMA_CLASS_NO_COPY(VmaDeviceMemoryBlock)
+ VMA_CLASS_NO_COPY(VmaDeviceMemoryBlock)
public:
- VmaBlockMetadata* m_pMetadata;
-
- VmaDeviceMemoryBlock(VmaAllocator hAllocator);
-
- ~VmaDeviceMemoryBlock()
- {
- VMA_ASSERT(m_MapCount == 0 && "VkDeviceMemory block is being destroyed while it is still mapped.");
- VMA_ASSERT(m_hMemory == VK_NULL_HANDLE);
- }
-
- // Always call after construction.
- void Init(
- VmaAllocator hAllocator,
- VmaPool hParentPool,
- uint32_t newMemoryTypeIndex,
- VkDeviceMemory newMemory,
- VkDeviceSize newSize,
- uint32_t id,
- uint32_t algorithm);
- // 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; }
-
- // 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 WriteMagicValueAroundAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize);
- VkResult ValidateMagicValueAroundAllocation(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);
+ VmaBlockMetadata* m_pMetadata;
+
+ VmaDeviceMemoryBlock(VmaAllocator hAllocator);
+
+ ~VmaDeviceMemoryBlock()
+ {
+ VMA_ASSERT(m_MapCount == 0 && "VkDeviceMemory block is being destroyed while it is still mapped.");
+ VMA_ASSERT(m_hMemory == VK_NULL_HANDLE);
+ }
+
+ // Always call after construction.
+ void Init(
+ VmaAllocator hAllocator,
+ VmaPool hParentPool,
+ uint32_t newMemoryTypeIndex,
+ VkDeviceMemory newMemory,
+ VkDeviceSize newSize,
+ uint32_t id,
+ uint32_t algorithm);
+ // 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; }
+
+ // 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 WriteMagicValueAroundAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize);
+ VkResult ValidateMagicValueAroundAllocation(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);
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's 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_Mutex;
- uint32_t m_MapCount;
- void* m_pMappedData;
+ 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's 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_Mutex;
+ uint32_t m_MapCount;
+ void* m_pMappedData;
};
struct VmaPointerLess
{
- bool operator()(const void* lhs, const void* rhs) const
- {
- return lhs < rhs;
- }
+ bool operator()(const void* lhs, const void* rhs) const
+ {
+ return lhs < rhs;
+ }
};
struct VmaDefragmentationMove
{
- size_t srcBlockIndex;
- size_t dstBlockIndex;
- VkDeviceSize srcOffset;
- VkDeviceSize dstOffset;
- VkDeviceSize size;
- VmaAllocation hAllocation;
- VmaDeviceMemoryBlock* pSrcBlock;
- VmaDeviceMemoryBlock* pDstBlock;
+ size_t srcBlockIndex;
+ size_t dstBlockIndex;
+ VkDeviceSize srcOffset;
+ VkDeviceSize dstOffset;
+ VkDeviceSize size;
};
class VmaDefragmentationAlgorithm;
@@ -6372,184 +6250,176 @@ Synchronized internally with a mutex.
*/
struct VmaBlockVector
{
- VMA_CLASS_NO_COPY(VmaBlockVector)
+ VMA_CLASS_NO_COPY(VmaBlockVector)
public:
- VmaBlockVector(
- VmaAllocator hAllocator,
- VmaPool hParentPool,
- uint32_t memoryTypeIndex,
- VkDeviceSize preferredBlockSize,
- size_t minBlockCount,
- size_t maxBlockCount,
- VkDeviceSize bufferImageGranularity,
- uint32_t frameInUseCount,
- bool explicitBlockSize,
- uint32_t algorithm);
- ~VmaBlockVector();
-
- VkResult CreateMinBlocks();
-
- 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 GetFrameInUseCount() const { return m_FrameInUseCount; }
- uint32_t GetAlgorithm() const { return m_Algorithm; }
-
- void GetPoolStats(VmaPoolStats* pStats);
-
- bool IsEmpty();
- bool IsCorruptionDetectionEnabled() const;
-
- VkResult Allocate(
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- const VmaAllocationCreateInfo& createInfo,
- VmaSuballocationType suballocType,
- size_t allocationCount,
- VmaAllocation* pAllocations);
-
- void Free(const VmaAllocation hAllocation);
-
- // Adds statistics of this BlockVector to pStats.
- void AddStats(VmaStats* pStats);
+ VmaBlockVector(
+ VmaAllocator hAllocator,
+ VmaPool hParentPool,
+ uint32_t memoryTypeIndex,
+ VkDeviceSize preferredBlockSize,
+ size_t minBlockCount,
+ size_t maxBlockCount,
+ VkDeviceSize bufferImageGranularity,
+ uint32_t frameInUseCount,
+ bool explicitBlockSize,
+ uint32_t algorithm);
+ ~VmaBlockVector();
+
+ VkResult CreateMinBlocks();
+
+ 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 GetFrameInUseCount() const { return m_FrameInUseCount; }
+ uint32_t GetAlgorithm() const { return m_Algorithm; }
+
+ void GetPoolStats(VmaPoolStats* pStats);
+
+ bool IsEmpty();
+ bool IsCorruptionDetectionEnabled() const;
+
+ VkResult Allocate(
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaSuballocationType suballocType,
+ size_t allocationCount,
+ VmaAllocation* pAllocations);
+
+ void Free(const VmaAllocation hAllocation);
+
+ // Adds statistics of this BlockVector to pStats.
+ void AddStats(VmaStats* pStats);
#if VMA_STATS_STRING_ENABLED
- void PrintDetailedMap(class VmaJsonWriter& json);
+ void PrintDetailedMap(class VmaJsonWriter& json);
#endif
- void MakePoolAllocationsLost(
- uint32_t currentFrameIndex,
- size_t* pLostAllocationCount);
- VkResult CheckCorruption();
-
- // Saves results in pCtx->res.
- void Defragment(
- class VmaBlockVectorDefragmentationContext* pCtx,
- VmaDefragmentationStats* pStats, VmaDefragmentationFlags flags,
- VkDeviceSize& maxCpuBytesToMove, uint32_t& maxCpuAllocationsToMove,
- VkDeviceSize& maxGpuBytesToMove, uint32_t& maxGpuAllocationsToMove,
- VkCommandBuffer commandBuffer);
- void DefragmentationEnd(
- class VmaBlockVectorDefragmentationContext* pCtx,
- VmaDefragmentationStats* pStats);
-
- uint32_t ProcessDefragmentations(
- class VmaBlockVectorDefragmentationContext *pCtx,
- VmaDefragmentationPassMoveInfo* pMove, uint32_t maxMoves);
-
- void CommitDefragmentations(
- class VmaBlockVectorDefragmentationContext *pCtx,
- VmaDefragmentationStats* pStats);
-
- ////////////////////////////////////////////////////////////////////////////////
- // To be used only while the m_Mutex is locked. Used during defragmentation.
-
- size_t GetBlockCount() const { return m_Blocks.size(); }
- VmaDeviceMemoryBlock* GetBlock(size_t index) const { return m_Blocks[index]; }
- size_t CalcAllocationCount() const;
- bool IsBufferImageGranularityConflictPossible() const;
+ void MakePoolAllocationsLost(
+ uint32_t currentFrameIndex,
+ size_t* pLostAllocationCount);
+ VkResult CheckCorruption();
+
+ // Saves results in pCtx->res.
+ void Defragment(
+ class VmaBlockVectorDefragmentationContext* pCtx,
+ VmaDefragmentationStats* pStats,
+ VkDeviceSize& maxCpuBytesToMove, uint32_t& maxCpuAllocationsToMove,
+ VkDeviceSize& maxGpuBytesToMove, uint32_t& maxGpuAllocationsToMove,
+ VkCommandBuffer commandBuffer);
+ void DefragmentationEnd(
+ class VmaBlockVectorDefragmentationContext* pCtx,
+ VmaDefragmentationStats* pStats);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // To be used only while the m_Mutex is locked. Used during defragmentation.
+
+ size_t GetBlockCount() const { return m_Blocks.size(); }
+ VmaDeviceMemoryBlock* GetBlock(size_t index) const { return m_Blocks[index]; }
+ size_t CalcAllocationCount() const;
+ bool IsBufferImageGranularityConflictPossible() const;
private:
- friend class VmaDefragmentationAlgorithm_Generic;
-
- 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 uint32_t m_FrameInUseCount;
- const bool m_ExplicitBlockSize;
- const uint32_t m_Algorithm;
- VMA_RW_MUTEX m_Mutex;
-
- /* There can be at most one allocation that is completely empty (except when minBlockCount > 0) -
- a hysteresis to avoid pessimistic case of alternating creation and destruction of a VkDeviceMemory. */
- bool m_HasEmptyBlock;
- // Incrementally sorted by sumFreeSize, ascending.
- VmaVector< VmaDeviceMemoryBlock*, VmaStlAllocator<VmaDeviceMemoryBlock*> > m_Blocks;
- uint32_t m_NextBlockId;
-
- 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();
-
- VkResult AllocatePage(
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- const VmaAllocationCreateInfo& createInfo,
- VmaSuballocationType suballocType,
- VmaAllocation* pAllocation);
-
- // To be used only without CAN_MAKE_OTHER_LOST flag.
- VkResult AllocateFromBlock(
- VmaDeviceMemoryBlock* pBlock,
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- VmaAllocationCreateFlags allocFlags,
- void* pUserData,
- VmaSuballocationType suballocType,
- uint32_t strategy,
- VmaAllocation* pAllocation);
-
- VkResult CreateBlock(VkDeviceSize blockSize, size_t* pNewBlockIndex);
-
- // Saves result to pCtx->res.
- void ApplyDefragmentationMovesCpu(
- class VmaBlockVectorDefragmentationContext* pDefragCtx,
- const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves);
- // Saves result to pCtx->res.
- void ApplyDefragmentationMovesGpu(
- class VmaBlockVectorDefragmentationContext* pDefragCtx,
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkCommandBuffer commandBuffer);
-
- /*
- Used during defragmentation. pDefragmentationStats is optional. It's in/out
- - updated with new data.
- */
- void FreeEmptyBlocks(VmaDefragmentationStats* pDefragmentationStats);
-
- void UpdateHasEmptyBlock();
+ friend class VmaDefragmentationAlgorithm_Generic;
+
+ 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 uint32_t m_FrameInUseCount;
+ const bool m_ExplicitBlockSize;
+ const uint32_t m_Algorithm;
+ VMA_RW_MUTEX m_Mutex;
+
+ /* There can be at most one allocation that is completely empty (except when minBlockCount > 0) -
+ a hysteresis to avoid pessimistic case of alternating creation and destruction of a VkDeviceMemory. */
+ bool m_HasEmptyBlock;
+ // Incrementally sorted by sumFreeSize, ascending.
+ VmaVector< VmaDeviceMemoryBlock*, VmaStlAllocator<VmaDeviceMemoryBlock*> > m_Blocks;
+ uint32_t m_NextBlockId;
+
+ 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();
+
+ VkResult AllocatePage(
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaSuballocationType suballocType,
+ VmaAllocation* pAllocation);
+
+ // To be used only without CAN_MAKE_OTHER_LOST flag.
+ VkResult AllocateFromBlock(
+ VmaDeviceMemoryBlock* pBlock,
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ VmaAllocationCreateFlags allocFlags,
+ void* pUserData,
+ VmaSuballocationType suballocType,
+ uint32_t strategy,
+ VmaAllocation* pAllocation);
+
+ VkResult CreateBlock(VkDeviceSize blockSize, size_t* pNewBlockIndex);
+
+ // Saves result to pCtx->res.
+ void ApplyDefragmentationMovesCpu(
+ class VmaBlockVectorDefragmentationContext* pDefragCtx,
+ const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves);
+ // Saves result to pCtx->res.
+ void ApplyDefragmentationMovesGpu(
+ class VmaBlockVectorDefragmentationContext* pDefragCtx,
+ const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkCommandBuffer commandBuffer);
+
+ /*
+ Used during defragmentation. pDefragmentationStats is optional. It's in/out
+ - updated with new data.
+ */
+ void FreeEmptyBlocks(VmaDefragmentationStats* pDefragmentationStats);
+
+ void UpdateHasEmptyBlock();
};
struct VmaPool_T
{
- VMA_CLASS_NO_COPY(VmaPool_T)
+ VMA_CLASS_NO_COPY(VmaPool_T)
public:
- VmaBlockVector m_BlockVector;
+ VmaBlockVector m_BlockVector;
- VmaPool_T(
- VmaAllocator hAllocator,
- const VmaPoolCreateInfo& createInfo,
- VkDeviceSize preferredBlockSize);
- ~VmaPool_T();
+ 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; }
+ 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);
+ const char* GetName() const { return m_Name; }
+ void SetName(const char* pName);
#if VMA_STATS_STRING_ENABLED
- //void PrintDetailedMap(class VmaStringBuilder& sb);
+ //void PrintDetailedMap(class VmaStringBuilder& sb);
#endif
private:
- uint32_t m_Id;
- char* m_Name;
+ uint32_t m_Id;
+ char* m_Name;
};
/*
@@ -6561,439 +6431,422 @@ Performs defragmentation:
*/
class VmaDefragmentationAlgorithm
{
- VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm)
+ VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm)
public:
- VmaDefragmentationAlgorithm(
- VmaAllocator hAllocator,
- VmaBlockVector* pBlockVector,
- uint32_t currentFrameIndex) :
- m_hAllocator(hAllocator),
- m_pBlockVector(pBlockVector),
- m_CurrentFrameIndex(currentFrameIndex)
- {
- }
- virtual ~VmaDefragmentationAlgorithm()
- {
- }
-
- virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) = 0;
- virtual void AddAll() = 0;
-
- virtual VkResult Defragment(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- VmaDefragmentationFlags flags) = 0;
-
- virtual VkDeviceSize GetBytesMoved() const = 0;
- virtual uint32_t GetAllocationsMoved() const = 0;
+ VmaDefragmentationAlgorithm(
+ VmaAllocator hAllocator,
+ VmaBlockVector* pBlockVector,
+ uint32_t currentFrameIndex) :
+ m_hAllocator(hAllocator),
+ m_pBlockVector(pBlockVector),
+ m_CurrentFrameIndex(currentFrameIndex)
+ {
+ }
+ virtual ~VmaDefragmentationAlgorithm()
+ {
+ }
+
+ virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) = 0;
+ virtual void AddAll() = 0;
+
+ virtual VkResult Defragment(
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove) = 0;
+
+ virtual VkDeviceSize GetBytesMoved() const = 0;
+ virtual uint32_t GetAllocationsMoved() const = 0;
protected:
- VmaAllocator const m_hAllocator;
- VmaBlockVector* const m_pBlockVector;
- const uint32_t m_CurrentFrameIndex;
-
- struct AllocationInfo
- {
- VmaAllocation m_hAllocation;
- VkBool32* m_pChanged;
-
- AllocationInfo() :
- m_hAllocation(VK_NULL_HANDLE),
- m_pChanged(VMA_NULL)
- {
- }
- AllocationInfo(VmaAllocation hAlloc, VkBool32* pChanged) :
- m_hAllocation(hAlloc),
- m_pChanged(pChanged)
- {
- }
- };
+ VmaAllocator const m_hAllocator;
+ VmaBlockVector* const m_pBlockVector;
+ const uint32_t m_CurrentFrameIndex;
+
+ struct AllocationInfo
+ {
+ VmaAllocation m_hAllocation;
+ VkBool32* m_pChanged;
+
+ AllocationInfo() :
+ m_hAllocation(VK_NULL_HANDLE),
+ m_pChanged(VMA_NULL)
+ {
+ }
+ AllocationInfo(VmaAllocation hAlloc, VkBool32* pChanged) :
+ m_hAllocation(hAlloc),
+ m_pChanged(pChanged)
+ {
+ }
+ };
};
class VmaDefragmentationAlgorithm_Generic : public VmaDefragmentationAlgorithm
{
- VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm_Generic)
+ VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm_Generic)
public:
- VmaDefragmentationAlgorithm_Generic(
- VmaAllocator hAllocator,
- VmaBlockVector* pBlockVector,
- uint32_t currentFrameIndex,
- bool overlappingMoveSupported);
- virtual ~VmaDefragmentationAlgorithm_Generic();
+ VmaDefragmentationAlgorithm_Generic(
+ VmaAllocator hAllocator,
+ VmaBlockVector* pBlockVector,
+ uint32_t currentFrameIndex,
+ bool overlappingMoveSupported);
+ virtual ~VmaDefragmentationAlgorithm_Generic();
- virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged);
- virtual void AddAll() { m_AllAllocations = true; }
+ virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged);
+ virtual void AddAll() { m_AllAllocations = true; }
- virtual VkResult Defragment(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- VmaDefragmentationFlags flags);
+ virtual VkResult Defragment(
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove);
- virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
- virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
+ virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
+ virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
private:
- uint32_t m_AllocationCount;
- bool m_AllAllocations;
-
- VkDeviceSize m_BytesMoved;
- uint32_t m_AllocationsMoved;
-
- struct AllocationInfoSizeGreater
- {
- bool operator()(const AllocationInfo& lhs, const AllocationInfo& rhs) const
- {
- return lhs.m_hAllocation->GetSize() > rhs.m_hAllocation->GetSize();
- }
- };
-
- struct AllocationInfoOffsetGreater
- {
- bool operator()(const AllocationInfo& lhs, const AllocationInfo& rhs) const
- {
- return lhs.m_hAllocation->GetOffset() > rhs.m_hAllocation->GetOffset();
- }
- };
-
- struct BlockInfo
- {
- size_t m_OriginalBlockIndex;
- VmaDeviceMemoryBlock* m_pBlock;
- bool m_HasNonMovableAllocations;
- VmaVector< AllocationInfo, VmaStlAllocator<AllocationInfo> > m_Allocations;
-
- BlockInfo(const VkAllocationCallbacks* pAllocationCallbacks) :
- m_OriginalBlockIndex(SIZE_MAX),
- m_pBlock(VMA_NULL),
- m_HasNonMovableAllocations(true),
- m_Allocations(pAllocationCallbacks)
- {
- }
-
- void CalcHasNonMovableAllocations()
- {
- const size_t blockAllocCount = m_pBlock->m_pMetadata->GetAllocationCount();
- const size_t defragmentAllocCount = m_Allocations.size();
- m_HasNonMovableAllocations = blockAllocCount != defragmentAllocCount;
- }
-
- void SortAllocationsBySizeDescending()
- {
- VMA_SORT(m_Allocations.begin(), m_Allocations.end(), AllocationInfoSizeGreater());
- }
-
- void SortAllocationsByOffsetDescending()
- {
- VMA_SORT(m_Allocations.begin(), m_Allocations.end(), AllocationInfoOffsetGreater());
- }
- };
-
- struct BlockPointerLess
- {
- bool operator()(const BlockInfo* pLhsBlockInfo, const VmaDeviceMemoryBlock* pRhsBlock) const
- {
- return pLhsBlockInfo->m_pBlock < pRhsBlock;
- }
- bool operator()(const BlockInfo* pLhsBlockInfo, const BlockInfo* pRhsBlockInfo) const
- {
- return pLhsBlockInfo->m_pBlock < pRhsBlockInfo->m_pBlock;
- }
- };
-
- // 1. Blocks with some non-movable allocations go first.
- // 2. Blocks with smaller sumFreeSize go first.
- struct BlockInfoCompareMoveDestination
- {
- bool operator()(const BlockInfo* pLhsBlockInfo, const BlockInfo* pRhsBlockInfo) const
- {
- if(pLhsBlockInfo->m_HasNonMovableAllocations && !pRhsBlockInfo->m_HasNonMovableAllocations)
- {
- return true;
- }
- if(!pLhsBlockInfo->m_HasNonMovableAllocations && pRhsBlockInfo->m_HasNonMovableAllocations)
- {
- return false;
- }
- if(pLhsBlockInfo->m_pBlock->m_pMetadata->GetSumFreeSize() < pRhsBlockInfo->m_pBlock->m_pMetadata->GetSumFreeSize())
- {
- return true;
- }
- return false;
- }
- };
-
- typedef VmaVector< BlockInfo*, VmaStlAllocator<BlockInfo*> > BlockInfoVector;
- BlockInfoVector m_Blocks;
-
- VkResult DefragmentRound(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- bool freeOldAllocations);
-
- size_t CalcBlocksWithNonMovableCount() const;
-
- static bool MoveMakesSense(
- size_t dstBlockIndex, VkDeviceSize dstOffset,
- size_t srcBlockIndex, VkDeviceSize srcOffset);
+ uint32_t m_AllocationCount;
+ bool m_AllAllocations;
+
+ VkDeviceSize m_BytesMoved;
+ uint32_t m_AllocationsMoved;
+
+ struct AllocationInfoSizeGreater
+ {
+ bool operator()(const AllocationInfo& lhs, const AllocationInfo& rhs) const
+ {
+ return lhs.m_hAllocation->GetSize() > rhs.m_hAllocation->GetSize();
+ }
+ };
+
+ struct AllocationInfoOffsetGreater
+ {
+ bool operator()(const AllocationInfo& lhs, const AllocationInfo& rhs) const
+ {
+ return lhs.m_hAllocation->GetOffset() > rhs.m_hAllocation->GetOffset();
+ }
+ };
+
+ struct BlockInfo
+ {
+ size_t m_OriginalBlockIndex;
+ VmaDeviceMemoryBlock* m_pBlock;
+ bool m_HasNonMovableAllocations;
+ VmaVector< AllocationInfo, VmaStlAllocator<AllocationInfo> > m_Allocations;
+
+ BlockInfo(const VkAllocationCallbacks* pAllocationCallbacks) :
+ m_OriginalBlockIndex(SIZE_MAX),
+ m_pBlock(VMA_NULL),
+ m_HasNonMovableAllocations(true),
+ m_Allocations(pAllocationCallbacks)
+ {
+ }
+
+ void CalcHasNonMovableAllocations()
+ {
+ const size_t blockAllocCount = m_pBlock->m_pMetadata->GetAllocationCount();
+ const size_t defragmentAllocCount = m_Allocations.size();
+ m_HasNonMovableAllocations = blockAllocCount != defragmentAllocCount;
+ }
+
+ void SortAllocationsBySizeDescending()
+ {
+ VMA_SORT(m_Allocations.begin(), m_Allocations.end(), AllocationInfoSizeGreater());
+ }
+
+ void SortAllocationsByOffsetDescending()
+ {
+ VMA_SORT(m_Allocations.begin(), m_Allocations.end(), AllocationInfoOffsetGreater());
+ }
+ };
+
+ struct BlockPointerLess
+ {
+ bool operator()(const BlockInfo* pLhsBlockInfo, const VmaDeviceMemoryBlock* pRhsBlock) const
+ {
+ return pLhsBlockInfo->m_pBlock < pRhsBlock;
+ }
+ bool operator()(const BlockInfo* pLhsBlockInfo, const BlockInfo* pRhsBlockInfo) const
+ {
+ return pLhsBlockInfo->m_pBlock < pRhsBlockInfo->m_pBlock;
+ }
+ };
+
+ // 1. Blocks with some non-movable allocations go first.
+ // 2. Blocks with smaller sumFreeSize go first.
+ struct BlockInfoCompareMoveDestination
+ {
+ bool operator()(const BlockInfo* pLhsBlockInfo, const BlockInfo* pRhsBlockInfo) const
+ {
+ if(pLhsBlockInfo->m_HasNonMovableAllocations && !pRhsBlockInfo->m_HasNonMovableAllocations)
+ {
+ return true;
+ }
+ if(!pLhsBlockInfo->m_HasNonMovableAllocations && pRhsBlockInfo->m_HasNonMovableAllocations)
+ {
+ return false;
+ }
+ if(pLhsBlockInfo->m_pBlock->m_pMetadata->GetSumFreeSize() < pRhsBlockInfo->m_pBlock->m_pMetadata->GetSumFreeSize())
+ {
+ return true;
+ }
+ return false;
+ }
+ };
+
+ typedef VmaVector< BlockInfo*, VmaStlAllocator<BlockInfo*> > BlockInfoVector;
+ BlockInfoVector m_Blocks;
+
+ VkResult DefragmentRound(
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove);
+
+ size_t CalcBlocksWithNonMovableCount() const;
+
+ static bool MoveMakesSense(
+ size_t dstBlockIndex, VkDeviceSize dstOffset,
+ size_t srcBlockIndex, VkDeviceSize srcOffset);
};
class VmaDefragmentationAlgorithm_Fast : public VmaDefragmentationAlgorithm
{
- VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm_Fast)
+ VMA_CLASS_NO_COPY(VmaDefragmentationAlgorithm_Fast)
public:
- VmaDefragmentationAlgorithm_Fast(
- VmaAllocator hAllocator,
- VmaBlockVector* pBlockVector,
- uint32_t currentFrameIndex,
- bool overlappingMoveSupported);
- virtual ~VmaDefragmentationAlgorithm_Fast();
+ VmaDefragmentationAlgorithm_Fast(
+ VmaAllocator hAllocator,
+ VmaBlockVector* pBlockVector,
+ uint32_t currentFrameIndex,
+ bool overlappingMoveSupported);
+ virtual ~VmaDefragmentationAlgorithm_Fast();
- virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) { ++m_AllocationCount; }
- virtual void AddAll() { m_AllAllocations = true; }
+ virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) { ++m_AllocationCount; }
+ virtual void AddAll() { m_AllAllocations = true; }
- virtual VkResult Defragment(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- VmaDefragmentationFlags flags);
+ virtual VkResult Defragment(
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove);
- virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
- virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
+ virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; }
+ virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; }
private:
- struct BlockInfo
- {
- size_t origBlockIndex;
- };
-
- class FreeSpaceDatabase
- {
- public:
- FreeSpaceDatabase()
- {
- FreeSpace s = {};
- s.blockInfoIndex = SIZE_MAX;
- for(size_t i = 0; i < MAX_COUNT; ++i)
- {
- m_FreeSpaces[i] = s;
- }
- }
-
- void Register(size_t blockInfoIndex, VkDeviceSize offset, VkDeviceSize size)
- {
- if(size < VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- return;
- }
-
- // Find first invalid or the smallest structure.
- size_t bestIndex = SIZE_MAX;
- for(size_t i = 0; i < MAX_COUNT; ++i)
- {
- // Empty structure.
- if(m_FreeSpaces[i].blockInfoIndex == SIZE_MAX)
- {
- bestIndex = i;
- break;
- }
- if(m_FreeSpaces[i].size < size &&
- (bestIndex == SIZE_MAX || m_FreeSpaces[bestIndex].size > m_FreeSpaces[i].size))
- {
- bestIndex = i;
- }
- }
-
- if(bestIndex != SIZE_MAX)
- {
- m_FreeSpaces[bestIndex].blockInfoIndex = blockInfoIndex;
- m_FreeSpaces[bestIndex].offset = offset;
- m_FreeSpaces[bestIndex].size = size;
- }
- }
-
- bool Fetch(VkDeviceSize alignment, VkDeviceSize size,
- size_t& outBlockInfoIndex, VkDeviceSize& outDstOffset)
- {
- size_t bestIndex = SIZE_MAX;
- VkDeviceSize bestFreeSpaceAfter = 0;
- for(size_t i = 0; i < MAX_COUNT; ++i)
- {
- // Structure is valid.
- if(m_FreeSpaces[i].blockInfoIndex != SIZE_MAX)
- {
- const VkDeviceSize dstOffset = VmaAlignUp(m_FreeSpaces[i].offset, alignment);
- // Allocation fits into this structure.
- if(dstOffset + size <= m_FreeSpaces[i].offset + m_FreeSpaces[i].size)
- {
- const VkDeviceSize freeSpaceAfter = (m_FreeSpaces[i].offset + m_FreeSpaces[i].size) -
- (dstOffset + size);
- if(bestIndex == SIZE_MAX || freeSpaceAfter > bestFreeSpaceAfter)
- {
- bestIndex = i;
- bestFreeSpaceAfter = freeSpaceAfter;
- }
- }
- }
- }
-
- if(bestIndex != SIZE_MAX)
- {
- outBlockInfoIndex = m_FreeSpaces[bestIndex].blockInfoIndex;
- outDstOffset = VmaAlignUp(m_FreeSpaces[bestIndex].offset, alignment);
-
- if(bestFreeSpaceAfter >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- // Leave this structure for remaining empty space.
- const VkDeviceSize alignmentPlusSize = (outDstOffset - m_FreeSpaces[bestIndex].offset) + size;
- m_FreeSpaces[bestIndex].offset += alignmentPlusSize;
- m_FreeSpaces[bestIndex].size -= alignmentPlusSize;
- }
- else
- {
- // This structure becomes invalid.
- m_FreeSpaces[bestIndex].blockInfoIndex = SIZE_MAX;
- }
-
- return true;
- }
-
- return false;
- }
-
- private:
- static const size_t MAX_COUNT = 4;
-
- struct FreeSpace
- {
- size_t blockInfoIndex; // SIZE_MAX means this structure is invalid.
- VkDeviceSize offset;
- VkDeviceSize size;
- } m_FreeSpaces[MAX_COUNT];
- };
-
- const bool m_OverlappingMoveSupported;
-
- uint32_t m_AllocationCount;
- bool m_AllAllocations;
-
- VkDeviceSize m_BytesMoved;
- uint32_t m_AllocationsMoved;
-
- VmaVector< BlockInfo, VmaStlAllocator<BlockInfo> > m_BlockInfos;
-
- void PreprocessMetadata();
- void PostprocessMetadata();
- void InsertSuballoc(VmaBlockMetadata_Generic* pMetadata, const VmaSuballocation& suballoc);
+ struct BlockInfo
+ {
+ size_t origBlockIndex;
+ };
+
+ class FreeSpaceDatabase
+ {
+ public:
+ FreeSpaceDatabase()
+ {
+ FreeSpace s = {};
+ s.blockInfoIndex = SIZE_MAX;
+ for(size_t i = 0; i < MAX_COUNT; ++i)
+ {
+ m_FreeSpaces[i] = s;
+ }
+ }
+
+ void Register(size_t blockInfoIndex, VkDeviceSize offset, VkDeviceSize size)
+ {
+ if(size < VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ return;
+ }
+
+ // Find first invalid or the smallest structure.
+ size_t bestIndex = SIZE_MAX;
+ for(size_t i = 0; i < MAX_COUNT; ++i)
+ {
+ // Empty structure.
+ if(m_FreeSpaces[i].blockInfoIndex == SIZE_MAX)
+ {
+ bestIndex = i;
+ break;
+ }
+ if(m_FreeSpaces[i].size < size &&
+ (bestIndex == SIZE_MAX || m_FreeSpaces[bestIndex].size > m_FreeSpaces[i].size))
+ {
+ bestIndex = i;
+ }
+ }
+
+ if(bestIndex != SIZE_MAX)
+ {
+ m_FreeSpaces[bestIndex].blockInfoIndex = blockInfoIndex;
+ m_FreeSpaces[bestIndex].offset = offset;
+ m_FreeSpaces[bestIndex].size = size;
+ }
+ }
+
+ bool Fetch(VkDeviceSize alignment, VkDeviceSize size,
+ size_t& outBlockInfoIndex, VkDeviceSize& outDstOffset)
+ {
+ size_t bestIndex = SIZE_MAX;
+ VkDeviceSize bestFreeSpaceAfter = 0;
+ for(size_t i = 0; i < MAX_COUNT; ++i)
+ {
+ // Structure is valid.
+ if(m_FreeSpaces[i].blockInfoIndex != SIZE_MAX)
+ {
+ const VkDeviceSize dstOffset = VmaAlignUp(m_FreeSpaces[i].offset, alignment);
+ // Allocation fits into this structure.
+ if(dstOffset + size <= m_FreeSpaces[i].offset + m_FreeSpaces[i].size)
+ {
+ const VkDeviceSize freeSpaceAfter = (m_FreeSpaces[i].offset + m_FreeSpaces[i].size) -
+ (dstOffset + size);
+ if(bestIndex == SIZE_MAX || freeSpaceAfter > bestFreeSpaceAfter)
+ {
+ bestIndex = i;
+ bestFreeSpaceAfter = freeSpaceAfter;
+ }
+ }
+ }
+ }
+
+ if(bestIndex != SIZE_MAX)
+ {
+ outBlockInfoIndex = m_FreeSpaces[bestIndex].blockInfoIndex;
+ outDstOffset = VmaAlignUp(m_FreeSpaces[bestIndex].offset, alignment);
+
+ if(bestFreeSpaceAfter >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ // Leave this structure for remaining empty space.
+ const VkDeviceSize alignmentPlusSize = (outDstOffset - m_FreeSpaces[bestIndex].offset) + size;
+ m_FreeSpaces[bestIndex].offset += alignmentPlusSize;
+ m_FreeSpaces[bestIndex].size -= alignmentPlusSize;
+ }
+ else
+ {
+ // This structure becomes invalid.
+ m_FreeSpaces[bestIndex].blockInfoIndex = SIZE_MAX;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ private:
+ static const size_t MAX_COUNT = 4;
+
+ struct FreeSpace
+ {
+ size_t blockInfoIndex; // SIZE_MAX means this structure is invalid.
+ VkDeviceSize offset;
+ VkDeviceSize size;
+ } m_FreeSpaces[MAX_COUNT];
+ };
+
+ const bool m_OverlappingMoveSupported;
+
+ uint32_t m_AllocationCount;
+ bool m_AllAllocations;
+
+ VkDeviceSize m_BytesMoved;
+ uint32_t m_AllocationsMoved;
+
+ VmaVector< BlockInfo, VmaStlAllocator<BlockInfo> > m_BlockInfos;
+
+ void PreprocessMetadata();
+ void PostprocessMetadata();
+ void InsertSuballoc(VmaBlockMetadata_Generic* pMetadata, const VmaSuballocation& suballoc);
};
struct VmaBlockDefragmentationContext
{
- enum BLOCK_FLAG
- {
- BLOCK_FLAG_USED = 0x00000001,
- };
- uint32_t flags;
- VkBuffer hBuffer;
+ enum BLOCK_FLAG
+ {
+ BLOCK_FLAG_USED = 0x00000001,
+ };
+ uint32_t flags;
+ VkBuffer hBuffer;
};
class VmaBlockVectorDefragmentationContext
{
- VMA_CLASS_NO_COPY(VmaBlockVectorDefragmentationContext)
+ VMA_CLASS_NO_COPY(VmaBlockVectorDefragmentationContext)
public:
- VkResult res;
- bool mutexLocked;
- VmaVector< VmaBlockDefragmentationContext, VmaStlAllocator<VmaBlockDefragmentationContext> > blockContexts;
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> > defragmentationMoves;
- uint32_t defragmentationMovesProcessed;
- uint32_t defragmentationMovesCommitted;
- bool hasDefragmentationPlan;
-
- VmaBlockVectorDefragmentationContext(
- VmaAllocator hAllocator,
- VmaPool hCustomPool, // Optional.
- VmaBlockVector* pBlockVector,
- uint32_t currFrameIndex);
- ~VmaBlockVectorDefragmentationContext();
-
- VmaPool GetCustomPool() const { return m_hCustomPool; }
- VmaBlockVector* GetBlockVector() const { return m_pBlockVector; }
- VmaDefragmentationAlgorithm* GetAlgorithm() const { return m_pAlgorithm; }
-
- void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged);
- void AddAll() { m_AllAllocations = true; }
-
- void Begin(bool overlappingMoveSupported, VmaDefragmentationFlags flags);
+ VkResult res;
+ bool mutexLocked;
+ VmaVector< VmaBlockDefragmentationContext, VmaStlAllocator<VmaBlockDefragmentationContext> > blockContexts;
+
+ VmaBlockVectorDefragmentationContext(
+ VmaAllocator hAllocator,
+ VmaPool hCustomPool, // Optional.
+ VmaBlockVector* pBlockVector,
+ uint32_t currFrameIndex);
+ ~VmaBlockVectorDefragmentationContext();
+
+ VmaPool GetCustomPool() const { return m_hCustomPool; }
+ VmaBlockVector* GetBlockVector() const { return m_pBlockVector; }
+ VmaDefragmentationAlgorithm* GetAlgorithm() const { return m_pAlgorithm; }
+
+ void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged);
+ void AddAll() { m_AllAllocations = true; }
+
+ void Begin(bool overlappingMoveSupported);
private:
- const VmaAllocator m_hAllocator;
- // Null if not from custom pool.
- const VmaPool m_hCustomPool;
- // Redundant, for convenience not to fetch from m_hCustomPool->m_BlockVector or m_hAllocator->m_pBlockVectors.
- VmaBlockVector* const m_pBlockVector;
- const uint32_t m_CurrFrameIndex;
- // Owner of this object.
- VmaDefragmentationAlgorithm* m_pAlgorithm;
-
- struct AllocInfo
- {
- VmaAllocation hAlloc;
- VkBool32* pChanged;
- };
- // Used between constructor and Begin.
- VmaVector< AllocInfo, VmaStlAllocator<AllocInfo> > m_Allocations;
- bool m_AllAllocations;
+ const VmaAllocator m_hAllocator;
+ // Null if not from custom pool.
+ const VmaPool m_hCustomPool;
+ // Redundant, for convenience not to fetch from m_hCustomPool->m_BlockVector or m_hAllocator->m_pBlockVectors.
+ VmaBlockVector* const m_pBlockVector;
+ const uint32_t m_CurrFrameIndex;
+ // Owner of this object.
+ VmaDefragmentationAlgorithm* m_pAlgorithm;
+
+ struct AllocInfo
+ {
+ VmaAllocation hAlloc;
+ VkBool32* pChanged;
+ };
+ // Used between constructor and Begin.
+ VmaVector< AllocInfo, VmaStlAllocator<AllocInfo> > m_Allocations;
+ bool m_AllAllocations;
};
struct VmaDefragmentationContext_T
{
private:
- VMA_CLASS_NO_COPY(VmaDefragmentationContext_T)
+ VMA_CLASS_NO_COPY(VmaDefragmentationContext_T)
public:
- VmaDefragmentationContext_T(
- VmaAllocator hAllocator,
- uint32_t currFrameIndex,
- uint32_t flags,
- VmaDefragmentationStats* pStats);
- ~VmaDefragmentationContext_T();
-
- void AddPools(uint32_t poolCount, VmaPool* pPools);
- void AddAllocations(
- uint32_t allocationCount,
- VmaAllocation* pAllocations,
- VkBool32* pAllocationsChanged);
-
- /*
- Returns:
- - `VK_SUCCESS` if succeeded and object can be destroyed immediately.
- - `VK_NOT_READY` if succeeded but the object must remain alive until vmaDefragmentationEnd().
- - Negative value if error occured and object can be destroyed immediately.
- */
- VkResult Defragment(
- VkDeviceSize maxCpuBytesToMove, uint32_t maxCpuAllocationsToMove,
- VkDeviceSize maxGpuBytesToMove, uint32_t maxGpuAllocationsToMove,
- VkCommandBuffer commandBuffer, VmaDefragmentationStats* pStats, VmaDefragmentationFlags flags);
-
- VkResult DefragmentPassBegin(VmaDefragmentationPassInfo* pInfo);
- VkResult DefragmentPassEnd();
+ VmaDefragmentationContext_T(
+ VmaAllocator hAllocator,
+ uint32_t currFrameIndex,
+ uint32_t flags,
+ VmaDefragmentationStats* pStats);
+ ~VmaDefragmentationContext_T();
+
+ void AddPools(uint32_t poolCount, VmaPool* pPools);
+ void AddAllocations(
+ uint32_t allocationCount,
+ VmaAllocation* pAllocations,
+ VkBool32* pAllocationsChanged);
+
+ /*
+ Returns:
+ - `VK_SUCCESS` if succeeded and object can be destroyed immediately.
+ - `VK_NOT_READY` if succeeded but the object must remain alive until vmaDefragmentationEnd().
+ - Negative value if error occured and object can be destroyed immediately.
+ */
+ VkResult Defragment(
+ VkDeviceSize maxCpuBytesToMove, uint32_t maxCpuAllocationsToMove,
+ VkDeviceSize maxGpuBytesToMove, uint32_t maxGpuAllocationsToMove,
+ VkCommandBuffer commandBuffer, VmaDefragmentationStats* pStats);
private:
- const VmaAllocator m_hAllocator;
- const uint32_t m_CurrFrameIndex;
- const uint32_t m_Flags;
- VmaDefragmentationStats* const m_pStats;
-
- VkDeviceSize m_MaxCpuBytesToMove;
- uint32_t m_MaxCpuAllocationsToMove;
- VkDeviceSize m_MaxGpuBytesToMove;
- uint32_t m_MaxGpuAllocationsToMove;
-
- // Owner of these objects.
- VmaBlockVectorDefragmentationContext* m_DefaultPoolContexts[VK_MAX_MEMORY_TYPES];
- // Owner of these objects.
- VmaVector< VmaBlockVectorDefragmentationContext*, VmaStlAllocator<VmaBlockVectorDefragmentationContext*> > m_CustomPoolContexts;
+ const VmaAllocator m_hAllocator;
+ const uint32_t m_CurrFrameIndex;
+ const uint32_t m_Flags;
+ VmaDefragmentationStats* const m_pStats;
+ // Owner of these objects.
+ VmaBlockVectorDefragmentationContext* m_DefaultPoolContexts[VK_MAX_MEMORY_TYPES];
+ // Owner of these objects.
+ VmaVector< VmaBlockVectorDefragmentationContext*, VmaStlAllocator<VmaBlockVectorDefragmentationContext*> > m_CustomPoolContexts;
};
#if VMA_RECORDING_ENABLED
@@ -7001,133 +6854,132 @@ private:
class VmaRecorder
{
public:
- VmaRecorder();
- VkResult Init(const VmaRecordSettings& settings, bool useMutex);
- void WriteConfiguration(
- const VkPhysicalDeviceProperties& devProps,
- const VkPhysicalDeviceMemoryProperties& memProps,
- uint32_t vulkanApiVersion,
- bool dedicatedAllocationExtensionEnabled,
- bool bindMemory2ExtensionEnabled,
- bool memoryBudgetExtensionEnabled,
- bool deviceCoherentMemoryExtensionEnabled);
- ~VmaRecorder();
-
- void RecordCreateAllocator(uint32_t frameIndex);
- void RecordDestroyAllocator(uint32_t frameIndex);
- void RecordCreatePool(uint32_t frameIndex,
- const VmaPoolCreateInfo& createInfo,
- VmaPool pool);
- void RecordDestroyPool(uint32_t frameIndex, VmaPool pool);
- void RecordAllocateMemory(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation);
- void RecordAllocateMemoryPages(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- const VmaAllocationCreateInfo& createInfo,
- uint64_t allocationCount,
- const VmaAllocation* pAllocations);
- void RecordAllocateMemoryForBuffer(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation);
- void RecordAllocateMemoryForImage(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation);
- void RecordFreeMemory(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordFreeMemoryPages(uint32_t frameIndex,
- uint64_t allocationCount,
- const VmaAllocation* pAllocations);
- void RecordSetAllocationUserData(uint32_t frameIndex,
- VmaAllocation allocation,
- const void* pUserData);
- void RecordCreateLostAllocation(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordMapMemory(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordUnmapMemory(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordFlushAllocation(uint32_t frameIndex,
- VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
- void RecordInvalidateAllocation(uint32_t frameIndex,
- VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
- void RecordCreateBuffer(uint32_t frameIndex,
- const VkBufferCreateInfo& bufCreateInfo,
- const VmaAllocationCreateInfo& allocCreateInfo,
- VmaAllocation allocation);
- void RecordCreateImage(uint32_t frameIndex,
- const VkImageCreateInfo& imageCreateInfo,
- const VmaAllocationCreateInfo& allocCreateInfo,
- VmaAllocation allocation);
- void RecordDestroyBuffer(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordDestroyImage(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordTouchAllocation(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordGetAllocationInfo(uint32_t frameIndex,
- VmaAllocation allocation);
- void RecordMakePoolAllocationsLost(uint32_t frameIndex,
- VmaPool pool);
- void RecordDefragmentationBegin(uint32_t frameIndex,
- const VmaDefragmentationInfo2& info,
- VmaDefragmentationContext ctx);
- void RecordDefragmentationEnd(uint32_t frameIndex,
- VmaDefragmentationContext ctx);
- void RecordSetPoolName(uint32_t frameIndex,
- VmaPool pool,
- const char* name);
+ VmaRecorder();
+ VkResult Init(const VmaRecordSettings& settings, bool useMutex);
+ void WriteConfiguration(
+ const VkPhysicalDeviceProperties& devProps,
+ const VkPhysicalDeviceMemoryProperties& memProps,
+ uint32_t vulkanApiVersion,
+ bool dedicatedAllocationExtensionEnabled,
+ bool bindMemory2ExtensionEnabled,
+ bool memoryBudgetExtensionEnabled);
+ ~VmaRecorder();
+
+ void RecordCreateAllocator(uint32_t frameIndex);
+ void RecordDestroyAllocator(uint32_t frameIndex);
+ void RecordCreatePool(uint32_t frameIndex,
+ const VmaPoolCreateInfo& createInfo,
+ VmaPool pool);
+ void RecordDestroyPool(uint32_t frameIndex, VmaPool pool);
+ void RecordAllocateMemory(uint32_t frameIndex,
+ const VkMemoryRequirements& vkMemReq,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation);
+ void RecordAllocateMemoryPages(uint32_t frameIndex,
+ const VkMemoryRequirements& vkMemReq,
+ const VmaAllocationCreateInfo& createInfo,
+ uint64_t allocationCount,
+ const VmaAllocation* pAllocations);
+ void RecordAllocateMemoryForBuffer(uint32_t frameIndex,
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation);
+ void RecordAllocateMemoryForImage(uint32_t frameIndex,
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation);
+ void RecordFreeMemory(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordFreeMemoryPages(uint32_t frameIndex,
+ uint64_t allocationCount,
+ const VmaAllocation* pAllocations);
+ void RecordSetAllocationUserData(uint32_t frameIndex,
+ VmaAllocation allocation,
+ const void* pUserData);
+ void RecordCreateLostAllocation(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordMapMemory(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordUnmapMemory(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordFlushAllocation(uint32_t frameIndex,
+ VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
+ void RecordInvalidateAllocation(uint32_t frameIndex,
+ VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
+ void RecordCreateBuffer(uint32_t frameIndex,
+ const VkBufferCreateInfo& bufCreateInfo,
+ const VmaAllocationCreateInfo& allocCreateInfo,
+ VmaAllocation allocation);
+ void RecordCreateImage(uint32_t frameIndex,
+ const VkImageCreateInfo& imageCreateInfo,
+ const VmaAllocationCreateInfo& allocCreateInfo,
+ VmaAllocation allocation);
+ void RecordDestroyBuffer(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordDestroyImage(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordTouchAllocation(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordGetAllocationInfo(uint32_t frameIndex,
+ VmaAllocation allocation);
+ void RecordMakePoolAllocationsLost(uint32_t frameIndex,
+ VmaPool pool);
+ void RecordDefragmentationBegin(uint32_t frameIndex,
+ const VmaDefragmentationInfo2& info,
+ VmaDefragmentationContext ctx);
+ void RecordDefragmentationEnd(uint32_t frameIndex,
+ VmaDefragmentationContext ctx);
+ void RecordSetPoolName(uint32_t frameIndex,
+ VmaPool pool,
+ const char* name);
private:
- struct CallParams
- {
- uint32_t threadId;
- double time;
- };
-
- class UserDataString
- {
- public:
- UserDataString(VmaAllocationCreateFlags allocFlags, const void* pUserData);
- const char* GetString() const { return m_Str; }
-
- private:
- char m_PtrStr[17];
- const char* m_Str;
- };
-
- bool m_UseMutex;
- VmaRecordFlags m_Flags;
- FILE* m_File;
- VMA_MUTEX m_FileMutex;
- int64_t m_Freq;
- int64_t m_StartCounter;
-
- void GetBasicParams(CallParams& outParams);
-
- // T must be a pointer type, e.g. VmaAllocation, VmaPool.
- template<typename T>
- void PrintPointerList(uint64_t count, const T* pItems)
- {
- if(count)
- {
- fprintf(m_File, "%p", pItems[0]);
- for(uint64_t i = 1; i < count; ++i)
- {
- fprintf(m_File, " %p", pItems[i]);
- }
- }
- }
-
- void PrintPointerList(uint64_t count, const VmaAllocation* pItems);
- void Flush();
+ struct CallParams
+ {
+ uint32_t threadId;
+ double time;
+ };
+
+ class UserDataString
+ {
+ public:
+ UserDataString(VmaAllocationCreateFlags allocFlags, const void* pUserData);
+ const char* GetString() const { return m_Str; }
+
+ private:
+ char m_PtrStr[17];
+ const char* m_Str;
+ };
+
+ bool m_UseMutex;
+ VmaRecordFlags m_Flags;
+ FILE* m_File;
+ VMA_MUTEX m_FileMutex;
+ int64_t m_Freq;
+ int64_t m_StartCounter;
+
+ void GetBasicParams(CallParams& outParams);
+
+ // T must be a pointer type, e.g. VmaAllocation, VmaPool.
+ template<typename T>
+ void PrintPointerList(uint64_t count, const T* pItems)
+ {
+ if(count)
+ {
+ fprintf(m_File, "%p", pItems[0]);
+ for(uint64_t i = 1; i < count; ++i)
+ {
+ fprintf(m_File, " %p", pItems[i]);
+ }
+ }
+ }
+
+ void PrintPointerList(uint64_t count, const VmaAllocation* pItems);
+ void Flush();
};
#endif // #if VMA_RECORDING_ENABLED
@@ -7137,344 +6989,330 @@ Thread-safe wrapper over VmaPoolAllocator free list, for allocation of VmaAlloca
*/
class VmaAllocationObjectAllocator
{
- VMA_CLASS_NO_COPY(VmaAllocationObjectAllocator)
+ VMA_CLASS_NO_COPY(VmaAllocationObjectAllocator)
public:
- VmaAllocationObjectAllocator(const VkAllocationCallbacks* pAllocationCallbacks);
+ VmaAllocationObjectAllocator(const VkAllocationCallbacks* pAllocationCallbacks);
- template<typename... Types> VmaAllocation Allocate(Types... args);
- void Free(VmaAllocation hAlloc);
+ VmaAllocation Allocate();
+ void Free(VmaAllocation hAlloc);
private:
- VMA_MUTEX m_Mutex;
- VmaPoolAllocator<VmaAllocation_T> m_Allocator;
+ VMA_MUTEX m_Mutex;
+ VmaPoolAllocator<VmaAllocation_T> m_Allocator;
};
struct VmaCurrentBudgetData
{
- VMA_ATOMIC_UINT64 m_BlockBytes[VK_MAX_MEMORY_HEAPS];
- VMA_ATOMIC_UINT64 m_AllocationBytes[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];
+ 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 // #if VMA_MEMORY_BUDGET
- VmaCurrentBudgetData()
- {
- for(uint32_t heapIndex = 0; heapIndex < VK_MAX_MEMORY_HEAPS; ++heapIndex)
- {
- m_BlockBytes[heapIndex] = 0;
- m_AllocationBytes[heapIndex] = 0;
+ VmaCurrentBudgetData()
+ {
+ for(uint32_t heapIndex = 0; heapIndex < VK_MAX_MEMORY_HEAPS; ++heapIndex)
+ {
+ m_BlockBytes[heapIndex] = 0;
+ m_AllocationBytes[heapIndex] = 0;
#if VMA_MEMORY_BUDGET
- m_VulkanUsage[heapIndex] = 0;
- m_VulkanBudget[heapIndex] = 0;
- m_BlockBytesAtBudgetFetch[heapIndex] = 0;
+ m_VulkanUsage[heapIndex] = 0;
+ m_VulkanBudget[heapIndex] = 0;
+ m_BlockBytesAtBudgetFetch[heapIndex] = 0;
#endif
- }
+ }
#if VMA_MEMORY_BUDGET
- m_OperationsSinceBudgetFetch = 0;
+ m_OperationsSinceBudgetFetch = 0;
#endif
- }
+ }
- void AddAllocation(uint32_t heapIndex, VkDeviceSize allocationSize)
- {
- m_AllocationBytes[heapIndex] += allocationSize;
+ void AddAllocation(uint32_t heapIndex, VkDeviceSize allocationSize)
+ {
+ m_AllocationBytes[heapIndex] += allocationSize;
#if VMA_MEMORY_BUDGET
- ++m_OperationsSinceBudgetFetch;
+ ++m_OperationsSinceBudgetFetch;
#endif
- }
+ }
- void RemoveAllocation(uint32_t heapIndex, VkDeviceSize allocationSize)
- {
- VMA_ASSERT(m_AllocationBytes[heapIndex] >= allocationSize); // DELME
- m_AllocationBytes[heapIndex] -= allocationSize;
+ void RemoveAllocation(uint32_t heapIndex, VkDeviceSize allocationSize)
+ {
+ VMA_ASSERT(m_AllocationBytes[heapIndex] >= allocationSize); // DELME
+ m_AllocationBytes[heapIndex] -= allocationSize;
#if VMA_MEMORY_BUDGET
- ++m_OperationsSinceBudgetFetch;
+ ++m_OperationsSinceBudgetFetch;
#endif
- }
+ }
};
// Main allocator object.
struct VmaAllocator_T
{
- VMA_CLASS_NO_COPY(VmaAllocator_T)
+ VMA_CLASS_NO_COPY(VmaAllocator_T)
public:
- bool m_UseMutex;
- 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;
- VkDevice m_hDevice;
- VkInstance m_hInstance;
- bool m_AllocationCallbacksSpecified;
- 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];
-
- // Each vector is sorted by memory (handle value).
- typedef VmaVector< VmaAllocation, VmaStlAllocator<VmaAllocation> > AllocationVectorType;
- AllocationVectorType* m_pDedicatedAllocations[VK_MAX_MEMORY_TYPES];
- VMA_RW_MUTEX m_DedicatedAllocationsMutex[VK_MAX_MEMORY_TYPES];
-
- VmaCurrentBudgetData m_Budget;
-
- VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo);
- VkResult Init(const VmaAllocatorCreateInfo* pCreateInfo);
- ~VmaAllocator_T();
-
- const VkAllocationCallbacks* GetAllocationCallbacks() const
- {
- return m_AllocationCallbacksSpecified ? &m_AllocationCallbacks : 0;
- }
- const VmaVulkanFunctions& GetVulkanFunctions() const
- {
- return m_VulkanFunctions;
- }
-
- VkDeviceSize GetBufferImageGranularity() const
- {
- return VMA_MAX(
- static_cast<VkDeviceSize>(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_DEBUG_ALIGNMENT, m_PhysicalDeviceProperties.limits.nonCoherentAtomSize) :
- (VkDeviceSize)VMA_DEBUG_ALIGNMENT;
- }
-
- bool IsIntegratedGpu() const
- {
- return m_PhysicalDeviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
- }
-
- uint32_t GetGlobalMemoryTypeBits() const { return m_GlobalMemoryTypeBits; }
+ bool m_UseMutex;
+ 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;
+ VkDevice m_hDevice;
+ VkInstance m_hInstance;
+ bool m_AllocationCallbacksSpecified;
+ 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];
+
+ // Each vector is sorted by memory (handle value).
+ typedef VmaVector< VmaAllocation, VmaStlAllocator<VmaAllocation> > AllocationVectorType;
+ AllocationVectorType* m_pDedicatedAllocations[VK_MAX_MEMORY_TYPES];
+ VMA_RW_MUTEX m_DedicatedAllocationsMutex[VK_MAX_MEMORY_TYPES];
+
+ VmaCurrentBudgetData m_Budget;
+
+ VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo);
+ VkResult Init(const VmaAllocatorCreateInfo* pCreateInfo);
+ ~VmaAllocator_T();
+
+ const VkAllocationCallbacks* GetAllocationCallbacks() const
+ {
+ return m_AllocationCallbacksSpecified ? &m_AllocationCallbacks : 0;
+ }
+ const VmaVulkanFunctions& GetVulkanFunctions() const
+ {
+ return m_VulkanFunctions;
+ }
+
+ VkDeviceSize GetBufferImageGranularity() const
+ {
+ return VMA_MAX(
+ static_cast<VkDeviceSize>(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_DEBUG_ALIGNMENT, m_PhysicalDeviceProperties.limits.nonCoherentAtomSize) :
+ (VkDeviceSize)VMA_DEBUG_ALIGNMENT;
+ }
+
+ bool IsIntegratedGpu() const
+ {
+ return m_PhysicalDeviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
+ }
#if VMA_RECORDING_ENABLED
- VmaRecorder* GetRecorder() const { return m_pRecorder; }
+ VmaRecorder* GetRecorder() const { return m_pRecorder; }
#endif
- void GetBufferMemoryRequirements(
- VkBuffer hBuffer,
- VkMemoryRequirements& memReq,
- bool& requiresDedicatedAllocation,
- bool& prefersDedicatedAllocation) const;
- void GetImageMemoryRequirements(
- VkImage hImage,
- VkMemoryRequirements& memReq,
- bool& requiresDedicatedAllocation,
- bool& prefersDedicatedAllocation) const;
-
- // Main allocation function.
- VkResult AllocateMemory(
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- const VmaAllocationCreateInfo& createInfo,
- VmaSuballocationType suballocType,
- size_t allocationCount,
- VmaAllocation* pAllocations);
-
- // Main deallocation function.
- void FreeMemory(
- size_t allocationCount,
- const VmaAllocation* pAllocations);
-
- VkResult ResizeAllocation(
- const VmaAllocation alloc,
- VkDeviceSize newSize);
-
- void CalculateStats(VmaStats* pStats);
-
- void GetBudget(
- VmaBudget* outBudget, uint32_t firstHeap, uint32_t heapCount);
+ void GetBufferMemoryRequirements(
+ VkBuffer hBuffer,
+ VkMemoryRequirements& memReq,
+ bool& requiresDedicatedAllocation,
+ bool& prefersDedicatedAllocation) const;
+ void GetImageMemoryRequirements(
+ VkImage hImage,
+ VkMemoryRequirements& memReq,
+ bool& requiresDedicatedAllocation,
+ bool& prefersDedicatedAllocation) const;
+
+ // Main allocation function.
+ VkResult AllocateMemory(
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaSuballocationType suballocType,
+ size_t allocationCount,
+ VmaAllocation* pAllocations);
+
+ // Main deallocation function.
+ void FreeMemory(
+ size_t allocationCount,
+ const VmaAllocation* pAllocations);
+
+ VkResult ResizeAllocation(
+ const VmaAllocation alloc,
+ VkDeviceSize newSize);
+
+ void CalculateStats(VmaStats* pStats);
+
+ void GetBudget(
+ VmaBudget* outBudget, uint32_t firstHeap, uint32_t heapCount);
#if VMA_STATS_STRING_ENABLED
- void PrintDetailedMap(class VmaJsonWriter& json);
+ void PrintDetailedMap(class VmaJsonWriter& json);
#endif
- VkResult DefragmentationBegin(
- const VmaDefragmentationInfo2& info,
- VmaDefragmentationStats* pStats,
- VmaDefragmentationContext* pContext);
- VkResult DefragmentationEnd(
- VmaDefragmentationContext context);
-
- VkResult DefragmentationPassBegin(
- VmaDefragmentationPassInfo* pInfo,
- VmaDefragmentationContext context);
- VkResult DefragmentationPassEnd(
- VmaDefragmentationContext context);
-
- void GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo);
- bool TouchAllocation(VmaAllocation hAllocation);
-
- VkResult CreatePool(const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool);
- void DestroyPool(VmaPool pool);
- void GetPoolStats(VmaPool pool, VmaPoolStats* pPoolStats);
-
- void SetCurrentFrameIndex(uint32_t frameIndex);
- uint32_t GetCurrentFrameIndex() const { return m_CurrentFrameIndex.load(); }
-
- void MakePoolAllocationsLost(
- VmaPool hPool,
- size_t* pLostAllocationCount);
- VkResult CheckPoolCorruption(VmaPool hPool);
- VkResult CheckCorruption(uint32_t memoryTypeBits);
-
- void CreateLostAllocation(VmaAllocation* pAllocation);
-
- // 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);
-
- void FlushOrInvalidateAllocation(
- VmaAllocation hAllocation,
- VkDeviceSize offset, VkDeviceSize size,
- VMA_CACHE_OPERATION op);
-
- 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();
+ VkResult DefragmentationBegin(
+ const VmaDefragmentationInfo2& info,
+ VmaDefragmentationStats* pStats,
+ VmaDefragmentationContext* pContext);
+ VkResult DefragmentationEnd(
+ VmaDefragmentationContext context);
+
+ void GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo);
+ bool TouchAllocation(VmaAllocation hAllocation);
+
+ VkResult CreatePool(const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool);
+ void DestroyPool(VmaPool pool);
+ void GetPoolStats(VmaPool pool, VmaPoolStats* pPoolStats);
+
+ void SetCurrentFrameIndex(uint32_t frameIndex);
+ uint32_t GetCurrentFrameIndex() const { return m_CurrentFrameIndex.load(); }
+
+ void MakePoolAllocationsLost(
+ VmaPool hPool,
+ size_t* pLostAllocationCount);
+ VkResult CheckPoolCorruption(VmaPool hPool);
+ VkResult CheckCorruption(uint32_t memoryTypeBits);
+
+ void CreateLostAllocation(VmaAllocation* pAllocation);
+
+ // 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);
+
+ void FlushOrInvalidateAllocation(
+ VmaAllocation hAllocation,
+ VkDeviceSize offset, VkDeviceSize size,
+ VMA_CACHE_OPERATION op);
+
+ 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();
private:
- VkDeviceSize m_PreferredLargeHeapBlockSize;
-
- VkPhysicalDevice m_PhysicalDevice;
- VMA_ATOMIC_UINT32 m_CurrentFrameIndex;
- VMA_ATOMIC_UINT32 m_GpuDefragmentationMemoryTypeBits; // UINT32_MAX means uninitialized.
-
- VMA_RW_MUTEX m_PoolsMutex;
- // Protected by m_PoolsMutex. Sorted by pointer value.
- VmaVector<VmaPool, VmaStlAllocator<VmaPool> > m_Pools;
- uint32_t m_NextPoolId;
+ VkDeviceSize m_PreferredLargeHeapBlockSize;
- VmaVulkanFunctions m_VulkanFunctions;
+ VkPhysicalDevice m_PhysicalDevice;
+ VMA_ATOMIC_UINT32 m_CurrentFrameIndex;
+ VMA_ATOMIC_UINT32 m_GpuDefragmentationMemoryTypeBits; // UINT32_MAX means uninitialized.
+
+ VMA_RW_MUTEX m_PoolsMutex;
+ // Protected by m_PoolsMutex. Sorted by pointer value.
+ VmaVector<VmaPool, VmaStlAllocator<VmaPool> > m_Pools;
+ uint32_t m_NextPoolId;
- // Global bit mask AND-ed with any memoryTypeBits to disallow certain memory types.
- uint32_t m_GlobalMemoryTypeBits;
+ VmaVulkanFunctions m_VulkanFunctions;
#if VMA_RECORDING_ENABLED
- VmaRecorder* m_pRecorder;
+ VmaRecorder* m_pRecorder;
#endif
- void ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions);
-
- VkDeviceSize CalcPreferredBlockSize(uint32_t memTypeIndex);
-
- VkResult AllocateMemoryOfType(
- VkDeviceSize size,
- VkDeviceSize alignment,
- bool dedicatedAllocation,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- const VmaAllocationCreateInfo& createInfo,
- uint32_t memTypeIndex,
- VmaSuballocationType suballocType,
- size_t allocationCount,
- VmaAllocation* pAllocations);
-
- // Helper function only to be used inside AllocateDedicatedMemory.
- VkResult AllocateDedicatedMemoryPage(
- VkDeviceSize size,
- VmaSuballocationType suballocType,
- uint32_t memTypeIndex,
- const VkMemoryAllocateInfo& allocInfo,
- bool map,
- bool isUserDataString,
- void* pUserData,
- VmaAllocation* pAllocation);
-
- // Allocates and registers new VkDeviceMemory specifically for dedicated allocations.
- VkResult AllocateDedicatedMemory(
- VkDeviceSize size,
- VmaSuballocationType suballocType,
- uint32_t memTypeIndex,
- bool withinBudget,
- bool map,
- bool isUserDataString,
- void* pUserData,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- size_t allocationCount,
- VmaAllocation* pAllocations);
-
- void FreeDedicatedMemory(const VmaAllocation allocation);
-
- /*
- 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;
+ void ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions);
+
+ VkDeviceSize CalcPreferredBlockSize(uint32_t memTypeIndex);
+
+ VkResult AllocateMemoryOfType(
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ bool dedicatedAllocation,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ const VmaAllocationCreateInfo& createInfo,
+ uint32_t memTypeIndex,
+ VmaSuballocationType suballocType,
+ size_t allocationCount,
+ VmaAllocation* pAllocations);
+
+ // Helper function only to be used inside AllocateDedicatedMemory.
+ VkResult AllocateDedicatedMemoryPage(
+ VkDeviceSize size,
+ VmaSuballocationType suballocType,
+ uint32_t memTypeIndex,
+ const VkMemoryAllocateInfo& allocInfo,
+ bool map,
+ bool isUserDataString,
+ void* pUserData,
+ VmaAllocation* pAllocation);
+
+ // Allocates and registers new VkDeviceMemory specifically for dedicated allocations.
+ VkResult AllocateDedicatedMemory(
+ VkDeviceSize size,
+ VmaSuballocationType suballocType,
+ uint32_t memTypeIndex,
+ bool withinBudget,
+ bool map,
+ bool isUserDataString,
+ void* pUserData,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ size_t allocationCount,
+ VmaAllocation* pAllocations);
+
+ void FreeDedicatedMemory(const VmaAllocation allocation);
+
+ /*
+ 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;
#if VMA_MEMORY_BUDGET
- void UpdateVulkanBudget();
+ void UpdateVulkanBudget();
#endif // #if VMA_MEMORY_BUDGET
};
@@ -7483,45 +7321,45 @@ private:
static void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment)
{
- return VmaMalloc(&hAllocator->m_AllocationCallbacks, size, alignment);
+ return VmaMalloc(&hAllocator->m_AllocationCallbacks, size, alignment);
}
static void VmaFree(VmaAllocator hAllocator, void* ptr)
{
- VmaFree(&hAllocator->m_AllocationCallbacks, ptr);
+ VmaFree(&hAllocator->m_AllocationCallbacks, ptr);
}
template<typename T>
static T* VmaAllocate(VmaAllocator hAllocator)
{
- return (T*)VmaMalloc(hAllocator, sizeof(T), VMA_ALIGN_OF(T));
+ return (T*)VmaMalloc(hAllocator, sizeof(T), VMA_ALIGN_OF(T));
}
template<typename T>
static T* VmaAllocateArray(VmaAllocator hAllocator, size_t count)
{
- return (T*)VmaMalloc(hAllocator, sizeof(T) * count, VMA_ALIGN_OF(T));
+ return (T*)VmaMalloc(hAllocator, sizeof(T) * count, VMA_ALIGN_OF(T));
}
template<typename T>
static void vma_delete(VmaAllocator hAllocator, T* ptr)
{
- if(ptr != VMA_NULL)
- {
- ptr->~T();
- VmaFree(hAllocator, ptr);
- }
+ if(ptr != VMA_NULL)
+ {
+ ptr->~T();
+ VmaFree(hAllocator, ptr);
+ }
}
template<typename T>
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);
- }
+ if(ptr != VMA_NULL)
+ {
+ for(size_t i = count; i--; )
+ ptr[i].~T();
+ VmaFree(hAllocator, ptr);
+ }
}
////////////////////////////////////////////////////////////////////////////////
@@ -7532,65 +7370,65 @@ static void vma_delete_array(VmaAllocator hAllocator, T* ptr, size_t count)
class VmaStringBuilder
{
public:
- VmaStringBuilder(VmaAllocator alloc) : m_Data(VmaStlAllocator<char>(alloc->GetAllocationCallbacks())) { }
- size_t GetLength() const { return m_Data.size(); }
- const char* GetData() const { return m_Data.data(); }
+ VmaStringBuilder(VmaAllocator alloc) : m_Data(VmaStlAllocator<char>(alloc->GetAllocationCallbacks())) { }
+ size_t GetLength() const { return m_Data.size(); }
+ const char* GetData() const { return m_Data.data(); }
- void Add(char ch) { m_Data.push_back(ch); }
- void Add(const char* pStr);
- void AddNewLine() { Add('\n'); }
- void AddNumber(uint32_t num);
- void AddNumber(uint64_t num);
- void AddPointer(const void* ptr);
+ void Add(char ch) { m_Data.push_back(ch); }
+ void Add(const char* pStr);
+ void AddNewLine() { Add('\n'); }
+ void AddNumber(uint32_t num);
+ void AddNumber(uint64_t num);
+ void AddPointer(const void* ptr);
private:
- VmaVector< char, VmaStlAllocator<char> > m_Data;
+ VmaVector< char, VmaStlAllocator<char> > m_Data;
};
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);
- }
+ 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' + (num % 10);
- num /= 10;
- }
- while(num);
- Add(p);
+ char buf[11];
+ buf[10] = '\0';
+ char *p = &buf[10];
+ do
+ {
+ *--p = '0' + (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' + (num % 10);
- num /= 10;
- }
- while(num);
- Add(p);
+ char buf[21];
+ buf[20] = '\0';
+ char *p = &buf[20];
+ do
+ {
+ *--p = '0' + (num % 10);
+ num /= 10;
+ }
+ while(num);
+ Add(p);
}
void VmaStringBuilder::AddPointer(const void* ptr)
{
- char buf[21];
- VmaPtrToStr(buf, sizeof(buf), ptr);
- Add(buf);
+ char buf[21];
+ VmaPtrToStr(buf, sizeof(buf), ptr);
+ Add(buf);
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -7602,283 +7440,283 @@ void VmaStringBuilder::AddPointer(const void* ptr)
class VmaJsonWriter
{
- VMA_CLASS_NO_COPY(VmaJsonWriter)
+ VMA_CLASS_NO_COPY(VmaJsonWriter)
public:
- VmaJsonWriter(const VkAllocationCallbacks* pAllocationCallbacks, VmaStringBuilder& sb);
- ~VmaJsonWriter();
-
- void BeginObject(bool singleLine = false);
- void EndObject();
-
- void BeginArray(bool singleLine = false);
- void EndArray();
-
- void WriteString(const char* pStr);
- void BeginString(const char* pStr = VMA_NULL);
- void ContinueString(const char* pStr);
- void ContinueString(uint32_t n);
- void ContinueString(uint64_t n);
- void ContinueString_Pointer(const void* ptr);
- void EndString(const char* pStr = VMA_NULL);
-
- void WriteNumber(uint32_t n);
- void WriteNumber(uint64_t n);
- void WriteBool(bool b);
- void WriteNull();
+ VmaJsonWriter(const VkAllocationCallbacks* pAllocationCallbacks, VmaStringBuilder& sb);
+ ~VmaJsonWriter();
+
+ void BeginObject(bool singleLine = false);
+ void EndObject();
+
+ void BeginArray(bool singleLine = false);
+ void EndArray();
+
+ void WriteString(const char* pStr);
+ void BeginString(const char* pStr = VMA_NULL);
+ void ContinueString(const char* pStr);
+ void ContinueString(uint32_t n);
+ void ContinueString(uint64_t n);
+ void ContinueString_Pointer(const void* ptr);
+ void EndString(const char* pStr = VMA_NULL);
+
+ void WriteNumber(uint32_t n);
+ void WriteNumber(uint64_t n);
+ void WriteBool(bool b);
+ void WriteNull();
private:
- static const char* const INDENT;
-
- enum COLLECTION_TYPE
- {
- COLLECTION_TYPE_OBJECT,
- COLLECTION_TYPE_ARRAY,
- };
- struct StackItem
- {
- COLLECTION_TYPE type;
- uint32_t valueCount;
- bool singleLineMode;
- };
-
- VmaStringBuilder& m_SB;
- VmaVector< StackItem, VmaStlAllocator<StackItem> > m_Stack;
- bool m_InsideString;
-
- void BeginValue(bool isString);
- void WriteIndent(bool oneLess = false);
+ static const char* const INDENT;
+
+ enum COLLECTION_TYPE
+ {
+ COLLECTION_TYPE_OBJECT,
+ COLLECTION_TYPE_ARRAY,
+ };
+ struct StackItem
+ {
+ COLLECTION_TYPE type;
+ uint32_t valueCount;
+ bool singleLineMode;
+ };
+
+ VmaStringBuilder& m_SB;
+ VmaVector< StackItem, VmaStlAllocator<StackItem> > m_Stack;
+ bool m_InsideString;
+
+ void BeginValue(bool isString);
+ void WriteIndent(bool oneLess = false);
};
const char* const VmaJsonWriter::INDENT = " ";
VmaJsonWriter::VmaJsonWriter(const VkAllocationCallbacks* pAllocationCallbacks, VmaStringBuilder& sb) :
- m_SB(sb),
- m_Stack(VmaStlAllocator<StackItem>(pAllocationCallbacks)),
- m_InsideString(false)
+ m_SB(sb),
+ m_Stack(VmaStlAllocator<StackItem>(pAllocationCallbacks)),
+ m_InsideString(false)
{
}
VmaJsonWriter::~VmaJsonWriter()
{
- VMA_ASSERT(!m_InsideString);
- VMA_ASSERT(m_Stack.empty());
+ VMA_ASSERT(!m_InsideString);
+ VMA_ASSERT(m_Stack.empty());
}
void VmaJsonWriter::BeginObject(bool singleLine)
{
- VMA_ASSERT(!m_InsideString);
+ VMA_ASSERT(!m_InsideString);
- BeginValue(false);
- m_SB.Add('{');
+ BeginValue(false);
+ m_SB.Add('{');
- StackItem item;
- item.type = COLLECTION_TYPE_OBJECT;
- item.valueCount = 0;
- item.singleLineMode = singleLine;
- m_Stack.push_back(item);
+ 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);
+ VMA_ASSERT(!m_InsideString);
- WriteIndent(true);
- m_SB.Add('}');
+ WriteIndent(true);
+ m_SB.Add('}');
- VMA_ASSERT(!m_Stack.empty() && m_Stack.back().type == COLLECTION_TYPE_OBJECT);
- m_Stack.pop_back();
+ 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);
+ VMA_ASSERT(!m_InsideString);
- BeginValue(false);
- m_SB.Add('[');
+ BeginValue(false);
+ m_SB.Add('[');
- StackItem item;
- item.type = COLLECTION_TYPE_ARRAY;
- item.valueCount = 0;
- item.singleLineMode = singleLine;
- m_Stack.push_back(item);
+ 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);
+ VMA_ASSERT(!m_InsideString);
- WriteIndent(true);
- m_SB.Add(']');
+ WriteIndent(true);
+ m_SB.Add(']');
- VMA_ASSERT(!m_Stack.empty() && m_Stack.back().type == COLLECTION_TYPE_ARRAY);
- m_Stack.pop_back();
+ 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();
+ BeginString(pStr);
+ EndString();
}
void VmaJsonWriter::BeginString(const char* pStr)
{
- VMA_ASSERT(!m_InsideString);
+ VMA_ASSERT(!m_InsideString);
- BeginValue(true);
- m_SB.Add('"');
- m_InsideString = true;
- if(pStr != VMA_NULL && pStr[0] != '\0')
- {
- ContinueString(pStr);
- }
+ 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(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.");
- break;
- }
- }
+ 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(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.");
+ break;
+ }
+ }
}
void VmaJsonWriter::ContinueString(uint32_t n)
{
- VMA_ASSERT(m_InsideString);
- m_SB.AddNumber(n);
+ VMA_ASSERT(m_InsideString);
+ m_SB.AddNumber(n);
}
void VmaJsonWriter::ContinueString(uint64_t n)
{
- VMA_ASSERT(m_InsideString);
- m_SB.AddNumber(n);
+ VMA_ASSERT(m_InsideString);
+ m_SB.AddNumber(n);
}
void VmaJsonWriter::ContinueString_Pointer(const void* ptr)
{
- VMA_ASSERT(m_InsideString);
- m_SB.AddPointer(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;
+ 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);
+ 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);
+ 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");
+ 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");
+ 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;
- }
+ 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);
- }
- }
+ 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 // #if VMA_STATS_STRING_ENABLED
@@ -7887,359 +7725,359 @@ void VmaJsonWriter::WriteIndent(bool oneLess)
void VmaAllocation_T::SetUserData(VmaAllocator hAllocator, void* pUserData)
{
- if(IsUserDataString())
- {
- VMA_ASSERT(pUserData == VMA_NULL || pUserData != m_pUserData);
+ if(IsUserDataString())
+ {
+ VMA_ASSERT(pUserData == VMA_NULL || pUserData != m_pUserData);
- FreeUserDataString(hAllocator);
+ FreeUserDataString(hAllocator);
- if(pUserData != VMA_NULL)
- {
- m_pUserData = VmaCreateStringCopy(hAllocator->GetAllocationCallbacks(), (const char*)pUserData);
- }
- }
- else
- {
- m_pUserData = pUserData;
- }
+ if(pUserData != VMA_NULL)
+ {
+ m_pUserData = VmaCreateStringCopy(hAllocator->GetAllocationCallbacks(), (const char*)pUserData);
+ }
+ }
+ else
+ {
+ m_pUserData = pUserData;
+ }
}
void VmaAllocation_T::ChangeBlockAllocation(
- VmaAllocator hAllocator,
- VmaDeviceMemoryBlock* block,
- VkDeviceSize offset)
+ VmaAllocator hAllocator,
+ VmaDeviceMemoryBlock* block,
+ VkDeviceSize offset)
{
- VMA_ASSERT(block != VMA_NULL);
- VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
+ VMA_ASSERT(block != VMA_NULL);
+ VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
- // Move mapping reference counter from old block to new block.
- if(block != m_BlockAllocation.m_Block)
- {
- uint32_t mapRefCount = m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP;
- if(IsPersistentMap())
- ++mapRefCount;
- m_BlockAllocation.m_Block->Unmap(hAllocator, mapRefCount);
- block->Map(hAllocator, mapRefCount, VMA_NULL);
- }
+ // Move mapping reference counter from old block to new block.
+ if(block != m_BlockAllocation.m_Block)
+ {
+ uint32_t mapRefCount = m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP;
+ if(IsPersistentMap())
+ ++mapRefCount;
+ m_BlockAllocation.m_Block->Unmap(hAllocator, mapRefCount);
+ block->Map(hAllocator, mapRefCount, VMA_NULL);
+ }
- m_BlockAllocation.m_Block = block;
- m_BlockAllocation.m_Offset = offset;
+ m_BlockAllocation.m_Block = block;
+ m_BlockAllocation.m_Offset = offset;
}
void VmaAllocation_T::ChangeOffset(VkDeviceSize newOffset)
{
- VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
- m_BlockAllocation.m_Offset = newOffset;
+ VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);
+ m_BlockAllocation.m_Offset = newOffset;
}
VkDeviceSize VmaAllocation_T::GetOffset() const
{
- switch(m_Type)
- {
- case ALLOCATION_TYPE_BLOCK:
- return m_BlockAllocation.m_Offset;
- case ALLOCATION_TYPE_DEDICATED:
- return 0;
- default:
- VMA_ASSERT(0);
- return 0;
- }
+ switch(m_Type)
+ {
+ case ALLOCATION_TYPE_BLOCK:
+ return m_BlockAllocation.m_Offset;
+ case ALLOCATION_TYPE_DEDICATED:
+ return 0;
+ default:
+ VMA_ASSERT(0);
+ return 0;
+ }
}
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;
- }
+ 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)
- {
- void* pBlockData = m_BlockAllocation.m_Block->GetMappedData();
- VMA_ASSERT(pBlockData != VMA_NULL);
- return (char*)pBlockData + m_BlockAllocation.m_Offset;
- }
- else
- {
- return VMA_NULL;
- }
- break;
- case ALLOCATION_TYPE_DEDICATED:
- VMA_ASSERT((m_DedicatedAllocation.m_pMappedData != VMA_NULL) == (m_MapCount != 0));
- return m_DedicatedAllocation.m_pMappedData;
- default:
- VMA_ASSERT(0);
- return VMA_NULL;
- }
+ switch(m_Type)
+ {
+ case ALLOCATION_TYPE_BLOCK:
+ if(m_MapCount != 0)
+ {
+ void* pBlockData = m_BlockAllocation.m_Block->GetMappedData();
+ VMA_ASSERT(pBlockData != VMA_NULL);
+ return (char*)pBlockData + m_BlockAllocation.m_Offset;
+ }
+ else
+ {
+ return VMA_NULL;
+ }
+ break;
+ case ALLOCATION_TYPE_DEDICATED:
+ VMA_ASSERT((m_DedicatedAllocation.m_pMappedData != VMA_NULL) == (m_MapCount != 0));
+ return m_DedicatedAllocation.m_pMappedData;
+ default:
+ VMA_ASSERT(0);
+ return VMA_NULL;
+ }
}
bool VmaAllocation_T::CanBecomeLost() const
{
- switch(m_Type)
- {
- case ALLOCATION_TYPE_BLOCK:
- return m_BlockAllocation.m_CanBecomeLost;
- case ALLOCATION_TYPE_DEDICATED:
- return false;
- default:
- VMA_ASSERT(0);
- return false;
- }
+ switch(m_Type)
+ {
+ case ALLOCATION_TYPE_BLOCK:
+ return m_BlockAllocation.m_CanBecomeLost;
+ case ALLOCATION_TYPE_DEDICATED:
+ return false;
+ default:
+ VMA_ASSERT(0);
+ return false;
+ }
}
bool VmaAllocation_T::MakeLost(uint32_t currentFrameIndex, uint32_t frameInUseCount)
{
- VMA_ASSERT(CanBecomeLost());
-
- /*
- Warning: This is a carefully designed algorithm.
- Do not modify unless you really know what you're doing :)
- */
- uint32_t localLastUseFrameIndex = GetLastUseFrameIndex();
- for(;;)
- {
- if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
- {
- VMA_ASSERT(0);
- return false;
- }
- else if(localLastUseFrameIndex + frameInUseCount >= currentFrameIndex)
- {
- return false;
- }
- else // Last use time earlier than current time.
- {
- if(CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, VMA_FRAME_INDEX_LOST))
- {
- // Setting hAllocation.LastUseFrameIndex atomic to VMA_FRAME_INDEX_LOST is enough to mark it as LOST.
- // Calling code just needs to unregister this allocation in owning VmaDeviceMemoryBlock.
- return true;
- }
- }
- }
+ VMA_ASSERT(CanBecomeLost());
+
+ /*
+ Warning: This is a carefully designed algorithm.
+ Do not modify unless you really know what you're doing :)
+ */
+ uint32_t localLastUseFrameIndex = GetLastUseFrameIndex();
+ for(;;)
+ {
+ if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
+ {
+ VMA_ASSERT(0);
+ return false;
+ }
+ else if(localLastUseFrameIndex + frameInUseCount >= currentFrameIndex)
+ {
+ return false;
+ }
+ else // Last use time earlier than current time.
+ {
+ if(CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, VMA_FRAME_INDEX_LOST))
+ {
+ // Setting hAllocation.LastUseFrameIndex atomic to VMA_FRAME_INDEX_LOST is enough to mark it as LOST.
+ // Calling code just needs to unregister this allocation in owning VmaDeviceMemoryBlock.
+ return true;
+ }
+ }
+ }
}
#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",
+ "FREE",
+ "UNKNOWN",
+ "BUFFER",
+ "IMAGE_UNKNOWN",
+ "IMAGE_LINEAR",
+ "IMAGE_OPTIMAL",
};
void VmaAllocation_T::PrintParameters(class VmaJsonWriter& json) const
{
- json.WriteString("Type");
- json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[m_SuballocationType]);
+ json.WriteString("Type");
+ json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[m_SuballocationType]);
- json.WriteString("Size");
- json.WriteNumber(m_Size);
+ json.WriteString("Size");
+ json.WriteNumber(m_Size);
- if(m_pUserData != VMA_NULL)
- {
- json.WriteString("UserData");
- if(IsUserDataString())
- {
- json.WriteString((const char*)m_pUserData);
- }
- else
- {
- json.BeginString();
- json.ContinueString_Pointer(m_pUserData);
- json.EndString();
- }
- }
+ if(m_pUserData != VMA_NULL)
+ {
+ json.WriteString("UserData");
+ if(IsUserDataString())
+ {
+ json.WriteString((const char*)m_pUserData);
+ }
+ else
+ {
+ json.BeginString();
+ json.ContinueString_Pointer(m_pUserData);
+ json.EndString();
+ }
+ }
- json.WriteString("CreationFrameIndex");
- json.WriteNumber(m_CreationFrameIndex);
+ json.WriteString("CreationFrameIndex");
+ json.WriteNumber(m_CreationFrameIndex);
- json.WriteString("LastUseFrameIndex");
- json.WriteNumber(GetLastUseFrameIndex());
+ json.WriteString("LastUseFrameIndex");
+ json.WriteNumber(GetLastUseFrameIndex());
- if(m_BufferImageUsage != 0)
- {
- json.WriteString("Usage");
- json.WriteNumber(m_BufferImageUsage);
- }
+ if(m_BufferImageUsage != 0)
+ {
+ json.WriteString("Usage");
+ json.WriteNumber(m_BufferImageUsage);
+ }
}
#endif
void VmaAllocation_T::FreeUserDataString(VmaAllocator hAllocator)
{
- VMA_ASSERT(IsUserDataString());
- VmaFreeString(hAllocator->GetAllocationCallbacks(), (char*)m_pUserData);
- m_pUserData = VMA_NULL;
+ VMA_ASSERT(IsUserDataString());
+ VmaFreeString(hAllocator->GetAllocationCallbacks(), (char*)m_pUserData);
+ m_pUserData = VMA_NULL;
}
void VmaAllocation_T::BlockAllocMap()
{
- VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK);
+ VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK);
- if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) < 0x7F)
- {
- ++m_MapCount;
- }
- else
- {
- VMA_ASSERT(0 && "Allocation mapped too many times simultaneously.");
- }
+ if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) < 0x7F)
+ {
+ ++m_MapCount;
+ }
+ else
+ {
+ VMA_ASSERT(0 && "Allocation mapped too many times simultaneously.");
+ }
}
void VmaAllocation_T::BlockAllocUnmap()
{
- VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK);
+ VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK);
- if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) != 0)
- {
- --m_MapCount;
- }
- else
- {
- VMA_ASSERT(0 && "Unmapping allocation not previously mapped.");
- }
+ if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) != 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);
-
- if(m_MapCount != 0)
- {
- if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) < 0x7F)
- {
- VMA_ASSERT(m_DedicatedAllocation.m_pMappedData != VMA_NULL);
- *ppData = m_DedicatedAllocation.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_pMappedData = *ppData;
- m_MapCount = 1;
- }
- return result;
- }
+ VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED);
+
+ if(m_MapCount != 0)
+ {
+ if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) < 0x7F)
+ {
+ VMA_ASSERT(m_DedicatedAllocation.m_pMappedData != VMA_NULL);
+ *ppData = m_DedicatedAllocation.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_pMappedData = *ppData;
+ m_MapCount = 1;
+ }
+ return result;
+ }
}
void VmaAllocation_T::DedicatedAllocUnmap(VmaAllocator hAllocator)
{
- VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED);
-
- if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) != 0)
- {
- --m_MapCount;
- if(m_MapCount == 0)
- {
- m_DedicatedAllocation.m_pMappedData = VMA_NULL;
- (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(
- hAllocator->m_hDevice,
- m_DedicatedAllocation.m_hMemory);
- }
- }
- else
- {
- VMA_ASSERT(0 && "Unmapping dedicated allocation not previously mapped.");
- }
+ VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED);
+
+ if((m_MapCount & ~MAP_COUNT_FLAG_PERSISTENT_MAP) != 0)
+ {
+ --m_MapCount;
+ if(m_MapCount == 0)
+ {
+ m_DedicatedAllocation.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
static void VmaPrintStatInfo(VmaJsonWriter& json, const VmaStatInfo& stat)
{
- json.BeginObject();
+ json.BeginObject();
- json.WriteString("Blocks");
- json.WriteNumber(stat.blockCount);
+ json.WriteString("Blocks");
+ json.WriteNumber(stat.blockCount);
- json.WriteString("Allocations");
- json.WriteNumber(stat.allocationCount);
+ json.WriteString("Allocations");
+ json.WriteNumber(stat.allocationCount);
- json.WriteString("UnusedRanges");
- json.WriteNumber(stat.unusedRangeCount);
+ json.WriteString("UnusedRanges");
+ json.WriteNumber(stat.unusedRangeCount);
- json.WriteString("UsedBytes");
- json.WriteNumber(stat.usedBytes);
+ json.WriteString("UsedBytes");
+ json.WriteNumber(stat.usedBytes);
- json.WriteString("UnusedBytes");
- json.WriteNumber(stat.unusedBytes);
+ json.WriteString("UnusedBytes");
+ json.WriteNumber(stat.unusedBytes);
- if(stat.allocationCount > 1)
- {
- json.WriteString("AllocationSize");
- json.BeginObject(true);
- json.WriteString("Min");
- json.WriteNumber(stat.allocationSizeMin);
- json.WriteString("Avg");
- json.WriteNumber(stat.allocationSizeAvg);
- json.WriteString("Max");
- json.WriteNumber(stat.allocationSizeMax);
- json.EndObject();
- }
+ if(stat.allocationCount > 1)
+ {
+ json.WriteString("AllocationSize");
+ json.BeginObject(true);
+ json.WriteString("Min");
+ json.WriteNumber(stat.allocationSizeMin);
+ json.WriteString("Avg");
+ json.WriteNumber(stat.allocationSizeAvg);
+ json.WriteString("Max");
+ json.WriteNumber(stat.allocationSizeMax);
+ json.EndObject();
+ }
- if(stat.unusedRangeCount > 1)
- {
- json.WriteString("UnusedRangeSize");
- json.BeginObject(true);
- json.WriteString("Min");
- json.WriteNumber(stat.unusedRangeSizeMin);
- json.WriteString("Avg");
- json.WriteNumber(stat.unusedRangeSizeAvg);
- json.WriteString("Max");
- json.WriteNumber(stat.unusedRangeSizeMax);
- json.EndObject();
- }
+ if(stat.unusedRangeCount > 1)
+ {
+ json.WriteString("UnusedRangeSize");
+ json.BeginObject(true);
+ json.WriteString("Min");
+ json.WriteNumber(stat.unusedRangeSizeMin);
+ json.WriteString("Avg");
+ json.WriteNumber(stat.unusedRangeSizeAvg);
+ json.WriteString("Max");
+ json.WriteNumber(stat.unusedRangeSizeMax);
+ json.EndObject();
+ }
- json.EndObject();
+ json.EndObject();
}
#endif // #if VMA_STATS_STRING_ENABLED
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;
- }
+ 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;
+ }
};
@@ -8247,72 +8085,72 @@ struct VmaSuballocationItemSizeLess
// class VmaBlockMetadata
VmaBlockMetadata::VmaBlockMetadata(VmaAllocator hAllocator) :
- m_Size(0),
- m_pAllocationCallbacks(hAllocator->GetAllocationCallbacks())
+ m_Size(0),
+ m_pAllocationCallbacks(hAllocator->GetAllocationCallbacks())
{
}
#if VMA_STATS_STRING_ENABLED
void VmaBlockMetadata::PrintDetailedMap_Begin(class VmaJsonWriter& json,
- VkDeviceSize unusedBytes,
- size_t allocationCount,
- size_t unusedRangeCount) const
+ VkDeviceSize unusedBytes,
+ size_t allocationCount,
+ size_t unusedRangeCount) const
{
- json.BeginObject();
+ json.BeginObject();
- json.WriteString("TotalBytes");
- json.WriteNumber(GetSize());
+ json.WriteString("TotalBytes");
+ json.WriteNumber(GetSize());
- json.WriteString("UnusedBytes");
- json.WriteNumber(unusedBytes);
+ json.WriteString("UnusedBytes");
+ json.WriteNumber(unusedBytes);
- json.WriteString("Allocations");
- json.WriteNumber((uint64_t)allocationCount);
+ json.WriteString("Allocations");
+ json.WriteNumber((uint64_t)allocationCount);
- json.WriteString("UnusedRanges");
- json.WriteNumber((uint64_t)unusedRangeCount);
+ json.WriteString("UnusedRanges");
+ json.WriteNumber((uint64_t)unusedRangeCount);
- json.WriteString("Suballocations");
- json.BeginArray();
+ json.WriteString("Suballocations");
+ json.BeginArray();
}
void VmaBlockMetadata::PrintDetailedMap_Allocation(class VmaJsonWriter& json,
- VkDeviceSize offset,
- VmaAllocation hAllocation) const
+ VkDeviceSize offset,
+ VmaAllocation hAllocation) const
{
- json.BeginObject(true);
-
- json.WriteString("Offset");
- json.WriteNumber(offset);
+ json.BeginObject(true);
+
+ json.WriteString("Offset");
+ json.WriteNumber(offset);
- hAllocation->PrintParameters(json);
+ hAllocation->PrintParameters(json);
- json.EndObject();
+ json.EndObject();
}
void VmaBlockMetadata::PrintDetailedMap_UnusedRange(class VmaJsonWriter& json,
- VkDeviceSize offset,
- VkDeviceSize size) const
+ VkDeviceSize offset,
+ VkDeviceSize size) const
{
- json.BeginObject(true);
-
- json.WriteString("Offset");
- json.WriteNumber(offset);
+ json.BeginObject(true);
+
+ json.WriteString("Offset");
+ json.WriteNumber(offset);
- json.WriteString("Type");
- json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[VMA_SUBALLOCATION_TYPE_FREE]);
+ json.WriteString("Type");
+ json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[VMA_SUBALLOCATION_TYPE_FREE]);
- json.WriteString("Size");
- json.WriteNumber(size);
+ json.WriteString("Size");
+ json.WriteNumber(size);
- json.EndObject();
+ json.EndObject();
}
void VmaBlockMetadata::PrintDetailedMap_End(class VmaJsonWriter& json) const
{
- json.EndArray();
- json.EndObject();
+ json.EndArray();
+ json.EndObject();
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -8321,11 +8159,11 @@ void VmaBlockMetadata::PrintDetailedMap_End(class VmaJsonWriter& json) const
// class VmaBlockMetadata_Generic
VmaBlockMetadata_Generic::VmaBlockMetadata_Generic(VmaAllocator hAllocator) :
- VmaBlockMetadata(hAllocator),
- m_FreeCount(0),
- m_SumFreeSize(0),
- m_Suballocations(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
- m_FreeSuballocationsBySize(VmaStlAllocator<VmaSuballocationList::iterator>(hAllocator->GetAllocationCallbacks()))
+ VmaBlockMetadata(hAllocator),
+ m_FreeCount(0),
+ m_SumFreeSize(0),
+ m_Suballocations(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
+ m_FreeSuballocationsBySize(VmaStlAllocator<VmaSuballocationList::iterator>(hAllocator->GetAllocationCallbacks()))
{
}
@@ -8335,990 +8173,990 @@ VmaBlockMetadata_Generic::~VmaBlockMetadata_Generic()
void VmaBlockMetadata_Generic::Init(VkDeviceSize size)
{
- VmaBlockMetadata::Init(size);
+ VmaBlockMetadata::Init(size);
- m_FreeCount = 1;
- m_SumFreeSize = size;
+ m_FreeCount = 1;
+ m_SumFreeSize = size;
- VmaSuballocation suballoc = {};
- suballoc.offset = 0;
- suballoc.size = size;
- suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- suballoc.hAllocation = VK_NULL_HANDLE;
+ VmaSuballocation suballoc = {};
+ suballoc.offset = 0;
+ suballoc.size = size;
+ suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ suballoc.hAllocation = VK_NULL_HANDLE;
- VMA_ASSERT(size > VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER);
- m_Suballocations.push_back(suballoc);
- VmaSuballocationList::iterator suballocItem = m_Suballocations.end();
- --suballocItem;
- m_FreeSuballocationsBySize.push_back(suballocItem);
+ VMA_ASSERT(size > VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER);
+ m_Suballocations.push_back(suballoc);
+ VmaSuballocationList::iterator suballocItem = m_Suballocations.end();
+ --suballocItem;
+ m_FreeSuballocationsBySize.push_back(suballocItem);
}
bool VmaBlockMetadata_Generic::Validate() const
{
- VMA_VALIDATE(!m_Suballocations.empty());
-
- // Expected offset of new suballocation as calculated from previous ones.
- VkDeviceSize calculatedOffset = 0;
- // Expected number of free suballocations as calculated from traversing their list.
- uint32_t calculatedFreeCount = 0;
- // Expected sum size of free suballocations as calculated from traversing their list.
- VkDeviceSize calculatedSumFreeSize = 0;
- // Expected number of free suballocations that should be registered in
- // m_FreeSuballocationsBySize calculated from traversing their list.
- size_t freeSuballocationsToRegister = 0;
- // True if previous visited suballocation was free.
- bool prevFree = false;
-
- for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
- suballocItem != m_Suballocations.cend();
- ++suballocItem)
- {
- const VmaSuballocation& subAlloc = *suballocItem;
-
- // Actual offset of this suballocation doesn't match expected one.
- VMA_VALIDATE(subAlloc.offset == calculatedOffset);
-
- const bool currFree = (subAlloc.type == VMA_SUBALLOCATION_TYPE_FREE);
- // Two adjacent free suballocations are invalid. They should be merged.
- VMA_VALIDATE(!prevFree || !currFree);
-
- VMA_VALIDATE(currFree == (subAlloc.hAllocation == VK_NULL_HANDLE));
-
- if(currFree)
- {
- calculatedSumFreeSize += subAlloc.size;
- ++calculatedFreeCount;
- if(subAlloc.size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- ++freeSuballocationsToRegister;
- }
-
- // Margin required between allocations - every free space must be at least that large.
- VMA_VALIDATE(subAlloc.size >= VMA_DEBUG_MARGIN);
- }
- else
- {
- VMA_VALIDATE(subAlloc.hAllocation->GetOffset() == subAlloc.offset);
- VMA_VALIDATE(subAlloc.hAllocation->GetSize() == subAlloc.size);
-
- // Margin required between allocations - previous allocation must be free.
- VMA_VALIDATE(VMA_DEBUG_MARGIN == 0 || prevFree);
- }
-
- calculatedOffset += subAlloc.size;
- prevFree = currFree;
- }
-
- // Number of free suballocations registered in m_FreeSuballocationsBySize doesn't
- // match expected one.
- VMA_VALIDATE(m_FreeSuballocationsBySize.size() == freeSuballocationsToRegister);
-
- VkDeviceSize lastSize = 0;
- for(size_t i = 0; i < m_FreeSuballocationsBySize.size(); ++i)
- {
- VmaSuballocationList::iterator suballocItem = m_FreeSuballocationsBySize[i];
-
- // Only free suballocations can be registered in m_FreeSuballocationsBySize.
- VMA_VALIDATE(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE);
- // They must be sorted by size ascending.
- VMA_VALIDATE(suballocItem->size >= lastSize);
-
- lastSize = suballocItem->size;
- }
-
- // Check if totals match calculacted values.
- VMA_VALIDATE(ValidateFreeSuballocationList());
- VMA_VALIDATE(calculatedOffset == GetSize());
- VMA_VALIDATE(calculatedSumFreeSize == m_SumFreeSize);
- VMA_VALIDATE(calculatedFreeCount == m_FreeCount);
-
- return true;
+ VMA_VALIDATE(!m_Suballocations.empty());
+
+ // Expected offset of new suballocation as calculated from previous ones.
+ VkDeviceSize calculatedOffset = 0;
+ // Expected number of free suballocations as calculated from traversing their list.
+ uint32_t calculatedFreeCount = 0;
+ // Expected sum size of free suballocations as calculated from traversing their list.
+ VkDeviceSize calculatedSumFreeSize = 0;
+ // Expected number of free suballocations that should be registered in
+ // m_FreeSuballocationsBySize calculated from traversing their list.
+ size_t freeSuballocationsToRegister = 0;
+ // True if previous visited suballocation was free.
+ bool prevFree = false;
+
+ for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
+ suballocItem != m_Suballocations.cend();
+ ++suballocItem)
+ {
+ const VmaSuballocation& subAlloc = *suballocItem;
+
+ // Actual offset of this suballocation doesn't match expected one.
+ VMA_VALIDATE(subAlloc.offset == calculatedOffset);
+
+ const bool currFree = (subAlloc.type == VMA_SUBALLOCATION_TYPE_FREE);
+ // Two adjacent free suballocations are invalid. They should be merged.
+ VMA_VALIDATE(!prevFree || !currFree);
+
+ VMA_VALIDATE(currFree == (subAlloc.hAllocation == VK_NULL_HANDLE));
+
+ if(currFree)
+ {
+ calculatedSumFreeSize += subAlloc.size;
+ ++calculatedFreeCount;
+ if(subAlloc.size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ ++freeSuballocationsToRegister;
+ }
+
+ // Margin required between allocations - every free space must be at least that large.
+ VMA_VALIDATE(subAlloc.size >= VMA_DEBUG_MARGIN);
+ }
+ else
+ {
+ VMA_VALIDATE(subAlloc.hAllocation->GetOffset() == subAlloc.offset);
+ VMA_VALIDATE(subAlloc.hAllocation->GetSize() == subAlloc.size);
+
+ // Margin required between allocations - previous allocation must be free.
+ VMA_VALIDATE(VMA_DEBUG_MARGIN == 0 || prevFree);
+ }
+
+ calculatedOffset += subAlloc.size;
+ prevFree = currFree;
+ }
+
+ // Number of free suballocations registered in m_FreeSuballocationsBySize doesn't
+ // match expected one.
+ VMA_VALIDATE(m_FreeSuballocationsBySize.size() == freeSuballocationsToRegister);
+
+ VkDeviceSize lastSize = 0;
+ for(size_t i = 0; i < m_FreeSuballocationsBySize.size(); ++i)
+ {
+ VmaSuballocationList::iterator suballocItem = m_FreeSuballocationsBySize[i];
+
+ // Only free suballocations can be registered in m_FreeSuballocationsBySize.
+ VMA_VALIDATE(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE);
+ // They must be sorted by size ascending.
+ VMA_VALIDATE(suballocItem->size >= lastSize);
+
+ lastSize = suballocItem->size;
+ }
+
+ // Check if totals match calculacted values.
+ VMA_VALIDATE(ValidateFreeSuballocationList());
+ VMA_VALIDATE(calculatedOffset == GetSize());
+ VMA_VALIDATE(calculatedSumFreeSize == m_SumFreeSize);
+ VMA_VALIDATE(calculatedFreeCount == m_FreeCount);
+
+ return true;
}
VkDeviceSize VmaBlockMetadata_Generic::GetUnusedRangeSizeMax() const
{
- if(!m_FreeSuballocationsBySize.empty())
- {
- return m_FreeSuballocationsBySize.back()->size;
- }
- else
- {
- return 0;
- }
+ if(!m_FreeSuballocationsBySize.empty())
+ {
+ return m_FreeSuballocationsBySize.back()->size;
+ }
+ else
+ {
+ return 0;
+ }
}
bool VmaBlockMetadata_Generic::IsEmpty() const
{
- return (m_Suballocations.size() == 1) && (m_FreeCount == 1);
+ return (m_Suballocations.size() == 1) && (m_FreeCount == 1);
}
void VmaBlockMetadata_Generic::CalcAllocationStatInfo(VmaStatInfo& outInfo) const
{
- outInfo.blockCount = 1;
-
- const uint32_t rangeCount = (uint32_t)m_Suballocations.size();
- outInfo.allocationCount = rangeCount - m_FreeCount;
- outInfo.unusedRangeCount = m_FreeCount;
-
- outInfo.unusedBytes = m_SumFreeSize;
- outInfo.usedBytes = GetSize() - outInfo.unusedBytes;
-
- outInfo.allocationSizeMin = UINT64_MAX;
- outInfo.allocationSizeMax = 0;
- outInfo.unusedRangeSizeMin = UINT64_MAX;
- outInfo.unusedRangeSizeMax = 0;
-
- for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
- suballocItem != m_Suballocations.cend();
- ++suballocItem)
- {
- const VmaSuballocation& suballoc = *suballocItem;
- if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE)
- {
- outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
- outInfo.allocationSizeMax = VMA_MAX(outInfo.allocationSizeMax, suballoc.size);
- }
- else
- {
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, suballoc.size);
- outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, suballoc.size);
- }
- }
+ outInfo.blockCount = 1;
+
+ const uint32_t rangeCount = (uint32_t)m_Suballocations.size();
+ outInfo.allocationCount = rangeCount - m_FreeCount;
+ outInfo.unusedRangeCount = m_FreeCount;
+
+ outInfo.unusedBytes = m_SumFreeSize;
+ outInfo.usedBytes = GetSize() - outInfo.unusedBytes;
+
+ outInfo.allocationSizeMin = UINT64_MAX;
+ outInfo.allocationSizeMax = 0;
+ outInfo.unusedRangeSizeMin = UINT64_MAX;
+ outInfo.unusedRangeSizeMax = 0;
+
+ for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
+ suballocItem != m_Suballocations.cend();
+ ++suballocItem)
+ {
+ const VmaSuballocation& suballoc = *suballocItem;
+ if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
+ outInfo.allocationSizeMax = VMA_MAX(outInfo.allocationSizeMax, suballoc.size);
+ }
+ else
+ {
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, suballoc.size);
+ outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, suballoc.size);
+ }
+ }
}
void VmaBlockMetadata_Generic::AddPoolStats(VmaPoolStats& inoutStats) const
{
- const uint32_t rangeCount = (uint32_t)m_Suballocations.size();
+ const uint32_t rangeCount = (uint32_t)m_Suballocations.size();
- inoutStats.size += GetSize();
- inoutStats.unusedSize += m_SumFreeSize;
- inoutStats.allocationCount += rangeCount - m_FreeCount;
- inoutStats.unusedRangeCount += m_FreeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, GetUnusedRangeSizeMax());
+ inoutStats.size += GetSize();
+ inoutStats.unusedSize += m_SumFreeSize;
+ inoutStats.allocationCount += rangeCount - m_FreeCount;
+ inoutStats.unusedRangeCount += m_FreeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, GetUnusedRangeSizeMax());
}
#if VMA_STATS_STRING_ENABLED
void VmaBlockMetadata_Generic::PrintDetailedMap(class VmaJsonWriter& json) const
{
- PrintDetailedMap_Begin(json,
- m_SumFreeSize, // unusedBytes
- m_Suballocations.size() - (size_t)m_FreeCount, // allocationCount
- m_FreeCount); // unusedRangeCount
-
- size_t i = 0;
- for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
- suballocItem != m_Suballocations.cend();
- ++suballocItem, ++i)
- {
- if(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- PrintDetailedMap_UnusedRange(json, suballocItem->offset, suballocItem->size);
- }
- else
- {
- PrintDetailedMap_Allocation(json, suballocItem->offset, suballocItem->hAllocation);
- }
- }
-
- PrintDetailedMap_End(json);
+ PrintDetailedMap_Begin(json,
+ m_SumFreeSize, // unusedBytes
+ m_Suballocations.size() - (size_t)m_FreeCount, // allocationCount
+ m_FreeCount); // unusedRangeCount
+
+ size_t i = 0;
+ for(VmaSuballocationList::const_iterator suballocItem = m_Suballocations.cbegin();
+ suballocItem != m_Suballocations.cend();
+ ++suballocItem, ++i)
+ {
+ if(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ PrintDetailedMap_UnusedRange(json, suballocItem->offset, suballocItem->size);
+ }
+ else
+ {
+ PrintDetailedMap_Allocation(json, suballocItem->offset, suballocItem->hAllocation);
+ }
+ }
+
+ PrintDetailedMap_End(json);
}
#endif // #if VMA_STATS_STRING_ENABLED
bool VmaBlockMetadata_Generic::CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest)
-{
- VMA_ASSERT(allocSize > 0);
- VMA_ASSERT(!upperAddress);
- VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
- VMA_ASSERT(pAllocationRequest != VMA_NULL);
- VMA_HEAVY_ASSERT(Validate());
-
- pAllocationRequest->type = VmaAllocationRequestType::Normal;
-
- // There is not enough total free space in this block to fullfill the request: Early return.
- if(canMakeOtherLost == false &&
- m_SumFreeSize < allocSize + 2 * VMA_DEBUG_MARGIN)
- {
- return false;
- }
-
- // New algorithm, efficiently searching freeSuballocationsBySize.
- const size_t freeSuballocCount = m_FreeSuballocationsBySize.size();
- if(freeSuballocCount > 0)
- {
- if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
- {
- // Find first free suballocation with size not less than allocSize + 2 * VMA_DEBUG_MARGIN.
- VmaSuballocationList::iterator* const it = VmaBinaryFindFirstNotLess(
- m_FreeSuballocationsBySize.data(),
- m_FreeSuballocationsBySize.data() + freeSuballocCount,
- allocSize + 2 * VMA_DEBUG_MARGIN,
- VmaSuballocationItemSizeLess());
- size_t index = it - m_FreeSuballocationsBySize.data();
- for(; index < freeSuballocCount; ++index)
- {
- if(CheckAllocation(
- currentFrameIndex,
- frameInUseCount,
- bufferImageGranularity,
- allocSize,
- allocAlignment,
- allocType,
- m_FreeSuballocationsBySize[index],
- false, // canMakeOtherLost
- &pAllocationRequest->offset,
- &pAllocationRequest->itemsToMakeLostCount,
- &pAllocationRequest->sumFreeSize,
- &pAllocationRequest->sumItemSize))
- {
- pAllocationRequest->item = m_FreeSuballocationsBySize[index];
- return true;
- }
- }
- }
- else if(strategy == VMA_ALLOCATION_INTERNAL_STRATEGY_MIN_OFFSET)
- {
- for(VmaSuballocationList::iterator it = m_Suballocations.begin();
- it != m_Suballocations.end();
- ++it)
- {
- if(it->type == VMA_SUBALLOCATION_TYPE_FREE && CheckAllocation(
- currentFrameIndex,
- frameInUseCount,
- bufferImageGranularity,
- allocSize,
- allocAlignment,
- allocType,
- it,
- false, // canMakeOtherLost
- &pAllocationRequest->offset,
- &pAllocationRequest->itemsToMakeLostCount,
- &pAllocationRequest->sumFreeSize,
- &pAllocationRequest->sumItemSize))
- {
- pAllocationRequest->item = it;
- return true;
- }
- }
- }
- else // WORST_FIT, FIRST_FIT
- {
- // Search staring from biggest suballocations.
- for(size_t index = freeSuballocCount; index--; )
- {
- if(CheckAllocation(
- currentFrameIndex,
- frameInUseCount,
- bufferImageGranularity,
- allocSize,
- allocAlignment,
- allocType,
- m_FreeSuballocationsBySize[index],
- false, // canMakeOtherLost
- &pAllocationRequest->offset,
- &pAllocationRequest->itemsToMakeLostCount,
- &pAllocationRequest->sumFreeSize,
- &pAllocationRequest->sumItemSize))
- {
- pAllocationRequest->item = m_FreeSuballocationsBySize[index];
- return true;
- }
- }
- }
- }
-
- if(canMakeOtherLost)
- {
- // Brute-force algorithm. TODO: Come up with something better.
-
- bool found = false;
- VmaAllocationRequest tmpAllocRequest = {};
- tmpAllocRequest.type = VmaAllocationRequestType::Normal;
- for(VmaSuballocationList::iterator suballocIt = m_Suballocations.begin();
- suballocIt != m_Suballocations.end();
- ++suballocIt)
- {
- if(suballocIt->type == VMA_SUBALLOCATION_TYPE_FREE ||
- suballocIt->hAllocation->CanBecomeLost())
- {
- if(CheckAllocation(
- currentFrameIndex,
- frameInUseCount,
- bufferImageGranularity,
- allocSize,
- allocAlignment,
- allocType,
- suballocIt,
- canMakeOtherLost,
- &tmpAllocRequest.offset,
- &tmpAllocRequest.itemsToMakeLostCount,
- &tmpAllocRequest.sumFreeSize,
- &tmpAllocRequest.sumItemSize))
- {
- if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
- {
- *pAllocationRequest = tmpAllocRequest;
- pAllocationRequest->item = suballocIt;
- break;
- }
- if(!found || tmpAllocRequest.CalcCost() < pAllocationRequest->CalcCost())
- {
- *pAllocationRequest = tmpAllocRequest;
- pAllocationRequest->item = suballocIt;
- found = true;
- }
- }
- }
- }
-
- return found;
- }
-
- return false;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ VMA_ASSERT(allocSize > 0);
+ VMA_ASSERT(!upperAddress);
+ VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(pAllocationRequest != VMA_NULL);
+ VMA_HEAVY_ASSERT(Validate());
+
+ pAllocationRequest->type = VmaAllocationRequestType::Normal;
+
+ // There is not enough total free space in this block to fullfill the request: Early return.
+ if(canMakeOtherLost == false &&
+ m_SumFreeSize < allocSize + 2 * VMA_DEBUG_MARGIN)
+ {
+ return false;
+ }
+
+ // New algorithm, efficiently searching freeSuballocationsBySize.
+ const size_t freeSuballocCount = m_FreeSuballocationsBySize.size();
+ if(freeSuballocCount > 0)
+ {
+ if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
+ {
+ // Find first free suballocation with size not less than allocSize + 2 * VMA_DEBUG_MARGIN.
+ VmaSuballocationList::iterator* const it = VmaBinaryFindFirstNotLess(
+ m_FreeSuballocationsBySize.data(),
+ m_FreeSuballocationsBySize.data() + freeSuballocCount,
+ allocSize + 2 * VMA_DEBUG_MARGIN,
+ VmaSuballocationItemSizeLess());
+ size_t index = it - m_FreeSuballocationsBySize.data();
+ for(; index < freeSuballocCount; ++index)
+ {
+ if(CheckAllocation(
+ currentFrameIndex,
+ frameInUseCount,
+ bufferImageGranularity,
+ allocSize,
+ allocAlignment,
+ allocType,
+ m_FreeSuballocationsBySize[index],
+ false, // canMakeOtherLost
+ &pAllocationRequest->offset,
+ &pAllocationRequest->itemsToMakeLostCount,
+ &pAllocationRequest->sumFreeSize,
+ &pAllocationRequest->sumItemSize))
+ {
+ pAllocationRequest->item = m_FreeSuballocationsBySize[index];
+ return true;
+ }
+ }
+ }
+ else if(strategy == VMA_ALLOCATION_INTERNAL_STRATEGY_MIN_OFFSET)
+ {
+ for(VmaSuballocationList::iterator it = m_Suballocations.begin();
+ it != m_Suballocations.end();
+ ++it)
+ {
+ if(it->type == VMA_SUBALLOCATION_TYPE_FREE && CheckAllocation(
+ currentFrameIndex,
+ frameInUseCount,
+ bufferImageGranularity,
+ allocSize,
+ allocAlignment,
+ allocType,
+ it,
+ false, // canMakeOtherLost
+ &pAllocationRequest->offset,
+ &pAllocationRequest->itemsToMakeLostCount,
+ &pAllocationRequest->sumFreeSize,
+ &pAllocationRequest->sumItemSize))
+ {
+ pAllocationRequest->item = it;
+ return true;
+ }
+ }
+ }
+ else // WORST_FIT, FIRST_FIT
+ {
+ // Search staring from biggest suballocations.
+ for(size_t index = freeSuballocCount; index--; )
+ {
+ if(CheckAllocation(
+ currentFrameIndex,
+ frameInUseCount,
+ bufferImageGranularity,
+ allocSize,
+ allocAlignment,
+ allocType,
+ m_FreeSuballocationsBySize[index],
+ false, // canMakeOtherLost
+ &pAllocationRequest->offset,
+ &pAllocationRequest->itemsToMakeLostCount,
+ &pAllocationRequest->sumFreeSize,
+ &pAllocationRequest->sumItemSize))
+ {
+ pAllocationRequest->item = m_FreeSuballocationsBySize[index];
+ return true;
+ }
+ }
+ }
+ }
+
+ if(canMakeOtherLost)
+ {
+ // Brute-force algorithm. TODO: Come up with something better.
+
+ bool found = false;
+ VmaAllocationRequest tmpAllocRequest = {};
+ tmpAllocRequest.type = VmaAllocationRequestType::Normal;
+ for(VmaSuballocationList::iterator suballocIt = m_Suballocations.begin();
+ suballocIt != m_Suballocations.end();
+ ++suballocIt)
+ {
+ if(suballocIt->type == VMA_SUBALLOCATION_TYPE_FREE ||
+ suballocIt->hAllocation->CanBecomeLost())
+ {
+ if(CheckAllocation(
+ currentFrameIndex,
+ frameInUseCount,
+ bufferImageGranularity,
+ allocSize,
+ allocAlignment,
+ allocType,
+ suballocIt,
+ canMakeOtherLost,
+ &tmpAllocRequest.offset,
+ &tmpAllocRequest.itemsToMakeLostCount,
+ &tmpAllocRequest.sumFreeSize,
+ &tmpAllocRequest.sumItemSize))
+ {
+ if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
+ {
+ *pAllocationRequest = tmpAllocRequest;
+ pAllocationRequest->item = suballocIt;
+ break;
+ }
+ if(!found || tmpAllocRequest.CalcCost() < pAllocationRequest->CalcCost())
+ {
+ *pAllocationRequest = tmpAllocRequest;
+ pAllocationRequest->item = suballocIt;
+ found = true;
+ }
+ }
+ }
+ }
+
+ return found;
+ }
+
+ return false;
}
bool VmaBlockMetadata_Generic::MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest)
-{
- VMA_ASSERT(pAllocationRequest && pAllocationRequest->type == VmaAllocationRequestType::Normal);
-
- while(pAllocationRequest->itemsToMakeLostCount > 0)
- {
- if(pAllocationRequest->item->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- ++pAllocationRequest->item;
- }
- VMA_ASSERT(pAllocationRequest->item != m_Suballocations.end());
- VMA_ASSERT(pAllocationRequest->item->hAllocation != VK_NULL_HANDLE);
- VMA_ASSERT(pAllocationRequest->item->hAllocation->CanBecomeLost());
- if(pAllocationRequest->item->hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
- {
- pAllocationRequest->item = FreeSuballocation(pAllocationRequest->item);
- --pAllocationRequest->itemsToMakeLostCount;
- }
- else
- {
- return false;
- }
- }
-
- VMA_HEAVY_ASSERT(Validate());
- VMA_ASSERT(pAllocationRequest->item != m_Suballocations.end());
- VMA_ASSERT(pAllocationRequest->item->type == VMA_SUBALLOCATION_TYPE_FREE);
-
- return true;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ VMA_ASSERT(pAllocationRequest && pAllocationRequest->type == VmaAllocationRequestType::Normal);
+
+ while(pAllocationRequest->itemsToMakeLostCount > 0)
+ {
+ if(pAllocationRequest->item->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ ++pAllocationRequest->item;
+ }
+ VMA_ASSERT(pAllocationRequest->item != m_Suballocations.end());
+ VMA_ASSERT(pAllocationRequest->item->hAllocation != VK_NULL_HANDLE);
+ VMA_ASSERT(pAllocationRequest->item->hAllocation->CanBecomeLost());
+ if(pAllocationRequest->item->hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
+ {
+ pAllocationRequest->item = FreeSuballocation(pAllocationRequest->item);
+ --pAllocationRequest->itemsToMakeLostCount;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ VMA_HEAVY_ASSERT(Validate());
+ VMA_ASSERT(pAllocationRequest->item != m_Suballocations.end());
+ VMA_ASSERT(pAllocationRequest->item->type == VMA_SUBALLOCATION_TYPE_FREE);
+
+ return true;
}
uint32_t VmaBlockMetadata_Generic::MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount)
{
- uint32_t lostAllocationCount = 0;
- for(VmaSuballocationList::iterator it = m_Suballocations.begin();
- it != m_Suballocations.end();
- ++it)
- {
- if(it->type != VMA_SUBALLOCATION_TYPE_FREE &&
- it->hAllocation->CanBecomeLost() &&
- it->hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
- {
- it = FreeSuballocation(it);
- ++lostAllocationCount;
- }
- }
- return lostAllocationCount;
+ uint32_t lostAllocationCount = 0;
+ for(VmaSuballocationList::iterator it = m_Suballocations.begin();
+ it != m_Suballocations.end();
+ ++it)
+ {
+ if(it->type != VMA_SUBALLOCATION_TYPE_FREE &&
+ it->hAllocation->CanBecomeLost() &&
+ it->hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
+ {
+ it = FreeSuballocation(it);
+ ++lostAllocationCount;
+ }
+ }
+ return lostAllocationCount;
}
VkResult VmaBlockMetadata_Generic::CheckCorruption(const void* pBlockData)
{
- for(VmaSuballocationList::iterator it = m_Suballocations.begin();
- it != m_Suballocations.end();
- ++it)
- {
- if(it->type != VMA_SUBALLOCATION_TYPE_FREE)
- {
- if(!VmaValidateMagicValue(pBlockData, it->offset - VMA_DEBUG_MARGIN))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- if(!VmaValidateMagicValue(pBlockData, it->offset + it->size))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- }
- }
-
- return VK_SUCCESS;
+ for(VmaSuballocationList::iterator it = m_Suballocations.begin();
+ it != m_Suballocations.end();
+ ++it)
+ {
+ if(it->type != VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ if(!VmaValidateMagicValue(pBlockData, it->offset - VMA_DEBUG_MARGIN))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ if(!VmaValidateMagicValue(pBlockData, it->offset + it->size))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ }
+ }
+
+ return VK_SUCCESS;
}
void VmaBlockMetadata_Generic::Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation)
-{
- VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);
- VMA_ASSERT(request.item != m_Suballocations.end());
- VmaSuballocation& suballoc = *request.item;
- // Given suballocation is a free block.
- VMA_ASSERT(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE);
- // Given offset is inside this suballocation.
- VMA_ASSERT(request.offset >= suballoc.offset);
- const VkDeviceSize paddingBegin = request.offset - suballoc.offset;
- VMA_ASSERT(suballoc.size >= paddingBegin + allocSize);
- const VkDeviceSize paddingEnd = suballoc.size - paddingBegin - allocSize;
-
- // Unregister this free suballocation from m_FreeSuballocationsBySize and update
- // it to become used.
- UnregisterFreeSuballocation(request.item);
-
- suballoc.offset = request.offset;
- suballoc.size = allocSize;
- suballoc.type = type;
- suballoc.hAllocation = hAllocation;
-
- // If there are any free bytes remaining at the end, insert new free suballocation after current one.
- if(paddingEnd)
- {
- VmaSuballocation paddingSuballoc = {};
- paddingSuballoc.offset = request.offset + allocSize;
- paddingSuballoc.size = paddingEnd;
- paddingSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- VmaSuballocationList::iterator next = request.item;
- ++next;
- const VmaSuballocationList::iterator paddingEndItem =
- m_Suballocations.insert(next, paddingSuballoc);
- RegisterFreeSuballocation(paddingEndItem);
- }
-
- // If there are any free bytes remaining at the beginning, insert new free suballocation before current one.
- if(paddingBegin)
- {
- VmaSuballocation paddingSuballoc = {};
- paddingSuballoc.offset = request.offset - paddingBegin;
- paddingSuballoc.size = paddingBegin;
- paddingSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- const VmaSuballocationList::iterator paddingBeginItem =
- m_Suballocations.insert(request.item, paddingSuballoc);
- RegisterFreeSuballocation(paddingBeginItem);
- }
-
- // Update totals.
- m_FreeCount = m_FreeCount - 1;
- if(paddingBegin > 0)
- {
- ++m_FreeCount;
- }
- if(paddingEnd > 0)
- {
- ++m_FreeCount;
- }
- m_SumFreeSize -= allocSize;
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation)
+{
+ VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);
+ VMA_ASSERT(request.item != m_Suballocations.end());
+ VmaSuballocation& suballoc = *request.item;
+ // Given suballocation is a free block.
+ VMA_ASSERT(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE);
+ // Given offset is inside this suballocation.
+ VMA_ASSERT(request.offset >= suballoc.offset);
+ const VkDeviceSize paddingBegin = request.offset - suballoc.offset;
+ VMA_ASSERT(suballoc.size >= paddingBegin + allocSize);
+ const VkDeviceSize paddingEnd = suballoc.size - paddingBegin - allocSize;
+
+ // Unregister this free suballocation from m_FreeSuballocationsBySize and update
+ // it to become used.
+ UnregisterFreeSuballocation(request.item);
+
+ suballoc.offset = request.offset;
+ suballoc.size = allocSize;
+ suballoc.type = type;
+ suballoc.hAllocation = hAllocation;
+
+ // If there are any free bytes remaining at the end, insert new free suballocation after current one.
+ if(paddingEnd)
+ {
+ VmaSuballocation paddingSuballoc = {};
+ paddingSuballoc.offset = request.offset + allocSize;
+ paddingSuballoc.size = paddingEnd;
+ paddingSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ VmaSuballocationList::iterator next = request.item;
+ ++next;
+ const VmaSuballocationList::iterator paddingEndItem =
+ m_Suballocations.insert(next, paddingSuballoc);
+ RegisterFreeSuballocation(paddingEndItem);
+ }
+
+ // If there are any free bytes remaining at the beginning, insert new free suballocation before current one.
+ if(paddingBegin)
+ {
+ VmaSuballocation paddingSuballoc = {};
+ paddingSuballoc.offset = request.offset - paddingBegin;
+ paddingSuballoc.size = paddingBegin;
+ paddingSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ const VmaSuballocationList::iterator paddingBeginItem =
+ m_Suballocations.insert(request.item, paddingSuballoc);
+ RegisterFreeSuballocation(paddingBeginItem);
+ }
+
+ // Update totals.
+ m_FreeCount = m_FreeCount - 1;
+ if(paddingBegin > 0)
+ {
+ ++m_FreeCount;
+ }
+ if(paddingEnd > 0)
+ {
+ ++m_FreeCount;
+ }
+ m_SumFreeSize -= allocSize;
}
void VmaBlockMetadata_Generic::Free(const VmaAllocation allocation)
{
- for(VmaSuballocationList::iterator suballocItem = m_Suballocations.begin();
- suballocItem != m_Suballocations.end();
- ++suballocItem)
- {
- VmaSuballocation& suballoc = *suballocItem;
- if(suballoc.hAllocation == allocation)
- {
- FreeSuballocation(suballocItem);
- VMA_HEAVY_ASSERT(Validate());
- return;
- }
- }
- VMA_ASSERT(0 && "Not found!");
+ for(VmaSuballocationList::iterator suballocItem = m_Suballocations.begin();
+ suballocItem != m_Suballocations.end();
+ ++suballocItem)
+ {
+ VmaSuballocation& suballoc = *suballocItem;
+ if(suballoc.hAllocation == allocation)
+ {
+ FreeSuballocation(suballocItem);
+ VMA_HEAVY_ASSERT(Validate());
+ return;
+ }
+ }
+ VMA_ASSERT(0 && "Not found!");
}
void VmaBlockMetadata_Generic::FreeAtOffset(VkDeviceSize offset)
{
- for(VmaSuballocationList::iterator suballocItem = m_Suballocations.begin();
- suballocItem != m_Suballocations.end();
- ++suballocItem)
- {
- VmaSuballocation& suballoc = *suballocItem;
- if(suballoc.offset == offset)
- {
- FreeSuballocation(suballocItem);
- return;
- }
- }
- VMA_ASSERT(0 && "Not found!");
+ for(VmaSuballocationList::iterator suballocItem = m_Suballocations.begin();
+ suballocItem != m_Suballocations.end();
+ ++suballocItem)
+ {
+ VmaSuballocation& suballoc = *suballocItem;
+ if(suballoc.offset == offset)
+ {
+ FreeSuballocation(suballocItem);
+ return;
+ }
+ }
+ VMA_ASSERT(0 && "Not found!");
}
bool VmaBlockMetadata_Generic::ValidateFreeSuballocationList() const
{
- VkDeviceSize lastSize = 0;
- for(size_t i = 0, count = m_FreeSuballocationsBySize.size(); i < count; ++i)
- {
- const VmaSuballocationList::iterator it = m_FreeSuballocationsBySize[i];
+ VkDeviceSize lastSize = 0;
+ for(size_t i = 0, count = m_FreeSuballocationsBySize.size(); i < count; ++i)
+ {
+ const VmaSuballocationList::iterator it = m_FreeSuballocationsBySize[i];
- VMA_VALIDATE(it->type == VMA_SUBALLOCATION_TYPE_FREE);
- VMA_VALIDATE(it->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER);
- VMA_VALIDATE(it->size >= lastSize);
- lastSize = it->size;
- }
- return true;
+ VMA_VALIDATE(it->type == VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_VALIDATE(it->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER);
+ VMA_VALIDATE(it->size >= lastSize);
+ lastSize = it->size;
+ }
+ return true;
}
bool VmaBlockMetadata_Generic::CheckAllocation(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- VmaSuballocationList::const_iterator suballocItem,
- bool canMakeOtherLost,
- VkDeviceSize* pOffset,
- size_t* itemsToMakeLostCount,
- VkDeviceSize* pSumFreeSize,
- VkDeviceSize* pSumItemSize) const
-{
- VMA_ASSERT(allocSize > 0);
- VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
- VMA_ASSERT(suballocItem != m_Suballocations.cend());
- VMA_ASSERT(pOffset != VMA_NULL);
-
- *itemsToMakeLostCount = 0;
- *pSumFreeSize = 0;
- *pSumItemSize = 0;
-
- if(canMakeOtherLost)
- {
- if(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- *pSumFreeSize = suballocItem->size;
- }
- else
- {
- if(suballocItem->hAllocation->CanBecomeLost() &&
- suballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
- {
- ++*itemsToMakeLostCount;
- *pSumItemSize = suballocItem->size;
- }
- else
- {
- return false;
- }
- }
-
- // Remaining size is too small for this request: Early return.
- if(GetSize() - suballocItem->offset < allocSize)
- {
- return false;
- }
-
- // Start from offset equal to beginning of this suballocation.
- *pOffset = suballocItem->offset;
-
- // Apply VMA_DEBUG_MARGIN at the beginning.
- if(VMA_DEBUG_MARGIN > 0)
- {
- *pOffset += VMA_DEBUG_MARGIN;
- }
-
- // Apply alignment.
- *pOffset = VmaAlignUp(*pOffset, allocAlignment);
-
- // Check previous suballocations for BufferImageGranularity conflicts.
- // Make bigger alignment if necessary.
- if(bufferImageGranularity > 1)
- {
- bool bufferImageGranularityConflict = false;
- VmaSuballocationList::const_iterator prevSuballocItem = suballocItem;
- while(prevSuballocItem != m_Suballocations.cbegin())
- {
- --prevSuballocItem;
- const VmaSuballocation& prevSuballoc = *prevSuballocItem;
- if(VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, *pOffset, bufferImageGranularity))
- {
- if(VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType))
- {
- bufferImageGranularityConflict = true;
- break;
- }
- }
- else
- // Already on previous page.
- break;
- }
- if(bufferImageGranularityConflict)
- {
- *pOffset = VmaAlignUp(*pOffset, bufferImageGranularity);
- }
- }
-
- // Now that we have final *pOffset, check if we are past suballocItem.
- // If yes, return false - this function should be called for another suballocItem as starting point.
- if(*pOffset >= suballocItem->offset + suballocItem->size)
- {
- return false;
- }
-
- // Calculate padding at the beginning based on current offset.
- const VkDeviceSize paddingBegin = *pOffset - suballocItem->offset;
-
- // Calculate required margin at the end.
- const VkDeviceSize requiredEndMargin = VMA_DEBUG_MARGIN;
-
- const VkDeviceSize totalSize = paddingBegin + allocSize + requiredEndMargin;
- // Another early return check.
- if(suballocItem->offset + totalSize > GetSize())
- {
- return false;
- }
-
- // Advance lastSuballocItem until desired size is reached.
- // Update itemsToMakeLostCount.
- VmaSuballocationList::const_iterator lastSuballocItem = suballocItem;
- if(totalSize > suballocItem->size)
- {
- VkDeviceSize remainingSize = totalSize - suballocItem->size;
- while(remainingSize > 0)
- {
- ++lastSuballocItem;
- if(lastSuballocItem == m_Suballocations.cend())
- {
- return false;
- }
- if(lastSuballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- *pSumFreeSize += lastSuballocItem->size;
- }
- else
- {
- VMA_ASSERT(lastSuballocItem->hAllocation != VK_NULL_HANDLE);
- if(lastSuballocItem->hAllocation->CanBecomeLost() &&
- lastSuballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
- {
- ++*itemsToMakeLostCount;
- *pSumItemSize += lastSuballocItem->size;
- }
- else
- {
- return false;
- }
- }
- remainingSize = (lastSuballocItem->size < remainingSize) ?
- remainingSize - lastSuballocItem->size : 0;
- }
- }
-
- // Check next suballocations for BufferImageGranularity conflicts.
- // If conflict exists, we must mark more allocations lost or fail.
- if(bufferImageGranularity > 1)
- {
- VmaSuballocationList::const_iterator nextSuballocItem = lastSuballocItem;
- ++nextSuballocItem;
- while(nextSuballocItem != m_Suballocations.cend())
- {
- const VmaSuballocation& nextSuballoc = *nextSuballocItem;
- if(VmaBlocksOnSamePage(*pOffset, allocSize, nextSuballoc.offset, bufferImageGranularity))
- {
- if(VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type))
- {
- VMA_ASSERT(nextSuballoc.hAllocation != VK_NULL_HANDLE);
- if(nextSuballoc.hAllocation->CanBecomeLost() &&
- nextSuballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
- {
- ++*itemsToMakeLostCount;
- }
- else
- {
- return false;
- }
- }
- }
- else
- {
- // Already on next page.
- break;
- }
- ++nextSuballocItem;
- }
- }
- }
- else
- {
- const VmaSuballocation& suballoc = *suballocItem;
- VMA_ASSERT(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE);
-
- *pSumFreeSize = suballoc.size;
-
- // Size of this suballocation is too small for this request: Early return.
- if(suballoc.size < allocSize)
- {
- return false;
- }
-
- // Start from offset equal to beginning of this suballocation.
- *pOffset = suballoc.offset;
-
- // Apply VMA_DEBUG_MARGIN at the beginning.
- if(VMA_DEBUG_MARGIN > 0)
- {
- *pOffset += VMA_DEBUG_MARGIN;
- }
-
- // Apply alignment.
- *pOffset = VmaAlignUp(*pOffset, allocAlignment);
-
- // Check previous suballocations for BufferImageGranularity conflicts.
- // Make bigger alignment if necessary.
- if(bufferImageGranularity > 1)
- {
- bool bufferImageGranularityConflict = false;
- VmaSuballocationList::const_iterator prevSuballocItem = suballocItem;
- while(prevSuballocItem != m_Suballocations.cbegin())
- {
- --prevSuballocItem;
- const VmaSuballocation& prevSuballoc = *prevSuballocItem;
- if(VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, *pOffset, bufferImageGranularity))
- {
- if(VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType))
- {
- bufferImageGranularityConflict = true;
- break;
- }
- }
- else
- // Already on previous page.
- break;
- }
- if(bufferImageGranularityConflict)
- {
- *pOffset = VmaAlignUp(*pOffset, bufferImageGranularity);
- }
- }
-
- // Calculate padding at the beginning based on current offset.
- const VkDeviceSize paddingBegin = *pOffset - suballoc.offset;
-
- // Calculate required margin at the end.
- const VkDeviceSize requiredEndMargin = VMA_DEBUG_MARGIN;
-
- // Fail if requested size plus margin before and after is bigger than size of this suballocation.
- if(paddingBegin + allocSize + requiredEndMargin > suballoc.size)
- {
- return false;
- }
-
- // Check next suballocations for BufferImageGranularity conflicts.
- // If conflict exists, allocation cannot be made here.
- if(bufferImageGranularity > 1)
- {
- VmaSuballocationList::const_iterator nextSuballocItem = suballocItem;
- ++nextSuballocItem;
- while(nextSuballocItem != m_Suballocations.cend())
- {
- const VmaSuballocation& nextSuballoc = *nextSuballocItem;
- if(VmaBlocksOnSamePage(*pOffset, allocSize, nextSuballoc.offset, bufferImageGranularity))
- {
- if(VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type))
- {
- return false;
- }
- }
- else
- {
- // Already on next page.
- break;
- }
- ++nextSuballocItem;
- }
- }
- }
-
- // All tests passed: Success. pOffset is already filled.
- return true;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ VmaSuballocationList::const_iterator suballocItem,
+ bool canMakeOtherLost,
+ VkDeviceSize* pOffset,
+ size_t* itemsToMakeLostCount,
+ VkDeviceSize* pSumFreeSize,
+ VkDeviceSize* pSumItemSize) const
+{
+ VMA_ASSERT(allocSize > 0);
+ VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(suballocItem != m_Suballocations.cend());
+ VMA_ASSERT(pOffset != VMA_NULL);
+
+ *itemsToMakeLostCount = 0;
+ *pSumFreeSize = 0;
+ *pSumItemSize = 0;
+
+ if(canMakeOtherLost)
+ {
+ if(suballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ *pSumFreeSize = suballocItem->size;
+ }
+ else
+ {
+ if(suballocItem->hAllocation->CanBecomeLost() &&
+ suballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
+ {
+ ++*itemsToMakeLostCount;
+ *pSumItemSize = suballocItem->size;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ // Remaining size is too small for this request: Early return.
+ if(GetSize() - suballocItem->offset < allocSize)
+ {
+ return false;
+ }
+
+ // Start from offset equal to beginning of this suballocation.
+ *pOffset = suballocItem->offset;
+
+ // Apply VMA_DEBUG_MARGIN at the beginning.
+ if(VMA_DEBUG_MARGIN > 0)
+ {
+ *pOffset += VMA_DEBUG_MARGIN;
+ }
+
+ // Apply alignment.
+ *pOffset = VmaAlignUp(*pOffset, allocAlignment);
+
+ // Check previous suballocations for BufferImageGranularity conflicts.
+ // Make bigger alignment if necessary.
+ if(bufferImageGranularity > 1)
+ {
+ bool bufferImageGranularityConflict = false;
+ VmaSuballocationList::const_iterator prevSuballocItem = suballocItem;
+ while(prevSuballocItem != m_Suballocations.cbegin())
+ {
+ --prevSuballocItem;
+ const VmaSuballocation& prevSuballoc = *prevSuballocItem;
+ if(VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, *pOffset, bufferImageGranularity))
+ {
+ if(VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType))
+ {
+ bufferImageGranularityConflict = true;
+ break;
+ }
+ }
+ else
+ // Already on previous page.
+ break;
+ }
+ if(bufferImageGranularityConflict)
+ {
+ *pOffset = VmaAlignUp(*pOffset, bufferImageGranularity);
+ }
+ }
+
+ // Now that we have final *pOffset, check if we are past suballocItem.
+ // If yes, return false - this function should be called for another suballocItem as starting point.
+ if(*pOffset >= suballocItem->offset + suballocItem->size)
+ {
+ return false;
+ }
+
+ // Calculate padding at the beginning based on current offset.
+ const VkDeviceSize paddingBegin = *pOffset - suballocItem->offset;
+
+ // Calculate required margin at the end.
+ const VkDeviceSize requiredEndMargin = VMA_DEBUG_MARGIN;
+
+ const VkDeviceSize totalSize = paddingBegin + allocSize + requiredEndMargin;
+ // Another early return check.
+ if(suballocItem->offset + totalSize > GetSize())
+ {
+ return false;
+ }
+
+ // Advance lastSuballocItem until desired size is reached.
+ // Update itemsToMakeLostCount.
+ VmaSuballocationList::const_iterator lastSuballocItem = suballocItem;
+ if(totalSize > suballocItem->size)
+ {
+ VkDeviceSize remainingSize = totalSize - suballocItem->size;
+ while(remainingSize > 0)
+ {
+ ++lastSuballocItem;
+ if(lastSuballocItem == m_Suballocations.cend())
+ {
+ return false;
+ }
+ if(lastSuballocItem->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ *pSumFreeSize += lastSuballocItem->size;
+ }
+ else
+ {
+ VMA_ASSERT(lastSuballocItem->hAllocation != VK_NULL_HANDLE);
+ if(lastSuballocItem->hAllocation->CanBecomeLost() &&
+ lastSuballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
+ {
+ ++*itemsToMakeLostCount;
+ *pSumItemSize += lastSuballocItem->size;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ remainingSize = (lastSuballocItem->size < remainingSize) ?
+ remainingSize - lastSuballocItem->size : 0;
+ }
+ }
+
+ // Check next suballocations for BufferImageGranularity conflicts.
+ // If conflict exists, we must mark more allocations lost or fail.
+ if(bufferImageGranularity > 1)
+ {
+ VmaSuballocationList::const_iterator nextSuballocItem = lastSuballocItem;
+ ++nextSuballocItem;
+ while(nextSuballocItem != m_Suballocations.cend())
+ {
+ const VmaSuballocation& nextSuballoc = *nextSuballocItem;
+ if(VmaBlocksOnSamePage(*pOffset, allocSize, nextSuballoc.offset, bufferImageGranularity))
+ {
+ if(VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type))
+ {
+ VMA_ASSERT(nextSuballoc.hAllocation != VK_NULL_HANDLE);
+ if(nextSuballoc.hAllocation->CanBecomeLost() &&
+ nextSuballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
+ {
+ ++*itemsToMakeLostCount;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ // Already on next page.
+ break;
+ }
+ ++nextSuballocItem;
+ }
+ }
+ }
+ else
+ {
+ const VmaSuballocation& suballoc = *suballocItem;
+ VMA_ASSERT(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE);
+
+ *pSumFreeSize = suballoc.size;
+
+ // Size of this suballocation is too small for this request: Early return.
+ if(suballoc.size < allocSize)
+ {
+ return false;
+ }
+
+ // Start from offset equal to beginning of this suballocation.
+ *pOffset = suballoc.offset;
+
+ // Apply VMA_DEBUG_MARGIN at the beginning.
+ if(VMA_DEBUG_MARGIN > 0)
+ {
+ *pOffset += VMA_DEBUG_MARGIN;
+ }
+
+ // Apply alignment.
+ *pOffset = VmaAlignUp(*pOffset, allocAlignment);
+
+ // Check previous suballocations for BufferImageGranularity conflicts.
+ // Make bigger alignment if necessary.
+ if(bufferImageGranularity > 1)
+ {
+ bool bufferImageGranularityConflict = false;
+ VmaSuballocationList::const_iterator prevSuballocItem = suballocItem;
+ while(prevSuballocItem != m_Suballocations.cbegin())
+ {
+ --prevSuballocItem;
+ const VmaSuballocation& prevSuballoc = *prevSuballocItem;
+ if(VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, *pOffset, bufferImageGranularity))
+ {
+ if(VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType))
+ {
+ bufferImageGranularityConflict = true;
+ break;
+ }
+ }
+ else
+ // Already on previous page.
+ break;
+ }
+ if(bufferImageGranularityConflict)
+ {
+ *pOffset = VmaAlignUp(*pOffset, bufferImageGranularity);
+ }
+ }
+
+ // Calculate padding at the beginning based on current offset.
+ const VkDeviceSize paddingBegin = *pOffset - suballoc.offset;
+
+ // Calculate required margin at the end.
+ const VkDeviceSize requiredEndMargin = VMA_DEBUG_MARGIN;
+
+ // Fail if requested size plus margin before and after is bigger than size of this suballocation.
+ if(paddingBegin + allocSize + requiredEndMargin > suballoc.size)
+ {
+ return false;
+ }
+
+ // Check next suballocations for BufferImageGranularity conflicts.
+ // If conflict exists, allocation cannot be made here.
+ if(bufferImageGranularity > 1)
+ {
+ VmaSuballocationList::const_iterator nextSuballocItem = suballocItem;
+ ++nextSuballocItem;
+ while(nextSuballocItem != m_Suballocations.cend())
+ {
+ const VmaSuballocation& nextSuballoc = *nextSuballocItem;
+ if(VmaBlocksOnSamePage(*pOffset, allocSize, nextSuballoc.offset, bufferImageGranularity))
+ {
+ if(VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ // Already on next page.
+ break;
+ }
+ ++nextSuballocItem;
+ }
+ }
+ }
+
+ // All tests passed: Success. pOffset is already filled.
+ return true;
}
void VmaBlockMetadata_Generic::MergeFreeWithNext(VmaSuballocationList::iterator item)
{
- VMA_ASSERT(item != m_Suballocations.end());
- VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
-
- VmaSuballocationList::iterator nextItem = item;
- ++nextItem;
- VMA_ASSERT(nextItem != m_Suballocations.end());
- VMA_ASSERT(nextItem->type == VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(item != m_Suballocations.end());
+ VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
+
+ VmaSuballocationList::iterator nextItem = item;
+ ++nextItem;
+ VMA_ASSERT(nextItem != m_Suballocations.end());
+ VMA_ASSERT(nextItem->type == VMA_SUBALLOCATION_TYPE_FREE);
- item->size += nextItem->size;
- --m_FreeCount;
- m_Suballocations.erase(nextItem);
+ item->size += nextItem->size;
+ --m_FreeCount;
+ m_Suballocations.erase(nextItem);
}
VmaSuballocationList::iterator VmaBlockMetadata_Generic::FreeSuballocation(VmaSuballocationList::iterator suballocItem)
{
- // Change this suballocation to be marked as free.
- VmaSuballocation& suballoc = *suballocItem;
- suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- suballoc.hAllocation = VK_NULL_HANDLE;
-
- // Update totals.
- ++m_FreeCount;
- m_SumFreeSize += suballoc.size;
-
- // Merge with previous and/or next suballocation if it's also free.
- bool mergeWithNext = false;
- bool mergeWithPrev = false;
-
- VmaSuballocationList::iterator nextItem = suballocItem;
- ++nextItem;
- if((nextItem != m_Suballocations.end()) && (nextItem->type == VMA_SUBALLOCATION_TYPE_FREE))
- {
- mergeWithNext = true;
- }
-
- VmaSuballocationList::iterator prevItem = suballocItem;
- if(suballocItem != m_Suballocations.begin())
- {
- --prevItem;
- if(prevItem->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- mergeWithPrev = true;
- }
- }
-
- if(mergeWithNext)
- {
- UnregisterFreeSuballocation(nextItem);
- MergeFreeWithNext(suballocItem);
- }
-
- if(mergeWithPrev)
- {
- UnregisterFreeSuballocation(prevItem);
- MergeFreeWithNext(prevItem);
- RegisterFreeSuballocation(prevItem);
- return prevItem;
- }
- else
- {
- RegisterFreeSuballocation(suballocItem);
- return suballocItem;
- }
+ // Change this suballocation to be marked as free.
+ VmaSuballocation& suballoc = *suballocItem;
+ suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ suballoc.hAllocation = VK_NULL_HANDLE;
+
+ // Update totals.
+ ++m_FreeCount;
+ m_SumFreeSize += suballoc.size;
+
+ // Merge with previous and/or next suballocation if it's also free.
+ bool mergeWithNext = false;
+ bool mergeWithPrev = false;
+
+ VmaSuballocationList::iterator nextItem = suballocItem;
+ ++nextItem;
+ if((nextItem != m_Suballocations.end()) && (nextItem->type == VMA_SUBALLOCATION_TYPE_FREE))
+ {
+ mergeWithNext = true;
+ }
+
+ VmaSuballocationList::iterator prevItem = suballocItem;
+ if(suballocItem != m_Suballocations.begin())
+ {
+ --prevItem;
+ if(prevItem->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ mergeWithPrev = true;
+ }
+ }
+
+ if(mergeWithNext)
+ {
+ UnregisterFreeSuballocation(nextItem);
+ MergeFreeWithNext(suballocItem);
+ }
+
+ if(mergeWithPrev)
+ {
+ UnregisterFreeSuballocation(prevItem);
+ MergeFreeWithNext(prevItem);
+ RegisterFreeSuballocation(prevItem);
+ return prevItem;
+ }
+ else
+ {
+ RegisterFreeSuballocation(suballocItem);
+ return suballocItem;
+ }
}
void VmaBlockMetadata_Generic::RegisterFreeSuballocation(VmaSuballocationList::iterator item)
{
- VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
- VMA_ASSERT(item->size > 0);
+ VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(item->size > 0);
- // You may want to enable this validation at the beginning or at the end of
- // this function, depending on what do you want to check.
- VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
+ // You may want to enable this validation at the beginning or at the end of
+ // this function, depending on what do you want to check.
+ VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
- if(item->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- if(m_FreeSuballocationsBySize.empty())
- {
- m_FreeSuballocationsBySize.push_back(item);
- }
- else
- {
- VmaVectorInsertSorted<VmaSuballocationItemSizeLess>(m_FreeSuballocationsBySize, item);
- }
- }
+ if(item->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ if(m_FreeSuballocationsBySize.empty())
+ {
+ m_FreeSuballocationsBySize.push_back(item);
+ }
+ else
+ {
+ VmaVectorInsertSorted<VmaSuballocationItemSizeLess>(m_FreeSuballocationsBySize, item);
+ }
+ }
- //VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
+ //VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
}
void VmaBlockMetadata_Generic::UnregisterFreeSuballocation(VmaSuballocationList::iterator item)
{
- VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
- VMA_ASSERT(item->size > 0);
-
- // You may want to enable this validation at the beginning or at the end of
- // this function, depending on what do you want to check.
- VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
-
- if(item->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- VmaSuballocationList::iterator* const it = VmaBinaryFindFirstNotLess(
- m_FreeSuballocationsBySize.data(),
- m_FreeSuballocationsBySize.data() + m_FreeSuballocationsBySize.size(),
- item,
- VmaSuballocationItemSizeLess());
- for(size_t index = it - m_FreeSuballocationsBySize.data();
- index < m_FreeSuballocationsBySize.size();
- ++index)
- {
- if(m_FreeSuballocationsBySize[index] == item)
- {
- VmaVectorRemove(m_FreeSuballocationsBySize, index);
- return;
- }
- VMA_ASSERT((m_FreeSuballocationsBySize[index]->size == item->size) && "Not found.");
- }
- VMA_ASSERT(0 && "Not found.");
- }
-
- //VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
+ VMA_ASSERT(item->type == VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(item->size > 0);
+
+ // You may want to enable this validation at the beginning or at the end of
+ // this function, depending on what do you want to check.
+ VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
+
+ if(item->size >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ VmaSuballocationList::iterator* const it = VmaBinaryFindFirstNotLess(
+ m_FreeSuballocationsBySize.data(),
+ m_FreeSuballocationsBySize.data() + m_FreeSuballocationsBySize.size(),
+ item,
+ VmaSuballocationItemSizeLess());
+ for(size_t index = it - m_FreeSuballocationsBySize.data();
+ index < m_FreeSuballocationsBySize.size();
+ ++index)
+ {
+ if(m_FreeSuballocationsBySize[index] == item)
+ {
+ VmaVectorRemove(m_FreeSuballocationsBySize, index);
+ return;
+ }
+ VMA_ASSERT((m_FreeSuballocationsBySize[index]->size == item->size) && "Not found.");
+ }
+ VMA_ASSERT(0 && "Not found.");
+ }
+
+ //VMA_HEAVY_ASSERT(ValidateFreeSuballocationList());
}
bool VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible(
- VkDeviceSize bufferImageGranularity,
- VmaSuballocationType& inOutPrevSuballocType) const
-{
- if(bufferImageGranularity == 1 || IsEmpty())
- {
- return false;
- }
-
- VkDeviceSize minAlignment = VK_WHOLE_SIZE;
- bool typeConflictFound = false;
- for(VmaSuballocationList::const_iterator it = m_Suballocations.cbegin();
- it != m_Suballocations.cend();
- ++it)
- {
- const VmaSuballocationType suballocType = it->type;
- if(suballocType != VMA_SUBALLOCATION_TYPE_FREE)
- {
- minAlignment = VMA_MIN(minAlignment, it->hAllocation->GetAlignment());
- if(VmaIsBufferImageGranularityConflict(inOutPrevSuballocType, suballocType))
- {
- typeConflictFound = true;
- }
- inOutPrevSuballocType = suballocType;
- }
- }
-
- return typeConflictFound || minAlignment >= bufferImageGranularity;
+ VkDeviceSize bufferImageGranularity,
+ VmaSuballocationType& inOutPrevSuballocType) const
+{
+ if(bufferImageGranularity == 1 || IsEmpty())
+ {
+ return false;
+ }
+
+ VkDeviceSize minAlignment = VK_WHOLE_SIZE;
+ bool typeConflictFound = false;
+ for(VmaSuballocationList::const_iterator it = m_Suballocations.cbegin();
+ it != m_Suballocations.cend();
+ ++it)
+ {
+ const VmaSuballocationType suballocType = it->type;
+ if(suballocType != VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ minAlignment = VMA_MIN(minAlignment, it->hAllocation->GetAlignment());
+ if(VmaIsBufferImageGranularityConflict(inOutPrevSuballocType, suballocType))
+ {
+ typeConflictFound = true;
+ }
+ inOutPrevSuballocType = suballocType;
+ }
+ }
+
+ return typeConflictFound || minAlignment >= bufferImageGranularity;
}
////////////////////////////////////////////////////////////////////////////////
// class VmaBlockMetadata_Linear
VmaBlockMetadata_Linear::VmaBlockMetadata_Linear(VmaAllocator hAllocator) :
- VmaBlockMetadata(hAllocator),
- m_SumFreeSize(0),
- m_Suballocations0(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
- m_Suballocations1(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
- m_1stVectorIndex(0),
- m_2ndVectorMode(SECOND_VECTOR_EMPTY),
- m_1stNullItemsBeginCount(0),
- m_1stNullItemsMiddleCount(0),
- m_2ndNullItemsCount(0)
+ VmaBlockMetadata(hAllocator),
+ m_SumFreeSize(0),
+ m_Suballocations0(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
+ m_Suballocations1(VmaStlAllocator<VmaSuballocation>(hAllocator->GetAllocationCallbacks())),
+ m_1stVectorIndex(0),
+ m_2ndVectorMode(SECOND_VECTOR_EMPTY),
+ m_1stNullItemsBeginCount(0),
+ m_1stNullItemsMiddleCount(0),
+ m_2ndNullItemsCount(0)
{
}
@@ -9328,1728 +9166,1728 @@ VmaBlockMetadata_Linear::~VmaBlockMetadata_Linear()
void VmaBlockMetadata_Linear::Init(VkDeviceSize size)
{
- VmaBlockMetadata::Init(size);
- m_SumFreeSize = 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].hAllocation != VK_NULL_HANDLE);
- // Null item at the end should be just pop_back().
- VMA_VALIDATE(suballocations1st.back().hAllocation != VK_NULL_HANDLE);
- }
- if(!suballocations2nd.empty())
- {
- // Null item at the end should be just pop_back().
- VMA_VALIDATE(suballocations2nd.back().hAllocation != VK_NULL_HANDLE);
- }
-
- VMA_VALIDATE(m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount <= suballocations1st.size());
- VMA_VALIDATE(m_2ndNullItemsCount <= suballocations2nd.size());
-
- VkDeviceSize sumUsedSize = 0;
- const size_t suballoc1stCount = suballocations1st.size();
- VkDeviceSize offset = VMA_DEBUG_MARGIN;
-
- 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);
-
- VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
- VMA_VALIDATE(suballoc.offset >= offset);
-
- if(!currFree)
- {
- VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
- VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
- sumUsedSize += suballoc.size;
- }
- else
- {
- ++nullItem2ndCount;
- }
-
- offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
- }
-
- 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.hAllocation == VK_NULL_HANDLE);
- }
-
- 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);
-
- VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
- VMA_VALIDATE(suballoc.offset >= offset);
- VMA_VALIDATE(i >= m_1stNullItemsBeginCount || currFree);
-
- if(!currFree)
- {
- VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
- VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
- sumUsedSize += suballoc.size;
- }
- else
- {
- ++nullItem1stCount;
- }
-
- offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
- }
- 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);
-
- VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
- VMA_VALIDATE(suballoc.offset >= offset);
-
- if(!currFree)
- {
- VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
- VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
- sumUsedSize += suballoc.size;
- }
- else
- {
- ++nullItem2ndCount;
- }
-
- offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
- }
-
- VMA_VALIDATE(nullItem2ndCount == m_2ndNullItemsCount);
- }
-
- VMA_VALIDATE(offset <= GetSize());
- VMA_VALIDATE(m_SumFreeSize == GetSize() - sumUsedSize);
-
- return true;
+ 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].hAllocation != VK_NULL_HANDLE);
+ // Null item at the end should be just pop_back().
+ VMA_VALIDATE(suballocations1st.back().hAllocation != VK_NULL_HANDLE);
+ }
+ if(!suballocations2nd.empty())
+ {
+ // Null item at the end should be just pop_back().
+ VMA_VALIDATE(suballocations2nd.back().hAllocation != VK_NULL_HANDLE);
+ }
+
+ VMA_VALIDATE(m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount <= suballocations1st.size());
+ VMA_VALIDATE(m_2ndNullItemsCount <= suballocations2nd.size());
+
+ VkDeviceSize sumUsedSize = 0;
+ const size_t suballoc1stCount = suballocations1st.size();
+ VkDeviceSize offset = VMA_DEBUG_MARGIN;
+
+ 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);
+
+ VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
+ VMA_VALIDATE(suballoc.offset >= offset);
+
+ if(!currFree)
+ {
+ VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
+ VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
+ sumUsedSize += suballoc.size;
+ }
+ else
+ {
+ ++nullItem2ndCount;
+ }
+
+ offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
+ }
+
+ 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.hAllocation == VK_NULL_HANDLE);
+ }
+
+ 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);
+
+ VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
+ VMA_VALIDATE(suballoc.offset >= offset);
+ VMA_VALIDATE(i >= m_1stNullItemsBeginCount || currFree);
+
+ if(!currFree)
+ {
+ VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
+ VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
+ sumUsedSize += suballoc.size;
+ }
+ else
+ {
+ ++nullItem1stCount;
+ }
+
+ offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
+ }
+ 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);
+
+ VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE));
+ VMA_VALIDATE(suballoc.offset >= offset);
+
+ if(!currFree)
+ {
+ VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset);
+ VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size);
+ sumUsedSize += suballoc.size;
+ }
+ else
+ {
+ ++nullItem2ndCount;
+ }
+
+ offset = suballoc.offset + suballoc.size + VMA_DEBUG_MARGIN;
+ }
+
+ 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;
+ return AccessSuballocations1st().size() - (m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount) +
+ AccessSuballocations2nd().size() - m_2ndNullItemsCount;
}
VkDeviceSize VmaBlockMetadata_Linear::GetUnusedRangeSizeMax() const
{
- const VkDeviceSize size = GetSize();
-
- /*
- We don't consider gaps inside allocation vectors with freed allocations because
- they are not suitable for reuse in linear allocator. We consider only space that
- is available for new allocations.
- */
- if(IsEmpty())
- {
- return size;
- }
-
- const SuballocationVectorType& suballocations1st = AccessSuballocations1st();
-
- switch(m_2ndVectorMode)
- {
- case SECOND_VECTOR_EMPTY:
- /*
- Available space is after end of 1st, as well as before beginning of 1st (which
- whould make it a ring buffer).
- */
- {
- const size_t suballocations1stCount = suballocations1st.size();
- VMA_ASSERT(suballocations1stCount > m_1stNullItemsBeginCount);
- const VmaSuballocation& firstSuballoc = suballocations1st[m_1stNullItemsBeginCount];
- const VmaSuballocation& lastSuballoc = suballocations1st[suballocations1stCount - 1];
- return VMA_MAX(
- firstSuballoc.offset,
- size - (lastSuballoc.offset + lastSuballoc.size));
- }
- break;
-
- case SECOND_VECTOR_RING_BUFFER:
- /*
- Available space is only between end of 2nd and beginning of 1st.
- */
- {
- const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
- const VmaSuballocation& lastSuballoc2nd = suballocations2nd.back();
- const VmaSuballocation& firstSuballoc1st = suballocations1st[m_1stNullItemsBeginCount];
- return firstSuballoc1st.offset - (lastSuballoc2nd.offset + lastSuballoc2nd.size);
- }
- break;
-
- case SECOND_VECTOR_DOUBLE_STACK:
- /*
- Available space is only between end of 1st and top of 2nd.
- */
- {
- const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
- const VmaSuballocation& topSuballoc2nd = suballocations2nd.back();
- const VmaSuballocation& lastSuballoc1st = suballocations1st.back();
- return topSuballoc2nd.offset - (lastSuballoc1st.offset + lastSuballoc1st.size);
- }
- break;
-
- default:
- VMA_ASSERT(0);
- return 0;
- }
+ const VkDeviceSize size = GetSize();
+
+ /*
+ We don't consider gaps inside allocation vectors with freed allocations because
+ they are not suitable for reuse in linear allocator. We consider only space that
+ is available for new allocations.
+ */
+ if(IsEmpty())
+ {
+ return size;
+ }
+
+ const SuballocationVectorType& suballocations1st = AccessSuballocations1st();
+
+ switch(m_2ndVectorMode)
+ {
+ case SECOND_VECTOR_EMPTY:
+ /*
+ Available space is after end of 1st, as well as before beginning of 1st (which
+ whould make it a ring buffer).
+ */
+ {
+ const size_t suballocations1stCount = suballocations1st.size();
+ VMA_ASSERT(suballocations1stCount > m_1stNullItemsBeginCount);
+ const VmaSuballocation& firstSuballoc = suballocations1st[m_1stNullItemsBeginCount];
+ const VmaSuballocation& lastSuballoc = suballocations1st[suballocations1stCount - 1];
+ return VMA_MAX(
+ firstSuballoc.offset,
+ size - (lastSuballoc.offset + lastSuballoc.size));
+ }
+ break;
+
+ case SECOND_VECTOR_RING_BUFFER:
+ /*
+ Available space is only between end of 2nd and beginning of 1st.
+ */
+ {
+ const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
+ const VmaSuballocation& lastSuballoc2nd = suballocations2nd.back();
+ const VmaSuballocation& firstSuballoc1st = suballocations1st[m_1stNullItemsBeginCount];
+ return firstSuballoc1st.offset - (lastSuballoc2nd.offset + lastSuballoc2nd.size);
+ }
+ break;
+
+ case SECOND_VECTOR_DOUBLE_STACK:
+ /*
+ Available space is only between end of 1st and top of 2nd.
+ */
+ {
+ const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
+ const VmaSuballocation& topSuballoc2nd = suballocations2nd.back();
+ const VmaSuballocation& lastSuballoc1st = suballocations1st.back();
+ return topSuballoc2nd.offset - (lastSuballoc1st.offset + lastSuballoc1st.size);
+ }
+ break;
+
+ default:
+ VMA_ASSERT(0);
+ return 0;
+ }
}
void VmaBlockMetadata_Linear::CalcAllocationStatInfo(VmaStatInfo& outInfo) 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();
-
- outInfo.blockCount = 1;
- outInfo.allocationCount = (uint32_t)GetAllocationCount();
- outInfo.unusedRangeCount = 0;
- outInfo.usedBytes = 0;
- outInfo.allocationSizeMin = UINT64_MAX;
- outInfo.allocationSizeMax = 0;
- outInfo.unusedRangeSizeMin = UINT64_MAX;
- outInfo.unusedRangeSizeMax = 0;
-
- 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- outInfo.usedBytes += suballoc.size;
- outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
- outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- outInfo.usedBytes += suballoc.size;
- outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
- outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
- {
- --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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- outInfo.usedBytes += suballoc.size;
- outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
- outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
- outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // End of loop.
- lastOffset = size;
- }
- }
- }
-
- outInfo.unusedBytes = size - outInfo.usedBytes;
+ const VkDeviceSize size = GetSize();
+ const SuballocationVectorType& suballocations1st = AccessSuballocations1st();
+ const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
+ const size_t suballoc1stCount = suballocations1st.size();
+ const size_t suballoc2ndCount = suballocations2nd.size();
+
+ outInfo.blockCount = 1;
+ outInfo.allocationCount = (uint32_t)GetAllocationCount();
+ outInfo.unusedRangeCount = 0;
+ outInfo.usedBytes = 0;
+ outInfo.allocationSizeMin = UINT64_MAX;
+ outInfo.allocationSizeMax = 0;
+ outInfo.unusedRangeSizeMin = UINT64_MAX;
+ outInfo.unusedRangeSizeMax = 0;
+
+ 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ outInfo.usedBytes += suballoc.size;
+ outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
+ outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ outInfo.usedBytes += suballoc.size;
+ outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
+ outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
+ {
+ --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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ outInfo.usedBytes += suballoc.size;
+ outInfo.allocationSizeMin = VMA_MIN(outInfo.allocationSizeMin, suballoc.size);
+ outInfo.allocationSizeMax = VMA_MIN(outInfo.allocationSizeMax, 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;
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ outInfo.unusedRangeSizeMax = VMA_MIN(outInfo.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // End of loop.
+ lastOffset = size;
+ }
+ }
+ }
+
+ outInfo.unusedBytes = size - outInfo.usedBytes;
}
void VmaBlockMetadata_Linear::AddPoolStats(VmaPoolStats& 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.size += size;
-
- 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- ++inoutStats.allocationCount;
-
- // 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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- ++inoutStats.allocationCount;
-
- // 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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
- {
- --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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // 2. Process this allocation.
- // There is allocation with suballoc.offset, suballoc.size.
- ++inoutStats.allocationCount;
-
- // 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;
- inoutStats.unusedSize += unusedRangeSize;
- ++inoutStats.unusedRangeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
- }
-
- // End of loop.
- lastOffset = size;
- }
- }
- }
+ 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.size += size;
+
+ 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ ++inoutStats.allocationCount;
+
+ // 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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ ++inoutStats.allocationCount;
+
+ // 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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, 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].hAllocation == VK_NULL_HANDLE)
+ {
+ --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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 2. Process this allocation.
+ // There is allocation with suballoc.offset, suballoc.size.
+ ++inoutStats.allocationCount;
+
+ // 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;
+ inoutStats.unusedSize += unusedRangeSize;
+ ++inoutStats.unusedRangeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, unusedRangeSize);
+ }
+
+ // 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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].hAllocation == VK_NULL_HANDLE)
- {
- ++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 < size)
- {
- // 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].hAllocation == VK_NULL_HANDLE)
- {
- --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].hAllocation == VK_NULL_HANDLE)
- {
- ++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.hAllocation);
-
- // 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].hAllocation == VK_NULL_HANDLE)
- {
- ++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.hAllocation);
-
- // 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].hAllocation == VK_NULL_HANDLE)
- {
- --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.hAllocation);
-
- // 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);
+ 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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 < size)
+ {
+ // 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].hAllocation == VK_NULL_HANDLE)
+ {
+ --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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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.hAllocation);
+
+ // 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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.hAllocation);
+
+ // 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].hAllocation == VK_NULL_HANDLE)
+ {
+ --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.hAllocation);
+
+ // 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 // #if VMA_STATS_STRING_ENABLED
bool VmaBlockMetadata_Linear::CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- 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());
- return upperAddress ?
- CreateAllocationRequest_UpperAddress(
- currentFrameIndex, frameInUseCount, bufferImageGranularity,
- allocSize, allocAlignment, allocType, canMakeOtherLost, strategy, pAllocationRequest) :
- CreateAllocationRequest_LowerAddress(
- currentFrameIndex, frameInUseCount, bufferImageGranularity,
- allocSize, allocAlignment, allocType, canMakeOtherLost, strategy, pAllocationRequest);
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ 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());
+ return upperAddress ?
+ CreateAllocationRequest_UpperAddress(
+ currentFrameIndex, frameInUseCount, bufferImageGranularity,
+ allocSize, allocAlignment, allocType, canMakeOtherLost, strategy, pAllocationRequest) :
+ CreateAllocationRequest_LowerAddress(
+ currentFrameIndex, frameInUseCount, bufferImageGranularity,
+ allocSize, allocAlignment, allocType, canMakeOtherLost, strategy, pAllocationRequest);
}
bool VmaBlockMetadata_Linear::CreateAllocationRequest_UpperAddress(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest)
-{
- const VkDeviceSize size = GetSize();
- 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 > size)
- {
- return false;
- }
- VkDeviceSize resultBaseOffset = size - 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;
-
- // Apply VMA_DEBUG_MARGIN at the end.
- if(VMA_DEBUG_MARGIN > 0)
- {
- if(resultOffset < VMA_DEBUG_MARGIN)
- {
- return false;
- }
- resultOffset -= VMA_DEBUG_MARGIN;
- }
-
- // Apply alignment.
- resultOffset = VmaAlignDown(resultOffset, allocAlignment);
-
- // Check next suballocations from 2nd for BufferImageGranularity conflicts.
- // Make bigger alignment if necessary.
- if(bufferImageGranularity > 1 && !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 + VMA_DEBUG_MARGIN <= 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->offset = resultOffset;
- pAllocationRequest->sumFreeSize = resultBaseOffset + allocSize - endOf1st;
- pAllocationRequest->sumItemSize = 0;
- // pAllocationRequest->item unused.
- pAllocationRequest->itemsToMakeLostCount = 0;
- pAllocationRequest->type = VmaAllocationRequestType::UpperAddress;
- return true;
- }
-
- return false;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ const VkDeviceSize size = GetSize();
+ 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 > size)
+ {
+ return false;
+ }
+ VkDeviceSize resultBaseOffset = size - 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;
+
+ // Apply VMA_DEBUG_MARGIN at the end.
+ if(VMA_DEBUG_MARGIN > 0)
+ {
+ if(resultOffset < VMA_DEBUG_MARGIN)
+ {
+ return false;
+ }
+ resultOffset -= VMA_DEBUG_MARGIN;
+ }
+
+ // Apply alignment.
+ resultOffset = VmaAlignDown(resultOffset, allocAlignment);
+
+ // Check next suballocations from 2nd for BufferImageGranularity conflicts.
+ // Make bigger alignment if necessary.
+ if(bufferImageGranularity > 1 && !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 + VMA_DEBUG_MARGIN <= 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->offset = resultOffset;
+ pAllocationRequest->sumFreeSize = resultBaseOffset + allocSize - endOf1st;
+ pAllocationRequest->sumItemSize = 0;
+ // pAllocationRequest->item unused.
+ pAllocationRequest->itemsToMakeLostCount = 0;
+ pAllocationRequest->type = VmaAllocationRequestType::UpperAddress;
+ return true;
+ }
+
+ return false;
}
bool VmaBlockMetadata_Linear::CreateAllocationRequest_LowerAddress(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest)
-{
- const VkDeviceSize size = GetSize();
- 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;
- }
-
- // Start from offset equal to beginning of free space.
- VkDeviceSize resultOffset = resultBaseOffset;
-
- // Apply VMA_DEBUG_MARGIN at the beginning.
- if(VMA_DEBUG_MARGIN > 0)
- {
- resultOffset += VMA_DEBUG_MARGIN;
- }
-
- // Apply alignment.
- resultOffset = VmaAlignUp(resultOffset, allocAlignment);
-
- // Check previous suballocations for BufferImageGranularity conflicts.
- // Make bigger alignment if necessary.
- if(bufferImageGranularity > 1 && !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 : size;
-
- // There is enough free space at the end after alignment.
- if(resultOffset + allocSize + VMA_DEBUG_MARGIN <= freeSpaceEnd)
- {
- // Check next suballocations for BufferImageGranularity conflicts.
- // If conflict exists, allocation cannot be made here.
- if(bufferImageGranularity > 1 && 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->offset = resultOffset;
- pAllocationRequest->sumFreeSize = freeSpaceEnd - resultBaseOffset;
- pAllocationRequest->sumItemSize = 0;
- // pAllocationRequest->item, customData unused.
- pAllocationRequest->type = VmaAllocationRequestType::EndOf1st;
- pAllocationRequest->itemsToMakeLostCount = 0;
- 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;
- }
-
- // Start from offset equal to beginning of free space.
- VkDeviceSize resultOffset = resultBaseOffset;
-
- // Apply VMA_DEBUG_MARGIN at the beginning.
- if(VMA_DEBUG_MARGIN > 0)
- {
- resultOffset += VMA_DEBUG_MARGIN;
- }
-
- // Apply alignment.
- resultOffset = VmaAlignUp(resultOffset, allocAlignment);
-
- // Check previous suballocations for BufferImageGranularity conflicts.
- // Make bigger alignment if necessary.
- if(bufferImageGranularity > 1 && !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);
- }
- }
-
- pAllocationRequest->itemsToMakeLostCount = 0;
- pAllocationRequest->sumItemSize = 0;
- size_t index1st = m_1stNullItemsBeginCount;
-
- if(canMakeOtherLost)
- {
- while(index1st < suballocations1st.size() &&
- resultOffset + allocSize + VMA_DEBUG_MARGIN > suballocations1st[index1st].offset)
- {
- // Next colliding allocation at the beginning of 1st vector found. Try to make it lost.
- const VmaSuballocation& suballoc = suballocations1st[index1st];
- if(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- // No problem.
- }
- else
- {
- VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE);
- if(suballoc.hAllocation->CanBecomeLost() &&
- suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
- {
- ++pAllocationRequest->itemsToMakeLostCount;
- pAllocationRequest->sumItemSize += suballoc.size;
- }
- else
- {
- return false;
- }
- }
- ++index1st;
- }
-
- // Check next suballocations for BufferImageGranularity conflicts.
- // If conflict exists, we must mark more allocations lost or fail.
- if(bufferImageGranularity > 1)
- {
- while(index1st < suballocations1st.size())
- {
- const VmaSuballocation& suballoc = suballocations1st[index1st];
- if(VmaBlocksOnSamePage(resultOffset, allocSize, suballoc.offset, bufferImageGranularity))
- {
- if(suballoc.hAllocation != VK_NULL_HANDLE)
- {
- // Not checking actual VmaIsBufferImageGranularityConflict(allocType, suballoc.type).
- if(suballoc.hAllocation->CanBecomeLost() &&
- suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
- {
- ++pAllocationRequest->itemsToMakeLostCount;
- pAllocationRequest->sumItemSize += suballoc.size;
- }
- else
- {
- return false;
- }
- }
- }
- else
- {
- // Already on next page.
- break;
- }
- ++index1st;
- }
- }
-
- // Special case: There is not enough room at the end for this allocation, even after making all from the 1st lost.
- if(index1st == suballocations1st.size() &&
- resultOffset + allocSize + VMA_DEBUG_MARGIN > size)
- {
- // TODO: This is a known bug that it's not yet implemented and the allocation is failing.
- VMA_DEBUG_LOG("Unsupported special case in custom pool with linear allocation algorithm used as ring buffer with allocations that can be lost.");
- }
- }
-
- // There is enough free space at the end after alignment.
- if((index1st == suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= size) ||
- (index1st < suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= suballocations1st[index1st].offset))
- {
- // Check next suballocations for BufferImageGranularity conflicts.
- // If conflict exists, allocation cannot be made here.
- if(bufferImageGranularity > 1)
- {
- 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->offset = resultOffset;
- pAllocationRequest->sumFreeSize =
- (index1st < suballocations1st.size() ? suballocations1st[index1st].offset : size)
- - resultBaseOffset
- - pAllocationRequest->sumItemSize;
- pAllocationRequest->type = VmaAllocationRequestType::EndOf2nd;
- // pAllocationRequest->item, customData unused.
- return true;
- }
- }
-
- return false;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ const VkDeviceSize size = GetSize();
+ 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;
+ }
+
+ // Start from offset equal to beginning of free space.
+ VkDeviceSize resultOffset = resultBaseOffset;
+
+ // Apply VMA_DEBUG_MARGIN at the beginning.
+ if(VMA_DEBUG_MARGIN > 0)
+ {
+ resultOffset += VMA_DEBUG_MARGIN;
+ }
+
+ // Apply alignment.
+ resultOffset = VmaAlignUp(resultOffset, allocAlignment);
+
+ // Check previous suballocations for BufferImageGranularity conflicts.
+ // Make bigger alignment if necessary.
+ if(bufferImageGranularity > 1 && !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 : size;
+
+ // There is enough free space at the end after alignment.
+ if(resultOffset + allocSize + VMA_DEBUG_MARGIN <= freeSpaceEnd)
+ {
+ // Check next suballocations for BufferImageGranularity conflicts.
+ // If conflict exists, allocation cannot be made here.
+ if(bufferImageGranularity > 1 && 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->offset = resultOffset;
+ pAllocationRequest->sumFreeSize = freeSpaceEnd - resultBaseOffset;
+ pAllocationRequest->sumItemSize = 0;
+ // pAllocationRequest->item, customData unused.
+ pAllocationRequest->type = VmaAllocationRequestType::EndOf1st;
+ pAllocationRequest->itemsToMakeLostCount = 0;
+ 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;
+ }
+
+ // Start from offset equal to beginning of free space.
+ VkDeviceSize resultOffset = resultBaseOffset;
+
+ // Apply VMA_DEBUG_MARGIN at the beginning.
+ if(VMA_DEBUG_MARGIN > 0)
+ {
+ resultOffset += VMA_DEBUG_MARGIN;
+ }
+
+ // Apply alignment.
+ resultOffset = VmaAlignUp(resultOffset, allocAlignment);
+
+ // Check previous suballocations for BufferImageGranularity conflicts.
+ // Make bigger alignment if necessary.
+ if(bufferImageGranularity > 1 && !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);
+ }
+ }
+
+ pAllocationRequest->itemsToMakeLostCount = 0;
+ pAllocationRequest->sumItemSize = 0;
+ size_t index1st = m_1stNullItemsBeginCount;
+
+ if(canMakeOtherLost)
+ {
+ while(index1st < suballocations1st.size() &&
+ resultOffset + allocSize + VMA_DEBUG_MARGIN > suballocations1st[index1st].offset)
+ {
+ // Next colliding allocation at the beginning of 1st vector found. Try to make it lost.
+ const VmaSuballocation& suballoc = suballocations1st[index1st];
+ if(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ // No problem.
+ }
+ else
+ {
+ VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE);
+ if(suballoc.hAllocation->CanBecomeLost() &&
+ suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
+ {
+ ++pAllocationRequest->itemsToMakeLostCount;
+ pAllocationRequest->sumItemSize += suballoc.size;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ ++index1st;
+ }
+
+ // Check next suballocations for BufferImageGranularity conflicts.
+ // If conflict exists, we must mark more allocations lost or fail.
+ if(bufferImageGranularity > 1)
+ {
+ while(index1st < suballocations1st.size())
+ {
+ const VmaSuballocation& suballoc = suballocations1st[index1st];
+ if(VmaBlocksOnSamePage(resultOffset, allocSize, suballoc.offset, bufferImageGranularity))
+ {
+ if(suballoc.hAllocation != VK_NULL_HANDLE)
+ {
+ // Not checking actual VmaIsBufferImageGranularityConflict(allocType, suballoc.type).
+ if(suballoc.hAllocation->CanBecomeLost() &&
+ suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex)
+ {
+ ++pAllocationRequest->itemsToMakeLostCount;
+ pAllocationRequest->sumItemSize += suballoc.size;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ // Already on next page.
+ break;
+ }
+ ++index1st;
+ }
+ }
+
+ // Special case: There is not enough room at the end for this allocation, even after making all from the 1st lost.
+ if(index1st == suballocations1st.size() &&
+ resultOffset + allocSize + VMA_DEBUG_MARGIN > size)
+ {
+ // TODO: This is a known bug that it's not yet implemented and the allocation is failing.
+ VMA_DEBUG_LOG("Unsupported special case in custom pool with linear allocation algorithm used as ring buffer with allocations that can be lost.");
+ }
+ }
+
+ // There is enough free space at the end after alignment.
+ if((index1st == suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= size) ||
+ (index1st < suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= suballocations1st[index1st].offset))
+ {
+ // Check next suballocations for BufferImageGranularity conflicts.
+ // If conflict exists, allocation cannot be made here.
+ if(bufferImageGranularity > 1)
+ {
+ 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->offset = resultOffset;
+ pAllocationRequest->sumFreeSize =
+ (index1st < suballocations1st.size() ? suballocations1st[index1st].offset : size)
+ - resultBaseOffset
+ - pAllocationRequest->sumItemSize;
+ pAllocationRequest->type = VmaAllocationRequestType::EndOf2nd;
+ // pAllocationRequest->item, customData unused.
+ return true;
+ }
+ }
+
+ return false;
}
bool VmaBlockMetadata_Linear::MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest)
-{
- if(pAllocationRequest->itemsToMakeLostCount == 0)
- {
- return true;
- }
-
- VMA_ASSERT(m_2ndVectorMode == SECOND_VECTOR_EMPTY || m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER);
-
- // We always start from 1st.
- SuballocationVectorType* suballocations = &AccessSuballocations1st();
- size_t index = m_1stNullItemsBeginCount;
- size_t madeLostCount = 0;
- while(madeLostCount < pAllocationRequest->itemsToMakeLostCount)
- {
- if(index == suballocations->size())
- {
- index = 0;
- // If we get to the end of 1st, we wrap around to beginning of 2nd of 1st.
- if(m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER)
- {
- suballocations = &AccessSuballocations2nd();
- }
- // else: m_2ndVectorMode == SECOND_VECTOR_EMPTY:
- // suballocations continues pointing at AccessSuballocations1st().
- VMA_ASSERT(!suballocations->empty());
- }
- VmaSuballocation& suballoc = (*suballocations)[index];
- if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE)
- {
- VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE);
- VMA_ASSERT(suballoc.hAllocation->CanBecomeLost());
- if(suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
- {
- suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- suballoc.hAllocation = VK_NULL_HANDLE;
- m_SumFreeSize += suballoc.size;
- if(suballocations == &AccessSuballocations1st())
- {
- ++m_1stNullItemsMiddleCount;
- }
- else
- {
- ++m_2ndNullItemsCount;
- }
- ++madeLostCount;
- }
- else
- {
- return false;
- }
- }
- ++index;
- }
-
- CleanupAfterFree();
- //VMA_HEAVY_ASSERT(Validate()); // Already called by ClanupAfterFree().
-
- return true;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ if(pAllocationRequest->itemsToMakeLostCount == 0)
+ {
+ return true;
+ }
+
+ VMA_ASSERT(m_2ndVectorMode == SECOND_VECTOR_EMPTY || m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER);
+
+ // We always start from 1st.
+ SuballocationVectorType* suballocations = &AccessSuballocations1st();
+ size_t index = m_1stNullItemsBeginCount;
+ size_t madeLostCount = 0;
+ while(madeLostCount < pAllocationRequest->itemsToMakeLostCount)
+ {
+ if(index == suballocations->size())
+ {
+ index = 0;
+ // If we get to the end of 1st, we wrap around to beginning of 2nd of 1st.
+ if(m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER)
+ {
+ suballocations = &AccessSuballocations2nd();
+ }
+ // else: m_2ndVectorMode == SECOND_VECTOR_EMPTY:
+ // suballocations continues pointing at AccessSuballocations1st().
+ VMA_ASSERT(!suballocations->empty());
+ }
+ VmaSuballocation& suballoc = (*suballocations)[index];
+ if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE);
+ VMA_ASSERT(suballoc.hAllocation->CanBecomeLost());
+ if(suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
+ {
+ suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ suballoc.hAllocation = VK_NULL_HANDLE;
+ m_SumFreeSize += suballoc.size;
+ if(suballocations == &AccessSuballocations1st())
+ {
+ ++m_1stNullItemsMiddleCount;
+ }
+ else
+ {
+ ++m_2ndNullItemsCount;
+ }
+ ++madeLostCount;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ ++index;
+ }
+
+ CleanupAfterFree();
+ //VMA_HEAVY_ASSERT(Validate()); // Already called by ClanupAfterFree().
+
+ return true;
}
uint32_t VmaBlockMetadata_Linear::MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount)
{
- uint32_t lostAllocationCount = 0;
-
- SuballocationVectorType& suballocations1st = AccessSuballocations1st();
- for(size_t i = m_1stNullItemsBeginCount, count = suballocations1st.size(); i < count; ++i)
- {
- VmaSuballocation& suballoc = suballocations1st[i];
- if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE &&
- suballoc.hAllocation->CanBecomeLost() &&
- suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
- {
- suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- suballoc.hAllocation = VK_NULL_HANDLE;
- ++m_1stNullItemsMiddleCount;
- m_SumFreeSize += suballoc.size;
- ++lostAllocationCount;
- }
- }
-
- SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
- for(size_t i = 0, count = suballocations2nd.size(); i < count; ++i)
- {
- VmaSuballocation& suballoc = suballocations2nd[i];
- if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE &&
- suballoc.hAllocation->CanBecomeLost() &&
- suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
- {
- suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
- suballoc.hAllocation = VK_NULL_HANDLE;
- ++m_2ndNullItemsCount;
- m_SumFreeSize += suballoc.size;
- ++lostAllocationCount;
- }
- }
-
- if(lostAllocationCount)
- {
- CleanupAfterFree();
- }
-
- return lostAllocationCount;
+ uint32_t lostAllocationCount = 0;
+
+ SuballocationVectorType& suballocations1st = AccessSuballocations1st();
+ for(size_t i = m_1stNullItemsBeginCount, count = suballocations1st.size(); i < count; ++i)
+ {
+ VmaSuballocation& suballoc = suballocations1st[i];
+ if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE &&
+ suballoc.hAllocation->CanBecomeLost() &&
+ suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
+ {
+ suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ suballoc.hAllocation = VK_NULL_HANDLE;
+ ++m_1stNullItemsMiddleCount;
+ m_SumFreeSize += suballoc.size;
+ ++lostAllocationCount;
+ }
+ }
+
+ SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
+ for(size_t i = 0, count = suballocations2nd.size(); i < count; ++i)
+ {
+ VmaSuballocation& suballoc = suballocations2nd[i];
+ if(suballoc.type != VMA_SUBALLOCATION_TYPE_FREE &&
+ suballoc.hAllocation->CanBecomeLost() &&
+ suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount))
+ {
+ suballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
+ suballoc.hAllocation = VK_NULL_HANDLE;
+ ++m_2ndNullItemsCount;
+ m_SumFreeSize += suballoc.size;
+ ++lostAllocationCount;
+ }
+ }
+
+ if(lostAllocationCount)
+ {
+ CleanupAfterFree();
+ }
+
+ return lostAllocationCount;
}
VkResult VmaBlockMetadata_Linear::CheckCorruption(const void* pBlockData)
{
- 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 - VMA_DEBUG_MARGIN))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- if(!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- }
- }
-
- 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 - VMA_DEBUG_MARGIN))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- if(!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- }
- }
-
- return VK_SUCCESS;
+ 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 - VMA_DEBUG_MARGIN))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ if(!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ }
+ }
+
+ 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 - VMA_DEBUG_MARGIN))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ if(!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!");
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ }
+ }
+
+ return VK_SUCCESS;
}
void VmaBlockMetadata_Linear::Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation)
-{
- const VmaSuballocation newSuballoc = { request.offset, allocSize, hAllocation, 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() ||
- request.offset >= suballocations1st.back().offset + suballocations1st.back().size);
- // Check if it fits before the end of the block.
- VMA_ASSERT(request.offset + allocSize <= 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() &&
- request.offset + allocSize <= 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;
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation)
+{
+ const VmaSuballocation newSuballoc = { request.offset, allocSize, hAllocation, 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() ||
+ request.offset >= suballocations1st.back().offset + suballocations1st.back().size);
+ // Check if it fits before the end of the block.
+ VMA_ASSERT(request.offset + allocSize <= 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() &&
+ request.offset + allocSize <= 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(const VmaAllocation allocation)
{
- FreeAtOffset(allocation->GetOffset());
+ FreeAtOffset(allocation->GetOffset());
}
void VmaBlockMetadata_Linear::FreeAtOffset(VkDeviceSize offset)
{
- SuballocationVectorType& suballocations1st = AccessSuballocations1st();
- SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
-
- 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.hAllocation = VK_NULL_HANDLE;
- 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;
- }
- }
-
- // Item from the middle of 1st vector.
- {
- VmaSuballocation refSuballoc;
- refSuballoc.offset = offset;
- // Rest of members stays uninitialized intentionally for better performance.
- SuballocationVectorType::iterator it = VmaBinaryFindSorted(
- suballocations1st.begin() + m_1stNullItemsBeginCount,
- suballocations1st.end(),
- refSuballoc,
- VmaSuballocationOffsetLess());
- if(it != suballocations1st.end())
- {
- it->type = VMA_SUBALLOCATION_TYPE_FREE;
- it->hAllocation = VK_NULL_HANDLE;
- ++m_1stNullItemsMiddleCount;
- m_SumFreeSize += it->size;
- CleanupAfterFree();
- return;
- }
- }
-
- if(m_2ndVectorMode != SECOND_VECTOR_EMPTY)
- {
- // Item from the middle of 2nd vector.
- VmaSuballocation refSuballoc;
- refSuballoc.offset = offset;
- // Rest of members stays uninitialized intentionally for better performance.
- 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->hAllocation = VK_NULL_HANDLE;
- ++m_2ndNullItemsCount;
- m_SumFreeSize += it->size;
- CleanupAfterFree();
- return;
- }
- }
-
- VMA_ASSERT(0 && "Allocation to free not found in linear allocator!");
+ SuballocationVectorType& suballocations1st = AccessSuballocations1st();
+ SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();
+
+ 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.hAllocation = VK_NULL_HANDLE;
+ 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;
+ }
+ }
+
+ // Item from the middle of 1st vector.
+ {
+ VmaSuballocation refSuballoc;
+ refSuballoc.offset = offset;
+ // Rest of members stays uninitialized intentionally for better performance.
+ SuballocationVectorType::iterator it = VmaBinaryFindSorted(
+ suballocations1st.begin() + m_1stNullItemsBeginCount,
+ suballocations1st.end(),
+ refSuballoc,
+ VmaSuballocationOffsetLess());
+ if(it != suballocations1st.end())
+ {
+ it->type = VMA_SUBALLOCATION_TYPE_FREE;
+ it->hAllocation = VK_NULL_HANDLE;
+ ++m_1stNullItemsMiddleCount;
+ m_SumFreeSize += it->size;
+ CleanupAfterFree();
+ return;
+ }
+ }
+
+ if(m_2ndVectorMode != SECOND_VECTOR_EMPTY)
+ {
+ // Item from the middle of 2nd vector.
+ VmaSuballocation refSuballoc;
+ refSuballoc.offset = offset;
+ // Rest of members stays uninitialized intentionally for better performance.
+ 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->hAllocation = VK_NULL_HANDLE;
+ ++m_2ndNullItemsCount;
+ m_SumFreeSize += it->size;
+ CleanupAfterFree();
+ return;
+ }
+ }
+
+ VMA_ASSERT(0 && "Allocation to free not found in linear allocator!");
}
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;
+ 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].hAllocation == VK_NULL_HANDLE)
- {
- ++m_1stNullItemsBeginCount;
- --m_1stNullItemsMiddleCount;
- }
-
- // Find more null items at the end of 1st vector.
- while(m_1stNullItemsMiddleCount > 0 &&
- suballocations1st.back().hAllocation == VK_NULL_HANDLE)
- {
- --m_1stNullItemsMiddleCount;
- suballocations1st.pop_back();
- }
-
- // Find more null items at the end of 2nd vector.
- while(m_2ndNullItemsCount > 0 &&
- suballocations2nd.back().hAllocation == VK_NULL_HANDLE)
- {
- --m_2ndNullItemsCount;
- suballocations2nd.pop_back();
- }
-
- // Find more null items at the beginning of 2nd vector.
- while(m_2ndNullItemsCount > 0 &&
- suballocations2nd[0].hAllocation == VK_NULL_HANDLE)
- {
- --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].hAllocation == VK_NULL_HANDLE)
- {
- ++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].hAllocation == VK_NULL_HANDLE)
- {
- ++m_1stNullItemsBeginCount;
- --m_1stNullItemsMiddleCount;
- }
- m_2ndNullItemsCount = 0;
- m_1stVectorIndex ^= 1;
- }
- }
- }
-
- VMA_HEAVY_ASSERT(Validate());
+ 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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++m_1stNullItemsBeginCount;
+ --m_1stNullItemsMiddleCount;
+ }
+
+ // Find more null items at the end of 1st vector.
+ while(m_1stNullItemsMiddleCount > 0 &&
+ suballocations1st.back().hAllocation == VK_NULL_HANDLE)
+ {
+ --m_1stNullItemsMiddleCount;
+ suballocations1st.pop_back();
+ }
+
+ // Find more null items at the end of 2nd vector.
+ while(m_2ndNullItemsCount > 0 &&
+ suballocations2nd.back().hAllocation == VK_NULL_HANDLE)
+ {
+ --m_2ndNullItemsCount;
+ suballocations2nd.pop_back();
+ }
+
+ // Find more null items at the beginning of 2nd vector.
+ while(m_2ndNullItemsCount > 0 &&
+ suballocations2nd[0].hAllocation == VK_NULL_HANDLE)
+ {
+ --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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++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].hAllocation == VK_NULL_HANDLE)
+ {
+ ++m_1stNullItemsBeginCount;
+ --m_1stNullItemsMiddleCount;
+ }
+ m_2ndNullItemsCount = 0;
+ m_1stVectorIndex ^= 1;
+ }
+ }
+ }
+
+ VMA_HEAVY_ASSERT(Validate());
}
@@ -11057,565 +10895,565 @@ void VmaBlockMetadata_Linear::CleanupAfterFree()
// class VmaBlockMetadata_Buddy
VmaBlockMetadata_Buddy::VmaBlockMetadata_Buddy(VmaAllocator hAllocator) :
- VmaBlockMetadata(hAllocator),
- m_Root(VMA_NULL),
- m_AllocationCount(0),
- m_FreeCount(1),
- m_SumFreeSize(0)
+ VmaBlockMetadata(hAllocator),
+ m_Root(VMA_NULL),
+ m_AllocationCount(0),
+ m_FreeCount(1),
+ m_SumFreeSize(0)
{
- memset(m_FreeList, 0, sizeof(m_FreeList));
+ memset(m_FreeList, 0, sizeof(m_FreeList));
}
VmaBlockMetadata_Buddy::~VmaBlockMetadata_Buddy()
{
- DeleteNode(m_Root);
+ DeleteNode(m_Root);
}
void VmaBlockMetadata_Buddy::Init(VkDeviceSize size)
{
- VmaBlockMetadata::Init(size);
+ VmaBlockMetadata::Init(size);
- m_UsableSize = VmaPrevPow2(size);
- m_SumFreeSize = m_UsableSize;
+ m_UsableSize = VmaPrevPow2(size);
+ m_SumFreeSize = m_UsableSize;
- // Calculate m_LevelCount.
- m_LevelCount = 1;
- while(m_LevelCount < MAX_LEVELS &&
- LevelToNodeSize(m_LevelCount) >= MIN_NODE_SIZE)
- {
- ++m_LevelCount;
- }
+ // Calculate m_LevelCount.
+ m_LevelCount = 1;
+ while(m_LevelCount < MAX_LEVELS &&
+ LevelToNodeSize(m_LevelCount) >= MIN_NODE_SIZE)
+ {
+ ++m_LevelCount;
+ }
- Node* rootNode = vma_new(GetAllocationCallbacks(), Node)();
- rootNode->offset = 0;
- rootNode->type = Node::TYPE_FREE;
- rootNode->parent = VMA_NULL;
- rootNode->buddy = VMA_NULL;
+ Node* rootNode = vma_new(GetAllocationCallbacks(), Node)();
+ rootNode->offset = 0;
+ rootNode->type = Node::TYPE_FREE;
+ rootNode->parent = VMA_NULL;
+ rootNode->buddy = VMA_NULL;
- m_Root = rootNode;
- AddToFreeListFront(0, rootNode);
+ m_Root = rootNode;
+ AddToFreeListFront(0, rootNode);
}
bool VmaBlockMetadata_Buddy::Validate() const
{
- // Validate tree.
- ValidationContext ctx;
- if(!ValidateNode(ctx, VMA_NULL, m_Root, 0, LevelToNodeSize(0)))
- {
- VMA_VALIDATE(false && "ValidateNode failed.");
- }
- VMA_VALIDATE(m_AllocationCount == ctx.calculatedAllocationCount);
- VMA_VALIDATE(m_SumFreeSize == ctx.calculatedSumFreeSize);
-
- // Validate free node lists.
- for(uint32_t level = 0; level < m_LevelCount; ++level)
- {
- VMA_VALIDATE(m_FreeList[level].front == VMA_NULL ||
- m_FreeList[level].front->free.prev == VMA_NULL);
-
- for(Node* node = m_FreeList[level].front;
- node != VMA_NULL;
- node = node->free.next)
- {
- VMA_VALIDATE(node->type == Node::TYPE_FREE);
-
- if(node->free.next == VMA_NULL)
- {
- VMA_VALIDATE(m_FreeList[level].back == node);
- }
- else
- {
- VMA_VALIDATE(node->free.next->free.prev == node);
- }
- }
- }
-
- // Validate that free lists ar higher levels are empty.
- for(uint32_t level = m_LevelCount; level < MAX_LEVELS; ++level)
- {
- VMA_VALIDATE(m_FreeList[level].front == VMA_NULL && m_FreeList[level].back == VMA_NULL);
- }
-
- return true;
+ // Validate tree.
+ ValidationContext ctx;
+ if(!ValidateNode(ctx, VMA_NULL, m_Root, 0, LevelToNodeSize(0)))
+ {
+ VMA_VALIDATE(false && "ValidateNode failed.");
+ }
+ VMA_VALIDATE(m_AllocationCount == ctx.calculatedAllocationCount);
+ VMA_VALIDATE(m_SumFreeSize == ctx.calculatedSumFreeSize);
+
+ // Validate free node lists.
+ for(uint32_t level = 0; level < m_LevelCount; ++level)
+ {
+ VMA_VALIDATE(m_FreeList[level].front == VMA_NULL ||
+ m_FreeList[level].front->free.prev == VMA_NULL);
+
+ for(Node* node = m_FreeList[level].front;
+ node != VMA_NULL;
+ node = node->free.next)
+ {
+ VMA_VALIDATE(node->type == Node::TYPE_FREE);
+
+ if(node->free.next == VMA_NULL)
+ {
+ VMA_VALIDATE(m_FreeList[level].back == node);
+ }
+ else
+ {
+ VMA_VALIDATE(node->free.next->free.prev == node);
+ }
+ }
+ }
+
+ // Validate that free lists ar higher levels are empty.
+ for(uint32_t level = m_LevelCount; level < MAX_LEVELS; ++level)
+ {
+ VMA_VALIDATE(m_FreeList[level].front == VMA_NULL && m_FreeList[level].back == VMA_NULL);
+ }
+
+ return true;
}
VkDeviceSize VmaBlockMetadata_Buddy::GetUnusedRangeSizeMax() const
{
- for(uint32_t level = 0; level < m_LevelCount; ++level)
- {
- if(m_FreeList[level].front != VMA_NULL)
- {
- return LevelToNodeSize(level);
- }
- }
- return 0;
+ for(uint32_t level = 0; level < m_LevelCount; ++level)
+ {
+ if(m_FreeList[level].front != VMA_NULL)
+ {
+ return LevelToNodeSize(level);
+ }
+ }
+ return 0;
}
void VmaBlockMetadata_Buddy::CalcAllocationStatInfo(VmaStatInfo& outInfo) const
{
- const VkDeviceSize unusableSize = GetUnusableSize();
+ const VkDeviceSize unusableSize = GetUnusableSize();
- outInfo.blockCount = 1;
+ outInfo.blockCount = 1;
- outInfo.allocationCount = outInfo.unusedRangeCount = 0;
- outInfo.usedBytes = outInfo.unusedBytes = 0;
+ outInfo.allocationCount = outInfo.unusedRangeCount = 0;
+ outInfo.usedBytes = outInfo.unusedBytes = 0;
- outInfo.allocationSizeMax = outInfo.unusedRangeSizeMax = 0;
- outInfo.allocationSizeMin = outInfo.unusedRangeSizeMin = UINT64_MAX;
- outInfo.allocationSizeAvg = outInfo.unusedRangeSizeAvg = 0; // Unused.
+ outInfo.allocationSizeMax = outInfo.unusedRangeSizeMax = 0;
+ outInfo.allocationSizeMin = outInfo.unusedRangeSizeMin = UINT64_MAX;
+ outInfo.allocationSizeAvg = outInfo.unusedRangeSizeAvg = 0; // Unused.
- CalcAllocationStatInfoNode(outInfo, m_Root, LevelToNodeSize(0));
+ CalcAllocationStatInfoNode(outInfo, m_Root, LevelToNodeSize(0));
- if(unusableSize > 0)
- {
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusableSize;
- outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, unusableSize);
- outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusableSize);
- }
+ if(unusableSize > 0)
+ {
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusableSize;
+ outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, unusableSize);
+ outInfo.unusedRangeSizeMin = VMA_MIN(outInfo.unusedRangeSizeMin, unusableSize);
+ }
}
void VmaBlockMetadata_Buddy::AddPoolStats(VmaPoolStats& inoutStats) const
{
- const VkDeviceSize unusableSize = GetUnusableSize();
+ const VkDeviceSize unusableSize = GetUnusableSize();
- inoutStats.size += GetSize();
- inoutStats.unusedSize += m_SumFreeSize + unusableSize;
- inoutStats.allocationCount += m_AllocationCount;
- inoutStats.unusedRangeCount += m_FreeCount;
- inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, GetUnusedRangeSizeMax());
+ inoutStats.size += GetSize();
+ inoutStats.unusedSize += m_SumFreeSize + unusableSize;
+ inoutStats.allocationCount += m_AllocationCount;
+ inoutStats.unusedRangeCount += m_FreeCount;
+ inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, GetUnusedRangeSizeMax());
- if(unusableSize > 0)
- {
- ++inoutStats.unusedRangeCount;
- // Not updating inoutStats.unusedRangeSizeMax with unusableSize because this space is not available for allocations.
- }
+ if(unusableSize > 0)
+ {
+ ++inoutStats.unusedRangeCount;
+ // Not updating inoutStats.unusedRangeSizeMax with unusableSize because this space is not available for allocations.
+ }
}
#if VMA_STATS_STRING_ENABLED
void VmaBlockMetadata_Buddy::PrintDetailedMap(class VmaJsonWriter& json) const
{
- // TODO optimize
- VmaStatInfo stat;
- CalcAllocationStatInfo(stat);
+ // TODO optimize
+ VmaStatInfo stat;
+ CalcAllocationStatInfo(stat);
- PrintDetailedMap_Begin(
- json,
- stat.unusedBytes,
- stat.allocationCount,
- stat.unusedRangeCount);
+ PrintDetailedMap_Begin(
+ json,
+ stat.unusedBytes,
+ stat.allocationCount,
+ stat.unusedRangeCount);
- PrintDetailedMapNode(json, m_Root, LevelToNodeSize(0));
+ PrintDetailedMapNode(json, m_Root, LevelToNodeSize(0));
- const VkDeviceSize unusableSize = GetUnusableSize();
- if(unusableSize > 0)
- {
- PrintDetailedMap_UnusedRange(json,
- m_UsableSize, // offset
- unusableSize); // size
- }
+ const VkDeviceSize unusableSize = GetUnusableSize();
+ if(unusableSize > 0)
+ {
+ PrintDetailedMap_UnusedRange(json,
+ m_UsableSize, // offset
+ unusableSize); // size
+ }
- PrintDetailedMap_End(json);
+ PrintDetailedMap_End(json);
}
#endif // #if VMA_STATS_STRING_ENABLED
bool VmaBlockMetadata_Buddy::CreateAllocationRequest(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VkDeviceSize bufferImageGranularity,
- VkDeviceSize allocSize,
- VkDeviceSize allocAlignment,
- bool upperAddress,
- VmaSuballocationType allocType,
- bool canMakeOtherLost,
- uint32_t strategy,
- VmaAllocationRequest* pAllocationRequest)
-{
- VMA_ASSERT(!upperAddress && "VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT can be used only with linear algorithm.");
-
- // Simple way to respect bufferImageGranularity. May be optimized some day.
- // Whenever it might be an OPTIMAL image...
- if(allocType == VMA_SUBALLOCATION_TYPE_UNKNOWN ||
- allocType == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN ||
- allocType == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL)
- {
- allocAlignment = VMA_MAX(allocAlignment, bufferImageGranularity);
- allocSize = VMA_MAX(allocSize, bufferImageGranularity);
- }
-
- if(allocSize > m_UsableSize)
- {
- return false;
- }
-
- const uint32_t targetLevel = AllocSizeToLevel(allocSize);
- for(uint32_t level = targetLevel + 1; level--; )
- {
- for(Node* freeNode = m_FreeList[level].front;
- freeNode != VMA_NULL;
- freeNode = freeNode->free.next)
- {
- if(freeNode->offset % allocAlignment == 0)
- {
- pAllocationRequest->type = VmaAllocationRequestType::Normal;
- pAllocationRequest->offset = freeNode->offset;
- pAllocationRequest->sumFreeSize = LevelToNodeSize(level);
- pAllocationRequest->sumItemSize = 0;
- pAllocationRequest->itemsToMakeLostCount = 0;
- pAllocationRequest->customData = (void*)(uintptr_t)level;
- return true;
- }
- }
- }
-
- return false;
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VkDeviceSize bufferImageGranularity,
+ VkDeviceSize allocSize,
+ VkDeviceSize allocAlignment,
+ bool upperAddress,
+ VmaSuballocationType allocType,
+ bool canMakeOtherLost,
+ uint32_t strategy,
+ VmaAllocationRequest* pAllocationRequest)
+{
+ VMA_ASSERT(!upperAddress && "VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT can be used only with linear algorithm.");
+
+ // Simple way to respect bufferImageGranularity. May be optimized some day.
+ // Whenever it might be an OPTIMAL image...
+ if(allocType == VMA_SUBALLOCATION_TYPE_UNKNOWN ||
+ allocType == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN ||
+ allocType == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL)
+ {
+ allocAlignment = VMA_MAX(allocAlignment, bufferImageGranularity);
+ allocSize = VMA_MAX(allocSize, bufferImageGranularity);
+ }
+
+ if(allocSize > m_UsableSize)
+ {
+ return false;
+ }
+
+ const uint32_t targetLevel = AllocSizeToLevel(allocSize);
+ for(uint32_t level = targetLevel + 1; level--; )
+ {
+ for(Node* freeNode = m_FreeList[level].front;
+ freeNode != VMA_NULL;
+ freeNode = freeNode->free.next)
+ {
+ if(freeNode->offset % allocAlignment == 0)
+ {
+ pAllocationRequest->type = VmaAllocationRequestType::Normal;
+ pAllocationRequest->offset = freeNode->offset;
+ pAllocationRequest->sumFreeSize = LevelToNodeSize(level);
+ pAllocationRequest->sumItemSize = 0;
+ pAllocationRequest->itemsToMakeLostCount = 0;
+ pAllocationRequest->customData = (void*)(uintptr_t)level;
+ return true;
+ }
+ }
+ }
+
+ return false;
}
bool VmaBlockMetadata_Buddy::MakeRequestedAllocationsLost(
- uint32_t currentFrameIndex,
- uint32_t frameInUseCount,
- VmaAllocationRequest* pAllocationRequest)
+ uint32_t currentFrameIndex,
+ uint32_t frameInUseCount,
+ VmaAllocationRequest* pAllocationRequest)
{
- /*
- Lost allocations are not supported in buddy allocator at the moment.
- Support might be added in the future.
- */
- return pAllocationRequest->itemsToMakeLostCount == 0;
+ /*
+ Lost allocations are not supported in buddy allocator at the moment.
+ Support might be added in the future.
+ */
+ return pAllocationRequest->itemsToMakeLostCount == 0;
}
uint32_t VmaBlockMetadata_Buddy::MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount)
{
- /*
- Lost allocations are not supported in buddy allocator at the moment.
- Support might be added in the future.
- */
- return 0;
+ /*
+ Lost allocations are not supported in buddy allocator at the moment.
+ Support might be added in the future.
+ */
+ return 0;
}
void VmaBlockMetadata_Buddy::Alloc(
- const VmaAllocationRequest& request,
- VmaSuballocationType type,
- VkDeviceSize allocSize,
- VmaAllocation hAllocation)
-{
- VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);
-
- const uint32_t targetLevel = AllocSizeToLevel(allocSize);
- uint32_t currLevel = (uint32_t)(uintptr_t)request.customData;
-
- Node* currNode = m_FreeList[currLevel].front;
- VMA_ASSERT(currNode != VMA_NULL && currNode->type == Node::TYPE_FREE);
- while(currNode->offset != request.offset)
- {
- currNode = currNode->free.next;
- VMA_ASSERT(currNode != VMA_NULL && currNode->type == Node::TYPE_FREE);
- }
-
- // Go down, splitting free nodes.
- while(currLevel < targetLevel)
- {
- // currNode is already first free node at currLevel.
- // Remove it from list of free nodes at this currLevel.
- RemoveFromFreeList(currLevel, currNode);
-
- const uint32_t childrenLevel = currLevel + 1;
-
- // Create two free sub-nodes.
- Node* leftChild = vma_new(GetAllocationCallbacks(), Node)();
- Node* rightChild = vma_new(GetAllocationCallbacks(), Node)();
-
- leftChild->offset = currNode->offset;
- leftChild->type = Node::TYPE_FREE;
- leftChild->parent = currNode;
- leftChild->buddy = rightChild;
-
- rightChild->offset = currNode->offset + LevelToNodeSize(childrenLevel);
- rightChild->type = Node::TYPE_FREE;
- rightChild->parent = currNode;
- rightChild->buddy = leftChild;
-
- // Convert current currNode to split type.
- currNode->type = Node::TYPE_SPLIT;
- currNode->split.leftChild = leftChild;
-
- // Add child nodes to free list. Order is important!
- AddToFreeListFront(childrenLevel, rightChild);
- AddToFreeListFront(childrenLevel, leftChild);
-
- ++m_FreeCount;
- //m_SumFreeSize -= LevelToNodeSize(currLevel) % 2; // Useful only when level node sizes can be non power of 2.
- ++currLevel;
- currNode = m_FreeList[currLevel].front;
-
- /*
- We can be sure that currNode, as left child of node previously split,
- also fullfills the alignment requirement.
- */
- }
-
- // Remove from free list.
- VMA_ASSERT(currLevel == targetLevel &&
- currNode != VMA_NULL &&
- currNode->type == Node::TYPE_FREE);
- RemoveFromFreeList(currLevel, currNode);
-
- // Convert to allocation node.
- currNode->type = Node::TYPE_ALLOCATION;
- currNode->allocation.alloc = hAllocation;
-
- ++m_AllocationCount;
- --m_FreeCount;
- m_SumFreeSize -= allocSize;
+ const VmaAllocationRequest& request,
+ VmaSuballocationType type,
+ VkDeviceSize allocSize,
+ VmaAllocation hAllocation)
+{
+ VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);
+
+ const uint32_t targetLevel = AllocSizeToLevel(allocSize);
+ uint32_t currLevel = (uint32_t)(uintptr_t)request.customData;
+
+ Node* currNode = m_FreeList[currLevel].front;
+ VMA_ASSERT(currNode != VMA_NULL && currNode->type == Node::TYPE_FREE);
+ while(currNode->offset != request.offset)
+ {
+ currNode = currNode->free.next;
+ VMA_ASSERT(currNode != VMA_NULL && currNode->type == Node::TYPE_FREE);
+ }
+
+ // Go down, splitting free nodes.
+ while(currLevel < targetLevel)
+ {
+ // currNode is already first free node at currLevel.
+ // Remove it from list of free nodes at this currLevel.
+ RemoveFromFreeList(currLevel, currNode);
+
+ const uint32_t childrenLevel = currLevel + 1;
+
+ // Create two free sub-nodes.
+ Node* leftChild = vma_new(GetAllocationCallbacks(), Node)();
+ Node* rightChild = vma_new(GetAllocationCallbacks(), Node)();
+
+ leftChild->offset = currNode->offset;
+ leftChild->type = Node::TYPE_FREE;
+ leftChild->parent = currNode;
+ leftChild->buddy = rightChild;
+
+ rightChild->offset = currNode->offset + LevelToNodeSize(childrenLevel);
+ rightChild->type = Node::TYPE_FREE;
+ rightChild->parent = currNode;
+ rightChild->buddy = leftChild;
+
+ // Convert current currNode to split type.
+ currNode->type = Node::TYPE_SPLIT;
+ currNode->split.leftChild = leftChild;
+
+ // Add child nodes to free list. Order is important!
+ AddToFreeListFront(childrenLevel, rightChild);
+ AddToFreeListFront(childrenLevel, leftChild);
+
+ ++m_FreeCount;
+ //m_SumFreeSize -= LevelToNodeSize(currLevel) % 2; // Useful only when level node sizes can be non power of 2.
+ ++currLevel;
+ currNode = m_FreeList[currLevel].front;
+
+ /*
+ We can be sure that currNode, as left child of node previously split,
+ also fullfills the alignment requirement.
+ */
+ }
+
+ // Remove from free list.
+ VMA_ASSERT(currLevel == targetLevel &&
+ currNode != VMA_NULL &&
+ currNode->type == Node::TYPE_FREE);
+ RemoveFromFreeList(currLevel, currNode);
+
+ // Convert to allocation node.
+ currNode->type = Node::TYPE_ALLOCATION;
+ currNode->allocation.alloc = hAllocation;
+
+ ++m_AllocationCount;
+ --m_FreeCount;
+ m_SumFreeSize -= allocSize;
}
void VmaBlockMetadata_Buddy::DeleteNode(Node* node)
{
- if(node->type == Node::TYPE_SPLIT)
- {
- DeleteNode(node->split.leftChild->buddy);
- DeleteNode(node->split.leftChild);
- }
+ if(node->type == Node::TYPE_SPLIT)
+ {
+ DeleteNode(node->split.leftChild->buddy);
+ DeleteNode(node->split.leftChild);
+ }
- vma_delete(GetAllocationCallbacks(), node);
+ vma_delete(GetAllocationCallbacks(), node);
}
bool VmaBlockMetadata_Buddy::ValidateNode(ValidationContext& ctx, const Node* parent, const Node* curr, uint32_t level, VkDeviceSize levelNodeSize) const
{
- VMA_VALIDATE(level < m_LevelCount);
- VMA_VALIDATE(curr->parent == parent);
- VMA_VALIDATE((curr->buddy == VMA_NULL) == (parent == VMA_NULL));
- VMA_VALIDATE(curr->buddy == VMA_NULL || curr->buddy->buddy == curr);
- switch(curr->type)
- {
- case Node::TYPE_FREE:
- // curr->free.prev, next are validated separately.
- ctx.calculatedSumFreeSize += levelNodeSize;
- ++ctx.calculatedFreeCount;
- break;
- case Node::TYPE_ALLOCATION:
- ++ctx.calculatedAllocationCount;
- ctx.calculatedSumFreeSize += levelNodeSize - curr->allocation.alloc->GetSize();
- VMA_VALIDATE(curr->allocation.alloc != VK_NULL_HANDLE);
- break;
- case Node::TYPE_SPLIT:
- {
- const uint32_t childrenLevel = level + 1;
- const VkDeviceSize childrenLevelNodeSize = levelNodeSize / 2;
- const Node* const leftChild = curr->split.leftChild;
- VMA_VALIDATE(leftChild != VMA_NULL);
- VMA_VALIDATE(leftChild->offset == curr->offset);
- if(!ValidateNode(ctx, curr, leftChild, childrenLevel, childrenLevelNodeSize))
- {
- VMA_VALIDATE(false && "ValidateNode for left child failed.");
- }
- const Node* const rightChild = leftChild->buddy;
- VMA_VALIDATE(rightChild->offset == curr->offset + childrenLevelNodeSize);
- if(!ValidateNode(ctx, curr, rightChild, childrenLevel, childrenLevelNodeSize))
- {
- VMA_VALIDATE(false && "ValidateNode for right child failed.");
- }
- }
- break;
- default:
- return false;
- }
-
- return true;
+ VMA_VALIDATE(level < m_LevelCount);
+ VMA_VALIDATE(curr->parent == parent);
+ VMA_VALIDATE((curr->buddy == VMA_NULL) == (parent == VMA_NULL));
+ VMA_VALIDATE(curr->buddy == VMA_NULL || curr->buddy->buddy == curr);
+ switch(curr->type)
+ {
+ case Node::TYPE_FREE:
+ // curr->free.prev, next are validated separately.
+ ctx.calculatedSumFreeSize += levelNodeSize;
+ ++ctx.calculatedFreeCount;
+ break;
+ case Node::TYPE_ALLOCATION:
+ ++ctx.calculatedAllocationCount;
+ ctx.calculatedSumFreeSize += levelNodeSize - curr->allocation.alloc->GetSize();
+ VMA_VALIDATE(curr->allocation.alloc != VK_NULL_HANDLE);
+ break;
+ case Node::TYPE_SPLIT:
+ {
+ const uint32_t childrenLevel = level + 1;
+ const VkDeviceSize childrenLevelNodeSize = levelNodeSize / 2;
+ const Node* const leftChild = curr->split.leftChild;
+ VMA_VALIDATE(leftChild != VMA_NULL);
+ VMA_VALIDATE(leftChild->offset == curr->offset);
+ if(!ValidateNode(ctx, curr, leftChild, childrenLevel, childrenLevelNodeSize))
+ {
+ VMA_VALIDATE(false && "ValidateNode for left child failed.");
+ }
+ const Node* const rightChild = leftChild->buddy;
+ VMA_VALIDATE(rightChild->offset == curr->offset + childrenLevelNodeSize);
+ if(!ValidateNode(ctx, curr, rightChild, childrenLevel, childrenLevelNodeSize))
+ {
+ VMA_VALIDATE(false && "ValidateNode for right child failed.");
+ }
+ }
+ break;
+ default:
+ return false;
+ }
+
+ return true;
}
uint32_t VmaBlockMetadata_Buddy::AllocSizeToLevel(VkDeviceSize allocSize) const
{
- // I know this could be optimized somehow e.g. by using std::log2p1 from C++20.
- uint32_t level = 0;
- VkDeviceSize currLevelNodeSize = m_UsableSize;
- VkDeviceSize nextLevelNodeSize = currLevelNodeSize >> 1;
- while(allocSize <= nextLevelNodeSize && level + 1 < m_LevelCount)
- {
- ++level;
- currLevelNodeSize = nextLevelNodeSize;
- nextLevelNodeSize = currLevelNodeSize >> 1;
- }
- return level;
+ // I know this could be optimized somehow e.g. by using std::log2p1 from C++20.
+ uint32_t level = 0;
+ VkDeviceSize currLevelNodeSize = m_UsableSize;
+ VkDeviceSize nextLevelNodeSize = currLevelNodeSize >> 1;
+ while(allocSize <= nextLevelNodeSize && level + 1 < m_LevelCount)
+ {
+ ++level;
+ currLevelNodeSize = nextLevelNodeSize;
+ nextLevelNodeSize = currLevelNodeSize >> 1;
+ }
+ return level;
}
void VmaBlockMetadata_Buddy::FreeAtOffset(VmaAllocation alloc, VkDeviceSize offset)
{
- // Find node and level.
- Node* node = m_Root;
- VkDeviceSize nodeOffset = 0;
- uint32_t level = 0;
- VkDeviceSize levelNodeSize = LevelToNodeSize(0);
- while(node->type == Node::TYPE_SPLIT)
- {
- const VkDeviceSize nextLevelSize = levelNodeSize >> 1;
- if(offset < nodeOffset + nextLevelSize)
- {
- node = node->split.leftChild;
- }
- else
- {
- node = node->split.leftChild->buddy;
- nodeOffset += nextLevelSize;
- }
- ++level;
- levelNodeSize = nextLevelSize;
- }
-
- VMA_ASSERT(node != VMA_NULL && node->type == Node::TYPE_ALLOCATION);
- VMA_ASSERT(alloc == VK_NULL_HANDLE || node->allocation.alloc == alloc);
-
- ++m_FreeCount;
- --m_AllocationCount;
- m_SumFreeSize += alloc->GetSize();
-
- node->type = Node::TYPE_FREE;
-
- // Join free nodes if possible.
- while(level > 0 && node->buddy->type == Node::TYPE_FREE)
- {
- RemoveFromFreeList(level, node->buddy);
- Node* const parent = node->parent;
-
- vma_delete(GetAllocationCallbacks(), node->buddy);
- vma_delete(GetAllocationCallbacks(), node);
- parent->type = Node::TYPE_FREE;
-
- node = parent;
- --level;
- //m_SumFreeSize += LevelToNodeSize(level) % 2; // Useful only when level node sizes can be non power of 2.
- --m_FreeCount;
- }
-
- AddToFreeListFront(level, node);
+ // Find node and level.
+ Node* node = m_Root;
+ VkDeviceSize nodeOffset = 0;
+ uint32_t level = 0;
+ VkDeviceSize levelNodeSize = LevelToNodeSize(0);
+ while(node->type == Node::TYPE_SPLIT)
+ {
+ const VkDeviceSize nextLevelSize = levelNodeSize >> 1;
+ if(offset < nodeOffset + nextLevelSize)
+ {
+ node = node->split.leftChild;
+ }
+ else
+ {
+ node = node->split.leftChild->buddy;
+ nodeOffset += nextLevelSize;
+ }
+ ++level;
+ levelNodeSize = nextLevelSize;
+ }
+
+ VMA_ASSERT(node != VMA_NULL && node->type == Node::TYPE_ALLOCATION);
+ VMA_ASSERT(alloc == VK_NULL_HANDLE || node->allocation.alloc == alloc);
+
+ ++m_FreeCount;
+ --m_AllocationCount;
+ m_SumFreeSize += alloc->GetSize();
+
+ node->type = Node::TYPE_FREE;
+
+ // Join free nodes if possible.
+ while(level > 0 && node->buddy->type == Node::TYPE_FREE)
+ {
+ RemoveFromFreeList(level, node->buddy);
+ Node* const parent = node->parent;
+
+ vma_delete(GetAllocationCallbacks(), node->buddy);
+ vma_delete(GetAllocationCallbacks(), node);
+ parent->type = Node::TYPE_FREE;
+
+ node = parent;
+ --level;
+ //m_SumFreeSize += LevelToNodeSize(level) % 2; // Useful only when level node sizes can be non power of 2.
+ --m_FreeCount;
+ }
+
+ AddToFreeListFront(level, node);
}
void VmaBlockMetadata_Buddy::CalcAllocationStatInfoNode(VmaStatInfo& outInfo, const Node* node, VkDeviceSize levelNodeSize) const
{
- switch(node->type)
- {
- case Node::TYPE_FREE:
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += levelNodeSize;
- outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, levelNodeSize);
- outInfo.unusedRangeSizeMin = VMA_MAX(outInfo.unusedRangeSizeMin, levelNodeSize);
- break;
- case Node::TYPE_ALLOCATION:
- {
- const VkDeviceSize allocSize = node->allocation.alloc->GetSize();
- ++outInfo.allocationCount;
- outInfo.usedBytes += allocSize;
- outInfo.allocationSizeMax = VMA_MAX(outInfo.allocationSizeMax, allocSize);
- outInfo.allocationSizeMin = VMA_MAX(outInfo.allocationSizeMin, allocSize);
-
- const VkDeviceSize unusedRangeSize = levelNodeSize - allocSize;
- if(unusedRangeSize > 0)
- {
- ++outInfo.unusedRangeCount;
- outInfo.unusedBytes += unusedRangeSize;
- outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, unusedRangeSize);
- outInfo.unusedRangeSizeMin = VMA_MAX(outInfo.unusedRangeSizeMin, unusedRangeSize);
- }
- }
- break;
- case Node::TYPE_SPLIT:
- {
- const VkDeviceSize childrenNodeSize = levelNodeSize / 2;
- const Node* const leftChild = node->split.leftChild;
- CalcAllocationStatInfoNode(outInfo, leftChild, childrenNodeSize);
- const Node* const rightChild = leftChild->buddy;
- CalcAllocationStatInfoNode(outInfo, rightChild, childrenNodeSize);
- }
- break;
- default:
- VMA_ASSERT(0);
- }
+ switch(node->type)
+ {
+ case Node::TYPE_FREE:
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += levelNodeSize;
+ outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, levelNodeSize);
+ outInfo.unusedRangeSizeMin = VMA_MAX(outInfo.unusedRangeSizeMin, levelNodeSize);
+ break;
+ case Node::TYPE_ALLOCATION:
+ {
+ const VkDeviceSize allocSize = node->allocation.alloc->GetSize();
+ ++outInfo.allocationCount;
+ outInfo.usedBytes += allocSize;
+ outInfo.allocationSizeMax = VMA_MAX(outInfo.allocationSizeMax, allocSize);
+ outInfo.allocationSizeMin = VMA_MAX(outInfo.allocationSizeMin, allocSize);
+
+ const VkDeviceSize unusedRangeSize = levelNodeSize - allocSize;
+ if(unusedRangeSize > 0)
+ {
+ ++outInfo.unusedRangeCount;
+ outInfo.unusedBytes += unusedRangeSize;
+ outInfo.unusedRangeSizeMax = VMA_MAX(outInfo.unusedRangeSizeMax, unusedRangeSize);
+ outInfo.unusedRangeSizeMin = VMA_MAX(outInfo.unusedRangeSizeMin, unusedRangeSize);
+ }
+ }
+ break;
+ case Node::TYPE_SPLIT:
+ {
+ const VkDeviceSize childrenNodeSize = levelNodeSize / 2;
+ const Node* const leftChild = node->split.leftChild;
+ CalcAllocationStatInfoNode(outInfo, leftChild, childrenNodeSize);
+ const Node* const rightChild = leftChild->buddy;
+ CalcAllocationStatInfoNode(outInfo, rightChild, childrenNodeSize);
+ }
+ break;
+ default:
+ VMA_ASSERT(0);
+ }
}
void VmaBlockMetadata_Buddy::AddToFreeListFront(uint32_t level, Node* node)
{
- VMA_ASSERT(node->type == Node::TYPE_FREE);
-
- // List is empty.
- Node* const frontNode = m_FreeList[level].front;
- if(frontNode == VMA_NULL)
- {
- VMA_ASSERT(m_FreeList[level].back == VMA_NULL);
- node->free.prev = node->free.next = VMA_NULL;
- m_FreeList[level].front = m_FreeList[level].back = node;
- }
- else
- {
- VMA_ASSERT(frontNode->free.prev == VMA_NULL);
- node->free.prev = VMA_NULL;
- node->free.next = frontNode;
- frontNode->free.prev = node;
- m_FreeList[level].front = node;
- }
+ VMA_ASSERT(node->type == Node::TYPE_FREE);
+
+ // List is empty.
+ Node* const frontNode = m_FreeList[level].front;
+ if(frontNode == VMA_NULL)
+ {
+ VMA_ASSERT(m_FreeList[level].back == VMA_NULL);
+ node->free.prev = node->free.next = VMA_NULL;
+ m_FreeList[level].front = m_FreeList[level].back = node;
+ }
+ else
+ {
+ VMA_ASSERT(frontNode->free.prev == VMA_NULL);
+ node->free.prev = VMA_NULL;
+ node->free.next = frontNode;
+ frontNode->free.prev = node;
+ m_FreeList[level].front = node;
+ }
}
void VmaBlockMetadata_Buddy::RemoveFromFreeList(uint32_t level, Node* node)
{
- VMA_ASSERT(m_FreeList[level].front != VMA_NULL);
-
- // It is at the front.
- if(node->free.prev == VMA_NULL)
- {
- VMA_ASSERT(m_FreeList[level].front == node);
- m_FreeList[level].front = node->free.next;
- }
- else
- {
- Node* const prevFreeNode = node->free.prev;
- VMA_ASSERT(prevFreeNode->free.next == node);
- prevFreeNode->free.next = node->free.next;
- }
-
- // It is at the back.
- if(node->free.next == VMA_NULL)
- {
- VMA_ASSERT(m_FreeList[level].back == node);
- m_FreeList[level].back = node->free.prev;
- }
- else
- {
- Node* const nextFreeNode = node->free.next;
- VMA_ASSERT(nextFreeNode->free.prev == node);
- nextFreeNode->free.prev = node->free.prev;
- }
+ VMA_ASSERT(m_FreeList[level].front != VMA_NULL);
+
+ // It is at the front.
+ if(node->free.prev == VMA_NULL)
+ {
+ VMA_ASSERT(m_FreeList[level].front == node);
+ m_FreeList[level].front = node->free.next;
+ }
+ else
+ {
+ Node* const prevFreeNode = node->free.prev;
+ VMA_ASSERT(prevFreeNode->free.next == node);
+ prevFreeNode->free.next = node->free.next;
+ }
+
+ // It is at the back.
+ if(node->free.next == VMA_NULL)
+ {
+ VMA_ASSERT(m_FreeList[level].back == node);
+ m_FreeList[level].back = node->free.prev;
+ }
+ else
+ {
+ Node* const nextFreeNode = node->free.next;
+ VMA_ASSERT(nextFreeNode->free.prev == node);
+ nextFreeNode->free.prev = node->free.prev;
+ }
}
#if VMA_STATS_STRING_ENABLED
void VmaBlockMetadata_Buddy::PrintDetailedMapNode(class VmaJsonWriter& json, const Node* node, VkDeviceSize levelNodeSize) const
{
- switch(node->type)
- {
- case Node::TYPE_FREE:
- PrintDetailedMap_UnusedRange(json, node->offset, levelNodeSize);
- break;
- case Node::TYPE_ALLOCATION:
- {
- PrintDetailedMap_Allocation(json, node->offset, node->allocation.alloc);
- const VkDeviceSize allocSize = node->allocation.alloc->GetSize();
- if(allocSize < levelNodeSize)
- {
- PrintDetailedMap_UnusedRange(json, node->offset + allocSize, levelNodeSize - allocSize);
- }
- }
- break;
- case Node::TYPE_SPLIT:
- {
- const VkDeviceSize childrenNodeSize = levelNodeSize / 2;
- const Node* const leftChild = node->split.leftChild;
- PrintDetailedMapNode(json, leftChild, childrenNodeSize);
- const Node* const rightChild = leftChild->buddy;
- PrintDetailedMapNode(json, rightChild, childrenNodeSize);
- }
- break;
- default:
- VMA_ASSERT(0);
- }
+ switch(node->type)
+ {
+ case Node::TYPE_FREE:
+ PrintDetailedMap_UnusedRange(json, node->offset, levelNodeSize);
+ break;
+ case Node::TYPE_ALLOCATION:
+ {
+ PrintDetailedMap_Allocation(json, node->offset, node->allocation.alloc);
+ const VkDeviceSize allocSize = node->allocation.alloc->GetSize();
+ if(allocSize < levelNodeSize)
+ {
+ PrintDetailedMap_UnusedRange(json, node->offset + allocSize, levelNodeSize - allocSize);
+ }
+ }
+ break;
+ case Node::TYPE_SPLIT:
+ {
+ const VkDeviceSize childrenNodeSize = levelNodeSize / 2;
+ const Node* const leftChild = node->split.leftChild;
+ PrintDetailedMapNode(json, leftChild, childrenNodeSize);
+ const Node* const rightChild = leftChild->buddy;
+ PrintDetailedMapNode(json, rightChild, childrenNodeSize);
+ }
+ break;
+ default:
+ VMA_ASSERT(0);
+ }
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -11624,274 +11462,274 @@ void VmaBlockMetadata_Buddy::PrintDetailedMapNode(class VmaJsonWriter& json, con
// class VmaDeviceMemoryBlock
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)
+ m_pMetadata(VMA_NULL),
+ m_MemoryTypeIndex(UINT32_MAX),
+ m_Id(0),
+ m_hMemory(VK_NULL_HANDLE),
+ m_MapCount(0),
+ m_pMappedData(VMA_NULL)
{
}
void VmaDeviceMemoryBlock::Init(
- VmaAllocator hAllocator,
- VmaPool hParentPool,
- uint32_t newMemoryTypeIndex,
- VkDeviceMemory newMemory,
- VkDeviceSize newSize,
- uint32_t id,
- uint32_t algorithm)
-{
- VMA_ASSERT(m_hMemory == VK_NULL_HANDLE);
-
- m_hParentPool = hParentPool;
- m_MemoryTypeIndex = newMemoryTypeIndex;
- m_Id = id;
- m_hMemory = newMemory;
-
- switch(algorithm)
- {
- case VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT:
- m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Linear)(hAllocator);
- break;
- case VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT:
- m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Buddy)(hAllocator);
- break;
- default:
- VMA_ASSERT(0);
- // Fall-through.
- case 0:
- m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Generic)(hAllocator);
- }
- m_pMetadata->Init(newSize);
+ VmaAllocator hAllocator,
+ VmaPool hParentPool,
+ uint32_t newMemoryTypeIndex,
+ VkDeviceMemory newMemory,
+ VkDeviceSize newSize,
+ uint32_t id,
+ uint32_t algorithm)
+{
+ VMA_ASSERT(m_hMemory == VK_NULL_HANDLE);
+
+ m_hParentPool = hParentPool;
+ m_MemoryTypeIndex = newMemoryTypeIndex;
+ m_Id = id;
+ m_hMemory = newMemory;
+
+ switch(algorithm)
+ {
+ case VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT:
+ m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Linear)(hAllocator);
+ break;
+ case VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT:
+ m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Buddy)(hAllocator);
+ break;
+ default:
+ VMA_ASSERT(0);
+ // Fall-through.
+ case 0:
+ m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Generic)(hAllocator);
+ }
+ m_pMetadata->Init(newSize);
}
void VmaDeviceMemoryBlock::Destroy(VmaAllocator allocator)
{
- // This is the most important assert in the entire library.
- // Hitting it means you have some memory leak - unreleased VmaAllocation objects.
- VMA_ASSERT(m_pMetadata->IsEmpty() && "Some allocations were not freed before destruction of this memory block!");
+ // This is the most important assert in the entire library.
+ // Hitting it means you have some memory leak - unreleased VmaAllocation objects.
+ VMA_ASSERT(m_pMetadata->IsEmpty() && "Some allocations were not freed before destruction of this memory block!");
- VMA_ASSERT(m_hMemory != VK_NULL_HANDLE);
- allocator->FreeVulkanMemory(m_MemoryTypeIndex, m_pMetadata->GetSize(), m_hMemory);
- m_hMemory = VK_NULL_HANDLE;
+ VMA_ASSERT(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;
+ vma_delete(allocator, m_pMetadata);
+ m_pMetadata = VMA_NULL;
}
bool VmaDeviceMemoryBlock::Validate() const
{
- VMA_VALIDATE((m_hMemory != VK_NULL_HANDLE) &&
- (m_pMetadata->GetSize() != 0));
-
- return m_pMetadata->Validate();
+ VMA_VALIDATE((m_hMemory != VK_NULL_HANDLE) &&
+ (m_pMetadata->GetSize() != 0));
+
+ return m_pMetadata->Validate();
}
VkResult VmaDeviceMemoryBlock::CheckCorruption(VmaAllocator hAllocator)
{
- void* pData = nullptr;
- VkResult res = Map(hAllocator, 1, &pData);
- if(res != VK_SUCCESS)
- {
- return res;
- }
+ void* pData = nullptr;
+ VkResult res = Map(hAllocator, 1, &pData);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
- res = m_pMetadata->CheckCorruption(pData);
+ res = m_pMetadata->CheckCorruption(pData);
- Unmap(hAllocator, 1);
+ Unmap(hAllocator, 1);
- return res;
+ return res;
}
VkResult VmaDeviceMemoryBlock::Map(VmaAllocator hAllocator, uint32_t count, void** ppData)
{
- if(count == 0)
- {
- return VK_SUCCESS;
- }
-
- VmaMutexLock lock(m_Mutex, hAllocator->m_UseMutex);
- if(m_MapCount != 0)
- {
- m_MapCount += count;
- VMA_ASSERT(m_pMappedData != VMA_NULL);
- 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)
- {
- if(ppData != VMA_NULL)
- {
- *ppData = m_pMappedData;
- }
- m_MapCount = count;
- }
- return result;
- }
+ if(count == 0)
+ {
+ return VK_SUCCESS;
+ }
+
+ VmaMutexLock lock(m_Mutex, hAllocator->m_UseMutex);
+ if(m_MapCount != 0)
+ {
+ m_MapCount += count;
+ VMA_ASSERT(m_pMappedData != VMA_NULL);
+ 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)
+ {
+ if(ppData != VMA_NULL)
+ {
+ *ppData = m_pMappedData;
+ }
+ m_MapCount = count;
+ }
+ return result;
+ }
}
void VmaDeviceMemoryBlock::Unmap(VmaAllocator hAllocator, uint32_t count)
{
- if(count == 0)
- {
- return;
- }
-
- VmaMutexLock lock(m_Mutex, hAllocator->m_UseMutex);
- if(m_MapCount >= count)
- {
- m_MapCount -= count;
- if(m_MapCount == 0)
- {
- m_pMappedData = VMA_NULL;
- (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(hAllocator->m_hDevice, m_hMemory);
- }
- }
- else
- {
- VMA_ASSERT(0 && "VkDeviceMemory block is being unmapped while it was not previously mapped.");
- }
+ if(count == 0)
+ {
+ return;
+ }
+
+ VmaMutexLock lock(m_Mutex, hAllocator->m_UseMutex);
+ if(m_MapCount >= count)
+ {
+ m_MapCount -= count;
+ if(m_MapCount == 0)
+ {
+ m_pMappedData = VMA_NULL;
+ (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(hAllocator->m_hDevice, m_hMemory);
+ }
+ }
+ else
+ {
+ VMA_ASSERT(0 && "VkDeviceMemory block is being unmapped while it was not previously mapped.");
+ }
}
VkResult VmaDeviceMemoryBlock::WriteMagicValueAroundAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize)
{
- VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION);
- VMA_ASSERT(allocOffset >= VMA_DEBUG_MARGIN);
+ VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION);
+ VMA_ASSERT(allocOffset >= VMA_DEBUG_MARGIN);
- void* pData;
- VkResult res = Map(hAllocator, 1, &pData);
- if(res != VK_SUCCESS)
- {
- return res;
- }
+ void* pData;
+ VkResult res = Map(hAllocator, 1, &pData);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
- VmaWriteMagicValue(pData, allocOffset - VMA_DEBUG_MARGIN);
- VmaWriteMagicValue(pData, allocOffset + allocSize);
+ VmaWriteMagicValue(pData, allocOffset - VMA_DEBUG_MARGIN);
+ VmaWriteMagicValue(pData, allocOffset + allocSize);
- Unmap(hAllocator, 1);
+ Unmap(hAllocator, 1);
- return VK_SUCCESS;
+ return VK_SUCCESS;
}
VkResult VmaDeviceMemoryBlock::ValidateMagicValueAroundAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize)
{
- VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION);
- VMA_ASSERT(allocOffset >= VMA_DEBUG_MARGIN);
+ VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION);
+ VMA_ASSERT(allocOffset >= VMA_DEBUG_MARGIN);
- void* pData;
- VkResult res = Map(hAllocator, 1, &pData);
- if(res != VK_SUCCESS)
- {
- return res;
- }
+ void* pData;
+ VkResult res = Map(hAllocator, 1, &pData);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
- if(!VmaValidateMagicValue(pData, allocOffset - VMA_DEBUG_MARGIN))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE FREED ALLOCATION!");
- }
- else if(!VmaValidateMagicValue(pData, allocOffset + allocSize))
- {
- VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER FREED ALLOCATION!");
- }
+ if(!VmaValidateMagicValue(pData, allocOffset - VMA_DEBUG_MARGIN))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED BEFORE FREED ALLOCATION!");
+ }
+ else if(!VmaValidateMagicValue(pData, allocOffset + allocSize))
+ {
+ VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER FREED ALLOCATION!");
+ }
- Unmap(hAllocator, 1);
+ Unmap(hAllocator, 1);
- return VK_SUCCESS;
+ 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_Mutex, hAllocator->m_UseMutex);
- return hAllocator->BindVulkanBuffer(m_hMemory, memoryOffset, hBuffer, pNext);
+ 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_Mutex, 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_Mutex, hAllocator->m_UseMutex);
- return hAllocator->BindVulkanImage(m_hMemory, memoryOffset, hImage, pNext);
+ 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_Mutex, hAllocator->m_UseMutex);
+ return hAllocator->BindVulkanImage(m_hMemory, memoryOffset, hImage, pNext);
}
static void InitStatInfo(VmaStatInfo& outInfo)
{
- memset(&outInfo, 0, sizeof(outInfo));
- outInfo.allocationSizeMin = UINT64_MAX;
- outInfo.unusedRangeSizeMin = UINT64_MAX;
+ memset(&outInfo, 0, sizeof(outInfo));
+ outInfo.allocationSizeMin = UINT64_MAX;
+ outInfo.unusedRangeSizeMin = UINT64_MAX;
}
// Adds statistics srcInfo into inoutInfo, like: inoutInfo += srcInfo.
static void VmaAddStatInfo(VmaStatInfo& inoutInfo, const VmaStatInfo& srcInfo)
{
- inoutInfo.blockCount += srcInfo.blockCount;
- inoutInfo.allocationCount += srcInfo.allocationCount;
- inoutInfo.unusedRangeCount += srcInfo.unusedRangeCount;
- inoutInfo.usedBytes += srcInfo.usedBytes;
- inoutInfo.unusedBytes += srcInfo.unusedBytes;
- inoutInfo.allocationSizeMin = VMA_MIN(inoutInfo.allocationSizeMin, srcInfo.allocationSizeMin);
- inoutInfo.allocationSizeMax = VMA_MAX(inoutInfo.allocationSizeMax, srcInfo.allocationSizeMax);
- inoutInfo.unusedRangeSizeMin = VMA_MIN(inoutInfo.unusedRangeSizeMin, srcInfo.unusedRangeSizeMin);
- inoutInfo.unusedRangeSizeMax = VMA_MAX(inoutInfo.unusedRangeSizeMax, srcInfo.unusedRangeSizeMax);
+ inoutInfo.blockCount += srcInfo.blockCount;
+ inoutInfo.allocationCount += srcInfo.allocationCount;
+ inoutInfo.unusedRangeCount += srcInfo.unusedRangeCount;
+ inoutInfo.usedBytes += srcInfo.usedBytes;
+ inoutInfo.unusedBytes += srcInfo.unusedBytes;
+ inoutInfo.allocationSizeMin = VMA_MIN(inoutInfo.allocationSizeMin, srcInfo.allocationSizeMin);
+ inoutInfo.allocationSizeMax = VMA_MAX(inoutInfo.allocationSizeMax, srcInfo.allocationSizeMax);
+ inoutInfo.unusedRangeSizeMin = VMA_MIN(inoutInfo.unusedRangeSizeMin, srcInfo.unusedRangeSizeMin);
+ inoutInfo.unusedRangeSizeMax = VMA_MAX(inoutInfo.unusedRangeSizeMax, srcInfo.unusedRangeSizeMax);
}
static void VmaPostprocessCalcStatInfo(VmaStatInfo& inoutInfo)
{
- inoutInfo.allocationSizeAvg = (inoutInfo.allocationCount > 0) ?
- VmaRoundDiv<VkDeviceSize>(inoutInfo.usedBytes, inoutInfo.allocationCount) : 0;
- inoutInfo.unusedRangeSizeAvg = (inoutInfo.unusedRangeCount > 0) ?
- VmaRoundDiv<VkDeviceSize>(inoutInfo.unusedBytes, inoutInfo.unusedRangeCount) : 0;
+ inoutInfo.allocationSizeAvg = (inoutInfo.allocationCount > 0) ?
+ VmaRoundDiv<VkDeviceSize>(inoutInfo.usedBytes, inoutInfo.allocationCount) : 0;
+ inoutInfo.unusedRangeSizeAvg = (inoutInfo.unusedRangeCount > 0) ?
+ VmaRoundDiv<VkDeviceSize>(inoutInfo.unusedBytes, inoutInfo.unusedRangeCount) : 0;
}
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.frameInUseCount,
- createInfo.blockSize != 0, // explicitBlockSize
- createInfo.flags & VMA_POOL_CREATE_ALGORITHM_MASK), // algorithm
- m_Id(0),
- m_Name(VMA_NULL)
+ 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.frameInUseCount,
+ createInfo.blockSize != 0, // explicitBlockSize
+ createInfo.flags & VMA_POOL_CREATE_ALGORITHM_MASK), // algorithm
+ m_Id(0),
+ m_Name(VMA_NULL)
{
}
@@ -11901,17 +11739,17 @@ VmaPool_T::~VmaPool_T()
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;
- }
+ 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;
+ }
}
#if VMA_STATS_STRING_ENABLED
@@ -11919,1637 +11757,1563 @@ void VmaPool_T::SetName(const char* pName)
#endif // #if VMA_STATS_STRING_ENABLED
VmaBlockVector::VmaBlockVector(
- VmaAllocator hAllocator,
- VmaPool hParentPool,
- uint32_t memoryTypeIndex,
- VkDeviceSize preferredBlockSize,
- size_t minBlockCount,
- size_t maxBlockCount,
- VkDeviceSize bufferImageGranularity,
- uint32_t frameInUseCount,
- bool explicitBlockSize,
- uint32_t algorithm) :
- m_hAllocator(hAllocator),
- m_hParentPool(hParentPool),
- m_MemoryTypeIndex(memoryTypeIndex),
- m_PreferredBlockSize(preferredBlockSize),
- m_MinBlockCount(minBlockCount),
- m_MaxBlockCount(maxBlockCount),
- m_BufferImageGranularity(bufferImageGranularity),
- m_FrameInUseCount(frameInUseCount),
- m_ExplicitBlockSize(explicitBlockSize),
- m_Algorithm(algorithm),
- m_HasEmptyBlock(false),
- m_Blocks(VmaStlAllocator<VmaDeviceMemoryBlock*>(hAllocator->GetAllocationCallbacks())),
- m_NextBlockId(0)
+ VmaAllocator hAllocator,
+ VmaPool hParentPool,
+ uint32_t memoryTypeIndex,
+ VkDeviceSize preferredBlockSize,
+ size_t minBlockCount,
+ size_t maxBlockCount,
+ VkDeviceSize bufferImageGranularity,
+ uint32_t frameInUseCount,
+ bool explicitBlockSize,
+ uint32_t algorithm) :
+ m_hAllocator(hAllocator),
+ m_hParentPool(hParentPool),
+ m_MemoryTypeIndex(memoryTypeIndex),
+ m_PreferredBlockSize(preferredBlockSize),
+ m_MinBlockCount(minBlockCount),
+ m_MaxBlockCount(maxBlockCount),
+ m_BufferImageGranularity(bufferImageGranularity),
+ m_FrameInUseCount(frameInUseCount),
+ m_ExplicitBlockSize(explicitBlockSize),
+ m_Algorithm(algorithm),
+ m_HasEmptyBlock(false),
+ m_Blocks(VmaStlAllocator<VmaDeviceMemoryBlock*>(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]);
- }
+ 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;
+ 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::GetPoolStats(VmaPoolStats* pStats)
{
- VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
+ VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
- const size_t blockCount = m_Blocks.size();
+ const size_t blockCount = m_Blocks.size();
- pStats->size = 0;
- pStats->unusedSize = 0;
- pStats->allocationCount = 0;
- pStats->unusedRangeCount = 0;
- pStats->unusedRangeSizeMax = 0;
- pStats->blockCount = blockCount;
+ pStats->size = 0;
+ pStats->unusedSize = 0;
+ pStats->allocationCount = 0;
+ pStats->unusedRangeCount = 0;
+ pStats->unusedRangeSizeMax = 0;
+ pStats->blockCount = blockCount;
- 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->AddPoolStats(*pStats);
- }
+ 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->AddPoolStats(*pStats);
+ }
}
bool VmaBlockVector::IsEmpty()
{
- VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
- return m_Blocks.empty();
+ 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;
+ 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;
}
static const uint32_t VMA_ALLOCATION_TRY_COUNT = 32;
VkResult VmaBlockVector::Allocate(
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- const VmaAllocationCreateInfo& createInfo,
- VmaSuballocationType suballocType,
- size_t allocationCount,
- VmaAllocation* pAllocations)
-{
- size_t allocIndex;
- VkResult res = VK_SUCCESS;
-
- if(IsCorruptionDetectionEnabled())
- {
- size = VmaAlignUp<VkDeviceSize>(size, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE));
- alignment = VmaAlignUp<VkDeviceSize>(alignment, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE));
- }
-
- {
- VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
- for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
- {
- res = AllocatePage(
- currentFrameIndex,
- 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;
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaSuballocationType suballocType,
+ size_t allocationCount,
+ VmaAllocation* pAllocations)
+{
+ size_t allocIndex;
+ VkResult res = VK_SUCCESS;
+
+ if(IsCorruptionDetectionEnabled())
+ {
+ size = VmaAlignUp<VkDeviceSize>(size, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE));
+ alignment = VmaAlignUp<VkDeviceSize>(alignment, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE));
+ }
+
+ {
+ VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
+ for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
+ {
+ res = AllocatePage(
+ currentFrameIndex,
+ 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(
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- const VmaAllocationCreateInfo& createInfo,
- VmaSuballocationType suballocType,
- VmaAllocation* pAllocation)
-{
- const bool isUpperAddress = (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0;
- bool canMakeOtherLost = (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT) != 0;
- const bool mapped = (createInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0;
- const bool isUserDataString = (createInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0;
-
- const bool withinBudget = (createInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0;
- VkDeviceSize freeMemory;
- {
- const uint32_t heapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex);
- VmaBudget heapBudget = {};
- m_hAllocator->GetBudget(&heapBudget, heapIndex, 1);
- freeMemory = (heapBudget.usage < heapBudget.budget) ? (heapBudget.budget - heapBudget.usage) : 0;
- }
-
- const bool canFallbackToDedicated = !IsCustomPool();
- 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;
-
- // If linearAlgorithm is used, canMakeOtherLost is available only when used as ring buffer.
- // Which in turn is available only when maxBlockCount = 1.
- if(m_Algorithm == VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT && m_MaxBlockCount > 1)
- {
- canMakeOtherLost = false;
- }
-
- // 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;
- }
-
- // Validate strategy.
- switch(strategy)
- {
- case 0:
- strategy = VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT;
- break;
- case VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT:
- case VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT:
- case VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT:
- break;
- default:
- return VK_ERROR_FEATURE_NOT_PRESENT;
- }
-
- // Early reject: requested allocation size is larger that maximum block size for this block vector.
- if(size + 2 * VMA_DEBUG_MARGIN > m_PreferredBlockSize)
- {
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
-
- /*
- Under certain condition, this whole section can be skipped for optimization, so
- we move on directly to trying to allocate with canMakeOtherLost. That's the case
- e.g. for custom pools with linear algorithm.
- */
- if(!canMakeOtherLost || canCreateNewBlock)
- {
- // 1. Search existing allocations. Try to allocate without making other allocations lost.
- VmaAllocationCreateFlags allocFlagsCopy = createInfo.flags;
- allocFlagsCopy &= ~VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT;
-
- 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,
- currentFrameIndex,
- size,
- alignment,
- allocFlagsCopy,
- createInfo.pUserData,
- suballocType,
- strategy,
- pAllocation);
- if(res == VK_SUCCESS)
- {
- VMA_DEBUG_LOG(" Returned from last block #%u", pCurrBlock->GetId());
- return VK_SUCCESS;
- }
- }
- }
- else
- {
- if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
- {
- // 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,
- currentFrameIndex,
- size,
- alignment,
- allocFlagsCopy,
- createInfo.pUserData,
- suballocType,
- strategy,
- pAllocation);
- if(res == VK_SUCCESS)
- {
- VMA_DEBUG_LOG(" Returned from existing block #%u", pCurrBlock->GetId());
- return VK_SUCCESS;
- }
- }
- }
- else // WORST_FIT, FIRST_FIT
- {
- // 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,
- currentFrameIndex,
- size,
- alignment,
- allocFlagsCopy,
- createInfo.pUserData,
- suballocType,
- strategy,
- pAllocation);
- if(res == VK_SUCCESS)
- {
- VMA_DEBUG_LOG(" Returned from existing block #%u", pCurrBlock->GetId());
- 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,
- currentFrameIndex,
- size,
- alignment,
- allocFlagsCopy,
- createInfo.pUserData,
- suballocType,
- strategy,
- pAllocation);
- if(res == VK_SUCCESS)
- {
- VMA_DEBUG_LOG(" Created new block #%u Size=%llu", pBlock->GetId(), newBlockSize);
- return VK_SUCCESS;
- }
- else
- {
- // Allocation from new block failed, possibly due to VMA_DEBUG_MARGIN or alignment.
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- }
- }
- }
-
- // 3. Try to allocate from existing blocks with making other allocations lost.
- if(canMakeOtherLost)
- {
- uint32_t tryIndex = 0;
- for(; tryIndex < VMA_ALLOCATION_TRY_COUNT; ++tryIndex)
- {
- VmaDeviceMemoryBlock* pBestRequestBlock = VMA_NULL;
- VmaAllocationRequest bestRequest = {};
- VkDeviceSize bestRequestCost = VK_WHOLE_SIZE;
-
- // 1. Search existing allocations.
- if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
- {
- // 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);
- VmaAllocationRequest currRequest = {};
- if(pCurrBlock->m_pMetadata->CreateAllocationRequest(
- currentFrameIndex,
- m_FrameInUseCount,
- m_BufferImageGranularity,
- size,
- alignment,
- (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0,
- suballocType,
- canMakeOtherLost,
- strategy,
- &currRequest))
- {
- const VkDeviceSize currRequestCost = currRequest.CalcCost();
- if(pBestRequestBlock == VMA_NULL ||
- currRequestCost < bestRequestCost)
- {
- pBestRequestBlock = pCurrBlock;
- bestRequest = currRequest;
- bestRequestCost = currRequestCost;
-
- if(bestRequestCost == 0)
- {
- break;
- }
- }
- }
- }
- }
- else // WORST_FIT, FIRST_FIT
- {
- // 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);
- VmaAllocationRequest currRequest = {};
- if(pCurrBlock->m_pMetadata->CreateAllocationRequest(
- currentFrameIndex,
- m_FrameInUseCount,
- m_BufferImageGranularity,
- size,
- alignment,
- (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0,
- suballocType,
- canMakeOtherLost,
- strategy,
- &currRequest))
- {
- const VkDeviceSize currRequestCost = currRequest.CalcCost();
- if(pBestRequestBlock == VMA_NULL ||
- currRequestCost < bestRequestCost ||
- strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
- {
- pBestRequestBlock = pCurrBlock;
- bestRequest = currRequest;
- bestRequestCost = currRequestCost;
-
- if(bestRequestCost == 0 ||
- strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
- {
- break;
- }
- }
- }
- }
- }
-
- if(pBestRequestBlock != VMA_NULL)
- {
- if(mapped)
- {
- VkResult res = pBestRequestBlock->Map(m_hAllocator, 1, VMA_NULL);
- if(res != VK_SUCCESS)
- {
- return res;
- }
- }
-
- if(pBestRequestBlock->m_pMetadata->MakeRequestedAllocationsLost(
- currentFrameIndex,
- m_FrameInUseCount,
- &bestRequest))
- {
- // Allocate from this pBlock.
- *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate(currentFrameIndex, isUserDataString);
- pBestRequestBlock->m_pMetadata->Alloc(bestRequest, suballocType, size, *pAllocation);
- UpdateHasEmptyBlock();
- (*pAllocation)->InitBlockAllocation(
- pBestRequestBlock,
- bestRequest.offset,
- alignment,
- size,
- m_MemoryTypeIndex,
- suballocType,
- mapped,
- (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
- VMA_HEAVY_ASSERT(pBestRequestBlock->Validate());
- VMA_DEBUG_LOG(" Returned from existing block");
- (*pAllocation)->SetUserData(m_hAllocator, createInfo.pUserData);
- m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
- if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
- {
- m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
- }
- if(IsCorruptionDetectionEnabled())
- {
- VkResult res = pBestRequestBlock->WriteMagicValueAroundAllocation(m_hAllocator, bestRequest.offset, size);
- VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
- }
- return VK_SUCCESS;
- }
- // else: Some allocations must have been touched while we are here. Next try.
- }
- else
- {
- // Could not find place in any of the blocks - break outer loop.
- break;
- }
- }
- /* Maximum number of tries exceeded - a very unlike event when many other
- threads are simultaneously touching allocations making it impossible to make
- lost at the same time as we try to allocate. */
- if(tryIndex == VMA_ALLOCATION_TRY_COUNT)
- {
- return VK_ERROR_TOO_MANY_OBJECTS;
- }
- }
-
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaSuballocationType suballocType,
+ VmaAllocation* pAllocation)
+{
+ const bool isUpperAddress = (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0;
+ bool canMakeOtherLost = (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT) != 0;
+ const bool mapped = (createInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0;
+ const bool isUserDataString = (createInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0;
+
+ const bool withinBudget = (createInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0;
+ VkDeviceSize freeMemory;
+ {
+ const uint32_t heapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex);
+ VmaBudget heapBudget = {};
+ m_hAllocator->GetBudget(&heapBudget, heapIndex, 1);
+ freeMemory = (heapBudget.usage < heapBudget.budget) ? (heapBudget.budget - heapBudget.usage) : 0;
+ }
+
+ const bool canFallbackToDedicated = !IsCustomPool();
+ 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;
+
+ // If linearAlgorithm is used, canMakeOtherLost is available only when used as ring buffer.
+ // Which in turn is available only when maxBlockCount = 1.
+ if(m_Algorithm == VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT && m_MaxBlockCount > 1)
+ {
+ canMakeOtherLost = false;
+ }
+
+ // 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;
+ }
+
+ // Validate strategy.
+ switch(strategy)
+ {
+ case 0:
+ strategy = VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT;
+ break;
+ case VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT:
+ case VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT:
+ case VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT:
+ break;
+ default:
+ return VK_ERROR_FEATURE_NOT_PRESENT;
+ }
+
+ // Early reject: requested allocation size is larger that maximum block size for this block vector.
+ if(size + 2 * VMA_DEBUG_MARGIN > m_PreferredBlockSize)
+ {
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+
+ /*
+ Under certain condition, this whole section can be skipped for optimization, so
+ we move on directly to trying to allocate with canMakeOtherLost. That's the case
+ e.g. for custom pools with linear algorithm.
+ */
+ if(!canMakeOtherLost || canCreateNewBlock)
+ {
+ // 1. Search existing allocations. Try to allocate without making other allocations lost.
+ VmaAllocationCreateFlags allocFlagsCopy = createInfo.flags;
+ allocFlagsCopy &= ~VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT;
+
+ 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,
+ currentFrameIndex,
+ size,
+ alignment,
+ allocFlagsCopy,
+ createInfo.pUserData,
+ suballocType,
+ strategy,
+ pAllocation);
+ if(res == VK_SUCCESS)
+ {
+ VMA_DEBUG_LOG(" Returned from last block #%u", pCurrBlock->GetId());
+ return VK_SUCCESS;
+ }
+ }
+ }
+ else
+ {
+ if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
+ {
+ // 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,
+ currentFrameIndex,
+ size,
+ alignment,
+ allocFlagsCopy,
+ createInfo.pUserData,
+ suballocType,
+ strategy,
+ pAllocation);
+ if(res == VK_SUCCESS)
+ {
+ VMA_DEBUG_LOG(" Returned from existing block #%u", pCurrBlock->GetId());
+ return VK_SUCCESS;
+ }
+ }
+ }
+ else // WORST_FIT, FIRST_FIT
+ {
+ // 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,
+ currentFrameIndex,
+ size,
+ alignment,
+ allocFlagsCopy,
+ createInfo.pUserData,
+ suballocType,
+ strategy,
+ pAllocation);
+ if(res == VK_SUCCESS)
+ {
+ VMA_DEBUG_LOG(" Returned from existing block #%u", pCurrBlock->GetId());
+ 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,
+ currentFrameIndex,
+ size,
+ alignment,
+ allocFlagsCopy,
+ createInfo.pUserData,
+ suballocType,
+ strategy,
+ pAllocation);
+ if(res == VK_SUCCESS)
+ {
+ VMA_DEBUG_LOG(" Created new block #%u Size=%llu", pBlock->GetId(), newBlockSize);
+ return VK_SUCCESS;
+ }
+ else
+ {
+ // Allocation from new block failed, possibly due to VMA_DEBUG_MARGIN or alignment.
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ }
+ }
+ }
+
+ // 3. Try to allocate from existing blocks with making other allocations lost.
+ if(canMakeOtherLost)
+ {
+ uint32_t tryIndex = 0;
+ for(; tryIndex < VMA_ALLOCATION_TRY_COUNT; ++tryIndex)
+ {
+ VmaDeviceMemoryBlock* pBestRequestBlock = VMA_NULL;
+ VmaAllocationRequest bestRequest = {};
+ VkDeviceSize bestRequestCost = VK_WHOLE_SIZE;
+
+ // 1. Search existing allocations.
+ if(strategy == VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT)
+ {
+ // 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);
+ VmaAllocationRequest currRequest = {};
+ if(pCurrBlock->m_pMetadata->CreateAllocationRequest(
+ currentFrameIndex,
+ m_FrameInUseCount,
+ m_BufferImageGranularity,
+ size,
+ alignment,
+ (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0,
+ suballocType,
+ canMakeOtherLost,
+ strategy,
+ &currRequest))
+ {
+ const VkDeviceSize currRequestCost = currRequest.CalcCost();
+ if(pBestRequestBlock == VMA_NULL ||
+ currRequestCost < bestRequestCost)
+ {
+ pBestRequestBlock = pCurrBlock;
+ bestRequest = currRequest;
+ bestRequestCost = currRequestCost;
+
+ if(bestRequestCost == 0)
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else // WORST_FIT, FIRST_FIT
+ {
+ // 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);
+ VmaAllocationRequest currRequest = {};
+ if(pCurrBlock->m_pMetadata->CreateAllocationRequest(
+ currentFrameIndex,
+ m_FrameInUseCount,
+ m_BufferImageGranularity,
+ size,
+ alignment,
+ (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0,
+ suballocType,
+ canMakeOtherLost,
+ strategy,
+ &currRequest))
+ {
+ const VkDeviceSize currRequestCost = currRequest.CalcCost();
+ if(pBestRequestBlock == VMA_NULL ||
+ currRequestCost < bestRequestCost ||
+ strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
+ {
+ pBestRequestBlock = pCurrBlock;
+ bestRequest = currRequest;
+ bestRequestCost = currRequestCost;
+
+ if(bestRequestCost == 0 ||
+ strategy == VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT)
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if(pBestRequestBlock != VMA_NULL)
+ {
+ if(mapped)
+ {
+ VkResult res = pBestRequestBlock->Map(m_hAllocator, 1, VMA_NULL);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
+ }
+
+ if(pBestRequestBlock->m_pMetadata->MakeRequestedAllocationsLost(
+ currentFrameIndex,
+ m_FrameInUseCount,
+ &bestRequest))
+ {
+ // Allocate from this pBlock.
+ *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate();
+ (*pAllocation)->Ctor(currentFrameIndex, isUserDataString);
+ pBestRequestBlock->m_pMetadata->Alloc(bestRequest, suballocType, size, *pAllocation);
+ UpdateHasEmptyBlock();
+ (*pAllocation)->InitBlockAllocation(
+ pBestRequestBlock,
+ bestRequest.offset,
+ alignment,
+ size,
+ m_MemoryTypeIndex,
+ suballocType,
+ mapped,
+ (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
+ VMA_HEAVY_ASSERT(pBestRequestBlock->Validate());
+ VMA_DEBUG_LOG(" Returned from existing block");
+ (*pAllocation)->SetUserData(m_hAllocator, createInfo.pUserData);
+ m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
+ if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
+ {
+ m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
+ }
+ if(IsCorruptionDetectionEnabled())
+ {
+ VkResult res = pBestRequestBlock->WriteMagicValueAroundAllocation(m_hAllocator, bestRequest.offset, size);
+ VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
+ }
+ return VK_SUCCESS;
+ }
+ // else: Some allocations must have been touched while we are here. Next try.
+ }
+ else
+ {
+ // Could not find place in any of the blocks - break outer loop.
+ break;
+ }
+ }
+ /* Maximum number of tries exceeded - a very unlike event when many other
+ threads are simultaneously touching allocations making it impossible to make
+ lost at the same time as we try to allocate. */
+ if(tryIndex == VMA_ALLOCATION_TRY_COUNT)
+ {
+ return VK_ERROR_TOO_MANY_OBJECTS;
+ }
+ }
+
+ 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->GetBudget(&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->ValidateMagicValueAroundAllocation(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);
- }
-
- pBlock->m_pMetadata->Free(hAllocation);
- VMA_HEAVY_ASSERT(pBlock->Validate());
-
- VMA_DEBUG_LOG(" Freed from MemoryTypeIndex=%u", m_MemoryTypeIndex);
-
- const bool canDeleteBlock = m_Blocks.size() > m_MinBlockCount;
- // pBlock became empty after this deallocation.
- if(pBlock->m_pMetadata->IsEmpty())
- {
- // Already has empty block. We don't want to have two, so delete this one.
- if((m_HasEmptyBlock || budgetExceeded) && canDeleteBlock)
- {
- pBlockToDelete = pBlock;
- Remove(pBlock);
- }
- // else: We now have an empty block - leave it.
- }
- // pBlock didn't become empty, but we have another empty block - find and free that one.
- // (This is optional, heuristics.)
- else if(m_HasEmptyBlock && canDeleteBlock)
- {
- VmaDeviceMemoryBlock* pLastBlock = m_Blocks.back();
- if(pLastBlock->m_pMetadata->IsEmpty())
- {
- pBlockToDelete = pLastBlock;
- m_Blocks.pop_back();
- }
- }
-
- UpdateHasEmptyBlock();
- IncrementallySortBlocks();
- }
-
- // Destruction of a free block. Deferred until this point, outside of mutex
- // lock, for performance reason.
- if(pBlockToDelete != VMA_NULL)
- {
- VMA_DEBUG_LOG(" Deleted empty block");
- pBlockToDelete->Destroy(m_hAllocator);
- vma_delete(m_hAllocator, pBlockToDelete);
- }
+ const VmaAllocation hAllocation)
+{
+ VmaDeviceMemoryBlock* pBlockToDelete = VMA_NULL;
+
+ bool budgetExceeded = false;
+ {
+ const uint32_t heapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex);
+ VmaBudget heapBudget = {};
+ m_hAllocator->GetBudget(&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->ValidateMagicValueAroundAllocation(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);
+ }
+
+ pBlock->m_pMetadata->Free(hAllocation);
+ VMA_HEAVY_ASSERT(pBlock->Validate());
+
+ VMA_DEBUG_LOG(" Freed from MemoryTypeIndex=%u", m_MemoryTypeIndex);
+
+ const bool canDeleteBlock = m_Blocks.size() > m_MinBlockCount;
+ // pBlock became empty after this deallocation.
+ if(pBlock->m_pMetadata->IsEmpty())
+ {
+ // Already has empty block. We don't want to have two, so delete this one.
+ if((m_HasEmptyBlock || budgetExceeded) && canDeleteBlock)
+ {
+ pBlockToDelete = pBlock;
+ Remove(pBlock);
+ }
+ // else: We now have an empty block - leave it.
+ }
+ // pBlock didn't become empty, but we have another empty block - find and free that one.
+ // (This is optional, heuristics.)
+ else if(m_HasEmptyBlock && canDeleteBlock)
+ {
+ VmaDeviceMemoryBlock* pLastBlock = m_Blocks.back();
+ if(pLastBlock->m_pMetadata->IsEmpty())
+ {
+ pBlockToDelete = pLastBlock;
+ m_Blocks.pop_back();
+ }
+ }
+
+ UpdateHasEmptyBlock();
+ IncrementallySortBlocks();
+ }
+
+ // Destruction of a free block. Deferred until this point, outside of mutex
+ // lock, for performance reason.
+ if(pBlockToDelete != VMA_NULL)
+ {
+ VMA_DEBUG_LOG(" Deleted empty block");
+ 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;
+ 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);
+ 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_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())
- {
- VMA_SWAP(m_Blocks[i - 1], m_Blocks[i]);
- 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())
+ {
+ VMA_SWAP(m_Blocks[i - 1], m_Blocks[i]);
+ return;
+ }
+ }
+ }
}
VkResult VmaBlockVector::AllocateFromBlock(
- VmaDeviceMemoryBlock* pBlock,
- uint32_t currentFrameIndex,
- VkDeviceSize size,
- VkDeviceSize alignment,
- VmaAllocationCreateFlags allocFlags,
- void* pUserData,
- VmaSuballocationType suballocType,
- uint32_t strategy,
- VmaAllocation* pAllocation)
-{
- VMA_ASSERT((allocFlags & VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT) == 0);
- const bool isUpperAddress = (allocFlags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0;
- const bool mapped = (allocFlags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0;
- const bool isUserDataString = (allocFlags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0;
-
- VmaAllocationRequest currRequest = {};
- if(pBlock->m_pMetadata->CreateAllocationRequest(
- currentFrameIndex,
- m_FrameInUseCount,
- m_BufferImageGranularity,
- size,
- alignment,
- isUpperAddress,
- suballocType,
- false, // canMakeOtherLost
- strategy,
- &currRequest))
- {
- // Allocate from pCurrBlock.
- VMA_ASSERT(currRequest.itemsToMakeLostCount == 0);
-
- if(mapped)
- {
- VkResult res = pBlock->Map(m_hAllocator, 1, VMA_NULL);
- if(res != VK_SUCCESS)
- {
- return res;
- }
- }
-
- *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate(currentFrameIndex, isUserDataString);
- pBlock->m_pMetadata->Alloc(currRequest, suballocType, size, *pAllocation);
- UpdateHasEmptyBlock();
- (*pAllocation)->InitBlockAllocation(
- pBlock,
- currRequest.offset,
- alignment,
- size,
- m_MemoryTypeIndex,
- suballocType,
- mapped,
- (allocFlags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
- VMA_HEAVY_ASSERT(pBlock->Validate());
- (*pAllocation)->SetUserData(m_hAllocator, pUserData);
- m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
- if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
- {
- m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
- }
- if(IsCorruptionDetectionEnabled())
- {
- VkResult res = pBlock->WriteMagicValueAroundAllocation(m_hAllocator, currRequest.offset, size);
- VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
- }
- return VK_SUCCESS;
- }
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ VmaDeviceMemoryBlock* pBlock,
+ uint32_t currentFrameIndex,
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ VmaAllocationCreateFlags allocFlags,
+ void* pUserData,
+ VmaSuballocationType suballocType,
+ uint32_t strategy,
+ VmaAllocation* pAllocation)
+{
+ VMA_ASSERT((allocFlags & VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT) == 0);
+ const bool isUpperAddress = (allocFlags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0;
+ const bool mapped = (allocFlags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0;
+ const bool isUserDataString = (allocFlags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0;
+
+ VmaAllocationRequest currRequest = {};
+ if(pBlock->m_pMetadata->CreateAllocationRequest(
+ currentFrameIndex,
+ m_FrameInUseCount,
+ m_BufferImageGranularity,
+ size,
+ alignment,
+ isUpperAddress,
+ suballocType,
+ false, // canMakeOtherLost
+ strategy,
+ &currRequest))
+ {
+ // Allocate from pCurrBlock.
+ VMA_ASSERT(currRequest.itemsToMakeLostCount == 0);
+
+ if(mapped)
+ {
+ VkResult res = pBlock->Map(m_hAllocator, 1, VMA_NULL);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
+ }
+
+ *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate();
+ (*pAllocation)->Ctor(currentFrameIndex, isUserDataString);
+ pBlock->m_pMetadata->Alloc(currRequest, suballocType, size, *pAllocation);
+ UpdateHasEmptyBlock();
+ (*pAllocation)->InitBlockAllocation(
+ pBlock,
+ currRequest.offset,
+ alignment,
+ size,
+ m_MemoryTypeIndex,
+ suballocType,
+ mapped,
+ (allocFlags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
+ VMA_HEAVY_ASSERT(pBlock->Validate());
+ (*pAllocation)->SetUserData(m_hAllocator, pUserData);
+ m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
+ if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
+ {
+ m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
+ }
+ if(IsCorruptionDetectionEnabled())
+ {
+ VkResult res = pBlock->WriteMagicValueAroundAllocation(m_hAllocator, currRequest.offset, size);
+ VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
+ }
+ return VK_SUCCESS;
+ }
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
}
VkResult VmaBlockVector::CreateBlock(VkDeviceSize blockSize, size_t* pNewBlockIndex)
{
- VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
- allocInfo.memoryTypeIndex = m_MemoryTypeIndex;
- allocInfo.allocationSize = blockSize;
- 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_Blocks.push_back(pBlock);
- if(pNewBlockIndex != VMA_NULL)
- {
- *pNewBlockIndex = m_Blocks.size() - 1;
- }
-
- return VK_SUCCESS;
+ VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
+ allocInfo.memoryTypeIndex = m_MemoryTypeIndex;
+ allocInfo.allocationSize = blockSize;
+ 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_Blocks.push_back(pBlock);
+ if(pNewBlockIndex != VMA_NULL)
+ {
+ *pNewBlockIndex = m_Blocks.size() - 1;
+ }
+
+ return VK_SUCCESS;
}
void VmaBlockVector::ApplyDefragmentationMovesCpu(
- class VmaBlockVectorDefragmentationContext* pDefragCtx,
- const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves)
-{
- const size_t blockCount = m_Blocks.size();
- const bool isNonCoherent = m_hAllocator->IsMemoryTypeNonCoherent(m_MemoryTypeIndex);
-
- enum BLOCK_FLAG
- {
- BLOCK_FLAG_USED = 0x00000001,
- BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION = 0x00000002,
- };
-
- struct BlockInfo
- {
- uint32_t flags;
- void* pMappedData;
- };
- VmaVector< BlockInfo, VmaStlAllocator<BlockInfo> >
- blockInfo(blockCount, BlockInfo(), VmaStlAllocator<BlockInfo>(m_hAllocator->GetAllocationCallbacks()));
- memset(blockInfo.data(), 0, blockCount * sizeof(BlockInfo));
-
- // Go over all moves. Mark blocks that are used with BLOCK_FLAG_USED.
- const size_t moveCount = moves.size();
- for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
- {
- const VmaDefragmentationMove& move = moves[moveIndex];
- blockInfo[move.srcBlockIndex].flags |= BLOCK_FLAG_USED;
- blockInfo[move.dstBlockIndex].flags |= BLOCK_FLAG_USED;
- }
-
- VMA_ASSERT(pDefragCtx->res == VK_SUCCESS);
-
- // Go over all blocks. Get mapped pointer or map if necessary.
- for(size_t blockIndex = 0; pDefragCtx->res == VK_SUCCESS && blockIndex < blockCount; ++blockIndex)
- {
- BlockInfo& currBlockInfo = blockInfo[blockIndex];
- VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
- if((currBlockInfo.flags & BLOCK_FLAG_USED) != 0)
- {
- currBlockInfo.pMappedData = pBlock->GetMappedData();
- // It is not originally mapped - map it.
- if(currBlockInfo.pMappedData == VMA_NULL)
- {
- pDefragCtx->res = pBlock->Map(m_hAllocator, 1, &currBlockInfo.pMappedData);
- if(pDefragCtx->res == VK_SUCCESS)
- {
- currBlockInfo.flags |= BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION;
- }
- }
- }
- }
-
- // Go over all moves. Do actual data transfer.
- if(pDefragCtx->res == VK_SUCCESS)
- {
- const VkDeviceSize nonCoherentAtomSize = m_hAllocator->m_PhysicalDeviceProperties.limits.nonCoherentAtomSize;
- VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };
-
- for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
- {
- const VmaDefragmentationMove& move = moves[moveIndex];
-
- const BlockInfo& srcBlockInfo = blockInfo[move.srcBlockIndex];
- const BlockInfo& dstBlockInfo = blockInfo[move.dstBlockIndex];
-
- VMA_ASSERT(srcBlockInfo.pMappedData && dstBlockInfo.pMappedData);
-
- // Invalidate source.
- if(isNonCoherent)
- {
- VmaDeviceMemoryBlock* const pSrcBlock = m_Blocks[move.srcBlockIndex];
- memRange.memory = pSrcBlock->GetDeviceMemory();
- memRange.offset = VmaAlignDown(move.srcOffset, nonCoherentAtomSize);
- memRange.size = VMA_MIN(
- VmaAlignUp(move.size + (move.srcOffset - memRange.offset), nonCoherentAtomSize),
- pSrcBlock->m_pMetadata->GetSize() - memRange.offset);
- (*m_hAllocator->GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hAllocator->m_hDevice, 1, &memRange);
- }
-
- // THE PLACE WHERE ACTUAL DATA COPY HAPPENS.
- memmove(
- reinterpret_cast<char*>(dstBlockInfo.pMappedData) + move.dstOffset,
- reinterpret_cast<char*>(srcBlockInfo.pMappedData) + move.srcOffset,
- static_cast<size_t>(move.size));
-
- if(IsCorruptionDetectionEnabled())
- {
- VmaWriteMagicValue(dstBlockInfo.pMappedData, move.dstOffset - VMA_DEBUG_MARGIN);
- VmaWriteMagicValue(dstBlockInfo.pMappedData, move.dstOffset + move.size);
- }
-
- // Flush destination.
- if(isNonCoherent)
- {
- VmaDeviceMemoryBlock* const pDstBlock = m_Blocks[move.dstBlockIndex];
- memRange.memory = pDstBlock->GetDeviceMemory();
- memRange.offset = VmaAlignDown(move.dstOffset, nonCoherentAtomSize);
- memRange.size = VMA_MIN(
- VmaAlignUp(move.size + (move.dstOffset - memRange.offset), nonCoherentAtomSize),
- pDstBlock->m_pMetadata->GetSize() - memRange.offset);
- (*m_hAllocator->GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hAllocator->m_hDevice, 1, &memRange);
- }
- }
- }
-
- // Go over all blocks in reverse order. Unmap those that were mapped just for defragmentation.
- // Regardless of pCtx->res == VK_SUCCESS.
- for(size_t blockIndex = blockCount; blockIndex--; )
- {
- const BlockInfo& currBlockInfo = blockInfo[blockIndex];
- if((currBlockInfo.flags & BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION) != 0)
- {
- VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
- pBlock->Unmap(m_hAllocator, 1);
- }
- }
+ class VmaBlockVectorDefragmentationContext* pDefragCtx,
+ const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves)
+{
+ const size_t blockCount = m_Blocks.size();
+ const bool isNonCoherent = m_hAllocator->IsMemoryTypeNonCoherent(m_MemoryTypeIndex);
+
+ enum BLOCK_FLAG
+ {
+ BLOCK_FLAG_USED = 0x00000001,
+ BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION = 0x00000002,
+ };
+
+ struct BlockInfo
+ {
+ uint32_t flags;
+ void* pMappedData;
+ };
+ VmaVector< BlockInfo, VmaStlAllocator<BlockInfo> >
+ blockInfo(blockCount, BlockInfo(), VmaStlAllocator<BlockInfo>(m_hAllocator->GetAllocationCallbacks()));
+ memset(blockInfo.data(), 0, blockCount * sizeof(BlockInfo));
+
+ // Go over all moves. Mark blocks that are used with BLOCK_FLAG_USED.
+ const size_t moveCount = moves.size();
+ for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
+ {
+ const VmaDefragmentationMove& move = moves[moveIndex];
+ blockInfo[move.srcBlockIndex].flags |= BLOCK_FLAG_USED;
+ blockInfo[move.dstBlockIndex].flags |= BLOCK_FLAG_USED;
+ }
+
+ VMA_ASSERT(pDefragCtx->res == VK_SUCCESS);
+
+ // Go over all blocks. Get mapped pointer or map if necessary.
+ for(size_t blockIndex = 0; pDefragCtx->res == VK_SUCCESS && blockIndex < blockCount; ++blockIndex)
+ {
+ BlockInfo& currBlockInfo = blockInfo[blockIndex];
+ VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
+ if((currBlockInfo.flags & BLOCK_FLAG_USED) != 0)
+ {
+ currBlockInfo.pMappedData = pBlock->GetMappedData();
+ // It is not originally mapped - map it.
+ if(currBlockInfo.pMappedData == VMA_NULL)
+ {
+ pDefragCtx->res = pBlock->Map(m_hAllocator, 1, &currBlockInfo.pMappedData);
+ if(pDefragCtx->res == VK_SUCCESS)
+ {
+ currBlockInfo.flags |= BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION;
+ }
+ }
+ }
+ }
+
+ // Go over all moves. Do actual data transfer.
+ if(pDefragCtx->res == VK_SUCCESS)
+ {
+ const VkDeviceSize nonCoherentAtomSize = m_hAllocator->m_PhysicalDeviceProperties.limits.nonCoherentAtomSize;
+ VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };
+
+ for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
+ {
+ const VmaDefragmentationMove& move = moves[moveIndex];
+
+ const BlockInfo& srcBlockInfo = blockInfo[move.srcBlockIndex];
+ const BlockInfo& dstBlockInfo = blockInfo[move.dstBlockIndex];
+
+ VMA_ASSERT(srcBlockInfo.pMappedData && dstBlockInfo.pMappedData);
+
+ // Invalidate source.
+ if(isNonCoherent)
+ {
+ VmaDeviceMemoryBlock* const pSrcBlock = m_Blocks[move.srcBlockIndex];
+ memRange.memory = pSrcBlock->GetDeviceMemory();
+ memRange.offset = VmaAlignDown(move.srcOffset, nonCoherentAtomSize);
+ memRange.size = VMA_MIN(
+ VmaAlignUp(move.size + (move.srcOffset - memRange.offset), nonCoherentAtomSize),
+ pSrcBlock->m_pMetadata->GetSize() - memRange.offset);
+ (*m_hAllocator->GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hAllocator->m_hDevice, 1, &memRange);
+ }
+
+ // THE PLACE WHERE ACTUAL DATA COPY HAPPENS.
+ memmove(
+ reinterpret_cast<char*>(dstBlockInfo.pMappedData) + move.dstOffset,
+ reinterpret_cast<char*>(srcBlockInfo.pMappedData) + move.srcOffset,
+ static_cast<size_t>(move.size));
+
+ if(IsCorruptionDetectionEnabled())
+ {
+ VmaWriteMagicValue(dstBlockInfo.pMappedData, move.dstOffset - VMA_DEBUG_MARGIN);
+ VmaWriteMagicValue(dstBlockInfo.pMappedData, move.dstOffset + move.size);
+ }
+
+ // Flush destination.
+ if(isNonCoherent)
+ {
+ VmaDeviceMemoryBlock* const pDstBlock = m_Blocks[move.dstBlockIndex];
+ memRange.memory = pDstBlock->GetDeviceMemory();
+ memRange.offset = VmaAlignDown(move.dstOffset, nonCoherentAtomSize);
+ memRange.size = VMA_MIN(
+ VmaAlignUp(move.size + (move.dstOffset - memRange.offset), nonCoherentAtomSize),
+ pDstBlock->m_pMetadata->GetSize() - memRange.offset);
+ (*m_hAllocator->GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hAllocator->m_hDevice, 1, &memRange);
+ }
+ }
+ }
+
+ // Go over all blocks in reverse order. Unmap those that were mapped just for defragmentation.
+ // Regardless of pCtx->res == VK_SUCCESS.
+ for(size_t blockIndex = blockCount; blockIndex--; )
+ {
+ const BlockInfo& currBlockInfo = blockInfo[blockIndex];
+ if((currBlockInfo.flags & BLOCK_FLAG_MAPPED_FOR_DEFRAGMENTATION) != 0)
+ {
+ VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
+ pBlock->Unmap(m_hAllocator, 1);
+ }
+ }
}
void VmaBlockVector::ApplyDefragmentationMovesGpu(
- class VmaBlockVectorDefragmentationContext* pDefragCtx,
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkCommandBuffer commandBuffer)
-{
- const size_t blockCount = m_Blocks.size();
-
- pDefragCtx->blockContexts.resize(blockCount);
- memset(pDefragCtx->blockContexts.data(), 0, blockCount * sizeof(VmaBlockDefragmentationContext));
-
- // Go over all moves. Mark blocks that are used with BLOCK_FLAG_USED.
- const size_t moveCount = moves.size();
- for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
- {
- const VmaDefragmentationMove& move = moves[moveIndex];
-
- //if(move.type == VMA_ALLOCATION_TYPE_UNKNOWN)
- {
- // Old school move still require us to map the whole block
- pDefragCtx->blockContexts[move.srcBlockIndex].flags |= VmaBlockDefragmentationContext::BLOCK_FLAG_USED;
- pDefragCtx->blockContexts[move.dstBlockIndex].flags |= VmaBlockDefragmentationContext::BLOCK_FLAG_USED;
- }
- }
-
- VMA_ASSERT(pDefragCtx->res == VK_SUCCESS);
-
- // Go over all blocks. Create and bind buffer for whole block if necessary.
- {
- VkBufferCreateInfo bufCreateInfo;
- VmaFillGpuDefragmentationBufferCreateInfo(bufCreateInfo);
-
- for(size_t blockIndex = 0; pDefragCtx->res == VK_SUCCESS && blockIndex < blockCount; ++blockIndex)
- {
- VmaBlockDefragmentationContext& currBlockCtx = pDefragCtx->blockContexts[blockIndex];
- VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
- if((currBlockCtx.flags & VmaBlockDefragmentationContext::BLOCK_FLAG_USED) != 0)
- {
- bufCreateInfo.size = pBlock->m_pMetadata->GetSize();
- pDefragCtx->res = (*m_hAllocator->GetVulkanFunctions().vkCreateBuffer)(
- m_hAllocator->m_hDevice, &bufCreateInfo, m_hAllocator->GetAllocationCallbacks(), &currBlockCtx.hBuffer);
- if(pDefragCtx->res == VK_SUCCESS)
- {
- pDefragCtx->res = (*m_hAllocator->GetVulkanFunctions().vkBindBufferMemory)(
- m_hAllocator->m_hDevice, currBlockCtx.hBuffer, pBlock->GetDeviceMemory(), 0);
- }
- }
- }
- }
-
- // Go over all moves. Post data transfer commands to command buffer.
- if(pDefragCtx->res == VK_SUCCESS)
- {
- for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
- {
- const VmaDefragmentationMove& move = moves[moveIndex];
-
- const VmaBlockDefragmentationContext& srcBlockCtx = pDefragCtx->blockContexts[move.srcBlockIndex];
- const VmaBlockDefragmentationContext& dstBlockCtx = pDefragCtx->blockContexts[move.dstBlockIndex];
-
- VMA_ASSERT(srcBlockCtx.hBuffer && dstBlockCtx.hBuffer);
-
- VkBufferCopy region = {
- move.srcOffset,
- move.dstOffset,
- move.size };
- (*m_hAllocator->GetVulkanFunctions().vkCmdCopyBuffer)(
- commandBuffer, srcBlockCtx.hBuffer, dstBlockCtx.hBuffer, 1, &region);
- }
- }
-
- // Save buffers to defrag context for later destruction.
- if(pDefragCtx->res == VK_SUCCESS && moveCount > 0)
- {
- pDefragCtx->res = VK_NOT_READY;
- }
+ class VmaBlockVectorDefragmentationContext* pDefragCtx,
+ const VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkCommandBuffer commandBuffer)
+{
+ const size_t blockCount = m_Blocks.size();
+
+ pDefragCtx->blockContexts.resize(blockCount);
+ memset(pDefragCtx->blockContexts.data(), 0, blockCount * sizeof(VmaBlockDefragmentationContext));
+
+ // Go over all moves. Mark blocks that are used with BLOCK_FLAG_USED.
+ const size_t moveCount = moves.size();
+ for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
+ {
+ const VmaDefragmentationMove& move = moves[moveIndex];
+ pDefragCtx->blockContexts[move.srcBlockIndex].flags |= VmaBlockDefragmentationContext::BLOCK_FLAG_USED;
+ pDefragCtx->blockContexts[move.dstBlockIndex].flags |= VmaBlockDefragmentationContext::BLOCK_FLAG_USED;
+ }
+
+ VMA_ASSERT(pDefragCtx->res == VK_SUCCESS);
+
+ // Go over all blocks. Create and bind buffer for whole block if necessary.
+ {
+ VkBufferCreateInfo bufCreateInfo;
+ VmaFillGpuDefragmentationBufferCreateInfo(bufCreateInfo);
+
+ for(size_t blockIndex = 0; pDefragCtx->res == VK_SUCCESS && blockIndex < blockCount; ++blockIndex)
+ {
+ VmaBlockDefragmentationContext& currBlockCtx = pDefragCtx->blockContexts[blockIndex];
+ VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
+ if((currBlockCtx.flags & VmaBlockDefragmentationContext::BLOCK_FLAG_USED) != 0)
+ {
+ bufCreateInfo.size = pBlock->m_pMetadata->GetSize();
+ pDefragCtx->res = (*m_hAllocator->GetVulkanFunctions().vkCreateBuffer)(
+ m_hAllocator->m_hDevice, &bufCreateInfo, m_hAllocator->GetAllocationCallbacks(), &currBlockCtx.hBuffer);
+ if(pDefragCtx->res == VK_SUCCESS)
+ {
+ pDefragCtx->res = (*m_hAllocator->GetVulkanFunctions().vkBindBufferMemory)(
+ m_hAllocator->m_hDevice, currBlockCtx.hBuffer, pBlock->GetDeviceMemory(), 0);
+ }
+ }
+ }
+ }
+
+ // Go over all moves. Post data transfer commands to command buffer.
+ if(pDefragCtx->res == VK_SUCCESS)
+ {
+ for(size_t moveIndex = 0; moveIndex < moveCount; ++moveIndex)
+ {
+ const VmaDefragmentationMove& move = moves[moveIndex];
+
+ const VmaBlockDefragmentationContext& srcBlockCtx = pDefragCtx->blockContexts[move.srcBlockIndex];
+ const VmaBlockDefragmentationContext& dstBlockCtx = pDefragCtx->blockContexts[move.dstBlockIndex];
+
+ VMA_ASSERT(srcBlockCtx.hBuffer && dstBlockCtx.hBuffer);
+
+ VkBufferCopy region = {
+ move.srcOffset,
+ move.dstOffset,
+ move.size };
+ (*m_hAllocator->GetVulkanFunctions().vkCmdCopyBuffer)(
+ commandBuffer, srcBlockCtx.hBuffer, dstBlockCtx.hBuffer, 1, &region);
+ }
+ }
+
+ // Save buffers to defrag context for later destruction.
+ if(pDefragCtx->res == VK_SUCCESS && moveCount > 0)
+ {
+ pDefragCtx->res = VK_NOT_READY;
+ }
}
void VmaBlockVector::FreeEmptyBlocks(VmaDefragmentationStats* pDefragmentationStats)
{
- for(size_t blockIndex = m_Blocks.size(); blockIndex--; )
- {
- VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
- if(pBlock->m_pMetadata->IsEmpty())
- {
- if(m_Blocks.size() > m_MinBlockCount)
- {
- if(pDefragmentationStats != VMA_NULL)
- {
- ++pDefragmentationStats->deviceMemoryBlocksFreed;
- pDefragmentationStats->bytesFreed += pBlock->m_pMetadata->GetSize();
- }
-
- VmaVectorRemove(m_Blocks, blockIndex);
- pBlock->Destroy(m_hAllocator);
- vma_delete(m_hAllocator, pBlock);
- }
- else
- {
- break;
- }
- }
- }
- UpdateHasEmptyBlock();
+ for(size_t blockIndex = m_Blocks.size(); blockIndex--; )
+ {
+ VmaDeviceMemoryBlock* pBlock = m_Blocks[blockIndex];
+ if(pBlock->m_pMetadata->IsEmpty())
+ {
+ if(m_Blocks.size() > m_MinBlockCount)
+ {
+ if(pDefragmentationStats != VMA_NULL)
+ {
+ ++pDefragmentationStats->deviceMemoryBlocksFreed;
+ pDefragmentationStats->bytesFreed += pBlock->m_pMetadata->GetSize();
+ }
+
+ VmaVectorRemove(m_Blocks, blockIndex);
+ pBlock->Destroy(m_hAllocator);
+ vma_delete(m_hAllocator, pBlock);
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ UpdateHasEmptyBlock();
}
void VmaBlockVector::UpdateHasEmptyBlock()
{
- m_HasEmptyBlock = false;
- for(size_t index = 0, count = m_Blocks.size(); index < count; ++index)
- {
- VmaDeviceMemoryBlock* const pBlock = m_Blocks[index];
- if(pBlock->m_pMetadata->IsEmpty())
- {
- m_HasEmptyBlock = true;
- break;
- }
- }
+ m_HasEmptyBlock = false;
+ for(size_t index = 0, count = m_Blocks.size(); index < count; ++index)
+ {
+ VmaDeviceMemoryBlock* const pBlock = m_Blocks[index];
+ if(pBlock->m_pMetadata->IsEmpty())
+ {
+ m_HasEmptyBlock = true;
+ break;
+ }
+ }
}
#if VMA_STATS_STRING_ENABLED
void VmaBlockVector::PrintDetailedMap(class VmaJsonWriter& json)
{
- VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
-
- json.BeginObject();
-
- if(IsCustomPool())
- {
- const char* poolName = m_hParentPool->GetName();
- if(poolName != VMA_NULL && poolName[0] != '\0')
- {
- json.WriteString("Name");
- json.WriteString(poolName);
- }
-
- json.WriteString("MemoryTypeIndex");
- json.WriteNumber(m_MemoryTypeIndex);
-
- json.WriteString("BlockSize");
- json.WriteNumber(m_PreferredBlockSize);
-
- json.WriteString("BlockCount");
- json.BeginObject(true);
- if(m_MinBlockCount > 0)
- {
- json.WriteString("Min");
- json.WriteNumber((uint64_t)m_MinBlockCount);
- }
- if(m_MaxBlockCount < SIZE_MAX)
- {
- json.WriteString("Max");
- json.WriteNumber((uint64_t)m_MaxBlockCount);
- }
- json.WriteString("Cur");
- json.WriteNumber((uint64_t)m_Blocks.size());
- json.EndObject();
-
- if(m_FrameInUseCount > 0)
- {
- json.WriteString("FrameInUseCount");
- json.WriteNumber(m_FrameInUseCount);
- }
-
- if(m_Algorithm != 0)
- {
- json.WriteString("Algorithm");
- json.WriteString(VmaAlgorithmToStr(m_Algorithm));
- }
- }
- else
- {
- json.WriteString("PreferredBlockSize");
- json.WriteNumber(m_PreferredBlockSize);
- }
-
- json.WriteString("Blocks");
- json.BeginObject();
- for(size_t i = 0; i < m_Blocks.size(); ++i)
- {
- json.BeginString();
- json.ContinueString(m_Blocks[i]->GetId());
- json.EndString();
-
- m_Blocks[i]->m_pMetadata->PrintDetailedMap(json);
- }
- json.EndObject();
-
- json.EndObject();
+ VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
+
+ json.BeginObject();
+
+ if(IsCustomPool())
+ {
+ const char* poolName = m_hParentPool->GetName();
+ if(poolName != VMA_NULL && poolName[0] != '\0')
+ {
+ json.WriteString("Name");
+ json.WriteString(poolName);
+ }
+
+ json.WriteString("MemoryTypeIndex");
+ json.WriteNumber(m_MemoryTypeIndex);
+
+ json.WriteString("BlockSize");
+ json.WriteNumber(m_PreferredBlockSize);
+
+ json.WriteString("BlockCount");
+ json.BeginObject(true);
+ if(m_MinBlockCount > 0)
+ {
+ json.WriteString("Min");
+ json.WriteNumber((uint64_t)m_MinBlockCount);
+ }
+ if(m_MaxBlockCount < SIZE_MAX)
+ {
+ json.WriteString("Max");
+ json.WriteNumber((uint64_t)m_MaxBlockCount);
+ }
+ json.WriteString("Cur");
+ json.WriteNumber((uint64_t)m_Blocks.size());
+ json.EndObject();
+
+ if(m_FrameInUseCount > 0)
+ {
+ json.WriteString("FrameInUseCount");
+ json.WriteNumber(m_FrameInUseCount);
+ }
+
+ if(m_Algorithm != 0)
+ {
+ json.WriteString("Algorithm");
+ json.WriteString(VmaAlgorithmToStr(m_Algorithm));
+ }
+ }
+ else
+ {
+ json.WriteString("PreferredBlockSize");
+ json.WriteNumber(m_PreferredBlockSize);
+ }
+
+ json.WriteString("Blocks");
+ json.BeginObject();
+ for(size_t i = 0; i < m_Blocks.size(); ++i)
+ {
+ json.BeginString();
+ json.ContinueString(m_Blocks[i]->GetId());
+ json.EndString();
+
+ m_Blocks[i]->m_pMetadata->PrintDetailedMap(json);
+ }
+ json.EndObject();
+
+ json.EndObject();
}
#endif // #if VMA_STATS_STRING_ENABLED
void VmaBlockVector::Defragment(
- class VmaBlockVectorDefragmentationContext* pCtx,
- VmaDefragmentationStats* pStats, VmaDefragmentationFlags flags,
- VkDeviceSize& maxCpuBytesToMove, uint32_t& maxCpuAllocationsToMove,
- VkDeviceSize& maxGpuBytesToMove, uint32_t& maxGpuAllocationsToMove,
- VkCommandBuffer commandBuffer)
-{
- pCtx->res = VK_SUCCESS;
-
- const VkMemoryPropertyFlags memPropFlags =
- m_hAllocator->m_MemProps.memoryTypes[m_MemoryTypeIndex].propertyFlags;
- const bool isHostVisible = (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0;
-
- const bool canDefragmentOnCpu = maxCpuBytesToMove > 0 && maxCpuAllocationsToMove > 0 &&
- isHostVisible;
- const bool canDefragmentOnGpu = maxGpuBytesToMove > 0 && maxGpuAllocationsToMove > 0 &&
- !IsCorruptionDetectionEnabled() &&
- ((1u << m_MemoryTypeIndex) & m_hAllocator->GetGpuDefragmentationMemoryTypeBits()) != 0;
-
- // There are options to defragment this memory type.
- if(canDefragmentOnCpu || canDefragmentOnGpu)
- {
- bool defragmentOnGpu;
- // There is only one option to defragment this memory type.
- if(canDefragmentOnGpu != canDefragmentOnCpu)
- {
- defragmentOnGpu = canDefragmentOnGpu;
- }
- // Both options are available: Heuristics to choose the best one.
- else
- {
- defragmentOnGpu = (memPropFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0 ||
- m_hAllocator->IsIntegratedGpu();
- }
-
- bool overlappingMoveSupported = !defragmentOnGpu;
-
- if(m_hAllocator->m_UseMutex)
- {
- if(flags & VMA_DEFRAGMENTATION_FLAG_INCREMENTAL)
- {
- if(!m_Mutex.TryLockWrite())
- {
- pCtx->res = VK_ERROR_INITIALIZATION_FAILED;
- return;
- }
- }
- else
- {
- m_Mutex.LockWrite();
- pCtx->mutexLocked = true;
- }
- }
-
- pCtx->Begin(overlappingMoveSupported, flags);
-
- // Defragment.
-
- const VkDeviceSize maxBytesToMove = defragmentOnGpu ? maxGpuBytesToMove : maxCpuBytesToMove;
- const uint32_t maxAllocationsToMove = defragmentOnGpu ? maxGpuAllocationsToMove : maxCpuAllocationsToMove;
- pCtx->res = pCtx->GetAlgorithm()->Defragment(pCtx->defragmentationMoves, maxBytesToMove, maxAllocationsToMove, flags);
-
- // Accumulate statistics.
- if(pStats != VMA_NULL)
- {
- const VkDeviceSize bytesMoved = pCtx->GetAlgorithm()->GetBytesMoved();
- const uint32_t allocationsMoved = pCtx->GetAlgorithm()->GetAllocationsMoved();
- pStats->bytesMoved += bytesMoved;
- pStats->allocationsMoved += allocationsMoved;
- VMA_ASSERT(bytesMoved <= maxBytesToMove);
- VMA_ASSERT(allocationsMoved <= maxAllocationsToMove);
- if(defragmentOnGpu)
- {
- maxGpuBytesToMove -= bytesMoved;
- maxGpuAllocationsToMove -= allocationsMoved;
- }
- else
- {
- maxCpuBytesToMove -= bytesMoved;
- maxCpuAllocationsToMove -= allocationsMoved;
- }
- }
-
- if(flags & VMA_DEFRAGMENTATION_FLAG_INCREMENTAL)
- {
- if(m_hAllocator->m_UseMutex)
- m_Mutex.UnlockWrite();
-
- if(pCtx->res >= VK_SUCCESS && !pCtx->defragmentationMoves.empty())
- pCtx->res = VK_NOT_READY;
-
- return;
- }
-
- if(pCtx->res >= VK_SUCCESS)
- {
- if(defragmentOnGpu)
- {
- ApplyDefragmentationMovesGpu(pCtx, pCtx->defragmentationMoves, commandBuffer);
- }
- else
- {
- ApplyDefragmentationMovesCpu(pCtx, pCtx->defragmentationMoves);
- }
- }
- }
+ class VmaBlockVectorDefragmentationContext* pCtx,
+ VmaDefragmentationStats* pStats,
+ VkDeviceSize& maxCpuBytesToMove, uint32_t& maxCpuAllocationsToMove,
+ VkDeviceSize& maxGpuBytesToMove, uint32_t& maxGpuAllocationsToMove,
+ VkCommandBuffer commandBuffer)
+{
+ pCtx->res = VK_SUCCESS;
+
+ const VkMemoryPropertyFlags memPropFlags =
+ m_hAllocator->m_MemProps.memoryTypes[m_MemoryTypeIndex].propertyFlags;
+ const bool isHostVisible = (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0;
+
+ const bool canDefragmentOnCpu = maxCpuBytesToMove > 0 && maxCpuAllocationsToMove > 0 &&
+ isHostVisible;
+ const bool canDefragmentOnGpu = maxGpuBytesToMove > 0 && maxGpuAllocationsToMove > 0 &&
+ !IsCorruptionDetectionEnabled() &&
+ ((1u << m_MemoryTypeIndex) & m_hAllocator->GetGpuDefragmentationMemoryTypeBits()) != 0;
+
+ // There are options to defragment this memory type.
+ if(canDefragmentOnCpu || canDefragmentOnGpu)
+ {
+ bool defragmentOnGpu;
+ // There is only one option to defragment this memory type.
+ if(canDefragmentOnGpu != canDefragmentOnCpu)
+ {
+ defragmentOnGpu = canDefragmentOnGpu;
+ }
+ // Both options are available: Heuristics to choose the best one.
+ else
+ {
+ defragmentOnGpu = (memPropFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0 ||
+ m_hAllocator->IsIntegratedGpu();
+ }
+
+ bool overlappingMoveSupported = !defragmentOnGpu;
+
+ if(m_hAllocator->m_UseMutex)
+ {
+ m_Mutex.LockWrite();
+ pCtx->mutexLocked = true;
+ }
+
+ pCtx->Begin(overlappingMoveSupported);
+
+ // Defragment.
+
+ const VkDeviceSize maxBytesToMove = defragmentOnGpu ? maxGpuBytesToMove : maxCpuBytesToMove;
+ const uint32_t maxAllocationsToMove = defragmentOnGpu ? maxGpuAllocationsToMove : maxCpuAllocationsToMove;
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> > moves =
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >(VmaStlAllocator<VmaDefragmentationMove>(m_hAllocator->GetAllocationCallbacks()));
+ pCtx->res = pCtx->GetAlgorithm()->Defragment(moves, maxBytesToMove, maxAllocationsToMove);
+
+ // Accumulate statistics.
+ if(pStats != VMA_NULL)
+ {
+ const VkDeviceSize bytesMoved = pCtx->GetAlgorithm()->GetBytesMoved();
+ const uint32_t allocationsMoved = pCtx->GetAlgorithm()->GetAllocationsMoved();
+ pStats->bytesMoved += bytesMoved;
+ pStats->allocationsMoved += allocationsMoved;
+ VMA_ASSERT(bytesMoved <= maxBytesToMove);
+ VMA_ASSERT(allocationsMoved <= maxAllocationsToMove);
+ if(defragmentOnGpu)
+ {
+ maxGpuBytesToMove -= bytesMoved;
+ maxGpuAllocationsToMove -= allocationsMoved;
+ }
+ else
+ {
+ maxCpuBytesToMove -= bytesMoved;
+ maxCpuAllocationsToMove -= allocationsMoved;
+ }
+ }
+
+ if(pCtx->res >= VK_SUCCESS)
+ {
+ if(defragmentOnGpu)
+ {
+ ApplyDefragmentationMovesGpu(pCtx, moves, commandBuffer);
+ }
+ else
+ {
+ ApplyDefragmentationMovesCpu(pCtx, moves);
+ }
+ }
+ }
}
void VmaBlockVector::DefragmentationEnd(
- class VmaBlockVectorDefragmentationContext* pCtx,
- VmaDefragmentationStats* pStats)
-{
- // Destroy buffers.
- for(size_t blockIndex = pCtx->blockContexts.size(); blockIndex--; )
- {
- VmaBlockDefragmentationContext& blockCtx = pCtx->blockContexts[blockIndex];
- if(blockCtx.hBuffer)
- {
- (*m_hAllocator->GetVulkanFunctions().vkDestroyBuffer)(
- m_hAllocator->m_hDevice, blockCtx.hBuffer, m_hAllocator->GetAllocationCallbacks());
- }
- }
-
- if(pCtx->res >= VK_SUCCESS)
- {
- FreeEmptyBlocks(pStats);
- }
-
- if(pCtx->mutexLocked)
- {
- VMA_ASSERT(m_hAllocator->m_UseMutex);
- m_Mutex.UnlockWrite();
- }
-}
-
-uint32_t VmaBlockVector::ProcessDefragmentations(
- class VmaBlockVectorDefragmentationContext *pCtx,
- VmaDefragmentationPassMoveInfo* pMove, uint32_t maxMoves)
-{
- VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
-
- const uint32_t moveCount = std::min(uint32_t(pCtx->defragmentationMoves.size()) - pCtx->defragmentationMovesProcessed, maxMoves);
-
- for(uint32_t i = 0; i < moveCount; ++ i)
- {
- VmaDefragmentationMove& move = pCtx->defragmentationMoves[pCtx->defragmentationMovesProcessed + i];
-
- pMove->allocation = move.hAllocation;
- pMove->memory = move.pDstBlock->GetDeviceMemory();
- pMove->offset = move.dstOffset;
-
- ++ pMove;
- }
-
- pCtx->defragmentationMovesProcessed += moveCount;
-
- return moveCount;
-}
-
-void VmaBlockVector::CommitDefragmentations(
- class VmaBlockVectorDefragmentationContext *pCtx,
- VmaDefragmentationStats* pStats)
-{
- VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
-
- for(uint32_t i = pCtx->defragmentationMovesCommitted; i < pCtx->defragmentationMovesProcessed; ++ i)
- {
- const VmaDefragmentationMove &move = pCtx->defragmentationMoves[i];
-
- move.pSrcBlock->m_pMetadata->FreeAtOffset(move.srcOffset);
- move.hAllocation->ChangeBlockAllocation(m_hAllocator, move.pDstBlock, move.dstOffset);
- }
-
- pCtx->defragmentationMovesCommitted = pCtx->defragmentationMovesProcessed;
- FreeEmptyBlocks(pStats);
+ class VmaBlockVectorDefragmentationContext* pCtx,
+ VmaDefragmentationStats* pStats)
+{
+ // Destroy buffers.
+ for(size_t blockIndex = pCtx->blockContexts.size(); blockIndex--; )
+ {
+ VmaBlockDefragmentationContext& blockCtx = pCtx->blockContexts[blockIndex];
+ if(blockCtx.hBuffer)
+ {
+ (*m_hAllocator->GetVulkanFunctions().vkDestroyBuffer)(
+ m_hAllocator->m_hDevice, blockCtx.hBuffer, m_hAllocator->GetAllocationCallbacks());
+ }
+ }
+
+ if(pCtx->res >= VK_SUCCESS)
+ {
+ FreeEmptyBlocks(pStats);
+ }
+
+ if(pCtx->mutexLocked)
+ {
+ VMA_ASSERT(m_hAllocator->m_UseMutex);
+ m_Mutex.UnlockWrite();
+ }
}
size_t VmaBlockVector::CalcAllocationCount() const
{
- size_t result = 0;
- for(size_t i = 0; i < m_Blocks.size(); ++i)
- {
- result += m_Blocks[i]->m_pMetadata->GetAllocationCount();
- }
- return result;
+ size_t result = 0;
+ for(size_t i = 0; i < m_Blocks.size(); ++i)
+ {
+ result += m_Blocks[i]->m_pMetadata->GetAllocationCount();
+ }
+ return result;
}
bool VmaBlockVector::IsBufferImageGranularityConflictPossible() const
{
- if(m_BufferImageGranularity == 1)
- {
- return false;
- }
- VmaSuballocationType lastSuballocType = VMA_SUBALLOCATION_TYPE_FREE;
- for(size_t i = 0, count = m_Blocks.size(); i < count; ++i)
- {
- VmaDeviceMemoryBlock* const pBlock = m_Blocks[i];
- VMA_ASSERT(m_Algorithm == 0);
- VmaBlockMetadata_Generic* const pMetadata = (VmaBlockMetadata_Generic*)pBlock->m_pMetadata;
- if(pMetadata->IsBufferImageGranularityConflictPossible(m_BufferImageGranularity, lastSuballocType))
- {
- return true;
- }
- }
- return false;
+ if(m_BufferImageGranularity == 1)
+ {
+ return false;
+ }
+ VmaSuballocationType lastSuballocType = VMA_SUBALLOCATION_TYPE_FREE;
+ for(size_t i = 0, count = m_Blocks.size(); i < count; ++i)
+ {
+ VmaDeviceMemoryBlock* const pBlock = m_Blocks[i];
+ VMA_ASSERT(m_Algorithm == 0);
+ VmaBlockMetadata_Generic* const pMetadata = (VmaBlockMetadata_Generic*)pBlock->m_pMetadata;
+ if(pMetadata->IsBufferImageGranularityConflictPossible(m_BufferImageGranularity, lastSuballocType))
+ {
+ return true;
+ }
+ }
+ return false;
}
void VmaBlockVector::MakePoolAllocationsLost(
- uint32_t currentFrameIndex,
- size_t* pLostAllocationCount)
-{
- VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
- size_t lostAllocationCount = 0;
- for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
- {
- VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
- VMA_ASSERT(pBlock);
- lostAllocationCount += pBlock->m_pMetadata->MakeAllocationsLost(currentFrameIndex, m_FrameInUseCount);
- }
- if(pLostAllocationCount != VMA_NULL)
- {
- *pLostAllocationCount = lostAllocationCount;
- }
+ uint32_t currentFrameIndex,
+ size_t* pLostAllocationCount)
+{
+ VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex);
+ size_t lostAllocationCount = 0;
+ for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
+ {
+ VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
+ VMA_ASSERT(pBlock);
+ lostAllocationCount += pBlock->m_pMetadata->MakeAllocationsLost(currentFrameIndex, m_FrameInUseCount);
+ }
+ if(pLostAllocationCount != VMA_NULL)
+ {
+ *pLostAllocationCount = lostAllocationCount;
+ }
}
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;
+ 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;
}
void VmaBlockVector::AddStats(VmaStats* pStats)
{
- const uint32_t memTypeIndex = m_MemoryTypeIndex;
- const uint32_t memHeapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(memTypeIndex);
+ const uint32_t memTypeIndex = m_MemoryTypeIndex;
+ const uint32_t memHeapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(memTypeIndex);
- VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
+ VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
- for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
- {
- const VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
- VMA_ASSERT(pBlock);
- VMA_HEAVY_ASSERT(pBlock->Validate());
- VmaStatInfo allocationStatInfo;
- pBlock->m_pMetadata->CalcAllocationStatInfo(allocationStatInfo);
- VmaAddStatInfo(pStats->total, allocationStatInfo);
- VmaAddStatInfo(pStats->memoryType[memTypeIndex], allocationStatInfo);
- VmaAddStatInfo(pStats->memoryHeap[memHeapIndex], allocationStatInfo);
- }
+ for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
+ {
+ const VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
+ VMA_ASSERT(pBlock);
+ VMA_HEAVY_ASSERT(pBlock->Validate());
+ VmaStatInfo allocationStatInfo;
+ pBlock->m_pMetadata->CalcAllocationStatInfo(allocationStatInfo);
+ VmaAddStatInfo(pStats->total, allocationStatInfo);
+ VmaAddStatInfo(pStats->memoryType[memTypeIndex], allocationStatInfo);
+ VmaAddStatInfo(pStats->memoryHeap[memHeapIndex], allocationStatInfo);
+ }
}
////////////////////////////////////////////////////////////////////////////////
// VmaDefragmentationAlgorithm_Generic members definition
VmaDefragmentationAlgorithm_Generic::VmaDefragmentationAlgorithm_Generic(
- VmaAllocator hAllocator,
- VmaBlockVector* pBlockVector,
- uint32_t currentFrameIndex,
- bool overlappingMoveSupported) :
- VmaDefragmentationAlgorithm(hAllocator, pBlockVector, currentFrameIndex),
- m_AllocationCount(0),
- m_AllAllocations(false),
- m_BytesMoved(0),
- m_AllocationsMoved(0),
- m_Blocks(VmaStlAllocator<BlockInfo*>(hAllocator->GetAllocationCallbacks()))
-{
- // Create block info for each block.
- const size_t blockCount = m_pBlockVector->m_Blocks.size();
- for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
- {
- BlockInfo* pBlockInfo = vma_new(m_hAllocator, BlockInfo)(m_hAllocator->GetAllocationCallbacks());
- pBlockInfo->m_OriginalBlockIndex = blockIndex;
- pBlockInfo->m_pBlock = m_pBlockVector->m_Blocks[blockIndex];
- m_Blocks.push_back(pBlockInfo);
- }
-
- // Sort them by m_pBlock pointer value.
- VMA_SORT(m_Blocks.begin(), m_Blocks.end(), BlockPointerLess());
+ VmaAllocator hAllocator,
+ VmaBlockVector* pBlockVector,
+ uint32_t currentFrameIndex,
+ bool overlappingMoveSupported) :
+ VmaDefragmentationAlgorithm(hAllocator, pBlockVector, currentFrameIndex),
+ m_AllocationCount(0),
+ m_AllAllocations(false),
+ m_BytesMoved(0),
+ m_AllocationsMoved(0),
+ m_Blocks(VmaStlAllocator<BlockInfo*>(hAllocator->GetAllocationCallbacks()))
+{
+ // Create block info for each block.
+ const size_t blockCount = m_pBlockVector->m_Blocks.size();
+ for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
+ {
+ BlockInfo* pBlockInfo = vma_new(m_hAllocator, BlockInfo)(m_hAllocator->GetAllocationCallbacks());
+ pBlockInfo->m_OriginalBlockIndex = blockIndex;
+ pBlockInfo->m_pBlock = m_pBlockVector->m_Blocks[blockIndex];
+ m_Blocks.push_back(pBlockInfo);
+ }
+
+ // Sort them by m_pBlock pointer value.
+ VMA_SORT(m_Blocks.begin(), m_Blocks.end(), BlockPointerLess());
}
VmaDefragmentationAlgorithm_Generic::~VmaDefragmentationAlgorithm_Generic()
{
- for(size_t i = m_Blocks.size(); i--; )
- {
- vma_delete(m_hAllocator, m_Blocks[i]);
- }
+ for(size_t i = m_Blocks.size(); i--; )
+ {
+ vma_delete(m_hAllocator, m_Blocks[i]);
+ }
}
void VmaDefragmentationAlgorithm_Generic::AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged)
{
- // Now as we are inside VmaBlockVector::m_Mutex, we can make final check if this allocation was not lost.
- if(hAlloc->GetLastUseFrameIndex() != VMA_FRAME_INDEX_LOST)
- {
- VmaDeviceMemoryBlock* pBlock = hAlloc->GetBlock();
- BlockInfoVector::iterator it = VmaBinaryFindFirstNotLess(m_Blocks.begin(), m_Blocks.end(), pBlock, BlockPointerLess());
- if(it != m_Blocks.end() && (*it)->m_pBlock == pBlock)
- {
- AllocationInfo allocInfo = AllocationInfo(hAlloc, pChanged);
- (*it)->m_Allocations.push_back(allocInfo);
- }
- else
- {
- VMA_ASSERT(0);
- }
-
- ++m_AllocationCount;
- }
+ // Now as we are inside VmaBlockVector::m_Mutex, we can make final check if this allocation was not lost.
+ if(hAlloc->GetLastUseFrameIndex() != VMA_FRAME_INDEX_LOST)
+ {
+ VmaDeviceMemoryBlock* pBlock = hAlloc->GetBlock();
+ BlockInfoVector::iterator it = VmaBinaryFindFirstNotLess(m_Blocks.begin(), m_Blocks.end(), pBlock, BlockPointerLess());
+ if(it != m_Blocks.end() && (*it)->m_pBlock == pBlock)
+ {
+ AllocationInfo allocInfo = AllocationInfo(hAlloc, pChanged);
+ (*it)->m_Allocations.push_back(allocInfo);
+ }
+ else
+ {
+ VMA_ASSERT(0);
+ }
+
+ ++m_AllocationCount;
+ }
}
VkResult VmaDefragmentationAlgorithm_Generic::DefragmentRound(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- bool freeOldAllocations)
-{
- if(m_Blocks.empty())
- {
- return VK_SUCCESS;
- }
-
- // This is a choice based on research.
- // Option 1:
- uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT;
- // Option 2:
- //uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT;
- // Option 3:
- //uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT;
-
- size_t srcBlockMinIndex = 0;
- // When FAST_ALGORITHM, move allocations from only last out of blocks that contain non-movable allocations.
- /*
- if(m_AlgorithmFlags & VMA_DEFRAGMENTATION_FAST_ALGORITHM_BIT)
- {
- const size_t blocksWithNonMovableCount = CalcBlocksWithNonMovableCount();
- if(blocksWithNonMovableCount > 0)
- {
- srcBlockMinIndex = blocksWithNonMovableCount - 1;
- }
- }
- */
-
- size_t srcBlockIndex = m_Blocks.size() - 1;
- size_t srcAllocIndex = SIZE_MAX;
- for(;;)
- {
- // 1. Find next allocation to move.
- // 1.1. Start from last to first m_Blocks - they are sorted from most "destination" to most "source".
- // 1.2. Then start from last to first m_Allocations.
- while(srcAllocIndex >= m_Blocks[srcBlockIndex]->m_Allocations.size())
- {
- if(m_Blocks[srcBlockIndex]->m_Allocations.empty())
- {
- // Finished: no more allocations to process.
- if(srcBlockIndex == srcBlockMinIndex)
- {
- return VK_SUCCESS;
- }
- else
- {
- --srcBlockIndex;
- srcAllocIndex = SIZE_MAX;
- }
- }
- else
- {
- srcAllocIndex = m_Blocks[srcBlockIndex]->m_Allocations.size() - 1;
- }
- }
-
- BlockInfo* pSrcBlockInfo = m_Blocks[srcBlockIndex];
- AllocationInfo& allocInfo = pSrcBlockInfo->m_Allocations[srcAllocIndex];
-
- const VkDeviceSize size = allocInfo.m_hAllocation->GetSize();
- const VkDeviceSize srcOffset = allocInfo.m_hAllocation->GetOffset();
- const VkDeviceSize alignment = allocInfo.m_hAllocation->GetAlignment();
- const VmaSuballocationType suballocType = allocInfo.m_hAllocation->GetSuballocationType();
-
- // 2. Try to find new place for this allocation in preceding or current block.
- for(size_t dstBlockIndex = 0; dstBlockIndex <= srcBlockIndex; ++dstBlockIndex)
- {
- BlockInfo* pDstBlockInfo = m_Blocks[dstBlockIndex];
- VmaAllocationRequest dstAllocRequest;
- if(pDstBlockInfo->m_pBlock->m_pMetadata->CreateAllocationRequest(
- m_CurrentFrameIndex,
- m_pBlockVector->GetFrameInUseCount(),
- m_pBlockVector->GetBufferImageGranularity(),
- size,
- alignment,
- false, // upperAddress
- suballocType,
- false, // canMakeOtherLost
- strategy,
- &dstAllocRequest) &&
- MoveMakesSense(
- dstBlockIndex, dstAllocRequest.offset, srcBlockIndex, srcOffset))
- {
- VMA_ASSERT(dstAllocRequest.itemsToMakeLostCount == 0);
-
- // Reached limit on number of allocations or bytes to move.
- if((m_AllocationsMoved + 1 > maxAllocationsToMove) ||
- (m_BytesMoved + size > maxBytesToMove))
- {
- return VK_SUCCESS;
- }
-
- VmaDefragmentationMove move = {};
- move.srcBlockIndex = pSrcBlockInfo->m_OriginalBlockIndex;
- move.dstBlockIndex = pDstBlockInfo->m_OriginalBlockIndex;
- move.srcOffset = srcOffset;
- move.dstOffset = dstAllocRequest.offset;
- move.size = size;
- move.hAllocation = allocInfo.m_hAllocation;
- move.pSrcBlock = pSrcBlockInfo->m_pBlock;
- move.pDstBlock = pDstBlockInfo->m_pBlock;
-
- moves.push_back(move);
-
- pDstBlockInfo->m_pBlock->m_pMetadata->Alloc(
- dstAllocRequest,
- suballocType,
- size,
- allocInfo.m_hAllocation);
-
- if(freeOldAllocations)
- {
- pSrcBlockInfo->m_pBlock->m_pMetadata->FreeAtOffset(srcOffset);
- allocInfo.m_hAllocation->ChangeBlockAllocation(m_hAllocator, pDstBlockInfo->m_pBlock, dstAllocRequest.offset);
- }
-
- if(allocInfo.m_pChanged != VMA_NULL)
- {
- *allocInfo.m_pChanged = VK_TRUE;
- }
-
- ++m_AllocationsMoved;
- m_BytesMoved += size;
-
- VmaVectorRemove(pSrcBlockInfo->m_Allocations, srcAllocIndex);
-
- break;
- }
- }
-
- // If not processed, this allocInfo remains in pBlockInfo->m_Allocations for next round.
-
- if(srcAllocIndex > 0)
- {
- --srcAllocIndex;
- }
- else
- {
- if(srcBlockIndex > 0)
- {
- --srcBlockIndex;
- srcAllocIndex = SIZE_MAX;
- }
- else
- {
- return VK_SUCCESS;
- }
- }
- }
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove)
+{
+ if(m_Blocks.empty())
+ {
+ return VK_SUCCESS;
+ }
+
+ // This is a choice based on research.
+ // Option 1:
+ uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT;
+ // Option 2:
+ //uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT;
+ // Option 3:
+ //uint32_t strategy = VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT;
+
+ size_t srcBlockMinIndex = 0;
+ // When FAST_ALGORITHM, move allocations from only last out of blocks that contain non-movable allocations.
+ /*
+ if(m_AlgorithmFlags & VMA_DEFRAGMENTATION_FAST_ALGORITHM_BIT)
+ {
+ const size_t blocksWithNonMovableCount = CalcBlocksWithNonMovableCount();
+ if(blocksWithNonMovableCount > 0)
+ {
+ srcBlockMinIndex = blocksWithNonMovableCount - 1;
+ }
+ }
+ */
+
+ size_t srcBlockIndex = m_Blocks.size() - 1;
+ size_t srcAllocIndex = SIZE_MAX;
+ for(;;)
+ {
+ // 1. Find next allocation to move.
+ // 1.1. Start from last to first m_Blocks - they are sorted from most "destination" to most "source".
+ // 1.2. Then start from last to first m_Allocations.
+ while(srcAllocIndex >= m_Blocks[srcBlockIndex]->m_Allocations.size())
+ {
+ if(m_Blocks[srcBlockIndex]->m_Allocations.empty())
+ {
+ // Finished: no more allocations to process.
+ if(srcBlockIndex == srcBlockMinIndex)
+ {
+ return VK_SUCCESS;
+ }
+ else
+ {
+ --srcBlockIndex;
+ srcAllocIndex = SIZE_MAX;
+ }
+ }
+ else
+ {
+ srcAllocIndex = m_Blocks[srcBlockIndex]->m_Allocations.size() - 1;
+ }
+ }
+
+ BlockInfo* pSrcBlockInfo = m_Blocks[srcBlockIndex];
+ AllocationInfo& allocInfo = pSrcBlockInfo->m_Allocations[srcAllocIndex];
+
+ const VkDeviceSize size = allocInfo.m_hAllocation->GetSize();
+ const VkDeviceSize srcOffset = allocInfo.m_hAllocation->GetOffset();
+ const VkDeviceSize alignment = allocInfo.m_hAllocation->GetAlignment();
+ const VmaSuballocationType suballocType = allocInfo.m_hAllocation->GetSuballocationType();
+
+ // 2. Try to find new place for this allocation in preceding or current block.
+ for(size_t dstBlockIndex = 0; dstBlockIndex <= srcBlockIndex; ++dstBlockIndex)
+ {
+ BlockInfo* pDstBlockInfo = m_Blocks[dstBlockIndex];
+ VmaAllocationRequest dstAllocRequest;
+ if(pDstBlockInfo->m_pBlock->m_pMetadata->CreateAllocationRequest(
+ m_CurrentFrameIndex,
+ m_pBlockVector->GetFrameInUseCount(),
+ m_pBlockVector->GetBufferImageGranularity(),
+ size,
+ alignment,
+ false, // upperAddress
+ suballocType,
+ false, // canMakeOtherLost
+ strategy,
+ &dstAllocRequest) &&
+ MoveMakesSense(
+ dstBlockIndex, dstAllocRequest.offset, srcBlockIndex, srcOffset))
+ {
+ VMA_ASSERT(dstAllocRequest.itemsToMakeLostCount == 0);
+
+ // Reached limit on number of allocations or bytes to move.
+ if((m_AllocationsMoved + 1 > maxAllocationsToMove) ||
+ (m_BytesMoved + size > maxBytesToMove))
+ {
+ return VK_SUCCESS;
+ }
+
+ VmaDefragmentationMove move;
+ move.srcBlockIndex = pSrcBlockInfo->m_OriginalBlockIndex;
+ move.dstBlockIndex = pDstBlockInfo->m_OriginalBlockIndex;
+ move.srcOffset = srcOffset;
+ move.dstOffset = dstAllocRequest.offset;
+ move.size = size;
+ moves.push_back(move);
+
+ pDstBlockInfo->m_pBlock->m_pMetadata->Alloc(
+ dstAllocRequest,
+ suballocType,
+ size,
+ allocInfo.m_hAllocation);
+ pSrcBlockInfo->m_pBlock->m_pMetadata->FreeAtOffset(srcOffset);
+
+ allocInfo.m_hAllocation->ChangeBlockAllocation(m_hAllocator, pDstBlockInfo->m_pBlock, dstAllocRequest.offset);
+
+ if(allocInfo.m_pChanged != VMA_NULL)
+ {
+ *allocInfo.m_pChanged = VK_TRUE;
+ }
+
+ ++m_AllocationsMoved;
+ m_BytesMoved += size;
+
+ VmaVectorRemove(pSrcBlockInfo->m_Allocations, srcAllocIndex);
+
+ break;
+ }
+ }
+
+ // If not processed, this allocInfo remains in pBlockInfo->m_Allocations for next round.
+
+ if(srcAllocIndex > 0)
+ {
+ --srcAllocIndex;
+ }
+ else
+ {
+ if(srcBlockIndex > 0)
+ {
+ --srcBlockIndex;
+ srcAllocIndex = SIZE_MAX;
+ }
+ else
+ {
+ return VK_SUCCESS;
+ }
+ }
+ }
}
size_t VmaDefragmentationAlgorithm_Generic::CalcBlocksWithNonMovableCount() const
{
- size_t result = 0;
- for(size_t i = 0; i < m_Blocks.size(); ++i)
- {
- if(m_Blocks[i]->m_HasNonMovableAllocations)
- {
- ++result;
- }
- }
- return result;
+ size_t result = 0;
+ for(size_t i = 0; i < m_Blocks.size(); ++i)
+ {
+ if(m_Blocks[i]->m_HasNonMovableAllocations)
+ {
+ ++result;
+ }
+ }
+ return result;
}
VkResult VmaDefragmentationAlgorithm_Generic::Defragment(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- VmaDefragmentationFlags flags)
-{
- if(!m_AllAllocations && m_AllocationCount == 0)
- {
- return VK_SUCCESS;
- }
-
- const size_t blockCount = m_Blocks.size();
- for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
- {
- BlockInfo* pBlockInfo = m_Blocks[blockIndex];
-
- if(m_AllAllocations)
- {
- VmaBlockMetadata_Generic* pMetadata = (VmaBlockMetadata_Generic*)pBlockInfo->m_pBlock->m_pMetadata;
- for(VmaSuballocationList::const_iterator it = pMetadata->m_Suballocations.begin();
- it != pMetadata->m_Suballocations.end();
- ++it)
- {
- if(it->type != VMA_SUBALLOCATION_TYPE_FREE)
- {
- AllocationInfo allocInfo = AllocationInfo(it->hAllocation, VMA_NULL);
- pBlockInfo->m_Allocations.push_back(allocInfo);
- }
- }
- }
-
- pBlockInfo->CalcHasNonMovableAllocations();
-
- // This is a choice based on research.
- // Option 1:
- pBlockInfo->SortAllocationsByOffsetDescending();
- // Option 2:
- //pBlockInfo->SortAllocationsBySizeDescending();
- }
-
- // Sort m_Blocks this time by the main criterium, from most "destination" to most "source" blocks.
- VMA_SORT(m_Blocks.begin(), m_Blocks.end(), BlockInfoCompareMoveDestination());
-
- // This is a choice based on research.
- const uint32_t roundCount = 2;
-
- // Execute defragmentation rounds (the main part).
- VkResult result = VK_SUCCESS;
- for(uint32_t round = 0; (round < roundCount) && (result == VK_SUCCESS); ++round)
- {
- result = DefragmentRound(moves, maxBytesToMove, maxAllocationsToMove, !(flags & VMA_DEFRAGMENTATION_FLAG_INCREMENTAL));
- }
-
- return result;
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove)
+{
+ if(!m_AllAllocations && m_AllocationCount == 0)
+ {
+ return VK_SUCCESS;
+ }
+
+ const size_t blockCount = m_Blocks.size();
+ for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
+ {
+ BlockInfo* pBlockInfo = m_Blocks[blockIndex];
+
+ if(m_AllAllocations)
+ {
+ VmaBlockMetadata_Generic* pMetadata = (VmaBlockMetadata_Generic*)pBlockInfo->m_pBlock->m_pMetadata;
+ for(VmaSuballocationList::const_iterator it = pMetadata->m_Suballocations.begin();
+ it != pMetadata->m_Suballocations.end();
+ ++it)
+ {
+ if(it->type != VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ AllocationInfo allocInfo = AllocationInfo(it->hAllocation, VMA_NULL);
+ pBlockInfo->m_Allocations.push_back(allocInfo);
+ }
+ }
+ }
+
+ pBlockInfo->CalcHasNonMovableAllocations();
+
+ // This is a choice based on research.
+ // Option 1:
+ pBlockInfo->SortAllocationsByOffsetDescending();
+ // Option 2:
+ //pBlockInfo->SortAllocationsBySizeDescending();
+ }
+
+ // Sort m_Blocks this time by the main criterium, from most "destination" to most "source" blocks.
+ VMA_SORT(m_Blocks.begin(), m_Blocks.end(), BlockInfoCompareMoveDestination());
+
+ // This is a choice based on research.
+ const uint32_t roundCount = 2;
+
+ // Execute defragmentation rounds (the main part).
+ VkResult result = VK_SUCCESS;
+ for(uint32_t round = 0; (round < roundCount) && (result == VK_SUCCESS); ++round)
+ {
+ result = DefragmentRound(moves, maxBytesToMove, maxAllocationsToMove);
+ }
+
+ return result;
}
bool VmaDefragmentationAlgorithm_Generic::MoveMakesSense(
- size_t dstBlockIndex, VkDeviceSize dstOffset,
- size_t srcBlockIndex, VkDeviceSize srcOffset)
-{
- if(dstBlockIndex < srcBlockIndex)
- {
- return true;
- }
- if(dstBlockIndex > srcBlockIndex)
- {
- return false;
- }
- if(dstOffset < srcOffset)
- {
- return true;
- }
- return false;
+ size_t dstBlockIndex, VkDeviceSize dstOffset,
+ size_t srcBlockIndex, VkDeviceSize srcOffset)
+{
+ if(dstBlockIndex < srcBlockIndex)
+ {
+ return true;
+ }
+ if(dstBlockIndex > srcBlockIndex)
+ {
+ return false;
+ }
+ if(dstOffset < srcOffset)
+ {
+ return true;
+ }
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
// VmaDefragmentationAlgorithm_Fast
VmaDefragmentationAlgorithm_Fast::VmaDefragmentationAlgorithm_Fast(
- VmaAllocator hAllocator,
- VmaBlockVector* pBlockVector,
- uint32_t currentFrameIndex,
- bool overlappingMoveSupported) :
- VmaDefragmentationAlgorithm(hAllocator, pBlockVector, currentFrameIndex),
- m_OverlappingMoveSupported(overlappingMoveSupported),
- m_AllocationCount(0),
- m_AllAllocations(false),
- m_BytesMoved(0),
- m_AllocationsMoved(0),
- m_BlockInfos(VmaStlAllocator<BlockInfo>(hAllocator->GetAllocationCallbacks()))
+ VmaAllocator hAllocator,
+ VmaBlockVector* pBlockVector,
+ uint32_t currentFrameIndex,
+ bool overlappingMoveSupported) :
+ VmaDefragmentationAlgorithm(hAllocator, pBlockVector, currentFrameIndex),
+ m_OverlappingMoveSupported(overlappingMoveSupported),
+ m_AllocationCount(0),
+ m_AllAllocations(false),
+ m_BytesMoved(0),
+ m_AllocationsMoved(0),
+ m_BlockInfos(VmaStlAllocator<BlockInfo>(hAllocator->GetAllocationCallbacks()))
{
- VMA_ASSERT(VMA_DEBUG_MARGIN == 0);
+ VMA_ASSERT(VMA_DEBUG_MARGIN == 0);
}
@@ -13558,782 +13322,622 @@ VmaDefragmentationAlgorithm_Fast::~VmaDefragmentationAlgorithm_Fast()
}
VkResult VmaDefragmentationAlgorithm_Fast::Defragment(
- VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
- VkDeviceSize maxBytesToMove,
- uint32_t maxAllocationsToMove,
- VmaDefragmentationFlags flags)
-{
- VMA_ASSERT(m_AllAllocations || m_pBlockVector->CalcAllocationCount() == m_AllocationCount);
-
- const size_t blockCount = m_pBlockVector->GetBlockCount();
- if(blockCount == 0 || maxBytesToMove == 0 || maxAllocationsToMove == 0)
- {
- return VK_SUCCESS;
- }
-
- PreprocessMetadata();
-
- // Sort blocks in order from most destination.
-
- m_BlockInfos.resize(blockCount);
- for(size_t i = 0; i < blockCount; ++i)
- {
- m_BlockInfos[i].origBlockIndex = i;
- }
-
- VMA_SORT(m_BlockInfos.begin(), m_BlockInfos.end(), [this](const BlockInfo& lhs, const BlockInfo& rhs) -> bool {
- return m_pBlockVector->GetBlock(lhs.origBlockIndex)->m_pMetadata->GetSumFreeSize() <
- m_pBlockVector->GetBlock(rhs.origBlockIndex)->m_pMetadata->GetSumFreeSize();
- });
-
- // THE MAIN ALGORITHM
-
- FreeSpaceDatabase freeSpaceDb;
-
- size_t dstBlockInfoIndex = 0;
- size_t dstOrigBlockIndex = m_BlockInfos[dstBlockInfoIndex].origBlockIndex;
- VmaDeviceMemoryBlock* pDstBlock = m_pBlockVector->GetBlock(dstOrigBlockIndex);
- VmaBlockMetadata_Generic* pDstMetadata = (VmaBlockMetadata_Generic*)pDstBlock->m_pMetadata;
- VkDeviceSize dstBlockSize = pDstMetadata->GetSize();
- VkDeviceSize dstOffset = 0;
-
- bool end = false;
- for(size_t srcBlockInfoIndex = 0; !end && srcBlockInfoIndex < blockCount; ++srcBlockInfoIndex)
- {
- const size_t srcOrigBlockIndex = m_BlockInfos[srcBlockInfoIndex].origBlockIndex;
- VmaDeviceMemoryBlock* const pSrcBlock = m_pBlockVector->GetBlock(srcOrigBlockIndex);
- VmaBlockMetadata_Generic* const pSrcMetadata = (VmaBlockMetadata_Generic*)pSrcBlock->m_pMetadata;
- for(VmaSuballocationList::iterator srcSuballocIt = pSrcMetadata->m_Suballocations.begin();
- !end && srcSuballocIt != pSrcMetadata->m_Suballocations.end(); )
- {
- VmaAllocation_T* const pAlloc = srcSuballocIt->hAllocation;
- const VkDeviceSize srcAllocAlignment = pAlloc->GetAlignment();
- const VkDeviceSize srcAllocSize = srcSuballocIt->size;
- if(m_AllocationsMoved == maxAllocationsToMove ||
- m_BytesMoved + srcAllocSize > maxBytesToMove)
- {
- end = true;
- break;
- }
- const VkDeviceSize srcAllocOffset = srcSuballocIt->offset;
-
- VmaDefragmentationMove move = {};
- // Try to place it in one of free spaces from the database.
- size_t freeSpaceInfoIndex;
- VkDeviceSize dstAllocOffset;
- if(freeSpaceDb.Fetch(srcAllocAlignment, srcAllocSize,
- freeSpaceInfoIndex, dstAllocOffset))
- {
- size_t freeSpaceOrigBlockIndex = m_BlockInfos[freeSpaceInfoIndex].origBlockIndex;
- VmaDeviceMemoryBlock* pFreeSpaceBlock = m_pBlockVector->GetBlock(freeSpaceOrigBlockIndex);
- VmaBlockMetadata_Generic* pFreeSpaceMetadata = (VmaBlockMetadata_Generic*)pFreeSpaceBlock->m_pMetadata;
-
- // Same block
- if(freeSpaceInfoIndex == srcBlockInfoIndex)
- {
- VMA_ASSERT(dstAllocOffset <= srcAllocOffset);
-
- // MOVE OPTION 1: Move the allocation inside the same block by decreasing offset.
-
- VmaSuballocation suballoc = *srcSuballocIt;
- suballoc.offset = dstAllocOffset;
- suballoc.hAllocation->ChangeOffset(dstAllocOffset);
- m_BytesMoved += srcAllocSize;
- ++m_AllocationsMoved;
-
- VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
- ++nextSuballocIt;
- pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
- srcSuballocIt = nextSuballocIt;
-
- InsertSuballoc(pFreeSpaceMetadata, suballoc);
-
- move.srcBlockIndex = srcOrigBlockIndex;
- move.dstBlockIndex = freeSpaceOrigBlockIndex;
- move.srcOffset = srcAllocOffset;
- move.dstOffset = dstAllocOffset;
- move.size = srcAllocSize;
-
- moves.push_back(move);
- }
- // Different block
- else
- {
- // MOVE OPTION 2: Move the allocation to a different block.
-
- VMA_ASSERT(freeSpaceInfoIndex < srcBlockInfoIndex);
-
- VmaSuballocation suballoc = *srcSuballocIt;
- suballoc.offset = dstAllocOffset;
- suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pFreeSpaceBlock, dstAllocOffset);
- m_BytesMoved += srcAllocSize;
- ++m_AllocationsMoved;
-
- VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
- ++nextSuballocIt;
- pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
- srcSuballocIt = nextSuballocIt;
-
- InsertSuballoc(pFreeSpaceMetadata, suballoc);
-
- move.srcBlockIndex = srcOrigBlockIndex;
- move.dstBlockIndex = freeSpaceOrigBlockIndex;
- move.srcOffset = srcAllocOffset;
- move.dstOffset = dstAllocOffset;
- move.size = srcAllocSize;
-
- moves.push_back(move);
- }
- }
- else
- {
- dstAllocOffset = VmaAlignUp(dstOffset, srcAllocAlignment);
-
- // If the allocation doesn't fit before the end of dstBlock, forward to next block.
- while(dstBlockInfoIndex < srcBlockInfoIndex &&
- dstAllocOffset + srcAllocSize > dstBlockSize)
- {
- // But before that, register remaining free space at the end of dst block.
- freeSpaceDb.Register(dstBlockInfoIndex, dstOffset, dstBlockSize - dstOffset);
-
- ++dstBlockInfoIndex;
- dstOrigBlockIndex = m_BlockInfos[dstBlockInfoIndex].origBlockIndex;
- pDstBlock = m_pBlockVector->GetBlock(dstOrigBlockIndex);
- pDstMetadata = (VmaBlockMetadata_Generic*)pDstBlock->m_pMetadata;
- dstBlockSize = pDstMetadata->GetSize();
- dstOffset = 0;
- dstAllocOffset = 0;
- }
-
- // Same block
- if(dstBlockInfoIndex == srcBlockInfoIndex)
- {
- VMA_ASSERT(dstAllocOffset <= srcAllocOffset);
-
- const bool overlap = dstAllocOffset + srcAllocSize > srcAllocOffset;
-
- bool skipOver = overlap;
- if(overlap && m_OverlappingMoveSupported && dstAllocOffset < srcAllocOffset)
- {
- // If destination and source place overlap, skip if it would move it
- // by only < 1/64 of its size.
- skipOver = (srcAllocOffset - dstAllocOffset) * 64 < srcAllocSize;
- }
-
- if(skipOver)
- {
- freeSpaceDb.Register(dstBlockInfoIndex, dstOffset, srcAllocOffset - dstOffset);
-
- dstOffset = srcAllocOffset + srcAllocSize;
- ++srcSuballocIt;
- }
- // MOVE OPTION 1: Move the allocation inside the same block by decreasing offset.
- else
- {
- srcSuballocIt->offset = dstAllocOffset;
- srcSuballocIt->hAllocation->ChangeOffset(dstAllocOffset);
- dstOffset = dstAllocOffset + srcAllocSize;
- m_BytesMoved += srcAllocSize;
- ++m_AllocationsMoved;
- ++srcSuballocIt;
-
- move.srcBlockIndex = srcOrigBlockIndex;
- move.dstBlockIndex = dstOrigBlockIndex;
- move.srcOffset = srcAllocOffset;
- move.dstOffset = dstAllocOffset;
- move.size = srcAllocSize;
-
- moves.push_back(move);
- }
- }
- // Different block
- else
- {
- // MOVE OPTION 2: Move the allocation to a different block.
-
- VMA_ASSERT(dstBlockInfoIndex < srcBlockInfoIndex);
- VMA_ASSERT(dstAllocOffset + srcAllocSize <= dstBlockSize);
-
- VmaSuballocation suballoc = *srcSuballocIt;
- suballoc.offset = dstAllocOffset;
- suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pDstBlock, dstAllocOffset);
- dstOffset = dstAllocOffset + srcAllocSize;
- m_BytesMoved += srcAllocSize;
- ++m_AllocationsMoved;
-
- VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
- ++nextSuballocIt;
- pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
- srcSuballocIt = nextSuballocIt;
-
- pDstMetadata->m_Suballocations.push_back(suballoc);
-
- move.srcBlockIndex = srcOrigBlockIndex;
- move.dstBlockIndex = dstOrigBlockIndex;
- move.srcOffset = srcAllocOffset;
- move.dstOffset = dstAllocOffset;
- move.size = srcAllocSize;
-
- moves.push_back(move);
- }
- }
- }
- }
-
- m_BlockInfos.clear();
-
- PostprocessMetadata();
-
- return VK_SUCCESS;
+ VmaVector< VmaDefragmentationMove, VmaStlAllocator<VmaDefragmentationMove> >& moves,
+ VkDeviceSize maxBytesToMove,
+ uint32_t maxAllocationsToMove)
+{
+ VMA_ASSERT(m_AllAllocations || m_pBlockVector->CalcAllocationCount() == m_AllocationCount);
+
+ const size_t blockCount = m_pBlockVector->GetBlockCount();
+ if(blockCount == 0 || maxBytesToMove == 0 || maxAllocationsToMove == 0)
+ {
+ return VK_SUCCESS;
+ }
+
+ PreprocessMetadata();
+
+ // Sort blocks in order from most destination.
+
+ m_BlockInfos.resize(blockCount);
+ for(size_t i = 0; i < blockCount; ++i)
+ {
+ m_BlockInfos[i].origBlockIndex = i;
+ }
+
+ VMA_SORT(m_BlockInfos.begin(), m_BlockInfos.end(), [this](const BlockInfo& lhs, const BlockInfo& rhs) -> bool {
+ return m_pBlockVector->GetBlock(lhs.origBlockIndex)->m_pMetadata->GetSumFreeSize() <
+ m_pBlockVector->GetBlock(rhs.origBlockIndex)->m_pMetadata->GetSumFreeSize();
+ });
+
+ // THE MAIN ALGORITHM
+
+ FreeSpaceDatabase freeSpaceDb;
+
+ size_t dstBlockInfoIndex = 0;
+ size_t dstOrigBlockIndex = m_BlockInfos[dstBlockInfoIndex].origBlockIndex;
+ VmaDeviceMemoryBlock* pDstBlock = m_pBlockVector->GetBlock(dstOrigBlockIndex);
+ VmaBlockMetadata_Generic* pDstMetadata = (VmaBlockMetadata_Generic*)pDstBlock->m_pMetadata;
+ VkDeviceSize dstBlockSize = pDstMetadata->GetSize();
+ VkDeviceSize dstOffset = 0;
+
+ bool end = false;
+ for(size_t srcBlockInfoIndex = 0; !end && srcBlockInfoIndex < blockCount; ++srcBlockInfoIndex)
+ {
+ const size_t srcOrigBlockIndex = m_BlockInfos[srcBlockInfoIndex].origBlockIndex;
+ VmaDeviceMemoryBlock* const pSrcBlock = m_pBlockVector->GetBlock(srcOrigBlockIndex);
+ VmaBlockMetadata_Generic* const pSrcMetadata = (VmaBlockMetadata_Generic*)pSrcBlock->m_pMetadata;
+ for(VmaSuballocationList::iterator srcSuballocIt = pSrcMetadata->m_Suballocations.begin();
+ !end && srcSuballocIt != pSrcMetadata->m_Suballocations.end(); )
+ {
+ VmaAllocation_T* const pAlloc = srcSuballocIt->hAllocation;
+ const VkDeviceSize srcAllocAlignment = pAlloc->GetAlignment();
+ const VkDeviceSize srcAllocSize = srcSuballocIt->size;
+ if(m_AllocationsMoved == maxAllocationsToMove ||
+ m_BytesMoved + srcAllocSize > maxBytesToMove)
+ {
+ end = true;
+ break;
+ }
+ const VkDeviceSize srcAllocOffset = srcSuballocIt->offset;
+
+ // Try to place it in one of free spaces from the database.
+ size_t freeSpaceInfoIndex;
+ VkDeviceSize dstAllocOffset;
+ if(freeSpaceDb.Fetch(srcAllocAlignment, srcAllocSize,
+ freeSpaceInfoIndex, dstAllocOffset))
+ {
+ size_t freeSpaceOrigBlockIndex = m_BlockInfos[freeSpaceInfoIndex].origBlockIndex;
+ VmaDeviceMemoryBlock* pFreeSpaceBlock = m_pBlockVector->GetBlock(freeSpaceOrigBlockIndex);
+ VmaBlockMetadata_Generic* pFreeSpaceMetadata = (VmaBlockMetadata_Generic*)pFreeSpaceBlock->m_pMetadata;
+
+ // Same block
+ if(freeSpaceInfoIndex == srcBlockInfoIndex)
+ {
+ VMA_ASSERT(dstAllocOffset <= srcAllocOffset);
+
+ // MOVE OPTION 1: Move the allocation inside the same block by decreasing offset.
+
+ VmaSuballocation suballoc = *srcSuballocIt;
+ suballoc.offset = dstAllocOffset;
+ suballoc.hAllocation->ChangeOffset(dstAllocOffset);
+ m_BytesMoved += srcAllocSize;
+ ++m_AllocationsMoved;
+
+ VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
+ ++nextSuballocIt;
+ pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
+ srcSuballocIt = nextSuballocIt;
+
+ InsertSuballoc(pFreeSpaceMetadata, suballoc);
+
+ VmaDefragmentationMove move = {
+ srcOrigBlockIndex, freeSpaceOrigBlockIndex,
+ srcAllocOffset, dstAllocOffset,
+ srcAllocSize };
+ moves.push_back(move);
+ }
+ // Different block
+ else
+ {
+ // MOVE OPTION 2: Move the allocation to a different block.
+
+ VMA_ASSERT(freeSpaceInfoIndex < srcBlockInfoIndex);
+
+ VmaSuballocation suballoc = *srcSuballocIt;
+ suballoc.offset = dstAllocOffset;
+ suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pFreeSpaceBlock, dstAllocOffset);
+ m_BytesMoved += srcAllocSize;
+ ++m_AllocationsMoved;
+
+ VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
+ ++nextSuballocIt;
+ pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
+ srcSuballocIt = nextSuballocIt;
+
+ InsertSuballoc(pFreeSpaceMetadata, suballoc);
+
+ VmaDefragmentationMove move = {
+ srcOrigBlockIndex, freeSpaceOrigBlockIndex,
+ srcAllocOffset, dstAllocOffset,
+ srcAllocSize };
+ moves.push_back(move);
+ }
+ }
+ else
+ {
+ dstAllocOffset = VmaAlignUp(dstOffset, srcAllocAlignment);
+
+ // If the allocation doesn't fit before the end of dstBlock, forward to next block.
+ while(dstBlockInfoIndex < srcBlockInfoIndex &&
+ dstAllocOffset + srcAllocSize > dstBlockSize)
+ {
+ // But before that, register remaining free space at the end of dst block.
+ freeSpaceDb.Register(dstBlockInfoIndex, dstOffset, dstBlockSize - dstOffset);
+
+ ++dstBlockInfoIndex;
+ dstOrigBlockIndex = m_BlockInfos[dstBlockInfoIndex].origBlockIndex;
+ pDstBlock = m_pBlockVector->GetBlock(dstOrigBlockIndex);
+ pDstMetadata = (VmaBlockMetadata_Generic*)pDstBlock->m_pMetadata;
+ dstBlockSize = pDstMetadata->GetSize();
+ dstOffset = 0;
+ dstAllocOffset = 0;
+ }
+
+ // Same block
+ if(dstBlockInfoIndex == srcBlockInfoIndex)
+ {
+ VMA_ASSERT(dstAllocOffset <= srcAllocOffset);
+
+ const bool overlap = dstAllocOffset + srcAllocSize > srcAllocOffset;
+
+ bool skipOver = overlap;
+ if(overlap && m_OverlappingMoveSupported && dstAllocOffset < srcAllocOffset)
+ {
+ // If destination and source place overlap, skip if it would move it
+ // by only < 1/64 of its size.
+ skipOver = (srcAllocOffset - dstAllocOffset) * 64 < srcAllocSize;
+ }
+
+ if(skipOver)
+ {
+ freeSpaceDb.Register(dstBlockInfoIndex, dstOffset, srcAllocOffset - dstOffset);
+
+ dstOffset = srcAllocOffset + srcAllocSize;
+ ++srcSuballocIt;
+ }
+ // MOVE OPTION 1: Move the allocation inside the same block by decreasing offset.
+ else
+ {
+ srcSuballocIt->offset = dstAllocOffset;
+ srcSuballocIt->hAllocation->ChangeOffset(dstAllocOffset);
+ dstOffset = dstAllocOffset + srcAllocSize;
+ m_BytesMoved += srcAllocSize;
+ ++m_AllocationsMoved;
+ ++srcSuballocIt;
+ VmaDefragmentationMove move = {
+ srcOrigBlockIndex, dstOrigBlockIndex,
+ srcAllocOffset, dstAllocOffset,
+ srcAllocSize };
+ moves.push_back(move);
+ }
+ }
+ // Different block
+ else
+ {
+ // MOVE OPTION 2: Move the allocation to a different block.
+
+ VMA_ASSERT(dstBlockInfoIndex < srcBlockInfoIndex);
+ VMA_ASSERT(dstAllocOffset + srcAllocSize <= dstBlockSize);
+
+ VmaSuballocation suballoc = *srcSuballocIt;
+ suballoc.offset = dstAllocOffset;
+ suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pDstBlock, dstAllocOffset);
+ dstOffset = dstAllocOffset + srcAllocSize;
+ m_BytesMoved += srcAllocSize;
+ ++m_AllocationsMoved;
+
+ VmaSuballocationList::iterator nextSuballocIt = srcSuballocIt;
+ ++nextSuballocIt;
+ pSrcMetadata->m_Suballocations.erase(srcSuballocIt);
+ srcSuballocIt = nextSuballocIt;
+
+ pDstMetadata->m_Suballocations.push_back(suballoc);
+
+ VmaDefragmentationMove move = {
+ srcOrigBlockIndex, dstOrigBlockIndex,
+ srcAllocOffset, dstAllocOffset,
+ srcAllocSize };
+ moves.push_back(move);
+ }
+ }
+ }
+ }
+
+ m_BlockInfos.clear();
+
+ PostprocessMetadata();
+
+ return VK_SUCCESS;
}
void VmaDefragmentationAlgorithm_Fast::PreprocessMetadata()
{
- const size_t blockCount = m_pBlockVector->GetBlockCount();
- for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
- {
- VmaBlockMetadata_Generic* const pMetadata =
- (VmaBlockMetadata_Generic*)m_pBlockVector->GetBlock(blockIndex)->m_pMetadata;
- pMetadata->m_FreeCount = 0;
- pMetadata->m_SumFreeSize = pMetadata->GetSize();
- pMetadata->m_FreeSuballocationsBySize.clear();
- for(VmaSuballocationList::iterator it = pMetadata->m_Suballocations.begin();
- it != pMetadata->m_Suballocations.end(); )
- {
- if(it->type == VMA_SUBALLOCATION_TYPE_FREE)
- {
- VmaSuballocationList::iterator nextIt = it;
- ++nextIt;
- pMetadata->m_Suballocations.erase(it);
- it = nextIt;
- }
- else
- {
- ++it;
- }
- }
- }
+ const size_t blockCount = m_pBlockVector->GetBlockCount();
+ for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
+ {
+ VmaBlockMetadata_Generic* const pMetadata =
+ (VmaBlockMetadata_Generic*)m_pBlockVector->GetBlock(blockIndex)->m_pMetadata;
+ pMetadata->m_FreeCount = 0;
+ pMetadata->m_SumFreeSize = pMetadata->GetSize();
+ pMetadata->m_FreeSuballocationsBySize.clear();
+ for(VmaSuballocationList::iterator it = pMetadata->m_Suballocations.begin();
+ it != pMetadata->m_Suballocations.end(); )
+ {
+ if(it->type == VMA_SUBALLOCATION_TYPE_FREE)
+ {
+ VmaSuballocationList::iterator nextIt = it;
+ ++nextIt;
+ pMetadata->m_Suballocations.erase(it);
+ it = nextIt;
+ }
+ else
+ {
+ ++it;
+ }
+ }
+ }
}
void VmaDefragmentationAlgorithm_Fast::PostprocessMetadata()
{
- const size_t blockCount = m_pBlockVector->GetBlockCount();
- for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
- {
- VmaBlockMetadata_Generic* const pMetadata =
- (VmaBlockMetadata_Generic*)m_pBlockVector->GetBlock(blockIndex)->m_pMetadata;
- const VkDeviceSize blockSize = pMetadata->GetSize();
-
- // No allocations in this block - entire area is free.
- if(pMetadata->m_Suballocations.empty())
- {
- pMetadata->m_FreeCount = 1;
- //pMetadata->m_SumFreeSize is already set to blockSize.
- VmaSuballocation suballoc = {
- 0, // offset
- blockSize, // size
- VMA_NULL, // hAllocation
- VMA_SUBALLOCATION_TYPE_FREE };
- pMetadata->m_Suballocations.push_back(suballoc);
- pMetadata->RegisterFreeSuballocation(pMetadata->m_Suballocations.begin());
- }
- // There are some allocations in this block.
- else
- {
- VkDeviceSize offset = 0;
- VmaSuballocationList::iterator it;
- for(it = pMetadata->m_Suballocations.begin();
- it != pMetadata->m_Suballocations.end();
- ++it)
- {
- VMA_ASSERT(it->type != VMA_SUBALLOCATION_TYPE_FREE);
- VMA_ASSERT(it->offset >= offset);
-
- // Need to insert preceding free space.
- if(it->offset > offset)
- {
- ++pMetadata->m_FreeCount;
- const VkDeviceSize freeSize = it->offset - offset;
- VmaSuballocation suballoc = {
- offset, // offset
- freeSize, // size
- VMA_NULL, // hAllocation
- VMA_SUBALLOCATION_TYPE_FREE };
- VmaSuballocationList::iterator precedingFreeIt = pMetadata->m_Suballocations.insert(it, suballoc);
- if(freeSize >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- pMetadata->m_FreeSuballocationsBySize.push_back(precedingFreeIt);
- }
- }
-
- pMetadata->m_SumFreeSize -= it->size;
- offset = it->offset + it->size;
- }
-
- // Need to insert trailing free space.
- if(offset < blockSize)
- {
- ++pMetadata->m_FreeCount;
- const VkDeviceSize freeSize = blockSize - offset;
- VmaSuballocation suballoc = {
- offset, // offset
- freeSize, // size
- VMA_NULL, // hAllocation
- VMA_SUBALLOCATION_TYPE_FREE };
- VMA_ASSERT(it == pMetadata->m_Suballocations.end());
- VmaSuballocationList::iterator trailingFreeIt = pMetadata->m_Suballocations.insert(it, suballoc);
- if(freeSize > VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
- {
- pMetadata->m_FreeSuballocationsBySize.push_back(trailingFreeIt);
- }
- }
-
- VMA_SORT(
- pMetadata->m_FreeSuballocationsBySize.begin(),
- pMetadata->m_FreeSuballocationsBySize.end(),
- VmaSuballocationItemSizeLess());
- }
-
- VMA_HEAVY_ASSERT(pMetadata->Validate());
- }
+ const size_t blockCount = m_pBlockVector->GetBlockCount();
+ for(size_t blockIndex = 0; blockIndex < blockCount; ++blockIndex)
+ {
+ VmaBlockMetadata_Generic* const pMetadata =
+ (VmaBlockMetadata_Generic*)m_pBlockVector->GetBlock(blockIndex)->m_pMetadata;
+ const VkDeviceSize blockSize = pMetadata->GetSize();
+
+ // No allocations in this block - entire area is free.
+ if(pMetadata->m_Suballocations.empty())
+ {
+ pMetadata->m_FreeCount = 1;
+ //pMetadata->m_SumFreeSize is already set to blockSize.
+ VmaSuballocation suballoc = {
+ 0, // offset
+ blockSize, // size
+ VMA_NULL, // hAllocation
+ VMA_SUBALLOCATION_TYPE_FREE };
+ pMetadata->m_Suballocations.push_back(suballoc);
+ pMetadata->RegisterFreeSuballocation(pMetadata->m_Suballocations.begin());
+ }
+ // There are some allocations in this block.
+ else
+ {
+ VkDeviceSize offset = 0;
+ VmaSuballocationList::iterator it;
+ for(it = pMetadata->m_Suballocations.begin();
+ it != pMetadata->m_Suballocations.end();
+ ++it)
+ {
+ VMA_ASSERT(it->type != VMA_SUBALLOCATION_TYPE_FREE);
+ VMA_ASSERT(it->offset >= offset);
+
+ // Need to insert preceding free space.
+ if(it->offset > offset)
+ {
+ ++pMetadata->m_FreeCount;
+ const VkDeviceSize freeSize = it->offset - offset;
+ VmaSuballocation suballoc = {
+ offset, // offset
+ freeSize, // size
+ VMA_NULL, // hAllocation
+ VMA_SUBALLOCATION_TYPE_FREE };
+ VmaSuballocationList::iterator precedingFreeIt = pMetadata->m_Suballocations.insert(it, suballoc);
+ if(freeSize >= VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ pMetadata->m_FreeSuballocationsBySize.push_back(precedingFreeIt);
+ }
+ }
+
+ pMetadata->m_SumFreeSize -= it->size;
+ offset = it->offset + it->size;
+ }
+
+ // Need to insert trailing free space.
+ if(offset < blockSize)
+ {
+ ++pMetadata->m_FreeCount;
+ const VkDeviceSize freeSize = blockSize - offset;
+ VmaSuballocation suballoc = {
+ offset, // offset
+ freeSize, // size
+ VMA_NULL, // hAllocation
+ VMA_SUBALLOCATION_TYPE_FREE };
+ VMA_ASSERT(it == pMetadata->m_Suballocations.end());
+ VmaSuballocationList::iterator trailingFreeIt = pMetadata->m_Suballocations.insert(it, suballoc);
+ if(freeSize > VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER)
+ {
+ pMetadata->m_FreeSuballocationsBySize.push_back(trailingFreeIt);
+ }
+ }
+
+ VMA_SORT(
+ pMetadata->m_FreeSuballocationsBySize.begin(),
+ pMetadata->m_FreeSuballocationsBySize.end(),
+ VmaSuballocationItemSizeLess());
+ }
+
+ VMA_HEAVY_ASSERT(pMetadata->Validate());
+ }
}
void VmaDefragmentationAlgorithm_Fast::InsertSuballoc(VmaBlockMetadata_Generic* pMetadata, const VmaSuballocation& suballoc)
{
- // TODO: Optimize somehow. Remember iterator instead of searching for it linearly.
- VmaSuballocationList::iterator it = pMetadata->m_Suballocations.begin();
- while(it != pMetadata->m_Suballocations.end())
- {
- if(it->offset < suballoc.offset)
- {
- ++it;
- }
- }
- pMetadata->m_Suballocations.insert(it, suballoc);
+ // TODO: Optimize somehow. Remember iterator instead of searching for it linearly.
+ VmaSuballocationList::iterator it = pMetadata->m_Suballocations.begin();
+ while(it != pMetadata->m_Suballocations.end())
+ {
+ if(it->offset < suballoc.offset)
+ {
+ ++it;
+ }
+ }
+ pMetadata->m_Suballocations.insert(it, suballoc);
}
////////////////////////////////////////////////////////////////////////////////
// VmaBlockVectorDefragmentationContext
VmaBlockVectorDefragmentationContext::VmaBlockVectorDefragmentationContext(
- VmaAllocator hAllocator,
- VmaPool hCustomPool,
- VmaBlockVector* pBlockVector,
- uint32_t currFrameIndex) :
- res(VK_SUCCESS),
- mutexLocked(false),
- blockContexts(VmaStlAllocator<VmaBlockDefragmentationContext>(hAllocator->GetAllocationCallbacks())),
- defragmentationMoves(VmaStlAllocator<VmaDefragmentationMove>(hAllocator->GetAllocationCallbacks())),
- defragmentationMovesProcessed(0),
- defragmentationMovesCommitted(0),
- hasDefragmentationPlan(0),
- m_hAllocator(hAllocator),
- m_hCustomPool(hCustomPool),
- m_pBlockVector(pBlockVector),
- m_CurrFrameIndex(currFrameIndex),
- m_pAlgorithm(VMA_NULL),
- m_Allocations(VmaStlAllocator<AllocInfo>(hAllocator->GetAllocationCallbacks())),
- m_AllAllocations(false)
+ VmaAllocator hAllocator,
+ VmaPool hCustomPool,
+ VmaBlockVector* pBlockVector,
+ uint32_t currFrameIndex) :
+ res(VK_SUCCESS),
+ mutexLocked(false),
+ blockContexts(VmaStlAllocator<VmaBlockDefragmentationContext>(hAllocator->GetAllocationCallbacks())),
+ m_hAllocator(hAllocator),
+ m_hCustomPool(hCustomPool),
+ m_pBlockVector(pBlockVector),
+ m_CurrFrameIndex(currFrameIndex),
+ m_pAlgorithm(VMA_NULL),
+ m_Allocations(VmaStlAllocator<AllocInfo>(hAllocator->GetAllocationCallbacks())),
+ m_AllAllocations(false)
{
}
VmaBlockVectorDefragmentationContext::~VmaBlockVectorDefragmentationContext()
{
- vma_delete(m_hAllocator, m_pAlgorithm);
+ vma_delete(m_hAllocator, m_pAlgorithm);
}
void VmaBlockVectorDefragmentationContext::AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged)
{
- AllocInfo info = { hAlloc, pChanged };
- m_Allocations.push_back(info);
-}
-
-void VmaBlockVectorDefragmentationContext::Begin(bool overlappingMoveSupported, VmaDefragmentationFlags flags)
-{
- const bool allAllocations = m_AllAllocations ||
- m_Allocations.size() == m_pBlockVector->CalcAllocationCount();
-
- /********************************
- HERE IS THE CHOICE OF DEFRAGMENTATION ALGORITHM.
- ********************************/
-
- /*
- Fast algorithm is supported only when certain criteria are met:
- - VMA_DEBUG_MARGIN is 0.
- - All allocations in this block vector are moveable.
- - There is no possibility of image/buffer granularity conflict.
- - The defragmentation is not incremental
- */
- if(VMA_DEBUG_MARGIN == 0 &&
- allAllocations &&
- !m_pBlockVector->IsBufferImageGranularityConflictPossible() &&
- !(flags & VMA_DEFRAGMENTATION_FLAG_INCREMENTAL))
- {
- m_pAlgorithm = vma_new(m_hAllocator, VmaDefragmentationAlgorithm_Fast)(
- m_hAllocator, m_pBlockVector, m_CurrFrameIndex, overlappingMoveSupported);
- }
- else
- {
- m_pAlgorithm = vma_new(m_hAllocator, VmaDefragmentationAlgorithm_Generic)(
- m_hAllocator, m_pBlockVector, m_CurrFrameIndex, overlappingMoveSupported);
- }
-
- if(allAllocations)
- {
- m_pAlgorithm->AddAll();
- }
- else
- {
- for(size_t i = 0, count = m_Allocations.size(); i < count; ++i)
- {
- m_pAlgorithm->AddAllocation(m_Allocations[i].hAlloc, m_Allocations[i].pChanged);
- }
- }
+ AllocInfo info = { hAlloc, pChanged };
+ m_Allocations.push_back(info);
+}
+
+void VmaBlockVectorDefragmentationContext::Begin(bool overlappingMoveSupported)
+{
+ const bool allAllocations = m_AllAllocations ||
+ m_Allocations.size() == m_pBlockVector->CalcAllocationCount();
+
+ /********************************
+ HERE IS THE CHOICE OF DEFRAGMENTATION ALGORITHM.
+ ********************************/
+
+ /*
+ Fast algorithm is supported only when certain criteria are met:
+ - VMA_DEBUG_MARGIN is 0.
+ - All allocations in this block vector are moveable.
+ - There is no possibility of image/buffer granularity conflict.
+ */
+ if(VMA_DEBUG_MARGIN == 0 &&
+ allAllocations &&
+ !m_pBlockVector->IsBufferImageGranularityConflictPossible())
+ {
+ m_pAlgorithm = vma_new(m_hAllocator, VmaDefragmentationAlgorithm_Fast)(
+ m_hAllocator, m_pBlockVector, m_CurrFrameIndex, overlappingMoveSupported);
+ }
+ else
+ {
+ m_pAlgorithm = vma_new(m_hAllocator, VmaDefragmentationAlgorithm_Generic)(
+ m_hAllocator, m_pBlockVector, m_CurrFrameIndex, overlappingMoveSupported);
+ }
+
+ if(allAllocations)
+ {
+ m_pAlgorithm->AddAll();
+ }
+ else
+ {
+ for(size_t i = 0, count = m_Allocations.size(); i < count; ++i)
+ {
+ m_pAlgorithm->AddAllocation(m_Allocations[i].hAlloc, m_Allocations[i].pChanged);
+ }
+ }
}
////////////////////////////////////////////////////////////////////////////////
// VmaDefragmentationContext
VmaDefragmentationContext_T::VmaDefragmentationContext_T(
- VmaAllocator hAllocator,
- uint32_t currFrameIndex,
- uint32_t flags,
- VmaDefragmentationStats* pStats) :
- m_hAllocator(hAllocator),
- m_CurrFrameIndex(currFrameIndex),
- m_Flags(flags),
- m_pStats(pStats),
- m_CustomPoolContexts(VmaStlAllocator<VmaBlockVectorDefragmentationContext*>(hAllocator->GetAllocationCallbacks()))
+ VmaAllocator hAllocator,
+ uint32_t currFrameIndex,
+ uint32_t flags,
+ VmaDefragmentationStats* pStats) :
+ m_hAllocator(hAllocator),
+ m_CurrFrameIndex(currFrameIndex),
+ m_Flags(flags),
+ m_pStats(pStats),
+ m_CustomPoolContexts(VmaStlAllocator<VmaBlockVectorDefragmentationContext*>(hAllocator->GetAllocationCallbacks()))
{
- memset(m_DefaultPoolContexts, 0, sizeof(m_DefaultPoolContexts));
+ memset(m_DefaultPoolContexts, 0, sizeof(m_DefaultPoolContexts));
}
VmaDefragmentationContext_T::~VmaDefragmentationContext_T()
{
- for(size_t i = m_CustomPoolContexts.size(); i--; )
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_CustomPoolContexts[i];
- pBlockVectorCtx->GetBlockVector()->DefragmentationEnd(pBlockVectorCtx, m_pStats);
- vma_delete(m_hAllocator, pBlockVectorCtx);
- }
- for(size_t i = m_hAllocator->m_MemProps.memoryTypeCount; i--; )
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_DefaultPoolContexts[i];
- if(pBlockVectorCtx)
- {
- pBlockVectorCtx->GetBlockVector()->DefragmentationEnd(pBlockVectorCtx, m_pStats);
- vma_delete(m_hAllocator, pBlockVectorCtx);
- }
- }
+ for(size_t i = m_CustomPoolContexts.size(); i--; )
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_CustomPoolContexts[i];
+ pBlockVectorCtx->GetBlockVector()->DefragmentationEnd(pBlockVectorCtx, m_pStats);
+ vma_delete(m_hAllocator, pBlockVectorCtx);
+ }
+ for(size_t i = m_hAllocator->m_MemProps.memoryTypeCount; i--; )
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_DefaultPoolContexts[i];
+ if(pBlockVectorCtx)
+ {
+ pBlockVectorCtx->GetBlockVector()->DefragmentationEnd(pBlockVectorCtx, m_pStats);
+ vma_delete(m_hAllocator, pBlockVectorCtx);
+ }
+ }
}
void VmaDefragmentationContext_T::AddPools(uint32_t poolCount, VmaPool* pPools)
{
- for(uint32_t poolIndex = 0; poolIndex < poolCount; ++poolIndex)
- {
- VmaPool pool = pPools[poolIndex];
- VMA_ASSERT(pool);
- // Pools with algorithm other than default are not defragmented.
- if(pool->m_BlockVector.GetAlgorithm() == 0)
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorDefragCtx = VMA_NULL;
-
- for(size_t i = m_CustomPoolContexts.size(); i--; )
- {
- if(m_CustomPoolContexts[i]->GetCustomPool() == pool)
- {
- pBlockVectorDefragCtx = m_CustomPoolContexts[i];
- break;
- }
- }
-
- if(!pBlockVectorDefragCtx)
- {
- pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
- m_hAllocator,
- pool,
- &pool->m_BlockVector,
- m_CurrFrameIndex);
- m_CustomPoolContexts.push_back(pBlockVectorDefragCtx);
- }
-
- pBlockVectorDefragCtx->AddAll();
- }
- }
+ for(uint32_t poolIndex = 0; poolIndex < poolCount; ++poolIndex)
+ {
+ VmaPool pool = pPools[poolIndex];
+ VMA_ASSERT(pool);
+ // Pools with algorithm other than default are not defragmented.
+ if(pool->m_BlockVector.GetAlgorithm() == 0)
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorDefragCtx = VMA_NULL;
+
+ for(size_t i = m_CustomPoolContexts.size(); i--; )
+ {
+ if(m_CustomPoolContexts[i]->GetCustomPool() == pool)
+ {
+ pBlockVectorDefragCtx = m_CustomPoolContexts[i];
+ break;
+ }
+ }
+
+ if(!pBlockVectorDefragCtx)
+ {
+ pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
+ m_hAllocator,
+ pool,
+ &pool->m_BlockVector,
+ m_CurrFrameIndex);
+ m_CustomPoolContexts.push_back(pBlockVectorDefragCtx);
+ }
+
+ pBlockVectorDefragCtx->AddAll();
+ }
+ }
}
void VmaDefragmentationContext_T::AddAllocations(
- uint32_t allocationCount,
- VmaAllocation* pAllocations,
- VkBool32* pAllocationsChanged)
-{
- // Dispatch pAllocations among defragmentators. Create them when necessary.
- for(uint32_t allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
- {
- const VmaAllocation hAlloc = pAllocations[allocIndex];
- VMA_ASSERT(hAlloc);
- // DedicatedAlloc cannot be defragmented.
- if((hAlloc->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK) &&
- // Lost allocation cannot be defragmented.
- (hAlloc->GetLastUseFrameIndex() != VMA_FRAME_INDEX_LOST))
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorDefragCtx = VMA_NULL;
-
- const VmaPool hAllocPool = hAlloc->GetBlock()->GetParentPool();
- // This allocation belongs to custom pool.
- if(hAllocPool != VK_NULL_HANDLE)
- {
- // Pools with algorithm other than default are not defragmented.
- if(hAllocPool->m_BlockVector.GetAlgorithm() == 0)
- {
- for(size_t i = m_CustomPoolContexts.size(); i--; )
- {
- if(m_CustomPoolContexts[i]->GetCustomPool() == hAllocPool)
- {
- pBlockVectorDefragCtx = m_CustomPoolContexts[i];
- break;
- }
- }
- if(!pBlockVectorDefragCtx)
- {
- pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
- m_hAllocator,
- hAllocPool,
- &hAllocPool->m_BlockVector,
- m_CurrFrameIndex);
- m_CustomPoolContexts.push_back(pBlockVectorDefragCtx);
- }
- }
- }
- // This allocation belongs to default pool.
- else
- {
- const uint32_t memTypeIndex = hAlloc->GetMemoryTypeIndex();
- pBlockVectorDefragCtx = m_DefaultPoolContexts[memTypeIndex];
- if(!pBlockVectorDefragCtx)
- {
- pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
- m_hAllocator,
- VMA_NULL, // hCustomPool
- m_hAllocator->m_pBlockVectors[memTypeIndex],
- m_CurrFrameIndex);
- m_DefaultPoolContexts[memTypeIndex] = pBlockVectorDefragCtx;
- }
- }
-
- if(pBlockVectorDefragCtx)
- {
- VkBool32* const pChanged = (pAllocationsChanged != VMA_NULL) ?
- &pAllocationsChanged[allocIndex] : VMA_NULL;
- pBlockVectorDefragCtx->AddAllocation(hAlloc, pChanged);
- }
- }
- }
+ uint32_t allocationCount,
+ VmaAllocation* pAllocations,
+ VkBool32* pAllocationsChanged)
+{
+ // Dispatch pAllocations among defragmentators. Create them when necessary.
+ for(uint32_t allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
+ {
+ const VmaAllocation hAlloc = pAllocations[allocIndex];
+ VMA_ASSERT(hAlloc);
+ // DedicatedAlloc cannot be defragmented.
+ if((hAlloc->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK) &&
+ // Lost allocation cannot be defragmented.
+ (hAlloc->GetLastUseFrameIndex() != VMA_FRAME_INDEX_LOST))
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorDefragCtx = VMA_NULL;
+
+ const VmaPool hAllocPool = hAlloc->GetBlock()->GetParentPool();
+ // This allocation belongs to custom pool.
+ if(hAllocPool != VK_NULL_HANDLE)
+ {
+ // Pools with algorithm other than default are not defragmented.
+ if(hAllocPool->m_BlockVector.GetAlgorithm() == 0)
+ {
+ for(size_t i = m_CustomPoolContexts.size(); i--; )
+ {
+ if(m_CustomPoolContexts[i]->GetCustomPool() == hAllocPool)
+ {
+ pBlockVectorDefragCtx = m_CustomPoolContexts[i];
+ break;
+ }
+ }
+ if(!pBlockVectorDefragCtx)
+ {
+ pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
+ m_hAllocator,
+ hAllocPool,
+ &hAllocPool->m_BlockVector,
+ m_CurrFrameIndex);
+ m_CustomPoolContexts.push_back(pBlockVectorDefragCtx);
+ }
+ }
+ }
+ // This allocation belongs to default pool.
+ else
+ {
+ const uint32_t memTypeIndex = hAlloc->GetMemoryTypeIndex();
+ pBlockVectorDefragCtx = m_DefaultPoolContexts[memTypeIndex];
+ if(!pBlockVectorDefragCtx)
+ {
+ pBlockVectorDefragCtx = vma_new(m_hAllocator, VmaBlockVectorDefragmentationContext)(
+ m_hAllocator,
+ VMA_NULL, // hCustomPool
+ m_hAllocator->m_pBlockVectors[memTypeIndex],
+ m_CurrFrameIndex);
+ m_DefaultPoolContexts[memTypeIndex] = pBlockVectorDefragCtx;
+ }
+ }
+
+ if(pBlockVectorDefragCtx)
+ {
+ VkBool32* const pChanged = (pAllocationsChanged != VMA_NULL) ?
+ &pAllocationsChanged[allocIndex] : VMA_NULL;
+ pBlockVectorDefragCtx->AddAllocation(hAlloc, pChanged);
+ }
+ }
+ }
}
VkResult VmaDefragmentationContext_T::Defragment(
- VkDeviceSize maxCpuBytesToMove, uint32_t maxCpuAllocationsToMove,
- VkDeviceSize maxGpuBytesToMove, uint32_t maxGpuAllocationsToMove,
- VkCommandBuffer commandBuffer, VmaDefragmentationStats* pStats, VmaDefragmentationFlags flags)
-{
- if(pStats)
- {
- memset(pStats, 0, sizeof(VmaDefragmentationStats));
- }
-
- if(flags & VMA_DEFRAGMENTATION_FLAG_INCREMENTAL)
- {
- // For incremental defragmetnations, we just earmark how much we can move
- // The real meat is in the defragmentation steps
- m_MaxCpuBytesToMove = maxCpuBytesToMove;
- m_MaxCpuAllocationsToMove = maxCpuAllocationsToMove;
-
- m_MaxGpuBytesToMove = maxGpuBytesToMove;
- m_MaxGpuAllocationsToMove = maxGpuAllocationsToMove;
-
- if(m_MaxCpuBytesToMove == 0 && m_MaxCpuAllocationsToMove == 0 &&
- m_MaxGpuBytesToMove == 0 && m_MaxGpuAllocationsToMove == 0)
- return VK_SUCCESS;
-
- return VK_NOT_READY;
- }
-
- if(commandBuffer == VK_NULL_HANDLE)
- {
- maxGpuBytesToMove = 0;
- maxGpuAllocationsToMove = 0;
- }
-
- VkResult res = VK_SUCCESS;
-
- // Process default pools.
- for(uint32_t memTypeIndex = 0;
- memTypeIndex < m_hAllocator->GetMemoryTypeCount() && res >= VK_SUCCESS;
- ++memTypeIndex)
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_DefaultPoolContexts[memTypeIndex];
- if(pBlockVectorCtx)
- {
- VMA_ASSERT(pBlockVectorCtx->GetBlockVector());
- pBlockVectorCtx->GetBlockVector()->Defragment(
- pBlockVectorCtx,
- pStats, flags,
- maxCpuBytesToMove, maxCpuAllocationsToMove,
- maxGpuBytesToMove, maxGpuAllocationsToMove,
- commandBuffer);
- if(pBlockVectorCtx->res != VK_SUCCESS)
- {
- res = pBlockVectorCtx->res;
- }
- }
- }
-
- // Process custom pools.
- for(size_t customCtxIndex = 0, customCtxCount = m_CustomPoolContexts.size();
- customCtxIndex < customCtxCount && res >= VK_SUCCESS;
- ++customCtxIndex)
- {
- VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_CustomPoolContexts[customCtxIndex];
- VMA_ASSERT(pBlockVectorCtx && pBlockVectorCtx->GetBlockVector());
- pBlockVectorCtx->GetBlockVector()->Defragment(
- pBlockVectorCtx,
- pStats, flags,
- maxCpuBytesToMove, maxCpuAllocationsToMove,
- maxGpuBytesToMove, maxGpuAllocationsToMove,
- commandBuffer);
- if(pBlockVectorCtx->res != VK_SUCCESS)
- {
- res = pBlockVectorCtx->res;
- }
- }
-
- return res;
-}
-
-VkResult VmaDefragmentationContext_T::DefragmentPassBegin(VmaDefragmentationPassInfo* pInfo)
-{
- VmaDefragmentationPassMoveInfo* pCurrentMove = pInfo->pMoves;
- uint32_t movesLeft = pInfo->moveCount;
-
- // Process default pools.
- for(uint32_t memTypeIndex = 0;
- memTypeIndex < m_hAllocator->GetMemoryTypeCount();
- ++memTypeIndex)
- {
- VmaBlockVectorDefragmentationContext *pBlockVectorCtx = m_DefaultPoolContexts[memTypeIndex];
- if(pBlockVectorCtx)
- {
- VMA_ASSERT(pBlockVectorCtx->GetBlockVector());
-
- if(!pBlockVectorCtx->hasDefragmentationPlan)
- {
- pBlockVectorCtx->GetBlockVector()->Defragment(
- pBlockVectorCtx,
- m_pStats, m_Flags,
- m_MaxCpuBytesToMove, m_MaxCpuAllocationsToMove,
- m_MaxGpuBytesToMove, m_MaxGpuAllocationsToMove,
- VK_NULL_HANDLE);
-
- if(pBlockVectorCtx->res < VK_SUCCESS)
- continue;
-
- pBlockVectorCtx->hasDefragmentationPlan = true;
- }
-
- const uint32_t processed = pBlockVectorCtx->GetBlockVector()->ProcessDefragmentations(
- pBlockVectorCtx,
- pCurrentMove, movesLeft);
-
- movesLeft -= processed;
- pCurrentMove += processed;
- }
- }
-
- // Process custom pools.
- for(size_t customCtxIndex = 0, customCtxCount = m_CustomPoolContexts.size();
- customCtxIndex < customCtxCount;
- ++customCtxIndex)
- {
- VmaBlockVectorDefragmentationContext *pBlockVectorCtx = m_CustomPoolContexts[customCtxIndex];
- VMA_ASSERT(pBlockVectorCtx && pBlockVectorCtx->GetBlockVector());
-
- if(!pBlockVectorCtx->hasDefragmentationPlan)
- {
- pBlockVectorCtx->GetBlockVector()->Defragment(
- pBlockVectorCtx,
- m_pStats, m_Flags,
- m_MaxCpuBytesToMove, m_MaxCpuAllocationsToMove,
- m_MaxGpuBytesToMove, m_MaxGpuAllocationsToMove,
- VK_NULL_HANDLE);
-
- if(pBlockVectorCtx->res < VK_SUCCESS)
- continue;
-
- pBlockVectorCtx->hasDefragmentationPlan = true;
- }
-
- const uint32_t processed = pBlockVectorCtx->GetBlockVector()->ProcessDefragmentations(
- pBlockVectorCtx,
- pCurrentMove, movesLeft);
-
- movesLeft -= processed;
- pCurrentMove += processed;
- }
-
- pInfo->moveCount = pInfo->moveCount - movesLeft;
-
- return VK_SUCCESS;
-}
-VkResult VmaDefragmentationContext_T::DefragmentPassEnd()
-{
- VkResult res = VK_SUCCESS;
-
- // Process default pools.
- for(uint32_t memTypeIndex = 0;
- memTypeIndex < m_hAllocator->GetMemoryTypeCount();
- ++memTypeIndex)
- {
- VmaBlockVectorDefragmentationContext *pBlockVectorCtx = m_DefaultPoolContexts[memTypeIndex];
- if(pBlockVectorCtx)
- {
- VMA_ASSERT(pBlockVectorCtx->GetBlockVector());
-
- if(!pBlockVectorCtx->hasDefragmentationPlan)
- {
- res = VK_NOT_READY;
- continue;
- }
-
- pBlockVectorCtx->GetBlockVector()->CommitDefragmentations(
- pBlockVectorCtx, m_pStats);
-
- if(pBlockVectorCtx->defragmentationMoves.size() != pBlockVectorCtx->defragmentationMovesCommitted)
- res = VK_NOT_READY;
- }
- }
-
- // Process custom pools.
- for(size_t customCtxIndex = 0, customCtxCount = m_CustomPoolContexts.size();
- customCtxIndex < customCtxCount;
- ++customCtxIndex)
- {
- VmaBlockVectorDefragmentationContext *pBlockVectorCtx = m_CustomPoolContexts[customCtxIndex];
- VMA_ASSERT(pBlockVectorCtx && pBlockVectorCtx->GetBlockVector());
-
- if(!pBlockVectorCtx->hasDefragmentationPlan)
- {
- res = VK_NOT_READY;
- continue;
- }
-
- pBlockVectorCtx->GetBlockVector()->CommitDefragmentations(
- pBlockVectorCtx, m_pStats);
-
- if(pBlockVectorCtx->defragmentationMoves.size() != pBlockVectorCtx->defragmentationMovesCommitted)
- res = VK_NOT_READY;
- }
-
- return res;
+ VkDeviceSize maxCpuBytesToMove, uint32_t maxCpuAllocationsToMove,
+ VkDeviceSize maxGpuBytesToMove, uint32_t maxGpuAllocationsToMove,
+ VkCommandBuffer commandBuffer, VmaDefragmentationStats* pStats)
+{
+ if(pStats)
+ {
+ memset(pStats, 0, sizeof(VmaDefragmentationStats));
+ }
+
+ if(commandBuffer == VK_NULL_HANDLE)
+ {
+ maxGpuBytesToMove = 0;
+ maxGpuAllocationsToMove = 0;
+ }
+
+ VkResult res = VK_SUCCESS;
+
+ // Process default pools.
+ for(uint32_t memTypeIndex = 0;
+ memTypeIndex < m_hAllocator->GetMemoryTypeCount() && res >= VK_SUCCESS;
+ ++memTypeIndex)
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_DefaultPoolContexts[memTypeIndex];
+ if(pBlockVectorCtx)
+ {
+ VMA_ASSERT(pBlockVectorCtx->GetBlockVector());
+ pBlockVectorCtx->GetBlockVector()->Defragment(
+ pBlockVectorCtx,
+ pStats,
+ maxCpuBytesToMove, maxCpuAllocationsToMove,
+ maxGpuBytesToMove, maxGpuAllocationsToMove,
+ commandBuffer);
+ if(pBlockVectorCtx->res != VK_SUCCESS)
+ {
+ res = pBlockVectorCtx->res;
+ }
+ }
+ }
+
+ // Process custom pools.
+ for(size_t customCtxIndex = 0, customCtxCount = m_CustomPoolContexts.size();
+ customCtxIndex < customCtxCount && res >= VK_SUCCESS;
+ ++customCtxIndex)
+ {
+ VmaBlockVectorDefragmentationContext* pBlockVectorCtx = m_CustomPoolContexts[customCtxIndex];
+ VMA_ASSERT(pBlockVectorCtx && pBlockVectorCtx->GetBlockVector());
+ pBlockVectorCtx->GetBlockVector()->Defragment(
+ pBlockVectorCtx,
+ pStats,
+ maxCpuBytesToMove, maxCpuAllocationsToMove,
+ maxGpuBytesToMove, maxGpuAllocationsToMove,
+ commandBuffer);
+ if(pBlockVectorCtx->res != VK_SUCCESS)
+ {
+ res = pBlockVectorCtx->res;
+ }
+ }
+
+ return res;
}
////////////////////////////////////////////////////////////////////////////////
@@ -14342,579 +13946,577 @@ VkResult VmaDefragmentationContext_T::DefragmentPassEnd()
#if VMA_RECORDING_ENABLED
VmaRecorder::VmaRecorder() :
- m_UseMutex(true),
- m_Flags(0),
- m_File(VMA_NULL),
- m_Freq(INT64_MAX),
- m_StartCounter(INT64_MAX)
+ m_UseMutex(true),
+ m_Flags(0),
+ m_File(VMA_NULL),
+ m_Freq(INT64_MAX),
+ m_StartCounter(INT64_MAX)
{
}
VkResult VmaRecorder::Init(const VmaRecordSettings& settings, bool useMutex)
{
- m_UseMutex = useMutex;
- m_Flags = settings.flags;
+ m_UseMutex = useMutex;
+ m_Flags = settings.flags;
- QueryPerformanceFrequency((LARGE_INTEGER*)&m_Freq);
- QueryPerformanceCounter((LARGE_INTEGER*)&m_StartCounter);
+ QueryPerformanceFrequency((LARGE_INTEGER*)&m_Freq);
+ QueryPerformanceCounter((LARGE_INTEGER*)&m_StartCounter);
- // Open file for writing.
- errno_t err = fopen_s(&m_File, settings.pFilePath, "wb");
- if(err != 0)
- {
- return VK_ERROR_INITIALIZATION_FAILED;
- }
+ // Open file for writing.
+ errno_t err = fopen_s(&m_File, settings.pFilePath, "wb");
+ if(err != 0)
+ {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
- // Write header.
- fprintf(m_File, "%s\n", "Vulkan Memory Allocator,Calls recording");
- fprintf(m_File, "%s\n", "1,8");
+ // Write header.
+ fprintf(m_File, "%s\n", "Vulkan Memory Allocator,Calls recording");
+ fprintf(m_File, "%s\n", "1,8");
- return VK_SUCCESS;
+ return VK_SUCCESS;
}
VmaRecorder::~VmaRecorder()
{
- if(m_File != VMA_NULL)
- {
- fclose(m_File);
- }
+ if(m_File != VMA_NULL)
+ {
+ fclose(m_File);
+ }
}
void VmaRecorder::RecordCreateAllocator(uint32_t frameIndex)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaCreateAllocator\n", callParams.threadId, callParams.time, frameIndex);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaCreateAllocator\n", callParams.threadId, callParams.time, frameIndex);
+ Flush();
}
void VmaRecorder::RecordDestroyAllocator(uint32_t frameIndex)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDestroyAllocator\n", callParams.threadId, callParams.time, frameIndex);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDestroyAllocator\n", callParams.threadId, callParams.time, frameIndex);
+ Flush();
}
void VmaRecorder::RecordCreatePool(uint32_t frameIndex, const VmaPoolCreateInfo& createInfo, VmaPool pool)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaCreatePool,%u,%u,%llu,%llu,%llu,%u,%p\n", callParams.threadId, callParams.time, frameIndex,
- createInfo.memoryTypeIndex,
- createInfo.flags,
- createInfo.blockSize,
- (uint64_t)createInfo.minBlockCount,
- (uint64_t)createInfo.maxBlockCount,
- createInfo.frameInUseCount,
- pool);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaCreatePool,%u,%u,%llu,%llu,%llu,%u,%p\n", callParams.threadId, callParams.time, frameIndex,
+ createInfo.memoryTypeIndex,
+ createInfo.flags,
+ createInfo.blockSize,
+ (uint64_t)createInfo.minBlockCount,
+ (uint64_t)createInfo.maxBlockCount,
+ createInfo.frameInUseCount,
+ pool);
+ Flush();
}
void VmaRecorder::RecordDestroyPool(uint32_t frameIndex, VmaPool pool)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDestroyPool,%p\n", callParams.threadId, callParams.time, frameIndex,
- pool);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDestroyPool,%p\n", callParams.threadId, callParams.time, frameIndex,
+ pool);
+ Flush();
}
void VmaRecorder::RecordAllocateMemory(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemory,%llu,%llu,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- vkMemReq.size,
- vkMemReq.alignment,
- vkMemReq.memoryTypeBits,
- createInfo.flags,
- createInfo.usage,
- createInfo.requiredFlags,
- createInfo.preferredFlags,
- createInfo.memoryTypeBits,
- createInfo.pool,
- allocation,
- userDataStr.GetString());
- Flush();
+ const VkMemoryRequirements& vkMemReq,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemory,%llu,%llu,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ vkMemReq.size,
+ vkMemReq.alignment,
+ vkMemReq.memoryTypeBits,
+ createInfo.flags,
+ createInfo.usage,
+ createInfo.requiredFlags,
+ createInfo.preferredFlags,
+ createInfo.memoryTypeBits,
+ createInfo.pool,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordAllocateMemoryPages(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- const VmaAllocationCreateInfo& createInfo,
- uint64_t allocationCount,
- const VmaAllocation* pAllocations)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryPages,%llu,%llu,%u,%u,%u,%u,%u,%u,%p,", callParams.threadId, callParams.time, frameIndex,
- vkMemReq.size,
- vkMemReq.alignment,
- vkMemReq.memoryTypeBits,
- createInfo.flags,
- createInfo.usage,
- createInfo.requiredFlags,
- createInfo.preferredFlags,
- createInfo.memoryTypeBits,
- createInfo.pool);
- PrintPointerList(allocationCount, pAllocations);
- fprintf(m_File, ",%s\n", userDataStr.GetString());
- Flush();
+ const VkMemoryRequirements& vkMemReq,
+ const VmaAllocationCreateInfo& createInfo,
+ uint64_t allocationCount,
+ const VmaAllocation* pAllocations)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryPages,%llu,%llu,%u,%u,%u,%u,%u,%u,%p,", callParams.threadId, callParams.time, frameIndex,
+ vkMemReq.size,
+ vkMemReq.alignment,
+ vkMemReq.memoryTypeBits,
+ createInfo.flags,
+ createInfo.usage,
+ createInfo.requiredFlags,
+ createInfo.preferredFlags,
+ createInfo.memoryTypeBits,
+ createInfo.pool);
+ PrintPointerList(allocationCount, pAllocations);
+ fprintf(m_File, ",%s\n", userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordAllocateMemoryForBuffer(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryForBuffer,%llu,%llu,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- vkMemReq.size,
- vkMemReq.alignment,
- vkMemReq.memoryTypeBits,
- requiresDedicatedAllocation ? 1 : 0,
- prefersDedicatedAllocation ? 1 : 0,
- createInfo.flags,
- createInfo.usage,
- createInfo.requiredFlags,
- createInfo.preferredFlags,
- createInfo.memoryTypeBits,
- createInfo.pool,
- allocation,
- userDataStr.GetString());
- Flush();
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryForBuffer,%llu,%llu,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ vkMemReq.size,
+ vkMemReq.alignment,
+ vkMemReq.memoryTypeBits,
+ requiresDedicatedAllocation ? 1 : 0,
+ prefersDedicatedAllocation ? 1 : 0,
+ createInfo.flags,
+ createInfo.usage,
+ createInfo.requiredFlags,
+ createInfo.preferredFlags,
+ createInfo.memoryTypeBits,
+ createInfo.pool,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordAllocateMemoryForImage(uint32_t frameIndex,
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- const VmaAllocationCreateInfo& createInfo,
- VmaAllocation allocation)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryForImage,%llu,%llu,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- vkMemReq.size,
- vkMemReq.alignment,
- vkMemReq.memoryTypeBits,
- requiresDedicatedAllocation ? 1 : 0,
- prefersDedicatedAllocation ? 1 : 0,
- createInfo.flags,
- createInfo.usage,
- createInfo.requiredFlags,
- createInfo.preferredFlags,
- createInfo.memoryTypeBits,
- createInfo.pool,
- allocation,
- userDataStr.GetString());
- Flush();
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ const VmaAllocationCreateInfo& createInfo,
+ VmaAllocation allocation)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(createInfo.flags, createInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaAllocateMemoryForImage,%llu,%llu,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ vkMemReq.size,
+ vkMemReq.alignment,
+ vkMemReq.memoryTypeBits,
+ requiresDedicatedAllocation ? 1 : 0,
+ prefersDedicatedAllocation ? 1 : 0,
+ createInfo.flags,
+ createInfo.usage,
+ createInfo.requiredFlags,
+ createInfo.preferredFlags,
+ createInfo.memoryTypeBits,
+ createInfo.pool,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordFreeMemory(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaFreeMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaFreeMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordFreeMemoryPages(uint32_t frameIndex,
- uint64_t allocationCount,
- const VmaAllocation* pAllocations)
+ uint64_t allocationCount,
+ const VmaAllocation* pAllocations)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaFreeMemoryPages,", callParams.threadId, callParams.time, frameIndex);
- PrintPointerList(allocationCount, pAllocations);
- fprintf(m_File, "\n");
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaFreeMemoryPages,", callParams.threadId, callParams.time, frameIndex);
+ PrintPointerList(allocationCount, pAllocations);
+ fprintf(m_File, "\n");
+ Flush();
}
void VmaRecorder::RecordSetAllocationUserData(uint32_t frameIndex,
- VmaAllocation allocation,
- const void* pUserData)
+ VmaAllocation allocation,
+ const void* pUserData)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(
- allocation->IsUserDataString() ? VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT : 0,
- pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaSetAllocationUserData,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- allocation,
- userDataStr.GetString());
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(
+ allocation->IsUserDataString() ? VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT : 0,
+ pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaSetAllocationUserData,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordCreateLostAllocation(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaCreateLostAllocation,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaCreateLostAllocation,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordMapMemory(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaMapMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaMapMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordUnmapMemory(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaUnmapMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaUnmapMemory,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordFlushAllocation(uint32_t frameIndex,
- VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
+ VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaFlushAllocation,%p,%llu,%llu\n", callParams.threadId, callParams.time, frameIndex,
- allocation,
- offset,
- size);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaFlushAllocation,%p,%llu,%llu\n", callParams.threadId, callParams.time, frameIndex,
+ allocation,
+ offset,
+ size);
+ Flush();
}
void VmaRecorder::RecordInvalidateAllocation(uint32_t frameIndex,
- VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
+ VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaInvalidateAllocation,%p,%llu,%llu\n", callParams.threadId, callParams.time, frameIndex,
- allocation,
- offset,
- size);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaInvalidateAllocation,%p,%llu,%llu\n", callParams.threadId, callParams.time, frameIndex,
+ allocation,
+ offset,
+ size);
+ Flush();
}
void VmaRecorder::RecordCreateBuffer(uint32_t frameIndex,
- const VkBufferCreateInfo& bufCreateInfo,
- const VmaAllocationCreateInfo& allocCreateInfo,
- VmaAllocation allocation)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(allocCreateInfo.flags, allocCreateInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaCreateBuffer,%u,%llu,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- bufCreateInfo.flags,
- bufCreateInfo.size,
- bufCreateInfo.usage,
- bufCreateInfo.sharingMode,
- allocCreateInfo.flags,
- allocCreateInfo.usage,
- allocCreateInfo.requiredFlags,
- allocCreateInfo.preferredFlags,
- allocCreateInfo.memoryTypeBits,
- allocCreateInfo.pool,
- allocation,
- userDataStr.GetString());
- Flush();
+ const VkBufferCreateInfo& bufCreateInfo,
+ const VmaAllocationCreateInfo& allocCreateInfo,
+ VmaAllocation allocation)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(allocCreateInfo.flags, allocCreateInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaCreateBuffer,%u,%llu,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ bufCreateInfo.flags,
+ bufCreateInfo.size,
+ bufCreateInfo.usage,
+ bufCreateInfo.sharingMode,
+ allocCreateInfo.flags,
+ allocCreateInfo.usage,
+ allocCreateInfo.requiredFlags,
+ allocCreateInfo.preferredFlags,
+ allocCreateInfo.memoryTypeBits,
+ allocCreateInfo.pool,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordCreateImage(uint32_t frameIndex,
- const VkImageCreateInfo& imageCreateInfo,
- const VmaAllocationCreateInfo& allocCreateInfo,
- VmaAllocation allocation)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- UserDataString userDataStr(allocCreateInfo.flags, allocCreateInfo.pUserData);
- fprintf(m_File, "%u,%.3f,%u,vmaCreateImage,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- imageCreateInfo.flags,
- imageCreateInfo.imageType,
- imageCreateInfo.format,
- imageCreateInfo.extent.width,
- imageCreateInfo.extent.height,
- imageCreateInfo.extent.depth,
- imageCreateInfo.mipLevels,
- imageCreateInfo.arrayLayers,
- imageCreateInfo.samples,
- imageCreateInfo.tiling,
- imageCreateInfo.usage,
- imageCreateInfo.sharingMode,
- imageCreateInfo.initialLayout,
- allocCreateInfo.flags,
- allocCreateInfo.usage,
- allocCreateInfo.requiredFlags,
- allocCreateInfo.preferredFlags,
- allocCreateInfo.memoryTypeBits,
- allocCreateInfo.pool,
- allocation,
- userDataStr.GetString());
- Flush();
+ const VkImageCreateInfo& imageCreateInfo,
+ const VmaAllocationCreateInfo& allocCreateInfo,
+ VmaAllocation allocation)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ UserDataString userDataStr(allocCreateInfo.flags, allocCreateInfo.pUserData);
+ fprintf(m_File, "%u,%.3f,%u,vmaCreateImage,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%p,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ imageCreateInfo.flags,
+ imageCreateInfo.imageType,
+ imageCreateInfo.format,
+ imageCreateInfo.extent.width,
+ imageCreateInfo.extent.height,
+ imageCreateInfo.extent.depth,
+ imageCreateInfo.mipLevels,
+ imageCreateInfo.arrayLayers,
+ imageCreateInfo.samples,
+ imageCreateInfo.tiling,
+ imageCreateInfo.usage,
+ imageCreateInfo.sharingMode,
+ imageCreateInfo.initialLayout,
+ allocCreateInfo.flags,
+ allocCreateInfo.usage,
+ allocCreateInfo.requiredFlags,
+ allocCreateInfo.preferredFlags,
+ allocCreateInfo.memoryTypeBits,
+ allocCreateInfo.pool,
+ allocation,
+ userDataStr.GetString());
+ Flush();
}
void VmaRecorder::RecordDestroyBuffer(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDestroyBuffer,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDestroyBuffer,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordDestroyImage(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDestroyImage,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDestroyImage,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordTouchAllocation(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaTouchAllocation,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaTouchAllocation,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordGetAllocationInfo(uint32_t frameIndex,
- VmaAllocation allocation)
+ VmaAllocation allocation)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaGetAllocationInfo,%p\n", callParams.threadId, callParams.time, frameIndex,
- allocation);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaGetAllocationInfo,%p\n", callParams.threadId, callParams.time, frameIndex,
+ allocation);
+ Flush();
}
void VmaRecorder::RecordMakePoolAllocationsLost(uint32_t frameIndex,
- VmaPool pool)
+ VmaPool pool)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaMakePoolAllocationsLost,%p\n", callParams.threadId, callParams.time, frameIndex,
- pool);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaMakePoolAllocationsLost,%p\n", callParams.threadId, callParams.time, frameIndex,
+ pool);
+ Flush();
}
void VmaRecorder::RecordDefragmentationBegin(uint32_t frameIndex,
- const VmaDefragmentationInfo2& info,
- VmaDefragmentationContext ctx)
-{
- CallParams callParams;
- GetBasicParams(callParams);
-
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDefragmentationBegin,%u,", callParams.threadId, callParams.time, frameIndex,
- info.flags);
- PrintPointerList(info.allocationCount, info.pAllocations);
- fprintf(m_File, ",");
- PrintPointerList(info.poolCount, info.pPools);
- fprintf(m_File, ",%llu,%u,%llu,%u,%p,%p\n",
- info.maxCpuBytesToMove,
- info.maxCpuAllocationsToMove,
- info.maxGpuBytesToMove,
- info.maxGpuAllocationsToMove,
- info.commandBuffer,
- ctx);
- Flush();
+ const VmaDefragmentationInfo2& info,
+ VmaDefragmentationContext ctx)
+{
+ CallParams callParams;
+ GetBasicParams(callParams);
+
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDefragmentationBegin,%u,", callParams.threadId, callParams.time, frameIndex,
+ info.flags);
+ PrintPointerList(info.allocationCount, info.pAllocations);
+ fprintf(m_File, ",");
+ PrintPointerList(info.poolCount, info.pPools);
+ fprintf(m_File, ",%llu,%u,%llu,%u,%p,%p\n",
+ info.maxCpuBytesToMove,
+ info.maxCpuAllocationsToMove,
+ info.maxGpuBytesToMove,
+ info.maxGpuAllocationsToMove,
+ info.commandBuffer,
+ ctx);
+ Flush();
}
void VmaRecorder::RecordDefragmentationEnd(uint32_t frameIndex,
- VmaDefragmentationContext ctx)
+ VmaDefragmentationContext ctx)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaDefragmentationEnd,%p\n", callParams.threadId, callParams.time, frameIndex,
- ctx);
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaDefragmentationEnd,%p\n", callParams.threadId, callParams.time, frameIndex,
+ ctx);
+ Flush();
}
void VmaRecorder::RecordSetPoolName(uint32_t frameIndex,
- VmaPool pool,
- const char* name)
+ VmaPool pool,
+ const char* name)
{
- CallParams callParams;
- GetBasicParams(callParams);
+ CallParams callParams;
+ GetBasicParams(callParams);
- VmaMutexLock lock(m_FileMutex, m_UseMutex);
- fprintf(m_File, "%u,%.3f,%u,vmaSetPoolName,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
- pool, name != VMA_NULL ? name : "");
- Flush();
+ VmaMutexLock lock(m_FileMutex, m_UseMutex);
+ fprintf(m_File, "%u,%.3f,%u,vmaSetPoolName,%p,%s\n", callParams.threadId, callParams.time, frameIndex,
+ pool, name != VMA_NULL ? name : "");
+ Flush();
}
VmaRecorder::UserDataString::UserDataString(VmaAllocationCreateFlags allocFlags, const void* pUserData)
{
- if(pUserData != VMA_NULL)
- {
- if((allocFlags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0)
- {
- m_Str = (const char*)pUserData;
- }
- else
- {
- sprintf_s(m_PtrStr, "%p", pUserData);
- m_Str = m_PtrStr;
- }
- }
- else
- {
- m_Str = "";
- }
+ if(pUserData != VMA_NULL)
+ {
+ if((allocFlags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0)
+ {
+ m_Str = (const char*)pUserData;
+ }
+ else
+ {
+ sprintf_s(m_PtrStr, "%p", pUserData);
+ m_Str = m_PtrStr;
+ }
+ }
+ else
+ {
+ m_Str = "";
+ }
}
void VmaRecorder::WriteConfiguration(
- const VkPhysicalDeviceProperties& devProps,
- const VkPhysicalDeviceMemoryProperties& memProps,
- uint32_t vulkanApiVersion,
- bool dedicatedAllocationExtensionEnabled,
- bool bindMemory2ExtensionEnabled,
- bool memoryBudgetExtensionEnabled,
- bool deviceCoherentMemoryExtensionEnabled)
-{
- fprintf(m_File, "Config,Begin\n");
-
- fprintf(m_File, "VulkanApiVersion,%u,%u\n", VK_VERSION_MAJOR(vulkanApiVersion), VK_VERSION_MINOR(vulkanApiVersion));
-
- fprintf(m_File, "PhysicalDevice,apiVersion,%u\n", devProps.apiVersion);
- fprintf(m_File, "PhysicalDevice,driverVersion,%u\n", devProps.driverVersion);
- fprintf(m_File, "PhysicalDevice,vendorID,%u\n", devProps.vendorID);
- fprintf(m_File, "PhysicalDevice,deviceID,%u\n", devProps.deviceID);
- fprintf(m_File, "PhysicalDevice,deviceType,%u\n", devProps.deviceType);
- fprintf(m_File, "PhysicalDevice,deviceName,%s\n", devProps.deviceName);
-
- fprintf(m_File, "PhysicalDeviceLimits,maxMemoryAllocationCount,%u\n", devProps.limits.maxMemoryAllocationCount);
- fprintf(m_File, "PhysicalDeviceLimits,bufferImageGranularity,%llu\n", devProps.limits.bufferImageGranularity);
- fprintf(m_File, "PhysicalDeviceLimits,nonCoherentAtomSize,%llu\n", devProps.limits.nonCoherentAtomSize);
-
- fprintf(m_File, "PhysicalDeviceMemory,HeapCount,%u\n", memProps.memoryHeapCount);
- for(uint32_t i = 0; i < memProps.memoryHeapCount; ++i)
- {
- fprintf(m_File, "PhysicalDeviceMemory,Heap,%u,size,%llu\n", i, memProps.memoryHeaps[i].size);
- fprintf(m_File, "PhysicalDeviceMemory,Heap,%u,flags,%u\n", i, memProps.memoryHeaps[i].flags);
- }
- fprintf(m_File, "PhysicalDeviceMemory,TypeCount,%u\n", memProps.memoryTypeCount);
- for(uint32_t i = 0; i < memProps.memoryTypeCount; ++i)
- {
- fprintf(m_File, "PhysicalDeviceMemory,Type,%u,heapIndex,%u\n", i, memProps.memoryTypes[i].heapIndex);
- fprintf(m_File, "PhysicalDeviceMemory,Type,%u,propertyFlags,%u\n", i, memProps.memoryTypes[i].propertyFlags);
- }
-
- fprintf(m_File, "Extension,VK_KHR_dedicated_allocation,%u\n", dedicatedAllocationExtensionEnabled ? 1 : 0);
- fprintf(m_File, "Extension,VK_KHR_bind_memory2,%u\n", bindMemory2ExtensionEnabled ? 1 : 0);
- fprintf(m_File, "Extension,VK_EXT_memory_budget,%u\n", memoryBudgetExtensionEnabled ? 1 : 0);
- fprintf(m_File, "Extension,VK_AMD_device_coherent_memory,%u\n", deviceCoherentMemoryExtensionEnabled ? 1 : 0);
-
- fprintf(m_File, "Macro,VMA_DEBUG_ALWAYS_DEDICATED_MEMORY,%u\n", VMA_DEBUG_ALWAYS_DEDICATED_MEMORY ? 1 : 0);
- fprintf(m_File, "Macro,VMA_DEBUG_ALIGNMENT,%llu\n", (VkDeviceSize)VMA_DEBUG_ALIGNMENT);
- fprintf(m_File, "Macro,VMA_DEBUG_MARGIN,%llu\n", (VkDeviceSize)VMA_DEBUG_MARGIN);
- fprintf(m_File, "Macro,VMA_DEBUG_INITIALIZE_ALLOCATIONS,%u\n", VMA_DEBUG_INITIALIZE_ALLOCATIONS ? 1 : 0);
- fprintf(m_File, "Macro,VMA_DEBUG_DETECT_CORRUPTION,%u\n", VMA_DEBUG_DETECT_CORRUPTION ? 1 : 0);
- fprintf(m_File, "Macro,VMA_DEBUG_GLOBAL_MUTEX,%u\n", VMA_DEBUG_GLOBAL_MUTEX ? 1 : 0);
- fprintf(m_File, "Macro,VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY,%llu\n", (VkDeviceSize)VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY);
- fprintf(m_File, "Macro,VMA_SMALL_HEAP_MAX_SIZE,%llu\n", (VkDeviceSize)VMA_SMALL_HEAP_MAX_SIZE);
- fprintf(m_File, "Macro,VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE,%llu\n", (VkDeviceSize)VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE);
-
- fprintf(m_File, "Config,End\n");
+ const VkPhysicalDeviceProperties& devProps,
+ const VkPhysicalDeviceMemoryProperties& memProps,
+ uint32_t vulkanApiVersion,
+ bool dedicatedAllocationExtensionEnabled,
+ bool bindMemory2ExtensionEnabled,
+ bool memoryBudgetExtensionEnabled)
+{
+ fprintf(m_File, "Config,Begin\n");
+
+ fprintf(m_File, "VulkanApiVersion,%u,%u\n", VK_VERSION_MAJOR(vulkanApiVersion), VK_VERSION_MINOR(vulkanApiVersion));
+
+ fprintf(m_File, "PhysicalDevice,apiVersion,%u\n", devProps.apiVersion);
+ fprintf(m_File, "PhysicalDevice,driverVersion,%u\n", devProps.driverVersion);
+ fprintf(m_File, "PhysicalDevice,vendorID,%u\n", devProps.vendorID);
+ fprintf(m_File, "PhysicalDevice,deviceID,%u\n", devProps.deviceID);
+ fprintf(m_File, "PhysicalDevice,deviceType,%u\n", devProps.deviceType);
+ fprintf(m_File, "PhysicalDevice,deviceName,%s\n", devProps.deviceName);
+
+ fprintf(m_File, "PhysicalDeviceLimits,maxMemoryAllocationCount,%u\n", devProps.limits.maxMemoryAllocationCount);
+ fprintf(m_File, "PhysicalDeviceLimits,bufferImageGranularity,%llu\n", devProps.limits.bufferImageGranularity);
+ fprintf(m_File, "PhysicalDeviceLimits,nonCoherentAtomSize,%llu\n", devProps.limits.nonCoherentAtomSize);
+
+ fprintf(m_File, "PhysicalDeviceMemory,HeapCount,%u\n", memProps.memoryHeapCount);
+ for(uint32_t i = 0; i < memProps.memoryHeapCount; ++i)
+ {
+ fprintf(m_File, "PhysicalDeviceMemory,Heap,%u,size,%llu\n", i, memProps.memoryHeaps[i].size);
+ fprintf(m_File, "PhysicalDeviceMemory,Heap,%u,flags,%u\n", i, memProps.memoryHeaps[i].flags);
+ }
+ fprintf(m_File, "PhysicalDeviceMemory,TypeCount,%u\n", memProps.memoryTypeCount);
+ for(uint32_t i = 0; i < memProps.memoryTypeCount; ++i)
+ {
+ fprintf(m_File, "PhysicalDeviceMemory,Type,%u,heapIndex,%u\n", i, memProps.memoryTypes[i].heapIndex);
+ fprintf(m_File, "PhysicalDeviceMemory,Type,%u,propertyFlags,%u\n", i, memProps.memoryTypes[i].propertyFlags);
+ }
+
+ fprintf(m_File, "Extension,VK_KHR_dedicated_allocation,%u\n", dedicatedAllocationExtensionEnabled ? 1 : 0);
+ fprintf(m_File, "Extension,VK_KHR_bind_memory2,%u\n", bindMemory2ExtensionEnabled ? 1 : 0);
+ fprintf(m_File, "Extension,VK_EXT_memory_budget,%u\n", memoryBudgetExtensionEnabled ? 1 : 0);
+
+ fprintf(m_File, "Macro,VMA_DEBUG_ALWAYS_DEDICATED_MEMORY,%u\n", VMA_DEBUG_ALWAYS_DEDICATED_MEMORY ? 1 : 0);
+ fprintf(m_File, "Macro,VMA_DEBUG_ALIGNMENT,%llu\n", (VkDeviceSize)VMA_DEBUG_ALIGNMENT);
+ fprintf(m_File, "Macro,VMA_DEBUG_MARGIN,%llu\n", (VkDeviceSize)VMA_DEBUG_MARGIN);
+ fprintf(m_File, "Macro,VMA_DEBUG_INITIALIZE_ALLOCATIONS,%u\n", VMA_DEBUG_INITIALIZE_ALLOCATIONS ? 1 : 0);
+ fprintf(m_File, "Macro,VMA_DEBUG_DETECT_CORRUPTION,%u\n", VMA_DEBUG_DETECT_CORRUPTION ? 1 : 0);
+ fprintf(m_File, "Macro,VMA_DEBUG_GLOBAL_MUTEX,%u\n", VMA_DEBUG_GLOBAL_MUTEX ? 1 : 0);
+ fprintf(m_File, "Macro,VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY,%llu\n", (VkDeviceSize)VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY);
+ fprintf(m_File, "Macro,VMA_SMALL_HEAP_MAX_SIZE,%llu\n", (VkDeviceSize)VMA_SMALL_HEAP_MAX_SIZE);
+ fprintf(m_File, "Macro,VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE,%llu\n", (VkDeviceSize)VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE);
+
+ fprintf(m_File, "Config,End\n");
}
void VmaRecorder::GetBasicParams(CallParams& outParams)
{
- outParams.threadId = GetCurrentThreadId();
+ outParams.threadId = GetCurrentThreadId();
- LARGE_INTEGER counter;
- QueryPerformanceCounter(&counter);
- outParams.time = (double)(counter.QuadPart - m_StartCounter) / (double)m_Freq;
+ LARGE_INTEGER counter;
+ QueryPerformanceCounter(&counter);
+ outParams.time = (double)(counter.QuadPart - m_StartCounter) / (double)m_Freq;
}
void VmaRecorder::PrintPointerList(uint64_t count, const VmaAllocation* pItems)
{
- if(count)
- {
- fprintf(m_File, "%p", pItems[0]);
- for(uint64_t i = 1; i < count; ++i)
- {
- fprintf(m_File, " %p", pItems[i]);
- }
- }
+ if(count)
+ {
+ fprintf(m_File, "%p", pItems[0]);
+ for(uint64_t i = 1; i < count; ++i)
+ {
+ fprintf(m_File, " %p", pItems[i]);
+ }
+ }
}
void VmaRecorder::Flush()
{
- if((m_Flags & VMA_RECORD_FLUSH_AFTER_CALL_BIT) != 0)
- {
- fflush(m_File);
- }
+ if((m_Flags & VMA_RECORD_FLUSH_AFTER_CALL_BIT) != 0)
+ {
+ fflush(m_File);
+ }
}
#endif // #if VMA_RECORDING_ENABLED
@@ -14923,1878 +14525,1836 @@ void VmaRecorder::Flush()
// VmaAllocationObjectAllocator
VmaAllocationObjectAllocator::VmaAllocationObjectAllocator(const VkAllocationCallbacks* pAllocationCallbacks) :
- m_Allocator(pAllocationCallbacks, 1024)
+ m_Allocator(pAllocationCallbacks, 1024)
{
}
-template<typename... Types> VmaAllocation VmaAllocationObjectAllocator::Allocate(Types... args)
+VmaAllocation VmaAllocationObjectAllocator::Allocate()
{
- VmaMutexLock mutexLock(m_Mutex);
- return m_Allocator.Alloc<Types...>(std::forward<Types>(args)...);
+ VmaMutexLock mutexLock(m_Mutex);
+ return m_Allocator.Alloc();
}
void VmaAllocationObjectAllocator::Free(VmaAllocation hAlloc)
{
- VmaMutexLock mutexLock(m_Mutex);
- m_Allocator.Free(hAlloc);
+ VmaMutexLock mutexLock(m_Mutex);
+ m_Allocator.Free(hAlloc);
}
////////////////////////////////////////////////////////////////////////////////
// VmaAllocator_T
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_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_PreferredLargeHeapBlockSize(0),
- m_PhysicalDevice(pCreateInfo->physicalDevice),
- m_CurrentFrameIndex(0),
- m_GpuDefragmentationMemoryTypeBits(UINT32_MAX),
- m_Pools(VmaStlAllocator<VmaPool>(GetAllocationCallbacks())),
- m_NextPoolId(0),
- m_GlobalMemoryTypeBits(UINT32_MAX)
+ 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_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_PreferredLargeHeapBlockSize(0),
+ m_PhysicalDevice(pCreateInfo->physicalDevice),
+ m_CurrentFrameIndex(0),
+ m_GpuDefragmentationMemoryTypeBits(UINT32_MAX),
+ m_Pools(VmaStlAllocator<VmaPool>(GetAllocationCallbacks())),
+ m_NextPoolId(0)
#if VMA_RECORDING_ENABLED
- ,m_pRecorder(VMA_NULL)
+ ,m_pRecorder(VMA_NULL)
#endif
{
- if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
- {
- m_UseKhrDedicatedAllocation = false;
- m_UseKhrBindMemory2 = false;
- }
+ 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);
- }
+ 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);
+ VMA_ASSERT(pCreateInfo->physicalDevice && pCreateInfo->device);
- if(m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0))
- {
+ 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.");
- }
+ 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.");
- }
+ 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.");
- }
+ 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_VULKAN_VERSION < 1001000
- if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
- {
- VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
- }
+ if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
+ {
+ VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
+ }
#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_pDedicatedAllocations, 0, sizeof(m_pDedicatedAllocations));
- memset(&m_VulkanFunctions, 0, sizeof(m_VulkanFunctions));
-
- if(pCreateInfo->pDeviceMemoryCallbacks != VMA_NULL)
- {
- 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_DEBUG_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<VkDeviceSize>(VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE);
-
- m_GlobalMemoryTypeBits = CalculateGlobalMemoryTypeBits();
-
- 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)
- {
- const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(memTypeIndex);
-
- m_pBlockVectors[memTypeIndex] = vma_new(this, VmaBlockVector)(
- this,
- VK_NULL_HANDLE, // hParentPool
- memTypeIndex,
- preferredBlockSize,
- 0,
- SIZE_MAX,
- GetBufferImageGranularity(),
- pCreateInfo->frameInUseCount,
- false, // explicitBlockSize
- false); // linearAlgorithm
- // No need to call m_pBlockVectors[memTypeIndex][blockVectorTypeIndex]->CreateMinBlocks here,
- // becase minBlockCount is 0.
- m_pDedicatedAllocations[memTypeIndex] = vma_new(this, AllocationVectorType)(VmaStlAllocator<VmaAllocation>(GetAllocationCallbacks()));
-
- }
+ 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_pDedicatedAllocations, 0, sizeof(m_pDedicatedAllocations));
+ memset(&m_VulkanFunctions, 0, sizeof(m_VulkanFunctions));
+
+ if(pCreateInfo->pDeviceMemoryCallbacks != VMA_NULL)
+ {
+ 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_DEBUG_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<VkDeviceSize>(VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE);
+
+ 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)
+ {
+ const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(memTypeIndex);
+
+ m_pBlockVectors[memTypeIndex] = vma_new(this, VmaBlockVector)(
+ this,
+ VK_NULL_HANDLE, // hParentPool
+ memTypeIndex,
+ preferredBlockSize,
+ 0,
+ SIZE_MAX,
+ GetBufferImageGranularity(),
+ pCreateInfo->frameInUseCount,
+ false, // explicitBlockSize
+ false); // linearAlgorithm
+ // No need to call m_pBlockVectors[memTypeIndex][blockVectorTypeIndex]->CreateMinBlocks here,
+ // becase minBlockCount is 0.
+ m_pDedicatedAllocations[memTypeIndex] = vma_new(this, AllocationVectorType)(VmaStlAllocator<VmaAllocation>(GetAllocationCallbacks()));
+
+ }
}
VkResult VmaAllocator_T::Init(const VmaAllocatorCreateInfo* pCreateInfo)
{
- VkResult res = VK_SUCCESS;
+ VkResult res = VK_SUCCESS;
- if(pCreateInfo->pRecordSettings != VMA_NULL &&
- !VmaStrIsEmpty(pCreateInfo->pRecordSettings->pFilePath))
- {
+ if(pCreateInfo->pRecordSettings != VMA_NULL &&
+ !VmaStrIsEmpty(pCreateInfo->pRecordSettings->pFilePath))
+ {
#if VMA_RECORDING_ENABLED
- m_pRecorder = vma_new(this, VmaRecorder)();
- res = m_pRecorder->Init(*pCreateInfo->pRecordSettings, m_UseMutex);
- if(res != VK_SUCCESS)
- {
- return res;
- }
- m_pRecorder->WriteConfiguration(
- m_PhysicalDeviceProperties,
- m_MemProps,
- m_VulkanApiVersion,
- m_UseKhrDedicatedAllocation,
- m_UseKhrBindMemory2,
- m_UseExtMemoryBudget,
- m_UseAmdDeviceCoherentMemory);
- m_pRecorder->RecordCreateAllocator(GetCurrentFrameIndex());
+ m_pRecorder = vma_new(this, VmaRecorder)();
+ res = m_pRecorder->Init(*pCreateInfo->pRecordSettings, m_UseMutex);
+ if(res != VK_SUCCESS)
+ {
+ return res;
+ }
+ m_pRecorder->WriteConfiguration(
+ m_PhysicalDeviceProperties,
+ m_MemProps,
+ m_VulkanApiVersion,
+ m_UseKhrDedicatedAllocation,
+ m_UseKhrBindMemory2,
+ m_UseExtMemoryBudget);
+ m_pRecorder->RecordCreateAllocator(GetCurrentFrameIndex());
#else
- VMA_ASSERT(0 && "VmaAllocatorCreateInfo::pRecordSettings used, but not supported due to VMA_RECORDING_ENABLED not defined to 1.");
- return VK_ERROR_FEATURE_NOT_PRESENT;
+ VMA_ASSERT(0 && "VmaAllocatorCreateInfo::pRecordSettings used, but not supported due to VMA_RECORDING_ENABLED not defined to 1.");
+ return VK_ERROR_FEATURE_NOT_PRESENT;
#endif
- }
+ }
#if VMA_MEMORY_BUDGET
- if(m_UseExtMemoryBudget)
- {
- UpdateVulkanBudget();
- }
+ if(m_UseExtMemoryBudget)
+ {
+ UpdateVulkanBudget();
+ }
#endif // #if VMA_MEMORY_BUDGET
- return res;
+ return res;
}
VmaAllocator_T::~VmaAllocator_T()
{
#if VMA_RECORDING_ENABLED
- if(m_pRecorder != VMA_NULL)
- {
- m_pRecorder->RecordDestroyAllocator(GetCurrentFrameIndex());
- vma_delete(this, m_pRecorder);
- }
+ if(m_pRecorder != VMA_NULL)
+ {
+ m_pRecorder->RecordDestroyAllocator(GetCurrentFrameIndex());
+ vma_delete(this, m_pRecorder);
+ }
#endif
-
- VMA_ASSERT(m_Pools.empty());
+
+ VMA_ASSERT(m_Pools.empty());
- for(size_t i = GetMemoryTypeCount(); i--; )
- {
- if(m_pDedicatedAllocations[i] != VMA_NULL && !m_pDedicatedAllocations[i]->empty())
- {
- VMA_ASSERT(0 && "Unfreed dedicated allocations found.");
- }
+ for(size_t i = GetMemoryTypeCount(); i--; )
+ {
+ if(m_pDedicatedAllocations[i] != VMA_NULL && !m_pDedicatedAllocations[i]->empty())
+ {
+ VMA_ASSERT(0 && "Unfreed dedicated allocations found.");
+ }
- vma_delete(this, m_pDedicatedAllocations[i]);
- vma_delete(this, m_pBlockVectors[i]);
- }
+ vma_delete(this, m_pDedicatedAllocations[i]);
+ vma_delete(this, m_pBlockVectors[i]);
+ }
}
void VmaAllocator_T::ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions)
{
#if VMA_STATIC_VULKAN_FUNCTIONS == 1
- 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;
+ 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;
#if VMA_VULKAN_VERSION >= 1001000
- if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
- {
- VMA_ASSERT(m_hInstance != VK_NULL_HANDLE);
- m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR =
- (PFN_vkGetBufferMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetBufferMemoryRequirements2");
- m_VulkanFunctions.vkGetImageMemoryRequirements2KHR =
- (PFN_vkGetImageMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetImageMemoryRequirements2");
- m_VulkanFunctions.vkBindBufferMemory2KHR =
- (PFN_vkBindBufferMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindBufferMemory2");
- m_VulkanFunctions.vkBindImageMemory2KHR =
- (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindImageMemory2");
- m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR =
- (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetInstanceProcAddr(m_hInstance, "vkGetPhysicalDeviceMemoryProperties2");
- }
+ if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
+ {
+ VMA_ASSERT(m_hInstance != VK_NULL_HANDLE);
+ m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR =
+ (PFN_vkGetBufferMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetBufferMemoryRequirements2");
+ m_VulkanFunctions.vkGetImageMemoryRequirements2KHR =
+ (PFN_vkGetImageMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetImageMemoryRequirements2");
+ m_VulkanFunctions.vkBindBufferMemory2KHR =
+ (PFN_vkBindBufferMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindBufferMemory2");
+ m_VulkanFunctions.vkBindImageMemory2KHR =
+ (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindImageMemory2");
+ m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR =
+ (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetInstanceProcAddr(m_hInstance, "vkGetPhysicalDeviceMemoryProperties2");
+ }
#endif
#if VMA_DEDICATED_ALLOCATION
- if(m_UseKhrDedicatedAllocation)
- {
- m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR =
- (PFN_vkGetBufferMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetBufferMemoryRequirements2KHR");
- m_VulkanFunctions.vkGetImageMemoryRequirements2KHR =
- (PFN_vkGetImageMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetImageMemoryRequirements2KHR");
- }
+ if(m_UseKhrDedicatedAllocation)
+ {
+ m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR =
+ (PFN_vkGetBufferMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetBufferMemoryRequirements2KHR");
+ m_VulkanFunctions.vkGetImageMemoryRequirements2KHR =
+ (PFN_vkGetImageMemoryRequirements2KHR)vkGetDeviceProcAddr(m_hDevice, "vkGetImageMemoryRequirements2KHR");
+ }
#endif
#if VMA_BIND_MEMORY2
- if(m_UseKhrBindMemory2)
- {
- m_VulkanFunctions.vkBindBufferMemory2KHR =
- (PFN_vkBindBufferMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindBufferMemory2KHR");
- m_VulkanFunctions.vkBindImageMemory2KHR =
- (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindImageMemory2KHR");
- }
+ if(m_UseKhrBindMemory2)
+ {
+ m_VulkanFunctions.vkBindBufferMemory2KHR =
+ (PFN_vkBindBufferMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindBufferMemory2KHR");
+ m_VulkanFunctions.vkBindImageMemory2KHR =
+ (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(m_hDevice, "vkBindImageMemory2KHR");
+ }
#endif // #if VMA_BIND_MEMORY2
#if VMA_MEMORY_BUDGET
- if(m_UseExtMemoryBudget && m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0))
- {
- VMA_ASSERT(m_hInstance != VK_NULL_HANDLE);
- m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR =
- (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetInstanceProcAddr(m_hInstance, "vkGetPhysicalDeviceMemoryProperties2KHR");
- }
+ if(m_UseExtMemoryBudget && m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0))
+ {
+ VMA_ASSERT(m_hInstance != VK_NULL_HANDLE);
+ m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR =
+ (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetInstanceProcAddr(m_hInstance, "vkGetPhysicalDeviceMemoryProperties2KHR");
+ }
#endif // #if VMA_MEMORY_BUDGET
#endif // #if VMA_STATIC_VULKAN_FUNCTIONS == 1
#define VMA_COPY_IF_NOT_NULL(funcName) \
- if(pVulkanFunctions->funcName != VMA_NULL) m_VulkanFunctions.funcName = pVulkanFunctions->funcName;
-
- if(pVulkanFunctions != VMA_NULL)
- {
- 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(pVulkanFunctions->funcName != VMA_NULL) m_VulkanFunctions.funcName = pVulkanFunctions->funcName;
+
+ if(pVulkanFunctions != VMA_NULL)
+ {
+ 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);
+ 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);
+ VMA_COPY_IF_NOT_NULL(vkBindBufferMemory2KHR);
+ VMA_COPY_IF_NOT_NULL(vkBindImageMemory2KHR);
#endif
#if VMA_MEMORY_BUDGET
- VMA_COPY_IF_NOT_NULL(vkGetPhysicalDeviceMemoryProperties2KHR);
+ VMA_COPY_IF_NOT_NULL(vkGetPhysicalDeviceMemoryProperties2KHR);
#endif
- }
+ }
#undef VMA_COPY_IF_NOT_NULL
- // If these asserts are hit, you must either #define VMA_STATIC_VULKAN_FUNCTIONS 1
- // or pass valid pointers as VmaAllocatorCreateInfo::pVulkanFunctions.
- 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 these asserts are hit, you must either #define VMA_STATIC_VULKAN_FUNCTIONS 1
+ // or pass valid pointers as VmaAllocatorCreateInfo::pVulkanFunctions.
+ 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);
- }
+ 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);
- }
+ 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);
- }
+ if(m_UseExtMemoryBudget || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
+ {
+ VMA_ASSERT(m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR != VMA_NULL);
+ }
#endif
}
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);
+ 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(
- VkDeviceSize size,
- VkDeviceSize alignment,
- bool dedicatedAllocation,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- const VmaAllocationCreateInfo& createInfo,
- uint32_t memTypeIndex,
- VmaSuballocationType suballocType,
- size_t allocationCount,
- VmaAllocation* pAllocations)
-{
- VMA_ASSERT(pAllocations != VMA_NULL);
- VMA_DEBUG_LOG(" AllocateMemory: MemoryTypeIndex=%u, AllocationCount=%zu, Size=%llu", memTypeIndex, allocationCount, size);
-
- VmaAllocationCreateInfo finalCreateInfo = createInfo;
-
- // If memory type is not HOST_VISIBLE, disable MAPPED.
- if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
- (m_MemProps.memoryTypes[memTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
- {
- finalCreateInfo.flags &= ~VMA_ALLOCATION_CREATE_MAPPED_BIT;
- }
- // If memory is lazily allocated, it should be always dedicated.
- if(finalCreateInfo.usage == VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED)
- {
- finalCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
- }
-
- VmaBlockVector* const blockVector = m_pBlockVectors[memTypeIndex];
- VMA_ASSERT(blockVector);
-
- const VkDeviceSize preferredBlockSize = blockVector->GetPreferredBlockSize();
- bool preferDedicatedMemory =
- VMA_DEBUG_ALWAYS_DEDICATED_MEMORY ||
- dedicatedAllocation ||
- // Heuristics: Allocate dedicated memory if requested size if greater than half of preferred block size.
- size > preferredBlockSize / 2;
-
- if(preferDedicatedMemory &&
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0 &&
- finalCreateInfo.pool == VK_NULL_HANDLE)
- {
- finalCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
- }
-
- if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0)
- {
- if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
- {
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- else
- {
- return AllocateDedicatedMemory(
- size,
- suballocType,
- memTypeIndex,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0,
- finalCreateInfo.pUserData,
- dedicatedBuffer,
- dedicatedImage,
- allocationCount,
- pAllocations);
- }
- }
- else
- {
- VkResult res = blockVector->Allocate(
- m_CurrentFrameIndex.load(),
- size,
- alignment,
- finalCreateInfo,
- suballocType,
- allocationCount,
- pAllocations);
- if(res == VK_SUCCESS)
- {
- return res;
- }
-
- // 5. Try dedicated memory.
- if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
- {
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- else
- {
- res = AllocateDedicatedMemory(
- size,
- suballocType,
- memTypeIndex,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0,
- (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0,
- finalCreateInfo.pUserData,
- dedicatedBuffer,
- dedicatedImage,
- allocationCount,
- pAllocations);
- if(res == VK_SUCCESS)
- {
- // Succeeded: AllocateDedicatedMemory function already filld pMemory, nothing more to do here.
- VMA_DEBUG_LOG(" Allocated as DedicatedMemory");
- return VK_SUCCESS;
- }
- else
- {
- // Everything failed: Return error code.
- VMA_DEBUG_LOG(" vkAllocateMemory FAILED");
- return res;
- }
- }
- }
+ VkDeviceSize size,
+ VkDeviceSize alignment,
+ bool dedicatedAllocation,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ const VmaAllocationCreateInfo& createInfo,
+ uint32_t memTypeIndex,
+ VmaSuballocationType suballocType,
+ size_t allocationCount,
+ VmaAllocation* pAllocations)
+{
+ VMA_ASSERT(pAllocations != VMA_NULL);
+ VMA_DEBUG_LOG(" AllocateMemory: MemoryTypeIndex=%u, AllocationCount=%zu, Size=%llu", memTypeIndex, allocationCount, size);
+
+ VmaAllocationCreateInfo finalCreateInfo = createInfo;
+
+ // If memory type is not HOST_VISIBLE, disable MAPPED.
+ if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
+ (m_MemProps.memoryTypes[memTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
+ {
+ finalCreateInfo.flags &= ~VMA_ALLOCATION_CREATE_MAPPED_BIT;
+ }
+ // If memory is lazily allocated, it should be always dedicated.
+ if(finalCreateInfo.usage == VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED)
+ {
+ finalCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
+ }
+
+ VmaBlockVector* const blockVector = m_pBlockVectors[memTypeIndex];
+ VMA_ASSERT(blockVector);
+
+ const VkDeviceSize preferredBlockSize = blockVector->GetPreferredBlockSize();
+ bool preferDedicatedMemory =
+ VMA_DEBUG_ALWAYS_DEDICATED_MEMORY ||
+ dedicatedAllocation ||
+ // Heuristics: Allocate dedicated memory if requested size if greater than half of preferred block size.
+ size > preferredBlockSize / 2;
+
+ if(preferDedicatedMemory &&
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0 &&
+ finalCreateInfo.pool == VK_NULL_HANDLE)
+ {
+ finalCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
+ }
+
+ if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0)
+ {
+ if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
+ {
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ else
+ {
+ return AllocateDedicatedMemory(
+ size,
+ suballocType,
+ memTypeIndex,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0,
+ finalCreateInfo.pUserData,
+ dedicatedBuffer,
+ dedicatedImage,
+ allocationCount,
+ pAllocations);
+ }
+ }
+ else
+ {
+ VkResult res = blockVector->Allocate(
+ m_CurrentFrameIndex.load(),
+ size,
+ alignment,
+ finalCreateInfo,
+ suballocType,
+ allocationCount,
+ pAllocations);
+ if(res == VK_SUCCESS)
+ {
+ return res;
+ }
+
+ // 5. Try dedicated memory.
+ if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
+ {
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ else
+ {
+ res = AllocateDedicatedMemory(
+ size,
+ suballocType,
+ memTypeIndex,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0,
+ (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0,
+ finalCreateInfo.pUserData,
+ dedicatedBuffer,
+ dedicatedImage,
+ allocationCount,
+ pAllocations);
+ if(res == VK_SUCCESS)
+ {
+ // Succeeded: AllocateDedicatedMemory function already filld pMemory, nothing more to do here.
+ VMA_DEBUG_LOG(" Allocated as DedicatedMemory");
+ return VK_SUCCESS;
+ }
+ else
+ {
+ // Everything failed: Return error code.
+ VMA_DEBUG_LOG(" vkAllocateMemory FAILED");
+ return res;
+ }
+ }
+ }
}
VkResult VmaAllocator_T::AllocateDedicatedMemory(
- VkDeviceSize size,
- VmaSuballocationType suballocType,
- uint32_t memTypeIndex,
- bool withinBudget,
- bool map,
- bool isUserDataString,
- void* pUserData,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- size_t allocationCount,
- VmaAllocation* pAllocations)
-{
- VMA_ASSERT(allocationCount > 0 && pAllocations);
-
- if(withinBudget)
- {
- const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex);
- VmaBudget heapBudget = {};
- GetBudget(&heapBudget, heapIndex, 1);
- if(heapBudget.usage + size * allocationCount > heapBudget.budget)
- {
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- }
-
- VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
- allocInfo.memoryTypeIndex = memTypeIndex;
- allocInfo.allocationSize = size;
+ VkDeviceSize size,
+ VmaSuballocationType suballocType,
+ uint32_t memTypeIndex,
+ bool withinBudget,
+ bool map,
+ bool isUserDataString,
+ void* pUserData,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ size_t allocationCount,
+ VmaAllocation* pAllocations)
+{
+ VMA_ASSERT(allocationCount > 0 && pAllocations);
+
+ if(withinBudget)
+ {
+ const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex);
+ VmaBudget heapBudget = {};
+ GetBudget(&heapBudget, heapIndex, 1);
+ if(heapBudget.usage + size * allocationCount > heapBudget.budget)
+ {
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ }
+
+ VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
+ allocInfo.memoryTypeIndex = memTypeIndex;
+ allocInfo.allocationSize = size;
#if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000
- VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
- 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;
- allocInfo.pNext = &dedicatedAllocInfo;
- }
- else if(dedicatedImage != VK_NULL_HANDLE)
- {
- dedicatedAllocInfo.image = dedicatedImage;
- allocInfo.pNext = &dedicatedAllocInfo;
- }
- }
+ VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
+ 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;
+ allocInfo.pNext = &dedicatedAllocInfo;
+ }
+ else if(dedicatedImage != VK_NULL_HANDLE)
+ {
+ dedicatedAllocInfo.image = dedicatedImage;
+ allocInfo.pNext = &dedicatedAllocInfo;
+ }
+ }
#endif // #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000
- size_t allocIndex;
- VkResult res = VK_SUCCESS;
- for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
- {
- res = AllocateDedicatedMemoryPage(
- size,
- suballocType,
- memTypeIndex,
- allocInfo,
- map,
- isUserDataString,
- pUserData,
- pAllocations + allocIndex);
- if(res != VK_SUCCESS)
- {
- break;
- }
- }
-
- if(res == VK_SUCCESS)
- {
- // Register them in m_pDedicatedAllocations.
- {
- VmaMutexLockWrite lock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
- AllocationVectorType* pDedicatedAllocations = m_pDedicatedAllocations[memTypeIndex];
- VMA_ASSERT(pDedicatedAllocations);
- for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
- {
- VmaVectorInsertSorted<VmaPointerLess>(*pDedicatedAllocations, pAllocations[allocIndex]);
- }
- }
-
- VMA_DEBUG_LOG(" Allocated DedicatedMemory Count=%zu, MemoryTypeIndex=#%u", 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());
- currAlloc->SetUserData(this, VMA_NULL);
- m_AllocationObjectAllocator.Free(currAlloc);
- }
-
- memset(pAllocations, 0, sizeof(VmaAllocation) * allocationCount);
- }
-
- return res;
+ size_t allocIndex;
+ VkResult res = VK_SUCCESS;
+ for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
+ {
+ res = AllocateDedicatedMemoryPage(
+ size,
+ suballocType,
+ memTypeIndex,
+ allocInfo,
+ map,
+ isUserDataString,
+ pUserData,
+ pAllocations + allocIndex);
+ if(res != VK_SUCCESS)
+ {
+ break;
+ }
+ }
+
+ if(res == VK_SUCCESS)
+ {
+ // Register them in m_pDedicatedAllocations.
+ {
+ VmaMutexLockWrite lock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
+ AllocationVectorType* pDedicatedAllocations = m_pDedicatedAllocations[memTypeIndex];
+ VMA_ASSERT(pDedicatedAllocations);
+ for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex)
+ {
+ VmaVectorInsertSorted<VmaPointerLess>(*pDedicatedAllocations, pAllocations[allocIndex]);
+ }
+ }
+
+ VMA_DEBUG_LOG(" Allocated DedicatedMemory Count=%zu, MemoryTypeIndex=#%u", 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());
+ currAlloc->SetUserData(this, VMA_NULL);
+ currAlloc->Dtor();
+ m_AllocationObjectAllocator.Free(currAlloc);
+ }
+
+ memset(pAllocations, 0, sizeof(VmaAllocation) * allocationCount);
+ }
+
+ return res;
}
VkResult VmaAllocator_T::AllocateDedicatedMemoryPage(
- VkDeviceSize size,
- VmaSuballocationType suballocType,
- uint32_t memTypeIndex,
- const VkMemoryAllocateInfo& allocInfo,
- bool map,
- bool isUserDataString,
- 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(m_CurrentFrameIndex.load(), isUserDataString);
- (*pAllocation)->InitDedicatedAllocation(memTypeIndex, hMemory, suballocType, pMappedData, size);
- (*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;
+ VkDeviceSize size,
+ VmaSuballocationType suballocType,
+ uint32_t memTypeIndex,
+ const VkMemoryAllocateInfo& allocInfo,
+ bool map,
+ bool isUserDataString,
+ 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();
+ (*pAllocation)->Ctor(m_CurrentFrameIndex.load(), isUserDataString);
+ (*pAllocation)->InitDedicatedAllocation(memTypeIndex, hMemory, suballocType, pMappedData, size);
+ (*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
+ 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;
+ 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 };
+ VkMemoryDedicatedRequirementsKHR memDedicatedReq = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR };
- VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR };
- memReq2.pNext = &memDedicatedReq;
+ VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR };
+ memReq2.pNext = &memDedicatedReq;
- (*m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2);
+ (*m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2);
- memReq = memReq2.memoryRequirements;
- requiresDedicatedAllocation = (memDedicatedReq.requiresDedicatedAllocation != VK_FALSE);
- prefersDedicatedAllocation = (memDedicatedReq.prefersDedicatedAllocation != VK_FALSE);
- }
- else
+ 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;
- }
+ {
+ (*m_VulkanFunctions.vkGetBufferMemoryRequirements)(m_hDevice, hBuffer, &memReq);
+ requiresDedicatedAllocation = false;
+ prefersDedicatedAllocation = false;
+ }
}
void VmaAllocator_T::GetImageMemoryRequirements(
- VkImage hImage,
- VkMemoryRequirements& memReq,
- bool& requiresDedicatedAllocation,
- bool& prefersDedicatedAllocation) const
+ 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;
+ 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 };
+ VkMemoryDedicatedRequirementsKHR memDedicatedReq = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR };
- VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR };
- memReq2.pNext = &memDedicatedReq;
+ VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR };
+ memReq2.pNext = &memDedicatedReq;
- (*m_VulkanFunctions.vkGetImageMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2);
+ (*m_VulkanFunctions.vkGetImageMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2);
- memReq = memReq2.memoryRequirements;
- requiresDedicatedAllocation = (memDedicatedReq.requiresDedicatedAllocation != VK_FALSE);
- prefersDedicatedAllocation = (memDedicatedReq.prefersDedicatedAllocation != VK_FALSE);
- }
- else
+ 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;
- }
+ {
+ (*m_VulkanFunctions.vkGetImageMemoryRequirements)(m_hDevice, hImage, &memReq);
+ requiresDedicatedAllocation = false;
+ prefersDedicatedAllocation = false;
+ }
}
VkResult VmaAllocator_T::AllocateMemory(
- const VkMemoryRequirements& vkMemReq,
- bool requiresDedicatedAllocation,
- bool prefersDedicatedAllocation,
- VkBuffer dedicatedBuffer,
- VkImage dedicatedImage,
- 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_VALIDATION_FAILED_EXT;
- }
- if((createInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0 &&
- (createInfo.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_OUT_OF_DEVICE_MEMORY;
- }
- if((createInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
- (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0)
- {
- VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_MAPPED_BIT together with VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT is invalid.");
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- if(requiresDedicatedAllocation)
- {
- if((createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
- {
- VMA_ASSERT(0 && "VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT specified while dedicated allocation is required.");
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- if(createInfo.pool != VK_NULL_HANDLE)
- {
- VMA_ASSERT(0 && "Pool specified while dedicated allocation is required.");
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- }
- if((createInfo.pool != VK_NULL_HANDLE) &&
- ((createInfo.flags & (VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT)) != 0))
- {
- VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT when pool != null is invalid.");
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
-
- if(createInfo.pool != VK_NULL_HANDLE)
- {
- const VkDeviceSize alignmentForPool = VMA_MAX(
- vkMemReq.alignment,
- GetMemoryTypeMinAlignment(createInfo.pool->m_BlockVector.GetMemoryTypeIndex()));
-
- VmaAllocationCreateInfo createInfoForPool = createInfo;
- // If memory type is not HOST_VISIBLE, disable MAPPED.
- if((createInfoForPool.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
- (m_MemProps.memoryTypes[createInfo.pool->m_BlockVector.GetMemoryTypeIndex()].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
- {
- createInfoForPool.flags &= ~VMA_ALLOCATION_CREATE_MAPPED_BIT;
- }
-
- return createInfo.pool->m_BlockVector.Allocate(
- m_CurrentFrameIndex.load(),
- vkMemReq.size,
- alignmentForPool,
- createInfoForPool,
- suballocType,
- allocationCount,
- pAllocations);
- }
- else
- {
- // Bit mask of memory Vulkan types acceptable for this allocation.
- uint32_t memoryTypeBits = vkMemReq.memoryTypeBits;
- uint32_t memTypeIndex = UINT32_MAX;
- VkResult res = vmaFindMemoryTypeIndex(this, memoryTypeBits, &createInfo, &memTypeIndex);
- if(res == VK_SUCCESS)
- {
- VkDeviceSize alignmentForMemType = VMA_MAX(
- vkMemReq.alignment,
- GetMemoryTypeMinAlignment(memTypeIndex));
-
- res = AllocateMemoryOfType(
- vkMemReq.size,
- alignmentForMemType,
- requiresDedicatedAllocation || prefersDedicatedAllocation,
- dedicatedBuffer,
- dedicatedImage,
- createInfo,
- memTypeIndex,
- suballocType,
- allocationCount,
- pAllocations);
- // Succeeded on first try.
- if(res == VK_SUCCESS)
- {
- return res;
- }
- // Allocation from this memory type failed. Try other compatible memory types.
- else
- {
- for(;;)
- {
- // Remove old memTypeIndex from list of possibilities.
- memoryTypeBits &= ~(1u << memTypeIndex);
- // Find alternative memTypeIndex.
- res = vmaFindMemoryTypeIndex(this, memoryTypeBits, &createInfo, &memTypeIndex);
- if(res == VK_SUCCESS)
- {
- alignmentForMemType = VMA_MAX(
- vkMemReq.alignment,
- GetMemoryTypeMinAlignment(memTypeIndex));
-
- res = AllocateMemoryOfType(
- vkMemReq.size,
- alignmentForMemType,
- requiresDedicatedAllocation || prefersDedicatedAllocation,
- dedicatedBuffer,
- dedicatedImage,
- createInfo,
- memTypeIndex,
- suballocType,
- allocationCount,
- pAllocations);
- // Allocation from this alternative memory type succeeded.
- if(res == VK_SUCCESS)
- {
- return res;
- }
- // else: Allocation from this memory type failed. Try next one - next loop iteration.
- }
- // No other matching memory type index could be found.
- else
- {
- // Not returning res, which is VK_ERROR_FEATURE_NOT_PRESENT, because we already failed to allocate once.
- return VK_ERROR_OUT_OF_DEVICE_MEMORY;
- }
- }
- }
- }
- // Can't find any single memory type maching requirements. res is VK_ERROR_FEATURE_NOT_PRESENT.
- else
- return res;
- }
+ const VkMemoryRequirements& vkMemReq,
+ bool requiresDedicatedAllocation,
+ bool prefersDedicatedAllocation,
+ VkBuffer dedicatedBuffer,
+ VkImage dedicatedImage,
+ 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_VALIDATION_FAILED_EXT;
+ }
+ if((createInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0 &&
+ (createInfo.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_OUT_OF_DEVICE_MEMORY;
+ }
+ if((createInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
+ (createInfo.flags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0)
+ {
+ VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_MAPPED_BIT together with VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT is invalid.");
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ if(requiresDedicatedAllocation)
+ {
+ if((createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0)
+ {
+ VMA_ASSERT(0 && "VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT specified while dedicated allocation is required.");
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ if(createInfo.pool != VK_NULL_HANDLE)
+ {
+ VMA_ASSERT(0 && "Pool specified while dedicated allocation is required.");
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ }
+ if((createInfo.pool != VK_NULL_HANDLE) &&
+ ((createInfo.flags & (VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT)) != 0))
+ {
+ VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT when pool != null is invalid.");
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+
+ if(createInfo.pool != VK_NULL_HANDLE)
+ {
+ const VkDeviceSize alignmentForPool = VMA_MAX(
+ vkMemReq.alignment,
+ GetMemoryTypeMinAlignment(createInfo.pool->m_BlockVector.GetMemoryTypeIndex()));
+
+ VmaAllocationCreateInfo createInfoForPool = createInfo;
+ // If memory type is not HOST_VISIBLE, disable MAPPED.
+ if((createInfoForPool.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 &&
+ (m_MemProps.memoryTypes[createInfo.pool->m_BlockVector.GetMemoryTypeIndex()].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
+ {
+ createInfoForPool.flags &= ~VMA_ALLOCATION_CREATE_MAPPED_BIT;
+ }
+
+ return createInfo.pool->m_BlockVector.Allocate(
+ m_CurrentFrameIndex.load(),
+ vkMemReq.size,
+ alignmentForPool,
+ createInfoForPool,
+ suballocType,
+ allocationCount,
+ pAllocations);
+ }
+ else
+ {
+ // Bit mask of memory Vulkan types acceptable for this allocation.
+ uint32_t memoryTypeBits = vkMemReq.memoryTypeBits;
+ uint32_t memTypeIndex = UINT32_MAX;
+ VkResult res = vmaFindMemoryTypeIndex(this, memoryTypeBits, &createInfo, &memTypeIndex);
+ if(res == VK_SUCCESS)
+ {
+ VkDeviceSize alignmentForMemType = VMA_MAX(
+ vkMemReq.alignment,
+ GetMemoryTypeMinAlignment(memTypeIndex));
+
+ res = AllocateMemoryOfType(
+ vkMemReq.size,
+ alignmentForMemType,
+ requiresDedicatedAllocation || prefersDedicatedAllocation,
+ dedicatedBuffer,
+ dedicatedImage,
+ createInfo,
+ memTypeIndex,
+ suballocType,
+ allocationCount,
+ pAllocations);
+ // Succeeded on first try.
+ if(res == VK_SUCCESS)
+ {
+ return res;
+ }
+ // Allocation from this memory type failed. Try other compatible memory types.
+ else
+ {
+ for(;;)
+ {
+ // Remove old memTypeIndex from list of possibilities.
+ memoryTypeBits &= ~(1u << memTypeIndex);
+ // Find alternative memTypeIndex.
+ res = vmaFindMemoryTypeIndex(this, memoryTypeBits, &createInfo, &memTypeIndex);
+ if(res == VK_SUCCESS)
+ {
+ alignmentForMemType = VMA_MAX(
+ vkMemReq.alignment,
+ GetMemoryTypeMinAlignment(memTypeIndex));
+
+ res = AllocateMemoryOfType(
+ vkMemReq.size,
+ alignmentForMemType,
+ requiresDedicatedAllocation || prefersDedicatedAllocation,
+ dedicatedBuffer,
+ dedicatedImage,
+ createInfo,
+ memTypeIndex,
+ suballocType,
+ allocationCount,
+ pAllocations);
+ // Allocation from this alternative memory type succeeded.
+ if(res == VK_SUCCESS)
+ {
+ return res;
+ }
+ // else: Allocation from this memory type failed. Try next one - next loop iteration.
+ }
+ // No other matching memory type index could be found.
+ else
+ {
+ // Not returning res, which is VK_ERROR_FEATURE_NOT_PRESENT, because we already failed to allocate once.
+ return VK_ERROR_OUT_OF_DEVICE_MEMORY;
+ }
+ }
+ }
+ }
+ // Can't find any single memory type maching requirements. res is VK_ERROR_FEATURE_NOT_PRESENT.
+ else
+ return res;
+ }
}
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(TouchAllocation(allocation))
- {
- 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->GetBlock()->GetParentPool();
- if(hPool != VK_NULL_HANDLE)
- {
- pBlockVector = &hPool->m_BlockVector;
- }
- else
- {
- const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex();
- pBlockVector = m_pBlockVectors[memTypeIndex];
- }
- pBlockVector->Free(allocation);
- }
- break;
- case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED:
- FreeDedicatedMemory(allocation);
- break;
- default:
- VMA_ASSERT(0);
- }
- }
-
- // Do this regardless of whether the allocation is lost. Lost allocations still account to Budget.AllocationBytes.
- m_Budget.RemoveAllocation(MemoryTypeIndexToHeapIndex(allocation->GetMemoryTypeIndex()), allocation->GetSize());
- allocation->SetUserData(this, VMA_NULL);
- m_AllocationObjectAllocator.Free(allocation);
- }
- }
+ 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(TouchAllocation(allocation))
+ {
+ 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->GetBlock()->GetParentPool();
+ if(hPool != VK_NULL_HANDLE)
+ {
+ pBlockVector = &hPool->m_BlockVector;
+ }
+ else
+ {
+ const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex();
+ pBlockVector = m_pBlockVectors[memTypeIndex];
+ }
+ pBlockVector->Free(allocation);
+ }
+ break;
+ case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED:
+ FreeDedicatedMemory(allocation);
+ break;
+ default:
+ VMA_ASSERT(0);
+ }
+ }
+
+ // Do this regardless of whether the allocation is lost. Lost allocations still account to Budget.AllocationBytes.
+ m_Budget.RemoveAllocation(MemoryTypeIndexToHeapIndex(allocation->GetMemoryTypeIndex()), allocation->GetSize());
+ allocation->SetUserData(this, VMA_NULL);
+ allocation->Dtor();
+ m_AllocationObjectAllocator.Free(allocation);
+ }
+ }
}
VkResult VmaAllocator_T::ResizeAllocation(
- const VmaAllocation alloc,
- VkDeviceSize newSize)
+ const VmaAllocation alloc,
+ VkDeviceSize newSize)
{
- // This function is deprecated and so it does nothing. It's left for backward compatibility.
- if(newSize == 0 || alloc->GetLastUseFrameIndex() == VMA_FRAME_INDEX_LOST)
- {
- return VK_ERROR_VALIDATION_FAILED_EXT;
- }
- if(newSize == alloc->GetSize())
- {
- return VK_SUCCESS;
- }
- return VK_ERROR_OUT_OF_POOL_MEMORY;
+ // This function is deprecated and so it does nothing. It's left for backward compatibility.
+ if(newSize == 0 || alloc->GetLastUseFrameIndex() == VMA_FRAME_INDEX_LOST)
+ {
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+ }
+ if(newSize == alloc->GetSize())
+ {
+ return VK_SUCCESS;
+ }
+ return VK_ERROR_OUT_OF_POOL_MEMORY;
}
void VmaAllocator_T::CalculateStats(VmaStats* pStats)
{
- // Initialize.
- InitStatInfo(pStats->total);
- for(size_t i = 0; i < VK_MAX_MEMORY_TYPES; ++i)
- InitStatInfo(pStats->memoryType[i]);
- for(size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i)
- InitStatInfo(pStats->memoryHeap[i]);
-
- // Process default pools.
- for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
- {
- VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex];
- VMA_ASSERT(pBlockVector);
- pBlockVector->AddStats(pStats);
- }
-
- // Process custom pools.
- {
- VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex);
- for(size_t poolIndex = 0, poolCount = m_Pools.size(); poolIndex < poolCount; ++poolIndex)
- {
- m_Pools[poolIndex]->m_BlockVector.AddStats(pStats);
- }
- }
-
- // Process dedicated allocations.
- for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
- {
- const uint32_t memHeapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex);
- VmaMutexLockRead dedicatedAllocationsLock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
- AllocationVectorType* const pDedicatedAllocVector = m_pDedicatedAllocations[memTypeIndex];
- VMA_ASSERT(pDedicatedAllocVector);
- for(size_t allocIndex = 0, allocCount = pDedicatedAllocVector->size(); allocIndex < allocCount; ++allocIndex)
- {
- VmaStatInfo allocationStatInfo;
- (*pDedicatedAllocVector)[allocIndex]->DedicatedAllocCalcStatsInfo(allocationStatInfo);
- VmaAddStatInfo(pStats->total, allocationStatInfo);
- VmaAddStatInfo(pStats->memoryType[memTypeIndex], allocationStatInfo);
- VmaAddStatInfo(pStats->memoryHeap[memHeapIndex], allocationStatInfo);
- }
- }
-
- // Postprocess.
- VmaPostprocessCalcStatInfo(pStats->total);
- for(size_t i = 0; i < GetMemoryTypeCount(); ++i)
- VmaPostprocessCalcStatInfo(pStats->memoryType[i]);
- for(size_t i = 0; i < GetMemoryHeapCount(); ++i)
- VmaPostprocessCalcStatInfo(pStats->memoryHeap[i]);
+ // Initialize.
+ InitStatInfo(pStats->total);
+ for(size_t i = 0; i < VK_MAX_MEMORY_TYPES; ++i)
+ InitStatInfo(pStats->memoryType[i]);
+ for(size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i)
+ InitStatInfo(pStats->memoryHeap[i]);
+
+ // Process default pools.
+ for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
+ {
+ VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex];
+ VMA_ASSERT(pBlockVector);
+ pBlockVector->AddStats(pStats);
+ }
+
+ // Process custom pools.
+ {
+ VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex);
+ for(size_t poolIndex = 0, poolCount = m_Pools.size(); poolIndex < poolCount; ++poolIndex)
+ {
+ m_Pools[poolIndex]->m_BlockVector.AddStats(pStats);
+ }
+ }
+
+ // Process dedicated allocations.
+ for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
+ {
+ const uint32_t memHeapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex);
+ VmaMutexLockRead dedicatedAllocationsLock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
+ AllocationVectorType* const pDedicatedAllocVector = m_pDedicatedAllocations[memTypeIndex];
+ VMA_ASSERT(pDedicatedAllocVector);
+ for(size_t allocIndex = 0, allocCount = pDedicatedAllocVector->size(); allocIndex < allocCount; ++allocIndex)
+ {
+ VmaStatInfo allocationStatInfo;
+ (*pDedicatedAllocVector)[allocIndex]->DedicatedAllocCalcStatsInfo(allocationStatInfo);
+ VmaAddStatInfo(pStats->total, allocationStatInfo);
+ VmaAddStatInfo(pStats->memoryType[memTypeIndex], allocationStatInfo);
+ VmaAddStatInfo(pStats->memoryHeap[memHeapIndex], allocationStatInfo);
+ }
+ }
+
+ // Postprocess.
+ VmaPostprocessCalcStatInfo(pStats->total);
+ for(size_t i = 0; i < GetMemoryTypeCount(); ++i)
+ VmaPostprocessCalcStatInfo(pStats->memoryType[i]);
+ for(size_t i = 0; i < GetMemoryHeapCount(); ++i)
+ VmaPostprocessCalcStatInfo(pStats->memoryHeap[i]);
}
void VmaAllocator_T::GetBudget(VmaBudget* outBudget, 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, ++outBudget)
- {
- const uint32_t heapIndex = firstHeap + i;
-
- outBudget->blockBytes = m_Budget.m_BlockBytes[heapIndex];
- outBudget->allocationBytes = m_Budget.m_AllocationBytes[heapIndex];
-
- if(m_Budget.m_VulkanUsage[heapIndex] + outBudget->blockBytes > m_Budget.m_BlockBytesAtBudgetFetch[heapIndex])
- {
- outBudget->usage = m_Budget.m_VulkanUsage[heapIndex] +
- outBudget->blockBytes - m_Budget.m_BlockBytesAtBudgetFetch[heapIndex];
- }
- else
- {
- outBudget->usage = 0;
- }
-
- // Have to take MIN with heap size because explicit HeapSizeLimit is included in it.
- outBudget->budget = VMA_MIN(
- m_Budget.m_VulkanBudget[heapIndex], m_MemProps.memoryHeaps[heapIndex].size);
- }
- }
- else
- {
- UpdateVulkanBudget(); // Outside of mutex lock
- GetBudget(outBudget, firstHeap, heapCount); // Recursion
- }
- }
- else
+ 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, ++outBudget)
+ {
+ const uint32_t heapIndex = firstHeap + i;
+
+ outBudget->blockBytes = m_Budget.m_BlockBytes[heapIndex];
+ outBudget->allocationBytes = m_Budget.m_AllocationBytes[heapIndex];
+
+ if(m_Budget.m_VulkanUsage[heapIndex] + outBudget->blockBytes > m_Budget.m_BlockBytesAtBudgetFetch[heapIndex])
+ {
+ outBudget->usage = m_Budget.m_VulkanUsage[heapIndex] +
+ outBudget->blockBytes - m_Budget.m_BlockBytesAtBudgetFetch[heapIndex];
+ }
+ else
+ {
+ outBudget->usage = 0;
+ }
+
+ // Have to take MIN with heap size because explicit HeapSizeLimit is included in it.
+ outBudget->budget = VMA_MIN(
+ m_Budget.m_VulkanBudget[heapIndex], m_MemProps.memoryHeaps[heapIndex].size);
+ }
+ }
+ else
+ {
+ UpdateVulkanBudget(); // Outside of mutex lock
+ GetBudget(outBudget, firstHeap, heapCount); // Recursion
+ }
+ }
+ else
#endif
- {
- for(uint32_t i = 0; i < heapCount; ++i, ++outBudget)
- {
- const uint32_t heapIndex = firstHeap + i;
+ {
+ for(uint32_t i = 0; i < heapCount; ++i, ++outBudget)
+ {
+ const uint32_t heapIndex = firstHeap + i;
- outBudget->blockBytes = m_Budget.m_BlockBytes[heapIndex];
- outBudget->allocationBytes = m_Budget.m_AllocationBytes[heapIndex];
+ outBudget->blockBytes = m_Budget.m_BlockBytes[heapIndex];
+ outBudget->allocationBytes = m_Budget.m_AllocationBytes[heapIndex];
- outBudget->usage = outBudget->blockBytes;
- outBudget->budget = m_MemProps.memoryHeaps[heapIndex].size * 8 / 10; // 80% heuristics.
- }
- }
+ outBudget->usage = outBudget->blockBytes;
+ outBudget->budget = m_MemProps.memoryHeaps[heapIndex].size * 8 / 10; // 80% heuristics.
+ }
+ }
}
static const uint32_t VMA_VENDOR_ID_AMD = 4098;
VkResult VmaAllocator_T::DefragmentationBegin(
- const VmaDefragmentationInfo2& info,
- VmaDefragmentationStats* pStats,
- VmaDefragmentationContext* pContext)
+ const VmaDefragmentationInfo2& info,
+ VmaDefragmentationStats* pStats,
+ VmaDefragmentationContext* pContext)
{
- if(info.pAllocationsChanged != VMA_NULL)
- {
- memset(info.pAllocationsChanged, 0, info.allocationCount * sizeof(VkBool32));
- }
+ if(info.pAllocationsChanged != VMA_NULL)
+ {
+ memset(info.pAllocationsChanged, 0, info.allocationCount * sizeof(VkBool32));
+ }
- *pContext = vma_new(this, VmaDefragmentationContext_T)(
- this, m_CurrentFrameIndex.load(), info.flags, pStats);
+ *pContext = vma_new(this, VmaDefragmentationContext_T)(
+ this, m_CurrentFrameIndex.load(), info.flags, pStats);
- (*pContext)->AddPools(info.poolCount, info.pPools);
- (*pContext)->AddAllocations(
- info.allocationCount, info.pAllocations, info.pAllocationsChanged);
+ (*pContext)->AddPools(info.poolCount, info.pPools);
+ (*pContext)->AddAllocations(
+ info.allocationCount, info.pAllocations, info.pAllocationsChanged);
- VkResult res = (*pContext)->Defragment(
- info.maxCpuBytesToMove, info.maxCpuAllocationsToMove,
- info.maxGpuBytesToMove, info.maxGpuAllocationsToMove,
- info.commandBuffer, pStats, info.flags);
+ VkResult res = (*pContext)->Defragment(
+ info.maxCpuBytesToMove, info.maxCpuAllocationsToMove,
+ info.maxGpuBytesToMove, info.maxGpuAllocationsToMove,
+ info.commandBuffer, pStats);
- if(res != VK_NOT_READY)
- {
- vma_delete(this, *pContext);
- *pContext = VMA_NULL;
- }
+ if(res != VK_NOT_READY)
+ {
+ vma_delete(this, *pContext);
+ *pContext = VMA_NULL;
+ }
- return res;
+ return res;
}
VkResult VmaAllocator_T::DefragmentationEnd(
- VmaDefragmentationContext context)
-{
- vma_delete(this, context);
- return VK_SUCCESS;
-}
-
-VkResult VmaAllocator_T::DefragmentationPassBegin(
- VmaDefragmentationPassInfo* pInfo,
- VmaDefragmentationContext context)
-{
- return context->DefragmentPassBegin(pInfo);
-}
-VkResult VmaAllocator_T::DefragmentationPassEnd(
- VmaDefragmentationContext context)
+ VmaDefragmentationContext context)
{
- return context->DefragmentPassEnd();
-
+ vma_delete(this, context);
+ return VK_SUCCESS;
}
void VmaAllocator_T::GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo)
{
- if(hAllocation->CanBecomeLost())
- {
- /*
- Warning: This is a carefully designed algorithm.
- Do not modify unless you really know what you're doing :)
- */
- const uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
- uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
- for(;;)
- {
- if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
- {
- pAllocationInfo->memoryType = UINT32_MAX;
- pAllocationInfo->deviceMemory = VK_NULL_HANDLE;
- pAllocationInfo->offset = 0;
- pAllocationInfo->size = hAllocation->GetSize();
- pAllocationInfo->pMappedData = VMA_NULL;
- pAllocationInfo->pUserData = hAllocation->GetUserData();
- return;
- }
- else if(localLastUseFrameIndex == localCurrFrameIndex)
- {
- pAllocationInfo->memoryType = hAllocation->GetMemoryTypeIndex();
- pAllocationInfo->deviceMemory = hAllocation->GetMemory();
- pAllocationInfo->offset = hAllocation->GetOffset();
- pAllocationInfo->size = hAllocation->GetSize();
- pAllocationInfo->pMappedData = VMA_NULL;
- pAllocationInfo->pUserData = hAllocation->GetUserData();
- return;
- }
- else // Last use time earlier than current time.
- {
- if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
- {
- localLastUseFrameIndex = localCurrFrameIndex;
- }
- }
- }
- }
- else
- {
+ if(hAllocation->CanBecomeLost())
+ {
+ /*
+ Warning: This is a carefully designed algorithm.
+ Do not modify unless you really know what you're doing :)
+ */
+ const uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
+ uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
+ for(;;)
+ {
+ if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
+ {
+ pAllocationInfo->memoryType = UINT32_MAX;
+ pAllocationInfo->deviceMemory = VK_NULL_HANDLE;
+ pAllocationInfo->offset = 0;
+ pAllocationInfo->size = hAllocation->GetSize();
+ pAllocationInfo->pMappedData = VMA_NULL;
+ pAllocationInfo->pUserData = hAllocation->GetUserData();
+ return;
+ }
+ else if(localLastUseFrameIndex == localCurrFrameIndex)
+ {
+ pAllocationInfo->memoryType = hAllocation->GetMemoryTypeIndex();
+ pAllocationInfo->deviceMemory = hAllocation->GetMemory();
+ pAllocationInfo->offset = hAllocation->GetOffset();
+ pAllocationInfo->size = hAllocation->GetSize();
+ pAllocationInfo->pMappedData = VMA_NULL;
+ pAllocationInfo->pUserData = hAllocation->GetUserData();
+ return;
+ }
+ else // Last use time earlier than current time.
+ {
+ if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
+ {
+ localLastUseFrameIndex = localCurrFrameIndex;
+ }
+ }
+ }
+ }
+ else
+ {
#if VMA_STATS_STRING_ENABLED
- uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
- uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
- for(;;)
- {
- VMA_ASSERT(localLastUseFrameIndex != VMA_FRAME_INDEX_LOST);
- if(localLastUseFrameIndex == localCurrFrameIndex)
- {
- break;
- }
- else // Last use time earlier than current time.
- {
- if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
- {
- localLastUseFrameIndex = localCurrFrameIndex;
- }
- }
- }
+ uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
+ uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
+ for(;;)
+ {
+ VMA_ASSERT(localLastUseFrameIndex != VMA_FRAME_INDEX_LOST);
+ if(localLastUseFrameIndex == localCurrFrameIndex)
+ {
+ break;
+ }
+ else // Last use time earlier than current time.
+ {
+ if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
+ {
+ localLastUseFrameIndex = localCurrFrameIndex;
+ }
+ }
+ }
#endif
- 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->memoryType = hAllocation->GetMemoryTypeIndex();
+ pAllocationInfo->deviceMemory = hAllocation->GetMemory();
+ pAllocationInfo->offset = hAllocation->GetOffset();
+ pAllocationInfo->size = hAllocation->GetSize();
+ pAllocationInfo->pMappedData = hAllocation->GetMappedData();
+ pAllocationInfo->pUserData = hAllocation->GetUserData();
+ }
}
bool VmaAllocator_T::TouchAllocation(VmaAllocation hAllocation)
{
- // This is a stripped-down version of VmaAllocator_T::GetAllocationInfo.
- if(hAllocation->CanBecomeLost())
- {
- uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
- uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
- for(;;)
- {
- if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
- {
- return false;
- }
- else if(localLastUseFrameIndex == localCurrFrameIndex)
- {
- return true;
- }
- else // Last use time earlier than current time.
- {
- if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
- {
- localLastUseFrameIndex = localCurrFrameIndex;
- }
- }
- }
- }
- else
- {
+ // This is a stripped-down version of VmaAllocator_T::GetAllocationInfo.
+ if(hAllocation->CanBecomeLost())
+ {
+ uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
+ uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
+ for(;;)
+ {
+ if(localLastUseFrameIndex == VMA_FRAME_INDEX_LOST)
+ {
+ return false;
+ }
+ else if(localLastUseFrameIndex == localCurrFrameIndex)
+ {
+ return true;
+ }
+ else // Last use time earlier than current time.
+ {
+ if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
+ {
+ localLastUseFrameIndex = localCurrFrameIndex;
+ }
+ }
+ }
+ }
+ else
+ {
#if VMA_STATS_STRING_ENABLED
- uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
- uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
- for(;;)
- {
- VMA_ASSERT(localLastUseFrameIndex != VMA_FRAME_INDEX_LOST);
- if(localLastUseFrameIndex == localCurrFrameIndex)
- {
- break;
- }
- else // Last use time earlier than current time.
- {
- if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
- {
- localLastUseFrameIndex = localCurrFrameIndex;
- }
- }
- }
+ uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
+ uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
+ for(;;)
+ {
+ VMA_ASSERT(localLastUseFrameIndex != VMA_FRAME_INDEX_LOST);
+ if(localLastUseFrameIndex == localCurrFrameIndex)
+ {
+ break;
+ }
+ else // Last use time earlier than current time.
+ {
+ if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex))
+ {
+ localLastUseFrameIndex = localCurrFrameIndex;
+ }
+ }
+ }
#endif
- return true;
- }
+ return true;
+ }
}
VkResult VmaAllocator_T::CreatePool(const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool)
{
- VMA_DEBUG_LOG(" CreatePool: MemoryTypeIndex=%u, flags=%u", pCreateInfo->memoryTypeIndex, pCreateInfo->flags);
+ VMA_DEBUG_LOG(" CreatePool: MemoryTypeIndex=%u, flags=%u", pCreateInfo->memoryTypeIndex, pCreateInfo->flags);
- VmaPoolCreateInfo newCreateInfo = *pCreateInfo;
+ VmaPoolCreateInfo newCreateInfo = *pCreateInfo;
- 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.maxBlockCount == 0)
+ {
+ newCreateInfo.maxBlockCount = SIZE_MAX;
+ }
+ if(newCreateInfo.minBlockCount > newCreateInfo.maxBlockCount)
+ {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
- const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(newCreateInfo.memoryTypeIndex);
+ const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(newCreateInfo.memoryTypeIndex);
- *pPool = vma_new(this, VmaPool_T)(this, newCreateInfo, preferredBlockSize);
+ *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;
- }
+ 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++);
- VmaVectorInsertSorted<VmaPointerLess>(m_Pools, *pPool);
- }
+ // Add to m_Pools.
+ {
+ VmaMutexLockWrite lock(m_PoolsMutex, m_UseMutex);
+ (*pPool)->SetId(m_NextPoolId++);
+ VmaVectorInsertSorted<VmaPointerLess>(m_Pools, *pPool);
+ }
- return VK_SUCCESS;
+ return VK_SUCCESS;
}
void VmaAllocator_T::DestroyPool(VmaPool pool)
{
- // Remove from m_Pools.
- {
- VmaMutexLockWrite lock(m_PoolsMutex, m_UseMutex);
- bool success = VmaVectorRemoveSorted<VmaPointerLess>(m_Pools, pool);
- VMA_ASSERT(success && "Pool not found in Allocator.");
- }
+ // Remove from m_Pools.
+ {
+ VmaMutexLockWrite lock(m_PoolsMutex, m_UseMutex);
+ bool success = VmaVectorRemoveSorted<VmaPointerLess>(m_Pools, pool);
+ VMA_ASSERT(success && "Pool not found in Allocator.");
+ }
- vma_delete(this, pool);
+ vma_delete(this, pool);
}
void VmaAllocator_T::GetPoolStats(VmaPool pool, VmaPoolStats* pPoolStats)
{
- pool->m_BlockVector.GetPoolStats(pPoolStats);
+ pool->m_BlockVector.GetPoolStats(pPoolStats);
}
void VmaAllocator_T::SetCurrentFrameIndex(uint32_t frameIndex)
{
- m_CurrentFrameIndex.store(frameIndex);
+ m_CurrentFrameIndex.store(frameIndex);
#if VMA_MEMORY_BUDGET
- if(m_UseExtMemoryBudget)
- {
- UpdateVulkanBudget();
- }
+ if(m_UseExtMemoryBudget)
+ {
+ UpdateVulkanBudget();
+ }
#endif // #if VMA_MEMORY_BUDGET
}
void VmaAllocator_T::MakePoolAllocationsLost(
- VmaPool hPool,
- size_t* pLostAllocationCount)
+ VmaPool hPool,
+ size_t* pLostAllocationCount)
{
- hPool->m_BlockVector.MakePoolAllocationsLost(
- m_CurrentFrameIndex.load(),
- pLostAllocationCount);
+ hPool->m_BlockVector.MakePoolAllocationsLost(
+ m_CurrentFrameIndex.load(),
+ pLostAllocationCount);
}
VkResult VmaAllocator_T::CheckPoolCorruption(VmaPool hPool)
{
- return hPool->m_BlockVector.CheckCorruption();
+ 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)
- {
- if(((1u << memTypeIndex) & memoryTypeBits) != 0)
- {
- VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex];
- VMA_ASSERT(pBlockVector);
- 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(size_t poolIndex = 0, poolCount = m_Pools.size(); poolIndex < poolCount; ++poolIndex)
- {
- if(((1u << m_Pools[poolIndex]->m_BlockVector.GetMemoryTypeIndex()) & memoryTypeBits) != 0)
- {
- VkResult localRes = m_Pools[poolIndex]->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 finalRes = VK_ERROR_FEATURE_NOT_PRESENT;
+
+ // Process default pools.
+ for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
+ {
+ if(((1u << memTypeIndex) & memoryTypeBits) != 0)
+ {
+ VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex];
+ VMA_ASSERT(pBlockVector);
+ 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(size_t poolIndex = 0, poolCount = m_Pools.size(); poolIndex < poolCount; ++poolIndex)
+ {
+ if(((1u << m_Pools[poolIndex]->m_BlockVector.GetMemoryTypeIndex()) & memoryTypeBits) != 0)
+ {
+ VkResult localRes = m_Pools[poolIndex]->m_BlockVector.CheckCorruption();
+ switch(localRes)
+ {
+ case VK_ERROR_FEATURE_NOT_PRESENT:
+ break;
+ case VK_SUCCESS:
+ finalRes = VK_SUCCESS;
+ break;
+ default:
+ return localRes;
+ }
+ }
+ }
+ }
+
+ return finalRes;
}
void VmaAllocator_T::CreateLostAllocation(VmaAllocation* pAllocation)
{
- *pAllocation = m_AllocationObjectAllocator.Allocate(VMA_FRAME_INDEX_LOST, false);
- (*pAllocation)->InitLost();
+ *pAllocation = m_AllocationObjectAllocator.Allocate();
+ (*pAllocation)->Ctor(VMA_FRAME_INDEX_LOST, false);
+ (*pAllocation)->InitLost();
}
VkResult VmaAllocator_T::AllocateVulkanMemory(const VkMemoryAllocateInfo* pAllocateInfo, VkDeviceMemory* pMemory)
{
- 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;
- }
-
- // VULKAN CALL vkAllocateMemory.
- VkResult res = (*m_VulkanFunctions.vkAllocateMemory)(m_hDevice, pAllocateInfo, GetAllocationCallbacks(), pMemory);
-
- if(res == VK_SUCCESS)
- {
+ 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;
+ }
+
+ // 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;
+ ++m_Budget.m_OperationsSinceBudgetFetch;
#endif
- // Informative callback.
- if(m_DeviceMemoryCallbacks.pfnAllocate != VMA_NULL)
- {
- (*m_DeviceMemoryCallbacks.pfnAllocate)(this, pAllocateInfo->memoryTypeIndex, *pMemory, pAllocateInfo->allocationSize);
- }
- }
- else
- {
- m_Budget.m_BlockBytes[heapIndex] -= pAllocateInfo->allocationSize;
- }
+ // Informative callback.
+ if(m_DeviceMemoryCallbacks.pfnAllocate != VMA_NULL)
+ {
+ (*m_DeviceMemoryCallbacks.pfnAllocate)(this, pAllocateInfo->memoryTypeIndex, *pMemory, pAllocateInfo->allocationSize);
+ }
+ }
+ else
+ {
+ m_Budget.m_BlockBytes[heapIndex] -= pAllocateInfo->allocationSize;
+ }
- return res;
+ 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);
- }
+ // Informative callback.
+ if(m_DeviceMemoryCallbacks.pfnFree != VMA_NULL)
+ {
+ (*m_DeviceMemoryCallbacks.pfnFree)(this, memoryType, hMemory, size);
+ }
- // VULKAN CALL vkFreeMemory.
- (*m_VulkanFunctions.vkFreeMemory)(m_hDevice, hMemory, GetAllocationCallbacks());
+ // VULKAN CALL vkFreeMemory.
+ (*m_VulkanFunctions.vkFreeMemory)(m_hDevice, hMemory, GetAllocationCallbacks());
- m_Budget.m_BlockBytes[MemoryTypeIndexToHeapIndex(memoryType)] -= size;
+ m_Budget.m_BlockBytes[MemoryTypeIndexToHeapIndex(memoryType)] -= size;
}
VkResult VmaAllocator_T::BindVulkanBuffer(
- VkDeviceMemory memory,
- VkDeviceSize memoryOffset,
- VkBuffer buffer,
- const void* pNext)
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset,
+ VkBuffer buffer,
+ const void* pNext)
{
- if(pNext != VMA_NULL)
- {
+ 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
+ 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);
- }
+ {
+ 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)
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset,
+ VkImage image,
+ const void* pNext)
{
- if(pNext != VMA_NULL)
- {
+ 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
+ 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);
- }
+ {
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
+ }
+ }
+ else
+ {
+ return (*m_VulkanFunctions.vkBindImageMemory)(m_hDevice, image, memory, memoryOffset);
+ }
}
VkResult VmaAllocator_T::Map(VmaAllocation hAllocation, void** ppData)
{
- if(hAllocation->CanBecomeLost())
- {
- return VK_ERROR_MEMORY_MAP_FAILED;
- }
-
- 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;
- }
+ if(hAllocation->CanBecomeLost())
+ {
+ return VK_ERROR_MEMORY_MAP_FAILED;
+ }
+
+ 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);
- }
+ 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_SUCCESS;
- 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. Is the allocation lost?");
- res = pBlock->BindBufferMemory(this, hAllocation, allocationLocalOffset, hBuffer, pNext);
- break;
- }
- default:
- VMA_ASSERT(0);
- }
- return res;
+ VmaAllocation hAllocation,
+ VkDeviceSize allocationLocalOffset,
+ VkBuffer hBuffer,
+ const void* pNext)
+{
+ VkResult res = VK_SUCCESS;
+ 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. Is the allocation lost?");
+ 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_SUCCESS;
- 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. Is the allocation lost?");
- res = pBlock->BindImageMemory(this, hAllocation, allocationLocalOffset, hImage, pNext);
- break;
- }
- default:
- VMA_ASSERT(0);
- }
- return res;
+ VmaAllocation hAllocation,
+ VkDeviceSize allocationLocalOffset,
+ VkImage hImage,
+ const void* pNext)
+{
+ VkResult res = VK_SUCCESS;
+ 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. Is the allocation lost?");
+ res = pBlock->BindImageMemory(this, hAllocation, allocationLocalOffset, hImage, pNext);
+ break;
+ }
+ default:
+ VMA_ASSERT(0);
+ }
+ return res;
}
void VmaAllocator_T::FlushOrInvalidateAllocation(
- VmaAllocation hAllocation,
- VkDeviceSize offset, VkDeviceSize size,
- VMA_CACHE_OPERATION op)
-{
- const uint32_t memTypeIndex = hAllocation->GetMemoryTypeIndex();
- if(size > 0 && IsMemoryTypeNonCoherent(memTypeIndex))
- {
- const VkDeviceSize allocationSize = hAllocation->GetSize();
- VMA_ASSERT(offset <= allocationSize);
-
- const VkDeviceSize nonCoherentAtomSize = m_PhysicalDeviceProperties.limits.nonCoherentAtomSize;
-
- VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };
- memRange.memory = hAllocation->GetMemory();
-
- switch(hAllocation->GetType())
- {
- case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED:
- memRange.offset = VmaAlignDown(offset, nonCoherentAtomSize);
- if(size == VK_WHOLE_SIZE)
- {
- memRange.size = allocationSize - memRange.offset;
- }
- else
- {
- VMA_ASSERT(offset + size <= allocationSize);
- memRange.size = VMA_MIN(
- VmaAlignUp(size + (offset - memRange.offset), nonCoherentAtomSize),
- allocationSize - memRange.offset);
- }
- break;
-
- case VmaAllocation_T::ALLOCATION_TYPE_BLOCK:
- {
- // 1. Still within this allocation.
- memRange.offset = VmaAlignDown(offset, nonCoherentAtomSize);
- if(size == VK_WHOLE_SIZE)
- {
- size = allocationSize - offset;
- }
- else
- {
- VMA_ASSERT(offset + size <= allocationSize);
- }
- memRange.size = VmaAlignUp(size + (offset - memRange.offset), nonCoherentAtomSize);
-
- // 2. Adjust to whole block.
- const VkDeviceSize allocationOffset = hAllocation->GetOffset();
- VMA_ASSERT(allocationOffset % nonCoherentAtomSize == 0);
- const VkDeviceSize blockSize = hAllocation->GetBlock()->m_pMetadata->GetSize();
- memRange.offset += allocationOffset;
- memRange.size = VMA_MIN(memRange.size, blockSize - memRange.offset);
-
- break;
- }
-
- default:
- VMA_ASSERT(0);
- }
-
- switch(op)
- {
- case VMA_CACHE_FLUSH:
- (*GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hDevice, 1, &memRange);
- break;
- case VMA_CACHE_INVALIDATE:
- (*GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hDevice, 1, &memRange);
- break;
- default:
- VMA_ASSERT(0);
- }
- }
- // else: Just ignore this call.
+ VmaAllocation hAllocation,
+ VkDeviceSize offset, VkDeviceSize size,
+ VMA_CACHE_OPERATION op)
+{
+ const uint32_t memTypeIndex = hAllocation->GetMemoryTypeIndex();
+ if(size > 0 && IsMemoryTypeNonCoherent(memTypeIndex))
+ {
+ const VkDeviceSize allocationSize = hAllocation->GetSize();
+ VMA_ASSERT(offset <= allocationSize);
+
+ const VkDeviceSize nonCoherentAtomSize = m_PhysicalDeviceProperties.limits.nonCoherentAtomSize;
+
+ VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };
+ memRange.memory = hAllocation->GetMemory();
+
+ switch(hAllocation->GetType())
+ {
+ case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED:
+ memRange.offset = VmaAlignDown(offset, nonCoherentAtomSize);
+ if(size == VK_WHOLE_SIZE)
+ {
+ memRange.size = allocationSize - memRange.offset;
+ }
+ else
+ {
+ VMA_ASSERT(offset + size <= allocationSize);
+ memRange.size = VMA_MIN(
+ VmaAlignUp(size + (offset - memRange.offset), nonCoherentAtomSize),
+ allocationSize - memRange.offset);
+ }
+ break;
+
+ case VmaAllocation_T::ALLOCATION_TYPE_BLOCK:
+ {
+ // 1. Still within this allocation.
+ memRange.offset = VmaAlignDown(offset, nonCoherentAtomSize);
+ if(size == VK_WHOLE_SIZE)
+ {
+ size = allocationSize - offset;
+ }
+ else
+ {
+ VMA_ASSERT(offset + size <= allocationSize);
+ }
+ memRange.size = VmaAlignUp(size + (offset - memRange.offset), nonCoherentAtomSize);
+
+ // 2. Adjust to whole block.
+ const VkDeviceSize allocationOffset = hAllocation->GetOffset();
+ VMA_ASSERT(allocationOffset % nonCoherentAtomSize == 0);
+ const VkDeviceSize blockSize = hAllocation->GetBlock()->m_pMetadata->GetSize();
+ memRange.offset += allocationOffset;
+ memRange.size = VMA_MIN(memRange.size, blockSize - memRange.offset);
+
+ break;
+ }
+
+ default:
+ VMA_ASSERT(0);
+ }
+
+ switch(op)
+ {
+ case VMA_CACHE_FLUSH:
+ (*GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hDevice, 1, &memRange);
+ break;
+ case VMA_CACHE_INVALIDATE:
+ (*GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hDevice, 1, &memRange);
+ break;
+ default:
+ VMA_ASSERT(0);
+ }
+ }
+ // else: Just ignore this call.
}
void VmaAllocator_T::FreeDedicatedMemory(const VmaAllocation allocation)
{
- VMA_ASSERT(allocation && allocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED);
+ VMA_ASSERT(allocation && allocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED);
- const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex();
- {
- VmaMutexLockWrite lock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
- AllocationVectorType* const pDedicatedAllocations = m_pDedicatedAllocations[memTypeIndex];
- VMA_ASSERT(pDedicatedAllocations);
- bool success = VmaVectorRemoveSorted<VmaPointerLess>(*pDedicatedAllocations, allocation);
- VMA_ASSERT(success);
- }
+ const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex();
+ {
+ VmaMutexLockWrite lock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
+ AllocationVectorType* const pDedicatedAllocations = m_pDedicatedAllocations[memTypeIndex];
+ VMA_ASSERT(pDedicatedAllocations);
+ bool success = VmaVectorRemoveSorted<VmaPointerLess>(*pDedicatedAllocations, allocation);
+ VMA_ASSERT(success);
+ }
- VkDeviceMemory hMemory = allocation->GetMemory();
-
- /*
- There is no need to call this, because Vulkan spec allows to skip vkUnmapMemory
- before vkFreeMemory.
+ 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);
+ if(allocation->GetMappedData() != VMA_NULL)
+ {
+ (*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory);
+ }
+ */
+
+ FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
- VMA_DEBUG_LOG(" Freed DedicatedMemory MemoryTypeIndex=%u", memTypeIndex);
+ VMA_DEBUG_LOG(" Freed DedicatedMemory MemoryTypeIndex=%u", memTypeIndex);
}
uint32_t VmaAllocator_T::CalculateGpuDefragmentationMemoryTypeBits() const
{
- VkBufferCreateInfo dummyBufCreateInfo;
- VmaFillGpuDefragmentationBufferCreateInfo(dummyBufCreateInfo);
+ VkBufferCreateInfo dummyBufCreateInfo;
+ VmaFillGpuDefragmentationBufferCreateInfo(dummyBufCreateInfo);
- uint32_t memoryTypeBits = 0;
+ 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;
+ // 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());
- }
+ // 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;
+ return memoryTypeBits;
}
#if VMA_MEMORY_BUDGET
void VmaAllocator_T::UpdateVulkanBudget()
{
- VMA_ASSERT(m_UseExtMemoryBudget);
+ VMA_ASSERT(m_UseExtMemoryBudget);
- VkPhysicalDeviceMemoryProperties2KHR memProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR };
+ VkPhysicalDeviceMemoryProperties2KHR memProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR };
- VkPhysicalDeviceMemoryBudgetPropertiesEXT budgetProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT };
- memProps.pNext = &budgetProps;
+ VkPhysicalDeviceMemoryBudgetPropertiesEXT budgetProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT };
+ memProps.pNext = &budgetProps;
- GetVulkanFunctions().vkGetPhysicalDeviceMemoryProperties2KHR(m_PhysicalDevice, &memProps);
+ GetVulkanFunctions().vkGetPhysicalDeviceMemoryProperties2KHR(m_PhysicalDevice, &memProps);
- {
- VmaMutexLockWrite lockWrite(m_Budget.m_BudgetMutex, m_UseMutex);
+ {
+ 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();
- }
- m_Budget.m_OperationsSinceBudgetFetch = 0;
- }
+ 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();
+ }
+ m_Budget.m_OperationsSinceBudgetFetch = 0;
+ }
}
#endif // #if VMA_MEMORY_BUDGET
void VmaAllocator_T::FillAllocation(const VmaAllocation hAllocation, uint8_t pattern)
{
- if(VMA_DEBUG_INITIALIZE_ALLOCATIONS &&
- !hAllocation->CanBecomeLost() &&
- (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.");
- }
- }
+ if(VMA_DEBUG_INITIALIZE_ALLOCATIONS &&
+ !hAllocation->CanBecomeLost() &&
+ (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;
+ 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)
{
- bool dedicatedAllocationsStarted = false;
- for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
- {
- VmaMutexLockRead dedicatedAllocationsLock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
- AllocationVectorType* const pDedicatedAllocVector = m_pDedicatedAllocations[memTypeIndex];
- VMA_ASSERT(pDedicatedAllocVector);
- if(pDedicatedAllocVector->empty() == false)
- {
- if(dedicatedAllocationsStarted == false)
- {
- dedicatedAllocationsStarted = true;
- json.WriteString("DedicatedAllocations");
- json.BeginObject();
- }
-
- json.BeginString("Type ");
- json.ContinueString(memTypeIndex);
- json.EndString();
-
- json.BeginArray();
-
- for(size_t i = 0; i < pDedicatedAllocVector->size(); ++i)
- {
- json.BeginObject(true);
- const VmaAllocation hAlloc = (*pDedicatedAllocVector)[i];
- hAlloc->PrintParameters(json);
- json.EndObject();
- }
-
- json.EndArray();
- }
- }
- if(dedicatedAllocationsStarted)
- {
- json.EndObject();
- }
-
- {
- bool allocationsStarted = false;
- for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
- {
- if(m_pBlockVectors[memTypeIndex]->IsEmpty() == false)
- {
- if(allocationsStarted == false)
- {
- allocationsStarted = true;
- json.WriteString("DefaultPools");
- json.BeginObject();
- }
-
- json.BeginString("Type ");
- json.ContinueString(memTypeIndex);
- json.EndString();
-
- m_pBlockVectors[memTypeIndex]->PrintDetailedMap(json);
- }
- }
- if(allocationsStarted)
- {
- json.EndObject();
- }
- }
-
- // Custom pools
- {
- VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex);
- const size_t poolCount = m_Pools.size();
- if(poolCount > 0)
- {
- json.WriteString("Pools");
- json.BeginObject();
- for(size_t poolIndex = 0; poolIndex < poolCount; ++poolIndex)
- {
- json.BeginString();
- json.ContinueString(m_Pools[poolIndex]->GetId());
- json.EndString();
-
- m_Pools[poolIndex]->m_BlockVector.PrintDetailedMap(json);
- }
- json.EndObject();
- }
- }
+ bool dedicatedAllocationsStarted = false;
+ for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
+ {
+ VmaMutexLockRead dedicatedAllocationsLock(m_DedicatedAllocationsMutex[memTypeIndex], m_UseMutex);
+ AllocationVectorType* const pDedicatedAllocVector = m_pDedicatedAllocations[memTypeIndex];
+ VMA_ASSERT(pDedicatedAllocVector);
+ if(pDedicatedAllocVector->empty() == false)
+ {
+ if(dedicatedAllocationsStarted == false)
+ {
+ dedicatedAllocationsStarted = true;
+ json.WriteString("DedicatedAllocations");
+ json.BeginObject();
+ }
+
+ json.BeginString("Type ");
+ json.ContinueString(memTypeIndex);
+ json.EndString();
+
+ json.BeginArray();
+
+ for(size_t i = 0; i < pDedicatedAllocVector->size(); ++i)
+ {
+ json.BeginObject(true);
+ const VmaAllocation hAlloc = (*pDedicatedAllocVector)[i];
+ hAlloc->PrintParameters(json);
+ json.EndObject();
+ }
+
+ json.EndArray();
+ }
+ }
+ if(dedicatedAllocationsStarted)
+ {
+ json.EndObject();
+ }
+
+ {
+ bool allocationsStarted = false;
+ for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex)
+ {
+ if(m_pBlockVectors[memTypeIndex]->IsEmpty() == false)
+ {
+ if(allocationsStarted == false)
+ {
+ allocationsStarted = true;
+ json.WriteString("DefaultPools");
+ json.BeginObject();
+ }
+
+ json.BeginString("Type ");
+ json.ContinueString(memTypeIndex);
+ json.EndString();
+
+ m_pBlockVectors[memTypeIndex]->PrintDetailedMap(json);
+ }
+ }
+ if(allocationsStarted)
+ {
+ json.EndObject();
+ }
+ }
+
+ // Custom pools
+ {
+ VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex);
+ const size_t poolCount = m_Pools.size();
+ if(poolCount > 0)
+ {
+ json.WriteString("Pools");
+ json.BeginObject();
+ for(size_t poolIndex = 0; poolIndex < poolCount; ++poolIndex)
+ {
+ json.BeginString();
+ json.ContinueString(m_Pools[poolIndex]->GetId());
+ json.EndString();
+
+ m_Pools[poolIndex]->m_BlockVector.PrintDetailedMap(json);
+ }
+ json.EndObject();
+ }
+ }
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -16803,233 +16363,221 @@ void VmaAllocator_T::PrintDetailedMap(VmaJsonWriter& json)
// Public interface
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator(
- const VmaAllocatorCreateInfo* pCreateInfo,
- VmaAllocator* pAllocator)
+ 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) <= 1));
- VMA_DEBUG_LOG("vmaCreateAllocator");
- *pAllocator = vma_new(pCreateInfo->pAllocationCallbacks, VmaAllocator_T)(pCreateInfo);
- return (*pAllocator)->Init(pCreateInfo);
+ VMA_ASSERT(pCreateInfo && pAllocator);
+ VMA_ASSERT(pCreateInfo->vulkanApiVersion == 0 ||
+ (VK_VERSION_MAJOR(pCreateInfo->vulkanApiVersion) == 1 && VK_VERSION_MINOR(pCreateInfo->vulkanApiVersion) <= 1));
+ VMA_DEBUG_LOG("vmaCreateAllocator");
+ *pAllocator = vma_new(pCreateInfo->pAllocationCallbacks, VmaAllocator_T)(pCreateInfo);
+ return (*pAllocator)->Init(pCreateInfo);
}
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator(
- VmaAllocator allocator)
+ VmaAllocator allocator)
{
- if(allocator != VK_NULL_HANDLE)
- {
- VMA_DEBUG_LOG("vmaDestroyAllocator");
- VkAllocationCallbacks allocationCallbacks = allocator->m_AllocationCallbacks;
- vma_delete(&allocationCallbacks, allocator);
- }
+ if(allocator != VK_NULL_HANDLE)
+ {
+ VMA_DEBUG_LOG("vmaDestroyAllocator");
+ VkAllocationCallbacks allocationCallbacks = allocator->m_AllocationCallbacks;
+ vma_delete(&allocationCallbacks, allocator);
+ }
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetPhysicalDeviceProperties(
- VmaAllocator allocator,
- const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)
+ VmaAllocator allocator,
+ const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)
{
- VMA_ASSERT(allocator && ppPhysicalDeviceProperties);
- *ppPhysicalDeviceProperties = &allocator->m_PhysicalDeviceProperties;
+ VMA_ASSERT(allocator && ppPhysicalDeviceProperties);
+ *ppPhysicalDeviceProperties = &allocator->m_PhysicalDeviceProperties;
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryProperties(
- VmaAllocator allocator,
- const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties)
+ VmaAllocator allocator,
+ const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties)
{
- VMA_ASSERT(allocator && ppPhysicalDeviceMemoryProperties);
- *ppPhysicalDeviceMemoryProperties = &allocator->m_MemProps;
+ VMA_ASSERT(allocator && ppPhysicalDeviceMemoryProperties);
+ *ppPhysicalDeviceMemoryProperties = &allocator->m_MemProps;
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties(
- VmaAllocator allocator,
- uint32_t memoryTypeIndex,
- VkMemoryPropertyFlags* pFlags)
+ VmaAllocator allocator,
+ uint32_t memoryTypeIndex,
+ VkMemoryPropertyFlags* pFlags)
{
- VMA_ASSERT(allocator && pFlags);
- VMA_ASSERT(memoryTypeIndex < allocator->GetMemoryTypeCount());
- *pFlags = allocator->m_MemProps.memoryTypes[memoryTypeIndex].propertyFlags;
+ 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)
+ VmaAllocator allocator,
+ uint32_t frameIndex)
{
- VMA_ASSERT(allocator);
- VMA_ASSERT(frameIndex != VMA_FRAME_INDEX_LOST);
+ VMA_ASSERT(allocator);
+ VMA_ASSERT(frameIndex != VMA_FRAME_INDEX_LOST);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->SetCurrentFrameIndex(frameIndex);
+ allocator->SetCurrentFrameIndex(frameIndex);
}
VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStats(
- VmaAllocator allocator,
- VmaStats* pStats)
+ VmaAllocator allocator,
+ VmaStats* pStats)
{
- VMA_ASSERT(allocator && pStats);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->CalculateStats(pStats);
+ VMA_ASSERT(allocator && pStats);
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ allocator->CalculateStats(pStats);
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetBudget(
- VmaAllocator allocator,
- VmaBudget* pBudget)
+ VmaAllocator allocator,
+ VmaBudget* pBudget)
{
- VMA_ASSERT(allocator && pBudget);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->GetBudget(pBudget, 0, allocator->GetMemoryHeapCount());
+ VMA_ASSERT(allocator && pBudget);
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ allocator->GetBudget(pBudget, 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);
- {
- VmaJsonWriter json(allocator->GetAllocationCallbacks(), sb);
- json.BeginObject();
-
- VmaBudget budget[VK_MAX_MEMORY_HEAPS];
- allocator->GetBudget(budget, 0, allocator->GetMemoryHeapCount());
-
- VmaStats stats;
- allocator->CalculateStats(&stats);
-
- json.WriteString("Total");
- VmaPrintStatInfo(json, stats.total);
-
- for(uint32_t heapIndex = 0; heapIndex < allocator->GetMemoryHeapCount(); ++heapIndex)
- {
- json.BeginString("Heap ");
- json.ContinueString(heapIndex);
- json.EndString();
- json.BeginObject();
-
- json.WriteString("Size");
- json.WriteNumber(allocator->m_MemProps.memoryHeaps[heapIndex].size);
-
- json.WriteString("Flags");
- json.BeginArray(true);
- if((allocator->m_MemProps.memoryHeaps[heapIndex].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0)
- {
- json.WriteString("DEVICE_LOCAL");
- }
- json.EndArray();
-
- json.WriteString("Budget");
- json.BeginObject();
- {
- json.WriteString("BlockBytes");
- json.WriteNumber(budget[heapIndex].blockBytes);
- json.WriteString("AllocationBytes");
- json.WriteNumber(budget[heapIndex].allocationBytes);
- json.WriteString("Usage");
- json.WriteNumber(budget[heapIndex].usage);
- json.WriteString("Budget");
- json.WriteNumber(budget[heapIndex].budget);
- }
- json.EndObject();
-
- if(stats.memoryHeap[heapIndex].blockCount > 0)
- {
- json.WriteString("Stats");
- VmaPrintStatInfo(json, stats.memoryHeap[heapIndex]);
- }
-
- 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) != 0)
- {
- json.WriteString("DEVICE_LOCAL");
- }
- if((flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0)
- {
- json.WriteString("HOST_VISIBLE");
- }
- if((flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) != 0)
- {
- json.WriteString("HOST_COHERENT");
- }
- if((flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) != 0)
- {
- json.WriteString("HOST_CACHED");
- }
- if((flags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) != 0)
- {
- json.WriteString("LAZILY_ALLOCATED");
- }
- if((flags & VK_MEMORY_PROPERTY_PROTECTED_BIT) != 0)
- {
- json.WriteString(" PROTECTED");
- }
- if((flags & VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY) != 0)
- {
- json.WriteString(" DEVICE_COHERENT");
- }
- if((flags & VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY) != 0)
- {
- json.WriteString(" DEVICE_UNCACHED");
- }
- json.EndArray();
-
- if(stats.memoryType[typeIndex].blockCount > 0)
- {
- json.WriteString("Stats");
- VmaPrintStatInfo(json, stats.memoryType[typeIndex]);
- }
-
- json.EndObject();
- }
- }
-
- json.EndObject();
- }
- if(detailedMap == VK_TRUE)
- {
- allocator->PrintDetailedMap(json);
- }
-
- json.EndObject();
- }
-
- const size_t len = sb.GetLength();
- char* const pChars = vma_new_array(allocator, char, len + 1);
- if(len > 0)
- {
- memcpy(pChars, sb.GetData(), len);
- }
- pChars[len] = '\0';
- *ppStatsString = pChars;
+ VmaAllocator allocator,
+ char** ppStatsString,
+ VkBool32 detailedMap)
+{
+ VMA_ASSERT(allocator && ppStatsString);
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
+
+ VmaStringBuilder sb(allocator);
+ {
+ VmaJsonWriter json(allocator->GetAllocationCallbacks(), sb);
+ json.BeginObject();
+
+ VmaBudget budget[VK_MAX_MEMORY_HEAPS];
+ allocator->GetBudget(budget, 0, allocator->GetMemoryHeapCount());
+
+ VmaStats stats;
+ allocator->CalculateStats(&stats);
+
+ json.WriteString("Total");
+ VmaPrintStatInfo(json, stats.total);
+
+ for(uint32_t heapIndex = 0; heapIndex < allocator->GetMemoryHeapCount(); ++heapIndex)
+ {
+ json.BeginString("Heap ");
+ json.ContinueString(heapIndex);
+ json.EndString();
+ json.BeginObject();
+
+ json.WriteString("Size");
+ json.WriteNumber(allocator->m_MemProps.memoryHeaps[heapIndex].size);
+
+ json.WriteString("Flags");
+ json.BeginArray(true);
+ if((allocator->m_MemProps.memoryHeaps[heapIndex].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0)
+ {
+ json.WriteString("DEVICE_LOCAL");
+ }
+ json.EndArray();
+
+ json.WriteString("Budget");
+ json.BeginObject();
+ {
+ json.WriteString("BlockBytes");
+ json.WriteNumber(budget[heapIndex].blockBytes);
+ json.WriteString("AllocationBytes");
+ json.WriteNumber(budget[heapIndex].allocationBytes);
+ json.WriteString("Usage");
+ json.WriteNumber(budget[heapIndex].usage);
+ json.WriteString("Budget");
+ json.WriteNumber(budget[heapIndex].budget);
+ }
+ json.EndObject();
+
+ if(stats.memoryHeap[heapIndex].blockCount > 0)
+ {
+ json.WriteString("Stats");
+ VmaPrintStatInfo(json, stats.memoryHeap[heapIndex]);
+ }
+
+ 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) != 0)
+ {
+ json.WriteString("DEVICE_LOCAL");
+ }
+ if((flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0)
+ {
+ json.WriteString("HOST_VISIBLE");
+ }
+ if((flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) != 0)
+ {
+ json.WriteString("HOST_COHERENT");
+ }
+ if((flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) != 0)
+ {
+ json.WriteString("HOST_CACHED");
+ }
+ if((flags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) != 0)
+ {
+ json.WriteString("LAZILY_ALLOCATED");
+ }
+ json.EndArray();
+
+ if(stats.memoryType[typeIndex].blockCount > 0)
+ {
+ json.WriteString("Stats");
+ VmaPrintStatInfo(json, stats.memoryType[typeIndex]);
+ }
+
+ json.EndObject();
+ }
+ }
+
+ json.EndObject();
+ }
+ if(detailedMap == VK_TRUE)
+ {
+ allocator->PrintDetailedMap(json);
+ }
+
+ json.EndObject();
+ }
+
+ const size_t len = sb.GetLength();
+ char* const pChars = vma_new_array(allocator, char, len + 1);
+ if(len > 0)
+ {
+ memcpy(pChars, sb.GetData(), len);
+ }
+ pChars[len] = '\0';
+ *ppStatsString = pChars;
}
VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
- VmaAllocator allocator,
- char* pStatsString)
+ VmaAllocator allocator,
+ char* pStatsString)
{
- if(pStatsString != VMA_NULL)
- {
- VMA_ASSERT(allocator);
- size_t len = strlen(pStatsString);
- vma_delete_array(allocator, pStatsString, len + 1);
- }
+ if(pStatsString != VMA_NULL)
+ {
+ VMA_ASSERT(allocator);
+ size_t len = strlen(pStatsString);
+ vma_delete_array(allocator, pStatsString, len + 1);
+ }
}
#endif // #if VMA_STATS_STRING_ENABLED
@@ -17038,166 +16586,157 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
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);
-
- memoryTypeBits &= allocator->GetGlobalMemoryTypeBits();
-
- if(pAllocationCreateInfo->memoryTypeBits != 0)
- {
- memoryTypeBits &= pAllocationCreateInfo->memoryTypeBits;
- }
-
- uint32_t requiredFlags = pAllocationCreateInfo->requiredFlags;
- uint32_t preferredFlags = pAllocationCreateInfo->preferredFlags;
- uint32_t notPreferredFlags = 0;
-
- // Convert usage to requiredFlags and preferredFlags.
- switch(pAllocationCreateInfo->usage)
- {
- case VMA_MEMORY_USAGE_UNKNOWN:
- break;
- case VMA_MEMORY_USAGE_GPU_ONLY:
- if(!allocator->IsIntegratedGpu() || (preferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
- {
- preferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
- }
- break;
- case VMA_MEMORY_USAGE_CPU_ONLY:
- requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
- break;
- case VMA_MEMORY_USAGE_CPU_TO_GPU:
- requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
- if(!allocator->IsIntegratedGpu() || (preferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
- {
- preferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
- }
- break;
- case VMA_MEMORY_USAGE_GPU_TO_CPU:
- requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
- preferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
- break;
- case VMA_MEMORY_USAGE_CPU_COPY:
- notPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
- break;
- case VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED:
- requiredFlags |= VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT;
- break;
- default:
- VMA_ASSERT(0);
- break;
- }
-
- // Avoid DEVICE_COHERENT unless explicitly requested.
- if(((pAllocationCreateInfo->requiredFlags | pAllocationCreateInfo->preferredFlags) &
- (VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY | VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY)) == 0)
- {
- notPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY;
- }
-
- *pMemoryTypeIndex = UINT32_MAX;
- uint32_t minCost = UINT32_MAX;
- for(uint32_t memTypeIndex = 0, memTypeBit = 1;
- memTypeIndex < allocator->GetMemoryTypeCount();
- ++memTypeIndex, memTypeBit <<= 1)
- {
- // This memory type is acceptable according to memoryTypeBits bitmask.
- if((memTypeBit & memoryTypeBits) != 0)
- {
- const VkMemoryPropertyFlags currFlags =
- allocator->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 = VmaCountBitsSet(preferredFlags & ~currFlags) +
- VmaCountBitsSet(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;
+ 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);
+
+ if(pAllocationCreateInfo->memoryTypeBits != 0)
+ {
+ memoryTypeBits &= pAllocationCreateInfo->memoryTypeBits;
+ }
+
+ uint32_t requiredFlags = pAllocationCreateInfo->requiredFlags;
+ uint32_t preferredFlags = pAllocationCreateInfo->preferredFlags;
+ uint32_t notPreferredFlags = 0;
+
+ // Convert usage to requiredFlags and preferredFlags.
+ switch(pAllocationCreateInfo->usage)
+ {
+ case VMA_MEMORY_USAGE_UNKNOWN:
+ break;
+ case VMA_MEMORY_USAGE_GPU_ONLY:
+ if(!allocator->IsIntegratedGpu() || (preferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
+ {
+ preferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
+ }
+ break;
+ case VMA_MEMORY_USAGE_CPU_ONLY:
+ requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
+ break;
+ case VMA_MEMORY_USAGE_CPU_TO_GPU:
+ requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+ if(!allocator->IsIntegratedGpu() || (preferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
+ {
+ preferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
+ }
+ break;
+ case VMA_MEMORY_USAGE_GPU_TO_CPU:
+ requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+ preferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
+ break;
+ case VMA_MEMORY_USAGE_CPU_COPY:
+ notPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
+ break;
+ case VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED:
+ requiredFlags |= VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT;
+ break;
+ default:
+ VMA_ASSERT(0);
+ break;
+ }
+
+ *pMemoryTypeIndex = UINT32_MAX;
+ uint32_t minCost = UINT32_MAX;
+ for(uint32_t memTypeIndex = 0, memTypeBit = 1;
+ memTypeIndex < allocator->GetMemoryTypeCount();
+ ++memTypeIndex, memTypeBit <<= 1)
+ {
+ // This memory type is acceptable according to memoryTypeBits bitmask.
+ if((memTypeBit & memoryTypeBits) != 0)
+ {
+ const VkMemoryPropertyFlags currFlags =
+ allocator->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 = VmaCountBitsSet(preferredFlags & ~currFlags) +
+ VmaCountBitsSet(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;
}
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;
- VkBuffer hBuffer = VK_NULL_HANDLE;
- VkResult res = allocator->GetVulkanFunctions().vkCreateBuffer(
- hDev, pBufferCreateInfo, allocator->GetAllocationCallbacks(), &hBuffer);
- if(res == VK_SUCCESS)
- {
- VkMemoryRequirements memReq = {};
- allocator->GetVulkanFunctions().vkGetBufferMemoryRequirements(
- hDev, hBuffer, &memReq);
-
- res = vmaFindMemoryTypeIndex(
- allocator,
- memReq.memoryTypeBits,
- pAllocationCreateInfo,
- pMemoryTypeIndex);
-
- allocator->GetVulkanFunctions().vkDestroyBuffer(
- hDev, hBuffer, allocator->GetAllocationCallbacks());
- }
- return res;
+ 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;
+ VkBuffer hBuffer = VK_NULL_HANDLE;
+ VkResult res = allocator->GetVulkanFunctions().vkCreateBuffer(
+ hDev, pBufferCreateInfo, allocator->GetAllocationCallbacks(), &hBuffer);
+ if(res == VK_SUCCESS)
+ {
+ VkMemoryRequirements memReq = {};
+ allocator->GetVulkanFunctions().vkGetBufferMemoryRequirements(
+ hDev, hBuffer, &memReq);
+
+ res = vmaFindMemoryTypeIndex(
+ allocator,
+ memReq.memoryTypeBits,
+ pAllocationCreateInfo,
+ pMemoryTypeIndex);
+
+ allocator->GetVulkanFunctions().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;
- VkImage hImage = VK_NULL_HANDLE;
- VkResult res = allocator->GetVulkanFunctions().vkCreateImage(
- hDev, pImageCreateInfo, allocator->GetAllocationCallbacks(), &hImage);
- if(res == VK_SUCCESS)
- {
- VkMemoryRequirements memReq = {};
- allocator->GetVulkanFunctions().vkGetImageMemoryRequirements(
- hDev, hImage, &memReq);
-
- res = vmaFindMemoryTypeIndex(
- allocator,
- memReq.memoryTypeBits,
- pAllocationCreateInfo,
- pMemoryTypeIndex);
-
- allocator->GetVulkanFunctions().vkDestroyImage(
- hDev, hImage, allocator->GetAllocationCallbacks());
- }
- return res;
+ 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;
+ VkImage hImage = VK_NULL_HANDLE;
+ VkResult res = allocator->GetVulkanFunctions().vkCreateImage(
+ hDev, pImageCreateInfo, allocator->GetAllocationCallbacks(), &hImage);
+ if(res == VK_SUCCESS)
+ {
+ VkMemoryRequirements memReq = {};
+ allocator->GetVulkanFunctions().vkGetImageMemoryRequirements(
+ hDev, hImage, &memReq);
+
+ res = vmaFindMemoryTypeIndex(
+ allocator,
+ memReq.memoryTypeBits,
+ pAllocationCreateInfo,
+ pMemoryTypeIndex);
+
+ allocator->GetVulkanFunctions().vkDestroyImage(
+ hDev, hImage, allocator->GetAllocationCallbacks());
+ }
+ return res;
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool(
@@ -17205,1058 +16744,1021 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool(
const VmaPoolCreateInfo* pCreateInfo,
VmaPool* pPool)
{
- VMA_ASSERT(allocator && pCreateInfo && pPool);
-
- VMA_DEBUG_LOG("vmaCreatePool");
-
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
-
- VkResult res = allocator->CreatePool(pCreateInfo, pPool);
-
+ VMA_ASSERT(allocator && pCreateInfo && pPool);
+
+ VMA_DEBUG_LOG("vmaCreatePool");
+
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
+
+ VkResult res = allocator->CreatePool(pCreateInfo, pPool);
+
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordCreatePool(allocator->GetCurrentFrameIndex(), *pCreateInfo, *pPool);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordCreatePool(allocator->GetCurrentFrameIndex(), *pCreateInfo, *pPool);
+ }
#endif
-
- return res;
+
+ return res;
}
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
-
+ VmaAllocator allocator,
+ VmaPool pool)
+{
+ VMA_ASSERT(allocator);
+
+ if(pool == VK_NULL_HANDLE)
+ {
+ return;
+ }
+
+ VMA_DEBUG_LOG("vmaDestroyPool");
+
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
+
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordDestroyPool(allocator->GetCurrentFrameIndex(), pool);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordDestroyPool(allocator->GetCurrentFrameIndex(), pool);
+ }
#endif
- allocator->DestroyPool(pool);
+ allocator->DestroyPool(pool);
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStats(
- VmaAllocator allocator,
- VmaPool pool,
- VmaPoolStats* pPoolStats)
+ VmaAllocator allocator,
+ VmaPool pool,
+ VmaPoolStats* pPoolStats)
{
- VMA_ASSERT(allocator && pool && pPoolStats);
+ VMA_ASSERT(allocator && pool && pPoolStats);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->GetPoolStats(pool, pPoolStats);
+ allocator->GetPoolStats(pool, pPoolStats);
}
VMA_CALL_PRE void VMA_CALL_POST vmaMakePoolAllocationsLost(
- VmaAllocator allocator,
- VmaPool pool,
- size_t* pLostAllocationCount)
+ VmaAllocator allocator,
+ VmaPool pool,
+ size_t* pLostAllocationCount)
{
- VMA_ASSERT(allocator && pool);
+ VMA_ASSERT(allocator && pool);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordMakePoolAllocationsLost(allocator->GetCurrentFrameIndex(), pool);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordMakePoolAllocationsLost(allocator->GetCurrentFrameIndex(), pool);
+ }
#endif
- allocator->MakePoolAllocationsLost(pool, pLostAllocationCount);
+ allocator->MakePoolAllocationsLost(pool, pLostAllocationCount);
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool)
{
- VMA_ASSERT(allocator && pool);
+ VMA_ASSERT(allocator && pool);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- VMA_DEBUG_LOG("vmaCheckPoolCorruption");
+ VMA_DEBUG_LOG("vmaCheckPoolCorruption");
- return allocator->CheckPoolCorruption(pool);
+ return allocator->CheckPoolCorruption(pool);
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolName(
- VmaAllocator allocator,
- VmaPool pool,
- const char** ppName)
+ VmaAllocator allocator,
+ VmaPool pool,
+ const char** ppName)
{
- VMA_ASSERT(allocator && pool);
-
- VMA_DEBUG_LOG("vmaGetPoolName");
+ VMA_ASSERT(allocator && pool);
+
+ VMA_DEBUG_LOG("vmaGetPoolName");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- *ppName = pool->GetName();
+ *ppName = pool->GetName();
}
VMA_CALL_PRE void VMA_CALL_POST vmaSetPoolName(
- VmaAllocator allocator,
- VmaPool pool,
- const char* pName)
+ VmaAllocator allocator,
+ VmaPool pool,
+ const char* pName)
{
- VMA_ASSERT(allocator && pool);
+ VMA_ASSERT(allocator && pool);
- VMA_DEBUG_LOG("vmaSetPoolName");
+ VMA_DEBUG_LOG("vmaSetPoolName");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- pool->SetName(pName);
+ pool->SetName(pName);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordSetPoolName(allocator->GetCurrentFrameIndex(), pool, pName);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordSetPoolName(allocator->GetCurrentFrameIndex(), pool, pName);
+ }
#endif
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory(
- VmaAllocator allocator,
- const VkMemoryRequirements* pVkMemoryRequirements,
- const VmaAllocationCreateInfo* pCreateInfo,
- VmaAllocation* pAllocation,
- VmaAllocationInfo* pAllocationInfo)
+ VmaAllocator allocator,
+ const VkMemoryRequirements* pVkMemoryRequirements,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ VmaAllocation* pAllocation,
+ VmaAllocationInfo* pAllocationInfo)
{
- VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocation);
+ VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocation);
- VMA_DEBUG_LOG("vmaAllocateMemory");
+ VMA_DEBUG_LOG("vmaAllocateMemory");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
VkResult result = allocator->AllocateMemory(
- *pVkMemoryRequirements,
- false, // requiresDedicatedAllocation
- false, // prefersDedicatedAllocation
- VK_NULL_HANDLE, // dedicatedBuffer
- VK_NULL_HANDLE, // dedicatedImage
- *pCreateInfo,
- VMA_SUBALLOCATION_TYPE_UNKNOWN,
- 1, // allocationCount
- pAllocation);
+ *pVkMemoryRequirements,
+ false, // requiresDedicatedAllocation
+ false, // prefersDedicatedAllocation
+ VK_NULL_HANDLE, // dedicatedBuffer
+ VK_NULL_HANDLE, // dedicatedImage
+ *pCreateInfo,
+ VMA_SUBALLOCATION_TYPE_UNKNOWN,
+ 1, // allocationCount
+ pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordAllocateMemory(
- allocator->GetCurrentFrameIndex(),
- *pVkMemoryRequirements,
- *pCreateInfo,
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordAllocateMemory(
+ allocator->GetCurrentFrameIndex(),
+ *pVkMemoryRequirements,
+ *pCreateInfo,
+ *pAllocation);
+ }
#endif
-
- if(pAllocationInfo != VMA_NULL && result == VK_SUCCESS)
- {
- allocator->GetAllocationInfo(*pAllocation, pAllocationInfo);
- }
+
+ 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)
+ VmaAllocator allocator,
+ const VkMemoryRequirements* pVkMemoryRequirements,
+ const VmaAllocationCreateInfo* pCreateInfo,
+ size_t allocationCount,
+ VmaAllocation* pAllocations,
+ VmaAllocationInfo* pAllocationInfo)
{
- if(allocationCount == 0)
- {
- return VK_SUCCESS;
- }
+ if(allocationCount == 0)
+ {
+ return VK_SUCCESS;
+ }
- VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocations);
+ VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocations);
- VMA_DEBUG_LOG("vmaAllocateMemoryPages");
+ VMA_DEBUG_LOG("vmaAllocateMemoryPages");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
VkResult result = allocator->AllocateMemory(
- *pVkMemoryRequirements,
- false, // requiresDedicatedAllocation
- false, // prefersDedicatedAllocation
- VK_NULL_HANDLE, // dedicatedBuffer
- VK_NULL_HANDLE, // dedicatedImage
- *pCreateInfo,
- VMA_SUBALLOCATION_TYPE_UNKNOWN,
- allocationCount,
- pAllocations);
+ *pVkMemoryRequirements,
+ false, // requiresDedicatedAllocation
+ false, // prefersDedicatedAllocation
+ VK_NULL_HANDLE, // dedicatedBuffer
+ VK_NULL_HANDLE, // dedicatedImage
+ *pCreateInfo,
+ VMA_SUBALLOCATION_TYPE_UNKNOWN,
+ allocationCount,
+ pAllocations);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordAllocateMemoryPages(
- allocator->GetCurrentFrameIndex(),
- *pVkMemoryRequirements,
- *pCreateInfo,
- (uint64_t)allocationCount,
- pAllocations);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordAllocateMemoryPages(
+ allocator->GetCurrentFrameIndex(),
+ *pVkMemoryRequirements,
+ *pCreateInfo,
+ (uint64_t)allocationCount,
+ pAllocations);
+ }
#endif
-
- if(pAllocationInfo != VMA_NULL && result == VK_SUCCESS)
- {
- for(size_t i = 0; i < allocationCount; ++i)
- {
- allocator->GetAllocationInfo(pAllocations[i], pAllocationInfo + i);
- }
- }
+
+ 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
- *pCreateInfo,
- VMA_SUBALLOCATION_TYPE_BUFFER,
- 1, // allocationCount
- pAllocation);
+ 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
+ *pCreateInfo,
+ VMA_SUBALLOCATION_TYPE_BUFFER,
+ 1, // allocationCount
+ pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordAllocateMemoryForBuffer(
- allocator->GetCurrentFrameIndex(),
- vkMemReq,
- requiresDedicatedAllocation,
- prefersDedicatedAllocation,
- *pCreateInfo,
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordAllocateMemoryForBuffer(
+ allocator->GetCurrentFrameIndex(),
+ vkMemReq,
+ requiresDedicatedAllocation,
+ prefersDedicatedAllocation,
+ *pCreateInfo,
+ *pAllocation);
+ }
#endif
- if(pAllocationInfo && result == VK_SUCCESS)
- {
- allocator->GetAllocationInfo(*pAllocation, pAllocationInfo);
- }
+ 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
- *pCreateInfo,
- VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN,
- 1, // allocationCount
- pAllocation);
+ 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
+ *pCreateInfo,
+ VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN,
+ 1, // allocationCount
+ pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordAllocateMemoryForImage(
- allocator->GetCurrentFrameIndex(),
- vkMemReq,
- requiresDedicatedAllocation,
- prefersDedicatedAllocation,
- *pCreateInfo,
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordAllocateMemoryForImage(
+ allocator->GetCurrentFrameIndex(),
+ vkMemReq,
+ requiresDedicatedAllocation,
+ prefersDedicatedAllocation,
+ *pCreateInfo,
+ *pAllocation);
+ }
#endif
- if(pAllocationInfo && result == VK_SUCCESS)
- {
- allocator->GetAllocationInfo(*pAllocation, pAllocationInfo);
- }
+ 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
+ VmaAllocator allocator,
+ VmaAllocation allocation)
+{
+ VMA_ASSERT(allocator);
+
+ if(allocation == VK_NULL_HANDLE)
+ {
+ return;
+ }
+
+ VMA_DEBUG_LOG("vmaFreeMemory");
+
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordFreeMemory(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordFreeMemory(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
-
- allocator->FreeMemory(
- 1, // allocationCount
- &allocation);
+
+ allocator->FreeMemory(
+ 1, // allocationCount
+ &allocation);
}
VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemoryPages(
- VmaAllocator allocator,
- size_t allocationCount,
- VmaAllocation* pAllocations)
+ VmaAllocator allocator,
+ size_t allocationCount,
+ VmaAllocation* pAllocations)
{
- if(allocationCount == 0)
- {
- return;
- }
+ if(allocationCount == 0)
+ {
+ return;
+ }
- VMA_ASSERT(allocator);
-
- VMA_DEBUG_LOG("vmaFreeMemoryPages");
-
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_ASSERT(allocator);
+
+ VMA_DEBUG_LOG("vmaFreeMemoryPages");
+
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordFreeMemoryPages(
- allocator->GetCurrentFrameIndex(),
- (uint64_t)allocationCount,
- pAllocations);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordFreeMemoryPages(
+ allocator->GetCurrentFrameIndex(),
+ (uint64_t)allocationCount,
+ pAllocations);
+ }
#endif
-
- allocator->FreeMemory(allocationCount, pAllocations);
+
+ allocator->FreeMemory(allocationCount, pAllocations);
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaResizeAllocation(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkDeviceSize newSize)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize newSize)
{
- VMA_ASSERT(allocator && allocation);
-
- VMA_DEBUG_LOG("vmaResizeAllocation");
-
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_ASSERT(allocator && allocation);
+
+ VMA_DEBUG_LOG("vmaResizeAllocation");
+
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->ResizeAllocation(allocation, newSize);
+ return allocator->ResizeAllocation(allocation, newSize);
}
VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VmaAllocationInfo* pAllocationInfo)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VmaAllocationInfo* pAllocationInfo)
{
- VMA_ASSERT(allocator && allocation && pAllocationInfo);
+ VMA_ASSERT(allocator && allocation && pAllocationInfo);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordGetAllocationInfo(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordGetAllocationInfo(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- allocator->GetAllocationInfo(allocation, pAllocationInfo);
+ allocator->GetAllocationInfo(allocation, pAllocationInfo);
}
VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaTouchAllocation(
- VmaAllocator allocator,
- VmaAllocation allocation)
+ VmaAllocator allocator,
+ VmaAllocation allocation)
{
- VMA_ASSERT(allocator && allocation);
+ VMA_ASSERT(allocator && allocation);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordTouchAllocation(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordTouchAllocation(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- return allocator->TouchAllocation(allocation);
+ return allocator->TouchAllocation(allocation);
}
VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationUserData(
- VmaAllocator allocator,
- VmaAllocation allocation,
- void* pUserData)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ void* pUserData)
{
- VMA_ASSERT(allocator && allocation);
+ VMA_ASSERT(allocator && allocation);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocation->SetUserData(allocator, pUserData);
+ allocation->SetUserData(allocator, pUserData);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordSetAllocationUserData(
- allocator->GetCurrentFrameIndex(),
- allocation,
- pUserData);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordSetAllocationUserData(
+ allocator->GetCurrentFrameIndex(),
+ allocation,
+ pUserData);
+ }
#endif
}
VMA_CALL_PRE void VMA_CALL_POST vmaCreateLostAllocation(
- VmaAllocator allocator,
- VmaAllocation* pAllocation)
+ VmaAllocator allocator,
+ VmaAllocation* pAllocation)
{
- VMA_ASSERT(allocator && pAllocation);
+ VMA_ASSERT(allocator && pAllocation);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK;
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK;
- allocator->CreateLostAllocation(pAllocation);
+ allocator->CreateLostAllocation(pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordCreateLostAllocation(
- allocator->GetCurrentFrameIndex(),
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordCreateLostAllocation(
+ allocator->GetCurrentFrameIndex(),
+ *pAllocation);
+ }
#endif
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaMapMemory(
- VmaAllocator allocator,
- VmaAllocation allocation,
- void** ppData)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ void** ppData)
{
- VMA_ASSERT(allocator && allocation && ppData);
+ VMA_ASSERT(allocator && allocation && ppData);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- VkResult res = allocator->Map(allocation, ppData);
+ VkResult res = allocator->Map(allocation, ppData);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordMapMemory(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordMapMemory(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- return res;
+ return res;
}
VMA_CALL_PRE void VMA_CALL_POST vmaUnmapMemory(
- VmaAllocator allocator,
- VmaAllocation allocation)
+ VmaAllocator allocator,
+ VmaAllocation allocation)
{
- VMA_ASSERT(allocator && allocation);
+ VMA_ASSERT(allocator && allocation);
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordUnmapMemory(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordUnmapMemory(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- allocator->Unmap(allocation);
+ allocator->Unmap(allocation);
}
VMA_CALL_PRE void VMA_CALL_POST vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
{
- VMA_ASSERT(allocator && allocation);
+ VMA_ASSERT(allocator && allocation);
- VMA_DEBUG_LOG("vmaFlushAllocation");
+ VMA_DEBUG_LOG("vmaFlushAllocation");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_FLUSH);
+ allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_FLUSH);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordFlushAllocation(
- allocator->GetCurrentFrameIndex(),
- allocation, offset, size);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordFlushAllocation(
+ allocator->GetCurrentFrameIndex(),
+ allocation, offset, size);
+ }
#endif
}
VMA_CALL_PRE void VMA_CALL_POST vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
{
- VMA_ASSERT(allocator && allocation);
+ VMA_ASSERT(allocator && allocation);
- VMA_DEBUG_LOG("vmaInvalidateAllocation");
+ VMA_DEBUG_LOG("vmaInvalidateAllocation");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_INVALIDATE);
+ allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_INVALIDATE);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordInvalidateAllocation(
- allocator->GetCurrentFrameIndex(),
- allocation, offset, size);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordInvalidateAllocation(
+ allocator->GetCurrentFrameIndex(),
+ allocation, offset, size);
+ }
#endif
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits)
{
- VMA_ASSERT(allocator);
+ VMA_ASSERT(allocator);
- VMA_DEBUG_LOG("vmaCheckCorruption");
+ VMA_DEBUG_LOG("vmaCheckCorruption");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->CheckCorruption(memoryTypeBits);
+ return allocator->CheckCorruption(memoryTypeBits);
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragment(
- VmaAllocator allocator,
- VmaAllocation* pAllocations,
- size_t allocationCount,
- VkBool32* pAllocationsChanged,
- const VmaDefragmentationInfo *pDefragmentationInfo,
- VmaDefragmentationStats* pDefragmentationStats)
-{
- // Deprecated interface, reimplemented using new one.
-
- VmaDefragmentationInfo2 info2 = {};
- info2.allocationCount = (uint32_t)allocationCount;
- info2.pAllocations = pAllocations;
- info2.pAllocationsChanged = pAllocationsChanged;
- if(pDefragmentationInfo != VMA_NULL)
- {
- info2.maxCpuAllocationsToMove = pDefragmentationInfo->maxAllocationsToMove;
- info2.maxCpuBytesToMove = pDefragmentationInfo->maxBytesToMove;
- }
- else
- {
- info2.maxCpuAllocationsToMove = UINT32_MAX;
- info2.maxCpuBytesToMove = VK_WHOLE_SIZE;
- }
- // info2.flags, maxGpuAllocationsToMove, maxGpuBytesToMove, commandBuffer deliberately left zero.
-
- VmaDefragmentationContext ctx;
- VkResult res = vmaDefragmentationBegin(allocator, &info2, pDefragmentationStats, &ctx);
- if(res == VK_NOT_READY)
- {
- res = vmaDefragmentationEnd( allocator, ctx);
- }
- return res;
+ VmaAllocator allocator,
+ VmaAllocation* pAllocations,
+ size_t allocationCount,
+ VkBool32* pAllocationsChanged,
+ const VmaDefragmentationInfo *pDefragmentationInfo,
+ VmaDefragmentationStats* pDefragmentationStats)
+{
+ // Deprecated interface, reimplemented using new one.
+
+ VmaDefragmentationInfo2 info2 = {};
+ info2.allocationCount = (uint32_t)allocationCount;
+ info2.pAllocations = pAllocations;
+ info2.pAllocationsChanged = pAllocationsChanged;
+ if(pDefragmentationInfo != VMA_NULL)
+ {
+ info2.maxCpuAllocationsToMove = pDefragmentationInfo->maxAllocationsToMove;
+ info2.maxCpuBytesToMove = pDefragmentationInfo->maxBytesToMove;
+ }
+ else
+ {
+ info2.maxCpuAllocationsToMove = UINT32_MAX;
+ info2.maxCpuBytesToMove = VK_WHOLE_SIZE;
+ }
+ // info2.flags, maxGpuAllocationsToMove, maxGpuBytesToMove, commandBuffer deliberately left zero.
+
+ VmaDefragmentationContext ctx;
+ VkResult res = vmaDefragmentationBegin(allocator, &info2, pDefragmentationStats, &ctx);
+ if(res == VK_NOT_READY)
+ {
+ res = vmaDefragmentationEnd( allocator, ctx);
+ }
+ return res;
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationBegin(
- VmaAllocator allocator,
- const VmaDefragmentationInfo2* pInfo,
- VmaDefragmentationStats* pStats,
- VmaDefragmentationContext *pContext)
+ VmaAllocator allocator,
+ const VmaDefragmentationInfo2* pInfo,
+ VmaDefragmentationStats* pStats,
+ VmaDefragmentationContext *pContext)
{
- VMA_ASSERT(allocator && pInfo && pContext);
+ VMA_ASSERT(allocator && pInfo && pContext);
- // Degenerate case: Nothing to defragment.
- if(pInfo->allocationCount == 0 && pInfo->poolCount == 0)
- {
- return VK_SUCCESS;
- }
+ // Degenerate case: Nothing to defragment.
+ if(pInfo->allocationCount == 0 && pInfo->poolCount == 0)
+ {
+ return VK_SUCCESS;
+ }
- VMA_ASSERT(pInfo->allocationCount == 0 || pInfo->pAllocations != VMA_NULL);
- VMA_ASSERT(pInfo->poolCount == 0 || pInfo->pPools != VMA_NULL);
- VMA_HEAVY_ASSERT(VmaValidatePointerArray(pInfo->allocationCount, pInfo->pAllocations));
- VMA_HEAVY_ASSERT(VmaValidatePointerArray(pInfo->poolCount, pInfo->pPools));
+ VMA_ASSERT(pInfo->allocationCount == 0 || pInfo->pAllocations != VMA_NULL);
+ VMA_ASSERT(pInfo->poolCount == 0 || pInfo->pPools != VMA_NULL);
+ VMA_HEAVY_ASSERT(VmaValidatePointerArray(pInfo->allocationCount, pInfo->pAllocations));
+ VMA_HEAVY_ASSERT(VmaValidatePointerArray(pInfo->poolCount, pInfo->pPools));
- VMA_DEBUG_LOG("vmaDefragmentationBegin");
+ VMA_DEBUG_LOG("vmaDefragmentationBegin");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- VkResult res = allocator->DefragmentationBegin(*pInfo, pStats, pContext);
+ VkResult res = allocator->DefragmentationBegin(*pInfo, pStats, pContext);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordDefragmentationBegin(
- allocator->GetCurrentFrameIndex(), *pInfo, *pContext);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordDefragmentationBegin(
+ allocator->GetCurrentFrameIndex(), *pInfo, *pContext);
+ }
#endif
- return res;
+ return res;
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationEnd(
- VmaAllocator allocator,
- VmaDefragmentationContext context)
+ VmaAllocator allocator,
+ VmaDefragmentationContext context)
{
- VMA_ASSERT(allocator);
+ VMA_ASSERT(allocator);
- VMA_DEBUG_LOG("vmaDefragmentationEnd");
+ VMA_DEBUG_LOG("vmaDefragmentationEnd");
- if(context != VK_NULL_HANDLE)
- {
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ if(context != VK_NULL_HANDLE)
+ {
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordDefragmentationEnd(
- allocator->GetCurrentFrameIndex(), context);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordDefragmentationEnd(
+ allocator->GetCurrentFrameIndex(), context);
+ }
#endif
- return allocator->DefragmentationEnd(context);
- }
- else
- {
- return VK_SUCCESS;
- }
-}
-
-VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentationPass(
- VmaAllocator allocator,
- VmaDefragmentationContext context,
- VmaDefragmentationPassInfo* pInfo
- )
-{
- VMA_ASSERT(allocator);
- VMA_ASSERT(pInfo);
- VMA_HEAVY_ASSERT(VmaValidatePointerArray(pInfo->moveCount, pInfo->pMoves));
-
- VMA_DEBUG_LOG("vmaBeginDefragmentationPass");
-
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
-
- if(context == VK_NULL_HANDLE)
- {
- pInfo->moveCount = 0;
- return VK_SUCCESS;
- }
-
- return allocator->DefragmentationPassBegin(pInfo, context);
-}
-VMA_CALL_PRE VkResult VMA_CALL_POST vmaEndDefragmentationPass(
- VmaAllocator allocator,
- VmaDefragmentationContext context)
-{
- VMA_ASSERT(allocator);
-
- VMA_DEBUG_LOG("vmaEndDefragmentationPass");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
-
- if(context == VK_NULL_HANDLE)
- return VK_SUCCESS;
-
- return allocator->DefragmentationPassEnd(context);
+ return allocator->DefragmentationEnd(context);
+ }
+ else
+ {
+ return VK_SUCCESS;
+ }
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkBuffer buffer)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkBuffer buffer)
{
- VMA_ASSERT(allocator && allocation && buffer);
+ VMA_ASSERT(allocator && allocation && buffer);
- VMA_DEBUG_LOG("vmaBindBufferMemory");
+ VMA_DEBUG_LOG("vmaBindBufferMemory");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->BindBufferMemory(allocation, 0, buffer, VMA_NULL);
+ 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)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize allocationLocalOffset,
+ VkBuffer buffer,
+ const void* pNext)
{
- VMA_ASSERT(allocator && allocation && buffer);
+ VMA_ASSERT(allocator && allocation && buffer);
- VMA_DEBUG_LOG("vmaBindBufferMemory2");
+ VMA_DEBUG_LOG("vmaBindBufferMemory2");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->BindBufferMemory(allocation, allocationLocalOffset, buffer, pNext);
+ return allocator->BindBufferMemory(allocation, allocationLocalOffset, buffer, pNext);
}
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory(
- VmaAllocator allocator,
- VmaAllocation allocation,
- VkImage image)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkImage image)
{
- VMA_ASSERT(allocator && allocation && image);
+ VMA_ASSERT(allocator && allocation && image);
- VMA_DEBUG_LOG("vmaBindImageMemory");
+ VMA_DEBUG_LOG("vmaBindImageMemory");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->BindImageMemory(allocation, 0, image, VMA_NULL);
+ 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)
+ VmaAllocator allocator,
+ VmaAllocation allocation,
+ VkDeviceSize allocationLocalOffset,
+ VkImage image,
+ const void* pNext)
{
- VMA_ASSERT(allocator && allocation && image);
+ VMA_ASSERT(allocator && allocation && image);
- VMA_DEBUG_LOG("vmaBindImageMemory2");
+ VMA_DEBUG_LOG("vmaBindImageMemory2");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
- return allocator->BindImageMemory(allocation, allocationLocalOffset, image, pNext);
+ 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_VALIDATION_FAILED_EXT;
- }
-
- 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);
-
- // Make sure alignment requirements for specific buffer usages reported
- // in Physical Device Properties are included in alignment reported by memory requirements.
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT) != 0)
- {
- VMA_ASSERT(vkMemReq.alignment %
- allocator->m_PhysicalDeviceProperties.limits.minTexelBufferOffsetAlignment == 0);
- }
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) != 0)
- {
- VMA_ASSERT(vkMemReq.alignment %
- allocator->m_PhysicalDeviceProperties.limits.minUniformBufferOffsetAlignment == 0);
- }
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) != 0)
- {
- VMA_ASSERT(vkMemReq.alignment %
- allocator->m_PhysicalDeviceProperties.limits.minStorageBufferOffsetAlignment == 0);
- }
-
- // 3. Allocate memory using allocator.
- res = allocator->AllocateMemory(
- vkMemReq,
- requiresDedicatedAllocation,
- prefersDedicatedAllocation,
- *pBuffer, // dedicatedBuffer
- VK_NULL_HANDLE, // dedicatedImage
- *pAllocationCreateInfo,
- VMA_SUBALLOCATION_TYPE_BUFFER,
- 1, // allocationCount
- pAllocation);
+ 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_VALIDATION_FAILED_EXT;
+ }
+
+ 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);
+
+ // Make sure alignment requirements for specific buffer usages reported
+ // in Physical Device Properties are included in alignment reported by memory requirements.
+ if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT) != 0)
+ {
+ VMA_ASSERT(vkMemReq.alignment %
+ allocator->m_PhysicalDeviceProperties.limits.minTexelBufferOffsetAlignment == 0);
+ }
+ if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) != 0)
+ {
+ VMA_ASSERT(vkMemReq.alignment %
+ allocator->m_PhysicalDeviceProperties.limits.minUniformBufferOffsetAlignment == 0);
+ }
+ if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) != 0)
+ {
+ VMA_ASSERT(vkMemReq.alignment %
+ allocator->m_PhysicalDeviceProperties.limits.minStorageBufferOffsetAlignment == 0);
+ }
+
+ // 3. Allocate memory using allocator.
+ res = allocator->AllocateMemory(
+ vkMemReq,
+ requiresDedicatedAllocation,
+ prefersDedicatedAllocation,
+ *pBuffer, // dedicatedBuffer
+ VK_NULL_HANDLE, // dedicatedImage
+ *pAllocationCreateInfo,
+ VMA_SUBALLOCATION_TYPE_BUFFER,
+ 1, // allocationCount
+ pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordCreateBuffer(
- allocator->GetCurrentFrameIndex(),
- *pBufferCreateInfo,
- *pAllocationCreateInfo,
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordCreateBuffer(
+ allocator->GetCurrentFrameIndex(),
+ *pBufferCreateInfo,
+ *pAllocationCreateInfo,
+ *pAllocation);
+ }
#endif
- 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)->InitBufferImageUsage(pBufferCreateInfo->usage);
- #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;
+ 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)->InitBufferImageUsage(pBufferCreateInfo->usage);
+ #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 void VMA_CALL_POST vmaDestroyBuffer(
- VmaAllocator allocator,
- VkBuffer buffer,
- VmaAllocation allocation)
+ VmaAllocator allocator,
+ VkBuffer buffer,
+ VmaAllocation allocation)
{
- VMA_ASSERT(allocator);
+ VMA_ASSERT(allocator);
- if(buffer == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE)
- {
- return;
- }
+ if(buffer == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE)
+ {
+ return;
+ }
- VMA_DEBUG_LOG("vmaDestroyBuffer");
+ VMA_DEBUG_LOG("vmaDestroyBuffer");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordDestroyBuffer(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordDestroyBuffer(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- if(buffer != VK_NULL_HANDLE)
- {
- (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, buffer, allocator->GetAllocationCallbacks());
- }
+ if(buffer != VK_NULL_HANDLE)
+ {
+ (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, buffer, allocator->GetAllocationCallbacks());
+ }
- if(allocation != VK_NULL_HANDLE)
- {
- allocator->FreeMemory(
- 1, // allocationCount
- &allocation);
- }
+ 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_VALIDATION_FAILED_EXT;
- }
-
- 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 >= 0)
- {
- 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
- *pAllocationCreateInfo,
- suballocType,
- 1, // allocationCount
- pAllocation);
+ 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_VALIDATION_FAILED_EXT;
+ }
+
+ 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 >= 0)
+ {
+ 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
+ *pAllocationCreateInfo,
+ suballocType,
+ 1, // allocationCount
+ pAllocation);
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordCreateImage(
- allocator->GetCurrentFrameIndex(),
- *pImageCreateInfo,
- *pAllocationCreateInfo,
- *pAllocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordCreateImage(
+ allocator->GetCurrentFrameIndex(),
+ *pImageCreateInfo,
+ *pAllocationCreateInfo,
+ *pAllocation);
+ }
#endif
- if(res >= 0)
- {
- // 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 >= 0)
- {
- // All steps succeeded.
- #if VMA_STATS_STRING_ENABLED
- (*pAllocation)->InitBufferImageUsage(pImageCreateInfo->usage);
- #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;
+ if(res >= 0)
+ {
+ // 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 >= 0)
+ {
+ // All steps succeeded.
+ #if VMA_STATS_STRING_ENABLED
+ (*pAllocation)->InitBufferImageUsage(pImageCreateInfo->usage);
+ #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 void VMA_CALL_POST vmaDestroyImage(
- VmaAllocator allocator,
- VkImage image,
- VmaAllocation allocation)
+ VmaAllocator allocator,
+ VkImage image,
+ VmaAllocation allocation)
{
- VMA_ASSERT(allocator);
+ VMA_ASSERT(allocator);
- if(image == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE)
- {
- return;
- }
+ if(image == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE)
+ {
+ return;
+ }
- VMA_DEBUG_LOG("vmaDestroyImage");
+ VMA_DEBUG_LOG("vmaDestroyImage");
- VMA_DEBUG_GLOBAL_MUTEX_LOCK
+ VMA_DEBUG_GLOBAL_MUTEX_LOCK
#if VMA_RECORDING_ENABLED
- if(allocator->GetRecorder() != VMA_NULL)
- {
- allocator->GetRecorder()->RecordDestroyImage(
- allocator->GetCurrentFrameIndex(),
- allocation);
- }
+ if(allocator->GetRecorder() != VMA_NULL)
+ {
+ allocator->GetRecorder()->RecordDestroyImage(
+ allocator->GetCurrentFrameIndex(),
+ allocation);
+ }
#endif
- if(image != VK_NULL_HANDLE)
- {
- (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, image, allocator->GetAllocationCallbacks());
- }
- if(allocation != VK_NULL_HANDLE)
- {
- allocator->FreeMemory(
- 1, // allocationCount
- &allocation);
- }
+ if(image != VK_NULL_HANDLE)
+ {
+ (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, image, allocator->GetAllocationCallbacks());
+ }
+ if(allocation != VK_NULL_HANDLE)
+ {
+ allocator->FreeMemory(
+ 1, // allocationCount
+ &allocation);
+ }
}
#endif // #ifdef VMA_IMPLEMENTATION